@poirazis/supercomponents-shared 1.1.8 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +21180 -40125
- package/dist/index.umd.cjs +19 -26
- package/dist/style.css +1 -1
- package/package.json +5 -5
- package/src/index.js +4 -0
- package/src/index.ts +3 -0
- package/src/lib/Actions/index.js +3 -3
- package/src/lib/Actions/position_dropdown.js +14 -7
- package/src/lib/SuperButton/SuperButton.svelte +34 -3
- package/src/lib/SuperField/SuperField.svelte +0 -11
- package/src/lib/SuperForm/InnerForm.svelte +1 -1
- package/src/lib/SuperList/SuperList.svelte +2 -2
- package/src/lib/SuperList/drag-handle.svelte +8 -8
- package/src/lib/SuperPopover/SuperPopover.svelte +2 -2
- package/src/lib/SuperTable/SuperTable.css +8 -3
- package/src/lib/SuperTable/SuperTable.svelte +3 -3
- package/src/lib/SuperTable/controls/PaginationLimitOffset.svelte +2 -0
- package/src/lib/SuperTable/controls/SelectionColumn.svelte +18 -49
- package/src/lib/SuperTable/controls/SuperTableWelcome.svelte +1 -1
- package/src/lib/SuperTable/overlays/AddNewRowOverlay.svelte +3 -3
- package/src/lib/SuperTable/overlays/EmptyResultSetOverlay.svelte +1 -1
- package/src/lib/SuperTable/overlays/ScrollbarsOverlay.svelte +43 -43
- package/src/lib/SuperTableCells/CellAttachmentExpanded.svelte +1 -1
- package/src/lib/SuperTableCells/CellAttachmentSlider.svelte +2 -3
- package/src/lib/SuperTableCells/CellBoolean.svelte +1 -1
- package/src/lib/SuperTableCells/CellColor.svelte +7 -7
- package/src/lib/SuperTableCells/CellCommon.css +1 -1
- package/src/lib/SuperTableCells/CellIcon.svelte +7 -7
- package/src/lib/SuperTableCells/CellJSON.svelte +2 -2
- package/src/lib/SuperTableCells/CellLink.svelte +50 -43
- package/src/lib/SuperTableCells/CellLinkAdvanced.svelte +2 -16
- package/src/lib/SuperTableCells/CellLinkPickerSelect.svelte +10 -11
- package/src/lib/SuperTableCells/CellLinkPickerTree.svelte +4 -2
- package/src/lib/SuperTableCells/CellNumber.svelte +24 -5
- package/src/lib/SuperTableCells/CellOptions.svelte +20 -34
- package/src/lib/SuperTableCells/CellOptionsAdvanced.svelte +5 -5
- package/src/lib/SuperTableCells/CellSQLLink.svelte +24 -36
- package/src/lib/SuperTableCells/CellSQLLinkPicker.svelte +9 -9
- package/src/lib/SuperTableCells/CellString.svelte +3 -3
- package/src/lib/SuperTableCells/CellStringMask.svelte +1 -1
- package/src/lib/SuperTableCells/CellTags.svelte +151 -108
- package/src/lib/SuperTableCells/JSDOC_GUIDE.md +163 -3
- package/src/lib/SuperTableCells/types.js +141 -192
- package/src/lib/SuperTableColumn/SuperTableColumn.svelte +1 -1
- package/src/lib/SuperTableColumn/parts/SuperColumnHeader.svelte +2 -2
- package/src/lib/SuperTableColumn/parts/SuperColumnRow.svelte +5 -3
- package/src/lib/SuperTabs/SuperTabs.svelte +2 -2
- package/src/lib/SuperTree/SuperTree.svelte +84 -38
- package/src/lib/UI/elements/Checkbox.svelte +36 -6
- package/src/lib/UI/elements/IconButton.svelte +115 -0
- package/src/lib/UI/elements/Tooltip.svelte +65 -0
package/dist/index.umd.cjs
CHANGED
|
@@ -1,26 +1,19 @@
|
|
|
1
|
-
(function(ct,le){typeof exports=="object"&&typeof module<"u"?le(exports,require("svelte")):typeof define=="function"&&define.amd?define(["exports","svelte"],le):(ct=typeof globalThis<"u"?globalThis:ct||self,le(ct.SupercomponentsShared={},ct.Svelte))})(this,function(ct,le){"use strict";var bS=Object.defineProperty;var wS=(ct,le,ue)=>le in ct?bS(ct,le,{enumerable:!0,configurable:!0,writable:!0,value:ue}):ct[le]=ue;var Es=(ct,le,ue)=>wS(ct,typeof le!="symbol"?le+"":le,ue);function ue(){}const Sm=t=>t;function vs(t,e){for(const n in e)t[n]=e[n];return t}function Ss(t){return t()}function Cs(){return Object.create(null)}function Ve(t){t.forEach(Ss)}function Ge(t){return typeof t=="function"}function Ye(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let fr;function As(t,e){return t===e?!0:(fr||(fr=document.createElement("a")),fr.href=e,t===fr.href)}function Cm(t){return Object.keys(t).length===0}function ft(t,...e){if(t==null){for(const i of e)i(void 0);return ue}const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function qt(t){let e;return ft(t,n=>e=n)(),e}function Me(t,e,n){t.$$.on_destroy.push(ft(e,n))}function Ut(t,e,n,i){if(t){const l=Ts(t,e,n,i);return t[0](l)}}function Ts(t,e,n,i){return t[1]&&i?vs(n.ctx.slice(),t[1](i(e))):n.ctx}function Ht(t,e,n,i){if(t[2]&&i){const l=t[2](i(n));if(e.dirty===void 0)return l;if(typeof l=="object"){const r=[],o=Math.max(e.dirty.length,l.length);for(let u=0;u<o;u+=1)r[u]=e.dirty[u]|l[u];return r}return e.dirty|l}return e.dirty}function zt(t,e,n,i,l,r){if(l){const o=Ts(e,n,i,r);t.p(o,l)}}function jt(t){if(t.ctx.length>32){const e=[],n=t.ctx.length/32;for(let i=0;i<n;i++)e[i]=-1;return e}return-1}function bt(t){return t??""}function Re(t,e,n){return t.set(n),e}const Am=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);function tn(t){return t&&Ge(t.destroy)?t.destroy:ue}function Is(t){const e=typeof t=="string"&&t.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return e?[parseFloat(e[1]),e[2]||"px"]:[t,"px"]}const Ds=typeof window<"u";let Tm=Ds?()=>window.performance.now():()=>Date.now(),uo=Ds?t=>requestAnimationFrame(t):ue;const El=new Set;function Os(t){El.forEach(e=>{e.c(t)||(El.delete(e),e.f())}),El.size!==0&&uo(Os)}function Im(t){let e;return El.size===0&&uo(Os),{promise:new Promise(n=>{El.add(e={c:t,f:n})}),abort(){El.delete(e)}}}function S(t,e){t.appendChild(e)}function Rs(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function Dm(t){const e=v("style");return e.textContent="/* empty */",Om(Rs(t),e),e.sheet}function Om(t,e){return S(t.head||t,e),e.sheet}function A(t,e,n){t.insertBefore(e,n||null)}function C(t){t.parentNode&&t.parentNode.removeChild(t)}function St(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function v(t){return document.createElement(t)}function Rm(t,e){const n={};for(const i in t)Am(t,i)&&e.indexOf(i)===-1&&(n[i]=t[i]);return n}function vl(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Ee(t){return document.createTextNode(t)}function Q(){return Ee(" ")}function Fe(){return Ee("")}function B(t,e,n,i){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n,i)}function Et(t){return function(e){return e.preventDefault(),t.call(this,e)}}function Qt(t){return function(e){return e.stopPropagation(),t.call(this,e)}}function Ii(t){return function(e){e.target===this&&t.call(this,e)}}function m(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function ao(t,e,n){const i=e.toLowerCase();i in t?t[i]=typeof t[i]=="boolean"&&n===""?!0:n:e in t?t[e]=typeof t[e]=="boolean"&&n===""?!0:n:m(t,e,n)}function Pm(t){return Array.from(t.childNodes)}function Pe(t,e){e=""+e,t.data!==e&&(t.data=e)}function cr(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function Zt(t,e){t.value=e??""}function P(t,e,n,i){n==null?t.style.removeProperty(e):t.style.setProperty(e,n,"")}function dr(t,e,n){for(let i=0;i<t.options.length;i+=1){const l=t.options[i];if(l.__value===e){l.selected=!0;return}}t.selectedIndex=-1}let hr;function Mm(){if(hr===void 0){hr=!1;try{typeof window<"u"&&window.parent&&window.parent.document}catch{hr=!0}}return hr}function fo(t,e){getComputedStyle(t).position==="static"&&(t.style.position="relative");const i=v("iframe");i.setAttribute("style","display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;"),i.setAttribute("aria-hidden","true"),i.tabIndex=-1;const l=Mm();let r;return l?(i.src="data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\/script>",r=B(window,"message",o=>{o.source===i.contentWindow&&e()})):(i.src="about:blank",i.onload=()=>{r=B(i.contentWindow,"resize",e),e()}),S(t,i),()=>{(l||r&&i.contentWindow)&&r(),C(i)}}function p(t,e,n){t.classList.toggle(e,!!n)}function Nm(t,e,{bubbles:n=!1,cancelable:i=!1}={}){return new CustomEvent(t,{detail:e,bubbles:n,cancelable:i})}function Sl(t,e){return new t(e)}const gr=new Map;let mr=0;function Lm(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}function Fm(t,e){const n={stylesheet:Dm(e),rules:{}};return gr.set(t,n),n}function Ps(t,e,n,i,l,r,o,u=0){const s=16.666/i;let a=`{
|
|
2
|
-
`;for(let b=0;b<=1;b+=s){const w=e+(n-e)*r(b);a+=b*100+`%{${o(w,1-w)}}
|
|
3
|
-
|
|
4
|
-
}`,c=`__svelte_${Lm(f)}_${u}`,g=Rs(t),{stylesheet:h,rules:d}=gr.get(g)||Fm(g,t);d[c]||(d[c]=!0,h.insertRule(`@keyframes ${c} ${f}`,h.cssRules.length));const _=t.style.animation||"";return t.style.animation=`${_?`${_}, `:""}${c} ${i}ms linear ${l}ms 1 both`,mr+=1,c}function Vm(t,e){const n=(t.style.animation||"").split(", "),i=n.filter(e?r=>r.indexOf(e)<0:r=>r.indexOf("__svelte")===-1),l=n.length-i.length;l&&(t.style.animation=i.join(", "),mr-=l,mr||Bm())}function Bm(){uo(()=>{mr||(gr.forEach(t=>{const{ownerNode:e}=t.stylesheet;e&&C(e)}),gr.clear())})}let co;function Yl(t){co=t}function ti(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach(i=>i.call(this,e))}const Cl=[],Be=[];let Al=[];const ho=[],Um=Promise.resolve();let go=!1;function Hm(){go||(go=!0,Um.then(Ms))}function ni(t){Al.push(t)}function Wt(t){ho.push(t)}const mo=new Set;let Tl=0;function Ms(){if(Tl!==0)return;const t=co;do{try{for(;Tl<Cl.length;){const e=Cl[Tl];Tl++,Yl(e),zm(e.$$)}}catch(e){throw Cl.length=0,Tl=0,e}for(Yl(null),Cl.length=0,Tl=0;Be.length;)Be.pop()();for(let e=0;e<Al.length;e+=1){const n=Al[e];mo.has(n)||(mo.add(n),n())}Al.length=0}while(Cl.length);for(;ho.length;)ho.pop()();go=!1,mo.clear(),Yl(t)}function zm(t){if(t.fragment!==null){t.update(),Ve(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(ni)}}function jm(t){const e=[],n=[];Al.forEach(i=>t.indexOf(i)===-1?e.push(i):n.push(i)),n.forEach(i=>i()),Al=e}let Kl;function qm(){return Kl||(Kl=Promise.resolve(),Kl.then(()=>{Kl=null})),Kl}function _o(t,e,n){t.dispatchEvent(Nm(`${e?"intro":"outro"}${n}`))}const _r=new Set;let gi;function He(){gi={r:0,c:[],p:gi}}function ze(){gi.r||Ve(gi.c),gi=gi.p}function U(t,e){t&&t.i&&(_r.delete(t),t.i(e))}function Z(t,e,n,i){if(t&&t.o){if(_r.has(t))return;_r.add(t),gi.c.push(()=>{_r.delete(t),i&&(n&&t.d(1),i())}),t.o(e)}else i&&i()}const Wm={duration:0};function Il(t,e,n,i){let r=e(t,n,{direction:"both"}),o=i?0:1,u=null,s=null,a=null,f;function c(){a&&Vm(t,a)}function g(d,_){const b=d.b-o;return _*=Math.abs(b),{a:o,b:d.b,d:b,duration:_,start:d.start,end:d.start+_,group:d.group}}function h(d){const{delay:_=0,duration:b=300,easing:w=Sm,tick:E=ue,css:k}=r||Wm,I={start:Tm()+_,b:d};d||(I.group=gi,gi.r+=1),"inert"in t&&(d?f!==void 0&&(t.inert=f):(f=t.inert,t.inert=!0)),u||s?s=I:(k&&(c(),a=Ps(t,o,d,b,_,w,k)),d&&E(0,1),u=g(I,b),ni(()=>_o(t,d,"start")),Im(O=>{if(s&&O>s.start&&(u=g(s,b),s=null,_o(t,u.b,"start"),k&&(c(),a=Ps(t,o,u.b,u.duration,0,w,r.css))),u){if(O>=u.end)E(o=u.b,1-o),_o(t,u.b,"end"),s||(u.b?c():--u.group.r||Ve(u.group.c)),u=null;else if(O>=u.start){const D=O-u.start;o=u.a+u.d*w(D/u.duration),E(o,1-o)}}return!!(u||s)}))}return{run(d){Ge(r)?qm().then(()=>{r=r({direction:d?"in":"out"}),h(d)}):h(d)},end(){c(),u=s=null}}}function Ce(t){return(t==null?void 0:t.length)!==void 0?t:Array.from(t)}function nn(t,e){t.d(1),e.delete(t.key)}function Di(t,e){Z(t,1,1,()=>{e.delete(t.key)})}function Tt(t,e,n,i,l,r,o,u,s,a,f,c){let g=t.length,h=r.length,d=g;const _={};for(;d--;)_[t[d].key]=d;const b=[],w=new Map,E=new Map,k=[];for(d=h;d--;){const N=c(l,r,d),M=n(N);let V=o.get(M);V?k.push(()=>V.p(N,e)):(V=a(M,N),V.c()),w.set(M,b[d]=V),M in _&&E.set(M,Math.abs(d-_[M]))}const I=new Set,O=new Set;function D(N){U(N,1),N.m(u,f),o.set(N.key,N),f=N.first,h--}for(;g&&h;){const N=b[h-1],M=t[g-1],V=N.key,W=M.key;N===M?(f=N.first,g--,h--):w.has(W)?!o.has(V)||I.has(V)?D(N):O.has(W)?g--:E.get(V)>E.get(W)?(O.add(V),D(N)):(I.add(W),g--):(s(M,o),g--)}for(;g--;){const N=t[g];w.has(N.key)||s(N,o)}for(;h;)D(b[h-1]);return Ve(k),b}function Gm(t,e){const n={},i={},l={$$scope:1};let r=t.length;for(;r--;){const o=t[r],u=e[r];if(u){for(const s in o)s in u||(i[s]=1);for(const s in u)l[s]||(n[s]=u[s],l[s]=1);t[r]=u}else for(const s in o)l[s]=1}for(const o in i)o in n||(n[o]=void 0);return n}function Ym(t){return typeof t=="object"&&t!==null?t:{}}function Gt(t,e,n){const i=t.$$.props[e];i!==void 0&&(t.$$.bound[i]=n,n(t.$$.ctx[i]))}function We(t){t&&t.c()}function je(t,e,n){const{fragment:i,after_update:l}=t.$$;i&&i.m(e,n),ni(()=>{const r=t.$$.on_mount.map(Ss).filter(Ge);t.$$.on_destroy?t.$$.on_destroy.push(...r):Ve(r),t.$$.on_mount=[]}),l.forEach(ni)}function qe(t,e){const n=t.$$;n.fragment!==null&&(jm(n.after_update),Ve(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Km(t,e){t.$$.dirty[0]===-1&&(Cl.push(t),Hm(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function Qe(t,e,n,i,l,r,o=null,u=[-1]){const s=co;Yl(t);const a=t.$$={fragment:null,ctx:[],props:r,update:ue,not_equal:l,bound:Cs(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(s?s.$$.context:[])),callbacks:Cs(),dirty:u,skip_bound:!1,root:e.target||s.$$.root};o&&o(a.root);let f=!1;if(a.ctx=n?n(t,e.props||{},(c,g,...h)=>{const d=h.length?h[0]:g;return a.ctx&&l(a.ctx[c],a.ctx[c]=d)&&(!a.skip_bound&&a.bound[c]&&a.bound[c](d),f&&Km(t,c)),g}):[],a.update(),f=!0,Ve(a.before_update),a.fragment=i?i(a.ctx):!1,e.target){if(e.hydrate){const c=Pm(e.target);a.fragment&&a.fragment.l(c),c.forEach(C)}else a.fragment&&a.fragment.c();e.intro&&U(t.$$.fragment),je(t,e.target,e.anchor),Ms()}Yl(s)}class Ze{constructor(){Es(this,"$$");Es(this,"$$set")}$destroy(){qe(this,1),this.$destroy=ue}$on(e,n){if(!Ge(n))return ue;const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(n),()=>{const l=i.indexOf(n);l!==-1&&i.splice(l,1)}}$set(e){this.$$set&&!Cm(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const Xm="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Xm);function Qm(t){let e,n,i,l,r,o,u,s,a,f;return{c(){e=v("button"),n=v("i"),l=Q(),r=v("span"),o=Ee(t[0]),m(n,"class",i=bt(t[14])+" svelte-10t38ob"),P(n,"order",t[4]?1:0),P(n,"color",t[8]?"var(--spectrum-global-color-gray-400)":t[5]),m(e,"tabindex",u=t[8]?-1:0),m(e,"class",s=bt(t[9]=="actionButton"?"spectrum-ActionButton spectrum-ActionButton--size"+t[1]:"spectrum-Button spectrum-Button--size"+t[1])+" svelte-10t38ob"),p(e,"super-button",!0),p(e,"xsmall",t[1]=="XS"),p(e,"small",t[1]=="S"),p(e,"large",t[1]=="L"),p(e,"is-selected",t[7]),p(e,"cta",t[10]=="cta"&&!t[8]),p(e,"warning",t[10]=="warning"),p(e,"primary",t[10]=="primary"&&!t[2]),p(e,"secondary",t[10]=="secondary"),p(e,"overBackground",t[10]=="overBackground"),p(e,"ink",t[10]=="ink"),p(e,"menu",t[10]=="menu"),p(e,"quiet",t[6]),p(e,"icon",t[14]),p(e,"iconOnly",t[12]||!t[0]),p(e,"full-width",t[11]),p(e,"menu-item",t[2]),p(e,"menu-item-right",t[2]&&t[3]=="right"),p(e,"disabled",t[8]),p(e,"working",t[13])},m(c,g){A(c,e,g),S(e,n),S(e,l),S(e,r),S(r,o),a||(f=B(e,"click",t[15]),a=!0)},p(c,g){g[0]&16384&&i!==(i=bt(c[14])+" svelte-10t38ob")&&m(n,"class",i),g[0]&16&&P(n,"order",c[4]?1:0),g[0]&288&&P(n,"color",c[8]?"var(--spectrum-global-color-gray-400)":c[5]),g[0]&1&&Pe(o,c[0]),g[0]&256&&u!==(u=c[8]?-1:0)&&m(e,"tabindex",u),g[0]&514&&s!==(s=bt(c[9]=="actionButton"?"spectrum-ActionButton spectrum-ActionButton--size"+c[1]:"spectrum-Button spectrum-Button--size"+c[1])+" svelte-10t38ob")&&m(e,"class",s),g[0]&514&&p(e,"super-button",!0),g[0]&514&&p(e,"xsmall",c[1]=="XS"),g[0]&514&&p(e,"small",c[1]=="S"),g[0]&514&&p(e,"large",c[1]=="L"),g[0]&642&&p(e,"is-selected",c[7]),g[0]&1794&&p(e,"cta",c[10]=="cta"&&!c[8]),g[0]&1538&&p(e,"warning",c[10]=="warning"),g[0]&1542&&p(e,"primary",c[10]=="primary"&&!c[2]),g[0]&1538&&p(e,"secondary",c[10]=="secondary"),g[0]&1538&&p(e,"overBackground",c[10]=="overBackground"),g[0]&1538&&p(e,"ink",c[10]=="ink"),g[0]&1538&&p(e,"menu",c[10]=="menu"),g[0]&578&&p(e,"quiet",c[6]),g[0]&16898&&p(e,"icon",c[14]),g[0]&4611&&p(e,"iconOnly",c[12]||!c[0]),g[0]&2562&&p(e,"full-width",c[11]),g[0]&518&&p(e,"menu-item",c[2]),g[0]&526&&p(e,"menu-item-right",c[2]&&c[3]=="right"),g[0]&770&&p(e,"disabled",c[8]),g[0]&8706&&p(e,"working",c[13])},i:ue,o:ue,d(c){c&&C(e),a=!1,f()}}}function Zm(t){return new Promise(e=>setTimeout(e,t))}function Jm(t,e,n){let i,l,{size:r="M"}=e,{menuItem:o=!1}=e,{menuAlign:u="right"}=e,{icon:s=void 0}=e,{iconAfterText:a=void 0}=e,{iconColor:f=void 0}=e,{text:c=""}=e,{quiet:g=void 0}=e,{selected:h=void 0}=e,{disabled:d=void 0}=e,{onClick:_=void 0}=e,{buttonClass:b="actionButton"}=e,{type:w="primary"}=e,{conditions:E=[]}=e,{actionsMode:k="normal"}=e,{condition:I=void 0}=e,{loopSource:O=void 0}=e,{loopDelay:D=0}=e,{loopEvent:N=void 0}=e,{timerDuration:M=60}=e,{fullWidth:V=void 0}=e,{iconOnly:W=void 0}=e,{onTimer:ne=void 0}=e,{onLoopStart:H=void 0}=e,{onLoopEnd:$=void 0}=e,{onTrueCondition:Y=void 0}=e,{onFalseCondition:G=void 0}=e,oe=!1,ie,J=0;async function q(K){if(!(d||oe)){if(n(13,oe=!0),k=="loop"){if(H&&await H({iterations:O==null?void 0:O.length}),Array.isArray(i)&&N)for(var x=0;x<i.length;x++)await N({idx:x,value:i[x]}),await Zm(D);$&&await $()}else k=="conditional"?I==!0?await(Y==null?void 0:Y()):await(G==null?void 0:G()):_&&await(_==null?void 0:_(K));n(13,oe=!1)}}const j=K=>{if(!K)return;let x=[];try{x=JSON.parse(K),Array.isArray(x)||(x=[K])}catch{x=(K==null?void 0:K.split(","))??[K]}return x};return le.onMount(()=>{k=="timer"&&(n(0,c=M),ie=setInterval(()=>{J+=1,J==M&&(J=0,ne==null||ne()),n(0,c=M-J)},1e3))}),le.onDestroy(()=>{ie&&clearInterval(ie)}),t.$$set=K=>{"size"in K&&n(1,r=K.size),"menuItem"in K&&n(2,o=K.menuItem),"menuAlign"in K&&n(3,u=K.menuAlign),"icon"in K&&n(16,s=K.icon),"iconAfterText"in K&&n(4,a=K.iconAfterText),"iconColor"in K&&n(5,f=K.iconColor),"text"in K&&n(0,c=K.text),"quiet"in K&&n(6,g=K.quiet),"selected"in K&&n(7,h=K.selected),"disabled"in K&&n(8,d=K.disabled),"onClick"in K&&n(17,_=K.onClick),"buttonClass"in K&&n(9,b=K.buttonClass),"type"in K&&n(10,w=K.type),"conditions"in K&&n(18,E=K.conditions),"actionsMode"in K&&n(19,k=K.actionsMode),"condition"in K&&n(20,I=K.condition),"loopSource"in K&&n(21,O=K.loopSource),"loopDelay"in K&&n(22,D=K.loopDelay),"loopEvent"in K&&n(23,N=K.loopEvent),"timerDuration"in K&&n(24,M=K.timerDuration),"fullWidth"in K&&n(11,V=K.fullWidth),"iconOnly"in K&&n(12,W=K.iconOnly),"onTimer"in K&&n(25,ne=K.onTimer),"onLoopStart"in K&&n(26,H=K.onLoopStart),"onLoopEnd"in K&&n(27,$=K.onLoopEnd),"onTrueCondition"in K&&n(28,Y=K.onTrueCondition),"onFalseCondition"in K&&n(29,G=K.onFalseCondition)},t.$$.update=()=>{t.$$.dirty[0]&2097152&&(i=j(O)),t.$$.dirty[0]&73728&&n(14,l=oe?"ph ph-spinner-gap ph-spin":s&&!s.startsWith("ri-")?"ph ph-"+s:s||void 0)},[c,r,o,u,a,f,g,h,d,b,w,V,W,oe,l,q,s,_,E,k,I,O,D,N,M,ne,H,$,Y,G]}class el extends Ze{constructor(e){super(),Qe(this,e,Jm,Qm,Ye,{size:1,menuItem:2,menuAlign:3,icon:16,iconAfterText:4,iconColor:5,text:0,quiet:6,selected:7,disabled:8,onClick:17,buttonClass:9,type:10,conditions:18,actionsMode:19,condition:20,loopSource:21,loopDelay:22,loopEvent:23,timerDuration:24,fullWidth:11,iconOnly:12,onTimer:25,onLoopStart:26,onLoopEnd:27,onTrueCondition:28,onFalseCondition:29},null,[-1,-1])}}function Ns(t){let e,n,i,l,r;function o(f,c){return f[9]&&f[5]?$m:xm}let u=o(t),s=u(t),a=t[6]&&Ls(t);return{c(){e=v("div"),n=v("div"),s.c(),i=Q(),a&&a.c(),m(n,"class","label"),p(n,"showHelp",t[9]),m(e,"class","superlabel svelte-w6ppnj"),p(e,"left",t[0]=="left"),p(e,"tall",t[2]),p(e,"error",t[6]),P(e,"--label-width",t[10])},m(f,c){A(f,e,c),S(e,n),s.m(n,null),S(e,i),a&&a.m(e,null),l||(r=[B(n,"mouseenter",function(){Ge(t[5]?t[14]:null)&&(t[5]?t[14]:null).apply(this,arguments)}),B(n,"mouseleave",function(){Ge(t[5]?t[15]:null)&&(t[5]?t[15]:null).apply(this,arguments)})],l=!0)},p(f,c){t=f,u===(u=o(t))&&s?s.p(t,c):(s.d(1),s=u(t),s&&(s.c(),s.m(n,null))),c&512&&p(n,"showHelp",t[9]),t[6]?a?a.p(t,c):(a=Ls(t),a.c(),a.m(e,null)):a&&(a.d(1),a=null),c&1&&p(e,"left",t[0]=="left"),c&4&&p(e,"tall",t[2]),c&64&&p(e,"error",t[6]),c&1024&&P(e,"--label-width",t[10])},d(f){f&&C(e),s.d(),a&&a.d(),l=!1,Ve(r)}}}function xm(t){let e=(t[3]||t[4])+"",n;return{c(){n=Ee(e)},m(i,l){A(i,n,l)},p(i,l){l&24&&e!==(e=(i[3]||i[4])+"")&&Pe(n,e)},d(i){i&&C(n)}}}function $m(t){let e;return{c(){e=Ee(t[5])},m(n,i){A(n,e,i)},p(n,i){i&32&&Pe(e,n[5])},d(n){n&&C(e)}}}function Ls(t){let e,n;return{c(){e=v("div"),n=Ee(t[6]),m(e,"class","error-message")},m(i,l){A(i,e,l),S(e,n)},p(i,l){l&64&&Pe(n,i[6])},d(i){i&&C(e)}}}function e_(t){let e,n,i,l,r=t[0]&&Ns(t);const o=t[13].default,u=Ut(o,t,t[12],null);return{c(){e=v("div"),r&&r.c(),n=Q(),i=v("div"),u&&u.c(),m(i,"class","inline-cells svelte-w6ppnj"),p(i,"multirow",t[1]),m(e,"class","super-field svelte-w6ppnj"),p(e,"left-label",t[0]=="left"),p(e,"multirow",t[1]),p(e,"tall",t[2]),P(e,"--height",t[7]),P(e,"--max-height",t[8])},m(s,a){A(s,e,a),r&&r.m(e,null),S(e,n),S(e,i),u&&u.m(i,null),l=!0},p(s,[a]){s[0]?r?r.p(s,a):(r=Ns(s),r.c(),r.m(e,n)):r&&(r.d(1),r=null),u&&u.p&&(!l||a&4096)&&zt(u,o,s,s[12],l?Ht(o,s[12],a,null):jt(s[12]),null),(!l||a&2)&&p(i,"multirow",s[1]),(!l||a&1)&&p(e,"left-label",s[0]=="left"),(!l||a&2)&&p(e,"multirow",s[1]),(!l||a&4)&&p(e,"tall",s[2]),a&128&&P(e,"--height",s[7]),a&256&&P(e,"--max-height",s[8])},i(s){l||(U(u,s),l=!0)},o(s){Z(u,s),l=!1},d(s){s&&C(e),r&&r.d(),u&&u.d(s)}}}function t_(t,e,n){let i,{$$slots:l={},$$scope:r}=e,{labelPos:o}=e,{multirow:u}=e,{tall:s}=e,{label:a}=e,{field:f}=e,{helpText:c}=e,{error:g}=e,{labelWidth:h}=e,{height:d}=e,{maxHeight:_}=e,b;const w=()=>n(9,b=!0),E=()=>n(9,b=!1);return t.$$set=k=>{"labelPos"in k&&n(0,o=k.labelPos),"multirow"in k&&n(1,u=k.multirow),"tall"in k&&n(2,s=k.tall),"label"in k&&n(3,a=k.label),"field"in k&&n(4,f=k.field),"helpText"in k&&n(5,c=k.helpText),"error"in k&&n(6,g=k.error),"labelWidth"in k&&n(11,h=k.labelWidth),"height"in k&&n(7,d=k.height),"maxHeight"in k&&n(8,_=k.maxHeight),"$$scope"in k&&n(12,r=k.$$scope)},t.$$.update=()=>{t.$$.dirty&2049&&n(10,i=o=="left"?h||"5rem":"auto")},[o,u,s,a,f,c,g,d,_,b,i,h,r,l,w,E]}class n_ extends Ze{constructor(e){super(),Qe(this,e,t_,e_,Ye,{labelPos:0,multirow:1,tall:2,label:3,field:4,helpText:5,error:6,labelWidth:11,height:7,maxHeight:8})}}const Dl=[];function i_(t,e){return{subscribe:ii(t,e).subscribe}}function ii(t,e=ue){let n;const i=new Set;function l(u){if(Ye(t,u)&&(t=u,n)){const s=!Dl.length;for(const a of i)a[1](),Dl.push(a,t);if(s){for(let a=0;a<Dl.length;a+=2)Dl[a][0](Dl[a+1]);Dl.length=0}}}function r(u){l(u(t))}function o(u,s=ue){const a=[u,s];return i.add(a),i.size===1&&(n=e(l,r)||ue),u(t),()=>{i.delete(a),i.size===0&&n&&(n(),n=null)}}return{set:l,update:r,subscribe:o}}function pr(t,e,n){const i=!Array.isArray(t),l=i?[t]:t;if(!l.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const r=e.length<2;return i_(n,(o,u)=>{let s=!1;const a=[];let f=0,c=ue;const g=()=>{if(f)return;c();const d=e(i?a[0]:a,o,u);r?o(d):c=Ge(d)?d:ue},h=l.map((d,_)=>ft(d,b=>{a[_]=b,f&=~(1<<_),s&&g()},()=>{f|=1<<_}));return s=!0,g(),function(){Ve(h),c(),s=!1}})}var jn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function po(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function l_(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function i(){return this instanceof i?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(i){var l=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(n,i,l.get?l:{enumerable:!0,get:function(){return t[i]}})}),n}var bo=Object.defineProperty,r_=Object.getOwnPropertyDescriptor,o_=Object.getOwnPropertyNames,s_=Object.prototype.hasOwnProperty,u_=(t,e)=>{for(var n in e)bo(t,n,{get:e[n],enumerable:!0})},a_=(t,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of o_(e))!s_.call(t,l)&&l!==n&&bo(t,l,{get:()=>e[l],enumerable:!(i=r_(e,l))||i.enumerable});return t},f_=t=>a_(bo({},"__esModule",{value:!0}),t),Fs={};u_(Fs,{AIOperationEnum:()=>Vs,APP_QUOTA_NAMES:()=>$_,AUDIT_LOG_TYPE:()=>ip,AccountSSOProvider:()=>Pu,AccountSSOProviderType:()=>Ru,AnalyticsEvent:()=>k_,AppBackupStatus:()=>sa,AppBackupTrigger:()=>ua,AppBackupType:()=>oa,AppEnvironment:()=>Su,ArrayOperator:()=>fu,AsyncEvents:()=>c_,AuditLogResourceStatus:()=>wa,AuditLogSystemUser:()=>np,AuditedEventFriendlyName:()=>d_,AuthType:()=>Mu,AutoFieldSubType:()=>xu,AutoReason:()=>Ju,AutomationActionStepId:()=>ko,AutomationCustomIOType:()=>Lu,AutomationEventType:()=>zu,AutomationFeature:()=>Vu,AutomationIOType:()=>Nu,AutomationStatus:()=>Uu,AutomationStepIdArray:()=>I_,AutomationStepStatus:()=>Bu,AutomationStepType:()=>Fu,AutomationStoppedReason:()=>Hu,AutomationTriggerStepId:()=>wo,BBReferenceFieldSubType:()=>ta,BREAKDOWN_QUOTA_NAMES:()=>ep,BasicOperator:()=>au,BodyType:()=>Wu,BreakdownQuotaName:()=>ma,CalculationType:()=>na,CommandWord:()=>Cu,ConfigType:()=>ca,ConstantQuotaName:()=>Js,DSPlusOperation:()=>uu,DatasourceFeature:()=>su,DatasourceFieldType:()=>iu,DocumentType:()=>yo,DocumentTypesToImport:()=>z_,EmptyFilterOption:()=>gu,Event:()=>Hs,EventPublishType:()=>ka,Feature:()=>xs,FeatureFlag:()=>vu,FieldType:()=>Ku,FilterGroupLogicalOperator:()=>mu,FilterType:()=>ou,FormulaType:()=>ea,GroupByTypes:()=>Qu,GroupType:()=>js,Hosting:()=>Us,HttpMethod:()=>Gu,INTERNAL_TABLE_SOURCE_ID:()=>D_,IdentityType:()=>qs,IncludeRelationship:()=>ru,InitType:()=>Au,InternalSearchFilterOperator:()=>hu,InternalTable:()=>ra,JsonFieldSubType:()=>$u,JsonTypes:()=>O_,LockName:()=>wu,LockType:()=>bu,LogicalOperator:()=>du,LoginMethod:()=>pu,LoopStepType:()=>ju,MaintenanceType:()=>Sa,MigrationName:()=>eu,MigrationType:()=>$s,MonthlyQuotaName:()=>Zs,NumericTypes:()=>Xu,Operation:()=>tu,OperationFieldTypeEnum:()=>Bs,PASSWORD_REPLACEMENT:()=>__,PLUGIN_TYPE_ARR:()=>x_,PermissionLevel:()=>Tu,PermissionSource:()=>Du,PermissionType:()=>Iu,PingSource:()=>ba,PlanModel:()=>Ys,PlanType:()=>Ws,PluginSource:()=>ga,PluginType:()=>vo,PriceDuration:()=>Gs,QueryType:()=>nu,QuotaType:()=>Xs,QuotaUsageType:()=>Ks,RangeOperator:()=>cu,RelationshipType:()=>Zu,RestAuthType:()=>qu,RowExportFormat:()=>Ou,RowOperations:()=>p_,SEPARATOR:()=>br,SQLiteType:()=>fa,SSOProviderType:()=>da,ScheduleRepeatPeriod:()=>pa,ScheduleType:()=>_a,SearchIndex:()=>ku,ServiceType:()=>va,SortOption:()=>yu,SortOrder:()=>ya,SortType:()=>Ea,SourceName:()=>lu,SqlClient:()=>_u,StaticQuotaName:()=>Qs,TableSourceType:()=>Yu,TenantResolutionStrategy:()=>Eu,UNICODE_MAX:()=>V_,UserGroupSyncEvents:()=>zs,UserStatus:()=>ha,ViewCalculation:()=>la,ViewV2Type:()=>ia,VirtualDocumentType:()=>Eo,WebhookActionType:()=>aa,canGroupBy:()=>P_,getDocumentType:()=>H_,getVirtualDocumentType:()=>q_,isAIConfig:()=>Q_,isAppBackupMetadata:()=>tp,isCloudAccount:()=>v_,isConstantQuota:()=>m_,isCreatePasswordAccount:()=>y_,isDocument:()=>w_,isGoogleConfig:()=>Y_,isLogicalSearchOperator:()=>b_,isManyToMany:()=>N_,isManyToOne:()=>F_,isMonthlyQuota:()=>g_,isNumeric:()=>R_,isOIDCConfig:()=>K_,isOneToMany:()=>L_,isPasswordAccount:()=>E_,isRelationshipField:()=>M_,isSCIMConfig:()=>X_,isSMTPConfig:()=>G_,isSSOAccount:()=>C_,isSSOUser:()=>Z_,isSelfHostAccount:()=>S_,isSettingsConfig:()=>W_,isStaticQuota:()=>h_,isUser:()=>J_,isVerifiableSSOProvider:()=>T_,prefixed:()=>B_});var Ol=f_(Fs),Vs=(t=>(t.SUMMARISE_TEXT="SUMMARISE_TEXT",t.CLEAN_DATA="CLEAN_DATA",t.TRANSLATE="TRANSLATE",t.CATEGORISE_TEXT="CATEGORISE_TEXT",t.SENTIMENT_ANALYSIS="SENTIMENT_ANALYSIS",t.PROMPT="PROMPT",t.SEARCH_WEB="SEARCH_WEB",t))(Vs||{}),Bs=(t=>(t.MULTI_COLUMN="columns",t.COLUMN="column",t.BINDABLE_TEXT="prompt",t))(Bs||{}),Us=(t=>(t.CLOUD="cloud",t.SELF="self",t))(Us||{}),Hs=(t=>(t.USER_CREATED="user:created",t.USER_UPDATED="user:updated",t.USER_DELETED="user:deleted",t.USER_ONBOARDING_COMPLETE="user:onboarding:complete",t.USER_PERMISSION_ADMIN_ASSIGNED="user:admin:assigned",t.USER_PERMISSION_ADMIN_REMOVED="user:admin:removed",t.USER_PERMISSION_BUILDER_ASSIGNED="user:builder:assigned",t.USER_PERMISSION_BUILDER_REMOVED="user:builder:removed",t.USER_INVITED="user:invited",t.USER_INVITED_ACCEPTED="user:invite:accepted",t.USER_PASSWORD_FORCE_RESET="user:password:force:reset",t.USER_PASSWORD_UPDATED="user:password:updated",t.USER_PASSWORD_RESET_REQUESTED="user:password:reset:requested",t.USER_PASSWORD_RESET="user:password:reset",t.USER_DATA_COLLABORATION="user:data:collaboration",t.EMAIL_SMTP_CREATED="email:smtp:created",t.EMAIL_SMTP_UPDATED="email:smtp:updated",t.AI_CONFIG_CREATED="ai:config:created",t.AI_CONFIG_UPDATED="ai:config:updated",t.AUTH_SSO_CREATED="auth:sso:created",t.AUTH_SSO_UPDATED="auth:sso:updated",t.AUTH_SSO_ACTIVATED="auth:sso:activated",t.AUTH_SSO_DEACTIVATED="auth:sso:deactivated",t.AUTH_LOGIN="auth:login",t.AUTH_LOGOUT="auth:logout",t.ORG_NAME_UPDATED="org:info:name:updated",t.ORG_LOGO_UPDATED="org:info:logo:updated",t.ORG_PLATFORM_URL_UPDATED="org:platformurl:updated",t.INSTALLATION_VERSION_CHECKED="installation:version:checked",t.INSTALLATION_VERSION_UPGRADED="installation:version:upgraded",t.INSTALLATION_VERSION_DOWNGRADED="installation:version:downgraded",t.INSTALLATION_FIRST_STARTUP="installation:firstStartup",t.ANALYTICS_OPT_OUT="analytics:opt:out",t.ANALYTICS_OPT_IN="analytics:opt:in",t.APP_CREATED="app:created",t.APP_UPDATED="app:updated",t.APP_DELETED="app:deleted",t.APP_DUPLICATED="app:duplicated",t.APP_PUBLISHED="app:published",t.APP_UNPUBLISHED="app:unpublished",t.APP_TEMPLATE_IMPORTED="app:template:imported",t.APP_FILE_IMPORTED="app:file:imported",t.APP_VERSION_UPDATED="app:version:updated",t.APP_VERSION_REVERTED="app:version:reverted",t.APP_REVERTED="app:reverted",t.APP_EXPORTED="app:exported",t.ROLE_CREATED="role:created",t.ROLE_UPDATED="role:updated",t.ROLE_DELETED="role:deleted",t.ROLE_ASSIGNED="role:assigned",t.ROLE_UNASSIGNED="role:unassigned",t.SERVED_BUILDER="served:builder",t.SERVED_APP="served:app",t.SERVED_APP_PREVIEW="served:app:preview",t.DATASOURCE_CREATED="datasource:created",t.DATASOURCE_UPDATED="datasource:updated",t.DATASOURCE_DELETED="datasource:deleted",t.QUERY_CREATED="query:created",t.QUERY_UPDATED="query:updated",t.QUERY_DELETED="query:deleted",t.QUERY_IMPORT="query:import",t.QUERIES_RUN="queries:run",t.QUERY_PREVIEWED="query:previewed",t.TABLE_CREATED="table:created",t.TABLE_UPDATED="table:updated",t.TABLE_DELETED="table:deleted",t.TABLE_EXPORTED="table:exported",t.TABLE_IMPORTED="table:imported",t.TABLE_DATA_IMPORTED="table:data:imported",t.VIEW_CREATED="view:created",t.VIEW_UPDATED="view:updated",t.VIEW_DELETED="view:deleted",t.VIEW_EXPORTED="view:exported",t.VIEW_FILTER_CREATED="view:filter:created",t.VIEW_FILTER_UPDATED="view:filter:updated",t.VIEW_FILTER_DELETED="view:filter:deleted",t.VIEW_CALCULATION_CREATED="view:calculation:created",t.VIEW_CALCULATION_UPDATED="view:calculation:updated",t.VIEW_CALCULATION_DELETED="view:calculation:deleted",t.ROWS_CREATED="rows:created",t.ROWS_IMPORTED="rows:imported",t.COMPONENT_CREATED="component:created",t.COMPONENT_DELETED="component:deleted",t.SCREEN_CREATED="screen:created",t.SCREEN_DELETED="screen:deleted",t.LAYOUT_CREATED="layout:created",t.LAYOUT_DELETED="layout:deleted",t.AUTOMATION_CREATED="automation:created",t.AUTOMATION_DELETED="automation:deleted",t.AUTOMATION_TESTED="automation:tested",t.AUTOMATIONS_RUN="automations:run",t.AUTOMATION_STEP_CREATED="automation:step:created",t.AUTOMATION_STEP_DELETED="automation:step:deleted",t.AUTOMATION_TRIGGER_UPDATED="automation:trigger:updated",t.LICENSE_PLAN_CHANGED="license:plan:changed",t.LICENSE_ACTIVATED="license:activated",t.LICENSE_PAYMENT_FAILED="license:payment:failed",t.LICENSE_PAYMENT_RECOVERED="license:payment:recovered",t.LICENSE_CHECKOUT_OPENED="license:checkout:opened",t.LICENSE_CHECKOUT_SUCCESS="license:checkout:success",t.LICENSE_PORTAL_OPENED="license:portal:opened",t.ACCOUNT_CREATED="account:created",t.ACCOUNT_DELETED="account:deleted",t.ACCOUNT_VERIFIED="account:verified",t.APP_BACKFILL_SUCCEEDED="app:backfill:succeeded",t.APP_BACKFILL_FAILED="app:backfill:failed",t.TENANT_BACKFILL_SUCCEEDED="tenant:backfill:succeeded",t.TENANT_BACKFILL_FAILED="tenant:backfill:failed",t.INSTALLATION_BACKFILL_SUCCEEDED="installation:backfill:succeeded",t.INSTALLATION_BACKFILL_FAILED="installation:backfill:failed",t.USER_GROUP_CREATED="user_group:created",t.USER_GROUP_UPDATED="user_group:updated",t.USER_GROUP_DELETED="user_group:deleted",t.USER_GROUP_USERS_ADDED="user_group:user_added",t.USER_GROUP_USERS_REMOVED="user_group:users_deleted",t.USER_GROUP_PERMISSIONS_EDITED="user_group:permissions_edited",t.USER_GROUP_ONBOARDING="user_group:onboarding_added",t.PLUGIN_INIT="plugin:init",t.PLUGIN_IMPORTED="plugin:imported",t.PLUGIN_DELETED="plugin:deleted",t.APP_BACKUP_RESTORED="app:backup:restored",t.APP_BACKUP_TRIGGERED="app:backup:triggered",t.ENVIRONMENT_VARIABLE_CREATED="environment_variable:created",t.ENVIRONMENT_VARIABLE_DELETED="environment_variable:deleted",t.ENVIRONMENT_VARIABLE_UPGRADE_PANEL_OPENED="environment_variable:upgrade_panel_opened",t.AUDIT_LOGS_FILTERED="audit_log:filtered",t.AUDIT_LOGS_DOWNLOADED="audit_log:downloaded",t))(Hs||{}),zs=["user:created","user:updated","user:deleted","user:admin:assigned","user:admin:removed","user:builder:assigned","user:builder:removed","user_group:created","user_group:updated","user_group:deleted","user_group:user_added","user_group:users_deleted","user_group:permissions_edited"],c_=[...zs],d_={"user:created":'User "{{ email }}" created{{#if viaScim}} via SCIM{{/if}}',"user:updated":'User "{{ email }}" updated{{#if viaScim}} via SCIM{{/if}}',"user:deleted":'User "{{ email }}" deleted{{#if viaScim}} via SCIM{{/if}}',"user:admin:assigned":'User "{{ email }}" admin role assigned',"user:admin:removed":'User "{{ email }}" admin role removed',"user:builder:assigned":'User "{{ email }}" builder role assigned',"user:builder:removed":'User "{{ email }}" builder role removed',"user:invited":'User "{{ email }}" invited',"user:invite:accepted":'User "{{ email }}" accepted invite',"user:password:updated":'User "{{ email }}" password updated',"user:password:reset:requested":'User "{{ email }}" password reset requested',"user:password:reset":'User "{{ email }}" password reset',"user_group:created":'User group "{{ name }}" created{{#if viaScim}} via SCIM{{/if}}',"user_group:updated":'User group "{{ name }}" updated{{#if viaScim}} via SCIM{{/if}}',"user_group:deleted":'User group "{{ name }}" deleted{{#if viaScim}} via SCIM{{/if}}',"user_group:user_added":'User group "{{ name }}" {{ count }} users added{{#if viaScim}} via SCIM{{/if}}',"user_group:users_deleted":'User group "{{ name }}" {{ count }} users removed{{#if viaScim}} via SCIM{{/if}}',"user_group:permissions_edited":'User group "{{ name }}" permissions edited',"user:password:force:reset":void 0,"user_group:onboarding_added":void 0,"user:onboarding:complete":void 0,"user:data:collaboration":void 0,"email:smtp:created":"Email configuration created","email:smtp:updated":"Email configuration updated","ai:config:created":"AI configuration created","ai:config:updated":"AI configuration updated","auth:sso:created":"SSO configuration created","auth:sso:updated":"SSO configuration updated","auth:sso:activated":"SSO configuration activated","auth:sso:deactivated":"SSO configuration deactivated","auth:login":'User "{{ email }}" logged in',"auth:logout":'User "{{ email }}" logged out',"org:info:name:updated":"Organisation name updated","org:info:logo:updated":"Organisation logo updated","org:platformurl:updated":"Organisation platform URL updated","app:created":'App "{{ name }}" created',"app:updated":'App "{{ name }}" updated',"app:deleted":'App "{{ name }}" deleted',"app:duplicated":'App "{{ name }}" duplicated',"app:published":'App "{{ name }}" published',"app:unpublished":'App "{{ name }}" unpublished',"app:template:imported":'App "{{ name }}" template imported',"app:file:imported":'App "{{ name }}" file imported',"app:version:updated":'App "{{ name }}" version updated',"app:version:reverted":'App "{{ name }}" version reverted',"app:reverted":'App "{{ name }}" reverted',"app:exported":'App "{{ name }}" exported',"app:backup:restored":'App backup "{{ name }}" restored',"app:backup:triggered":'App backup "{{ name }}" triggered',"datasource:created":"Datasource created","datasource:updated":"Datasource updated","datasource:deleted":"Datasource deleted","query:created":"Query created","query:updated":"Query updated","query:deleted":"Query deleted","query:import":"Query import","queries:run":void 0,"query:previewed":void 0,"table:created":'Table "{{ name }}" created',"table:updated":'Table "{{ name }}" updated',"table:deleted":'Table "{{ name }}" deleted',"table:exported":'Table "{{ name }}" exported',"table:imported":'Table "{{ name }}" imported',"table:data:imported":"Data imported to table","rows:created":"Rows created","rows:imported":"Rows imported","automation:created":'Automation "{{ name }}" created',"automation:deleted":'Automation "{{ name }}" deleted',"automation:step:created":'Automation "{{ name }}" step added',"automation:step:deleted":'Automation "{{ name }}" step removed',"automation:tested":void 0,"automations:run":void 0,"automation:trigger:updated":void 0,"screen:created":'Screen "{{ name }}" created',"screen:deleted":'Screen "{{ name }}" deleted',"component:created":"Component created","component:deleted":"Component deleted","environment_variable:created":"Environment variable created","environment_variable:deleted":"Environment variable deleted","environment_variable:upgrade_panel_opened":void 0,"plugin:imported":"Plugin imported","plugin:deleted":"Plugin deleted","plugin:init":void 0,"role:created":void 0,"role:updated":void 0,"role:deleted":void 0,"role:assigned":void 0,"role:unassigned":void 0,"license:plan:changed":void 0,"license:activated":void 0,"license:payment:failed":void 0,"license:payment:recovered":void 0,"license:checkout:opened":void 0,"license:checkout:success":void 0,"license:portal:opened":void 0,"account:created":void 0,"account:deleted":void 0,"account:verified":void 0,"app:backfill:succeeded":void 0,"app:backfill:failed":void 0,"tenant:backfill:succeeded":void 0,"tenant:backfill:failed":void 0,"installation:backfill:succeeded":void 0,"installation:backfill:failed":void 0,"layout:created":void 0,"layout:deleted":void 0,"view:created":void 0,"view:updated":void 0,"view:deleted":void 0,"view:exported":void 0,"view:filter:created":void 0,"view:filter:updated":void 0,"view:filter:deleted":void 0,"view:calculation:created":void 0,"view:calculation:updated":void 0,"view:calculation:deleted":void 0,"served:builder":void 0,"served:app":void 0,"served:app:preview":void 0,"analytics:opt:out":void 0,"analytics:opt:in":void 0,"installation:version:checked":void 0,"installation:version:upgraded":void 0,"installation:version:downgraded":void 0,"installation:firstStartup":void 0,"audit_log:filtered":void 0,"audit_log:downloaded":void 0},js=(t=>(t.TENANT="tenant",t.INSTALLATION="installation",t))(js||{}),qs=(t=>(t.USER="user",t.TENANT="tenant",t.INSTALLATION="installation",t))(qs||{}),Ws=(t=>(t.FREE="free",t.PRO="pro",t.TEAM="team",t.PREMIUM="premium",t.PREMIUM_PLUS="premium_plus",t.PREMIUM_PLUS_TRIAL="premium_plus_trial",t.BUSINESS="business",t.ENTERPRISE_BASIC="enterprise_basic",t.ENTERPRISE_BASIC_TRIAL="enterprise_basic_trial",t.ENTERPRISE="enterprise",t))(Ws||{}),Gs=(t=>(t.MONTHLY="monthly",t.YEARLY="yearly",t))(Gs||{}),Ys=(t=>(t.PER_USER="perUser",t.PER_CREATOR_PER_USER="per_creator_per_user",t.DAY_PASS="dayPass",t))(Ys||{}),Ks=(t=>(t.STATIC="static",t.MONTHLY="monthly",t))(Ks||{}),Xs=(t=>(t.USAGE="usage",t.CONSTANT="constant",t))(Xs||{}),Qs=(t=>(t.ROWS="rows",t.APPS="apps",t.USERS="users",t.CREATORS="creators",t.USER_GROUPS="userGroups",t.PLUGINS="plugins",t.AI_CUSTOM_CONFIGS="aiCustomConfigs",t))(Qs||{}),Zs=(t=>(t.QUERIES="queries",t.AUTOMATIONS="automations",t.DAY_PASSES="dayPasses",t.BUDIBASE_AI_CREDITS="budibaseAICredits",t))(Zs||{}),Js=(t=>(t.AUTOMATION_LOG_RETENTION_DAYS="automationLogRetentionDays",t.APP_BACKUPS_RETENTION_DAYS="appBackupRetentionDays",t))(Js||{}),h_=(t,e,n)=>t==="usage"&&e==="static",g_=(t,e,n)=>t==="usage"&&e==="monthly",m_=(t,e)=>t==="constant",xs=(t=>(t.USER_GROUPS="userGroups",t.APP_BACKUPS="appBackups",t.ENVIRONMENT_VARIABLES="environmentVariables",t.AUDIT_LOGS="auditLogs",t.ENFORCEABLE_SSO="enforceableSSO",t.BRANDING="branding",t.SCIM="scim",t.SYNC_AUTOMATIONS="syncAutomations",t.TRIGGER_AUTOMATION_RUN="triggerAutomationRun",t.APP_BUILDERS="appBuilders",t.OFFLINE="offline",t.EXPANDED_PUBLIC_API="expandedPublicApi",t.VIEW_PERMISSIONS="viewPermissions",t.VIEW_READONLY_COLUMNS="viewReadonlyColumns",t.BUDIBASE_AI="budibaseAI",t.AI_CUSTOM_CONFIGS="aiCustomConfigs",t))(xs||{}),$s=(t=>(t.GLOBAL="global",t.APP="app",t.INSTALLATION="installation",t))($s||{}),eu=(t=>(t.USER_EMAIL_VIEW_CASING="user_email_view_casing",t.APP_URLS="app_urls",t.EVENT_APP_BACKFILL="event_app_backfill",t.EVENT_GLOBAL_BACKFILL="event_global_backfill",t.EVENT_INSTALLATION_BACKFILL="event_installation_backfill",t.GLOBAL_INFO_SYNC_USERS="global_info_sync_users",t.TABLE_SETTINGS_LINKS_TO_ACTIONS="table_settings_links_to_actions",t.SYNC_QUOTAS="sync_quotas_2",t))(eu||{}),__="--secret-value--",tu=(t=>(t.CREATE="CREATE",t.READ="READ",t.UPDATE="UPDATE",t.DELETE="DELETE",t.COUNT="COUNT",t.BULK_CREATE="BULK_CREATE",t.BULK_UPSERT="BULK_UPSERT",t.CREATE_TABLE="CREATE_TABLE",t.UPDATE_TABLE="UPDATE_TABLE",t.DELETE_TABLE="DELETE_TABLE",t))(tu||{}),p_=["CREATE","READ","UPDATE","DELETE","BULK_CREATE","BULK_UPSERT"],nu=(t=>(t.SQL="sql",t.JSON="json",t.FIELDS="fields",t))(nu||{}),iu=(t=>(t.STRING="string",t.CODE="code",t.LONGFORM="longForm",t.BOOLEAN="boolean",t.NUMBER="number",t.PASSWORD="password",t.LIST="list",t.OBJECT="object",t.JSON="json",t.FILE="file",t.FIELD_GROUP="fieldGroup",t.SELECT="select",t))(iu||{}),lu=(t=>(t.POSTGRES="POSTGRES",t.DYNAMODB="DYNAMODB",t.MONGODB="MONGODB",t.ELASTICSEARCH="ELASTICSEARCH",t.COUCHDB="COUCHDB",t.SQL_SERVER="SQL_SERVER",t.S3="S3",t.AIRTABLE="AIRTABLE",t.MYSQL="MYSQL",t.ARANGODB="ARANGODB",t.REST="REST",t.ORACLE="ORACLE",t.GOOGLE_SHEETS="GOOGLE_SHEETS",t.FIRESTORE="FIRESTORE",t.REDIS="REDIS",t.SNOWFLAKE="SNOWFLAKE",t.BUDIBASE="BUDIBASE",t))(lu||{}),ru=(t=>(t[t.INCLUDE=1]="INCLUDE",t[t.EXCLUDE=0]="EXCLUDE",t))(ru||{}),ou=(t=>(t.STRING="string",t.FUZZY="fuzzy",t.RANGE="range",t.EQUAL="equal",t.NOT_EQUAL="notEqual",t.EMPTY="empty",t.NOT_EMPTY="notEmpty",t.ONE_OF="oneOf",t))(ou||{}),su=(t=>(t.CONNECTION_CHECKING="connection",t.FETCH_TABLE_NAMES="fetch_table_names",t.EXPORT_SCHEMA="export_schema",t))(su||{}),uu=(t=>(t.CREATE="create",t.READ="read",t.UPDATE="update",t.DELETE="delete",t))(uu||{}),au=(t=>(t.EQUAL="equal",t.NOT_EQUAL="notEqual",t.EMPTY="empty",t.NOT_EMPTY="notEmpty",t.FUZZY="fuzzy",t.STRING="string",t))(au||{}),fu=(t=>(t.CONTAINS="contains",t.NOT_CONTAINS="notContains",t.CONTAINS_ANY="containsAny",t.ONE_OF="oneOf",t))(fu||{}),cu=(t=>(t.RANGE="range",t))(cu||{}),du=(t=>(t.AND="$and",t.OR="$or",t))(du||{});function b_(t){return t==="$and"||t==="$or"}var hu=(t=>(t.COMPLEX_ID_OPERATOR="_complexIdOperator",t))(hu||{}),gu=(t=>(t.RETURN_ALL="all",t.RETURN_NONE="none",t))(gu||{}),mu=(t=>(t.ALL="all",t.ANY="any",t))(mu||{}),_u=(t=>(t.MS_SQL="mssql",t.POSTGRES="pg",t.MY_SQL="mysql2",t.MARIADB="mariadb",t.ORACLE="oracledb",t.SQL_LITE="sqlite3",t))(_u||{}),pu=(t=>(t.API_KEY="api_key",t.COOKIE="cookie",t))(pu||{}),bu=(t=>(t.TRY_ONCE="try_once",t.TRY_TWICE="try_twice",t.DEFAULT="default",t.DELAY_500="delay_500",t.CUSTOM="custom",t.AUTO_EXTEND="auto_extend",t))(bu||{}),wu=(t=>(t.MIGRATIONS="migrations",t.TRIGGER_QUOTA="trigger_quota",t.SYNC_ACCOUNT_LICENSE="sync_account_license",t.UPDATE_TENANTS_DOC="update_tenants_doc",t.PERSIST_WRITETHROUGH="persist_writethrough",t.QUOTA_USAGE_EVENT="quota_usage_event",t.APP_MIGRATION="app_migrations",t.PROCESS_USER_INVITE="process_user_invite",t))(wu||{}),ku=(t=>(t.ROWS="rows",t.AUDIT="audit",t.USER="user",t))(ku||{}),yu=(t=>(t.ASCENDING="asc",t.DESCENDING="desc",t))(yu||{}),w_=t=>typeof t=="object"&&t._id&&t._rev,Eu=(t=>(t.USER="user",t.HEADER="header",t.QUERY="query",t.SUBDOMAIN="subdomain",t.PATH="path",t))(Eu||{}),vu=(t=>(t.PER_CREATOR_PER_USER_PRICE="PER_CREATOR_PER_USER_PRICE",t.PER_CREATOR_PER_USER_PRICE_ALERT="PER_CREATOR_PER_USER_PRICE_ALERT",t.AUTOMATION_BRANCHING="AUTOMATION_BRANCHING",t.SQS="SQS",t.AI_CUSTOM_CONFIGS="AI_CUSTOM_CONFIGS",t.DEFAULT_VALUES="DEFAULT_VALUES",t.ENRICHED_RELATIONSHIPS="ENRICHED_RELATIONSHIPS",t.TABLES_DEFAULT_ADMIN="TABLES_DEFAULT_ADMIN",t.BUDIBASE_AI="BUDIBASE_AI",t))(vu||{}),Su=(t=>(t.PRODUCTION="production",t.DEVELOPMENT="development",t))(Su||{}),Cu=(t=>(t.BACKUPS="backups",t.HOSTING="hosting",t.ANALYTICS="analytics",t.HELP="help",t.PLUGIN="plugins",t))(Cu||{}),Au=(t=>(t.QUICK="quick",t.DIGITAL_OCEAN="do",t))(Au||{}),k_={OptOut:"analytics:opt:out",OptIn:"analytics:opt:in",SelfHostInit:"hosting:init",PluginInit:"plugin:init"},Tu=(t=>(t.READ="read",t.WRITE="write",t.EXECUTE="execute",t.ADMIN="admin",t))(Tu||{}),Iu=(t=>(t.APP="app",t.TABLE="table",t.USER="user",t.AUTOMATION="automation",t.WEBHOOK="webhook",t.BUILDER="builder",t.CREATOR="creator",t.GLOBAL_BUILDER="globalBuilder",t.QUERY="query",t.VIEW="view",t.LEGACY_VIEW="legacy_view",t))(Iu||{}),Du=(t=>(t.EXPLICIT="EXPLICIT",t.INHERITED="INHERITED",t.BASE="BASE",t))(Du||{}),Ou=(t=>(t.CSV="csv",t.JSON="json",t.JSON_WITH_SCHEMA="jsonWithSchema",t))(Ou||{}),y_=t=>t.authType==="password",E_=t=>t.authType==="password"&&t.hosting==="self",v_=t=>t.hosting==="cloud",S_=t=>t.hosting==="self",C_=t=>t.authType==="sso",Ru=(t=>(t.GOOGLE="google",t.MICROSOFT="microsoft",t))(Ru||{}),Pu=(t=>(t.GOOGLE="google",t.MICROSOFT="microsoft",t))(Pu||{}),A_=["microsoft"];function T_(t){return A_.includes(t)}var Mu=(t=>(t.SSO="sso",t.PASSWORD="password",t))(Mu||{}),Nu=(t=>(t.OBJECT="object",t.STRING="string",t.BOOLEAN="boolean",t.NUMBER="number",t.ARRAY="array",t.JSON="json",t.DATE="date",t.ATTACHMENT="attachment",t))(Nu||{}),Lu=(t=>(t.TABLE="table",t.ROW="row",t.ROWS="rows",t.WIDE="wide",t.QUERY="query",t.QUERY_PARAMS="queryParams",t.QUERY_LIMIT="queryLimit",t.LOOP_OPTION="loopOption",t.ITEM="item",t.CODE="code",t.FILTERS="filters",t.COLUMN="column",t.TRIGGER_SCHEMA="triggerSchema",t.CRON="cron",t.WEBHOOK_URL="webhookUrl",t.AUTOMATION="automation",t.AUTOMATION_FIELDS="automationFields",t.MULTI_ATTACHMENTS="multi_attachments",t.TRIGGER_FILTER="trigger_filter",t))(Lu||{}),wo=(t=>(t.ROW_SAVED="ROW_SAVED",t.ROW_UPDATED="ROW_UPDATED",t.ROW_DELETED="ROW_DELETED",t.WEBHOOK="WEBHOOK",t.APP="APP",t.CRON="CRON",t.ROW_ACTION="ROW_ACTION",t))(wo||{}),Fu=(t=>(t.LOGIC="LOGIC",t.ACTION="ACTION",t.TRIGGER="TRIGGER",t))(Fu||{}),ko=(t=>(t.SEND_EMAIL_SMTP="SEND_EMAIL_SMTP",t.CREATE_ROW="CREATE_ROW",t.UPDATE_ROW="UPDATE_ROW",t.DELETE_ROW="DELETE_ROW",t.EXECUTE_BASH="EXECUTE_BASH",t.OUTGOING_WEBHOOK="OUTGOING_WEBHOOK",t.EXECUTE_SCRIPT="EXECUTE_SCRIPT",t.EXECUTE_QUERY="EXECUTE_QUERY",t.SERVER_LOG="SERVER_LOG",t.DELAY="DELAY",t.FILTER="FILTER",t.QUERY_ROWS="QUERY_ROWS",t.LOOP="LOOP",t.COLLECT="COLLECT",t.OPENAI="OPENAI",t.TRIGGER_AUTOMATION_RUN="TRIGGER_AUTOMATION_RUN",t.BRANCH="BRANCH",t.discord="discord",t.slack="slack",t.zapier="zapier",t.integromat="integromat",t.n8n="n8n",t))(ko||{}),I_=[...Object.values(ko),...Object.values(wo)],Vu=(t=>(t.LOOPING="LOOPING",t))(Vu||{}),Bu=(t=>(t.NO_ITERATIONS="no_iterations",t))(Bu||{}),Uu=(t=>(t.SUCCESS="success",t.ERROR="error",t.STOPPED="stopped",t.STOPPED_ERROR="stopped_error",t.NO_CONDITION_MET="No branch condition met",t))(Uu||{}),Hu=(t=>(t.TRIGGER_FILTER_NOT_MET="Automation did not run. Filter conditions in trigger were not met.",t))(Hu||{}),zu=(t=>(t.ROW_SAVE="row:save",t.ROW_UPDATE="row:update",t.ROW_DELETE="row:delete",t.APP_TRIGGER="app:trigger",t.CRON_TRIGGER="cron:trigger",t.WEBHOOK_TRIGGER="web:trigger",t.ROW_ACTION="row:action",t))(zu||{}),ju=(t=>(t.ARRAY="Array",t.STRING="String",t))(ju||{}),qu=(t=>(t.BASIC="basic",t.BEARER="bearer",t))(qu||{}),Wu=(t=>(t.NONE="none",t.FORM_DATA="form",t.XML="xml",t.ENCODED="encoded",t.JSON="json",t.TEXT="text",t))(Wu||{}),Gu=(t=>(t.GET="GET",t.POST="POST",t.PATCH="PATCH",t.PUT="PUT",t.HEAD="HEAD",t.DELETE="DELETE",t))(Gu||{}),D_="bb_internal",Yu=(t=>(t.EXTERNAL="external",t.INTERNAL="internal",t))(Yu||{}),Ku=(t=>(t.STRING="string",t.LONGFORM="longform",t.OPTIONS="options",t.NUMBER="number",t.BOOLEAN="boolean",t.ARRAY="array",t.DATETIME="datetime",t.ATTACHMENTS="attachment",t.ATTACHMENT_SINGLE="attachment_single",t.LINK="link",t.FORMULA="formula",t.AUTO="auto",t.AI="ai",t.JSON="json",t.INTERNAL="internal",t.BARCODEQR="barcodeqr",t.SIGNATURE_SINGLE="signature_single",t.BIGINT="bigint",t.BB_REFERENCE="bb_reference",t.BB_REFERENCE_SINGLE="bb_reference_single",t))(Ku||{}),O_=["attachment_single","attachment","bb_reference","json","array"],Xu=["number","bigint"];function R_(t){return Xu.includes(t)}var Qu=["string","longform","options","number","boolean","datetime","bigint"];function P_(t){return Qu.includes(t)}var Zu=(t=>(t.ONE_TO_MANY="one-to-many",t.MANY_TO_ONE="many-to-one",t.MANY_TO_MANY="many-to-many",t))(Zu||{}),Ju=(t=>(t.FOREIGN_KEY="foreign_key",t))(Ju||{}),xu=(t=>(t.CREATED_BY="createdBy",t.CREATED_AT="createdAt",t.UPDATED_BY="updatedBy",t.UPDATED_AT="updatedAt",t.AUTO_ID="autoID",t))(xu||{}),$u=(t=>(t.ARRAY="array",t))($u||{}),ea=(t=>(t.STATIC="static",t.DYNAMIC="dynamic",t.AI="ai",t))(ea||{}),ta=(t=>(t.USER="user",t.USERS="users",t))(ta||{});function M_(t){return t.type==="link"}function N_(t){return t.relationshipType==="many-to-many"}function L_(t){return t.relationshipType==="one-to-many"}function F_(t){return t.relationshipType==="many-to-one"}var na=(t=>(t.SUM="sum",t.AVG="avg",t.COUNT="count",t.MIN="min",t.MAX="max",t))(na||{}),ia=(t=>(t.CALCULATION="calculation",t))(ia||{}),la=(t=>(t.SUM="sum",t.COUNT="count",t.STATISTICS="stats",t))(la||{}),br="_",V_="",B_=t=>`${t}${br}`,yo=(t=>(t.USER="us",t.GROUP="gr",t.WORKSPACE="workspace",t.CONFIG="config",t.TEMPLATE="template",t.APP="app",t.DEV="dev",t.APP_DEV="app_dev",t.APP_METADATA="app_metadata",t.ROLE="role",t.MIGRATIONS="migrations",t.DEV_INFO="devinfo",t.AUTOMATION_LOG="log_au",t.ACCOUNT_METADATA="acc_metadata",t.PLUGIN="plg",t.DATASOURCE="datasource",t.DATASOURCE_PLUS="datasource_plus",t.APP_BACKUP="backup",t.TABLE="ta",t.ROW="ro",t.AUTOMATION="au",t.LINK="li",t.WEBHOOK="wh",t.INSTANCE="inst",t.LAYOUT="layout",t.SCREEN="screen",t.QUERY="query",t.DEPLOYMENTS="deployments",t.METADATA="metadata",t.MEM_VIEW="view",t.USER_FLAG="flag",t.AUTOMATION_METADATA="meta_au",t.AUDIT_LOG="al",t.APP_MIGRATION_METADATA="_design/migrations",t.SCIM_LOG="scimlog",t.ROW_ACTIONS="ra",t))(yo||{}),U_=Object.values(yo).sort((t,e)=>e.length-t.length);function H_(t){return U_.find(e=>t.startsWith(`${e}${br}`))}var z_=["role","datasource","datasource_plus","ta","au","wh","screen","query","metadata","view","inst","layout"],ra=(t=>(t.USER_METADATA="ta_users",t))(ra||{}),Eo=(t=>(t.VIEW="view",t.ROW_ACTION="row_action",t))(Eo||{}),j_=Object.values(Eo).sort((t,e)=>e.length-t.length);function q_(t){return j_.find(e=>t.startsWith(`${e}${br}`))}var oa=(t=>(t.BACKUP="backup",t.RESTORE="restore",t))(oa||{}),sa=(t=>(t.STARTED="started",t.PENDING="pending",t.COMPLETE="complete",t.FAILED="failed",t))(sa||{}),ua=(t=>(t.PUBLISH="publish",t.MANUAL="manual",t.SCHEDULED="scheduled",t.RESTORING="restoring",t))(ua||{}),aa=(t=>(t.AUTOMATION="automation",t))(aa||{}),fa=(t=>(t.REAL="REAL",t.TEXT="VARCHAR",t.INT="INTEGER",t.BLOB="BLOB",t.NUMERIC="NUMERIC",t))(fa||{}),W_=t=>t.type==="settings",G_=t=>t.type==="smtp",Y_=t=>t.type==="google",K_=t=>t.type==="oidc",X_=t=>t.type==="scim",Q_=t=>t.type==="ai",ca=(t=>(t.SETTINGS="settings",t.ACCOUNT="account",t.SMTP="smtp",t.GOOGLE="google",t.OIDC="oidc",t.OIDC_LOGOS="logos_oidc",t.SCIM="scim",t.AI="ai",t))(ca||{}),da=(t=>(t.OIDC="oidc",t.GOOGLE="google",t))(da||{});function Z_(t){return!!t.providerType}var ha=(t=>(t.ACTIVE="active",t.INACTIVE="inactive",t))(ha||{});function J_(t){return!!t.roles}var vo=(t=>(t.DATASOURCE="datasource",t.COMPONENT="component",t.AUTOMATION="automation",t))(vo||{}),ga=(t=>(t.NPM="NPM",t.GITHUB="Github",t.URL="URL",t.FILE="File Upload",t))(ga||{}),x_=Object.values(vo),ma=(t=>(t.ROW_QUERIES="rowQueries",t.DATASOURCE_QUERIES="datasourceQueries",t.AUTOMATIONS="automations",t))(ma||{}),$_=["rows","queries","automations"],ep=["queries","automations"],_a=(t=>(t.APP_BACKUP="app_backup",t))(_a||{}),pa=(t=>(t.DAILY="daily",t.WEEKLY="weekly",t.MONTHLY="monthly",t))(pa||{}),tp=(t,e)=>t==="app_backup",np="SYSTEM",ip="auditLog",ba=(t=>(t.BUILDER="builder",t.APP="app",t))(ba||{}),wa=(t=>(t.DELETED="deleted",t))(wa||{}),ka=(t=>(t.ENVIRONMENT_VARIABLE_UPGRADE_PANEL_OPENED="environment_variable_upgrade_panel_opened",t))(ka||{}),ya=(t=>(t.ASCENDING="ascending",t.DESCENDING="descending",t))(ya||{}),Ea=(t=>(t.STRING="string",t.NUMBER="number",t))(Ea||{}),va=(t=>(t.WORKER="worker",t.APPS="apps",t))(va||{}),Sa=(t=>(t.SQS_MISSING="sqs_missing",t))(Sa||{});function lp(t){let e;const n=t[30].default,i=Ut(n,t,t[31],null);return{c(){i&&i.c()},m(l,r){i&&i.m(l,r),e=!0},p(l,r){i&&i.p&&(!e||r[1]&1)&&zt(i,n,l,l[31],e?Ht(n,l[31],r,null):jt(l[31]),null)},i(l){e||(U(i,l),e=!0)},o(l){Z(i,l),e=!1},d(l){i&&i.d(l)}}}function rp(t){let e,n;return e=new t[8]({props:{actions:t[9],data:t[2],$$slots:{default:[op]},$$scope:{ctx:t}}}),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l[0]&4&&(r.data=i[2]),l[1]&1&&(r.$$scope={dirty:l,ctx:i}),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function op(t){let e;const n=t[30].default,i=Ut(n,t,t[31],null);return{c(){i&&i.c()},m(l,r){i&&i.m(l,r),e=!0},p(l,r){i&&i.p&&(!e||r[1]&1)&&zt(i,n,l,l[31],e?Ht(n,l[31],r,null):jt(l[31]),null)},i(l){e||(U(i,l),e=!0)},o(l){Z(i,l),e=!1},d(l){i&&i.d(l)}}}function sp(t){let e,n,i,l;const r=[rp,lp],o=[];function u(s,a){return s[0]?0:1}return e=u(t),n=o[e]=r[e](t),{c(){n.c(),i=Fe()},m(s,a){o[e].m(s,a),A(s,i,a),l=!0},p(s,a){let f=e;e=u(s),e===f?o[e].p(s,a):(He(),Z(o[f],1,1,()=>{o[f]=null}),ze(),n=o[e],n?n.p(s,a):(n=o[e]=r[e](s),n.c()),U(n,1),n.m(i.parentNode,i))},i(s){l||(U(n),l=!0)},o(s){Z(n),l=!1},d(s){s&&C(i),o[e].d(s)}}}function up(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})}function So(t){if(t==null||typeof t!="object")return t;if(Array.isArray(t))return t.map(So);const e={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=So(t[n]));return e}function Ca(t,e){if(!t||!e)return;const n=Array.isArray(e)?e:e.split(".");let i=t;for(const l of n){if(i==null)return;i=i[l]}return i}function Aa(t,e,n){if(!t||!e)return;const i=Array.isArray(e)?e:e.split(".");let l=t;for(let r=0;r<i.length-1;r++){const o=i[r];(!l[o]||typeof l[o]!="object")&&(l[o]={}),l=l[o]}l[i[i.length-1]]=n}function ap(t,e,n){let i,l,r,o,u,s,a,f,c=ue,g=()=>(c(),c=ft(s,ce=>n(24,f=ce)),s),h,d=ue,_=()=>(d(),d=ft(R,ce=>n(25,h=ce)),R),b,w=ue,E=()=>(w(),w=ft(u,ce=>n(26,b=ce)),u),k,I=ue,O=()=>(I(),I=ft(r,ce=>n(27,k=ce)),r),D,N=ue,M=()=>(N(),N=ft(i,ce=>n(28,D=ce)),i),V,W=ue,ne=()=>(W(),W=ft(l,ce=>n(29,V=ce)),l);t.$$.on_destroy.push(()=>c()),t.$$.on_destroy.push(()=>d()),t.$$.on_destroy.push(()=>w()),t.$$.on_destroy.push(()=>I()),t.$$.on_destroy.push(()=>N()),t.$$.on_destroy.push(()=>W());let{$$slots:H={},$$scope:$}=e;const Y=le.createEventDispatcher();let{dataSource:G=void 0}=e,{disabled:oe=!1}=e,{readonly:ie=!1}=e,{initialValues:J=void 0}=e,{size:q=void 0}=e,{schema:j=void 0}=e,{definition:K=void 0}=e,{disableSchemaValidation:x=!1}=e,{editAutoColumns:X=!1}=e,{provideContext:F=!0}=e,{currentStep:R}=e;_();let{formValue:z={}}=e;const{Provider:me,ActionTypes:se,createValidatorFromConstraints:Oe}=le.getContext("sdk");let be=[];const Ie=ii({values:{},errors:{},valid:!0,dirty:!1,currentStep:qt(R)});let{form:ve}=e;const fe=(ce,re)=>pr(ce,Ae=>Ae.reduce((Ue,Je)=>({...Ue,[Je.name]:re(Je)}),{})),Ne=(ce,re)=>pr(ce,Ae=>Ae.some(Ue=>{const Je=Ca(re,Ue.name)??Ue.fieldState.defaultValue;return Ue.fieldState.value!==Je})),te=ce=>pr(ce,re=>{const Ae={};return re.forEach(Ue=>{if(Ue.type==="attachment"){const Je=Ue.fieldState.value;let lt=null;Array.isArray(Je)&&Je[0]!=null&&(lt=Je[0].url),Ae[`${Ue.name}_first`]=lt}}),Ae}),ae=(ce,re,Ae)=>{let Ue=So(ce||{});return Object.entries(re||{}).map(([lt,he])=>{var ot;const it=de(lt);return{key:lt,value:he,lastUpdate:((ot=qt(it).fieldState)==null?void 0:ot.lastUpdate)||0}}).sort((lt,he)=>lt.lastUpdate-he.lastUpdate).forEach(({key:lt,value:he})=>{Aa(Ue,lt,he)}),Object.entries(Ae||{}).forEach(([lt,he])=>{Aa(Ue,lt,he)}),Ue},de=ce=>be.find(re=>qt(re).name===ce),Xe=(ce,re,Ae)=>{var Ue;if(Array.isArray(ce)&&Ae==="array"&&re){const Je=((Ue=re==null?void 0:re.constraints)==null?void 0:Ue.inclusion)||[];return ce.map(lt=>String(lt)).filter(lt=>Je.includes(lt))}return ce},Te={registerField:(ce,re,Ae=null,Ue=!1,Je=!1,lt,he=1)=>{var st,we,xe;if(!ce)return;const it=x?null:(st=j==null?void 0:j[ce])==null?void 0:st.constraints,ot=Oe(it,lt,ce,K);Ae=Xe(Ae,j==null?void 0:j[ce],re);let wt=Ca(J,ce)??Ae,Ct=null,ln=`id-${up()}`;const It=de(ce);if(It){const{fieldState:pe}=qt(It);ln=pe.fieldId,pe.value!=null&&pe.value!==""&&(wt=pe.value),pe.error&&(Ct=ot==null?void 0:ot(wt))}const xt=!!((we=j==null?void 0:j[ce])!=null&&we.autocolumn),_e=ii({name:ce,type:re,step:he||1,fieldState:{fieldId:ln,value:wt,error:Ct,disabled:oe||Ue||xt&&!X,readonly:ie||Je||((xe=j==null?void 0:j[ce])==null?void 0:xe.readonly),fieldDisabled:Ue,fieldReadOnly:Je,defaultValue:Ae,validator:ot,lastUpdate:Date.now()},fieldApi:Se(ce),fieldSchema:(j==null?void 0:j[ce])??{}});if(It){const pe=be.filter(_t=>qt(_t).name!==ce);n(22,be=[...pe,_e])}else n(22,be=[...be,_e]);return _e},validate:()=>{const ce=be.filter(Ue=>qt(Ue).step===qt(R));let re=!0,Ae=!1;return ce.forEach(Ue=>{const Je=qt(Ue).fieldApi.validate();re=re&&Je,!re&&!Ae&&(rt({field:qt(Ue)}),Ae=!0)}),re},reset:()=>{be.forEach(ce=>{qt(ce).fieldApi.reset()}),Y("reset")},changeStep:({type:ce,number:re})=>{ce==="next"?R.update(Ae=>Ae+1):ce==="prev"?R.update(Ae=>Math.max(1,Ae-1)):ce==="first"?R.set(1):ce==="specific"&&re&&!isNaN(re)&&R.set(parseInt(re))},setStep:ce=>{ce&&R.set(ce)},setFieldValue:(ce,re)=>{const Ae=de(ce);if(!Ae)return;const{fieldApi:Ue}=qt(Ae);Ue.setValue(re)},resetField:ce=>{const re=de(ce);if(!re)return;const{fieldApi:Ae}=qt(re);Ae.reset()}},Se=ce=>{const re=(he,it=!1)=>{const ot=de(ce),{fieldState:wt}=qt(ot),{validator:Ct}=wt;if(!it&&wt.value===he)return!1;const ln=Ct==null?void 0:Ct(he);return ot.update(It=>(It.fieldState.value=he,It.fieldState.error=ln,It.fieldState.lastUpdate=Date.now(),It)),Y("change",{field:ce,value:he}),!0};return{setValue:re,reset:()=>{const he=de(ce),{fieldState:it}=qt(he),ot=it.defaultValue;he.update(wt=>(wt.fieldState.value=ot,wt.fieldState.error=null,wt.fieldState.lastUpdate=Date.now(),wt))},setDisabled:he=>{de(ce).update(ot=>{var Ct;ot.fieldState.fieldDisabled=he;const wt=!!((Ct=j==null?void 0:j[ot.name])!=null&&Ct.autocolumn);return ot.fieldState.disabled=oe||he||wt&&!X,ot})},setReadOnly:he=>{de(ce).update(ot=>{var wt;return ot.fieldState.fieldReadOnly=he,ot.fieldState.readonly=ie||he||((wt=j==null?void 0:j[ot.name])==null?void 0:wt.readonly),ot})},deregister:()=>{de(ce).update(it=>(it.fieldState.validator=null,it.fieldState.error=null,it))},validate:()=>{const he=de(ce);return re(qt(he).fieldState.value,!0),!qt(he).fieldState.error}}};le.setContext("form",{formState:Ie,formApi:Te,dataSource:G}),le.setContext("form-step",ii(1));const Le=({type:ce,field:re,value:Ae})=>{if(ce==="set")if(re==="_value"){let Ue=Ae;if(typeof Ae=="string")try{Ue=JSON.parse(Ae)}catch{return}typeof Ue=="object"&&Ue!==null&&(Object.keys(Ue).forEach(Je=>{const lt=be.find(he=>qt(he).name.toLowerCase()===Je.toLowerCase());if(lt){const he=qt(lt).name;Te.setFieldValue(he,Ue[Je])}}),Te.validate())}else Te.setFieldValue(re,Ae);else Te.resetField(re)},rt=ce=>{let re;typeof ce.field=="string"?re=qt(de(ce.field)):re=ce.field;const Ae=re.fieldState.fieldId,Ue=document.getElementById(Ae);Ue&&Ue.focus({preventScroll:!0});const Je=document.querySelector(`label[for="${Ae}"]`);Je&&(Je.style.scrollMargin="100px",Je.scrollIntoView({behavior:"smooth",block:"nearest"}))},kt=[{type:se.ValidateForm,callback:Te.validate},{type:se.ClearForm,callback:Te.reset},{type:se.ChangeFormStep,callback:Te.changeStep},{type:se.UpdateFieldValue,callback:Le},{type:se.ScrollTo,callback:rt}],ke=(ce,re)=>{be.length>0&&be.forEach(Ae=>{Ae.update(Ue=>{var lt,he;const Je=!!((lt=j==null?void 0:j[Ue.name])!=null&<.autocolumn);return Ue.fieldState.disabled=ce||Ue.fieldState.fieldDisabled||Je&&!X,Ue.fieldState.readonly=re||Ue.fieldState.fieldReadOnly||((he=j==null?void 0:j[Ue.name])==null?void 0:he.readonly),Ue})})};return t.$$set=ce=>{"dataSource"in ce&&n(12,G=ce.dataSource),"disabled"in ce&&n(13,oe=ce.disabled),"readonly"in ce&&n(14,ie=ce.readonly),"initialValues"in ce&&n(15,J=ce.initialValues),"size"in ce&&n(16,q=ce.size),"schema"in ce&&n(17,j=ce.schema),"definition"in ce&&n(18,K=ce.definition),"disableSchemaValidation"in ce&&n(19,x=ce.disableSchemaValidation),"editAutoColumns"in ce&&n(20,X=ce.editAutoColumns),"provideContext"in ce&&n(0,F=ce.provideContext),"currentStep"in ce&&_(n(1,R=ce.currentStep)),"formValue"in ce&&n(10,z=ce.formValue),"form"in ce&&n(11,ve=ce.form),"$$scope"in ce&&n(31,$=ce.$$scope)},t.$$.update=()=>{t.$$.dirty[0]&4194304&&M(n(7,i=fe(be,ce=>ce.fieldState.value))),t.$$.dirty[0]&268435456&&n(10,z=D),t.$$.dirty[0]&4194304&&ne(n(6,l=fe(be,ce=>ce.fieldState.error))),t.$$.dirty[0]&4194304&&O(n(5,r=te(be))),t.$$.dirty[0]&536870912&&n(23,o=!Object.values(V).some(ce=>ce!=null)),t.$$.dirty[0]&4227072&&E(n(4,u=Ne(be,J))),t.$$.dirty[0]&24576&&ke(oe,ie),t.$$.dirty[0]&4194306&&g(n(3,s=pr([R,...be],([ce,...re])=>!re.filter(Ae=>Ae.step===ce).some(Ae=>Ae.fieldState.error!=null)))),t.$$.dirty[0]&4096&&n(11,ve={formState:Ie,formApi:Te,dataSource:G}),t.$$.dirty[0]&914358272&&Ie.set({values:D,errors:V,valid:o,dirty:b,currentStep:h}),t.$$.dirty[0]&402685952&&n(10,z=ae(J,D,k)),t.$$.dirty[0]&125854720&&n(2,a={...z,__value:z,__valid:o,__dirty:b,__currentStep:h,__currentStepValid:f,__editing:!ie&&!oe})},[F,R,a,s,u,r,l,i,me,kt,z,ve,G,oe,ie,J,q,j,K,x,X,Ie,be,o,f,h,b,k,D,V,H,$]}class fp extends Ze{constructor(e){super(),Qe(this,e,ap,sp,Ye,{dataSource:12,disabled:13,readonly:14,initialValues:15,size:16,schema:17,definition:18,disableSchemaValidation:19,editAutoColumns:20,provideContext:0,currentStep:1,formValue:10,formState:21,form:11},null,[-1,-1])}get formState(){return this.$$.ctx[21]}}function Ta(t){let e=t[15],n,i,l=Ia(t);return{c(){l.c(),n=Fe()},m(r,o){l.m(r,o),A(r,n,o),i=!0},p(r,o){o[0]&32768&&Ye(e,e=r[15])?(He(),Z(l,1,1,ue),ze(),l=Ia(r),l.c(),U(l,1),l.m(n.parentNode,n)):l.p(r,o)},i(r){i||(U(l),i=!0)},o(r){Z(l),i=!1},d(r){r&&C(n),l.d(r)}}}function cp(t){let e;const n=t[24].default,i=Ut(n,t,t[30],null);return{c(){i&&i.c()},m(l,r){i&&i.m(l,r),e=!0},p(l,r){i&&i.p&&(!e||r[0]&1073741824)&&zt(i,n,l,l[30],e?Ht(n,l[30],r,null):jt(l[30]),null)},i(l){e||(U(i,l),e=!0)},o(l){Z(i,l),e=!1},d(l){i&&i.d(l)}}}function Ia(t){let e,n,i,l,r;function o(f){t[25](f)}function u(f){t[26](f)}function s(f){t[27](f)}let a={dataSource:t[3],size:t[4],disabled:t[5],readonly:t[6]||t[7]=="View",schema:t[11],definition:t[13],initialValues:t[12],disableSchemaValidation:t[8],editAutoColumns:t[9],currentStep:t[18],provideContext:t[10],$$slots:{default:[cp]},$$scope:{ctx:t}};return t[0]!==void 0&&(a.form=t[0]),t[1]!==void 0&&(a.formState=t[1]),t[2]!==void 0&&(a.formValue=t[2]),e=new fp({props:a}),Be.push(()=>Gt(e,"form",o)),Be.push(()=>Gt(e,"formState",u)),Be.push(()=>Gt(e,"formValue",s)),e.$on("change",t[28]),e.$on("reset",t[29]),{c(){We(e.$$.fragment)},m(f,c){je(e,f,c),r=!0},p(f,c){const g={};c[0]&8&&(g.dataSource=f[3]),c[0]&16&&(g.size=f[4]),c[0]&32&&(g.disabled=f[5]),c[0]&192&&(g.readonly=f[6]||f[7]=="View"),c[0]&2048&&(g.schema=f[11]),c[0]&8192&&(g.definition=f[13]),c[0]&4096&&(g.initialValues=f[12]),c[0]&256&&(g.disableSchemaValidation=f[8]),c[0]&512&&(g.editAutoColumns=f[9]),c[0]&1024&&(g.provideContext=f[10]),c[0]&1073741824&&(g.$$scope={dirty:c,ctx:f}),!n&&c[0]&1&&(n=!0,g.form=f[0],Wt(()=>n=!1)),!i&&c[0]&2&&(i=!0,g.formState=f[1],Wt(()=>i=!1)),!l&&c[0]&4&&(l=!0,g.formValue=f[2],Wt(()=>l=!1)),e.$set(g)},i(f){r||(U(e.$$.fragment,f),r=!0)},o(f){Z(e.$$.fragment,f),r=!1},d(f){qe(e,f)}}}function dp(t){let e,n,i=t[14]&&Ta(t);return{c(){i&&i.c(),e=Fe()},m(l,r){i&&i.m(l,r),A(l,e,r),n=!0},p(l,r){l[14]?i?(i.p(l,r),r[0]&16384&&U(i,1)):(i=Ta(l),i.c(),U(i,1),i.m(e.parentNode,e)):i&&(He(),Z(i,1,1,()=>{i=null}),ze())},i(l){n||(U(i),n=!0)},o(l){Z(i),n=!1},d(l){l&&C(e),i&&i.d(l)}}}function hp(t,e,n){let i,l,r,o,u,{$$slots:s={},$$scope:a}=e;const f=R=>{let z=0;for(let me=0;me<R.length;me++){const se=R.charCodeAt(me);z=(z<<5)-z+se,z=z&z}return z.toString(16)};let{dataSource:c}=e,{size:g}=e,{disabled:h=!1}=e,{readonly:d=!1}=e,{actionType:_="Create"}=e,{initialFormStep:b=1}=e,{disableSchemaValidation:w=!1}=e,{editAutoColumns:E=!1}=e,{provideContext:k=!0}=e,{form:I}=e,{formState:O}=e,{formValue:D={}}=e,{row:N}=e;const M=le.getContext("context");Me(t,M,R=>n(22,o=R));const V=le.getContext("component");Me(t,V,R=>n(23,u=R));const{fetchDatasourceSchema:W,fetchDatasourceDefinition:ne}=le.getContext("sdk"),H=()=>{const R=parseInt(b.toString());return isNaN(R)?1:R};let $,Y,G=!1,oe=le.getContext("current-step")||ii(H());const ie=(R,z,me,se)=>{var be,Ie;if(R!=="Update"&&R!=="View")return{};const Oe=z==null?void 0:z.type;if(Oe!=="table"&&Oe!=="viewV2")return{};if(N&&Oe==="table"&&(N==null?void 0:N.tableId)===z.tableId)return N;for(let ve of me.toReversed().slice(1))if(z.type==="viewV2"&&((be=se[ve])==null?void 0:be._viewId)===z.id||z.type==="table"&&((Ie=se[ve])==null?void 0:Ie.tableId)===z.tableId)return se[ve];return{}},J=async R=>{try{n(13,$=await ne(R))}catch{n(13,$=void 0)}const z=await W(R);n(11,Y=z||{}),G||n(14,G=!0)},q=R=>{if(!R)return null;const z=Object.keys(R);return z.sort(),z.map(me=>`${me}:${R[me].type}`).join("-")};function j(R){I=R,n(0,I)}function K(R){O=R,n(1,O)}function x(R){D=R,n(2,D)}function X(R){ti.call(this,t,R)}function F(R){ti.call(this,t,R)}return t.$$set=R=>{"dataSource"in R&&n(3,c=R.dataSource),"size"in R&&n(4,g=R.size),"disabled"in R&&n(5,h=R.disabled),"readonly"in R&&n(6,d=R.readonly),"actionType"in R&&n(7,_=R.actionType),"initialFormStep"in R&&n(19,b=R.initialFormStep),"disableSchemaValidation"in R&&n(8,w=R.disableSchemaValidation),"editAutoColumns"in R&&n(9,E=R.editAutoColumns),"provideContext"in R&&n(10,k=R.provideContext),"form"in R&&n(0,I=R.form),"formState"in R&&n(1,O=R.formState),"formValue"in R&&n(2,D=R.formValue),"row"in R&&n(20,N=R.row),"$$scope"in R&&n(30,a=R.$$scope)},t.$$.update=()=>{t.$$.dirty[0]&8&&J(c),t.$$.dirty[0]&2048&&n(21,i=q(Y)),t.$$.dirty[0]&13631624&&n(12,l=ie(_,c,u.path,o)),t.$$.dirty[0]&2101376&&n(15,r=f(i+JSON.stringify(l)+_))},[I,O,D,c,g,h,d,_,w,E,k,Y,l,$,G,r,M,V,oe,b,N,i,o,u,s,j,K,x,X,F,a]}class gp extends Ze{constructor(e){super(),Qe(this,e,hp,dp,Ye,{dataSource:3,size:4,disabled:5,readonly:6,actionType:7,initialFormStep:19,disableSchemaValidation:8,editAutoColumns:9,provideContext:10,form:0,formState:1,formValue:2,row:20},null,[-1,-1])}}function Da(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),n.push.apply(n,i)}return n}function wr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Da(Object(n),!0).forEach(function(i){Pl(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Da(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function Rl(t){"@babel/helpers - typeof";return Rl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Rl(t)}function Pl(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function mp(t,e){if(t==null)return{};var n={},i=Object.keys(t),l,r;for(r=0;r<i.length;r++)l=i[r],!(e.indexOf(l)>=0)&&(n[l]=t[l]);return n}function _p(t,e){if(t==null)return{};var n=mp(t,e),i,l;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(l=0;l<r.length;l++)i=r[l],!(e.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i])}return n}function pp(t,e){return wp(t)||yp(t,e)||Co(t,e)||vp()}function qn(t){return bp(t)||kp(t)||Co(t)||Ep()}function bp(t){if(Array.isArray(t))return Ao(t)}function wp(t){if(Array.isArray(t))return t}function kp(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function yp(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var i=[],l=!0,r=!1,o,u;try{for(n=n.call(t);!(l=(o=n.next()).done)&&(i.push(o.value),!(e&&i.length===e));l=!0);}catch(s){r=!0,u=s}finally{try{!l&&n.return!=null&&n.return()}finally{if(r)throw u}}return i}}function Co(t,e){if(t){if(typeof t=="string")return Ao(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ao(t,e)}}function Ao(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function Ep(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
5
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
6
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
7
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var r=!0,o=!1,u;return{s:function(){n=n.call(t)},n:function(){var s=n.next();return r=s.done,s},e:function(s){o=!0,u=s},f:function(){try{!r&&n.return!=null&&n.return()}finally{if(o)throw u}}}}var Sp="finalize",Cp="consider";function Ml(t,e,n){t.dispatchEvent(new CustomEvent(Sp,{detail:{items:e,info:n}}))}function Oi(t,e,n){t.dispatchEvent(new CustomEvent(Cp,{detail:{items:e,info:n}}))}var kr="draggedEntered",Ql="draggedLeft",yr="draggedOverIndex",To="draggedLeftDocument",Er={LEFT_FOR_ANOTHER:"leftForAnother",OUTSIDE_OF_ANY:"outsideOfAny"};function Ap(t,e,n){t.dispatchEvent(new CustomEvent(kr,{detail:{indexObj:e,draggedEl:n}}))}function Tp(t,e,n){t.dispatchEvent(new CustomEvent(Ql,{detail:{draggedEl:e,type:Er.LEFT_FOR_ANOTHER,theOtherDz:n}}))}function Ip(t,e){t.dispatchEvent(new CustomEvent(Ql,{detail:{draggedEl:e,type:Er.OUTSIDE_OF_ANY}}))}function Dp(t,e,n){t.dispatchEvent(new CustomEvent(yr,{detail:{indexObj:e,draggedEl:n}}))}function Op(t){window.dispatchEvent(new CustomEvent(To,{detail:{draggedEl:t}}))}var bn={DRAG_STARTED:"dragStarted",DRAGGED_ENTERED:kr,DRAGGED_ENTERED_ANOTHER:"dragEnteredAnother",DRAGGED_OVER_INDEX:yr,DRAGGED_LEFT:Ql,DRAGGED_LEFT_ALL:"draggedLeftAll",DROPPED_INTO_ZONE:"droppedIntoZone",DROPPED_INTO_ANOTHER:"droppedIntoAnother",DROPPED_OUTSIDE_OF_ANY:"droppedOutsideOfAny",DRAG_STOPPED:"dragStopped"},vn={POINTER:"pointer",KEYBOARD:"keyboard"},vr="isDndShadowItem",Sr="data-is-dnd-shadow-item-internal",Rp="data-is-dnd-shadow-item-hint",Pp="id:dnd-shadow-placeholder-0000",Mp="dnd-action-dragged-el",un="id",Io=0;function Oa(){Io++}function Ra(){if(Io===0)throw new Error("Bug! trying to decrement when there are no dropzones");Io--}var Do=typeof window>"u";function Oo(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n,i=e?Fp(t):t.getBoundingClientRect(),l=getComputedStyle(t),r=l.transform;if(r){var o,u,s,a;if(r.startsWith("matrix3d("))n=r.slice(9,-1).split(/, /),o=+n[0],u=+n[5],s=+n[12],a=+n[13];else if(r.startsWith("matrix("))n=r.slice(7,-1).split(/, /),o=+n[0],u=+n[3],s=+n[4],a=+n[5];else return i;var f=l.transformOrigin,c=i.x-s-(1-o)*parseFloat(f),g=i.y-a-(1-u)*parseFloat(f.slice(f.indexOf(" ")+1)),h=o?i.width/o:t.offsetWidth,d=u?i.height/u:t.offsetHeight;return{x:c,y:g,width:h,height:d,top:g,right:c+h,bottom:g+d,left:c}}else return i}function Pa(t){var e=Oo(t);return{top:e.top+window.scrollY,bottom:e.bottom+window.scrollY,left:e.left+window.scrollX,right:e.right+window.scrollX}}function Ma(t){var e=t.getBoundingClientRect();return{top:e.top+window.scrollY,bottom:e.bottom+window.scrollY,left:e.left+window.scrollX,right:e.right+window.scrollX}}function Na(t){return{x:(t.left+t.right)/2,y:(t.top+t.bottom)/2}}function Np(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function Cr(t,e){return t.y<=e.bottom&&t.y>=e.top&&t.x>=e.left&&t.x<=e.right}function Zl(t){return Na(Ma(t))}function La(t,e){var n=Zl(t),i=Pa(e);return Cr(n,i)}function Fa(t,e){var n=Zl(t),i=Zl(e);return Np(n,i)}function Lp(t){var e=Ma(t);return e.right<0||e.left>document.documentElement.scrollWidth||e.bottom<0||e.top>document.documentElement.scrollHeight}function Fp(t){for(var e=t.getBoundingClientRect(),n={top:e.top,bottom:e.bottom,left:e.left,right:e.right},i=t.parentElement;i&&i!==document.body;){var l=i.getBoundingClientRect(),r=window.getComputedStyle(i).overflowY,o=window.getComputedStyle(i).overflowX,u=r==="scroll"||r==="auto",s=o==="scroll"||o==="auto";u&&(n.top=Math.max(n.top,l.top),n.bottom=Math.min(n.bottom,l.bottom)),s&&(n.left=Math.max(n.left,l.left),n.right=Math.min(n.right,l.right)),i=i.parentElement}return n.top=Math.max(n.top,0),n.bottom=Math.min(n.bottom,window.innerHeight),n.left=Math.max(n.left,0),n.right=Math.min(n.right,window.innerWidth),{top:n.top,bottom:n.bottom,left:n.left,right:n.right,width:Math.max(0,n.right-n.left),height:Math.max(0,n.bottom-n.top)}}var Nl;function Ro(){Nl=new Map}Ro();function Vp(t){var e=Array.from(t.children).findIndex(function(n){return n.getAttribute(Sr)});if(e>=0)return Nl.has(t)||Nl.set(t,new Map),Nl.get(t).set(e,Pa(t.children[e])),e}function Bp(t,e){if(!La(t,e))return null;var n=e.children;if(n.length===0)return{index:0,isProximityBased:!0};for(var i=Vp(e),l=0;l<n.length;l++)if(La(t,n[l])){var r=Nl.has(e)&&Nl.get(e).get(l);return r&&!Cr(Zl(t),r)?{index:i,isProximityBased:!1}:{index:l,isProximityBased:!1}}for(var o=Number.MAX_VALUE,u=void 0,s=0;s<n.length;s++){var a=Fa(t,n[s]);a<o&&(o=a,u=s)}if(n.length>0){var f=n.length,c=n[f-1],g=c.cloneNode(!1);g.style.visibility="hidden",g.style.pointerEvents="none",e.appendChild(g);var h=Fa(t,g);h<o&&(u=f),e.removeChild(g)}return{index:u,isProximityBased:!0}}function Jl(t){return JSON.stringify(t,null,2)}function Ar(t){if(!t)throw new Error("cannot get depth of a falsy node");return Va(t,0)}function Va(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return t.parentElement?Va(t.parentElement,e+1):e-1}function Up(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(var n in t)if(!{}.hasOwnProperty.call(e,n)||e[n]!==t[n])return!1;return!0}function Hp(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}var zp=200,Ba=10,Po;function jp(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:zp,i=arguments.length>3?arguments[3]:void 0,l,r,o=!1,u,s=Array.from(e).sort(function(f,c){return Ar(c)-Ar(f)});function a(){var f=Zl(t),c=i.multiScrollIfNeeded();if(!c&&u&&Math.abs(u.x-f.x)<Ba&&Math.abs(u.y-f.y)<Ba){Po=window.setTimeout(a,n);return}if(Lp(t)){Op(t);return}u=f;var g=!1,h=Xl(s),d;try{for(h.s();!(d=h.n()).done;){var _=d.value;c&&Ro();var b=Bp(t,_);if(b!==null){var w=b.index;g=!0,_!==l?(l&&Tp(l,t,_),Ap(_,b,t),l=_):w!==r&&(Dp(_,b,t),r=w);break}}}catch(E){h.e(E)}finally{h.f()}!g&&o&&l?(Ip(l,t),l=void 0,r=void 0,o=!1):o=!0,Po=window.setTimeout(a,n)}a()}function qp(){clearTimeout(Po),Ro()}var xl=30;function Wp(){var t;function e(){t={directionObj:void 0,stepPx:0}}e();function n(r){var o=t,u=o.directionObj,s=o.stepPx;u&&(r.scrollBy(u.x*s,u.y*s),window.requestAnimationFrame(function(){return n(r)}))}function i(r){return xl-r}function l(r,o){if(!o)return!1;var u=Gp(r,o),s=!!t.directionObj;if(u===null)return s&&e(),!1;var a=!1,f=!1;return o.scrollHeight>o.clientHeight&&(u.bottom<xl?(a=!0,t.directionObj={x:0,y:1},t.stepPx=i(u.bottom)):u.top<xl&&(a=!0,t.directionObj={x:0,y:-1},t.stepPx=i(u.top)),!s&&a)||o.scrollWidth>o.clientWidth&&(u.right<xl?(f=!0,t.directionObj={x:1,y:0},t.stepPx=i(u.right)):u.left<xl&&(f=!0,t.directionObj={x:-1,y:0},t.stepPx=i(u.left)),!s&&f)?(n(o),!0):(e(),!1)}return{scrollIfNeeded:l,resetScrolling:e}}function Gp(t,e){var n=e===document.scrollingElement?{top:0,bottom:window.innerHeight,left:0,right:window.innerWidth}:e.getBoundingClientRect();return Cr(t,n)?{top:t.y-n.top,bottom:n.bottom-t.y,left:t.x-n.left,right:n.right-t.x}:null}function Yp(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0,n=Xp(t),i=Array.from(n).sort(function(s,a){return Ar(a)-Ar(s)}),l=Wp(),r=l.scrollIfNeeded,o=l.resetScrolling;function u(){var s=e();if(!s||!i)return!1;for(var a=i.filter(function(g){return Cr(s,g.getBoundingClientRect())||g===document.scrollingElement}),f=0;f<a.length;f++){var c=r(s,a[f]);if(c)return!0}return!1}return{multiScrollIfNeeded:n.size>0?u:function(){return!1},destroy:function(){return o()}}}function Kp(t){if(!t)return[];for(var e=[],n=t;n;){var i=window.getComputedStyle(n),l=i.overflow;l.split(" ").some(function(r){return r.includes("auto")||r.includes("scroll")})&&e.push(n),n=n.parentElement}return e}function Xp(t){var e=new Set,n=Xl(t),i;try{for(n.s();!(i=n.n()).done;){var l=i.value;Kp(l).forEach(function(r){return e.add(r)})}}catch(r){n.e(r)}finally{n.f()}return(document.scrollingElement.scrollHeight>document.scrollingElement.clientHeight||document.scrollingElement.scrollWidth>document.scrollingElement.clientHeight)&&e.add(document.scrollingElement),e}function Qp(t){var e=t.cloneNode(!0),n=[],i=t.tagName==="SELECT",l=i?[t]:qn(t.querySelectorAll("select")),r=Xl(l),o;try{for(r.s();!(o=r.n()).done;){var u=o.value;n.push(u.value)}}catch(k){r.e(k)}finally{r.f()}if(l.length>0)for(var s=i?[e]:qn(e.querySelectorAll("select")),a=0;a<s.length;a++){var f=s[a],c=n[a],g=f.querySelector('option[value="'.concat(c,'"'));g&&g.setAttribute("selected",!0)}var h=t.tagName==="CANVAS",d=h?[t]:qn(t.querySelectorAll("canvas"));if(d.length>0)for(var _=h?[e]:qn(e.querySelectorAll("canvas")),b=0;b<_.length;b++){var w=d[b],E=_[b];E.width=w.width,E.height=w.height,w.width>0&&w.height>0&&E.getContext("2d").drawImage(w,0,0)}return e}var $l=Object.freeze({USE_COMPUTED_STYLE_INSTEAD_OF_BOUNDING_RECT:"USE_COMPUTED_STYLE_INSTEAD_OF_BOUNDING_RECT"}),Zp=Pl({},$l.USE_COMPUTED_STYLE_INSTEAD_OF_BOUNDING_RECT,!1);function Ua(t){if(!$l[t])throw new Error("Can't get non existing feature flag ".concat(t,"! Supported flags: ").concat(Object.keys($l)));return Zp[t]}var Jp=.2;function tl(t){return"".concat(t," ").concat(Jp,"s ease")}function xp(t,e){var n=t.getBoundingClientRect(),i=Qp(t);Ha(t,i),i.id=Mp,i.style.position="fixed";var l=n.top,r=n.left;if(i.style.top="".concat(l,"px"),i.style.left="".concat(r,"px"),e){var o=Na(n);l-=o.y-e.y,r-=o.x-e.x,window.setTimeout(function(){i.style.top="".concat(l,"px"),i.style.left="".concat(r,"px")},0)}return i.style.margin="0",i.style.boxSizing="border-box",i.style.height="".concat(n.height,"px"),i.style.width="".concat(n.width,"px"),i.style.transition="".concat(tl("top"),", ").concat(tl("left"),", ").concat(tl("background-color"),", ").concat(tl("opacity"),", ").concat(tl("color")," "),window.setTimeout(function(){return i.style.transition+=", ".concat(tl("width"),", ").concat(tl("height"))},0),i.style.zIndex="9999",i.style.cursor="grabbing",i}function $p(t){t.style.cursor="grab"}function e0(t,e,n,i){Ha(e,t);var l=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=l.width-r.width,u=l.height-r.height;if(o||u){var s={left:(n-r.left)/r.width,top:(i-r.top)/r.height};Ua($l.USE_COMPUTED_STYLE_INSTEAD_OF_BOUNDING_RECT)||(t.style.height="".concat(l.height,"px"),t.style.width="".concat(l.width,"px")),t.style.left="".concat(parseFloat(t.style.left)-s.left*o,"px"),t.style.top="".concat(parseFloat(t.style.top)-s.top*u,"px")}}function Ha(t,e){var n=window.getComputedStyle(t);Array.from(n).filter(function(i){return i.startsWith("background")||i.startsWith("padding")||i.startsWith("font")||i.startsWith("text")||i.startsWith("align")||i.startsWith("justify")||i.startsWith("display")||i.startsWith("flex")||i.startsWith("border")||i==="opacity"||i==="color"||i==="list-style-type"||Ua($l.USE_COMPUTED_STYLE_INSTEAD_OF_BOUNDING_RECT)&&(i==="width"||i==="height")}).forEach(function(i){return e.style.setProperty(i,n.getPropertyValue(i),n.getPropertyPriority(i))})}function t0(t,e){t.draggable=!1,t.ondragstart=function(){return!1},e?(t.style.userSelect="",t.style.WebkitUserSelect="",t.style.cursor=""):(t.style.userSelect="none",t.style.WebkitUserSelect="none",t.style.cursor="grab")}function za(t){t.style.display="none",t.style.position="fixed",t.style.zIndex="-5"}function n0(t){t.style.visibility="hidden",t.setAttribute(Sr,"true")}function i0(t){t.style.visibility="",t.removeAttribute(Sr)}function Tr(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){return[]};t.forEach(function(i){var l=e(i);Object.keys(l).forEach(function(r){i.style[r]=l[r]}),n(i).forEach(function(r){return i.classList.add(r)})})}function Ir(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){return[]};t.forEach(function(i){var l=e(i);Object.keys(l).forEach(function(r){i.style[r]=""}),n(i).forEach(function(r){return i.classList.contains(r)&&i.classList.remove(r)})})}function l0(t){var e=t.style.minHeight;t.style.minHeight=window.getComputedStyle(t).getPropertyValue("height");var n=t.style.minWidth;return t.style.minWidth=window.getComputedStyle(t).getPropertyValue("width"),function(){t.style.minHeight=e,t.style.minWidth=n}}var r0="--any--",o0=100,s0=20,Dr=3,u0=80,ja={outline:"rgba(255, 255, 102, 0.7) solid 2px"},qa="data-is-dnd-original-dragged-item",Sn,an,Cn,Or,Lt,Rr,Ri,fn,li,mn,Pi=!1,Mo=!1,No,er=!1,Pr=[],tr,ri,nr=!1,Jn=new Map,Yt=new Map,Lo=new WeakMap;function a0(t,e){Jn.has(e)||Jn.set(e,new Set),Jn.get(e).has(t)||(Jn.get(e).add(t),Oa())}function Wa(t,e){Jn.get(e).delete(t),Ra(),Jn.get(e).size===0&&Jn.delete(e)}function f0(){var t=Jn.get(Or),e=Xl(t),n;try{for(e.s();!(n=e.n()).done;){var i=n.value;i.addEventListener(kr,Ga),i.addEventListener(Ql,Ya),i.addEventListener(yr,Ka)}}catch(o){e.e(o)}finally{e.f()}window.addEventListener(To,Ll);var l=Math.max.apply(Math,qn(Array.from(t.keys()).map(function(o){return Yt.get(o).dropAnimationDurationMs}))),r=l===0?s0:Math.max(l,o0);tr=Yp(t,function(){return mn}),jp(an,t,r*1.07,tr)}function c0(){var t=Jn.get(Or),e=Xl(t),n;try{for(e.s();!(n=e.n()).done;){var i=n.value;i.removeEventListener(kr,Ga),i.removeEventListener(Ql,Ya),i.removeEventListener(yr,Ka)}}catch(l){e.e(l)}finally{e.f()}window.removeEventListener(To,Ll),tr&&(tr.destroy(),tr=void 0),qp()}function Mr(t){return t.findIndex(function(e){return!!e[vr]})}function d0(t){var e;return wr(wr({},t),{},(e={},Pl(e,vr,!0),Pl(e,un,Pp),e))}function Ga(t){var e=Yt.get(t.currentTarget),n=e.items,i=e.dropFromOthersDisabled;if(!(i&&t.currentTarget!==Lt)){if(er=!1,n=n.filter(function(u){return u[un]!==Ri[un]}),Lt!==t.currentTarget){var l=Yt.get(Lt).items,r=l.filter(function(u){return!u[vr]});Oi(Lt,r,{trigger:bn.DRAGGED_ENTERED_ANOTHER,id:Cn[un],source:vn.POINTER})}var o=t.detail.indexObj.index;fn=t.currentTarget,n.splice(o,0,Ri),Oi(t.currentTarget,n,{trigger:bn.DRAGGED_ENTERED,id:Cn[un],source:vn.POINTER})}}function Ya(t){if(Pi){var e=Yt.get(t.currentTarget),n=e.items,i=e.dropFromOthersDisabled;if(!(i&&t.currentTarget!==Lt&&t.currentTarget!==fn)){var l=qn(n),r=Mr(l);r!==-1&&l.splice(r,1);var o=fn;fn=void 0;var u=t.detail,s=u.type,a=u.theOtherDz;if(s===Er.OUTSIDE_OF_ANY||s===Er.LEFT_FOR_ANOTHER&&a!==Lt&&Yt.get(a).dropFromOthersDisabled){er=!0,fn=Lt;var f=o===Lt?l:qn(Yt.get(Lt).items);f.splice(Rr,0,Ri),Oi(Lt,f,{trigger:bn.DRAGGED_LEFT_ALL,id:Cn[un],source:vn.POINTER})}Oi(t.currentTarget,l,{trigger:bn.DRAGGED_LEFT,id:Cn[un],source:vn.POINTER})}}}function Ka(t){var e=Yt.get(t.currentTarget),n=e.items,i=e.dropFromOthersDisabled;if(!(i&&t.currentTarget!==Lt)){var l=qn(n);er=!1;var r=t.detail.indexObj.index,o=Mr(l);o!==-1&&l.splice(o,1),l.splice(r,0,Ri),Oi(t.currentTarget,l,{trigger:bn.DRAGGED_OVER_INDEX,id:Cn[un],source:vn.POINTER})}}function Nr(t){t.preventDefault();var e=t.touches?t.touches[0]:t;mn={x:e.clientX,y:e.clientY},an.style.transform="translate3d(".concat(mn.x-li.x,"px, ").concat(mn.y-li.y,"px, 0)")}function Ll(){Mo=!0,window.removeEventListener("mousemove",Nr),window.removeEventListener("touchmove",Nr),window.removeEventListener("mouseup",Ll),window.removeEventListener("touchend",Ll),c0(),$p(an),fn||(fn=Lt);var t=Yt.get(fn),e=t.items,n=t.type;Ir(Jn.get(n),function(r){return Yt.get(r).dropTargetStyle},function(r){return Yt.get(r).dropTargetClasses});var i=Mr(e);i===-1&&fn===Lt&&(i=Rr),e=e.map(function(r){return r[vr]?Cn:r});function l(){No(),Ml(fn,e,{trigger:er?bn.DROPPED_OUTSIDE_OF_ANY:bn.DROPPED_INTO_ZONE,id:Cn[un],source:vn.POINTER}),fn!==Lt&&Ml(Lt,Yt.get(Lt).items,{trigger:bn.DROPPED_INTO_ANOTHER,id:Cn[un],source:vn.POINTER});var r=Array.from(fn.children).find(function(o){return o.getAttribute(Sr)});r&&i0(r),m0()}Yt.get(fn).dropAnimationDisabled?l():h0(i,l)}function h0(t,e){var n=t>-1?Oo(fn.children[t],!1):Oo(fn,!1),i={x:n.left-parseFloat(an.style.left),y:n.top-parseFloat(an.style.top)},l=Yt.get(fn),r=l.dropAnimationDurationMs,o="transform ".concat(r,"ms ease");an.style.transition=an.style.transition?an.style.transition+","+o:o,an.style.transform="translate3d(".concat(i.x,"px, ").concat(i.y,"px, 0)"),window.setTimeout(e,r)}function g0(t,e){Pr.push({dz:t,destroy:e}),window.requestAnimationFrame(function(){za(t),document.body.appendChild(t)})}function m0(){an&&an.remove&&an.remove(),Sn&&Sn.remove&&Sn.remove(),an=void 0,Sn=void 0,Cn=void 0,Or=void 0,Lt=void 0,Rr=void 0,Ri=void 0,fn=void 0,li=void 0,mn=void 0,Pi=!1,Mo=!1,No=void 0,er=!1,ri&&clearTimeout(ri),ri=void 0,nr=!1,Pr.length&&(Pr.forEach(function(t){var e=t.dz,n=t.destroy;n(),e.remove()}),Pr=[])}function _0(t,e){var n=!1,i={items:void 0,type:void 0,flipDurationMs:0,dragDisabled:!1,morphDisabled:!1,dropFromOthersDisabled:!1,dropTargetStyle:ja,dropTargetClasses:[],transformDraggedElement:function(){},centreDraggedOnCursor:!1,dropAnimationDisabled:!1,delayTouchStartMs:0},l=new Map;function r(){window.addEventListener("mousemove",s,{passive:!1}),window.addEventListener("touchmove",s,{passive:!1,capture:!1}),window.addEventListener("mouseup",u,{passive:!1}),window.addEventListener("touchend",u,{passive:!1})}function o(){window.removeEventListener("mousemove",s),window.removeEventListener("touchmove",s),window.removeEventListener("mouseup",u),window.removeEventListener("touchend",u),ri&&(clearTimeout(ri),ri=void 0,nr=!1)}function u(g){if(o(),Sn=void 0,li=void 0,mn=void 0,g.type==="touchend"){var h=new Event("click",{bubbles:!0,cancelable:!0});g.target.dispatchEvent(h)}}function s(g){var h=!!g.touches,d=h?g.touches[0]:g;if(h&&i.delayTouchStartMs>0&&!nr){mn={x:d.clientX,y:d.clientY},(Math.abs(mn.x-li.x)>=Dr||Math.abs(mn.y-li.y)>=Dr)&&(ri&&(clearTimeout(ri),ri=void 0),u(g));return}g.preventDefault(),mn={x:d.clientX,y:d.clientY},(Math.abs(mn.x-li.x)>=Dr||Math.abs(mn.y-li.y)>=Dr)&&(o(),f())}function a(g){if(!(g.target!==g.currentTarget&&(g.target.value!==void 0||g.target.isContentEditable))&&!g.button&&!Pi){var h=!!g.touches,d=h&&i.delayTouchStartMs>0;d||g.preventDefault(),g.stopPropagation();var _=h?g.touches[0]:g;li={x:_.clientX,y:_.clientY},mn=wr({},li),Sn=g.currentTarget,d&&(nr=!1,ri=window.setTimeout(function(){Sn&&(nr=!0,o(),f())},i.delayTouchStartMs)),r()}}function f(){Pi=!0;var g=l.get(Sn);Rr=g,Lt=Sn.parentElement;var h=Lt.closest("dialog")||Lt.closest("[popover]")||Lt.getRootNode(),d=h.body||h,_=i.items,b=i.type,w=i.centreDraggedOnCursor,E=qn(_);Cn=E[g],Or=b,Ri=d0(Cn),an=xp(Sn,w&&mn),d.appendChild(an);function k(){Sn.parentElement?window.requestAnimationFrame(k):(Sn.setAttribute(qa,!0),d.appendChild(Sn),f0(),za(Sn),Ri[un]=Cn[un],an.focus())}window.requestAnimationFrame(k),Tr(Array.from(Jn.get(i.type)).filter(function(I){return I===Lt||!Yt.get(I).dropFromOthersDisabled}),function(I){return Yt.get(I).dropTargetStyle},function(I){return Yt.get(I).dropTargetClasses}),E.splice(g,1,Ri),No=l0(Lt),Oi(Lt,E,{trigger:bn.DRAG_STARTED,id:Cn[un],source:vn.POINTER}),window.addEventListener("mousemove",Nr,{passive:!1}),window.addEventListener("touchmove",Nr,{passive:!1,capture:!1}),window.addEventListener("mouseup",Ll,{passive:!1}),window.addEventListener("touchend",Ll,{passive:!1})}function c(g){var h=g.items,d=h===void 0?void 0:h,_=g.flipDurationMs,b=_===void 0?0:_,w=g.type,E=w===void 0?r0:w,k=g.dragDisabled,I=k===void 0?!1:k,O=g.morphDisabled,D=O===void 0?!1:O,N=g.dropFromOthersDisabled,M=N===void 0?!1:N,V=g.dropTargetStyle,W=V===void 0?ja:V,ne=g.dropTargetClasses,H=ne===void 0?[]:ne,$=g.transformDraggedElement,Y=$===void 0?function(){}:$,G=g.centreDraggedOnCursor,oe=G===void 0?!1:G,ie=g.dropAnimationDisabled,J=ie===void 0?!1:ie,q=g.delayTouchStart,j=q===void 0?!1:q;i.dropAnimationDurationMs=b;var K=0;j===!0?K=u0:typeof j=="number"&&isFinite(j)&&j>=0&&(K=j),i.delayTouchStartMs=K,i.type&&E!==i.type&&Wa(t,i.type),i.type=E,i.items=qn(d),i.dragDisabled=I,i.morphDisabled=D,i.transformDraggedElement=Y,i.centreDraggedOnCursor=oe,i.dropAnimationDisabled=J,n&&Pi&&!Mo&&(!Up(W,i.dropTargetStyle)||!Hp(H,i.dropTargetClasses))&&(Ir([t],function(){return i.dropTargetStyle},function(){return H}),Tr([t],function(){return W},function(){return H})),i.dropTargetStyle=W,i.dropTargetClasses=qn(H);function x(z,me){return Yt.get(z)?Yt.get(z)[me]:i[me]}n&&Pi&&i.dropFromOthersDisabled!==M&&(M?Ir([t],function(z){return x(z,"dropTargetStyle")},function(z){return x(z,"dropTargetClasses")}):Tr([t],function(z){return x(z,"dropTargetStyle")},function(z){return x(z,"dropTargetClasses")})),i.dropFromOthersDisabled=M,Yt.set(t,i),a0(t,E);for(var X=Pi?Mr(i.items):-1,F=0;F<t.children.length;F++){var R=t.children[F];if(t0(R,I),F===X){D||e0(an,R,mn.x,mn.y),i.transformDraggedElement(an,Cn,F),n0(R);continue}R.removeEventListener("mousedown",Lo.get(R)),R.removeEventListener("touchstart",Lo.get(R)),I||(R.addEventListener("mousedown",a),R.addEventListener("touchstart",a),Lo.set(R,a)),l.set(R,F),n||(n=!0)}}return c(e),{update:function(h){c(h)},destroy:function(){function h(){Wa(t,Yt.get(t).type),Yt.delete(t)}Pi&&!t.closest("[".concat(qa,"]"))?g0(t,h):h()}}}var Lr,Fo={DND_ZONE_ACTIVE:"dnd-zone-active",DND_ZONE_DRAG_DISABLED:"dnd-zone-drag-disabled"},Xa=(Lr={},Pl(Lr,Fo.DND_ZONE_ACTIVE,"Tab to one the items and press space-bar or enter to start dragging it"),Pl(Lr,Fo.DND_ZONE_DRAG_DISABLED,"This is a disabled drag and drop list"),Lr),p0="dnd-action-aria-alert",Jt;function Vo(){Jt||(Jt=document.createElement("div"),function(){Jt.id=p0,Jt.style.position="fixed",Jt.style.bottom="0",Jt.style.left="0",Jt.style.zIndex="-5",Jt.style.opacity="0",Jt.style.height="0",Jt.style.width="0",Jt.setAttribute("role","alert")}(),document.body.prepend(Jt),Object.entries(Xa).forEach(function(t){var e=pp(t,2),n=e[0],i=e[1];return document.body.prepend(k0(n,i))}))}function b0(){return Do?null:(document.readyState==="complete"?Vo():window.addEventListener("DOMContentLoaded",Vo),wr({},Fo))}function w0(){Do||!Jt||(Object.keys(Xa).forEach(function(t){var e;return(e=document.getElementById(t))===null||e===void 0?void 0:e.remove()}),Jt.remove(),Jt=void 0)}function k0(t,e){var n=document.createElement("div");return n.id=t,n.innerHTML="<p>".concat(e,"</p>"),n.style.display="none",n.style.position="fixed",n.style.zIndex="-5",n}function Fl(t){if(!Do){Jt||Vo(),Jt.innerHTML="";var e=document.createTextNode(t);Jt.appendChild(e),Jt.style.display="none",Jt.style.display="inline"}}var y0="--any--",Qa={outline:"rgba(255, 255, 102, 0.7) solid 2px"},Wn=!1,Bo,_n,nl="",il,oi,Mi="",Fr=new WeakSet,Za=new WeakMap,Ja=new WeakMap,Uo=new Map,cn=new Map,xn=new Map,Vr;function E0(t,e){xn.size===0&&(Vr=b0(),window.addEventListener("keydown",$a),window.addEventListener("click",ef)),xn.has(e)||xn.set(e,new Set),xn.get(e).has(t)||(xn.get(e).add(t),Oa())}function xa(t,e){_n===t&&ir(),xn.get(e).delete(t),Ra(),xn.get(e).size===0&&xn.delete(e),xn.size===0&&(window.removeEventListener("keydown",$a),window.removeEventListener("click",ef),Vr=void 0,w0())}function $a(t){if(Wn)switch(t.key){case"Escape":{ir();break}}}function ef(){Wn&&(Fr.has(document.activeElement)||ir())}function v0(t){if(Wn){var e=t.currentTarget;if(e!==_n){nl=e.getAttribute("aria-label")||"";var n=cn.get(_n),i=n.items,l=i.find(function(c){return c[un]===oi}),r=i.indexOf(l),o=i.splice(r,1)[0],u=cn.get(e),s=u.items,a=u.autoAriaDisabled;e.getBoundingClientRect().top<_n.getBoundingClientRect().top||e.getBoundingClientRect().left<_n.getBoundingClientRect().left?(s.push(o),a||Fl("Moved item ".concat(Mi," to the end of the list ").concat(nl))):(s.unshift(o),a||Fl("Moved item ".concat(Mi," to the beginning of the list ").concat(nl)));var f=_n;Ml(f,i,{trigger:bn.DROPPED_INTO_ANOTHER,id:oi,source:vn.KEYBOARD}),Ml(e,s,{trigger:bn.DROPPED_INTO_ZONE,id:oi,source:vn.KEYBOARD}),_n=e}}}function tf(){Uo.forEach(function(t,e){var n=t.update;return n(cn.get(e))})}function ir(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;cn.get(_n).autoAriaDisabled||Fl("Stopped dragging item ".concat(Mi)),Fr.has(document.activeElement)&&document.activeElement.blur(),t&&Oi(_n,cn.get(_n).items,{trigger:bn.DRAG_STOPPED,id:oi,source:vn.KEYBOARD}),Ir(xn.get(Bo),function(e){return cn.get(e).dropTargetStyle},function(e){return cn.get(e).dropTargetClasses}),il=null,oi=null,Mi="",Bo=null,_n=null,nl="",Wn=!1,tf()}function S0(t,e){var n={items:void 0,type:void 0,dragDisabled:!1,zoneTabIndex:0,zoneItemTabIndex:0,dropFromOthersDisabled:!1,dropTargetStyle:Qa,dropTargetClasses:[],autoAriaDisabled:!1};function i(f,c,g){f.length<=1||f.splice(g,1,f.splice(c,1,f[g])[0])}function l(f){switch(f.key){case"Enter":case" ":{if((f.target.disabled!==void 0||f.target.href||f.target.isContentEditable)&&!Fr.has(f.target))return;f.preventDefault(),f.stopPropagation(),Wn?ir():r(f);break}case"ArrowDown":case"ArrowRight":{if(!Wn)return;f.preventDefault(),f.stopPropagation();var c=cn.get(t),g=c.items,h=Array.from(t.children),d=h.indexOf(f.currentTarget);d<h.length-1&&(n.autoAriaDisabled||Fl("Moved item ".concat(Mi," to position ").concat(d+2," in the list ").concat(nl)),i(g,d,d+1),Ml(t,g,{trigger:bn.DROPPED_INTO_ZONE,id:oi,source:vn.KEYBOARD}));break}case"ArrowUp":case"ArrowLeft":{if(!Wn)return;f.preventDefault(),f.stopPropagation();var _=cn.get(t),b=_.items,w=Array.from(t.children),E=w.indexOf(f.currentTarget);E>0&&(n.autoAriaDisabled||Fl("Moved item ".concat(Mi," to position ").concat(E," in the list ").concat(nl)),i(b,E,E-1),Ml(t,b,{trigger:bn.DROPPED_INTO_ZONE,id:oi,source:vn.KEYBOARD}));break}}}function r(f){u(f.currentTarget),_n=t,Bo=n.type,Wn=!0;var c=Array.from(xn.get(n.type)).filter(function(h){return h===_n||!cn.get(h).dropFromOthersDisabled});if(Tr(c,function(h){return cn.get(h).dropTargetStyle},function(h){return cn.get(h).dropTargetClasses}),!n.autoAriaDisabled){var g="Started dragging item ".concat(Mi,". Use the arrow keys to move it within its list ").concat(nl);c.length>1&&(g+=", or tab to another list in order to move the item into it"),Fl(g)}Oi(t,cn.get(t).items,{trigger:bn.DRAG_STARTED,id:oi,source:vn.KEYBOARD}),tf()}function o(f){Wn&&f.currentTarget!==il&&(f.stopPropagation(),ir(!1),r(f))}function u(f){var c=cn.get(t),g=c.items,h=Array.from(t.children),d=h.indexOf(f);il=f,il.tabIndex=n.zoneItemTabIndex,oi=g[d][un],Mi=h[d].getAttribute("aria-label")||""}function s(f){var c=f.items,g=c===void 0?[]:c,h=f.type,d=h===void 0?y0:h,_=f.dragDisabled,b=_===void 0?!1:_,w=f.zoneTabIndex,E=w===void 0?0:w,k=f.zoneItemTabIndex,I=k===void 0?0:k,O=f.dropFromOthersDisabled,D=O===void 0?!1:O,N=f.dropTargetStyle,M=N===void 0?Qa:N,V=f.dropTargetClasses,W=V===void 0?[]:V,ne=f.autoAriaDisabled,H=ne===void 0?!1:ne;n.items=qn(g),n.dragDisabled=b,n.dropFromOthersDisabled=D,n.zoneTabIndex=E,n.zoneItemTabIndex=I,n.dropTargetStyle=M,n.dropTargetClasses=W,n.autoAriaDisabled=H,n.type&&d!==n.type&&xa(t,n.type),n.type=d,E0(t,d),H||(t.setAttribute("aria-disabled",b),t.setAttribute("role","list"),t.setAttribute("aria-describedby",b?Vr.DND_ZONE_DRAG_DISABLED:Vr.DND_ZONE_ACTIVE)),cn.set(t,n),Wn?t.tabIndex=t===_n||il.contains(t)||n.dropFromOthersDisabled||_n&&n.type!==cn.get(_n).type?-1:0:t.tabIndex=n.zoneTabIndex,t.addEventListener("focus",v0);for(var $=function(oe){var ie=t.children[oe];Fr.add(ie),ie.tabIndex=Wn?-1:n.zoneItemTabIndex,H||ie.setAttribute("role","listitem"),ie.removeEventListener("keydown",Za.get(ie)),ie.removeEventListener("click",Ja.get(ie)),b||(ie.addEventListener("keydown",l),Za.set(ie,l),ie.addEventListener("click",o),Ja.set(ie,o)),Wn&&n.items[oe][un]===oi&&(il=ie,il.tabIndex=n.zoneItemTabIndex,ie.focus())},Y=0;Y<t.children.length;Y++)$(Y)}s(e);var a={update:function(c){s(c)},destroy:function(){xa(t,n.type),cn.delete(t),Uo.delete(t)}};return Uo.set(t,a),a}var C0=["items","flipDurationMs","type","dragDisabled","morphDisabled","dropFromOthersDisabled","zoneTabIndex","zoneItemTabIndex","dropTargetStyle","dropTargetClasses","transformDraggedElement","autoAriaDisabled","centreDraggedOnCursor","delayTouchStart","dropAnimationDisabled"];function A0(t,e){if(T0(t))return{update:function(){},destroy:function(){}};nf(e);var n=_0(t,e),i=S0(t,e);return{update:function(r){nf(r),n.update(r),i.update(r)},destroy:function(){n.destroy(),i.destroy()}}}function T0(t){return!!t.closest("[".concat(Rp,'="true"]'))}function nf(t){var e=t.items;t.flipDurationMs,t.type,t.dragDisabled,t.morphDisabled,t.dropFromOthersDisabled;var n=t.zoneTabIndex,i=t.zoneItemTabIndex;t.dropTargetStyle;var l=t.dropTargetClasses;t.transformDraggedElement,t.autoAriaDisabled,t.centreDraggedOnCursor;var r=t.delayTouchStart;t.dropAnimationDisabled;var o=_p(t,C0);if(Object.keys(o).length>0&&console.warn("dndzone will ignore unknown options",o),!e)throw new Error("no 'items' key provided to dndzone");var u=e.find(function(f){return!{}.hasOwnProperty.call(f,un)});if(u)throw new Error("missing '".concat(un,"' property for item ").concat(Jl(u)));if(l&&!Array.isArray(l))throw new Error("dropTargetClasses should be an array but instead it is a ".concat(Rl(l),", ").concat(Jl(l)));if(n&&!lf(n))throw new Error("zoneTabIndex should be a number but instead it is a ".concat(Rl(n),", ").concat(Jl(n)));if(i&&!lf(i))throw new Error("zoneItemTabIndex should be a number but instead it is a ".concat(Rl(i),", ").concat(Jl(i)));if(r!==void 0&&r!==!1){var s=r===!0,a=typeof r=="number"&&isFinite(r)&&r>=0;if(!s&&!a)throw new Error("delayTouchStart should be a boolean (true/false) or a non-negative number but instead it is a ".concat(Rl(r),", ").concat(Jl(r)))}}function lf(t){return!isNaN(t)&&function(e){return(e|0)===e}(parseFloat(t))}var rf={exports:{}},Br=1;function I0(){return Br=(Br*9301+49297)%233280,Br/233280}function D0(t){Br=t}var O0={nextValue:I0,seed:D0},Ho=O0,ll="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-",Ni,of,lr;function zo(){lr=!1}function sf(t){if(!t){Ni!==ll&&(Ni=ll,zo());return}if(t!==Ni){if(t.length!==ll.length)throw new Error("Custom alphabet for shortid must be "+ll.length+" unique characters. You submitted "+t.length+" characters: "+t);var e=t.split("").filter(function(n,i,l){return i!==l.lastIndexOf(n)});if(e.length)throw new Error("Custom alphabet for shortid must be "+ll.length+" unique characters. These characters were not unique: "+e.join(", "));Ni=t,zo()}}function R0(t){return sf(t),Ni}function P0(t){Ho.seed(t),of!==t&&(zo(),of=t)}function M0(){Ni||sf(ll);for(var t=Ni.split(""),e=[],n=Ho.nextValue(),i;t.length>0;)n=Ho.nextValue(),i=Math.floor(n*t.length),e.push(t.splice(i,1)[0]);return e.join("")}function uf(){return lr||(lr=M0(),lr)}function N0(t){var e=uf();return e[t]}function L0(){return Ni||ll}var jo={get:L0,characters:R0,seed:P0,lookup:N0,shuffled:uf},qo=typeof window=="object"&&(window.crypto||window.msCrypto),Wo;!qo||!qo.getRandomValues?Wo=function(t){for(var e=[],n=0;n<t;n++)e.push(Math.floor(Math.random()*256));return e}:Wo=function(t){return qo.getRandomValues(new Uint8Array(t))};var F0=Wo;let V0="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",af=t=>crypto.getRandomValues(new Uint8Array(t)),ff=(t,e,n)=>{let i=(2<<Math.log(t.length-1)/Math.LN2)-1,l=-~(1.6*i*e/t.length);return(r=e)=>{let o="";for(;;){let u=n(l),s=l|0;for(;s--;)if(o+=t[u[s]&i]||"",o.length===r)return o}}};const B0=l_(Object.freeze(Object.defineProperty({__proto__:null,customAlphabet:(t,e=21)=>ff(t,e,af),customRandom:ff,nanoid:(t=21)=>crypto.getRandomValues(new Uint8Array(t)).reduce((e,n)=>(n&=63,n<36?e+=n.toString(36):n<62?e+=(n-26).toString(36).toUpperCase():n>62?e+="-":e+="_",e),""),random:af,urlAlphabet:V0},Symbol.toStringTag,{value:"Module"})));var U0=jo,H0=F0,z0=B0.customRandom;function j0(t){for(var e=0,n,i="";!n;)i=i+z0(U0.get(),1,H0)(),n=t<Math.pow(16,e+1),e++;return i}var q0=j0,Ur=q0,W0=1567752802062,G0=7,Hr,cf;function Y0(t){var e="",n=Math.floor((Date.now()-W0)*.001);return n===cf?Hr++:(Hr=0,cf=n),e=e+Ur(G0),e=e+Ur(t),Hr>0&&(e=e+Ur(Hr)),e=e+Ur(n),e}var K0=Y0,X0=jo;function Q0(t){if(!t||typeof t!="string"||t.length<6)return!1;var e=new RegExp("[^"+X0.get().replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&")+"]");return!e.test(t)}var Z0=Q0;(function(t){var e=jo,n=K0,i=Z0,l=0;function r(a){return e.seed(a),t.exports}function o(a){return l=a,t.exports}function u(a){return a!==void 0&&e.characters(a),e.shuffled()}function s(){return n(l)}t.exports=s,t.exports.generate=s,t.exports.seed=r,t.exports.worker=o,t.exports.characters=u,t.exports.isValid=i})(rf);var J0=rf.exports,df=J0;function hf(t,e,n){const i=t.slice();return i[37]=e[n],i[38]=e,i[39]=n,i}function gf(t){let e,n,i,l,r,o;return{c(){e=v("div"),n=vl("svg"),i=vl("path"),m(i,"d","M8.5 7C9.32843 7 10 6.32843 10 5.5C10 4.67157 9.32843 4 8.5 4C7.67157 4 7 4.67157 7 5.5C7 6.32843 7.67157 7 8.5 7ZM8.5 13.5C9.32843 13.5 10 12.8284 10 12C10 11.1716 9.32843 10.5 8.5 10.5C7.67157 10.5 7 11.1716 7 12C7 12.8284 7.67157 13.5 8.5 13.5ZM10 18.5C10 19.3284 9.32843 20 8.5 20C7.67157 20 7 19.3284 7 18.5C7 17.6716 7.67157 17 8.5 17C9.32843 17 10 17.6716 10 18.5ZM15.5 7C16.3284 7 17 6.32843 17 5.5C17 4.67157 16.3284 4 15.5 4C14.6716 4 14 4.67157 14 5.5C14 6.32843 14.6716 7 15.5 7ZM17 12C17 12.8284 16.3284 13.5 15.5 13.5C14.6716 13.5 14 12.8284 14 12C14 11.1716 14.6716 10.5 15.5 10.5C16.3284 10.5 17 11.1716 17 12ZM15.5 20C16.3284 20 17 19.3284 17 18.5C17 17.6716 16.3284 17 15.5 17C14.6716 17 14 17.6716 14 18.5C14 19.3284 14.6716 20 15.5 20Z"),m(n,"xmlns","http://www.w3.org/2000/svg"),m(n,"viewBox","0 0 24 24"),m(n,"width","14"),m(n,"height","18"),m(n,"class","svelte-1l6xq7m"),m(e,"class","handle svelte-1l6xq7m"),m(e,"aria-label","drag-handle"),m(e,"style",l=t[1]?"cursor:grab":"cursor:grabbing"),p(e,"inEdit",t[12])},m(u,s){A(u,e,s),S(e,n),S(n,i),r||(o=[B(e,"mousedown",t[26]),B(e,"mouseup",t[27])],r=!0)},p(u,s){s[0]&2&&l!==(l=u[1]?"cursor:grab":"cursor:grabbing")&&m(e,"style",l),s[0]&4096&&p(e,"inEdit",u[12])},d(u){u&&C(e),r=!1,Ve(o)}}}function mf(t){let e,n,i;function l(){return t[28](t[37])}return{c(){e=v("i"),m(e,"class","ph ph-trash-simple svelte-1l6xq7m")},m(r,o){A(r,e,o),n||(i=B(e,"mousedown",Et(l)),n=!0)},p(r,o){t=r},d(r){r&&C(e),n=!1,i()}}}function _f(t,e){let n,i,l,r,o,u,s=(e[4][e[37].item]||e[37].item)+"",a,f,c=e[37],g,h,d=e[0]&&gf(e),_=!e[8]&&e[12]&&mf(e);function b(){return e[29](e[37])}const w=()=>e[30](n,c),E=()=>e[30](null,c);return{key:t,first:null,c(){n=v("li"),d&&d.c(),i=Q(),l=v("div"),r=v("i"),o=Q(),u=v("span"),a=Ee(s),f=Q(),_&&_.c(),m(r,"class","ri-checkbox-blank-fill svelte-1l6xq7m"),m(l,"class","right-content svelte-1l6xq7m"),p(l,"showColors",e[5]),P(l,"--option-color",e[3][e[37].item]),m(n,"class","svelte-1l6xq7m"),this.first=n},m(k,I){A(k,n,I),d&&d.m(n,null),S(n,i),S(n,l),S(l,r),S(l,o),S(l,u),S(u,a),S(n,f),_&&_.m(n,null),w(),g||(h=B(n,"click",b),g=!0)},p(k,I){e=k,e[0]?d?d.p(e,I):(d=gf(e),d.c(),d.m(n,i)):d&&(d.d(1),d=null),I[0]&2064&&s!==(s=(e[4][e[37].item]||e[37].item)+"")&&Pe(a,s),I[0]&32&&p(l,"showColors",e[5]),I[0]&2056&&P(l,"--option-color",e[3][e[37].item]),!e[8]&&e[12]?_?_.p(e,I):(_=mf(e),_.c(),_.m(n,null)):_&&(_.d(1),_=null),c!==e[37]&&(E(),c=e[37],w())},d(k){k&&C(n),d&&d.d(),_&&_.d(),E(),g=!1,h()}}}function x0(t){let e,n,i;return{c(){e=v("li"),n=v("div"),i=Ee(t[9]),m(n,"class","add-button placeholder svelte-1l6xq7m"),m(e,"class","buttons svelte-1l6xq7m")},m(l,r){A(l,e,r),S(e,n),S(n,i)},p(l,r){r[0]&512&&Pe(i,l[9])},d(l){l&&C(e)}}}function $0(t){let e,n,i=t[14]=="Closed"?t[10]?"All Selected":"Select":"Close",l,r,o,u,s=t[11].length&&pf(t);return{c(){e=v("li"),n=v("div"),l=Ee(i),r=Q(),s&&s.c(),m(n,"class","add-button svelte-1l6xq7m"),p(n,"disabled",t[10]),m(e,"class","buttons svelte-1l6xq7m"),p(e,"inEdit",t[12])},m(a,f){A(a,e,f),S(e,n),S(n,l),S(e,r),s&&s.m(e,null),o||(u=B(n,"click",Et(t[31])),o=!0)},p(a,f){f[0]&17408&&i!==(i=a[14]=="Closed"?a[10]?"All Selected":"Select":"Close")&&Pe(l,i),f[0]&1024&&p(n,"disabled",a[10]),a[11].length?s?s.p(a,f):(s=pf(a),s.c(),s.m(e,null)):s&&(s.d(1),s=null),f[0]&4096&&p(e,"inEdit",a[12])},d(a){a&&C(e),s&&s.d(),o=!1,u()}}}function pf(t){let e,n,i;return{c(){e=v("div"),e.textContent="Clear",m(e,"class","clear-button svelte-1l6xq7m")},m(l,r){A(l,e,r),n||(i=B(e,"click",Et(t[32])),n=!0)},p:ue,d(l){l&&C(e),n=!1,i()}}}function eb(t){let e,n=[],i=new Map,l,r,o,u,s=Ce(t[11]);const a=h=>h[37].id;for(let h=0;h<s.length;h+=1){let d=hf(t,s,h),_=a(d);i.set(_,n[h]=_f(_,d))}function f(h,d){if(h[12]&&!h[8])return $0;if(h[2].length<1)return x0}let c=f(t),g=c&&c(t);return{c(){e=v("ul");for(let h=0;h<n.length;h+=1)n[h].c();l=Q(),g&&g.c(),m(e,"class","list-wrap svelte-1l6xq7m"),p(e,"inEdit",t[12])},m(h,d){A(h,e,d);for(let _=0;_<n.length;_+=1)n[_]&&n[_].m(e,null);S(e,l),g&&g.m(e,null),o||(u=[tn(r=A0.call(null,e,{items:t[11],dropTargetStyle:{outline:"none"},dragDisabled:!t[6]||t[1],type:t[15],dropFromOthersDisabled:!0})),B(e,"finalize",t[19]),B(e,"consider",t[18])],o=!0)},p(h,d){d[0]&1128763&&(s=Ce(h[11]),n=Tt(n,d,a,1,h,s,i,e,nn,_f,l,hf)),c===(c=f(h))&&g?g.p(h,d):(g&&g.d(1),g=c&&c(h),g&&(g.c(),g.m(e,null))),r&&Ge(r.update)&&d[0]&2114&&r.update.call(null,{items:h[11],dropTargetStyle:{outline:"none"},dragDisabled:!h[6]||h[1],type:h[15],dropFromOthersDisabled:!0}),d[0]&4096&&p(e,"inEdit",h[12])},i:ue,o:ue,d(h){h&&C(e);for(let d=0;d<n.length;d+=1)n[d].d();g&&g.d(),o=!1,Ve(u)}}}function tb(t,e,n){let i,l,r=ue,o=()=>(r(),r=ft(b,F=>n(14,l=F)),b);t.$$.on_destroy.push(()=>r());let{items:u=[]}=e,{itemsColors:s=[]}=e,{itemsLabels:a=[]}=e,{showColors:f}=e,{showHandle:c=!0}=e,{listItemKey:g}=e;const h="primaryDisplay";let{draggable:d=!0}=e,{focus:_}=e,{editorState:b}=e;o();const w=void 0;let{reorderOnly:E}=e,{placeholder:k}=e,{fullSelection:I}=e,{readonly:O}=e,D=df.generate(),N=ii({selected:null,actions:{select:F=>{N.update(R=>({...R,selected:F}))}}});const M=le.createEventDispatcher();let V={},W=[],{inactive:ne=!0}=e;const H=F=>F.map(R=>({id:g?R[g]:df.generate(),color:s[R],item:R,type:D})).filter(R=>R.id),$=F=>{n(11,W=F.detail.items)},Y=()=>W.reduce((F,R)=>(F.push(R.item),F),[]),G=F=>{n(1,ne=!0),$(F),M("change",Y())},oe=F=>{let R=W.findIndex(z=>z.id==F);R>-1&&(W.splice(R,1),M("change",Y()))},ie=()=>{n(1,ne=!1)},J=()=>{n(1,ne=!0)},q=F=>oe(F.id),j=F=>{qt(N).actions.select(F.id)};function K(F,R){Be[F?"unshift":"push"](()=>{V[R.id]=F,n(13,V)})}const x=()=>M("togglePicker"),X=()=>M("clear");return t.$$set=F=>{"items"in F&&n(2,u=F.items),"itemsColors"in F&&n(3,s=F.itemsColors),"itemsLabels"in F&&n(4,a=F.itemsLabels),"showColors"in F&&n(5,f=F.showColors),"showHandle"in F&&n(0,c=F.showHandle),"listItemKey"in F&&n(21,g=F.listItemKey),"draggable"in F&&n(6,d=F.draggable),"focus"in F&&n(23,_=F.focus),"editorState"in F&&o(n(7,b=F.editorState)),"reorderOnly"in F&&n(8,E=F.reorderOnly),"placeholder"in F&&n(9,k=F.placeholder),"fullSelection"in F&&n(10,I=F.fullSelection),"readonly"in F&&n(25,O=F.readonly),"inactive"in F&&n(1,ne=F.inactive)},t.$$.update=()=>{t.$$.dirty[0]&8388608&&_&&N&&qt(N).actions.select(_),t.$$.dirty[0]&33554432&&n(12,i=!O),t.$$.dirty[0]&4160&&n(0,c=d&&i),t.$$.dirty[0]&4&&n(11,W=H(u)),t.$$.dirty[0]&2048&&(W==null?void 0:W.length)<1},[c,ne,u,s,a,f,d,b,E,k,I,W,i,V,l,D,N,M,$,G,oe,g,h,_,w,O,ie,J,q,j,K,x,X]}class bf extends Ze{constructor(e){super(),Qe(this,e,tb,eb,Ye,{items:2,itemsColors:3,itemsLabels:4,showColors:5,showHandle:0,listItemKey:21,listItemText:22,draggable:6,focus:23,editorState:7,cellState:24,reorderOnly:8,placeholder:9,fullSelection:10,readonly:25,inactive:1},null,[-1,-1])}get listItemText(){return this.$$.ctx[22]}get cellState(){return this.$$.ctx[24]}}function nb(t){let e,n,i,l,r;const o=t[2].default,u=Ut(o,t,t[1],null);return{c(){e=v("div"),u&&u.c(),e.hidden=!0},m(s,a){A(s,e,a),u&&u.m(e,null),i=!0,l||(r=tn(n=ib.call(null,e,t[0])),l=!0)},p(s,[a]){u&&u.p&&(!i||a&2)&&zt(u,o,s,s[1],i?Ht(o,s[1],a,null):jt(s[1]),null),n&&Ge(n.update)&&a&1&&n.update.call(null,s[0])},i(s){i||(U(u,s),i=!0)},o(s){Z(u,s),i=!1},d(s){s&&C(e),u&&u.d(s),l=!1,r()}}}function ib(t,e="body"){let n;async function i(r){if(e=r,typeof e=="string"){if(n=document.querySelector(e),n===null&&(await le.tick(),n=document.querySelector(e)),n===null)throw new Error(`No element found matching css selector: "${e}"`)}else if(e instanceof HTMLElement)n=e;else throw new TypeError(`Unknown portal target type: ${e===null?"null":typeof e}. Allowed types: string (CSS selector) or HTMLElement.`);n.appendChild(t),t.hidden=!1}function l(){t.parentNode&&t.parentNode.removeChild(t)}return i(e),{update:i,destroy:l}}function lb(t,e,n){let{$$slots:i={},$$scope:l}=e,{target:r="body"}=e;return t.$$set=o=>{"target"in o&&n(0,r=o.target),"$$scope"in o&&n(1,l=o.$$scope)},[r,l,i]}class rb extends Ze{constructor(e){super(),Qe(this,e,lb,nb,Ye,{target:0})}}function wf(t,e){let n,i=e;const l=()=>{r(i)},r=u=>{const{anchor:s,align:a,maxHeight:f,maxWidth:c,minWidth:g=0,useAnchorWidth:h,offset:d=5,customUpdate:_,offsetBelow:b}=u;if(!s)return;const w=s.getBoundingClientRect(),E=t.getBoundingClientRect();let k={maxHeight:null,minWidth:null,maxWidth:c,left:null,top:null};typeof _=="function"?k=_(w,E,k):(a==="right-outside"||a==="left-outside"?k.top=w.top:window.innerHeight-w.bottom<(f||50)?(k.top=w.top-E.height-d,k.maxHeight=f||240):(k.top=w.bottom+(b||d),k.maxHeight=f||window.innerHeight-w.bottom-20),!c&&h&&(k.maxWidth=w.width),h?k.minWidth=Math.max(g,w.width):g&&(k.minWidth=g),a==="right"?k.left=w.left+w.width-E.width:a==="right-outside"?k.left=w.right+d:a==="left-outside"?k.left=w.left-E.width-d:k.left=w.left),Object.entries(k).forEach(([I,O])=>{O!=null?t.style[I]=`${O.toFixed(0)}px`:t.style[I]=null})},o=u=>{i=u,n&&n.disconnect();const{anchor:s}=u;s&&(n=new ResizeObserver(()=>r(u)),n.observe(s),n.observe(t),n.observe(document.body))};return t.style.position="absolute",t.style.zIndex="9999",document.addEventListener("scroll",l,!0),o(e),{update:o,destroy(){n&&n.disconnect(),document.removeEventListener("scroll",l,!0)}}}const ob=[".flatpickr-calendar",".spectrum-Popover",".download-js-link"];let rr=[];const kf=t=>{if(!t.target.closest('[data-ignore-click-outside="true"]')){for(let e of ob)if(t.target.closest(e))return;rr.forEach(e=>{var l;if(e.element.contains(t.target))return;const n=e.anchor.closest(".spectrum-Underlay")!=null;t.target.closest(".spectrum-Underlay")!=null&&!n||(l=e.callback)==null||l.call(e,t)})}};document.documentElement.addEventListener("click",kf,!0),document.documentElement.addEventListener("contextmenu",kf,!0);const sb=(t,e,n,i)=>{let l=rr.find(r=>r.id===t);l?l.callback=i:rr.push({id:t,element:e,anchor:n,callback:i})},ub=t=>{rr=rr.filter(e=>e.id!==t)},yf=(t,e)=>{const n=Math.random(),i=l=>{const r=(l==null?void 0:l.callback)||l,o=(l==null?void 0:l.anchor)||t;sb(n,t,o,r)};return i(e),{update:i,destroy:()=>ub(n)}};function Ef(t){const e=t-1;return e*e*e+1}function vf(t){return--t*t*t*t*t+1}function zr(t,{delay:e=0,duration:n=400,easing:i=Ef,x:l=0,y:r=0,opacity:o=0}={}){const u=getComputedStyle(t),s=+u.opacity,a=u.transform==="none"?"":u.transform,f=s*(1-o),[c,g]=Is(l),[h,d]=Is(r);return{delay:e,duration:n,easing:i,css:(_,b)=>`
|
|
8
|
-
transform: ${a} translate(${(1-_)*c}${g}, ${(1-_)*h}${d});
|
|
9
|
-
opacity: ${s-f*b}`}}function Sf(t,{delay:e=0,duration:n=400,easing:i=Ef,axis:l="y"}={}){const r=getComputedStyle(t),o=+r.opacity,u=l==="y"?"height":"width",s=parseFloat(r[u]),a=l==="y"?["top","bottom"]:["left","right"],f=a.map(w=>`${w[0].toUpperCase()}${w.slice(1)}`),c=parseFloat(r[`padding${f[0]}`]),g=parseFloat(r[`padding${f[1]}`]),h=parseFloat(r[`margin${f[0]}`]),d=parseFloat(r[`margin${f[1]}`]),_=parseFloat(r[`border${f[0]}Width`]),b=parseFloat(r[`border${f[1]}Width`]);return{delay:e,duration:n,easing:i,css:w=>`overflow: hidden;opacity: ${Math.min(w*20,1)*o};${u}: ${w*s}px;padding-${a[0]}: ${w*c}px;padding-${a[1]}: ${w*g}px;margin-${a[0]}: ${w*h}px;margin-${a[1]}: ${w*d}px;border-${a[0]}-width: ${w*_}px;border-${a[1]}-width: ${w*b}px;`}}function Cf(t){let e,n;return e=new rb({props:{target:t[17],$$slots:{default:[ab]},$$scope:{ctx:t}}}),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l&131072&&(r.target=i[17]),l&537001983&&(r.$$scope={dirty:l,ctx:i}),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function ab(t){let e,n,i,l,r,o,u,s;const a=t[27].default,f=Ut(a,t,t[29],null);return{c(){e=v("div"),f&&f.c(),m(e,"tabindex","0"),m(e,"class",n=bt("spectrum-Popover is-open "+t[16])+" svelte-af3l1o"),m(e,"role","presentation"),P(e,"height",t[11]),P(e,"--customZindex",t[13]),p(e,"customZindex",t[13]),p(e,"hide-popover",t[0]&&!t[15])},m(c,g){A(c,e,g),f&&f.m(e,null),t[28](e),o=!0,u||(s=[tn(i=wf.call(null,e,{anchor:t[2],align:t[3],maxHeight:t[6],maxWidth:t[5],minWidth:t[4],useAnchorWidth:t[7],offset:t[9],offsetBelow:t[10],customUpdate:t[14]})),tn(l=yf.call(null,e,{callback:t[8]?t[18]:Af,anchor:t[2]})),B(e,"keydown",t[19])],u=!0)},p(c,g){t=c,f&&f.p&&(!o||g&536870912)&&zt(f,a,t,t[29],o?Ht(a,t[29],g,null):jt(t[29]),null),(!o||g&65536&&n!==(n=bt("spectrum-Popover is-open "+t[16])+" svelte-af3l1o"))&&m(e,"class",n),(!o||g&2048)&&P(e,"height",t[11]),(!o||g&8192)&&P(e,"--customZindex",t[13]),i&&Ge(i.update)&&g&18172&&i.update.call(null,{anchor:t[2],align:t[3],maxHeight:t[6],maxWidth:t[5],minWidth:t[4],useAnchorWidth:t[7],offset:t[9],offsetBelow:t[10],customUpdate:t[14]}),l&&Ge(l.update)&&g&260&&l.update.call(null,{callback:t[8]?t[18]:Af,anchor:t[2]}),(!o||g&73728)&&p(e,"customZindex",t[13]),(!o||g&98305)&&p(e,"hide-popover",t[0]&&!t[15])},i(c){o||(U(f,c),c&&ni(()=>{o&&(r||(r=Il(e,zr,{y:-20,duration:t[12]?200:0},!0)),r.run(1))}),o=!0)},o(c){Z(f,c),c&&(r||(r=Il(e,zr,{y:-20,duration:t[12]?200:0},!1)),r.run(0)),o=!1},d(c){c&&C(e),f&&f.d(c),t[28](null),c&&r&&r.end(),u=!1,Ve(s)}}}function fb(t){let e,n,i=t[0]&&Cf(t);return{c(){i&&i.c(),e=Fe()},m(l,r){i&&i.m(l,r),A(l,e,r),n=!0},p(l,[r]){l[0]?i?(i.p(l,r),r&1&&U(i,1)):(i=Cf(l),i.c(),U(i,1),i.m(e.parentNode,e)):i&&(He(),Z(i,1,1,()=>{i=null}),ze())},i(l){n||(U(i),n=!0)},o(l){Z(i),n=!1},d(l){l&&C(e),i&&i.d(l)}}}const Af=()=>{};function cb(t,e,n){let i,{$$slots:l={},$$scope:r}=e;const o=le.createEventDispatcher();let{anchor:u}=e,{align:s="right"}=e,{portalTarget:a}=e,{minWidth:f}=e,{maxWidth:c}=e,{maxHeight:g}=e,{open:h=!1}=e,{useAnchorWidth:d=!1}=e,{dismissible:_=!0}=e,{offset:b=5}=e,{offsetBelow:w}=e,{customHeight:E}=e,{animate:k=!0}=e,{customZindex:I}=e,{handlePositionUpdate:O}=e,{showPopover:D=!0}=e,{clickOutsideOverride:N=!1}=e,{ignoreAnchor:M=!0}=e,{popup:V}=e,{className:W}=e;const ne=()=>{o("open"),n(0,h=!0)},H=()=>{o("close"),n(0,h=!1)},$=()=>{h?H():ne()},Y=()=>viewport.matches(":focus-within"),G=J=>{if(!N&&h){let q=J.target,j=!1;for(;!j&&q&&q.parentNode;)j=q===u,q=q.parentNode;(!j||j&&!M)&&H()}};function oe(J){N&&h&&J.key==="Escape"&&H()}function ie(J){Be[J?"unshift":"push"](()=>{V=J,n(1,V)})}return t.$$set=J=>{"anchor"in J&&n(2,u=J.anchor),"align"in J&&n(3,s=J.align),"portalTarget"in J&&n(20,a=J.portalTarget),"minWidth"in J&&n(4,f=J.minWidth),"maxWidth"in J&&n(5,c=J.maxWidth),"maxHeight"in J&&n(6,g=J.maxHeight),"open"in J&&n(0,h=J.open),"useAnchorWidth"in J&&n(7,d=J.useAnchorWidth),"dismissible"in J&&n(8,_=J.dismissible),"offset"in J&&n(9,b=J.offset),"offsetBelow"in J&&n(10,w=J.offsetBelow),"customHeight"in J&&n(11,E=J.customHeight),"animate"in J&&n(12,k=J.animate),"customZindex"in J&&n(13,I=J.customZindex),"handlePositionUpdate"in J&&n(14,O=J.handlePositionUpdate),"showPopover"in J&&n(15,D=J.showPopover),"clickOutsideOverride"in J&&n(21,N=J.clickOutsideOverride),"ignoreAnchor"in J&&n(22,M=J.ignoreAnchor),"popup"in J&&n(1,V=J.popup),"className"in J&&n(16,W=J.className),"$$scope"in J&&n(29,r=J.$$scope)},t.$$.update=()=>{t.$$.dirty&1048576&&n(17,i=a||".spectrum")},[h,V,u,s,f,c,g,d,_,b,w,E,k,I,O,D,W,i,G,oe,a,N,M,ne,H,$,Y,l,ie,r]}class wn extends Ze{constructor(e){super(),Qe(this,e,cb,fb,Ye,{anchor:2,align:3,portalTarget:20,minWidth:4,maxWidth:5,maxHeight:6,open:0,useAnchorWidth:7,dismissible:8,offset:9,offsetBelow:10,customHeight:11,animate:12,customZindex:13,handlePositionUpdate:14,showPopover:15,clickOutsideOverride:21,ignoreAnchor:22,popup:1,className:16,show:23,hide:24,toggle:25,hasFocus:26})}get show(){return this.$$.ctx[23]}get hide(){return this.$$.ctx[24]}get toggle(){return this.$$.ctx[25]}get hasFocus(){return this.$$.ctx[26]}}function Ft(t,e={}){const n=new Set;let i;function l(f){if(!(f instanceof Function))throw new TypeError("callback is not a function");return n.add(f),f(t),()=>n.delete(f)}function r(f,c,g){const h={from:t,to:f,event:c,args:g};o("_exit",h),t=f,n.forEach(d=>d(t)),o("_enter",h)}function o(f,...c){var h,d;const g=((h=e[t])==null?void 0:h[f])??((d=e["*"])==null?void 0:d[f]);return g instanceof Function?g.apply(i,c):g}function u(f,...c){var h;const g=(h=o(f,...c))==null?void 0:h.valueOf();return["string","symbol"].includes(typeof g)&&g!==t&&r(g,f,c),t}const s={};async function a(f,c=100,...g){return clearTimeout(s[f]),c===null?t:(await new Promise(h=>s[f]=setTimeout(h,c)),delete s[f],u(f,...g))}return i=new Proxy({subscribe:l},{get(f,c){return Reflect.has(f,c)||(f[c]=u.bind(null,c),f[c].debounce=a.bind(null,c)),Reflect.get(f,c)}}),o("_enter",{from:null,to:t,event:null,args:[]}),i}const Gn={S:{cellPadding:"0.4rem",rowFontSize:12,rowHeight:32,headerFontSize:10,headerHeight:32,checkboxSize:12},M:{cellPadding:"0.5rem",rowFontSize:13,rowHeight:36,headerFontSize:11,headerHeight:38,checkboxSize:14},L:{cellPadding:"0.85rem",rowFontSize:15,rowHeight:42,headerFontSize:12,headerHeight:48,checkboxSize:14}},Tf={string:"fuzzy",longform:"fuzzy",formula:"fuzzy",array:"contains",options:"equal",datetime:"rangeLow",boolean:"equal",number:"equal",bigint:"equal",link:"fuzzy",bb_reference_single:"equal",bb_reference:"equal"},db={string:!0,longform:!0,array:!0,options:!0,datetime:!0,boolean:!0,number:!0,bigint:!0,link:!0,bb_reference_single:!1,bb_reference:!1},hb={string:!0,longform:!0,formula:!0,array:!0,options:!0,datetime:!0,boolean:!0,number:!0,bigint:!0},gb={string:!0,longform:!0,array:!0,link:!0,json:!0,bb_reference:!0,bb_reference_single:!0,options:!0,datetime:!0,boolean:!0,number:!0,bigint:!0,attachment:!0,attachment_single:!0};function If(t){let e,n,i,l;return{c(){e=v("div"),n=v("div"),m(n,"class","stb-scrollbar-indicator svelte-fhqbbj"),p(n,"dragging",t[12]),P(n,"top",t[19]),P(n,"height",t[18]),m(e,"class","stb-scrollbar svelte-fhqbbj"),p(e,"highlighted",t[1]),P(e,"--offset",t[22]),P(e,"--bottomOffset",t[21])},m(r,o){A(r,e,o),S(e,n),i||(l=B(n,"mousedown",Ii(t[34])),i=!0)},p(r,o){o[0]&4096&&p(n,"dragging",r[12]),o[0]&524288&&P(n,"top",r[19]),o[0]&262144&&P(n,"height",r[18]),o[0]&2&&p(e,"highlighted",r[1]),o[0]&4194304&&P(e,"--offset",r[22]),o[0]&2097152&&P(e,"--bottomOffset",r[21])},d(r){r&&C(e),i=!1,l()}}}function Df(t){let e,n,i,l,r;return{c(){e=v("div"),n=v("div"),m(n,"class","stb-scrollbar-indicator horizontal svelte-fhqbbj"),p(n,"dragging",t[13]),P(n,"left",t[16]),P(n,"width",t[15]),m(e,"class","stb-scrollbar horizontal svelte-fhqbbj"),ni(()=>t[36].call(e)),p(e,"highlighted",t[1]),P(e,"--horizontalOffset",t[2]),P(e,"--horizontalBottomOffset",t[20])},m(o,u){A(o,e,u),S(e,n),i=fo(e,t[36].bind(e)),l||(r=B(n,"mousedown",Ii(t[35])),l=!0)},p(o,u){u[0]&8192&&p(n,"dragging",o[13]),u[0]&65536&&P(n,"left",o[16]),u[0]&32768&&P(n,"width",o[15]),u[0]&2&&p(e,"highlighted",o[1]),u[0]&4&&P(e,"--horizontalOffset",o[2]),u[0]&1048576&&P(e,"--horizontalBottomOffset",o[20])},d(o){o&&C(e),i(),l=!1,r()}}}function mb(t){let e,n,i,l,r=t[10]&&If(t),o=t[11]&&Df(t);return{c(){r&&r.c(),e=Q(),o&&o.c(),n=Fe()},m(u,s){r&&r.m(u,s),A(u,e,s),o&&o.m(u,s),A(u,n,s),i||(l=[B(window,"mouseup",t[32]),B(window,"mousemove",function(){Ge(t[12]||t[13]?t[33]:Of)&&(t[12]||t[13]?t[33]:Of).apply(this,arguments)})],i=!0)},p(u,s){t=u,t[10]?r?r.p(t,s):(r=If(t),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null),t[11]?o?o.p(t,s):(o=Df(t),o.c(),o.m(n.parentNode,n)):o&&(o.d(1),o=null)},i:ue,o:ue,d(u){u&&(C(e),C(n)),r&&r.d(u),o&&o.d(u),i=!1,Ve(l)}}}const Of=()=>{};function _b(t,e,n){let i,l,r,o,u,s,a,f;const c=le.getContext("stbScrollPos");Me(t,c,F=>n(6,a=F));const g=le.getContext("stbHorizontalScrollPos");Me(t,g,F=>n(5,s=F));const h=le.getContext("stbSettings");Me(t,h,F=>n(31,f=F));let{highlighted:d}=e,{horizontalOffset:_="0px"}=e,{clientHeight:b}=e,{scrollHeight:w}=e,{scrollWidth:E}=e,{visible:k}=e,{horizontalVisible:I}=e,{anchor:O}=e;const D=le.createEventDispatcher();let N,M,V,W,ne,H=!1,$=!1,Y=0,G,oe,ie;const J=()=>{O&&(n(10,W=Math.max(w-b,0)),n(11,ne=(O==null?void 0:O.scrollWidth)-(O==null?void 0:O.clientWidth)),n(28,k=W),n(29,I=ne),n(27,E=O==null?void 0:O.scrollWidth),n(15,G=(O==null?void 0:O.clientWidth)/(O==null?void 0:O.scrollWidth)*100+"%"))};le.afterUpdate(()=>{J==null||J()});const q=()=>{n(12,H=!1),n(13,$=!1),n(14,Y=0),n(7,N=0),n(9,V=0)},j=F=>{H&&(F.preventDefault(),F.stopPropagation(),n(14,Y=(F.clientY-N)*(w/b)+M),Y>0&&Y<=W&&Re(c,a=Y,a),D("positionChange")),$&&(F.preventDefault(),F.stopPropagation(),n(14,Y=(F.clientX-V)*((O==null?void 0:O.scrollWidth)/(O==null?void 0:O.clientWidth))+M),Y>0&&Y<=ne&&Re(g,s=Y,s)),n(0,O.scrollLeft=s,O)},K=F=>{n(12,H=!0),n(7,N=F.clientY),n(8,M=a)},x=F=>{n(13,$=!0),n(9,V=F.clientX),n(8,M=s)};function X(){ie=this.clientWidth,n(17,ie)}return t.$$set=F=>{"highlighted"in F&&n(1,d=F.highlighted),"horizontalOffset"in F&&n(2,_=F.horizontalOffset),"clientHeight"in F&&n(3,b=F.clientHeight),"scrollHeight"in F&&n(4,w=F.scrollHeight),"scrollWidth"in F&&n(27,E=F.scrollWidth),"visible"in F&&n(28,k=F.visible),"horizontalVisible"in F&&n(29,I=F.horizontalVisible),"anchor"in F&&n(0,O=F.anchor)},t.$$.update=()=>{t.$$.dirty[1]&1&&n(22,i=f.appearance.headerHeight+8+"px"),t.$$.dirty[1]&1&&n(21,l=f.appearance.footerHeight+16+"px"),t.$$.dirty[1]&1&&n(20,r=f.appearance.footerHeight+8+"px"),t.$$.dirty[0]&80&&n(19,o=a/(w+32)*100+"%"),t.$$.dirty[0]&134217760&&n(16,oe=s/E*100+"%"),t.$$.dirty[0]&24&&n(18,u=b/w*100+"%")},[O,d,_,b,w,s,a,N,M,V,W,ne,H,$,Y,G,oe,ie,u,o,r,l,i,c,g,h,D,E,k,I,J,f,q,j,K,x,X]}class pb extends Ze{constructor(e){super(),Qe(this,e,_b,mb,Ye,{highlighted:1,horizontalOffset:2,clientHeight:3,scrollHeight:4,scrollWidth:27,visible:28,horizontalVisible:29,anchor:0,calculate:30},null,[-1,-1])}get calculate(){return this.$$.ctx[30]}}function Rf(t){let e,n,i,l;return{c(){e=v("div"),n=v("i"),i=Q(),l=Ee(t[3]),m(n,"class","ri-search-line"),m(e,"class","emptyTable"),P(e,"top",t[0]),P(e,"bottom",t[1])},m(r,o){A(r,e,o),S(e,n),S(e,i),S(e,l)},p(r,o){o&8&&Pe(l,r[3]),o&1&&P(e,"top",r[0]),o&2&&P(e,"bottom",r[1])},d(r){r&&C(e)}}}function bb(t){let e,n=t[2]&&Rf(t);return{c(){n&&n.c(),e=Fe()},m(i,l){n&&n.m(i,l),A(i,e,l)},p(i,[l]){i[2]?n?n.p(i,l):(n=Rf(i),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},i:ue,o:ue,d(i){i&&C(e),n&&n.d(i)}}}function wb(t,e,n){let{top:i}=e,{bottom:l}=e,{isEmpty:r}=e,{message:o="No Records Found"}=e;return t.$$set=u=>{"top"in u&&n(0,i=u.top),"bottom"in u&&n(1,l=u.bottom),"isEmpty"in u&&n(2,r=u.isEmpty),"message"in u&&n(3,o=u.message)},[i,l,r,o]}class kb extends Ze{constructor(e){super(),Qe(this,e,wb,bb,Ye,{top:0,bottom:1,isEmpty:2,message:3})}}function Pf(t){let e,n,i,l,r;function o(a,f){return a[5]=="Saving"?Eb:yb}let u=o(t),s=u(t);return{c(){e=v("div"),e.innerHTML="<span>+</span>",n=Q(),i=v("div"),s.c(),m(e,"class","overlay-button add-row-overlay"),p(e,"highlighted",t[2]),p(e,"footer",t[3]),p(e,"in-insert",t[6]),m(i,"class","overlay-button save-row-overlay"),p(i,"highlighted",t[2]),p(i,"footer",t[3]),p(i,"in-insert",t[6])},m(a,f){A(a,e,f),A(a,n,f),A(a,i,f),s.m(i,null),l||(r=[B(e,"click",t[7]),B(i,"click",function(){Ge(t[1].insertRow)&&t[1].insertRow.apply(this,arguments)})],l=!0)},p(a,f){t=a,f&4&&p(e,"highlighted",t[2]),f&8&&p(e,"footer",t[3]),f&64&&p(e,"in-insert",t[6]),u!==(u=o(t))&&(s.d(1),s=u(t),s&&(s.c(),s.m(i,null))),f&4&&p(i,"highlighted",t[2]),f&8&&p(i,"footer",t[3]),f&64&&p(i,"in-insert",t[6])},d(a){a&&(C(e),C(n),C(i)),s.d(),l=!1,Ve(r)}}}function yb(t){let e;return{c(){e=v("i"),e.innerHTML="",m(e,"class","ri-save-fill")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function Eb(t){let e;return{c(){e=v("i"),m(e,"class","ri-loader-2-line")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function Mf(t){let e,n,i;return{c(){e=v("div"),e.innerHTML='<i class="ri-filter-off-line"></i>',m(e,"class","overlay-button filter-row-overlay"),p(e,"highlighted",t[2]),p(e,"footer",t[3])},m(l,r){A(l,e,r),n||(i=B(e,"click",function(){Ge(t[0].clear())&&t[0].clear().apply(this,arguments)}),n=!0)},p(l,r){t=l,r&4&&p(e,"highlighted",t[2]),r&8&&p(e,"footer",t[3])},d(l){l&&C(e),n=!1,i()}}}function vb(t){var r;let e,n,i=(t[5]=="Idle"||t[6]||((r=t[4])==null?void 0:r.length))&&Pf(t),l=t[5]=="Filtered"&&Mf(t);return{c(){i&&i.c(),e=Q(),l&&l.c(),n=Fe()},m(o,u){i&&i.m(o,u),A(o,e,u),l&&l.m(o,u),A(o,n,u)},p(o,[u]){var s;o[5]=="Idle"||o[6]||(s=o[4])!=null&&s.length?i?i.p(o,u):(i=Pf(o),i.c(),i.m(e.parentNode,e)):i&&(i.d(1),i=null),o[5]=="Filtered"?l?l.p(o,u):(l=Mf(o),l.c(),l.m(n.parentNode,n)):l&&(l.d(1),l=null)},i:ue,o:ue,d(o){o&&(C(e),C(n)),i&&i.d(o),l&&l.d(o)}}}function Sb(t,e,n){let i,l,r=ue,o=()=>(r(),r=ft(u,h=>n(5,l=h)),u);t.$$.on_destroy.push(()=>r());let{stbState:u}=e;o();let{tableAPI:s}=e,{highlighted:a}=e,{footer:f}=e,{tableActions:c}=e;const g=()=>i?u.cancelAddRow():u.addRow();return t.$$set=h=>{"stbState"in h&&o(n(0,u=h.stbState)),"tableAPI"in h&&n(1,s=h.tableAPI),"highlighted"in h&&n(2,a=h.highlighted),"footer"in h&&n(3,f=h.footer),"tableActions"in h&&n(4,c=h.tableActions)},t.$$.update=()=>{t.$$.dirty&32&&n(6,i=l=="Inserting")},[u,s,a,f,c,l,i,g]}class Cb extends Ze{constructor(e){super(),Qe(this,e,Sb,vb,Ye,{stbState:0,tableAPI:1,highlighted:2,footer:3,tableActions:4})}}function Nf(t,e,n){const i=t.slice();return i[16]=e[n].text,i[17]=e[n].icon,i[18]=e[n].disabled,i[19]=e[n].type,i[20]=e[n].size,i[21]=e[n].onClick,i}function Lf(t){let e,n,i,l,r=t[10].length==1?t[10].length+" "+(t[8]||"Row")+" ":t[10].length+" "+(t[7]||"Rows")+" ",o,u,s,a,f;n=new el({props:{icon:"ri-close-line",quiet:!0,size:"S",type:"secondary",onClick:t[15]}});let c=Ce(t[5]),g=[];for(let d=0;d<c.length;d+=1)g[d]=Ff(Nf(t,c,d));const h=d=>Z(g[d],1,1,()=>{g[d]=null});return{c(){e=v("div"),We(n.$$.fragment),i=Q(),l=v("span"),o=Ee(r),u=Ee(" Selected"),s=Q();for(let d=0;d<g.length;d+=1)g[d].c();m(l,"class","text"),m(e,"class","selected-row-actions-overlay"),p(e,"highlighted",t[3]),p(e,"footer",t[4]),P(e,"bottom",t[9].appearance.footerHeight+20),P(e,"left",t[12])},m(d,_){A(d,e,_),je(n,e,null),S(e,i),S(e,l),S(l,o),S(l,u),S(e,s);for(let b=0;b<g.length;b+=1)g[b]&&g[b].m(e,null);f=!0},p(d,_){const b={};if(_&2048&&(b.onClick=d[15]),n.$set(b),(!f||_&1408)&&r!==(r=d[10].length==1?d[10].length+" "+(d[8]||"Row")+" ":d[10].length+" "+(d[7]||"Rows")+" ")&&Pe(o,r),_&36){c=Ce(d[5]);let w;for(w=0;w<c.length;w+=1){const E=Nf(d,c,w);g[w]?(g[w].p(E,_),U(g[w],1)):(g[w]=Ff(E),g[w].c(),U(g[w],1),g[w].m(e,null))}for(He(),w=c.length;w<g.length;w+=1)h(w);ze()}(!f||_&8)&&p(e,"highlighted",d[3]),(!f||_&16)&&p(e,"footer",d[4]),_&512&&P(e,"bottom",d[9].appearance.footerHeight+20),_&4096&&P(e,"left",d[12])},i(d){if(!f){U(n.$$.fragment,d);for(let _=0;_<c.length;_+=1)U(g[_]);d&&ni(()=>{f&&(a||(a=Il(e,Sf,{delay:25,duration:230,easing:vf,axis:"y"},!0)),a.run(1))}),f=!0}},o(d){Z(n.$$.fragment,d),g=g.filter(Boolean);for(let _=0;_<g.length;_+=1)Z(g[_]);d&&(a||(a=Il(e,Sf,{delay:25,duration:230,easing:vf,axis:"y"},!1)),a.run(0)),f=!1},d(d){d&&C(e),qe(n),St(g,d),d&&a&&a.end()}}}function Ff(t){let e,n;return e=new el({props:{text:t[16],icon:t[17],quiet:!0,type:t[19],disabled:t[18],size:t[20],onClick:t[2].executeSelectedRowsAction(t[21])}}),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l&32&&(r.text=i[16]),l&32&&(r.icon=i[17]),l&32&&(r.type=i[19]),l&32&&(r.disabled=i[18]),l&32&&(r.size=i[20]),l&36&&(r.onClick=i[2].executeSelectedRowsAction(i[21])),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function Ab(t){let e,n,i=t[10].length&&t[13]!="Inserting"&&!t[11]&&Lf(t);return{c(){i&&i.c(),e=Fe()},m(l,r){i&&i.m(l,r),A(l,e,r),n=!0},p(l,[r]){l[10].length&&l[13]!="Inserting"&&!l[11]?i?(i.p(l,r),r&11264&&U(i,1)):(i=Lf(l),i.c(),U(i,1),i.m(e.parentNode,e)):i&&(He(),Z(i,1,1,()=>{i=null}),ze())},i(l){n||(U(i),n=!0)},o(l){Z(i),n=!1},d(l){l&&C(e),i&&i.d(l)}}}function Tb(t,e,n){let i,l,r,o=ue,u=()=>(o(),o=ft(_,V=>n(9,r=V)),_),s,a=ue,f=()=>(a(),a=ft(I,V=>n(10,s=V)),I),c,g=ue,h=()=>(g(),g=ft(d,V=>n(13,c=V)),d);t.$$.on_destroy.push(()=>o()),t.$$.on_destroy.push(()=>a()),t.$$.on_destroy.push(()=>g());let{stbState:d}=e;h();let{stbSettings:_}=e;u();let{tableAPI:b}=e,{highlighted:w}=e,{footer:E}=e,{selectedActions:k}=e,{stbSelected:I}=e;f();let{entityPlural:O="Rows"}=e,{entitySingular:D="Row"}=e,N;const M=()=>n(11,N=!0);return t.$$set=V=>{"stbState"in V&&h(n(0,d=V.stbState)),"stbSettings"in V&&u(n(1,_=V.stbSettings)),"tableAPI"in V&&n(2,b=V.tableAPI),"highlighted"in V&&n(3,w=V.highlighted),"footer"in V&&n(4,E=V.footer),"selectedActions"in V&&n(5,k=V.selectedActions),"stbSelected"in V&&f(n(6,I=V.stbSelected)),"entityPlural"in V&&n(7,O=V.entityPlural),"entitySingular"in V&&n(8,D=V.entitySingular)},t.$$.update=()=>{t.$$.dirty&1024&&s.length==0&&n(11,N=!1),t.$$.dirty&512&&n(14,i=!r.appearance.hideSelectionColumn),t.$$.dirty&16896&&n(12,l=1+(i+r.features.canDelete+r.appearance.numberingColumn)*2+"rem")},[d,_,b,w,E,k,I,O,D,r,s,N,l,c,i,M]}class Ib extends Ze{constructor(e){super(),Qe(this,e,Tb,Ab,Ye,{stbState:0,stbSettings:1,tableAPI:2,highlighted:3,footer:4,selectedActions:5,stbSelected:6,entityPlural:7,entitySingular:8})}}function Db(t){let e;return{c(){e=v("div"),e.innerHTML='<i class="ri-refresh-line"></i>',m(e,"class","overlay-button loader-overlay")},m(n,i){A(n,e,i)},p:ue,i:ue,o:ue,d(n){n&&C(e)}}}class Ob extends Ze{constructor(e){super(),Qe(this,e,null,Db,Ye,{})}}function Vf(t,e,n){const i=t.slice();return i[28]=e[n],i}function Rb(t){let e,n,i=(t[1].displayName??t[1].name)+"",l,r,o;return{c(){var u;e=v("div"),n=v("div"),l=Ee(i),m(n,"class","innerText svelte-tfp4ht"),p(n,"sortable",t[1].canSort),m(e,"class","headerLabel"),P(e,"justify-content",(u=t[1])==null?void 0:u.headerAlign)},m(u,s){A(u,e,s),S(e,n),S(n,l),r||(o=B(e,"click",t[12].headerClicked),r=!0)},p(u,s){var a;s[0]&2&&i!==(i=(u[1].displayName??u[1].name)+"")&&Pe(l,i),s[0]&2&&p(n,"sortable",u[1].canSort),s[0]&2&&P(e,"justify-content",(a=u[1])==null?void 0:a.headerAlign)},i:ue,o:ue,d(u){u&&C(e),r=!1,o()}}}function Pb(t){let e,n,i,l,r=t[1].canFilter=="advanced"&&Bf(t);var o=t[1].headerComponent;function u(s,a){return{props:{cellOptions:{...s[9],placeholder:s[6],disabled:s[6]=="empty"||s[6]=="notEmpty"},value:s[5],fieldSchema:s[1].schema,multi:s[6]=="containsAny"||s[6]=="oneOf"}}}return o&&(n=Sl(o,u(t)),n.$on("change",t[13]),n.$on("cancel",t[12].cancel),n.$on("focusout",t[15])),{c(){r&&r.c(),e=Q(),n&&We(n.$$.fragment),i=Fe()},m(s,a){r&&r.m(s,a),A(s,e,a),n&&je(n,s,a),A(s,i,a),l=!0},p(s,a){if(s[1].canFilter=="advanced"?r?r.p(s,a):(r=Bf(s),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null),a[0]&2&&o!==(o=s[1].headerComponent)){if(n){He();const f=n;Z(f.$$.fragment,1,0,()=>{qe(f,1)}),ze()}o?(n=Sl(o,u(s)),n.$on("change",s[13]),n.$on("cancel",s[12].cancel),n.$on("focusout",s[15]),We(n.$$.fragment),U(n.$$.fragment,1),je(n,i.parentNode,i)):n=null}else if(o){const f={};a[0]&576&&(f.cellOptions={...s[9],placeholder:s[6],disabled:s[6]=="empty"||s[6]=="notEmpty"}),a[0]&32&&(f.value=s[5]),a[0]&2&&(f.fieldSchema=s[1].schema),a[0]&64&&(f.multi=s[6]=="containsAny"||s[6]=="oneOf"),n.$set(f)}},i(s){l||(n&&U(n.$$.fragment,s),l=!0)},o(s){n&&Z(n.$$.fragment,s),l=!1},d(s){s&&(C(e),C(i)),r&&r.d(s),n&&qe(n,s)}}}function Bf(t){let e,n,i;return{c(){e=v("i"),m(e,"class","ri-filter-3-line svelte-tfp4ht"),m(e,"tabindex","0"),P(e,"align-self","center"),P(e,"font-size","14px")},m(l,r){A(l,e,r),n||(i=B(e,"click",Et(t[18])),n=!0)},p:ue,d(l){l&&C(e),n=!1,i()}}}function Uf(t){let e,n,i,l=(t[7]||t[0])&&Hf(t);return{c(){e=v("span"),l&&l.c(),m(e,"class","placeholder svelte-tfp4ht")},m(r,o){A(r,e,o),l&&l.m(e,null),n||(i=B(e,"click",t[12].sort),n=!0)},p(r,o){r[7]||r[0]?l?l.p(r,o):(l=Hf(r),l.c(),l.m(e,null)):l&&(l.d(1),l=null)},d(r){r&&C(e),l&&l.d(),n=!1,i()}}}function Hf(t){let e,n;return{c(){e=v("i"),m(e,"class",n=bt(t[0]=="ascending"?"ri-sort-asc":"ri-sort-desc")+" svelte-tfp4ht"),p(e,"sorted",t[0])},m(i,l){A(i,e,l)},p(i,l){l[0]&1&&n!==(n=bt(i[0]=="ascending"?"ri-sort-asc":"ri-sort-desc")+" svelte-tfp4ht")&&m(e,"class",n),l[0]&1&&p(e,"sorted",i[0])},d(i){i&&C(e)}}}function zf(t){let e,n;return e=new wn({props:{anchor:t[3],open:t[4],align:"left",minWidth:160,$$slots:{default:[Mb]},$$scope:{ctx:t}}}),e.$on("close",t[23]),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l[0]&8&&(r.anchor=i[3]),l[0]&16&&(r.open=i[4]),l[0]&66|l[1]&1&&(r.$$scope={dirty:l,ctx:i}),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function jf(t){let e,n,i=t[28].label+"",l,r,o,u;function s(){return t[22](t[28])}return{c(){e=v("li"),n=v("span"),l=Ee(i),r=Q(),m(n,"class","spectrum-Menu-itemLabel"),m(e,"class","spectrum-Menu-item svelte-tfp4ht"),m(e,"role","menuitem"),p(e,"selected",t[28].value==t[6])},m(a,f){A(a,e,f),S(e,n),S(n,l),S(e,r),o||(u=B(e,"mousedown",Et(s)),o=!0)},p(a,f){t=a,f[0]&2&&i!==(i=t[28].label+"")&&Pe(l,i),f[0]&66&&p(e,"selected",t[28].value==t[6])},d(a){a&&C(e),o=!1,u()}}}function Mb(t){let e,n=Ce(t[1].filteringOperators),i=[];for(let l=0;l<n.length;l+=1)i[l]=jf(Vf(t,n,l));return{c(){e=v("ul");for(let l=0;l<i.length;l+=1)i[l].c();m(e,"class","spectrum-Menu"),m(e,"role","menu"),P(e,"background-color","var(--spectrum-global-color-gray-75 )")},m(l,r){A(l,e,r);for(let o=0;o<i.length;o+=1)i[o]&&i[o].m(e,null)},p(l,r){if(r[0]&16450){n=Ce(l[1].filteringOperators);let o;for(o=0;o<n.length;o+=1){const u=Vf(l,n,o);i[o]?i[o].p(u,r):(i[o]=jf(u),i[o].c(),i[o].m(e,null))}for(;o<i.length;o+=1)i[o].d(1);i.length=n.length}},d(l){l&&C(e),St(i,l)}}}function Nb(t){let e,n,i,l,r,o,u,s,a;const f=[Pb,Rb],c=[];function g(_,b){return _[2]=="Entering"||_[2]=="Filtered"?0:1}n=g(t),i=c[n]=f[n](t);let h=t[1].canSort&&t[2]=="Idle"&&Uf(t),d=t[1].canFilter=="advanced"&&t[2]!="Idle"&&zf(t);return{c(){e=v("div"),i.c(),l=Q(),h&&h.c(),r=Q(),d&&d.c(),o=Fe(),m(e,"class","super-column-header svelte-tfp4ht"),p(e,"isEntering",t[8]),p(e,"filtered",t[2]=="Filtered"),p(e,"idle",t[2]!="Entering"&&t[2]!="Filtered"),P(e,"padding-left",t[9].padding),P(e,"padding-right",t[9].padding)},m(_,b){A(_,e,b),c[n].m(e,null),S(e,l),h&&h.m(e,null),t[19](e),A(_,r,b),d&&d.m(_,b),A(_,o,b),u=!0,s||(a=[B(e,"mouseenter",t[20]),B(e,"mouseleave",t[21])],s=!0)},p(_,b){let w=n;n=g(_),n===w?c[n].p(_,b):(He(),Z(c[w],1,1,()=>{c[w]=null}),ze(),i=c[n],i?i.p(_,b):(i=c[n]=f[n](_),i.c()),U(i,1),i.m(e,l)),_[1].canSort&&_[2]=="Idle"?h?h.p(_,b):(h=Uf(_),h.c(),h.m(e,null)):h&&(h.d(1),h=null),(!u||b[0]&256)&&p(e,"isEntering",_[8]),(!u||b[0]&4)&&p(e,"filtered",_[2]=="Filtered"),(!u||b[0]&4)&&p(e,"idle",_[2]!="Entering"&&_[2]!="Filtered"),b[0]&512&&P(e,"padding-left",_[9].padding),b[0]&512&&P(e,"padding-right",_[9].padding),_[1].canFilter=="advanced"&&_[2]!="Idle"?d?(d.p(_,b),b[0]&6&&U(d,1)):(d=zf(_),d.c(),U(d,1),d.m(o.parentNode,o)):d&&(He(),Z(d,1,1,()=>{d=null}),ze())},i(_){u||(U(i),U(d),u=!0)},o(_){Z(i),Z(d),u=!1},d(_){_&&(C(e),C(r),C(o)),c[n].d(),h&&h.d(),t[19](null),d&&d.d(_),s=!1,Ve(a)}}}function Lb(t,e,n){let i,l,r,o,u;const s=le.getContext("stColumnOptions");Me(t,s,G=>n(1,r=G));const a=le.getContext("stHeaderCellOptions");Me(t,a,G=>n(9,u=G));const f=le.getContext("stColumnState");Me(t,f,G=>n(2,o=G));const{API:c}=le.getContext("sdk");let{sorted:g}=e,h,d=!1,_,b=r.defaultFilteringOperator,w,E,k;const I=G=>{G.detail!=null&&G.detail!=null&&G.detail!=""?(n(5,_=G.detail),r.schema.type=="boolean"&&_===!1?f.filter(O("notEqual",!0)):Array.isArray(G.detail)&&G.detail.length==0?f.clear():f.filter(O(b,_))):(n(4,d=!1),n(5,_=null),f.clear())},O=(G,oe)=>{let ie;return G=="oneOf"&&!Array.isArray(oe)?ie=oe.split(","):G!="oneOf"&&G!="containsAny"&&Array.isArray(oe)?(ie=oe[0],n(5,_=ie)):ie=oe,{field:E,operator:G,value:ie,type:i?"string":r.schema.type,valueType:"Value"}},D=G=>{n(6,b=G),(_||G=="empty"||G=="notEmpty")&&f.filter(O(b,_??"")),n(4,d=!1)},N=G=>{h.matches(":focus-within")||f.cancel()},M=async G=>{G&&n(16,w=await c.fetchTableDefinition(G))},V=()=>n(4,d=!d);function W(G){Be[G?"unshift":"push"](()=>{h=G,n(3,h)})}const ne=()=>n(7,k=!0),H=()=>n(7,k=!1),$=G=>D(G.value),Y=()=>{n(4,d=!1),N()};return t.$$set=G=>{"sorted"in G&&n(0,g=G.sorted)},t.$$.update=()=>{t.$$.dirty[0]&2&&n(17,i=r.schema.type=="link"),t.$$.dirty[0]&196610&&i&&!w&&r.canFilter&&M(r.schema.tableId),t.$$.dirty[0]&196610&&(i&&w?E="1:"+r.name+"."+(w==null?void 0:w.primaryDisplay):E=r.name),t.$$.dirty[0]&4&&n(8,l=o=="Entering")},[g,r,o,h,d,_,b,k,l,u,s,a,f,I,D,N,w,i,V,W,ne,H,$,Y]}class Fb extends Ze{constructor(e){super(),Qe(this,e,Lb,Nb,Ye,{sorted:0},null,[-1,-1])}}function Vb(t){let e,n;return e=new t[18]({props:{data:{id:t[15],value:t[11],row:t[0],index:t[1]},scope:t[19].Local,$$slots:{default:[Ub]},$$scope:{ctx:t}}}),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l[0]&34819&&(r.data={id:i[15],value:i[11],row:i[0],index:i[1]}),l[1]&4096&&(r.$$scope={dirty:l,ctx:i}),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function Bb(t){let e,n,i,l;var r=t[7].cellComponent;function o(s,a){return{props:{cellOptions:{...s[17],disabled:s[6],error:s[10]},fieldSchema:s[7].schema,ownId:s[0][s[3]],value:s[11]}}}r&&(e=Sl(r,o(t)),e.$on("enteredit",t[35]),e.$on("exitedit",t[21].exitedit),e.$on("change",t[36]),e.$on("linkClick",t[37]));let u=t[10]&&qf(t);return{c(){e&&We(e.$$.fragment),n=Q(),u&&u.c(),i=Fe()},m(s,a){e&&je(e,s,a),A(s,n,a),u&&u.m(s,a),A(s,i,a),l=!0},p(s,a){if(a[0]&128&&r!==(r=s[7].cellComponent)){if(e){He();const f=e;Z(f.$$.fragment,1,0,()=>{qe(f,1)}),ze()}r?(e=Sl(r,o(s)),e.$on("enteredit",s[35]),e.$on("exitedit",s[21].exitedit),e.$on("change",s[36]),e.$on("linkClick",s[37]),We(e.$$.fragment),U(e.$$.fragment,1),je(e,n.parentNode,n)):e=null}else if(r){const f={};a[0]&132160&&(f.cellOptions={...s[17],disabled:s[6],error:s[10]}),a[0]&128&&(f.fieldSchema=s[7].schema),a[0]&9&&(f.ownId=s[0][s[3]]),a[0]&2048&&(f.value=s[11]),e.$set(f)}s[10]?u?u.p(s,a):(u=qf(s),u.c(),u.m(i.parentNode,i)):u&&(u.d(1),u=null)},i(s){l||(e&&U(e.$$.fragment,s),l=!0)},o(s){e&&Z(e.$$.fragment,s),l=!1},d(s){s&&(C(n),C(i)),e&&qe(e,s),u&&u.d(s)}}}function Ub(t){let e;const n=t[34].default,i=Ut(n,t,t[43],null);return{c(){i&&i.c()},m(l,r){i&&i.m(l,r),e=!0},p(l,r){i&&i.p&&(!e||r[1]&4096)&&zt(i,n,l,l[43],e?Ht(n,l[43],r,null):jt(l[43]),null)},i(l){e||(U(i,l),e=!0)},o(l){Z(i,l),e=!1},d(l){i&&i.d(l)}}}function qf(t){let e,n;return{c(){e=v("div"),n=Ee(t[10]),m(e,"class","info svelte-lkaygf"),p(e,"bottom",t[1]==0)},m(i,l){A(i,e,l),S(e,n)},p(i,l){l[0]&1024&&Pe(n,i[10]),l[0]&2&&p(e,"bottom",i[1]==0)},d(i){i&&C(e)}}}function Hb(t){let e,n,i,l,r,o;const u=[Bb,Vb],s=[];function a(f,c){return f[12]?1:0}return n=a(t),i=s[n]=u[n](t),{c(){e=v("div"),i.c(),m(e,"class","super-row"),p(e,"is-selected",t[13]),p(e,"is-hovered",t[14]),p(e,"is-editing",t[4]),p(e,"is-disabled",t[16].disabled),p(e,"isLast",t[5]),P(e,"height",t[16].height+"px"),P(e,"color",t[16].color),P(e,"background-color",t[16].bgcolor),P(e,"justify-content",t[7].align)},m(f,c){A(f,e,c),s[n].m(e,null),t[38](e),l=!0,r||(o=[B(e,"mouseenter",t[39]),B(e,"mouseleave",t[40]),B(e,"click",t[41]),B(e,"contextmenu",Et(t[42]))],r=!0)},p(f,c){let g=n;n=a(f),n===g?s[n].p(f,c):(He(),Z(s[g],1,1,()=>{s[g]=null}),ze(),i=s[n],i?i.p(f,c):(i=s[n]=u[n](f),i.c()),U(i,1),i.m(e,null)),(!l||c[0]&8192)&&p(e,"is-selected",f[13]),(!l||c[0]&16384)&&p(e,"is-hovered",f[14]),(!l||c[0]&16)&&p(e,"is-editing",f[4]),(!l||c[0]&65536)&&p(e,"is-disabled",f[16].disabled),(!l||c[0]&32)&&p(e,"isLast",f[5]),c[0]&65536&&P(e,"height",f[16].height+"px"),c[0]&65536&&P(e,"color",f[16].color),c[0]&65536&&P(e,"background-color",f[16].bgcolor),c[0]&128&&P(e,"justify-content",f[7].align)},i(f){l||(U(i),l=!0)},o(f){Z(i),l=!1},d(f){f&&C(e),s[n].d(),t[38](null),r=!1,Ve(o)}}}function zb(t,e,n){let i,l,r,o,u,s,a,f,c,g,h,d,{$$slots:_={},$$scope:b}=e;const{Provider:w,ContextScopes:E}=le.getContext("sdk"),k=le.getContext("stColumnOptions");Me(t,k,ve=>n(7,f=ve));const I=le.getContext("stColumnState"),O=le.getContext("stRowCellOptions");Me(t,O,ve=>n(17,d=ve));const D=le.getContext("stbRowMetadata");Me(t,D,ve=>n(32,c=ve));const N=le.getContext("stbHovered");Me(t,N,ve=>n(8,h=ve));const M=le.getContext("stbEditing");Me(t,M,ve=>n(44,a=ve));const V=le.getContext("stbAPI"),W=le.getContext("stbState"),ne=le.getContext("stbMenuID");Me(t,ne,ve=>n(33,g=ve));let{index:H}=e,{row:$}=e,{field:Y}=e,{idField:G}=e,{isEditing:oe}=e,{isLast:ie}=e,{disabled:J}=e,{rowHeight:q}=e,j,K;const x=async ve=>{let fe={...$,[Y]:ve};try{n(11,r="");let Ne=await V.patchRow(fe);n(0,$={...Ne})}catch(Ne){Ne.json.validationErrors?n(10,K=Ne.json.validationErrors[Y][0]):n(10,K=Ne.message),setTimeout(()=>{n(10,K=void 0)},3250)}finally{n(11,r=X($,Y))}},X=(ve,fe)=>{if(ve&&(fe!=null&&fe.includes("."))){for(var Ne=0,fe=fe.split("."),te=fe.length;Ne<te;Ne++)if(ve[fe[Ne]])Array.isArray(ve[fe[Ne]])?ve=ve[fe[Ne]][0]:ve=ve[fe[Ne]];else{ve=null;break}return ve}else return ve[fe]??void 0};le.onDestroy(()=>{a==H&&I.exitedit()});const F=()=>I.enteredit(H),R=ve=>x(ve.detail),z=ve=>{V.executeOnLinkClickAction(Y,ve.detail)};function me(ve){Be[ve?"unshift":"push"](()=>{j=ve,n(9,j)})}const se=()=>Re(N,h=H,h),Oe=()=>Re(N,h=void 0,h),be=()=>W.handleRowClick(H,Y,X($,Y),l),Ie=()=>{V.showContextMenu(H,j)};return t.$$set=ve=>{"index"in ve&&n(1,H=ve.index),"row"in ve&&n(0,$=ve.row),"field"in ve&&n(2,Y=ve.field),"idField"in ve&&n(3,G=ve.idField),"isEditing"in ve&&n(4,oe=ve.isEditing),"isLast"in ve&&n(5,ie=ve.isLast),"disabled"in ve&&n(6,J=ve.disabled),"rowHeight"in ve&&n(31,q=ve.rowHeight),"$$scope"in ve&&n(43,b=ve.$$scope)},t.$$.update=()=>{var ve;t.$$.dirty[0]&2|t.$$.dirty[1]&2&&n(16,i=(c==null?void 0:c[H])??{}),t.$$.dirty[0]&11&&n(15,l=($==null?void 0:$[G])??H),t.$$.dirty[0]&5&&n(11,r=X($,Y)),t.$$.dirty[0]&258|t.$$.dirty[1]&4&&n(14,o=h==H||g==H),t.$$.dirty[0]&2|t.$$.dirty[1]&2&&n(13,u=((ve=c==null?void 0:c[H])==null?void 0:ve.selected)??!1),t.$$.dirty[0]&128&&n(12,s=f.hasChildren>0)},[$,H,Y,G,oe,ie,J,f,h,j,K,r,s,u,o,l,i,d,w,E,k,I,O,D,N,M,V,W,ne,x,X,q,c,g,_,F,R,z,me,se,Oe,be,Ie,b]}class jb extends Ze{constructor(e){super(),Qe(this,e,zb,Hb,Ye,{index:1,row:0,field:2,idField:3,isEditing:4,isLast:5,disabled:6,rowHeight:31},null,[-1,-1])}}function Wf(t){let e,n;return{c(){e=v("i"),m(e,"class",n=bt(t[14]+" field-icon")+" svelte-1i7222z"),p(e,"with-error",t[6])},m(i,l){A(i,e,l)},p(i,l){l[0]&16384&&n!==(n=bt(i[14]+" field-icon")+" svelte-1i7222z")&&m(e,"class",n),l[0]&16448&&p(e,"with-error",i[6])},d(i){i&&C(e)}}}function qb(t){let e,n,i=(t[1]||t[0]||t[12])+"",l,r,o,u;return{c(){e=v("div"),n=v("span"),l=Ee(i),m(e,"class","value"),m(e,"tabindex",r=t[2].readonly||t[2].disabled?-1:0),p(e,"placeholder",!t[0]),P(e,"justify-content",t[2].align)},m(s,a){A(s,e,a),S(e,n),S(n,l),o||(u=B(e,"focusin",t[3].focus),o=!0)},p(s,a){a[0]&4099&&i!==(i=(s[1]||s[0]||s[12])+"")&&Pe(l,i),a[0]&4&&r!==(r=s[2].readonly||s[2].disabled?-1:0)&&m(e,"tabindex",r),a[0]&1&&p(e,"placeholder",!s[0]),a[0]&4&&P(e,"justify-content",s[2].align)},d(s){s&&C(e),o=!1,u()}}}function Wb(t){let e,n=(t[1]||t[0]||t[12])+"",i,l,r,o;return{c(){e=v("div"),i=Ee(n),m(e,"class","value textarea svelte-1i7222z"),m(e,"tabindex",l=t[2].readonly||t[2].disabled?-1:0),p(e,"with-icon",t[2].icon||t[6]),p(e,"placeholder",!t[0]&&!t[1]),P(e,"justify-content",t[2].align)},m(u,s){A(u,e,s),S(e,i),r||(o=B(e,"focusin",t[3].focus),r=!0)},p(u,s){s[0]&4099&&n!==(n=(u[1]||u[0]||u[12])+"")&&Pe(i,n),s[0]&4&&l!==(l=u[2].readonly||u[2].disabled?-1:0)&&m(e,"tabindex",l),s[0]&68&&p(e,"with-icon",u[2].icon||u[6]),s[0]&3&&p(e,"placeholder",!u[0]&&!u[1]),s[0]&4&&P(e,"justify-content",u[2].align)},d(u){u&&C(e),r=!1,o()}}}function Gb(t){let e;function n(r,o){return r[11]?Kb:Yb}let i=n(t),l=i(t);return{c(){l.c(),e=Fe()},m(r,o){l.m(r,o),A(r,e,o)},p(r,o){i===(i=n(r))&&l?l.p(r,o):(l.d(1),l=i(r),l&&(l.c(),l.m(e.parentNode,e)))},d(r){r&&C(e),l.d(r)}}}function Yb(t){var a;let e,n,i,l,r,o,u,s=t[4]&&((a=t[2])==null?void 0:a.clearIcon)!==!1&&Gf(t);return{c(){var f;e=v("input"),l=Q(),s&&s.c(),r=Fe(),m(e,"tabindex","0"),m(e,"class","editor"),e.value=n=t[4]??"",m(e,"placeholder",i=((f=t[2])==null?void 0:f.placeholder)??""),p(e,"placeholder",!t[0]&&!t[1]&&!t[4]),P(e,"text-align",t[2].align=="center"?"center":t[2].align=="flex-end"?"right":"left"),P(e,"padding-right",t[2].align!="flex-start"?"2rem":"0.75rem")},m(f,c){A(f,e,c),t[30](e),A(f,l,c),s&&s.m(f,c),A(f,r,c),o||(u=[B(e,"input",t[3].debounce),B(e,"focusout",t[3].focusout),B(e,"keydown",t[3].handleKeyboard),tn(t[19].call(null,e))],o=!0)},p(f,c){var g,h;c[0]&16&&n!==(n=f[4]??"")&&e.value!==n&&(e.value=n),c[0]&4&&i!==(i=((g=f[2])==null?void 0:g.placeholder)??"")&&m(e,"placeholder",i),c[0]&19&&p(e,"placeholder",!f[0]&&!f[1]&&!f[4]),c[0]&4&&P(e,"text-align",f[2].align=="center"?"center":f[2].align=="flex-end"?"right":"left"),c[0]&4&&P(e,"padding-right",f[2].align!="flex-start"?"2rem":"0.75rem"),f[4]&&((h=f[2])==null?void 0:h.clearIcon)!==!1?s?s.p(f,c):(s=Gf(f),s.c(),s.m(r.parentNode,r)):s&&(s.d(1),s=null)},d(f){f&&(C(e),C(l),C(r)),t[30](null),s&&s.d(f),o=!1,Ve(u)}}}function Kb(t){let e,n,i,l,r;return{c(){var o;e=v("textarea"),m(e,"tabindex","0"),m(e,"class","editor textarea svelte-1i7222z"),m(e,"placeholder",n=((o=t[2])==null?void 0:o.placeholder)??""),e.value=i=t[4]??"",p(e,"placeholder",!t[0]&&!t[1]&&!t[4]),P(e,"text-align",t[2].align=="center"?"center":t[2].align=="flex-end"?"right":"left")},m(o,u){A(o,e,u),t[29](e),l||(r=[B(e,"input",t[3].debounce),B(e,"focusout",t[3].focusout),B(e,"keydown",t[3].handleKeyboard),tn(t[19].call(null,e))],l=!0)},p(o,u){var s;u[0]&4&&n!==(n=((s=o[2])==null?void 0:s.placeholder)??"")&&m(e,"placeholder",n),u[0]&16&&i!==(i=o[4]??"")&&(e.value=i),u[0]&19&&p(e,"placeholder",!o[0]&&!o[1]&&!o[4]),u[0]&4&&P(e,"text-align",o[2].align=="center"?"center":o[2].align=="flex-end"?"right":"left")},d(o){o&&C(e),t[29](null),l=!1,Ve(r)}}}function Gf(t){let e,n,i;return{c(){e=v("i"),m(e,"class","ri-close-line clearIcon")},m(l,r){A(l,e,r),n||(i=B(e,"mousedown",Ii(Et(t[3].clear))),n=!0)},p:ue,d(l){l&&C(e),n=!1,i()}}}function Xb(t){let e,n,i=t[14]&&Wf(t);function l(u,s){return u[13]?Gb:u[11]?Wb:qb}let r=l(t),o=r(t);return{c(){e=v("div"),i&&i.c(),n=Q(),o.c(),m(e,"class","superCell svelte-1i7222z"),p(e,"multirow",t[5]=="textarea"),p(e,"textarea",t[5]=="textarea"),p(e,"inEdit",t[13]),p(e,"isDirty",t[8]&&t[15]),p(e,"inline",t[18]=="inlineInput"),p(e,"tableCell",t[18]=="tableCell"),p(e,"formInput",t[18]=="formInput"),p(e,"disabled",t[9]),p(e,"readonly",t[10]),p(e,"error",t[6]),P(e,"color",t[17]),P(e,"background",t[16])},m(u,s){A(u,e,s),i&&i.m(e,null),S(e,n),o.m(e,null)},p(u,s){u[14]?i?i.p(u,s):(i=Wf(u),i.c(),i.m(e,n)):i&&(i.d(1),i=null),r===(r=l(u))&&o?o.p(u,s):(o.d(1),o=r(u),o&&(o.c(),o.m(e,null))),s[0]&32&&p(e,"multirow",u[5]=="textarea"),s[0]&32&&p(e,"textarea",u[5]=="textarea"),s[0]&8192&&p(e,"inEdit",u[13]),s[0]&33024&&p(e,"isDirty",u[8]&&u[15]),s[0]&262144&&p(e,"inline",u[18]=="inlineInput"),s[0]&262144&&p(e,"tableCell",u[18]=="tableCell"),s[0]&262144&&p(e,"formInput",u[18]=="formInput"),s[0]&512&&p(e,"disabled",u[9]),s[0]&1024&&p(e,"readonly",u[10]),s[0]&64&&p(e,"error",u[6]),s[0]&131072&&P(e,"color",u[17]),s[0]&65536&&P(e,"background",u[16])},i:ue,o:ue,d(u){u&&C(e),i&&i.d(),o.d()}}}function Qb(t,e,n){let i,l,r,o,u,s,a,f,c,g,h,d,_,b,w,E,k,I,O,D=ue,N=()=>(D(),D=ft(j,R=>n(28,O=R)),j);t.$$.on_destroy.push(()=>D());const M=le.createEventDispatcher(),{processStringSync:V}=le.getContext("sdk");let{value:W}=e,{formattedValue:ne=void 0}=e,{cellOptions:H={role:"formInput",initialState:"Editing",debounce:250}}=e,{autofocus:$=!1}=e,Y,G,oe,ie=W,J=((H==null?void 0:H.initialState)==="Loading"?"View":H==null?void 0:H.initialState)??"View",q=[];const j=Ft(J??"View",{"*":{goTo(R){return R},reset(R){if(R!=ie)return n(4,ie=W),n(22,oe=void 0),n(23,q=[]),J}},View:{_enter(){n(4,ie=W)},focus(){if(!o&&!r)return"Editing"}},Editing:{_enter(){setTimeout(()=>{G==null||G.focus()},50),M("enteredit")},_exit(){n(22,oe=void 0),M("exitedit")},focus(){G==null||G.focus()},clear(){d&&M("change",null),n(22,oe=new Date),n(4,ie=null),G==null||G.focus(),M("clear",null)},focusout(R){M("focusout"),this.submit()},submit(){return E&&M("change",ie),J},cancel(){return n(4,ie=W),M("cancel"),J},debounce(R){const z=R.target;n(4,ie=z.value),n(22,oe=new Date),d&&(clearTimeout(Y),Y=setTimeout(()=>{M("change",ie)},d))},handleKeyboard(R){R.key==="Enter"&&!R.shiftKey&&this.submit(),R.key==="Escape"&&this.cancel()}}});N();const K={focus:()=>j.focus(),reset:()=>j.reset(W),isEditing:()=>O==="Editing",isDirty:()=>E,getValue:()=>ie,setError:R=>{n(23,q=[...q,R])},clearError:()=>{n(23,q=[])},setValue:R=>{n(0,W=R)}},x=R=>{R==null||R.focus()};le.onMount(()=>{$&&setTimeout(()=>{j.focus()},50)}),le.onDestroy(()=>{Y&&clearTimeout(Y)});function X(R){Be[R?"unshift":"push"](()=>{G=R,n(7,G)})}function F(R){Be[R?"unshift":"push"](()=>{G=R,n(7,G)})}return t.$$set=R=>{"value"in R&&n(0,W=R.value),"formattedValue"in R&&n(1,ne=R.formattedValue),"cellOptions"in R&&n(2,H=R.cellOptions),"autofocus"in R&&n(20,$=R.autofocus)},t.$$.update=()=>{t.$$.dirty[0]&4&&n(5,{controlType:i,role:l,disabled:r,readonly:o,error:u,icon:s,color:a,background:f,showDirty:c,template:g,placeholder:h,debounce:d}=H??{},i,(n(18,l),n(2,H)),(n(9,r),n(2,H)),(n(10,o),n(2,H)),(n(27,u),n(2,H)),(n(26,s),n(2,H)),(n(17,a),n(2,H)),(n(16,f),n(2,H)),(n(15,c),n(2,H)),(n(25,g),n(2,H)),(n(24,h),n(2,H))),t.$$.dirty[0]&142606336&&n(6,_=u||q.length>0),t.$$.dirty[0]&67108928&&n(14,b=_?"ph ph-warning":s),t.$$.dirty[0]&268435456&&n(13,w=O==="Editing"),t.$$.dirty[0]&4194321&&n(8,E=!!oe&&W!==ie),t.$$.dirty[0]&33554433&&n(1,ne=g?V(g,{value:W}):W??void 0),t.$$.dirty[0]&16777216&&n(12,k=h??""),t.$$.dirty[0]&32&&n(11,I=i==="textarea"),t.$$.dirty[0]&1&&j.reset(W)},[W,ne,H,j,ie,i,_,G,E,r,o,I,k,w,b,c,f,a,l,x,$,K,oe,q,h,g,s,u,O,X,F]}class kn extends Ze{constructor(e){super(),Qe(this,e,Qb,Xb,Ye,{value:0,formattedValue:1,cellOptions:2,autofocus:20,cellState:3,cellApi:21},null,[-1,-1])}get cellState(){return this.$$.ctx[3]}get cellApi(){return this.$$.ctx[21]}}function Yf(t){let e,n;return{c(){e=v("i"),m(e,"class",n=t[2].icon+" icon")},m(i,l){A(i,e,l)},p(i,l){l&4&&n!==(n=i[2].icon+" icon")&&m(e,"class",n)},d(i){i&&C(e)}}}function Zb(t){let e,n,i,l,r=(t[0]||t[1]||t[3])+"",o,u=t[2].icon&&Yf(t);return{c(){e=v("div"),u&&u.c(),n=Q(),i=v("div"),l=v("span"),o=Ee(r),m(i,"class","value"),p(i,"with-icon",t[2].icon),p(i,"placeholder",!t[1]),P(i,"justify-content",t[2].align),m(e,"class","superCell"),p(e,"inline",t[2].role=="inlineInput"),p(e,"tableCell",t[2].role=="tableCell"),p(e,"formInput",t[2].role=="formInput"),p(e,"disabled",t[2].disabled),p(e,"readonly",t[2].readonly),p(e,"error",t[2].error),P(e,"color",t[2].color),P(e,"background",t[2].background),P(e,"font-weight",t[2].fontWeight)},m(s,a){A(s,e,a),u&&u.m(e,null),S(e,n),S(e,i),S(i,l),S(l,o)},p(s,[a]){s[2].icon?u?u.p(s,a):(u=Yf(s),u.c(),u.m(e,n)):u&&(u.d(1),u=null),a&11&&r!==(r=(s[0]||s[1]||s[3])+"")&&Pe(o,r),a&4&&p(i,"with-icon",s[2].icon),a&2&&p(i,"placeholder",!s[1]),a&4&&P(i,"justify-content",s[2].align),a&4&&p(e,"inline",s[2].role=="inlineInput"),a&4&&p(e,"tableCell",s[2].role=="tableCell"),a&4&&p(e,"formInput",s[2].role=="formInput"),a&4&&p(e,"disabled",s[2].disabled),a&4&&p(e,"readonly",s[2].readonly),a&4&&p(e,"error",s[2].error),a&4&&P(e,"color",s[2].color),a&4&&P(e,"background",s[2].background),a&4&&P(e,"font-weight",s[2].fontWeight)},i:ue,o:ue,d(s){s&&C(e),u&&u.d()}}}function Jb(t,e,n){let i;const{processStringSync:l}=le.getContext("sdk");let{value:r=null}=e,{formattedValue:o}=e,{cellOptions:u={role:"formInput",initialState:"Editing",debounce:250}}=e;return t.$$set=s=>{"value"in s&&n(1,r=s.value),"formattedValue"in s&&n(0,o=s.formattedValue),"cellOptions"in s&&n(2,u=s.cellOptions)},t.$$.update=()=>{t.$$.dirty&6&&n(0,o=u!=null&&u.template?l(u.template,{value:r}):void 0),t.$$.dirty&4&&n(3,i=u.readonly||u.disabled?"":u.placeholder||"")},[o,r,u,i]}class Go extends Ze{constructor(e){super(),Qe(this,e,Jb,Zb,Ye,{value:1,formattedValue:0,cellOptions:2})}}function Kf(t){let e,n;return{c(){e=v("div"),n=Ee(t[5]),m(e,"class","info svelte-lkaygf"),p(e,"bottom",!0)},m(i,l){A(i,e,l),S(e,n)},p(i,l){l&32&&Pe(n,i[5])},d(i){i&&C(e)}}}function xb(t){let e,n,i,l;var r=t[6];function o(s,a){return{props:{cellOptions:{...s[7],readonly:!1,error:s[5],showDirty:!1},autofocus:s[1],fieldSchema:s[4].schema,value:s[0][s[4].name],multi:s[4].schema.type=="array"}}}r&&(n=Sl(r,o(t)),n.$on("change",t[13]));let u=t[5]&&Kf(t);return{c(){e=v("div"),n&&We(n.$$.fragment),i=Q(),u&&u.c(),m(e,"class","super-row new-row"),p(e,"isLast",t[2]),P(e,"min-height","2rem"),P(e,"color",t[3])},m(s,a){A(s,e,a),n&&je(n,e,null),S(e,i),u&&u.m(e,null),l=!0},p(s,[a]){if(a&64&&r!==(r=s[6])){if(n){He();const f=n;Z(f.$$.fragment,1,0,()=>{qe(f,1)}),ze()}r?(n=Sl(r,o(s)),n.$on("change",s[13]),We(n.$$.fragment),U(n.$$.fragment,1),je(n,e,i)):n=null}else if(r){const f={};a&160&&(f.cellOptions={...s[7],readonly:!1,error:s[5],showDirty:!1}),a&2&&(f.autofocus=s[1]),a&16&&(f.fieldSchema=s[4].schema),a&17&&(f.value=s[0][s[4].name]),a&16&&(f.multi=s[4].schema.type=="array"),n.$set(f)}s[5]?u?u.p(s,a):(u=Kf(s),u.c(),u.m(e,null)):u&&(u.d(1),u=null),(!l||a&4)&&p(e,"isLast",s[2]),a&8&&P(e,"color",s[3])},i(s){l||(n&&U(n.$$.fragment,s),l=!0)},o(s){n&&Z(n.$$.fragment,s),l=!1},d(s){s&&C(e),n&&qe(n),u&&u.d()}}}function $b(t,e,n){let i,l,r,o,u;const s=le.getContext("stColumnOptions");Me(t,s,w=>n(4,r=w));const a=le.getContext("stRowCellOptions");Me(t,a,w=>n(7,u=w));const f=le.getContext("stbState"),c=le.getContext("stbSettings");Me(t,c,w=>n(12,o=w));let{row:g={}}=e,{isFirst:h}=e,{isLast:d}=e,{color:_}=e;const b=w=>{f.setValue(r.name,w.detail)};return t.$$set=w=>{"row"in w&&n(0,g=w.row),"isFirst"in w&&n(1,h=w.isFirst),"isLast"in w&&n(2,d=w.isLast),"color"in w&&n(3,_=w.color)},t.$$.update=()=>{t.$$.dirty&4112&&n(6,i=r.cellComponent===Go&&o.features.canInsert?kn:r.cellComponent),t.$$.dirty&17&&n(5,l=g.errors&&g.errors[r.name])},[g,h,d,_,r,l,i,u,s,a,f,c,o,b]}class ew extends Ze{constructor(e){super(),Qe(this,e,$b,xb,Ye,{row:0,isFirst:1,isLast:2,color:3})}}function Xf(t,e,n){const i=t.slice();return i[20]=e[n],i}function tw(t){let e;const n=t[18].default,i=Ut(n,t,t[19],null);return{c(){i&&i.c()},m(l,r){i&&i.m(l,r),e=!0},p(l,r){i&&i.p&&(!e||r&524288)&&zt(i,n,l,l[19],e?Ht(n,l[19],r,null):jt(l[19]),null)},i(l){e||(U(i,l),e=!0)},o(l){Z(i,l),e=!1},d(l){i&&i.d(l)}}}function Qf(t,e){let n,i,l;return i=new jb({props:{isLast:e[2],index:e[20],row:e[6][e[20]],field:e[0],idField:e[1],disabled:e[10],rowHeight:e[5],$$slots:{default:[tw]},$$scope:{ctx:e}}}),{key:t,first:null,c(){n=Fe(),We(i.$$.fragment),this.first=n},m(r,o){A(r,n,o),je(i,r,o),l=!0},p(r,o){e=r;const u={};o&4&&(u.isLast=e[2]),o&2048&&(u.index=e[20]),o&2112&&(u.row=e[6][e[20]]),o&1&&(u.field=e[0]),o&2&&(u.idField=e[1]),o&1024&&(u.disabled=e[10]),o&32&&(u.rowHeight=e[5]),o&524288&&(u.$$scope={dirty:o,ctx:e}),i.$set(u)},i(r){l||(U(i.$$.fragment,r),l=!0)},o(r){Z(i.$$.fragment,r),l=!1},d(r){r&&C(n),qe(i,r)}}}function Zf(t){let e,n;return e=new ew({props:{isFirst:t[3],isLast:t[2],row:t[12]}}),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l&8&&(r.isFirst=i[3]),l&4&&(r.isLast=i[2]),l&4096&&(r.row=i[12]),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function nw(t){let e,n=[],i=new Map,l,r,o=Ce(t[11]);const u=a=>a[20];for(let a=0;a<o.length;a+=1){let f=Xf(t,o,a),c=u(f);i.set(c,n[a]=Qf(c,f))}let s=t[10]&&Zf(t);return{c(){e=v("div");for(let a=0;a<n.length;a+=1)n[a].c();l=Q(),s&&s.c(),m(e,"class","super-column-body"),m(e,"tabindex","-1"),p(e,"quiet",t[9]),p(e,"zebra",t[4]),p(e,"inserting",t[10]),p(e,"filtered",t[7]=="Filtered"),p(e,"is-editing",t[8]),P(e,"margin-top","var(--super-column-top-offset)")},m(a,f){A(a,e,f);for(let c=0;c<n.length;c+=1)n[c]&&n[c].m(e,null);S(e,l),s&&s.m(e,null),r=!0},p(a,[f]){f&527463&&(o=Ce(a[11]),He(),n=Tt(n,f,u,1,a,o,i,e,Di,Qf,l,Xf),ze()),a[10]?s?(s.p(a,f),f&1024&&U(s,1)):(s=Zf(a),s.c(),U(s,1),s.m(e,null)):s&&(He(),Z(s,1,1,()=>{s=null}),ze()),(!r||f&512)&&p(e,"quiet",a[9]),(!r||f&16)&&p(e,"zebra",a[4]),(!r||f&1024)&&p(e,"inserting",a[10]),(!r||f&128)&&p(e,"filtered",a[7]=="Filtered"),(!r||f&256)&&p(e,"is-editing",a[8])},i(a){if(!r){for(let f=0;f<o.length;f+=1)U(n[f]);U(s),r=!0}},o(a){for(let f=0;f<n.length;f+=1)Z(n[f]);Z(s),r=!1},d(a){a&&C(e);for(let f=0;f<n.length;f+=1)n[f].d();s&&s.d()}}}function iw(t,e,n){let i,l,r,o,u,s,a,{$$slots:f={},$$scope:c}=e;const g=le.getContext("stColumnOptions");Me(t,g,N=>n(17,o=N));const h=le.getContext("stColumnState");Me(t,h,N=>n(7,u=N));const d=le.getContext("stbVisibleRows");Me(t,d,N=>n(11,s=N));const _=le.getContext("new_row");Me(t,_,N=>n(12,a=N));let{field:b}=e,{idField:w}=e,{isLast:E}=e,{isFirst:k}=e,{zebra:I}=e,{rowHeight:O}=e,{rows:D}=e;return t.$$set=N=>{"field"in N&&n(0,b=N.field),"idField"in N&&n(1,w=N.idField),"isLast"in N&&n(2,E=N.isLast),"isFirst"in N&&n(3,k=N.isFirst),"zebra"in N&&n(4,I=N.zebra),"rowHeight"in N&&n(5,O=N.rowHeight),"rows"in N&&n(6,D=N.rows),"$$scope"in N&&n(19,c=N.$$scope)},t.$$.update=()=>{t.$$.dirty&128&&n(10,i=u=="Inserting"),t.$$.dirty&131072&&n(9,l=o.quiet),t.$$.dirty&131200&&n(8,r=u=="EditingCell"&&(o.highlighters=="vertical"||o.highlighters=="both"))},[b,w,E,k,I,O,D,u,r,l,i,s,a,g,h,d,_,o,f,c]}class lw extends Ze{constructor(e){super(),Qe(this,e,iw,nw,Ye,{field:0,idField:1,isLast:2,isFirst:3,zebra:4,rowHeight:5,rows:6})}}function rw(t){let e,n,i=(t[0]||t[1].displayName||t[1].name)+"",l;return{c(){var r;e=v("div"),n=v("span"),l=Ee(i),m(e,"class","super-column-footer"),P(e,"justify-content",(r=t[1])==null?void 0:r.headerAlign)},m(r,o){A(r,e,o),S(e,n),S(n,l)},p(r,[o]){var u;o&3&&i!==(i=(r[0]||r[1].displayName||r[1].name)+"")&&Pe(l,i),o&2&&P(e,"justify-content",(u=r[1])==null?void 0:u.headerAlign)},i:ue,o:ue,d(r){r&&C(e)}}}function ow(t,e,n){let i;const l=le.getContext("stColumnOptions");Me(t,l,o=>n(1,i=o));let{footerLabel:r}=e;return t.$$set=o=>{"footerLabel"in o&&n(0,r=o.footerLabel)},[r,i,l]}class sw extends Ze{constructor(e){super(),Qe(this,e,ow,rw,Ye,{footerLabel:0})}}function Jf(t,e,n){const i=t.slice();return i[71]=e[n],i[73]=n,i}function xf(t,e,n){const i=t.slice();return i[74]=e[n],i[73]=n,i}function $f(t,e,n){const i=t.slice();return i[74]=e[n],i}function ec(t){let e,n;return{c(){e=v("i"),m(e,"class",n=bt(t[22]+" field-icon")+" svelte-gq3v8f"),p(e,"active",t[4])},m(i,l){A(i,e,l)},p(i,l){l[0]&4194304&&n!==(n=bt(i[22]+" field-icon")+" svelte-gq3v8f")&&m(e,"class",n),l[0]&4194320&&p(e,"active",i[4])},d(i){i&&C(e)}}}function uw(t){let e,n,i,l,r;function o(f,c){return f[5]&&!f[21]?hw:f[5]&&f[21]?dw:f[8]=="text"?cw:fw}let u=o(t),s=u(t),a=!t[6]&&(t[30]=="formInput"||t[9])&&nc(t);return{c(){e=v("div"),s.c(),n=Q(),a&&a.c(),i=Fe(),m(e,"class","value"),p(e,"placeholder",t[5]&&!t[4])},m(f,c){A(f,e,c),s.m(e,null),A(f,n,c),a&&a.m(f,c),A(f,i,c),l||(r=B(e,"mousedown",function(){Ge(t[9]?t[33].toggle:null)&&(t[9]?t[33].toggle:null).apply(this,arguments)}),l=!0)},p(f,c){t=f,u===(u=o(t))&&s?s.p(t,c):(s.d(1),s=u(t),s&&(s.c(),s.m(e,null))),c[0]&48&&p(e,"placeholder",t[5]&&!t[4]),!t[6]&&(t[30]=="formInput"||t[9])?a?a.p(t,c):(a=nc(t),a.c(),a.m(i.parentNode,i)):a&&(a.d(1),a=null)},d(f){f&&(C(e),C(n),C(i)),s.d(),a&&a.d(f),l=!1,r()}}}function aw(t){let e,n,i,l,r,o,u=t[0]&&ic(t);return{c(){u&&u.c(),e=Q(),n=v("input"),i=Q(),l=v("div"),l.innerHTML='<i class="ph ph-caret-down"></i>',m(n,"class","editor"),m(n,"placeholder",t[23]),m(l,"class","action-icon svelte-gq3v8f")},m(s,a){u&&u.m(s,a),A(s,e,a),A(s,n,a),t[52](n),Zt(n,t[20]),A(s,i,a),A(s,l,a),r||(o=[B(n,"input",t[53]),B(n,"input",t[54]),tn(t[37].call(null,n)),B(l,"click",t[33].toggle)],r=!0)},p(s,a){s[0]?u?u.p(s,a):(u=ic(s),u.c(),u.m(e.parentNode,e)):u&&(u.d(1),u=null),a[0]&8388608&&m(n,"placeholder",s[23]),a[0]&1048576&&n.value!==s[20]&&Zt(n,s[20])},d(s){s&&(C(e),C(n),C(i),C(l)),u&&u.d(s),t[52](null),r=!1,Ve(o)}}}function fw(t){let e,n=[],i=new Map,l=Ce(t[3]);const r=o=>o[74];for(let o=0;o<l.length;o+=1){let u=xf(t,l,o),s=r(u);i.set(s,n[o]=tc(s,u))}return{c(){e=v("div");for(let o=0;o<n.length;o+=1)n[o].c();m(e,"class","items"),p(e,"pills",t[24]),p(e,"colorText",t[8]=="colorText"),P(e,"justify-content",t[1].align??"flex-start")},m(o,u){A(o,e,u);for(let s=0;s<n.length;s+=1)n[s]&&n[s].m(e,null)},p(o,u){u[0]&67239944|u[1]&17&&(l=Ce(o[3]),n=Tt(n,u,r,1,o,l,i,e,nn,tc,null,xf)),u[0]&16777216&&p(e,"pills",o[24]),u[0]&256&&p(e,"colorText",o[8]=="colorText"),u[0]&2&&P(e,"justify-content",o[1].align??"flex-start")},d(o){o&&C(e);for(let u=0;u<n.length;u+=1)n[u].d()}}}function cw(t){let e,n=(t[0]||t[3].length>1?t[3].join(", "):t[17][t[3][0]]||t[3][0])+"",i;return{c(){e=v("span"),i=Ee(n)},m(l,r){A(l,e,r),S(e,i)},p(l,r){r[0]&131081&&n!==(n=(l[0]||l[3].length>1?l[3].join(", "):l[17][l[3][0]]||l[3][0])+"")&&Pe(i,n)},d(l){l&&C(e)}}}function dw(t){let e,n=(t[4]||"Type to search...")+"",i;return{c(){e=v("span"),i=Ee(n)},m(l,r){A(l,e,r),S(e,i)},p(l,r){r[0]&16&&n!==(n=(l[4]||"Type to search...")+"")&&Pe(i,n)},d(l){l&&C(e)}}}function hw(t){let e,n=(t[4]||t[23])+"",i;return{c(){e=v("span"),i=Ee(n)},m(l,r){A(l,e,r),S(e,i)},p(l,r){r[0]&8388624&&n!==(n=(l[4]||l[23])+"")&&Pe(i,n)},d(l){l&&C(e)}}}function tc(t,e){let n,i,l,r,o=(e[26]?"JSON":e[17][e[74]]||e[74])+"",u,s;return{key:t,first:null,c(){n=v("div"),i=v("i"),l=Q(),r=v("span"),u=Ee(o),s=Q(),m(i,"class","ph-fill ph-square"),m(n,"class","item"),P(n,"--option-color",e[31][e[74]]||e[35][e[73]%e[35].length]),this.first=n},m(a,f){A(a,n,f),S(n,i),S(n,l),S(n,r),S(r,u),S(n,s)},p(a,f){e=a,f[0]&67239944&&o!==(o=(e[26]?"JSON":e[17][e[74]]||e[74])+"")&&Pe(u,o),f[0]&8|f[1]&1&&P(n,"--option-color",e[31][e[74]]||e[35][e[73]%e[35].length])},d(a){a&&C(n)}}}function nc(t){let e,n,i;return{c(){e=v("i"),m(e,"class","ph ph-caret-down control-icon")},m(l,r){A(l,e,r),n||(i=B(e,"mousedown",function(){Ge(t[9]?t[33].toggle:null)&&(t[9]?t[33].toggle:null).apply(this,arguments)}),n=!0)},p(l,r){t=l},d(l){l&&C(e),n=!1,i()}}}function ic(t){let e,n=t[3].length>0&&lc(t);return{c(){n&&n.c(),e=Fe()},m(i,l){n&&n.m(i,l),A(i,e,l)},p(i,l){i[3].length>0?n?n.p(i,l):(n=lc(i),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},d(i){i&&C(e),n&&n.d(i)}}}function lc(t){let e,n,i=[],l=new Map,r=Ce(t[3]);const o=u=>u[74];for(let u=0;u<r.length;u+=1){let s=$f(t,r,u),a=o(s);l.set(a,i[u]=oc(a,s))}return{c(){e=v("div"),n=v("div");for(let u=0;u<i.length;u+=1)i[u].c();m(n,"class","items"),p(n,"pills",t[24]),P(n,"justify-content",t[1].align??"flex-start"),m(e,"class","value"),P(e,"width","auto"),P(e,"padding-left",t[1].icon?"32px":t[1].padding)},m(u,s){A(u,e,s),S(e,n);for(let a=0;a<i.length;a+=1)i[a]&&i[a].m(n,null)},p(u,s){s[0]&16908296|s[1]&1&&(r=Ce(u[3]),i=Tt(i,s,o,1,u,r,l,n,nn,oc,null,$f)),s[0]&16777216&&p(n,"pills",u[24]),s[0]&2&&P(n,"justify-content",u[1].align??"flex-start"),s[0]&2&&P(e,"padding-left",u[1].icon?"32px":u[1].padding)},d(u){u&&C(e);for(let s=0;s<i.length;s+=1)i[s].d()}}}function rc(t){let e;return{c(){e=v("div"),m(e,"class","loope")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function oc(t,e){let n,i,l,r=(e[17][e[74]]||e[74])+"",o,u,s=e[24]&&rc();return{key:t,first:null,c(){n=v("div"),s&&s.c(),i=Q(),l=v("span"),o=Ee(r),u=Q(),m(n,"class","item"),P(n,"--option-color",e[31][e[74]]),P(n,"min-width","4rem"),this.first=n},m(a,f){A(a,n,f),s&&s.m(n,null),S(n,i),S(n,l),S(l,o),S(n,u)},p(a,f){e=a,e[24]?s||(s=rc(),s.c(),s.m(n,i)):s&&(s.d(1),s=null),f[0]&131080&&r!==(r=(e[17][e[74]]||e[74])+"")&&Pe(o,r),f[0]&8|f[1]&1&&P(n,"--option-color",e[31][e[74]])},d(a){a&&C(n),s&&s.d()}}}function sc(t){let e,n;return e=new wn({props:{anchor:t[15],useAnchorWidth:!0,maxHeight:250,open:t[21],$$slots:{default:[pw]},$$scope:{ctx:t}}}),e.$on("close",t[33].close),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l[0]&32768&&(r.anchor=i[15]),l[0]&2097152&&(r.open=i[21]),l[0]&937272|l[1]&1|l[2]&65536&&(r.$$scope={dirty:l,ctx:i}),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function uc(t){let e,n,i,l,r;return{c(){e=v("div"),n=v("i"),i=Q(),l=v("span"),r=Ee(t[4]),m(n,"class","search-icon ph ph-magnifying-glass svelte-gq3v8f"),p(n,"active",t[4]),m(l,"class","search-term svelte-gq3v8f"),m(e,"class","searchControl svelte-gq3v8f")},m(o,u){A(o,e,u),S(e,n),S(e,i),S(e,l),S(l,r)},p(o,u){u[0]&16&&p(n,"active",o[4]),u[0]&16&&Pe(r,o[4])},d(o){o&&C(e)}}}function gw(t){let e;return{c(){e=v("div"),e.innerHTML=`<span><i class="ri-close-line"></i>
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
Loading more...`,m(e,"class","option loading svelte-gq3v8f")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function pw(t){let e,n,i,l,r,o=t[4]&&!t[5]&&uc(t);function u(f,c){var g,h,d,_;return f[11]=="data"&&((g=f[14])!=null&&g.loading)&&!((d=(h=f[14])==null?void 0:h.rows)!=null&&d.length)?_w:(_=f[18])!=null&&_.length?mw:gw}let s=u(t),a=s(t);return{c(){e=v("div"),o&&o.c(),n=Q(),i=v("div"),a.c(),m(i,"class","options svelte-gq3v8f"),m(e,"class","picker svelte-gq3v8f")},m(f,c){A(f,e,c),o&&o.m(e,null),S(e,n),S(e,i),a.m(i,null),l||(r=[B(i,"wheel",ww),B(i,"mouseleave",t[58]),B(i,"scroll",function(){Ge(t[11]=="data"?t[33].handleScroll:null)&&(t[11]=="data"?t[33].handleScroll:null).apply(this,arguments)}),B(e,"mousedown",Qt(Et(t[51])))],l=!0)},p(f,c){t=f,t[4]&&!t[5]?o?o.p(t,c):(o=uc(t),o.c(),o.m(e,n)):o&&(o.d(1),o=null),s===(s=u(t))&&a?a.p(t,c):(a.d(1),a=s(t),a&&(a.c(),a.m(i,null)))},d(f){f&&C(e),o&&o.d(),a.d(),l=!1,Ve(r)}}}function bw(t){let e,n,i,l,r,o,u,s,a=t[22]&&ec(t);function f(d,_){return d[9]&&d[13]=="inputSelect"?aw:uw}let c=f(t),g=c(t),h=t[9]&&sc(t);return{c(){var d;e=v("div"),a&&a.c(),n=Q(),g.c(),l=Q(),h&&h.c(),r=Fe(),m(e,"class","superCell"),m(e,"tabindex",i=(d=t[1])!=null&&d.disabled?-1:0),p(e,"isDirty",t[25]&&t[1].showDirty),p(e,"inEdit",t[9]),p(e,"disabled",t[7]),p(e,"readonly",t[6]),p(e,"error",t[29]),p(e,"inline",t[30]=="inlineInput"),p(e,"tableCell",t[30]=="tableCell"),p(e,"formInput",t[30]=="formInput"),P(e,"color",t[28]),P(e,"background",t[27])},m(d,_){A(d,e,_),a&&a.m(e,null),S(e,n),g.m(e,null),t[55](e),A(d,l,_),h&&h.m(d,_),A(d,r,_),o=!0,u||(s=[B(e,"focusin",t[2].focus),B(e,"focusout",t[2].focusout),B(e,"keydown",t[33].handleKeyboard)],u=!0)},p(d,_){var b;d[22]?a?a.p(d,_):(a=ec(d),a.c(),a.m(e,n)):a&&(a.d(1),a=null),c===(c=f(d))&&g?g.p(d,_):(g.d(1),g=c(d),g&&(g.c(),g.m(e,null))),(!o||_[0]&2&&i!==(i=(b=d[1])!=null&&b.disabled?-1:0))&&m(e,"tabindex",i),(!o||_[0]&33554434)&&p(e,"isDirty",d[25]&&d[1].showDirty),(!o||_[0]&512)&&p(e,"inEdit",d[9]),(!o||_[0]&128)&&p(e,"disabled",d[7]),(!o||_[0]&64)&&p(e,"readonly",d[6]),(!o||_[0]&536870912)&&p(e,"error",d[29]),(!o||_[0]&1073741824)&&p(e,"inline",d[30]=="inlineInput"),(!o||_[0]&1073741824)&&p(e,"tableCell",d[30]=="tableCell"),(!o||_[0]&1073741824)&&p(e,"formInput",d[30]=="formInput"),_[0]&268435456&&P(e,"color",d[28]),_[0]&134217728&&P(e,"background",d[27]),d[9]?h?(h.p(d,_),_[0]&512&&U(h,1)):(h=sc(d),h.c(),U(h,1),h.m(r.parentNode,r)):h&&(He(),Z(h,1,1,()=>{h=null}),ze())},i(d){o||(U(h),o=!0)},o(d){Z(h),o=!1},d(d){d&&(C(e),C(l),C(r)),a&&a.d(),g.d(),t[55](null),h&&h.d(d),u=!1,Ve(s)}}}const ww=t=>t.stopPropagation();function kw(t,e,n){let i,l,r,o,u,s,a,f,c,g,h,d,_,b,w,E,k,I,O,D,N,M,V,W,ne,H,$,Y=ue,G=()=>(Y(),Y=ft(re,we=>n(49,$=we)),re),oe,ie,J=ue,q=()=>(J(),J=ft(w,we=>n(14,ie=we)),w),j,K;t.$$.on_destroy.push(()=>Y()),t.$$.on_destroy.push(()=>J());const x=le.createEventDispatcher(),{API:X,QueryUtils:F,fetchData:R,memo:z,derivedMemo:me}=le.getContext("sdk");let{cellOptions:se}=e,{value:Oe}=e,{fieldSchema:be}=e,{multi:Ie=!1}=e,{autofocus:ve}=e,fe,Ne,te=z([]);Me(t,te,we=>n(63,j=we));let ae={},de={},Xe=[],Te=-1,Se,Le=[],rt="",kt="",ke=15;const ce=we=>l!="data"?z({}):R({API:X,datasource:we,options:{sortColumn:se.sortColumn,sortOrder:se.sortOrder,limit:ke}}),re=Ft("Loading",{"*":{goTo(we){return we},refresh(){return Re(te,j=[],j),"Loading"},loadSchemaOptions(){var we;de=(be==null?void 0:be.optionColors)||{},Re(te,j=((we=be==null?void 0:be.constraints)==null?void 0:we.inclusion)||[],j),n(17,ae={}),n(18,Xe=j)},loadDataOptions(we){Re(te,j=[],j),n(17,ae={}),we&&we.length&&we.forEach(xe=>{var pe;j.push((pe=xe[r])==null?void 0:pe.toString()),n(17,ae[xe[r]]=xe[o||r],ae),s&&(de[xe[r]]=xe[s])}),te.set(j),n(18,Xe=j)},loadCustomOptions(){a!=null&&a.length&&a.forEach(we=>{j.push(we.value||we),n(17,ae[we.value]=we.label||we,ae)}),te.set(j)},clearFilters(){n(18,Xe=j)}},Loading:{_enter(){(se.optionsSource!="data"||ie!=null&&ie.loaded)&&this.goTo.debounce(5,se.initialState||"View")},_exit(){se.optionsSource=="custom"?this.loadCustomOptions():l=="data"?this.loadDataOptions(ie==null?void 0:ie.rows):this.loadSchemaOptions(),n(18,Xe=j)},syncFetch(we){if(we!=null&&we.loaded)return se.initialState||"View"},focus(we){if(!se.readonly&&!se.disabled)return"Editing"}},View:{_enter(){n(4,rt=null)},focus(we){if(!se.readonly&&!se.disabled)return"Editing"}},Editing:{_enter(){n(42,lt=JSON.stringify(Array.isArray(Oe)?Oe:Oe?[Oe]:[])),n(20,kt=Ie?"":ae[Le[0]]||Le[0]||""),Ae.open(),x("enteredit")},_exit(){Ae.close(),Ae.filterOptions(),x("exitedit")},focusout(we){if(!fe.contains(we.relatedTarget))return x("focusout"),se.debounce&&D?(clearTimeout(Se),x("change",Ie?Le:Le[0])):this.submit(),"View"},submit(){D&&!se.debounce&&(Ie?x("change",Le):x("change",Le[0]))},clear(){n(3,Le=[]),fe==null||fe.focus(),se.debounce&&x("change",null)},cancel(){return n(4,rt=null),fe==null||fe.blur(),"View"}}});G();const Ae=Ft("Closed",{"*":{toggleOption(we){if(we<0||se.disabled||se.readonly)return;let xe=Xe[we],pe=Le.indexOf(xe);Ie&&pe>-1?(Le.splice(pe,1),n(3,Le=[...Le])):Ie?n(3,Le=[...Le,xe]):(Le[0]==xe?n(3,Le.length=0,Le):n(3,Le[0]=xe,Le),n(20,kt=ae[Le[0]]||Le[0]||"")),se.debounce&&(clearTimeout(Se),Se=setTimeout(()=>{x("change",Ie?Le:Le[0])},se.debounce??0)),se.autocomplete&&Ie&&this.filterOptions(),Ie||(this.close.debounce(10),se.controlType!="inputSelect"?fe==null||fe.focus():Ne==null||Ne.focus())}},Open:{_enter(){n(4,rt=""),this.filterOptions(),n(19,Te=-1)},filterOptions(we){if(se.optionsSource=="data"){let xe=[];we?xe=[...se.filter||[],{field:o||r,type:"string",operator:"fuzzy",value:we,valueType:"Value"}]:xe=se.filter||[],w==null||w.update({query:F.buildQuery(xe)}),n(18,Xe=j)}else we?n(18,Xe=j.filter(xe=>xe==null?void 0:xe.toLocaleLowerCase().startsWith(we.toLocaleLowerCase()))):n(18,Xe=j)},toggle(){return"Closed"},close(){return"Closed"},handleKeyboard(we){if(we.key==="Backspace"||we.key==="Delete"?(n(4,rt=rt.slice(0,-1)),this.filterOptions(rt)):we.key.length===1&&/[a-zA-Z0-9]/.test(we.key)&&(n(4,rt=rt+we.key),this.filterOptions(rt),rt!=null&&rt.length&&H=="Closed"&&this.toggle()),we.keyCode==32&&(Te>-1?(this.toggleOption(Te,we.preventDefault()),Ie||this.close(we.preventDefault())):k||this.close()),we.key=="Escape")return n(4,rt=null),fe==null||fe.focus(),"Closed";we.key=="Enter"&&(Te>-1&&Xe[Te]&&(Ie||this.toggleOption(Te)),re.submit(),Ae.close()),we.key=="ArrowDown"&&this.highlightNext(),we.key=="ArrowUp"&&this.highlightPrevious()},highlightNext(){n(19,Te+=1),Te>Xe.length-1&&n(19,Te=0),le.tick().then(()=>{const we=optionsList.querySelector(".option.focused");we&&we.scrollIntoView({behavior:"smooth",block:"nearest"})})},highlightPrevious(){n(19,Te-=1),Te<0&&n(19,Te=Xe.length-1),le.tick().then(()=>{const we=optionsList.querySelector(".option.focused");we&&we.scrollIntoView({behavior:"smooth",block:"nearest"})})},fetchMore(){var we;ie!=null&&ie.loading||((we=ie==null?void 0:ie.rows)==null?void 0:we.length)<ke||(n(41,ke+=100),w==null||w.update({limit:ke}))},handleScroll(we){const xe=we.target,pe=xe.scrollTop,_t=xe.scrollHeight,Bt=xe.clientHeight;pe+Bt>=_t-50&&this.fetchMore()}},Closed:{_enter(){n(4,rt=null),n(19,Te=-1)},toggle(){return"Open"},open(){return"Open"},highlightNext(){this.open(),n(19,Te=0),le.tick().then(()=>{const we=optionsList.querySelector(".option.focused");we&&we.scrollIntoView({behavior:"smooth",block:"nearest"})})},handleKeyboard(we){if(we.key=="Escape"){re.cancel();return}we.key=="Enter"&&kt!=null&&kt.trim()&&(Ie?n(3,Le=[...Le,kt.trim()]):n(3,Le=[kt.trim()]),n(20,kt="")),i=="select"&&(this.open(),this.handleKeyboard(we),(we.key=="ArrowDown"||we.keyCode==32)&&this.toggle(),(we.key=="Backspace"||we.key=="Delete")&&(n(3,Le=[]),x("change",Le)))}}});Me(t,Ae,we=>n(48,H=we));const Ue=me(te,we=>{let xe={};return we.forEach((pe,_t)=>xe[pe]=de[pe]??Je[_t%Je.length]),xe});Me(t,Ue,we=>n(31,K=we));const Je=["hsla(175, 90%, 75%, 0.35)","hsla(25, 90%, 75%, 0.35)","hsla(340, 85%, 72%, 0.35)","hsla(75, 80%, 75%, 0.35)","hsla(265, 85%, 70%, 0.35)","hsla(125, 90%, 75%, 0.35)","hsla(0, 90%, 75%, 0.35)","hsla(225, 90%, 75%, 0.35)","hsla(100, 80%, 75%, 0.35)","hsla(315, 85%, 70%, 0.35)","hsla(50, 80%, 75%, 0.35)","hsla(165, 85%, 70%, 0.35)","hsla(200, 90%, 75%, 0.35)","hsla(290, 85%, 72%, 0.35)","hsla(85, 85%, 72%, 0.35)","hsla(140, 85%, 72%, 0.35)","hsla(250, 90%, 75%, 0.35)","hsla(35, 85%, 72%, 0.35)","hsla(190, 85%, 72%, 0.35)","hsla(350, 90%, 75%, 0.35)","hsla(60, 85%, 70%, 0.35)","hsla(150, 90%, 75%, 0.35)","hsla(300, 90%, 75%, 0.35)","hsla(10, 85%, 70%, 0.35)","hsla(215, 85%, 70%, 0.35)","hsla(325, 90%, 75%, 0.35)","hsla(115, 85%, 70%, 0.35)","hsla(240, 85%, 72%, 0.35)","hsla(275, 90%, 75%, 0.35)"];let lt=JSON.stringify(Array.isArray(Oe)?Oe:Oe?[Oe]:[]);const he=z((se==null?void 0:se.datasource)??{});Me(t,he,we=>n(50,oe=we));const it=we=>{we==null||we.focus()};le.onMount(()=>{ve&&setTimeout(()=>{re.focus(),Ne==null||Ne.focus()},30)});function ot(we){ti.call(this,t,we)}function wt(we){Be[we?"unshift":"push"](()=>{Ne=we,n(16,Ne)})}function Ct(){kt=this.value,n(20,kt)}const ln=we=>{var xe;Ie||n(3,Le[0]=(xe=we.target.value)==null?void 0:xe.trim(),Le),Ae.filterOptions(we.target.value)};function It(we){Be[we?"unshift":"push"](()=>{fe=we,n(15,fe)})}const xt=(we,xe)=>Ae.toggleOption(we),_e=we=>n(19,Te=we),st=()=>n(19,Te=-1);return t.$$set=we=>{"cellOptions"in we&&n(1,se=we.cellOptions),"value"in we&&n(38,Oe=we.value),"fieldSchema"in we&&n(39,be=we.fieldSchema),"multi"in we&&n(0,Ie=we.multi),"autofocus"in we&&n(40,ve=we.autofocus)},t.$$.update=()=>{t.$$.dirty[0]&2&&n(13,{controlType:i,optionsSource:l,valueColumn:r,labelColumn:o,iconColumn:u,colorColumn:s,customOptions:a,optionsViewMode:f,role:c,readonly:g,disabled:h,error:d,color:_,background:b}=se,i,(n(11,l),n(1,se)),(n(45,r),n(1,se)),(n(46,o),n(1,se)),(n(10,u),n(1,se)),(n(44,s),n(1,se)),(n(43,a),n(1,se)),(n(8,f),n(1,se)),(n(30,c),n(1,se)),(n(6,g),n(1,se)),(n(7,h),n(1,se)),(n(29,d),n(1,se)),(n(28,_),n(1,se)),(n(27,b),n(1,se))),t.$$.dirty[0]&2&&he.set(se.datasource),t.$$.dirty[1]&524288&&q(n(12,w=ce(oe))),t.$$.dirty[0]&2048&&l=="data"&&n(41,ke=15),t.$$.dirty[0]&2&&n(47,E=F.buildQuery(se.filter)),t.$$.dirty[0]&8192&&(k=i=="inputSelect"),t.$$.dirty[0]&4098|t.$$.dirty[1]&66560&&se.optionsSource=="data"&&w.update({query:E,sortColumn:se.sortColumn,sortOrder:se.sortOrder,limit:ke}),t.$$.dirty[0]&16384&&re.syncFetch(ie),t.$$.dirty[0]&16384&&re.loadDataOptions(ie==null?void 0:ie.rows),t.$$.dirty[0]&3072|t.$$.dirty[1]&585984&&re.refresh(be,l,o,r,u,s,oe,a),t.$$.dirty[1]&128&&n(3,Le=Array.isArray(Oe)?Oe:Oe?[Oe]:[]),t.$$.dirty[0]&8&&n(26,I=!!(Le.length&&typeof Le[0]=="object")),t.$$.dirty[0]&8&&n(5,O=Le.length<1),t.$$.dirty[1]&262144&&n(9,N=$=="Editing"),t.$$.dirty[0]&520|t.$$.dirty[1]&2048&&n(25,D=N&<!==JSON.stringify(Le)),t.$$.dirty[0]&256&&n(24,M=f=="pills"),t.$$.dirty[0]&1|t.$$.dirty[1]&256&&n(0,Ie=be&&be.type?be.type=="array":Ie),t.$$.dirty[0]&194&&n(23,V=h||g?"":se.placeholder||""),t.$$.dirty[0]&50&&n(22,W=rt&&O?"ph ph-magnifying-glass":se.icon),t.$$.dirty[1]&131072&&n(21,ne=H=="Open")},[Ie,se,re,Le,rt,O,g,h,f,N,u,l,w,i,ie,fe,Ne,ae,Xe,Te,kt,ne,W,V,M,D,I,b,_,d,c,K,te,Ae,Ue,Je,he,it,Oe,be,ve,ke,lt,a,s,r,o,E,H,$,oe,ot,wt,Ct,ln,It,xt,_e,st]}class rl extends Ze{constructor(e){super(),Qe(this,e,kw,bw,Ye,{cellOptions:1,value:38,fieldSchema:39,multi:0,autofocus:40,cellState:2},null,[-1,-1,-1])}get cellState(){return this.$$.ctx[2]}}function cc(t){let e,n;return{c(){e=v("i"),m(e,"class",n=bt(t[14]+" field-icon")+" svelte-cu0nvz"),p(e,"with-error",t[6])},m(i,l){A(i,e,l)},p(i,l){l[0]&16384&&n!==(n=bt(i[14]+" field-icon")+" svelte-cu0nvz")&&m(e,"class",n),l[0]&16448&&p(e,"with-error",i[6])},d(i){i&&C(e)}}}function yw(t){let e,n=(t[0]!=null?t[12]:t[16]||"")+"",i;return{c(){e=v("div"),i=Ee(n),m(e,"class","value"),p(e,"placeholder",!t[0]&&t[0]!==0),P(e,"padding-right","12px"),P(e,"justify-content",t[1].align??"flex-end")},m(l,r){A(l,e,r),S(e,i)},p(l,r){r[0]&69633&&n!==(n=(l[0]!=null?l[12]:l[16]||"")+"")&&Pe(i,n),r[0]&1&&p(e,"placeholder",!l[0]&&l[0]!==0),r[0]&2&&P(e,"justify-content",l[1].align??"flex-end")},d(l){l&&C(e)}}}function Ew(t){let e,n,i,l,r,o,u,s,a=t[15]&&dc(t);return{c(){e=v("input"),i=Q(),l=v("i"),l.innerHTML="",r=Q(),a&&a.c(),o=Fe(),m(e,"class","editor"),e.value=n=t[3]||"",p(e,"placeholder",!t[3]),P(e,"text-align",t[1].align=="flex-start"?"left":t[1].align=="center"?"center":"right "),m(l,"class","ri-close-line clear-icon visible")},m(f,c){A(f,e,c),t[32](e),A(f,i,c),A(f,l,c),A(f,r,c),a&&a.m(f,c),A(f,o,c),u||(s=[B(e,"keydown",t[33]),B(e,"input",t[34]),B(e,"focusout",t[35]),B(e,"wheel",t[36]),tn(Sw.call(null,e)),B(l,"mousedown",Qt(Et(function(){Ge(t[2].clear)&&t[2].clear.apply(this,arguments)})))],u=!0)},p(f,c){t=f,c[0]&8&&n!==(n=t[3]||"")&&e.value!==n&&(e.value=n),c[0]&8&&p(e,"placeholder",!t[3]),c[0]&2&&P(e,"text-align",t[1].align=="flex-start"?"left":t[1].align=="center"?"center":"right "),t[15]?a?a.p(t,c):(a=dc(t),a.c(),a.m(o.parentNode,o)):a&&(a.d(1),a=null)},d(f){f&&(C(e),C(i),C(l),C(r),C(o)),t[32](null),a&&a.d(f),u=!1,Ve(s)}}}function dc(t){let e,n,i,l,r,o;return{c(){e=v("div"),n=v("i"),i=Q(),l=v("i"),m(n,"class","ph ph-minus svelte-cu0nvz"),m(l,"class","ph ph-plus svelte-cu0nvz"),m(e,"class","controls svelte-cu0nvz")},m(u,s){A(u,e,s),S(e,n),S(e,i),S(e,l),r||(o=[B(n,"mousedown",Qt(Et(t[37]))),B(l,"mousedown",Qt(Et(t[38])))],r=!0)},p:ue,d(u){u&&C(e),r=!1,Ve(o)}}}function vw(t){let e,n,i,l,r,o=t[14]&&cc(t);function u(f,c){return f[7]=="Editing"?Ew:yw}let s=u(t),a=s(t);return{c(){e=v("div"),o&&o.c(),n=Q(),a.c(),m(e,"class","superCell"),m(e,"tabindex",i=t[10]?-1:0),p(e,"error",t[6]),p(e,"readonly",t[11]),p(e,"disabled",t[10]),p(e,"inEdit",t[4]),p(e,"isDirty",t[9]&&t[17]),p(e,"inline",t[13]),p(e,"tableCell",t[5]=="tableCell"),p(e,"formInput",t[5]=="formInput"),P(e,"color",t[19]),P(e,"background",t[18])},m(f,c){A(f,e,c),o&&o.m(e,null),S(e,n),a.m(e,null),l||(r=B(e,"focusin",function(){Ge(t[2].focus)&&t[2].focus.apply(this,arguments)}),l=!0)},p(f,c){t=f,t[14]?o?o.p(t,c):(o=cc(t),o.c(),o.m(e,n)):o&&(o.d(1),o=null),s===(s=u(t))&&a?a.p(t,c):(a.d(1),a=s(t),a&&(a.c(),a.m(e,null))),c[0]&1024&&i!==(i=t[10]?-1:0)&&m(e,"tabindex",i),c[0]&64&&p(e,"error",t[6]),c[0]&2048&&p(e,"readonly",t[11]),c[0]&1024&&p(e,"disabled",t[10]),c[0]&16&&p(e,"inEdit",t[4]),c[0]&131584&&p(e,"isDirty",t[9]&&t[17]),c[0]&8192&&p(e,"inline",t[13]),c[0]&32&&p(e,"tableCell",t[5]=="tableCell"),c[0]&32&&p(e,"formInput",t[5]=="formInput"),c[0]&524288&&P(e,"color",t[19]),c[0]&262144&&P(e,"background",t[18])},i:ue,o:ue,d(f){f&&C(e),o&&o.d(),a.d(),l=!1,r()}}}function Sw(t){setTimeout(()=>t==null?void 0:t.focus(),10)}function Cw(t,e,n){let i,l,r,o,u,s,a,f,c,g,h,d,_,b,w,E,k,I,O,D,N,M,V,W,ne,H,$=ue,Y=()=>($(),$=ft(se,de=>n(7,H=de)),se),G;t.$$.on_destroy.push(()=>$());const{processStringSync:oe}=le.getContext("sdk"),ie=le.getContext("context");Me(t,ie,de=>n(31,G=de));const J=le.createEventDispatcher();let{value:q}=e,{cellOptions:j={}}=e,{autofocus:K=!1}=e,x=q??0,X,F,R,z=(j==null?void 0:j.initialState)??"View";function me(de,Xe,Te){if(!de&&de!==0)return"";const Se=de.toFixed(Te??0);if(!Xe)return Se;const Le=Se.split(".");return Le[0]=Le[0].replace(/\B(?=(\d{3})+(?!\d))/g,Xe),Le.join(".")}let{cellState:se=Ft(z??"View",{"*":{goTo(de){return de}},View:{_enter(){const de=Number(q);n(3,x=isNaN(de)?null:de),n(23,F=void 0)},reset(de){if(de==x)return;const Xe=Number(q);return n(3,x=isNaN(Xe)?null:Xe),n(23,F=void 0),z},focus(){if(!i&&!l)return"Editing"}},Editing:{_enter(){X==null||X.focus(),J("enteredit")},_exit(){n(23,F=void 0),J("exitedit")},clear(){g&&J("change",null),n(23,F=new Date),n(3,x=null)},focusout(de){J("focusout",de),this.submit()},submit(){return M&&J("change",Number(x)),z},cancel(){return n(3,x=q),J("cancel"),z},debouncedDispatch(){g&&(clearTimeout(R),R=setTimeout(()=>{J("change",x)},g))},handleKeyboard(de){const Xe=de.target,Te=de.key;if(["Enter","Escape","ArrowLeft","ArrowRight","Tab","ArrowUp","ArrowDown"].includes(Te)){if(Te==="Enter")return this.submit();if(Te==="Escape")return this.cancel();if(Te==="ArrowUp"){de.preventDefault(),this.increment(de);return}if(Te==="ArrowDown"){de.preventDefault(),this.decrement(de);return}return}(Te.length===1&&!/[\d.-]/.test(Te)||Te==="."&&Xe.value.includes(".")||Te==="."&&(w??0)===0||Te==="-"&&(Xe.value.includes("-")||Xe.selectionStart!==0))&&de.preventDefault()},handleInput(de){const Xe=de.target,Te=Xe.value;if(Te!==""&&Te!=="-"&&!/^-?\d*\.?\d*$/.test(Te)){Xe.value=(x==null?void 0:x.toString())??"";return}if(Te.includes(".")&&Te.split(".")[1].length>(w??0)){Xe.value=(x==null?void 0:x.toString())??"";return}n(3,x=Te===""||Te==="-"?0:Number(Te)||0),n(3,x=Number(x.toFixed(w??0))),_!==void 0&&x<_&&n(3,x=_),b!==void 0&&x>b&&n(3,x=b),n(23,F=new Date),this.debouncedDispatch()},increment(de){const Xe=de.shiftKey?10:1;n(3,x+=ne*Xe),b!==void 0&&x>b&&n(3,x=b),n(23,F=new Date),this.debouncedDispatch()},decrement(de){const Xe=de.shiftKey?10:1;n(3,x-=ne*Xe),_!==void 0&&x<_&&n(3,x=_),n(23,F=new Date),this.debouncedDispatch()},handleWheel(de){de.preventDefault(),de.stopPropagation(),de.shiftKey?de.deltaX<0?this.increment(de):this.decrement(de):de.deltaY<0?this.increment(de):this.decrement(de)}}})}=e;Y();const Oe={focus:()=>se.focus(),reset:()=>se.reset(q),isEditing:()=>H==="Editing",isDirty:()=>M,getValue:()=>x,setError:de=>{},clearError:()=>{},setValue:de=>{n(0,q=de)}};le.onMount(()=>{K&&setTimeout(()=>{se.focus(),X==null||X.focus()},50)}),le.onDestroy(()=>{clearTimeout(R)});function be(de){Be[de?"unshift":"push"](()=>{X=de,n(8,X)})}const Ie=de=>se.handleKeyboard(de),ve=de=>se.handleInput(de),fe=de=>se.focusout(de),Ne=de=>se.handleWheel(de),te=de=>se.decrement(de),ae=de=>se.increment(de);return t.$$set=de=>{"value"in de&&n(0,q=de.value),"cellOptions"in de&&n(1,j=de.cellOptions),"autofocus"in de&&n(21,K=de.autofocus),"cellState"in de&&Y(n(2,se=de.cellState))},t.$$.update=()=>{t.$$.dirty[0]&2&&n(11,{readonly:i,disabled:l,error:r,icon:o,color:u,background:s,showDirty:a,template:f,placeholder:c,debounce:g,showStepper:h,stepSize:d,min:_,max:b,decimals:w,thousandsSeparator:E,role:k}=j??{},i,(n(10,l),n(1,j)),(n(30,r),n(1,j)),(n(29,o),n(1,j)),(n(19,u),n(1,j)),(n(18,s),n(1,j)),(n(17,a),n(1,j)),(n(28,f),n(1,j)),(n(16,c),n(1,j)),(n(15,h),n(1,j)),(n(25,d),n(1,j)),(n(24,w),n(1,j)),(n(26,E),n(1,j)),(n(5,k),n(1,j))),t.$$.dirty[0]&1073741824&&n(6,I=r),t.$$.dirty[0]&536870976&&n(14,O=I?"ph ph-warning":o),t.$$.dirty[0]&128&&n(4,D=H==="Editing"),t.$$.dirty[0]&32&&n(13,N=k==="inlineInput"),t.$$.dirty[0]&8388617&&n(9,M=!!F&&q!==x),t.$$.dirty[0]&25&&n(27,V=D?x:q??0),t.$$.dirty[0]&486539265|t.$$.dirty[1]&1&&n(12,W=f?oe(f,{...G,value:q}):me(V,E,w)),t.$$.dirty[0]&33554432&&(ne=d??1),t.$$.dirty[0]&5&&se.reset(q)},[q,j,se,x,D,k,I,H,X,M,l,i,W,N,O,h,c,a,s,u,ie,K,Oe,F,w,d,E,V,f,o,r,G,be,Ie,ve,fe,Ne,te,ae]}class or extends Ze{constructor(e){super(),Qe(this,e,Cw,vw,Ye,{value:0,cellOptions:1,autofocus:21,cellState:2,cellApi:22},null,[-1,-1])}get cellApi(){return this.$$.ctx[22]}}function hc(t){let e,n;return{c(){e=v("i"),m(e,"class",n=bt(t[8]+" field-icon")+" svelte-weopao"),p(e,"with-error",t[7])},m(i,l){A(i,e,l)},p(i,l){l&256&&n!==(n=bt(i[8]+" field-icon")+" svelte-weopao")&&m(e,"class",n),l&384&&p(e,"with-error",i[7])},d(i){i&&C(e)}}}function Aw(t){let e,n,i;function l(u,s){if(u[0])return Dw;if(u[2].showFalse)return Iw}let r=l(t),o=r&&r(t);return{c(){e=v("div"),o&&o.c(),m(e,"class","value"),m(e,"tabindex","0"),p(e,"with-icon",t[2].icon),P(e,"justify-content",t[2].align??"center")},m(u,s){A(u,e,s),o&&o.m(e,null),n||(i=B(e,"focusin",function(){Ge(t[3].focus)&&t[3].focus.apply(this,arguments)}),n=!0)},p(u,s){t=u,r!==(r=l(t))&&(o&&o.d(1),o=r&&r(t),o&&(o.c(),o.m(e,null))),s&4&&p(e,"with-icon",t[2].icon),s&4&&P(e,"justify-content",t[2].align??"center")},d(u){u&&C(e),o&&o.d(),n=!1,i()}}}function Tw(t){let e;function n(r,o){return r[11]?Ow:Rw}let i=n(t),l=i(t);return{c(){e=v("div"),l.c(),m(e,"class","editor"),p(e,"naked-field",!t[10]),P(e,"justify-content",t[2].align??"center")},m(r,o){A(r,e,o),l.m(e,null)},p(r,o){i===(i=n(r))&&l?l.p(r,o):(l.d(1),l=i(r),l&&(l.c(),l.m(e,null))),o&1024&&p(e,"naked-field",!r[10]),o&4&&P(e,"justify-content",r[2].align??"center")},d(r){r&&C(e),l.d()}}}function Iw(t){let e;return{c(){e=v("i"),m(e,"class","ri-close-line valueicon")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function Dw(t){let e;return{c(){e=v("i"),m(e,"class","ri-check-line valueicon")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function Ow(t){let e,n,i,l,r,o,u=t[9]&&gc(t);return{c(){e=v("input"),i=Q(),u&&u.c(),l=Fe(),m(e,"class","checkbox"),m(e,"type","checkbox"),e.disabled=n=t[2].disabled||t[2].readonly},m(s,a){A(s,e,a),e.checked=t[0],t[19](e),A(s,i,a),u&&u.m(s,a),A(s,l,a),r||(o=[B(e,"change",t[18]),B(e,"focusin",function(){Ge(t[3].focus)&&t[3].focus.apply(this,arguments)}),B(e,"focusout",function(){Ge(t[3].submit)&&t[3].submit.apply(this,arguments)}),B(e,"change",function(){Ge(t[3].change)&&t[3].change.apply(this,arguments)}),tn(t[14].call(null,e))],r=!0)},p(s,a){t=s,a&4&&n!==(n=t[2].disabled||t[2].readonly)&&(e.disabled=n),a&1&&(e.checked=t[0]),t[9]?u?u.p(t,a):(u=gc(t),u.c(),u.m(l.parentNode,l)):u&&(u.d(1),u=null)},d(s){s&&(C(e),C(i),C(l)),t[19](null),u&&u.d(s),r=!1,Ve(o)}}}function Rw(t){let e,n,i,l,r,o,u,s,a=t[9]&&mc(t);return{c(){e=v("div"),n=v("input"),l=Q(),r=v("span"),o=Q(),a&&a.c(),m(n,"class","spectrum-Switch-input"),m(n,"type","checkbox"),n.disabled=i=t[2].disabled||t[2].readonly,m(r,"class","spectrum-Switch-switch"),m(e,"class","spectrum-Switch spectrum-Switch--emphasized svelte-weopao")},m(f,c){A(f,e,c),S(e,n),n.checked=t[0],t[17](n),S(e,l),S(e,r),S(e,o),a&&a.m(e,null),u||(s=[B(n,"change",t[16]),B(n,"focusin",function(){Ge(t[3].focus)&&t[3].focus.apply(this,arguments)}),B(n,"focusout",function(){Ge(t[3].submit)&&t[3].submit.apply(this,arguments)}),B(n,"change",function(){Ge(t[3].change)&&t[3].change.apply(this,arguments)}),tn(t[14].call(null,n))],u=!0)},p(f,c){t=f,c&4&&i!==(i=t[2].disabled||t[2].readonly)&&(n.disabled=i),c&1&&(n.checked=t[0]),t[9]?a?a.p(t,c):(a=mc(t),a.c(),a.m(e,null)):a&&(a.d(1),a=null)},d(f){f&&C(e),t[17](null),a&&a.d(),u=!1,Ve(s)}}}function gc(t){let e,n;return{c(){e=v("span"),n=Ee(t[9]),m(e,"class","checkbox-label svelte-weopao")},m(i,l){A(i,e,l),S(e,n)},p(i,l){l&512&&Pe(n,i[9])},d(i){i&&C(e)}}}function mc(t){let e,n;return{c(){e=v("span"),n=Ee(t[9]),m(e,"class","spectrum-Switch-label")},m(i,l){A(i,e,l),S(e,n)},p(i,l){l&512&&Pe(n,i[9])},d(i){i&&C(e)}}}function Pw(t){let e,n,i=t[8]&&hc(t);function l(u,s){return u[5]=="Editing"||u[2].role!="tableCell"&&!u[1]?Tw:Aw}let r=l(t),o=r(t);return{c(){e=v("div"),i&&i.c(),n=Q(),o.c(),m(e,"class","superCell"),p(e,"inEdit",t[4]),p(e,"isDirty",t[12]&&t[2].showDirty),p(e,"inline",t[13]),p(e,"tableCell",t[10]),p(e,"disabled",t[2].disabled),p(e,"readonly",t[2].readonly),p(e,"naked-field",!t[10]),P(e,"color",t[2].color),P(e,"background",t[5]=="Editing"&&t[2].role!="inline"?"var(--spectrum-global-color-gray-50)":t[2].background),P(e,"font-weight",t[2].fontWeight)},m(u,s){A(u,e,s),i&&i.m(e,null),S(e,n),o.m(e,null)},p(u,[s]){u[8]?i?i.p(u,s):(i=hc(u),i.c(),i.m(e,n)):i&&(i.d(1),i=null),r===(r=l(u))&&o?o.p(u,s):(o.d(1),o=r(u),o&&(o.c(),o.m(e,null))),s&16&&p(e,"inEdit",u[4]),s&4100&&p(e,"isDirty",u[12]&&u[2].showDirty),s&8192&&p(e,"inline",u[13]),s&1024&&p(e,"tableCell",u[10]),s&4&&p(e,"disabled",u[2].disabled),s&4&&p(e,"readonly",u[2].readonly),s&1024&&p(e,"naked-field",!u[10]),s&4&&P(e,"color",u[2].color),s&36&&P(e,"background",u[5]=="Editing"&&u[2].role!="inline"?"var(--spectrum-global-color-gray-50)":u[2].background),s&4&&P(e,"font-weight",u[2].fontWeight)},i:ue,o:ue,d(u){u&&C(e),i&&i.d(),o.d()}}}function Mw(t,e,n){let i,l,r,o,u,s,a,f,c,g=ue,h=()=>(g(),g=ft(I,W=>n(5,c=W)),I);t.$$.on_destroy.push(()=>g());let{value:d}=e,{formattedValue:_}=e,{cellOptions:b}=e,w=d,E;const k=le.createEventDispatcher();let{cellState:I=Ft(b.initialState??"View",{"*":{goTo(W){return W}},View:{focus(){if(!b.readonly&&!b.disabled)return"Editing";E==null||E.focus()}},Editing:{_enter(){n(15,w=d),E==null||E.focus(),k("enteredit")},_exit(){k("exitedit")},focus(){E==null||E.focus()},change(W){b.debounce&&k("change",d)},submit(){return d!==w&&k("change",d),k("focusout"),"View"},cancel(){return n(0,d=w),"View"}}})}=e;h();const O=W=>{b.role=="tableCell"&&W.focus()};function D(){d=this.checked,n(0,d)}function N(W){Be[W?"unshift":"push"](()=>{E=W,n(6,E)})}function M(){d=this.checked,n(0,d)}function V(W){Be[W?"unshift":"push"](()=>{E=W,n(6,E)})}return t.$$set=W=>{"value"in W&&n(0,d=W.value),"formattedValue"in W&&n(1,_=W.formattedValue),"cellOptions"in W&&n(2,b=W.cellOptions),"cellState"in W&&h(n(3,I=W.cellState))},t.$$.update=()=>{t.$$.dirty&4&&n(13,i=b.role=="inlineInput"),t.$$.dirty&32&&n(4,l=c=="Editing"),t.$$.dirty&32785&&n(12,r=l&&w!==d),t.$$.dirty&4&&n(11,o=(b==null?void 0:b.controlType)=="checkbox"),t.$$.dirty&4&&n(10,u=b.role=="tableCell"),t.$$.dirty&4&&n(9,s=b.inlineLabel),t.$$.dirty&4&&n(8,a=b.error?"ri-error-warning-line":b.icon),t.$$.dirty&4&&n(7,f=b.error)},[d,_,b,I,l,c,E,f,a,s,u,o,r,i,O,w,D,N,M,V]}class Yo extends Ze{constructor(e){super(),Qe(this,e,Mw,Pw,Ye,{value:0,formattedValue:1,cellOptions:2,cellState:3})}}function _c(t){let e,n,i=("00"+t[0].getHours()).slice(-2)+"",l,r,o,u=("00"+t[0].getMinutes()).slice(-2)+"",s,a,f,c,g=t[1]!=="minute"&&pc(t);return{c(){e=v("div"),n=v("span"),l=Ee(i),r=Ee(`:
|
|
13
|
-
`),o=v("span"),s=Ee(u),a=Q(),g&&g.c(),m(n,"role","spinbutton"),m(n,"aria-label","Hours"),m(n,"tabindex","0"),m(n,"contenteditable",""),m(n,"inputmode","numeric"),m(n,"class","svelte-mzlxg7"),m(o,"role","spinbutton"),m(o,"aria-label","Minutes"),m(o,"tabindex","0"),m(o,"contenteditable",""),m(o,"inputmode","numeric"),m(o,"class","svelte-mzlxg7"),m(e,"class","time-picker svelte-mzlxg7"),m(e,"role","none")},m(h,d){A(h,e,d),S(e,n),S(n,l),t[6](n),S(e,r),S(e,o),S(o,s),t[7](o),S(e,a),g&&g.m(e,null),f||(c=[B(n,"keydown",t[3]),B(n,"input",t[4]),B(n,"focus",qr),B(o,"keydown",t[3]),B(o,"input",t[4]),B(o,"focus",qr),B(e,"mousedown",t[10])],f=!0)},p(h,d){d&1&&i!==(i=("00"+h[0].getHours()).slice(-2)+"")&&cr(l,i),d&1&&u!==(u=("00"+h[0].getMinutes()).slice(-2)+"")&&cr(s,u),h[1]!=="minute"?g?g.p(h,d):(g=pc(h),g.c(),g.m(e,null)):g&&(g.d(1),g=null)},d(h){h&&C(e),t[6](null),t[7](null),g&&g.d(),f=!1,Ve(c)}}}function pc(t){let e,n,i=("00"+t[0].getSeconds()).slice(-2)+"",l,r,o,u,s,a=t[1]!=="second"&&bc(t);return{c(){e=Ee(":"),n=v("span"),l=Ee(i),r=Q(),a&&a.c(),o=Fe(),m(n,"role","spinbutton"),m(n,"aria-label","Seconds"),m(n,"tabindex","0"),m(n,"contenteditable",""),m(n,"inputmode","numeric"),m(n,"class","svelte-mzlxg7")},m(f,c){A(f,e,c),A(f,n,c),S(n,l),t[8](n),A(f,r,c),a&&a.m(f,c),A(f,o,c),u||(s=[B(n,"keydown",t[3]),B(n,"input",t[4]),B(n,"focus",qr)],u=!0)},p(f,c){c&1&&i!==(i=("00"+f[0].getSeconds()).slice(-2)+"")&&cr(l,i),f[1]!=="second"?a?a.p(f,c):(a=bc(f),a.c(),a.m(o.parentNode,o)):a&&(a.d(1),a=null)},d(f){f&&(C(e),C(n),C(r),C(o)),t[8](null),a&&a.d(f),u=!1,Ve(s)}}}function bc(t){let e,n,i=("000"+t[0].getMilliseconds()).slice(-3)+"",l,r,o;return{c(){e=Ee("."),n=v("span"),l=Ee(i),m(n,"role","spinbutton"),m(n,"aria-label","Milliseconds"),m(n,"tabindex","0"),m(n,"contenteditable",""),m(n,"inputmode","numeric"),m(n,"class","svelte-mzlxg7")},m(u,s){A(u,e,s),A(u,n,s),S(n,l),t[9](n),r||(o=[B(n,"keydown",t[3]),B(n,"input",t[4]),B(n,"focus",qr)],r=!0)},p(u,s){s&1&&i!==(i=("000"+u[0].getMilliseconds()).slice(-3)+"")&&cr(l,i)},d(u){u&&(C(e),C(n)),t[9](null),r=!1,Ve(o)}}}function Nw(t){let e,n=t[1]&&_c(t);return{c(){n&&n.c(),e=Fe()},m(i,l){n&&n.m(i,l),A(i,e,l)},p(i,[l]){i[1]?n?n.p(i,l):(n=_c(i),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},i:ue,o:ue,d(i){i&&C(e),n&&n.d(i)}}}function jr(t){const e=window.getSelection(),n=document.createRange();n.selectNodeContents(t),e==null||e.removeAllRanges(),e==null||e.addRange(n)}function Lw(t,e,n){return n&&t<0?e:n&&t>e?0:Math.max(0,Math.min(e,t))}function Ko(t){const e=t.getAttribute("aria-label");if(e==="Hours")return{label:e,len:2,max:23};if(e==="Minutes")return{label:e,len:2,max:59};if(e==="Seconds")return{label:e,len:2,max:59};if(e==="Milliseconds")return{label:e,len:3,max:999};throw new Error("Invalid label "+e)}function Xo(t,e){return parseInt(t.replace(/[^\d]/g,"").slice(-e))}function qr(t){jr(t.currentTarget)}function Fw(t,e,n){let{browseDate:i}=e,{timePrecision:l}=e,{setTime:r}=e,o=[];function u(w){if(w.key==="ArrowUp"||w.key==="ArrowDown"){const E=s(w.currentTarget),k=w.key==="ArrowUp"?1:-1;f(w.currentTarget,E+k,!0),w.preventDefault(),jr(w.currentTarget)}else if(w.key==="ArrowLeft"||w.key==="ArrowRight"||":;-,.".includes(w.key)){const E=o.indexOf(w.currentTarget),k=w.key==="ArrowLeft"?-1:1,I=o[E+k];w.preventDefault(),I&&(I.focus(),jr(I))}}function s(w){const E=Ko(w).label;return E==="Hours"?i.getHours():E==="Minutes"?i.getMinutes():E==="Seconds"?i.getSeconds():i.getMilliseconds()}function a(w){const E=("00"+w.getHours()).slice(-2),k=("00"+w.getMinutes()).slice(-2),I=("00"+w.getSeconds()).slice(-2),O=("000"+w.getMilliseconds()).slice(-3);o[0]&&o[0].innerText!==E&&n(2,o[0].innerText=E,o),o[1]&&o[1].innerText!==k&&n(2,o[1].innerText=k,o),o[2]&&o[2].innerText!==I&&n(2,o[2].innerText=I,o),o[3]&&o[3].innerText!==O&&n(2,o[3].innerText=O,o)}function f(w,E,k=!1){const I=Ko(w);E=Lw(E,I.max,k),I.label==="Hours"?i.setHours(E):I.label==="Minutes"?i.setMinutes(E):I.label==="Seconds"?i.setSeconds(E):I.label==="Milliseconds"&&i.setMilliseconds(E),n(0,i=r(i)),a(i)}function c(w){const E=w,k=Ko(E.currentTarget);let I;if(E.inputType==="insertText"){const O="000"+s(E.currentTarget);I=Xo(O+E.currentTarget.innerText,k.len),I>k.max&&E.data&&(I=Xo(E.data,k.len))}else I=Xo("000"+E.currentTarget.innerText,k.len);f(E.currentTarget,I),jr(E.currentTarget)}function g(w){Be[w?"unshift":"push"](()=>{o[0]=w,n(2,o)})}function h(w){Be[w?"unshift":"push"](()=>{o[1]=w,n(2,o)})}function d(w){Be[w?"unshift":"push"](()=>{o[2]=w,n(2,o)})}function _(w){Be[w?"unshift":"push"](()=>{o[3]=w,n(2,o)})}const b=w=>{w.target instanceof HTMLElement&&w.target.tagName==="SPAN"&&(w.target.focus(),w.preventDefault())};return t.$$set=w=>{"browseDate"in w&&n(0,i=w.browseDate),"timePrecision"in w&&n(1,l=w.timePrecision),"setTime"in w&&n(5,r=w.setTime)},t.$$.update=()=>{t.$$.dirty&1&&a(i)},[i,l,o,u,c,r,g,h,d,_,b]}class Vw extends Ze{constructor(e){super(),Qe(this,e,Fw,Nw,Ye,{browseDate:0,timePrecision:1,setTime:5})}}function Bw(t){return t%4===0&&t%100!==0||t%400===0}function Wr(t,e){return[31,Bw(t)?29:28,31,30,31,30,31,31,30,31,30,31][e]}function Qo(t,e){const n=Wr(t,e),i=[];for(let l=0;l<n;l++)i.push({year:t,month:e,number:l+1});return i}function Uw(t,e){const n=t.getFullYear(),i=t.getMonth(),l=new Date(n,i,1).getDay();let r=[];const o=(l-e+7)%7;if(o>0){let f=i-1,c=n;f===-1&&(f=11,c=n-1),r=Qo(c,f).slice(-o)}r=r.concat(Qo(n,i));let u=i+1,s=n;u===12&&(u=0,s=n+1);const a=42-r.length;return r=r.concat(Qo(s,u).slice(0,a)),r}function wc(t,e){e===null?t.setHours(0,0,0,0):e==="minute"?t.setSeconds(0,0):e==="second"&&t.setMilliseconds(0)}function si(t){return new Date(t)}function Gr(t,e,n,i,l){let r=si(e);return t>e?(Yr(r,-1,n,i,l),r<n&&(r=Kr(r,n,i),Yr(r,1,n,i,l))):r>=t&&(Yr(r,1,n,i,l),r>i&&(r=Kr(r,n,i),Yr(r,-1,n,i,l))),(r<n||r>i)&&(r=Zo(r,n,i)),r}function Yr(t,e,n,i,l){let o=0;for(;l!=null&&l(t)&&t>=n&&t<=i&&o<=36525;)t.setDate(t.getDate()+e),o++}function Zo(t,e,n){return t>n?si(n):t<e?si(e):si(t)}function Kr(t,e,n){const i=Zo(t,e,n);return t=new Date(i.getFullYear(),i.getMonth(),i.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),t>n&&t.setDate(n.getDate()),t<e&&t.setDate(e.getDate()),t}function Hw(){return{weekdays:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekStartsOn:1}}function zw(t){const e=Hw();return typeof t.weekStartsOn=="number"&&(e.weekStartsOn=t.weekStartsOn),t.months&&(e.months=t.months),t.shortMonths&&(e.shortMonths=t.shortMonths),t.weekdays&&(e.weekdays=t.weekdays),e}function kc(t,e,n){const i=t.slice();return i[38]=e[n],i[40]=n,i}function yc(t,e,n){const i=t.slice();return i[41]=e[n],i}function Ec(t,e,n){const i=t.slice();return i[38]=e[n],i[45]=n,i}function vc(t,e,n){const i=t.slice();return i[46]=e[n],i}function Sc(t,e,n){const i=t.slice();return i[46]=e[n],i}function Cc(t,e,n){const i=t.slice();return i[51]=e[n],i[45]=n,i}function Ac(t,e,n){const i=t.slice();return i[51]=e[n],i[45]=n,i}function Tc(t){let e,n=t[51]+"",i,l;return{c(){e=v("option"),i=Ee(n),e.disabled=l=new Date(t[9],t[45],Wr(t[9],t[45]),23,59,59,999)<t[2]||new Date(t[9],t[45])>t[3],e.__value=t[45],Zt(e,e.__value)},m(r,o){A(r,e,o),S(e,i)},p(r,o){o[0]&32&&n!==(n=r[51]+"")&&Pe(i,n),o[0]&588&&l!==(l=new Date(r[9],r[45],Wr(r[9],r[45]),23,59,59,999)<r[2]||new Date(r[9],r[45])>r[3])&&(e.disabled=l)},d(r){r&&C(e)}}}function Ic(t){let e,n=t[51]+"",i,l;return{c(){e=v("option"),i=Ee(n),e.__value=t[45],Zt(e,e.__value),e.selected=l=t[45]===t[8]},m(r,o){A(r,e,o),S(e,i)},p(r,o){o[0]&32&&n!==(n=r[51]+"")&&Pe(i,n),o[0]&256&&l!==(l=r[45]===r[8])&&(e.selected=l)},d(r){r&&C(e)}}}function Dc(t){let e,n=t[46]+"",i,l;return{c(){e=v("option"),i=Ee(n),e.__value=l=t[46],Zt(e,e.__value)},m(r,o){A(r,e,o),S(e,i)},p(r,o){o[0]&64&&n!==(n=r[46]+"")&&Pe(i,n),o[0]&64&&l!==(l=r[46])&&(e.__value=l,Zt(e,e.__value))},d(r){r&&C(e)}}}function Oc(t){let e,n=t[46]+"",i,l,r;return{c(){e=v("option"),i=Ee(n),e.__value=l=t[46],Zt(e,e.__value),e.selected=r=t[46]===t[4].getFullYear()},m(o,u){A(o,e,u),S(e,i)},p(o,u){u[0]&64&&n!==(n=o[46]+"")&&Pe(i,n),u[0]&64&&l!==(l=o[46])&&(e.__value=l,Zt(e,e.__value)),u[0]&80&&r!==(r=o[46]===o[4].getFullYear())&&(e.selected=r)},d(o){o&&C(e)}}}function jw(t){let e,n=t[5].weekdays[t[5].weekStartsOn+t[45]-7]+"",i;return{c(){e=v("div"),i=Ee(n),m(e,"class","header-cell svelte-w239uu")},m(l,r){A(l,e,r),S(e,i)},p(l,r){r[0]&32&&n!==(n=l[5].weekdays[l[5].weekStartsOn+l[45]-7]+"")&&Pe(i,n)},d(l){l&&C(e)}}}function qw(t){let e,n=t[5].weekdays[t[5].weekStartsOn+t[45]]+"",i;return{c(){e=v("div"),i=Ee(n),m(e,"class","header-cell svelte-w239uu")},m(l,r){A(l,e,r),S(e,i)},p(l,r){r[0]&32&&n!==(n=l[5].weekdays[l[5].weekStartsOn+l[45]]+"")&&Pe(i,n)},d(l){l&&C(e)}}}function Rc(t){let e;function n(r,o){return r[45]+r[5].weekStartsOn<7?qw:jw}let i=n(t),l=i(t);return{c(){l.c(),e=Fe()},m(r,o){l.m(r,o),A(r,e,o)},p(r,o){i===(i=n(r))&&l?l.p(r,o):(l.d(1),l=i(r),l&&(l.c(),l.m(e.parentNode,e)))},d(r){r&&C(e),l.d(r)}}}function Pc(t){let e,n,i=t[41].number+"",l,r,o;function u(){return t[29](t[41])}return{c(){e=v("div"),n=v("span"),l=Ee(i),m(n,"class","svelte-w239uu"),m(e,"class","cell svelte-w239uu"),p(e,"disabled",!Jo(t[41],t[2],t[3])||t[12](t[41])),p(e,"selected",t[0]&&t[41].year===t[0].getFullYear()&&t[41].month===t[0].getMonth()&&t[41].number===t[0].getDate()),p(e,"today",t[41].year===t[11].getFullYear()&&t[41].month===t[11].getMonth()&&t[41].number===t[11].getDate()),p(e,"other-month",t[41].month!==t[8])},m(s,a){A(s,e,a),S(e,n),S(n,l),r||(o=B(e,"click",u),r=!0)},p(s,a){t=s,a[0]&128&&i!==(i=t[41].number+"")&&Pe(l,i),a[0]&4236&&p(e,"disabled",!Jo(t[41],t[2],t[3])||t[12](t[41])),a[0]&129&&p(e,"selected",t[0]&&t[41].year===t[0].getFullYear()&&t[41].month===t[0].getMonth()&&t[41].number===t[0].getDate()),a[0]&2176&&p(e,"today",t[41].year===t[11].getFullYear()&&t[41].month===t[11].getMonth()&&t[41].number===t[11].getDate()),a[0]&384&&p(e,"other-month",t[41].month!==t[8])},d(s){s&&C(e),r=!1,o()}}}function Mc(t){let e,n=Ce(t[7].slice(t[40]*7,t[40]*7+7)),i=[];for(let l=0;l<n.length;l+=1)i[l]=Pc(yc(t,n,l));return{c(){e=v("div");for(let l=0;l<i.length;l+=1)i[l].c();m(e,"class","week svelte-w239uu")},m(l,r){A(l,e,r);for(let o=0;o<i.length;o+=1)i[o]&&i[o].m(e,null)},p(l,r){if(r[0]&39309){n=Ce(l[7].slice(l[40]*7,l[40]*7+7));let o;for(o=0;o<n.length;o+=1){const u=yc(l,n,o);i[o]?i[o].p(u,r):(i[o]=Pc(u),i[o].c(),i[o].m(e,null))}for(;o<i.length;o+=1)i[o].d(1);i.length=n.length}},d(l){l&&C(e),St(i,l)}}}function Ww(t){let e,n,i,l,r,o,u,s,a,f,c,g,h,d,_,b,w,E,k,I,O,D,N,M,V,W,ne,H,$,Y,G,oe,ie=Ce(t[5].months),J=[];for(let fe=0;fe<ie.length;fe+=1)J[fe]=Tc(Ac(t,ie,fe));let q=Ce(t[5].months),j=[];for(let fe=0;fe<q.length;fe+=1)j[fe]=Ic(Cc(t,q,fe));let K=Ce(t[6]),x=[];for(let fe=0;fe<K.length;fe+=1)x[fe]=Dc(Sc(t,K,fe));let X=Ce(t[6]),F=[];for(let fe=0;fe<X.length;fe+=1)F[fe]=Oc(vc(t,X,fe));let R=Ce(Array(7)),z=[];for(let fe=0;fe<R.length;fe+=1)z[fe]=Rc(Ec(t,R,fe));let me=Ce(Array(6)),se=[];for(let fe=0;fe<me.length;fe+=1)se[fe]=Mc(kc(t,me,fe));function Oe(fe){t[30](fe)}let be={timePrecision:t[1],setTime:t[10]};t[4]!==void 0&&(be.browseDate=t[4]),ne=new Vw({props:be}),Be.push(()=>Gt(ne,"browseDate",Oe));const Ie=t[23].default,ve=Ut(Ie,t,t[22],null);return{c(){e=v("div"),n=v("div"),i=v("div"),l=v("button"),l.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="svelte-w239uu"><path d="M5 3l3.057-3 11.943 12-11.943 12-3.057-3 9-9z" transform="rotate(180, 12, 12)"></path></svg>',r=Q(),o=v("div"),u=v("select");for(let fe=0;fe<J.length;fe+=1)J[fe].c();s=Q(),a=v("select");for(let fe=0;fe<j.length;fe+=1)j[fe].c();f=Q(),c=vl("svg"),g=vl("path"),h=Q(),d=v("div"),_=v("select");for(let fe=0;fe<x.length;fe+=1)x[fe].c();b=Q(),w=v("select");for(let fe=0;fe<F.length;fe+=1)F[fe].c();E=Q(),k=vl("svg"),I=vl("path"),O=Q(),D=v("button"),D.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="svelte-w239uu"><path d="M5 3l3.057-3 11.943 12-11.943 12-3.057-3 9-9z"></path></svg>',N=Q(),M=v("div");for(let fe=0;fe<z.length;fe+=1)z[fe].c();V=Q();for(let fe=0;fe<se.length;fe+=1)se[fe].c();W=Q(),We(ne.$$.fragment),$=Q(),ve&&ve.c(),m(l,"type","button"),m(l,"aria-label","Previous month"),m(l,"class","page-button svelte-w239uu"),m(l,"tabindex","-1"),m(u,"class","svelte-w239uu"),m(a,"class","dummy-select svelte-w239uu"),m(a,"tabindex","-1"),m(g,"d","M6 0l12 12-12 12z"),m(g,"transform","rotate(90, 12, 12)"),m(c,"xmlns","http://www.w3.org/2000/svg"),m(c,"width","24"),m(c,"height","24"),m(c,"viewBox","0 0 24 24"),m(c,"class","svelte-w239uu"),m(o,"class","dropdown month svelte-w239uu"),m(_,"class","svelte-w239uu"),m(w,"class","dummy-select svelte-w239uu"),m(w,"tabindex","-1"),m(I,"d","M6 0l12 12-12 12z"),m(I,"transform","rotate(90, 12, 12)"),m(k,"xmlns","http://www.w3.org/2000/svg"),m(k,"width","24"),m(k,"height","24"),m(k,"viewBox","0 0 24 24"),m(k,"class","svelte-w239uu"),m(d,"class","dropdown year svelte-w239uu"),m(D,"type","button"),m(D,"aria-label","Next month"),m(D,"class","page-button svelte-w239uu"),m(D,"tabindex","-1"),m(i,"class","top svelte-w239uu"),m(M,"class","header svelte-w239uu"),m(n,"class","tab-container svelte-w239uu"),m(n,"tabindex","-1"),m(e,"class","date-time-picker svelte-w239uu"),m(e,"tabindex","0")},m(fe,Ne){A(fe,e,Ne),S(e,n),S(n,i),S(i,l),S(i,r),S(i,o),S(o,u);for(let te=0;te<J.length;te+=1)J[te]&&J[te].m(u,null);dr(u,t[8]),S(o,s),S(o,a);for(let te=0;te<j.length;te+=1)j[te]&&j[te].m(a,null);S(o,f),S(o,c),S(c,g),S(i,h),S(i,d),S(d,_);for(let te=0;te<x.length;te+=1)x[te]&&x[te].m(_,null);dr(_,t[9]),S(d,b),S(d,w);for(let te=0;te<F.length;te+=1)F[te]&&F[te].m(w,null);S(d,E),S(d,k),S(k,I),S(i,O),S(i,D),S(n,N),S(n,M);for(let te=0;te<z.length;te+=1)z[te]&&z[te].m(M,null);S(n,V);for(let te=0;te<se.length;te+=1)se[te]&&se[te].m(n,null);S(n,W),je(ne,n,null),S(n,$),ve&&ve.m(n,null),Y=!0,G||(oe=[B(l,"click",t[25]),B(u,"keydown",t[17]),B(u,"input",t[26]),B(_,"input",t[27]),B(_,"keydown",t[16]),B(D,"click",t[28]),B(e,"focusout",t[24]),B(e,"keydown",t[18])],G=!0)},p(fe,Ne){if(Ne[0]&556){ie=Ce(fe[5].months);let ae;for(ae=0;ae<ie.length;ae+=1){const de=Ac(fe,ie,ae);J[ae]?J[ae].p(de,Ne):(J[ae]=Tc(de),J[ae].c(),J[ae].m(u,null))}for(;ae<J.length;ae+=1)J[ae].d(1);J.length=ie.length}if((!Y||Ne[0]&256)&&dr(u,fe[8]),Ne[0]&288){q=Ce(fe[5].months);let ae;for(ae=0;ae<q.length;ae+=1){const de=Cc(fe,q,ae);j[ae]?j[ae].p(de,Ne):(j[ae]=Ic(de),j[ae].c(),j[ae].m(a,null))}for(;ae<j.length;ae+=1)j[ae].d(1);j.length=q.length}if(Ne[0]&64){K=Ce(fe[6]);let ae;for(ae=0;ae<K.length;ae+=1){const de=Sc(fe,K,ae);x[ae]?x[ae].p(de,Ne):(x[ae]=Dc(de),x[ae].c(),x[ae].m(_,null))}for(;ae<x.length;ae+=1)x[ae].d(1);x.length=K.length}if((!Y||Ne[0]&576)&&dr(_,fe[9]),Ne[0]&80){X=Ce(fe[6]);let ae;for(ae=0;ae<X.length;ae+=1){const de=vc(fe,X,ae);F[ae]?F[ae].p(de,Ne):(F[ae]=Oc(de),F[ae].c(),F[ae].m(w,null))}for(;ae<F.length;ae+=1)F[ae].d(1);F.length=X.length}if(Ne[0]&32){R=Ce(Array(7));let ae;for(ae=0;ae<R.length;ae+=1){const de=Ec(fe,R,ae);z[ae]?z[ae].p(de,Ne):(z[ae]=Rc(de),z[ae].c(),z[ae].m(M,null))}for(;ae<z.length;ae+=1)z[ae].d(1);z.length=R.length}if(Ne[0]&39309){me=Ce(Array(6));let ae;for(ae=0;ae<me.length;ae+=1){const de=kc(fe,me,ae);se[ae]?se[ae].p(de,Ne):(se[ae]=Mc(de),se[ae].c(),se[ae].m(n,W))}for(;ae<se.length;ae+=1)se[ae].d(1);se.length=me.length}const te={};Ne[0]&2&&(te.timePrecision=fe[1]),!H&&Ne[0]&16&&(H=!0,te.browseDate=fe[4],Wt(()=>H=!1)),ne.$set(te),ve&&ve.p&&(!Y||Ne[0]&4194304)&&zt(ve,Ie,fe,fe[22],Y?Ht(Ie,fe[22],Ne,null):jt(fe[22]),null)},i(fe){Y||(U(ne.$$.fragment,fe),U(ve,fe),Y=!0)},o(fe){Z(ne.$$.fragment,fe),Z(ve,fe),Y=!1},d(fe){fe&&C(e),St(J,fe),St(j,fe),St(x,fe),St(F,fe),St(z,fe),St(se,fe),qe(ne),ve&&ve.d(fe),G=!1,Ve(oe)}}}function Jo(t,e,n){const i=new Date(t.year,t.month,t.number),l=new Date(e.getFullYear(),e.getMonth(),e.getDate()),r=new Date(n.getFullYear(),n.getMonth(),n.getDate());return i>=l&&i<=r}function Gw(t,e,n){let i,l,r,o,{$$slots:u={},$$scope:s}=e;const a=le.createEventDispatcher();let{value:f=null}=e;function c(R){R.getTime()!==(f==null?void 0:f.getTime())&&(n(4,O=Gr(f??O,R,w,E,k)),wc(O,b),n(0,f=si(O)))}function g(R){n(4,O=Kr(R,w,E)),!W&&f&&c(O)}function h(R){return n(4,O=Zo(R,w,E)),f&&c(O),O}const d=new Date,_=new Date;let{timePrecision:b=null}=e,{min:w=new Date(_.getFullYear()-20,0,1)}=e,{max:E=new Date(_.getFullYear(),11,31,23,59,59,999)}=e,{isDisabledDate:k=null}=e;function I(R){return k==null?void 0:k(new Date(R.year,R.month,R.number))}let O=si(f||Kr(_,w,E));function D(R){O.getTime()!==(R==null?void 0:R.getTime())&&(n(4,O=R?si(R):O),wc(O,b))}let N=M(w,E);function M(R,z){let me=[];for(let se=R.getFullYear();se<=z.getFullYear();se++)me.push(se);return me}let{locale:V={}}=e,{browseWithoutSelecting:W=!1}=e;function ne(R){O.setFullYear(R),g(O)}function H(R){let z=O.getFullYear();R===12?(R=0,z++):R===-1&&(R=11,z--);const me=Wr(z,R),se=Math.min(O.getDate(),me);g(new Date(z,R,se,O.getHours(),O.getMinutes(),O.getSeconds(),O.getMilliseconds()))}function $(R){Jo(R,w,E)&&!I(R)&&(O.setFullYear(0),O.setMonth(0),O.setDate(1),O.setFullYear(R.year),O.setMonth(R.month),O.setDate(R.number),c(O),a("select",si(O)))}function Y(R){if(R.shiftKey&&R.key==="ArrowUp")ne(O.getFullYear()-1);else if(R.shiftKey&&R.key==="ArrowDown")ne(O.getFullYear()+1);else if(R.shiftKey&&R.key==="ArrowLeft")H(O.getMonth()-1);else if(R.shiftKey&&R.key==="ArrowRight")H(O.getMonth()+1);else return!1;return R.preventDefault(),!0}function G(R){if(R.shiftKey||R.altKey){Y(R);return}else if(R.key==="ArrowUp")ne(O.getFullYear()-1);else if(R.key==="ArrowDown")ne(O.getFullYear()+1);else if(R.key==="ArrowLeft")H(O.getMonth()-1);else if(R.key==="ArrowRight")H(O.getMonth()+1);else{Y(R);return}R.preventDefault()}function oe(R){if(R.shiftKey||R.altKey){Y(R);return}else if(R.key==="ArrowUp"||R.key==="ArrowLeft")H(O.getMonth()-1);else if(R.key==="ArrowDown"||R.key==="ArrowRight")H(O.getMonth()+1);else{Y(R);return}R.preventDefault()}function ie(R){var me,se;let z=R.shiftKey||R.altKey;if(!(((me=R.target)==null?void 0:me.tagName)==="SELECT"||((se=R.target)==null?void 0:se.tagName)==="SPAN")){if(z){Y(R);return}else if(R.key==="ArrowUp")O.setDate(O.getDate()-7),c(O);else if(R.key==="ArrowDown")O.setDate(O.getDate()+7),c(O);else if(R.key==="ArrowLeft")O.setDate(O.getDate()-1),c(O);else if(R.key==="ArrowRight")O.setDate(O.getDate()+1),c(O);else if(R.key==="Enter")c(O),a("select",si(O));else return;R.preventDefault()}}function J(R){ti.call(this,t,R)}const q=()=>H(O.getMonth()-1),j=R=>H(parseInt(R.currentTarget.value)),K=R=>ne(parseInt(R.currentTarget.value)),x=()=>H(O.getMonth()+1),X=R=>$(R);function F(R){O=R,n(4,O)}return t.$$set=R=>{"value"in R&&n(0,f=R.value),"timePrecision"in R&&n(1,b=R.timePrecision),"min"in R&&n(2,w=R.min),"max"in R&&n(3,E=R.max),"isDisabledDate"in R&&n(19,k=R.isDisabledDate),"locale"in R&&n(20,V=R.locale),"browseWithoutSelecting"in R&&n(21,W=R.browseWithoutSelecting),"$$scope"in R&&n(22,s=R.$$scope)},t.$$.update=()=>{t.$$.dirty[0]&524317&&(f&&f>E?c(Gr(f,E,w,E,k)):f&&f<w?c(Gr(f,w,w,E,k)):f&&(k!=null&&k(f))&&c(Gr(O,f,w,E,k))),t.$$.dirty[0]&1&&D(f),t.$$.dirty[0]&12&&n(6,N=M(w,E)),t.$$.dirty[0]&1048576&&n(5,i=zw(V)),t.$$.dirty[0]&16&&n(9,l=O.getFullYear()),t.$$.dirty[0]&16&&n(8,r=O.getMonth()),t.$$.dirty[0]&48&&n(7,o=Uw(O,i.weekStartsOn))},[f,b,w,E,O,i,N,o,r,l,h,d,I,ne,H,$,G,oe,ie,k,V,W,s,u,J,q,j,K,x,X,F]}class xo extends Ze{constructor(e){super(),Qe(this,e,Gw,Ww,Ye,{value:0,timePrecision:1,min:2,max:3,isDisabledDate:19,locale:20,browseWithoutSelecting:21},null,[-1,-1])}}function Nc(t){let e,n;return{c(){e=v("i"),m(e,"class",n=bt(t[2].icon+" icon")+" svelte-1bwhbmd")},m(i,l){A(i,e,l)},p(i,l){l&4&&n!==(n=bt(i[2].icon+" icon")+" svelte-1bwhbmd")&&m(e,"class",n)},d(i){i&&C(e)}}}function Yw(t){let e,n,i=(t[1]||t[13])+"",l;return{c(){e=v("div"),n=v("span"),l=Ee(i),m(e,"class","value"),p(e,"with-icon",t[2].icon),p(e,"placeholder",!t[1]),P(e,"justify-content",t[2].align)},m(r,o){A(r,e,o),S(e,n),S(n,l)},p(r,o){o&8194&&i!==(i=(r[1]||r[13])+"")&&Pe(l,i),o&4&&p(e,"with-icon",r[2].icon),o&2&&p(e,"placeholder",!r[1]),o&4&&P(e,"justify-content",r[2].align)},d(r){r&&C(e)}}}function Kw(t){let e,n=(t[1]||t[13])+"",i,l,r,o,u;return{c(){e=v("div"),i=Ee(n),l=Q(),r=v("i"),m(r,"class","ri-calendar-line"),P(r,"font-size","16px"),P(r,"justify-self","flex-end"),m(e,"class","editor"),p(e,"with-icon",t[2].icon),p(e,"placeholder",!t[1])},m(s,a){A(s,e,a),S(e,i),S(e,l),S(e,r),o||(u=B(e,"click",t[20]),o=!0)},p(s,a){a&8194&&n!==(n=(s[1]||s[13])+"")&&Pe(i,n),a&4&&p(e,"with-icon",s[2].icon),a&2&&p(e,"placeholder",!s[1])},d(s){s&&C(e),o=!1,u()}}}function Lc(t){let e,n;return e=new wn({props:{anchor:t[7],dismissible:!1,open:t[10],align:"right",maxHeight:400,$$slots:{default:[Xw]},$$scope:{ctx:t}}}),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l&128&&(r.anchor=i[7]),l&1024&&(r.open=i[10]),l&1073760209&&(r.$$scope={dirty:l,ctx:i}),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function Fc(t){let e,n,i,l;return{c(){e=v("div"),n=v("input"),m(n,"type","time"),m(n,"class","time-input svelte-1bwhbmd"),m(n,"step","900"),m(e,"class","time-section svelte-1bwhbmd")},m(r,o){A(r,e,o),S(e,n),t[24](n),Zt(n,t[14]),i||(l=[B(n,"input",t[25]),B(n,"change",t[15])],i=!0)},p(r,o){o&16384&&Zt(n,r[14])},d(r){r&&C(e),t[24](null),i=!1,Ve(l)}}}function Xw(t){let e,n,i,l,r;function o(a){t[22](a)}let u={};t[6]!==void 0&&(u.value=t[6]),n=new xo({props:u}),Be.push(()=>Gt(n,"value",o)),n.$on("select",t[23]);let s=t[4]&&Fc(t);return{c(){e=v("div"),We(n.$$.fragment),l=Q(),s&&s.c(),m(e,"class","datetime-picker-container svelte-1bwhbmd"),P(e,"--date-picker-background","var(--spectrum-global-color-gray-75)"),P(e,"--date-picker-foreground","var(--spectrum-global-color-gray-800)"),P(e,"--date-picker-selected-background","var(--accent-color)")},m(a,f){A(a,e,f),je(n,e,null),S(e,l),s&&s.m(e,null),t[26](e),r=!0},p(a,f){const c={};!i&&f&64&&(i=!0,c.value=a[6],Wt(()=>i=!1)),n.$set(c),a[4]?s?s.p(a,f):(s=Fc(a),s.c(),s.m(e,null)):s&&(s.d(1),s=null)},i(a){r||(U(n.$$.fragment,a),r=!0)},o(a){Z(n.$$.fragment,a),r=!1},d(a){a&&C(e),qe(n),s&&s.d(),t[26](null)}}}function Qw(t){let e,n,i,l,r,o,u,s,a=t[2].icon&&Nc(t);function f(d,_){return d[5]?Kw:Yw}let c=f(t),g=c(t),h=t[5]&&Lc(t);return{c(){e=v("div"),a&&a.c(),n=Q(),g.c(),l=Q(),h&&h.c(),r=Fe(),m(e,"class","superCell"),m(e,"tabindex",i=t[2].readonly||t[2].disabled?"-1":"0"),p(e,"inEdit",t[5]),p(e,"isDirty",t[11]&&t[2].showDirty),p(e,"inline",t[12]),p(e,"tableCell",t[2].role=="tableCell"),p(e,"formInput",t[2].role=="formInput"),p(e,"disabled",t[2].disabled),p(e,"readonly",t[2].readonly),p(e,"error",t[2].error),P(e,"color",t[2].color),P(e,"background",t[2].background),P(e,"font-weight",t[2].fontWeight)},m(d,_){A(d,e,_),a&&a.m(e,null),S(e,n),g.m(e,null),t[21](e),A(d,l,_),h&&h.m(d,_),A(d,r,_),o=!0,u||(s=[B(e,"focus",function(){Ge(t[3].focus)&&t[3].focus.apply(this,arguments)}),B(e,"keypress",function(){Ge(t[3].handleKeyboard)&&t[3].handleKeyboard.apply(this,arguments)}),B(e,"focusout",function(){Ge(t[3].focusout)&&t[3].focusout.apply(this,arguments)})],u=!0)},p(d,[_]){t=d,t[2].icon?a?a.p(t,_):(a=Nc(t),a.c(),a.m(e,n)):a&&(a.d(1),a=null),c===(c=f(t))&&g?g.p(t,_):(g.d(1),g=c(t),g&&(g.c(),g.m(e,null))),(!o||_&4&&i!==(i=t[2].readonly||t[2].disabled?"-1":"0"))&&m(e,"tabindex",i),(!o||_&32)&&p(e,"inEdit",t[5]),(!o||_&2052)&&p(e,"isDirty",t[11]&&t[2].showDirty),(!o||_&4096)&&p(e,"inline",t[12]),(!o||_&4)&&p(e,"tableCell",t[2].role=="tableCell"),(!o||_&4)&&p(e,"formInput",t[2].role=="formInput"),(!o||_&4)&&p(e,"disabled",t[2].disabled),(!o||_&4)&&p(e,"readonly",t[2].readonly),(!o||_&4)&&p(e,"error",t[2].error),_&4&&P(e,"color",t[2].color),_&4&&P(e,"background",t[2].background),_&4&&P(e,"font-weight",t[2].fontWeight),t[5]?h?(h.p(t,_),_&32&&U(h,1)):(h=Lc(t),h.c(),U(h,1),h.m(r.parentNode,r)):h&&(He(),Z(h,1,1,()=>{h=null}),ze())},i(d){o||(U(h),o=!0)},o(d){Z(h),o=!1},d(d){d&&(C(e),C(l),C(r)),a&&a.d(),g.d(),t[21](null),h&&h.d(d),u=!1,Ve(s)}}}function Zw(t,e){if(!t)return"";if(!e||e==="default")return t==null?void 0:t.toDateString();if(e==="MM/DD/YYYY")return`${(t.getMonth()+1).toString().padStart(2,"0")}/${t.getDate().toString().padStart(2,"0")}/${t.getFullYear()}`;if(e==="DD/MM/YYYY")return`${t.getDate().toString().padStart(2,"0")}/${(t.getMonth()+1).toString().padStart(2,"0")}/${t.getFullYear()}`;if(e==="YYYY-MM-DD")return`${t.getFullYear()}-${(t.getMonth()+1).toString().padStart(2,"0")}-${t.getDate().toString().padStart(2,"0")}`;const i={"MMM DD, YYYY":{month:"short",day:"numeric",year:"numeric",timeZone:"UTC"},"DD MMM YYYY":{day:"numeric",month:"short",year:"numeric",timeZone:"UTC"}}[e];return i?t.toLocaleDateString("en-US",i):t==null?void 0:t.toDateString()}function Jw(t,e,n){let i,l,r,o,u,s,a,f,c,g=ue,h=()=>(g(),g=ft(O,q=>n(19,c=q)),O);t.$$.on_destroy.push(()=>g());const d=new le.createEventDispatcher,{processStringSync:_}=le.getContext("sdk");let{value:b}=e,{formattedValue:w}=e,{cellOptions:E}=e,{autofocus:k}=e,I,{cellState:O=Ft("View",{"*":{goTo(q){return q}},View:{focus(){if(!E.readonly)return"Editing"}},Editing:{_enter(){n(17,I=b),n(10,V=!0),d("enteredit")},_exit(){d("exitedit")},handleKeyboard(q){q.keyCode==32&&(q.stopPropagation(),q.preventDefault(),n(10,V=!V))},focusout(q){const j=N==null?void 0:N.contains(q.relatedTarget),K=M==null?void 0:M.contains(q.relatedTarget);if(!j&&!K)return n(10,V=!1),b!=I&&d("change",b),"View"},cancel(){return n(0,b=Array.isArray(I)?[...I]:I),"View"}}})}=e;h();let D,N,M,V;function W(){if(!b)return"00:00";const q=new Date(b);return`${q.getHours().toString().padStart(2,"0")}:${q.getMinutes().toString().padStart(2,"0")}`}le.onMount(()=>{k&&setTimeout(()=>{O.focus(),editor==null||editor.focus()},30)});const ne=q=>{if(!b||!l)return;const j=q.target.value,K=new Date(b),[x,X]=j.split(":").map(Number);K.setHours(x,X,0,0),n(0,b=K.toISOString()),d("change",b)},H=()=>n(10,V=!V);function $(q){Be[q?"unshift":"push"](()=>{D=q,n(7,D)})}function Y(q){o=q,n(6,o),n(0,b)}const G=q=>{n(0,b=q.detail),D==null||D.focus(),n(10,V=!1)};function oe(q){Be[q?"unshift":"push"](()=>{M=q,n(9,M)})}function ie(){r=this.value,n(14,r),n(4,l),n(0,b),n(2,E)}function J(q){Be[q?"unshift":"push"](()=>{N=q,n(8,N)})}return t.$$set=q=>{"value"in q&&n(0,b=q.value),"formattedValue"in q&&n(1,w=q.formattedValue),"cellOptions"in q&&n(2,E=q.cellOptions),"autofocus"in q&&n(16,k=q.autofocus),"cellState"in q&&h(n(3,O=q.cellState))},t.$$.update=()=>{t.$$.dirty&4&&n(18,i=E==null?void 0:E.dateFormat),t.$$.dirty&4&&n(4,l=E==null?void 0:E.showTime),t.$$.dirty&17&&n(14,r=l&&b?W():"00:00"),t.$$.dirty&1&&n(6,o=b?new Date(b):new Date),t.$$.dirty&262213&&n(1,w=E.template&&b?_(E.template,{value:b}):b?Zw(o,i):""),t.$$.dirty&4&&n(13,u=(E==null?void 0:E.placeholder)||""),t.$$.dirty&524288&&n(5,s=c=="Editing"),t.$$.dirty&4&&n(12,a=E.role=="inlineInpur"),t.$$.dirty&131105&&n(11,f=s&&I!=b)},[b,w,E,O,l,s,o,D,N,M,V,f,a,u,r,ne,k,I,i,c,H,$,Y,G,oe,ie,J]}class $o extends Ze{constructor(e){super(),Qe(this,e,Jw,Qw,Ye,{value:0,formattedValue:1,cellOptions:2,autofocus:16,cellState:3})}}function Vc(t,e,n){const i=t.slice();return i[42]=e[n],i[41]=n,i}function Bc(t,e,n){const i=t.slice();return i[39]=e[n],i[41]=n,i}function Uc(t,e,n){const i=t.slice();return i[42]=e[n],i[41]=n,i}function Hc(t){let e;function n(r,o){return r[0]?$w:xw}let i=n(t),l=i(t);return{c(){l.c(),e=Fe()},m(r,o){l.m(r,o),A(r,e,o)},p(r,o){i===(i=n(r))&&l?l.p(r,o):(l.d(1),l=i(r),l&&(l.c(),l.m(e.parentNode,e)))},d(r){r&&C(e),l.d(r)}}}function xw(t){let e,n,i,l=t[8],r,o,u=qc(t);return{c(){e=v("div"),n=v("div"),i=v("div"),u.c(),m(i,"class","options svelte-vbrqk3"),m(n,"class","list svelte-vbrqk3"),m(e,"class","listWrapper svelte-vbrqk3")},m(s,a){A(s,e,a),S(e,n),S(n,i),u.m(i,null),t[30](n),r||(o=[B(n,"scroll",t[14]),B(e,"mousedown",Et(fk))],r=!0)},p(s,a){a[0]&256&&Ye(l,l=s[8])?(u.d(1),u=qc(s),u.c(),u.m(i,null)):u.p(s,a)},d(s){s&&C(e),u.d(s),t[30](null),r=!1,Ve(o)}}}function $w(t){let e,n,i,l=t[8],r,o,u,s,a,f=Kc(t);function c(d,_){return d[8].length?sk:ok}let g=c(t),h=g(t);return{c(){e=v("div"),n=v("div"),i=v("div"),f.c(),r=Q(),o=v("div"),u=v("div"),h.c(),m(i,"class","options svelte-vbrqk3"),m(n,"class","list svelte-vbrqk3"),m(u,"class","options svelte-vbrqk3"),m(o,"class","list listSelected svelte-vbrqk3"),m(e,"class","listWrapper svelte-vbrqk3")},m(d,_){A(d,e,_),S(e,n),S(n,i),f.m(i,null),t[27](n),S(e,r),S(e,o),S(o,u),h.m(u,null),s||(a=[B(n,"scroll",t[14]),B(e,"mousedown",Et(ak))],s=!0)},p(d,_){_[0]&256&&Ye(l,l=d[8])?(f.d(1),f=Kc(d),f.c(),f.m(i,null)):f.p(d,_),g===(g=c(d))&&h?h.p(d,_):(h.d(1),h=g(d),h&&(h.c(),h.m(u,null)))},d(d){d&&C(e),f.d(d),t[27](null),h.d(),s=!1,Ve(a)}}}function ek(t){let e;return{c(){e=v("div"),e.textContent="No Results Found",m(e,"class","option svelte-vbrqk3")},m(n,i){A(n,e,i)},p:ue,d(n){n&&C(e)}}}function tk(t){let e;return{c(){e=v("div"),e.innerHTML=`<i class="ri-loader-2-line rotating"></i>
|
|
14
|
-
|
|
15
|
-
Loading more...`,m(e,"class","option loading svelte-vbrqk3")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function qc(t){let e;function n(r,o){var u,s,a,f,c;return(s=(u=r[3])==null?void 0:u.rows)!=null&&s.length||(a=r[3])!=null&&a.loading&&!((f=r[3])!=null&&f.loaded)?nk:(c=r[3])!=null&&c.loading?tk:ek}let i=n(t),l=i(t);return{c(){l.c(),e=Fe()},m(r,o){l.m(r,o),A(r,e,o)},p(r,o){i===(i=n(r))&&l?l.p(r,o):(l.d(1),l=i(r),l&&(l.c(),l.m(e.parentNode,e)))},d(r){r&&C(e),l.d(r)}}}function ik(t){let e;return{c(){e=v("div"),e.textContent="No Results Found",m(e,"class","option wide svelte-vbrqk3")},m(n,i){A(n,e,i)},p:ue,d(n){n&&C(e)}}}function lk(t){let e;return{c(){e=v("div"),e.innerHTML=`<i class="ri-loader-2-line rotating"></i>
|
|
16
|
-
|
|
17
|
-
Loading more...`,m(e,"class","option wide loading svelte-vbrqk3")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function Kc(t){let e;function n(r,o){var u,s,a,f;return(s=(u=r[3])==null?void 0:u.rows)!=null&&s.length||(a=r[3])!=null&&a.loading&&!1?rk:(f=r[3])!=null&&f.loading?lk:ik}let i=n(t),l=i(t);return{c(){l.c(),e=Fe()},m(r,o){l.m(r,o),A(r,e,o)},p(r,o){i===(i=n(r))&&l?l.p(r,o):(l.d(1),l=i(r),l&&(l.c(),l.m(e.parentNode,e)))},d(r){r&&C(e),l.d(r)}}}function ok(t){let e;return{c(){e=v("span"),e.textContent="Nothing Selected",m(e,"class","svelte-vbrqk3")},m(n,i){A(n,e,i)},p:ue,d(n){n&&C(e)}}}function sk(t){let e=[],n=new Map,i,l=Ce(t[8]);const r=o=>o[41];for(let o=0;o<l.length;o+=1){let u=Bc(t,l,o),s=r(u);n.set(s,e[o]=Qc(s,u))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();i=Fe()},m(o,u){for(let s=0;s<e.length;s+=1)e[s]&&e[s].m(o,u);A(o,i,u)},p(o,u){u[0]&5376&&(l=Ce(o[8]),e=Tt(e,u,r,1,o,l,n,i.parentNode,nn,Qc,i,Bc))},d(o){o&&C(i);for(let u=0;u<e.length;u+=1)e[u].d(o)}}}function Xc(t){let e,n=t[39].primaryDisplay+"",i,l,r,o,u,s,a,f;return{c(){e=v("div"),i=Ee(n),l=Q(),r=v("i"),o=Q(),m(r,"class","ri-close-line"),m(e,"class","option wide selected svelte-vbrqk3")},m(c,g){A(c,e,g),S(e,i),S(e,l),S(e,r),S(e,o),s=!0,a||(f=B(e,"mousedown",Qt(Et(function(){Ge(t[12](t[39]))&&t[12](t[39]).apply(this,arguments)}))),a=!0)},p(c,g){t=c,(!s||g[0]&256)&&n!==(n=t[39].primaryDisplay+"")&&Pe(i,n)},i(c){s||(c&&ni(()=>{s&&(u||(u=Il(e,zr,{x:-20,duration:130},!0)),u.run(1))}),s=!0)},o(c){c&&(u||(u=Il(e,zr,{x:-20,duration:130},!1)),u.run(0)),s=!1},d(c){c&&C(e),c&&u&&u.end(),a=!1,f()}}}function Qc(t,e){let n,i=e[10](e[39]),l,r=i&&Xc(e);return{key:t,first:null,c(){n=Fe(),r&&r.c(),l=Fe(),this.first=n},m(o,u){A(o,n,u),r&&r.m(o,u),A(o,l,u)},p(o,u){e=o,u[0]&256&&(i=e[10](e[39])),i?r?(r.p(e,u),u[0]&256&&U(r,1)):(r=Xc(e),r.c(),U(r,1),r.m(l.parentNode,l)):r&&(He(),Z(r,1,1,()=>{r=null}),ze())},d(o){o&&(C(n),C(l)),r&&r.d(o)}}}function uk(t){var g;let e,n,i,l,r,o,u,s,a,f,c=((g=t[3])==null?void 0:g.rows)&&Hc(t);return{c(){var h,d,_,b;e=v("div"),n=v("div"),i=v("i"),r=Q(),o=v("input"),s=Q(),c&&c.c(),m(i,"class",l=t[3].loading&&Xr?"ri-loader-2-line":(h=t[4])!=null&&h.value?"ri-filter-fill":"ri-search-line"),P(i,"color",t[5]?"var(--spectrum-global-color-blue-400)":"var(--spectrum-global-color-gray-700)"),m(o,"class","search"),m(o,"type","text"),m(o,"placeholder",u=(d=t[3])!=null&&d.loading&&!((b=(_=t[3])==null?void 0:_.rows)!=null&&b.length)&&Xr?"Loading...":"Search"),p(o,"placeholder",!t[5]),m(n,"class","searchControl svelte-vbrqk3"),m(e,"class","control svelte-vbrqk3")},m(h,d){A(h,e,d),S(e,n),S(n,i),S(n,r),S(n,o),t[23](o),S(e,s),c&&c.m(e,null),a||(f=[B(o,"input",t[13]),B(o,"keydown",t[15]),B(o,"blur",t[24])],a=!0)},p(h,d){var _,b,w,E,k;d[0]&24&&l!==(l=h[3].loading&&Xr?"ri-loader-2-line":(_=h[4])!=null&&_.value?"ri-filter-fill":"ri-search-line")&&m(i,"class",l),d[0]&32&&P(i,"color",h[5]?"var(--spectrum-global-color-blue-400)":"var(--spectrum-global-color-gray-700)"),d[0]&8&&u!==(u=(b=h[3])!=null&&b.loading&&!((E=(w=h[3])==null?void 0:w.rows)!=null&&E.length)&&Xr?"Loading...":"Search")&&m(o,"placeholder",u),d[0]&32&&p(o,"placeholder",!h[5]),(k=h[3])!=null&&k.rows?c?c.p(h,d):(c=Hc(h),c.c(),c.m(e,null)):c&&(c.d(1),c=null)},i:ue,o:ue,d(h){h&&C(e),t[23](null),c&&c.d(),a=!1,Ve(f)}}}let Xr=!0;const ak=()=>{},fk=()=>{};function ck(t,e,n){let i,l,r,o,u,s,a=ue,f=()=>(a(),a=ft(o,z=>n(3,s=z)),o);t.$$.on_destroy.push(()=>a());const{API:c,fetchData:g}=le.getContext("sdk"),h=le.createEventDispatcher();let{value:d=[]}=e,{fieldSchema:_}=e,{filter:b=[]}=e,{wide:w=!1}=e,{singleSelect:E}=e,k=_.tableId,I=[],O=-1,D,N,M=15,V;const W=z=>{if(d)return d.find(se=>se._id==z._id)},ne=z=>{var me;if(E)((me=r[0])==null?void 0:me._id)==z._id?n(8,r=[]):n(8,r=[{_id:z._id,primaryDisplay:z[u]}]);else{let se=r.findIndex(Oe=>Oe._id==z._id);se>-1?(r.splice(se,1),n(8,r),n(16,d)):(r.push({_id:z._id,primaryDisplay:z[u]}),n(8,r),n(16,d))}h("change",r)},H=z=>{r.splice(r.findIndex(me=>me._id===z._id),1),n(8,r),n(16,d),h("change",r)},$=z=>{n(5,N=z.target.value),z.target.value?I=[...b,{field:u,type:"string",operator:"fuzzy",value:z.target.value,valueType:"Value"}]:I=b??[],o==null||o.update({filter:I})},Y=()=>{s!=null&&s.loading||s.rows.length<M||(M+=100,o==null||o.update({limit:M}))},G=z=>{const me=z.target,se=me.scrollTop,Oe=me.scrollHeight,be=me.clientHeight;se+be>=Oe-50&&Y()},oe=z=>{z.key=="ArrowDown"?(z.preventDefault(),n(1,O+=1),O>s.rows.length-1&&n(1,O=0)):z.key=="ArrowUp"?(z.preventDefault(),n(1,O-=1),O<0&&n(1,O=s.rows.length-1)):z.key=="Enter"&&O>-1&&ne(s.rows[O]),(z.key=="Tab"||z.key=="Escape")&&h("close")},ie={focus:()=>{D==null||D.focus()},hasFocus:()=>document.activeElement===D};function J(z){Be[z?"unshift":"push"](()=>{D=z,n(4,D)})}const q=()=>h("close"),j=z=>n(1,O=z),K=()=>n(1,O=-1);function x(z){Be[z?"unshift":"push"](()=>{V=z,n(2,V)})}const X=z=>n(1,O=z),F=()=>n(1,O=-1);function R(z){Be[z?"unshift":"push"](()=>{V=z,n(2,V)})}return t.$$set=z=>{"value"in z&&n(16,d=z.value),"fieldSchema"in z&&n(17,_=z.fieldSchema),"filter"in z&&n(18,b=z.filter),"wide"in z&&n(0,w=z.wide),"singleSelect"in z&&n(19,E=z.singleSelect)},t.$$.update=()=>{var z,me,se,Oe;t.$$.dirty[0]&131072&&n(22,i=(z=_==null?void 0:_.type)==null?void 0:z.includes("bb_reference")),t.$$.dirty[0]&4325376&&i&&(me=_==null?void 0:_.type)!=null&&me.includes("_single"),t.$$.dirty[0]&4194304&&n(21,l=i?"user":"table"),t.$$.dirty[0]&65536&&n(8,r=Array.isArray(d)?d:[]),t.$$.dirty[0]&2359296&&f(n(6,o=g({API:c,datasource:{type:l,tableId:k},options:{filter:b,limit:15}}))),t.$$.dirty[0]&8&&n(7,u=((se=s==null?void 0:s.definition)==null?void 0:se.primaryDisplay)||"email"),t.$$.dirty[0]&10&&s!=null&&s.rows&&n(1,O=Math.min(O,s.rows.length-1)),t.$$.dirty[0]&12&&((Oe=s==null?void 0:s.rows)==null?void 0:Oe.length)>0},[w,O,V,s,D,N,o,u,r,h,W,ne,H,$,G,oe,d,_,b,E,ie,l,i,J,q,j,K,x,X,F,R]}class Zc extends Ze{constructor(e){super(),Qe(this,e,ck,uk,Ye,{value:16,fieldSchema:17,filter:18,wide:0,singleSelect:19,api:20},null,[-1,-1])}get api(){return this.$$.ctx[20]}}function Jc(t,e,n){const i=t.slice();return i[18]=e[n],i[20]=n,i}function xc(t){let e,n,i;return{c(){e=v("i"),m(e,"class",bt("ri-arrow-right-s-line")+" svelte-1xxn7uq"),p(e,"open",t[0]),P(e,"z-index",1),P(e,"font-size","16px")},m(l,r){A(l,e,r),n||(i=B(e,"mousedown",Ii(Qt(Et(t[8])))),n=!0)},p(l,r){r&1&&p(e,"open",l[0])},d(l){l&&C(e),n=!1,i()}}}function $c(t){let e;return{c(){e=v("i"),m(e,"class",bt("ri-checkbox-circle-fill")+" svelte-1xxn7uq"),P(e,"color","var(--spectrum-global-color-green-500)"),P(e,"font-size","16px")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function ed(t){let e,n,i=Ce(t[1].children),l=[];for(let o=0;o<i.length;o+=1)l[o]=td(Jc(t,i,o));const r=o=>Z(l[o],1,1,()=>{l[o]=null});return{c(){e=v("ul");for(let o=0;o<l.length;o+=1)l[o].c();m(e,"class","spectrum-TreeView")},m(o,u){A(o,e,u);for(let s=0;s<l.length;s+=1)l[s]&&l[s].m(e,null);n=!0},p(o,u){if(u&30){i=Ce(o[1].children);let s;for(s=0;s<i.length;s+=1){const a=Jc(o,i,s);l[s]?(l[s].p(a,u),U(l[s],1)):(l[s]=td(a),l[s].c(),U(l[s],1),l[s].m(e,null))}for(He(),s=i.length;s<l.length;s+=1)r(s);ze()}},i(o){if(!n){for(let u=0;u<i.length;u+=1)U(l[u]);n=!0}},o(o){l=l.filter(Boolean);for(let u=0;u<l.length;u+=1)Z(l[u]);n=!1},d(o){o&&C(e),St(l,o)}}}function td(t){let e,n;return e=new es({props:{tree:t[18],nodeSelection:t[2],selectedNodes:t[3],selectedGroups:t[4],open:t[18].open}}),e.$on("nodeSelect",t[14]),e.$on("nodeClick",t[15]),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l&2&&(r.tree=i[18]),l&4&&(r.nodeSelection=i[2]),l&8&&(r.selectedNodes=i[3]),l&16&&(r.selectedGroups=i[4]),l&2&&(r.open=i[18].open),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function dk(t){var b,w;let e,n,i,l,r,o=(t[1].label||"Not Set")+"",u,s,a,f,c,g,h=((b=t[1].children)==null?void 0:b.length)&&xc(t),d=t[7]&&$c(),_=((w=t[1].children)==null?void 0:w.length)&&ed(t);return{c(){var E,k;e=v("li"),n=v("div"),h&&h.c(),i=Q(),l=v("div"),r=v("span"),u=Ee(o),s=Q(),d&&d.c(),a=Q(),_&&_.c(),m(r,"class","spectrum-TreeView-itemLabel"),m(r,"title",t[6]),P(r,"padding-left","0.25rem"),P(l,"z-index",2),P(l,"width","100%"),m(n,"class","spectrum-TreeView-itemLink svelte-1xxn7uq"),P(n,"padding-left",(k=(E=t[1])==null?void 0:E.children)!=null&&k.length?"0.25rem":"1.5rem"),P(n,"padding-right","0.5rem"),m(e,"class","spectrum-TreeView-item svelte-1xxn7uq"),p(e,"is-disabled",t[1].disabled),p(e,"is-open",t[0])},m(E,k){A(E,e,k),S(e,n),h&&h.m(n,null),S(n,i),S(n,l),S(l,r),S(r,u),t[13](r),S(n,s),d&&d.m(n,null),S(e,a),_&&_.m(e,null),f=!0,c||(g=B(l,"mousedown",Qt(Et(t[9]))),c=!0)},p(E,[k]){var I,O,D,N;(I=E[1].children)!=null&&I.length?h?h.p(E,k):(h=xc(E),h.c(),h.m(n,i)):h&&(h.d(1),h=null),(!f||k&2)&&o!==(o=(E[1].label||"Not Set")+"")&&Pe(u,o),(!f||k&64)&&m(r,"title",E[6]),E[7]?d||(d=$c(),d.c(),d.m(n,null)):d&&(d.d(1),d=null),k&2&&P(n,"padding-left",(D=(O=E[1])==null?void 0:O.children)!=null&&D.length?"0.25rem":"1.5rem"),(N=E[1].children)!=null&&N.length?_?(_.p(E,k),k&2&&U(_,1)):(_=ed(E),_.c(),U(_,1),_.m(e,null)):_&&(He(),Z(_,1,1,()=>{_=null}),ze()),(!f||k&2)&&p(e,"is-disabled",E[1].disabled),(!f||k&1)&&p(e,"is-open",E[0])},i(E){f||(U(_),f=!0)},o(E){Z(_),f=!1},d(E){E&&C(e),h&&h.d(),t[13](null),d&&d.d(),_&&_.d(),c=!1,g()}}}function hk(t,e,n){let i,l,r,o,u=ue,s=()=>(u(),u=ft(b,M=>n(11,o=M)),b),a,f=ue,c=()=>(f(),f=ft(w,M=>n(12,a=M)),w);t.$$.on_destroy.push(()=>u()),t.$$.on_destroy.push(()=>f());const g=le.createEventDispatcher();let{tree:h}=e,{open:d=!1}=e,{nodeSelection:_}=e,{selectedNodes:b}=e;s();let{selectedGroups:w}=e;c();let E;const k=M=>{h.disabled||(n(0,d=!d),g("nodeClick",{id:h.id,label:h.label}))},I=M=>{h.selectable&&!h.disabled&&g("nodeSelect",{id:h.id,label:h.label,row:h.row,group:h.group})};function O(M){Be[M?"unshift":"push"](()=>{E=M,n(5,E)})}function D(M){ti.call(this,t,M)}function N(M){ti.call(this,t,M)}return t.$$set=M=>{"tree"in M&&n(1,h=M.tree),"open"in M&&n(0,d=M.open),"nodeSelection"in M&&n(2,_=M.nodeSelection),"selectedNodes"in M&&s(n(3,b=M.selectedNodes)),"selectedGroups"in M&&c(n(4,w=M.selectedGroups))},t.$$.update=()=>{t.$$.dirty&2&&h.disabled&&n(0,d=!1),t.$$.dirty&6146&&n(7,i=h.isGroup?a.includes(h.id):!!o.find(M=>M.id==h.id)),t.$$.dirty&32&&n(10,l=E&&E.scrollWidth>E.clientWidth),t.$$.dirty&1026&&n(6,r=l?h.label||"Not Set":null)},[d,h,_,b,w,E,r,i,k,I,l,o,a,O,D,N]}class es extends Ze{constructor(e){super(),Qe(this,e,hk,dk,Ye,{tree:1,open:0,nodeSelection:2,selectedNodes:3,selectedGroups:4})}}function nd(t,e,n){const i=t.slice();return i[33]=e[n],i[35]=n,i}function id(t){let e,n,i;return n=new kn({props:{autofocus:!0,cellOptions:t[9]}}),n.$on("change",t[8]),n.$on("exitedit",t[20]),{c(){e=v("div"),We(n.$$.fragment),m(e,"class","search svelte-170oceh")},m(l,r){A(l,e,r),je(n,e,null),i=!0},p:ue,i(l){i||(U(n.$$.fragment,l),i=!0)},o(l){Z(n.$$.fragment,l),i=!1},d(l){l&&C(e),qe(n)}}}function gk(t){let e;return{c(){e=v("li"),e.innerHTML='<div class="spectrum-TreeView-itemLink">No Matches</div>',m(e,"class","spectrum-TreeView-item"),p(e,"is-open",!0)},m(n,i){A(n,e,i)},p:ue,i:ue,o:ue,d(n){n&&C(e)}}}function mk(t){let e;return{c(){e=v("li"),e.innerHTML='<div class="spectrum-TreeView-itemLink">Loading</div>',m(e,"class","spectrum-TreeView-item"),p(e,"is-open",!0)},m(n,i){A(n,e,i)},p:ue,i:ue,o:ue,d(n){n&&C(e)}}}function _k(t){var u;let e=[],n=new Map,i,l,r=Ce((u=t[3])==null?void 0:u.children);const o=s=>s[35];for(let s=0;s<r.length;s+=1){let a=nd(t,r,s),f=o(a);n.set(f,e[s]=ld(f,a))}return{c(){for(let s=0;s<e.length;s+=1)e[s].c();i=Fe()},m(s,a){for(let f=0;f<e.length;f+=1)e[f]&&e[f].m(s,a);A(s,i,a),l=!0},p(s,a){var f;a[0]&200&&(r=Ce((f=s[3])==null?void 0:f.children),He(),e=Tt(e,a,o,1,s,r,n,i.parentNode,Di,ld,i,nd),ze())},i(s){if(!l){for(let a=0;a<r.length;a+=1)U(e[a]);l=!0}},o(s){for(let a=0;a<e.length;a+=1)Z(e[a]);l=!1},d(s){s&&C(i);for(let a=0;a<e.length;a+=1)e[a].d(s)}}}function ld(t,e){let n,i,l;return i=new es({props:{tree:e[33],nodeSelection:!0,selectedNodes:e[6]}}),i.$on("nodeSelect",e[7]),{key:t,first:null,c(){n=Fe(),We(i.$$.fragment),this.first=n},m(r,o){A(r,n,o),je(i,r,o),l=!0},p(r,o){e=r;const u={};o[0]&8&&(u.tree=e[33]),i.$set(u)},i(r){l||(U(i.$$.fragment,r),l=!0)},o(r){Z(i.$$.fragment,r),l=!1},d(r){r&&C(n),qe(i,r)}}}function pk(t){let e,n,i,l,r,o,u=t[1]&&id(t);const s=[_k,mk,gk],a=[];function f(c,g){var h;return c[2].loaded&&((h=c[2].rows)!=null&&h.length)?0:c[2].loading?1:2}return l=f(t),r=a[l]=s[l](t),{c(){e=v("div"),u&&u.c(),n=Q(),i=v("ul"),r.c(),m(i,"class","spectrum-TreeView"),P(i,"margin","unset"),p(i,"spectrum-TreeView--quiet",t[0]),m(e,"class","control svelte-170oceh")},m(c,g){A(c,e,g),u&&u.m(e,null),S(e,n),S(e,i),a[l].m(i,null),o=!0},p(c,g){c[1]?u?(u.p(c,g),g[0]&2&&U(u,1)):(u=id(c),u.c(),U(u,1),u.m(e,n)):u&&(He(),Z(u,1,1,()=>{u=null}),ze());let h=l;l=f(c),l===h?a[l].p(c,g):(He(),Z(a[h],1,1,()=>{a[h]=null}),ze(),r=a[l],r?r.p(c,g):(r=a[l]=s[l](c),r.c()),U(r,1),r.m(i,null)),(!o||g[0]&1)&&p(i,"spectrum-TreeView--quiet",c[0])},i(c){o||(U(u),U(r),o=!0)},o(c){Z(u),Z(r),o=!1},d(c){c&&C(e),u&&u.d(),a[l].d()}}}let rd=10;function bk(t,e,n){let i,l,r,o,u,s=ue,a=()=>(s(),s=ft(i,K=>n(2,u=K)),i);t.$$.on_destroy.push(()=>s());const{API:f,fetchData:c,notificationStore:g}=le.getContext("sdk"),h=le.createEventDispatcher();let{value:d=[]}=e,{ownId:_}=e,{fieldSchema:b}=e,{joinColumn:w}=e,{sortColumn:E}=e,{sortOrder:k}=e,{filter:I=[]}=e,{limit:O=250}=e,{multi:D=!1}=e,{quiet:N}=e,{search:M}=e,V=new ii([]);Me(t,V,K=>n(25,o=K));let W=w||b.name,ne=[],H={root:!0,id:"root",label:"Super Tree",children:[]};const $=(K,x)=>{let X=[];return K==null||K.forEach(F=>{F[W]==x[r]&&X.push({id:F[r],disabled:F[r]==_,disableChildren:!0,label:F[u.definition.primaryDisplay],children:$(K,F)})}),X},Y=K=>{n(3,H.children=[],H),K!=null&&K.length&&(K==null||K.forEach(x=>{x[W]||H.children.push({id:x[r],disabled:x[r]==_,disableChildren:!0,label:x[u.definition.primaryDisplay],children:$(K,x)})}),n(3,H))},G=K=>{var x;if(K.detail.id!=_){if(D){let X=o.findIndex(F=>F.id==K.detail.id);X>-1?(o.splice(X,1),V.set(o)):o.length<rd?Re(V,o=[...o,K.detail],o):g.actions.warning("Cannot select more than "+rd+" items")}else Re(V,o=((x=o[0])==null?void 0:x.id)!==K.detail.id?[{id:K.detail.id,label:K.detail.label}]:[],o);J.debounce&&h("change",o.map(X=>({_id:X.id,primaryDisplay:X.label})))}},oe=()=>{d&&d.length&&(Re(V,o=[],o),Re(V,o=d.map(K=>({id:K._id,label:K.primaryDisplay})),o))},ie=K=>{K.detail&&K.detail!=""?ne=[...I,{field:l,type:"string",operator:"fuzzy",value:K.detail,valueType:"Value"}]:ne=I??[],i==null||i.update({filter:ne})};let J={icon:"ri-search-line",initialState:"Editing",role:"inlineInput",debounce:50};const q={},j=()=>h("focusout",{});return t.$$set=K=>{"value"in K&&n(10,d=K.value),"ownId"in K&&n(11,_=K.ownId),"fieldSchema"in K&&n(12,b=K.fieldSchema),"joinColumn"in K&&n(13,w=K.joinColumn),"sortColumn"in K&&n(14,E=K.sortColumn),"sortOrder"in K&&n(15,k=K.sortOrder),"filter"in K&&n(16,I=K.filter),"limit"in K&&n(17,O=K.limit),"multi"in K&&n(18,D=K.multi),"quiet"in K&&n(0,N=K.quiet),"search"in K&&n(1,M=K.search)},t.$$.update=()=>{var K,x,X;t.$$.dirty[0]&249856&&a(n(4,i=c({API:f,datasource:{type:"table",tableId:b.tableId},options:{sortOrder:k,sortColumn:E,filter:I,limit:O}}))),t.$$.dirty[0]&4&&(l=(K=u==null?void 0:u.definition)==null?void 0:K.primaryDisplay),t.$$.dirty[0]&4&&(r=((X=(x=u==null?void 0:u.definition)==null?void 0:x.primary)==null?void 0:X[0])??"_id"),t.$$.dirty[0]&4&&Y(u.rows),t.$$.dirty[0]&1024&&oe()},[N,M,u,H,i,h,V,G,ie,J,d,_,b,w,E,k,I,O,D,q,j]}class Qr extends Ze{constructor(e){super(),Qe(this,e,bk,pk,Ye,{value:10,ownId:11,fieldSchema:12,joinColumn:13,sortColumn:14,sortOrder:15,filter:16,limit:17,multi:18,quiet:0,search:1,api:19},null,[-1,-1])}get api(){return this.$$.ctx[19]}}function od(t,e,n){const i=t.slice();return i[41]=e[n],i[43]=n,i}function sd(t){let e,n;return{c(){e=v("i"),m(e,"class",n=t[2].icon+" field-icon")},m(i,l){A(i,e,l)},p(i,l){l[0]&4&&n!==(n=i[2].icon+" field-icon")&&m(e,"class",n)},d(i){i&&C(e)}}}function wk(t){let e,n,i=t[6].map(hd).join(", ")+"",l,r=t[2].role=="formInput"&&t[6].length>1&&ud(t);return{c(){e=v("span"),r&&r.c(),n=Q(),l=Ee(i)},m(o,u){A(o,e,u),r&&r.m(e,null),S(e,n),S(e,l)},p(o,u){o[2].role=="formInput"&&o[6].length>1?r?r.p(o,u):(r=ud(o),r.c(),r.m(e,n)):r&&(r.d(1),r=null),u[0]&64&&i!==(i=o[6].map(hd).join(", ")+"")&&Pe(l,i)},d(o){o&&C(e),r&&r.d()}}}function kk(t){let e,n,i=Ce(t[6]),l=[];for(let o=0;o<i.length;o+=1)l[o]=ad(od(t,i,o));let r=t[6].length>5&&fd(t);return{c(){e=v("div");for(let o=0;o<l.length;o+=1)l[o].c();n=Q(),r&&r.c(),m(e,"class","items"),p(e,"pills",t[20]),p(e,"links",t[18]),p(e,"isUser",t[7]),p(e,"withCount",t[6].length>5),p(e,"inEdit",t[8])},m(o,u){A(o,e,u);for(let s=0;s<l.length;s+=1)l[s]&&l[s].m(e,null);S(e,n),r&&r.m(e,null)},p(o,u){if(u[0]&4980800){i=Ce(o[6]);let s;for(s=0;s<i.length;s+=1){const a=od(o,i,s);l[s]?l[s].p(a,u):(l[s]=ad(a),l[s].c(),l[s].m(e,n))}for(;s<l.length;s+=1)l[s].d(1);l.length=i.length}o[6].length>5?r?r.p(o,u):(r=fd(o),r.c(),r.m(e,null)):r&&(r.d(1),r=null),u[0]&1048576&&p(e,"pills",o[20]),u[0]&262144&&p(e,"links",o[18]),u[0]&128&&p(e,"isUser",o[7]),u[0]&64&&p(e,"withCount",o[6].length>5),u[0]&256&&p(e,"inEdit",o[8])},d(o){o&&C(e),St(l,o),r&&r.d()}}}function yk(t){let e,n;return{c(){e=v("span"),n=Ee(t[14])},m(i,l){A(i,e,l),S(e,n)},p(i,l){l[0]&16384&&Pe(n,i[14])},d(i){i&&C(e)}}}function ud(t){let e,n=t[6].length+"",i,l;return{c(){e=Ee("("),i=Ee(n),l=Ee(")")},m(r,o){A(r,e,o),A(r,i,o),A(r,l,o)},p(r,o){o[0]&64&&n!==(n=r[6].length+"")&&Pe(i,n)},d(r){r&&(C(e),C(i),C(l))}}}function Ek(t){let e,n,i,l,r=t[41].primaryDisplay+"",o,u,s;function a(){return t[33](t[41])}return{c(){e=v("div"),n=v("i"),i=Q(),l=v("span"),o=Ee(r),m(n,"class",t[19]),m(e,"class","item")},m(f,c){A(f,e,c),S(e,n),S(e,i),S(e,l),S(l,o),u||(s=B(e,"click",function(){Ge(t[18]?a:null)&&(t[18]?a:null).apply(this,arguments)}),u=!0)},p(f,c){t=f,c[0]&524288&&m(n,"class",t[19]),c[0]&64&&r!==(r=t[41].primaryDisplay+"")&&Pe(o,r)},d(f){f&&C(e),u=!1,s()}}}function ad(t){let e,n=t[43]<5&&Ek(t);return{c(){n&&n.c(),e=Fe()},m(i,l){n&&n.m(i,l),A(i,e,l)},p(i,l){i[43]<5&&n.p(i,l)},d(i){i&&C(e),n&&n.d(i)}}}function fd(t){let e,n,i=t[6].length-5+"",l,r;return{c(){e=v("span"),n=Ee("(+ "),l=Ee(i),r=Ee(")"),m(e,"class","count")},m(o,u){A(o,e,u),S(e,n),S(e,l),S(e,r)},p(o,u){u[0]&64&&i!==(i=o[6].length-5+"")&&Pe(l,i)},d(o){o&&C(e)}}}function cd(t){let e;return{c(){e=v("i"),m(e,"class","ph ph-caret-down control-icon")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function dd(t){let e,n,i;function l(o){t[37](o)}let r={anchor:t[9],useAnchorWidth:!0,open:t[21]=="Open",$$slots:{default:[Ck]},$$scope:{ctx:t}};return t[10]!==void 0&&(r.popup=t[10]),e=new wn({props:r}),Be.push(()=>Gt(e,"popup",l)),{c(){We(e.$$.fragment)},m(o,u){je(e,o,u),i=!0},p(o,u){const s={};u[0]&512&&(s.anchor=o[9]),u[0]&2097152&&(s.open=o[21]=="Open"),u[0]&6271|u[1]&8192&&(s.$$scope={dirty:u,ctx:o}),!n&&u[0]&1024&&(n=!0,s.popup=o[10],Wt(()=>n=!1)),e.$set(s)},i(o){i||(U(e.$$.fragment,o),i=!0)},o(o){Z(e.$$.fragment,o),i=!1},d(o){qe(e,o)}}}function vk(t){let e,n,i;function l(o){t[35](o)}let r={fieldSchema:t[1],filter:t[3]??[],singleSelect:t[12],value:t[6],search:t[23],wide:t[2].wide&&!t[12]};return t[11]!==void 0&&(r.api=t[11]),e=new Zc({props:r}),Be.push(()=>Gt(e,"api",l)),e.$on("change",t[26]),e.$on("close",t[36]),{c(){We(e.$$.fragment)},m(o,u){je(e,o,u),i=!0},p(o,u){const s={};u[0]&2&&(s.fieldSchema=o[1]),u[0]&8&&(s.filter=o[3]??[]),u[0]&4096&&(s.singleSelect=o[12]),u[0]&64&&(s.value=o[6]),u[0]&4100&&(s.wide=o[2].wide&&!o[12]),!n&&u[0]&2048&&(n=!0,s.api=o[11],Wt(()=>n=!1)),e.$set(s)},i(o){i||(U(e.$$.fragment,o),i=!0)},o(o){Z(e.$$.fragment,o),i=!1},d(o){qe(e,o)}}}function Sk(t){let e,n;return e=new Qr({props:{fieldSchema:t[1],filter:t[3]??[],search:t[23],limit:t[4],joinColumn:t[2].joinColumn,value:t[6],ownId:t[0],multi:t[1].relationshipType=="many-to-many"||t[1].relationshipType=="many-to-one"}}),e.$on("change",t[26]),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l[0]&2&&(r.fieldSchema=i[1]),l[0]&8&&(r.filter=i[3]??[]),l[0]&16&&(r.limit=i[4]),l[0]&4&&(r.joinColumn=i[2].joinColumn),l[0]&64&&(r.value=i[6]),l[0]&1&&(r.ownId=i[0]),l[0]&2&&(r.multi=i[1].relationshipType=="many-to-many"||i[1].relationshipType=="many-to-one"),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function Ck(t){let e,n,i,l;const r=[Sk,vk],o=[];function u(s,a){return s[1].recursiveTable?0:1}return e=u(t),n=o[e]=r[e](t),{c(){n.c(),i=Fe()},m(s,a){o[e].m(s,a),A(s,i,a),l=!0},p(s,a){let f=e;e=u(s),e===f?o[e].p(s,a):(He(),Z(o[f],1,1,()=>{o[f]=null}),ze(),n=o[e],n?n.p(s,a):(n=o[e]=r[e](s),n.c()),U(n,1),n.m(i.parentNode,i))},i(s){l||(U(n),l=!0)},o(s){Z(n),l=!1},d(s){s&&C(i),o[e].d(s)}}}function Ak(t){var w;let e,n,i,l,r,o,u,s,a,f,c=((w=t[2])==null?void 0:w.icon)&&sd(t);function g(E,k){var I;return((I=E[6])==null?void 0:I.length)<1?yk:E[20]||E[18]?kk:wk}let h=g(t),d=h(t),_=!t[13]&&(t[2].role=="formInput"||t[8])&&cd(),b=t[8]&&dd(t);return{c(){var E,k;e=v("div"),c&&c.c(),n=Q(),i=v("div"),d.c(),l=Q(),_&&_.c(),o=Q(),b&&b.c(),u=Fe(),m(i,"class","value"),p(i,"placeholder",((E=t[6])==null?void 0:E.length)<1),m(e,"class","superCell"),m(e,"tabindex",r=(k=t[2])!=null&&k.disabled?-1:0),p(e,"isDirty",t[17]&&t[2].showDirty),p(e,"inEdit",t[8]),p(e,"inline",t[16]),p(e,"multirow",t[15]),p(e,"tableCell",t[2].role=="tableCell"),p(e,"formInput",t[2].role=="formInput"),p(e,"disabled",t[2].disabled),p(e,"readonly",t[13]),p(e,"error",t[2].error),P(e,"color",t[2].color),P(e,"background",t[2].background),P(e,"font-weight",t[2].fontWeight)},m(E,k){A(E,e,k),c&&c.m(e,null),S(e,n),S(e,i),d.m(i,null),S(e,l),_&&_.m(e,null),t[34](e),A(E,o,k),b&&b.m(E,k),A(E,u,k),s=!0,a||(f=[B(e,"mousedown",t[24].toggle),B(e,"focusin",function(){Ge(t[5].focus)&&t[5].focus.apply(this,arguments)}),B(e,"keydown",Ii(t[25])),B(e,"focusout",function(){Ge(t[5].focusout)&&t[5].focusout.apply(this,arguments)})],a=!0)},p(E,k){var I,O,D;t=E,(I=t[2])!=null&&I.icon?c?c.p(t,k):(c=sd(t),c.c(),c.m(e,n)):c&&(c.d(1),c=null),h===(h=g(t))&&d?d.p(t,k):(d.d(1),d=h(t),d&&(d.c(),d.m(i,null))),(!s||k[0]&64)&&p(i,"placeholder",((O=t[6])==null?void 0:O.length)<1),!t[13]&&(t[2].role=="formInput"||t[8])?_||(_=cd(),_.c(),_.m(e,null)):_&&(_.d(1),_=null),(!s||k[0]&4&&r!==(r=(D=t[2])!=null&&D.disabled?-1:0))&&m(e,"tabindex",r),(!s||k[0]&131076)&&p(e,"isDirty",t[17]&&t[2].showDirty),(!s||k[0]&256)&&p(e,"inEdit",t[8]),(!s||k[0]&65536)&&p(e,"inline",t[16]),(!s||k[0]&32768)&&p(e,"multirow",t[15]),(!s||k[0]&4)&&p(e,"tableCell",t[2].role=="tableCell"),(!s||k[0]&4)&&p(e,"formInput",t[2].role=="formInput"),(!s||k[0]&4)&&p(e,"disabled",t[2].disabled),(!s||k[0]&8192)&&p(e,"readonly",t[13]),(!s||k[0]&4)&&p(e,"error",t[2].error),k[0]&4&&P(e,"color",t[2].color),k[0]&4&&P(e,"background",t[2].background),k[0]&4&&P(e,"font-weight",t[2].fontWeight),t[8]?b?(b.p(t,k),k[0]&256&&U(b,1)):(b=dd(t),b.c(),U(b,1),b.m(u.parentNode,u)):b&&(He(),Z(b,1,1,()=>{b=null}),ze())},i(E){s||(U(b),s=!0)},o(E){Z(b),s=!1},d(E){E&&(C(e),C(o),C(u)),c&&c.d(),d.d(),_&&_.d(),t[34](null),b&&b.d(E),a=!1,Ve(f)}}}const hd=t=>t.primaryDisplay;function Tk(t,e,n){let i,l,r,o,u,s,a,f,c,g,h,d,_,b,w,E,k=ue,I=()=>(k(),k=ft(j,be=>n(32,E=be)),j);t.$$.on_destroy.push(()=>k());const O=le.createEventDispatcher(),{API:D}=le.getContext("sdk");let{value:N}=e,{fieldSchema:M}=e,{cellOptions:V}=e,{simpleView:W=!0}=e,{filter:ne=[]}=e,{limit:H=100}=e,{ownId:$}=e,{isUserSelect:Y}=e,G=JSON.stringify(N),oe,ie,J,q,{cellState:j=Ft(V.initialState??"View",{"*":{goTo(be){return be},reset(be){n(6,s=void 0)}},View:{_enter(){},focus(){if(!V.readonly&&!V.disabled)return"Editing"}},Hovered:{cancel:()=>"View"},Focused:{unfocus(){return"View"}},Error:{check:"View"},Editing:{_enter(){n(30,G=JSON.stringify(s)),K.open(),O("enteredit")},_exit(){K.close(),O("exitedit")},focusout(be){ie!=null&&ie.contains(be==null?void 0:be.relatedTarget)||this.submit()},clear(){n(6,s=[])},submit(){return f&&O("change",d&&s?s[0]:s),"View"},cancel(){return"View"}}})}=e;I();const K=Ft("Closed",{Open:{close(){return"Closed"},toggle(){return"Closed"}},Closed:{open(){return"Open"},toggle(){return"Open"}}});Me(t,K,be=>n(21,w=be));const x=be=>{be.key=="Escape"&&w=="Open"?K.close():be.key=="Escape"?j.cancel():be.keyCode==32&&E=="Editing"?K.toggle():be.key=="Tab"&&w=="Open"?j.focusout():w=="Open"&&(q==null||q.focus())},X=be=>{n(6,s=be.detail),h&&K.close()},F=be=>M.relationshipType=="self"&&be&&!Array.isArray(be)?(D.fetchRow(M.tableId,be,!0).then(Ie=>{n(6,s=[{_id:Ie.id,primaryDisplay:M.primaryDisplay?Ie[M.primaryDisplay]:Ie.name||Ie.id}])}).catch(Ie=>{n(6,s=[])}),s||[]):i?N?[...N]:[]:N?[N]:[],R=be=>{O("linkClick",be)};function z(be){Be[be?"unshift":"push"](()=>{oe=be,n(9,oe)})}function me(be){q=be,n(11,q)}const se=()=>{j.focusout()};function Oe(be){ie=be,n(10,ie)}return t.$$set=be=>{"value"in be&&n(28,N=be.value),"fieldSchema"in be&&n(1,M=be.fieldSchema),"cellOptions"in be&&n(2,V=be.cellOptions),"simpleView"in be&&n(27,W=be.simpleView),"filter"in be&&n(3,ne=be.filter),"limit"in be&&n(4,H=be.limit),"ownId"in be&&n(0,$=be.ownId),"isUserSelect"in be&&n(29,Y=be.isUserSelect),"cellState"in be&&I(n(5,j=be.cellState))},t.$$.update=()=>{var be,Ie;t.$$.dirty[0]&2&&n(31,i=!((be=M==null?void 0:M.type)!=null&&be.includes("_single"))),t.$$.dirty[0]&536870914&&n(7,l=((Ie=M==null?void 0:M.type)==null?void 0:Ie.includes("bb_reference"))||Y),t.$$.dirty[0]&4&&n(20,r=V.relViewMode=="pills"),t.$$.dirty[0]&2&&n(19,o=M.type=="link"?"ri-edit-box-line":"ri-user-line"),t.$$.dirty[0]&132&&n(18,u=V.relViewMode=="links"&&!l),t.$$.dirty[0]&5&&n(0,$=$||(V==null?void 0:V.ownId)),t.$$.dirty[0]&268435456&&n(6,s=F(N)),t.$$.dirty[1]&2&&n(8,a=E=="Editing"),t.$$.dirty[0]&1073742144&&n(17,f=a&&G!=JSON.stringify(s)),t.$$.dirty[0]&4&&n(27,W=V.relViewMode=="text"),t.$$.dirty[0]&4&&n(16,c=V.role=="inlineInput"),t.$$.dirty[0]&324&&n(15,g=V.controlType=="expanded"&&((s==null?void 0:s.length)>1||a)),t.$$.dirty[0]&2|t.$$.dirty[1]&1&&n(12,h=(M==null?void 0:M.relationshipType)=="one-to-many"||(M==null?void 0:M.relationshipType)=="self"||!i),t.$$.dirty[0]&128|t.$$.dirty[1]&1&&(d=l&&!i),t.$$.dirty[0]&4&&n(14,_=V.placeholder||""),t.$$.dirty[0]&4&&n(13,b=V.readonly||V.disabled)},[$,M,V,ne,H,j,s,l,a,oe,ie,q,h,b,_,g,c,f,u,o,r,w,O,J,K,x,X,W,N,Y,G,i,E,R,z,me,se,Oe]}class Zr extends Ze{constructor(e){super(),Qe(this,e,Tk,Ak,Ye,{value:28,fieldSchema:1,cellOptions:2,simpleView:27,filter:3,limit:4,ownId:0,isUserSelect:29,cellState:5},null,[-1,-1])}}function gd(t){let e,n;return{c(){e=v("i"),m(e,"class",n=bt(t[2].icon+" icon")+" svelte-riwj21")},m(i,l){A(i,e,l)},p(i,l){l&4&&n!==(n=bt(i[2].icon+" icon")+" svelte-riwj21")&&m(e,"class",n)},d(i){i&&C(e)}}}function Ik(t){let e,n,i,l,r,o;return{c(){e=v("div"),n=v("span"),i=Ee(t[9]),m(n,"class","svelte-riwj21"),m(e,"class","value svelte-riwj21"),m(e,"tabindex",l=t[2].readonly||t[2].disabled?"-1":"0"),p(e,"multiline",t[2].multiline),p(e,"with-icon",t[2].icon),p(e,"placeholder",!t[0]),P(e,"justify-content",t[2].align)},m(u,s){A(u,e,s),S(e,n),S(n,i),r||(o=B(e,"focusin",function(){Ge(t[3].focus)&&t[3].focus.apply(this,arguments)}),r=!0)},p(u,s){t=u,s&512&&Pe(i,t[9]),s&4&&l!==(l=t[2].readonly||t[2].disabled?"-1":"0")&&m(e,"tabindex",l),s&4&&p(e,"multiline",t[2].multiline),s&4&&p(e,"with-icon",t[2].icon),s&1&&p(e,"placeholder",!t[0]),s&4&&P(e,"justify-content",t[2].align)},d(u){u&&C(e),r=!1,o()}}}function Dk(t){var u;let e,n;function i(s,a){return s[2].multiline?Rk:Ok}let l=i(t),r=l(t),o=t[4]&&((u=t[2])==null?void 0:u.clearIcon)!==!1&&md(t);return{c(){r.c(),e=Q(),o&&o.c(),n=Fe()},m(s,a){r.m(s,a),A(s,e,a),o&&o.m(s,a),A(s,n,a)},p(s,a){var f;l===(l=i(s))&&r?r.p(s,a):(r.d(1),r=l(s),r&&(r.c(),r.m(e.parentNode,e))),s[4]&&((f=s[2])==null?void 0:f.clearIcon)!==!1?o?o.p(s,a):(o=md(s),o.c(),o.m(n.parentNode,n)):o&&(o.d(1),o=null)},d(s){s&&(C(e),C(n)),r.d(s),o&&o.d(s)}}}function Ok(t){let e,n,i,l,r;return{c(){var o;e=v("input"),m(e,"tabindex","0"),m(e,"class","editor svelte-riwj21"),e.value=n=t[4]??"",m(e,"placeholder",i=((o=t[2])==null?void 0:o.placeholder)??""),p(e,"with-icon",t[2].icon),p(e,"placeholder",!t[0]&&!t[1]&&!t[4]),P(e,"text-align",t[2].align=="center"?"center":t[2].align=="flex-end"?"right":"left"),P(e,"padding-right",t[2].align!="flex-start"?"2rem":"0.75rem")},m(o,u){A(o,e,u),t[19](e),l||(r=[B(e,"input",t[10]),B(e,"focusout",function(){Ge(t[3].focusout)&&t[3].focusout.apply(this,arguments)}),B(e,"keydown",function(){Ge(t[3].handleKeyboard)&&t[3].handleKeyboard.apply(this,arguments)}),tn(t[11].call(null,e))],l=!0)},p(o,u){var s;t=o,u&16&&n!==(n=t[4]??"")&&e.value!==n&&(e.value=n),u&4&&i!==(i=((s=t[2])==null?void 0:s.placeholder)??"")&&m(e,"placeholder",i),u&4&&p(e,"with-icon",t[2].icon),u&19&&p(e,"placeholder",!t[0]&&!t[1]&&!t[4]),u&4&&P(e,"text-align",t[2].align=="center"?"center":t[2].align=="flex-end"?"right":"left"),u&4&&P(e,"padding-right",t[2].align!="flex-start"?"2rem":"0.75rem")},d(o){o&&C(e),t[19](null),l=!1,Ve(r)}}}function Rk(t){let e,n,i,l;return{c(){var r;e=v("textarea"),m(e,"tabindex","0"),m(e,"class","editor svelte-riwj21"),e.value=t[9],m(e,"placeholder",n=((r=t[2])==null?void 0:r.placeholder)??""),p(e,"with-icon",t[2].icon),p(e,"placeholder",!t[0]&&!t[1]&&!t[4]),P(e,"text-align",t[2].align=="center"?"center":t[2].align=="flex-end"?"right":"left"),P(e,"padding-right",t[2].align!="flex-start"?"2rem":"0.75rem"),P(e,"white-space","pre-wrap"),P(e,"overflow-wrap","break-word"),P(e,"min-height","8rem"),P(e,"overflow-y","auto"),P(e,"resize","vertical")},m(r,o){A(r,e,o),t[18](e),i||(l=[B(e,"input",t[10]),B(e,"focusout",function(){Ge(t[3].focusout)&&t[3].focusout.apply(this,arguments)}),B(e,"keydown",function(){Ge(t[3].handleKeyboard)&&t[3].handleKeyboard.apply(this,arguments)}),tn(t[11].call(null,e))],i=!0)},p(r,o){var u;t=r,o&512&&(e.value=t[9]),o&4&&n!==(n=((u=t[2])==null?void 0:u.placeholder)??"")&&m(e,"placeholder",n),o&4&&p(e,"with-icon",t[2].icon),o&19&&p(e,"placeholder",!t[0]&&!t[1]&&!t[4]),o&4&&P(e,"text-align",t[2].align=="center"?"center":t[2].align=="flex-end"?"right":"left"),o&4&&P(e,"padding-right",t[2].align!="flex-start"?"2rem":"0.75rem")},d(r){r&&C(e),t[18](null),i=!1,Ve(l)}}}function md(t){let e,n,i;return{c(){e=v("i"),m(e,"class","ri-close-line clearIcon")},m(l,r){A(l,e,r),n||(i=B(e,"mousedown",Ii(Et(function(){Ge(t[3].clear)&&t[3].clear.apply(this,arguments)}))),n=!0)},p(l,r){t=l},d(l){l&&C(e),n=!1,i()}}}function Pk(t){let e,n,i=t[2].icon&&!t[2].multiline&&gd(t);function l(u,s){return u[8]?Dk:Ik}let r=l(t),o=r(t);return{c(){e=v("div"),i&&i.c(),n=Q(),o.c(),m(e,"class","superCell multirow svelte-riwj21"),p(e,"inEdit",t[8]),p(e,"isDirty",t[7]&&t[2].showDirty),p(e,"focused",t[8]),p(e,"inline",t[2].role=="inlineInput"),p(e,"tableCell",t[2].role=="tableCell"),p(e,"formInput",t[2].role=="formInput"),p(e,"disabled",t[2].disabled),p(e,"readonly",t[2].readonly),p(e,"error",t[2].error||!t[5]),p(e,"multirow",t[2].multiline),P(e,"color",t[2].color),P(e,"background",t[2].background),P(e,"font-weight",t[2].fontWeight)},m(u,s){A(u,e,s),i&&i.m(e,null),S(e,n),o.m(e,null)},p(u,[s]){u[2].icon&&!u[2].multiline?i?i.p(u,s):(i=gd(u),i.c(),i.m(e,n)):i&&(i.d(1),i=null),r===(r=l(u))&&o?o.p(u,s):(o.d(1),o=r(u),o&&(o.c(),o.m(e,null))),s&256&&p(e,"inEdit",u[8]),s&132&&p(e,"isDirty",u[7]&&u[2].showDirty),s&256&&p(e,"focused",u[8]),s&4&&p(e,"inline",u[2].role=="inlineInput"),s&4&&p(e,"tableCell",u[2].role=="tableCell"),s&4&&p(e,"formInput",u[2].role=="formInput"),s&4&&p(e,"disabled",u[2].disabled),s&4&&p(e,"readonly",u[2].readonly),s&36&&p(e,"error",u[2].error||!u[5]),s&4&&p(e,"multirow",u[2].multiline),s&4&&P(e,"color",u[2].color),s&4&&P(e,"background",u[2].background),s&4&&P(e,"font-weight",u[2].fontWeight)},i:ue,o:ue,d(u){u&&C(e),i&&i.d(),o.d()}}}function Mk(t,e,n){let i,l,r,o,u,s,a=ue,f=()=>(a(),a=ft(M,$=>n(17,s=$)),M);t.$$.on_destroy.push(()=>a());const c=le.createEventDispatcher(),{processStringSync:g}=le.getContext("sdk");le.getContext("context");let{value:h=null}=e,{formattedValue:d}=e,{cellOptions:_={role:"formInput",initialState:"Editing",debounce:250,multiline:!0}}=e,{autofocus:b}=e,w,E,k=null,I=!0,O,D;const N=$=>{if($==null||$==="")return!0;try{return JSON.parse(typeof $=="string"?$:JSON.stringify($)),!0}catch{return!1}};let{cellState:M=Ft((_==null?void 0:_.initialState)??"View",{"*":{goTo($){return $},reset(){n(4,k=i),n(14,D=void 0),n(5,I=!0)}},View:{_enter(){n(4,k=i),n(5,I=N(h))},focus(){if(!_.readonly&&!_.disabled)return"Editing"}},Editing:{_enter(){n(13,E=i),n(4,k=i),n(5,I=N(h)),c("enteredit")},_exit(){n(13,E=void 0),c("exitedit"),c("focusout")},clear(){_.debounce&&c("change",null),n(0,h=null),n(4,k=null),n(5,I=!0)},focusout($){this.submit()},submit(){return o&&I&&c("change",k),"View"},cancel(){return n(0,h=E),c("cancel"),"View"},handleKeyboard($){$.key=="Enter"&&!_.multiline&&this.submit(),$.key=="Escape"&&this.cancel()}}})}=e;f();const V=$=>{const Y=$.target.value;n(5,I=N(Y)),n(4,k=Y),n(14,D=new Date),_!=null&&_.debounce&&I&&(clearTimeout(w),w=setTimeout(()=>{c("change",k)},_.debounce??0))},W=$=>{$==null||$.focus()};le.onMount(()=>{b&&setTimeout(()=>{M.focus()},50)});function ne($){Be[$?"unshift":"push"](()=>{O=$,n(6,O)})}function H($){Be[$?"unshift":"push"](()=>{O=$,n(6,O)})}return t.$$set=$=>{"value"in $&&n(0,h=$.value),"formattedValue"in $&&n(1,d=$.formattedValue),"cellOptions"in $&&n(2,_=$.cellOptions),"autofocus"in $&&n(12,b=$.autofocus),"cellState"in $&&f(n(3,M=$.cellState))},t.$$.update=()=>{t.$$.dirty&1&&n(16,i=h&&N(h)&&typeof h!="string"?JSON.stringify(h):h),t.$$.dirty&4&&n(15,u=_.readonly||_.disabled?"":_.placeholder||""),t.$$.dirty&98308&&n(9,l=!i||i===""&&u?u:N(i)?_.multiline?JSON.stringify(JSON.parse(i),null,2):JSON.stringify(JSON.parse(i)):"Invalid JSON"),t.$$.dirty&65544&&M.reset(i),t.$$.dirty&131072&&n(8,r=s=="Editing"),t.$$.dirty&24592&&n(7,o=D&&E!==k),t.$$.dirty&65542&&n(1,d=!d&&(_!=null&&_.template)?g(_.template,{value:i}):d)},[h,d,_,M,k,I,O,o,r,l,V,W,b,E,D,u,i,s,ne,H]}class ts extends Ze{constructor(e){super(),Qe(this,e,Mk,Pk,Ye,{value:0,formattedValue:1,cellOptions:2,autofocus:12,cellState:3})}}function _d(t,e,n){const i=t.slice();return i[30]=e[n],i[32]=n,i}function pd(t,e,n){const i=t.slice();return i[33]=e[n],i}function Nk(t){let e,n;return{c(){e=v("span"),n=Ee(t[10])},m(i,l){A(i,e,l),S(e,n)},p(i,l){l[0]&1024&&Pe(n,i[10])},d(i){i&&C(e)}}}function Lk(t){let e,n,i=Ce(t[9].slice(0,5)),l=[];for(let o=0;o<i.length;o+=1)l[o]=wd(pd(t,i,o));let r=t[9].length>5&&kd(t);return{c(){e=v("div");for(let o=0;o<l.length;o+=1)l[o].c();n=Q(),r&&r.c(),m(e,"class","items")},m(o,u){A(o,e,u);for(let s=0;s<l.length;s+=1)l[s]&&l[s].m(e,null);S(e,n),r&&r.m(e,null)},p(o,u){if(u[0]&512){i=Ce(o[9].slice(0,5));let s;for(s=0;s<i.length;s+=1){const a=pd(o,i,s);l[s]?l[s].p(a,u):(l[s]=wd(a),l[s].c(),l[s].m(e,n))}for(;s<l.length;s+=1)l[s].d(1);l.length=i.length}o[9].length>5?r?r.p(o,u):(r=kd(o),r.c(),r.m(e,null)):r&&(r.d(1),r=null)},d(o){o&&C(e),St(l,o),r&&r.d()}}}function bd(t){var r,o;let e,n,i=((o=(r=t[33])==null?void 0:r.extension)==null?void 0:o.toUpperCase())+"",l;return{c(){e=v("div"),n=v("span"),l=Ee(i),m(e,"class","item pill svelte-14mmsxx"),P(e,"border","1px solid var(--spectrum-global-color-gray-300)")},m(u,s){A(u,e,s),S(e,n),S(n,l)},p(u,s){var a,f;s[0]&512&&i!==(i=((f=(a=u[33])==null?void 0:a.extension)==null?void 0:f.toUpperCase())+"")&&Pe(l,i)},d(u){u&&C(e)}}}function wd(t){let e,n=t[33]&&bd(t);return{c(){n&&n.c(),e=Fe()},m(i,l){n&&n.m(i,l),A(i,e,l)},p(i,l){i[33]?n?n.p(i,l):(n=bd(i),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},d(i){i&&C(e),n&&n.d(i)}}}function kd(t){let e,n,i=t[9].length-5+"",l,r;return{c(){e=v("span"),n=Ee("( + "),l=Ee(i),r=Ee(" )"),m(e,"class","remaining-count svelte-14mmsxx")},m(o,u){A(o,e,u),S(e,n),S(e,l),S(e,r)},p(o,u){u[0]&512&&i!==(i=o[9].length-5+"")&&Pe(l,i)},d(o){o&&C(e)}}}function yd(t){let e;return{c(){e=v("i"),m(e,"class","ph ph-caret-down action-icon svelte-14mmsxx")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function Ed(t){let e,n;return e=new wn({props:{anchor:t[4],open:t[6],maxHeight:350,useAnchorWidth:!0,$$slots:{default:[Fk]},$$scope:{ctx:t}}}),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l[0]&16&&(r.anchor=i[4]),l[0]&64&&(r.open=i[6]),l[0]&5029|l[1]&32&&(r.$$scope={dirty:l,ctx:i}),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function vd(t){let e=[],n=new Map,i,l=Ce(t[9]);const r=o=>o[32];for(let o=0;o<l.length;o+=1){let u=_d(t,l,o),s=r(u);n.set(s,e[o]=Cd(s,u))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();i=Fe()},m(o,u){for(let s=0;s<e.length;s+=1)e[s]&&e[s].m(o,u);A(o,i,u)},p(o,u){u[0]&37504&&(l=Ce(o[9]),e=Tt(e,u,r,1,o,l,n,i.parentNode,nn,Cd,i,_d))},d(o){o&&C(i);for(let u=0;u<e.length;u+=1)e[u].d(o)}}}function Sd(t){let e,n,i;function l(){return t[21](t[32])}return{c(){e=v("button"),e.innerHTML='<i class="ph ph-trash-simple"></i>',m(e,"class","btn-delete svelte-14mmsxx"),m(e,"tabindex","-1"),m(e,"aria-label","Delete"),m(e,"title","Delete"),m(e,"type","button")},m(r,o){A(r,e,o),n||(i=B(e,"click",l),n=!0)},p(r,o){t=r},d(r){r&&C(e),n=!1,i()}}}function Cd(t,e){var I;let n,i,l,r,o=((I=e[30].extension)==null?void 0:I.toUpperCase())+"",u,s,a,f=e[30].name+"",c,g,h,d,_,b;function w(){return e[20](e[32])}let E=!e[12]&&Sd(e);function k(){return e[22](e[32])}return{key:t,first:null,c(){n=v("div"),i=v("button"),i.innerHTML='<i class="ph ph-download-simple"></i>',l=Q(),r=v("div"),u=Ee(o),s=Q(),a=v("a"),c=Ee(f),h=Q(),E&&E.c(),d=Q(),m(i,"class","btn-delete svelte-14mmsxx"),m(i,"tabindex","-1"),m(i,"aria-label","Delete"),m(i,"title","Delete"),m(i,"type","button"),m(r,"class","pill svelte-14mmsxx"),m(a,"href",g=e[30].url),m(a,"class","filename svelte-14mmsxx"),m(a,"download",""),m(n,"class","attachment svelte-14mmsxx"),p(n,"focused",e[7]===e[32]),this.first=n},m(O,D){A(O,n,D),S(n,i),S(n,l),S(n,r),S(r,u),S(n,s),S(n,a),S(a,c),S(n,h),E&&E.m(n,null),S(n,d),_||(b=[B(i,"click",w),B(n,"mouseenter",k)],_=!0)},p(O,D){var N;e=O,D[0]&512&&o!==(o=((N=e[30].extension)==null?void 0:N.toUpperCase())+"")&&Pe(u,o),D[0]&512&&f!==(f=e[30].name+"")&&Pe(c,f),D[0]&512&&g!==(g=e[30].url)&&m(a,"href",g),e[12]?E&&(E.d(1),E=null):E?E.p(e,D):(E=Sd(e),E.c(),E.m(n,d)),D[0]&640&&p(n,"focused",e[7]===e[32])},d(O){O&&C(n),E&&E.d(),_=!1,Ve(b)}}}function Fk(t){var g;let e,n,i,l,r,o,u,s,a,f,c=((g=t[9])==null?void 0:g.length)&&vd(t);return{c(){e=v("div"),c&&c.c(),n=Q(),i=v("button"),l=v("i"),r=Ee(" Add Attachment"),u=Q(),s=v("input"),m(l,"class","ph ph-plus"),m(i,"class","btn-upload-empty svelte-14mmsxx"),m(i,"aria-label","Upload attachment"),m(i,"type","button"),i.disabled=o=t[0].disabled||t[0].readonly,m(s,"type","file"),s.multiple=t[2],P(s,"display","none"),m(e,"class","attachments svelte-14mmsxx")},m(h,d){A(h,e,d),c&&c.m(e,null),S(e,n),S(e,i),S(i,l),S(i,r),S(e,u),S(e,s),t[24](s),t[25](e),a||(f=[B(i,"click",t[23]),B(s,"change",t[14])],a=!0)},p(h,d){var _;(_=h[9])!=null&&_.length?c?c.p(h,d):(c=vd(h),c.c(),c.m(e,n)):c&&(c.d(1),c=null),d[0]&1&&o!==(o=h[0].disabled||h[0].readonly)&&(i.disabled=o),d[0]&4&&(s.multiple=h[2])},d(h){h&&C(e),c&&c.d(),t[24](null),t[25](null),a=!1,Ve(f)}}}function Vk(t){let e,n,i,l,r,o,u,s,a;function f(_,b){return _[9].length||_[13]?Lk:Nk}let c=f(t),g=c(t),h=!t[12]&&!t[11]&&t[0].role!="tableCell"&&yd(),d=t[13]&&Ed(t);return{c(){e=v("div"),n=v("div"),g.c(),i=Q(),h&&h.c(),r=Q(),d&&d.c(),o=Fe(),m(n,"class","value"),p(n,"placeholder",t[9].length<1),P(n,"padding-left",t[0].icon?"32px":t[0].padding),P(n,"padding-right",t[0].clearValueIcon?"32px":t[0].padding),m(e,"class","superCell"),m(e,"tabindex",l=t[0].readonly||t[0].disabled?-1:0),p(e,"inEdit",t[3]=="Editing"),p(e,"inline",t[0].role=="inlineInput"),p(e,"tableCell",t[0].role=="tableCell"),p(e,"formInput",t[0].role=="formInput"),p(e,"disabled",t[0].disabled),p(e,"readonly",t[0].readonly),P(e,"color",t[0].color),P(e,"background",t[0].background)},m(_,b){A(_,e,b),S(e,n),g.m(n,null),S(n,i),h&&h.m(n,null),t[19](e),A(_,r,b),d&&d.m(_,b),A(_,o,b),u=!0,s||(a=[B(n,"click",function(){Ge(t[1].toggle)&&t[1].toggle.apply(this,arguments)}),B(e,"focusin",function(){Ge(t[1].focus)&&t[1].focus.apply(this,arguments)}),B(e,"focusout",function(){Ge(t[1].focusout)&&t[1].focusout.apply(this,arguments)})],s=!0)},p(_,b){t=_,c===(c=f(t))&&g?g.p(t,b):(g.d(1),g=c(t),g&&(g.c(),g.m(n,i))),!t[12]&&!t[11]&&t[0].role!="tableCell"?h||(h=yd(),h.c(),h.m(n,null)):h&&(h.d(1),h=null),(!u||b[0]&512)&&p(n,"placeholder",t[9].length<1),b[0]&1&&P(n,"padding-left",t[0].icon?"32px":t[0].padding),b[0]&1&&P(n,"padding-right",t[0].clearValueIcon?"32px":t[0].padding),(!u||b[0]&1&&l!==(l=t[0].readonly||t[0].disabled?-1:0))&&m(e,"tabindex",l),(!u||b[0]&8)&&p(e,"inEdit",t[3]=="Editing"),(!u||b[0]&1)&&p(e,"inline",t[0].role=="inlineInput"),(!u||b[0]&1)&&p(e,"tableCell",t[0].role=="tableCell"),(!u||b[0]&1)&&p(e,"formInput",t[0].role=="formInput"),(!u||b[0]&1)&&p(e,"disabled",t[0].disabled),(!u||b[0]&1)&&p(e,"readonly",t[0].readonly),b[0]&1&&P(e,"color",t[0].color),b[0]&1&&P(e,"background",t[0].background),t[13]?d?(d.p(t,b),b[0]&8192&&U(d,1)):(d=Ed(t),d.c(),U(d,1),d.m(o.parentNode,o)):d&&(He(),Z(d,1,1,()=>{d=null}),ze())},i(_){u||(U(d),u=!0)},o(_){Z(d),u=!1},d(_){_&&(C(e),C(r),C(o)),g.d(),h&&h.d(),t[19](null),d&&d.d(_),s=!1,Ve(a)}}}function Bk(t,e,n){let i,l,r,o,u,s,a,f=ue,c=()=>(f(),f=ft(M,q=>n(3,a=q)),M);t.$$.on_destroy.push(()=>f());const g=le.createEventDispatcher(),{API:h}=le.getContext("sdk");let{value:d}=e,{cellOptions:_}=e,{fieldSchema:b}=e,{tableid:w}=e,E=d,k,I,O,D,N,{cellState:M=Ft(_.initialState??"View",{"*":{goTo(q){return q}},View:{_enter(){n(6,O=!1)},focus(){if(!_.readonly)return"Editing"}},Editing:{_enter(){E=d,g("enteredit")},_exit(){g("exitedit")},toggle(){n(6,O=!O)},focusout(q){if(!(k!=null&&k.contains(q.relatedTarget))&&!(I!=null&&I.contains(q.relatedTarget)))return d!==E&&g("change",d),"View"},change(q){_.debounce&&g("change",d)},submit(q){if(!I.contains(q.relatedTarget))return d!==E&&g("change",d),g("focusout"),"View"},cancel(){return n(16,d=E),"View"}}})}=e;c();const V=async q=>{let j=new FormData;for(let K=0;K<q.length;K++)j.append("file",q[K]);try{let K=await h.uploadAttachment(w,j);return n(9,l=[...l,...K]),g("change",[...l]),K}catch(K){return console.error("Upload failed:",K),[]}};function W(q){const j=q.target,K=Array.from(j.files||[]);V(K)}async function ne(q){l.splice(q,1),n(9,l),n(16,d),n(2,i),n(17,b),g("change",l)}function H(q){Be[q?"unshift":"push"](()=>{k=q,n(4,k)})}const $=q=>ne(q),Y=q=>ne(q),G=q=>n(7,D=q),oe=()=>N==null?void 0:N.click();function ie(q){Be[q?"unshift":"push"](()=>{N=q,n(8,N)})}function J(q){Be[q?"unshift":"push"](()=>{I=q,n(5,I)})}return t.$$set=q=>{"value"in q&&n(16,d=q.value),"cellOptions"in q&&n(0,_=q.cellOptions),"fieldSchema"in q&&n(17,b=q.fieldSchema),"tableid"in q&&n(18,w=q.tableid),"cellState"in q&&c(n(1,M=q.cellState))},t.$$.update=()=>{var q;t.$$.dirty[0]&131072&&n(2,i=((q=b==null?void 0:b.type)==null?void 0:q.includes("single"))!==!0),t.$$.dirty[0]&65540&&n(9,l=d&&i?d:d?[d]:[]),t.$$.dirty[0]&8&&n(13,r=a=="Editing"),t.$$.dirty[0]&1&&n(12,o=_.readonly),t.$$.dirty[0]&1&&n(11,u=_.disabled),t.$$.dirty[0]&1&&n(10,s=_.placeholder??"")},[_,M,i,a,k,I,O,D,N,l,s,u,o,r,W,ne,d,b,w,H,$,Y,G,oe,ie,J]}class ns extends Ze{constructor(e){super(),Qe(this,e,Bk,Vk,Ye,{value:16,cellOptions:0,fieldSchema:17,tableid:18,cellState:1},null,[-1,-1])}}function Ad(t){let e,n,i;return{c(){e=v("div"),m(e,"class","grabber"),P(e,"height",t[5].headerHeight-16)},m(l,r){A(l,e,r),n||(i=[B(e,"mousedown",t[3].startResizing),B(e,"dblclick",t[3].resetSize),B(e,"mouseenter",t[33]),B(e,"mouseleave",t[34])],n=!0)},p(l,r){r[0]&32&&P(e,"height",l[5].headerHeight-16)},d(l){l&&C(e),n=!1,Ve(i)}}}function Td(t){let e,n;return e=new Fb({props:{sorted:t[4]}}),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l[0]&16&&(r.sorted=i[4]),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function Uk(t){let e;const n=t[30].default,i=Ut(n,t,t[37],null);return{c(){i&&i.c()},m(l,r){i&&i.m(l,r),e=!0},p(l,r){i&&i.p&&(!e||r[1]&64)&&zt(i,n,l,l[37],e?Ht(n,l[37],r,null):jt(l[37]),null)},i(l){e||(U(i,l),e=!0)},o(l){Z(i,l),e=!1},d(l){i&&i.d(l)}}}function Id(t){let e,n;return e=new sw({props:{footerLabel:t[10]}}),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l[0]&1024&&(r.footerLabel=i[10]),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function Hk(t){var g;let e,n,i,l,r,o,u,s,a=t[5].showHeader&&t[5].canResize&&Ad(t),f=t[5].showHeader&&Td(t);l=new lw({props:{rows:(g=t[6])==null?void 0:g.rows,rowHeight:t[14].appearance.rowHeight,field:t[5].name,idField:t[14].data.idColumn,zebra:t[14].appearance.zebraColors,isLast:t[5].isLast,isFirst:t[5].isFirst,$$slots:{default:[Uk]},$$scope:{ctx:t}}});let c=t[5].showFooter&&Id(t);return{c(){e=v("div"),a&&a.c(),n=Q(),f&&f.c(),i=Q(),We(l.$$.fragment),r=Q(),c&&c.c(),m(e,"class","super-column"),p(e,"sticky",t[0]&&t[1]),p(e,"resizing",t[7]),p(e,"considerResizing",t[8]&&!t[7]),p(e,"isLast",t[5].isLast),P(e,"max-width",t[12]),P(e,"min-width",t[11])},m(h,d){A(h,e,d),a&&a.m(e,null),S(e,n),f&&f.m(e,null),S(e,i),je(l,e,null),S(e,r),c&&c.m(e,null),t[35](e),o=!0,u||(s=[B(window,"mouseup",function(){Ge(t[5].canResize?t[31]:null)&&(t[5].canResize?t[31]:null).apply(this,arguments)}),B(window,"mousemove",function(){Ge(t[5].canResize?t[32]:null)&&(t[5].canResize?t[32]:null).apply(this,arguments)}),B(e,"mouseleave",t[36])],u=!0)},p(h,d){var b;t=h,t[5].showHeader&&t[5].canResize?a?a.p(t,d):(a=Ad(t),a.c(),a.m(e,n)):a&&(a.d(1),a=null),t[5].showHeader?f?(f.p(t,d),d[0]&32&&U(f,1)):(f=Td(t),f.c(),U(f,1),f.m(e,i)):f&&(He(),Z(f,1,1,()=>{f=null}),ze());const _={};d[0]&64&&(_.rows=(b=t[6])==null?void 0:b.rows),d[0]&16384&&(_.rowHeight=t[14].appearance.rowHeight),d[0]&32&&(_.field=t[5].name),d[0]&16384&&(_.idField=t[14].data.idColumn),d[0]&16384&&(_.zebra=t[14].appearance.zebraColors),d[0]&32&&(_.isLast=t[5].isLast),d[0]&32&&(_.isFirst=t[5].isFirst),d[1]&64&&(_.$$scope={dirty:d,ctx:t}),l.$set(_),t[5].showFooter?c?(c.p(t,d),d[0]&32&&U(c,1)):(c=Id(t),c.c(),U(c,1),c.m(e,null)):c&&(He(),Z(c,1,1,()=>{c=null}),ze()),(!o||d[0]&3)&&p(e,"sticky",t[0]&&t[1]),(!o||d[0]&128)&&p(e,"resizing",t[7]),(!o||d[0]&384)&&p(e,"considerResizing",t[8]&&!t[7]),(!o||d[0]&32)&&p(e,"isLast",t[5].isLast),d[0]&4096&&P(e,"max-width",t[12]),d[0]&2048&&P(e,"min-width",t[11])},i(h){o||(U(f),U(l.$$.fragment,h),U(c),o=!0)},o(h){Z(f),Z(l.$$.fragment,h),Z(c),o=!1},d(h){h&&C(e),a&&a.d(),f&&f.d(),qe(l),c&&c.d(),t[35](null),u=!1,Ve(s)}}}function zk(t,e,n){var ke,ce;let i,l,r,o,u,s,a,f,c,g,h,d=ue,_=()=>(d(),d=ft(K,re=>n(6,h=re)),K),b,w,E;t.$$.on_destroy.push(()=>d());let{$$slots:k={},$$scope:I}=e;const{memo:O,derivedMemo:D,processStringSync:N,builderStore:M}=le.getContext("sdk");Me(t,M,re=>n(29,b=re));const V=le.getContext("stbSettings");Me(t,V,re=>n(14,E=re));const W=le.getContext("stbSortColumn");Me(t,W,re=>n(27,c=re));const ne=le.getContext("stbSortOrder");Me(t,ne,re=>n(28,g=re));const H=le.getContext("stbHovered");Me(t,H,re=>n(13,w=re));const $=le.getContext("stbEditing");Me(t,$,re=>n(41,f=re));const Y=le.getContext("stbState"),G=le.getContext("stbAPI"),oe={string:kn,longform:kn,number:or,bigint:or,options:rl,array:rl,jsonarray:rl,boolean:Yo,datetime:$o,link:Zr,json:ts,attachment_single:ns,attachment:ns,bb_reference_single:Zr,bb_reference:Zr},ie={string:kn,number:or,bigint:or,options:rl,array:rl,jsonarray:rl,boolean:Yo,datetime:$o,link:kn,json:ts,attachment_single:null,attachment:null,bb_reference_single:kn,bb_reference:kn};let{columnOptions:J}=e,{sticky:q}=e,{scrollPos:j}=e,{stbData:K}=e;_();let x=Math.random()*100,X,F,R,z=0,me,se,Oe=O(0);Me(t,Oe,re=>n(26,s=re));const be=O({...J,cellComponent:oe[(ke=J==null?void 0:J.schema)==null?void 0:ke.type]??kn,headerComponent:ie[(ce=J==null?void 0:J.schema)==null?void 0:ce.type]??kn});Me(t,be,re=>n(5,a=re));const Ie=D(be,re=>({role:"tableCell",showDirty:!0,readonly:!re.canEdit,align:re.align,template:re.template,optionsViewMode:re.optionsViewMode,relViewMode:re.relViewMode,padding:re.isFirst?"1rem":"0.5rem",background:re.background,color:re.color,controlType:"checkbox"})),ve=D(be,re=>({align:re==null?void 0:re.align,color:re==null?void 0:re.color,background:"var(--spectrum-global-color-gray-50)",fontWeight:re==null?void 0:re.fontWeight,padding:re==null?void 0:re.cellPadding,placeholder:re.defaultFilteringOperator,clearValueIcon:!0,optionsViewMode:"text",optionsSource:"schema",debounce:250,controlType:"select",initialState:"Editing",role:"inlineInput"})),fe=Ft("Idle",{"*":{reset(){return"Idle"},headerClicked(){a.canFilter?this.filter():this.sort()},sort(){J.canSort&&(Y.sortBy(J.name,me=="ascending"?"descending":"ascending"),n(4,me="descending"))},lockWidth(){X||Re(Oe,s=se==null?void 0:se.clientWidth,s)},unlockWidth(){X||(Re(Oe,s=0,s),J.asComponent||this.lockWidth.debounce(50))},startResizing(re){re.stopPropagation(),re.preventDefault(),n(7,X=!0),R=re.clientX,z=se.clientWidth,Re(Oe,s=z,s)},resize(re){Re(Oe,s=z+re.clientX-R,s)},stopResizing(re){re.preventDefault(),re.stopPropagation(),n(7,X=!1),R=void 0},resetSize(re){re.preventDefault(),re.stopPropagation(),Re(Oe,s=0,s)}},Idle:{_enter(){Re(Oe,s=0,s)},filter(){return J.canFilter?"Entering":"Idle"},enteredit(re){if(!i)return Re($,f=re,f),Y.edit(),"EditingCell"},addRow(){return"Inserting"}},Entering:{_enter(){Re(Oe,s=se.clientWidth,s)},filter(re){return Y.addFilter({...re,id:x}),"Filtered"},cancel(){return"Idle"},clear(){return"Idle"}},Filtered:{filter(re){Y.removeFilter(x),Y.addFilter({...re,id:x})},clear(){return Y.clearFilter(x),"Entering"}},EditingCell:{_enter(){Re(Oe,s=se.clientWidth,s),Y.edit.debounce(30)},patchRow(re,Ae,Ue,Je,lt){Y.patchRow(re,Ae,Ue,Je,lt)},exitedit(re){return Re($,f=-1,f),Y.endEdit.debounce(50),"Idle"}},Inserting:{_enter(){Re(Oe,s=se.clientWidth,s)},_exit(){Re(Oe,s=0,s)},cancelAddRow(){return"Idle"}}}),Ne=(re,Ae)=>{if(re&&(Ae!=null&&Ae.includes("."))){for(var Ue=0,Ae=Ae.split("."),Je=Ae.length;Ue<Je;Ue++)if(re[Ae[Ue]])re=re[Ae[Ue]];else{re=null;break}return re}else return re[Ae]??void 0},te=(re,Ae)=>re>0?re:Ae.widthOverride?Ae.widthOverride:Ae.sizing=="fixed"?Ae.fixedWidth:Ae.minWidth,ae=(re,Ae)=>re>0?re:Ae.widthOverride?Ae.widthOverride:Ae.sizing=="fixed"?Ae.fixedWidth:"unset",de=re=>{let Ae,Ue=J.canEdit;return(re==null?void 0:re.type)=="json",Ae=oe[re==null?void 0:re.type]||kn,Ae==kn&&!Ue&&(Ae=Go),Ae};le.setContext("stColumnOptions",be),le.setContext("stRowCellOptions",Ie),le.setContext("stHeaderCellOptions",ve),le.setContext("stColumnState",fe),le.onMount(()=>{G==null||G.registerSuperColumn(x,fe),(a.sizing==="flexible"||a.sizing==="flex")&&a.sizing!=="fixed"&&setTimeout(()=>{se&&s===0&&!J.asComponent&&Re(Oe,s=se.clientWidth,s)},0)}),le.onDestroy(()=>{G==null||G.unregisterSuperColumn(x)});const Xe=re=>{X&&fe.stopResizing(re)},Te=re=>{X&&fe.resize(re)},Se=()=>n(8,F=!0),Le=()=>n(8,F=!1);function rt(re){Be[re?"unshift":"push"](()=>{se=re,n(9,se)})}const kt=()=>Re(H,w=null,w);return t.$$set=re=>{"columnOptions"in re&&n(23,J=re.columnOptions),"sticky"in re&&n(0,q=re.sticky),"scrollPos"in re&&n(1,j=re.scrollPos),"stbData"in re&&_(n(2,K=re.stbData)),"$$scope"in re&&n(37,I=re.$$scope)},t.$$.update=()=>{var re,Ae;t.$$.dirty[0]&536870912&&n(24,i=b==null?void 0:b.inBuilder),t.$$.dirty[0]&25165827&&be.set({...J,inBuilder:i,cellComponent:de(J.schema),headerComponent:ie[(re=J==null?void 0:J.schema)==null?void 0:re.type]??kn,background:q&&j?"var(--spectrum-global-color-gray-75)":J.quiet?"transparent":J.background}),t.$$.dirty[0]&67108896&&n(12,l=ae(s,a)),t.$$.dirty[0]&67108896&&n(11,r=te(s,a)),t.$$.dirty[0]&96&&n(25,u=(Ae=h==null?void 0:h.rows)==null?void 0:Ae.map(Ue=>Ne(Ue,a.name))),t.$$.dirty[0]&33554464&&n(10,o=a.footerTemplate?N(a.footerTemplate,{values:u}):void 0),t.$$.dirty[0]&402653232&&(c==a.name?n(4,me=g):c!=a.name&&me&&n(4,me=void 0))},[q,j,K,fe,me,a,h,X,F,se,o,r,l,w,E,M,V,W,ne,H,$,Oe,be,J,i,u,s,c,g,b,k,Xe,Te,Se,Le,rt,kt,I]}class is extends Ze{constructor(e){super(),Qe(this,e,zk,Hk,Ye,{columnOptions:23,sticky:0,scrollPos:1,stbData:2,columnState:3},null,[-1,-1])}get columnState(){return this.$$.ctx[3]}}function Dd(t,e,n){const i=t.slice();return i[39]=e[n].text,i[40]=e[n].icon,i[41]=e[n].disabled,i[42]=e[n].onClick,i[43]=e[n].size,i}function Od(t,e,n){const i=t.slice();return i[46]=e[n],i}function Rd(t,e,n){const i=t.slice();return i[49]=e[n].conditions,i[50]=e[n].disabledTemplate,i[42]=e[n].onClick,i[41]=e[n].disabled,i[51]=Rm(e[n],["conditions","disabledTemplate","onClick","disabled"]),i}function Pd(t){let e;return{c(){e=v("div"),e.innerHTML="<span></span>",m(e,"class","super-column-header")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function Md(t){let e,n,i=Ce(t[7]),l=[];for(let o=0;o<i.length;o+=1)l[o]=Ld(Rd(t,i,o));const r=o=>Z(l[o],1,1,()=>{l[o]=null});return{c(){for(let o=0;o<l.length;o+=1)l[o].c();e=Fe()},m(o,u){for(let s=0;s<l.length;s+=1)l[s]&&l[s].m(o,u);A(o,e,u),n=!0},p(o,u){if(u[0]&134455424){i=Ce(o[7]);let s;for(s=0;s<i.length;s+=1){const a=Rd(o,i,s);l[s]?(l[s].p(a,u),U(l[s],1)):(l[s]=Ld(a),l[s].c(),U(l[s],1),l[s].m(e.parentNode,e))}for(He(),s=i.length;s<l.length;s+=1)r(s);ze()}},i(o){if(!n){for(let u=0;u<i.length;u+=1)U(l[u]);n=!0}},o(o){l=l.filter(Boolean);for(let u=0;u<l.length;u+=1)Z(l[u]);n=!1},d(o){o&&C(e),St(l,o)}}}function Nd(t){var o,u;let e,n;function i(){return t[33](t[46],t[42])}const l=[t[51],{disabled:t[41]||t[16]==t[46]||t[15][t[46]].disabled||t[27].shouldDisableButton(t[50],t[27].enrichContext((u=(o=t[17])==null?void 0:o.rows)==null?void 0:u[t[46]]))},{onClick:i}];let r={};for(let s=0;s<l.length;s+=1)r=vs(r,l[s]);return e=new el({props:r}),{c(){We(e.$$.fragment)},m(s,a){je(e,s,a),n=!0},p(s,a){var c,g;t=s;const f=a[0]&134455424?Gm(l,[a[0]&128&&Ym(t[51]),{disabled:t[41]||t[16]==t[46]||t[15][t[46]].disabled||t[27].shouldDisableButton(t[50],t[27].enrichContext((g=(c=t[17])==null?void 0:c.rows)==null?void 0:g[t[46]]))},a[0]&134226048&&{onClick:i}]):{};e.$set(f)},i(s){n||(U(e.$$.fragment,s),n=!0)},o(s){Z(e.$$.fragment,s),n=!1},d(s){qe(e,s)}}}function Ld(t){var r,o;let e=t[27].shouldShowButton(t[49]||[],t[27].enrichContext((o=(r=t[17])==null?void 0:r.rows)==null?void 0:o[t[46]])),n,i,l=e&&Nd(t);return{c(){l&&l.c(),n=Fe()},m(u,s){l&&l.m(u,s),A(u,n,s),i=!0},p(u,s){var a,f;s[0]&139392&&(e=u[27].shouldShowButton(u[49]||[],u[27].enrichContext((f=(a=u[17])==null?void 0:a.rows)==null?void 0:f[u[46]]))),e?l?(l.p(u,s),s[0]&139392&&U(l,1)):(l=Nd(u),l.c(),U(l,1),l.m(n.parentNode,n)):l&&(He(),Z(l,1,1,()=>{l=null}),ze())},i(u){i||(U(l),i=!0)},o(u){Z(l),i=!1},d(u){u&&C(n),l&&l.d(u)}}}function Fd(t){let e,n;function i(...l){return t[34](t[46],...l)}return e=new el({props:{size:"S",icon:t[10],text:"",quiet:"true",type:"secondary",onClick:i}}),{c(){We(e.$$.fragment)},m(l,r){je(e,l,r),n=!0},p(l,r){t=l;const o={};r[0]&1024&&(o.icon=t[10]),r[0]&8192&&(o.onClick=i),e.$set(o)},i(l){n||(U(e.$$.fragment,l),n=!0)},o(l){Z(e.$$.fragment,l),n=!1},d(l){qe(e,l)}}}function Vd(t){var c,g;let e,n,i,l,r,o,u,s=t[1]&&((c=t[7])==null?void 0:c.length)&&Md(t),a=t[1]&&((g=t[6])==null?void 0:g.length)&&Fd(t);function f(){return t[35](t[46])}return{c(){e=v("div"),n=v("div"),s&&s.c(),i=Q(),a&&a.c(),l=Q(),m(n,"class","row-buttons svelte-jgskq3"),P(n,"gap",t[7].length>1?"0.5rem":"0rem"),m(e,"class","super-row"),p(e,"is-selected",t[15][t[46]].selected),p(e,"is-hovered",t[14]==t[46]||t[12]==t[46]),p(e,"is-editing",t[16]==t[46]),p(e,"is-disabled",t[15][t[46]].disabled),P(e,"min-height",t[15][t[46]].height),P(e,"padding-right",t[2]&&t[0]?"1.5rem":"0.5rem")},m(h,d){A(h,e,d),S(e,n),s&&s.m(n,null),S(n,i),a&&a.m(n,null),S(e,l),r=!0,o||(u=[B(e,"mouseenter",f),B(e,"mouseleave",t[36])],o=!0)},p(h,d){var _,b;t=h,t[1]&&((_=t[7])!=null&&_.length)?s?(s.p(t,d),d[0]&130&&U(s,1)):(s=Md(t),s.c(),U(s,1),s.m(n,i)):s&&(He(),Z(s,1,1,()=>{s=null}),ze()),t[1]&&((b=t[6])!=null&&b.length)?a?(a.p(t,d),d[0]&66&&U(a,1)):(a=Fd(t),a.c(),U(a,1),a.m(n,null)):a&&(He(),Z(a,1,1,()=>{a=null}),ze()),d[0]&128&&P(n,"gap",t[7].length>1?"0.5rem":"0rem"),(!r||d[0]&40960)&&p(e,"is-selected",t[15][t[46]].selected),(!r||d[0]&28672)&&p(e,"is-hovered",t[14]==t[46]||t[12]==t[46]),(!r||d[0]&73728)&&p(e,"is-editing",t[16]==t[46]),(!r||d[0]&40960)&&p(e,"is-disabled",t[15][t[46]].disabled),d[0]&40960&&P(e,"min-height",t[15][t[46]].height),d[0]&5&&P(e,"padding-right",t[2]&&t[0]?"1.5rem":"0.5rem")},i(h){r||(U(s),U(a),r=!0)},o(h){Z(s),Z(a),r=!1},d(h){h&&C(e),s&&s.d(),a&&a.d(),o=!1,Ve(u)}}}function Bd(t){let e;return{c(){e=v("div"),m(e,"class","add-row"),P(e,"padding","unset")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function Ud(t){let e;return{c(){e=v("div"),m(e,"class","super-column-footer")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function Hd(t){let e,n;return e=new wn({props:{open:!0,anchor:t[4],minWidth:150,align:t[0]?"right":"left",$$slots:{default:[jk]},$$scope:{ctx:t}}}),e.$on("close",t[38]),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l[0]&16&&(r.anchor=i[4]),l[0]&1&&(r.align=i[0]?"right":"left"),l[0]&4193|l[1]&8388608&&(r.$$scope={dirty:l,ctx:i}),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function zd(t){let e,n,i=Ce(t[6]),l=[];for(let o=0;o<i.length;o+=1)l[o]=jd(Dd(t,i,o));const r=o=>Z(l[o],1,1,()=>{l[o]=null});return{c(){e=v("div");for(let o=0;o<l.length;o+=1)l[o].c();m(e,"class","action-menu svelte-jgskq3")},m(o,u){A(o,e,u);for(let s=0;s<l.length;s+=1)l[s]&&l[s].m(e,null);n=!0},p(o,u){if(u[0]&134221921){i=Ce(o[6]);let s;for(s=0;s<i.length;s+=1){const a=Dd(o,i,s);l[s]?(l[s].p(a,u),U(l[s],1)):(l[s]=jd(a),l[s].c(),U(l[s],1),l[s].m(e,null))}for(He(),s=i.length;s<l.length;s+=1)r(s);ze()}},i(o){if(!n){for(let u=0;u<i.length;u+=1)U(l[u]);n=!0}},o(o){l=l.filter(Boolean);for(let u=0;u<l.length;u+=1)Z(l[u]);n=!1},d(o){o&&C(e),St(l,o)}}}function jd(t){let e,n;function i(){return t[37](t[42])}return e=new el({props:{size:t[43],icon:t[40],text:t[39],disabled:t[41],menuItem:!0,menuAlign:t[0]?"right":"left",onClick:i}}),{c(){We(e.$$.fragment)},m(l,r){je(e,l,r),n=!0},p(l,r){t=l;const o={};r[0]&64&&(o.size=t[43]),r[0]&64&&(o.icon=t[40]),r[0]&64&&(o.text=t[39]),r[0]&64&&(o.disabled=t[41]),r[0]&1&&(o.menuAlign=t[0]?"right":"left"),r[0]&4192&&(o.onClick=i),e.$set(o)},i(l){n||(U(e.$$.fragment,l),n=!0)},o(l){Z(e.$$.fragment,l),n=!1},d(l){qe(e,l)}}}function jk(t){var l;let e,n,i=((l=t[6])==null?void 0:l.length)&&zd(t);return{c(){i&&i.c(),e=Fe()},m(r,o){i&&i.m(r,o),A(r,e,o),n=!0},p(r,o){var u;(u=r[6])!=null&&u.length?i?(i.p(r,o),o[0]&64&&U(i,1)):(i=zd(r),i.c(),U(i,1),i.m(e.parentNode,e)):i&&(He(),Z(i,1,1,()=>{i=null}),ze())},i(r){n||(U(i),n=!0)},o(r){Z(i),n=!1},d(r){r&&C(e),i&&i.d(r)}}}function qk(t){let e,n,i,l,r,o,u,s,a=t[3].showHeader&&Pd(),f=Ce(t[13]),c=[];for(let b=0;b<f.length;b+=1)c[b]=Vd(Od(t,f,b));const g=b=>Z(c[b],1,1,()=>{c[b]=null});let h=t[8]&&Bd(),d=t[3].showFooter&&Ud(),_=t[5]&&Hd(t);return{c(){e=v("div"),a&&a.c(),n=Q(),i=v("div");for(let b=0;b<c.length;b+=1)c[b].c();l=Q(),h&&h.c(),r=Q(),d&&d.c(),o=Q(),_&&_.c(),u=Fe(),m(i,"class","super-column-body"),p(i,"quiet",t[11]),p(i,"sticky",t[9]),p(i,"zebra",t[3].appearance.zebraColors),P(i,"margin-top","var(--super-column-top-offset)"),m(e,"class","super-column"),p(e,"right",t[0]),p(e,"sticky",t[9]),P(e,"flex","none")},m(b,w){A(b,e,w),a&&a.m(e,null),S(e,n),S(e,i);for(let E=0;E<c.length;E+=1)c[E]&&c[E].m(i,null);S(e,l),h&&h.m(e,null),S(e,r),d&&d.m(e,null),A(b,o,w),_&&_.m(b,w),A(b,u,w),s=!0},p(b,w){if(b[3].showHeader?a||(a=Pd(),a.c(),a.m(e,n)):a&&(a.d(1),a=null),w[0]&402912455){f=Ce(b[13]);let E;for(E=0;E<f.length;E+=1){const k=Od(b,f,E);c[E]?(c[E].p(k,w),U(c[E],1)):(c[E]=Vd(k),c[E].c(),U(c[E],1),c[E].m(i,null))}for(He(),E=f.length;E<c.length;E+=1)g(E);ze()}(!s||w[0]&2048)&&p(i,"quiet",b[11]),(!s||w[0]&512)&&p(i,"sticky",b[9]),(!s||w[0]&8)&&p(i,"zebra",b[3].appearance.zebraColors),b[8]?h||(h=Bd(),h.c(),h.m(e,r)):h&&(h.d(1),h=null),b[3].showFooter?d||(d=Ud(),d.c(),d.m(e,null)):d&&(d.d(1),d=null),(!s||w[0]&1)&&p(e,"right",b[0]),(!s||w[0]&512)&&p(e,"sticky",b[9]),b[5]?_?(_.p(b,w),w[0]&32&&U(_,1)):(_=Hd(b),_.c(),U(_,1),_.m(u.parentNode,u)):_&&(He(),Z(_,1,1,()=>{_=null}),ze())},i(b){if(!s){for(let w=0;w<f.length;w+=1)U(c[w]);U(_),s=!0}},o(b){c=c.filter(Boolean);for(let w=0;w<c.length;w+=1)Z(c[w]);Z(_),s=!1},d(b){b&&(C(e),C(o),C(u)),a&&a.d(),St(c,b),h&&h.d(),d&&d.d(),_&&_.d(b)}}}function Wk(t,e,n){let i,l,r,o,u,s,a,f,c,g,h,d,_,b,w;const E=le.getContext("stbSettings");Me(t,E,z=>n(3,g=z));const k=le.getContext("stbState");Me(t,k,z=>n(31,f=z));const I=le.getContext("stbData");Me(t,I,z=>n(17,w=z));const O=le.getContext("stbHorizontalScrollPos");Me(t,O,z=>n(32,c=z));const D=le.getContext("stbHovered");Me(t,D,z=>n(14,d=z));const N=le.getContext("stbEditing");Me(t,N,z=>n(16,b=z));const M=le.getContext("stbMenuID");Me(t,M,z=>n(12,a=z));const V=le.getContext("stbRowMetadata");Me(t,V,z=>n(15,_=z));const W=le.getContext("stbVisibleRows");Me(t,W,z=>n(13,h=z));const ne=le.getContext("stbAPI");let{right:H}=e,{rowMenu:$}=e,{rowMenuItems:Y}=e,{menuItemsVisible:G=0}=e,{canScroll:oe}=e,ie,J;const q=(z,me)=>{n(4,ie=z.target),n(5,J=!J),Re(M,a=J?me:-1,a)},j=(z,me)=>{ne.executeRowButtonAction(z,me)},K=(z,me)=>q(me,z),x=z=>Re(D,d=z,d),X=()=>Re(D,d=null,d),F=z=>{ne.executeRowButtonAction(a,z),n(5,J=!1),Re(M,a=void 0,a)},R=()=>{n(5,J=!1),Re(M,a=void 0,a)};return t.$$set=z=>{"right"in z&&n(0,H=z.right),"rowMenu"in z&&n(1,$=z.rowMenu),"rowMenuItems"in z&&n(29,Y=z.rowMenuItems),"menuItemsVisible"in z&&n(30,G=z.menuItemsVisible),"canScroll"in z&&n(2,oe=z.canScroll)},t.$$.update=()=>{t.$$.dirty[0]&8&&n(11,i=g.appearance.quiet),t.$$.dirty[0]&8&&n(10,l=g.rowMenuIcon),t.$$.dirty[0]&1|t.$$.dirty[1]&2&&n(9,r=c>0&&!H),t.$$.dirty[1]&1&&n(8,o=f=="Inserting"),t.$$.dirty[0]&1610612736&&n(7,u=G<(Y==null?void 0:Y.length)?Y.slice(0,G):Y),t.$$.dirty[0]&1610612736&&n(6,s=G<(Y==null?void 0:Y.length)?Y.slice(G,Y.length):[])},[H,$,oe,g,ie,J,s,u,o,r,l,i,a,h,d,_,b,w,E,k,I,O,D,N,M,V,W,ne,q,Y,G,f,c,j,K,x,X,F,R]}class qd extends Ze{constructor(e){super(),Qe(this,e,Wk,qk,Ye,{right:0,rowMenu:1,rowMenuItems:29,menuItemsVisible:30,canScroll:2},null,[-1,-1])}}function Gk(t){let e;return{c(){e=v("i"),m(e,"class","ph ph-minus svelte-ba31wf")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function Yk(t){let e;return{c(){e=v("i"),m(e,"class","ph ph-check svelte-ba31wf")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function Kk(t){let e,n,i;function l(u,s){if(u[0])return Yk;if(u[1])return Gk}let r=l(t),o=r&&r(t);return{c(){e=v("button"),o&&o.c(),m(e,"class","svelte-ba31wf"),p(e,"checked",t[0])},m(u,s){A(u,e,s),o&&o.m(e,null),n||(i=B(e,"click",t[2]),n=!0)},p(u,[s]){r!==(r=l(u))&&(o&&o.d(1),o=r&&r(u),o&&(o.c(),o.m(e,null))),s&1&&p(e,"checked",u[0])},i:ue,o:ue,d(u){u&&C(e),o&&o.d(),n=!1,i()}}}function Xk(t,e,n){const i=le.createEventDispatcher();let{checked:l=!1}=e,{partial:r=!1}=e,{disabled:o=!1}=e;function u(){o||(n(0,l=!l),i("change",{checked:l}))}return t.$$set=s=>{"checked"in s&&n(0,l=s.checked),"partial"in s&&n(1,r=s.partial),"disabled"in s&&n(3,o=s.disabled)},[l,r,u,o]}class Wd extends Ze{constructor(e){super(),Qe(this,e,Xk,Kk,Ye,{checked:0,partial:1,disabled:3})}}function Gd(t,e,n){var r;const i=t.slice();i[34]=e[n];const l=(r=i[14][i[34]])==null?void 0:r.selected;return i[35]=l,i}function Yd(t){var d;let e,n,i,l=[],r=new Map,o,u,s,a=((d=t[6])==null?void 0:d.showHeader)&&Kd(t),f=Ce(t[5]);const c=_=>_[34];for(let _=0;_<f.length;_+=1){let b=Gd(t,f,_),w=c(b);r.set(w,l[_]=eh(w,b))}let g=t[17]=="Inserting"&&th(),h=t[6].showFooter&&nh();return{c(){e=v("div"),a&&a.c(),n=Q(),i=v("div");for(let _=0;_<l.length;_+=1)l[_].c();o=Q(),g&&g.c(),u=Q(),h&&h.c(),m(i,"class","super-column-body"),p(i,"zebra",t[10]),p(i,"quiet",t[9]),p(i,"sticky",t[0]),P(i,"margin-top","var(--super-column-top-offset)"),m(e,"class","super-column control-column"),p(e,"sticky",t[0])},m(_,b){A(_,e,b),a&&a.m(e,null),S(e,n),S(e,i);for(let w=0;w<l.length;w+=1)l[w]&&l[w].m(i,null);S(i,o),g&&g.m(i,null),S(e,u),h&&h.m(e,null),s=!0},p(_,b){var w;(w=_[6])!=null&&w.showHeader?a?(a.p(_,b),b[0]&64&&U(a,1)):(a=Kd(_),a.c(),U(a,1),a.m(e,n)):a&&(He(),Z(a,1,1,()=>{a=null}),ze()),b[0]&16892026&&(f=Ce(_[5]),He(),l=Tt(l,b,c,1,_,f,r,i,Di,eh,o,Gd),ze()),_[17]=="Inserting"?g||(g=th(),g.c(),g.m(i,null)):g&&(g.d(1),g=null),(!s||b[0]&1024)&&p(i,"zebra",_[10]),(!s||b[0]&512)&&p(i,"quiet",_[9]),(!s||b[0]&1)&&p(i,"sticky",_[0]),_[6].showFooter?h||(h=nh(),h.c(),h.m(e,null)):h&&(h.d(1),h=null),(!s||b[0]&1)&&p(e,"sticky",_[0])},i(_){if(!s){U(a);for(let b=0;b<f.length;b+=1)U(l[b]);s=!0}},o(_){Z(a);for(let b=0;b<l.length;b+=1)Z(l[b]);s=!1},d(_){_&&C(e),a&&a.d();for(let b=0;b<l.length;b+=1)l[b].d();g&&g.d(),h&&h.d()}}}function Kd(t){let e,n,i,l,r=t[4]&&Xd(),o=t[8]&&Qd(t),u=t[3]&&Zd(t);return{c(){e=v("div"),r&&r.c(),n=Q(),o&&o.c(),i=Q(),u&&u.c(),m(e,"class","control-column-header"),P(e,"gap","1rem")},m(s,a){A(s,e,a),r&&r.m(e,null),S(e,n),o&&o.m(e,null),S(e,i),u&&u.m(e,null),l=!0},p(s,a){s[4]?r||(r=Xd(),r.c(),r.m(e,n)):r&&(r.d(1),r=null),s[8]?o?(o.p(s,a),a[0]&256&&U(o,1)):(o=Qd(s),o.c(),U(o,1),o.m(e,i)):o&&(He(),Z(o,1,1,()=>{o=null}),ze()),s[3]?u?u.p(s,a):(u=Zd(s),u.c(),u.m(e,null)):u&&(u.d(1),u=null)},i(s){l||(U(o),l=!0)},o(s){Z(o),l=!1},d(s){s&&C(e),r&&r.d(),o&&o.d(),u&&u.d()}}}function Xd(t){let e;return{c(){e=v("span"),m(e,"class","row-number")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function Qd(t){let e,n;return e=new Wd({props:{checked:t[12],partial:t[13]}}),e.$on("change",t[24].selectAllRows),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l[0]&4096&&(r.checked=i[12]),l[0]&8192&&(r.partial=i[13]),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function Zd(t){let e;function n(r,o){return r[7].length?Zk:Qk}let i=n(t),l=i(t);return{c(){l.c(),e=Fe()},m(r,o){l.m(r,o),A(r,e,o)},p(r,o){i===(i=n(r))&&l?l.p(r,o):(l.d(1),l=i(r),l&&(l.c(),l.m(e.parentNode,e)))},d(r){r&&C(e),l.d(r)}}}function Qk(t){let e;return{c(){e=v("i"),m(e,"class","ri-delete-bin-line disabled svelte-1hh0zkn")},m(n,i){A(n,e,i)},p:ue,d(n){n&&C(e)}}}function Zk(t){let e,n,i;return{c(){e=v("i"),m(e,"class","ri-delete-bin-line delete svelte-1hh0zkn")},m(l,r){A(l,e,r),n||(i=B(e,"click",t[24].deleteSelectedRows),n=!0)},p:ue,d(l){l&&C(e),n=!1,i()}}}function Jd(t){let e,n=t[34]+1+"",i;return{c(){e=v("div"),i=Ee(n),m(e,"class","row-number")},m(l,r){A(l,e,r),S(e,i)},p(l,r){r[0]&32&&n!==(n=l[34]+1+"")&&Pe(i,n)},d(l){l&&C(e)}}}function xd(t){var l;let e,n;function i(){return t[30](t[34])}return e=new Wd({props:{checked:t[35],disabled:(l=t[14][t[34]])==null?void 0:l.disabled}}),e.$on("change",i),{c(){We(e.$$.fragment)},m(r,o){je(e,r,o),n=!0},p(r,o){var s;t=r;const u={};o[0]&16416&&(u.checked=t[35]),o[0]&16416&&(u.disabled=(s=t[14][t[34]])==null?void 0:s.disabled),e.$set(u)},i(r){n||(U(e.$$.fragment,r),n=!0)},o(r){Z(e.$$.fragment,r),n=!1},d(r){qe(e,r)}}}function $d(t){let e,n,i;function l(...r){return t[31](t[34],...r)}return{c(){e=v("i"),m(e,"class","ri-delete-bin-line delete svelte-1hh0zkn"),p(e,"selected",t[35])},m(r,o){A(r,e,o),n||(i=B(e,"click",l),n=!0)},p(r,o){t=r,o[0]&16416&&p(e,"selected",t[35])},d(r){r&&C(e),n=!1,i()}}}function eh(t,e){let n,i,l,r,o,u,s=e[4]&&Jd(e),a=e[6].features.canSelect&&!e[1]&&xd(e),f=e[3]&&$d(e);function c(){return e[32](e[34])}return{key:t,first:null,c(){var g,h;n=v("div"),s&&s.c(),i=Q(),a&&a.c(),l=Q(),f&&f.c(),m(n,"class","super-row selection svelte-1hh0zkn"),p(n,"is-selected",e[35]),p(n,"is-hovered",e[15]==e[34]||e[16]==e[34]),p(n,"is-disabled",(g=e[14][e[34]])==null?void 0:g.disabled),P(n,"min-height",(h=e[14][e[34]])==null?void 0:h.height),this.first=n},m(g,h){A(g,n,h),s&&s.m(n,null),S(n,i),a&&a.m(n,null),S(n,l),f&&f.m(n,null),r=!0,o||(u=[B(n,"mouseenter",c),B(n,"mouseleave",e[33])],o=!0)},p(g,h){var d,_;e=g,e[4]?s?s.p(e,h):(s=Jd(e),s.c(),s.m(n,i)):s&&(s.d(1),s=null),e[6].features.canSelect&&!e[1]?a?(a.p(e,h),h[0]&66&&U(a,1)):(a=xd(e),a.c(),U(a,1),a.m(n,l)):a&&(He(),Z(a,1,1,()=>{a=null}),ze()),e[3]?f?f.p(e,h):(f=$d(e),f.c(),f.m(n,null)):f&&(f.d(1),f=null),(!r||h[0]&16416)&&p(n,"is-selected",e[35]),(!r||h[0]&98336)&&p(n,"is-hovered",e[15]==e[34]||e[16]==e[34]),(!r||h[0]&16416)&&p(n,"is-disabled",(d=e[14][e[34]])==null?void 0:d.disabled),h[0]&16416&&P(n,"min-height",(_=e[14][e[34]])==null?void 0:_.height)},i(g){r||(U(a),r=!0)},o(g){Z(a),r=!1},d(g){g&&C(n),s&&s.d(),a&&a.d(),f&&f.d(),o=!1,Ve(u)}}}function th(t){let e;return{c(){e=v("div"),m(e,"class","add-row"),P(e,"padding","unset")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function nh(t){let e;return{c(){e=v("div"),m(e,"class","super-column-footer"),P(e,"padding","unset")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function Jk(t){let e,n,i=t[11]&&Yd(t);return{c(){i&&i.c(),e=Fe()},m(l,r){i&&i.m(l,r),A(l,e,r),n=!0},p(l,r){l[11]?i?(i.p(l,r),r[0]&2048&&U(i,1)):(i=Yd(l),i.c(),U(i,1),i.m(e.parentNode,e)):i&&(He(),Z(i,1,1,()=>{i=null}),ze())},i(l){n||(U(i),n=!0)},o(l){Z(i),n=!1},d(l){l&&C(e),i&&i.d(l)}}}function xk(t,e,n){let i,l,r,o,u,s,a,f,c,g,h,d,_,b=ue,w=()=>(b(),b=ft(J,X=>n(29,_=X)),J),E,k,I,O,D;t.$$.on_destroy.push(()=>b());const N=le.getContext("stbState");Me(t,N,X=>n(17,D=X));const M=le.getContext("stbSettings");Me(t,M,X=>n(6,h=X));const V=le.getContext("stbHorizontalScrollPos");Me(t,V,X=>n(28,d=X));const W=le.getContext("stbHovered");Me(t,W,X=>n(15,I=X));const ne=le.getContext("stbMenuID");Me(t,ne,X=>n(16,O=X));const H=le.getContext("stbSelected");Me(t,H,X=>n(7,E=X));const $=le.getContext("stbAPI"),Y=le.getContext("stbVisibleRows");Me(t,Y,X=>n(5,g=X));const G=le.getContext("stbRowMetadata");Me(t,G,X=>n(14,k=X));let{sticky:oe}=e,{hideSelectionColumn:ie}=e,{stbData:J}=e;w();const q=X=>$.selectRow(X),j=(X,F)=>$.deleteRow(X),K=X=>Re(W,I=X,I),x=()=>Re(W,I=null,I);return t.$$set=X=>{"sticky"in X&&n(0,oe=X.sticky),"hideSelectionColumn"in X&&n(1,ie=X.hideSelectionColumn),"stbData"in X&&w(n(2,J=X.stbData))},t.$$.update=()=>{var X,F,R;t.$$.dirty[0]&536871040&&n(13,i=E.length&&E.length!=((X=_==null?void 0:_.rows)==null?void 0:X.length)),t.$$.dirty[0]&536871040&&n(12,l=E.length==((F=_==null?void 0:_.rows)==null?void 0:F.length)&&((R=_==null?void 0:_.rows)==null?void 0:R.length)>0),t.$$.dirty[0]&64&&n(4,r=h.appearance.numberingColumn),t.$$.dirty[0]&66&&n(27,o=h.features.canSelect&&!ie),t.$$.dirty[0]&64&&n(3,u=h.features.canDelete),t.$$.dirty[0]&268435456&&n(0,oe=d>0),t.$$.dirty[0]&134217752&&n(11,s=r||o||u),t.$$.dirty[0]&64&&n(10,a=h.appearance.zebraColors),t.$$.dirty[0]&64&&n(9,f=h.appearance.quiet),t.$$.dirty[0]&134217824&&n(8,c=o&&h.features.maxSelected!=1&&g.length>0)},[oe,ie,J,u,r,g,h,E,c,f,a,s,l,i,k,I,O,D,N,M,V,W,ne,H,$,Y,G,o,d,_,q,j,K,x]}class $k extends Ze{constructor(e){super(),Qe(this,e,xk,Jk,Ye,{sticky:0,hideSelectionColumn:1,stbData:2},null,[-1,-1])}}function ih(t,e,n){const i=t.slice();return i[12]=e[n].text,i[13]=e[n].icon,i[14]=e[n].disabled,i[15]=e[n].onClick,i[16]=e[n].size,i[17]=e[n].type,i[18]=e[n].conditions,i}function lh(t){let e,n;return e=new wn({props:{open:!0,anchor:t[1],align:t[0]?"right":"left",ignoreAnchor:!1,$$slots:{default:[e2]},$$scope:{ctx:t}}}),e.$on("close",t[11]),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l&2&&(r.anchor=i[1]),l&1&&(r.align=i[0]?"right":"left"),l&2097173&&(r.$$scope={dirty:l,ctx:i}),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function rh(t){let e,n;function i(){return t[10](t[15])}return e=new el({props:{size:t[16],type:t[17],icon:t[13],text:t[12],disabled:t[14],quiet:!0,menuItem:!0,menuAlign:t[0]?"right":"left",onClick:i}}),{c(){We(e.$$.fragment)},m(l,r){je(e,l,r),n=!0},p(l,r){t=l;const o={};r&4&&(o.size=t[16]),r&4&&(o.type=t[17]),r&4&&(o.icon=t[13]),r&4&&(o.text=t[12]),r&4&&(o.disabled=t[14]),r&1&&(o.menuAlign=t[0]?"right":"left"),r&20&&(o.onClick=i),e.$set(o)},i(l){n||(U(e.$$.fragment,l),n=!0)},o(l){Z(e.$$.fragment,l),n=!1},d(l){qe(e,l)}}}function e2(t){let e,n,i=Ce(t[2]),l=[];for(let o=0;o<i.length;o+=1)l[o]=rh(ih(t,i,o));const r=o=>Z(l[o],1,1,()=>{l[o]=null});return{c(){e=v("div");for(let o=0;o<l.length;o+=1)l[o].c();m(e,"class","action-menu svelte-6lzro5")},m(o,u){A(o,e,u);for(let s=0;s<l.length;s+=1)l[s]&&l[s].m(e,null);n=!0},p(o,u){if(u&53){i=Ce(o[2]);let s;for(s=0;s<i.length;s+=1){const a=ih(o,i,s);l[s]?(l[s].p(a,u),U(l[s],1)):(l[s]=rh(a),l[s].c(),U(l[s],1),l[s].m(e,null))}for(He(),s=i.length;s<l.length;s+=1)r(s);ze()}},i(o){if(!n){for(let u=0;u<i.length;u+=1)U(l[u]);n=!0}},o(o){l=l.filter(Boolean);for(let u=0;u<l.length;u+=1)Z(l[u]);n=!1},d(o){o&&C(e),St(l,o)}}}function t2(t){var l;let e,n,i=t[3]&&((l=t[2])==null?void 0:l.length)&&lh(t);return{c(){i&&i.c(),e=Fe()},m(r,o){i&&i.m(r,o),A(r,e,o),n=!0},p(r,[o]){var u;r[3]&&((u=r[2])!=null&&u.length)?i?(i.p(r,o),o&12&&U(i,1)):(i=lh(r),i.c(),U(i,1),i.m(e.parentNode,e)):i&&(He(),Z(i,1,1,()=>{i=null}),ze())},i(r){n||(U(i),n=!0)},o(r){Z(i),n=!1},d(r){r&&C(e),i&&i.d(r)}}}function n2(t,e,n){let i,l,r,o;const u=le.getContext("stbAPI"),s=le.getContext("stbMenuID");Me(t,s,_=>n(4,o=_));const a=le.getContext("stbMenuAnchor");Me(t,a,_=>n(1,r=_));let{rowContextMenuItems:f}=e,{right:c=!0}=e,{row:g}=e;const h=_=>{u.executeRowContextMenuAction(o,_)},d=()=>{Re(s,o=-1,o),Re(a,r=-1,r)};return t.$$set=_=>{"rowContextMenuItems"in _&&n(8,f=_.rowContextMenuItems),"right"in _&&n(0,c=_.right),"row"in _&&n(9,g=_.row)},t.$$.update=()=>{t.$$.dirty&2&&n(3,i=r!=-1),t.$$.dirty&768&&n(2,l=f==null?void 0:f.filter(({conditions:_})=>u.shouldShowButton(_||[],u.enrichContext(g))))},[c,r,l,i,o,u,s,a,f,g,h,d]}class i2 extends Ze{constructor(e){super(),Qe(this,e,n2,t2,Ye,{rowContextMenuItems:8,right:0,row:9})}}function l2(t){let e,n;const i=t[1].default,l=Ut(i,t,t[0],null);return{c(){e=v("div"),l&&l.c(),m(e,"class","st-control-columns")},m(r,o){A(r,e,o),l&&l.m(e,null),n=!0},p(r,[o]){l&&l.p&&(!n||o&1)&&zt(l,i,r,r[0],n?Ht(i,r[0],o,null):jt(r[0]),null)},i(r){n||(U(l,r),n=!0)},o(r){Z(l,r),n=!1},d(r){r&&C(e),l&&l.d(r)}}}function r2(t,e,n){let{$$slots:i={},$$scope:l}=e;return t.$$set=r=>{"$$scope"in r&&n(0,l=r.$$scope)},[l,i]}class oh extends Ze{constructor(e){super(),Qe(this,e,r2,l2,Ye,{})}}function sh(t,e,n){const i=t.slice();return i[13]=e[n],i[15]=n,i}function uh(t){let e;const n=t[11].default,i=Ut(n,t,t[10],null);return{c(){i&&i.c()},m(l,r){i&&i.m(l,r),e=!0},p(l,r){i&&i.p&&(!e||r&1024)&&zt(i,n,l,l[10],e?Ht(n,l[10],r,null):jt(l[10]),null)},i(l){e||(U(i,l),e=!0)},o(l){Z(i,l),e=!1},d(l){i&&i.d(l)}}}function o2(t){let e=[],n=new Map,i,l,r=Ce(t[8]);const o=u=>u[15];for(let u=0;u<r.length;u+=1){let s=sh(t,r,u),a=o(s);n.set(a,e[u]=ah(a,s))}return{c(){for(let u=0;u<e.length;u+=1)e[u].c();i=Fe()},m(u,s){for(let a=0;a<e.length;a+=1)e[a]&&e[a].m(u,s);A(u,i,s),l=!0},p(u,s){s&880&&(r=Ce(u[8]),He(),e=Tt(e,s,o,1,u,r,n,i.parentNode,Di,ah,i,sh),ze())},i(u){if(!l){for(let s=0;s<r.length;s+=1)U(e[s]);l=!0}},o(u){for(let s=0;s<e.length;s+=1)Z(e[s]);l=!1},d(u){u&&C(i);for(let s=0;s<e.length;s+=1)e[s].d(u)}}}function s2(t){let e;return{c(){e=v("div"),e.textContent="No columns defined. Please add columns to the Super Table.",m(e,"class","no-columns-placeholder")},m(n,i){A(n,e,i)},p:ue,i:ue,o:ue,d(n){n&&C(e)}}}function ah(t,e){let n,i,l;return i=new is({props:{stbData:e[6],columnOptions:{...e[9],...e[13],isFirst:e[15]==0,isLast:e[15]==e[8].length-1&&!e[4]&&e[5]}}}),{key:t,first:null,c(){n=Fe(),We(i.$$.fragment),this.first=n},m(r,o){A(r,n,o),je(i,r,o),l=!0},p(r,o){e=r;const u={};o&64&&(u.stbData=e[6]),o&816&&(u.columnOptions={...e[9],...e[13],isFirst:e[15]==0,isLast:e[15]==e[8].length-1&&!e[4]&&e[5]}),i.$set(u)},i(r){l||(U(i.$$.fragment,r),l=!0)},o(r){Z(i.$$.fragment,r),l=!1},d(r){r&&C(n),qe(i,r)}}}function fh(t){let e;const n=t[11].default,i=Ut(n,t,t[10],null);return{c(){i&&i.c()},m(l,r){i&&i.m(l,r),e=!0},p(l,r){i&&i.p&&(!e||r&1024)&&zt(i,n,l,l[10],e?Ht(n,l[10],r,null):jt(l[10]),null)},i(l){e||(U(i,l),e=!0)},o(l){Z(i,l),e=!1},d(l){i&&i.d(l)}}}function u2(t){let e,n,i,l,r,o,u=t[7].superColumnsPos=="first"&&uh(t);const s=[s2,o2],a=[];function f(g,h){return g[8].length===0?0:1}i=f(t),l=a[i]=s[i](t);let c=t[7].superColumnsPos=="last"&&fh(t);return{c(){e=v("div"),u&&u.c(),n=Q(),l.c(),r=Q(),c&&c.c(),m(e,"class","st-master-columns"),m(e,"tabindex","-1")},m(g,h){A(g,e,h),u&&u.m(e,null),S(e,n),a[i].m(e,null),S(e,r),c&&c.m(e,null),t[12](e),o=!0},p(g,[h]){g[7].superColumnsPos=="first"?u?(u.p(g,h),h&128&&U(u,1)):(u=uh(g),u.c(),U(u,1),u.m(e,n)):u&&(He(),Z(u,1,1,()=>{u=null}),ze());let d=i;i=f(g),i===d?a[i].p(g,h):(He(),Z(a[d],1,1,()=>{a[d]=null}),ze(),l=a[i],l?l.p(g,h):(l=a[i]=s[i](g),l.c()),U(l,1),l.m(e,r)),g[7].superColumnsPos=="last"?c?(c.p(g,h),h&128&&U(c,1)):(c=fh(g),c.c(),U(c,1),c.m(e,null)):c&&(He(),Z(c,1,1,()=>{c=null}),ze())},i(g){o||(U(u),U(l),U(c),o=!0)},o(g){Z(u),Z(l),Z(c),o=!1},d(g){g&&C(e),u&&u.d(),a[i].d(),c&&c.d(),t[12](null)}}}function a2(t,e,n){let i,l=ue,r=()=>(l(),l=ft(b,D=>n(7,i=D)),b),o,u=ue,s=()=>(u(),u=ft(d,D=>n(8,o=D)),d),a,f=ue,c=()=>(f(),f=ft(_,D=>n(9,a=D)),_);t.$$.on_destroy.push(()=>l()),t.$$.on_destroy.push(()=>u()),t.$$.on_destroy.push(()=>f());let{$$slots:g={},$$scope:h}=e,{superColumns:d}=e;s();let{commonColumnOptions:_}=e;c();let{stbSettings:b}=e;r();let{columnsViewport:w}=e,{showActionColumn:E}=e,{canScroll:k}=e,{stbData:I}=e;function O(D){Be[D?"unshift":"push"](()=>{w=D,n(0,w)})}return t.$$set=D=>{"superColumns"in D&&s(n(1,d=D.superColumns)),"commonColumnOptions"in D&&c(n(2,_=D.commonColumnOptions)),"stbSettings"in D&&r(n(3,b=D.stbSettings)),"columnsViewport"in D&&n(0,w=D.columnsViewport),"showActionColumn"in D&&n(4,E=D.showActionColumn),"canScroll"in D&&n(5,k=D.canScroll),"stbData"in D&&n(6,I=D.stbData),"$$scope"in D&&n(10,h=D.$$scope)},[w,d,_,b,E,k,I,i,o,a,h,g,O]}class f2 extends Ze{constructor(e){super(),Qe(this,e,a2,u2,Ye,{superColumns:1,commonColumnOptions:2,stbSettings:3,columnsViewport:0,showActionColumn:4,canScroll:5,stbData:6})}}function ch(t){var W,ne;let e,n,i,l,r,o,u,s,a,f,c,g,h,d,_,b,w=t[0]+(((ne=(W=t[3])==null?void 0:W.rows)==null?void 0:ne.length)||0)+"",E,k,I,O,D,N,M,V;return{c(){e=v("div"),n=v("div"),i=v("button"),l=v("i"),o=Q(),u=v("button"),s=v("i"),f=Q(),c=v("span"),g=Ee("Page "),h=Ee(t[5]),d=Ee(`
|
|
18
|
-
( `),_=Ee(t[0]),b=Ee(" - "),E=Ee(w),k=Ee(" )"),I=Q(),O=v("button"),D=v("i"),m(l,"class","ph ph-caret-double-left"),m(i,"class","pagination-btn svelte-133l4q0"),i.disabled=r=t[5]<=1,m(i,"title","First Page"),m(s,"class","ph ph-caret-left"),m(u,"class","pagination-btn svelte-133l4q0"),u.disabled=a=t[5]<=1,m(u,"title","Previous Page"),m(c,"class","pagination-info svelte-133l4q0"),m(D,"class","ph ph-caret-right"),m(O,"class","pagination-btn svelte-133l4q0"),O.disabled=N=!t[4],m(O,"title","Next Page"),m(n,"class","pagination-controls svelte-133l4q0"),m(e,"class","pagination-limit-offset svelte-133l4q0")},m(H,$){A(H,e,$),S(e,n),S(n,i),S(i,l),S(n,o),S(n,u),S(u,s),S(n,f),S(n,c),S(c,g),S(c,h),S(c,d),S(c,_),S(c,b),S(c,E),S(c,k),S(n,I),S(n,O),S(O,D),M||(V=[B(i,"click",t[9]),B(u,"click",t[7]),B(O,"click",t[8])],M=!0)},p(H,$){var Y,G;$&32&&r!==(r=H[5]<=1)&&(i.disabled=r),$&32&&a!==(a=H[5]<=1)&&(u.disabled=a),$&32&&Pe(h,H[5]),$&1&&Pe(_,H[0]),$&9&&w!==(w=H[0]+(((G=(Y=H[3])==null?void 0:Y.rows)==null?void 0:G.length)||0)+"")&&Pe(E,w),$&16&&N!==(N=!H[4])&&(O.disabled=N)},d(H){H&&C(e),M=!1,Ve(V)}}}function c2(t){let e,n=t[6]&&ch(t);return{c(){n&&n.c(),e=Fe()},m(i,l){n&&n.m(i,l),A(i,e,l)},p(i,[l]){i[6]?n?n.p(i,l):(n=ch(i),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},i:ue,o:ue,d(i){i&&C(e),n&&n.d(i)}}}function d2(t,e,n){let i,l,r,o,u=ue,s=()=>(u(),u=ft(_,D=>n(12,o=D)),_),a,f=ue,c=()=>(f(),f=ft(b,D=>n(3,a=D)),b);t.$$.on_destroy.push(()=>u()),t.$$.on_destroy.push(()=>f()),le.createEventDispatcher();let{limit:g=50}=e,{pagination:h="none"}=e,{currentOffset:d=0}=e,{dataSource:_=null}=e;s();let{fetch:b=null}=e;c();function w(){d>0&&(n(0,d=Math.max(0,d-g)),I())}function E(){r&&(n(0,d+=g),I())}function k(){n(0,d=0),I()}function I(){_&&Re(_,o={...o,queryParams:{...o.queryParams,offset:d}},o)}const O=D=>{if(!D||!D.parameters)return!1;const N=D.parameters.map(M=>M.name.toLowerCase());return N.includes("offset")&&N.includes("limit")};return t.$$set=D=>{"limit"in D&&n(10,g=D.limit),"pagination"in D&&n(11,h=D.pagination),"currentOffset"in D&&n(0,d=D.currentOffset),"dataSource"in D&&s(n(1,_=D.dataSource)),"fetch"in D&&c(n(2,b=D.fetch))},t.$$.update=()=>{var D;t.$$.dirty&6144&&n(6,i=O(o)&&h==="limitOffset"),t.$$.dirty&1025&&n(5,l=Math.floor(d/g)+1),t.$$.dirty&1032&&n(4,r=((D=a==null?void 0:a.rows)==null?void 0:D.length)>=g)},[d,_,b,a,r,l,i,w,E,k,g,h,o]}class h2 extends Ze{constructor(e){super(),Qe(this,e,d2,c2,Ye,{limit:10,pagination:11,currentOffset:0,dataSource:1,fetch:2})}}function dh(t){let e,n;return e=new qd({props:{rowMenuItems:t[4],menuItemsVisible:t[5],rowMenu:t[3]}}),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l[0]&16&&(r.rowMenuItems=i[4]),l[0]&32&&(r.menuItemsVisible=i[5]),l[0]&8&&(r.rowMenu=i[3]),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function hh(t){var i;let e,n;return e=new is({props:{stbData:t[15],sticky:!0,scrollPos:t[36],columnOptions:{...t[43][0],...t[44],overflow:t[26],isFirst:!0,isLast:((i=t[43])==null?void 0:i.length)==1&&!t[30]&&t[21]}}}),{c(){We(e.$$.fragment)},m(l,r){je(e,l,r),n=!0},p(l,r){var u;const o={};r[0]&32768&&(o.stbData=l[15]),r[1]&32&&(o.scrollPos=l[36]),r[0]&1142947840|r[1]&12288&&(o.columnOptions={...l[43][0],...l[44],overflow:l[26],isFirst:!0,isLast:((u=l[43])==null?void 0:u.length)==1&&!l[30]&&l[21]}),e.$set(o)},i(l){n||(U(e.$$.fragment,l),n=!0)},o(l){Z(e.$$.fragment,l),n=!1},d(l){qe(e,l)}}}function g2(t){let e,n,i,l,r;e=new $k({props:{stbData:t[15],hideSelectionColumn:t[7]}});let o=t[29]&&dh(t),u=t[8]&&t[43].length>1&&hh(t);return{c(){We(e.$$.fragment),n=Q(),o&&o.c(),i=Q(),u&&u.c(),l=Fe()},m(s,a){je(e,s,a),A(s,n,a),o&&o.m(s,a),A(s,i,a),u&&u.m(s,a),A(s,l,a),r=!0},p(s,a){const f={};a[0]&32768&&(f.stbData=s[15]),a[0]&128&&(f.hideSelectionColumn=s[7]),e.$set(f),s[29]?o?(o.p(s,a),a[0]&536870912&&U(o,1)):(o=dh(s),o.c(),U(o,1),o.m(i.parentNode,i)):o&&(He(),Z(o,1,1,()=>{o=null}),ze()),s[8]&&s[43].length>1?u?(u.p(s,a),a[0]&256|a[1]&4096&&U(u,1)):(u=hh(s),u.c(),U(u,1),u.m(l.parentNode,l)):u&&(He(),Z(u,1,1,()=>{u=null}),ze())},i(s){r||(U(e.$$.fragment,s),U(o),U(u),r=!0)},o(s){Z(e.$$.fragment,s),Z(o),Z(u),r=!1},d(s){s&&(C(n),C(i),C(l)),qe(e,s),o&&o.d(s),u&&u.d(s)}}}function gh(t){let e;const n=t[147].default,i=Ut(n,t,t[157],null);return{c(){i&&i.c()},m(l,r){i&&i.m(l,r),e=!0},p(l,r){i&&i.p&&(!e||r[5]&4)&&zt(i,n,l,l[157],e?Ht(n,l[157],r,null):jt(l[157]),null)},i(l){e||(U(i,l),e=!0)},o(l){Z(i,l),e=!1},d(l){i&&i.d(l)}}}function m2(t){let e=t[10],n,i,l=gh(t);return{c(){l.c(),n=Fe()},m(r,o){l.m(r,o),A(r,n,o),i=!0},p(r,o){o[0]&1024&&Ye(e,e=r[10])?(He(),Z(l,1,1,ue),ze(),l=gh(r),l.c(),U(l,1),l.m(n.parentNode,n)):l.p(r,o)},i(r){i||(U(l),i=!0)},o(r){Z(l),i=!1},d(r){r&&C(n),l.d(r)}}}function mh(t){let e,n;return e=new oh({props:{$$slots:{default:[_2]},$$scope:{ctx:t}}}),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l[0]&2097208|l[5]&4&&(r.$$scope={dirty:l,ctx:i}),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function _2(t){let e,n;return e=new qd({props:{rowMenuItems:t[4],menuItemsVisible:t[5],rowMenu:t[3],canScroll:t[21],right:!0}}),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l[0]&16&&(r.rowMenuItems=i[4]),l[0]&32&&(r.menuItemsVisible=i[5]),l[0]&8&&(r.rowMenu=i[3]),l[0]&2097152&&(r.canScroll=i[21]),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function _h(t){let e,n;return e=new Cb({props:{stbState:t[69],tableAPI:t[68],highlighted:t[19],tableActions:t[1],footer:t[39].showFooter}}),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l[0]&524288&&(r.highlighted=i[19]),l[0]&2&&(r.tableActions=i[1]),l[1]&256&&(r.footer=i[39].showFooter),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function ph(t){let e,n;return e=new Ib({props:{stbSettings:t[54],selectedActions:t[9],stbSelected:t[64],tableAPI:t[68],stbState:t[69],highlighted:t[19],entitySingular:t[12],entityPlural:t[13]}}),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l[0]&512&&(r.selectedActions=i[9]),l[0]&524288&&(r.highlighted=i[19]),l[0]&4096&&(r.entitySingular=i[12]),l[0]&8192&&(r.entityPlural=i[13]),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function bh(t){let e,n;return e=new Ob({}),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function p2(t){var J,q,j,K;let e,n,i,l,r,o,u,s,a,f,c,g,h,d,_,b,w,E,k,I,O,D,N,M,V;i=new t[45]({props:{actions:t[32],data:t[31]}}),r=new oh({props:{$$slots:{default:[g2]},$$scope:{ctx:t}}});function W(x){t[148](x)}let ne={stbData:t[15],stbSettings:t[54],superColumns:t[34],commonColumnOptions:t[70],canScroll:t[21],$$slots:{default:[m2]},$$scope:{ctx:t}};t[25]!==void 0&&(ne.columnsViewport=t[25]),u=new f2({props:ne}),Be.push(()=>Gt(u,"columnsViewport",W));let H=t[30]&&!t[27]&&mh(t);function $(x){t[149](x)}let Y={anchor:t[25],clientHeight:t[23],scrollHeight:t[20],highlighted:t[19],isEmpty:t[27]};t[22]!==void 0&&(Y.horizontalVisible=t[22]),c=new pb({props:Y}),Be.push(()=>Gt(c,"horizontalVisible",$)),c.$on("positionChange",t[69].calculateRowBoundaries),d=new kb({props:{isEmpty:t[27],message:t[39].data.emptyMessage,top:(J=t[43])!=null&&J.length?t[39].appearance.headerHeight+16:16,bottom:t[22]?24:16}}),b=new i2({props:{rowContextMenuItems:t[6],row:(j=(q=t[17])==null?void 0:q.rows)==null?void 0:j[t[40]]}});let G=(t[39].features.canInsert||t[38]=="Filtered")&&_h(t),oe=t[39].features.canSelect&&((K=t[9])==null?void 0:K.length)&&ph(t),ie=t[17].loading&&t[17].loaded&&bh();return D=new h2({props:{pagination:t[18],limit:t[0],dataSource:t[49],fetch:t[15]}}),{c(){e=v("div"),n=v("div"),We(i.$$.fragment),l=Q(),We(r.$$.fragment),o=Q(),We(u.$$.fragment),a=Q(),H&&H.c(),f=Q(),We(c.$$.fragment),h=Q(),We(d.$$.fragment),_=Q(),We(b.$$.fragment),w=Q(),G&&G.c(),E=Q(),oe&&oe.c(),k=Q(),ie&&ie.c(),O=Q(),We(D.$$.fragment),m(n,"class","super-table"),ni(()=>t[151].call(n)),p(n,"quiet",t[11]),p(n,"initializing",t[28]),P(n,"font-size",Gn[t[2]].rowFontSize),P(n,"--super-table-devider-color",t[41].color),P(n,"--super-table-body-height",t[23]),P(n,"--super-table-header-height",t[41].headerHeight),P(n,"--super-table-footer-height",t[41].footerHeight),P(n,"--super-table-horizontal-dividers",t[41].horizontal),P(n,"--super-table-vertical-dividers",t[41].vertical),P(n,"--super-table-cell-padding",Gn[t[2]].cellPadding),P(n,"--super-column-top-offset",t[37]*-1),m(e,"class","wrapper svelte-1upmu2i")},m(x,X){A(x,e,X),S(e,n),je(i,n,null),S(n,l),je(r,n,null),S(n,o),je(u,n,null),S(n,a),H&&H.m(n,null),S(n,f),je(c,n,null),S(n,h),je(d,n,null),S(n,_),je(b,n,null),S(n,w),G&&G.m(n,null),S(n,E),oe&&oe.m(n,null),S(n,k),ie&&ie.m(n,null),t[150](n),I=fo(n,t[151].bind(n)),S(e,O),je(D,e,null),N=!0,M||(V=[B(n,"mouseenter",t[152]),B(n,"mouseleave",t[153]),B(n,"keydown",t[69].handleKeyboard),B(n,"wheel",t[69].handleWheel),B(n,"touchstart",t[154]),B(n,"touchmove",t[155]),B(n,"touchend",t[156])],M=!0)},p(x,X){var Ie,ve,fe,Ne;const F={};X[1]&2&&(F.actions=x[32]),X[1]&1&&(F.data=x[31]),i.$set(F);const R={};X[0]&1679851960|X[1]&12320|X[5]&4&&(R.$$scope={dirty:X,ctx:x}),r.$set(R);const z={};X[0]&32768&&(z.stbData=x[15]),X[1]&8&&(z.superColumns=x[34]),X[0]&2097152&&(z.canScroll=x[21]),X[0]&1024|X[5]&4&&(z.$$scope={dirty:X,ctx:x}),!s&&X[0]&33554432&&(s=!0,z.columnsViewport=x[25],Wt(()=>s=!1)),u.$set(z),x[30]&&!x[27]?H?(H.p(x,X),X[0]&1207959552&&U(H,1)):(H=mh(x),H.c(),U(H,1),H.m(n,f)):H&&(He(),Z(H,1,1,()=>{H=null}),ze());const me={};X[0]&33554432&&(me.anchor=x[25]),X[0]&8388608&&(me.clientHeight=x[23]),X[0]&1048576&&(me.scrollHeight=x[20]),X[0]&524288&&(me.highlighted=x[19]),X[0]&134217728&&(me.isEmpty=x[27]),!g&&X[0]&4194304&&(g=!0,me.horizontalVisible=x[22],Wt(()=>g=!1)),c.$set(me);const se={};X[0]&134217728&&(se.isEmpty=x[27]),X[1]&256&&(se.message=x[39].data.emptyMessage),X[1]&4352&&(se.top=(Ie=x[43])!=null&&Ie.length?x[39].appearance.headerHeight+16:16),X[0]&4194304&&(se.bottom=x[22]?24:16),d.$set(se);const Oe={};X[0]&64&&(Oe.rowContextMenuItems=x[6]),X[0]&131072|X[1]&512&&(Oe.row=(fe=(ve=x[17])==null?void 0:ve.rows)==null?void 0:fe[x[40]]),b.$set(Oe),x[39].features.canInsert||x[38]=="Filtered"?G?(G.p(x,X),X[1]&384&&U(G,1)):(G=_h(x),G.c(),U(G,1),G.m(n,E)):G&&(He(),Z(G,1,1,()=>{G=null}),ze()),x[39].features.canSelect&&((Ne=x[9])!=null&&Ne.length)?oe?(oe.p(x,X),X[0]&512|X[1]&256&&U(oe,1)):(oe=ph(x),oe.c(),U(oe,1),oe.m(n,k)):oe&&(He(),Z(oe,1,1,()=>{oe=null}),ze()),x[17].loading&&x[17].loaded?ie?X[0]&131072&&U(ie,1):(ie=bh(),ie.c(),U(ie,1),ie.m(n,null)):ie&&(He(),Z(ie,1,1,()=>{ie=null}),ze()),(!N||X[0]&2048)&&p(n,"quiet",x[11]),(!N||X[0]&268435456)&&p(n,"initializing",x[28]),X[0]&4&&P(n,"font-size",Gn[x[2]].rowFontSize),X[1]&1024&&P(n,"--super-table-devider-color",x[41].color),X[0]&8388608&&P(n,"--super-table-body-height",x[23]),X[1]&1024&&P(n,"--super-table-header-height",x[41].headerHeight),X[1]&1024&&P(n,"--super-table-footer-height",x[41].footerHeight),X[1]&1024&&P(n,"--super-table-horizontal-dividers",x[41].horizontal),X[1]&1024&&P(n,"--super-table-vertical-dividers",x[41].vertical),X[0]&4&&P(n,"--super-table-cell-padding",Gn[x[2]].cellPadding),X[1]&64&&P(n,"--super-column-top-offset",x[37]*-1);const be={};X[0]&262144&&(be.pagination=x[18]),X[0]&1&&(be.limit=x[0]),X[0]&32768&&(be.fetch=x[15]),D.$set(be)},i(x){N||(U(i.$$.fragment,x),U(r.$$.fragment,x),U(u.$$.fragment,x),U(H),U(c.$$.fragment,x),U(d.$$.fragment,x),U(b.$$.fragment,x),U(G),U(oe),U(ie),U(D.$$.fragment,x),N=!0)},o(x){Z(i.$$.fragment,x),Z(r.$$.fragment,x),Z(u.$$.fragment,x),Z(H),Z(c.$$.fragment,x),Z(d.$$.fragment,x),Z(b.$$.fragment,x),Z(G),Z(oe),Z(ie),Z(D.$$.fragment,x),N=!1},d(x){x&&C(e),qe(i),qe(r),qe(u),H&&H.d(),qe(c),qe(d),qe(b),G&&G.d(),oe&&oe.d(),ie&&ie.d(),t[150](null),I(),qe(D),M=!1,Ve(V)}}}function wh(t){const e=Number(t);return isNaN(e)?null:e}function b2(t,e,n){let i,l,r,o,u,s,a,f,c,g,h,d,_=ue,b=()=>(_(),_=ft(y,T=>n(17,d=T)),y),w,E,k,I,O=ue,D=()=>(O(),O=ft(l,T=>n(139,I=T)),l),N,M,V=ue,W=()=>(V(),V=ft(s,T=>n(141,M=T)),s),ne,H,$,Y,G,oe,ie,J,q,j,K,x,X,F,R,z,me,se,Oe,be,Ie=ue,ve=()=>(Ie(),Ie=ft(u,T=>n(43,be=T)),u),fe;t.$$.on_destroy.push(()=>_()),t.$$.on_destroy.push(()=>O()),t.$$.on_destroy.push(()=>V()),t.$$.on_destroy.push(()=>Ie());let{$$slots:Ne={},$$scope:te}=e;const{API:ae,processStringSync:de,notificationStore:Xe,enrichButtonActions:Te,ActionTypes:Se,Provider:Le,fetchData:rt,QueryUtils:kt,memo:ke,derivedMemo:ce,builderStore:re}=le.getContext("sdk");Me(t,re,T=>n(146,me=T));const Ae=le.getContext("context");Me(t,Ae,T=>n(170,oe=T));const Ue=le.getContext("component");Me(t,Ue,T=>n(138,k=T));let{comp_id:Je}=e,{inBuilder:lt}=e,{dataSource:he}=e,{sortColumn:it}=e,{sortOrder:ot}=e,{limit:wt=50}=e,{autoRefreshRate:Ct}=e,{paginate:ln}=e,{filter:It}=e,{columnList:xt}=e,{tableActions:_e}=e,{showFooter:st}=e,{showHeader:we=!0}=e,{size:xe="M"}=e,{canInsert:pe,canDelete:_t,canEdit:Bt,canResize:Kn,canFilter:ui,canSelect:Mn}=e,{insertFieldsConfig:ai}=e,{superColumnsPos:Nn}=e,{showAutoColumns:fl}=e,{showSpecialColumns:cl}=e,{debounce:dl=750}=e,{rowMenu:_i}=e,{rowMenuItems:Tn}=e,{rowMenuIcon:Kt="ri-more-fill"}=e,{menuItemsVisible:Wl=0}=e,{rowContextMenuItems:pi}=e,{preselectedIds:hl}=e,{hideSelectionColumn:Fi}=e,{numberingColumn:gl}=e,{stickFirstColumn:rn=!1}=e,{maxSelected:Ln=0}=e,{selectedActions:Gl}=e,{beautifyLabels:Vi}=e,{columnSizing:Bi="flex"}=e,{columnMinWidth:Ui="7rem"}=e,{columnMaxWidth:on="auto"}=e,{columnFixedWidth:Hi="7rem"}=e,{dividers:ml="horizontal"}=e,{dividersColor:_l}=e,{rowColorTemplate:zi,rowBGColorTemplate:ji,rowDisabledTemplate:$n}=e,{rowHeight:fi}=e,{footerColorTemplate:ci,footerBGColorTemplate:In}=e,{useOptionColors:bi=!0}=e,{optionsViewMode:qi="colorText"}=e,{relViewMode:Wi="pills"}=e,{zebraColors:Gi=!1}=e,{quiet:Yi}=e,{highlighters:Ki}=e,{entitySingular:ei="Row"}=e,{entityPlural:Fn="Rows"}=e,{onRowSelect:Xn}=e,{onCellChange:Xi}=e,{onRowClick:wi}=e,{onCellClick:Qi}=e,{onLinkClick:pl}=e,{onInsert:Vn}=e,{afterInsert:Zi}=e,{onDelete:Bn}=e,{afterDelete:ki}=e,{afterEdit:bl}=e,{onRefresh:Un}=e;const yn=ke(he);Me(t,yn,T=>n(137,E=T));const Dn=ke(xt);Me(t,Dn,T=>n(135,h=T));const dn=ii([]);Me(t,dn,T=>n(174,F=T));const wl=ke(It);Me(t,wl,T=>n(144,$=T));let $t,En,di,yi=!1,Ei,Ji,Rt,vi,sn=[],Qn,Si,en,Ci,Pt,Ai=0,xi=0,Hn,hi,Zn=wt,kl=!1,$i,y=ii({rows:[],count:0,definition:{}});b();let L=!1,ee=0,ye=new Set,at={},et;const dt=ii({});Me(t,dt,T=>n(140,N=T));let pt;const At=ke({});Me(t,At,T=>n(39,X=T));const yt=ke({});Me(t,yt,T=>n(136,w=T));const Nt=ke(0);Me(t,Nt,T=>n(169,G=T));const Xt=ke(0);Me(t,Xt,T=>n(37,q=T));const Vt=ke(0);Me(t,Vt,T=>n(173,x=T));const Dt=ke(0);Me(t,Dt,T=>n(36,J=T));const Mt=ke(0);Me(t,Mt,T=>n(172,j=T));const On=ke([]);Me(t,On,T=>n(171,ie=T));const pn=ke(-1);Me(t,pn,T=>n(40,z=T));const Rn=ke(-1);Me(t,Rn,T=>n(175,R=T));const hn=ke([]);Me(t,hn,T=>n(145,Y=T));const yl=ke(Ln),Ti=ke(-1);Me(t,Ti,T=>n(42,Oe=T));const oS=ke(-1),oo=ke({});Me(t,oo,T=>n(143,H=T));const so=ke({});Me(t,so,T=>n(142,ne=T));const ym=["created_by","created_at","updated_by","updated_at","deleted_by","deleted_at"],sS=T=>(T.parameters&&(T={...T,queryParams:{...T.queryParams,limit:wt}}),rt({API:ae,datasource:T,options:{query:o,sortColumn:it,sortOrder:ot,limit:wt,paginate:!0}})),gt={unflattenObject:(T,ge=".")=>T?Object.keys(T).reduce((De,Ke)=>{const tt=Ke.split(ge);return tt.reduce((nt,$e,vt)=>{if(vt===tt.length-1)return nt[$e]=T[Ke],nt;const ht=tt[vt+1];return nt[$e]||(nt[$e]=isNaN(Number(ht))?{}:[]),nt[$e]},De),De},{}):{},populateColumns:(T,ge,De,Ke)=>{let tt=[],nt=[],$e=[],vt=[];return n(127,En=gt.detectPK(d)),T?(ge!=null&&ge.length?vt=ge.map(ht=>gt.enrichColumn(T,{...ht,field:ht.name})):(De&&(nt=Object.keys(T).filter(ht=>{var zn;return(zn=T[ht])==null?void 0:zn.autocolumn}).map(ht=>gt.enrichColumn(T,T[ht]))),Ke&&($e=Object.keys(T).filter(ht=>ym.includes(ht)).map(ht=>gt.enrichColumn(T,T[ht]))),tt=Object.keys(T).filter(ht=>T[ht].nestedJSON).map(ht=>gt.enrichColumn(T,T[ht])),vt=Object.keys(T).filter(ht=>{var zn;return!T[ht].autocolumn&&!ym.includes(ht)&&!T[ht].nestedJSON&&((zn=T[ht])==null?void 0:zn.visible)!=!1&&ht!=En}).map(ht=>gt.enrichColumn(T,T[ht]))),[...nt,...vt,...tt,...$e].sort((ht,zn)=>ht.order-zn.order)):[]},enrichColumn:(T,ge)=>{var $e,vt;let De,Ke,tt,nt=he==null?void 0:he.tableId;if(ge.name.includes(".")){let ht=ge.name.split("."),zn=($e=T[ht[0]])==null?void 0:$e.schema;zn&&zn[ht[1]]?(Ke=zn[ht[1]],De=Ke.type):(De="string",Ke={})}else Ke=T[ge.name],Ke?De=Ke.type:(De="string",Ke={}),ge.name.startsWith("fk_self_")&&(tt=!0,De="link",ge.displayName=ge.displayName||ge.name.replace("fk_self_","").replace("_id","").replace(/_/g," "),Ke={...Ke,tableId:nt,relationshipType:"self",recursiveTable:!0,primaryDisplay:(vt=d==null?void 0:d.definition)==null?void 0:vt.primaryDisplay,type:"link"});return{...ge,widthOverride:ge.width,readonly:Ke==null?void 0:Ke.readonly,canEdit:!lt&&nt&&gb[De]&&Bt&&!(Ke!=null&&Ke.readonly)&&!tt&&!ge.autocolumn,canFilter:db[De]?ui:!1,canSort:hb[De],filteringOperators:kt.getValidOperatorsForType({type:De}),defaultFilteringOperator:Tf[De],headerAlign:ge.align?ge.align:"flex-start",type:De,displayName:gt.beautifyLabel(ge.displayName??ge.name),schema:Ke}},enrichContext:T=>({...oe,[Je]:{...oe[Je],row:T}}),registerSuperColumn:(T,ge)=>{n(129,sn=[...sn,{id:T,state:ge}])},unregisterSuperColumn:T=>{let ge=sn.findIndex(De=>De.id==T);ge>-1&&(sn.splice(ge,1),n(129,sn))},shouldDisableButton:(T,ge)=>T?de(T,ge):!1,shouldShowButton:(T,ge)=>{function De($e,vt){switch(vt.toLowerCase()){case"number":return Number($e);case"string":return String($e);case"boolean":return $e==="true"||$e===!0;default:return $e}}function Ke($e,vt,ht){switch(vt.toLowerCase()){case"equal":case"equals":return $e==ht;case"not equal":case"not equals":return $e!=ht;case"greater than":return $e>ht;case"less than":return $e<ht;case"greater than or equal":return $e>=ht;case"less than or equal":return $e<=ht;case"contains":return typeof $e=="string"&&$e.includes(ht);case"not contains":return typeof $e=="string"&&!$e.includes(ht);case"starts with":return typeof $e=="string"&&$e.startsWith(ht);case"ends with":return typeof $e=="string"&&$e.endsWith(ht);case"is empty":return $e==null||$e==="";case"is not empty":return $e!=null&&$e!=="";default:return!1}}if(!T||T.length===0)return!0;let nt=!T.some($e=>$e.action.toLowerCase()==="show");for(const $e of T){const vt=de($e.referenceValue,ge),ht=de($e.newValue,ge),zn=De(vt,$e.type),pS=De(ht,$e.valueType);Ke(zn,$e.operator,pS)&&(nt=$e.action.toLowerCase()==="show")}return nt},executeRowButtonAction:async(T,ge)=>{let De=Te(ge,gt.enrichContext(d==null?void 0:d.rows[T]));await(De==null?void 0:De())},executeRowOnClickAction:async T=>{await gt.executeRowButtonAction(T,wi)},executeCellOnClickAction:async(T,ge,De,Ke)=>{let tt=Te(Qi,gt.enrichContext(d==null?void 0:d.rows[T]));await(tt==null?void 0:tt({column:ge,value:De,id:Ke}))},executeOnLinkClickAction:async(T,ge)=>{let De=Te(pl,{column:T,id:ge._id,primaryDisplay:ge.primaryDisplay});await(De==null?void 0:De({column:T,id:ge._id,primaryDisplay:ge.primaryDisplay}))},executeRowOnSelectAction:async T=>{await le.tick();let ge=Te(Xn,gt.enrichContext(d==null?void 0:d.rows[T]));await(ge==null?void 0:ge())},showContextMenu:(T,ge)=>{pi!=null&&pi.length&&z!=T?(Re(pn,z=T,z),Re(Rn,R=ge,R)):(Re(pn,z=-1,z),Re(Rn,R=-1,R))},executeRowContextMenuAction:async(T,ge)=>{await gt.executeRowButtonAction(T,ge),Re(pn,z=-1,z),Re(Rn,R=-1,R)},executeSelectedRowsAction:async T=>{gt.executeRowButtonAction(null,T)},selectRow:T=>{let ge=gt.getRowId(d==null?void 0:d.rows[T],T);F[T].disabled,Ln!=1?Y.includes(ge)?(Y.splice(Y.indexOf(ge),1),hn.set(Y)):Ln==0||Y.length<Ln?Re(hn,Y=[...Y,ge],Y):Xe.actions.warning("Cannot select more than "+Ln+" "+(Fn||"Rows")):Y.includes(ge)?Re(hn,Y=[],Y):Re(hn,Y=[ge],Y),Y.length&>.executeRowOnSelectAction(T)},selectAllRows:()=>{Y.length!=(d==null?void 0:d.rows.length)?Re(hn,Y=d==null?void 0:d.rows.map((T,ge)=>gt.getRowId(T,ge)),Y):Re(hn,Y=[],Y)},clearSelection:()=>{Re(hn,Y=[],Y)},insertRow:async T=>{Te(Zi,oe);let ge;if(Vn&&Vn.length){let De=Te(Vn,oe);await(De==null?void 0:De())}else{gn.startSave();try{ge=await ae.saveRow({...N,tableId:$t},{suppressErrors:!0}),Re(dt,N.errors={},N),dt.set(N),gn.refresh();let De={...oe,[Je]:{row:ge}},Ke=Te(Zi,De);return await(Ke==null?void 0:Ke({row:ge})),gn.endSave(),ge}catch(De){if(pt&&clearTimeout(pt),pt=setTimeout(()=>{Re(dt,N={...N,errors:{}},N)},2e3),Re(dt,N.errors={},N),De.json&&De.json.validationErrors){const Ke=De.json.validationErrors;Object.keys(Ke).forEach(tt=>{Re(dt,N.errors[tt]=Ke[tt][0]||"Validation error",N)})}else De.details||De.errors?(De.details||De.errors).forEach(tt=>{tt.field&&Re(dt,N.errors[tt.field]=tt.message||"Validation error",N)}):Re(dt,N.errors={general:De.message||"Save failed"},N)}}},deleteRow:async T=>{let ge=d==null?void 0:d.rows[T];Re(dn,F[T].disabled=!0,F),await le.tick();let De=ge[En];if(!De||!$t)return;let Ke=[{parameters:{confirm:!0,notificationOverride:!1,customTitleText:"Delete "+(ei||"Row")+" ?",confirmText:"Are you sure you want to delete this "+(ei||"Row")+"ID"+De+" ?",tableId:$t,rowId:De},"##eventHandlerType":"Delete Row"}],tt,nt=Te(ki,gt.enrichContext(d==null?void 0:d.rows[T]));Bn!=null&&Bn.length?tt=Te(Bn,gt.enrichContext(d==null?void 0:d.rows[T])):tt=Te(Ke,{}),await(tt==null?void 0:tt({row:ge})),await(nt==null?void 0:nt({row:ge})),Y.includes(gt.getRowId(ge,T))&&(Y.splice(Y.indexOf(gt.getRowId(ge,T)),1),hn.set(Y)),y.refresh()},deleteSelectedRows:async()=>{let T=Y.map(nt=>gt.getRowById(nt)).filter(nt=>nt),ge=T.map(nt=>nt._id);T.forEach(nt=>{const $e=d.rows.indexOf(nt);$e!==-1&&Re(dn,F[$e].disabled=!0,F)}),await le.tick();let De=[{parameters:{confirm:!0,notificationOverride:!0,customTitleText:"Delete "+Y.length+" "+(Fn||"Rows")+" ?",confirmText:"Are you sure you want to delete these "+(Fn||"Rows")+" ?",tableId:$t,rowId:ge.map(nt=>({_id:nt.toString()}))},"##eventHandlerType":"Delete Row"}],Ke=Te(De,{}),tt=Te(ki,oe);await(Ke==null?void 0:Ke()),await(tt==null?void 0:tt()),y.refresh()},patchRow:async T=>{if(!$t)return;T=gt.unflattenObject(T);let ge;ge=await ae.patchRow({tableId:$t,...T},!0),gn.refresh();let De={...oe,[Je]:{row:ge}},Ke=Te(bl,De);return await(Ke==null?void 0:Ke({row:ge})),ge},getRowId:(T,ge)=>{var De;return En?((De=T[En])==null?void 0:De.toString())??ge.toString():ge.toString()},getRowById:T=>En?d.rows.find(ge=>{var De;return((De=ge[En])==null?void 0:De.toString())===T}):d.rows[parseInt(T)],extendQuery:(T,ge)=>{var Ke,tt;if(!Object.keys(ge).length)return T;const De={[Ol.LogicalOperator.AND]:{conditions:[...T?[T]:[],...Object.values(ge||{})]},onEmptyFilter:Ol.EmptyFilterOption.RETURN_NONE};return(((tt=(Ke=De[Ol.LogicalOperator.AND])==null?void 0:Ke.conditions)==null?void 0:tt.length)??0)>0?De:{}},addQueryExtension:(T,ge)=>{!T||!ge||n(130,at={...at,[T]:ge})},removeQueryExtension:T=>{if(!T)return;const ge={...at};delete ge[T],n(130,at=ge)},beautifyLabel:T=>{if(!Vi||!T)return T;let ge=T.split(".");return ge.forEach((De,Ke)=>{let tt=De.split("_");tt.forEach((nt,$e)=>{var vt;nt&&(tt[$e]=((vt=nt[0])==null?void 0:vt.toUpperCase())+(nt==null?void 0:nt.slice(1)))}),ge[Ke]=tt.join(" ")}),ge.join(" - ")},detectPK:T=>{var De,Ke,tt;if(((Ke=(De=T==null?void 0:T.definition)==null?void 0:De.primary)==null?void 0:Ke.length)===1)return T.definition.primary[0];const ge=((tt=T==null?void 0:T.definition)==null?void 0:tt.schema)||(T==null?void 0:T.schema)||{};return"id"in ge?"id":"_id"in ge?"_id":null},loadPreSelections:T=>{Re(hn,Y=Array.isArray(T)?T.map(ge=>ge.toString()):typeof T=="string"?T.split(",").map(ge=>ge.trim()):T?[T]:[],Y)},decidePagination:T=>{if(!T){n(18,di="none");return}if(T.parameters&&T.parameters.length){const ge=T.parameters.map(De=>De.name.toLowerCase());ge.includes("offset")&&ge.includes("limit")&&n(18,di="limitOffset")}else he.tableId?n(18,di="cursor"):n(18,di="none");n(128,yi=di=="cursor")}},gn=Ft("Init",{"*":{init(){return"Init"},refresh(){y==null||y.refresh()},enrichRows(T,ge,De,Ke,tt,nt){var $e;T!=null&&T.loading||Re(dn,F=(($e=T==null?void 0:T.rows)==null?void 0:$e.map((vt,ht)=>({height:Ke&&wh(de(Ke,{...oe,[Je]:{row:vt}}))||X.appearance.rowHeight,bgcolor:ge?de(ge,{...oe,[Je]:{row:vt}}):void 0,color:De?de(De,{...oe,[Je]:{row:vt}}):void 0,disabled:tt?de(tt,{...oe,[Je]:{row:vt}}):void 0,selected:nt.includes(gt.getRowId(vt,ht))})))||[{}],F)},lockColumnWidths(){L||(L=!0,sn.forEach(({state:T})=>T.lockWidth()))},unlockColumnWidths(){L&&(L=!1,sn.forEach(({state:T})=>T.unlockWidth()))},scrollToTop(){Re(Nt,G=0,G),Re(Xt,q=0,q),this.calculateRowBoundaries()},scrollTo(T){Re(Nt,G=T,G),this.calculateRowBoundaries()},scrollToEnd(){Re(Nt,G=Rt>en?Rt-en:G,G),this.calculateRowBoundaries()},calculateBoundaries(){if(!(d==null?void 0:d.rows)||!Ci)return;const ge=X.appearance.rowHeight;n(20,Rt=(M[M.length-1]||0)+(pe?4*ge:2*ge)),n(23,en=Ci.clientHeight-X.appearance.headerHeight-X.appearance.footerHeight+ge),n(21,Qn=Rt>en),n(26,Hn=Qn),Re(Vt,x=Rt>en?G/(Rt-en):0,x),this.calculateRowBoundaries()},calculateRowBoundaries(){var tt;let T=0,ge=0,De=(d==null?void 0:d.rows)||[];ge=De.length;for(let nt=0;nt<De.length;nt++)if(M[nt]>G){T=nt;break}for(let nt=T;nt<De.length;nt++)if(M[nt]>=G+en){ge=nt+1;break}Re(On,ie=d==null?void 0:d.rows.slice(T,ge).map((nt,$e)=>$e+T),ie);const Ke=T>0?M[T-1]:0;if(Re(Xt,q=G-Ke,q),yi&&De.length>0){const $e=M[De.length-1]-(G+en),vt=!((tt=d.info)!=null&&tt.total)||De.length<d.info.total;$e<en&&De.length===Zn&&vt&&G>0&&gn.fetchMoreRows(wt)}},handleVerticalScroll(T){this.lockColumnWidths(),Re(Nt,G=Math.max(Math.min(G+T,Math.max(0,Rt-en)),0),G),Re(Vt,x=Rt>en?G/(Rt-en):0,x),window.requestAnimationFrame(()=>this.calculateRowBoundaries())},handleWheel(T){if(K=="Inserting"){T.preventDefault(),T.stopPropagation();return}if(T.deltaY&&Qn)T.preventDefault(),T.stopPropagation(),this.handleVerticalScroll(T.deltaY);else if(T.deltaX){if(this.lockColumnWidths(),J+T.deltaX<0){Re(Dt,J=0,J),Re(Mt,j=0,j);return}if(J+T.deltaX>(Pt==null?void 0:Pt.scrollWidth)-Pt.clientWidth){Re(Dt,J=(Pt==null?void 0:Pt.scrollWidth)-Pt.clientWidth,J),Re(Mt,j=1,j);return}Re(Dt,J+=T.deltaX,J),Re(Mt,j=J/Pt.scrollWidth,j)}},handleKeyboard(T){},handleTouch(T,ge){if(d.loading||K==="Inserting"){T.preventDefault();return}if(ge==="start")Ai=T.touches[0].clientY,xi=T.touches[0].clientX;else if(ge==="move"&&Qn){const De=T.touches[0].clientY,Ke=T.touches[0].clientX,tt=Ai-De,nt=xi-Ke;Math.abs(tt)>Math.abs(nt)?(T.preventDefault(),this.handleVerticalScroll(tt*.5),Ai=De):Math.abs(nt)>Math.abs(tt)&&(this.lockColumnWidths(),J+nt<0?(Re(Dt,J=0,J),Re(Mt,j=0,j)):J+nt>(Pt==null?void 0:Pt.scrollWidth)-Pt.clientWidth?(Re(Dt,J=(Pt==null?void 0:Pt.scrollWidth)-Pt.clientWidth,J),Re(Mt,j=1,j)):(Re(Dt,J+=nt,J),Re(Mt,j=J/Pt.scrollWidth,j)),xi=Ke)}},sortBy(T,ge){n(72,it=T),n(73,ot=ge),Re(oo,H=T,H),Re(so,ne=ge,ne)},handleRowClick(T,ge,De,Ke){Mn&&!Bt&>.selectRow(T),Qi&>.executeCellOnClickAction(T,ge,De,Ke),gt.executeRowOnClickAction(T)},addRow(){if(!Vn||(Vn==null?void 0:Vn.length)==0)return"Inserting";gt.insertRow()},edit(){return"Editing"}},Init:{_enter(){Ei&&clearInterval(Ei),$i&&clearTimeout($i),Re(Nt,G=0,G),Re(Xt,q=0,q),Re(Dt,J=0,J),Re(hn,Y=[],Y),Re(On,ie=[],ie),Zn!=wt&&(Zn=wt),b(n(15,y=sS(E))),$i=setTimeout(()=>{n(28,kl=!0)},130)},synch(T){if(n(126,$t=E.tableId),gt.loadPreSelections(hl),T.loaded)return Ct&&!lt&&(Ei=setInterval(()=>{d!=null&&d.loading||y==null||y.refresh(),Un==null||Un()},Ct*1e3)),"Idle"}},Idle:{_enter(){clearTimeout($i),n(28,kl=!1),n(27,hi=(d==null?void 0:d.rows.length)<1),this.calculateRowBoundaries()},_exit(){},synch(T){T.loading&&!T.loaded||(n(27,hi=!(d!=null&&d.rows.length)),T.loaded&&this.calculateRowBoundaries())},addFilter(T){let ge=kt.buildQuery([{...T}]);return ye.add(T.id),gt.addQueryExtension(T.id,ge),"Filtered"},fetchMoreRows(T){Zn=Zn+T,y.update({limit:Zn})}},Filtered:{_enter(){},_exit(){},addFilter(T){let ge=kt.buildQuery([{...T}]);gt.removeQueryExtension(T.id),ye.add(T.id),gt.addQueryExtension(T.id,ge)},removeFilter(T){ye.delete(T),gt.removeQueryExtension(T)},clearFilter(T){return ye.delete(T),gt.removeQueryExtension(T),"Idle"},clear(){return ye.forEach(T=>{gt.removeQueryExtension(T)}),ye.clear(),sn.forEach(({state:T})=>T.reset()),"Idle"},synch(T){T.loaded&&(n(27,hi=T.rows.length<1),this.calculateRowBoundaries())}},Editing:{async patchRow(T,ge,De,Ke,tt){let nt={_id:ge,_rev:De,[Ke]:tt};return await gt.patchRow(T,nt),gn.refresh(),"Idle"},endEdit(){return"Idle"}},Inserting:{_enter(){n(27,hi=!1),sn.forEach(({state:T})=>T.addRow()),Re(dt,N={},N),ai==null||ai.forEach(T=>{T.defaultValue&&Re(dt,N[T.field]=de(T.defaultValue,oe),N)}),et=G,this.scrollToEnd()},_exit(){sn.forEach(({state:T})=>T.cancelAddRow()),this.scrollTo(et)},cancelAddRow(){return"Idle"},endSave(){return this.refresh(),"Idle"},setValue(T,ge){Re(dt,N[T]=ge,N),N.errors&&N.errors[T]&&(delete N.errors[T],pt&&(clearTimeout(pt),pt=null)),Re(dt,N={...N},N)}}});Me(t,gn,T=>n(38,K=T));const Em=ce(At,T=>{var ge;return{hasChildren:!1,maxWidth:on||"auto",minWidth:Ui||"7rem",fixedWidth:Hi||"7rem",sizing:Bi,canResize:Kn,canEdit:lt?!1:Bt,showFooter:st,showHeader:we,cellPadding:Gn[xe].cellPadding,headerHeight:Gn[xe].headerHeight,rowHeight:Gn[xe].rowHeight,highlighters:Ki,useOptionColors:((ge=T==null?void 0:T.appearance)==null?void 0:ge.useOptionColors)||!1,optionsViewMode:qi,relViewMode:Wi,zebraColors:Gi,quiet:Yi}});Me(t,Em,T=>n(44,fe=T));const vm=ce(At,T=>{var ge,De;return{color:T.dividersColor??"var(--spectrum-global-color-gray-200)",horizontal:T.dividers=="both"||T.dividers=="horizontal"?"1px solid var(--super-table-devider-color)":"1px solid transparent",vertical:T.dividers=="both"||T.dividers=="vertical"?"1px solid var(--super-table-devider-color)":"none",headerHeight:((ge=T.appearance)==null?void 0:ge.headerHeight)||"0px",footerHeight:((De=T.appearance)==null?void 0:De.footerHeight)||"0px"}});Me(t,vm,T=>n(41,se=T)),le.setContext("stbScrollPos",Nt),le.setContext("stbScrollOffset",Xt),le.setContext("stbHorizontalScrollPos",Dt),le.setContext("stbHovered",Ti),le.setContext("stbSelected",hn),le.setContext("stbEditing",oS),le.setContext("stbState",gn),le.setContext("stbSettings",At),le.setContext("stbSortColumn",oo),le.setContext("stbSortOrder",so),le.setContext("stbMenuID",pn),le.setContext("stbMenuAnchor",Rn),le.setContext("stbAPI",gt),le.setContext("stbVisibleRows",On),le.setContext("stbRowMetadata",dn),le.onDestroy(()=>{Ei&&clearInterval(Ei)});let ys=0;function uS(T){Pt=T,n(25,Pt)}function aS(T){Si=T,n(22,Si)}function fS(T){Be[T?"unshift":"push"](()=>{Ci=T,n(24,Ci)})}function cS(){ee=this.clientWidth,vi=this.clientHeight,n(16,ee),n(14,vi)}const dS=()=>n(19,Ji=!0),hS=()=>{n(19,Ji=!1),Re(Ti,Oe=null,Oe)},gS=T=>gn.handleTouch(T,"start"),mS=T=>gn.handleTouch(T,"move"),_S=T=>gn.handleTouch(T,"end");return t.$$set=T=>{"comp_id"in T&&n(74,Je=T.comp_id),"inBuilder"in T&&n(75,lt=T.inBuilder),"dataSource"in T&&n(76,he=T.dataSource),"sortColumn"in T&&n(72,it=T.sortColumn),"sortOrder"in T&&n(73,ot=T.sortOrder),"limit"in T&&n(0,wt=T.limit),"autoRefreshRate"in T&&n(77,Ct=T.autoRefreshRate),"paginate"in T&&n(78,ln=T.paginate),"filter"in T&&n(79,It=T.filter),"columnList"in T&&n(80,xt=T.columnList),"tableActions"in T&&n(1,_e=T.tableActions),"showFooter"in T&&n(81,st=T.showFooter),"showHeader"in T&&n(82,we=T.showHeader),"size"in T&&n(2,xe=T.size),"canInsert"in T&&n(83,pe=T.canInsert),"canDelete"in T&&n(84,_t=T.canDelete),"canEdit"in T&&n(85,Bt=T.canEdit),"canResize"in T&&n(86,Kn=T.canResize),"canFilter"in T&&n(87,ui=T.canFilter),"canSelect"in T&&n(88,Mn=T.canSelect),"insertFieldsConfig"in T&&n(89,ai=T.insertFieldsConfig),"superColumnsPos"in T&&n(90,Nn=T.superColumnsPos),"showAutoColumns"in T&&n(91,fl=T.showAutoColumns),"showSpecialColumns"in T&&n(92,cl=T.showSpecialColumns),"debounce"in T&&n(93,dl=T.debounce),"rowMenu"in T&&n(3,_i=T.rowMenu),"rowMenuItems"in T&&n(4,Tn=T.rowMenuItems),"rowMenuIcon"in T&&n(94,Kt=T.rowMenuIcon),"menuItemsVisible"in T&&n(5,Wl=T.menuItemsVisible),"rowContextMenuItems"in T&&n(6,pi=T.rowContextMenuItems),"preselectedIds"in T&&n(95,hl=T.preselectedIds),"hideSelectionColumn"in T&&n(7,Fi=T.hideSelectionColumn),"numberingColumn"in T&&n(96,gl=T.numberingColumn),"stickFirstColumn"in T&&n(8,rn=T.stickFirstColumn),"maxSelected"in T&&n(97,Ln=T.maxSelected),"selectedActions"in T&&n(9,Gl=T.selectedActions),"beautifyLabels"in T&&n(98,Vi=T.beautifyLabels),"columnSizing"in T&&n(10,Bi=T.columnSizing),"columnMinWidth"in T&&n(99,Ui=T.columnMinWidth),"columnMaxWidth"in T&&n(100,on=T.columnMaxWidth),"columnFixedWidth"in T&&n(101,Hi=T.columnFixedWidth),"dividers"in T&&n(102,ml=T.dividers),"dividersColor"in T&&n(103,_l=T.dividersColor),"rowColorTemplate"in T&&n(104,zi=T.rowColorTemplate),"rowBGColorTemplate"in T&&n(105,ji=T.rowBGColorTemplate),"rowDisabledTemplate"in T&&n(106,$n=T.rowDisabledTemplate),"rowHeight"in T&&n(107,fi=T.rowHeight),"footerColorTemplate"in T&&n(108,ci=T.footerColorTemplate),"footerBGColorTemplate"in T&&n(109,In=T.footerBGColorTemplate),"useOptionColors"in T&&n(110,bi=T.useOptionColors),"optionsViewMode"in T&&n(111,qi=T.optionsViewMode),"relViewMode"in T&&n(112,Wi=T.relViewMode),"zebraColors"in T&&n(113,Gi=T.zebraColors),"quiet"in T&&n(11,Yi=T.quiet),"highlighters"in T&&n(114,Ki=T.highlighters),"entitySingular"in T&&n(12,ei=T.entitySingular),"entityPlural"in T&&n(13,Fn=T.entityPlural),"onRowSelect"in T&&n(115,Xn=T.onRowSelect),"onCellChange"in T&&n(116,Xi=T.onCellChange),"onRowClick"in T&&n(117,wi=T.onRowClick),"onCellClick"in T&&n(118,Qi=T.onCellClick),"onLinkClick"in T&&n(119,pl=T.onLinkClick),"onInsert"in T&&n(120,Vn=T.onInsert),"afterInsert"in T&&n(121,Zi=T.afterInsert),"onDelete"in T&&n(122,Bn=T.onDelete),"afterDelete"in T&&n(123,ki=T.afterDelete),"afterEdit"in T&&n(124,bl=T.afterEdit),"onRefresh"in T&&n(125,Un=T.onRefresh),"$$scope"in T&&n(157,te=T.$$scope)},t.$$.update=()=>{var T;t.$$.dirty[2]&16384&&yn.set(he),t.$$.dirty[4]&8192&>.decidePagination(E),t.$$.dirty[2]&131072&&wl.set(It),t.$$.dirty[0]&131072&&yt.set((T=d==null?void 0:d.definition)==null?void 0:T.schema),t.$$.dirty[2]&262144&&Dn.set(xt||[]),t.$$.dirty[0]&4|t.$$.dirty[2]&4096|t.$$.dirty[3]&16384&&n(134,i=fi&&wh(de(fi,{[Je]:{row:{}}}))||Gn[xe].rowHeight),t.$$.dirty[3]&16&&yl.set(Ln),t.$$.dirty[0]&11397|t.$$.dirty[2]&2012990464|t.$$.dirty[3]&1644150779|t.$$.dirty[4]&4195356&&At.set({inBuilder:me==null?void 0:me.inBuilder,showAutoColumns:fl,showSpecialColumns:cl,superColumnsPos:Nn,columnSizing:Bi||"flexible",columnMaxWidth:on||"auto",columnMinWidth:Ui||"7rem",columnFixedWidth:Hi||"7rem",debounce:dl,hideSelectionColumn:Fi,dividers:ml,dividersColor:_l,showFooter:st,showHeader:we,rowMenuIcon:Kt,features:{canSelect:Mn,maxSelected:Ln,canFilter:ui,canEdit:Bt,canDelete:_t&&$t,canInsert:pe,canResize:Kn},data:{dataSource:he,idColumn:En,filter:It,sortColumn:it,sortOrder:ot,limit:wt,emptyMessage:Fn?"No "+Fn+" found":"No Rows Found",paginate:ln,autoRefreshRate:Ct,fetchOnScroll:yi},appearance:{size:xe,headerHeight:we?Gn[xe].headerHeight:0,footerHeight:st?Gn[xe].headerHeight:0,rowHeight:i,numberingColumn:gl,hideSelectionColumn:Fi,quiet:Yi,useOptionColors:bi,optionsViewMode:qi,relViewMode:Wi,zebraColors:Gi,dynamicColors:!0,highlighters:Ki,rowColorTemplate:zi,rowBGColorTemplate:ji,rowDisabledTemplate:$n,footerColorTemplate:ci,footerBGColorTemplate:In,cellPadding:Gn[xe].cellPadding,beautifyLabels:Vi},events:{onRowClick:wi,onCellChange:Xi,onRowSelect:Xn,onDelete:Bn,afterDelete:ki}}),t.$$.dirty[4]&8192&&gn.init(E),t.$$.dirty[0]&131072&&gn.synch(d),t.$$.dirty[0]&131072|t.$$.dirty[3]&30720|t.$$.dirty[4]&2097152&&gn.enrichRows(d,ji,zi,fi,$n,Y),t.$$.dirty[0]&32768&&D(n(35,l=ce([y,hn,yl],([ge,De,Ke])=>{var nt;ge!=null&&ge.rows&&(De=De.filter($e=>ge.rows.some((vt,ht)=>gt.getRowId(vt,ht)===$e)));const tt=(nt=ge==null?void 0:ge.rows)==null?void 0:nt.filter(($e,vt)=>De==null?void 0:De.includes(gt.getRowId($e,vt)));return Ke===1?tt.length>0?tt[0]:[]:tt}))),t.$$.dirty[4]&1048576&&n(133,r=kt.buildQuery($)),t.$$.dirty[4]&576&&n(132,o=gt.extendQuery(r,at)),t.$$.dirty[4]&256&&gn.scrollToTop(o),t.$$.dirty[0]&32768|t.$$.dirty[2]&3072|t.$$.dirty[4]&256&&(y==null||y.update({query:o,sortColumn:it,sortOrder:ot})),t.$$.dirty[0]&16384|t.$$.dirty[2]&2097152|t.$$.dirty[4]&917520&&gn.calculateBoundaries(vi,pe,H,yi,H,ne,M),t.$$.dirty[0]&32768&&n(32,a=[{type:Se.ClearRowSelection,callback:gt.clearSelection},{type:Se.RefreshDatasource,callback:y==null?void 0:y.refresh},{type:Se.AddDataProviderQueryExtension,callback:gt.addQueryExtension},{type:Se.RemoveDataProviderQueryExtension,callback:gt.removeQueryExtension}]),t.$$.dirty[0]&131072|t.$$.dirty[2]&8192|t.$$.dirty[4]&126984&&n(31,f={row:lt?d==null?void 0:d.rows[0]:{},newRow:N,rows:d==null?void 0:d.rows,selectedRows:I,selectedIds:Array.isArray(I)?I.map(ge=>ge[En]):I&&typeof I=="object"?[I[En]]:[],id:k.id,info:d==null?void 0:d.info,datasource:E||{},schema:w,state:{query:d.query},loaded:d==null?void 0:d.loaded,rowsLength:d==null?void 0:d.rows.length,pageNumber:(d==null?void 0:d.pageNumber)+1}),t.$$.dirty[0]&24&&n(30,c=_i=="columnRight"&&(Tn==null?void 0:Tn.length)),t.$$.dirty[0]&24&&n(29,g=_i=="columnLeft"&&(Tn==null?void 0:Tn.length)),t.$$.dirty[0]&32768&&le.setContext("stbData",y),t.$$.dirty[0]&65536|t.$$.dirty[4]&2208&&(ee>0&&ee!==ys||h)&&(n(131,ys=ee),sn==null||sn.forEach(({state:ge})=>ge.unlockWidth()))},ve(n(34,u=ce([yt,Dn,At],([T,ge,De])=>gt.populateColumns(T,ge,De.showAutoColumns,De.showSpecialColumns)))),W(n(33,s=ce(dn,T=>T==null?void 0:T.map((ge,De)=>T.slice(0,De+1).reduce((Ke,tt)=>Ke+Math.max(tt.height,0),0))))),le.setContext("stbSchema",yt),le.setContext("new_row",dt),[wt,_e,xe,_i,Tn,Wl,pi,Fi,rn,Gl,Bi,Yi,ei,Fn,vi,y,ee,d,di,Ji,Rt,Qn,Si,en,Ci,Pt,Hn,hi,kl,g,c,f,a,s,u,l,J,q,K,X,z,se,Oe,be,fe,Le,re,Ae,Ue,yn,Dn,dn,wl,dt,At,yt,Nt,Xt,Vt,Dt,Mt,On,pn,Rn,hn,Ti,oo,so,gt,gn,Em,vm,it,ot,Je,lt,he,Ct,ln,It,xt,st,we,pe,_t,Bt,Kn,ui,Mn,ai,Nn,fl,cl,dl,Kt,hl,gl,Ln,Vi,Ui,on,Hi,ml,_l,zi,ji,$n,fi,ci,In,bi,qi,Wi,Gi,Ki,Xn,Xi,wi,Qi,pl,Vn,Zi,Bn,ki,bl,Un,$t,En,yi,sn,at,ys,o,r,i,h,w,E,k,I,N,M,ne,H,$,Y,me,Ne,uS,aS,fS,cS,dS,hS,gS,mS,_S,te]}class w2 extends Ze{constructor(e){super(),Qe(this,e,b2,p2,Ye,{comp_id:74,inBuilder:75,dataSource:76,sortColumn:72,sortOrder:73,limit:0,autoRefreshRate:77,paginate:78,filter:79,columnList:80,tableActions:1,showFooter:81,showHeader:82,size:2,canInsert:83,canDelete:84,canEdit:85,canResize:86,canFilter:87,canSelect:88,insertFieldsConfig:89,superColumnsPos:90,showAutoColumns:91,showSpecialColumns:92,debounce:93,rowMenu:3,rowMenuItems:4,rowMenuIcon:94,menuItemsVisible:5,rowContextMenuItems:6,preselectedIds:95,hideSelectionColumn:7,numberingColumn:96,stickFirstColumn:8,maxSelected:97,selectedActions:9,beautifyLabels:98,columnSizing:10,columnMinWidth:99,columnMaxWidth:100,columnFixedWidth:101,dividers:102,dividersColor:103,rowColorTemplate:104,rowBGColorTemplate:105,rowDisabledTemplate:106,rowHeight:107,footerColorTemplate:108,footerBGColorTemplate:109,useOptionColors:110,optionsViewMode:111,relViewMode:112,zebraColors:113,quiet:11,highlighters:114,entitySingular:12,entityPlural:13,onRowSelect:115,onCellChange:116,onRowClick:117,onCellClick:118,onLinkClick:119,onInsert:120,afterInsert:121,onDelete:122,afterDelete:123,afterEdit:124,onRefresh:125},null,[-1,-1,-1,-1,-1,-1,-1])}}function kh(t,e,n){const i=t.slice();return i[19]=e[n],i[21]=n,i}function yh(t){let e,n,i,l=[],r=new Map,o=t[2]==="list"&&t[7]&&Eh(t),u=Ce(t[0]);const s=a=>a[21];for(let a=0;a<u.length;a+=1){let f=kh(t,u,a),c=s(f);r.set(c,l[a]=Ah(c,f))}return{c(){e=v("div"),n=v("div"),o&&o.c(),i=Q();for(let a=0;a<l.length;a+=1)l[a].c();m(n,"class","tabs svelte-12yvhlq"),p(n,"vertical",t[12]),p(n,"buttons",t[10]),p(n,"list",t[2]==="list"),p(n,"wide",t[2]==="wideButtons"&&t[8]),P(n,"justify-content",t[4]),P(n,"--tab-alignment",t[3]),P(n,"--tab-track-thickness","1px"),m(e,"class","outer-tabs svelte-12yvhlq"),p(e,"quietTabs",t[9]),p(e,"list",t[2]==="list"),p(e,"vertical",t[12]),p(e,"wide",t[2]==="wideButtons"&&t[8]),P(e,"justify-content",t[11])},m(a,f){A(a,e,f),S(e,n),o&&o.m(n,null),S(n,i);for(let c=0;c<l.length;c+=1)l[c]&&l[c].m(n,null)},p(a,f){a[2]==="list"&&a[7]?o?o.p(a,f):(o=Eh(a),o.c(),o.m(n,i)):o&&(o.d(1),o=null),f&13367&&(u=Ce(a[0]),l=Tt(l,f,s,1,a,u,r,n,nn,Ah,null,kh)),f&4096&&p(n,"vertical",a[12]),f&1024&&p(n,"buttons",a[10]),f&4&&p(n,"list",a[2]==="list"),f&260&&p(n,"wide",a[2]==="wideButtons"&&a[8]),f&16&&P(n,"justify-content",a[4]),f&8&&P(n,"--tab-alignment",a[3]),f&512&&p(e,"quietTabs",a[9]),f&4&&p(e,"list",a[2]==="list"),f&4096&&p(e,"vertical",a[12]),f&260&&p(e,"wide",a[2]==="wideButtons"&&a[8]),f&2048&&P(e,"justify-content",a[11])},d(a){a&&C(e),o&&o.d();for(let f=0;f<l.length;f+=1)l[f].d()}}}function Eh(t){let e,n,i,l=t[6]&&vh(t);return{c(){e=v("div"),l&&l.c(),n=Q(),i=Ee(t[7]),m(e,"class","tab list-title svelte-12yvhlq")},m(r,o){A(r,e,o),l&&l.m(e,null),S(e,n),S(e,i)},p(r,o){r[6]?l?l.p(r,o):(l=vh(r),l.c(),l.m(e,n)):l&&(l.d(1),l=null),o&128&&Pe(i,r[7])},d(r){r&&C(e),l&&l.d()}}}function vh(t){let e,n;return{c(){e=v("i"),m(e,"class",n=bt(t[6])+" svelte-12yvhlq")},m(i,l){A(i,e,l)},p(i,l){l&64&&n!==(n=bt(i[6])+" svelte-12yvhlq")&&m(e,"class",n)},d(i){i&&C(e)}}}function Sh(t){let e,n;return{c(){e=v("i"),m(e,"class",n=bt(t[19].icon)+" svelte-12yvhlq"),P(e,"font-size",t[5]?"20px":null),P(e,"color",t[19].color)},m(i,l){A(i,e,l)},p(i,l){l&1&&n!==(n=bt(i[19].icon)+" svelte-12yvhlq")&&m(e,"class",n),l&32&&P(e,"font-size",i[5]?"20px":null),l&1&&P(e,"color",i[19].color)},d(i){i&&C(e)}}}function Ch(t){let e,n=(t[19].title||"Tab "+t[21])+"",i;return{c(){e=v("span"),i=Ee(n),m(e,"class","tab-text svelte-12yvhlq")},m(l,r){A(l,e,r),S(e,i)},p(l,r){r&1&&n!==(n=(l[19].title||"Tab "+l[21])+"")&&Pe(i,n)},d(l){l&&C(e)}}}function Ah(t,e){let n,i,l,r,o,u=e[19].icon&&Sh(e),s=(!e[5]||!e[19].icon)&&Ch(e);function a(){return e[18](e[19])}return{key:t,first:null,c(){n=v("button"),u&&u.c(),i=Q(),s&&s.c(),l=Q(),m(n,"class","tab svelte-12yvhlq"),p(n,"vertical",e[12]),p(n,"button",e[10]),p(n,"list",e[2]==="list"),p(n,"selected",e[19].id===e[1]),p(n,"disabled",e[19].disabled),p(n,"list-section",e[19].isTabSection),P(n,"flex",e[4]=="stretch"?"1":null),this.first=n},m(f,c){A(f,n,c),u&&u.m(n,null),S(n,i),s&&s.m(n,null),S(n,l),r||(o=B(n,"click",a),r=!0)},p(f,c){e=f,e[19].icon?u?u.p(e,c):(u=Sh(e),u.c(),u.m(n,i)):u&&(u.d(1),u=null),!e[5]||!e[19].icon?s?s.p(e,c):(s=Ch(e),s.c(),s.m(n,l)):s&&(s.d(1),s=null),c&4096&&p(n,"vertical",e[12]),c&1024&&p(n,"button",e[10]),c&4&&p(n,"list",e[2]==="list"),c&3&&p(n,"selected",e[19].id===e[1]),c&1&&p(n,"disabled",e[19].disabled),c&1&&p(n,"list-section",e[19].isTabSection),c&16&&P(n,"flex",e[4]=="stretch"?"1":null)},d(f){f&&C(n),u&&u.d(),s&&s.d(),r=!1,o()}}}function k2(t){var i;let e,n=((i=t[0])==null?void 0:i.length)&&yh(t);return{c(){n&&n.c(),e=Fe()},m(l,r){n&&n.m(l,r),A(l,e,r)},p(l,[r]){var o;(o=l[0])!=null&&o.length?n?n.p(l,r):(n=yh(l),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},i:ue,o:ue,d(l){l&&C(e),n&&n.d(l)}}}function y2(t,e,n){let i,l,r;const o=le.createEventDispatcher();let{containers:u}=e,{direction:s}=e,{selectedTab:a}=e,{hAlign:f}=e,{vAlign:c}=e,{theme:g="buttons"}=e,{tabsPosition:h="top"}=e,{tabsAlignment:d}=e,{buttonsAlignment:_="flex-start"}=e,{tabsIconsOnly:b}=e,{list_icon:w}=e,{list_title:E}=e,{wide:k=!0}=e,{quietTabs:I}=e;const O=D=>{!D.disabled&&!D.isTabSection&&o("change",D)};return t.$$set=D=>{"containers"in D&&n(0,u=D.containers),"direction"in D&&n(14,s=D.direction),"selectedTab"in D&&n(1,a=D.selectedTab),"hAlign"in D&&n(15,f=D.hAlign),"vAlign"in D&&n(16,c=D.vAlign),"theme"in D&&n(2,g=D.theme),"tabsPosition"in D&&n(17,h=D.tabsPosition),"tabsAlignment"in D&&n(3,d=D.tabsAlignment),"buttonsAlignment"in D&&n(4,_=D.buttonsAlignment),"tabsIconsOnly"in D&&n(5,b=D.tabsIconsOnly),"list_icon"in D&&n(6,w=D.list_icon),"list_title"in D&&n(7,E=D.list_title),"wide"in D&&n(8,k=D.wide),"quietTabs"in D&&n(9,I=D.quietTabs)},t.$$.update=()=>{t.$$.dirty&131076&&n(12,i=h=="left"||g==="list"),t.$$.dirty&114688&&n(11,l=s==="row"?f:c),t.$$.dirty&4&&n(10,r=g==="buttons"||g==="wideButtons")},[u,a,g,d,_,b,w,E,k,I,r,l,i,o,s,f,c,h,O]}class E2 extends Ze{constructor(e){super(),Qe(this,e,y2,k2,Ye,{containers:0,direction:14,selectedTab:1,hAlign:15,vAlign:16,theme:2,tabsPosition:17,tabsAlignment:3,buttonsAlignment:4,tabsIconsOnly:5,list_icon:6,list_title:7,wide:8,quietTabs:9})}}function Th(t,e,n){const i=t.slice();return i[16]=e[n],i[18]=n,i}function Ih(t){var Y;let e,n,i,l,r,o,u,s,a,f,c,g,h,d,_,b,w,E,k,I,O,D,N;function M(G,oe){return oe&128&&(o=null),o==null&&(o=!!G[6].isImage(G[7])),o?S2:v2}let V=M(t,-1),W=V(t),ne=((Y=t[3])==null?void 0:Y.length)>1&&Dh(t),H=t[4]&&Rh(t),$=t[5]&&Ph(t);return{c(){var G;e=v("div"),n=v("div"),i=v("div"),l=v("button"),l.textContent="×",r=Q(),W.c(),u=Q(),s=v("div"),a=v("div"),f=v("button"),c=v("i"),h=Q(),ne&&ne.c(),d=Q(),_=v("button"),b=v("i"),E=Q(),k=v("div"),H&&H.c(),I=Q(),$&&$.c(),m(l,"class","modal-close svelte-1xx8aus"),m(l,"aria-label","Close modal"),m(l,"type","button"),m(c,"class","ph ph-caret-left"),m(f,"class","btn-nav large svelte-1xx8aus"),m(f,"aria-label","Previous image"),m(f,"type","button"),f.disabled=g=!t[9],m(b,"class","ph ph-caret-right"),m(_,"class","btn-nav large svelte-1xx8aus"),m(_,"aria-label","Next image"),m(_,"type","button"),_.disabled=w=!t[8],m(a,"class","modal-navigation svelte-1xx8aus"),m(k,"class","modal-actions svelte-1xx8aus"),m(s,"class","modal-controls svelte-1xx8aus"),m(i,"class","modal-image-container svelte-1xx8aus"),m(i,"aria-label",O="Image "+(t[0]+1)+" of "+(((G=t[3])==null?void 0:G.length)||1)+". Use arrow keys to navigate, Home/End for first/last, numbers 1-9 to jump to images, Space for next, Escape to close."),p(i,"selected",t[2].has(t[0])),m(n,"class","image-modal-content svelte-1xx8aus"),m(n,"tabindex","0"),m(e,"class","image-modal svelte-1xx8aus"),m(e,"role","dialog"),m(e,"aria-modal","true"),m(e,"aria-labelledby","modal-title"),m(e,"tabindex","-1")},m(G,oe){A(G,e,oe),S(e,n),S(n,i),S(i,l),S(i,r),W.m(i,null),S(i,u),S(i,s),S(s,a),S(a,f),S(f,c),S(a,h),ne&&ne.m(a,null),S(a,d),S(a,_),S(_,b),S(s,E),S(s,k),H&&H.m(k,null),S(k,I),$&&$.m(k,null),D||(N=[B(l,"click",t[6].closeModal),B(f,"click",t[6].navigatePrev),B(_,"click",t[6].navigateNext),B(n,"click",Qt(t[12])),B(n,"keydown",t[6].handleKeydown),tn(t[11].call(null,n)),B(e,"click",t[6].closeModal)],D=!0)},p(G,oe){var ie,J;V===(V=M(G,oe))&&W?W.p(G,oe):(W.d(1),W=V(G),W&&(W.c(),W.m(i,u))),oe&512&&g!==(g=!G[9])&&(f.disabled=g),((ie=G[3])==null?void 0:ie.length)>1?ne?ne.p(G,oe):(ne=Dh(G),ne.c(),ne.m(a,d)):ne&&(ne.d(1),ne=null),oe&256&&w!==(w=!G[8])&&(_.disabled=w),G[4]?H?H.p(G,oe):(H=Rh(G),H.c(),H.m(k,I)):H&&(H.d(1),H=null),G[5]?$?$.p(G,oe):($=Ph(G),$.c(),$.m(k,null)):$&&($.d(1),$=null),oe&9&&O!==(O="Image "+(G[0]+1)+" of "+(((J=G[3])==null?void 0:J.length)||1)+". Use arrow keys to navigate, Home/End for first/last, numbers 1-9 to jump to images, Space for next, Escape to close.")&&m(i,"aria-label",O),oe&5&&p(i,"selected",G[2].has(G[0]))},d(G){G&&C(e),W.d(),ne&&ne.d(),H&&H.d(),$&&$.d(),D=!1,Ve(N)}}}function v2(t){var a,f,c;let e,n,i=((f=(a=t[7])==null?void 0:a.extension)==null?void 0:f.toUpperCase())+"",l,r,o,u=((c=t[7])==null?void 0:c.name)+"",s;return{c(){e=v("div"),n=v("div"),l=Ee(i),r=Q(),o=v("span"),s=Ee(u),m(n,"class","pill svelte-1xx8aus"),m(o,"class","filename svelte-1xx8aus"),m(e,"class","modal-fallback svelte-1xx8aus")},m(g,h){A(g,e,h),S(e,n),S(n,l),S(e,r),S(e,o),S(o,s)},p(g,h){var d,_,b;h&128&&i!==(i=((_=(d=g[7])==null?void 0:d.extension)==null?void 0:_.toUpperCase())+"")&&Pe(l,i),h&128&&u!==(u=((b=g[7])==null?void 0:b.name)+"")&&Pe(s,u)},d(g){g&&C(e)}}}function S2(t){let e,n,i;return{c(){e=v("img"),As(e.src,n=t[7].url)||m(e,"src",n),m(e,"alt",i=t[7].name),m(e,"class","modal-image svelte-1xx8aus")},m(l,r){A(l,e,r)},p(l,r){r&128&&!As(e.src,n=l[7].url)&&m(e,"src",n),r&128&&i!==(i=l[7].name)&&m(e,"alt",i)},d(l){l&&C(e)}}}function Dh(t){let e,n=Ce(t[3]),i=[];for(let l=0;l<n.length;l+=1)i[l]=Oh(Th(t,n,l));return{c(){e=v("div");for(let l=0;l<i.length;l+=1)i[l].c();m(e,"class","modal-indicators svelte-1xx8aus")},m(l,r){A(l,e,r);for(let o=0;o<i.length;o+=1)i[o]&&i[o].m(e,null)},p(l,r){if(r&73){n=Ce(l[3]);let o;for(o=0;o<n.length;o+=1){const u=Th(l,n,o);i[o]?i[o].p(u,r):(i[o]=Oh(u),i[o].c(),i[o].m(e,null))}for(;o<i.length;o+=1)i[o].d(1);i.length=n.length}},d(l){l&&C(e),St(i,l)}}}function Oh(t){let e,n,i;function l(){return t[13](t[18])}return{c(){e=v("button"),m(e,"class","indicator large svelte-1xx8aus"),m(e,"aria-label","Go to image "+(t[18]+1)),m(e,"type","button"),p(e,"active",t[18]===t[0])},m(r,o){A(r,e,o),n||(i=B(e,"click",l),n=!0)},p(r,o){t=r,o&1&&p(e,"active",t[18]===t[0])},d(r){r&&C(e),n=!1,i()}}}function Rh(t){let e,n,i,l,r,o;return{c(){e=v("button"),n=v("i"),m(n,"class",i="ph "+(t[2].has(t[0])?"ph-check-square":"ph-square")),m(e,"class","btn-nav large btn-modal-select svelte-1xx8aus"),m(e,"aria-label",l=t[2].has(t[0])?"Deselect":"Select"),m(e,"type","button"),p(e,"selected",t[2].has(t[0]))},m(u,s){A(u,e,s),S(e,n),r||(o=B(e,"click",t[14]),r=!0)},p(u,s){s&5&&i!==(i="ph "+(u[2].has(u[0])?"ph-check-square":"ph-square"))&&m(n,"class",i),s&5&&l!==(l=u[2].has(u[0])?"Deselect":"Select")&&m(e,"aria-label",l),s&5&&p(e,"selected",u[2].has(u[0]))},d(u){u&&C(e),r=!1,o()}}}function Ph(t){let e,n,i;return{c(){e=v("button"),e.innerHTML='<i class="ph ph-trash-simple"></i>',m(e,"class","btn-nav large btn-modal-delete svelte-1xx8aus"),m(e,"aria-label","Delete"),m(e,"type","button")},m(l,r){A(l,e,r),n||(i=B(e,"click",t[15]),n=!0)},p:ue,d(l){l&&C(e),n=!1,i()}}}function C2(t){let e,n=t[1]&&Ih(t);return{c(){n&&n.c(),e=Fe()},m(i,l){n&&n.m(i,l),A(i,e,l)},p(i,[l]){i[1]?n?n.p(i,l):(n=Ih(i),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},i:ue,o:ue,d(i){i&&C(e),n&&n.d(i)}}}function A2(t,e,n){let i,l,r,{items:o=[]}=e,{currentIndex:u=0}=e,{open:s=!1}=e,{selectedIndices:a=new Set}=e,{canSelect:f=!0}=e,{canDelete:c=!1}=e;const g=le.createEventDispatcher(),h={navigateNext(){(o==null?void 0:o.length)>1&&n(0,u=(u+1)%o.length)},navigatePrev(){(o==null?void 0:o.length)>1&&n(0,u=(u-1+o.length)%o.length)},navigateTo(k){k>=0&&k<(o==null?void 0:o.length)&&n(0,u=k)},toggleSelection(k){const I=new Set(a);I.has(k)?I.delete(k):I.add(k),n(2,a=I)},closeModal(){n(1,s=!1),g("close")},handleKeydown(k){switch(k.key){case"Escape":h.closeModal();break;case"ArrowLeft":k.preventDefault(),h.navigatePrev();break;case"ArrowRight":case" ":k.preventDefault(),h.navigateNext();break;case"Home":k.preventDefault(),h.navigateTo(0);break;case"End":k.preventDefault(),h.navigateTo((o==null?void 0:o.length)-1||0);break;case"PageUp":k.preventDefault(),h.navigatePrev();break;case"PageDown":k.preventDefault(),h.navigateNext();break;default:if(k.key>="1"&&k.key<="9"){const I=parseInt(k.key)-1;I<((o==null?void 0:o.length)||0)&&(k.preventDefault(),h.navigateTo(I))}break}},isImage(k){var O;return["jpg","jpeg","png","gif","bmp","webp"].includes((O=k==null?void 0:k.extension)==null?void 0:O.toLowerCase())}},d=k=>{k.focus()};function _(k){ti.call(this,t,k)}const b=k=>h.navigateTo(k),w=()=>h.toggleSelection(u),E=()=>g("delete",{index:u,item:o[u]});return t.$$set=k=>{"items"in k&&n(3,o=k.items),"currentIndex"in k&&n(0,u=k.currentIndex),"open"in k&&n(1,s=k.open),"selectedIndices"in k&&n(2,a=k.selectedIndices),"canSelect"in k&&n(4,f=k.canSelect),"canDelete"in k&&n(5,c=k.canDelete)},t.$$.update=()=>{t.$$.dirty&9&&n(9,i=(o==null?void 0:o.length)>1&&u>0),t.$$.dirty&9&&n(8,l=(o==null?void 0:o.length)>1&&u<((o==null?void 0:o.length)-1||0)),t.$$.dirty&9&&n(7,r=o==null?void 0:o[u])},[u,s,a,o,f,c,h,r,l,i,g,d,_,b,w,E]}class ls extends Ze{constructor(e){super(),Qe(this,e,A2,C2,Ye,{items:3,currentIndex:0,open:1,selectedIndices:2,canSelect:4,canDelete:5,lightboxAPI:6})}get lightboxAPI(){return this.$$.ctx[6]}}function Mh(t,e,n){const i=t.slice();return i[38]=e[n],i}function Nh(t,e,n){const i=t.slice();return i[41]=e[n],i}function Lh(t,e,n){const i=t.slice();return i[38]=e[n],i}function Fh(t){let e,n;return e=new wn({props:{anchor:t[5],open:t[4],align:"left",offset:t[3],$$slots:{default:[T2]},$$scope:{ctx:t}}}),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l[0]&32&&(r.anchor=i[5]),l[0]&16&&(r.open=i[4]),l[0]&8&&(r.offset=i[3]),l[0]&14725|l[1]&32768&&(r.$$scope={dirty:l,ctx:i}),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function Vh(t){let e;return{c(){e=v("i"),m(e,"class","ri-check-line svelte-urnaoo"),P(e,"color",t[12])},m(n,i){A(n,e,i)},p(n,i){i[0]&4096&&P(e,"color",n[12])},d(n){n&&C(e)}}}function Bh(t){let e,n,i,l,r,o,u=t[0]===`var(--spectrum-global-color-${t[38]})`&&Vh(t);function s(){return t[26](t[38])}function a(...f){return t[27](t[38],...f)}return{c(){e=v("div"),n=v("div"),u&&u.c(),m(n,"class",i="color-fill "+(t[2]||"")+" svelte-urnaoo"),P(n,"background","var(--spectrum-global-color-"+t[38]+")"),m(e,"class","color-swatch svelte-urnaoo"),m(e,"title",l=t[15](t[38],t[41])),m(e,"role","button"),m(e,"tabindex","0")},m(f,c){A(f,e,c),S(e,n),u&&u.m(n,null),r||(o=[B(e,"click",s),B(e,"keydown",a)],r=!0)},p(f,c){t=f,t[0]===`var(--spectrum-global-color-${t[38]})`?u?u.p(t,c):(u=Vh(t),u.c(),u.m(n,null)):u&&(u.d(1),u=null),c[0]&4&&i!==(i="color-fill "+(t[2]||"")+" svelte-urnaoo")&&m(n,"class",i),c[0]&128&&P(n,"background","var(--spectrum-global-color-"+t[38]+")"),c[0]&128&&l!==(l=t[15](t[38],t[41]))&&m(e,"title",l)},d(f){f&&C(e),u&&u.d(),r=!1,Ve(o)}}}function Uh(t){let e,n,i=t[41].label+"",l,r,o,u=Ce(t[41].colors),s=[];for(let a=0;a<u.length;a+=1)s[a]=Bh(Lh(t,u,a));return{c(){e=v("div"),n=v("div"),l=Ee(i),r=Q(),o=v("div");for(let a=0;a<s.length;a+=1)s[a].c();m(n,"class","heading svelte-urnaoo"),m(o,"class","colors svelte-urnaoo"),m(e,"class","category")},m(a,f){A(a,e,f),S(e,n),S(n,l),S(e,r),S(e,o);for(let c=0;c<s.length;c+=1)s[c]&&s[c].m(o,null)},p(a,f){if(f[0]&128&&i!==(i=a[41].label+"")&&Pe(l,i),f[0]&118917){u=Ce(a[41].colors);let c;for(c=0;c<u.length;c+=1){const g=Lh(a,u,c);s[c]?s[c].p(g,f):(s[c]=Bh(g),s[c].c(),s[c].m(o,null))}for(;c<s.length;c+=1)s[c].d(1);s.length=u.length}},d(a){a&&C(e),St(s,a)}}}function Hh(t){let e,n,i,l,r=t[8].label+"",o,u,s,a=Ce(t[8].colors),f=[];for(let c=0;c<a.length;c+=1)f[c]=jh(Mh(t,a,c));return{c(){e=v("div"),n=v("div"),i=v("i"),l=Q(),o=Ee(r),u=Q(),s=v("div");for(let c=0;c<f.length;c+=1)f[c].c();m(i,"class","ri-palette-line heading-icon svelte-urnaoo"),m(n,"class","heading svelte-urnaoo"),m(s,"class","colors svelte-urnaoo"),m(e,"class","category")},m(c,g){A(c,e,g),S(e,n),S(n,i),S(n,l),S(n,o),S(e,u),S(e,s);for(let h=0;h<f.length;h+=1)f[h]&&f[h].m(s,null)},p(c,g){if(g[0]&256&&r!==(r=c[8].label+"")&&Pe(o,r),g[0]&119045){a=Ce(c[8].colors);let h;for(h=0;h<a.length;h+=1){const d=Mh(c,a,h);f[h]?f[h].p(d,g):(f[h]=jh(d),f[h].c(),f[h].m(s,null))}for(;h<f.length;h+=1)f[h].d(1);f.length=a.length}},d(c){c&&C(e),St(f,c)}}}function zh(t){let e;return{c(){e=v("i"),m(e,"class","ri-check-line svelte-urnaoo"),P(e,"color",t[12])},m(n,i){A(n,e,i)},p(n,i){i[0]&4096&&P(e,"color",n[12])},d(n){n&&C(e)}}}function jh(t){let e,n,i,l,r,o,u,s=t[0]===t[38]&&zh(t);function a(){return t[28](t[38])}function f(...c){return t[29](t[38],...c)}return{c(){e=v("div"),n=v("div"),s&&s.c(),l=Q(),m(n,"class",i="color-fill "+(t[2]||"")+" svelte-urnaoo"),P(n,"background",t[38]),m(e,"class","color-swatch svelte-urnaoo"),m(e,"title",r=t[15](t[38],t[8])),m(e,"role","button"),m(e,"tabindex","0")},m(c,g){A(c,e,g),S(e,n),s&&s.m(n,null),S(e,l),o||(u=[B(e,"click",a),B(e,"keydown",f)],o=!0)},p(c,g){t=c,t[0]===t[38]?s?s.p(t,g):(s=zh(t),s.c(),s.m(n,null)):s&&(s.d(1),s=null),g[0]&4&&i!==(i="color-fill "+(t[2]||"")+" svelte-urnaoo")&&m(n,"class",i),g[0]&256&&P(n,"background",t[38]),g[0]&256&&r!==(r=t[15](t[38],t[8]))&&m(e,"title",r)},d(c){c&&C(e),s&&s.d(),o=!1,Ve(u)}}}function qh(t){let e,n,i,l,r,o,u,s,a;return{c(){e=v("div"),n=v("div"),n.textContent="Custom",i=Q(),l=v("div"),r=v("input"),o=Q(),u=v("button"),u.innerHTML='<i class="ri-close-line"></i>',m(n,"class","heading svelte-urnaoo"),m(r,"type","text"),m(r,"class","custom-input svelte-urnaoo"),m(r,"placeholder","Enter custom color"),m(u,"class","clear-value svelte-urnaoo"),m(l,"class","custom svelte-urnaoo"),m(e,"class","category category--custom svelte-urnaoo")},m(f,c){A(f,e,c),S(e,n),S(e,i),S(e,l),S(l,r),Zt(r,t[13]),S(l,o),S(l,u),s||(a=[B(r,"input",t[30]),B(r,"change",t[31]),B(u,"click",t[32])],s=!0)},p(f,c){c[0]&8192&&r.value!==f[13]&&Zt(r,f[13])},d(f){f&&C(e),s=!1,Ve(a)}}}function T2(t){let e,n,i,l=Ce(t[7]),r=[];for(let s=0;s<l.length;s+=1)r[s]=Uh(Nh(t,l,s));let o=t[8].colors.length>0&&Hh(t),u=t[11]&&qh(t);return{c(){e=v("div");for(let s=0;s<r.length;s+=1)r[s].c();n=Q(),o&&o.c(),i=Q(),u&&u.c(),m(e,"class","container svelte-urnaoo")},m(s,a){A(s,e,a);for(let f=0;f<r.length;f+=1)r[f]&&r[f].m(e,null);S(e,n),o&&o.m(e,null),S(e,i),u&&u.m(e,null)},p(s,a){if(a[0]&118917){l=Ce(s[7]);let f;for(f=0;f<l.length;f+=1){const c=Nh(s,l,f);r[f]?r[f].p(c,a):(r[f]=Uh(c),r[f].c(),r[f].m(e,n))}for(;f<r.length;f+=1)r[f].d(1);r.length=l.length}s[8].colors.length>0?o?o.p(s,a):(o=Hh(s),o.c(),o.m(e,i)):o&&(o.d(1),o=null),s[11]?u?u.p(s,a):(u=qh(s),u.c(),u.m(e,null)):u&&(u.d(1),u=null)},d(s){s&&C(e),St(r,s),o&&o.d(),u&&u.d()}}}function I2(t){let e,n,i,l,r,o,u,s,a,f,c=t[6]&&Fh(t);return{c(){e=v("div"),n=v("div"),o=Q(),c&&c.c(),u=Fe(),m(n,"class",i="preview-fill "+(t[2]||"")+" svelte-urnaoo"),m(n,"style",l=t[0]?`background: ${t[0]};`:""),p(n,"circle",t[10]),p(n,"placeholder",!t[0]),m(e,"class",r="preview-swatch size--"+(t[1]||"M")+" svelte-urnaoo"),m(e,"role","button"),m(e,"tabindex","0"),p(e,"circle",t[10]),p(e,"readonly",t[9])},m(g,h){A(g,e,h),S(e,n),t[23](e),A(g,o,h),c&&c.m(g,h),A(g,u,h),s=!0,a||(f=[B(e,"click",function(){Ge(t[9]?null:t[24])&&(t[9]?null:t[24]).apply(this,arguments)}),B(e,"keydown",t[25])],a=!0)},p(g,h){t=g,(!s||h[0]&4&&i!==(i="preview-fill "+(t[2]||"")+" svelte-urnaoo"))&&m(n,"class",i),(!s||h[0]&1&&l!==(l=t[0]?`background: ${t[0]};`:""))&&m(n,"style",l),(!s||h[0]&1028)&&p(n,"circle",t[10]),(!s||h[0]&5)&&p(n,"placeholder",!t[0]),(!s||h[0]&2&&r!==(r="preview-swatch size--"+(t[1]||"M")+" svelte-urnaoo"))&&m(e,"class",r),(!s||h[0]&1026)&&p(e,"circle",t[10]),(!s||h[0]&514)&&p(e,"readonly",t[9]),t[6]?c?(c.p(t,h),h[0]&64&&U(c,1)):(c=Fh(t),c.c(),U(c,1),c.m(u.parentNode,u)):c&&(He(),Z(c,1,1,()=>{c=null}),ze())},i(g){s||(U(c),s=!0)},o(g){Z(c),s=!1},d(g){g&&(C(e),C(o),C(u)),t[23](null),c&&c.d(g),a=!1,Ve(f)}}}function D2(t,e,n){let i,l,r,o,u,s,a,f,c,g,{value:h}=e,{size:d="M"}=e,{spectrumTheme:_}=e,{offset:b}=e,{align:w}=e,{cellState:E}=e,{cellOptions:k={}}=e,I=!1,O,D=!1;const N=le.createEventDispatcher();function M(R,z){return[...R?[{label:"Theme colors",colors:["red-100","orange-100","yellow-100","green-100","seafoam-100","blue-100","indigo-100","magenta-100","red-400","orange-400","yellow-400","green-400","seafoam-400","blue-400","indigo-400","magenta-400","red-500","orange-500","yellow-500","green-500","seafoam-500","blue-500","indigo-500","magenta-500","red-600","orange-600","yellow-600","green-600","seafoam-600","blue-600","indigo-600","magenta-600","red-700","orange-700","yellow-700","green-700","seafoam-700","blue-700","indigo-700","magenta-700","gray-50","gray-75","gray-100","gray-200","gray-300","gray-400","gray-500","gray-600","gray-700","gray-800","gray-900"]}]:[],...z?[{label:"Static colors",colors:["static-red-400","static-orange-400","static-yellow-400","static-green-400","static-seafoam-400","static-blue-400","static-indigo-400","static-magenta-400","static-red-800","static-orange-800","static-yellow-800","static-green-800","static-seafoam-800","static-blue-800","static-indigo-800","static-magenta-800","static-red-1200","static-orange-1200","static-yellow-1200","static-green-1200","static-seafoam-1200","static-blue-1200","static-indigo-1200","static-magenta-1200","static-white","static-black"]}]:[]]}function V(R){return{label:"Palette",colors:R.map(z=>z.value),customLabels:R.reduce((z,me)=>(z[me.value]=me.label,z),{})}}const W=R=>{const z=R===h?null:R;n(0,h=z),N("change",z),n(4,I=!1),n(6,D=!1)},ne=R=>R&&((c==null?void 0:c.some(me=>me.colors.some(se=>`var(--spectrum-global-color-${se})`===R)))?null:R),H=(R,z)=>z.customLabels&&z.customLabels[R]?z.customLabels[R]:R.split("-").join(" "),$=R=>R?R.includes("-gray-")?/^.*(gray-(50|75|100|200|300|400|500))\)$/.test(R)?"var(--spectrum-global-color-gray-900)":"var(--spectrum-global-color-gray-50)":R.includes("-100")?"var(--spectrum-global-color-gray-900)":R.includes("static-black")?"var(--spectrum-global-color-static-gray-50)":"var(--spectrum-global-color-static-gray-900)":"var(--spectrum-global-color-static-gray-900)",Y=(R,z,me)=>{(R.key==="Enter"||R.key===" ")&&(R.preventDefault(),W(me?z:`var(--spectrum-global-color-${z})`))};function G(R){Be[R?"unshift":"push"](()=>{O=R,n(5,O)})}const oe=()=>{n(6,D=!0),n(4,I=!I)},ie=R=>{(R.key==="Enter"||R.key===" "&&!u)&&(n(6,D=!0),n(4,I=!I))},J=R=>W(`var(--spectrum-global-color-${R})`),q=(R,z)=>Y(z,R,!1),j=R=>W(R),K=(R,z)=>Y(z,R,!0);function x(){i=this.value,n(13,i),n(0,h)}const X=()=>{i&&W(i)},F=()=>W(null);return t.$$set=R=>{"value"in R&&n(0,h=R.value),"size"in R&&n(1,d=R.size),"spectrumTheme"in R&&n(2,_=R.spectrumTheme),"offset"in R&&n(3,b=R.offset),"align"in R&&n(17,w=R.align),"cellState"in R&&n(18,E=R.cellState),"cellOptions"in R&&n(19,k=R.cellOptions)},t.$$.update=()=>{t.$$.dirty[0]&1&&n(13,i=ne(h)),t.$$.dirty[0]&1&&n(12,l=$(h)),t.$$.dirty[0]&524288&&n(11,r=(k==null?void 0:k.allowCustom)!==!1),t.$$.dirty[0]&524288&&n(10,o=(k==null?void 0:k.swatch)==="circle"),t.$$.dirty[0]&524288&&n(9,u=(k==null?void 0:k.readonly)||(k==null?void 0:k.disabled)),t.$$.dirty[0]&524288&&n(20,s=(k==null?void 0:k.customColors)||[]),t.$$.dirty[0]&524288&&n(22,a=(k==null?void 0:k.themeColors)!==!1),t.$$.dirty[0]&524288&&n(21,f=(k==null?void 0:k.staticColors)!==!1),t.$$.dirty[0]&6291456&&n(7,c=M(a,f)),t.$$.dirty[0]&1048576&&n(8,g=V(s))},[h,d,_,b,I,O,D,c,g,u,o,r,l,i,W,H,Y,w,E,k,s,f,a,G,oe,ie,J,q,j,K,x,X,F]}class O2 extends Ze{constructor(e){super(),Qe(this,e,D2,I2,Ye,{value:0,size:1,spectrumTheme:2,offset:3,align:17,cellState:18,cellOptions:19},null,[-1,-1])}}function Wh(t){let e,n;return{c(){e=v("i"),m(e,"class",n=bt(t[1].icon+" icon")+" svelte-u7nack")},m(i,l){A(i,e,l)},p(i,l){l[0]&2&&n!==(n=bt(i[1].icon+" icon")+" svelte-u7nack")&&m(e,"class",n)},d(i){i&&C(e)}}}function R2(t){let e,n;function i(o,u){return o[19]?N2:M2}let l=i(t),r=l(t);return{c(){e=v("div"),n=v("span"),r.c(),m(e,"class","value"),p(e,"with-icon",t[1].icon),p(e,"placeholder",!t[0]),P(e,"justify-content",t[1].align)},m(o,u){A(o,e,u),S(e,n),r.m(n,null)},p(o,u){l===(l=i(o))&&r?r.p(o,u):(r.d(1),r=l(o),r&&(r.c(),r.m(n,null))),u[0]&2&&p(e,"with-icon",o[1].icon),u[0]&1&&p(e,"placeholder",!o[0]),u[0]&2&&P(e,"justify-content",o[1].align)},d(o){o&&C(e),r.d()}}}function P2(t){let e,n,i,l,r,o,u,s,a=t[0]&&t[1].showDirty!=!1&&Gh(t);return{c(){e=v("div"),n=v("span"),i=Ee(t[19]),l=Q(),r=v("i"),o=Q(),a&&a.c(),m(r,"class","ri-calendar-line"),P(r,"font-size","16px"),P(r,"justify-self","flex-end"),m(e,"class","editor svelte-u7nack"),p(e,"with-icon",t[1].icon),p(e,"placeholder",!t[0])},m(f,c){A(f,e,c),S(e,n),S(n,i),S(e,l),S(e,r),S(e,o),a&&a.m(e,null),u||(s=B(e,"click",t[33]),u=!0)},p(f,c){c[0]&524288&&Pe(i,f[19]),f[0]&&f[1].showDirty!=!1?a?a.p(f,c):(a=Gh(f),a.c(),a.m(e,null)):a&&(a.d(1),a=null),c[0]&2&&p(e,"with-icon",f[1].icon),c[0]&1&&p(e,"placeholder",!f[0])},d(f){f&&C(e),a&&a.d(),u=!1,s()}}}function M2(t){let e;return{c(){e=Ee(t[4])},m(n,i){A(n,e,i)},p(n,i){i[0]&16&&Pe(e,n[4])},d(n){n&&C(e)}}}function N2(t){let e;return{c(){e=Ee(t[19])},m(n,i){A(n,e,i)},p(n,i){i[0]&524288&&Pe(e,n[19])},d(n){n&&C(e)}}}function Gh(t){let e,n,i;return{c(){e=v("button"),m(e,"class","clear-button ri-close-line svelte-u7nack"),P(e,"font-size","14px"),P(e,"color","var(--spectrum-global-color-gray-500)"),m(e,"aria-label","Clear date range")},m(l,r){A(l,e,r),n||(i=B(e,"click",Qt(t[25])),n=!0)},p:ue,d(l){l&&C(e),n=!1,i()}}}function Yh(t){let e,n;return e=new wn({props:{anchor:t[10],dismissible:!1,open:t[12],align:"right",$$slots:{default:[L2]},$$scope:{ctx:t}}}),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l[0]&1024&&(r.anchor=i[10]),l[0]&4096&&(r.open=i[12]),l[0]&1174496|l[1]&65536&&(r.$$scope={dirty:l,ctx:i}),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function Kh(t){let e,n,i,l;return{c(){e=v("div"),n=v("input"),m(n,"type","time"),m(n,"class","time-input svelte-u7nack"),m(n,"step","900"),m(e,"class","time-section svelte-u7nack")},m(r,o){A(r,e,o),S(e,n),t[36](n),Zt(n,t[9]),i||(l=[B(n,"input",t[37]),B(n,"change",t[23])],i=!0)},p(r,o){o[0]&512&&Zt(n,r[9])},d(r){r&&C(e),t[36](null),i=!1,Ve(l)}}}function Xh(t){let e,n,i,l;return{c(){e=v("div"),n=v("input"),m(n,"type","time"),m(n,"class","time-input svelte-u7nack"),m(n,"step","900"),m(e,"class","time-section svelte-u7nack")},m(r,o){A(r,e,o),S(e,n),t[39](n),Zt(n,t[6]),i||(l=[B(n,"input",t[40]),B(n,"change",t[24])],i=!0)},p(r,o){o[0]&64&&Zt(n,r[6])},d(r){r&&C(e),t[39](null),i=!1,Ve(l)}}}function Qh(t){let e;return{c(){e=v("div"),e.innerHTML='<i class="ri-error-warning-line" style="color: var(--spectrum-global-color-red-500);"></i> <span style="color: var(--spectrum-global-color-red-500); font-size: 12px;">End date cannot be before start date</span>',m(e,"class","range-error svelte-u7nack")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function L2(t){let e,n,i,l,r,o,u,s,a,f,c,g,h,d,_,b,w;u=new xo({props:{value:t[8]}}),u.$on("select",t[21]);let E=t[7]&&Kh(t);d=new xo({props:{value:t[5],min:t[8]}}),d.$on("select",t[22]);let k=t[7]&&Xh(t),I=!t[20]&&Qh();return{c(){e=v("div"),n=v("div"),i=v("div"),l=v("label"),l.textContent="From:",r=Q(),o=v("div"),We(u.$$.fragment),s=Q(),E&&E.c(),a=Q(),f=v("div"),c=v("label"),c.textContent="To:",g=Q(),h=v("div"),We(d.$$.fragment),_=Q(),k&&k.c(),b=Q(),I&&I.c(),m(l,"class","range-label svelte-u7nack"),m(i,"class","range-section svelte-u7nack"),m(c,"class","range-label svelte-u7nack"),m(f,"class","range-section svelte-u7nack"),m(n,"class","datepickers-container svelte-u7nack"),m(e,"class","range-picker-container svelte-u7nack"),P(e,"--date-picker-background","var(--spectrum-global-color-gray-75)"),P(e,"--date-picker-foreground","var(--spectrum-global-color-gray-800)"),P(e,"--date-picker-selected-background","var(--accent-color)")},m(O,D){A(O,e,D),S(e,n),S(n,i),S(i,l),S(i,r),S(i,o),je(u,o,null),t[35](o),S(i,s),E&&E.m(i,null),S(n,a),S(n,f),S(f,c),S(f,g),S(f,h),je(d,h,null),t[38](h),S(f,_),k&&k.m(f,null),S(e,b),I&&I.m(e,null),t[41](e),w=!0},p(O,D){const N={};D[0]&256&&(N.value=O[8]),u.$set(N),O[7]?E?E.p(O,D):(E=Kh(O),E.c(),E.m(i,null)):E&&(E.d(1),E=null);const M={};D[0]&32&&(M.value=O[5]),D[0]&256&&(M.min=O[8]),d.$set(M),O[7]?k?k.p(O,D):(k=Xh(O),k.c(),k.m(f,null)):k&&(k.d(1),k=null),O[20]?I&&(I.d(1),I=null):I||(I=Qh(),I.c(),I.m(e,null))},i(O){w||(U(u.$$.fragment,O),U(d.$$.fragment,O),w=!0)},o(O){Z(u.$$.fragment,O),Z(d.$$.fragment,O),w=!1},d(O){O&&C(e),qe(u),t[35](null),E&&E.d(),qe(d),t[38](null),k&&k.d(),I&&I.d(),t[41](null)}}}function F2(t){let e,n,i,l,r,o,u,s,a=t[1].icon&&Wh(t);function f(d,_){return d[3]?P2:R2}let c=f(t),g=c(t),h=t[3]&&Yh(t);return{c(){e=v("div"),a&&a.c(),n=Q(),g.c(),l=Q(),h&&h.c(),r=Fe(),m(e,"class","superCell"),m(e,"tabindex",i=t[1].readonly||t[1].disabled?"-1":"0"),p(e,"inEdit",t[3]),p(e,"isDirty",t[17]&&t[1].showDirty),p(e,"inline",t[18]),p(e,"tableCell",t[1].role=="tableCell"),p(e,"formInput",t[1].role=="formInput"),p(e,"disabled",t[1].disabled),p(e,"readonly",t[1].readonly),p(e,"error",t[1].error),P(e,"color",t[1].color),P(e,"background",t[1].background),P(e,"font-weight",t[1].fontWeight)},m(d,_){A(d,e,_),a&&a.m(e,null),S(e,n),g.m(e,null),t[34](e),A(d,l,_),h&&h.m(d,_),A(d,r,_),o=!0,u||(s=[B(e,"focus",function(){Ge(t[2].focus)&&t[2].focus.apply(this,arguments)}),B(e,"keypress",function(){Ge(t[2].handleKeyboard)&&t[2].handleKeyboard.apply(this,arguments)}),B(e,"focusout",function(){Ge(t[2].focusout)&&t[2].focusout.apply(this,arguments)})],u=!0)},p(d,_){t=d,t[1].icon?a?a.p(t,_):(a=Wh(t),a.c(),a.m(e,n)):a&&(a.d(1),a=null),c===(c=f(t))&&g?g.p(t,_):(g.d(1),g=c(t),g&&(g.c(),g.m(e,null))),(!o||_[0]&2&&i!==(i=t[1].readonly||t[1].disabled?"-1":"0"))&&m(e,"tabindex",i),(!o||_[0]&8)&&p(e,"inEdit",t[3]),(!o||_[0]&131074)&&p(e,"isDirty",t[17]&&t[1].showDirty),(!o||_[0]&262144)&&p(e,"inline",t[18]),(!o||_[0]&2)&&p(e,"tableCell",t[1].role=="tableCell"),(!o||_[0]&2)&&p(e,"formInput",t[1].role=="formInput"),(!o||_[0]&2)&&p(e,"disabled",t[1].disabled),(!o||_[0]&2)&&p(e,"readonly",t[1].readonly),(!o||_[0]&2)&&p(e,"error",t[1].error),_[0]&2&&P(e,"color",t[1].color),_[0]&2&&P(e,"background",t[1].background),_[0]&2&&P(e,"font-weight",t[1].fontWeight),t[3]?h?(h.p(t,_),_[0]&8&&U(h,1)):(h=Yh(t),h.c(),U(h,1),h.m(r.parentNode,r)):h&&(He(),Z(h,1,1,()=>{h=null}),ze())},i(d){o||(U(h),o=!0)},o(d){Z(h),o=!1},d(d){d&&(C(e),C(l),C(r)),a&&a.d(),g.d(),t[34](null),h&&h.d(d),u=!1,Ve(s)}}}function V2(t,e,n){let i,l,r,o,u,s,a,f,c,g,h,d,_,b,w,E=ue,k=()=>(E(),E=ft(ne,te=>n(32,w=te)),ne);t.$$.on_destroy.push(()=>E());const I=new le.createEventDispatcher,{processStringSync:O}=le.getContext("sdk");let{value:D}=e,{formattedValue:N}=e,{cellOptions:M}=e,{autofocus:V}=e,W,{cellState:ne=Ft("View",{"*":{goTo(te){return te}},View:{focus(){if(!M.readonly)return"Editing"}},Editing:{_enter(){n(28,W=D?{...D}:null),n(12,Y=!0),I("enteredit")},_exit(){I("exitedit")},handleKeyboard(te){te.keyCode==32&&(te.stopPropagation(),te.preventDefault(),n(12,Y=!Y))},focusout(te){const ae=$==null?void 0:$.contains(te.relatedTarget),de=ie!=null&&ie.contains?ie==null?void 0:ie.contains(te.relatedTarget):!1,Xe=J!=null&&J.contains?J==null?void 0:J.contains(te.relatedTarget):!1;if(!ae&&!de&&!Xe)return n(12,Y=!1),JSON.stringify(D)!=JSON.stringify(W)&&I("change",D),"View"},cancel(){return n(0,D=W?{...W}:null),"View"}}})}=e;k();let H,$,Y=!1,G,oe,ie,J;function q(te,ae,de,Xe,Te,Se){const Le=j(te,te,de).from+" "+Xe,rt=j(ae,ae,de).to+" "+Te;return{from:Le,to:rt}}function j(te,ae,de){if(console.log("🔍 formatDateRange called with:",{fromDate:te,toDate:ae,dateFormat:de}),!de||de==="default")return console.log("➡️ Using default format"),{from:te.toDateString(),to:ae.toDateString()};if(de==="MM/DD/YYYY"){const Se=`${(te.getMonth()+1).toString().padStart(2,"0")}/${te.getDate().toString().padStart(2,"0")}/${te.getFullYear()}`,Le=`${(ae.getMonth()+1).toString().padStart(2,"0")}/${ae.getDate().toString().padStart(2,"0")}/${ae.getFullYear()}`;return console.log("✅ MM/DD/YYYY formatted:",{from:Se,to:Le}),{from:Se,to:Le}}if(de==="DD/MM/YYYY"){const Se=`${te.getDate().toString().padStart(2,"0")}/${(te.getMonth()+1).toString().padStart(2,"0")}/${te.getFullYear()}`,Le=`${ae.getDate().toString().padStart(2,"0")}/${(ae.getMonth()+1).toString().padStart(2,"0")}/${ae.getFullYear()}`;return console.log("✅ DD/MM/YYYY formatted:",{from:Se,to:Le}),{from:Se,to:Le}}if(de==="YYYY-MM-DD"){const Se=`${te.getFullYear()}-${(te.getMonth()+1).toString().padStart(2,"0")}-${te.getDate().toString().padStart(2,"0")}`,Le=`${ae.getFullYear()}-${(ae.getMonth()+1).toString().padStart(2,"0")}-${ae.getDate().toString().padStart(2,"0")}`;return console.log("✅ YYYY-MM-DD formatted:",{from:Se,to:Le}),{from:Se,to:Le}}const Te={"MMM DD, YYYY":{month:"short",day:"numeric",year:"numeric",timeZone:"UTC"},"DD MMM YYYY":{day:"numeric",month:"short",year:"numeric",timeZone:"UTC"}}[de];if(console.log("📅 Format object:",Te),Te){const Se=te.toLocaleDateString("en-US",Te),Le=ae.toLocaleDateString("en-US",Te);return console.log("✅ Formatted result:",{from:Se,to:Le}),{from:Se,to:Le}}return console.log("⚠️ Format not found, using fallback"),{from:te.toDateString(),to:ae.toDateString()}}le.onMount(()=>{V&&setTimeout(()=>{ne.focus()},30)});const K=te=>{const ae=te.detail;n(0,D={...D,from:ae}),D.to&&new Date(D.to)<ae&&n(0,D={...D,to:null}),I("change",D)},x=te=>{const ae=te.detail;n(0,D={...D,to:ae}),I("change",D)},X=te=>{const ae=te.target.value;n(0,D={...D,fromTime:ae}),I("change",D)},F=te=>{const ae=te.target.value;n(0,D={...D,toTime:ae}),I("change",D)},R=()=>{n(0,D=null),I("change",null)},z=()=>n(12,Y=!Y);function me(te){Be[te?"unshift":"push"](()=>{H=te,n(10,H)})}function se(te){Be[te?"unshift":"push"](()=>{G=te,n(13,G)})}function Oe(te){Be[te?"unshift":"push"](()=>{ie=te,n(15,ie)})}function be(){r=this.value,n(9,r),n(7,l),n(0,D),n(1,M)}function Ie(te){Be[te?"unshift":"push"](()=>{oe=te,n(14,oe)})}function ve(te){Be[te?"unshift":"push"](()=>{J=te,n(16,J)})}function fe(){o=this.value,n(6,o),n(7,l),n(0,D),n(1,M)}function Ne(te){Be[te?"unshift":"push"](()=>{$=te,n(11,$)})}return t.$$set=te=>{"value"in te&&n(0,D=te.value),"formattedValue"in te&&n(26,N=te.formattedValue),"cellOptions"in te&&n(1,M=te.cellOptions),"autofocus"in te&&n(27,V=te.autofocus),"cellState"in te&&k(n(2,ne=te.cellState))},t.$$.update=()=>{t.$$.dirty[0]&2&&n(29,i=M==null?void 0:M.dateFormat),t.$$.dirty[0]&2&&n(7,l=M==null?void 0:M.showTime),t.$$.dirty[0]&129&&n(9,r=l&&(D!=null&&D.fromTime)?D.fromTime:"00:00"),t.$$.dirty[0]&129&&n(6,o=l&&(D!=null&&D.toTime)?D.toTime:"00:00"),t.$$.dirty[0]&1&&n(8,u=D!=null&&D.from?new Date(D.from):new Date),t.$$.dirty[0]&1&&n(5,s=D!=null&&D.to?new Date(D.to):new Date),t.$$.dirty[0]&897&&n(31,a=l&&(D!=null&&D.from)?new Date(`${u.toISOString().split("T")[0]}T${r}`):u),t.$$.dirty[0]&225&&n(30,f=l&&(D!=null&&D.to)?new Date(`${s.toISOString().split("T")[0]}T${o}`):s),t.$$.dirty[0]&1073742241|t.$$.dirty[1]&1&&n(20,c=!(D!=null&&D.from)||!(D!=null&&D.to)?!0:l?a<=f:u<=s),t.$$.dirty[0]&3&&n(26,N=M.template&&D?O(M.template,{value:D}):void 0),t.$$.dirty[0]&2&&n(4,h=M.readonly||M.disabled?"":M.placeholder||"Select date range"),t.$$.dirty[0]&603980785&&n(19,g=(()=>{if(N)return N;if(!(D!=null&&D.from)&&!(D!=null&&D.to))return h;const te=i;let ae=h,de=h;return D!=null&&D.from&&(te==="default"||!te?ae=l?u.toDateString()+" "+r:u.toDateString():l?ae=q(u,u,te,r,r).from:ae=j(u,u,te).from),D!=null&&D.to&&(te==="default"||!te?de=l?s.toDateString()+" "+o:s.toDateString():l?de=q(s,s,te,o,o).to:de=j(s,s,te).to),D!=null&&D.from&&(D!=null&&D.to)?`${ae} - ${de}`:D!=null&&D.from?`${ae} - [Select end date]`:D!=null&&D.to?`[Select start date] - ${de}`:h})()),t.$$.dirty[1]&2&&n(3,d=w=="Editing"),t.$$.dirty[0]&2&&n(18,_=M.role=="inlineInput"),t.$$.dirty[0]&268435465&&n(17,b=d&&JSON.stringify(D)!=JSON.stringify(W))},[D,M,ne,d,h,s,o,l,u,r,H,$,Y,G,oe,ie,J,b,_,g,c,K,x,X,F,R,N,V,W,i,f,a,w,z,me,se,Oe,be,Ie,ve,fe,Ne]}class B2 extends Ze{constructor(e){super(),Qe(this,e,V2,F2,Ye,{value:0,formattedValue:26,cellOptions:1,autofocus:27,cellState:2},null,[-1,-1])}}const U2={all:"All Icons",business:"Business",communication:"Communication",design:"Design",development:"Development",document:"Document",editor:"Editor",finance:"Finance",health:"Health",logistics:"Logistics",map:"Maps",media:"Media",system:"System",user:"User",weather:"Weather"},H2={all:["acorn","address-book","address-book-tabs","air-traffic-control","airplane","airplane-in-flight","airplane-landing","airplane-takeoff","airplane-taxiing","airplane-tilt","airplay","alarm","alien","align-bottom","align-bottom-simple","align-center-horizontal","align-center-horizontal-simple","align-center-vertical","align-center-vertical-simple","align-left","align-left-simple","align-right","align-right-simple","align-top","align-top-simple","amazon-logo","ambulance","anchor","anchor-simple","android-logo","angle","angular-logo","aperture","app-store-logo","app-window","apple-logo","apple-podcasts-logo","approximate-equals","archive","armchair","arrow-arc-left","arrow-arc-right","arrow-bend-double-up-left","arrow-bend-double-up-right","arrow-bend-down-left","arrow-bend-down-right","arrow-bend-left-down","arrow-bend-left-up","arrow-bend-right-down","arrow-bend-right-up","arrow-bend-up-left","arrow-bend-up-right","arrow-circle-down","arrow-circle-down-left","arrow-circle-down-right","arrow-circle-left","arrow-circle-right","arrow-circle-up","arrow-circle-up-left","arrow-circle-up-right","arrow-clockwise","arrow-counter-clockwise","arrow-down","arrow-down-left","arrow-down-right","arrow-elbow-down-left","arrow-elbow-down-right","arrow-elbow-left","arrow-elbow-left-down","arrow-elbow-left-up","arrow-elbow-right","arrow-elbow-right-down","arrow-elbow-right-up","arrow-elbow-up-left","arrow-elbow-up-right","arrow-fat-down","arrow-fat-left","arrow-fat-line-down","arrow-fat-line-left","arrow-fat-line-right","arrow-fat-line-up","arrow-fat-lines-down","arrow-fat-lines-left","arrow-fat-lines-right","arrow-fat-lines-up","arrow-fat-right","arrow-fat-up","arrow-left","arrow-line-down","arrow-line-down-left","arrow-line-down-right","arrow-line-left","arrow-line-right","arrow-line-up","arrow-line-up-left","arrow-line-up-right","arrow-right","arrow-square-down","arrow-square-down-left","arrow-square-down-right","arrow-square-in","arrow-square-left","arrow-square-out","arrow-square-right","arrow-square-up","arrow-square-up-left","arrow-square-up-right","arrow-u-down-left","arrow-u-down-right","arrow-u-left-down","arrow-u-left-up","arrow-u-right-down","arrow-u-right-up","arrow-u-up-left","arrow-u-up-right","arrow-up","arrow-up-left","arrow-up-right","arrows-clockwise","arrows-counter-clockwise","arrows-down-up","arrows-horizontal","arrows-in","arrows-in-cardinal","arrows-in-line-horizontal","arrows-in-line-vertical","arrows-in-simple","arrows-left-right","arrows-merge","arrows-out","arrows-out-cardinal","arrows-out-line-horizontal","arrows-out-line-vertical","arrows-out-simple","arrows-split","arrows-vertical","article","article-medium","article-ny-times","asclepius","caduceus","asterisk","asterisk-simple","at","atom","avocado","axe","baby","baby-carriage","backpack","backspace","bag","bag-simple","balloon","bandaids","bank","barbell","barcode","barn","barricade","baseball","baseball-cap","baseball-helmet","basket","basketball","bathtub","battery-charging","battery-charging-vertical","battery-empty","battery-full","battery-high","battery-low","battery-medium","battery-plus","battery-plus-vertical","battery-vertical-empty","battery-vertical-full","battery-vertical-high","battery-vertical-low","battery-vertical-medium","battery-warning","battery-warning-vertical","beach-ball","beanie","bed","beer-bottle","beer-stein","behance-logo","bell","bell-ringing","bell-simple","bell-simple-ringing","bell-simple-slash","bell-simple-z","bell-slash","bell-z","belt","bezier-curve","bicycle","binary","binoculars","biohazard","bird","blueprint","bluetooth","bluetooth-connected","bluetooth-slash","bluetooth-x","boat","bomb","bone","book","book-bookmark","book-open","book-open-text","book-open-user","bookmark","bookmark-simple","bookmarks","bookmarks-simple","books","boot","boules","bounding-box","bowl-food","bowl-steam","bowling-ball","box-arrow-down","archive-box","box-arrow-up","boxing-glove","brackets-angle","brackets-curly","brackets-round","brackets-square","brain","brandy","bread","bridge","briefcase","briefcase-metal","broadcast","broom","browser","browsers","bug","bug-beetle","bug-droid","building","building-apartment","building-office","buildings","bulldozer","bus","butterfly","cable-car","cactus","cake","calculator","calendar","calendar-blank","calendar-check","calendar-dot","calendar-dots","calendar-heart","calendar-minus","calendar-plus","calendar-slash","calendar-star","calendar-x","call-bell","camera","camera-plus","camera-rotate","camera-slash","campfire","car","car-battery","car-profile","car-simple","cardholder","cards","cards-three","caret-circle-double-down","caret-circle-double-left","caret-circle-double-right","caret-circle-double-up","caret-circle-down","caret-circle-left","caret-circle-right","caret-circle-up","caret-circle-up-down","caret-double-down","caret-double-left","caret-double-right","caret-double-up","caret-down","caret-left","caret-line-down","caret-line-left","caret-line-right","caret-line-up","caret-right","caret-up","caret-up-down","carrot","cash-register","cassette-tape","castle-turret","cat","cell-signal-full","cell-signal-high","cell-signal-low","cell-signal-medium","cell-signal-none","cell-signal-slash","cell-signal-x","cell-tower","certificate","chair","chalkboard","chalkboard-simple","chalkboard-teacher","champagne","charging-station","chart-bar","chart-bar-horizontal","chart-donut","chart-line","chart-line-down","chart-line-up","chart-pie","chart-pie-slice","chart-polar","chart-scatter","chat","chat-centered","chat-centered-dots","chat-centered-slash","chat-centered-text","chat-circle","chat-circle-dots","chat-circle-slash","chat-circle-text","chat-dots","chat-slash","chat-teardrop","chat-teardrop-dots","chat-teardrop-slash","chat-teardrop-text","chat-text","chats","chats-circle","chats-teardrop","check","check-circle","check-fat","check-square","check-square-offset","checkerboard","checks","cheers","cheese","chef-hat","cherries","church","cigarette","cigarette-slash","circle","circle-dashed","circle-half","circle-half-tilt","circle-notch","circles-four","circles-three","circles-three-plus","circuitry","city","clipboard","clipboard-text","clock","clock-afternoon","clock-clockwise","clock-countdown","clock-counter-clockwise","clock-user","closed-captioning","cloud","cloud-arrow-down","cloud-arrow-up","cloud-check","cloud-fog","cloud-lightning","cloud-moon","cloud-rain","cloud-slash","cloud-snow","cloud-sun","cloud-warning","cloud-x","clover","club","coat-hanger","coda-logo","code","code-block","code-simple","codepen-logo","codesandbox-logo","coffee","coffee-bean","coin","coin-vertical","coins","columns","columns-plus-left","columns-plus-right","command","compass","compass-rose","compass-tool","computer-tower","confetti","contactless-payment","control","cookie","cooking-pot","copy","copy-simple","copyleft","copyright","corners-in","corners-out","couch","court-basketball","cow","cowboy-hat","cpu","crane","crane-tower","credit-card","cricket","crop","cross","crosshair","crosshair-simple","crown","crown-cross","crown-simple","cube","cube-focus","cube-transparent","currency-btc","currency-circle-dollar","currency-cny","currency-dollar","currency-dollar-simple","currency-eth","currency-eur","currency-gbp","currency-inr","currency-jpy","currency-krw","currency-kzt","currency-ngn","currency-rub","cursor","cursor-click","cursor-text","cylinder","database","desk","desktop","desktop-tower","detective","dev-to-logo","device-mobile","device-mobile-camera","device-mobile-slash","device-mobile-speaker","device-rotate","device-tablet","device-tablet-camera","device-tablet-speaker","devices","diamond","diamonds-four","dice-five","dice-four","dice-one","dice-six","dice-three","dice-two","disc","disco-ball","discord-logo","divide","dna","dog","door","door-open","dot","dot-outline","dots-nine","dots-six","dots-six-vertical","dots-three","dots-three-circle","dots-three-circle-vertical","dots-three-outline","dots-three-outline-vertical","dots-three-vertical","download","download-simple","dress","dresser","dribbble-logo","drone","drop","drop-half","drop-half-bottom","drop-simple","drop-slash","dropbox-logo","ear","ear-slash","egg","egg-crack","eject","eject-simple","elevator","engine","envelope","envelope-open","envelope-simple","envelope-simple-open","equalizer","equals","eraser","escalator-down","escalator-up","exam","exclamation-mark","exclude","exclude-square","export","eye","eye-closed","eye-slash","eyedropper","eyedropper-sample","eyeglasses","eyes","face-mask","facebook-logo","factory","faders","faders-horizontal","fallout-shelter","fan","farm","fast-forward","fast-forward-circle","feather","fediverse-logo","figma-logo","file","file-archive","file-arrow-down","file-arrow-up","file-audio","file-c","file-c-sharp","file-cloud","file-code","file-cpp","file-css","file-csv","file-dashed","file-dotted","file-doc","file-html","file-image","file-ini","file-jpg","file-js","file-jsx","file-lock","file-magnifying-glass","file-search","file-md","file-minus","file-pdf","file-plus","file-png","file-ppt","file-py","file-rs","file-sql","file-svg","file-text","file-ts","file-tsx","file-txt","file-video","file-vue","file-x","file-xls","file-zip","files","film-reel","film-script","film-slate","film-strip","fingerprint","fingerprint-simple","finn-the-human","fire","fire-extinguisher","fire-simple","fire-truck","first-aid","first-aid-kit","fish","fish-simple","flag","flag-banner","flag-banner-fold","flag-checkered","flag-pennant","flame","flashlight","flask","flip-horizontal","flip-vertical","floppy-disk","floppy-disk-back","flow-arrow","flower","flower-lotus","flower-tulip","flying-saucer","folder","folder-notch","folder-dashed","folder-dotted","folder-lock","folder-minus","folder-notch-minus","folder-open","folder-notch-open","folder-plus","folder-notch-plus","folder-simple","folder-simple-dashed","folder-simple-dotted","folder-simple-lock","folder-simple-minus","folder-simple-plus","folder-simple-star","folder-simple-user","folder-star","folder-user","folders","football","football-helmet","footprints","fork-knife","four-k","frame-corners","framer-logo","function","funnel","funnel-simple","funnel-simple-x","funnel-x","game-controller","garage","gas-can","gas-pump","gauge","gavel","gear","gear-fine","gear-six","gender-female","gender-intersex","gender-male","gender-neuter","gender-nonbinary","gender-transgender","ghost","gif","gift","git-branch","git-commit","git-diff","git-fork","git-merge","git-pull-request","github-logo","gitlab-logo","gitlab-logo-simple","globe","globe-hemisphere-east","globe-hemisphere-west","globe-simple","globe-simple-x","globe-stand","globe-x","goggles","golf","goodreads-logo","google-cardboard-logo","google-chrome-logo","google-drive-logo","google-logo","google-photos-logo","google-play-logo","google-podcasts-logo","gps","gps-fix","gps-slash","gradient","graduation-cap","grains","grains-slash","graph","graphics-card","greater-than","greater-than-or-equal","grid-four","grid-nine","guitar","hair-dryer","hamburger","hammer","hand","hand-arrow-down","hand-arrow-up","hand-coins","hand-deposit","hand-eye","hand-fist","hand-grabbing","hand-heart","hand-palm","hand-peace","hand-pointing","hand-soap","hand-swipe-left","hand-swipe-right","hand-tap","hand-waving","hand-withdraw","handbag","handbag-simple","hands-clapping","hands-praying","handshake","hard-drive","hard-drives","hard-hat","hash","hash-straight","head-circuit","headlights","headphones","headset","heart","heart-break","heart-half","heart-straight","heart-straight-break","heartbeat","hexagon","high-definition","high-heel","highlighter","highlighter-circle","hockey","hoodie","horse","hospital","hourglass","hourglass-high","hourglass-low","hourglass-medium","hourglass-simple","hourglass-simple-high","hourglass-simple-low","hourglass-simple-medium","house","house-line","house-simple","hurricane","ice-cream","identification-badge","identification-card","image","image-broken","image-square","images","images-square","infinity","lemniscate","info","instagram-logo","intersect","intersect-square","intersect-three","intersection","invoice","island","jar","jar-label","jeep","joystick","kanban","key","key-return","keyboard","keyhole","knife","ladder","ladder-simple","lamp","lamp-pendant","laptop","lasso","lastfm-logo","layout","leaf","lectern","lego","lego-smiley","less-than","less-than-or-equal","letter-circle-h","letter-circle-p","letter-circle-v","lifebuoy","lightbulb","lightbulb-filament","lighthouse","lightning","lightning-a","lightning-slash","line-segment","line-segments","line-vertical","link","link-break","link-simple","link-simple-break","link-simple-horizontal","link-simple-horizontal-break","linkedin-logo","linktree-logo","linux-logo","list","list-bullets","list-checks","list-dashes","list-heart","list-magnifying-glass","list-numbers","list-plus","list-star","lock","lock-key","lock-key-open","lock-laminated","lock-laminated-open","lock-open","lock-simple","lock-simple-open","lockers","log","magic-wand","magnet","magnet-straight","magnifying-glass","magnifying-glass-minus","magnifying-glass-plus","mailbox","map-pin","map-pin-area","map-pin-line","map-pin-plus","map-pin-simple","map-pin-simple-area","map-pin-simple-line","map-trifold","markdown-logo","marker-circle","martini","mask-happy","mask-sad","mastodon-logo","math-operations","matrix-logo","medal","medal-military","medium-logo","megaphone","megaphone-simple","member-of","memory","messenger-logo","meta-logo","meteor","metronome","microphone","microphone-slash","microphone-stage","microscope","microsoft-excel-logo","microsoft-outlook-logo","microsoft-powerpoint-logo","microsoft-teams-logo","microsoft-word-logo","minus","minus-circle","minus-square","money","money-wavy","monitor","monitor-arrow-up","monitor-play","moon","moon-stars","moped","moped-front","mosque","motorcycle","mountains","mouse","mouse-left-click","mouse-middle-click","mouse-right-click","mouse-scroll","mouse-simple","music-note","music-note-simple","music-notes","music-notes-minus","music-notes-plus","music-notes-simple","navigation-arrow","needle","network","network-slash","network-x","newspaper","newspaper-clipping","not-equals","not-member-of","not-subset-of","not-superset-of","notches","note","note-blank","note-pencil","notebook","notepad","notification","notion-logo","nuclear-plant","number-circle-eight","number-circle-five","number-circle-four","number-circle-nine","number-circle-one","number-circle-seven","number-circle-six","number-circle-three","number-circle-two","number-circle-zero","number-eight","number-five","number-four","number-nine","number-one","number-seven","number-six","number-square-eight","number-square-five","number-square-four","number-square-nine","number-square-one","number-square-seven","number-square-six","number-square-three","number-square-two","number-square-zero","number-three","number-two","number-zero","numpad","nut","ny-times-logo","octagon","office-chair","onigiri","open-ai-logo","option","orange","orange-slice","oven","package","paint-brush","paint-brush-broad","paint-brush-household","paint-bucket","paint-roller","palette","panorama","pants","paper-plane","paper-plane-right","paper-plane-tilt","paperclip","paperclip-horizontal","parachute","paragraph","parallelogram","park","password","path","patreon-logo","pause","pause-circle","paw-print","paypal-logo","peace","pen","pen-nib","pen-nib-straight","pencil","pencil-circle","pencil-line","pencil-ruler","pencil-simple","pencil-simple-line","pencil-simple-slash","pencil-slash","pentagon","pentagram","pepper","percent","person","person-arms-spread","person-simple","person-simple-bike","person-simple-circle","person-simple-hike","person-simple-run","person-simple-ski","person-simple-snowboard","person-simple-swim","person-simple-tai-chi","person-simple-throw","person-simple-walk","perspective","phone","phone-call","phone-disconnect","phone-incoming","phone-list","phone-outgoing","phone-pause","phone-plus","phone-slash","phone-transfer","phone-x","phosphor-logo","pi","piano-keys","picnic-table","picture-in-picture","piggy-bank","pill","ping-pong","pint-glass","pinterest-logo","pinwheel","pipe","pipe-wrench","pix-logo","pizza","placeholder","planet","plant","play","play-circle","play-pause","playlist","plug","plug-charging","plugs","plugs-connected","plus","plus-circle","plus-minus","plus-square","poker-chip","police-car","polygon","popcorn","popsicle","potted-plant","power","prescription","presentation","presentation-chart","printer","prohibit","prohibit-inset","projector-screen","projector-screen-chart","pulse","activity","push-pin","push-pin-simple","push-pin-simple-slash","push-pin-slash","puzzle-piece","qr-code","question","question-mark","queue","quotes","rabbit","racquet","radical","radio","radio-button","radioactive","rainbow","rainbow-cloud","ranking","read-cv-logo","receipt","receipt-x","record","rectangle","rectangle-dashed","recycle","reddit-logo","repeat","repeat-once","replit-logo","resize","rewind","rewind-circle","road-horizon","robot","rocket","rocket-launch","rows","rows-plus-bottom","rows-plus-top","rss","rss-simple","rug","ruler","sailboat","scales","scan","scan-smiley","scissors","scooter","screencast","screwdriver","scribble","scribble-loop","scroll","seal","circle-wavy","seal-check","circle-wavy-check","seal-percent","circle-wavy-question","seal-warning","circle-wavy-warning","seat","seatbelt","security-camera","selection","selection-all","selection-background","selection-foreground","selection-inverse","selection-plus","selection-slash","shapes","share","share-fat","share-network","shield","shield-check","shield-checkered","shield-chevron","shield-plus","shield-slash","shield-star","shield-warning","shipping-container","shirt-folded","shooting-star","shopping-bag","shopping-bag-open","shopping-cart","shopping-cart-simple","shovel","shower","shrimp","shuffle","shuffle-angular","shuffle-simple","sidebar","sidebar-simple","sigma","sign-in","sign-out","signature","signpost","sim-card","siren","sketch-logo","skip-back","skip-back-circle","skip-forward","skip-forward-circle","skull","skype-logo","slack-logo","sliders","sliders-horizontal","slideshow","smiley","smiley-angry","smiley-blank","smiley-meh","smiley-melting","smiley-nervous","smiley-sad","smiley-sticker","smiley-wink","smiley-x-eyes","snapchat-logo","sneaker","sneaker-move","snowflake","soccer-ball","sock","solar-panel","solar-roof","sort-ascending","sort-descending","soundcloud-logo","spade","sparkle","speaker-hifi","speaker-high","speaker-low","speaker-none","speaker-simple-high","speaker-simple-low","speaker-simple-none","speaker-simple-slash","speaker-simple-x","speaker-slash","speaker-x","speedometer","sphere","spinner","spinner-ball","spinner-gap","spiral","split-horizontal","split-vertical","spotify-logo","spray-bottle","square","square-half","square-half-bottom","square-logo","square-split-horizontal","square-split-vertical","squares-four","stack","stack-minus","stack-overflow-logo","stack-plus","stack-simple","stairs","stamp","standard-definition","star","star-and-crescent","star-four","star-half","star-of-david","steam-logo","steering-wheel","steps","stethoscope","sticker","stool","stop","stop-circle","storefront","strategy","stripe-logo","student","subset-of","subset-proper-of","subtitles","subtitles-slash","subtract","subtract-square","subway","suitcase","suitcase-rolling","suitcase-simple","sun","sun-dim","sun-horizon","sunglasses","superset-of","superset-proper-of","swap","swatches","swimming-pool","sword","synagogue","syringe","t-shirt","table","tabs","tag","tag-chevron","tag-simple","target","taxi","tea-bag","telegram-logo","television","television-simple","tennis-ball","tent","terminal","terminal-window","test-tube","text-a-underline","text-aa","text-align-center","text-align-justify","text-align-left","text-align-right","text-b","text-bolder","text-columns","text-h","text-h-five","text-h-four","text-h-one","text-h-six","text-h-three","text-h-two","text-indent","text-italic","text-outdent","text-strikethrough","text-subscript","text-superscript","text-t","text-t-slash","text-underline","textbox","thermometer","thermometer-cold","thermometer-hot","thermometer-simple","threads-logo","three-d","thumbs-down","thumbs-up","ticket","tidal-logo","tiktok-logo","tilde","timer","tip-jar","tipi","tire","toggle-left","toggle-right","toilet","toilet-paper","toolbox","tooth","tornado","tote","tote-simple","towel","tractor","trademark","trademark-registered","traffic-cone","traffic-sign","traffic-signal","train","train-regional","train-simple","tram","translate","trash","trash-simple","tray","tray-arrow-down","archive-tray","tray-arrow-up","treasure-chest","tree","tree-evergreen","tree-palm","tree-structure","tree-view","trend-down","trend-up","triangle","triangle-dashed","trolley","trolley-suitcase","trophy","truck","truck-trailer","tumblr-logo","twitch-logo","twitter-logo","umbrella","umbrella-simple","union","unite","unite-square","upload","upload-simple","usb","user","user-check","user-circle","user-circle-check","user-circle-dashed","user-circle-gear","user-circle-minus","user-circle-plus","user-focus","user-gear","user-list","user-minus","user-plus","user-rectangle","user-sound","user-square","user-switch","users","users-four","users-three","van","vault","vector-three","vector-two","vibrate","video","video-camera","video-camera-slash","video-conference","vignette","vinyl-record","virtual-reality","virus","visor","voicemail","volleyball","wall","wallet","warehouse","warning","warning-circle","warning-diamond","warning-octagon","washing-machine","watch","wave-sawtooth","wave-sine","wave-square","wave-triangle","waveform","waveform-slash","waves","webcam","webcam-slash","webhooks-logo","wechat-logo","whatsapp-logo","wheelchair","wheelchair-motion","wifi-high","wifi-low","wifi-medium","wifi-none","wifi-slash","wifi-x","wind","windmill","windows-logo","wine","wrench","x","x-circle","x-square","yarn","yin-yang","youtube-logo"],business:["briefcase","briefcase-fill","building","building-fill","chart-bar","chart-bar-fill","chart-line","chart-line-fill","currency-dollar","currency-dollar-fill","presentation","presentation-fill","users","users-fill"],communication:["chat","chat-fill","envelope","envelope-fill","phone","phone-fill","video-camera","video-camera-fill","microphone","microphone-fill","speaker","speaker-fill"],design:["palette","palette-fill","paint-brush","paint-brush-fill","scissors","scissors-fill","crop","crop-fill"],development:["code","code-fill","terminal","terminal-fill","bug","bug-fill","git-branch","git-branch-fill"],document:["file","file-fill","file-text","file-text-fill","file-pdf","file-pdf-fill","folder","folder-fill"],editor:["pencil","pencil-fill","text-b","text-b-fill","text-italic","text-italic-fill","list","list-fill"],finance:["currency-dollar","currency-dollar-fill","credit-card","credit-card-fill","bank","bank-fill"],health:["heart","heart-fill","stethoscope","stethoscope-fill","pill","pill-fill"],logistics:["truck","truck-fill","package","package-fill","map-pin","map-pin-fill"],map:["map","map-fill","map-pin","map-pin-fill","navigation","navigation-fill"],media:["play","play-fill","pause","pause-fill","stop","stop-fill","image","image-fill","video-camera","video-camera-fill"],system:["gear","gear-fill","settings","settings-fill","cog","cog-fill"],user:["user","user-fill","users","users-fill","user-circle","user-circle-fill"],weather:["sun","sun-fill","cloud","cloud-fill","rain","rain-fill","snow","snow-fill"]};function Zh(t,e,n){const i=t.slice();return i[23]=e[n],i}const z2=t=>({item:t&16}),Jh=t=>({item:t[23].data});function j2(t){let e;return{c(){e=Ee("Missing template")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function xh(t,e){let n,i,l;const r=e[14].default,o=Ut(r,e,e[13],Jh),u=o||j2();return{key:t,first:null,c(){n=v("svelte-virtual-list-row"),u&&u.c(),i=Q(),ao(n,"class","svelte-1tqh76q"),this.first=n},m(s,a){A(s,n,a),u&&u.m(n,null),S(n,i),l=!0},p(s,a){e=s,o&&o.p&&(!l||a&8208)&&zt(o,r,e,e[13],l?Ht(r,e[13],a,z2):jt(e[13]),Jh)},i(s){l||(U(u,s),l=!0)},o(s){Z(u,s),l=!1},d(s){s&&C(n),u&&u.d(s)}}}function q2(t){let e,n,i=[],l=new Map,r,o,u,s,a=Ce(t[4]);const f=c=>c[23].index;for(let c=0;c<a.length;c+=1){let g=Zh(t,a,c),h=f(g);l.set(h,i[c]=xh(h,g))}return{c(){e=v("svelte-virtual-list-viewport"),n=v("svelte-virtual-list-contents");for(let c=0;c<i.length;c+=1)i[c].c();P(n,"padding-top",t[5]+"px"),P(n,"padding-bottom",t[6]+"px"),ao(n,"class","svelte-1tqh76q"),P(e,"height",t[0]),ao(e,"class","svelte-1tqh76q"),ni(()=>t[17].call(e))},m(c,g){A(c,e,g),S(e,n);for(let h=0;h<i.length;h+=1)i[h]&&i[h].m(n,null);t[15](n),t[16](e),r=fo(e,t[17].bind(e)),o=!0,u||(s=B(e,"scroll",t[7]),u=!0)},p(c,[g]){g&8208&&(a=Ce(c[4]),He(),i=Tt(i,g,f,1,c,a,l,n,Di,xh,null,Zh),ze()),(!o||g&32)&&P(n,"padding-top",c[5]+"px"),(!o||g&64)&&P(n,"padding-bottom",c[6]+"px"),(!o||g&1)&&P(e,"height",c[0])},i(c){if(!o){for(let g=0;g<a.length;g+=1)U(i[g]);o=!0}},o(c){for(let g=0;g<i.length;g+=1)Z(i[g]);o=!1},d(c){c&&C(e);for(let g=0;g<i.length;g+=1)i[g].d();t[15](null),t[16](null),r(),u=!1,s()}}}function W2(t,e,n){let{$$slots:i={},$$scope:l}=e,{items:r}=e,{height:o="100%"}=e,{itemHeight:u=void 0}=e,{start:s=0}=e,{end:a=0}=e,f=[],c,g,h,d=0,_,b,w=0,E=0,k;async function I(V,W,ne){const{scrollTop:H}=g;await le.tick();let $=w-H,Y=s;for(;$<W&&Y<V.length;){let oe=c[Y-s];oe||(n(9,a=Y+1),await le.tick(),oe=c[Y-s]);const ie=f[Y]=ne||oe.offsetHeight;$+=ie,Y+=1}n(9,a=Y);const G=V.length-a;k=(w+$)/a,n(6,E=G*k),f.length=V.length}async function O(){const{scrollTop:V}=g,W=s;for(let Y=0;Y<c.length;Y+=1)f[s+Y]=u||c[Y].offsetHeight;let ne=0,H=0;for(;ne<r.length;){const Y=f[ne]||k;if(H+Y>V){n(8,s=ne),n(5,w=H);break}H+=Y,ne+=1}for(;ne<r.length&&(H+=f[ne]||k,ne+=1,!(H>V+d)););n(9,a=ne);const $=r.length-a;for(k=H/a;ne<r.length;)f[ne++]=k;if(n(6,E=$*k),s<W){await le.tick();let Y=0,G=0;for(let ie=s;ie<W;ie+=1)c[ie-s]&&(Y+=f[ie],G+=u||c[ie-s].offsetHeight);const oe=G-Y;g.scrollTo(0,V+oe)}}le.onMount(()=>{c=h.getElementsByTagName("svelte-virtual-list-row"),n(12,b=!0)});function D(V){Be[V?"unshift":"push"](()=>{h=V,n(3,h)})}function N(V){Be[V?"unshift":"push"](()=>{g=V,n(2,g)})}function M(){d=this.offsetHeight,n(1,d)}return t.$$set=V=>{"items"in V&&n(10,r=V.items),"height"in V&&n(0,o=V.height),"itemHeight"in V&&n(11,u=V.itemHeight),"start"in V&&n(8,s=V.start),"end"in V&&n(9,a=V.end),"$$scope"in V&&n(13,l=V.$$scope)},t.$$.update=()=>{t.$$.dirty&1792&&n(4,_=r.slice(s,a).map((V,W)=>({index:W+s,data:V}))),t.$$.dirty&7170&&b&&I(r,d,u)},[o,d,g,h,_,w,E,O,s,a,r,u,b,l,i,D,N,M]}class G2 extends Ze{constructor(e){super(),Qe(this,e,W2,q2,Ye,{items:10,height:0,itemHeight:11,start:8,end:9})}}function $h(t,e,n){const i=t.slice();return i[36]=e[n],i}function e1(t,e,n){const i=t.slice();return i[39]=e[n],i}function Y2(t){let e;return{c(){e=v("div"),e.innerHTML='<i class="ph ph-image"></i>',m(e,"class","empty-state svelte-1wt5me1")},m(n,i){A(n,e,i)},p:ue,d(n){n&&C(e)}}}function K2(t){let e,n;return{c(){e=v("i"),m(e,"class",n="ph ph-"+t[10]+" svelte-1wt5me1")},m(i,l){A(i,e,l)},p(i,l){l[0]&1024&&n!==(n="ph ph-"+i[10]+" svelte-1wt5me1")&&m(e,"class",n)},d(i){i&&C(e)}}}function t1(t){let e,n=Ce(t[5]),i=[];for(let l=0;l<n.length;l+=1)i[l]=n1(e1(t,n,l));return{c(){e=v("div");for(let l=0;l<i.length;l+=1)i[l].c();m(e,"class","category-tabs svelte-1wt5me1")},m(l,r){A(l,e,r);for(let o=0;o<i.length;o+=1)i[o]&&i[o].m(e,null)},p(l,r){if(r[0]&48){n=Ce(l[5]);let o;for(o=0;o<n.length;o+=1){const u=e1(l,n,o);i[o]?i[o].p(u,r):(i[o]=n1(u),i[o].c(),i[o].m(e,null))}for(;o<i.length;o+=1)i[o].d(1);i.length=n.length}},d(l){l&&C(e),St(i,l)}}}function n1(t){let e,n=t[39].label+"",i,l,r,o,u;function s(){return t[23](t[39])}return{c(){e=v("button"),i=Ee(n),l=Q(),m(e,"aria-label",r=`Show ${t[39].label} icons`),m(e,"class","svelte-1wt5me1"),p(e,"selected",t[4]===t[39].id)},m(a,f){A(a,e,f),S(e,i),S(e,l),o||(u=B(e,"click",s),o=!0)},p(a,f){t=a,f[0]&32&&n!==(n=t[39].label+"")&&Pe(i,n),f[0]&32&&r!==(r=`Show ${t[39].label} icons`)&&m(e,"aria-label",r),f[0]&48&&p(e,"selected",t[4]===t[39].id)},d(a){a&&C(e),o=!1,u()}}}function i1(t){let e,n,i;return{c(){e=v("button"),e.innerHTML='<i class="ph ph-x"></i>',m(e,"class","clear-search svelte-1wt5me1"),m(e,"aria-label","Clear search")},m(l,r){A(l,e,r),n||(i=B(e,"click",t[25]),n=!0)},p:ue,d(l){l&&C(e),n=!1,i()}}}function X2(t){let e;return{c(){e=v("div"),e.innerHTML='<i class="ph ph-magnifying-glass svelte-1wt5me1"></i> <p>No icons found</p>',m(e,"class","no-results svelte-1wt5me1")},m(n,i){A(n,e,i)},p:ue,i:ue,o:ue,d(n){n&&C(e)}}}function Q2(t){let e,n;return e=new G2({props:{items:t[11],itemHeight:t[14],height:t[12],width:"100%",$$slots:{default:[Z2,({item:i,index:l,style:r})=>({33:i,34:l,35:r}),({item:i,index:l,style:r})=>[0,(i?4:0)|(l?8:0)|(r?16:0)]]},$$scope:{ctx:t}}}),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l[0]&2048&&(r.items=i[11]),l[0]&4096&&(r.height=i[12]),l[0]&1536|l[1]&2068&&(r.$$scope={dirty:l,ctx:i}),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function l1(t){let e,n,i,l,r,o,u;function s(){return t[26](t[36])}function a(...c){return t[27](t[36],...c)}function f(){return t[28](t[36])}return{c(){e=v("button"),n=v("i"),l=Q(),m(n,"class",i="ph ph-"+t[36]+" svelte-1wt5me1"),m(e,"class","icon-button svelte-1wt5me1"),m(e,"aria-label",r=`Select ${t[36]} icon`),m(e,"tabindex","0"),p(e,"selected",t[10]===t[36])},m(c,g){A(c,e,g),S(e,n),S(e,l),o||(u=[B(e,"click",s),B(e,"keydown",a),B(e,"mouseenter",f),B(e,"mouseleave",t[29])],o=!0)},p(c,g){t=c,g[1]&4&&i!==(i="ph ph-"+t[36]+" svelte-1wt5me1")&&m(n,"class",i),g[1]&4&&r!==(r=`Select ${t[36]} icon`)&&m(e,"aria-label",r),g[0]&1024|g[1]&4&&p(e,"selected",t[10]===t[36])},d(c){c&&C(e),o=!1,Ve(u)}}}function Z2(t){let e,n,i=Ce(t[33]),l=[];for(let r=0;r<i.length;r+=1)l[r]=l1($h(t,i,r));return{c(){e=v("div");for(let r=0;r<l.length;r+=1)l[r].c();m(e,"class","icons-row svelte-1wt5me1"),m(e,"style",n=t[35])},m(r,o){A(r,e,o);for(let u=0;u<l.length;u+=1)l[u]&&l[u].m(e,null)},p(r,o){if(o[0]&460288|o[1]&4){i=Ce(r[33]);let u;for(u=0;u<i.length;u+=1){const s=$h(r,i,u);l[u]?l[u].p(s,o):(l[u]=l1(s),l[u].c(),l[u].m(e,null))}for(;u<l.length;u+=1)l[u].d(1);l.length=i.length}o[1]&16&&n!==(n=r[35])&&m(e,"style",n)},d(r){r&&C(e),St(l,r)}}}function r1(t){let e,n,i;return{c(){e=v("button"),e.innerHTML='<i class="ph ph-x"></i> Clear',m(e,"class","clear-button svelte-1wt5me1")},m(l,r){A(l,e,r),n||(i=B(e,"click",t[19]),n=!0)},p:ue,d(l){l&&C(e),n=!1,i()}}}function J2(t){let e,n,i,l,r,o,u,s,a,f,c,g,h,d,_,b,w,E=t[1].showCategories&&t1(t),k=t[3]&&i1(t);const I=[Q2,X2],O=[];function D(M,V){return M[11].length>0?0:1}c=D(t),g=O[c]=I[c](t);let N=t[0]&&r1(t);return{c(){e=v("div"),n=v("div"),E&&E.c(),i=Q(),l=v("div"),r=v("i"),o=Q(),u=v("input"),s=Q(),k&&k.c(),a=Q(),f=v("div"),g.c(),h=Q(),d=v("div"),N&&N.c(),m(r,"class","ph ph-magnifying-glass search-icon svelte-1wt5me1"),m(u,"type","text"),m(u,"placeholder","Search icons..."),m(u,"class","search-input svelte-1wt5me1"),m(u,"aria-label","Search icons"),m(l,"class","search-container svelte-1wt5me1"),m(n,"class","header svelte-1wt5me1"),m(f,"class","icons-grid-container svelte-1wt5me1"),m(d,"class","footer svelte-1wt5me1"),m(e,"class","icon-picker svelte-1wt5me1"),P(e,"--icon-size",ty),P(e,"--icon-padding",o1),P(e,"--items-per-row",t[6]),P(e,"--row-height",t[15]),p(e,"with-categories",t[1].showCategories)},m(M,V){A(M,e,V),S(e,n),E&&E.m(n,null),S(n,i),S(n,l),S(l,r),S(l,o),S(l,u),Zt(u,t[3]),S(l,s),k&&k.m(l,null),S(e,a),S(e,f),O[c].m(f,null),S(e,h),S(e,d),N&&N.m(d,null),_=!0,b||(w=B(u,"input",t[24]),b=!0)},p(M,V){M[1].showCategories?E?E.p(M,V):(E=t1(M),E.c(),E.m(n,i)):E&&(E.d(1),E=null),V[0]&8&&u.value!==M[3]&&Zt(u,M[3]),M[3]?k?k.p(M,V):(k=i1(M),k.c(),k.m(l,null)):k&&(k.d(1),k=null);let W=c;c=D(M),c===W?O[c].p(M,V):(He(),Z(O[W],1,1,()=>{O[W]=null}),ze(),g=O[c],g?g.p(M,V):(g=O[c]=I[c](M),g.c()),U(g,1),g.m(f,null)),M[0]?N?N.p(M,V):(N=r1(M),N.c(),N.m(d,null)):N&&(N.d(1),N=null),(!_||V[0]&64)&&P(e,"--items-per-row",M[6]),(!_||V[0]&2)&&p(e,"with-categories",M[1].showCategories)},i(M){_||(U(g),_=!0)},o(M){Z(g),_=!1},d(M){M&&C(e),E&&E.d(),k&&k.d(),O[c].d(),N&&N.d(),b=!1,w()}}}function x2(t){let e,n,i,l,r,o,u;function s(c,g){return c[0]?K2:Y2}let a=s(t),f=a(t);return l=new wn({props:{open:t[7],anchor:t[8],align:t[2],$$slots:{default:[J2]},$$scope:{ctx:t}}}),l.$on("close",t[30]),{c(){e=v("div"),f.c(),i=Q(),We(l.$$.fragment),m(e,"class","preview-icon svelte-1wt5me1"),m(e,"tabindex",n=t[13]?-1:0),m(e,"role","button"),m(e,"aria-haspopup","dialog"),m(e,"aria-expanded",t[7]),m(e,"aria-label","Select icon"),p(e,"readonly",t[13])},m(c,g){A(c,e,g),f.m(e,null),t[20](e),A(c,i,g),je(l,c,g),r=!0,o||(u=[B(e,"click",function(){Ge(t[13]?null:t[21])&&(t[13]?null:t[21]).apply(this,arguments)}),B(e,"keydown",t[22])],o=!0)},p(c,g){t=c,a===(a=s(t))&&f?f.p(t,g):(f.d(1),f=a(t),f&&(f.c(),f.m(e,null))),(!r||g[0]&8192&&n!==(n=t[13]?-1:0))&&m(e,"tabindex",n),(!r||g[0]&128)&&m(e,"aria-expanded",t[7]),(!r||g[0]&8192)&&p(e,"readonly",t[13]);const h={};g[0]&128&&(h.open=t[7]),g[0]&256&&(h.anchor=t[8]),g[0]&4&&(h.align=t[2]),g[0]&7803|g[1]&2048&&(h.$$scope={dirty:g,ctx:t}),l.$set(h)},i(c){r||(U(l.$$.fragment,c),r=!0)},o(c){Z(l.$$.fragment,c),r=!1},d(c){c&&(C(e),C(i)),f.d(),t[20](null),qe(l,c),o=!1,Ve(u)}}}const rs=32,$2=8,ey=8,ty=24,o1=4;function ny(t,e,n){let i,l,r,o,{value:u}=e,{cellOptions:s={}}=e,{align:a="left"}=e,f=!1,c,g="",h="all",d="";const _=le.createEventDispatcher();let b="";const w=rs,E=rs+o1*2;let k=[];function I(j,K,x,X){const F=i.find(me=>me.id===x);if(!F)return[];let R=[...F.icons];if(X){const me=X.toLowerCase();R=R.filter(se=>se.replace(/-line|-fill$/,"").toLowerCase().includes(me))}const z=[];for(let me=0;me<R.length;me+=K)z.push(R.slice(me,me+K));return z}const O=j=>{const K=j,x=K===u?"":K;n(0,u=x),_("change",x),n(7,f=!1)};function D(j){n(9,d=`ph ph-${j}`)}const N=(j,K)=>{(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),O(K))},M=()=>{n(0,u=""),_("change",null),n(9,d=null)};function V(j){Be[j?"unshift":"push"](()=>{c=j,n(8,c)})}const W=()=>{n(7,f=!f)},ne=j=>{(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),l||n(7,f=!f))},H=j=>n(4,h=j.id);function $(){g=this.value,n(3,g)}const Y=()=>n(3,g=""),G=j=>O(j),oe=(j,K)=>N(K,j),ie=j=>D(j),J=()=>n(9,d=""),q=()=>n(7,f=!1);return t.$$set=j=>{"value"in j&&n(0,u=j.value),"cellOptions"in j&&n(1,s=j.cellOptions),"align"in j&&n(2,a=j.align)},t.$$.update=()=>{if(t.$$.dirty[0]&48&&i.length>0&&!h&&n(4,h="all"),t.$$.dirty[0]&2&&n(13,l=(s==null?void 0:s.readonly)||(s==null?void 0:s.disabled)),t.$$.dirty[0]&1)if(u){let j=u.startsWith("ph-")?u.slice(3):u;n(10,b=j)}else n(10,b="");t.$$.dirty[0]&2&&n(6,r=s!=null&&s.showCategories?9:6),t.$$.dirty[0]&89&&n(11,k=I(u,r,h,g))},n(5,i=Object.entries(U2).map(([j,K])=>({id:j,label:K,icons:H2[j]||[]}))),n(12,o=rs*$2+ey*2),[u,s,a,g,h,i,r,f,c,d,b,k,o,l,w,E,O,D,N,M,V,W,ne,H,$,Y,G,oe,ie,J,q]}class iy extends Ze{constructor(e){super(),Qe(this,e,ny,x2,Ye,{value:0,cellOptions:1,align:2},null,[-1,-1])}}function s1(t,e,n){const i=t.slice();return i[55]=e[n],i[66]=e,i[57]=n,i}function u1(t,e,n){const i=t.slice();return i[55]=e[n],i[67]=e,i[57]=n,i}function a1(t,e,n){const i=t.slice();return i[55]=e[n],i[56]=e,i[57]=n,i}function f1(t,e,n){const i=t.slice();return i[58]=e[n],i}function c1(t,e,n){const i=t.slice();return i[55]=e[n],i[61]=e,i[57]=n,i}function d1(t,e,n){const i=t.slice();return i[58]=e[n],i}function h1(t,e,n){const i=t.slice();return i[58]=e[n],i}function ly(t){let e,n=[],i=new Map,l,r=Ce(t[4]);const o=f=>f[55][f[12]];for(let f=0;f<r.length;f+=1){let c=u1(t,r,f),g=o(c);i.set(g,n[f]=g1(g,c))}function u(f,c){var g;return f[5]&&f[5].loaded?uy:(g=f[5])!=null&&g.loading&&!f[5].loaded?sy:oy}let s=u(t),a=s(t);return{c(){e=v("div");for(let f=0;f<n.length;f+=1)n[f].c();l=Q(),a.c(),m(e,"class","options svelte-azp8h9")},m(f,c){A(f,e,c);for(let g=0;g<n.length;g+=1)n[g]&&n[g].m(e,null);S(e,l),a.m(e,null)},p(f,c){c[0]&25622&&(r=Ce(f[4]),n=Tt(n,c,o,1,f,r,i,e,nn,g1,l,u1)),s===(s=u(f))&&a?a.p(f,c):(a.d(1),a=s(f),a&&(a.c(),a.m(e,null)))},d(f){f&&C(e);for(let c=0;c<n.length;c+=1)n[c].d();a.d()}}}function ry(t){let e,n,i,l,r,o=[],u=new Map,s,a,f,c,g=Ce(t[0]),h=[];for(let I=0;I<g.length;I+=1)h[I]=w1(h1(t,g,I));let d=Ce(t[4]);const _=I=>I[55][I[12]];for(let I=0;I<d.length;I+=1){let O=c1(t,d,I),D=_(O);u.set(D,o[I]=y1(D,O))}let b=t[5]&&t[5].loaded&&E1(t);function w(I,O){var D,N,M,V,W;if((D=I[5])!=null&&D.loading)return cy;if((N=I[5])!=null&&N.loading&&!I[5].loaded)return fy;if(!((M=I[5])!=null&&M.loading)&&((V=I[5])!=null&&V.loaded)&&!((W=I[5].rows)!=null&&W.length))return ay}let E=w(t),k=E&&E(t);return{c(){e=v("div"),n=v("div");for(let I=0;I<h.length;I+=1)h[I].c();i=Q(),l=v("div"),r=Q();for(let I=0;I<o.length;I+=1)o[I].c();s=Q(),b&&b.c(),a=Q(),k&&k.c(),m(l,"class","header-cell check svelte-azp8h9"),m(n,"class","header-row svelte-azp8h9"),m(e,"class","grid-container svelte-azp8h9"),P(e,"--num-cols",t[9])},m(I,O){A(I,e,O),S(e,n);for(let D=0;D<h.length;D+=1)h[D]&&h[D].m(n,null);S(n,i),S(n,l),S(e,r);for(let D=0;D<o.length;D+=1)o[D]&&o[D].m(e,null);S(e,s),b&&b.m(e,null),S(e,a),k&&k.m(e,null),f||(c=B(e,"scroll",t[16]),f=!0)},p(I,O){if(O[0]&1){g=Ce(I[0]);let D;for(D=0;D<g.length;D+=1){const N=h1(I,g,D);h[D]?h[D].p(N,O):(h[D]=w1(N),h[D].c(),h[D].m(n,i))}for(;D<h.length;D+=1)h[D].d(1);h.length=g.length}O[0]&24599&&(d=Ce(I[4]),o=Tt(o,O,_,1,I,d,u,e,nn,y1,s,c1)),I[5]&&I[5].loaded?b?b.p(I,O):(b=E1(I),b.c(),b.m(e,a)):b&&(b.d(1),b=null),E!==(E=w(I))&&(k&&k.d(1),k=E&&E(I),k&&(k.c(),k.m(e,null))),O[0]&512&&P(e,"--num-cols",I[9])},d(I){I&&C(e),St(h,I);for(let O=0;O<o.length;O+=1)o[O].d();b&&b.d(),k&&k.d(),f=!1,c()}}}function g1(t,e){let n,i=(e[55].primaryDisplay||e[55][e[10]])+"",l,r,o,u=e[57],s,a;const f=()=>e[39](n,u),c=()=>e[39](null,u);function g(){return e[40](e[57])}function h(){return e[42](e[55])}return{key:t,first:null,c(){n=v("div"),l=Ee(i),r=Q(),o=v("i"),m(o,"class","ri-check-line"),m(n,"class","option svelte-azp8h9"),p(n,"selected",e[13](e[55])),p(n,"highlighted",e[1]==e[57]),this.first=n},m(d,_){A(d,n,_),S(n,l),S(n,r),S(n,o),f(),s||(a=[B(n,"mouseenter",g),B(n,"mouseleave",e[41]),B(n,"mousedown",Qt(Et(h)))],s=!0)},p(d,_){e=d,_[0]&1040&&i!==(i=(e[55].primaryDisplay||e[55][e[10]])+"")&&Pe(l,i),u!==e[57]&&(c(),u=e[57],f()),_[0]&8208&&p(n,"selected",e[13](e[55])),_[0]&18&&p(n,"highlighted",e[1]==e[57])},d(d){d&&C(n),c(),s=!1,Ve(a)}}}function oy(t){let e;return{c(){e=v("div"),e.textContent="No Results Found",m(e,"class","option svelte-azp8h9")},m(n,i){A(n,e,i)},p:ue,d(n){n&&C(e)}}}function sy(t){let e;return{c(){e=v("div"),e.innerHTML=`<i class="ri-loader-2-line rotating"></i>
|
|
19
|
-
|
|
20
|
-
Loading more...`,m(e,"class","option loading svelte-azp8h9")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function w1(t){let e,n=t[58].displayName+"",i;return{c(){e=v("div"),i=Ee(n),m(e,"class","header-cell svelte-azp8h9")},m(l,r){A(l,e,r),S(e,i)},p(l,r){r[0]&1&&n!==(n=l[58].displayName+"")&&Pe(i,n)},d(l){l&&C(e)}}}function k1(t){let e,n=(t[55][t[58].name]||"")+"",i;return{c(){e=v("div"),i=Ee(n),m(e,"class","data-cell svelte-azp8h9")},m(l,r){A(l,e,r),S(e,i)},p(l,r){r[0]&17&&n!==(n=(l[55][l[58].name]||"")+"")&&Pe(i,n)},d(l){l&&C(e)}}}function y1(t,e){let n,i,l,r=e[57],o,u,s=Ce(e[0]),a=[];for(let d=0;d<s.length;d+=1)a[d]=k1(d1(e,s,d));const f=()=>e[31](n,r),c=()=>e[31](null,r);function g(){return e[32](e[57])}function h(){return e[34](e[55])}return{key:t,first:null,c(){n=v("div");for(let d=0;d<a.length;d+=1)a[d].c();i=Q(),l=v("div"),l.innerHTML='<i class="ri-check-line svelte-azp8h9"></i>',m(l,"class","data-cell check svelte-azp8h9"),m(n,"class","data-row svelte-azp8h9"),p(n,"selected",e[13](e[55])),p(n,"highlighted",e[1]==e[57]),this.first=n},m(d,_){A(d,n,_);for(let b=0;b<a.length;b+=1)a[b]&&a[b].m(n,null);S(n,i),S(n,l),f(),o||(u=[B(n,"mouseenter",g),B(n,"mouseleave",e[33]),B(n,"mousedown",Et(h))],o=!0)},p(d,_){if(e=d,_[0]&17){s=Ce(e[0]);let b;for(b=0;b<s.length;b+=1){const w=d1(e,s,b);a[b]?a[b].p(w,_):(a[b]=k1(w),a[b].c(),a[b].m(n,i))}for(;b<a.length;b+=1)a[b].d(1);a.length=s.length}r!==e[57]&&(c(),r=e[57],f()),_[0]&8208&&p(n,"selected",e[13](e[55])),_[0]&18&&p(n,"highlighted",e[1]==e[57])},d(d){d&&C(n),St(a,d),c(),o=!1,Ve(u)}}}function E1(t){let e=t[4].length,n,i=A1(t);return{c(){i.c(),n=Fe()},m(l,r){i.m(l,r),A(l,n,r)},p(l,r){r[0]&16&&Ye(e,e=l[4].length)?(i.d(1),i=A1(l),i.c(),i.m(n.parentNode,n)):i.p(l,r)},d(l){l&&C(n),i.d(l)}}}function v1(t){let e,n,i,l,r=t[57],o,u,s=Ce(t[0]),a=[];for(let d=0;d<s.length;d+=1)a[d]=S1(f1(t,s,d));const f=()=>t[35](e,r),c=()=>t[35](null,r);function g(){return t[36](t[57])}function h(){return t[38](t[55])}return{c(){e=v("div");for(let d=0;d<a.length;d+=1)a[d].c();n=Q(),i=v("div"),i.innerHTML='<i class="ri-check-line svelte-azp8h9"></i>',l=Q(),m(i,"class","data-cell check svelte-azp8h9"),m(e,"class","data-row svelte-azp8h9"),p(e,"highlighted",t[1]==t[57]+t[4].length)},m(d,_){A(d,e,_);for(let b=0;b<a.length;b+=1)a[b]&&a[b].m(e,null);S(e,n),S(e,i),S(e,l),f(),o||(u=[B(e,"mouseenter",g),B(e,"mouseleave",t[37]),B(e,"mousedown",Et(h))],o=!0)},p(d,_){if(t=d,_[0]&33){s=Ce(t[0]);let b;for(b=0;b<s.length;b+=1){const w=f1(t,s,b);a[b]?a[b].p(w,_):(a[b]=S1(w),a[b].c(),a[b].m(e,n))}for(;b<a.length;b+=1)a[b].d(1);a.length=s.length}r!==t[57]&&(c(),r=t[57],f()),_[0]&50&&p(e,"highlighted",t[1]==t[57]+t[4].length)},d(d){d&&C(e),St(a,d),c(),o=!1,Ve(u)}}}function S1(t){let e,n=(t[55][t[58].name]||"")+"",i;return{c(){e=v("div"),i=Ee(n),m(e,"class","data-cell svelte-azp8h9")},m(l,r){A(l,e,r),S(e,i)},p(l,r){r[0]&33&&n!==(n=(l[55][l[58].name]||"")+"")&&Pe(i,n)},d(l){l&&C(e)}}}function C1(t,e){let n,i=!e[13](e[55]),l,r=i&&v1(e);return{key:t,first:null,c(){n=Fe(),r&&r.c(),l=Fe(),this.first=n},m(o,u){A(o,n,u),r&&r.m(o,u),A(o,l,u)},p(o,u){e=o,u[0]&32&&(i=!e[13](e[55])),i?r?r.p(e,u):(r=v1(e),r.c(),r.m(l.parentNode,l)):r&&(r.d(1),r=null)},d(o){o&&(C(n),C(l)),r&&r.d(o)}}}function A1(t){let e=[],n=new Map,i,l=Ce(t[5].rows);const r=o=>o[55][o[12]];for(let o=0;o<l.length;o+=1){let u=a1(t,l,o),s=r(u);n.set(s,e[o]=C1(s,u))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();i=Fe()},m(o,u){for(let s=0;s<e.length;s+=1)e[s]&&e[s].m(o,u);A(o,i,u)},p(o,u){u[0]&24631&&(l=Ce(o[5].rows),e=Tt(e,u,r,1,o,l,n,i.parentNode,nn,C1,i,a1))},d(o){o&&C(i);for(let u=0;u<e.length;u+=1)e[u].d(o)}}}function ay(t){let e;return{c(){e=v("div"),e.innerHTML='<div class="data-cell svelte-azp8h9" style="grid-column: 1 / -1;">No Results Found</div>',m(e,"class","data-row svelte-azp8h9")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function fy(t){let e;return{c(){e=v("div"),e.innerHTML='<div class="data-cell svelte-azp8h9" style="grid-column: 1 / -1;"><i class="ri-loader-2-line rotating svelte-azp8h9"></i> Loading...</div>',m(e,"class","data-row loading svelte-azp8h9")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function cy(t){let e;return{c(){e=v("div"),e.innerHTML='<div class="data-cell svelte-azp8h9" style="grid-column: 1 / -1;"><i class="ri-loader-2-line rotating svelte-azp8h9"></i> Loading more...</div>',m(e,"class","data-row loading svelte-azp8h9")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function dy(t){let e,n,i,l,r,o,u,s,a,f,c,g;function h(b,w){return b[0]&&b[0].length>1?ry:ly}let d=h(t),_=d(t);return{c(){var b,w,E,k,I;e=v("div"),n=v("div"),i=v("i"),r=Q(),o=v("input"),s=Q(),a=v("div"),f=v("div"),_.c(),m(i,"class",l=(b=t[5])!=null&&b.loading&&Jr?"ri-loader-2-line":(w=t[6])!=null&&w.value?"ri-filter-fill":"ri-search-line"),P(i,"color",t[7]?"var(--spectrum-global-color-blue-400)":"var(--spectrum-global-color-gray-700)"),m(o,"class","search"),m(o,"type","text"),m(o,"placeholder",u=(E=t[5])!=null&&E.loading&&!((I=(k=t[5])==null?void 0:k.rows)!=null&&I.length)&&Jr?"Loading...":"Search"),p(o,"placeholder",!t[7]),m(n,"class","searchControl svelte-azp8h9"),m(f,"class","list svelte-azp8h9"),p(f,"table-mode",t[0]&&t[0].length>0),m(a,"class","listWrapper svelte-azp8h9"),m(e,"class","control svelte-azp8h9")},m(b,w){A(b,e,w),S(e,n),S(n,i),S(n,r),S(n,o),t[29](o),S(e,s),S(e,a),S(a,f),_.m(f,null),t[47](f),c||(g=[B(o,"input",t[15]),B(o,"keydown",t[17]),B(o,"blur",t[30]),B(f,"scroll",t[16]),B(a,"mousedown",Et(hy))],c=!0)},p(b,w){var E,k,I,O,D;w[0]&96&&l!==(l=(E=b[5])!=null&&E.loading&&Jr?"ri-loader-2-line":(k=b[6])!=null&&k.value?"ri-filter-fill":"ri-search-line")&&m(i,"class",l),w[0]&128&&P(i,"color",b[7]?"var(--spectrum-global-color-blue-400)":"var(--spectrum-global-color-gray-700)"),w[0]&32&&u!==(u=(I=b[5])!=null&&I.loading&&!((D=(O=b[5])==null?void 0:O.rows)!=null&&D.length)&&Jr?"Loading...":"Search")&&m(o,"placeholder",u),w[0]&128&&p(o,"placeholder",!b[7]),d===(d=h(b))&&_?_.p(b,w):(_.d(1),_=d(b),_&&(_.c(),_.m(f,null))),w[0]&1&&p(f,"table-mode",b[0]&&b[0].length>0)},i:ue,o:ue,d(b){b&&C(e),t[29](null),_.d(),t[47](null),c=!1,Ve(g)}}}let os=15,Jr=!0;const hy=()=>{};function gy(t,e,n){let i,l,r,o,u,s,a,f,c=ue,g=()=>(c(),c=ft(Y,ke=>n(5,f=ke)),Y);t.$$.on_destroy.push(()=>c());const{API:h,fetchData:d,QueryUtils:_}=le.getContext("sdk"),b=le.createEventDispatcher();let{value:w=[]}=e,{fieldSchema:E}=e,{filter:k=[]}=e,{relatedColumns:I=(E==null?void 0:E.relatedColumns)||[]}=e,{multi:O=!1}=e,D=E.tableId,N=(E==null?void 0:E.relatedField)||"id",M=-1,V,W,ne,H=!0,$=[],Y,G,oe=os;const ie=(ke,ce)=>{var Ae,Ue;if(!Object.keys(ce).length)return ke;const re={[Ol.LogicalOperator.AND]:{conditions:[...ke?[ke]:[],...Object.values(ce||{})]},onEmptyFilter:Ol.EmptyFilterOption.RETURN_NONE};return(((Ue=(Ae=re[Ol.LogicalOperator.AND])==null?void 0:Ae.conditions)==null?void 0:Ue.length)??0)>0?re:{}},J=ke=>{if(w)return w.find(re=>re[N]==ke[N])},q=ke=>{var Ae;const ce=I&&I.length>0?ke[I[0].name]:ke[u],re={[N]:ke[N],primaryDisplay:ce};if(!O)((Ae=i[0])==null?void 0:Ae[N])==ke[N]?n(4,i=[]):n(4,i=[re]);else{let Ue=i.findIndex(Je=>Je[N]==ke[N]);Ue>-1?(i.splice(Ue,1),n(4,i),n(18,w)):(i.push(re),n(4,i),n(18,w))}b("change",i)},j=ke=>{n(7,W=ke.target.value),ke.target.value?n(23,G=[{field:u,type:"string",operator:"fuzzy",value:ke.target.value,valueType:"Value"}]):n(23,G=void 0),n(24,oe=os)},K=()=>{f!=null&&f.loading||!H||n(24,oe+=100)},x=ke=>{const ce=ke.target,re=ce.scrollTop,Ae=ce.scrollHeight,Ue=ce.clientHeight;re+Ue>=Ae-50&&K()},X=ke=>{if(ke.key=="ArrowDown")ke.preventDefault(),n(1,M+=1),M>s-1&&n(1,M=0);else if(ke.key=="ArrowUp")ke.preventDefault(),n(1,M-=1),M<0&&n(1,M=s-1);else if(ke.key=="Enter"&&M>-1){const ce=M<i.length?i[M]:f.rows[M-i.length];q(ce)}(ke.key=="Tab"||ke.key=="Escape")&&b("close")},F={focus:()=>{V==null||V.focus()},hasFocus:()=>document.activeElement===V,setSearch:ke=>{n(7,W=ke),V==null||V.focus()},focusList:()=>{ne==null||ne.focus()}};function R(ke){Be[ke?"unshift":"push"](()=>{V=ke,n(6,V)})}const z=()=>b("close");function me(ke,ce){Be[ke?"unshift":"push"](()=>{$[ce]=ke,n(2,$)})}const se=ke=>n(1,M=ke),Oe=()=>n(1,M=-1),be=ke=>q(ke);function Ie(ke,ce){Be[ke?"unshift":"push"](()=>{$[ce+i.length]=ke,n(2,$)})}const ve=ke=>n(1,M=ke+i.length),fe=()=>n(1,M=-1),Ne=ke=>q(ke);function te(ke,ce){Be[ke?"unshift":"push"](()=>{$[ce]=ke,n(2,$)})}const ae=ke=>n(1,M=ke),de=()=>n(1,M=-1),Xe=ke=>q(ke);function Te(ke,ce){Be[ke?"unshift":"push"](()=>{$[ce+i.length]=ke,n(2,$)})}const Se=ke=>n(1,M=ke+i.length),Le=()=>n(1,M=-1),rt=ke=>q(ke);function kt(ke){Be[ke?"unshift":"push"](()=>{ne=ke,n(8,ne)})}return t.$$set=ke=>{"value"in ke&&n(18,w=ke.value),"fieldSchema"in ke&&n(19,E=ke.fieldSchema),"filter"in ke&&n(20,k=ke.filter),"relatedColumns"in ke&&n(0,I=ke.relatedColumns),"multi"in ke&&n(21,O=ke.multi)},t.$$.update=()=>{var ke,ce;t.$$.dirty[0]&262144&&n(4,i=Array.isArray(w)?w:[]),t.$$.dirty[0]&1048576&&n(27,l=_.buildQuery(k)),t.$$.dirty[0]&8388608&&n(28,r=G?{search:_.buildQuery(G)}:{}),t.$$.dirty[0]&402653184&&n(26,o=ie(l,r)),t.$$.dirty[0]&134217728&&g(n(3,Y=d({API:h,datasource:{type:"table",tableId:D},options:{query:l,limit:os}}))),t.$$.dirty[0]&83886088&&(Y==null||Y.update({query:o,limit:oe})),t.$$.dirty[0]&32&&n(10,u=((ke=f==null?void 0:f.definition)==null?void 0:ke.primaryDisplay)||"id"),t.$$.dirty[0]&16777248&&f!=null&&f.loaded&&(H=f.rows.length>=oe),t.$$.dirty[0]&48&&n(25,s=i.length+(((ce=f==null?void 0:f.rows)==null?void 0:ce.length)||0)),t.$$.dirty[0]&33554434&&n(1,M=Math.min(M,s-1)),t.$$.dirty[0]&6&&M>=0&&$[M]&&le.tick().then(()=>{$[M].scrollIntoView({block:"nearest"})}),t.$$.dirty[0]&1&&n(9,a=I.length)},[I,M,$,Y,i,f,V,W,ne,a,u,b,N,J,q,j,x,X,w,E,k,O,F,G,oe,s,o,l,r,R,z,me,se,Oe,be,Ie,ve,fe,Ne,te,ae,de,Xe,Te,Se,Le,rt,kt]}class my extends Ze{constructor(e){super(),Qe(this,e,gy,dy,Ye,{value:18,fieldSchema:19,filter:20,relatedColumns:0,multi:21,api:22},null,[-1,-1,-1])}get api(){return this.$$.ctx[22]}}function T1(t,e,n){const i=t.slice();return i[36]=e[n],i[38]=n,i}function I1(t){let e,n;return{c(){e=v("i"),m(e,"class",n=t[2].icon+" field-icon")},m(i,l){A(i,e,l)},p(i,l){l[0]&4&&n!==(n=i[2].icon+" field-icon")&&m(e,"class",n)},d(i){i&&C(e)}}}function _y(t){let e,n,i=t[7].map(N1).join(", ")+"",l,r=t[2].role=="formInput"&&t[7].length>1&&D1(t);return{c(){e=v("span"),r&&r.c(),n=Q(),l=Ee(i)},m(o,u){A(o,e,u),r&&r.m(e,null),S(e,n),S(e,l)},p(o,u){o[2].role=="formInput"&&o[7].length>1?r?r.p(o,u):(r=D1(o),r.c(),r.m(e,n)):r&&(r.d(1),r=null),u[0]&128&&i!==(i=o[7].map(N1).join(", ")+"")&&Pe(l,i)},d(o){o&&C(e),r&&r.d()}}}function py(t){let e,n,i=Ce(t[7]),l=[];for(let o=0;o<i.length;o+=1)l[o]=O1(T1(t,i,o));let r=t[7].length>5&&R1(t);return{c(){e=v("div");for(let o=0;o<l.length;o+=1)l[o].c();n=Q(),r&&r.c(),m(e,"class","items"),p(e,"pills",t[16]),p(e,"withCount",t[7].length>5),p(e,"inEdit",t[8])},m(o,u){A(o,e,u);for(let s=0;s<l.length;s+=1)l[s]&&l[s].m(e,null);S(e,n),r&&r.m(e,null)},p(o,u){if(u[0]&128){i=Ce(o[7]);let s;for(s=0;s<i.length;s+=1){const a=T1(o,i,s);l[s]?l[s].p(a,u):(l[s]=O1(a),l[s].c(),l[s].m(e,n))}for(;s<l.length;s+=1)l[s].d(1);l.length=i.length}o[7].length>5?r?r.p(o,u):(r=R1(o),r.c(),r.m(e,null)):r&&(r.d(1),r=null),u[0]&65536&&p(e,"pills",o[16]),u[0]&128&&p(e,"withCount",o[7].length>5),u[0]&256&&p(e,"inEdit",o[8])},d(o){o&&C(e),St(l,o),r&&r.d()}}}function by(t){let e,n;return{c(){e=v("span"),n=Ee(t[13])},m(i,l){A(i,e,l),S(e,n)},p(i,l){l[0]&8192&&Pe(n,i[13])},d(i){i&&C(e)}}}function D1(t){let e,n=t[7].length+"",i,l;return{c(){e=Ee("("),i=Ee(n),l=Ee(")")},m(r,o){A(r,e,o),A(r,i,o),A(r,l,o)},p(r,o){o[0]&128&&n!==(n=r[7].length+"")&&Pe(i,n)},d(r){r&&(C(e),C(i),C(l))}}}function wy(t){let e,n,i=t[36].primaryDisplay+"",l;return{c(){e=v("div"),n=v("span"),l=Ee(i),m(e,"class","item")},m(r,o){A(r,e,o),S(e,n),S(n,l)},p(r,o){o[0]&128&&i!==(i=r[36].primaryDisplay+"")&&Pe(l,i)},d(r){r&&C(e)}}}function O1(t){let e,n=t[38]<5&&wy(t);return{c(){n&&n.c(),e=Fe()},m(i,l){n&&n.m(i,l),A(i,e,l)},p(i,l){i[38]<5&&n.p(i,l)},d(i){i&&C(e),n&&n.d(i)}}}function R1(t){let e,n,i=t[7].length-5+"",l,r;return{c(){e=v("span"),n=Ee("(+ "),l=Ee(i),r=Ee(")"),m(e,"class","count")},m(o,u){A(o,e,u),S(e,n),S(e,l),S(e,r)},p(o,u){u[0]&128&&i!==(i=o[7].length-5+"")&&Pe(l,i)},d(o){o&&C(e)}}}function P1(t){let e;return{c(){e=v("i"),m(e,"class","ph ph-caret-down control-icon")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function M1(t){let e,n,i;function l(o){t[29](o)}let r={anchor:t[9],useAnchorWidth:!0,open:t[17]=="Open",$$slots:{default:[Ey]},$$scope:{ctx:t}};return t[10]!==void 0&&(r.popup=t[10]),e=new wn({props:r}),Be.push(()=>Gt(e,"popup",l)),{c(){We(e.$$.fragment)},m(o,u){je(e,o,u),i=!0},p(o,u){const s={};u[0]&512&&(s.anchor=o[9]),u[0]&131072&&(s.open=o[17]=="Open"),u[0]&2303|u[1]&256&&(s.$$scope={dirty:u,ctx:o}),!n&&u[0]&1024&&(n=!0,s.popup=o[10],Wt(()=>n=!1)),e.$set(s)},i(o){i||(U(e.$$.fragment,o),i=!0)},o(o){Z(e.$$.fragment,o),i=!1},d(o){qe(e,o)}}}function ky(t){let e,n,i;function l(o){t[27](o)}let r={fieldSchema:t[0],filter:t[3],multi:t[5],value:t[7]};return t[11]!==void 0&&(r.api=t[11]),e=new my({props:r}),Be.push(()=>Gt(e,"api",l)),e.$on("change",t[21]),e.$on("close",t[28]),{c(){We(e.$$.fragment)},m(o,u){je(e,o,u),i=!0},p(o,u){const s={};u[0]&1&&(s.fieldSchema=o[0]),u[0]&8&&(s.filter=o[3]),u[0]&32&&(s.multi=o[5]),u[0]&128&&(s.value=o[7]),!n&&u[0]&2048&&(n=!0,s.api=o[11],Wt(()=>n=!1)),e.$set(s)},i(o){i||(U(e.$$.fragment,o),i=!0)},o(o){Z(e.$$.fragment,o),i=!1},d(o){qe(e,o)}}}function yy(t){let e,n;return e=new Qr({props:{fieldSchema:t[0],filter:t[3]??[],search:t[18],limit:t[4],joinColumn:t[2].joinColumn,value:t[7],ownId:t[1],multi:t[5]}}),e.$on("change",t[21]),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l[0]&1&&(r.fieldSchema=i[0]),l[0]&8&&(r.filter=i[3]??[]),l[0]&16&&(r.limit=i[4]),l[0]&4&&(r.joinColumn=i[2].joinColumn),l[0]&128&&(r.value=i[7]),l[0]&2&&(r.ownId=i[1]),l[0]&32&&(r.multi=i[5]),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function Ey(t){let e,n,i,l;const r=[yy,ky],o=[];function u(s,a){return s[0].recursiveTable?0:1}return e=u(t),n=o[e]=r[e](t),{c(){n.c(),i=Fe()},m(s,a){o[e].m(s,a),A(s,i,a),l=!0},p(s,a){let f=e;e=u(s),e===f?o[e].p(s,a):(He(),Z(o[f],1,1,()=>{o[f]=null}),ze(),n=o[e],n?n.p(s,a):(n=o[e]=r[e](s),n.c()),U(n,1),n.m(i.parentNode,i))},i(s){l||(U(n),l=!0)},o(s){Z(n),l=!1},d(s){s&&C(i),o[e].d(s)}}}function vy(t){var w;let e,n,i,l,r,o,u,s,a,f,c=((w=t[2])==null?void 0:w.icon)&&I1(t);function g(E,k){var I;return((I=E[7])==null?void 0:I.length)<1?by:E[16]?py:_y}let h=g(t),d=h(t),_=!t[12]&&(t[2].role=="formInput"||t[8])&&P1(),b=t[8]&&M1(t);return{c(){var E,k;e=v("div"),c&&c.c(),n=Q(),i=v("div"),d.c(),l=Q(),_&&_.c(),o=Q(),b&&b.c(),u=Fe(),m(i,"class","value"),p(i,"placeholder",((E=t[7])==null?void 0:E.length)<1),m(e,"class","superCell"),m(e,"tabindex",r=(k=t[2])!=null&&k.disabled?-1:0),p(e,"isDirty",t[15]&&t[2].showDirty),p(e,"inEdit",t[8]),p(e,"inline",t[14]),p(e,"tableCell",t[2].role=="tableCell"),p(e,"formInput",t[2].role=="formInput"),p(e,"disabled",t[2].disabled),p(e,"readonly",t[12]),p(e,"error",t[2].error),P(e,"color",t[2].color),P(e,"background",t[2].background),P(e,"font-weight",t[2].fontWeight)},m(E,k){A(E,e,k),c&&c.m(e,null),S(e,n),S(e,i),d.m(i,null),S(e,l),_&&_.m(e,null),t[26](e),A(E,o,k),b&&b.m(E,k),A(E,u,k),s=!0,a||(f=[B(e,"mousedown",t[19].toggle),B(e,"focusin",function(){Ge(t[6].focus)&&t[6].focus.apply(this,arguments)}),B(e,"keydown",Ii(t[20])),B(e,"focusout",function(){Ge(t[6].focusout)&&t[6].focusout.apply(this,arguments)})],a=!0)},p(E,k){var I,O,D;t=E,(I=t[2])!=null&&I.icon?c?c.p(t,k):(c=I1(t),c.c(),c.m(e,n)):c&&(c.d(1),c=null),h===(h=g(t))&&d?d.p(t,k):(d.d(1),d=h(t),d&&(d.c(),d.m(i,null))),(!s||k[0]&128)&&p(i,"placeholder",((O=t[7])==null?void 0:O.length)<1),!t[12]&&(t[2].role=="formInput"||t[8])?_||(_=P1(),_.c(),_.m(e,null)):_&&(_.d(1),_=null),(!s||k[0]&4&&r!==(r=(D=t[2])!=null&&D.disabled?-1:0))&&m(e,"tabindex",r),(!s||k[0]&32772)&&p(e,"isDirty",t[15]&&t[2].showDirty),(!s||k[0]&256)&&p(e,"inEdit",t[8]),(!s||k[0]&16384)&&p(e,"inline",t[14]),(!s||k[0]&4)&&p(e,"tableCell",t[2].role=="tableCell"),(!s||k[0]&4)&&p(e,"formInput",t[2].role=="formInput"),(!s||k[0]&4)&&p(e,"disabled",t[2].disabled),(!s||k[0]&4096)&&p(e,"readonly",t[12]),(!s||k[0]&4)&&p(e,"error",t[2].error),k[0]&4&&P(e,"color",t[2].color),k[0]&4&&P(e,"background",t[2].background),k[0]&4&&P(e,"font-weight",t[2].fontWeight),t[8]?b?(b.p(t,k),k[0]&256&&U(b,1)):(b=M1(t),b.c(),U(b,1),b.m(u.parentNode,u)):b&&(He(),Z(b,1,1,()=>{b=null}),ze())},i(E){s||(U(b),s=!0)},o(E){Z(b),s=!1},d(E){E&&(C(e),C(o),C(u)),c&&c.d(),d.d(),_&&_.d(),t[26](null),b&&b.d(E),a=!1,Ve(f)}}}const N1=t=>t.primaryDisplay;function Sy(t,e,n){let i,l,r,o,u,s,a,f,c,g,h,d=ue,_=()=>(d(),d=ft(G,F=>n(25,h=F)),G);t.$$.on_destroy.push(()=>d());const b=le.createEventDispatcher(),{API:w}=le.getContext("sdk");let{value:E}=e,{fieldSchema:k}=e,{cellOptions:I}=e,{simpleView:O=!0}=e,{filter:D=[]}=e,{limit:N=100}=e,{multi:M=!1}=e,{ownId:V}=e,W=JSON.stringify(E),ne,H,$,Y,{cellState:G=Ft(I.initialState??"View",{"*":{goTo(F){return F},reset(F){n(7,o=void 0)}},View:{_enter(){},focus(){if(!I.readonly&&!I.disabled)return"Editing"}},Hovered:{cancel:()=>"View"},Focused:{unfocus(){return"View"}},Error:{check:"View"},Editing:{_enter(){n(24,W=JSON.stringify(o)),oe.open(),b("enteredit")},_exit(){oe.close(),b("exitedit")},focusout(F){H!=null&&H.contains(F==null?void 0:F.relatedTarget)||this.submit()},clear(){n(7,o=[])},submit(){return s&&b("change",o),"View"},cancel(){return"View"}}})}=e;_();const oe=Ft("Closed",{Open:{close(){return"Closed"},toggle(){return"Closed"}},Closed:{open(){return"Open"},toggle(){return"Open"}}});Me(t,oe,F=>n(17,g=F));const ie=F=>{F.key=="Escape"?g=="Open"?oe.close():G.focusout(F):F.keyCode==32&&h=="Editing"?oe.toggle():F.key=="Tab"&&g=="Open"?G.focusout(F):g=="Open"&&(F.key==="ArrowUp"?(F.preventDefault(),Y==null||Y.focusPrev(),Y==null||Y.scrollIntoView()):F.key==="ArrowDown"?(F.preventDefault(),Y==null||Y.focusNext(),Y==null||Y.scrollIntoView()):F.key.length==1&&F.key.match(/\S/)&&(Y==null||Y.setSearch(F.key)))},J=F=>{n(7,o=F.detail),M||oe.close()},q=F=>{if(Array.isArray(F)&&M){const R=o?o.map(me=>me[i]):[],z=F.filter(me=>!R.includes(me));return z.length>0&&(w.fetchTableDefinition(l).then(me=>{n(0,k.primaryDisplay=me.primaryDisplay,k)}),Promise.all(z.map(me=>w.fetchRow(l,me,!0))).then(me=>{const se=me.map(Oe=>({[i]:Oe[i],primaryDisplay:k.primaryDisplay?Oe[k.primaryDisplay]:Oe.name||Oe.id}));n(7,o=[...o||[],...se])}).catch(me=>{})),o||[]}else return F&&!Array.isArray(F)?(o&&o.find(z=>z[i]===F)||(w.fetchTableDefinition(l).then(z=>{n(0,k.primaryDisplay=z.primaryDisplay,k)}),w.fetchRow(l,F,!0).then(z=>{n(7,o=[{[i]:z[i],primaryDisplay:k.primaryDisplay?z[k.primaryDisplay]:z.name||z.id}])}).catch(z=>{n(7,o=[])})),o||[]):M?E&&Array.isArray(E)?E:[]:E?[E]:[]};function j(F){Be[F?"unshift":"push"](()=>{ne=F,n(9,ne)})}function K(F){Y=F,n(11,Y)}const x=()=>{G.focusout(null)};function X(F){H=F,n(10,H)}return t.$$set=F=>{"value"in F&&n(23,E=F.value),"fieldSchema"in F&&n(0,k=F.fieldSchema),"cellOptions"in F&&n(2,I=F.cellOptions),"simpleView"in F&&n(22,O=F.simpleView),"filter"in F&&n(3,D=F.filter),"limit"in F&&n(4,N=F.limit),"multi"in F&&n(5,M=F.multi),"ownId"in F&&n(1,V=F.ownId),"cellState"in F&&_(n(6,G=F.cellState))},t.$$.update=()=>{t.$$.dirty[0]&1&&(i=(k==null?void 0:k.relatedField)||"id"),t.$$.dirty[0]&1&&(l=k==null?void 0:k.tableId),t.$$.dirty[0]&1&&k!=null&&k.relatedColumns,t.$$.dirty[0]&4&&n(16,r=I.relViewMode=="pills"),t.$$.dirty[0]&6&&n(1,V=V||(I==null?void 0:I.ownId)),t.$$.dirty[0]&8388608&&n(7,o=q(E)),t.$$.dirty[0]&33554432&&n(8,u=h=="Editing"),t.$$.dirty[0]&16777600&&n(15,s=u&&W!=JSON.stringify(o)),t.$$.dirty[0]&4&&n(22,O=I.relViewMode=="text"),t.$$.dirty[0]&4&&n(14,a=I.role=="inlineInput"),t.$$.dirty[0]&4&&n(13,f=I.placeholder||""),t.$$.dirty[0]&4&&n(12,c=I.readonly||I.disabled)},[k,V,I,D,N,M,G,o,u,ne,H,Y,c,f,a,s,r,g,$,oe,ie,J,O,E,W,h,j,K,x,X]}class Cy extends Ze{constructor(e){super(),Qe(this,e,Sy,vy,Ye,{value:23,fieldSchema:0,cellOptions:2,simpleView:22,filter:3,limit:4,multi:5,ownId:1,cellState:6},null,[-1,-1])}}function L1(t,e,n){const i=t.slice();return i[35]=e[n],i}function F1(t){let e,n;return{c(){e=v("i"),m(e,"class",n=bt(t[2].icon+" icon")+" svelte-1uxy76n")},m(i,l){A(i,e,l)},p(i,l){l[0]&4&&n!==(n=bt(i[2].icon+" icon")+" svelte-1uxy76n")&&m(e,"class",n)},d(i){i&&C(e)}}}function Ay(t){let e,n=Ce(t[6]),i=[];for(let l=0;l<n.length;l+=1)i[l]=B1(L1(t,n,l));return{c(){e=v("div");for(let l=0;l<i.length;l+=1)i[l].c();m(e,"class","items"),p(e,"pills",t[15])},m(l,r){A(l,e,r);for(let o=0;o<i.length;o+=1)i[o]&&i[o].m(e,null)},p(l,r){if(r[0]&67){n=Ce(l[6]);let o;for(o=0;o<n.length;o+=1){const u=L1(l,n,o);i[o]?i[o].p(u,r):(i[o]=B1(u),i[o].c(),i[o].m(e,null))}for(;o<i.length;o+=1)i[o].d(1);i.length=n.length}r[0]&32768&&p(e,"pills",l[15])},d(l){l&&C(e),St(i,l)}}}function Ty(t){let e,n=(t[2].placeholder??null)+"",i;return{c(){e=v("span"),i=Ee(n)},m(l,r){A(l,e,r),S(e,i)},p(l,r){r[0]&4&&n!==(n=(l[2].placeholder??null)+"")&&Pe(i,n)},d(l){l&&C(e)}}}function V1(t){let e,n;return{c(){e=v("i"),m(e,"class",n=t[1].type=="link"?"ri-links-line":"ri-user-line")},m(i,l){A(i,e,l)},p(i,l){l[0]&2&&n!==(n=i[1].type=="link"?"ri-links-line":"ri-user-line")&&m(e,"class",n)},d(i){i&&C(e)}}}function B1(t){let e,n,i,l=t[35].primaryDisplay+"",r,o,u=!t[0]&&V1(t);return{c(){e=v("div"),u&&u.c(),n=Q(),i=v("span"),r=Ee(l),o=Q(),m(e,"class","item svelte-1uxy76n"),p(e,"rel-bb-reference",!t[0]&&t[1].type!="link")},m(s,a){A(s,e,a),u&&u.m(e,null),S(e,n),S(e,i),S(i,r),S(e,o)},p(s,a){s[0]?u&&(u.d(1),u=null):u?u.p(s,a):(u=V1(s),u.c(),u.m(e,n)),a[0]&64&&l!==(l=s[35].primaryDisplay+"")&&Pe(r,l),a[0]&3&&p(e,"rel-bb-reference",!s[0]&&s[1].type!="link")},d(s){s&&C(e),u&&u.d()}}}function U1(t){let e,n,i;return{c(){e=v("i"),m(e,"class","ri-close-line clearIcon")},m(l,r){A(l,e,r),n||(i=B(e,"mousedown",Et(function(){Ge(t[5].clear)&&t[5].clear.apply(this,arguments)})),n=!0)},p(l,r){t=l},d(l){l&&C(e),n=!1,i()}}}function H1(t){let e;return{c(){e=v("i"),m(e,"class","ph ph-caret-down control-icon")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function z1(t){let e,n,i;function l(o){t[27](o)}let r={anchor:t[9],useAnchorWidth:!0,open:t[16]=="Open",$$slots:{default:[Iy]},$$scope:{ctx:t}};return t[10]!==void 0&&(r.popup=t[10]),e=new wn({props:r}),Be.push(()=>Gt(e,"popup",l)),e.$on("close",function(){Ge(t[5].focusout)&&t[5].focusout.apply(this,arguments)}),{c(){We(e.$$.fragment)},m(o,u){je(e,o,u),i=!0},p(o,u){t=o;const s={};u[0]&512&&(s.anchor=t[9]),u[0]&65536&&(s.open=t[16]=="Open"),u[0]&2174|u[1]&128&&(s.$$scope={dirty:u,ctx:t}),!n&&u[0]&1024&&(n=!0,s.popup=t[10],Wt(()=>n=!1)),e.$set(s)},i(o){i||(U(e.$$.fragment,o),i=!0)},o(o){Z(e.$$.fragment,o),i=!1},d(o){qe(e,o)}}}function Iy(t){let e,n;return e=new Qr({props:{fieldSchema:t[1],filter:t[3],search:t[11],searchTerm:t[17],limit:t[4],joinColumn:t[2].joinColumn,value:t[6],multi:!1}}),e.$on("change",t[20]),e.$on("focusout",t[26]),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l[0]&2&&(r.fieldSchema=i[1]),l[0]&8&&(r.filter=i[3]),l[0]&2048&&(r.search=i[11]),l[0]&16&&(r.limit=i[4]),l[0]&4&&(r.joinColumn=i[2].joinColumn),l[0]&64&&(r.value=i[6]),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function Dy(t){var E,k;let e,n,i,l,r,o,u,s,a,f,c=((E=t[2])==null?void 0:E.icon)&&F1(t);function g(I,O){var D,N;if(((D=I[6])==null?void 0:D.length)<1)return Ty;if(((N=I[6])==null?void 0:N.length)>0)return Ay}let h=g(t),d=h&&h(t),_=t[7]&&((k=t[6])==null?void 0:k.length)&&U1(t),b=!t[2].readonly&&(t[2].role=="formInput"||t[7])&&H1(),w=t[7]&&z1(t);return{c(){var I,O;e=v("div"),c&&c.c(),n=Q(),i=v("div"),d&&d.c(),l=Q(),_&&_.c(),r=Q(),b&&b.c(),o=Q(),w&&w.c(),u=Fe(),m(i,"class","value"),p(i,"with-icon",(I=t[2])==null?void 0:I.icon),p(i,"placeholder",((O=t[6])==null?void 0:O.length)<1),m(e,"class","superCell"),m(e,"tabindex","0"),p(e,"inEdit",t[7]),p(e,"isDirty",t[14]&&t[2].showDirty),p(e,"focused",t[8]=="Editing"),p(e,"inline",t[13]),p(e,"multirow",t[12]),p(e,"tableCell",t[2].role=="tableCell"),p(e,"formInput",t[2].role=="formInput"),p(e,"disabled",t[2].disabled),p(e,"readonly",t[2].readonly),p(e,"error",t[2].error),P(e,"color",t[2].color),P(e,"background",t[2].background),P(e,"font-weight",t[2].fontWeight)},m(I,O){A(I,e,O),c&&c.m(e,null),S(e,n),S(e,i),d&&d.m(i,null),S(i,l),_&&_.m(i,null),S(e,r),b&&b.m(e,null),t[25](e),A(I,o,O),w&&w.m(I,O),A(I,u,O),s=!0,a||(f=[B(e,"keydown",t[19]),B(e,"focusin",function(){Ge(t[5].focus)&&t[5].focus.apply(this,arguments)}),B(e,"focusout",function(){Ge(t[5].focusout)&&t[5].focusout.apply(this,arguments)}),B(e,"mousedown",t[18].toggle)],a=!0)},p(I,O){var D,N,M,V;t=I,(D=t[2])!=null&&D.icon?c?c.p(t,O):(c=F1(t),c.c(),c.m(e,n)):c&&(c.d(1),c=null),h===(h=g(t))&&d?d.p(t,O):(d&&d.d(1),d=h&&h(t),d&&(d.c(),d.m(i,l))),t[7]&&((N=t[6])!=null&&N.length)?_?_.p(t,O):(_=U1(t),_.c(),_.m(i,null)):_&&(_.d(1),_=null),(!s||O[0]&4)&&p(i,"with-icon",(M=t[2])==null?void 0:M.icon),(!s||O[0]&64)&&p(i,"placeholder",((V=t[6])==null?void 0:V.length)<1),!t[2].readonly&&(t[2].role=="formInput"||t[7])?b||(b=H1(),b.c(),b.m(e,null)):b&&(b.d(1),b=null),(!s||O[0]&128)&&p(e,"inEdit",t[7]),(!s||O[0]&16388)&&p(e,"isDirty",t[14]&&t[2].showDirty),(!s||O[0]&256)&&p(e,"focused",t[8]=="Editing"),(!s||O[0]&8192)&&p(e,"inline",t[13]),(!s||O[0]&4096)&&p(e,"multirow",t[12]),(!s||O[0]&4)&&p(e,"tableCell",t[2].role=="tableCell"),(!s||O[0]&4)&&p(e,"formInput",t[2].role=="formInput"),(!s||O[0]&4)&&p(e,"disabled",t[2].disabled),(!s||O[0]&4)&&p(e,"readonly",t[2].readonly),(!s||O[0]&4)&&p(e,"error",t[2].error),O[0]&4&&P(e,"color",t[2].color),O[0]&4&&P(e,"background",t[2].background),O[0]&4&&P(e,"font-weight",t[2].fontWeight),t[7]?w?(w.p(t,O),O[0]&128&&U(w,1)):(w=z1(t),w.c(),U(w,1),w.m(u.parentNode,u)):w&&(He(),Z(w,1,1,()=>{w=null}),ze())},i(I){s||(U(w),s=!0)},o(I){Z(w),s=!1},d(I){I&&(C(e),C(o),C(u)),c&&c.d(),d&&d.d(),_&&_.d(),b&&b.d(),t[25](null),w&&w.d(I),a=!1,Ve(f)}}}function Oy(t,e,n){let i,l,r,o,u,s,a,f,c,g,h,d,_=ue,b=()=>(_(),_=ft(G,F=>n(8,d=F)),G),w;t.$$.on_destroy.push(()=>_());const E=le.createEventDispatcher();let{value:k}=e,{fieldSchema:I}=e,{cellOptions:O}=e,{simpleView:D=!0}=e,{filter:N=[]}=e,{limit:M=100}=e,V=JSON.stringify(k),W,ne,H,$,Y,{cellState:G=Ft(O.initialState??"View",{"*":{goTo(F){return F}},View:{_enter(){n(11,H=!1)},focus(){if(!O.readonly&&!O.disabled)return"Editing"}},Hovered:{cancel:()=>"View"},Focused:{unfocus(){return"View"}},Error:{check:"View"},Editing:{_enter(){n(22,V=JSON.stringify(o)),oe.open(),E("enteredit")},_exit(){oe.close(),E("exitedit")},checkFocus(){return $()},focusout(F){ne!=null&&ne.contains(F.relatedTarget)||this.submit()},popupfocusout(F){console.log(F)},clear(){n(6,o=[])},submit(){return s&&E("change",h&&o?o[0]:o),oe.close(),"View"},cancel(){return oe.close(),"View"}}})}=e;b();const oe=Ft("Closed",{Open:{close(){return"Closed"},toggle(){return"Closed"}},Closed:{open(){return"Open"},toggle(){return"Open"}}});Me(t,oe,F=>n(16,w=F));const ie=F=>{F.keyCode==32&&d=="Editing"?(F.preventDefault(),F.stopPropagation(),oe.toggle()):F.key!="Tab"&&n(11,H=!0)},J=F=>{n(6,o=F.detail);let R=h?o[0]??{}:o;f&&E("change",R),g&&oe.close()},q=F=>I.relationshipType=="self"&&F?j(F):l?k?[...k]:[]:k?[k]:[],j=F=>{let R;try{R=JSON.parse(F)}catch{R=void 0}return R};function K(F){Be[F?"unshift":"push"](()=>{W=F,n(9,W)})}const x=F=>setTimeout(G.focusout,20,F);function X(F){ne=F,n(10,ne)}return t.$$set=F=>{"value"in F&&n(21,k=F.value),"fieldSchema"in F&&n(1,I=F.fieldSchema),"cellOptions"in F&&n(2,O=F.cellOptions),"simpleView"in F&&n(0,D=F.simpleView),"filter"in F&&n(3,N=F.filter),"limit"in F&&n(4,M=F.limit),"cellState"in F&&b(n(5,G=F.cellState))},t.$$.update=()=>{var F,R;t.$$.dirty[0]&4&&n(15,i=O.relViewMode=="pills"),t.$$.dirty[0]&2&&n(23,l=!((F=I==null?void 0:I.type)!=null&&F.includes("_single"))),t.$$.dirty[0]&2&&n(24,r=(R=I==null?void 0:I.type)==null?void 0:R.includes("bb_reference")),t.$$.dirty[0]&2097152&&n(6,o=q(k)),t.$$.dirty[0]&256&&n(7,u=d=="Editing"),t.$$.dirty[0]&4194496&&n(14,s=u&&V!=JSON.stringify(o)),t.$$.dirty[0]&4&&n(0,D=O.relViewMode=="text"),t.$$.dirty[0]&4&&n(13,a=O.role=="inlineInput"),t.$$.dirty[0]&4&&(f=O.controlType=="expanded"),t.$$.dirty[0]&196&&n(12,c=O.controlType=="expanded"&&((o==null?void 0:o.length)>1||u)),t.$$.dirty[0]&8388610&&(g=(I==null?void 0:I.relationshipType)=="one-to-many"||(I==null?void 0:I.relationshipType)=="many-to-one"||(I==null?void 0:I.relationshipType)=="self"||!l),t.$$.dirty[0]&25165824&&(h=r&&!l)},[D,I,O,N,M,G,o,u,d,W,ne,H,c,a,s,i,w,Y,oe,ie,J,k,V,l,r,K,x,X]}class Ry extends Ze{constructor(e){super(),Qe(this,e,Oy,Dy,Ye,{value:21,fieldSchema:1,cellOptions:2,simpleView:0,filter:3,limit:4,cellState:5},null,[-1,-1])}}function Py(t){let e;const n=t[3].default,i=Ut(n,t,t[2],null);return{c(){i&&i.c()},m(l,r){i&&i.m(l,r),e=!0},p(l,r){i&&i.p&&(!e||r&4)&&zt(i,n,l,l[2],e?Ht(n,l[2],r,null):jt(l[2]),null)},i(l){e||(U(i,l),e=!0)},o(l){Z(i,l),e=!1},d(l){i&&i.d(l)}}}function My(t){let e;return{c(){e=v("div"),e.innerHTML='<div class="children svelte-i7mw17"></div>',m(e,"class","skeleton svelte-i7mw17"),P(e,"min-height",t[1])},m(n,i){A(n,e,i)},p(n,i){i&2&&P(e,"min-height",n[1])},i:ue,o:ue,d(n){n&&C(e)}}}function Ny(t){let e,n,i,l;const r=[My,Py],o=[];function u(s,a){return s[0]?0:1}return e=u(t),n=o[e]=r[e](t),{c(){n.c(),i=Fe()},m(s,a){o[e].m(s,a),A(s,i,a),l=!0},p(s,[a]){let f=e;e=u(s),e===f?o[e].p(s,a):(He(),Z(o[f],1,1,()=>{o[f]=null}),ze(),n=o[e],n?n.p(s,a):(n=o[e]=r[e](s),n.c()),U(n,1),n.m(i.parentNode,i))},i(s){l||(U(n),l=!0)},o(s){Z(n),l=!1},d(s){s&&C(i),o[e].d(s)}}}function Ly(t,e,n){let{$$slots:i={},$$scope:l}=e,{active:r=!0}=e,{minHeight:o="2rem"}=e;return t.$$set=u=>{"active"in u&&n(0,r=u.active),"minHeight"in u&&n(1,o=u.minHeight),"$$scope"in u&&n(2,l=u.$$scope)},[r,o,l,i]}class j1 extends Ze{constructor(e){super(),Qe(this,e,Ly,Ny,Ye,{active:0,minHeight:1})}}function q1(t,e,n){const i=t.slice();return i[73]=e[n],i[75]=n,i}function W1(t,e,n){const i=t.slice();return i[73]=e[n],i[75]=n,i}function G1(t,e,n){const i=t.slice();return i[73]=e[n],i[75]=n,i}function Y1(t,e,n){const i=t.slice();return i[73]=e[n],i[75]=n,i}function Fy(t){let e,n,i=[],l=new Map,r,o,u=(t[1]||t[0].toggleAll)&&K1(t),s=Ce(t[26]);const a=f=>f[75];for(let f=0;f<s.length;f+=1){let c=W1(t,s,f),g=a(c);l.set(g,i[f]=Q1(g,c))}return{c(){e=v("div"),u&&u.c(),n=Q();for(let f=0;f<i.length;f+=1)i[f].c();m(e,"class","radios svelte-1d0r12q"),p(e,"formInput",t[25]=="formInput"),p(e,"inlineInput",t[25]=="inlineInput"),p(e,"column",t[0].direction=="column")},m(f,c){A(f,e,c),u&&u.m(e,null),S(e,n);for(let g=0;g<i.length;g+=1)i[g]&&i[g].m(e,null);r||(o=B(e,"mouseleave",t[55]),r=!0)},p(f,c){f[1]||f[0].toggleAll?u?u.p(f,c):(u=K1(f),u.c(),u.m(e,n)):u&&(u.d(1),u=null),c[0]&201330208|c[1]&2&&(s=Ce(f[26]),i=Tt(i,c,a,1,f,s,l,e,nn,Q1,null,W1)),c[0]&33554432&&p(e,"formInput",f[25]=="formInput"),c[0]&33554432&&p(e,"inlineInput",f[25]=="inlineInput"),c[0]&1&&p(e,"column",f[0].direction=="column")},i:ue,o:ue,d(f){f&&C(e),u&&u.d();for(let c=0;c<i.length;c+=1)i[c].d();r=!1,o()}}}function Vy(t){let e;function n(r,o){if(r[15])return zy;if(r[17])return Hy}let i=n(t),l=i&&i(t);return{c(){l&&l.c(),e=Fe()},m(r,o){l&&l.m(r,o),A(r,e,o)},p(r,o){i===(i=n(r))&&l?l.p(r,o):(l&&l.d(1),l=i&&i(r),l&&(l.c(),l.m(e.parentNode,e)))},i:ue,o:ue,d(r){r&&C(e),l&&l.d(r)}}}function By(t){let e,n,i;function l(o){t[46](o)}let r={items:t[5],itemsColors:t[27],itemsLabels:t[9],showColors:t[0].optionsViewMode!="text",reorderOnly:t[0].reorderOnly,placeholder:t[0].placeholder,readonly:t[0].readonly||t[0].disabled,editorState:t[32],cellState:t[2],fullSelection:t[18]};return t[13]!==void 0&&(r.inactive=t[13]),e=new bf({props:r}),Be.push(()=>Gt(e,"inactive",l)),e.$on("togglePicker",t[32].toggle),e.$on("clear",t[47]),e.$on("change",t[48]),{c(){We(e.$$.fragment)},m(o,u){je(e,o,u),i=!0},p(o,u){const s={};u[0]&32&&(s.items=o[5]),u[0]&134217728&&(s.itemsColors=o[27]),u[0]&512&&(s.itemsLabels=o[9]),u[0]&1&&(s.showColors=o[0].optionsViewMode!="text"),u[0]&1&&(s.reorderOnly=o[0].reorderOnly),u[0]&1&&(s.placeholder=o[0].placeholder),u[0]&1&&(s.readonly=o[0].readonly||o[0].disabled),u[0]&4&&(s.cellState=o[2]),u[0]&262144&&(s.fullSelection=o[18]),!n&&u[0]&8192&&(n=!0,s.inactive=o[13],Wt(()=>n=!1)),e.$set(s)},i(o){i||(U(e.$$.fragment,o),i=!0)},o(o){Z(e.$$.fragment,o),i=!1},d(o){qe(e,o)}}}function Uy(t){let e,n;return e=new j1({props:{$$slots:{default:[jy]},$$scope:{ctx:t}}}),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l[2]&131072&&(r.$$scope={dirty:l,ctx:i}),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function K1(t){let e,n,i=(t[1]??"Toggle All")+"",l,r,o,u,s=t[0].toggleAll&&!(t[24]||t[23])&&X1(t);return{c(){e=v("div"),n=v("div"),l=Ee(i),r=Q(),s&&s.c(),m(n,"class","text title"),m(e,"class","switch toggleAll svelte-1d0r12q")},m(a,f){A(a,e,f),S(e,n),S(n,l),S(e,r),s&&s.m(e,null),o||(u=[B(e,"click",function(){Ge(t[0].toggleAll?t[32].toggleAll:void 0)&&(t[0].toggleAll?t[32].toggleAll:void 0).apply(this,arguments)}),B(e,"mouseenter",t[45])],o=!0)},p(a,f){t=a,f[0]&2&&i!==(i=(t[1]??"Toggle All")+"")&&Pe(l,i),t[0].toggleAll&&!(t[24]||t[23])?s?s.p(t,f):(s=X1(t),s.c(),s.m(e,null)):s&&(s.d(1),s=null)},d(a){a&&C(e),s&&s.d(),o=!1,Ve(u)}}}function X1(t){let e,n,i,l;return{c(){e=v("div"),n=v("input"),i=Q(),l=v("span"),n.checked=t[14],m(n,"type","checkbox"),m(n,"class","spectrum-Switch-input"),m(l,"class","spectrum-Switch-switch"),m(e,"class","spectrum-Switch spectrum-Switch--emphasized svelte-1d0r12q")},m(r,o){A(r,e,o),S(e,n),S(e,i),S(e,l)},p(r,o){o[0]&16384&&(n.checked=r[14])},d(r){r&&C(e)}}}function Q1(t,e){let n,i,l,r,o,u=(e[9][e[73]]||e[73])+"",s,a,f,c,g,h,d,_,b,w,E;function k(...O){return e[53](e[75],...O)}function I(){return e[54](e[75])}return{key:t,first:null,c(){n=v("div"),i=v("i"),r=Q(),o=v("div"),s=Ee(u),a=Q(),f=v("div"),c=v("input"),d=Q(),_=v("span"),_.innerHTML="",b=Q(),m(i,"class",l=bt(e[10][e[73]]||"no-icon")+" svelte-1d0r12q"),m(o,"class","text"),c.checked=g=e[5].includes(e[73]),m(c,"type","checkbox"),m(c,"class","spectrum-Switch-input"),m(c,"id",h=e[75]),m(_,"class","spectrum-Switch-switch small"),m(f,"class","spectrum-Switch spectrum-Switch--emphasized svelte-1d0r12q"),m(n,"class","switch svelte-1d0r12q"),p(n,"selected",e[5].includes(e[73])),p(n,"focused",e[11]===e[75]),P(n,"--option-color",e[27][e[73]]),this.first=n},m(O,D){A(O,n,D),S(n,i),S(n,r),S(n,o),S(o,s),S(n,a),S(n,f),S(f,c),S(f,d),S(f,_),S(n,b),w||(E=[B(n,"click",k),B(n,"mouseenter",I)],w=!0)},p(O,D){e=O,D[0]&67109888&&l!==(l=bt(e[10][e[73]]||"no-icon")+" svelte-1d0r12q")&&m(i,"class",l),D[0]&67109376&&u!==(u=(e[9][e[73]]||e[73])+"")&&Pe(s,u),D[0]&67108896&&g!==(g=e[5].includes(e[73]))&&(c.checked=g),D[0]&67108864&&h!==(h=e[75])&&m(c,"id",h),D[0]&67108896&&p(n,"selected",e[5].includes(e[73])),D[0]&67110912&&p(n,"focused",e[11]===e[75]),D[0]&201326592&&P(n,"--option-color",e[27][e[73]])},d(O){O&&C(n),w=!1,Ve(E)}}}function Hy(t){let e,n=[],i=new Map,l,r,o=Ce(t[26]);const u=s=>s[75];for(let s=0;s<o.length;s+=1){let a=G1(t,o,s),f=u(a);i.set(f,n[s]=Z1(f,a))}return{c(){e=v("div");for(let s=0;s<n.length;s+=1)n[s].c();m(e,"class","radios svelte-1d0r12q"),p(e,"column",t[0].direction=="column")},m(s,a){A(s,e,a);for(let f=0;f<n.length;f+=1)n[f]&&n[f].m(e,null);l||(r=B(e,"mouseleave",t[52]),l=!0)},p(s,a){a[0]&201460256|a[1]&2&&(o=Ce(s[26]),n=Tt(n,a,u,1,s,o,i,e,nn,Z1,null,G1)),a[0]&1&&p(e,"column",s[0].direction=="column")},d(s){s&&C(e);for(let a=0;a<n.length;a+=1)n[a].d();l=!1,r()}}}function zy(t){let e,n=[],i=new Map,l=Ce(t[26]);const r=o=>o[75];for(let o=0;o<l.length;o+=1){let u=Y1(t,l,o),s=r(u);i.set(s,n[o]=J1(s,u))}return{c(){e=v("div");for(let o=0;o<n.length;o+=1)n[o].c();m(e,"class","buttons svelte-1d0r12q")},m(o,u){A(o,e,u);for(let s=0;s<n.length;s+=1)n[s]&&n[s].m(e,null)},p(o,u){u[0]&201327136|u[1]&2&&(l=Ce(o[26]),n=Tt(n,u,r,1,o,l,i,e,nn,J1,null,Y1))},d(o){o&&C(e);for(let u=0;u<n.length;u+=1)n[u].d()}}}function Z1(t,e){let n,i,l,r,o=(e[9][e[73]]||e[73])+"",u,s,a,f;function c(...h){return e[50](e[75],...h)}function g(){return e[51](e[75])}return{key:t,first:null,c(){var h;n=v("div"),i=v("i"),r=Q(),u=Ee(o),s=Q(),m(i,"class",l=bt(e[17]&&e[5].includes(e[73])?"ph-fill ph-radio-button":e[17]?"ph ph-circle":e[5].includes(e[73])?"ph-fill ph-check-square":"ph ph-square")+" svelte-1d0r12q"),P(i,"color",e[27][e[73]]),m(n,"class","radio svelte-1d0r12q"),p(n,"selected",(h=e[5])==null?void 0:h.includes(e[73])),p(n,"focused",e[11]===e[75]),P(n,"--option-color",e[27][e[73]]),this.first=n},m(h,d){A(h,n,d),S(n,i),S(n,r),S(n,u),S(n,s),a||(f=[B(n,"mousedown",c),B(n,"mouseenter",g)],a=!0)},p(h,d){var _;e=h,d[0]&67239968&&l!==(l=bt(e[17]&&e[5].includes(e[73])?"ph-fill ph-radio-button":e[17]?"ph ph-circle":e[5].includes(e[73])?"ph-fill ph-check-square":"ph ph-square")+" svelte-1d0r12q")&&m(i,"class",l),d[0]&201326592&&P(i,"color",e[27][e[73]]),d[0]&67109376&&o!==(o=(e[9][e[73]]||e[73])+"")&&Pe(u,o),d[0]&67108896&&p(n,"selected",(_=e[5])==null?void 0:_.includes(e[73])),d[0]&67110912&&p(n,"focused",e[11]===e[75]),d[0]&201326592&&P(n,"--option-color",e[27][e[73]])},d(h){h&&C(n),a=!1,Ve(f)}}}function J1(t,e){let n,i=(e[9][e[73]]||e[73])+"",l,r,o,u;function s(){return e[49](e[75])}return{key:t,first:null,c(){var a;n=v("div"),l=Ee(i),r=Q(),m(n,"class","button svelte-1d0r12q"),p(n,"selected",(a=e[5])==null?void 0:a.includes(e[73])),P(n,"--option-color",e[27][e[73]]),this.first=n},m(a,f){A(a,n,f),S(n,l),S(n,r),o||(u=B(n,"click",s),o=!0)},p(a,f){var c;e=a,f[0]&67109376&&i!==(i=(e[9][e[73]]||e[73])+"")&&Pe(l,i),f[0]&67108896&&p(n,"selected",(c=e[5])==null?void 0:c.includes(e[73])),f[0]&201326592&&P(n,"--option-color",e[27][e[73]])},d(a){a&&C(n),o=!1,u()}}}function jy(t){let e;return{c(){e=Ee("Initializing ..")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function x1(t){let e,n;return e=new wn({props:{anchor:t[8],useAnchorWidth:!0,maxHeight:400,open:t[28]=="Open",$$slots:{default:[Gy]},$$scope:{ctx:t}}}),e.$on("close",function(){Ge(t[2].focusout)&&t[2].focusout.apply(this,arguments)}),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){t=i;const r={};l[0]&256&&(r.anchor=t[8]),l[0]&268435456&&(r.open=t[28]=="Open"),l[0]&134224424|l[2]&131072&&(r.$$scope={dirty:l,ctx:t}),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function qy(t){let e=[],n=new Map,i,l=Ce(t[3]);const r=o=>o[75];for(let o=0;o<l.length;o+=1){let u=q1(t,l,o),s=r(u);n.set(s,e[o]=$1(s,u))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();i=Fe()},m(o,u){for(let s=0;s<e.length;s+=1)e[s]&&e[s].m(o,u);A(o,i,u)},p(o,u){u[0]&134220328|u[1]&2&&(l=Ce(o[3]),e=Tt(e,u,r,1,o,l,n,i.parentNode,nn,$1,i,q1))},d(o){o&&C(i);for(let u=0;u<e.length;u+=1)e[u].d(o)}}}function Wy(t){let e;return{c(){e=v("div"),e.innerHTML=`<span class="svelte-1d0r12q"><i class="ri-close-line"></i>
|
|
21
|
-
No Options Found</span>`,m(e,"class","option svelte-1d0r12q")},m(n,i){A(n,e,i)},p:ue,d(n){n&&C(e)}}}function $1(t,e){let n,i,l,r,o=(e[9][e[73]]||e[73])+"",u,s,a,f;function c(...h){return e[57](e[75],...h)}function g(){return e[58](e[75])}return{key:t,first:null,c(){var h;n=v("div"),i=v("span"),l=v("i"),r=Q(),u=Ee(o),s=Q(),m(l,"class","ri-checkbox-blank-fill"),m(i,"class","svelte-1d0r12q"),m(n,"class","option svelte-1d0r12q"),p(n,"focused",e[11]===e[75]),p(n,"selected",(h=e[5])==null?void 0:h.includes(e[73])),P(n,"--option-color",e[27][e[73]]),this.first=n},m(h,d){A(h,n,d),S(n,i),S(i,l),S(i,r),S(i,u),S(n,s),a||(f=[B(n,"mousedown",Et(c)),B(n,"mouseenter",g)],a=!0)},p(h,d){var _;e=h,d[0]&520&&o!==(o=(e[9][e[73]]||e[73])+"")&&Pe(u,o),d[0]&2056&&p(n,"focused",e[11]===e[75]),d[0]&40&&p(n,"selected",(_=e[5])==null?void 0:_.includes(e[73])),d[0]&134217736&&P(n,"--option-color",e[27][e[73]])},d(h){h&&C(n),a=!1,Ve(f)}}}function Gy(t){let e,n,i;function l(u,s){var a;return((a=u[3])==null?void 0:a.length)<1||u[3].length==u[5].length?Wy:qy}let r=l(t),o=r(t);return{c(){e=v("div"),o.c(),m(e,"class","options svelte-1d0r12q")},m(u,s){A(u,e,s),o.m(e,null),t[59](e),n||(i=[B(e,"wheel",Ky),B(e,"mouseleave",t[60])],n=!0)},p(u,s){r===(r=l(u))&&o?o.p(u,s):(o.d(1),o=r(u),o&&(o.c(),o.m(e,null)))},d(u){u&&C(e),o.d(),t[59](null),n=!1,Ve(i)}}}function Yy(t){let e,n,i,l,r,o,u,s,a;const f=[Uy,By,Vy,Fy],c=[];function g(d,_){return d[7]=="Loading"?0:d[4]=="list"?1:d[4]=="radio"||d[4]=="buttons"?2:d[4]=="switch"?3:-1}~(n=g(t))&&(i=c[n]=f[n](t));let h=t[6]&&t[4]=="list"&&x1(t);return{c(){var d;e=v("div"),i&&i.c(),r=Q(),h&&h.c(),o=Fe(),m(e,"class","superCell multirow"),m(e,"tabindex",l=(d=t[0])!=null&&d.disabled?-1:0),p(e,"inEdit",t[6]&&t[4]!="buttons"),p(e,"isDirty",t[16]&&t[0].showDirty),p(e,"disabled",t[23]),p(e,"readonly",t[24]),p(e,"error",t[22]),p(e,"inline",t[25]=="inlineInput"),p(e,"tableCell",t[25]=="tableCell"),p(e,"formInput",t[25]=="formInput"),p(e,"naked-field",t[4]=="buttons"),P(e,"color",t[21]),P(e,"background",t[20]),P(e,"font-weight",t[0].fontWeight)},m(d,_){A(d,e,_),~n&&c[n].m(e,null),t[56](e),A(d,r,_),h&&h.m(d,_),A(d,o,_),u=!0,s||(a=[B(e,"focusin",function(){Ge(t[2].focus)&&t[2].focus.apply(this,arguments)}),B(e,"focusout",function(){Ge(t[2].focusout)&&t[2].focusout.apply(this,arguments)}),B(e,"keydown",t[32].handleKeyboard)],s=!0)},p(d,_){var w;t=d;let b=n;n=g(t),n===b?~n&&c[n].p(t,_):(i&&(He(),Z(c[b],1,1,()=>{c[b]=null}),ze()),~n?(i=c[n],i?i.p(t,_):(i=c[n]=f[n](t),i.c()),U(i,1),i.m(e,null)):i=null),(!u||_[0]&1&&l!==(l=(w=t[0])!=null&&w.disabled?-1:0))&&m(e,"tabindex",l),(!u||_[0]&80)&&p(e,"inEdit",t[6]&&t[4]!="buttons"),(!u||_[0]&65537)&&p(e,"isDirty",t[16]&&t[0].showDirty),(!u||_[0]&8388608)&&p(e,"disabled",t[23]),(!u||_[0]&16777216)&&p(e,"readonly",t[24]),(!u||_[0]&4194304)&&p(e,"error",t[22]),(!u||_[0]&33554432)&&p(e,"inline",t[25]=="inlineInput"),(!u||_[0]&33554432)&&p(e,"tableCell",t[25]=="tableCell"),(!u||_[0]&33554432)&&p(e,"formInput",t[25]=="formInput"),(!u||_[0]&16)&&p(e,"naked-field",t[4]=="buttons"),_[0]&2097152&&P(e,"color",t[21]),_[0]&1048576&&P(e,"background",t[20]),_[0]&1&&P(e,"font-weight",t[0].fontWeight),t[6]&&t[4]=="list"?h?(h.p(t,_),_[0]&80&&U(h,1)):(h=x1(t),h.c(),U(h,1),h.m(o.parentNode,o)):h&&(He(),Z(h,1,1,()=>{h=null}),ze())},i(d){u||(U(i),U(h),u=!0)},o(d){Z(i),Z(h),u=!1},d(d){d&&(C(e),C(r),C(o)),~n&&c[n].d(),t[56](null),h&&h.d(d),s=!1,Ve(a)}}}const Ky=t=>t.stopPropagation();function Xy(t,e,n){let i,l,r,o,u,s,a,f,c,g,h,d,_,b,w,E,k,I,O,D,N,M,V=ue,W=()=>(V(),V=ft(b,pe=>n(43,M=pe)),b),ne,H=ue,$=()=>(H(),H=ft(ke,pe=>n(7,ne=pe)),ke),Y,G,oe;t.$$.on_destroy.push(()=>V()),t.$$.on_destroy.push(()=>H());const ie=le.createEventDispatcher(),{API:J,QueryUtils:q,fetchData:j,memo:K,derivedMemo:x}=le.getContext("sdk");let{cellOptions:X}=e,{value:F}=e,{fieldSchema:R}=e,{multi:z=!0}=e,{autofocus:me}=e,{label:se}=e,Oe,be=K([]);Me(t,be,pe=>n(26,N=pe));let Ie={},ve={},fe={},Ne=[],te=-1,ae,de,Xe=!0,Te=!1;const Se=x(be,pe=>{let _t={};return X.optionsSource=="custom"||pe.forEach((Bt,Kn)=>_t[Bt]=ve[Bt]??Le[Kn%14]),_t});Me(t,Se,pe=>n(27,G=pe));const Le=["hsla(0, 90%, 75%, 0.35)","hsla(25, 90%, 75%, 0.35)","hsla(50, 80%, 75%, 0.35)","hsla(75, 80%, 75%, 0.35)","hsla(100, 80%, 75%, 0.35)","hsla(125, 90%, 75%, 0.35)","hsla(150, 90%, 75%, 0.35)","hsla(175, 90%, 75%, 0.35)","hsla(200, 90%, 75%, 0.35)","hsla(225, 90%, 75%, 0.35)","hsla(250, 90%, 75%, 0.35)","hsla(275, 90%, 75%, 0.35)","hsla(300, 90%, 75%, 0.35)","hsla(325, 90%, 75%, 0.35)","hsla(350, 90%, 75%, 0.35)"];let rt=JSON.stringify(Array.isArray(F)?F:F?[F]:[]);const kt=K((X==null?void 0:X.datasource)??{});Me(t,kt,pe=>n(44,Y=pe));let{cellState:ke=Ft("Loading",{"*":{goTo(pe){return pe},refresh(){return Re(be,N=[],N),"Loading"},loadSchemaOptions(){var pe;ve=(R==null?void 0:R.optionColors)||{},Re(be,N=((pe=R==null?void 0:R.constraints)==null?void 0:pe.inclusion)||[],N)},loadDataOptions(pe){pe&&pe.length&&pe.forEach(_t=>{var Bt;N.push((Bt=_t[o])==null?void 0:Bt.toString()),n(9,Ie[_t[o]]=_t[r||M.definition.primaryDisplay],Ie),ve[_t[o]]=_t[s],n(10,fe[_t[o]]=_t[u],fe)}),be.set(N)},loadCustomOptions(){a!=null&&a.length&&a.forEach(pe=>{N.push(pe.value),n(9,Ie[pe.value]=pe.label,Ie)}),be.set(N)},clearFilters(){n(3,Ne=N)}},Loading:{_enter(){(X.optionsSource!="data"||M!=null&&M.loaded)&&this.goTo.debounce(10,X.initialState||"View")},_exit(){l=="custom"?this.loadCustomOptions():l=="data"?this.loadDataOptions(M==null?void 0:M.rows):this.loadSchemaOptions(),n(3,Ne=N)},syncFetch(){if(M!=null&&M.loaded)return X.initialState||"View"}},View:{_enter(){},focus(pe){if(!X.readonly&&!X.disabled)return"Editing"}},Editing:{_enter(){n(37,rt=JSON.stringify(Array.isArray(F)?F:F?[F]:[])),ie("enteredit")},_exit(){ce.close(),ie("exitedit")},handleKeyboard(pe){},focusout(pe){if(ce.close(),!(Oe!=null&&Oe.contains(pe.relatedTarget))&&Xe)return this.submit(),"View"},submit(){k&&!X.debounce&&(z?ie("change",E):ie("change",E[0]))},cancel(){return"View"}}})}=e;$();let ce=Ft("Closed",{"*":{toggleOption(pe){let _t=N[pe],Bt=E.indexOf(_t);z&&Bt>-1?(E.splice(Bt,1),n(5,E=[...E])):z?n(5,E=[...E,_t]):E[0]==_t?n(5,E.length=0,E):n(5,E[0]=_t,E),(X.debounce||D)&&(clearTimeout(ae),ae=setTimeout(()=>{ie("change",z?E:E[0])},X.debounce??0)),(!z||Ne.length==E.length)&&(Oe==null||Oe.focus())},toggleAll(){Te?n(5,E=[]):n(5,E=[...Ne]),X.debounce&&(clearTimeout(ae),ae=setTimeout(()=>{ie("change",z?E:E[0])},X.debounce??0))},handleKeyboard(pe){pe.keyCode==32&&ce.toggle(),pe.key=="Escape"&&this.cancel(),pe.key=="Enter"&&(z?(this.toggleOption(te,pe.preventDefault()),this.close()):this.toggleOption(te)),pe.key=="ArrowDown"&&this.highlightNext(pe.preventDefault(),pe.stopPropagation()),pe.key=="ArrowUp"&&this.highlightPrevious(pe.preventDefault(),pe.stopPropagation()),pe.key=="Escape"&&this.close(pe.stopPropagation())},highlightNext(){n(11,te+=1),te>N.length-1&&n(11,te=0)},highlightPrevious(){n(11,te-=1),te<0&&n(11,te=N.length-1)}},Open:{_enter(){n(11,te=-1),this.refocus.debounce(10)},_exit(){},filterOptions(pe){pe&&pe.target.value!=""?n(3,Ne=N.filter(_t=>_t==null?void 0:_t.startsWith(pe.target.value))):n(3,Ne=N)},close(){return"Closed"},toggle(){return"Closed"}},Closed:{toggle(){return"Open"},open(){return"Open"},filterOptions(pe){this.open(),this.filterOptions(pe)},handleKeyboard(pe){!X.autocomplete&&i=="select"?(pe.keyCode==32&&(pe.preventDefault(),pe.stopPropagation(),this.toggle()),(pe.key=="Backspace"||pe.key=="Delete")&&(pe.stopPropagation(),n(5,E=[]),ie("change",E))):i!="select"&&((pe.keyCode==32||pe.key=="Enter")&&this.toggleOption(te,pe.preventDefault()),pe.key=="ArrowDown"&&this.highlightNext(pe.preventDefault(),pe.stopPropagation()),pe.key=="ArrowUp"&&this.highlightPrevious(pe.preventDefault(),pe.stopPropagation()),pe.key=="Escape"&&this.close(pe.stopPropagation()))}}});Me(t,ce,pe=>n(28,oe=pe));const re=pe=>j({API:J,datasource:pe,options:{query:q.buildQuery(X.filter),sortColumn:X.sortColumn,sortOrder:X.sortOrder,limit:X.limit||1e3}});le.onMount(()=>{me&&setTimeout(()=>{ke.focus()},30)});function Ae(pe){ti.call(this,t,pe)}function Ue(pe){Xe=pe,n(13,Xe)}const Je=()=>{n(5,E=[]),ce.close(),Oe.focus()},lt=pe=>{n(5,E=[...pe.detail]),Oe.focus()},he=pe=>ce.toggleOption(pe),it=(pe,_t)=>ce.toggleOption(pe),ot=pe=>n(11,te=pe),wt=()=>n(11,te=-1),Ct=(pe,_t)=>ce.toggleOption(pe),ln=pe=>n(11,te=pe),It=()=>n(11,te=-1);function xt(pe){Be[pe?"unshift":"push"](()=>{Oe=pe,n(8,Oe)})}const _e=(pe,_t)=>ce.toggleOption.debounce(150,pe),st=pe=>n(11,te=pe);function we(pe){Be[pe?"unshift":"push"](()=>{de=pe,n(12,de)})}const xe=()=>n(11,te=-1);return t.$$set=pe=>{"cellOptions"in pe&&n(0,X=pe.cellOptions),"value"in pe&&n(33,F=pe.value),"fieldSchema"in pe&&n(34,R=pe.fieldSchema),"multi"in pe&&n(35,z=pe.multi),"autofocus"in pe&&n(36,me=pe.autofocus),"label"in pe&&n(1,se=pe.label),"cellState"in pe&&$(n(2,ke=pe.cellState))},t.$$.update=()=>{t.$$.dirty[0]&1&&n(4,{controlType:i,optionsSource:l,labelColumn:r,valueColumn:o,iconColumn:u,colorColumn:s,customOptions:a,role:f,readonly:c,disabled:g,error:h,color:d,background:_}=X,i,(n(38,l),n(0,X)),(n(42,r),n(0,X)),(n(40,o),n(0,X)),(n(39,u),n(0,X)),(n(41,s),n(0,X)),(n(25,f),n(0,X)),(n(24,c),n(0,X)),(n(23,g),n(0,X)),(n(22,h),n(0,X)),(n(21,d),n(0,X)),(n(20,_),n(0,X))),t.$$.dirty[0]&1&&kt.set(X.datasource),t.$$.dirty[1]&8320&&W(n(19,b=l=="data"?re(Y):K({loaded:!0}))),t.$$.dirty[1]&4&&n(5,E=Array.isArray(F)?F:F?[F]:[]),t.$$.dirty[0]&40&&n(18,w=Ne.length==E.length&&Ne.length>0),t.$$.dirty[0]&4|t.$$.dirty[1]&12168&&ke.refresh(R,l,r,o,u,s,Y),t.$$.dirty[0]&4|t.$$.dirty[1]&4096&&ke.syncFetch(M),t.$$.dirty[0]&128&&n(6,I=ne=="Editing"),t.$$.dirty[0]&96|t.$$.dirty[1]&64&&n(16,k=I&&rt!==JSON.stringify(E)),t.$$.dirty[0]&16&&n(17,O=i=="radio"),t.$$.dirty[0]&16&&n(15,D=i=="buttons"),t.$$.dirty[0]&40&&n(14,Te=Ne.length==E.length)},[X,se,ke,Ne,i,E,I,ne,Oe,Ie,fe,te,de,Xe,Te,D,k,O,w,b,_,d,h,g,c,f,N,G,oe,be,Se,kt,ce,F,R,z,me,rt,l,u,o,s,r,M,Y,Ae,Ue,Je,lt,he,it,ot,wt,Ct,ln,It,xt,_e,st,we,xe]}class Qy extends Ze{constructor(e){super(),Qe(this,e,Xy,Yy,Ye,{cellOptions:0,value:33,fieldSchema:34,multi:35,autofocus:36,label:1,cellState:2},null,[-1,-1,-1])}}function Vl(t,e){if(t==null)return{};var n={},i=Object.keys(t),l,r;for(r=0;r<i.length;r++)l=i[r],!(e.indexOf(l)>=0)&&(n[l]=t[l]);return n}function mt(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return new mt.InputMask(t,e)}class Ot{constructor(e){Object.assign(this,{inserted:"",rawInserted:"",skip:!1,tailShift:0},e)}aggregate(e){return this.rawInserted+=e.rawInserted,this.skip=this.skip||e.skip,this.inserted+=e.inserted,this.tailShift+=e.tailShift,this}get offset(){return this.tailShift+this.inserted.length}}mt.ChangeDetails=Ot;function Bl(t){return typeof t=="string"||t instanceof String}const ut={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function Zy(t){switch(t){case ut.LEFT:return ut.FORCE_LEFT;case ut.RIGHT:return ut.FORCE_RIGHT;default:return t}}function ss(t){return t.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function sr(t){return Array.isArray(t)?t:[t,new Ot]}function xr(t,e){if(e===t)return!0;var n=Array.isArray(e),i=Array.isArray(t),l;if(n&&i){if(e.length!=t.length)return!1;for(l=0;l<e.length;l++)if(!xr(e[l],t[l]))return!1;return!0}if(n!=i)return!1;if(e&&t&&typeof e=="object"&&typeof t=="object"){var r=e instanceof Date,o=t instanceof Date;if(r&&o)return e.getTime()==t.getTime();if(r!=o)return!1;var u=e instanceof RegExp,s=t instanceof RegExp;if(u&&s)return e.toString()==t.toString();if(u!=s)return!1;var a=Object.keys(e);for(l=0;l<a.length;l++)if(!Object.prototype.hasOwnProperty.call(t,a[l]))return!1;for(l=0;l<a.length;l++)if(!xr(t[a[l]],e[a[l]]))return!1;return!0}else if(e&&t&&typeof e=="function"&&typeof t=="function")return e.toString()===t.toString();return!1}class Jy{constructor(e,n,i,l){for(this.value=e,this.cursorPos=n,this.oldValue=i,this.oldSelection=l;this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?ut.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?ut.RIGHT:ut.LEFT}}class mi{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=arguments.length>2?arguments[2]:void 0;this.value=e,this.from=n,this.stop=i}toString(){return this.value}extend(e){this.value+=String(e)}appendTo(e){return e.append(this.toString(),{tail:!0}).aggregate(e._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(e){Object.assign(this,e)}unshift(e){if(!this.value.length||e!=null&&this.from>=e)return"";const n=this.value[0];return this.value=this.value.slice(1),n}shift(){if(!this.value.length)return"";const e=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),e}}class An{constructor(e){this._value="",this._update(Object.assign({},An.DEFAULTS,e)),this.isInitialized=!0}updateOptions(e){Object.keys(e).length&&this.withValueRefresh(this._update.bind(this,e))}_update(e){Object.assign(this,e)}get state(){return{_value:this.value}}set state(e){this._value=e._value}reset(){this._value=""}get value(){return this._value}set value(e){this.resolve(e)}resolve(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{input:!0};return this.reset(),this.append(e,n,""),this.doCommit(),this.value}get unmaskedValue(){return this.value}set unmaskedValue(e){this.reset(),this.append(e,{},""),this.doCommit()}get typedValue(){return this.doParse(this.value)}set typedValue(e){this.value=this.doFormat(e)}get rawInputValue(){return this.extractInput(0,this.value.length,{raw:!0})}set rawInputValue(e){this.reset(),this.append(e,{raw:!0},""),this.doCommit()}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(e,n){return e}totalInputPositions(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length;return Math.min(this.value.length,n-e)}extractInput(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length;return this.value.slice(e,n)}extractTail(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length;return new mi(this.extractInput(e,n),e)}appendTail(e){return Bl(e)&&(e=new mi(String(e))),e.appendTo(this)}_appendCharRaw(e){return e?(this._value+=e,new Ot({inserted:e,rawInserted:e})):new Ot}_appendChar(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;const l=this.state;let r;if([e,r]=sr(this.doPrepare(e,n)),r=r.aggregate(this._appendCharRaw(e,n)),r.inserted){let o,u=this.doValidate(n)!==!1;if(u&&i!=null){const s=this.state;this.overwrite===!0&&(o=i.state,i.unshift(this.value.length-r.tailShift));let a=this.appendTail(i);u=a.rawInserted===i.toString(),!(u&&a.inserted)&&this.overwrite==="shift"&&(this.state=s,o=i.state,i.shift(),a=this.appendTail(i),u=a.rawInserted===i.toString()),u&&a.inserted&&(this.state=s)}u||(r=new Ot,this.state=l,i&&o&&(i.state=o))}return r}_appendPlaceholder(){return new Ot}_appendEager(){return new Ot}append(e,n,i){if(!Bl(e))throw new Error("value should be string");const l=new Ot,r=Bl(i)?new mi(String(i)):i;n!=null&&n.tail&&(n._beforeTailState=this.state);for(let o=0;o<e.length;++o){const u=this._appendChar(e[o],n,r);if(!u.rawInserted&&!this.doSkipInvalid(e[o],n,r))break;l.aggregate(u)}return(this.eager===!0||this.eager==="append")&&n!==null&&n!==void 0&&n.input&&e&&l.aggregate(this._appendEager()),r!=null&&(l.tailShift+=this.appendTail(r).tailShift),l}remove(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length;return this._value=this.value.slice(0,e)+this.value.slice(n),new Ot}withValueRefresh(e){if(this._refreshing||!this.isInitialized)return e();this._refreshing=!0;const n=this.rawInputValue,i=this.value,l=e();return this.rawInputValue=n,this.value&&this.value!==i&&i.indexOf(this.value)===0&&this.append(i.slice(this.value.length),{},""),delete this._refreshing,l}runIsolated(e){if(this._isolated||!this.isInitialized)return e(this);this._isolated=!0;const n=this.state,i=e(this);return this.state=n,delete this._isolated,i}doSkipInvalid(e){return this.skipInvalid}doPrepare(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.prepare?this.prepare(e,this,n):e}doValidate(e){return(!this.validate||this.validate(this.value,this,e))&&(!this.parent||this.parent.doValidate(e))}doCommit(){this.commit&&this.commit(this.value,this)}doFormat(e){return this.format?this.format(e,this):e}doParse(e){return this.parse?this.parse(e,this):e}splice(e,n,i,l){let r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{input:!0};const o=e+n,u=this.extractTail(o),s=this.eager===!0||this.eager==="remove";let a;s&&(l=Zy(l),a=this.extractInput(0,o,{raw:!0}));let f=e;const c=new Ot;if(l!==ut.NONE&&(f=this.nearestInputPos(e,n>1&&e!==0&&!s?ut.NONE:l),c.tailShift=f-e),c.aggregate(this.remove(f)),s&&l!==ut.NONE&&a===this.rawInputValue)if(l===ut.FORCE_LEFT){let g;for(;a===this.rawInputValue&&(g=this.value.length);)c.aggregate(new Ot({tailShift:-1})).aggregate(this.remove(g-1))}else l===ut.FORCE_RIGHT&&u.unshift();return c.aggregate(this.append(i,r,u))}maskEquals(e){return this.mask===e}typedValueEquals(e){const n=this.typedValue;return e===n||An.EMPTY_VALUES.includes(e)&&An.EMPTY_VALUES.includes(n)||this.doFormat(e)===this.doFormat(this.typedValue)}}An.DEFAULTS={format:String,parse:t=>t,skipInvalid:!0},An.EMPTY_VALUES=[void 0,null,""],mt.Masked=An;function eg(t){if(t==null)throw new Error("mask property should be defined");return t instanceof RegExp?mt.MaskedRegExp:Bl(t)?mt.MaskedPattern:t instanceof Date||t===Date?mt.MaskedDate:t instanceof Number||typeof t=="number"||t===Number?mt.MaskedNumber:Array.isArray(t)||t===Array?mt.MaskedDynamic:mt.Masked&&t.prototype instanceof mt.Masked?t:t instanceof mt.Masked?t.constructor:t instanceof Function?mt.MaskedFunction:(console.warn("Mask not found for mask",t),mt.Masked)}function ol(t){if(mt.Masked&&t instanceof mt.Masked)return t;t=Object.assign({},t);const e=t.mask;if(mt.Masked&&e instanceof mt.Masked)return e;const n=eg(e);if(!n)throw new Error("Masked class is not found for provided mask, appropriate module needs to be import manually before creating mask.");return new n(t)}mt.createMask=ol;const xy=["parent","isOptional","placeholderChar","displayChar","lazy","eager"],$y={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class tg{constructor(e){const{parent:n,isOptional:i,placeholderChar:l,displayChar:r,lazy:o,eager:u}=e,s=Vl(e,xy);this.masked=ol(s),Object.assign(this,{parent:n,isOptional:i,placeholderChar:l,displayChar:r,lazy:o,eager:u})}reset(){this.isFilled=!1,this.masked.reset()}remove(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length;return e===0&&n>=1?(this.isFilled=!1,this.masked.remove(e,n)):new Ot}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.isFilled)return new Ot;const i=this.masked.state,l=this.masked._appendChar(e,n);return l.inserted&&this.doValidate(n)===!1&&(l.inserted=l.rawInserted="",this.masked.state=i),!l.inserted&&!this.isOptional&&!this.lazy&&!n.input&&(l.inserted=this.placeholderChar),l.skip=!l.inserted&&!this.isOptional,this.isFilled=!!l.inserted,l}append(){return this.masked.append(...arguments)}_appendPlaceholder(){const e=new Ot;return this.isFilled||this.isOptional||(this.isFilled=!0,e.inserted=this.placeholderChar),e}_appendEager(){return new Ot}extractTail(){return this.masked.extractTail(...arguments)}appendTail(){return this.masked.appendTail(...arguments)}extractInput(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length,i=arguments.length>2?arguments[2]:void 0;return this.masked.extractInput(e,n,i)}nearestInputPos(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ut.NONE;const i=0,l=this.value.length,r=Math.min(Math.max(e,i),l);switch(n){case ut.LEFT:case ut.FORCE_LEFT:return this.isComplete?r:i;case ut.RIGHT:case ut.FORCE_RIGHT:return this.isComplete?r:l;case ut.NONE:default:return r}}totalInputPositions(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length;return this.value.slice(e,n).length}doValidate(){return this.masked.doValidate(...arguments)&&(!this.parent||this.parent.doValidate(...arguments))}doCommit(){this.masked.doCommit()}get state(){return{masked:this.masked.state,isFilled:this.isFilled}}set state(e){this.masked.state=e.masked,this.isFilled=e.isFilled}}class ng{constructor(e){Object.assign(this,e),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._value.length;return this._value=this._value.slice(0,e)+this._value.slice(n),this._value||(this._isRawInput=!1),new Ot}nearestInputPos(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ut.NONE;const i=0,l=this._value.length;switch(n){case ut.LEFT:case ut.FORCE_LEFT:return i;case ut.NONE:case ut.RIGHT:case ut.FORCE_RIGHT:default:return l}}totalInputPositions(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._value.length;return this._isRawInput?n-e:0}extractInput(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._value.length;return(arguments.length>2&&arguments[2]!==void 0?arguments[2]:{}).raw&&this._isRawInput&&this._value.slice(e,n)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=new Ot;if(this.isFilled)return i;const l=this.eager===!0||this.eager==="append",o=this.char===e&&(this.isUnmasking||n.input||n.raw)&&(!n.raw||!l)&&!n.tail;return o&&(i.rawInserted=this.char),this._value=i.inserted=this.char,this._isRawInput=o&&(n.raw||n.input),i}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const e=new Ot;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length,new mi("")}appendTail(e){return Bl(e)&&(e=new mi(String(e))),e.appendTo(this)}append(e,n,i){const l=this._appendChar(e[0],n);return i!=null&&(l.tailShift+=this.appendTail(i).tailShift),l}doCommit(){}get state(){return{_value:this._value,_isRawInput:this._isRawInput}}set state(e){Object.assign(this,e)}}const e3=["chunks"];class sl{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;this.chunks=e,this.from=n}toString(){return this.chunks.map(String).join("")}extend(e){if(!String(e))return;Bl(e)&&(e=new mi(String(e)));const n=this.chunks[this.chunks.length-1],i=n&&(n.stop===e.stop||e.stop==null)&&e.from===n.from+n.toString().length;if(e instanceof mi)i?n.extend(e.toString()):this.chunks.push(e);else if(e instanceof sl){if(e.stop==null){let l;for(;e.chunks.length&&e.chunks[0].stop==null;)l=e.chunks.shift(),l.from+=e.from,this.extend(l)}e.toString()&&(e.stop=e.blockIndex,this.chunks.push(e))}}appendTo(e){if(!(e instanceof mt.MaskedPattern))return new mi(this.toString()).appendTo(e);const n=new Ot;for(let i=0;i<this.chunks.length&&!n.skip;++i){const l=this.chunks[i],r=e._mapPosToBlock(e.value.length),o=l.stop;let u;if(o!=null&&(!r||r.index<=o)){if(l instanceof sl||e._stops.indexOf(o)>=0){const s=e._appendPlaceholder(o);n.aggregate(s)}u=l instanceof sl&&e._blocks[o]}if(u){const s=u.appendTail(l);s.skip=!1,n.aggregate(s),e._value+=s.inserted;const a=l.toString().slice(s.rawInserted.length);a&&n.aggregate(e.append(a,{tail:!0}))}else n.aggregate(e.append(l.toString(),{tail:!0}))}return n}get state(){return{chunks:this.chunks.map(e=>e.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(e){const{chunks:n}=e,i=Vl(e,e3);Object.assign(this,i),this.chunks=n.map(l=>{const r="chunks"in l?new sl:new mi;return r.state=l,r})}unshift(e){if(!this.chunks.length||e!=null&&this.from>=e)return"";const n=e!=null?e-this.from:e;let i=0;for(;i<this.chunks.length;){const l=this.chunks[i],r=l.unshift(n);if(l.toString()){if(!r)break;++i}else this.chunks.splice(i,1);if(r)return r}return""}shift(){if(!this.chunks.length)return"";let e=this.chunks.length-1;for(;0<=e;){const n=this.chunks[e],i=n.shift();if(n.toString()){if(!i)break;--e}else this.chunks.splice(e,1);if(i)return i}return""}}class t3{constructor(e,n){this.masked=e,this._log=[];const{offset:i,index:l}=e._mapPosToBlock(n)||(n<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=i,this.index=l,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(e){Object.assign(this,e)}pushState(){this._log.push(this.state)}popState(){const e=this._log.pop();return this.state=e,e}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.value.length))}_pushLeft(e){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((n=this.block)===null||n===void 0?void 0:n.value.length)||0){var n;if(e())return this.ok=!0}return this.ok=!1}_pushRight(e){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(e())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,ut.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,ut.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,ut.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,ut.FORCE_RIGHT),this.offset!==this.block.value.length))return!0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,ut.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,ut.NONE),!0})}}class n3 extends An{_update(e){e.mask&&(e.validate=n=>n.search(e.mask)>=0),super._update(e)}}mt.MaskedRegExp=n3;const i3=["_blocks"];class Pn extends An{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.definitions=Object.assign({},$y,e.definitions),super(Object.assign({},Pn.DEFAULTS,e))}_update(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.definitions=Object.assign({},this.definitions,e.definitions),super._update(e),this._rebuildMask()}_rebuildMask(){const e=this.definitions;this._blocks=[],this._stops=[],this._maskedBlocks={};let n=this.mask;if(!n||!e)return;let i=!1,l=!1;for(let u=0;u<n.length;++u){var r,o;if(this.blocks){const g=n.slice(u),h=Object.keys(this.blocks).filter(_=>g.indexOf(_)===0);h.sort((_,b)=>b.length-_.length);const d=h[0];if(d){const _=ol(Object.assign({parent:this,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite},this.blocks[d]));_&&(this._blocks.push(_),this._maskedBlocks[d]||(this._maskedBlocks[d]=[]),this._maskedBlocks[d].push(this._blocks.length-1)),u+=d.length-1;continue}}let s=n[u],a=s in e;if(s===Pn.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(s==="{"||s==="}"){i=!i;continue}if(s==="["||s==="]"){l=!l;continue}if(s===Pn.ESCAPE_CHAR){if(++u,s=n[u],!s)break;a=!1}const f=(r=e[s])!==null&&r!==void 0&&r.mask&&!(((o=e[s])===null||o===void 0?void 0:o.mask.prototype)instanceof mt.Masked)?e[s]:{mask:e[s]},c=a?new tg(Object.assign({parent:this,isOptional:l,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar},f)):new ng({char:s,eager:this.eager,isUnmasking:i});this._blocks.push(c)}}get state(){return Object.assign({},super.state,{_blocks:this._blocks.map(e=>e.state)})}set state(e){const{_blocks:n}=e,i=Vl(e,i3);this._blocks.forEach((l,r)=>l.state=n[r]),super.state=i}reset(){super.reset(),this._blocks.forEach(e=>e.reset())}get isComplete(){return this._blocks.every(e=>e.isComplete)}get isFilled(){return this._blocks.every(e=>e.isFilled)}get isFixed(){return this._blocks.every(e=>e.isFixed)}get isOptional(){return this._blocks.every(e=>e.isOptional)}doCommit(){this._blocks.forEach(e=>e.doCommit()),super.doCommit()}get unmaskedValue(){return this._blocks.reduce((e,n)=>e+=n.unmaskedValue,"")}set unmaskedValue(e){super.unmaskedValue=e}get value(){return this._blocks.reduce((e,n)=>e+=n.value,"")}set value(e){super.value=e}get displayValue(){return this._blocks.reduce((e,n)=>e+=n.displayValue,"")}appendTail(e){return super.appendTail(e).aggregate(this._appendPlaceholder())}_appendEager(){var e;const n=new Ot;let i=(e=this._mapPosToBlock(this.value.length))===null||e===void 0?void 0:e.index;if(i==null)return n;this._blocks[i].isFilled&&++i;for(let l=i;l<this._blocks.length;++l){const r=this._blocks[l]._appendEager();if(!r.inserted)break;n.aggregate(r)}return n}_appendCharRaw(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=this._mapPosToBlock(this.value.length),l=new Ot;if(!i)return l;for(let u=i.index;;++u){var r,o;const s=this._blocks[u];if(!s)break;const a=s._appendChar(e,Object.assign({},n,{_beforeTailState:(r=n._beforeTailState)===null||r===void 0||(o=r._blocks)===null||o===void 0?void 0:o[u]})),f=a.skip;if(l.aggregate(a),f||a.rawInserted)break}return l}extractTail(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length;const i=new sl;return e===n||this._forEachBlocksInRange(e,n,(l,r,o,u)=>{const s=l.extractTail(o,u);s.stop=this._findStopBefore(r),s.from=this._blockStartPos(r),s instanceof sl&&(s.blockIndex=r),i.extend(s)}),i}extractInput(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(e===n)return"";let l="";return this._forEachBlocksInRange(e,n,(r,o,u,s)=>{l+=r.extractInput(u,s,i)}),l}_findStopBefore(e){let n;for(let i=0;i<this._stops.length;++i){const l=this._stops[i];if(l<=e)n=l;else break}return n}_appendPlaceholder(e){const n=new Ot;if(this.lazy&&e==null)return n;const i=this._mapPosToBlock(this.value.length);if(!i)return n;const l=i.index,r=e??this._blocks.length;return this._blocks.slice(l,r).forEach(o=>{if(!o.lazy||e!=null){const u=o._blocks!=null?[o._blocks.length]:[],s=o._appendPlaceholder(...u);this._value+=s.inserted,n.aggregate(s)}}),n}_mapPosToBlock(e){let n="";for(let i=0;i<this._blocks.length;++i){const l=this._blocks[i],r=n.length;if(n+=l.value,e<=n.length)return{index:i,offset:e-r}}}_blockStartPos(e){return this._blocks.slice(0,e).reduce((n,i)=>n+=i.value.length,0)}_forEachBlocksInRange(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length,i=arguments.length>2?arguments[2]:void 0;const l=this._mapPosToBlock(e);if(l){const r=this._mapPosToBlock(n),o=r&&l.index===r.index,u=l.offset,s=r&&o?r.offset:this._blocks[l.index].value.length;if(i(this._blocks[l.index],l.index,u,s),r&&!o){for(let a=l.index+1;a<r.index;++a)i(this._blocks[a],a,0,this._blocks[a].value.length);i(this._blocks[r.index],r.index,0,r.offset)}}}remove(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length;const i=super.remove(e,n);return this._forEachBlocksInRange(e,n,(l,r,o,u)=>{i.aggregate(l.remove(o,u))}),i}nearestInputPos(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ut.NONE;if(!this._blocks.length)return 0;const i=new t3(this,e);if(n===ut.NONE)return i.pushRightBeforeInput()||(i.popState(),i.pushLeftBeforeInput())?i.pos:this.value.length;if(n===ut.LEFT||n===ut.FORCE_LEFT){if(n===ut.LEFT){if(i.pushRightBeforeFilled(),i.ok&&i.pos===e)return e;i.popState()}if(i.pushLeftBeforeInput(),i.pushLeftBeforeRequired(),i.pushLeftBeforeFilled(),n===ut.LEFT){if(i.pushRightBeforeInput(),i.pushRightBeforeRequired(),i.ok&&i.pos<=e||(i.popState(),i.ok&&i.pos<=e))return i.pos;i.popState()}return i.ok?i.pos:n===ut.FORCE_LEFT?0:(i.popState(),i.ok||(i.popState(),i.ok)?i.pos:0)}return n===ut.RIGHT||n===ut.FORCE_RIGHT?(i.pushRightBeforeInput(),i.pushRightBeforeRequired(),i.pushRightBeforeFilled()?i.pos:n===ut.FORCE_RIGHT?this.value.length:(i.popState(),i.ok||(i.popState(),i.ok)?i.pos:this.nearestInputPos(e,ut.LEFT))):e}totalInputPositions(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length,i=0;return this._forEachBlocksInRange(e,n,(l,r,o,u)=>{i+=l.totalInputPositions(o,u)}),i}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){const n=this._maskedBlocks[e];return n?n.map(i=>this._blocks[i]):[]}}Pn.DEFAULTS={lazy:!0,placeholderChar:"_"},Pn.STOP_CHAR="`",Pn.ESCAPE_CHAR="\\",Pn.InputDefinition=tg,Pn.FixedDefinition=ng,mt.MaskedPattern=Pn;class $r extends Pn{get _matchFrom(){return this.maxLength-String(this.from).length}_update(e){e=Object.assign({to:this.to||0,from:this.from||0,maxLength:this.maxLength||0},e);let n=String(e.to).length;e.maxLength!=null&&(n=Math.max(n,e.maxLength)),e.maxLength=n;const i=String(e.from).padStart(n,"0"),l=String(e.to).padStart(n,"0");let r=0;for(;r<l.length&&l[r]===i[r];)++r;e.mask=l.slice(0,r).replace(/0/g,"\\0")+"0".repeat(n-r),super._update(e)}get isComplete(){return super.isComplete&&!!this.value}boundaries(e){let n="",i="";const[,l,r]=e.match(/^(\D*)(\d*)(\D*)/)||[];return r&&(n="0".repeat(l.length)+r,i="9".repeat(l.length)+r),n=n.padEnd(this.maxLength,"0"),i=i.padEnd(this.maxLength,"9"),[n,i]}doPrepare(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i;if([e,i]=sr(super.doPrepare(e.replace(/\D/g,""),n)),!this.autofix||!e)return e;const l=String(this.from).padStart(this.maxLength,"0"),r=String(this.to).padStart(this.maxLength,"0");let o=this.value+e;if(o.length>this.maxLength)return"";const[u,s]=this.boundaries(o);return Number(s)<this.from?l[o.length-1]:Number(u)>this.to?this.autofix==="pad"&&o.length<this.maxLength?["",i.aggregate(this.append(l[o.length-1]+e,n))]:r[o.length-1]:e}doValidate(){const e=this.value;if(e.search(/[^0]/)===-1&&e.length<=this._matchFrom)return!0;const[i,l]=this.boundaries(e);return this.from<=Number(l)&&Number(i)<=this.to&&super.doValidate(...arguments)}}mt.MaskedRange=$r;class Ul extends Pn{constructor(e){super(Object.assign({},Ul.DEFAULTS,e))}_update(e){e.mask===Date&&delete e.mask,e.pattern&&(e.mask=e.pattern);const n=e.blocks;e.blocks=Object.assign({},Ul.GET_DEFAULT_BLOCKS()),e.min&&(e.blocks.Y.from=e.min.getFullYear()),e.max&&(e.blocks.Y.to=e.max.getFullYear()),e.min&&e.max&&e.blocks.Y.from===e.blocks.Y.to&&(e.blocks.m.from=e.min.getMonth()+1,e.blocks.m.to=e.max.getMonth()+1,e.blocks.m.from===e.blocks.m.to&&(e.blocks.d.from=e.min.getDate(),e.blocks.d.to=e.max.getDate())),Object.assign(e.blocks,this.blocks,n),Object.keys(e.blocks).forEach(i=>{const l=e.blocks[i];!("autofix"in l)&&"autofix"in e&&(l.autofix=e.autofix)}),super._update(e)}doValidate(){const e=this.date;return super.doValidate(...arguments)&&(!this.isComplete||this.isDateExist(this.value)&&e!=null&&(this.min==null||this.min<=e)&&(this.max==null||e<=this.max))}isDateExist(e){return this.format(this.parse(e,this),this).indexOf(e)>=0}get date(){return this.typedValue}set date(e){this.typedValue=e}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(e){super.typedValue=e}maskEquals(e){return e===Date||super.maskEquals(e)}}Ul.DEFAULTS={pattern:"d{.}`m{.}`Y",format:t=>{if(!t)return"";const e=String(t.getDate()).padStart(2,"0"),n=String(t.getMonth()+1).padStart(2,"0"),i=t.getFullYear();return[e,n,i].join(".")},parse:t=>{const[e,n,i]=t.split(".");return new Date(i,n-1,e)}},Ul.GET_DEFAULT_BLOCKS=()=>({d:{mask:$r,from:1,to:31,maxLength:2},m:{mask:$r,from:1,to:12,maxLength:2},Y:{mask:$r,from:1900,to:9999}}),mt.MaskedDate=Ul;class us{get selectionStart(){let e;try{e=this._unsafeSelectionStart}catch{}return e??this.value.length}get selectionEnd(){let e;try{e=this._unsafeSelectionEnd}catch{}return e??this.value.length}select(e,n){if(!(e==null||n==null||e===this.selectionStart&&n===this.selectionEnd))try{this._unsafeSelect(e,n)}catch{}}_unsafeSelect(e,n){}get isActive(){return!1}bindEvents(e){}unbindEvents(){}}mt.MaskElement=us;class Hl extends us{constructor(e){super(),this.input=e,this._handlers={}}get rootElement(){var e,n,i;return(e=(n=(i=this.input).getRootNode)===null||n===void 0?void 0:n.call(i))!==null&&e!==void 0?e:document}get isActive(){return this.input===this.rootElement.activeElement}get _unsafeSelectionStart(){return this.input.selectionStart}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(e,n){this.input.setSelectionRange(e,n)}get value(){return this.input.value}set value(e){this.input.value=e}bindEvents(e){Object.keys(e).forEach(n=>this._toggleEventHandler(Hl.EVENTS_MAP[n],e[n]))}unbindEvents(){Object.keys(this._handlers).forEach(e=>this._toggleEventHandler(e))}_toggleEventHandler(e,n){this._handlers[e]&&(this.input.removeEventListener(e,this._handlers[e]),delete this._handlers[e]),n&&(this.input.addEventListener(e,n),this._handlers[e]=n)}}Hl.EVENTS_MAP={selectionChange:"keydown",input:"input",drop:"drop",click:"click",focus:"focus",commit:"blur"},mt.HTMLMaskElement=Hl;class ig extends Hl{get _unsafeSelectionStart(){const e=this.rootElement,n=e.getSelection&&e.getSelection(),i=n&&n.anchorOffset,l=n&&n.focusOffset;return l==null||i==null||i<l?i:l}get _unsafeSelectionEnd(){const e=this.rootElement,n=e.getSelection&&e.getSelection(),i=n&&n.anchorOffset,l=n&&n.focusOffset;return l==null||i==null||i>l?i:l}_unsafeSelect(e,n){if(!this.rootElement.createRange)return;const i=this.rootElement.createRange();i.setStart(this.input.firstChild||this.input,e),i.setEnd(this.input.lastChild||this.input,n);const l=this.rootElement,r=l.getSelection&&l.getSelection();r&&(r.removeAllRanges(),r.addRange(i))}get value(){return this.input.textContent}set value(e){this.input.textContent=e}}mt.HTMLContenteditableMaskElement=ig;const l3=["mask"];class r3{constructor(e,n){this.el=e instanceof us?e:e.isContentEditable&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"?new ig(e):new Hl(e),this.masked=ol(n),this._listeners={},this._value="",this._unmaskedValue="",this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}get mask(){return this.masked.mask}maskEquals(e){var n;return e==null||((n=this.masked)===null||n===void 0?void 0:n.maskEquals(e))}set mask(e){if(this.maskEquals(e))return;if(!(e instanceof mt.Masked)&&this.masked.constructor===eg(e)){this.masked.updateOptions({mask:e});return}const n=ol({mask:e});n.unmaskedValue=this.masked.unmaskedValue,this.masked=n}get value(){return this._value}set value(e){this.value!==e&&(this.masked.value=e,this.updateControl(),this.alignCursor())}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(e){this.unmaskedValue!==e&&(this.masked.unmaskedValue=e,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(e){this.masked.typedValueEquals(e)||(this.masked.typedValue=e,this.updateControl(),this.alignCursor())}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),l=1;l<n;l++)i[l-1]=arguments[l];const r=this._listeners[e];r&&r.forEach(o=>o(...i))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(e){!this.el||!this.el.isActive||(this.el.select(e,e),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value}updateControl(){const e=this.masked.unmaskedValue,n=this.masked.value,i=this.displayValue,l=this.unmaskedValue!==e||this.value!==n;this._unmaskedValue=e,this._value=n,this.el.value!==i&&(this.el.value=i),l&&this._fireChangeEvents()}updateOptions(e){const{mask:n}=e,i=Vl(e,l3),l=!this.maskEquals(n),r=!xr(this.masked,i);l&&(this.mask=n),r&&this.masked.updateOptions(i),(l||r)&&this.updateControl()}updateCursor(e){e!=null&&(this.cursorPos=e,this._delayUpdateCursor(e))}_delayUpdateCursor(e){this._abortUpdateCursor(),this._changingCursorPos=e,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,ut.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(e,n){return this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(n),this}off(e,n){if(!this._listeners[e])return this;if(!n)return delete this._listeners[e],this;const i=this._listeners[e].indexOf(n);return i>=0&&this._listeners[e].splice(i,1),this}_onInput(e){if(this._inputEvent=e,this._abortUpdateCursor(),!this._selection)return this.updateValue();const n=new Jy(this.el.value,this.cursorPos,this.displayValue,this._selection),i=this.masked.rawInputValue,l=this.masked.splice(n.startChangePos,n.removed.length,n.inserted,n.removeDirection,{input:!0,raw:!0}).offset,r=i===this.masked.rawInputValue?n.removeDirection:ut.NONE;let o=this.masked.nearestInputPos(n.startChangePos+l,r);r!==ut.NONE&&(o=this.masked.nearestInputPos(o,ut.NONE)),this.updateControl(),this.updateCursor(o),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(e){e.preventDefault(),e.stopPropagation()}_onFocus(e){this.alignCursorFriendly()}_onClick(e){this.alignCursorFriendly()}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}mt.InputMask=r3;class o3 extends Pn{_update(e){e.enum&&(e.mask="*".repeat(e.enum[0].length)),super._update(e)}doValidate(){return this.enum.some(e=>e.indexOf(this.unmaskedValue)>=0)&&super.doValidate(...arguments)}}mt.MaskedEnum=o3;class Yn extends An{constructor(e){super(Object.assign({},Yn.DEFAULTS,e))}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){let e="^"+(this.allowNegative?"[+|\\-]?":""),n="\\d*",i=(this.scale?"(".concat(ss(this.radix),"\\d{0,").concat(this.scale,"})?"):"")+"$";this._numberRegExp=new RegExp(e+n+i),this._mapToRadixRegExp=new RegExp("[".concat(this.mapToRadix.map(ss).join(""),"]"),"g"),this._thousandsSeparatorRegExp=new RegExp(ss(this.thousandsSeparator),"g")}_removeThousandsSeparators(e){return e.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(e){const n=e.split(this.radix);return n[0]=n[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),n.join(this.radix)}doPrepare(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};e=this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(n.input&&n.raw||!n.input&&!n.raw)?e.replace(this._mapToRadixRegExp,this.radix):e);const[i,l]=sr(super.doPrepare(e,n));return e&&!i&&(l.skip=!0),[i,l]}_separatorsCount(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=0;for(let l=0;l<e;++l)this._value.indexOf(this.thousandsSeparator,l)===l&&(++i,n&&(e+=this.thousandsSeparator.length));return i}_separatorsCountFromSlice(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this._value;return this._separatorsCount(this._removeThousandsSeparators(e).length,!0)}extractInput(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length,i=arguments.length>2?arguments[2]:void 0;return[e,n]=this._adjustRangeWithSeparators(e,n),this._removeThousandsSeparators(super.extractInput(e,n,i))}_appendCharRaw(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.thousandsSeparator)return super._appendCharRaw(e,n);const i=n.tail&&n._beforeTailState?n._beforeTailState._value:this._value,l=this._separatorsCountFromSlice(i);this._value=this._removeThousandsSeparators(this.value);const r=super._appendCharRaw(e,n);this._value=this._insertThousandsSeparators(this._value);const o=n.tail&&n._beforeTailState?n._beforeTailState._value:this._value,u=this._separatorsCountFromSlice(o);return r.tailShift+=(u-l)*this.thousandsSeparator.length,r.skip=!r.rawInserted&&e===this.thousandsSeparator,r}_findSeparatorAround(e){if(this.thousandsSeparator){const n=e-this.thousandsSeparator.length+1,i=this.value.indexOf(this.thousandsSeparator,n);if(i<=e)return i}return-1}_adjustRangeWithSeparators(e,n){const i=this._findSeparatorAround(e);i>=0&&(e=i);const l=this._findSeparatorAround(n);return l>=0&&(n=l+this.thousandsSeparator.length),[e,n]}remove(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length;[e,n]=this._adjustRangeWithSeparators(e,n);const i=this.value.slice(0,e),l=this.value.slice(n),r=this._separatorsCount(i.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(i+l));const o=this._separatorsCountFromSlice(i);return new Ot({tailShift:(o-r)*this.thousandsSeparator.length})}nearestInputPos(e,n){if(!this.thousandsSeparator)return e;switch(n){case ut.NONE:case ut.LEFT:case ut.FORCE_LEFT:{const i=this._findSeparatorAround(e-1);if(i>=0){const l=i+this.thousandsSeparator.length;if(e<l||this.value.length<=l||n===ut.FORCE_LEFT)return i}break}case ut.RIGHT:case ut.FORCE_RIGHT:{const i=this._findSeparatorAround(e);if(i>=0)return i+this.thousandsSeparator.length}}return e}doValidate(e){let n=!!this._removeThousandsSeparators(this.value).match(this._numberRegExp);if(n){const i=this.number;n=n&&!isNaN(i)&&(this.min==null||this.min>=0||this.min<=this.number)&&(this.max==null||this.max<=0||this.number<=this.max)}return n&&super.doValidate(e)}doCommit(){if(this.value){const e=this.number;let n=e;this.min!=null&&(n=Math.max(n,this.min)),this.max!=null&&(n=Math.min(n,this.max)),n!==e&&(this.unmaskedValue=this.doFormat(n));let i=this.value;this.normalizeZeros&&(i=this._normalizeZeros(i)),this.padFractionalZeros&&this.scale>0&&(i=this._padFractionalZeros(i)),this._value=i}super.doCommit()}_normalizeZeros(e){const n=this._removeThousandsSeparators(e).split(this.radix);return n[0]=n[0].replace(/^(\D*)(0*)(\d*)/,(i,l,r,o)=>l+o),e.length&&!/\d$/.test(n[0])&&(n[0]=n[0]+"0"),n.length>1&&(n[1]=n[1].replace(/0*$/,""),n[1].length||(n.length=1)),this._insertThousandsSeparators(n.join(this.radix))}_padFractionalZeros(e){if(!e)return e;const n=e.split(this.radix);return n.length<2&&n.push(""),n[1]=n[1].padEnd(this.scale,"0"),n.join(this.radix)}doSkipInvalid(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;const l=this.scale===0&&e!==this.thousandsSeparator&&(e===this.radix||e===Yn.UNMASKED_RADIX||this.mapToRadix.includes(e));return super.doSkipInvalid(e,n,i)&&!l}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,Yn.UNMASKED_RADIX)}set unmaskedValue(e){super.unmaskedValue=e}get typedValue(){return this.doParse(this.unmaskedValue)}set typedValue(e){this.rawInputValue=this.doFormat(e).replace(Yn.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(e){this.typedValue=e}get allowNegative(){return this.signed||this.min!=null&&this.min<0||this.max!=null&&this.max<0}typedValueEquals(e){return(super.typedValueEquals(e)||Yn.EMPTY_VALUES.includes(e)&&Yn.EMPTY_VALUES.includes(this.typedValue))&&!(e===0&&this.value==="")}}Yn.UNMASKED_RADIX=".",Yn.DEFAULTS={radix:",",thousandsSeparator:"",mapToRadix:[Yn.UNMASKED_RADIX],scale:2,signed:!1,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:t=>t.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})},Yn.EMPTY_VALUES=[...An.EMPTY_VALUES,0],mt.MaskedNumber=Yn;class s3 extends An{_update(e){e.mask&&(e.validate=e.mask),super._update(e)}}mt.MaskedFunction=s3;const u3=["compiledMasks","currentMaskRef","currentMask"],a3=["mask"];class eo extends An{constructor(e){super(Object.assign({},eo.DEFAULTS,e)),this.currentMask=null}_update(e){super._update(e),"mask"in e&&(this.compiledMasks=Array.isArray(e.mask)?e.mask.map(n=>ol(n)):[])}_appendCharRaw(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=this._applyDispatch(e,n);return this.currentMask&&i.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(n))),i}_applyDispatch(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"";const l=n.tail&&n._beforeTailState!=null?n._beforeTailState._value:this.value,r=this.rawInputValue,o=n.tail&&n._beforeTailState!=null?n._beforeTailState._rawInputValue:r,u=r.slice(o.length),s=this.currentMask,a=new Ot,f=s==null?void 0:s.state;if(this.currentMask=this.doDispatch(e,Object.assign({},n),i),this.currentMask)if(this.currentMask!==s){if(this.currentMask.reset(),o){const c=this.currentMask.append(o,{raw:!0});a.tailShift=c.inserted.length-l.length}u&&(a.tailShift+=this.currentMask.append(u,{raw:!0,tail:!0}).tailShift)}else this.currentMask.state=f;return a}_appendPlaceholder(){const e=this._applyDispatch(...arguments);return this.currentMask&&e.aggregate(this.currentMask._appendPlaceholder()),e}_appendEager(){const e=this._applyDispatch(...arguments);return this.currentMask&&e.aggregate(this.currentMask._appendEager()),e}appendTail(e){const n=new Ot;return e&&n.aggregate(this._applyDispatch("",{},e)),n.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){var n,i;return Object.assign({},e,{_beforeTailState:((n=e._beforeTailState)===null||n===void 0?void 0:n.currentMaskRef)===this.currentMask&&((i=e._beforeTailState)===null||i===void 0?void 0:i.currentMask)||e._beforeTailState})}doDispatch(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"";return this.dispatch(e,this,n,i)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},[i,l]=sr(super.doPrepare(e,n));if(this.currentMask){let r;[i,r]=sr(super.doPrepare(i,this.currentMaskFlags(n))),l=l.aggregate(r)}return[i,l]}reset(){var e;(e=this.currentMask)===null||e===void 0||e.reset(),this.compiledMasks.forEach(n=>n.reset())}get value(){return this.currentMask?this.currentMask.value:""}set value(e){super.value=e}get unmaskedValue(){return this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(e){super.unmaskedValue=e}get typedValue(){return this.currentMask?this.currentMask.typedValue:""}set typedValue(e){let n=String(e);this.currentMask&&(this.currentMask.typedValue=e,n=this.currentMask.unmaskedValue),this.unmaskedValue=n}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var e;return!!(!((e=this.currentMask)===null||e===void 0)&&e.isComplete)}get isFilled(){var e;return!!(!((e=this.currentMask)===null||e===void 0)&&e.isFilled)}remove(){const e=new Ot;return this.currentMask&&e.aggregate(this.currentMask.remove(...arguments)).aggregate(this._applyDispatch()),e}get state(){var e;return Object.assign({},super.state,{_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(n=>n.state),currentMaskRef:this.currentMask,currentMask:(e=this.currentMask)===null||e===void 0?void 0:e.state})}set state(e){const{compiledMasks:n,currentMaskRef:i,currentMask:l}=e,r=Vl(e,u3);this.compiledMasks.forEach((o,u)=>o.state=n[u]),i!=null&&(this.currentMask=i,this.currentMask.state=l),super.state=r}extractInput(){return this.currentMask?this.currentMask.extractInput(...arguments):""}extractTail(){return this.currentMask?this.currentMask.extractTail(...arguments):super.extractTail(...arguments)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(){return this.currentMask?this.currentMask.nearestInputPos(...arguments):super.nearestInputPos(...arguments)}get overwrite(){return this.currentMask?this.currentMask.overwrite:super.overwrite}set overwrite(e){console.warn('"overwrite" option is not available in dynamic mask, use this option in siblings')}get eager(){return this.currentMask?this.currentMask.eager:super.eager}set eager(e){console.warn('"eager" option is not available in dynamic mask, use this option in siblings')}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:super.skipInvalid}set skipInvalid(e){(this.isInitialized||e!==An.DEFAULTS.skipInvalid)&&console.warn('"skipInvalid" option is not available in dynamic mask, use this option in siblings')}maskEquals(e){return Array.isArray(e)&&this.compiledMasks.every((n,i)=>{if(!e[i])return;const l=e[i],{mask:r}=l,o=Vl(l,a3);return xr(n,o)&&n.maskEquals(r)})}typedValueEquals(e){var n;return!!(!((n=this.currentMask)===null||n===void 0)&&n.typedValueEquals(e))}}eo.DEFAULTS={dispatch:(t,e,n,i)=>{if(!e.compiledMasks.length)return;const l=e.rawInputValue,r=e.compiledMasks.map((o,u)=>{const s=e.currentMask===o,a=s?o.value.length:o.nearestInputPos(o.value.length,ut.FORCE_LEFT);return o.rawInputValue!==l?(o.reset(),o.append(l,{raw:!0})):s||o.remove(a),o.append(t,e.currentMaskFlags(n)),o.appendTail(i),{index:u,weight:o.rawInputValue.length,totalInputPositions:o.totalInputPositions(0,Math.max(a,o.nearestInputPos(o.value.length,ut.FORCE_LEFT)))}});return r.sort((o,u)=>u.weight-o.weight||u.totalInputPositions-o.totalInputPositions),e.compiledMasks[r[0].index]}},mt.MaskedDynamic=eo;const as={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function lg(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:as.MASKED,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:as.MASKED;const i=ol(t);return l=>i.runIsolated(r=>(r[e]=l,r[n]))}function f3(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return lg(...n)(t)}mt.PIPE_TYPE=as,mt.createPipe=lg,mt.pipe=f3;try{globalThis.IMask=mt}catch{}function rg(t){let e,n;return{c(){e=v("i"),m(e,"class",n=t[10]+" field-icon"),p(e,"with-error",t[5])},m(i,l){A(i,e,l)},p(i,l){l&1024&&n!==(n=i[10]+" field-icon")&&m(e,"class",n),l&1056&&p(e,"with-error",i[5])},d(i){i&&C(e)}}}function c3(t){let e,n,i=(t[13](t[4])||t[11])+"",l,r,o,u;return{c(){e=v("div"),n=v("span"),l=Ee(i),m(e,"class","value"),m(e,"tabindex",r=t[1].readonly||t[1].disabled?"-1":"0"),p(e,"with-icon",t[1].icon),p(e,"placeholder",!t[0]),P(e,"justify-content",t[1].align)},m(s,a){A(s,e,a),S(e,n),S(n,l),o||(u=B(e,"focusin",function(){Ge(t[3].focus)&&t[3].focus.apply(this,arguments)}),o=!0)},p(s,a){t=s,a&2064&&i!==(i=(t[13](t[4])||t[11])+"")&&Pe(l,i),a&2&&r!==(r=t[1].readonly||t[1].disabled?"-1":"0")&&m(e,"tabindex",r),a&2&&p(e,"with-icon",t[1].icon),a&1&&p(e,"placeholder",!t[0]),a&2&&P(e,"justify-content",t[1].align)},d(s){s&&C(e),o=!1,u()}}}function d3(t){var s;let e,n,i,l,r,o,u=t[4]&&((s=t[1])==null?void 0:s.clearIcon)!==!1&&og(t);return{c(){e=v("input"),i=Q(),u&&u.c(),l=Fe(),m(e,"tabindex","0"),m(e,"class","editor"),m(e,"placeholder",t[11]),p(e,"with-icon",t[1].icon),P(e,"color",t[8]?t[1].color:"var(--spectrum-global-color-gray-700)"),P(e,"text-align",t[1].align=="center"?"center":t[1].align=="flex-end"?"right":"left"),P(e,"padding-right",t[1].align!="flex-start"?"2rem":"0.75rem")},m(a,f){A(a,e,f),t[18](e),A(a,i,f),u&&u.m(a,f),A(a,l,f),r||(o=[B(e,"focusout",function(){Ge(t[3].focusout)&&t[3].focusout.apply(this,arguments)}),B(e,"keydown",function(){Ge(t[3].handleKeyboard)&&t[3].handleKeyboard.apply(this,arguments)}),tn(t[14].call(null,e)),tn(n=t[15].call(null,e,t[2]))],r=!0)},p(a,f){var c;t=a,f&2048&&m(e,"placeholder",t[11]),n&&Ge(n.update)&&f&4&&n.update.call(null,t[2]),f&2&&p(e,"with-icon",t[1].icon),f&258&&P(e,"color",t[8]?t[1].color:"var(--spectrum-global-color-gray-700)"),f&2&&P(e,"text-align",t[1].align=="center"?"center":t[1].align=="flex-end"?"right":"left"),f&2&&P(e,"padding-right",t[1].align!="flex-start"?"2rem":"0.75rem"),t[4]&&((c=t[1])==null?void 0:c.clearIcon)!==!1?u?u.p(t,f):(u=og(t),u.c(),u.m(l.parentNode,l)):u&&(u.d(1),u=null)},d(a){a&&(C(e),C(i),C(l)),t[18](null),u&&u.d(a),r=!1,Ve(o)}}}function og(t){let e,n,i;return{c(){e=v("i"),m(e,"class","ri-close-line clearIcon")},m(l,r){A(l,e,r),n||(i=B(e,"mousedown",Ii(Et(function(){Ge(t[3].clear)&&t[3].clear.apply(this,arguments)}))),n=!0)},p(l,r){t=l},d(l){l&&C(e),n=!1,i()}}}function h3(t){let e,n,i=t[10]&&rg(t);function l(u,s){return u[12]?d3:c3}let r=l(t),o=r(t);return{c(){e=v("div"),i&&i.c(),n=Q(),o.c(),m(e,"class","superCell"),p(e,"inEdit",t[12]),p(e,"isDirty",t[7]&&t[1].showDirty),p(e,"focused",t[12]),p(e,"inline",t[1].role=="inlineInput"),p(e,"tableCell",t[1].role=="tableCell"),p(e,"formInput",t[1].role=="formInput"),p(e,"disabled",t[1].disabled),p(e,"readonly",t[1].readonly),p(e,"error",t[1].error||t[4]&&t[2]&&!t[8]),p(e,"complete",t[8]),P(e,"color",t[1].color),P(e,"background",t[6]=="Editing"&&t[1].role!="inline"?"var(--spectrum-global-color-gray-50)":t[1].background),P(e,"font-weight",t[1].fontWeight)},m(u,s){A(u,e,s),i&&i.m(e,null),S(e,n),o.m(e,null)},p(u,[s]){u[10]?i?i.p(u,s):(i=rg(u),i.c(),i.m(e,n)):i&&(i.d(1),i=null),r===(r=l(u))&&o?o.p(u,s):(o.d(1),o=r(u),o&&(o.c(),o.m(e,null))),s&4096&&p(e,"inEdit",u[12]),s&130&&p(e,"isDirty",u[7]&&u[1].showDirty),s&4096&&p(e,"focused",u[12]),s&2&&p(e,"inline",u[1].role=="inlineInput"),s&2&&p(e,"tableCell",u[1].role=="tableCell"),s&2&&p(e,"formInput",u[1].role=="formInput"),s&2&&p(e,"disabled",u[1].disabled),s&2&&p(e,"readonly",u[1].readonly),s&278&&p(e,"error",u[1].error||u[4]&&u[2]&&!u[8]),s&256&&p(e,"complete",u[8]),s&2&&P(e,"color",u[1].color),s&66&&P(e,"background",u[6]=="Editing"&&u[1].role!="inline"?"var(--spectrum-global-color-gray-50)":u[1].background),s&2&&P(e,"font-weight",u[1].fontWeight)},i:ue,o:ue,d(u){u&&C(e),i&&i.d(),o.d()}}}function g3(t,e,n){let i,l,r,o,u,s=ue,a=()=>(s(),s=ft(M,H=>n(6,u=H)),M);t.$$.on_destroy.push(()=>s());const f=le.createEventDispatcher();let{value:c}=e,{cellOptions:g={role:"formInput",initialState:"Editing",debounce:250,placeholder:""}}=e,{autofocus:h}=e,{mask:d=""}=e,_,b,w=c,E=!1,k=!1,I,O;function D(H){if(!d||!H)return H;const $=mt.createMask({mask:d});return $.unmaskedValue=H,$.value}function N(){if(!d){n(8,k=!1);return}if(!w){n(8,k=!1);return}const H=mt.createMask({mask:d});H.resolve(w),n(8,k=H.isComplete)}let{cellState:M=Ft((g==null?void 0:g.initialState)??"View",{"*":{reset(H){n(4,w=c),N(),I&&(I.unmaskedValue=w||""),!d&&O&&n(9,O.value=w||"",O)}},View:{_enter(){n(4,w=c),N()},focus(){if(!g.readonly&&!g.disabled)return"Editing"}},Editing:{_enter(){n(17,b=c),n(4,w=c),n(7,E=!1),N(),f("enteredit"),I&&(I.unmaskedValue=w||""),!d&&O&&n(9,O.value=w||"",O)},_exit(){n(17,b=void 0),f("exitedit"),f("focusout")},clear(){n(4,w=null),N(),n(7,E=b!==w),O&&n(9,O.value=w,O)},focusout(H){this.submit()},submit(){if(E){if(d&&w&&!k)return n(4,w=b),"View";f("change",w)}return"View"},cancel(){return n(4,w=b),N(),n(7,E=!1),f("cancel"),I&&(I.unmaskedValue=w),!d&&O&&n(9,O.value=w,O),"View"},handleKeyboard(H){var Y;if(!H)return;if(n(7,E=b!==w),k&&!["Backspace","Delete","Enter","Escape","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(H.key)&&H.key.length===1){H.preventDefault();return}if(H.key=="Enter"&&this.submit(),H.key=="Escape"&&this.cancel(),H.key.length===1&&d){const G=mt.createMask({mask:d});if((w||"").length,(((Y=G.blocks[0])==null?void 0:Y.placeholder)||(G.mask.includes("0")?"0":null))==="0"&&!/\d/.test(H.key)){H.preventDefault();return}}}}})}=e;a();const V=H=>{H==null||H.focus()};le.onMount(()=>{h&&setTimeout(()=>{M.focus()},50)}),le.onDestroy(()=>{clearTimeout(_),M.reset()});function W(H,$){if(!$){const Y=G=>{n(4,w=H.value)};return H.addEventListener("input",Y),H.value=w||"",{destroy(){H.removeEventListener("input",Y)}}}return I=mt(H,{mask:$}),I.unmaskedValue=w||"",I.on("accept",()=>{n(4,w=I.unmaskedValue),N()}),I.on("complete",()=>{n(8,k=!0)}),{destroy(){I&&I.destroy()}}}function ne(H){Be[H?"unshift":"push"](()=>{O=H,n(9,O)})}return t.$$set=H=>{"value"in H&&n(0,c=H.value),"cellOptions"in H&&n(1,g=H.cellOptions),"autofocus"in H&&n(16,h=H.autofocus),"mask"in H&&n(2,d=H.mask),"cellState"in H&&a(n(3,M=H.cellState))},t.$$.update=()=>{t.$$.dirty&64&&n(12,i=u=="Editing"),t.$$.dirty&131088&&n(7,E=b!==w),t.$$.dirty&6&&n(11,l=g!=null&&g.placeholder?g.placeholder:d),t.$$.dirty&2&&n(5,r=g==null?void 0:g.error),t.$$.dirty&34&&n(10,o=r?"ph ph-warning":g==null?void 0:g.icon),t.$$.dirty&9&&M.reset(c)},[c,g,d,M,w,r,u,E,k,O,o,l,i,D,V,W,h,b,ne]}class m3 extends Ze{constructor(e){super(),Qe(this,e,g3,h3,Ye,{value:0,cellOptions:1,autofocus:16,mask:2,cellState:3})}}function sg(t,e,n){const i=t.slice();return i[71]=e[n],i[73]=n,i}function ug(t,e,n){const i=t.slice();return i[74]=e[n],i[73]=n,i}function ag(t){let e,n=(t[0].placeholder||"No Tags")+"",i;return{c(){e=v("span"),i=Ee(n)},m(l,r){A(l,e,r),S(e,i)},p(l,r){r[0]&1&&n!==(n=(l[0].placeholder||"No Tags")+"")&&Pe(i,n)},d(l){l&&C(e)}}}function fg(t){let e,n=Ce(t[3]),i=[];for(let l=0;l<n.length;l+=1)i[l]=dg(ug(t,n,l));return{c(){for(let l=0;l<i.length;l+=1)i[l].c();e=Fe()},m(l,r){for(let o=0;o<i.length;o+=1)i[o]&&i[o].m(l,r);A(l,e,r)},p(l,r){if(r[0]&343933e3){n=Ce(l[3]);let o;for(o=0;o<n.length;o+=1){const u=ug(l,n,o);i[o]?i[o].p(u,r):(i[o]=dg(u),i[o].c(),i[o].m(e.parentNode,e))}for(;o<i.length;o+=1)i[o].d(1);i.length=n.length}},d(l){l&&C(e),St(i,l)}}}function cg(t){let e,n,i;function l(){return t[39](t[74])}return{c(){e=v("i"),m(e,"class","ph ph-x"),P(e,"font-size","12px"),P(e,"z-index",2)},m(r,o){A(r,e,o),n||(i=B(e,"mousedown",Qt(Et(l))),n=!0)},p(r,o){t=r},d(r){r&&C(e),n=!1,i()}}}function dg(t){let e,n,i,l=t[74]+"",r,o,u,s=t[6]&&cg(t);return{c(){e=v("div"),n=v("span"),i=v("span"),r=Ee(l),o=Q(),s&&s.c(),u=Q(),m(n,"class","tag-wrap"),m(e,"class","tag svelte-1atghx5"),m(e,"tabindex","-1"),P(e,"--option-color",t[23][t[74]]||t[26][t[73]%t[26].length])},m(a,f){A(a,e,f),S(e,n),S(n,i),S(i,r),S(e,o),s&&s.m(e,null),S(e,u)},p(a,f){f[0]&8&&l!==(l=a[74]+"")&&Pe(r,l),a[6]?s?s.p(a,f):(s=cg(a),s.c(),s.m(e,u)):s&&(s.d(1),s=null),f[0]&8388616&&P(e,"--option-color",a[23][a[74]]||a[26][a[73]%a[26].length])},d(a){a&&C(e),s&&s.d()}}}function hg(t){let e,n,i;return{c(){e=v("i"),m(e,"class","ph ph-plus-circle actionIcon svelte-1atghx5")},m(l,r){A(l,e,r),n||(i=B(e,"mousedown",Qt(Et(t[28].toggle))),n=!0)},p:ue,d(l){l&&C(e),n=!1,i()}}}function gg(t){let e,n;return e=new wn({props:{anchor:t[8],useAnchorWidth:!0,maxHeight:250,open:t[22]=="Open",$$slots:{default:[w3]},$$scope:{ctx:t}}}),e.$on("close",t[50]),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l[0]&256&&(r.anchor=i[8]),l[0]&4194304&&(r.open=i[22]=="Open"),l[0]&10493853|l[2]&16384&&(r.$$scope={dirty:l,ctx:i}),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function mg(t){let e,n,i,l=t[4]&&_g(t);return{c(){e=v("div"),l&&l.c(),m(e,"class","options svelte-1atghx5")},m(r,o){A(r,e,o),l&&l.m(e,null),t[48](e),n||(i=[B(e,"wheel",y3),B(e,"mouseleave",t[49]),B(e,"scroll",function(){Ge(t[4]?t[29]:null)&&(t[4]?t[29]:null).apply(this,arguments)})],n=!0)},p(r,o){t=r,t[4]?l?l.p(t,o):(l=_g(t),l.c(),l.m(e,null)):l&&(l.d(1),l=null)},d(r){r&&C(e),l&&l.d(),t[48](null),n=!1,Ve(i)}}}function _g(t){let e;function n(r,o){var u,s,a,f;return(u=r[7])!=null&&u.loading&&!((a=(s=r[7])==null?void 0:s.rows)!=null&&a.length)?b3:(f=r[2])!=null&&f.length?p3:_3}let i=n(t),l=i(t);return{c(){l.c(),e=Fe()},m(r,o){l.m(r,o),A(r,e,o)},p(r,o){i===(i=n(r))&&l?l.p(r,o):(l.d(1),l=i(r),l&&(l.c(),l.m(e.parentNode,e)))},d(r){r&&C(e),l.d(r)}}}function _3(t){let e;return{c(){e=v("div"),e.innerHTML=`<span><i class="ri-close-line"></i>
|
|
22
|
-
No matches found, Tag will be added as new</span>`,m(e,"class","option not-found svelte-1atghx5")},m(n,i){A(n,e,i)},p:ue,d(n){n&&C(e)}}}function p3(t){var s;let e=[],n=new Map,i,l,r=Ce(t[2]);const o=a=>a[73];for(let a=0;a<r.length;a+=1){let f=sg(t,r,a),c=o(f);n.set(c,e[a]=wg(c,f))}let u=((s=t[7])==null?void 0:s.loading)&&kg();return{c(){for(let a=0;a<e.length;a+=1)e[a].c();i=Q(),u&&u.c(),l=Fe()},m(a,f){for(let c=0;c<e.length;c+=1)e[c]&&e[c].m(a,f);A(a,i,f),u&&u.m(a,f),A(a,l,f)},p(a,f){var c;f[0]&278921741&&(r=Ce(a[2]),e=Tt(e,f,o,1,a,r,n,i.parentNode,nn,wg,i,sg)),(c=a[7])!=null&&c.loading?u||(u=kg(),u.c(),u.m(l.parentNode,l)):u&&(u.d(1),u=null)},d(a){a&&(C(i),C(l));for(let f=0;f<e.length;f+=1)e[f].d(a);u&&u.d(a)}}}function b3(t){let e;return{c(){e=v("div"),e.innerHTML=`<i class="ri-loader-2-line rotating"></i>
|
|
23
|
-
Loading...`,m(e,"class","option loading svelte-1atghx5")},m(n,i){A(n,e,i)},p:ue,d(n){n&&C(e)}}}function pg(t){let e,n,i,l=t[71]+"",r,o,u,s=t[0].optionsViewMode!=="text"&&bg();function a(...c){return t[46](t[73],...c)}function f(){return t[47](t[73])}return{c(){e=v("div"),n=v("span"),s&&s.c(),i=Q(),r=Ee(l),m(e,"class","option svelte-1atghx5"),p(e,"text",t[21]=="text"),p(e,"focused",t[9]===t[73]),P(e,"--option-color",t[23][t[71]])},m(c,g){A(c,e,g),S(e,n),s&&s.m(n,null),S(n,i),S(n,r),o||(u=[B(e,"mousedown",Et(a)),B(e,"mouseenter",f)],o=!0)},p(c,g){t=c,t[0].optionsViewMode!=="text"?s||(s=bg(),s.c(),s.m(n,i)):s&&(s.d(1),s=null),g[0]&4&&l!==(l=t[71]+"")&&Pe(r,l),g[0]&2097152&&p(e,"text",t[21]=="text"),g[0]&516&&p(e,"focused",t[9]===t[73]),g[0]&8388612&&P(e,"--option-color",t[23][t[71]])},d(c){c&&C(e),s&&s.d(),o=!1,Ve(u)}}}function bg(t){let e;return{c(){e=v("i"),m(e,"class","ri-checkbox-blank-fill")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function wg(t,e){var o;let n,i=!((o=e[3])!=null&&o.includes(e[71])),l,r=i&&pg(e);return{key:t,first:null,c(){n=Fe(),r&&r.c(),l=Fe(),this.first=n},m(u,s){A(u,n,s),r&&r.m(u,s),A(u,l,s)},p(u,s){var a;e=u,s[0]&12&&(i=!((a=e[3])!=null&&a.includes(e[71]))),i?r?r.p(e,s):(r=pg(e),r.c(),r.m(l.parentNode,l)):r&&(r.d(1),r=null)},d(u){u&&(C(n),C(l)),r&&r.d(u)}}}function kg(t){let e;return{c(){e=v("div"),e.innerHTML=`<i class="ri-loader-2-line rotating"></i>
|
|
24
|
-
Loading more...`,m(e,"class","option loading svelte-1atghx5")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function w3(t){let e,n,i,l,r,o,u,s,a,f,c=t[4]&&mg(t);return{c(){e=v("div"),n=v("i"),l=Q(),r=v("input"),u=Q(),c&&c.c(),s=Fe(),m(n,"class",i=bt(t[4]?"ph ph-magnifying-glass":"ph ph-pencil-simple")+" svelte-1atghx5"),p(n,"actionIcon",!0),m(r,"type","text"),m(r,"placeholder",o=t[4]?"Search or Add":"Enter tag..."),m(r,"class","searchInput svelte-1atghx5"),m(e,"class","searchControl svelte-1atghx5")},m(g,h){A(g,e,h),S(e,n),S(e,l),S(e,r),Zt(r,t[11]),t[43](r),A(g,u,h),c&&c.m(g,h),A(g,s,h),a||(f=[B(r,"input",t[42]),B(r,"input",t[44]),B(r,"focusout",t[45]),tn(t[30].call(null,r)),B(e,"keydown",t[28].handleInputKeyboard)],a=!0)},p(g,h){h[0]&16&&i!==(i=bt(g[4]?"ph ph-magnifying-glass":"ph ph-pencil-simple")+" svelte-1atghx5")&&m(n,"class",i),h[0]&16&&p(n,"actionIcon",!0),h[0]&16&&o!==(o=g[4]?"Search or Add":"Enter tag...")&&m(r,"placeholder",o),h[0]&2048&&r.value!==g[11]&&Zt(r,g[11]),g[4]?c?c.p(g,h):(c=mg(g),c.c(),c.m(s.parentNode,s)):c&&(c.d(1),c=null)},d(g){g&&(C(e),C(u),C(s)),t[43](null),c&&c.d(g),a=!1,Ve(f)}}}function k3(t){let e,n,i,l,r,o,u,s,a,f,c,g=t[14]&&!t[6]&&ag(t),h=t[3].length&&fg(t),d=t[6]&&hg(t),_=t[6]&&gg(t);return{c(){var b;e=v("div"),n=v("div"),g&&g.c(),i=Q(),l=v("div"),h&&h.c(),r=Q(),d&&d.c(),u=Q(),_&&_.c(),s=Fe(),m(l,"class","tags svelte-1atghx5"),m(l,"tabindex","-1"),P(l,"justify-content",t[0].align??"flex-start"),P(l,"flex-wrap","wrap"),m(n,"class","value svelte-1atghx5"),m(n,"tabindex","-1"),p(n,"placeholder",t[14]),m(e,"class","superCell"),m(e,"tabindex",o=(b=t[0])!=null&&b.disabled?-1:0),p(e,"isDirty",t[13]&&t[0].showDirty),p(e,"inEdit",t[6]),p(e,"disabled",t[18]),p(e,"readonly",t[19]),p(e,"error",t[17]),p(e,"multirow",!0),p(e,"inline",t[20]=="inlineInput"),p(e,"tableCell",t[20]=="tableCell"),p(e,"formInput",t[20]=="formInput"),P(e,"color",t[16]),P(e,"background",t[15]),P(e,"font-weight",t[0].fontWeight)},m(b,w){A(b,e,w),S(e,n),g&&g.m(n,null),S(n,i),S(n,l),h&&h.m(l,null),S(l,r),d&&d.m(l,null),t[40](e),A(b,u,w),_&&_.m(b,w),A(b,s,w),a=!0,f||(c=[B(e,"focusin",function(){Ge(t[1].focus)&&t[1].focus.apply(this,arguments)}),B(e,"focusout",t[41]),B(e,"keydown",t[28].handleKeyboard)],f=!0)},p(b,w){var E;t=b,t[14]&&!t[6]?g?g.p(t,w):(g=ag(t),g.c(),g.m(n,i)):g&&(g.d(1),g=null),t[3].length?h?h.p(t,w):(h=fg(t),h.c(),h.m(l,r)):h&&(h.d(1),h=null),t[6]?d?d.p(t,w):(d=hg(t),d.c(),d.m(l,null)):d&&(d.d(1),d=null),w[0]&1&&P(l,"justify-content",t[0].align??"flex-start"),(!a||w[0]&16384)&&p(n,"placeholder",t[14]),(!a||w[0]&1&&o!==(o=(E=t[0])!=null&&E.disabled?-1:0))&&m(e,"tabindex",o),(!a||w[0]&8193)&&p(e,"isDirty",t[13]&&t[0].showDirty),(!a||w[0]&64)&&p(e,"inEdit",t[6]),(!a||w[0]&262144)&&p(e,"disabled",t[18]),(!a||w[0]&524288)&&p(e,"readonly",t[19]),(!a||w[0]&131072)&&p(e,"error",t[17]),(!a||w[0]&1048576)&&p(e,"inline",t[20]=="inlineInput"),(!a||w[0]&1048576)&&p(e,"tableCell",t[20]=="tableCell"),(!a||w[0]&1048576)&&p(e,"formInput",t[20]=="formInput"),w[0]&65536&&P(e,"color",t[16]),w[0]&32768&&P(e,"background",t[15]),w[0]&1&&P(e,"font-weight",t[0].fontWeight),t[6]?_?(_.p(t,w),w[0]&64&&U(_,1)):(_=gg(t),_.c(),U(_,1),_.m(s.parentNode,s)):_&&(He(),Z(_,1,1,()=>{_=null}),ze())},i(b){a||(U(_),a=!0)},o(b){Z(_),a=!1},d(b){b&&(C(e),C(u),C(s)),g&&g.d(),h&&h.d(),d&&d.d(),t[40](null),_&&_.d(b),f=!1,Ve(c)}}}const y3=t=>t.stopPropagation();function E3(t,e,n){let i,l,r,o,u,s,a,f,c,g,h,d,_,b,w,E,k,I=ue,O=()=>(I(),I=ft(d,_e=>n(7,k=_e)),d),D,N,M,V=ue,W=()=>(V(),V=ft(Te,_e=>n(37,M=_e)),Te),ne,H;t.$$.on_destroy.push(()=>I()),t.$$.on_destroy.push(()=>V());const $=le.createEventDispatcher(),{API:Y,QueryUtils:G,fetchData:oe,memo:ie,derivedMemo:J}=le.getContext("sdk");let{cellOptions:q}=e,{value:j}=e,{fieldSchema:K}=e,{autofocus:x}=e,X,F=ie([]);Me(t,F,_e=>n(59,D=_e));let R={},z=[],me=-1,se,Oe,be=30,Ie=j?[...j]:[],ve,fe="",Ne;const te=J(F,_e=>{let st={};return _e.forEach((we,xe)=>st[we]=R[we]??ae[xe%14]),st});Me(t,te,_e=>n(23,H=_e));const ae=["hsla(358, 95%, 80%, 0.35)","hsla(22, 90%, 78%, 0.35)","hsla(45, 85%, 76%, 0.35)","hsla(110, 90%, 75%, 0.35)","hsla(175, 95%, 70%, 0.35)","hsla(205, 100%, 65%, 0.35)","hsla(245, 95%, 75%, 0.35)","hsla(310, 90%, 80%, 0.35)","hsla(15, 80%, 75%, 0.35)","hsla(60, 85%, 72%, 0.35)","hsla(135, 95%, 70%, 0.35)","hsla(190, 90%, 75%, 0.35)","hsla(260, 85%, 78%, 0.35)","hsla(330, 95%, 76%, 0.35)"];let de=JSON.stringify(Array.isArray(j)?j:j?[j]:[]);const Xe=ie((q==null?void 0:q.datasource)??{});Me(t,Xe,_e=>n(38,ne=_e));let{cellState:Te=Ft("Loading",{"*":{goTo(_e){return _e},refresh(){return Re(F,D=[],D),"Loading"},loadDataOptions(_e){if(Le){if(_e&&_e.length){const st=_e.map(we=>we[r]);Re(F,D=[...D,...st],D)}Le=!1}else Re(F,D=[],D),_e&&_e.length&&_e.forEach(st=>{D.push(st[r])});F.set(D),n(2,z=D)},loadCustomOptions(){o!=null&&o.length&&o.forEach(_e=>{D.push(_e.value||_e)}),F.set(D)},clearFilters(){n(2,z=D)},reset(_e){n(3,Ie=[..._e]),n(35,de=JSON.stringify(Ie))}},Loading:{_enter(){(!l||k!=null&&k.loaded)&&this.goTo.debounce(5,q.initialState||"View")},_exit(){q.suggestions?this.loadDataOptions(k==null?void 0:k.rows):q.optionsSource=="custom"&&this.loadCustomOptions(),n(2,z=D)},syncFetch(_e){if(_e!=null&&_e.loaded)return q.initialState||"View"}},View:{_enter(){},focus(_e){if(!q.readonly&&!q.disabled)return"Editing"}},Editing:{_enter(){n(35,de=JSON.stringify(j)),this.clearFilters(),$("enteredit")},_exit(){Se.close(),$("exitedit")},focusout(_e){N=="Open"||X!=null&&X.contains(_e.relatedTarget)||this.submit()},change(){q.debounce&&(clearTimeout(se),se=setTimeout(()=>{$("change",Ie)},q.debounce))},submit(){if(w)return $("change",Ie),"View";this.cancel()},clear(){n(3,Ie=[]),this.submit()},cancel(){return X==null||X.blur(),"View"}}})}=e;W();let Se=Ft("Closed",{"*":{close(){return"Closed"},toggleOption(_e){if(!(q.disabled||q.readonly))if(typeof _e=="string"){let st=_e,we=Ie.indexOf(st);we>-1?(Ie.splice(we,1),n(3,Ie=[...Ie])):n(3,Ie=[...Ie,st]),Te.change(),kt()}else{if(_e<0)return;let st=z[_e],we=Ie.indexOf(st);we>-1?(Ie.splice(we,1),n(3,Ie=[...Ie])):n(3,Ie=[...Ie,st]),Te.change(),kt()}}},Open:{_enter(){n(9,me=-1),setTimeout(()=>Ne==null?void 0:Ne.focus(),0),Se.filterOptions(fe)},_exit(){if(ve!=null&&ve.trim()&&z.length==0){const _e=ve.split(",").map(st=>st.trim()).filter(st=>st);n(3,Ie=[...Ie,..._e]),Te.change()}n(11,fe=""),ve=null},filterOptions(_e){if(_e?ve=_e.trim():ve=null,q.suggestions){let st=[];_e?st=[...q.filter||[],{field:r,type:"string",operator:"fuzzy",value:_e,valueType:"Value"}]:st=q.filter||[],Le=!1,d==null||d.update({query:G.buildQuery(st)}),n(2,z=D)}else _e?n(2,z=D.filter(st=>st==null?void 0:st.toLocaleLowerCase().startsWith(_e.toLocaleLowerCase()))):n(2,z=D)},toggle(){return"Closed"},handleInputKeyboard(_e){if(_e.key=="Enter"){ve!=null&&ve.trim()&&(n(3,Ie=[...Ie,...ve.split(",").map(st=>st.trim()).filter(st=>st)]),Te.change(),ve=null,n(11,fe=""),setTimeout(()=>Ne==null?void 0:Ne.focus(),0)),_e.preventDefault();return}_e.key==" "&&me>-1&&(this.toggleOption(me),_e.preventDefault()),_e.key=="Tab"&&me>-1&&z[me]&&this.toggleOption(me),_e.key=="ArrowDown"&&this.highlightNext(_e.stopPropagation()),_e.key=="ArrowUp"&&this.highlightPrevious(_e.preventDefault(),_e.stopPropagation()),_e.key=="Escape"&&this.close()},handleKeyboard(_e){_e.keyCode==32&&(me>-1?this.toggleOption(me):q.autocomplete||this.close(_e.preventDefault())),_e.key=="Escape"&&Te.cancel(),(_e.key=="Enter"||_e.key=="Tab")&&me>-1&&z[me]&&this.toggleOption(me),_e.key=="ArrowDown"&&this.highlightNext(),_e.key=="ArrowUp"&&this.highlightPrevious(_e.preventDefault()),_e.key=="Escape"&&this.close()},highlightNext(){n(9,me+=1),me>z.length-1&&n(9,me=0)},highlightPrevious(){n(9,me-=1),me<0&&n(9,me=z.length-1)}},Closed:{toggle(){return"Open"},open(){return"Open"},highlightNext(){this.open(),n(9,me=0)},handleInputKeyboard(_e){_e.key=="Escape"&&Te.cancel(),_e.key!="Tab"&&(this.open(),n(9,me=0))},handleKeyboard(_e){_e.key=="Escape"&&Te.cancel(),i=="select"&&_e.key!="Tab"&&((_e.key=="ArrowDown"||_e.keyCode==32)&&this.toggle(),(_e.key=="Backspace"||_e.key=="Delete")&&(n(3,Ie=[]),Te.change()))}}});Me(t,Se,_e=>n(22,N=_e));let Le=!1;const rt=()=>{var _e;k!=null&&k.loading||((_e=k==null?void 0:k.rows)==null?void 0:_e.length)<be||(Le=!0,n(34,be+=100),d==null||d.update({limit:be}))},kt=()=>{var we;z.filter(xe=>!(Ie!=null&&Ie.includes(xe))).length<10&&!(k!=null&&k.loading)&&((we=k==null?void 0:k.rows)==null?void 0:we.length)>=be&&rt()},ke=_e=>{const st=_e.target,we=st.scrollTop,xe=st.scrollHeight,pe=st.clientHeight;we+pe>=xe-50&&rt()},ce=_e=>{_e==null||_e.focus()},re=_e=>{if(l)return oe({API:Y,datasource:_e,options:{limit:be}})};le.onMount(()=>{x&&setTimeout(()=>{Te.focus()},30)}),le.onDestroy(()=>{clearTimeout(se)});const Ae=_e=>Se.toggleOption(_e);function Ue(_e){Be[_e?"unshift":"push"](()=>{X=_e,n(8,X)})}const Je=_e=>{setTimeout(()=>Te.focusout(_e),50)};function lt(){fe=this.value,n(11,fe)}function he(_e){Be[_e?"unshift":"push"](()=>{Ne=_e,n(12,Ne)})}const it=_e=>Se.filterOptions(_e.target.value),ot=_e=>{Se.close(),X==null||X.focus()},wt=(_e,st)=>Se.toggleOption(_e),Ct=_e=>n(9,me=_e);function ln(_e){Be[_e?"unshift":"push"](()=>{Oe=_e,n(10,Oe)})}const It=()=>n(9,me=-1),xt=_e=>{Se.close(),Te.focusout({})};return t.$$set=_e=>{"cellOptions"in _e&&n(0,q=_e.cellOptions),"value"in _e&&n(31,j=_e.value),"fieldSchema"in _e&&n(32,K=_e.fieldSchema),"autofocus"in _e&&n(33,x=_e.autofocus),"cellState"in _e&&W(n(1,Te=_e.cellState))},t.$$.update=()=>{t.$$.dirty[0]&1&&n(4,{controlType:i,suggestions:l,valueColumn:r,customOptions:o,optionsViewMode:u,role:s,readonly:a,disabled:f,error:c,color:g,background:h}=q,l,(n(21,u),n(0,q)),(n(20,s),n(0,q)),(n(19,a),n(0,q)),(n(18,f),n(0,q)),(n(17,c),n(0,q)),(n(16,g),n(0,q)),(n(15,h),n(0,q))),t.$$.dirty[0]&1&&Xe.set(q.datasource),t.$$.dirty[1]&128&&O(n(5,d=re(ne))),t.$$.dirty[0]&1&&q.suggestions&&(n(34,be=15),Le=!1),t.$$.dirty[0]&1&&n(36,_=G.buildQuery(q.filter)),t.$$.dirty[0]&32|t.$$.dirty[1]&40&&(d==null||d.update({query:_,limit:be})),t.$$.dirty[0]&130&&Te.syncFetch(k),t.$$.dirty[0]&130&&Te.loadDataOptions(k==null?void 0:k.rows),t.$$.dirty[0]&2|t.$$.dirty[1]&1&&Te.reset(j),t.$$.dirty[0]&8&&n(14,b=Ie.length<1),t.$$.dirty[1]&64&&n(6,E=M=="Editing"),t.$$.dirty[0]&72|t.$$.dirty[1]&16&&n(13,w=E&&de!==JSON.stringify(Ie)),t.$$.dirty[0]&148&&z&&l&&!(k!=null&&k.loading)&&setTimeout(()=>kt(),0)},[q,Te,z,Ie,l,d,E,k,X,me,Oe,fe,Ne,w,b,h,g,c,f,a,s,u,N,H,F,te,ae,Xe,Se,ke,ce,j,K,x,be,de,_,M,ne,Ae,Ue,Je,lt,he,it,ot,wt,Ct,ln,It,xt]}class v3 extends Ze{constructor(e){super(),Qe(this,e,E3,k3,Ye,{cellOptions:0,value:31,fieldSchema:32,autofocus:33,cellState:1},null,[-1,-1,-1])}}function yg(t,e,n){const i=t.slice();return i[67]=e[n],i[69]=n,i}function Eg(t,e,n){const i=t.slice();return i[70]=e[n],i[69]=n,i}function vg(t,e,n){const i=t.slice();return i[67]=e[n],i[69]=n,i}function S3(t){let e,n,i,l,r;const o=[I3,T3],u=[];function s(a,f){var c;return(c=a[12])!=null&&c.length?0:1}return i=s(t),l=u[i]=o[i](t),{c(){e=v("div"),n=v("div"),l.c(),m(n,"class","attachment-grid svelte-1jwja4v"),P(n,"--grid-columns",t[19]),m(e,"class","attachment-grid-wrapper svelte-1jwja4v")},m(a,f){A(a,e,f),S(e,n),u[i].m(n,null),r=!0},p(a,f){let c=i;i=s(a),i===c?u[i].p(a,f):(He(),Z(u[c],1,1,()=>{u[c]=null}),ze(),l=u[i],l?l.p(a,f):(l=u[i]=o[i](a),l.c()),U(l,1),l.m(n,null)),f[0]&524288&&P(n,"--grid-columns",a[19])},i(a){r||(U(l),r=!0)},o(a){Z(l),r=!1},d(a){a&&C(e),u[i].d()}}}function C3(t){let e;function n(r,o){var u;if((u=r[12])!=null&&u.length)return P3;if(!r[2])return R3}let i=n(t),l=i&&i(t);return{c(){e=v("div"),l&&l.c(),m(e,"class","carousel svelte-1jwja4v")},m(r,o){A(r,e,o),l&&l.m(e,null)},p(r,o){i===(i=n(r))&&l?l.p(r,o):(l&&l.d(1),l=i&&i(r),l&&(l.c(),l.m(e,null)))},i:ue,o:ue,d(r){r&&C(e),l&&l.d()}}}function A3(t){var r;let e,n,i=((r=t[12])==null?void 0:r.length)&&Ng(t),l=t[18]&&Vg(t);return{c(){e=v("div"),i&&i.c(),n=Q(),l&&l.c(),m(e,"class","attachments svelte-1jwja4v")},m(o,u){A(o,e,u),i&&i.m(e,null),S(e,n),l&&l.m(e,null)},p(o,u){var s;(s=o[12])!=null&&s.length?i?i.p(o,u):(i=Ng(o),i.c(),i.m(e,n)):i&&(i.d(1),i=null),o[18]?l?l.p(o,u):(l=Vg(o),l.c(),l.m(e,null)):l&&(l.d(1),l=null)},i:ue,o:ue,d(o){o&&C(e),i&&i.d(),l&&l.d()}}}function T3(t){let e,n=t[18]&&Sg(t);return{c(){e=v("div"),n&&n.c(),m(e,"class","grid-empty svelte-1jwja4v")},m(i,l){A(i,e,l),n&&n.m(e,null)},p(i,l){i[18]?n?n.p(i,l):(n=Sg(i),n.c(),n.m(e,null)):n&&(n.d(1),n=null)},i:ue,o:ue,d(i){i&&C(e),n&&n.d()}}}function I3(t){let e=[],n=new Map,i,l,r,o=Ce(t[12]);const u=a=>a[69];for(let a=0;a<o.length;a+=1){let f=yg(t,o,a),c=u(f);n.set(c,e[a]=Tg(c,f))}let s=t[18]&&Ig(t);return{c(){for(let a=0;a<e.length;a+=1)e[a].c();i=Q(),s&&s.c(),l=Fe()},m(a,f){for(let c=0;c<e.length;c+=1)e[c]&&e[c].m(a,f);A(a,i,f),s&&s.m(a,f),A(a,l,f),r=!0},p(a,f){f[0]&544232076|f[1]&64&&(o=Ce(a[12]),He(),e=Tt(e,f,u,1,a,o,n,i.parentNode,Di,Tg,i,yg),ze()),a[18]?s?s.p(a,f):(s=Ig(a),s.c(),s.m(l.parentNode,l)):s&&(s.d(1),s=null)},i(a){if(!r){for(let f=0;f<o.length;f+=1)U(e[f]);r=!0}},o(a){for(let f=0;f<e.length;f+=1)Z(e[f]);r=!1},d(a){a&&(C(i),C(l));for(let f=0;f<e.length;f+=1)e[f].d(a);s&&s.d(a)}}}function Sg(t){let e,n,i,l,r,o,u;return{c(){e=v("button"),n=v("i"),i=Q(),l=v("span"),l.textContent="Add Images",m(n,"class","ph ph-plus"),m(e,"class","btn-upload-empty grid svelte-1jwja4v"),m(e,"aria-label","Upload attachment"),m(e,"type","button"),e.disabled=r=t[0].disabled||t[0].readonly},m(s,a){A(s,e,a),S(e,n),S(e,i),S(e,l),o||(u=B(e,"click",t[25]),o=!0)},p(s,a){a[0]&1&&r!==(r=s[0].disabled||s[0].readonly)&&(e.disabled=r)},d(s){s&&C(e),o=!1,u()}}}function D3(t){var f;let e,n,i,l=((f=t[67].extension)==null?void 0:f.toUpperCase())+"",r,o,u,s=t[67].name+"",a;return{c(){e=v("div"),n=v("div"),i=v("div"),r=Ee(l),o=Q(),u=v("span"),a=Ee(s),m(i,"class","pill svelte-1jwja4v"),m(u,"class","filename svelte-1jwja4v"),m(n,"class","grid-fallback svelte-1jwja4v"),m(e,"class","grid-item svelte-1jwja4v"),P(e,"aspect-ratio",t[20]==="landscape"?"4 / 3":t[20]==="square"?"1 / 1":"3 / 4"),p(e,"focused",t[7]===t[69]),p(e,"selected",t[9].has(t[69]))},m(c,g){A(c,e,g),S(e,n),S(n,i),S(i,r),S(n,o),S(n,u),S(u,a)},p(c,g){var h;g[0]&4096&&l!==(l=((h=c[67].extension)==null?void 0:h.toUpperCase())+"")&&Pe(r,l),g[0]&4096&&s!==(s=c[67].name+"")&&Pe(a,s),g[0]&1048576&&P(e,"aspect-ratio",c[20]==="landscape"?"4 / 3":c[20]==="square"?"1 / 1":"3 / 4"),g[0]&4224&&p(e,"focused",c[7]===c[69]),g[0]&4608&&p(e,"selected",c[9].has(c[69]))},i:ue,o:ue,d(c){c&&C(e)}}}function O3(t){let e,n,i,l,r,o,u,s=t[14]&&Cg(t),a=!t[2]&&!t[3]&&Ag(t);function f(){return t[48](t[67],t[69])}function c(...g){return t[49](t[69],...g)}return{c(){e=v("div"),n=v("div"),s&&s.c(),i=Q(),a&&a.c(),m(n,"class","grid-image svelte-1jwja4v"),P(n,"background-image","url('"+t[67].url+"')"),m(n,"role","button"),m(n,"tabindex","0"),m(n,"aria-label",l=t[67].name),m(e,"class","grid-item svelte-1jwja4v"),P(e,"aspect-ratio",t[20]==="landscape"?"4 / 3":t[20]==="square"?"1 / 1":"3 / 4"),p(e,"focused",t[7]===t[69]),p(e,"selected",t[9].has(t[69]))},m(g,h){A(g,e,h),S(e,n),s&&s.m(n,null),S(n,i),a&&a.m(n,null),r=!0,o||(u=[B(n,"click",f),B(n,"keydown",c)],o=!0)},p(g,h){t=g,t[14]?s?(s.p(t,h),h[0]&16384&&U(s,1)):(s=Cg(t),s.c(),U(s,1),s.m(n,i)):s&&(He(),Z(s,1,1,()=>{s=null}),ze()),!t[2]&&!t[3]?a?a.p(t,h):(a=Ag(t),a.c(),a.m(n,null)):a&&(a.d(1),a=null),(!r||h[0]&4096)&&P(n,"background-image","url('"+t[67].url+"')"),(!r||h[0]&4096&&l!==(l=t[67].name))&&m(n,"aria-label",l),(!r||h[0]&1048576)&&P(e,"aspect-ratio",t[20]==="landscape"?"4 / 3":t[20]==="square"?"1 / 1":"3 / 4"),(!r||h[0]&4224)&&p(e,"focused",t[7]===t[69]),(!r||h[0]&4608)&&p(e,"selected",t[9].has(t[69]))},i(g){r||(U(s),r=!0)},o(g){Z(s),r=!1},d(g){g&&C(e),s&&s.d(),a&&a.d(),o=!1,Ve(u)}}}function Cg(t){let e,n;const i=t[38].default,l=Ut(i,t,t[37],null);return{c(){e=v("div"),l&&l.c(),m(e,"class","slot-container svelte-1jwja4v")},m(r,o){A(r,e,o),l&&l.m(e,null),n=!0},p(r,o){l&&l.p&&(!n||o[1]&64)&&zt(l,i,r,r[37],n?Ht(i,r[37],o,null):jt(r[37]),null)},i(r){n||(U(l,r),n=!0)},o(r){Z(l,r),n=!1},d(r){r&&C(e),l&&l.d(r)}}}function Ag(t){let e,n,i,l,r,o,u,s,a,f;function c(){return t[46](t[67])}function g(){return t[47](t[69])}return{c(){e=v("div"),n=v("button"),i=v("i"),r=Q(),o=v("button"),u=v("i"),m(i,"class","ph ph-download-simple"),m(n,"class","btn-grid-download svelte-1jwja4v"),m(n,"tabindex","-1"),m(n,"aria-label",l="Download "+t[67].name),m(n,"type","button"),m(u,"class","ph ph-trash-simple"),m(o,"class","btn-grid-delete svelte-1jwja4v"),m(o,"tabindex","-1"),m(o,"aria-label",s="Delete "+t[67].name),m(o,"type","button"),m(e,"class","grid-overlay-top svelte-1jwja4v")},m(h,d){A(h,e,d),S(e,n),S(n,i),S(e,r),S(e,o),S(o,u),a||(f=[B(n,"click",c),B(o,"click",g)],a=!0)},p(h,d){t=h,d[0]&4096&&l!==(l="Download "+t[67].name)&&m(n,"aria-label",l),d[0]&4096&&s!==(s="Delete "+t[67].name)&&m(o,"aria-label",s)},d(h){h&&C(e),a=!1,Ve(f)}}}function Tg(t,e){let n,i,l,r,o,u;const s=[O3,D3],a=[];function f(c,g){return g[0]&4096&&(i=null),i==null&&(i=!!fs(c[67])),i?0:c[2]?-1:1}return~(l=f(e,[-1,-1,-1]))&&(r=a[l]=s[l](e)),{key:t,first:null,c(){n=Fe(),r&&r.c(),o=Fe(),this.first=n},m(c,g){A(c,n,g),~l&&a[l].m(c,g),A(c,o,g),u=!0},p(c,g){e=c;let h=l;l=f(e,g),l===h?~l&&a[l].p(e,g):(r&&(He(),Z(a[h],1,1,()=>{a[h]=null}),ze()),~l?(r=a[l],r?r.p(e,g):(r=a[l]=s[l](e),r.c()),U(r,1),r.m(o.parentNode,o)):r=null)},i(c){u||(U(r),u=!0)},o(c){Z(r),u=!1},d(c){c&&(C(n),C(o)),~l&&a[l].d(c)}}}function Ig(t){let e,n,i,l,r,o,u,s;return{c(){e=v("div"),n=v("button"),i=v("i"),l=Q(),r=v("span"),r.textContent="Add Images",m(i,"class","ph ph-plus"),m(n,"class","btn-upload-empty grid svelte-1jwja4v"),m(n,"aria-label","Upload attachment"),m(n,"type","button"),n.disabled=o=t[0].disabled||t[0].readonly,m(e,"class","grid-item grid-add-item svelte-1jwja4v"),P(e,"aspect-ratio",t[20]==="landscape"?"4 / 3":t[20]==="square"?"1 / 1":"3 / 4")},m(a,f){A(a,e,f),S(e,n),S(n,i),S(n,l),S(n,r),u||(s=B(n,"click",t[25]),u=!0)},p(a,f){f[0]&1&&o!==(o=a[0].disabled||a[0].readonly)&&(n.disabled=o),f[0]&1048576&&P(e,"aspect-ratio",a[20]==="landscape"?"4 / 3":a[20]==="square"?"1 / 1":"3 / 4")},d(a){a&&C(e),u=!1,s()}}}function R3(t){let e,n=t[18]&&Dg(t);return{c(){e=v("div"),n&&n.c(),m(e,"class","carousel-placeholder svelte-1jwja4v")},m(i,l){A(i,e,l),n&&n.m(e,null)},p(i,l){i[18]?n?n.p(i,l):(n=Dg(i),n.c(),n.m(e,null)):n&&(n.d(1),n=null)},d(i){i&&C(e),n&&n.d()}}}function P3(t){let e,n;function i(o,u){if(u[0]&5120&&(n=null),n==null&&(n=!!fs(o[12][o[10]])),n)return N3;if(!o[2])return M3}let l=i(t,[-1,-1,-1]),r=l&&l(t);return{c(){e=v("div"),r&&r.c(),m(e,"class","carousel-content svelte-1jwja4v")},m(o,u){A(o,e,u),r&&r.m(e,null)},p(o,u){l===(l=i(o,u))&&r?r.p(o,u):(r&&r.d(1),r=l&&l(o),r&&(r.c(),r.m(e,null)))},d(o){o&&C(e),r&&r.d()}}}function Dg(t){let e,n,i,l,r,o;return{c(){e=v("button"),n=v("i"),i=Ee(`
|
|
25
|
-
Upload Attachment`),m(n,"class","ph ph-plus"),m(e,"class","btn-upload-empty svelte-1jwja4v"),m(e,"aria-label","Upload attachment"),m(e,"type","button"),e.disabled=l=t[0].disabled||t[0].readonly},m(u,s){A(u,e,s),S(e,n),S(e,i),r||(o=B(e,"click",t[25]),r=!0)},p(u,s){s[0]&1&&l!==(l=u[0].disabled||u[0].readonly)&&(e.disabled=l)},d(u){u&&C(e),r=!1,o()}}}function M3(t){var a;let e,n,i=((a=t[12][t[10]].extension)==null?void 0:a.toUpperCase())+"",l,r,o,u=t[12][t[10]].name+"",s;return{c(){e=v("div"),n=v("div"),l=Ee(i),r=Q(),o=v("span"),s=Ee(u),m(n,"class","pill svelte-1jwja4v"),m(o,"class","filename svelte-1jwja4v"),m(e,"class","carousel-fallback svelte-1jwja4v")},m(f,c){A(f,e,c),S(e,n),S(n,l),S(e,r),S(e,o),S(o,s)},p(f,c){var g;c[0]&5120&&i!==(i=((g=f[12][f[10]].extension)==null?void 0:g.toUpperCase())+"")&&Pe(l,i),c[0]&5120&&u!==(u=f[12][f[10]].name+"")&&Pe(s,u)},d(f){f&&C(e)}}}function N3(t){let e,n,i,l,r=(t[12].length>1||t[18])&&Og(t);return{c(){e=v("div"),r&&r.c(),m(e,"class","carousel-image svelte-1jwja4v"),P(e,"background-image","url('"+t[12][t[10]].url+"')"),m(e,"aria-label",n=t[12][t[10]].name),p(e,"selected",t[9].has(t[10]))},m(o,u){A(o,e,u),r&&r.m(e,null),i||(l=B(e,"click",t[45]),i=!0)},p(o,u){o[12].length>1||o[18]?r?r.p(o,u):(r=Og(o),r.c(),r.m(e,null)):r&&(r.d(1),r=null),u[0]&5120&&P(e,"background-image","url('"+o[12][o[10]].url+"')"),u[0]&5120&&n!==(n=o[12][o[10]].name)&&m(e,"aria-label",n),u[0]&1536&&p(e,"selected",o[9].has(o[10]))},d(o){o&&C(e),r&&r.d(),i=!1,l()}}}function Og(t){let e,n,i=t[12].length>1&&Rg(t),l=t[18]&&Mg(t);return{c(){e=v("div"),i&&i.c(),n=Q(),l&&l.c(),m(e,"class","carousel-controls svelte-1jwja4v")},m(r,o){A(r,e,o),i&&i.m(e,null),S(e,n),l&&l.m(e,null)},p(r,o){r[12].length>1?i?i.p(r,o):(i=Rg(r),i.c(),i.m(e,n)):i&&(i.d(1),i=null),r[18]?l?l.p(r,o):(l=Mg(r),l.c(),l.m(e,null)):l&&(l.d(1),l=null)},d(r){r&&C(e),i&&i.d(),l&&l.d()}}}function Rg(t){let e,n,i,l,r,o,u,s,a,f,c,g,h,d,_,b=Ce(t[12]),w=[];for(let E=0;E<b.length;E+=1)w[E]=Pg(Eg(t,b,E));return{c(){e=v("button"),n=v("i"),l=Q(),r=v("div");for(let E=0;E<w.length;E+=1)w[E].c();o=Q(),u=v("button"),s=v("i"),f=Q(),c=v("button"),g=v("i"),m(n,"class","ph ph-caret-left"),m(e,"class","btn-nav svelte-1jwja4v"),m(e,"aria-label","Previous attachment"),m(e,"type","button"),e.disabled=i=t[0].disabled,m(r,"class","indicators svelte-1jwja4v"),m(s,"class","ph ph-caret-right"),m(u,"class","btn-nav svelte-1jwja4v"),m(u,"aria-label","Next attachment"),m(u,"type","button"),u.disabled=a=t[0].disabled,m(g,"class","ph ph-arrows-out-simple"),m(c,"class","btn-nav svelte-1jwja4v"),P(c,"align-self","flex-end"),m(c,"aria-label","Full Screen"),m(c,"type","button"),c.disabled=h=t[0].disabled},m(E,k){A(E,e,k),S(e,n),A(E,l,k),A(E,r,k);for(let I=0;I<w.length;I+=1)w[I]&&w[I].m(r,null);A(E,o,k),A(E,u,k),S(u,s),A(E,f,k),A(E,c,k),S(c,g),d||(_=[B(e,"click",Qt(t[28].prev)),B(u,"click",Qt(t[28].next)),B(c,"click",Qt(t[44]))],d=!0)},p(E,k){if(k[0]&1&&i!==(i=E[0].disabled)&&(e.disabled=i),k[0]&268440577){b=Ce(E[12]);let I;for(I=0;I<b.length;I+=1){const O=Eg(E,b,I);w[I]?w[I].p(O,k):(w[I]=Pg(O),w[I].c(),w[I].m(r,null))}for(;I<w.length;I+=1)w[I].d(1);w.length=b.length}k[0]&1&&a!==(a=E[0].disabled)&&(u.disabled=a),k[0]&1&&h!==(h=E[0].disabled)&&(c.disabled=h)},d(E){E&&(C(e),C(l),C(r),C(o),C(u),C(f),C(c)),St(w,E),d=!1,Ve(_)}}}function Pg(t){let e,n,i,l;function r(){return t[43](t[69])}return{c(){e=v("button"),m(e,"class","indicator svelte-1jwja4v"),m(e,"aria-label","Go to attachment "+(t[69]+1)),m(e,"type","button"),e.disabled=n=t[0].disabled,p(e,"active",t[69]===t[10])},m(o,u){A(o,e,u),i||(l=B(e,"click",Qt(r)),i=!0)},p(o,u){t=o,u[0]&1&&n!==(n=t[0].disabled)&&(e.disabled=n),u[0]&1024&&p(e,"active",t[69]===t[10])},d(o){o&&C(e),i=!1,l()}}}function Mg(t){let e,n,i;return{c(){e=v("button"),e.innerHTML='<i class="ph ph-upload"></i>',m(e,"class","btn-nav add svelte-1jwja4v"),P(e,"align-self","flex-end"),m(e,"aria-label","Next attachment"),m(e,"type","button")},m(l,r){A(l,e,r),n||(i=B(e,"click",Qt(t[25])),n=!0)},p:ue,d(l){l&&C(e),n=!1,i()}}}function Ng(t){let e=[],n=new Map,i,l=Ce(t[12]);const r=o=>o[69];for(let o=0;o<l.length;o+=1){let u=vg(t,l,o),s=r(u);n.set(s,e[o]=Fg(s,u))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();i=Fe()},m(o,u){for(let s=0;s<e.length;s+=1)e[s]&&e[s].m(o,u);A(o,i,u)},p(o,u){u[0]&6296200&&(l=Ce(o[12]),e=Tt(e,u,r,1,o,l,n,i.parentNode,nn,Fg,i,vg))},d(o){o&&C(i);for(let u=0;u<e.length;u+=1)e[u].d(o)}}}function Lg(t){let e,n,i;function l(){return t[40](t[69])}return{c(){e=v("button"),e.innerHTML='<i class="ph ph-trash-simple"></i>',m(e,"class","btn-delete svelte-1jwja4v"),m(e,"tabindex","-1"),m(e,"aria-label","Delete"),m(e,"title","Delete"),m(e,"type","button")},m(r,o){A(r,e,o),n||(i=B(e,"click",l),n=!0)},p(r,o){t=r},d(r){r&&C(e),n=!1,i()}}}function Fg(t,e){let n,i,l,r,o,u,s,a=e[67].name+"",f,c,g,h,d,_;function b(){return e[39](e[69])}let w=!e[3]&&Lg(e);function E(){return e[41](e[69])}function k(){return e[42](e[69])}return{key:t,first:null,c(){n=v("div"),i=v("button"),l=v("i"),u=Q(),s=v("a"),f=Ee(a),g=Q(),w&&w.c(),h=Q(),m(l,"class","ph ph-download-simple"),m(i,"class","btn-download svelte-1jwja4v"),m(i,"tabindex","-1"),m(i,"aria-label",r="Download "+e[67].name),m(i,"title",o="Download "+e[67].name),m(i,"type","button"),m(s,"href",c=e[67].url),m(s,"class","filename svelte-1jwja4v"),m(n,"class","attachment svelte-1jwja4v"),p(n,"focused",e[7]===e[69]),p(n,"selected",e[9].has(e[69])),this.first=n},m(I,O){A(I,n,O),S(n,i),S(i,l),S(n,u),S(n,s),S(s,f),S(n,g),w&&w.m(n,null),S(n,h),d||(_=[B(i,"click",b),B(n,"mouseenter",E),B(n,"click",k)],d=!0)},p(I,O){e=I,O[0]&4096&&r!==(r="Download "+e[67].name)&&m(i,"aria-label",r),O[0]&4096&&o!==(o="Download "+e[67].name)&&m(i,"title",o),O[0]&4096&&a!==(a=e[67].name+"")&&Pe(f,a),O[0]&4096&&c!==(c=e[67].url)&&m(s,"href",c),e[3]?w&&(w.d(1),w=null):w?w.p(e,O):(w=Lg(e),w.c(),w.m(n,h)),O[0]&4224&&p(n,"focused",e[7]===e[69]),O[0]&4608&&p(n,"selected",e[9].has(e[69]))},d(I){I&&C(n),w&&w.d(),d=!1,Ve(_)}}}function Vg(t){let e,n,i,l,r,o;return{c(){var u;e=v("button"),n=v("i"),i=Ee(" Add Attachment"),m(n,"class","ph ph-plus"),m(e,"class","btn-upload-empty list svelte-1jwja4v"),m(e,"aria-label","Upload attachment"),m(e,"type","button"),e.disabled=l=t[0].disabled||t[0].readonly,P(e,"margin-top",(u=t[12])!=null&&u.length?"0.5rem":"0")},m(u,s){A(u,e,s),S(e,n),S(e,i),r||(o=B(e,"click",t[25]),r=!0)},p(u,s){var a;s[0]&1&&l!==(l=u[0].disabled||u[0].readonly)&&(e.disabled=l),s[0]&4096&&P(e,"margin-top",(a=u[12])!=null&&a.length?"0.5rem":"0")},d(u){u&&C(e),r=!1,o()}}}function Bg(t){let e,n,i,l,r=t[9].size==1?t[9].size+" Item ":t[9].size+" Items ",o,u,s,a,f,c;return{c(){e=v("div"),n=v("button"),n.innerHTML='<i class="ph ph-x"></i>',i=Q(),l=v("span"),o=Ee(r),u=Ee(" Selected"),s=Q(),a=v("button"),a.innerHTML='<i class="ph ph-trash-simple"></i>',m(n,"class","btn-bulk-action btn-close svelte-1jwja4v"),m(n,"type","button"),m(n,"title","Clear Selection"),m(l,"class","selection-count svelte-1jwja4v"),m(a,"class","btn-bulk-action btn-bulk-delete svelte-1jwja4v"),m(a,"type","button"),m(a,"title","Delete Selected"),m(e,"class","bulk-actions-overlay svelte-1jwja4v")},m(g,h){A(g,e,h),S(e,n),S(e,i),S(e,l),S(l,o),S(l,u),S(e,s),S(e,a),f||(c=[B(n,"click",t[23]),B(a,"click",t[24])],f=!0)},p(g,h){h[0]&512&&r!==(r=g[9].size==1?g[9].size+" Item ":g[9].size+" Items ")&&Pe(o,r)},d(g){g&&C(e),f=!1,Ve(c)}}}function L3(t){let e,n,i,l,r,o,u,s,a,f,c,g,h,d,_;const b=[A3,C3,S3],w=[];function E(V,W){return V[13]=="list"?0:V[13]=="carousel"?1:V[13]=="grid"?2:-1}~(n=E(t))&&(i=w[n]=b[n](t));let k=t[9].size>0&&t[13]==="grid"&&!t[3]&&!t[2]&&Bg(t);function I(V){t[51](V)}function O(V){t[52](V)}function D(V){t[53](V)}function N(V){t[54](V)}let M={canSelect:t[16],canDelete:t[15]};return t[12]!==void 0&&(M.items=t[12]),t[11]!==void 0&&(M.open=t[11]),t[10]!==void 0&&(M.currentIndex=t[10]),t[9]!==void 0&&(M.selectedIndices=t[9]),s=new ls({props:M}),Be.push(()=>Gt(s,"items",I)),Be.push(()=>Gt(s,"open",O)),Be.push(()=>Gt(s,"currentIndex",D)),Be.push(()=>Gt(s,"selectedIndices",N)),s.$on("close",t[55]),{c(){e=v("div"),i&&i.c(),l=Q(),k&&k.c(),r=Q(),o=v("input"),u=Q(),We(s.$$.fragment),m(o,"type","file"),o.multiple=t[4],P(o,"display","none"),m(e,"class","superCell"),m(e,"tabindex","0"),p(e,"multirow",!0),p(e,"inEdit",t[5]=="Editing"),p(e,"inline",t[0].role=="tableCell"),p(e,"tableCell",t[0].role=="tableCell"),p(e,"formInput",t[0].role=="formInput"),p(e,"disabled",t[0].disabled),p(e,"readonly",t[0].readonly),P(e,"color",t[0].color),P(e,"background",t[0].background)},m(V,W){A(V,e,W),~n&&w[n].m(e,null),S(e,l),k&&k.m(e,null),S(e,r),S(e,o),t[50](o),S(e,u),je(s,e,null),t[56](e),h=!0,d||(_=[B(o,"change",t[26]),B(e,"keydown",t[57]),B(e,"focusin",function(){Ge(t[1].focus)&&t[1].focus.apply(this,arguments)}),B(e,"focusout",function(){Ge(t[1].focousout)&&t[1].focousout.apply(this,arguments)})],d=!0)},p(V,W){t=V;let ne=n;n=E(t),n===ne?~n&&w[n].p(t,W):(i&&(He(),Z(w[ne],1,1,()=>{w[ne]=null}),ze()),~n?(i=w[n],i?i.p(t,W):(i=w[n]=b[n](t),i.c()),U(i,1),i.m(e,l)):i=null),t[9].size>0&&t[13]==="grid"&&!t[3]&&!t[2]?k?k.p(t,W):(k=Bg(t),k.c(),k.m(e,r)):k&&(k.d(1),k=null),(!h||W[0]&16)&&(o.multiple=t[4]);const H={};W[0]&65536&&(H.canSelect=t[16]),W[0]&32768&&(H.canDelete=t[15]),!a&&W[0]&4096&&(a=!0,H.items=t[12],Wt(()=>a=!1)),!f&&W[0]&2048&&(f=!0,H.open=t[11],Wt(()=>f=!1)),!c&&W[0]&1024&&(c=!0,H.currentIndex=t[10],Wt(()=>c=!1)),!g&&W[0]&512&&(g=!0,H.selectedIndices=t[9],Wt(()=>g=!1)),s.$set(H),(!h||W[0]&32)&&p(e,"inEdit",t[5]=="Editing"),(!h||W[0]&1)&&p(e,"inline",t[0].role=="tableCell"),(!h||W[0]&1)&&p(e,"tableCell",t[0].role=="tableCell"),(!h||W[0]&1)&&p(e,"formInput",t[0].role=="formInput"),(!h||W[0]&1)&&p(e,"disabled",t[0].disabled),(!h||W[0]&1)&&p(e,"readonly",t[0].readonly),W[0]&1&&P(e,"color",t[0].color),W[0]&1&&P(e,"background",t[0].background)},i(V){h||(U(i),U(s.$$.fragment,V),h=!0)},o(V){Z(i),Z(s.$$.fragment,V),h=!1},d(V){V&&C(e),~n&&w[n].d(),k&&k.d(),t[50](null),qe(s),t[56](null),d=!1,Ve(_)}}}function fs(t){var n;return["jpg","jpeg","png","gif","bmp","webp"].includes((n=t.extension)==null?void 0:n.toLowerCase())}function F3(t,e,n){let i,l,r,o,u,s,a,f,c,g,h,d,_,b,w,E=ue,k=()=>(E(),E=ft(K,he=>n(5,w=he)),K);t.$$.on_destroy.push(()=>E());let{$$slots:I={},$$scope:O}=e,{value:D}=e,{cellOptions:N}=e,{fieldSchema:M}=e,{tableid:V}=e,{API:W}=e,{height:ne="auto"}=e,{inBuilder:H}=e;const $=le.createEventDispatcher();let Y=D,G,oe,ie,J=new Set,q=0,j=!1,{cellState:K=Ft(N.initialState??"View",{"*":{goTo(he){return he}},View:{_enter(){},focus(){if(!N.readonly)return"Editing"}},Editing:{_enter(){Y=D,G==null||G.focus(),$("enteredit")},_exit(){$("exitedit")},focousout(he){if(!(G!=null&&G.contains(he.relatedTarget)))return"View"},change(he){N.debounce&&$("change",D)},submit(he){return D!==Y&&$("change",D),$("focusout"),"View"},cancel(){return n(30,D=Y),"View"}}})}=e;k();const x=async he=>{let it=new FormData;for(let ot=0;ot<he.length;ot++)it.append("file",he[ot]);try{let ot=await W.uploadAttachment(V,it);return $("change",[...l,...ot]),ot}catch(ot){return console.error("Upload failed:",ot),[]}};function X(he){l.splice(he,1),n(12,l=[...l]),$("change",l)}function F(he){const it=new Set(J);it.has(he)?it.delete(he):it.add(he),n(9,J=it)}function R(){n(9,J=new Set)}function z(){if(J.size===0)return;Array.from(J).sort((it,ot)=>ot-it).forEach(it=>{l.splice(it,1)}),n(12,l),n(30,D),n(4,i),n(31,M),R(),$("change",l)}function me(){ie&&ie.click()}function se(he){const it=he.target,ot=Array.from(it.files||[]);x(ot)}function Oe(he){!f&&!H&&(l!=null&&l[he])&&fs(l[he])&&n(11,j=!0)}const be={next(){(l==null?void 0:l.length)>1&&(n(10,q=(q+1)%l.length),$("view",{attachment:l[q],index:q}))},prev(){(l==null?void 0:l.length)>1&&(n(10,q=(q-1+l.length)%l.length),$("view",{attachment:l[q],index:q}))},goTo(he){he>=0&&he<(l==null?void 0:l.length)&&(n(10,q=he),$("view",{attachment:l[q],index:q}))},handleKeydown(he){r==="carousel"&&(l==null?void 0:l.length)>1&&(he.key==="ArrowLeft"?(he.preventDefault(),this.prev()):he.key==="ArrowRight"&&(he.preventDefault(),this.next()))}};function Ie(he){var it;if(!(!g||g==="none")){if(g==="view")Oe(he);else if(g==="select")F(he);else if(g==="custom"){let ot=l[he];(it=N.onItemClick)==null||it.call(N,{item:ot,index:he})}}}const ve=he=>X(he),fe=he=>X(he),Ne=he=>n(7,oe=he),te=he=>F(he),ae=he=>be.goTo(he),de=()=>Oe(q),Xe=()=>{h&&Ie(l[q])},Te=he=>{const it=document.createElement("a");it.href=he.url,it.download=he.name,document.body.appendChild(it),it.click(),document.body.removeChild(it)},Se=he=>X(he),Le=(he,it)=>Ie(he),rt=(he,it)=>it.key==="Enter"&&F(he);function kt(he){Be[he?"unshift":"push"](()=>{ie=he,n(8,ie)})}function ke(he){l=he,n(12,l),n(30,D),n(4,i),n(31,M)}function ce(he){j=he,n(11,j)}function re(he){q=he,n(10,q)}function Ae(he){J=he,n(9,J)}const Ue=()=>console.log("closed");function Je(he){Be[he?"unshift":"push"](()=>{G=he,n(6,G)})}const lt=he=>{be.handleKeydown(he)};return t.$$set=he=>{"value"in he&&n(30,D=he.value),"cellOptions"in he&&n(0,N=he.cellOptions),"fieldSchema"in he&&n(31,M=he.fieldSchema),"tableid"in he&&n(32,V=he.tableid),"API"in he&&n(33,W=he.API),"height"in he&&n(34,ne=he.height),"inBuilder"in he&&n(35,H=he.inBuilder),"cellState"in he&&k(n(1,K=he.cellState)),"$$scope"in he&&n(37,O=he.$$scope)},t.$$.update=()=>{var he;t.$$.dirty[1]&1&&n(4,i=((he=M==null?void 0:M.type)==null?void 0:he.includes("single"))!==!0),t.$$.dirty[0]&1073741840&&n(12,l=D&&i?D:D?[D]:[]),t.$$.dirty[0]&1&&n(13,r=N.controlType||"list"),t.$$.dirty[0]&1&&n(20,o=N.imageRatio||"landscape"),t.$$.dirty[0]&1&&n(19,u=N.gridColumns||4),t.$$.dirty[0]&1&&n(18,s=!N.readonly&&!N.disabled),t.$$.dirty[0]&1&&n(2,a=N.isGallery),t.$$.dirty[0]&1&&n(36,f=N.disabled),t.$$.dirty[0]&1&&n(3,c=N.readonly),t.$$.dirty[0]&1&&(g=N.onClickAction),t.$$.dirty[0]&32&&n(17,h=w=="Editing"),t.$$.dirty[0]&12|t.$$.dirty[1]&32&&n(16,d=!c&&!f&&!a),t.$$.dirty[0]&12|t.$$.dirty[1]&32&&n(15,_=!c&&!f&&!a),t.$$.dirty[0]&1&&n(14,b=N.slotted)},[N,K,a,c,i,w,G,oe,ie,J,q,j,l,r,b,_,d,h,s,u,o,X,F,R,z,me,se,Oe,be,Ie,D,M,V,W,ne,H,f,O,I,ve,fe,Ne,te,ae,de,Xe,Te,Se,Le,rt,kt,ke,ce,re,Ae,Ue,Je,lt]}class V3 extends Ze{constructor(e){super(),Qe(this,e,F3,L3,Ye,{value:30,cellOptions:0,fieldSchema:31,tableid:32,API:33,height:34,inBuilder:35,cellState:1},null,[-1,-1,-1])}}function B3(t){let e,n,i;return{c(){e=v("button"),m(e,"class","sc-carousel-button sc-carousel-dot__dot svelte-yu7247"),p(e,"sc-carousel-dot__dot_active",t[0])},m(l,r){A(l,e,r),n||(i=B(e,"click",t[1]),n=!0)},p(l,[r]){r&1&&p(e,"sc-carousel-dot__dot_active",l[0])},i:ue,o:ue,d(l){l&&C(e),n=!1,i()}}}function U3(t,e,n){let{active:i=!1}=e;function l(r){ti.call(this,t,r)}return t.$$set=r=>{"active"in r&&n(0,i=r.active)},[i,l]}class H3 extends Ze{constructor(e){super(),Qe(this,e,U3,B3,Ye,{active:0})}}function Ug(t,e,n){const i=t.slice();return i[5]=e[n],i[7]=n,i}function Hg(t,e){let n,i,l,r;function o(){return e[3](e[7])}return i=new H3({props:{active:e[1]===e[7]}}),i.$on("click",o),{key:t,first:null,c(){n=v("div"),We(i.$$.fragment),l=Q(),m(n,"class","sc-carousel-dots__dot-container svelte-1oj5bge"),this.first=n},m(u,s){A(u,n,s),je(i,n,null),S(n,l),r=!0},p(u,s){e=u;const a={};s&3&&(a.active=e[1]===e[7]),i.$set(a)},i(u){r||(U(i.$$.fragment,u),r=!0)},o(u){Z(i.$$.fragment,u),r=!1},d(u){u&&C(n),qe(i)}}}function z3(t){let e,n=[],i=new Map,l,r=Ce(Array(t[0]));const o=u=>u[7];for(let u=0;u<r.length;u+=1){let s=Ug(t,r,u),a=o(s);i.set(a,n[u]=Hg(a,s))}return{c(){e=v("div");for(let u=0;u<n.length;u+=1)n[u].c();m(e,"class","sc-carousel-dots__container svelte-1oj5bge")},m(u,s){A(u,e,s);for(let a=0;a<n.length;a+=1)n[a]&&n[a].m(e,null);l=!0},p(u,[s]){s&7&&(r=Ce(Array(u[0])),He(),n=Tt(n,s,o,1,u,r,i,e,Di,Hg,null,Ug),ze())},i(u){if(!l){for(let s=0;s<r.length;s+=1)U(n[s]);l=!0}},o(u){for(let s=0;s<n.length;s+=1)Z(n[s]);l=!1},d(u){u&&C(e);for(let s=0;s<n.length;s+=1)n[s].d()}}}function j3(t,e,n){const i=le.createEventDispatcher();let{pagesCount:l=1}=e,{currentPageIndex:r=0}=e;function o(s){i("pageChange",s)}const u=s=>o(s);return t.$$set=s=>{"pagesCount"in s&&n(0,l=s.pagesCount),"currentPageIndex"in s&&n(1,r=s.currentPageIndex)},[l,r,o,u]}class q3 extends Ze{constructor(e){super(),Qe(this,e,j3,z3,Ye,{pagesCount:0,currentPageIndex:1})}}const zl="prev",Li="next";function W3(t){let e,n,i,l;return{c(){e=v("button"),n=v("i"),m(n,"class","sc-carousel-arrow__arrow svelte-9ztt4p"),p(n,"sc-carousel-arrow__arrow-next",t[0]===Li),p(n,"sc-carousel-arrow__arrow-prev",t[0]===zl),m(e,"class","sc-carousel-button sc-carousel-arrow__circle svelte-9ztt4p"),p(e,"sc-carousel-arrow__circle_disabled",t[1])},m(r,o){A(r,e,o),S(e,n),i||(l=B(e,"click",t[2]),i=!0)},p(r,[o]){o&1&&p(n,"sc-carousel-arrow__arrow-next",r[0]===Li),o&1&&p(n,"sc-carousel-arrow__arrow-prev",r[0]===zl),o&2&&p(e,"sc-carousel-arrow__circle_disabled",r[1])},i:ue,o:ue,d(r){r&&C(e),i=!1,l()}}}function G3(t,e,n){let{direction:i=Li}=e,{disabled:l=!1}=e;function r(o){ti.call(this,t,o)}return t.$$set=o=>{"direction"in o&&n(0,i=o.direction),"disabled"in o&&n(1,l=o.disabled)},[i,l,r]}class zg extends Ze{constructor(e){super(),Qe(this,e,G3,W3,Ye,{direction:0,disabled:1})}}function Y3(t){let e;return{c(){e=v("div"),m(e,"class","sc-carousel-progress__indicator svelte-nuyenl"),P(e,"width",t[0]+"%")},m(n,i){A(n,e,i)},p(n,[i]){i&1&&P(e,"width",n[0]+"%")},i:ue,o:ue,d(n){n&&C(e)}}}const jg=100;function K3(t,e,n){let i,{value:l=0}=e;return t.$$set=r=>{"value"in r&&n(1,l=r.value)},t.$$.update=()=>{t.$$.dirty&2&&n(0,i=Math.min(Math.max(l*jg,0),jg))},[i,l]}class X3 extends Ze{constructor(e){super(),Qe(this,e,K3,Y3,Ye,{value:1})}}function Q3(t,e){t.addEventListener("mousedown",e),t.addEventListener("touchstart",e,{passive:!0})}function Z3(t,e){t.removeEventListener("mousedown",e),t.removeEventListener("touchstart",e)}function J3(t,e){t.addEventListener("mouseup",e),t.addEventListener("touchend",e)}function qg(t,e){t.removeEventListener("mouseup",e),t.removeEventListener("touchend",e)}function x3(t,e){t.addEventListener("mousemove",e),t.addEventListener("touchmove",e)}function Wg(t,e){t.removeEventListener("mousemove",e),t.removeEventListener("touchmove",e)}function cs(t){return function(e,n){t.dispatchEvent(new CustomEvent(e,{detail:n}))}}const $3=110,eE=9,tE=111,nE=20;function ds(t){if("TouchEvent"in window&&t instanceof TouchEvent){const e=t.touches[0];return{x:e?e.clientX:0,y:e?e.clientY:0}}return{x:t.clientX,y:t.clientY}}function iE(t,{thresholdProvider:e}){const n=cs(t);let i,l,r=0,o,u=!1;function s(){return Date.now()-o>=tE&&Math.abs(r)>=nE}function a(g){o=Date.now(),r=0,u=!0;const h=ds(g);i=h.x,l=h.y,n("swipeStart",{x:i,y:l}),x3(window,f),J3(window,c)}function f(g){if(!u)return;const h=ds(g),d=h.x-i,_=h.y-l;i=h.x,l=h.y,n("swipeMove",{x:i,y:l,dx:d,dy:_}),d!==0&&Math.sign(d)!==Math.sign(r)&&(r=0),r+=d,Math.abs(r)>e()&&(n("swipeThresholdReached",{direction:r>0?zl:Li}),qg(window,c),Wg(window,f))}function c(g){if(qg(window,c),Wg(window,f),u=!1,!s()){n("swipeFailed");return}const h=ds(g);n("swipeEnd",{x:h.x,y:h.y})}return Q3(t,a),{destroy(){Z3(t,a)}}}function lE(t,e){t.addEventListener("mouseenter",e)}function rE(t,e){t.removeEventListener("mouseenter",e)}function oE(t,e){t.addEventListener("mouseleave",e)}function Gg(t,e){t.removeEventListener("mouseleave",e)}function sE(t){const e=cs(t);function n(){oE(t,i),e("hovered",{value:!0})}function i(){e("hovered",{value:!1}),Gg(t,i)}return lE(t,n),{destroy(){rE(t,n),Gg(t,i)}}}const uE=(t,e)=>{const n=e.x-t.x,i=e.y-t.y;return Math.sqrt(n*n+i*i)};function jl(t,e,n){return Math.max(t,Math.min(e,n))}function aE(t,e){t.addEventListener("touchstart",e,{passive:!0})}function fE(t,e){t.removeEventListener("touchstart",e)}function cE(t,e){t.addEventListener("touchend",e)}function Yg(t,e){t.removeEventListener("touchend",e)}function dE(t){const e=cs(t);let n=0,i={x:0,y:0};function l({tapEndedAt:u,tapEndedPos:s}){const a=u-n,f=uE(i,s);return a<=$3&&f<=eE}function r(u){n=Date.now();const s=u.touches[0];i={x:s.clientX,y:s.clientY},cE(t,o)}function o(u){Yg(t,o);const s=u.changedTouches[0];l({tapEndedAt:Date.now(),tapEndedPos:{x:s.clientX,y:s.clientY}})&&e("tapped")}return aE(t,r),{destroy(){fE(t,r),Yg(t,o)}}}function hE({currentParticleIndex:t,particlesCount:e,clonesCountHead:n,clonesCountTotal:i,particlesToScroll:l}){return t===e-n?0:t===0?Kg({particlesCountWithoutClones:e-i,particlesToScroll:l})-1:Math.floor((t-n)/l)}function gE({currentParticleIndex:t,particlesToScroll:e}){return Math.ceil(t/e)}function mE({currentParticleIndex:t,particlesCount:e,clonesCountHead:n,clonesCountTotal:i,infinite:l,particlesToScroll:r}){return l?hE({currentParticleIndex:t,particlesCount:e,clonesCountHead:n,clonesCountTotal:i,particlesToScroll:r}):gE({currentParticleIndex:t,particlesToScroll:r})}function Kg({particlesCountWithoutClones:t,particlesToScroll:e}){return Math.ceil(t/e)}function _E({particlesCountWithoutClones:t,particlesToScroll:e,particlesToShow:n}){const i=Xg({particlesCountWithoutClones:t,particlesToScroll:e,particlesToShow:n});return Math.ceil(t/e)-i}function pE({infinite:t,particlesCountWithoutClones:e,particlesToScroll:n,particlesToShow:i}){return t?Kg({particlesCountWithoutClones:e,particlesToScroll:n}):_E({particlesCountWithoutClones:e,particlesToScroll:n,particlesToShow:i})}function bE({pageIndex:t,clonesCountHead:e,clonesCountTail:n,particlesToScroll:i,particlesCount:l}){return jl(0,Math.min(e+t*i,l-n),l-1)}function wE({pageIndex:t,particlesToScroll:e,particlesCount:n,particlesToShow:i}){return jl(0,Math.min(t*e,n-i),n-1)}function hs({infinite:t,pageIndex:e,clonesCountHead:n,clonesCountTail:i,particlesToScroll:l,particlesCount:r,particlesToShow:o}){return t?bE({pageIndex:e,clonesCountHead:n,clonesCountTail:i,particlesToScroll:l,particlesCount:r}):wE({pageIndex:e,particlesToScroll:l,particlesCount:r,particlesToShow:o})}function kE({particlesContainerChildren:t,particleWidth:e}){for(let n=0;n<t.length;n++)t[n].style.minWidth=`${e}px`,t[n].style.maxWidth=`${e}px`}function Xg({particlesToScroll:t,particlesToShow:e,particlesCountWithoutClones:n}){const i=t-e;let l=e;for(;;){const r=n-l-i;if(r<e)return Math.max(r,0);l+=e+i}}function yE(t){return new ResizeObserver(e=>{t({width:e[0].contentRect.width})})}function EE({clonesCountHead:t,clonesCountTail:e,particlesContainerChildren:n}){const i=[];for(let o=0;o<e;o++)i.push(n[o].cloneNode(!0));const l=[],r=n.length;for(let o=r-1;o>r-1-t;o--)l.push(n[o].cloneNode(!0));return{clonesToAppend:i,clonesToPrepend:l}}function vE({particlesContainer:t,clonesToAppend:e,clonesToPrepend:n}){for(let i=0;i<e.length;i++)t.append(e[i]);for(let i=0;i<n.length;i++)t.prepend(n[i])}function SE({infinite:t,particlesToShow:e,partialPageSize:n}){const i=t?{head:Math.ceil(n||e),tail:Math.ceil(e)}:{head:0,tail:0};return{...i,total:i.head+i.tail}}const ur=(t,e,n)=>t&&t.hasOwnProperty(e)?t[e]:n,gs=t=>e=>{t[e]&&t[e]()};var CE="Expected a function",Qg="__lodash_hash_undefined__",AE="[object Function]",TE="[object GeneratorFunction]",IE="[object Symbol]",DE=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,OE=/^\w*$/,RE=/^\./,PE=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ME=/[\\^$.*+?()[\]{}|]/g,NE=/\\(\\)?/g,LE=/^\[object .+?Constructor\]$/,FE=typeof jn=="object"&&jn&&jn.Object===Object&&jn,VE=typeof self=="object"&&self&&self.Object===Object&&self,ms=FE||VE||Function("return this")();function BE(t,e){return t==null?void 0:t[e]}function UE(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch{}return e}var HE=Array.prototype,zE=Function.prototype,Zg=Object.prototype,_s=ms["__core-js_shared__"],Jg=function(){var t=/[^.]+$/.exec(_s&&_s.keys&&_s.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),xg=zE.toString,ps=Zg.hasOwnProperty,$g=Zg.toString,jE=RegExp("^"+xg.call(ps).replace(ME,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),em=ms.Symbol,qE=HE.splice,WE=im(ms,"Map"),ar=im(Object,"create"),tm=em?em.prototype:void 0,nm=tm?tm.toString:void 0;function ul(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function GE(){this.__data__=ar?ar(null):{}}function YE(t){return this.has(t)&&delete this.__data__[t]}function KE(t){var e=this.__data__;if(ar){var n=e[t];return n===Qg?void 0:n}return ps.call(e,t)?e[t]:void 0}function XE(t){var e=this.__data__;return ar?e[t]!==void 0:ps.call(e,t)}function QE(t,e){var n=this.__data__;return n[t]=ar&&e===void 0?Qg:e,this}ul.prototype.clear=GE,ul.prototype.delete=YE,ul.prototype.get=KE,ul.prototype.has=XE,ul.prototype.set=QE;function ql(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function ZE(){this.__data__=[]}function JE(t){var e=this.__data__,n=to(e,t);if(n<0)return!1;var i=e.length-1;return n==i?e.pop():qE.call(e,n,1),!0}function xE(t){var e=this.__data__,n=to(e,t);return n<0?void 0:e[n][1]}function $E(t){return to(this.__data__,t)>-1}function ev(t,e){var n=this.__data__,i=to(n,t);return i<0?n.push([t,e]):n[i][1]=e,this}ql.prototype.clear=ZE,ql.prototype.delete=JE,ql.prototype.get=xE,ql.prototype.has=$E,ql.prototype.set=ev;function al(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function tv(){this.__data__={hash:new ul,map:new(WE||ql),string:new ul}}function nv(t){return no(this,t).delete(t)}function iv(t){return no(this,t).get(t)}function lv(t){return no(this,t).has(t)}function rv(t,e){return no(this,t).set(t,e),this}al.prototype.clear=tv,al.prototype.delete=nv,al.prototype.get=iv,al.prototype.has=lv,al.prototype.set=rv;function to(t,e){for(var n=t.length;n--;)if(_v(t[n][0],e))return n;return-1}function ov(t,e){e=fv(e,t)?[e]:av(e);for(var n=0,i=e.length;t!=null&&n<i;)t=t[gv(e[n++])];return n&&n==i?t:void 0}function sv(t){if(!rm(t)||dv(t))return!1;var e=pv(t)||UE(t)?jE:LE;return e.test(mv(t))}function uv(t){if(typeof t=="string")return t;if(ws(t))return nm?nm.call(t):"";var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function av(t){return lm(t)?t:hv(t)}function no(t,e){var n=t.__data__;return cv(e)?n[typeof e=="string"?"string":"hash"]:n.map}function im(t,e){var n=BE(t,e);return sv(n)?n:void 0}function fv(t,e){if(lm(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||ws(t)?!0:OE.test(t)||!DE.test(t)||e!=null&&t in Object(e)}function cv(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function dv(t){return!!Jg&&Jg in t}var hv=bs(function(t){t=wv(t);var e=[];return RE.test(t)&&e.push(""),t.replace(PE,function(n,i,l,r){e.push(l?r.replace(NE,"$1"):i||n)}),e});function gv(t){if(typeof t=="string"||ws(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function mv(t){if(t!=null){try{return xg.call(t)}catch{}try{return t+""}catch{}}return""}function bs(t,e){if(typeof t!="function"||e&&typeof e!="function")throw new TypeError(CE);var n=function(){var i=arguments,l=e?e.apply(this,i):i[0],r=n.cache;if(r.has(l))return r.get(l);var o=t.apply(this,i);return n.cache=r.set(l,o),o};return n.cache=new(bs.Cache||al),n}bs.Cache=al;function _v(t,e){return t===e||t!==t&&e!==e}var lm=Array.isArray;function pv(t){var e=rm(t)?$g.call(t):"";return e==AE||e==TE}function rm(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function bv(t){return!!t&&typeof t=="object"}function ws(t){return typeof t=="symbol"||bv(t)&&$g.call(t)==IE}function wv(t){return t==null?"":uv(t)}function kv(t,e,n){var i=t==null?void 0:ov(t,e);return i===void 0?n:i}var yv=kv;const io=po(yv);var lo={exports:{}};lo.exports,function(t,e){var n=200,i="__lodash_hash_undefined__",l=9007199254740991,r="[object Arguments]",o="[object Array]",u="[object Boolean]",s="[object Date]",a="[object Error]",f="[object Function]",c="[object GeneratorFunction]",g="[object Map]",h="[object Number]",d="[object Object]",_="[object Promise]",b="[object RegExp]",w="[object Set]",E="[object String]",k="[object Symbol]",I="[object WeakMap]",O="[object ArrayBuffer]",D="[object DataView]",N="[object Float32Array]",M="[object Float64Array]",V="[object Int8Array]",W="[object Int16Array]",ne="[object Int32Array]",H="[object Uint8Array]",$="[object Uint8ClampedArray]",Y="[object Uint16Array]",G="[object Uint32Array]",oe=/[\\^$.*+?()[\]{}|]/g,ie=/\w*$/,J=/^\[object .+?Constructor\]$/,q=/^(?:0|[1-9]\d*)$/,j={};j[r]=j[o]=j[O]=j[D]=j[u]=j[s]=j[N]=j[M]=j[V]=j[W]=j[ne]=j[g]=j[h]=j[d]=j[b]=j[w]=j[E]=j[k]=j[H]=j[$]=j[Y]=j[G]=!0,j[a]=j[f]=j[I]=!1;var K=typeof jn=="object"&&jn&&jn.Object===Object&&jn,x=typeof self=="object"&&self&&self.Object===Object&&self,X=K||x||Function("return this")(),F=e&&!e.nodeType&&e,R=F&&!0&&t&&!t.nodeType&&t,z=R&&R.exports===F;function me(y,L){return y.set(L[0],L[1]),y}function se(y,L){return y.add(L),y}function Oe(y,L){for(var ee=-1,ye=y?y.length:0;++ee<ye&&L(y[ee],ee,y)!==!1;);return y}function be(y,L){for(var ee=-1,ye=L.length,at=y.length;++ee<ye;)y[at+ee]=L[ee];return y}function Ie(y,L,ee,ye){for(var at=-1,et=y?y.length:0;++at<et;)ee=L(ee,y[at],at,y);return ee}function ve(y,L){for(var ee=-1,ye=Array(y);++ee<y;)ye[ee]=L(ee);return ye}function fe(y,L){return y==null?void 0:y[L]}function Ne(y){var L=!1;if(y!=null&&typeof y.toString!="function")try{L=!!(y+"")}catch{}return L}function te(y){var L=-1,ee=Array(y.size);return y.forEach(function(ye,at){ee[++L]=[at,ye]}),ee}function ae(y,L){return function(ee){return y(L(ee))}}function de(y){var L=-1,ee=Array(y.size);return y.forEach(function(ye){ee[++L]=ye}),ee}var Xe=Array.prototype,Te=Function.prototype,Se=Object.prototype,Le=X["__core-js_shared__"],rt=function(){var y=/[^.]+$/.exec(Le&&Le.keys&&Le.keys.IE_PROTO||"");return y?"Symbol(src)_1."+y:""}(),kt=Te.toString,ke=Se.hasOwnProperty,ce=Se.toString,re=RegExp("^"+kt.call(ke).replace(oe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ae=z?X.Buffer:void 0,Ue=X.Symbol,Je=X.Uint8Array,lt=ae(Object.getPrototypeOf,Object),he=Object.create,it=Se.propertyIsEnumerable,ot=Xe.splice,wt=Object.getOwnPropertySymbols,Ct=Ae?Ae.isBuffer:void 0,ln=ae(Object.keys,Object),It=yn(X,"DataView"),xt=yn(X,"Map"),_e=yn(X,"Promise"),st=yn(X,"Set"),we=yn(X,"WeakMap"),xe=yn(Object,"create"),pe=Rt(It),_t=Rt(xt),Bt=Rt(_e),Kn=Rt(st),ui=Rt(we),Mn=Ue?Ue.prototype:void 0,ai=Mn?Mn.valueOf:void 0;function Nn(y){var L=-1,ee=y?y.length:0;for(this.clear();++L<ee;){var ye=y[L];this.set(ye[0],ye[1])}}function fl(){this.__data__=xe?xe(null):{}}function cl(y){return this.has(y)&&delete this.__data__[y]}function dl(y){var L=this.__data__;if(xe){var ee=L[y];return ee===i?void 0:ee}return ke.call(L,y)?L[y]:void 0}function _i(y){var L=this.__data__;return xe?L[y]!==void 0:ke.call(L,y)}function Tn(y,L){var ee=this.__data__;return ee[y]=xe&&L===void 0?i:L,this}Nn.prototype.clear=fl,Nn.prototype.delete=cl,Nn.prototype.get=dl,Nn.prototype.has=_i,Nn.prototype.set=Tn;function Kt(y){var L=-1,ee=y?y.length:0;for(this.clear();++L<ee;){var ye=y[L];this.set(ye[0],ye[1])}}function Wl(){this.__data__=[]}function pi(y){var L=this.__data__,ee=ci(L,y);if(ee<0)return!1;var ye=L.length-1;return ee==ye?L.pop():ot.call(L,ee,1),!0}function hl(y){var L=this.__data__,ee=ci(L,y);return ee<0?void 0:L[ee][1]}function Fi(y){return ci(this.__data__,y)>-1}function gl(y,L){var ee=this.__data__,ye=ci(ee,y);return ye<0?ee.push([y,L]):ee[ye][1]=L,this}Kt.prototype.clear=Wl,Kt.prototype.delete=pi,Kt.prototype.get=hl,Kt.prototype.has=Fi,Kt.prototype.set=gl;function rn(y){var L=-1,ee=y?y.length:0;for(this.clear();++L<ee;){var ye=y[L];this.set(ye[0],ye[1])}}function Ln(){this.__data__={hash:new Nn,map:new(xt||Kt),string:new Nn}}function Gl(y){return Un(this,y).delete(y)}function Vi(y){return Un(this,y).get(y)}function Bi(y){return Un(this,y).has(y)}function Ui(y,L){return Un(this,y).set(y,L),this}rn.prototype.clear=Ln,rn.prototype.delete=Gl,rn.prototype.get=Vi,rn.prototype.has=Bi,rn.prototype.set=Ui;function on(y){this.__data__=new Kt(y)}function Hi(){this.__data__=new Kt}function ml(y){return this.__data__.delete(y)}function _l(y){return this.__data__.get(y)}function zi(y){return this.__data__.has(y)}function ji(y,L){var ee=this.__data__;if(ee instanceof Kt){var ye=ee.__data__;if(!xt||ye.length<n-1)return ye.push([y,L]),this;ee=this.__data__=new rn(ye)}return ee.set(y,L),this}on.prototype.clear=Hi,on.prototype.delete=ml,on.prototype.get=_l,on.prototype.has=zi,on.prototype.set=ji;function $n(y,L){var ee=Si(y)||Qn(y)?ve(y.length,String):[],ye=ee.length,at=!!ye;for(var et in y)ke.call(y,et)&&!(at&&(et=="length"||di(et,ye)))&&ee.push(et);return ee}function fi(y,L,ee){var ye=y[L];(!(ke.call(y,L)&&sn(ye,ee))||ee===void 0&&!(L in y))&&(y[L]=ee)}function ci(y,L){for(var ee=y.length;ee--;)if(sn(y[ee][0],L))return ee;return-1}function In(y,L){return y&&Bn(L,Zn(L),y)}function bi(y,L,ee,ye,at,et,dt){var pt;if(ye&&(pt=et?ye(y,at,et,dt):ye(y)),pt!==void 0)return pt;if(!Hn(y))return y;var At=Si(y);if(At){if(pt=wl(y),!L)return Zi(y,pt)}else{var yt=dn(y),Nt=yt==f||yt==c;if(Pt(y))return ei(y,L);if(yt==d||yt==r||Nt&&!et){if(Ne(y))return et?y:{};if(pt=$t(Nt?{}:y),!L)return ki(y,In(pt,y))}else{if(!j[yt])return et?y:{};pt=En(y,yt,bi,L)}}dt||(dt=new on);var Xt=dt.get(y);if(Xt)return Xt;if(dt.set(y,pt),!At)var Vt=ee?bl(y):Zn(y);return Oe(Vt||y,function(Dt,Mt){Vt&&(Mt=Dt,Dt=y[Mt]),fi(pt,Mt,bi(Dt,L,ee,ye,Mt,y,dt))}),pt}function qi(y){return Hn(y)?he(y):{}}function Wi(y,L,ee){var ye=L(y);return Si(y)?ye:be(ye,ee(y))}function Gi(y){return ce.call(y)}function Yi(y){if(!Hn(y)||Ei(y))return!1;var L=Ai(y)||Ne(y)?re:J;return L.test(Rt(y))}function Ki(y){if(!Ji(y))return ln(y);var L=[];for(var ee in Object(y))ke.call(y,ee)&&ee!="constructor"&&L.push(ee);return L}function ei(y,L){if(L)return y.slice();var ee=new y.constructor(y.length);return y.copy(ee),ee}function Fn(y){var L=new y.constructor(y.byteLength);return new Je(L).set(new Je(y)),L}function Xn(y,L){var ee=L?Fn(y.buffer):y.buffer;return new y.constructor(ee,y.byteOffset,y.byteLength)}function Xi(y,L,ee){var ye=L?ee(te(y),!0):te(y);return Ie(ye,me,new y.constructor)}function wi(y){var L=new y.constructor(y.source,ie.exec(y));return L.lastIndex=y.lastIndex,L}function Qi(y,L,ee){var ye=L?ee(de(y),!0):de(y);return Ie(ye,se,new y.constructor)}function pl(y){return ai?Object(ai.call(y)):{}}function Vn(y,L){var ee=L?Fn(y.buffer):y.buffer;return new y.constructor(ee,y.byteOffset,y.length)}function Zi(y,L){var ee=-1,ye=y.length;for(L||(L=Array(ye));++ee<ye;)L[ee]=y[ee];return L}function Bn(y,L,ee,ye){ee||(ee={});for(var at=-1,et=L.length;++at<et;){var dt=L[at],pt=void 0;fi(ee,dt,pt===void 0?y[dt]:pt)}return ee}function ki(y,L){return Bn(y,Dn(y),L)}function bl(y){return Wi(y,Zn,Dn)}function Un(y,L){var ee=y.__data__;return yi(L)?ee[typeof L=="string"?"string":"hash"]:ee.map}function yn(y,L){var ee=fe(y,L);return Yi(ee)?ee:void 0}var Dn=wt?ae(wt,Object):kl,dn=Gi;(It&&dn(new It(new ArrayBuffer(1)))!=D||xt&&dn(new xt)!=g||_e&&dn(_e.resolve())!=_||st&&dn(new st)!=w||we&&dn(new we)!=I)&&(dn=function(y){var L=ce.call(y),ee=L==d?y.constructor:void 0,ye=ee?Rt(ee):void 0;if(ye)switch(ye){case pe:return D;case _t:return g;case Bt:return _;case Kn:return w;case ui:return I}return L});function wl(y){var L=y.length,ee=y.constructor(L);return L&&typeof y[0]=="string"&&ke.call(y,"index")&&(ee.index=y.index,ee.input=y.input),ee}function $t(y){return typeof y.constructor=="function"&&!Ji(y)?qi(lt(y)):{}}function En(y,L,ee,ye){var at=y.constructor;switch(L){case O:return Fn(y);case u:case s:return new at(+y);case D:return Xn(y,ye);case N:case M:case V:case W:case ne:case H:case $:case Y:case G:return Vn(y,ye);case g:return Xi(y,ye,ee);case h:case E:return new at(y);case b:return wi(y);case w:return Qi(y,ye,ee);case k:return pl(y)}}function di(y,L){return L=L??l,!!L&&(typeof y=="number"||q.test(y))&&y>-1&&y%1==0&&y<L}function yi(y){var L=typeof y;return L=="string"||L=="number"||L=="symbol"||L=="boolean"?y!=="__proto__":y===null}function Ei(y){return!!rt&&rt in y}function Ji(y){var L=y&&y.constructor,ee=typeof L=="function"&&L.prototype||Se;return y===ee}function Rt(y){if(y!=null){try{return kt.call(y)}catch{}try{return y+""}catch{}}return""}function vi(y){return bi(y,!0,!0)}function sn(y,L){return y===L||y!==y&&L!==L}function Qn(y){return Ci(y)&&ke.call(y,"callee")&&(!it.call(y,"callee")||ce.call(y)==r)}var Si=Array.isArray;function en(y){return y!=null&&xi(y.length)&&!Ai(y)}function Ci(y){return hi(y)&&en(y)}var Pt=Ct||$i;function Ai(y){var L=Hn(y)?ce.call(y):"";return L==f||L==c}function xi(y){return typeof y=="number"&&y>-1&&y%1==0&&y<=l}function Hn(y){var L=typeof y;return!!y&&(L=="object"||L=="function")}function hi(y){return!!y&&typeof y=="object"}function Zn(y){return en(y)?$n(y):Ki(y)}function kl(){return[]}function $i(){return!1}t.exports=vi}(lo,lo.exports);var Ev=lo.exports;const vv=po(Ev);var ro={exports:{}};ro.exports,function(t,e){var n=200,i="__lodash_hash_undefined__",l=1,r=2,o=9007199254740991,u="[object Arguments]",s="[object Array]",a="[object AsyncFunction]",f="[object Boolean]",c="[object Date]",g="[object Error]",h="[object Function]",d="[object GeneratorFunction]",_="[object Map]",b="[object Number]",w="[object Null]",E="[object Object]",k="[object Promise]",I="[object Proxy]",O="[object RegExp]",D="[object Set]",N="[object String]",M="[object Symbol]",V="[object Undefined]",W="[object WeakMap]",ne="[object ArrayBuffer]",H="[object DataView]",$="[object Float32Array]",Y="[object Float64Array]",G="[object Int8Array]",oe="[object Int16Array]",ie="[object Int32Array]",J="[object Uint8Array]",q="[object Uint8ClampedArray]",j="[object Uint16Array]",K="[object Uint32Array]",x=/[\\^$.*+?()[\]{}|]/g,X=/^\[object .+?Constructor\]$/,F=/^(?:0|[1-9]\d*)$/,R={};R[$]=R[Y]=R[G]=R[oe]=R[ie]=R[J]=R[q]=R[j]=R[K]=!0,R[u]=R[s]=R[ne]=R[f]=R[H]=R[c]=R[g]=R[h]=R[_]=R[b]=R[E]=R[O]=R[D]=R[N]=R[W]=!1;var z=typeof jn=="object"&&jn&&jn.Object===Object&&jn,me=typeof self=="object"&&self&&self.Object===Object&&self,se=z||me||Function("return this")(),Oe=e&&!e.nodeType&&e,be=Oe&&!0&&t&&!t.nodeType&&t,Ie=be&&be.exports===Oe,ve=Ie&&z.process,fe=function(){try{return ve&&ve.binding&&ve.binding("util")}catch{}}(),Ne=fe&&fe.isTypedArray;function te(y,L){for(var ee=-1,ye=y==null?0:y.length,at=0,et=[];++ee<ye;){var dt=y[ee];L(dt,ee,y)&&(et[at++]=dt)}return et}function ae(y,L){for(var ee=-1,ye=L.length,at=y.length;++ee<ye;)y[at+ee]=L[ee];return y}function de(y,L){for(var ee=-1,ye=y==null?0:y.length;++ee<ye;)if(L(y[ee],ee,y))return!0;return!1}function Xe(y,L){for(var ee=-1,ye=Array(y);++ee<y;)ye[ee]=L(ee);return ye}function Te(y){return function(L){return y(L)}}function Se(y,L){return y.has(L)}function Le(y,L){return y==null?void 0:y[L]}function rt(y){var L=-1,ee=Array(y.size);return y.forEach(function(ye,at){ee[++L]=[at,ye]}),ee}function kt(y,L){return function(ee){return y(L(ee))}}function ke(y){var L=-1,ee=Array(y.size);return y.forEach(function(ye){ee[++L]=ye}),ee}var ce=Array.prototype,re=Function.prototype,Ae=Object.prototype,Ue=se["__core-js_shared__"],Je=re.toString,lt=Ae.hasOwnProperty,he=function(){var y=/[^.]+$/.exec(Ue&&Ue.keys&&Ue.keys.IE_PROTO||"");return y?"Symbol(src)_1."+y:""}(),it=Ae.toString,ot=RegExp("^"+Je.call(lt).replace(x,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),wt=Ie?se.Buffer:void 0,Ct=se.Symbol,ln=se.Uint8Array,It=Ae.propertyIsEnumerable,xt=ce.splice,_e=Ct?Ct.toStringTag:void 0,st=Object.getOwnPropertySymbols,we=wt?wt.isBuffer:void 0,xe=kt(Object.keys,Object),pe=Dn(se,"DataView"),_t=Dn(se,"Map"),Bt=Dn(se,"Promise"),Kn=Dn(se,"Set"),ui=Dn(se,"WeakMap"),Mn=Dn(Object,"create"),ai=Rt(pe),Nn=Rt(_t),fl=Rt(Bt),cl=Rt(Kn),dl=Rt(ui),_i=Ct?Ct.prototype:void 0,Tn=_i?_i.valueOf:void 0;function Kt(y){var L=-1,ee=y==null?0:y.length;for(this.clear();++L<ee;){var ye=y[L];this.set(ye[0],ye[1])}}function Wl(){this.__data__=Mn?Mn(null):{},this.size=0}function pi(y){var L=this.has(y)&&delete this.__data__[y];return this.size-=L?1:0,L}function hl(y){var L=this.__data__;if(Mn){var ee=L[y];return ee===i?void 0:ee}return lt.call(L,y)?L[y]:void 0}function Fi(y){var L=this.__data__;return Mn?L[y]!==void 0:lt.call(L,y)}function gl(y,L){var ee=this.__data__;return this.size+=this.has(y)?0:1,ee[y]=Mn&&L===void 0?i:L,this}Kt.prototype.clear=Wl,Kt.prototype.delete=pi,Kt.prototype.get=hl,Kt.prototype.has=Fi,Kt.prototype.set=gl;function rn(y){var L=-1,ee=y==null?0:y.length;for(this.clear();++L<ee;){var ye=y[L];this.set(ye[0],ye[1])}}function Ln(){this.__data__=[],this.size=0}function Gl(y){var L=this.__data__,ee=ei(L,y);if(ee<0)return!1;var ye=L.length-1;return ee==ye?L.pop():xt.call(L,ee,1),--this.size,!0}function Vi(y){var L=this.__data__,ee=ei(L,y);return ee<0?void 0:L[ee][1]}function Bi(y){return ei(this.__data__,y)>-1}function Ui(y,L){var ee=this.__data__,ye=ei(ee,y);return ye<0?(++this.size,ee.push([y,L])):ee[ye][1]=L,this}rn.prototype.clear=Ln,rn.prototype.delete=Gl,rn.prototype.get=Vi,rn.prototype.has=Bi,rn.prototype.set=Ui;function on(y){var L=-1,ee=y==null?0:y.length;for(this.clear();++L<ee;){var ye=y[L];this.set(ye[0],ye[1])}}function Hi(){this.size=0,this.__data__={hash:new Kt,map:new(_t||rn),string:new Kt}}function ml(y){var L=yn(this,y).delete(y);return this.size-=L?1:0,L}function _l(y){return yn(this,y).get(y)}function zi(y){return yn(this,y).has(y)}function ji(y,L){var ee=yn(this,y),ye=ee.size;return ee.set(y,L),this.size+=ee.size==ye?0:1,this}on.prototype.clear=Hi,on.prototype.delete=ml,on.prototype.get=_l,on.prototype.has=zi,on.prototype.set=ji;function $n(y){var L=-1,ee=y==null?0:y.length;for(this.__data__=new on;++L<ee;)this.add(y[L])}function fi(y){return this.__data__.set(y,i),this}function ci(y){return this.__data__.has(y)}$n.prototype.add=$n.prototype.push=fi,$n.prototype.has=ci;function In(y){var L=this.__data__=new rn(y);this.size=L.size}function bi(){this.__data__=new rn,this.size=0}function qi(y){var L=this.__data__,ee=L.delete(y);return this.size=L.size,ee}function Wi(y){return this.__data__.get(y)}function Gi(y){return this.__data__.has(y)}function Yi(y,L){var ee=this.__data__;if(ee instanceof rn){var ye=ee.__data__;if(!_t||ye.length<n-1)return ye.push([y,L]),this.size=++ee.size,this;ee=this.__data__=new on(ye)}return ee.set(y,L),this.size=ee.size,this}In.prototype.clear=bi,In.prototype.delete=qi,In.prototype.get=Wi,In.prototype.has=Gi,In.prototype.set=Yi;function Ki(y,L){var ee=Qn(y),ye=!ee&&sn(y),at=!ee&&!ye&&en(y),et=!ee&&!ye&&!at&&hi(y),dt=ee||ye||at||et,pt=dt?Xe(y.length,String):[],At=pt.length;for(var yt in y)lt.call(y,yt)&&!(dt&&(yt=="length"||at&&(yt=="offset"||yt=="parent")||et&&(yt=="buffer"||yt=="byteLength"||yt=="byteOffset")||En(yt,At)))&&pt.push(yt);return pt}function ei(y,L){for(var ee=y.length;ee--;)if(vi(y[ee][0],L))return ee;return-1}function Fn(y,L,ee){var ye=L(y);return Qn(y)?ye:ae(ye,ee(y))}function Xn(y){return y==null?y===void 0?V:w:_e&&_e in Object(y)?dn(y):Ji(y)}function Xi(y){return Hn(y)&&Xn(y)==u}function wi(y,L,ee,ye,at){return y===L?!0:y==null||L==null||!Hn(y)&&!Hn(L)?y!==y&&L!==L:Qi(y,L,ee,ye,wi,at)}function Qi(y,L,ee,ye,at,et){var dt=Qn(y),pt=Qn(L),At=dt?s:$t(y),yt=pt?s:$t(L);At=At==u?E:At,yt=yt==u?E:yt;var Nt=At==E,Xt=yt==E,Vt=At==yt;if(Vt&&en(y)){if(!en(L))return!1;dt=!0,Nt=!1}if(Vt&&!Nt)return et||(et=new In),dt||hi(y)?Bn(y,L,ee,ye,at,et):ki(y,L,At,ee,ye,at,et);if(!(ee&l)){var Dt=Nt&<.call(y,"__wrapped__"),Mt=Xt&<.call(L,"__wrapped__");if(Dt||Mt){var On=Dt?y.value():y,pn=Mt?L.value():L;return et||(et=new In),at(On,pn,ee,ye,et)}}return Vt?(et||(et=new In),bl(y,L,ee,ye,at,et)):!1}function pl(y){if(!xi(y)||yi(y))return!1;var L=Pt(y)?ot:X;return L.test(Rt(y))}function Vn(y){return Hn(y)&&Ai(y.length)&&!!R[Xn(y)]}function Zi(y){if(!Ei(y))return xe(y);var L=[];for(var ee in Object(y))lt.call(y,ee)&&ee!="constructor"&&L.push(ee);return L}function Bn(y,L,ee,ye,at,et){var dt=ee&l,pt=y.length,At=L.length;if(pt!=At&&!(dt&&At>pt))return!1;var yt=et.get(y);if(yt&&et.get(L))return yt==L;var Nt=-1,Xt=!0,Vt=ee&r?new $n:void 0;for(et.set(y,L),et.set(L,y);++Nt<pt;){var Dt=y[Nt],Mt=L[Nt];if(ye)var On=dt?ye(Mt,Dt,Nt,L,y,et):ye(Dt,Mt,Nt,y,L,et);if(On!==void 0){if(On)continue;Xt=!1;break}if(Vt){if(!de(L,function(pn,Rn){if(!Se(Vt,Rn)&&(Dt===pn||at(Dt,pn,ee,ye,et)))return Vt.push(Rn)})){Xt=!1;break}}else if(!(Dt===Mt||at(Dt,Mt,ee,ye,et))){Xt=!1;break}}return et.delete(y),et.delete(L),Xt}function ki(y,L,ee,ye,at,et,dt){switch(ee){case H:if(y.byteLength!=L.byteLength||y.byteOffset!=L.byteOffset)return!1;y=y.buffer,L=L.buffer;case ne:return!(y.byteLength!=L.byteLength||!et(new ln(y),new ln(L)));case f:case c:case b:return vi(+y,+L);case g:return y.name==L.name&&y.message==L.message;case O:case N:return y==L+"";case _:var pt=rt;case D:var At=ye&l;if(pt||(pt=ke),y.size!=L.size&&!At)return!1;var yt=dt.get(y);if(yt)return yt==L;ye|=r,dt.set(y,L);var Nt=Bn(pt(y),pt(L),ye,at,et,dt);return dt.delete(y),Nt;case M:if(Tn)return Tn.call(y)==Tn.call(L)}return!1}function bl(y,L,ee,ye,at,et){var dt=ee&l,pt=Un(y),At=pt.length,yt=Un(L),Nt=yt.length;if(At!=Nt&&!dt)return!1;for(var Xt=At;Xt--;){var Vt=pt[Xt];if(!(dt?Vt in L:lt.call(L,Vt)))return!1}var Dt=et.get(y);if(Dt&&et.get(L))return Dt==L;var Mt=!0;et.set(y,L),et.set(L,y);for(var On=dt;++Xt<At;){Vt=pt[Xt];var pn=y[Vt],Rn=L[Vt];if(ye)var hn=dt?ye(Rn,pn,Vt,L,y,et):ye(pn,Rn,Vt,y,L,et);if(!(hn===void 0?pn===Rn||at(pn,Rn,ee,ye,et):hn)){Mt=!1;break}On||(On=Vt=="constructor")}if(Mt&&!On){var yl=y.constructor,Ti=L.constructor;yl!=Ti&&"constructor"in y&&"constructor"in L&&!(typeof yl=="function"&&yl instanceof yl&&typeof Ti=="function"&&Ti instanceof Ti)&&(Mt=!1)}return et.delete(y),et.delete(L),Mt}function Un(y){return Fn(y,Zn,wl)}function yn(y,L){var ee=y.__data__;return di(L)?ee[typeof L=="string"?"string":"hash"]:ee.map}function Dn(y,L){var ee=Le(y,L);return pl(ee)?ee:void 0}function dn(y){var L=lt.call(y,_e),ee=y[_e];try{y[_e]=void 0;var ye=!0}catch{}var at=it.call(y);return ye&&(L?y[_e]=ee:delete y[_e]),at}var wl=st?function(y){return y==null?[]:(y=Object(y),te(st(y),function(L){return It.call(y,L)}))}:kl,$t=Xn;(pe&&$t(new pe(new ArrayBuffer(1)))!=H||_t&&$t(new _t)!=_||Bt&&$t(Bt.resolve())!=k||Kn&&$t(new Kn)!=D||ui&&$t(new ui)!=W)&&($t=function(y){var L=Xn(y),ee=L==E?y.constructor:void 0,ye=ee?Rt(ee):"";if(ye)switch(ye){case ai:return H;case Nn:return _;case fl:return k;case cl:return D;case dl:return W}return L});function En(y,L){return L=L??o,!!L&&(typeof y=="number"||F.test(y))&&y>-1&&y%1==0&&y<L}function di(y){var L=typeof y;return L=="string"||L=="number"||L=="symbol"||L=="boolean"?y!=="__proto__":y===null}function yi(y){return!!he&&he in y}function Ei(y){var L=y&&y.constructor,ee=typeof L=="function"&&L.prototype||Ae;return y===ee}function Ji(y){return it.call(y)}function Rt(y){if(y!=null){try{return Je.call(y)}catch{}try{return y+""}catch{}}return""}function vi(y,L){return y===L||y!==y&&L!==L}var sn=Xi(function(){return arguments}())?Xi:function(y){return Hn(y)&<.call(y,"callee")&&!It.call(y,"callee")},Qn=Array.isArray;function Si(y){return y!=null&&Ai(y.length)&&!Pt(y)}var en=we||$i;function Ci(y,L){return wi(y,L)}function Pt(y){if(!xi(y))return!1;var L=Xn(y);return L==h||L==d||L==a||L==I}function Ai(y){return typeof y=="number"&&y>-1&&y%1==0&&y<=o}function xi(y){var L=typeof y;return y!=null&&(L=="object"||L=="function")}function Hn(y){return y!=null&&typeof y=="object"}var hi=Ne?Te(Ne):Vn;function Zn(y){return Si(y)?Ki(y):Zi(y)}function kl(){return[]}function $i(){return!1}t.exports=Ci}(ro,ro.exports);var Sv=ro.exports;const Cv=po(Sv),Av=(t,e)=>Cv(t,e),Tv=t=>Object.keys(t||{}),Iv=(t,e)=>{const n={};return t.forEach(i=>{n[i]=e[i]}),n},Dv=()=>{const t={},e=(n,i)=>{const{watcherName:l,fn:r}=n,{prop:o,value:u}=i;t[l]||(t[l]={deps:{},fn:r}),t[l].deps[o]=u};return{subscribers:t,subscribe(n,i){n&&e(n,i)},notify(n,i){Object.entries(t).forEach(([l,{deps:r,fn:o}])=>{const u=Tv(r);if(u.includes(i)){const s=Iv(u,n);Av(r,s)||(t[l].deps=s,o())}})}}},Ov=()=>{let t=null;return{targetWatcher(e,n){t={watcherName:e,fn:n},t.fn(),t=null},getTarget(){return t}}};function Rv(t,e){const n=io(t,"data",{}),i=io(t,"watch",{}),l=io(t,"methods",{}),r=io(e,"onChange",()=>{}),{subscribe:o,notify:u,subscribers:s}=Dv(),{targetWatcher:a,getTarget:f}=Ov();let c;const g={},h=()=>({data:c,methods:g});let d=!1;const _=w=>(...E)=>{d=!0;const k=w(...E);return d=!1,k};Object.entries(l).forEach(([w,E])=>{g[w]=_((...k)=>E(h(),...k)),Object.defineProperty(g[w],"name",{value:w})}),c=new Proxy(vv(n),{get(w,E){return f()&&!d&&o(f(),{prop:E,value:w[E]}),Reflect.get(...arguments)},set(w,E,k){return w[E]===k||(Reflect.set(...arguments),f()||(r&&r(E,k),u(c,E))),!0}}),Object.entries(i).forEach(([w,E])=>{a(w,()=>{E(h())})});const b=[c,g];return b._internal={_getSubscribers(){return s}},b}function Pv({pageIndex:t,particlesToShow:e,particlesToScroll:n,particlesCount:i}){const l=t===0?0:e-n,r=t*e-t*l,o=r+Math.max(e,n)-1,u=[];for(let s=r;s<=Math.min(i-1,o);s++)u.push(s);return u}function Mv({infinite:t,pageIndex:e,pagesCount:n,particlesCount:i,particlesToShow:l,particlesToScroll:r}){const o=jl(0,e,n-1);let u=o-1,s=o+1;u=t?u<0?n-1:u:Math.max(0,u),s=t?s>n-1?0:s:Math.min(n-1,s);const a=[...new Set([u,o,s,0,n-1])].sort((c,g)=>c-g),f=a.flatMap(c=>Pv({pageIndex:c,particlesToShow:l,particlesToScroll:r,particlesCount:i}));return{pageIndexes:a,particleIndexes:[...new Set(f)].sort((c,g)=>c-g)}}const Nv=(t,e)=>(t(),setInterval(t,e)),Lv=35,om=1;class Fv{constructor({onProgressValueChange:e}){this._onProgressValueChange=e,this._autoplayDuration,this._onProgressValueChange,this._interval,this._paused=!1}setAutoplayDuration(e){this._autoplayDuration=e}start(e){return new Promise(n=>{this.reset();const i=Math.min(Lv,Math.max(this._autoplayDuration,1));let l=-i;this._interval=Nv(async()=>{if(this._paused)return;l+=i;const r=l/this._autoplayDuration;this._onProgressValueChange(r),r>om&&(this.reset(),await e(),n())},i)})}pause(){this._paused=!0}resume(){this._paused=!1}reset(){clearInterval(this._interval),this._onProgressValueChange(om)}}function Vv(t){const e=new Fv({onProgressValueChange:r=>{t("progressValue",1-r)}}),n=Rv({data:{particlesCountWithoutClones:0,particlesToShow:1,particlesToShowInit:1,particlesToScroll:1,particlesToScrollInit:1,particlesCount:1,currentParticleIndex:1,infinite:!1,autoplayDuration:1e3,clonesCountHead:0,clonesCountTail:0,clonesCountTotal:0,partialPageSize:1,currentPageIndex:1,pagesCount:1,pauseOnFocus:!1,focused:!1,autoplay:!1,autoplayDirection:"next",disabled:!1,durationMsInit:1e3,durationMs:1e3,offset:0,particleWidth:0,loaded:[]},watch:{setLoaded({data:r}){r.loaded=Mv({infinite:r.infinite,pageIndex:r.currentPageIndex,pagesCount:r.pagesCount,particlesCount:r.particlesCountWithoutClones,particlesToShow:r.particlesToShow,particlesToScroll:r.particlesToScroll}).particleIndexes},setCurrentPageIndex({data:r}){r.currentPageIndex=mE({currentParticleIndex:r.currentParticleIndex,particlesCount:r.particlesCount,clonesCountHead:r.clonesCountHead,clonesCountTotal:r.clonesCountTotal,infinite:r.infinite,particlesToScroll:r.particlesToScroll})},setPartialPageSize({data:r}){r.partialPageSize=Xg({particlesToScroll:r.particlesToScroll,particlesToShow:r.particlesToShow,particlesCountWithoutClones:r.particlesCountWithoutClones})},setClonesCount({data:r}){const{head:o,tail:u}=SE({infinite:r.infinite,particlesToShow:r.particlesToShow,partialPageSize:r.partialPageSize});r.clonesCountHead=o,r.clonesCountTail=u,r.clonesCountTotal=o+u},setProgressManagerAutoplayDuration({data:r}){e.setAutoplayDuration(r.autoplayDuration)},toggleProgressManager({data:{pauseOnFocus:r,focused:o}}){r&&(o?e.pause():e.resume())},initDuration({data:r}){r.durationMs=r.durationMsInit},applyAutoplay({data:r,methods:{_applyAutoplayIfNeeded:o}}){r.autoplay&&o(r.autoplay)},setPagesCount({data:r}){r.pagesCount=pE({infinite:r.infinite,particlesCountWithoutClones:r.particlesCountWithoutClones,particlesToScroll:r.particlesToScroll,particlesToShow:r.particlesToShow})},setParticlesToShow({data:r}){r.particlesToShow=jl(1,r.particlesToShowInit,r.particlesCountWithoutClones)},setParticlesToScroll({data:r}){r.particlesToScroll=jl(1,r.particlesToScrollInit,r.particlesCountWithoutClones)}},methods:{_prev({data:r}){r.currentParticleIndex=hs({infinite:r.infinite,pageIndex:r.currentPageIndex-1,clonesCountHead:r.clonesCountHead,clonesCountTail:r.clonesCountTail,particlesToScroll:r.particlesToScroll,particlesCount:r.particlesCount,particlesToShow:r.particlesToShow})},_next({data:r}){r.currentParticleIndex=hs({infinite:r.infinite,pageIndex:r.currentPageIndex+1,clonesCountHead:r.clonesCountHead,clonesCountTail:r.clonesCountTail,particlesToScroll:r.particlesToScroll,particlesCount:r.particlesCount,particlesToShow:r.particlesToShow})},_moveToParticle({data:r},o){r.currentParticleIndex=jl(0,o,r.particlesCount-1)},toggleFocused({data:r}){r.focused=!r.focused},async _applyAutoplayIfNeeded({data:r,methods:o}){if(!r.infinite&&(r.autoplayDirection===Li&&r.currentParticleIndex===r.particlesCount-1||r.autoplayDirection===zl&&r.currentParticleIndex===0)){e.reset();return}if(r.autoplay){const u=()=>gs({[Li]:async()=>o.showNextPage(),[zl]:async()=>o.showPrevPage()})(r.autoplayDirection);await e.start(u)}},async _jumpIfNeeded({data:r,methods:o}){let u=!1;return r.infinite&&(r.currentParticleIndex===0?(await o.showParticle(r.particlesCount-r.clonesCountTotal,{animated:!1}),u=!0):r.currentParticleIndex===r.particlesCount-r.clonesCountTail&&(await o.showParticle(r.clonesCountHead,{animated:!1}),u=!0)),u},async changePage({data:r,methods:o},u,s){if(e.reset(),r.disabled)return;r.disabled=!0,u(),await o.offsetPage({animated:ur(s,"animated",!0)}),r.disabled=!1,!await o._jumpIfNeeded()&&o._applyAutoplayIfNeeded()},async showNextPage({data:r,methods:o},u){r.disabled||await o.changePage(o._next,u)},async showPrevPage({data:r,methods:o},u){r.disabled||await o.changePage(o._prev,u)},async showParticle({methods:r},o,u){await r.changePage(()=>r._moveToParticle(o),u)},_getParticleIndexByPageIndex({data:r},o){return hs({infinite:r.infinite,pageIndex:o,clonesCountHead:r.clonesCountHead,clonesCountTail:r.clonesCountTail,particlesToScroll:r.particlesToScroll,particlesCount:r.particlesCount,particlesToShow:r.particlesToShow})},async showPage({methods:r},o,u){const s=r._getParticleIndexByPageIndex(o);await r.showParticle(s,u)},offsetPage({data:r},o){const u=ur(o,"animated",!0);return new Promise(s=>{r.durationMs=u?r.durationMsInit:0,r.offset=-r.currentParticleIndex*r.particleWidth,setTimeout(()=>{s()},r.durationMs)})}}},{onChange:t}),[i,l]=n;return[{data:i,progressManager:e},l,n._internal]}const Bv=t=>({currentPageIndex:t[0]&32,pagesCount:t[0]&1024}),sm=t=>({currentPageIndex:t[5],pagesCount:t[10],showPage:t[15]}),Uv=t=>({}),um=t=>({showNextPage:t[14].showNextPage}),Hv=t=>({loaded:t[0]&64,currentPageIndex:t[0]&32}),am=t=>({loaded:t[6],currentPageIndex:t[5]}),zv=t=>({}),fm=t=>({showPrevPage:t[14].showPrevPage});function cm(t){let e;const n=t[37].prev,i=Ut(n,t,t[36],fm),l=i||jv(t);return{c(){l&&l.c()},m(r,o){l&&l.m(r,o),e=!0},p(r,o){i?i.p&&(!e||o[1]&32)&&zt(i,n,r,r[36],e?Ht(n,r[36],o,zv):jt(r[36]),fm):l&&l.p&&(!e||o[0]&36)&&l.p(r,e?o:[-1,-1])},i(r){e||(U(l,r),e=!0)},o(r){Z(l,r),e=!1},d(r){l&&l.d(r)}}}function jv(t){let e,n,i;return n=new zg({props:{direction:"prev",disabled:!t[2]&&t[5]===0}}),n.$on("click",t[23]),{c(){e=v("div"),We(n.$$.fragment),m(e,"class","sc-carousel__arrow-container svelte-uwo0yk")},m(l,r){A(l,e,r),je(n,e,null),i=!0},p(l,r){const o={};r[0]&36&&(o.disabled=!l[2]&&l[5]===0),n.$set(o)},i(l){i||(U(n.$$.fragment,l),i=!0)},o(l){Z(n.$$.fragment,l),i=!1},d(l){l&&C(e),qe(n)}}}function dm(t){let e,n,i;return n=new X3({props:{value:t[7]}}),{c(){e=v("div"),We(n.$$.fragment),m(e,"class","sc-carousel-progress__container svelte-uwo0yk")},m(l,r){A(l,e,r),je(n,e,null),i=!0},p(l,r){const o={};r[0]&128&&(o.value=l[7]),n.$set(o)},i(l){i||(U(n.$$.fragment,l),i=!0)},o(l){Z(n.$$.fragment,l),i=!1},d(l){l&&C(e),qe(n)}}}function hm(t){let e;const n=t[37].next,i=Ut(n,t,t[36],um),l=i||qv(t);return{c(){l&&l.c()},m(r,o){l&&l.m(r,o),e=!0},p(r,o){i?i.p&&(!e||o[1]&32)&&zt(i,n,r,r[36],e?Ht(n,r[36],o,Uv):jt(r[36]),um):l&&l.p&&(!e||o[0]&1060)&&l.p(r,e?o:[-1,-1])},i(r){e||(U(l,r),e=!0)},o(r){Z(l,r),e=!1},d(r){l&&l.d(r)}}}function qv(t){let e,n,i;return n=new zg({props:{direction:"next",disabled:!t[2]&&t[5]===t[10]-1}}),n.$on("click",t[14].showNextPage),{c(){e=v("div"),We(n.$$.fragment),m(e,"class","sc-carousel__arrow-container svelte-uwo0yk")},m(l,r){A(l,e,r),je(n,e,null),i=!0},p(l,r){const o={};r[0]&1060&&(o.disabled=!l[2]&&l[5]===l[10]-1),n.$set(o)},i(l){i||(U(n.$$.fragment,l),i=!0)},o(l){Z(n.$$.fragment,l),i=!1},d(l){l&&C(e),qe(n)}}}function gm(t){let e;const n=t[37].dots,i=Ut(n,t,t[36],sm),l=i||Wv(t);return{c(){l&&l.c()},m(r,o){l&&l.m(r,o),e=!0},p(r,o){i?i.p&&(!e||o[0]&1056|o[1]&32)&&zt(i,n,r,r[36],e?Ht(n,r[36],o,Bv):jt(r[36]),sm):l&&l.p&&(!e||o[0]&1056)&&l.p(r,e?o:[-1,-1])},i(r){e||(U(l,r),e=!0)},o(r){Z(l,r),e=!1},d(r){l&&l.d(r)}}}function Wv(t){let e,n;return e=new q3({props:{pagesCount:t[10],currentPageIndex:t[5]}}),e.$on("pageChange",t[41]),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l[0]&1024&&(r.pagesCount=i[10]),l[0]&32&&(r.currentPageIndex=i[5]),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function Gv(t){let e,n,i,l,r,o,u,s,a,f,c,g,h=t[1]&&cm(t);const d=t[37].default,_=Ut(d,t,t[36],am);let b=t[3]&&dm(t),w=t[1]&&hm(t),E=t[4]&&gm(t);return{c(){e=v("div"),n=v("div"),h&&h.c(),i=Q(),l=v("div"),r=v("div"),_&&_.c(),u=Q(),b&&b.c(),s=Q(),w&&w.c(),a=Q(),E&&E.c(),m(r,"class","sc-carousel__pages-container svelte-uwo0yk"),P(r,"transform","translateX("+t[8]+"px)"),P(r,"transition-duration",t[9]+"ms"),P(r,"transition-timing-function",t[0]),m(l,"class","sc-carousel__pages-window svelte-uwo0yk"),m(n,"class","sc-carousel__content-container svelte-uwo0yk"),m(e,"class","sc-carousel__carousel-container svelte-uwo0yk")},m(k,I){A(k,e,I),S(e,n),h&&h.m(n,null),S(n,i),S(n,l),S(l,r),_&&_.m(r,null),t[39](r),S(l,u),b&&b.m(l,null),t[40](l),S(n,s),w&&w.m(n,null),S(e,a),E&&E.m(e,null),f=!0,c||(g=[tn(o=iE.call(null,r,{thresholdProvider:t[38]})),B(r,"swipeStart",t[16]),B(r,"swipeMove",t[18]),B(r,"swipeEnd",t[19]),B(r,"swipeFailed",t[20]),B(r,"swipeThresholdReached",t[17]),tn(sE.call(null,l)),B(l,"hovered",t[21]),tn(dE.call(null,l)),B(l,"tapped",t[22])],c=!0)},p(k,I){k[1]?h?(h.p(k,I),I[0]&2&&U(h,1)):(h=cm(k),h.c(),U(h,1),h.m(n,i)):h&&(He(),Z(h,1,1,()=>{h=null}),ze()),_&&_.p&&(!f||I[0]&96|I[1]&32)&&zt(_,d,k,k[36],f?Ht(d,k[36],I,Hv):jt(k[36]),am),(!f||I[0]&256)&&P(r,"transform","translateX("+k[8]+"px)"),(!f||I[0]&512)&&P(r,"transition-duration",k[9]+"ms"),(!f||I[0]&1)&&P(r,"transition-timing-function",k[0]),o&&Ge(o.update)&&I[0]&2048&&o.update.call(null,{thresholdProvider:k[38]}),k[3]?b?(b.p(k,I),I[0]&8&&U(b,1)):(b=dm(k),b.c(),U(b,1),b.m(l,null)):b&&(He(),Z(b,1,1,()=>{b=null}),ze()),k[1]?w?(w.p(k,I),I[0]&2&&U(w,1)):(w=hm(k),w.c(),U(w,1),w.m(n,null)):w&&(He(),Z(w,1,1,()=>{w=null}),ze()),k[4]?E?(E.p(k,I),I[0]&16&&U(E,1)):(E=gm(k),E.c(),U(E,1),E.m(e,null)):E&&(He(),Z(E,1,1,()=>{E=null}),ze())},i(k){f||(U(h),U(_,k),U(b),U(w),U(E),f=!0)},o(k){Z(h),Z(_,k),Z(b),Z(w),Z(E),f=!1},d(k){k&&C(e),h&&h.d(),_&&_.d(k),t[39](null),b&&b.d(),t[40](null),w&&w.d(),E&&E.d(),c=!1,Ve(g)}}}function Yv(t,e,n){let{$$slots:i={},$$scope:l}=e,r=[],o,u,s=0,a=0,f=1;const[{data:c,progressManager:g},h,d]=Vv((te,ae)=>{gs({currentPageIndex:()=>n(5,o=ae),progressValue:()=>n(7,u=ae),offset:()=>n(8,s=ae),durationMs:()=>n(9,a=ae),pagesCount:()=>n(10,f=ae),loaded:()=>n(6,r=ae)})(te)}),_=le.createEventDispatcher();let{timingFunction:b="ease-in-out"}=e,{arrows:w=!0}=e,{infinite:E=!0}=e,{initialPageIndex:k=0}=e,{duration:I=500}=e,{autoplay:O=!1}=e,{autoplayDuration:D=3e3}=e,{autoplayDirection:N=Li}=e,{pauseOnFocus:M=!1}=e,{autoplayProgressVisible:V=!1}=e,{dots:W=!0}=e,{swiping:ne=!0}=e,{particlesToShow:H=1}=e,{particlesToScroll:$=1}=e;async function Y(te,ae){const de=ur(ae,"animated",!0);if(typeof te!="number")throw new Error("pageIndex should be a number");await h.showPage(te,{animated:de})}async function G(te){const ae=ur(te,"animated",!0);await h.showPrevPage({animated:ae})}async function oe(te){const ae=ur(te,"animated",!0);await h.showNextPage({animated:ae})}let ie=0,J,q;const j=yE(({width:te})=>{n(11,ie=te),c.particleWidth=ie/c.particlesToShow,kE({particlesContainerChildren:q.children,particleWidth:c.particleWidth}),h.offsetPage({animated:!1})});function K(){const{clonesToAppend:te,clonesToPrepend:ae}=EE({clonesCountHead:c.clonesCountHead,clonesCountTail:c.clonesCountTail,particlesContainerChildren:q.children});vE({particlesContainer:q,clonesToAppend:te,clonesToPrepend:ae})}le.onMount(()=>{(async()=>(await le.tick(),q&&J&&(c.particlesCountWithoutClones=q.children.length,await le.tick(),c.infinite&&K(),c.particlesCount=q.children.length,h.showPage(k,{animated:!1}),j.observe(J))))()}),le.onDestroy(()=>{j.disconnect(),g.reset()});async function x(te){await h.showPage(te,{animated:!0})}function X(){ne&&(c.durationMs=0)}async function F(te){ne&&await gs({[Li]:h.showNextPage,[zl]:h.showPrevPage})(te.detail.direction)}function R(te){ne&&(c.offset+=te.detail.dx)}function z(){ne&&h.showParticle(c.currentParticleIndex)}async function me(){ne&&await h.offsetPage({animated:!0})}function se(te){c.focused=te.detail.value}function Oe(){h.toggleFocused()}function be(){h.showPrevPage()}const Ie=()=>ie/3;function ve(te){Be[te?"unshift":"push"](()=>{q=te,n(13,q)})}function fe(te){Be[te?"unshift":"push"](()=>{J=te,n(12,J)})}const Ne=te=>x(te.detail);return t.$$set=te=>{"timingFunction"in te&&n(0,b=te.timingFunction),"arrows"in te&&n(1,w=te.arrows),"infinite"in te&&n(2,E=te.infinite),"initialPageIndex"in te&&n(24,k=te.initialPageIndex),"duration"in te&&n(25,I=te.duration),"autoplay"in te&&n(26,O=te.autoplay),"autoplayDuration"in te&&n(27,D=te.autoplayDuration),"autoplayDirection"in te&&n(28,N=te.autoplayDirection),"pauseOnFocus"in te&&n(29,M=te.pauseOnFocus),"autoplayProgressVisible"in te&&n(3,V=te.autoplayProgressVisible),"dots"in te&&n(4,W=te.dots),"swiping"in te&&n(30,ne=te.swiping),"particlesToShow"in te&&n(31,H=te.particlesToShow),"particlesToScroll"in te&&n(32,$=te.particlesToScroll),"$$scope"in te&&n(36,l=te.$$scope)},t.$$.update=()=>{t.$$.dirty[0]&32&&_("pageChange",o),t.$$.dirty[0]&4&&(c.infinite=E),t.$$.dirty[0]&33554432&&(c.durationMsInit=I),t.$$.dirty[0]&67108864&&(c.autoplay=O),t.$$.dirty[0]&134217728&&(c.autoplayDuration=D),t.$$.dirty[0]&268435456&&(c.autoplayDirection=N),t.$$.dirty[0]&536870912&&(c.pauseOnFocus=M),t.$$.dirty[1]&1&&(c.particlesToShowInit=H),t.$$.dirty[1]&2&&(c.particlesToScrollInit=$)},[b,w,E,V,W,o,r,u,s,a,f,ie,J,q,h,x,X,F,R,z,me,se,Oe,be,k,I,O,D,N,M,ne,H,$,Y,G,oe,l,i,Ie,ve,fe,Ne]}class Kv extends Ze{constructor(e){super(),Qe(this,e,Yv,Gv,Ye,{timingFunction:0,arrows:1,infinite:2,initialPageIndex:24,duration:25,autoplay:26,autoplayDuration:27,autoplayDirection:28,pauseOnFocus:29,autoplayProgressVisible:3,dots:4,swiping:30,particlesToShow:31,particlesToScroll:32,goTo:33,goToPrev:34,goToNext:35},null,[-1,-1])}get goTo(){return this.$$.ctx[33]}get goToPrev(){return this.$$.ctx[34]}get goToNext(){return this.$$.ctx[35]}}function mm(t,e,n){const i=t.slice();return i[56]=e[n],i[58]=n,i}function Xv(t){let e,n=t[20]&&_m(t);return{c(){e=v("div"),n&&n.c(),m(e,"class","slider-placeholder svelte-1ayurke")},m(i,l){A(i,e,l),n&&n.m(e,null)},p(i,l){i[20]?n?n.p(i,l):(n=_m(i),n.c(),n.m(e,null)):n&&(n.d(1),n=null)},i:ue,o:ue,d(i){i&&C(e),n&&n.d()}}}function Qv(t){let e=t[12],n,i,l=wm(t);return{c(){l.c(),n=Fe()},m(r,o){l.m(r,o),A(r,n,o),i=!0},p(r,o){o[0]&4096&&Ye(e,e=r[12])?(He(),Z(l,1,1,ue),ze(),l=wm(r),l.c(),U(l,1),l.m(n.parentNode,n)):l.p(r,o)},i(r){i||(U(l),i=!0)},o(r){Z(l),i=!1},d(r){r&&C(n),l.d(r)}}}function _m(t){let e,n,i,l,r,o;return{c(){e=v("button"),n=v("i"),i=Ee(`
|
|
26
|
-
Upload Attachment`),m(n,"class","ph ph-plus"),m(e,"class","btn-upload-empty svelte-1ayurke"),m(e,"aria-label","Upload attachment"),m(e,"type","button"),e.disabled=l=t[0].disabled||t[0].readonly},m(u,s){A(u,e,s),S(e,n),S(e,i),r||(o=B(e,"click",t[23]),r=!0)},p(u,s){s[0]&1&&l!==(l=u[0].disabled||u[0].readonly)&&(e.disabled=l)},d(u){u&&C(e),r=!1,o()}}}function Zv(t){var a;let e,n,i=((a=t[56].extension)==null?void 0:a.toUpperCase())+"",l,r,o,u=t[56].name+"",s;return{c(){e=v("div"),n=v("div"),l=Ee(i),r=Q(),o=v("span"),s=Ee(u),m(n,"class","pill svelte-1ayurke"),m(o,"class","filename svelte-1ayurke"),m(e,"class","slider-fallback svelte-1ayurke")},m(f,c){A(f,e,c),S(e,n),S(n,l),S(e,r),S(e,o),S(o,s)},p(f,c){var g;c[0]&4&&i!==(i=((g=f[56].extension)==null?void 0:g.toUpperCase())+"")&&Pe(l,i),c[0]&4&&u!==(u=f[56].name+"")&&Pe(s,u)},i:ue,o:ue,d(f){f&&C(e)}}}function Jv(t){let e,n,i,l=t[17]&&pm(t);return{c(){e=v("div"),l&&l.c(),m(e,"class","slider-image svelte-1ayurke"),P(e,"background-image","url('"+t[56].url+"')"),m(e,"aria-label",n=t[56].name),p(e,"selected",t[7].has(t[58]))},m(r,o){A(r,e,o),l&&l.m(e,null),i=!0},p(r,o){r[17]?l?(l.p(r,o),o[0]&131072&&U(l,1)):(l=pm(r),l.c(),U(l,1),l.m(e,null)):l&&(He(),Z(l,1,1,()=>{l=null}),ze()),(!i||o[0]&4)&&P(e,"background-image","url('"+r[56].url+"')"),(!i||o[0]&4&&n!==(n=r[56].name))&&m(e,"aria-label",n),(!i||o[0]&132)&&p(e,"selected",r[7].has(r[58]))},i(r){i||(U(l),i=!0)},o(r){Z(l),i=!1},d(r){r&&C(e),l&&l.d()}}}function pm(t){let e,n;const i=t[34].default,l=Ut(i,t,t[44],null);return{c(){e=v("div"),l&&l.c(),m(e,"class","slot-container svelte-1ayurke")},m(r,o){A(r,e,o),l&&l.m(e,null),n=!0},p(r,o){l&&l.p&&(!n||o[1]&8192)&&zt(l,i,r,r[44],n?Ht(i,r[44],o,null):jt(r[44]),null)},i(r){n||(U(l,r),n=!0)},o(r){Z(l,r),n=!1},d(r){r&&C(e),l&&l.d(r)}}}function bm(t,e){let n,i,l,r,o,u,s,a;const f=[Jv,Zv],c=[];function g(d,_){return _[0]&4&&(i=null),i==null&&(i=!!km(d[56])),i?0:d[3]?-1:1}~(l=g(e,[-1,-1]))&&(r=c[l]=f[l](e));function h(){return e[35](e[58])}return{key:t,first:null,c(){n=v("div"),r&&r.c(),o=Q(),m(n,"class","slider-item svelte-1ayurke"),P(n,"height","100%"),this.first=n},m(d,_){A(d,n,_),~l&&c[l].m(n,null),S(n,o),u=!0,s||(a=B(n,"click",h),s=!0)},p(d,_){e=d;let b=l;l=g(e,_),l===b?~l&&c[l].p(e,_):(r&&(He(),Z(c[b],1,1,()=>{c[b]=null}),ze()),~l?(r=c[l],r?r.p(e,_):(r=c[l]=f[l](e),r.c()),U(r,1),r.m(n,o)):r=null)},i(d){u||(U(r),u=!0)},o(d){Z(r),u=!1},d(d){d&&C(n),~l&&c[l].d(),s=!1,a()}}}function xv(t){let e=[],n=new Map,i,l,r=Ce(t[2]);const o=u=>u[58];for(let u=0;u<r.length;u+=1){let s=mm(t,r,u),a=o(s);n.set(a,e[u]=bm(a,s))}return{c(){for(let u=0;u<e.length;u+=1)e[u].c();i=Fe()},m(u,s){for(let a=0;a<e.length;a+=1)e[a]&&e[a].m(u,s);A(u,i,s),l=!0},p(u,s){s[0]&33685644|s[1]&8192&&(r=Ce(u[2]),He(),e=Tt(e,s,o,1,u,r,n,i.parentNode,Di,bm,i,mm),ze())},i(u){if(!l){for(let s=0;s<r.length;s+=1)U(e[s]);l=!0}},o(u){for(let s=0;s<e.length;s+=1)Z(e[s]);l=!1},d(u){u&&C(i);for(let s=0;s<e.length;s+=1)e[s].d(u)}}}function $v(t){let e,n,i;return{c(){e=v("div"),e.innerHTML='<i class="ph ph-caret-left"></i>',m(e,"slot","prev"),m(e,"class","slider-navbutton svelte-1ayurke")},m(l,r){A(l,e,r),n||(i=B(e,"click",function(){Ge(t[55])&&t[55].apply(this,arguments)}),n=!0)},p(l,r){t=l},d(l){l&&C(e),n=!1,i()}}}function eS(t){let e,n,i;return{c(){e=v("div"),e.innerHTML='<i class="ph ph-caret-right"></i>',m(e,"slot","next"),m(e,"class","slider-navbutton svelte-1ayurke")},m(l,r){A(l,e,r),n||(i=B(e,"click",function(){Ge(t[54])&&t[54].apply(this,arguments)}),n=!0)},p(l,r){t=l},d(l){l&&C(e),n=!1,i()}}}function wm(t){let e,n;return e=new Kv({props:{particlesToShow:t[12],particlesToScroll:t[11],dots:t[16]&&!t[10],arrows:t[15]&&!t[10],infinite:t[14],autoplay:t[13]||t[10],height:"100%",$$slots:{next:[eS,({showNextPage:i})=>({54:i}),({showNextPage:i})=>[0,i?8388608:0]],prev:[$v,({showPrevPage:i})=>({55:i}),({showPrevPage:i})=>[0,i?16777216:0]],default:[xv]},$$scope:{ctx:t}}}),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l[0]&4096&&(r.particlesToShow=i[12]),l[0]&2048&&(r.particlesToScroll=i[11]),l[0]&66560&&(r.dots=i[16]&&!i[10]),l[0]&33792&&(r.arrows=i[15]&&!i[10]),l[0]&16384&&(r.infinite=i[14]),l[0]&9216&&(r.autoplay=i[13]||i[10]),l[0]&131212|l[1]&25174016&&(r.$$scope={dirty:l,ctx:i}),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function tS(t){let e,n,i,l,r,o,u,s,a,f,c,g,h,d,_;const b=[Qv,Xv],w=[];function E(M,V){var W;return(W=M[2])!=null&&W.length?0:M[3]?-1:1}~(i=E(t))&&(l=w[i]=b[i](t));function k(M){t[37](M)}function I(M){t[38](M)}function O(M){t[39](M)}function D(M){t[40](M)}let N={canSelect:t[19],canDelete:t[18]};return t[2]!==void 0&&(N.items=t[2]),t[8]!==void 0&&(N.open=t[8]),t[9]!==void 0&&(N.currentIndex=t[9]),t[7]!==void 0&&(N.selectedIndices=t[7]),s=new ls({props:N}),Be.push(()=>Gt(s,"items",k)),Be.push(()=>Gt(s,"open",I)),Be.push(()=>Gt(s,"currentIndex",O)),Be.push(()=>Gt(s,"selectedIndices",D)),s.$on("close",t[41]),s.$on("delete",t[42]),{c(){e=v("div"),n=v("div"),l&&l.c(),r=Q(),o=v("input"),u=Q(),We(s.$$.fragment),m(n,"class","slider svelte-1ayurke"),m(o,"type","file"),o.multiple=t[4],P(o,"display","none"),m(e,"class","superCell"),m(e,"tabindex","0"),p(e,"multirow",!0),p(e,"inEdit",t[21]=="Editing"),p(e,"inline",t[0].role=="tableCell"),p(e,"tableCell",t[0].role=="tableCell"),p(e,"formInput",t[0].role=="formInput"),p(e,"disabled",t[0].disabled),p(e,"readonly",t[0].readonly),P(e,"color",t[0].color),P(e,"background",t[0].background),P(e,"overflow","hidden")},m(M,V){A(M,e,V),S(e,n),~i&&w[i].m(n,null),S(e,r),S(e,o),t[36](o),S(e,u),je(s,e,null),t[43](e),h=!0,d||(_=[B(o,"change",t[24]),B(e,"focusin",function(){Ge(t[1].focus)&&t[1].focus.apply(this,arguments)}),B(e,"focusout",function(){Ge(t[1].focousout)&&t[1].focousout.apply(this,arguments)})],d=!0)},p(M,V){t=M;let W=i;i=E(t),i===W?~i&&w[i].p(t,V):(l&&(He(),Z(w[W],1,1,()=>{w[W]=null}),ze()),~i?(l=w[i],l?l.p(t,V):(l=w[i]=b[i](t),l.c()),U(l,1),l.m(n,null)):l=null),(!h||V[0]&16)&&(o.multiple=t[4]);const ne={};V[0]&524288&&(ne.canSelect=t[19]),V[0]&262144&&(ne.canDelete=t[18]),!a&&V[0]&4&&(a=!0,ne.items=t[2],Wt(()=>a=!1)),!f&&V[0]&256&&(f=!0,ne.open=t[8],Wt(()=>f=!1)),!c&&V[0]&512&&(c=!0,ne.currentIndex=t[9],Wt(()=>c=!1)),!g&&V[0]&128&&(g=!0,ne.selectedIndices=t[7],Wt(()=>g=!1)),s.$set(ne),(!h||V[0]&2097152)&&p(e,"inEdit",t[21]=="Editing"),(!h||V[0]&1)&&p(e,"inline",t[0].role=="tableCell"),(!h||V[0]&1)&&p(e,"tableCell",t[0].role=="tableCell"),(!h||V[0]&1)&&p(e,"formInput",t[0].role=="formInput"),(!h||V[0]&1)&&p(e,"disabled",t[0].disabled),(!h||V[0]&1)&&p(e,"readonly",t[0].readonly),V[0]&1&&P(e,"color",t[0].color),V[0]&1&&P(e,"background",t[0].background)},i(M){h||(U(l),U(s.$$.fragment,M),h=!0)},o(M){Z(l),Z(s.$$.fragment,M),h=!1},d(M){M&&C(e),~i&&w[i].d(),t[36](null),qe(s),t[43](null),d=!1,Ve(_)}}}let nS=0;function km(t){var n;return["jpg","jpeg","png","gif","bmp","webp"].includes((n=t.extension)==null?void 0:n.toLowerCase())}function iS(t,e,n){let i,l,r,o,u,s,a,f,c,g,h,d,_,b,w,E,k,I,O=ue,D=()=>(O(),O=ft(K,Se=>n(21,I=Se)),K);t.$$.on_destroy.push(()=>O());let{$$slots:N={},$$scope:M}=e,{value:V}=e,{cellOptions:W}=e,{fieldSchema:ne}=e,{tableid:H}=e,{API:$}=e,{inBuilder:Y}=e,{height:G}=e;const oe=le.createEventDispatcher();let ie=V,J,q,j=new Set,{cellState:K=Ft(W.initialState??"View",{"*":{goTo(Se){return Se}},View:{_enter(){},focus(){if(!W.readonly)return"Editing"}},Editing:{_enter(){ie=V,J==null||J.focus(),oe("enteredit")},_exit(){oe("exitedit")},focousout(Se){if(!(J!=null&&J.contains(Se.relatedTarget)))return"View"},change(Se){W.debounce&&oe("change",V)},submit(Se){return V!==ie&&oe("change",V),oe("focusout"),"View"},cancel(){return n(26,V=ie),"View"}}})}=e;D();const x=async Se=>{let Le=new FormData;for(let rt=0;rt<Se.length;rt++)Le.append("file",Se[rt]);try{let rt=await $.uploadAttachment(H,Le);return oe("change",[...l,...rt]),rt}catch(rt){return console.error("Upload failed:",rt),[]}};function X(Se){l.splice(Se,1),n(2,l=[...l]),oe("change",l)}function F(Se){const Le=new Set(j);Le.has(Se)?Le.delete(Se):Le.add(Se),n(7,j=Le)}function R(){q&&q.click()}function z(Se){const Le=Se.target,rt=Array.from(Le.files||[]);x(rt)}let me=!1,se=0;function Oe(Se){var Le;if(!(!k||k==="none")){if(k==="view")be(Se);else if(k==="select")F(Se);else if(k==="custom"){let rt=l[Se];(Le=W.onItemClick)==null||Le.call(W,{item:rt,index:Se})}}}function be(Se=nS){!u&&!Y&&(l!=null&&l[Se])&&km(l[Se])&&(n(9,se=Se),n(8,me=!0))}const Ie=Se=>{Oe(Se)};function ve(Se){Be[Se?"unshift":"push"](()=>{q=Se,n(6,q)})}function fe(Se){l=Se,n(2,l),n(26,V),n(4,i),n(27,ne)}function Ne(Se){me=Se,n(8,me)}function te(Se){se=Se,n(9,se)}function ae(Se){j=Se,n(7,j)}const de=()=>console.log("lightbox closed"),Xe=Se=>{X(Se.detail.index)};function Te(Se){Be[Se?"unshift":"push"](()=>{J=Se,n(5,J)})}return t.$$set=Se=>{"value"in Se&&n(26,V=Se.value),"cellOptions"in Se&&n(0,W=Se.cellOptions),"fieldSchema"in Se&&n(27,ne=Se.fieldSchema),"tableid"in Se&&n(28,H=Se.tableid),"API"in Se&&n(29,$=Se.API),"inBuilder"in Se&&n(30,Y=Se.inBuilder),"height"in Se&&n(31,G=Se.height),"cellState"in Se&&D(n(1,K=Se.cellState)),"$$scope"in Se&&n(44,M=Se.$$scope)},t.$$.update=()=>{var Se;t.$$.dirty[0]&134217728&&n(4,i=((Se=ne==null?void 0:ne.type)==null?void 0:Se.includes("single"))!==!0),t.$$.dirty[0]&67108880&&n(2,l=V&&i?V:V?[V]:[]),t.$$.dirty[0]&1&&n(20,r=!W.readonly&&!W.disabled),t.$$.dirty[0]&1&&n(3,o=W.isGallery),t.$$.dirty[0]&1&&n(32,u=W.disabled),t.$$.dirty[0]&1&&n(33,s=W.readonly),t.$$.dirty[0]&8|t.$$.dirty[1]&6&&n(19,a=!s&&!u&&!o),t.$$.dirty[0]&8|t.$$.dirty[1]&6&&n(18,f=!s&&!u&&!o),t.$$.dirty[0]&1&&n(17,c=W.slotted),t.$$.dirty[0]&5&&n(16,g=W.carouselDots!==void 0?W.carouselDots:(l==null?void 0:l.length)>1),t.$$.dirty[0]&5&&n(15,h=W.carouselArrows!==void 0?W.carouselArrows:(l==null?void 0:l.length)>1),t.$$.dirty[0]&5&&n(14,d=W.carouselInfinite!==void 0?W.carouselInfinite:(l==null?void 0:l.length)>1),t.$$.dirty[0]&1&&n(13,_=W.carouselAutoplay!==void 0?W.carouselAutoplay:!1),t.$$.dirty[0]&1&&W.carouselAutoplaySpeed!==void 0&&W.carouselAutoplaySpeed,t.$$.dirty[0]&1&&n(12,b=W.carouselItemsToShow!==void 0?W.carouselItemsToShow:3),t.$$.dirty[0]&1&&n(11,w=W.carouselItemsToScroll!==void 0?W.carouselItemsToScroll:1),t.$$.dirty[0]&1&&n(10,E=W.carouselMode==="marquee"),t.$$.dirty[0]&1&&(k=W.onClickAction)},[W,K,l,o,i,J,q,j,me,se,E,w,b,_,d,h,g,c,f,a,r,I,X,R,z,Oe,V,ne,H,$,Y,G,u,s,N,Ie,ve,fe,Ne,te,ae,de,Xe,Te,M]}class lS extends Ze{constructor(e){super(),Qe(this,e,iS,tS,Ye,{value:26,cellOptions:0,fieldSchema:27,tableid:28,API:29,inBuilder:30,height:31,cellState:1},null,[-1,-1])}}function ks({target:t}){t.style.height="1px",t.style.height=+t.scrollHeight+"px"}function rS(t){return ks({target:t}),t.style.overflow="hidden",t.addEventListener("input",ks),{destroy:()=>t.removeEventListener("input",ks)}}ct.CellAttachment=ns,ct.CellAttachmentExpanded=V3,ct.CellAttachmentSlider=lS,ct.CellBoolean=Yo,ct.CellColor=O2,ct.CellDateRange=B2,ct.CellDatetime=$o,ct.CellIcon=iy,ct.CellJSON=ts,ct.CellLink=Zr,ct.CellLinkAdvanced=Ry,ct.CellLinkPickerSelect=Zc,ct.CellLinkPickerTree=Qr,ct.CellNumber=or,ct.CellOptions=rl,ct.CellOptionsAdvanced=Qy,ct.CellSQLLink=Cy,ct.CellSkeleton=j1,ct.CellString=kn,ct.CellStringMask=m3,ct.CellStringSimple=Go,ct.CellTags=v3,ct.SuperButton=el,ct.SuperField=n_,ct.SuperForm=gp,ct.SuperLightbox=ls,ct.SuperList=bf,ct.SuperPopover=wn,ct.SuperTable=w2,ct.SuperTableColumn=is,ct.SuperTabs=E2,ct.SuperTree=es,ct.autoresizeTextarea=rS,ct.clickOutside=yf,ct.defaultOperatorMap=Tf,ct.positionDropdown=wf,Object.defineProperty(ct,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(ct,we){typeof exports=="object"&&typeof module<"u"?we(exports,require("svelte")):typeof define=="function"&&define.amd?define(["exports","svelte"],we):(ct=typeof globalThis<"u"?globalThis:ct||self,we(ct.SupercomponentsShared={},ct.Svelte))})(this,function(ct,we){"use strict";var hA=Object.defineProperty;var Jh=ct=>{throw TypeError(ct)};var gA=(ct,we,Dr)=>we in ct?hA(ct,we,{enumerable:!0,configurable:!0,writable:!0,value:Dr}):ct[we]=Dr;var pi=(ct,we,Dr)=>gA(ct,typeof we!="symbol"?we+"":we,Dr),Du=(ct,we,Dr)=>we.has(ct)||Jh("Cannot "+Dr);var mt=(ct,we,Dr)=>(Du(ct,we,"read from private field"),Dr?Dr.call(ct):we.get(ct)),kr=(ct,we,Dr)=>we.has(ct)?Jh("Cannot add the same private member more than once"):we instanceof WeakSet?we.add(ct):we.set(ct,Dr),Di=(ct,we,Dr,xi)=>(Du(ct,we,"write to private field"),xi?xi.call(ct,Dr):we.set(ct,Dr),Dr),jn=(ct,we,Dr)=>(Du(ct,we,"access private method"),Dr);var Hh,ja,Ga,fa,ha,Ds,qa,Wa,qr,xu,Ps,Ou,$h,eg,Qn,ci,Tn,ga,xs,Os,jo,zi,Ya,Is,Go,tg;const Dr="5";typeof window<"u"&&((Hh=window.__svelte??(window.__svelte={})).v??(Hh.v=new Set)).add(Dr);let xi=!1,rg=!1;function ng(){xi=!0}ng();const ig=1,ag=2,Iu=4,sg=8,og=16,lg=1,ug=2,cg=4,dg=8,fg=16,hg=4,gg=1,vg=2,Xr=Symbol(),pg="http://www.w3.org/1999/xhtml",Yo=!1;var Ms=Array.isArray,mg=Array.prototype.indexOf,Ko=Array.from,Ru=Object.defineProperty,Wi=Object.getOwnPropertyDescriptor,Pu=Object.getOwnPropertyDescriptors,_g=Object.prototype,bg=Array.prototype,Xo=Object.getPrototypeOf;function ya(e){return typeof e=="function"}const nn=()=>{};function yg(e){return e()}function Ns(e){for(var r=0;r<e.length;r++)e[r]()}function Mu(){var e,r,n=new Promise((i,s)=>{e=i,r=s});return{promise:n,resolve:e,reject:r}}function wg(e,r){if(Array.isArray(e))return e;if(!(Symbol.iterator in e))return Array.from(e);const n=[];for(const i of e)if(n.push(i),n.length===r)break;return n}const Ur=2,Qo=4,Ls=8,Eg=1<<24,ti=16,mi=32,wa=64,Zo=128,Gn=512,Br=1024,hn=2048,qn=4096,En=8192,_i=16384,Fs=32768,Oi=65536,Nu=1<<17,Lu=1<<18,Vs=1<<19,Fu=1<<20,bi=1<<25,Qa=32768,Jo=1<<21,$o=1<<22,Ii=1<<23,ri=Symbol("$state"),Vu=Symbol("legacy props"),Sg=Symbol(""),Ea=new class extends Error{constructor(){super(...arguments);pi(this,"name","StaleReactionError");pi(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};function Cg(){throw new Error("https://svelte.dev/e/invalid_default_snippet")}function Ag(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Tg(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function kg(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Dg(e){throw new Error("https://svelte.dev/e/effect_orphan")}function xg(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Og(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Ig(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Rg(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Pg(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Mg(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function Uu(e){return e===this.v}function el(e,r){return e!=e?r==r:e!==r||e!==null&&typeof e=="object"||typeof e=="function"}function Bu(e){return!el(e,this.v)}let Nr=null;function Us(e){Nr=e}function kt(e,r=!1,n){Nr={p:Nr,i:!1,c:null,e:null,s:e,x:null,l:xi&&!r?{s:null,u:null,$:[]}:null}}function Dt(e){var r=Nr,n=r.e;if(n!==null){r.e=null;for(var i of n)tc(i)}return e!==void 0&&(r.x=e),r.i=!0,Nr=r.p,e??{}}function Sa(){return!xi||Nr!==null&&Nr.l===null}let Yi=[];function Hu(){var e=Yi;Yi=[],Ns(e)}function Za(e){if(Yi.length===0&&!Ja){var r=Yi;queueMicrotask(()=>{r===Yi&&Hu()})}Yi.push(e)}function Ng(){for(;Yi.length>0;)Hu()}function Lg(e){var r=nr;if(r===null)return Jt.f|=Ii,e;if(r.f&Fs)Bs(e,r);else{if(!(r.f&Zo))throw e;r.b.error(e)}}function Bs(e,r){for(;r!==null;){if(r.f&Zo)try{r.b.error(e);return}catch(n){e=n}r=r.parent}throw e}const Hs=new Set;let Wt=null,zs=null,Er=null,On=[],js=null,tl=!1,Ja=!1;const zo=class zo{constructor(){kr(this,qr);pi(this,"committed",!1);pi(this,"current",new Map);pi(this,"previous",new Map);kr(this,ja,new Set);kr(this,Ga,new Set);kr(this,fa,0);kr(this,ha,0);kr(this,Ds,null);kr(this,qa,new Set);kr(this,Wa,new Set);pi(this,"skipped_effects",new Set);pi(this,"is_fork",!1)}is_deferred(){return this.is_fork||mt(this,ha)>0}process(r){var i;On=[],zs=null,this.apply();var n={parent:null,effect:null,effects:[],render_effects:[]};for(const s of r)jn(this,qr,xu).call(this,s,n);this.is_fork||jn(this,qr,$h).call(this),this.is_deferred()?(jn(this,qr,Ps).call(this,n.effects),jn(this,qr,Ps).call(this,n.render_effects)):(zs=this,Wt=null,ju(n.render_effects),ju(n.effects),zs=null,(i=mt(this,Ds))==null||i.resolve()),Er=null}capture(r,n){this.previous.has(r)||this.previous.set(r,n),r.f&Ii||(this.current.set(r,r.v),Er==null||Er.set(r,r.v))}activate(){Wt=this,this.apply()}deactivate(){Wt===this&&(Wt=null,Er=null)}flush(){if(this.activate(),On.length>0){if(zu(),Wt!==null&&Wt!==this)return}else mt(this,fa)===0&&this.process([]);this.deactivate()}discard(){for(const r of mt(this,Ga))r(this);mt(this,Ga).clear()}increment(r){Di(this,fa,mt(this,fa)+1),r&&Di(this,ha,mt(this,ha)+1)}decrement(r){Di(this,fa,mt(this,fa)-1),r&&Di(this,ha,mt(this,ha)-1),this.revive()}revive(){for(const r of mt(this,qa))mt(this,Wa).delete(r),Hr(r,hn),Ki(r);for(const r of mt(this,Wa))Hr(r,qn),Ki(r);this.flush()}oncommit(r){mt(this,ja).add(r)}ondiscard(r){mt(this,Ga).add(r)}settled(){return(mt(this,Ds)??Di(this,Ds,Mu())).promise}static ensure(){if(Wt===null){const r=Wt=new zo;Hs.add(Wt),Ja||zo.enqueue(()=>{Wt===r&&r.flush()})}return Wt}static enqueue(r){Za(r)}apply(){}};ja=new WeakMap,Ga=new WeakMap,fa=new WeakMap,ha=new WeakMap,Ds=new WeakMap,qa=new WeakMap,Wa=new WeakMap,qr=new WeakSet,xu=function(r,n){var d;r.f^=Br;for(var i=r.first;i!==null;){var s=i.f,a=(s&(mi|wa))!==0,o=a&&(s&Br)!==0,c=o||(s&En)!==0||this.skipped_effects.has(i);if(i.f&Zo&&((d=i.b)!=null&&d.is_pending())&&(n={parent:n,effect:i,effects:[],render_effects:[]}),!c&&i.fn!==null){a?i.f^=Br:s&Qo?n.effects.push(i):ka(i)&&(i.f&ti&&mt(this,qa).add(i),Da(i));var u=i.first;if(u!==null){i=u;continue}}var g=i.parent;for(i=i.next;i===null&&g!==null;)g===n.effect&&(jn(this,qr,Ps).call(this,n.effects),jn(this,qr,Ps).call(this,n.render_effects),n=n.parent),i=g.next,g=g.parent}},Ps=function(r){for(const n of r)n.f&hn?mt(this,qa).add(n):n.f&qn&&mt(this,Wa).add(n),jn(this,qr,Ou).call(this,n.deps),Hr(n,Br)},Ou=function(r){if(r!==null)for(const n of r)!(n.f&Ur)||!(n.f&Qa)||(n.f^=Qa,jn(this,qr,Ou).call(this,n.deps))},$h=function(){if(mt(this,ha)===0){for(const r of mt(this,ja))r();mt(this,ja).clear()}mt(this,fa)===0&&jn(this,qr,eg).call(this)},eg=function(){var a;if(Hs.size>1){this.previous.clear();var r=Er,n=!0,i={parent:null,effect:null,effects:[],render_effects:[]};for(const o of Hs){if(o===this){n=!1;continue}const c=[];for(const[g,d]of this.current){if(o.current.has(g))if(n&&d!==o.current.get(g))o.current.set(g,d);else continue;c.push(g)}if(c.length===0)continue;const u=[...o.current.keys()].filter(g=>!this.current.has(g));if(u.length>0){var s=On;On=[];const g=new Set,d=new Map;for(const p of c)Gu(p,u,g,d);if(On.length>0){Wt=o,o.apply();for(const p of On)jn(a=o,qr,xu).call(a,p,i);o.deactivate()}On=s}}Wt=null,Er=r}this.committed=!0,Hs.delete(this)};let Gs=zo;function Fg(e){var r=Ja;Ja=!0;try{for(var n;;){if(Ng(),On.length===0&&(Wt==null||Wt.flush(),On.length===0))return js=null,n;zu()}}finally{Ja=r}}function zu(){var e=Qi;tl=!0;var r=null;try{var n=0;for(Xs(!0);On.length>0;){var i=Gs.ensure();if(n++>1e3){var s,a;Vg()}i.process(On),Ri.clear()}}finally{tl=!1,Xs(e),js=null}}function Vg(){try{xg()}catch(e){Bs(e,js)}}let Wn=null;function ju(e){var r=e.length;if(r!==0){for(var n=0;n<r;){var i=e[n++];if(!(i.f&(_i|En))&&ka(i)&&(Wn=new Set,Da(i),i.deps===null&&i.first===null&&i.nodes===null&&(i.teardown===null&&i.ac===null?ic(i):i.fn=null),(Wn==null?void 0:Wn.size)>0)){Ri.clear();for(const s of Wn){if(s.f&(_i|En))continue;const a=[s];let o=s.parent;for(;o!==null;)Wn.has(o)&&(Wn.delete(o),a.push(o)),o=o.parent;for(let c=a.length-1;c>=0;c--){const u=a[c];u.f&(_i|En)||Da(u)}}Wn.clear()}}Wn=null}}function Gu(e,r,n,i){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const s of e.reactions){const a=s.f;a&Ur?Gu(s,r,n,i):a&($o|ti)&&!(a&hn)&&qu(s,r,i)&&(Hr(s,hn),Ki(s))}}function qu(e,r,n){const i=n.get(e);if(i!==void 0)return i;if(e.deps!==null)for(const s of e.deps){if(r.includes(s))return!0;if(s.f&Ur&&qu(s,r,n))return n.set(s,!0),!0}return n.set(e,!1),!1}function Ki(e){for(var r=js=e;r.parent!==null;){r=r.parent;var n=r.f;if(tl&&r===nr&&n&ti&&!(n&Lu))return;if(n&(wa|mi)){if(!(n&Br))return;r.f^=Br}}On.push(r)}function Ug(e,r,n,i){const s=Sa()?$a:Rt;if(n.length===0&&e.length===0){i(r.map(s));return}var a=Wt,o=nr,c=Bg();function u(){Promise.all(n.map(g=>Hg(g))).then(g=>{c();try{i([...r.map(s),...g])}catch(d){o.f&_i||Bs(d,o)}a==null||a.deactivate(),qs()}).catch(g=>{Bs(g,o)})}e.length>0?Promise.all(e).then(()=>{c();try{return u()}finally{a==null||a.deactivate(),qs()}}):u()}function Bg(){var e=nr,r=Jt,n=Nr,i=Wt;return function(a=!0){Mi(e),ii(r),Us(n),a&&(i==null||i.activate())}}function qs(){Mi(null),ii(null),Us(null)}function $a(e){var r=Ur|hn,n=Jt!==null&&Jt.f&Ur?Jt:null;return nr!==null&&(nr.f|=Vs),{ctx:Nr,deps:null,effects:null,equals:Uu,f:r,fn:e,reactions:null,rv:0,v:Xr,wv:0,parent:n??nr,ac:null}}function Hg(e,r){let n=nr;n===null&&Ag();var i=n.b,s=void 0,a=ts(Xr),o=!Jt,c=new Map;return Jg(()=>{var _;var u=Mu();s=u.promise;try{Promise.resolve(e()).then(u.resolve,u.reject).then(()=>{g===Wt&&g.committed&&g.deactivate(),qs()})}catch(S){u.reject(S),qs()}var g=Wt;if(o){var d=!i.is_pending();i.update_pending_count(1),g.increment(d),(_=c.get(g))==null||_.reject(Ea),c.delete(g),c.set(g,u)}const p=(S,E=void 0)=>{if(g.activate(),E)E!==Ea&&(a.f|=Ii,rs(a,E));else{a.f&Ii&&(a.f^=Ii),rs(a,S);for(const[A,I]of c){if(c.delete(A),A===g)break;I.reject(Ea)}}o&&(i.update_pending_count(-1),g.decrement(d))};u.promise.then(p,S=>p(null,S||"unknown"))}),is(()=>{for(const u of c.values())u.reject(Ea)}),new Promise(u=>{function g(d){function p(){d===s?u(a):g(s)}d.then(p,p)}g(s)})}function es(e){const r=$a(e);return lc(r),r}function Rt(e){const r=$a(e);return r.equals=Bu,r}function Wu(e){var r=e.effects;if(r!==null){e.effects=null;for(var n=0;n<r.length;n+=1)wi(r[n])}}function zg(e){for(var r=e.parent;r!==null;){if(!(r.f&Ur))return r.f&_i?null:r;r=r.parent}return null}function rl(e){var r,n=nr;Mi(zg(e));try{e.f&=~Qa,Wu(e),r=hc(e)}finally{Mi(n)}return r}function Yu(e){var r=rl(e);if(e.equals(r)||(Wt!=null&&Wt.is_fork||(e.v=r),e.wv=dc()),!Zi)if(Er!==null)(Ks()||Wt!=null&&Wt.is_fork)&&Er.set(e,r);else{var n=e.f&Gn?Br:qn;Hr(e,n)}}let nl=new Set;const Ri=new Map;let Ku=!1;function ts(e,r){var n={f:0,v:e,reactions:null,equals:Uu,rv:0,wv:0};return n}function Pi(e,r){const n=ts(e);return lc(n),n}function h(e,r=!1,n=!0){var s;const i=ts(e);return r||(i.equals=Bu),xi&&n&&Nr!==null&&Nr.l!==null&&((s=Nr.l).s??(s.s=[])).push(i),i}function Ht(e,r){return l(e,b(()=>t(e))),r}function l(e,r,n=!1){Jt!==null&&(!ni||Jt.f&Nu)&&Sa()&&Jt.f&(Ur|ti|$o|Nu)&&!(an!=null&&an.includes(e))&&Pg();let i=n?Ca(r):r;return rs(e,i)}function rs(e,r){if(!e.equals(r)){var n=e.v;Zi?Ri.set(e,r):Ri.set(e,n),e.v=r;var i=Gs.ensure();i.capture(e,n),e.f&Ur&&(e.f&hn&&rl(e),Hr(e,e.f&Gn?Br:qn)),e.wv=dc(),Xu(e,hn),Sa()&&nr!==null&&nr.f&Br&&!(nr.f&(mi|wa))&&(In===null?rv([e]):In.push(e)),!i.is_fork&&nl.size>0&&!Ku&&jg()}return r}function jg(){Ku=!1;var e=Qi;Xs(!0);const r=Array.from(nl);try{for(const n of r)n.f&Br&&Hr(n,qn),ka(n)&&Da(n)}finally{Xs(e)}nl.clear()}function il(e){l(e,e.v+1)}function Xu(e,r){var n=e.reactions;if(n!==null)for(var i=Sa(),s=n.length,a=0;a<s;a++){var o=n[a],c=o.f;if(!(!i&&o===nr)){var u=(c&hn)===0;if(u&&Hr(o,r),c&Ur){var g=o;Er==null||Er.delete(g),c&Qa||(c&Gn&&(o.f|=Qa),Xu(g,qn))}else u&&(c&ti&&Wn!==null&&Wn.add(o),Ki(o))}}}function Ca(e){if(typeof e!="object"||e===null||ri in e)return e;const r=Xo(e);if(r!==_g&&r!==bg)return e;var n=new Map,i=Ms(e),s=Pi(0),a=Ji,o=c=>{if(Ji===a)return c();var u=Jt,g=Ji;ii(null),cc(a);var d=c();return ii(u),cc(g),d};return i&&n.set("length",Pi(e.length)),new Proxy(e,{defineProperty(c,u,g){(!("value"in g)||g.configurable===!1||g.enumerable===!1||g.writable===!1)&&Ig();var d=n.get(u);return d===void 0?d=o(()=>{var p=Pi(g.value);return n.set(u,p),p}):l(d,g.value,!0),!0},deleteProperty(c,u){var g=n.get(u);if(g===void 0){if(u in c){const d=o(()=>Pi(Xr));n.set(u,d),il(s)}}else l(g,Xr),il(s);return!0},get(c,u,g){var S;if(u===ri)return e;var d=n.get(u),p=u in c;if(d===void 0&&(!p||(S=Wi(c,u))!=null&&S.writable)&&(d=o(()=>{var E=Ca(p?c[u]:Xr),A=Pi(E);return A}),n.set(u,d)),d!==void 0){var _=t(d);return _===Xr?void 0:_}return Reflect.get(c,u,g)},getOwnPropertyDescriptor(c,u){var g=Reflect.getOwnPropertyDescriptor(c,u);if(g&&"value"in g){var d=n.get(u);d&&(g.value=t(d))}else if(g===void 0){var p=n.get(u),_=p==null?void 0:p.v;if(p!==void 0&&_!==Xr)return{enumerable:!0,configurable:!0,value:_,writable:!0}}return g},has(c,u){var _;if(u===ri)return!0;var g=n.get(u),d=g!==void 0&&g.v!==Xr||Reflect.has(c,u);if(g!==void 0||nr!==null&&(!d||(_=Wi(c,u))!=null&&_.writable)){g===void 0&&(g=o(()=>{var S=d?Ca(c[u]):Xr,E=Pi(S);return E}),n.set(u,g));var p=t(g);if(p===Xr)return!1}return d},set(c,u,g,d){var D;var p=n.get(u),_=u in c;if(i&&u==="length")for(var S=g;S<p.v;S+=1){var E=n.get(S+"");E!==void 0?l(E,Xr):S in c&&(E=o(()=>Pi(Xr)),n.set(S+"",E))}if(p===void 0)(!_||(D=Wi(c,u))!=null&&D.writable)&&(p=o(()=>Pi(void 0)),l(p,Ca(g)),n.set(u,p));else{_=p.v!==Xr;var A=o(()=>Ca(g));l(p,A)}var I=Reflect.getOwnPropertyDescriptor(c,u);if(I!=null&&I.set&&I.set.call(d,g),!_){if(i&&typeof u=="string"){var k=n.get("length"),C=Number(u);Number.isInteger(C)&&C>=k.v&&l(k,C+1)}il(s)}return!0},ownKeys(c){t(s);var u=Reflect.ownKeys(c).filter(p=>{var _=n.get(p);return _===void 0||_.v!==Xr});for(var[g,d]of n)d.v!==Xr&&!(g in c)&&u.push(g);return u},setPrototypeOf(){Rg()}})}function Qu(e){try{if(e!==null&&typeof e=="object"&&ri in e)return e[ri]}catch{}return e}function Gg(e,r){return Object.is(Qu(e),Qu(r))}var Ws,qg,Wg,Yg;function Xi(e=""){return document.createTextNode(e)}function Ys(e){return Wg.call(e)}function ns(e){return Yg.call(e)}function j(e,r){return Ys(e)}function Ue(e,r=!1){{var n=Ys(e);return n instanceof Comment&&n.data===""?ns(n):n}}function Ee(e,r=1,n=!1){let i=e;for(;r--;)i=ns(i);return i}function Kg(e){e.textContent=""}function Zu(){return!1}let Ju=!1;function Xg(){Ju||(Ju=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{var r;if(!e.defaultPrevented)for(const n of e.target.elements)(r=n.__on_r)==null||r.call(n)})},{capture:!0}))}function Aa(e){var r=Jt,n=nr;ii(null),Mi(null);try{return e()}finally{ii(r),Mi(n)}}function $u(e,r,n,i=n){e.addEventListener(r,()=>Aa(n));const s=e.__on_r;s?e.__on_r=()=>{s(),i(!0)}:e.__on_r=()=>i(!0),Xg()}function ec(e){nr===null&&(Jt===null&&Dg(),kg()),Zi&&Tg()}function Qg(e,r){var n=r.last;n===null?r.last=r.first=e:(n.next=e,e.prev=n,r.last=e)}function yi(e,r,n){var i=nr;i!==null&&i.f&En&&(e|=En);var s={ctx:Nr,deps:null,nodes:null,f:e|hn|Gn,first:null,fn:r,last:null,next:null,parent:i,b:i&&i.b,prev:null,teardown:null,wv:0,ac:null};if(n)try{Da(s),s.f|=Fs}catch(c){throw wi(s),c}else r!==null&&Ki(s);var a=s;if(n&&a.deps===null&&a.teardown===null&&a.nodes===null&&a.first===a.last&&!(a.f&Vs)&&(a=a.first,e&ti&&e&Oi&&a!==null&&(a.f|=Oi)),a!==null&&(a.parent=i,i!==null&&Qg(a,i),Jt!==null&&Jt.f&Ur&&!(e&wa))){var o=Jt;(o.effects??(o.effects=[])).push(a)}return s}function Ks(){return Jt!==null&&!ni}function is(e){const r=yi(Ls,null,!1);return Hr(r,Br),r.teardown=e,r}function al(e){ec();var r=nr.f,n=!Jt&&(r&mi)!==0&&(r&Fs)===0;if(n){var i=Nr;(i.e??(i.e=[])).push(e)}else return tc(e)}function tc(e){return yi(Qo|Fu,e,!1)}function Zg(e){return ec(),yi(Ls|Fu,e,!0)}function Ut(e){return yi(Qo,e,!1)}function x(e,r){var n=Nr,i={effect:null,ran:!1,deps:e};n.l.$.push(i),i.effect=Ta(()=>{e(),!i.ran&&(i.ran=!0,b(r))})}function Pt(){var e=Nr;Ta(()=>{for(var r of e.l.$){r.deps();var n=r.effect;n.f&Br&&Hr(n,qn),ka(n)&&Da(n),r.ran=!1}})}function Jg(e){return yi($o|Vs,e,!0)}function Ta(e,r=0){return yi(Ls|r,e,!0)}function Ce(e,r=[],n=[],i=[]){Ug(i,r,n,s=>{yi(Ls,()=>e(...s.map(t)),!0)})}function as(e,r=0){var n=yi(ti|r,e,!0);return n}function ss(e){return yi(mi|Vs,e,!0)}function rc(e){var r=e.teardown;if(r!==null){const n=Zi,i=Jt;oc(!0),ii(null);try{r.call(null)}finally{oc(n),ii(i)}}}function nc(e,r=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const s=n.ac;s!==null&&Aa(()=>{s.abort(Ea)});var i=n.next;n.f&wa?n.parent=null:wi(n,r),n=i}}function $g(e){for(var r=e.first;r!==null;){var n=r.next;r.f&mi||wi(r),r=n}}function wi(e,r=!0){var n=!1;(r||e.f&Lu)&&e.nodes!==null&&e.nodes.end!==null&&(ev(e.nodes.start,e.nodes.end),n=!0),nc(e,r&&!n),Qs(e,0),Hr(e,_i);var i=e.nodes&&e.nodes.t;if(i!==null)for(const a of i)a.stop();rc(e);var s=e.parent;s!==null&&s.first!==null&&ic(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function ev(e,r){for(;e!==null;){var n=e===r?null:ns(e);e.remove(),e=n}}function ic(e){var r=e.parent,n=e.prev,i=e.next;n!==null&&(n.next=i),i!==null&&(i.prev=n),r!==null&&(r.first===e&&(r.first=i),r.last===e&&(r.last=n))}function sl(e,r,n=!0){var i=[];ac(e,i,!0);var s=()=>{n&&wi(e),r&&r()},a=i.length;if(a>0){var o=()=>--a||s();for(var c of i)c.out(o)}else s()}function ac(e,r,n){if(!(e.f&En)){e.f^=En;var i=e.nodes&&e.nodes.t;if(i!==null)for(const c of i)(c.is_global||n)&&r.push(c);for(var s=e.first;s!==null;){var a=s.next,o=(s.f&Oi)!==0||(s.f&mi)!==0&&(e.f&ti)!==0;ac(s,r,o?n:!1),s=a}}}function ol(e){sc(e,!0)}function sc(e,r){if(e.f&En){e.f^=En,e.f&Br||(Hr(e,hn),Ki(e));for(var n=e.first;n!==null;){var i=n.next,s=(n.f&Oi)!==0||(n.f&mi)!==0;sc(n,s?r:!1),n=i}var a=e.nodes&&e.nodes.t;if(a!==null)for(const o of a)(o.is_global||r)&&o.in()}}function tv(e,r){if(e.nodes)for(var n=e.nodes.start,i=e.nodes.end;n!==null;){var s=n===i?null:ns(n);r.append(n),n=s}}let Qi=!1;function Xs(e){Qi=e}let Zi=!1;function oc(e){Zi=e}let Jt=null,ni=!1;function ii(e){Jt=e}let nr=null;function Mi(e){nr=e}let an=null;function lc(e){Jt!==null&&(an===null?an=[e]:an.push(e))}let sn=null,Sn=0,In=null;function rv(e){In=e}let uc=1,os=0,Ji=os;function cc(e){Ji=e}function dc(){return++uc}function ka(e){var r=e.f;if(r&hn)return!0;if(r&Ur&&(e.f&=-32769),r&qn){var n=e.deps;if(n!==null)for(var i=n.length,s=0;s<i;s++){var a=n[s];if(ka(a)&&Yu(a),a.wv>e.wv)return!0}r&Gn&&Er===null&&Hr(e,Br)}return!1}function fc(e,r,n=!0){var i=e.reactions;if(i!==null&&!(an!=null&&an.includes(e)))for(var s=0;s<i.length;s++){var a=i[s];a.f&Ur?fc(a,r,!1):r===a&&(n?Hr(a,hn):a.f&Br&&Hr(a,qn),Ki(a))}}function hc(e){var E;var r=sn,n=Sn,i=In,s=Jt,a=an,o=Nr,c=ni,u=Ji,g=e.f;sn=null,Sn=0,In=null,Jt=g&(mi|wa)?null:e,an=null,Us(e.ctx),ni=!1,Ji=++os,e.ac!==null&&(Aa(()=>{e.ac.abort(Ea)}),e.ac=null);try{e.f|=Jo;var d=e.fn,p=d(),_=e.deps;if(sn!==null){var S;if(Qs(e,Sn),_!==null&&Sn>0)for(_.length=Sn+sn.length,S=0;S<sn.length;S++)_[Sn+S]=sn[S];else e.deps=_=sn;if(Ks()&&e.f&Gn)for(S=Sn;S<_.length;S++)((E=_[S]).reactions??(E.reactions=[])).push(e)}else _!==null&&Sn<_.length&&(Qs(e,Sn),_.length=Sn);if(Sa()&&In!==null&&!ni&&_!==null&&!(e.f&(Ur|qn|hn)))for(S=0;S<In.length;S++)fc(In[S],e);return s!==null&&s!==e&&(os++,In!==null&&(i===null?i=In:i.push(...In))),e.f&Ii&&(e.f^=Ii),p}catch(A){return Lg(A)}finally{e.f^=Jo,sn=r,Sn=n,In=i,Jt=s,an=a,Us(o),ni=c,Ji=u}}function nv(e,r){let n=r.reactions;if(n!==null){var i=mg.call(n,e);if(i!==-1){var s=n.length-1;s===0?n=r.reactions=null:(n[i]=n[s],n.pop())}}n===null&&r.f&Ur&&(sn===null||!sn.includes(r))&&(Hr(r,qn),r.f&Gn&&(r.f^=Gn,r.f&=-32769),Wu(r),Qs(r,0))}function Qs(e,r){var n=e.deps;if(n!==null)for(var i=r;i<n.length;i++)nv(e,n[i])}function Da(e){var r=e.f;if(!(r&_i)){Hr(e,Br);var n=nr,i=Qi;nr=e,Qi=!0;try{r&(ti|Eg)?$g(e):nc(e),rc(e);var s=hc(e);e.teardown=typeof s=="function"?s:null,e.wv=uc;var a;Yo&&rg&&e.f&hn&&e.deps}finally{Qi=i,nr=n}}}async function iv(){await Promise.resolve(),Fg()}function t(e){var r=e.f,n=(r&Ur)!==0;if(Jt!==null&&!ni){var i=nr!==null&&(nr.f&_i)!==0;if(!i&&!(an!=null&&an.includes(e))){var s=Jt.deps;if(Jt.f&Jo)e.rv<os&&(e.rv=os,sn===null&&s!==null&&s[Sn]===e?Sn++:sn===null?sn=[e]:sn.includes(e)||sn.push(e));else{(Jt.deps??(Jt.deps=[])).push(e);var a=e.reactions;a===null?e.reactions=[Jt]:a.includes(Jt)||a.push(Jt)}}}if(Zi){if(Ri.has(e))return Ri.get(e);if(n){var o=e,c=o.v;return(!(o.f&Br)&&o.reactions!==null||vc(o))&&(c=rl(o)),Ri.set(o,c),c}}else n&&(!(Er!=null&&Er.has(e))||Wt!=null&&Wt.is_fork&&!Ks())&&(o=e,ka(o)&&Yu(o),Qi&&Ks()&&!(o.f&Gn)&&gc(o));if(Er!=null&&Er.has(e))return Er.get(e);if(e.f&Ii)throw e.v;return e.v}function gc(e){if(e.deps!==null){e.f^=Gn;for(const r of e.deps)(r.reactions??(r.reactions=[])).push(e),r.f&Ur&&!(r.f&Gn)&&gc(r)}}function vc(e){if(e.v===Xr)return!0;if(e.deps===null)return!1;for(const r of e.deps)if(Ri.has(r)||r.f&Ur&&vc(r))return!0;return!1}function b(e){var r=ni;try{return ni=!0,e()}finally{ni=r}}const av=-7169;function Hr(e,r){e.f=e.f&av|r}function sv(e,r){var n={};for(var i in e)r.includes(i)||(n[i]=e[i]);for(var s of Object.getOwnPropertySymbols(e))Object.propertyIsEnumerable.call(e,s)&&!r.includes(s)&&(n[s]=e[s]);return n}function v(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(ri in e)ll(e);else if(!Array.isArray(e))for(let r in e){const n=e[r];typeof n=="object"&&n&&ri in n&&ll(n)}}}function ll(e,r=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!r.has(e)){r.add(e),e instanceof Date&&e.getTime();for(let i in e)try{ll(e[i],r)}catch{}const n=Xo(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){const i=Pu(n);for(let s in i){const a=i[s].get;if(a)try{a.call(e)}catch{}}}}}function ov(e,r,n,i={}){function s(a){if(i.capture||lv.call(r,a),!a.cancelBubble)return Aa(()=>n==null?void 0:n.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?Za(()=>{r.addEventListener(e,s,i)}):r.addEventListener(e,s,i),s}function W(e,r,n,i,s){var a={capture:i,passive:s},o=ov(e,r,n,a);(r===document.body||r===window||r===document||r instanceof HTMLMediaElement)&&is(()=>{r.removeEventListener(e,o,a)})}let pc=null;function lv(e){var I;var r=this,n=r.ownerDocument,i=e.type,s=((I=e.composedPath)==null?void 0:I.call(e))||[],a=s[0]||e.target;pc=e;var o=0,c=pc===e&&e.__root;if(c){var u=s.indexOf(c);if(u!==-1&&(r===document||r===window)){e.__root=r;return}var g=s.indexOf(r);if(g===-1)return;u<=g&&(o=u)}if(a=s[o]||e.target,a!==r){Ru(e,"currentTarget",{configurable:!0,get(){return a||n}});var d=Jt,p=nr;ii(null),Mi(null);try{for(var _,S=[];a!==null;){var E=a.assignedSlot||a.parentNode||a.host||null;try{var A=a["__"+i];A!=null&&(!a.disabled||e.target===a)&&A.call(a,e)}catch(k){_?S.push(k):_=k}if(e.cancelBubble||E===r||E===null)break;a=E}if(_){for(let k of S)queueMicrotask(()=>{throw k});throw _}}finally{e.__root=r,delete e.currentTarget,ii(d),Mi(p)}}}function uv(e){var r=document.createElement("template");return r.innerHTML=e.replaceAll("<!>","<!---->"),r.content}function Zs(e,r){var n=nr;n.nodes===null&&(n.nodes={start:e,end:r,a:null,t:null})}function U(e,r){var n=(r&gg)!==0,i=(r&vg)!==0,s,a=!e.startsWith("<!>");return()=>{s===void 0&&(s=uv(a?e:"<!>"+e),n||(s=Ys(s)));var o=i||qg?document.importNode(s,!0):s.cloneNode(!0);if(n){var c=Ys(o),u=o.lastChild;Zs(c,u)}else Zs(o,o);return o}}function Ni(e=""){{var r=Xi(e+"");return Zs(r,r),r}}function Ze(){var e=document.createDocumentFragment(),r=document.createComment(""),n=Xi();return e.append(r,n),Zs(r,n),e}function y(e,r){e!==null&&e.before(r)}function Xe(e,r){var n=r==null?"":typeof r=="object"?r+"":r;n!==(e.__t??(e.__t=e.nodeValue))&&(e.__t=n,e.nodeValue=n+"")}class Js{constructor(r,n=!0){pi(this,"anchor");kr(this,Qn,new Map);kr(this,ci,new Map);kr(this,Tn,new Map);kr(this,ga,new Set);kr(this,xs,!0);kr(this,Os,()=>{var r=Wt;if(mt(this,Qn).has(r)){var n=mt(this,Qn).get(r),i=mt(this,ci).get(n);if(i)ol(i),mt(this,ga).delete(n);else{var s=mt(this,Tn).get(n);s&&(mt(this,ci).set(n,s.effect),mt(this,Tn).delete(n),s.fragment.lastChild.remove(),this.anchor.before(s.fragment),i=s.effect)}for(const[a,o]of mt(this,Qn)){if(mt(this,Qn).delete(a),a===r)break;const c=mt(this,Tn).get(o);c&&(wi(c.effect),mt(this,Tn).delete(o))}for(const[a,o]of mt(this,ci)){if(a===n||mt(this,ga).has(a))continue;const c=()=>{if(Array.from(mt(this,Qn).values()).includes(a)){var g=document.createDocumentFragment();tv(o,g),g.append(Xi()),mt(this,Tn).set(a,{effect:o,fragment:g})}else wi(o);mt(this,ga).delete(a),mt(this,ci).delete(a)};mt(this,xs)||!i?(mt(this,ga).add(a),sl(o,c,!1)):c()}}});kr(this,jo,r=>{mt(this,Qn).delete(r);const n=Array.from(mt(this,Qn).values());for(const[i,s]of mt(this,Tn))n.includes(i)||(wi(s.effect),mt(this,Tn).delete(i))});this.anchor=r,Di(this,xs,n)}ensure(r,n){var i=Wt,s=Zu();if(n&&!mt(this,ci).has(r)&&!mt(this,Tn).has(r))if(s){var a=document.createDocumentFragment(),o=Xi();a.append(o),mt(this,Tn).set(r,{effect:ss(()=>n(o)),fragment:a})}else mt(this,ci).set(r,ss(()=>n(this.anchor)));if(mt(this,Qn).set(i,r),s){for(const[c,u]of mt(this,ci))c===r?i.skipped_effects.delete(u):i.skipped_effects.add(u);for(const[c,u]of mt(this,Tn))c===r?i.skipped_effects.delete(u.effect):i.skipped_effects.add(u.effect);i.oncommit(mt(this,Os)),i.ondiscard(mt(this,jo))}else mt(this,Os).call(this)}}Qn=new WeakMap,ci=new WeakMap,Tn=new WeakMap,ga=new WeakMap,xs=new WeakMap,Os=new WeakMap,jo=new WeakMap;function mc(e,r,...n){var i=new Js(e);as(()=>{const s=r()??null;i.ensure(s,s&&(a=>s(a,...n)))},Oi)}function oe(e,r,n=!1){var i=new Js(e),s=n?Oi:0;function a(o,c){i.ensure(o,c)}as(()=>{var o=!1;r((c,u=!0)=>{o=!0,a(u,c)}),o||a(!1,null)},s)}function $i(e,r,n){var i=new Js(e),s=!Sa();as(()=>{var a=r();s&&a!==null&&typeof a=="object"&&(a={}),i.ensure(a,n)})}function Nt(e,r){return r}function cv(e,r,n){for(var i=[],s=r.length,a,o=r.length,c=0;c<s;c++){let p=r[c];sl(p,()=>{if(a){if(a.pending.delete(p),a.done.add(p),a.pending.size===0){var _=e.outrogroups;ul(Ko(a.done)),_.delete(a),_.size===0&&(e.outrogroups=null)}}else o-=1},!1)}if(o===0){var u=i.length===0&&n!==null;if(u){var g=n,d=g.parentNode;Kg(d),d.append(g),e.items.clear()}ul(r,!u)}else a={pending:new Set(r),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(a)}function ul(e,r=!0){for(var n=0;n<e.length;n++)wi(e[n],r)}var _c;function xt(e,r,n,i,s,a=null){var o=e,c=new Map,u=(r&Iu)!==0;if(u){var g=e;o=g.appendChild(Xi())}var d=null,p=Rt(()=>{var k=n();return Ms(k)?k:k==null?[]:Ko(k)}),_,S=!0;function E(){I.fallback=d,dv(I,_,o,r,i),d!==null&&(_.length===0?d.f&bi?(d.f^=bi,ls(d,null,o)):ol(d):sl(d,()=>{d=null}))}var A=as(()=>{_=t(p);for(var k=_.length,C=new Set,D=Wt,w=Zu(),B=0;B<k;B+=1){var $=_[B],R=i($,B),H=S?null:c.get(R);H?(H.v&&rs(H.v,$),H.i&&rs(H.i,B),w&&D.skipped_effects.delete(H.e)):(H=fv(c,S?o:_c??(_c=Xi()),$,R,B,s,r,n),S||(H.e.f|=bi),c.set(R,H)),C.add(R)}if(k===0&&a&&!d&&(S?d=ss(()=>a(o)):(d=ss(()=>a(_c??(_c=Xi()))),d.f|=bi)),!S)if(w){for(const[Z,ue]of c)C.has(Z)||D.skipped_effects.add(ue.e);D.oncommit(E),D.ondiscard(()=>{})}else E();t(p)}),I={effect:A,items:c,outrogroups:null,fallback:d};S=!1}function dv(e,r,n,i,s){var ue,de,Se,ce,ke,De,ye,le,Q;var a=(i&sg)!==0,o=r.length,c=e.items,u=e.effect.first,g,d=null,p,_=[],S=[],E,A,I,k;if(a)for(k=0;k<o;k+=1)E=r[k],A=s(E,k),I=c.get(A).e,I.f&bi||((de=(ue=I.nodes)==null?void 0:ue.a)==null||de.measure(),(p??(p=new Set)).add(I));for(k=0;k<o;k+=1){if(E=r[k],A=s(E,k),I=c.get(A).e,e.outrogroups!==null)for(const Y of e.outrogroups)Y.pending.delete(I),Y.done.delete(I);if(I.f&bi)if(I.f^=bi,I===u)ls(I,null,n);else{var C=d?d.next:u;I===e.effect.last&&(e.effect.last=I.prev),I.prev&&(I.prev.next=I.next),I.next&&(I.next.prev=I.prev),Li(e,d,I),Li(e,I,C),ls(I,C,n),d=I,_=[],S=[],u=d.next;continue}if(I.f&En&&(ol(I),a&&((ce=(Se=I.nodes)==null?void 0:Se.a)==null||ce.unfix(),(p??(p=new Set)).delete(I))),I!==u){if(g!==void 0&&g.has(I)){if(_.length<S.length){var D=S[0],w;d=D.prev;var B=_[0],$=_[_.length-1];for(w=0;w<_.length;w+=1)ls(_[w],D,n);for(w=0;w<S.length;w+=1)g.delete(S[w]);Li(e,B.prev,$.next),Li(e,d,B),Li(e,$,D),u=D,d=$,k-=1,_=[],S=[]}else g.delete(I),ls(I,u,n),Li(e,I.prev,I.next),Li(e,I,d===null?e.effect.first:d.next),Li(e,d,I),d=I;continue}for(_=[],S=[];u!==null&&u!==I;)(g??(g=new Set)).add(u),S.push(u),u=u.next;if(u===null)continue}I.f&bi||_.push(I),d=I,u=I.next}if(e.outrogroups!==null){for(const Y of e.outrogroups)Y.pending.size===0&&(ul(Ko(Y.done)),(ke=e.outrogroups)==null||ke.delete(Y));e.outrogroups.size===0&&(e.outrogroups=null)}if(u!==null||g!==void 0){var R=[];if(g!==void 0)for(I of g)I.f&En||R.push(I);for(;u!==null;)!(u.f&En)&&u!==e.fallback&&R.push(u),u=u.next;var H=R.length;if(H>0){var Z=i&Iu&&o===0?n:null;if(a){for(k=0;k<H;k+=1)(ye=(De=R[k].nodes)==null?void 0:De.a)==null||ye.measure();for(k=0;k<H;k+=1)(Q=(le=R[k].nodes)==null?void 0:le.a)==null||Q.fix()}cv(e,R,Z)}}a&&Za(()=>{var Y,J;if(p!==void 0)for(I of p)(J=(Y=I.nodes)==null?void 0:Y.a)==null||J.apply()})}function fv(e,r,n,i,s,a,o,c){var u=o&ig?o&og?ts(n):h(n,!1,!1):null,g=o&ag?ts(s):null;return{v:u,i:g,e:ss(()=>(a(r,u??n,g??s,c),()=>{e.delete(i)}))}}function ls(e,r,n){if(e.nodes)for(var i=e.nodes.start,s=e.nodes.end,a=r&&!(r.f&bi)?r.nodes.start:n;i!==null;){var o=ns(i);if(a.before(i),i===s)return;i=o}}function Li(e,r,n){r===null?e.effect.first=n:r.next=n,n===null?e.effect.last=r:n.prev=r}function mr(e,r,n,i,s){var c;var a=(c=r.$$slots)==null?void 0:c[n],o=!1;a===!0&&(a=r[n==="default"?"children":n],o=!0),a===void 0?s!==null&&s(e):a(e,o?()=>i:i)}function cl(e,r,n){var i=new Js(e);as(()=>{var s=r()??null;i.ensure(s,s&&(a=>n(a,s)))},Oi)}const hv=()=>performance.now(),Ei={tick:e=>requestAnimationFrame(e),now:()=>hv(),tasks:new Set};function bc(){const e=Ei.now();Ei.tasks.forEach(r=>{r.c(e)||(Ei.tasks.delete(r),r.f())}),Ei.tasks.size!==0&&Ei.tick(bc)}function gv(e){let r;return Ei.tasks.size===0&&Ei.tick(bc),{promise:new Promise(n=>{Ei.tasks.add(r={c:e,f:n})}),abort(){Ei.tasks.delete(r)}}}function $s(e,r){Aa(()=>{e.dispatchEvent(new CustomEvent(r))})}function vv(e){if(e==="float")return"cssFloat";if(e==="offset")return"cssOffset";if(e.startsWith("--"))return e;const r=e.split("-");return r.length===1?r[0]:r[0]+r.slice(1).map(n=>n[0].toUpperCase()+n.slice(1)).join("")}function yc(e){const r={},n=e.split(";");for(const i of n){const[s,a]=i.split(":");if(!s||a===void 0)break;const o=vv(s.trim());r[o]=a.trim()}return r}const pv=e=>e;function dl(e,r,n,i){var I;var s=(e&hg)!==0,a="both",o,c=r.inert,u=r.style.overflow,g,d;function p(){return Aa(()=>o??(o=n()(r,(i==null?void 0:i())??{},{direction:a})))}var _={is_global:s,in(){r.inert=c,$s(r,"introstart"),g=fl(r,p(),d,1,()=>{$s(r,"introend"),g==null||g.abort(),g=o=void 0,r.style.overflow=u})},out(k){r.inert=!0,$s(r,"outrostart"),d=fl(r,p(),g,0,()=>{$s(r,"outroend"),k==null||k()})},stop:()=>{g==null||g.abort(),d==null||d.abort()}},S=nr;((I=S.nodes).t??(I.t=[])).push(_);{var E=s;if(!E){for(var A=S.parent;A&&A.f&Oi;)for(;(A=A.parent)&&!(A.f&ti););E=!A||(A.f&Fs)!==0}E&&Ut(()=>{b(()=>_.in())})}}function fl(e,r,n,i,s){var a=i===1;if(ya(r)){var o,c=!1;return Za(()=>{if(!c){var I=r({direction:a?"in":"out"});o=fl(e,I,n,i,s)}}),{abort:()=>{c=!0,o==null||o.abort()},deactivate:()=>o.deactivate(),reset:()=>o.reset(),t:()=>o.t()}}if(n==null||n.deactivate(),!(r!=null&&r.duration))return s(),{abort:nn,deactivate:nn,reset:nn,t:()=>i};const{delay:u=0,css:g,tick:d,easing:p=pv}=r;var _=[];if(a&&n===void 0&&(d&&d(0,1),g)){var S=yc(g(0,1));_.push(S,S)}var E=()=>1-i,A=e.animate(_,{duration:u,fill:"forwards"});return A.onfinish=()=>{A.cancel();var I=(n==null?void 0:n.t())??1-i;n==null||n.abort();var k=i-I,C=r.duration*Math.abs(k),D=[];if(C>0){var w=!1;if(g)for(var B=Math.ceil(C/16.666666666666668),$=0;$<=B;$+=1){var R=I+k*p($/B),H=yc(g(R,1-R));D.push(H),w||(w=H.overflow==="hidden")}w&&(e.style.overflow="hidden"),E=()=>{var Z=A.currentTime;return I+k*p(Z/C)},d&&gv(()=>{if(A.playState!=="running")return!1;var Z=E();return d(Z,1-Z),!0})}A=e.animate(D,{duration:C,fill:"forwards"}),A.onfinish=()=>{E=()=>i,d==null||d(i,1-i),s()}},{abort:()=>{A&&(A.cancel(),A.effect=null,A.onfinish=nn)},deactivate:()=>{s=nn},reset:()=>{i===0&&(d==null||d(1,0))},t:()=>E()}}function zr(e,r,n){Ut(()=>{var i=b(()=>r(e,n==null?void 0:n())||{});if(n&&(i!=null&&i.update)){var s=!1,a={};Ta(()=>{var o=n();v(o),s&&el(a,o)&&(a=o,i.update(o))}),s=!0}if(i!=null&&i.destroy)return()=>i.destroy()})}function wc(e){var r,n,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(r=0;r<s;r++)e[r]&&(n=wc(e[r]))&&(i&&(i+=" "),i+=n)}else for(n in e)e[n]&&(i&&(i+=" "),i+=n);return i}function mv(){for(var e,r,n=0,i="",s=arguments.length;n<s;n++)(e=arguments[n])&&(r=wc(e))&&(i&&(i+=" "),i+=r);return i}function Cn(e){return typeof e=="object"?mv(e):e??""}const Ec=[...`
|
|
2
|
+
\r\f \v\uFEFF`];function _v(e,r,n){var i=e==null?"":""+e;if(r&&(i=i?i+" "+r:r),n){for(var s in n)if(n[s])i=i?i+" "+s:s;else if(i.length)for(var a=s.length,o=0;(o=i.indexOf(s,o))>=0;){var c=o+a;(o===0||Ec.includes(i[o-1]))&&(c===i.length||Ec.includes(i[c]))?i=(o===0?"":i.substring(0,o))+i.substring(c+1):o=c}}return i===""?null:i}function Sc(e,r=!1){var n=r?" !important;":";",i="";for(var s in e){var a=e[s];a!=null&&a!==""&&(i+=" "+s+": "+a+n)}return i}function hl(e){return e[0]!=="-"||e[1]!=="-"?e.toLowerCase():e}function bv(e,r){if(r){var n="",i,s;if(Array.isArray(r)?(i=r[0],s=r[1]):i=r,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var a=!1,o=0,c=!1,u=[];i&&u.push(...Object.keys(i).map(hl)),s&&u.push(...Object.keys(s).map(hl));var g=0,d=-1;const A=e.length;for(var p=0;p<A;p++){var _=e[p];if(c?_==="/"&&e[p-1]==="*"&&(c=!1):a?a===_&&(a=!1):_==="/"&&e[p+1]==="*"?c=!0:_==='"'||_==="'"?a=_:_==="("?o++:_===")"&&o--,!c&&a===!1&&o===0){if(_===":"&&d===-1)d=p;else if(_===";"||p===A-1){if(d!==-1){var S=hl(e.substring(g,d).trim());if(!u.includes(S)){_!==";"&&p++;var E=e.substring(g,p).trim();n+=" "+E+";"}}g=p+1,d=-1}}}}return i&&(n+=Sc(i)),s&&(n+=Sc(s,!0)),n=n.trim(),n===""?null:n}return e==null?null:String(e)}function Pe(e,r,n,i,s,a){var o=e.__className;if(o!==n||o===void 0){var c=_v(n,i,a);c==null?e.removeAttribute("class"):e.className=c,e.__className=n}else if(a&&s!==a)for(var u in a){var g=!!a[u];(s==null||g!==!!s[u])&&e.classList.toggle(u,g)}return a}function gl(e,r={},n,i){for(var s in n){var a=n[s];r[s]!==a&&(n[s]==null?e.style.removeProperty(s):e.style.setProperty(s,a,i))}}function We(e,r,n,i){var s=e.__style;if(s!==r){var a=bv(r,i);a==null?e.removeAttribute("style"):e.style.cssText=a,e.__style=r}else i&&(Array.isArray(i)?(gl(e,n==null?void 0:n[0],i[0]),gl(e,n==null?void 0:n[1],i[1],"important")):gl(e,n,i));return i}function vl(e,r,n=!1){if(e.multiple){if(r==null)return;if(!Ms(r))return Mg();for(var i of e.options)i.selected=r.includes(Ac(i));return}for(i of e.options){var s=Ac(i);if(Gg(s,r)){i.selected=!0;return}}(!n||r!==void 0)&&(e.selectedIndex=-1)}function Cc(e){var r=new MutationObserver(()=>{vl(e,e.__value)});r.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),is(()=>{r.disconnect()})}function Ac(e){return"__value"in e?e.__value:e.value}const yv=Symbol("is custom element"),wv=Symbol("is html");function us(e,r){var n=pl(e);n.value===(n.value=r??void 0)||e.value===r&&(r!==0||e.nodeName!=="PROGRESS")||(e.value=r??"")}function Tc(e,r){var n=pl(e);n.checked!==(n.checked=r??void 0)&&(e.checked=r)}function kc(e,r){r?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function Lt(e,r,n,i){var s=pl(e);s[r]!==(s[r]=n)&&(r==="loading"&&(e[Sg]=n),n==null?e.removeAttribute(r):typeof n!="string"&&Ev(e).includes(r)?e[r]=n:e.setAttribute(r,n))}function pl(e){return e.__attributes??(e.__attributes={[yv]:e.nodeName.includes("-"),[wv]:e.namespaceURI===pg})}var Dc=new Map;function Ev(e){var r=e.getAttribute("is")||e.nodeName,n=Dc.get(r);if(n)return n;Dc.set(r,n=[]);for(var i,s=e,a=Element.prototype;a!==s;){i=Pu(s);for(var o in i)i[o].set&&n.push(o);s=Xo(s)}return n}function ea(e,r,n=r){var i=new WeakSet;$u(e,"input",async s=>{var a=s?e.defaultValue:e.value;if(a=ml(e)?_l(a):a,n(a),Wt!==null&&i.add(Wt),await iv(),a!==(a=r())){var o=e.selectionStart,c=e.selectionEnd,u=e.value.length;if(e.value=a??"",c!==null){var g=e.value.length;o===c&&c===u&&g>u?(e.selectionStart=g,e.selectionEnd=g):(e.selectionStart=o,e.selectionEnd=Math.min(c,g))}}}),b(r)==null&&e.value&&(n(ml(e)?_l(e.value):e.value),Wt!==null&&i.add(Wt)),Ta(()=>{var s=r();if(e===document.activeElement){var a=zs??Wt;if(i.has(a))return}ml(e)&&s===_l(e.value)||e.type==="date"&&!s&&!e.value||s!==e.value&&(e.value=s??"")})}function xc(e,r,n=r){$u(e,"change",i=>{var s=i?e.defaultChecked:e.checked;n(s)}),b(r)==null&&n(e.checked),Ta(()=>{var i=r();e.checked=!!i})}function ml(e){var r=e.type;return r==="number"||r==="range"}function _l(e){return e===""?null:+e}function vr(e,r,n){var i=Wi(e,r);i&&i.set&&(e[r]=n,is(()=>{e[r]=null}))}const qo=class qo{constructor(r){kr(this,Go);kr(this,zi,new WeakMap);kr(this,Ya);kr(this,Is);Di(this,Is,r)}observe(r,n){var i=mt(this,zi).get(r)||new Set;return i.add(n),mt(this,zi).set(r,i),jn(this,Go,tg).call(this).observe(r,mt(this,Is)),()=>{var s=mt(this,zi).get(r);s.delete(n),s.size===0&&(mt(this,zi).delete(r),mt(this,Ya).unobserve(r))}}};zi=new WeakMap,Ya=new WeakMap,Is=new WeakMap,Go=new WeakSet,tg=function(){return mt(this,Ya)??Di(this,Ya,new ResizeObserver(r=>{for(var n of r){qo.entries.set(n.target,n);for(var i of mt(this,zi).get(n.target)||[])i(n)}}))},pi(qo,"entries",new WeakMap);let bl=qo;var Sv=new bl({box:"border-box"});function yl(e,r,n){var i=Sv.observe(e,()=>n(e[r]));Ut(()=>(b(()=>n(e[r])),i))}function Oc(e,r){return e===r||(e==null?void 0:e[ri])===r}function ht(e={},r,n,i){return Ut(()=>{var s,a;return Ta(()=>{s=a,a=(i==null?void 0:i())||[],b(()=>{e!==n(...a)&&(r(e,...a),s&&Oc(n(...s),e)&&r(null,...s))})}),()=>{Za(()=>{a&&Oc(n(...a),e)&&r(null,...a)})}}),e}function cs(e){return function(...r){var n=r[0];n.target===this&&(e==null||e.apply(this,r))}}function fr(e){return function(...r){var n=r[0];return n.stopPropagation(),e==null?void 0:e.apply(this,r)}}function $t(e){return function(...r){var n=r[0];return n.preventDefault(),e==null?void 0:e.apply(this,r)}}function Ot(e=!1){const r=Nr,n=r.l.u;if(!n)return;let i=()=>v(r.s);if(e){let s=0,a={};const o=$a(()=>{let c=!1;const u=r.s;for(const g in u)u[g]!==a[g]&&(a[g]=u[g],c=!0);return c&&s++,s});i=()=>t(o)}n.b.length&&Zg(()=>{Ic(r,i),Ns(n.b)}),al(()=>{const s=b(()=>n.m.map(yg));return()=>{for(const a of s)typeof a=="function"&&a()}}),n.a.length&&al(()=>{Ic(r,i),Ns(n.a)})}function Ic(e,r){if(e.l.s)for(const n of e.l.s)t(n);r()}function Yn(e,r){var a;var n=(a=e.$$events)==null?void 0:a[r.type],i=Ms(n)?n.slice():n==null?[]:[n];for(var s of i)s.call(this,r)}function wl(e,r,n){if(e==null)return r(void 0),n&&n(void 0),nn;const i=b(()=>e.subscribe(r,n));return i.unsubscribe?()=>i.unsubscribe():i}const xa=[];function Cv(e,r){return{subscribe:ai(e,r).subscribe}}function ai(e,r=nn){let n=null;const i=new Set;function s(c){if(el(e,c)&&(e=c,n)){const u=!xa.length;for(const g of i)g[1](),xa.push(g,e);if(u){for(let g=0;g<xa.length;g+=2)xa[g][0](xa[g+1]);xa.length=0}}}function a(c){s(c(e))}function o(c,u=nn){const g=[c,u];return i.add(g),i.size===1&&(n=r(s,a)||nn),c(e),()=>{i.delete(g),i.size===0&&n&&(n(),n=null)}}return{set:s,update:a,subscribe:o}}function eo(e,r,n){const i=!Array.isArray(e),s=i?[e]:e;if(!s.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const a=r.length<2;return Cv(n,(o,c)=>{let u=!1;const g=[];let d=0,p=nn;const _=()=>{if(d)return;p();const E=r(i?g[0]:g,o,c);a?o(E):p=typeof E=="function"?E:nn},S=s.map((E,A)=>wl(E,I=>{g[A]=I,d&=~(1<<A),u&&_()},()=>{d|=1<<A}));return u=!0,_(),function(){Ns(S),p(),u=!1}})}function hr(e){let r;return wl(e,n=>r=n)(),r}let to=!1,El=Symbol();function Be(e,r,n){const i=n[r]??(n[r]={store:null,source:h(void 0),unsubscribe:nn});if(i.store!==e&&!(El in n))if(i.unsubscribe(),i.store=e??null,e==null)i.source.v=void 0,i.unsubscribe=nn;else{var s=!0;i.unsubscribe=wl(e,a=>{s?i.source.v=a:l(i.source,a)}),s=!1}return e&&El in n?hr(e):t(i.source)}function on(e,r,n){let i=n[r];return i&&i.store!==e&&(i.unsubscribe(),i.unsubscribe=nn),e}function Qe(e,r){return e.set(r),r}function Gt(){const e={};function r(){is(()=>{for(var n in e)e[n].unsubscribe();Ru(e,El,{enumerable:!1,value:!0})})}return[e,r]}function Si(e,r,n){return e.set(n),r}function Av(e){var r=to;try{return to=!1,[e(),to]}finally{to=r}}const Tv={get(e,r){let n=e.props.length;for(;n--;){let i=e.props[n];if(ya(i)&&(i=i()),typeof i=="object"&&i!==null&&r in i)return i[r]}},set(e,r,n){let i=e.props.length;for(;i--;){let s=e.props[i];ya(s)&&(s=s());const a=Wi(s,r);if(a&&a.set)return a.set(n),!0}return!1},getOwnPropertyDescriptor(e,r){let n=e.props.length;for(;n--;){let i=e.props[n];if(ya(i)&&(i=i()),typeof i=="object"&&i!==null&&r in i){const s=Wi(i,r);return s&&!s.configurable&&(s.configurable=!0),s}}},has(e,r){if(r===ri||r===Vu)return!1;for(let n of e.props)if(ya(n)&&(n=n()),n!=null&&r in n)return!0;return!1},ownKeys(e){const r=[];for(let n of e.props)if(ya(n)&&(n=n()),!!n){for(const i in n)r.includes(i)||r.push(i);for(const i of Object.getOwnPropertySymbols(n))r.includes(i)||r.push(i)}return r}};function kv(...e){return new Proxy({props:e},Tv)}function m(e,r,n,i){var D;var s=!xi||(n&ug)!==0,a=(n&dg)!==0,o=(n&fg)!==0,c=i,u=!0,g=()=>(u&&(u=!1,c=o?b(i):i),c),d;if(a){var p=ri in e||Vu in e;d=((D=Wi(e,r))==null?void 0:D.set)??(p&&r in e?w=>e[r]=w:void 0)}var _,S=!1;a?[_,S]=Av(()=>e[r]):_=e[r],_===void 0&&i!==void 0&&(_=g(),d&&(s&&Og(),d(_)));var E;if(s?E=()=>{var w=e[r];return w===void 0?g():(u=!0,w)}:E=()=>{var w=e[r];return w!==void 0&&(c=void 0),w===void 0?c:w},s&&!(n&cg))return E;if(d){var A=e.$$legacy;return function(w,B){return arguments.length>0?((!s||!B||A||S)&&d(B?E():w),w):E()}}var I=!1,k=(n&lg?$a:Rt)(()=>(I=!1,E()));a&&t(k);var C=nr;return function(w,B){if(arguments.length>0){const $=B?t(k):s&&a?Ca(w):w;return l(k,$),I=!0,c!==void 0&&(c=$),w}return Zi&&I||C.f&_i?k.v:t(k)}}function Dv(e,r){var n=Ze(),i=Ue(n);mc(i,()=>r.children??nn),y(e,n)}function xv(e,r){kt(r,!0);const n=m(r,"disabled",3,!1);al(()=>{let o,c;if(!n()){if(!r.target){console.warn(`[svelte-portal] Invalid Portal target: ${r.target}`);return}return typeof r.target=="string"?c=document.querySelector(r.target):c=r.target,c&&(o=we.mount(Dv,{target:c,props:{children:r.children}})),()=>{o&&we.unmount(o)}}});var i=Ze(),s=Ue(i);{var a=o=>{var c=Ze(),u=Ue(c);mc(u,()=>r.children),y(o,c)};oe(s,o=>{n()&&o(a)})}y(e,i),Dt()}function ro(e,r){let n,i=r;const s=()=>{a(i)},a=c=>{const{anchor:u,align:g,maxHeight:d,maxWidth:p,minWidth:_=0,useAnchorWidth:S,offset:E=5,customUpdate:A,offsetBelow:I}=c;if(!u)return;const k=u.getBoundingClientRect(),C=e.getBoundingClientRect();let D={maxHeight:null,minWidth:null,maxWidth:p,left:null,top:null};if(typeof A=="function")D=A(k,C,D);else{const w=window.scrollY,B=window.scrollX;g==="right-outside"||g==="left-outside"?D.top=k.top+w:window.innerHeight-k.bottom<(d||50)?(D.top=k.top-C.height-E+w,D.maxHeight=d||240):(D.top=k.bottom+(I||E)+w,D.maxHeight=d||window.innerHeight-k.bottom-20),!p&&S&&(D.maxWidth=k.width),S?D.minWidth=Math.max(_,k.width):_&&(D.minWidth=_),g==="right"?D.left=k.left+k.width-C.width+B:g==="right-outside"?D.left=k.right+E+B:g==="left-outside"?D.left=k.left-C.width-E+B:D.left=k.left+B}Object.entries(D).forEach(([w,B])=>{B!=null?e.style[w]=`${B.toFixed(0)}px`:e.style[w]=null})},o=c=>{i=c,n&&n.disconnect();const{anchor:u}=c;u&&(n=new ResizeObserver(()=>a(c)),n.observe(u),n.observe(e),n.observe(document.body))};return e.style.position="absolute",e.style.zIndex="9999",document.addEventListener("scroll",s,!0),o(r),{update:o,destroy(){n&&n.disconnect(),document.removeEventListener("scroll",s,!0)}}}const Ov=[".flatpickr-calendar",".spectrum-Popover",".download-js-link"];let ds=[];const Rc=e=>{if(!e.target.closest('[data-ignore-click-outside="true"]')){for(let r of Ov)if(e.target.closest(r))return;ds.forEach(r=>{var s;if(r.element.contains(e.target))return;const n=r.anchor.closest(".spectrum-Underlay")!=null;e.target.closest(".spectrum-Underlay")!=null&&!n||(s=r.callback)==null||s.call(r,e)})}};document.documentElement.addEventListener("click",Rc,!0),document.documentElement.addEventListener("contextmenu",Rc,!0);const Iv=(e,r,n,i)=>{let s=ds.find(a=>a.id===e);s?s.callback=i:ds.push({id:e,element:r,anchor:n,callback:i})},Rv=e=>{ds=ds.filter(r=>r.id!==e)},no=(e,r)=>{const n=Math.random(),i=s=>{const a=(s==null?void 0:s.callback)||s,o=(s==null?void 0:s.anchor)||e;Iv(n,e,o,a)};return i(r),{update:i,destroy:()=>Rv(n)}};function Pc(e){const r=e-1;return r*r*r+1}function Mc(e){const r=typeof e=="string"&&e.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return r?[parseFloat(r[1]),r[2]||"px"]:[e,"px"]}function Nc(e,{delay:r=0,duration:n=400,easing:i=Pc,x:s=0,y:a=0,opacity:o=0}={}){const c=getComputedStyle(e),u=+c.opacity,g=c.transform==="none"?"":c.transform,d=u*(1-o),[p,_]=Mc(s),[S,E]=Mc(a);return{delay:r,duration:n,easing:i,css:(A,I)=>`
|
|
3
|
+
transform: ${g} translate(${(1-A)*p}${_}, ${(1-A)*S}${E});
|
|
4
|
+
opacity: ${u-d*I}`}}function Pv(e,{delay:r=0,duration:n=400,easing:i=Pc,axis:s="y"}={}){const a=getComputedStyle(e),o=+a.opacity,c=s==="y"?"height":"width",u=parseFloat(a[c]),g=s==="y"?["top","bottom"]:["left","right"],d=g.map(k=>`${k[0].toUpperCase()}${k.slice(1)}`),p=parseFloat(a[`padding${d[0]}`]),_=parseFloat(a[`padding${d[1]}`]),S=parseFloat(a[`margin${d[0]}`]),E=parseFloat(a[`margin${d[1]}`]),A=parseFloat(a[`border${d[0]}Width`]),I=parseFloat(a[`border${d[1]}Width`]);return{delay:r,duration:n,easing:i,css:k=>`overflow: hidden;opacity: ${Math.min(k*20,1)*o};${c}: ${k*u}px;padding-${g[0]}: ${k*p}px;padding-${g[1]}: ${k*_}px;margin-${g[0]}: ${k*S}px;margin-${g[1]}: ${k*E}px;border-${g[0]}-width: ${k*A}px;border-${g[1]}-width: ${k*I}px;min-${c}: 0`}}var Mv=U('<div tabindex="0" role="presentation"><!></div>');function Qr(e,r){kt(r,!1);const n=h(),i=we.createEventDispatcher();let s=m(r,"anchor",8),a=m(r,"align",8,"right"),o=m(r,"portalTarget",8),c=m(r,"minWidth",8),u=m(r,"maxWidth",8),g=m(r,"maxHeight",8),d=m(r,"open",12,!1),p=m(r,"useAnchorWidth",8,!1),_=m(r,"dismissible",8,!0),S=m(r,"offset",8,5),E=m(r,"offsetBelow",8),A=m(r,"customHeight",8),I=m(r,"animate",8,!0),k=m(r,"customZindex",8),C=m(r,"handlePositionUpdate",8),D=m(r,"showPopover",8,!0),w=m(r,"clickOutsideOverride",8,!1),B=m(r,"ignoreAnchor",8,!0),$=m(r,"popup",12),R=m(r,"className",8);const H=()=>{i("open"),d(!0)},Z=()=>{i("close"),d(!1)},ue=()=>{d()?Z():H()},de=()=>viewport==null?void 0:viewport.matches(":focus-within"),Se=Q=>{if(!w()&&d()){let Y=Q.target,J=!1;for(;!J&&Y&&Y.parentNode;)J=Y===s(),Y=Y.parentNode;(!J||J&&!B())&&Z()}};function ce(Q){w()&&d()&&Q.key==="Escape"&&Z()}x(()=>v(o()),()=>{l(n,o()||".spectrum")}),Pt();var ke={show:H,hide:Z,toggle:ue,hasFocus:de};Ot();var De=Ze(),ye=Ue(De);{var le=Q=>{xv(Q,{get target(){return t(n)},children:(Y,J)=>{var K=Mv();let ie;var z=j(K);mr(z,r,"default",{},null),ht(K,ge=>$(ge),()=>$()),zr(K,(ge,O)=>ro==null?void 0:ro(ge,O),()=>({anchor:s(),align:a(),maxHeight:g(),maxWidth:u(),minWidth:c(),useAnchorWidth:p(),offset:S(),offsetBelow:E(),customUpdate:C()})),zr(K,(ge,O)=>no==null?void 0:no(ge,O),()=>({callback:_()?Se:()=>{},anchor:s()})),Ut(()=>W("keydown",K,ce)),Ce(()=>{ie=Pe(K,1,"spectrum-Popover is-open "+R(),"svelte-1yh2ak",ie,{customZindex:k(),"hide-popover":d()&&!D()}),We(K,`height: ${A()??""}; --customZindex: ${k()??""};`)}),dl(3,K,()=>Nc,()=>({y:-20,duration:I()?200:0})),y(Y,K)},$$slots:{default:!0}})};oe(ye,Q=>{d()&&Q(le)})}return y(e,De),vr(r,"show",H),vr(r,"hide",Z),vr(r,"toggle",ue),vr(r,"hasFocus",de),Dt(ke)}var Nv=U('<div class="tooltip-content svelte-i04k5p"> </div>');function io(e,r){kt(r,!1);let n=m(r,"anchor",8),i=m(r,"content",8),s=m(r,"show",12,!1);m(r,"delay",8,750);let a=m(r,"align",8,"top");const o=()=>{s(!1)};we.onDestroy(()=>{o()}),Ot();var c=Ze(),u=Ue(c);{var g=d=>{Qr(d,{get anchor(){return n()},get align(){return a()},get open(){return s()},dismissible:!1,animate:!0,children:(p,_)=>{var S=Nv(),E=j(S);Ce(()=>Xe(E,i())),y(p,S)},$$slots:{default:!0}})};oe(u,d=>{s()&&d(g)})}y(e,c),Dt()}var Lv=U('<button><i></i> <span class="svelte-ljms5y"> </span></button> <!>',1);function ta(e,r){kt(r,!1);const n=h(),i=h();let s=m(r,"size",8,"M"),a=m(r,"menuItem",8,!1),o=m(r,"menuAlign",8,"right"),c=m(r,"icon",8,void 0),u=m(r,"iconAfterText",8,void 0),g=m(r,"iconColor",8,void 0),d=m(r,"text",12,""),p=m(r,"quiet",8,void 0),_=m(r,"selected",8,void 0),S=m(r,"disabled",8,void 0),E=m(r,"onClick",8,void 0),A=m(r,"buttonClass",8,"actionButton"),I=m(r,"type",8,"primary"),k=m(r,"tooltip",8);const C=[];let D=m(r,"actionsMode",8,"normal"),w=m(r,"condition",8,void 0),B=m(r,"loopSource",8,void 0),$=m(r,"loopDelay",8,0),R=m(r,"loopEvent",8,void 0),H=m(r,"timerDuration",8,60),Z=m(r,"fullWidth",8,void 0),ue=m(r,"iconOnly",8,void 0),de=m(r,"onTimer",8,void 0),Se=m(r,"onLoopStart",8,void 0),ce=m(r,"onLoopEnd",8,void 0),ke=m(r,"onTrueCondition",8,void 0),De=m(r,"onFalseCondition",8,void 0),ye=h(!1),le,Q=0,Y=h(),J=h(!1),K;const ie=()=>{S()||(K&&clearTimeout(K),K=setTimeout(()=>{l(J,!0)},750))},z=()=>{K&&(clearTimeout(K),K=null),l(J,!1)};async function ge(q){var P,te,M,T;if(!(S()||t(ye))){if(l(ye,!0),D()=="loop"){if(Se()&&await Se()({iterations:(P=B())==null?void 0:P.length}),Array.isArray(t(n))&&R())for(var he=0;he<t(n).length;he++)await R()({idx:he,value:t(n)[he]}),await O($());ce()&&await ce()()}else D()=="conditional"?w()==!0?await((te=ke())==null?void 0:te()):await((M=De())==null?void 0:M()):E()&&await((T=E())==null?void 0:T(q));l(ye,!1)}}function O(q){return new Promise(he=>setTimeout(he,q))}const G=q=>{if(!q)return;let he=[];try{he=JSON.parse(q),Array.isArray(he)||(he=[q])}catch{he=(q==null?void 0:q.split(","))??[q]}return he};we.onMount(()=>{D()=="timer"&&(d(H()),le=setInterval(()=>{var q;Q+=1,Q==H()&&(Q=0,(q=de())==null||q()),d(H()-Q)},1e3))}),we.onDestroy(()=>{le&&clearInterval(le),K&&clearTimeout(K)}),x(()=>v(B()),()=>{l(n,G(B()))}),x(()=>(t(ye),v(c())),()=>{l(i,t(ye)?"ph ph-spinner-gap ph-spin":c()&&!c().startsWith("ri-")?"ph ph-"+c():c()?c():void 0)}),Pt();var re={conditions:C};Ot();var ae=Lv(),ee=Ue(ae);let pe;var Ne=j(ee);let He;var me=Ee(Ne,2),V=j(me);ht(ee,q=>l(Y,q),()=>t(Y));var fe=Ee(ee,2);{var X=q=>{io(q,{get anchor(){return t(Y)},get content(){return k()},get show(){return t(J)}})};oe(fe,q=>{k()&&q(X)})}return Ce(()=>{Lt(ee,"tabindex",S()?-1:0),pe=Pe(ee,1,Cn(A()=="actionButton"?"spectrum-ActionButton spectrum-ActionButton--size"+s():"spectrum-Button spectrum-Button--size"+s()),"svelte-ljms5y",pe,{"super-button":!0,xsmall:s()=="XS",small:s()=="S",large:s()=="L","is-selected":_(),cta:I()=="cta"&&!S(),warning:I()=="warning",primary:I()=="primary"&&!a(),secondary:I()=="secondary",overBackground:I()=="overBackground",ink:I()=="ink",menu:I()=="menu",quiet:p(),icon:t(i),iconOnly:ue()||!d(),"full-width":Z(),"menu-item":a(),"menu-item-right":a()&&o()=="right",disabled:S(),working:t(ye)}),Pe(Ne,1,Cn(t(i)),"svelte-ljms5y"),He=We(Ne,"",He,{order:u()?1:0,color:S()?"var(--spectrum-global-color-gray-400)":g()}),Xe(V,d())}),W("click",ee,ge),W("mouseenter",ee,ie),W("mouseleave",ee,z),y(e,ae),vr(r,"conditions",C),Dt(re)}var Fv=U('<div class="error-message svelte-n4hlae"> </div>'),Vv=U("<div><div><!></div> <!></div>"),Uv=U("<div><!> <div><!></div></div>");function Bv(e,r){kt(r,!1);const n=h();let i=m(r,"labelPos",8),s=m(r,"multirow",8),a=m(r,"tall",8),o=m(r,"label",8),c=m(r,"field",8),u=m(r,"helpText",8),g=m(r,"error",8),d=m(r,"labelWidth",8),p=m(r,"height",8),_=m(r,"maxHeight",8),S=h();x(()=>(v(i()),v(d())),()=>{l(n,i()=="left"?d()?d():"5rem":"auto")}),Pt();var E=Uv();let A,I;var k=j(E);{var C=$=>{var R=Vv();let H,Z;var ue=j(R);let de;var Se=j(ue);{var ce=le=>{var Q=Ni();Ce(()=>Xe(Q,u())),y(le,Q)},ke=le=>{var Q=Ni();Ce(()=>Xe(Q,o()||c())),y(le,Q)};oe(Se,le=>{t(S)&&u()?le(ce):le(ke,!1)})}var De=Ee(ue,2);{var ye=le=>{var Q=Fv(),Y=j(Q);Ce(()=>Xe(Y,g())),y(le,Q)};oe(De,le=>{g()&&le(ye)})}Ce(()=>{H=Pe(R,1,"superlabel svelte-n4hlae",null,H,{left:i()=="left",tall:a(),error:g()}),Z=We(R,"",Z,{"--label-width":t(n)}),de=Pe(ue,1,"label svelte-n4hlae",null,de,{showHelp:t(S)})}),W("mouseenter",ue,function(...le){var Q;(Q=u()?()=>l(S,!0):null)==null||Q.apply(this,le)}),W("mouseleave",ue,function(...le){var Q;(Q=u()?()=>l(S,!1):null)==null||Q.apply(this,le)}),y($,R)};oe(k,$=>{i()&&$(C)})}var D=Ee(k,2);let w;var B=j(D);mr(B,r,"default",{},null),Ce(()=>{A=Pe(E,1,"super-field svelte-n4hlae",null,A,{"left-label":i()=="left",multirow:s(),tall:a()}),I=We(E,"",I,{"--height":p(),"--max-height":_()}),w=Pe(D,1,"inline-cells svelte-n4hlae",null,w,{multirow:s()})}),y(e,E),Dt()}var Rn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Sl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Hv(e){if(e.__esModule)return e;var r=e.default;if(typeof r=="function"){var n=function i(){return this instanceof i?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};n.prototype=r.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(i){var s=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(n,i,s.get?s:{enumerable:!0,get:function(){return e[i]}})}),n}var Cl=Object.defineProperty,zv=Object.getOwnPropertyDescriptor,jv=Object.getOwnPropertyNames,Gv=Object.prototype.hasOwnProperty,qv=(e,r)=>{for(var n in r)Cl(e,n,{get:r[n],enumerable:!0})},Wv=(e,r,n,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let s of jv(r))!Gv.call(e,s)&&s!==n&&Cl(e,s,{get:()=>r[s],enumerable:!(i=zv(r,s))||i.enumerable});return e},Yv=e=>Wv(Cl({},"__esModule",{value:!0}),e),Lc={};qv(Lc,{AIOperationEnum:()=>Fc,APP_QUOTA_NAMES:()=>Lp,AUDIT_LOG_TYPE:()=>Bp,AccountSSOProvider:()=>Rd,AccountSSOProviderType:()=>Id,AnalyticsEvent:()=>np,AppBackupStatus:()=>lf,AppBackupTrigger:()=>uf,AppBackupType:()=>of,AppEnvironment:()=>Cd,ArrayOperator:()=>cd,AsyncEvents:()=>Kv,AuditLogResourceStatus:()=>yf,AuditLogSystemUser:()=>Up,AuditedEventFriendlyName:()=>Xv,AuthType:()=>Pd,AutoFieldSubType:()=>Jd,AutoReason:()=>Zd,AutomationActionStepId:()=>Tl,AutomationCustomIOType:()=>Nd,AutomationEventType:()=>Hd,AutomationFeature:()=>Fd,AutomationIOType:()=>Md,AutomationStatus:()=>Ud,AutomationStepIdArray:()=>dp,AutomationStepStatus:()=>Vd,AutomationStepType:()=>Ld,AutomationStoppedReason:()=>Bd,AutomationTriggerStepId:()=>Al,BBReferenceFieldSubType:()=>tf,BREAKDOWN_QUOTA_NAMES:()=>Fp,BasicOperator:()=>ud,BodyType:()=>Gd,BreakdownQuotaName:()=>pf,CalculationType:()=>rf,CommandWord:()=>Ad,ConfigType:()=>ff,ConstantQuotaName:()=>Zc,DSPlusOperation:()=>ld,DatasourceFeature:()=>od,DatasourceFieldType:()=>nd,DocumentType:()=>kl,DocumentTypesToImport:()=>Cp,EmptyFilterOption:()=>gd,Event:()=>Bc,EventPublishType:()=>wf,Feature:()=>Jc,FeatureFlag:()=>Sd,FieldType:()=>Yd,FilterGroupLogicalOperator:()=>vd,FilterType:()=>sd,FormulaType:()=>ef,GroupByTypes:()=>Xd,GroupType:()=>zc,Hosting:()=>Uc,HttpMethod:()=>qd,INTERNAL_TABLE_SOURCE_ID:()=>fp,IdentityType:()=>jc,IncludeRelationship:()=>ad,InitType:()=>Td,InternalSearchFilterOperator:()=>hd,InternalTable:()=>sf,JsonFieldSubType:()=>$d,JsonTypes:()=>hp,LockName:()=>bd,LockType:()=>_d,LogicalOperator:()=>fd,LoginMethod:()=>md,LoopStepType:()=>zd,MaintenanceType:()=>Af,MigrationName:()=>ed,MigrationType:()=>$c,MonthlyQuotaName:()=>Qc,NumericTypes:()=>Kd,Operation:()=>td,OperationFieldTypeEnum:()=>Vc,PASSWORD_REPLACEMENT:()=>$v,PLUGIN_TYPE_ARR:()=>Np,PermissionLevel:()=>kd,PermissionSource:()=>xd,PermissionType:()=>Dd,PingSource:()=>bf,PlanModel:()=>Wc,PlanType:()=>Gc,PluginSource:()=>vf,PluginType:()=>xl,PriceDuration:()=>qc,QueryType:()=>rd,QuotaType:()=>Kc,QuotaUsageType:()=>Yc,RangeOperator:()=>dd,RelationshipType:()=>Qd,RestAuthType:()=>jd,RowExportFormat:()=>Od,RowOperations:()=>ep,SEPARATOR:()=>ao,SQLiteType:()=>df,SSOProviderType:()=>hf,ScheduleRepeatPeriod:()=>_f,ScheduleType:()=>mf,SearchIndex:()=>yd,ServiceType:()=>Cf,SortOption:()=>wd,SortOrder:()=>Ef,SortType:()=>Sf,SourceName:()=>id,SqlClient:()=>pd,StaticQuotaName:()=>Xc,TableSourceType:()=>Wd,TenantResolutionStrategy:()=>Ed,UNICODE_MAX:()=>yp,UserGroupSyncEvents:()=>Hc,UserStatus:()=>gf,ViewCalculation:()=>af,ViewV2Type:()=>nf,VirtualDocumentType:()=>Dl,WebhookActionType:()=>cf,canGroupBy:()=>vp,getDocumentType:()=>Sp,getVirtualDocumentType:()=>Tp,isAIConfig:()=>Rp,isAppBackupMetadata:()=>Vp,isCloudAccount:()=>sp,isConstantQuota:()=>Jv,isCreatePasswordAccount:()=>ip,isDocument:()=>rp,isGoogleConfig:()=>xp,isLogicalSearchOperator:()=>tp,isManyToMany:()=>mp,isManyToOne:()=>bp,isMonthlyQuota:()=>Zv,isNumeric:()=>gp,isOIDCConfig:()=>Op,isOneToMany:()=>_p,isPasswordAccount:()=>ap,isRelationshipField:()=>pp,isSCIMConfig:()=>Ip,isSMTPConfig:()=>Dp,isSSOAccount:()=>lp,isSSOUser:()=>Pp,isSelfHostAccount:()=>op,isSettingsConfig:()=>kp,isStaticQuota:()=>Qv,isUser:()=>Mp,isVerifiableSSOProvider:()=>cp,prefixed:()=>wp});var Oa=Yv(Lc),Fc=(e=>(e.SUMMARISE_TEXT="SUMMARISE_TEXT",e.CLEAN_DATA="CLEAN_DATA",e.TRANSLATE="TRANSLATE",e.CATEGORISE_TEXT="CATEGORISE_TEXT",e.SENTIMENT_ANALYSIS="SENTIMENT_ANALYSIS",e.PROMPT="PROMPT",e.SEARCH_WEB="SEARCH_WEB",e))(Fc||{}),Vc=(e=>(e.MULTI_COLUMN="columns",e.COLUMN="column",e.BINDABLE_TEXT="prompt",e))(Vc||{}),Uc=(e=>(e.CLOUD="cloud",e.SELF="self",e))(Uc||{}),Bc=(e=>(e.USER_CREATED="user:created",e.USER_UPDATED="user:updated",e.USER_DELETED="user:deleted",e.USER_ONBOARDING_COMPLETE="user:onboarding:complete",e.USER_PERMISSION_ADMIN_ASSIGNED="user:admin:assigned",e.USER_PERMISSION_ADMIN_REMOVED="user:admin:removed",e.USER_PERMISSION_BUILDER_ASSIGNED="user:builder:assigned",e.USER_PERMISSION_BUILDER_REMOVED="user:builder:removed",e.USER_INVITED="user:invited",e.USER_INVITED_ACCEPTED="user:invite:accepted",e.USER_PASSWORD_FORCE_RESET="user:password:force:reset",e.USER_PASSWORD_UPDATED="user:password:updated",e.USER_PASSWORD_RESET_REQUESTED="user:password:reset:requested",e.USER_PASSWORD_RESET="user:password:reset",e.USER_DATA_COLLABORATION="user:data:collaboration",e.EMAIL_SMTP_CREATED="email:smtp:created",e.EMAIL_SMTP_UPDATED="email:smtp:updated",e.AI_CONFIG_CREATED="ai:config:created",e.AI_CONFIG_UPDATED="ai:config:updated",e.AUTH_SSO_CREATED="auth:sso:created",e.AUTH_SSO_UPDATED="auth:sso:updated",e.AUTH_SSO_ACTIVATED="auth:sso:activated",e.AUTH_SSO_DEACTIVATED="auth:sso:deactivated",e.AUTH_LOGIN="auth:login",e.AUTH_LOGOUT="auth:logout",e.ORG_NAME_UPDATED="org:info:name:updated",e.ORG_LOGO_UPDATED="org:info:logo:updated",e.ORG_PLATFORM_URL_UPDATED="org:platformurl:updated",e.INSTALLATION_VERSION_CHECKED="installation:version:checked",e.INSTALLATION_VERSION_UPGRADED="installation:version:upgraded",e.INSTALLATION_VERSION_DOWNGRADED="installation:version:downgraded",e.INSTALLATION_FIRST_STARTUP="installation:firstStartup",e.ANALYTICS_OPT_OUT="analytics:opt:out",e.ANALYTICS_OPT_IN="analytics:opt:in",e.APP_CREATED="app:created",e.APP_UPDATED="app:updated",e.APP_DELETED="app:deleted",e.APP_DUPLICATED="app:duplicated",e.APP_PUBLISHED="app:published",e.APP_UNPUBLISHED="app:unpublished",e.APP_TEMPLATE_IMPORTED="app:template:imported",e.APP_FILE_IMPORTED="app:file:imported",e.APP_VERSION_UPDATED="app:version:updated",e.APP_VERSION_REVERTED="app:version:reverted",e.APP_REVERTED="app:reverted",e.APP_EXPORTED="app:exported",e.ROLE_CREATED="role:created",e.ROLE_UPDATED="role:updated",e.ROLE_DELETED="role:deleted",e.ROLE_ASSIGNED="role:assigned",e.ROLE_UNASSIGNED="role:unassigned",e.SERVED_BUILDER="served:builder",e.SERVED_APP="served:app",e.SERVED_APP_PREVIEW="served:app:preview",e.DATASOURCE_CREATED="datasource:created",e.DATASOURCE_UPDATED="datasource:updated",e.DATASOURCE_DELETED="datasource:deleted",e.QUERY_CREATED="query:created",e.QUERY_UPDATED="query:updated",e.QUERY_DELETED="query:deleted",e.QUERY_IMPORT="query:import",e.QUERIES_RUN="queries:run",e.QUERY_PREVIEWED="query:previewed",e.TABLE_CREATED="table:created",e.TABLE_UPDATED="table:updated",e.TABLE_DELETED="table:deleted",e.TABLE_EXPORTED="table:exported",e.TABLE_IMPORTED="table:imported",e.TABLE_DATA_IMPORTED="table:data:imported",e.VIEW_CREATED="view:created",e.VIEW_UPDATED="view:updated",e.VIEW_DELETED="view:deleted",e.VIEW_EXPORTED="view:exported",e.VIEW_FILTER_CREATED="view:filter:created",e.VIEW_FILTER_UPDATED="view:filter:updated",e.VIEW_FILTER_DELETED="view:filter:deleted",e.VIEW_CALCULATION_CREATED="view:calculation:created",e.VIEW_CALCULATION_UPDATED="view:calculation:updated",e.VIEW_CALCULATION_DELETED="view:calculation:deleted",e.ROWS_CREATED="rows:created",e.ROWS_IMPORTED="rows:imported",e.COMPONENT_CREATED="component:created",e.COMPONENT_DELETED="component:deleted",e.SCREEN_CREATED="screen:created",e.SCREEN_DELETED="screen:deleted",e.LAYOUT_CREATED="layout:created",e.LAYOUT_DELETED="layout:deleted",e.AUTOMATION_CREATED="automation:created",e.AUTOMATION_DELETED="automation:deleted",e.AUTOMATION_TESTED="automation:tested",e.AUTOMATIONS_RUN="automations:run",e.AUTOMATION_STEP_CREATED="automation:step:created",e.AUTOMATION_STEP_DELETED="automation:step:deleted",e.AUTOMATION_TRIGGER_UPDATED="automation:trigger:updated",e.LICENSE_PLAN_CHANGED="license:plan:changed",e.LICENSE_ACTIVATED="license:activated",e.LICENSE_PAYMENT_FAILED="license:payment:failed",e.LICENSE_PAYMENT_RECOVERED="license:payment:recovered",e.LICENSE_CHECKOUT_OPENED="license:checkout:opened",e.LICENSE_CHECKOUT_SUCCESS="license:checkout:success",e.LICENSE_PORTAL_OPENED="license:portal:opened",e.ACCOUNT_CREATED="account:created",e.ACCOUNT_DELETED="account:deleted",e.ACCOUNT_VERIFIED="account:verified",e.APP_BACKFILL_SUCCEEDED="app:backfill:succeeded",e.APP_BACKFILL_FAILED="app:backfill:failed",e.TENANT_BACKFILL_SUCCEEDED="tenant:backfill:succeeded",e.TENANT_BACKFILL_FAILED="tenant:backfill:failed",e.INSTALLATION_BACKFILL_SUCCEEDED="installation:backfill:succeeded",e.INSTALLATION_BACKFILL_FAILED="installation:backfill:failed",e.USER_GROUP_CREATED="user_group:created",e.USER_GROUP_UPDATED="user_group:updated",e.USER_GROUP_DELETED="user_group:deleted",e.USER_GROUP_USERS_ADDED="user_group:user_added",e.USER_GROUP_USERS_REMOVED="user_group:users_deleted",e.USER_GROUP_PERMISSIONS_EDITED="user_group:permissions_edited",e.USER_GROUP_ONBOARDING="user_group:onboarding_added",e.PLUGIN_INIT="plugin:init",e.PLUGIN_IMPORTED="plugin:imported",e.PLUGIN_DELETED="plugin:deleted",e.APP_BACKUP_RESTORED="app:backup:restored",e.APP_BACKUP_TRIGGERED="app:backup:triggered",e.ENVIRONMENT_VARIABLE_CREATED="environment_variable:created",e.ENVIRONMENT_VARIABLE_DELETED="environment_variable:deleted",e.ENVIRONMENT_VARIABLE_UPGRADE_PANEL_OPENED="environment_variable:upgrade_panel_opened",e.AUDIT_LOGS_FILTERED="audit_log:filtered",e.AUDIT_LOGS_DOWNLOADED="audit_log:downloaded",e))(Bc||{}),Hc=["user:created","user:updated","user:deleted","user:admin:assigned","user:admin:removed","user:builder:assigned","user:builder:removed","user_group:created","user_group:updated","user_group:deleted","user_group:user_added","user_group:users_deleted","user_group:permissions_edited"],Kv=[...Hc],Xv={"user:created":'User "{{ email }}" created{{#if viaScim}} via SCIM{{/if}}',"user:updated":'User "{{ email }}" updated{{#if viaScim}} via SCIM{{/if}}',"user:deleted":'User "{{ email }}" deleted{{#if viaScim}} via SCIM{{/if}}',"user:admin:assigned":'User "{{ email }}" admin role assigned',"user:admin:removed":'User "{{ email }}" admin role removed',"user:builder:assigned":'User "{{ email }}" builder role assigned',"user:builder:removed":'User "{{ email }}" builder role removed',"user:invited":'User "{{ email }}" invited',"user:invite:accepted":'User "{{ email }}" accepted invite',"user:password:updated":'User "{{ email }}" password updated',"user:password:reset:requested":'User "{{ email }}" password reset requested',"user:password:reset":'User "{{ email }}" password reset',"user_group:created":'User group "{{ name }}" created{{#if viaScim}} via SCIM{{/if}}',"user_group:updated":'User group "{{ name }}" updated{{#if viaScim}} via SCIM{{/if}}',"user_group:deleted":'User group "{{ name }}" deleted{{#if viaScim}} via SCIM{{/if}}',"user_group:user_added":'User group "{{ name }}" {{ count }} users added{{#if viaScim}} via SCIM{{/if}}',"user_group:users_deleted":'User group "{{ name }}" {{ count }} users removed{{#if viaScim}} via SCIM{{/if}}',"user_group:permissions_edited":'User group "{{ name }}" permissions edited',"user:password:force:reset":void 0,"user_group:onboarding_added":void 0,"user:onboarding:complete":void 0,"user:data:collaboration":void 0,"email:smtp:created":"Email configuration created","email:smtp:updated":"Email configuration updated","ai:config:created":"AI configuration created","ai:config:updated":"AI configuration updated","auth:sso:created":"SSO configuration created","auth:sso:updated":"SSO configuration updated","auth:sso:activated":"SSO configuration activated","auth:sso:deactivated":"SSO configuration deactivated","auth:login":'User "{{ email }}" logged in',"auth:logout":'User "{{ email }}" logged out',"org:info:name:updated":"Organisation name updated","org:info:logo:updated":"Organisation logo updated","org:platformurl:updated":"Organisation platform URL updated","app:created":'App "{{ name }}" created',"app:updated":'App "{{ name }}" updated',"app:deleted":'App "{{ name }}" deleted',"app:duplicated":'App "{{ name }}" duplicated',"app:published":'App "{{ name }}" published',"app:unpublished":'App "{{ name }}" unpublished',"app:template:imported":'App "{{ name }}" template imported',"app:file:imported":'App "{{ name }}" file imported',"app:version:updated":'App "{{ name }}" version updated',"app:version:reverted":'App "{{ name }}" version reverted',"app:reverted":'App "{{ name }}" reverted',"app:exported":'App "{{ name }}" exported',"app:backup:restored":'App backup "{{ name }}" restored',"app:backup:triggered":'App backup "{{ name }}" triggered',"datasource:created":"Datasource created","datasource:updated":"Datasource updated","datasource:deleted":"Datasource deleted","query:created":"Query created","query:updated":"Query updated","query:deleted":"Query deleted","query:import":"Query import","queries:run":void 0,"query:previewed":void 0,"table:created":'Table "{{ name }}" created',"table:updated":'Table "{{ name }}" updated',"table:deleted":'Table "{{ name }}" deleted',"table:exported":'Table "{{ name }}" exported',"table:imported":'Table "{{ name }}" imported',"table:data:imported":"Data imported to table","rows:created":"Rows created","rows:imported":"Rows imported","automation:created":'Automation "{{ name }}" created',"automation:deleted":'Automation "{{ name }}" deleted',"automation:step:created":'Automation "{{ name }}" step added',"automation:step:deleted":'Automation "{{ name }}" step removed',"automation:tested":void 0,"automations:run":void 0,"automation:trigger:updated":void 0,"screen:created":'Screen "{{ name }}" created',"screen:deleted":'Screen "{{ name }}" deleted',"component:created":"Component created","component:deleted":"Component deleted","environment_variable:created":"Environment variable created","environment_variable:deleted":"Environment variable deleted","environment_variable:upgrade_panel_opened":void 0,"plugin:imported":"Plugin imported","plugin:deleted":"Plugin deleted","plugin:init":void 0,"role:created":void 0,"role:updated":void 0,"role:deleted":void 0,"role:assigned":void 0,"role:unassigned":void 0,"license:plan:changed":void 0,"license:activated":void 0,"license:payment:failed":void 0,"license:payment:recovered":void 0,"license:checkout:opened":void 0,"license:checkout:success":void 0,"license:portal:opened":void 0,"account:created":void 0,"account:deleted":void 0,"account:verified":void 0,"app:backfill:succeeded":void 0,"app:backfill:failed":void 0,"tenant:backfill:succeeded":void 0,"tenant:backfill:failed":void 0,"installation:backfill:succeeded":void 0,"installation:backfill:failed":void 0,"layout:created":void 0,"layout:deleted":void 0,"view:created":void 0,"view:updated":void 0,"view:deleted":void 0,"view:exported":void 0,"view:filter:created":void 0,"view:filter:updated":void 0,"view:filter:deleted":void 0,"view:calculation:created":void 0,"view:calculation:updated":void 0,"view:calculation:deleted":void 0,"served:builder":void 0,"served:app":void 0,"served:app:preview":void 0,"analytics:opt:out":void 0,"analytics:opt:in":void 0,"installation:version:checked":void 0,"installation:version:upgraded":void 0,"installation:version:downgraded":void 0,"installation:firstStartup":void 0,"audit_log:filtered":void 0,"audit_log:downloaded":void 0},zc=(e=>(e.TENANT="tenant",e.INSTALLATION="installation",e))(zc||{}),jc=(e=>(e.USER="user",e.TENANT="tenant",e.INSTALLATION="installation",e))(jc||{}),Gc=(e=>(e.FREE="free",e.PRO="pro",e.TEAM="team",e.PREMIUM="premium",e.PREMIUM_PLUS="premium_plus",e.PREMIUM_PLUS_TRIAL="premium_plus_trial",e.BUSINESS="business",e.ENTERPRISE_BASIC="enterprise_basic",e.ENTERPRISE_BASIC_TRIAL="enterprise_basic_trial",e.ENTERPRISE="enterprise",e))(Gc||{}),qc=(e=>(e.MONTHLY="monthly",e.YEARLY="yearly",e))(qc||{}),Wc=(e=>(e.PER_USER="perUser",e.PER_CREATOR_PER_USER="per_creator_per_user",e.DAY_PASS="dayPass",e))(Wc||{}),Yc=(e=>(e.STATIC="static",e.MONTHLY="monthly",e))(Yc||{}),Kc=(e=>(e.USAGE="usage",e.CONSTANT="constant",e))(Kc||{}),Xc=(e=>(e.ROWS="rows",e.APPS="apps",e.USERS="users",e.CREATORS="creators",e.USER_GROUPS="userGroups",e.PLUGINS="plugins",e.AI_CUSTOM_CONFIGS="aiCustomConfigs",e))(Xc||{}),Qc=(e=>(e.QUERIES="queries",e.AUTOMATIONS="automations",e.DAY_PASSES="dayPasses",e.BUDIBASE_AI_CREDITS="budibaseAICredits",e))(Qc||{}),Zc=(e=>(e.AUTOMATION_LOG_RETENTION_DAYS="automationLogRetentionDays",e.APP_BACKUPS_RETENTION_DAYS="appBackupRetentionDays",e))(Zc||{}),Qv=(e,r,n)=>e==="usage"&&r==="static",Zv=(e,r,n)=>e==="usage"&&r==="monthly",Jv=(e,r)=>e==="constant",Jc=(e=>(e.USER_GROUPS="userGroups",e.APP_BACKUPS="appBackups",e.ENVIRONMENT_VARIABLES="environmentVariables",e.AUDIT_LOGS="auditLogs",e.ENFORCEABLE_SSO="enforceableSSO",e.BRANDING="branding",e.SCIM="scim",e.SYNC_AUTOMATIONS="syncAutomations",e.TRIGGER_AUTOMATION_RUN="triggerAutomationRun",e.APP_BUILDERS="appBuilders",e.OFFLINE="offline",e.EXPANDED_PUBLIC_API="expandedPublicApi",e.VIEW_PERMISSIONS="viewPermissions",e.VIEW_READONLY_COLUMNS="viewReadonlyColumns",e.BUDIBASE_AI="budibaseAI",e.AI_CUSTOM_CONFIGS="aiCustomConfigs",e))(Jc||{}),$c=(e=>(e.GLOBAL="global",e.APP="app",e.INSTALLATION="installation",e))($c||{}),ed=(e=>(e.USER_EMAIL_VIEW_CASING="user_email_view_casing",e.APP_URLS="app_urls",e.EVENT_APP_BACKFILL="event_app_backfill",e.EVENT_GLOBAL_BACKFILL="event_global_backfill",e.EVENT_INSTALLATION_BACKFILL="event_installation_backfill",e.GLOBAL_INFO_SYNC_USERS="global_info_sync_users",e.TABLE_SETTINGS_LINKS_TO_ACTIONS="table_settings_links_to_actions",e.SYNC_QUOTAS="sync_quotas_2",e))(ed||{}),$v="--secret-value--",td=(e=>(e.CREATE="CREATE",e.READ="READ",e.UPDATE="UPDATE",e.DELETE="DELETE",e.COUNT="COUNT",e.BULK_CREATE="BULK_CREATE",e.BULK_UPSERT="BULK_UPSERT",e.CREATE_TABLE="CREATE_TABLE",e.UPDATE_TABLE="UPDATE_TABLE",e.DELETE_TABLE="DELETE_TABLE",e))(td||{}),ep=["CREATE","READ","UPDATE","DELETE","BULK_CREATE","BULK_UPSERT"],rd=(e=>(e.SQL="sql",e.JSON="json",e.FIELDS="fields",e))(rd||{}),nd=(e=>(e.STRING="string",e.CODE="code",e.LONGFORM="longForm",e.BOOLEAN="boolean",e.NUMBER="number",e.PASSWORD="password",e.LIST="list",e.OBJECT="object",e.JSON="json",e.FILE="file",e.FIELD_GROUP="fieldGroup",e.SELECT="select",e))(nd||{}),id=(e=>(e.POSTGRES="POSTGRES",e.DYNAMODB="DYNAMODB",e.MONGODB="MONGODB",e.ELASTICSEARCH="ELASTICSEARCH",e.COUCHDB="COUCHDB",e.SQL_SERVER="SQL_SERVER",e.S3="S3",e.AIRTABLE="AIRTABLE",e.MYSQL="MYSQL",e.ARANGODB="ARANGODB",e.REST="REST",e.ORACLE="ORACLE",e.GOOGLE_SHEETS="GOOGLE_SHEETS",e.FIRESTORE="FIRESTORE",e.REDIS="REDIS",e.SNOWFLAKE="SNOWFLAKE",e.BUDIBASE="BUDIBASE",e))(id||{}),ad=(e=>(e[e.INCLUDE=1]="INCLUDE",e[e.EXCLUDE=0]="EXCLUDE",e))(ad||{}),sd=(e=>(e.STRING="string",e.FUZZY="fuzzy",e.RANGE="range",e.EQUAL="equal",e.NOT_EQUAL="notEqual",e.EMPTY="empty",e.NOT_EMPTY="notEmpty",e.ONE_OF="oneOf",e))(sd||{}),od=(e=>(e.CONNECTION_CHECKING="connection",e.FETCH_TABLE_NAMES="fetch_table_names",e.EXPORT_SCHEMA="export_schema",e))(od||{}),ld=(e=>(e.CREATE="create",e.READ="read",e.UPDATE="update",e.DELETE="delete",e))(ld||{}),ud=(e=>(e.EQUAL="equal",e.NOT_EQUAL="notEqual",e.EMPTY="empty",e.NOT_EMPTY="notEmpty",e.FUZZY="fuzzy",e.STRING="string",e))(ud||{}),cd=(e=>(e.CONTAINS="contains",e.NOT_CONTAINS="notContains",e.CONTAINS_ANY="containsAny",e.ONE_OF="oneOf",e))(cd||{}),dd=(e=>(e.RANGE="range",e))(dd||{}),fd=(e=>(e.AND="$and",e.OR="$or",e))(fd||{});function tp(e){return e==="$and"||e==="$or"}var hd=(e=>(e.COMPLEX_ID_OPERATOR="_complexIdOperator",e))(hd||{}),gd=(e=>(e.RETURN_ALL="all",e.RETURN_NONE="none",e))(gd||{}),vd=(e=>(e.ALL="all",e.ANY="any",e))(vd||{}),pd=(e=>(e.MS_SQL="mssql",e.POSTGRES="pg",e.MY_SQL="mysql2",e.MARIADB="mariadb",e.ORACLE="oracledb",e.SQL_LITE="sqlite3",e))(pd||{}),md=(e=>(e.API_KEY="api_key",e.COOKIE="cookie",e))(md||{}),_d=(e=>(e.TRY_ONCE="try_once",e.TRY_TWICE="try_twice",e.DEFAULT="default",e.DELAY_500="delay_500",e.CUSTOM="custom",e.AUTO_EXTEND="auto_extend",e))(_d||{}),bd=(e=>(e.MIGRATIONS="migrations",e.TRIGGER_QUOTA="trigger_quota",e.SYNC_ACCOUNT_LICENSE="sync_account_license",e.UPDATE_TENANTS_DOC="update_tenants_doc",e.PERSIST_WRITETHROUGH="persist_writethrough",e.QUOTA_USAGE_EVENT="quota_usage_event",e.APP_MIGRATION="app_migrations",e.PROCESS_USER_INVITE="process_user_invite",e))(bd||{}),yd=(e=>(e.ROWS="rows",e.AUDIT="audit",e.USER="user",e))(yd||{}),wd=(e=>(e.ASCENDING="asc",e.DESCENDING="desc",e))(wd||{}),rp=e=>typeof e=="object"&&e._id&&e._rev,Ed=(e=>(e.USER="user",e.HEADER="header",e.QUERY="query",e.SUBDOMAIN="subdomain",e.PATH="path",e))(Ed||{}),Sd=(e=>(e.PER_CREATOR_PER_USER_PRICE="PER_CREATOR_PER_USER_PRICE",e.PER_CREATOR_PER_USER_PRICE_ALERT="PER_CREATOR_PER_USER_PRICE_ALERT",e.AUTOMATION_BRANCHING="AUTOMATION_BRANCHING",e.SQS="SQS",e.AI_CUSTOM_CONFIGS="AI_CUSTOM_CONFIGS",e.DEFAULT_VALUES="DEFAULT_VALUES",e.ENRICHED_RELATIONSHIPS="ENRICHED_RELATIONSHIPS",e.TABLES_DEFAULT_ADMIN="TABLES_DEFAULT_ADMIN",e.BUDIBASE_AI="BUDIBASE_AI",e))(Sd||{}),Cd=(e=>(e.PRODUCTION="production",e.DEVELOPMENT="development",e))(Cd||{}),Ad=(e=>(e.BACKUPS="backups",e.HOSTING="hosting",e.ANALYTICS="analytics",e.HELP="help",e.PLUGIN="plugins",e))(Ad||{}),Td=(e=>(e.QUICK="quick",e.DIGITAL_OCEAN="do",e))(Td||{}),np={OptOut:"analytics:opt:out",OptIn:"analytics:opt:in",SelfHostInit:"hosting:init",PluginInit:"plugin:init"},kd=(e=>(e.READ="read",e.WRITE="write",e.EXECUTE="execute",e.ADMIN="admin",e))(kd||{}),Dd=(e=>(e.APP="app",e.TABLE="table",e.USER="user",e.AUTOMATION="automation",e.WEBHOOK="webhook",e.BUILDER="builder",e.CREATOR="creator",e.GLOBAL_BUILDER="globalBuilder",e.QUERY="query",e.VIEW="view",e.LEGACY_VIEW="legacy_view",e))(Dd||{}),xd=(e=>(e.EXPLICIT="EXPLICIT",e.INHERITED="INHERITED",e.BASE="BASE",e))(xd||{}),Od=(e=>(e.CSV="csv",e.JSON="json",e.JSON_WITH_SCHEMA="jsonWithSchema",e))(Od||{}),ip=e=>e.authType==="password",ap=e=>e.authType==="password"&&e.hosting==="self",sp=e=>e.hosting==="cloud",op=e=>e.hosting==="self",lp=e=>e.authType==="sso",Id=(e=>(e.GOOGLE="google",e.MICROSOFT="microsoft",e))(Id||{}),Rd=(e=>(e.GOOGLE="google",e.MICROSOFT="microsoft",e))(Rd||{}),up=["microsoft"];function cp(e){return up.includes(e)}var Pd=(e=>(e.SSO="sso",e.PASSWORD="password",e))(Pd||{}),Md=(e=>(e.OBJECT="object",e.STRING="string",e.BOOLEAN="boolean",e.NUMBER="number",e.ARRAY="array",e.JSON="json",e.DATE="date",e.ATTACHMENT="attachment",e))(Md||{}),Nd=(e=>(e.TABLE="table",e.ROW="row",e.ROWS="rows",e.WIDE="wide",e.QUERY="query",e.QUERY_PARAMS="queryParams",e.QUERY_LIMIT="queryLimit",e.LOOP_OPTION="loopOption",e.ITEM="item",e.CODE="code",e.FILTERS="filters",e.COLUMN="column",e.TRIGGER_SCHEMA="triggerSchema",e.CRON="cron",e.WEBHOOK_URL="webhookUrl",e.AUTOMATION="automation",e.AUTOMATION_FIELDS="automationFields",e.MULTI_ATTACHMENTS="multi_attachments",e.TRIGGER_FILTER="trigger_filter",e))(Nd||{}),Al=(e=>(e.ROW_SAVED="ROW_SAVED",e.ROW_UPDATED="ROW_UPDATED",e.ROW_DELETED="ROW_DELETED",e.WEBHOOK="WEBHOOK",e.APP="APP",e.CRON="CRON",e.ROW_ACTION="ROW_ACTION",e))(Al||{}),Ld=(e=>(e.LOGIC="LOGIC",e.ACTION="ACTION",e.TRIGGER="TRIGGER",e))(Ld||{}),Tl=(e=>(e.SEND_EMAIL_SMTP="SEND_EMAIL_SMTP",e.CREATE_ROW="CREATE_ROW",e.UPDATE_ROW="UPDATE_ROW",e.DELETE_ROW="DELETE_ROW",e.EXECUTE_BASH="EXECUTE_BASH",e.OUTGOING_WEBHOOK="OUTGOING_WEBHOOK",e.EXECUTE_SCRIPT="EXECUTE_SCRIPT",e.EXECUTE_QUERY="EXECUTE_QUERY",e.SERVER_LOG="SERVER_LOG",e.DELAY="DELAY",e.FILTER="FILTER",e.QUERY_ROWS="QUERY_ROWS",e.LOOP="LOOP",e.COLLECT="COLLECT",e.OPENAI="OPENAI",e.TRIGGER_AUTOMATION_RUN="TRIGGER_AUTOMATION_RUN",e.BRANCH="BRANCH",e.discord="discord",e.slack="slack",e.zapier="zapier",e.integromat="integromat",e.n8n="n8n",e))(Tl||{}),dp=[...Object.values(Tl),...Object.values(Al)],Fd=(e=>(e.LOOPING="LOOPING",e))(Fd||{}),Vd=(e=>(e.NO_ITERATIONS="no_iterations",e))(Vd||{}),Ud=(e=>(e.SUCCESS="success",e.ERROR="error",e.STOPPED="stopped",e.STOPPED_ERROR="stopped_error",e.NO_CONDITION_MET="No branch condition met",e))(Ud||{}),Bd=(e=>(e.TRIGGER_FILTER_NOT_MET="Automation did not run. Filter conditions in trigger were not met.",e))(Bd||{}),Hd=(e=>(e.ROW_SAVE="row:save",e.ROW_UPDATE="row:update",e.ROW_DELETE="row:delete",e.APP_TRIGGER="app:trigger",e.CRON_TRIGGER="cron:trigger",e.WEBHOOK_TRIGGER="web:trigger",e.ROW_ACTION="row:action",e))(Hd||{}),zd=(e=>(e.ARRAY="Array",e.STRING="String",e))(zd||{}),jd=(e=>(e.BASIC="basic",e.BEARER="bearer",e))(jd||{}),Gd=(e=>(e.NONE="none",e.FORM_DATA="form",e.XML="xml",e.ENCODED="encoded",e.JSON="json",e.TEXT="text",e))(Gd||{}),qd=(e=>(e.GET="GET",e.POST="POST",e.PATCH="PATCH",e.PUT="PUT",e.HEAD="HEAD",e.DELETE="DELETE",e))(qd||{}),fp="bb_internal",Wd=(e=>(e.EXTERNAL="external",e.INTERNAL="internal",e))(Wd||{}),Yd=(e=>(e.STRING="string",e.LONGFORM="longform",e.OPTIONS="options",e.NUMBER="number",e.BOOLEAN="boolean",e.ARRAY="array",e.DATETIME="datetime",e.ATTACHMENTS="attachment",e.ATTACHMENT_SINGLE="attachment_single",e.LINK="link",e.FORMULA="formula",e.AUTO="auto",e.AI="ai",e.JSON="json",e.INTERNAL="internal",e.BARCODEQR="barcodeqr",e.SIGNATURE_SINGLE="signature_single",e.BIGINT="bigint",e.BB_REFERENCE="bb_reference",e.BB_REFERENCE_SINGLE="bb_reference_single",e))(Yd||{}),hp=["attachment_single","attachment","bb_reference","json","array"],Kd=["number","bigint"];function gp(e){return Kd.includes(e)}var Xd=["string","longform","options","number","boolean","datetime","bigint"];function vp(e){return Xd.includes(e)}var Qd=(e=>(e.ONE_TO_MANY="one-to-many",e.MANY_TO_ONE="many-to-one",e.MANY_TO_MANY="many-to-many",e))(Qd||{}),Zd=(e=>(e.FOREIGN_KEY="foreign_key",e))(Zd||{}),Jd=(e=>(e.CREATED_BY="createdBy",e.CREATED_AT="createdAt",e.UPDATED_BY="updatedBy",e.UPDATED_AT="updatedAt",e.AUTO_ID="autoID",e))(Jd||{}),$d=(e=>(e.ARRAY="array",e))($d||{}),ef=(e=>(e.STATIC="static",e.DYNAMIC="dynamic",e.AI="ai",e))(ef||{}),tf=(e=>(e.USER="user",e.USERS="users",e))(tf||{});function pp(e){return e.type==="link"}function mp(e){return e.relationshipType==="many-to-many"}function _p(e){return e.relationshipType==="one-to-many"}function bp(e){return e.relationshipType==="many-to-one"}var rf=(e=>(e.SUM="sum",e.AVG="avg",e.COUNT="count",e.MIN="min",e.MAX="max",e))(rf||{}),nf=(e=>(e.CALCULATION="calculation",e))(nf||{}),af=(e=>(e.SUM="sum",e.COUNT="count",e.STATISTICS="stats",e))(af||{}),ao="_",yp="",wp=e=>`${e}${ao}`,kl=(e=>(e.USER="us",e.GROUP="gr",e.WORKSPACE="workspace",e.CONFIG="config",e.TEMPLATE="template",e.APP="app",e.DEV="dev",e.APP_DEV="app_dev",e.APP_METADATA="app_metadata",e.ROLE="role",e.MIGRATIONS="migrations",e.DEV_INFO="devinfo",e.AUTOMATION_LOG="log_au",e.ACCOUNT_METADATA="acc_metadata",e.PLUGIN="plg",e.DATASOURCE="datasource",e.DATASOURCE_PLUS="datasource_plus",e.APP_BACKUP="backup",e.TABLE="ta",e.ROW="ro",e.AUTOMATION="au",e.LINK="li",e.WEBHOOK="wh",e.INSTANCE="inst",e.LAYOUT="layout",e.SCREEN="screen",e.QUERY="query",e.DEPLOYMENTS="deployments",e.METADATA="metadata",e.MEM_VIEW="view",e.USER_FLAG="flag",e.AUTOMATION_METADATA="meta_au",e.AUDIT_LOG="al",e.APP_MIGRATION_METADATA="_design/migrations",e.SCIM_LOG="scimlog",e.ROW_ACTIONS="ra",e))(kl||{}),Ep=Object.values(kl).sort((e,r)=>r.length-e.length);function Sp(e){return Ep.find(r=>e.startsWith(`${r}${ao}`))}var Cp=["role","datasource","datasource_plus","ta","au","wh","screen","query","metadata","view","inst","layout"],sf=(e=>(e.USER_METADATA="ta_users",e))(sf||{}),Dl=(e=>(e.VIEW="view",e.ROW_ACTION="row_action",e))(Dl||{}),Ap=Object.values(Dl).sort((e,r)=>r.length-e.length);function Tp(e){return Ap.find(r=>e.startsWith(`${r}${ao}`))}var of=(e=>(e.BACKUP="backup",e.RESTORE="restore",e))(of||{}),lf=(e=>(e.STARTED="started",e.PENDING="pending",e.COMPLETE="complete",e.FAILED="failed",e))(lf||{}),uf=(e=>(e.PUBLISH="publish",e.MANUAL="manual",e.SCHEDULED="scheduled",e.RESTORING="restoring",e))(uf||{}),cf=(e=>(e.AUTOMATION="automation",e))(cf||{}),df=(e=>(e.REAL="REAL",e.TEXT="VARCHAR",e.INT="INTEGER",e.BLOB="BLOB",e.NUMERIC="NUMERIC",e))(df||{}),kp=e=>e.type==="settings",Dp=e=>e.type==="smtp",xp=e=>e.type==="google",Op=e=>e.type==="oidc",Ip=e=>e.type==="scim",Rp=e=>e.type==="ai",ff=(e=>(e.SETTINGS="settings",e.ACCOUNT="account",e.SMTP="smtp",e.GOOGLE="google",e.OIDC="oidc",e.OIDC_LOGOS="logos_oidc",e.SCIM="scim",e.AI="ai",e))(ff||{}),hf=(e=>(e.OIDC="oidc",e.GOOGLE="google",e))(hf||{});function Pp(e){return!!e.providerType}var gf=(e=>(e.ACTIVE="active",e.INACTIVE="inactive",e))(gf||{});function Mp(e){return!!e.roles}var xl=(e=>(e.DATASOURCE="datasource",e.COMPONENT="component",e.AUTOMATION="automation",e))(xl||{}),vf=(e=>(e.NPM="NPM",e.GITHUB="Github",e.URL="URL",e.FILE="File Upload",e))(vf||{}),Np=Object.values(xl),pf=(e=>(e.ROW_QUERIES="rowQueries",e.DATASOURCE_QUERIES="datasourceQueries",e.AUTOMATIONS="automations",e))(pf||{}),Lp=["rows","queries","automations"],Fp=["queries","automations"],mf=(e=>(e.APP_BACKUP="app_backup",e))(mf||{}),_f=(e=>(e.DAILY="daily",e.WEEKLY="weekly",e.MONTHLY="monthly",e))(_f||{}),Vp=(e,r)=>e==="app_backup",Up="SYSTEM",Bp="auditLog",bf=(e=>(e.BUILDER="builder",e.APP="app",e))(bf||{}),yf=(e=>(e.DELETED="deleted",e))(yf||{}),wf=(e=>(e.ENVIRONMENT_VARIABLE_UPGRADE_PANEL_OPENED="environment_variable_upgrade_panel_opened",e))(wf||{}),Ef=(e=>(e.ASCENDING="ascending",e.DESCENDING="descending",e))(Ef||{}),Sf=(e=>(e.STRING="string",e.NUMBER="number",e))(Sf||{}),Cf=(e=>(e.WORKER="worker",e.APPS="apps",e))(Cf||{}),Af=(e=>(e.SQS_MISSING="sqs_missing",e))(Af||{});function Hp(e,r){kt(r,!1);const n=()=>Be(t(d),"$values",u),i=()=>Be(t(p),"$errors",u),s=()=>Be(t(E),"$dirty",u),a=()=>Be(Se(),"$currentStep",u),o=()=>Be(t(_),"$enrichments",u),c=()=>Be(t(A),"$currentStepValid",u),[u,g]=Gt(),d=h(),p=h(),_=h(),S=h(),E=h(),A=h(),I=h(),k=we.createEventDispatcher();let C=m(r,"dataSource",24,()=>{}),D=m(r,"disabled",8,!1),w=m(r,"readonly",8,!1),B=m(r,"initialValues",24,()=>{});const $=void 0;let R=m(r,"schema",24,()=>{}),H=m(r,"definition",24,()=>{}),Z=m(r,"disableSchemaValidation",8,!1),ue=m(r,"editAutoColumns",8,!1),de=m(r,"provideContext",8,!0),Se=m(r,"currentStep",8),ce=m(r,"formValue",28,()=>({}));const{Provider:ke,ActionTypes:De,createValidatorFromConstraints:ye}=we.getContext("sdk");let le=h([]);const Q=ai({values:{},errors:{},valid:!0,dirty:!1,currentStep:hr(Se())});let Y=m(r,"form",12);const J=(T,N)=>eo(T,ne=>ne.reduce((ve,Oe)=>({...ve,[Oe.name]:N(Oe)}),{})),K=(T,N)=>eo(T,ne=>ne.some(ve=>{const Oe=me(N,ve.name)??ve.fieldState.defaultValue;return ve.fieldState.value!==Oe})),ie=T=>eo(T,N=>{const ne={};return N.forEach(ve=>{if(ve.type==="attachment"){const Oe=ve.fieldState.value;let Me=null;Array.isArray(Oe)&&Oe[0]!=null&&(Me=Oe[0].url),ne[`${ve.name}_first`]=Me}}),ne}),z=(T,N,ne)=>{let ve=He(T||{});return Object.entries(N||{}).map(([Me,Re])=>{var Ie;const se=ge(Me);return{key:Me,value:Re,lastUpdate:((Ie=hr(se).fieldState)==null?void 0:Ie.lastUpdate)||0}}).sort((Me,Re)=>Me.lastUpdate-Re.lastUpdate).forEach(({key:Me,value:Re})=>{V(ve,Me,Re)}),Object.entries(ne||{}).forEach(([Me,Re])=>{V(ve,Me,Re)}),ve},ge=T=>t(le).find(N=>hr(N).name===T),O=(T,N,ne)=>{var ve;if(Array.isArray(T)&&ne==="array"&&N){const Oe=((ve=N==null?void 0:N.constraints)==null?void 0:ve.inclusion)||[];return T.map(Me=>String(Me)).filter(Me=>Oe.includes(Me))}return T},G={registerField:(T,N,ne=null,ve=!1,Oe=!1,Me,Re=1)=>{var Je,rt,st,ut,it,_e,qe,Ye;if(!T)return;const se=Z()?null:(rt=(Je=R())==null?void 0:Je[T])==null?void 0:rt.constraints,Ie=ye(se,Me,T,H());ne=O(ne,(st=R())==null?void 0:st[T],N);let Le=me(B(),T)??ne,je=null,Fe=`id-${Ne()}`;const Ae=ge(T);if(Ae){const{fieldState:ot}=hr(Ae);Fe=ot.fieldId,ot.value!=null&&ot.value!==""&&(Le=ot.value),ot.error&&(je=Ie==null?void 0:Ie(Le))}const Ge=!!((it=(ut=R())==null?void 0:ut[T])!=null&&it.autocolumn),$e=ai({name:T,type:N,step:Re||1,fieldState:{fieldId:Fe,value:Le,error:je,disabled:D()||ve||Ge&&!ue(),readonly:w()||Oe||((qe=(_e=R())==null?void 0:_e[T])==null?void 0:qe.readonly),fieldDisabled:ve,fieldReadOnly:Oe,defaultValue:ne,validator:Ie,lastUpdate:Date.now()},fieldApi:re(T),fieldSchema:((Ye=R())==null?void 0:Ye[T])??{}});if(Ae){const ot=t(le).filter(Te=>hr(Te).name!==T);l(le,[...ot,$e])}else l(le,[...t(le),$e]);return $e},validate:()=>{const T=t(le).filter(ve=>hr(ve).step===hr(Se()));let N=!0,ne=!1;return T.forEach(ve=>{const Oe=hr(ve).fieldApi.validate();N=N&&Oe,!N&&!ne&&(ee({field:hr(ve)}),ne=!0)}),N},reset:()=>{t(le).forEach(T=>{hr(T).fieldApi.reset()}),k("reset")},changeStep:({type:T,number:N})=>{T==="next"?Se().update(ne=>ne+1):T==="prev"?Se().update(ne=>Math.max(1,ne-1)):T==="first"?Se().set(1):T==="specific"&&N&&!isNaN(N)&&Se().set(parseInt(N))},setStep:T=>{T&&Se().set(T)},setFieldValue:(T,N)=>{const ne=ge(T);if(!ne)return;const{fieldApi:ve}=hr(ne);ve.setValue(N)},resetField:T=>{const N=ge(T);if(!N)return;const{fieldApi:ne}=hr(N);ne.reset()}},re=T=>{const N=(Re,se=!1)=>{const Ie=ge(T),{fieldState:Le}=hr(Ie),{validator:je}=Le;if(!se&&Le.value===Re)return!1;const Fe=je==null?void 0:je(Re);return Ie.update(Ae=>(Ae.fieldState.value=Re,Ae.fieldState.error=Fe,Ae.fieldState.lastUpdate=Date.now(),Ae)),k("change",{field:T,value:Re}),!0};return{setValue:N,reset:()=>{const Re=ge(T),{fieldState:se}=hr(Re),Ie=se.defaultValue;Re.update(Le=>(Le.fieldState.value=Ie,Le.fieldState.error=null,Le.fieldState.lastUpdate=Date.now(),Le))},setDisabled:Re=>{ge(T).update(Ie=>{var je,Fe;Ie.fieldState.fieldDisabled=Re;const Le=!!((Fe=(je=R())==null?void 0:je[Ie.name])!=null&&Fe.autocolumn);return Ie.fieldState.disabled=D()||Re||Le&&!ue(),Ie})},setReadOnly:Re=>{ge(T).update(Ie=>{var Le,je;return Ie.fieldState.fieldReadOnly=Re,Ie.fieldState.readonly=w()||Re||((je=(Le=R())==null?void 0:Le[Ie.name])==null?void 0:je.readonly),Ie})},deregister:()=>{ge(T).update(se=>(se.fieldState.validator=null,se.fieldState.error=null,se))},validate:()=>{const Re=ge(T);return N(hr(Re).fieldState.value,!0),!hr(Re).fieldState.error}}};we.setContext("form",{formState:Q,formApi:G,dataSource:C()}),we.setContext("form-step",ai(1));const ae=({type:T,field:N,value:ne})=>{if(T==="set")if(N==="_value"){let ve=ne;if(typeof ne=="string")try{ve=JSON.parse(ne)}catch{return}typeof ve=="object"&&ve!==null&&(Object.keys(ve).forEach(Oe=>{const Me=t(le).find(Re=>hr(Re).name.toLowerCase()===Oe.toLowerCase());if(Me){const Re=hr(Me).name;G.setFieldValue(Re,ve[Oe])}}),G.validate())}else G.setFieldValue(N,ne);else G.resetField(N)},ee=T=>{let N;typeof T.field=="string"?N=hr(ge(T.field)):N=T.field;const ne=N.fieldState.fieldId,ve=document.getElementById(ne);ve&&ve.focus({preventScroll:!0});const Oe=document.querySelector(`label[for="${ne}"]`);Oe&&(Oe.style.scrollMargin="100px",Oe.scrollIntoView({behavior:"smooth",block:"nearest"}))},pe=[{type:De.ValidateForm,callback:G.validate},{type:De.ClearForm,callback:G.reset},{type:De.ChangeFormStep,callback:G.changeStep},{type:De.UpdateFieldValue,callback:ae},{type:De.ScrollTo,callback:ee}];function Ne(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,T=>{const N=Math.random()*16|0;return(T==="x"?N:N&3|8).toString(16)})}function He(T){if(T==null||typeof T!="object")return T;if(Array.isArray(T))return T.map(He);const N={};for(const ne in T)Object.prototype.hasOwnProperty.call(T,ne)&&(N[ne]=He(T[ne]));return N}function me(T,N){if(!T||!N)return;const ne=Array.isArray(N)?N:N.split(".");let ve=T;for(const Oe of ne){if(ve==null)return;ve=ve[Oe]}return ve}function V(T,N,ne){if(!T||!N)return;const ve=Array.isArray(N)?N:N.split(".");let Oe=T;for(let Me=0;Me<ve.length-1;Me++){const Re=ve[Me];(!Oe[Re]||typeof Oe[Re]!="object")&&(Oe[Re]={}),Oe=Oe[Re]}Oe[ve[ve.length-1]]=ne}const fe=(T,N)=>{t(le).length>0&&t(le).forEach(ne=>{ne.update(ve=>{var Me,Re,se,Ie;const Oe=!!((Re=(Me=R())==null?void 0:Me[ve.name])!=null&&Re.autocolumn);return ve.fieldState.disabled=T||ve.fieldState.fieldDisabled||Oe&&!ue(),ve.fieldState.readonly=N||ve.fieldState.fieldReadOnly||((Ie=(se=R())==null?void 0:se[ve.name])==null?void 0:Ie.readonly),ve})})};x(()=>t(le),()=>{on(l(d,J(t(le),T=>T.fieldState.value)),"$values",u)}),x(()=>n(),()=>{ce(n())}),x(()=>t(le),()=>{on(l(p,J(t(le),T=>T.fieldState.error)),"$errors",u)}),x(()=>t(le),()=>{on(l(_,ie(t(le))),"$enrichments",u)}),x(()=>i(),()=>{l(S,!Object.values(i()).some(T=>T!=null))}),x(()=>(t(le),v(B())),()=>{on(l(E,K(t(le),B())),"$dirty",u)}),x(()=>(v(D()),v(w())),()=>{fe(D(),w())}),x(()=>(v(Se()),t(le)),()=>{on(l(A,eo([Se(),...t(le)],([T,...N])=>!N.filter(ne=>ne.step===T).some(ne=>ne.fieldState.error!=null))),"$currentStepValid",u)}),x(()=>v(C()),()=>{Y({formState:Q,formApi:G,dataSource:C()})}),x(()=>(n(),i(),t(S),s(),a()),()=>{Q.set({values:n(),errors:i(),valid:t(S),dirty:s(),currentStep:a()})}),x(()=>(v(B()),n(),o()),()=>{ce(z(B(),n(),o()))}),x(()=>(v(ce()),t(S),s(),a(),c(),v(w()),v(D())),()=>{l(I,{...ce(),__value:ce(),__valid:t(S),__dirty:s(),__currentStep:a(),__currentStepValid:c(),__editing:!w()&&!D()})}),Pt();var X={size:$,formState:Q};Ot();var q=Ze(),he=Ue(q);{var P=T=>{ke(T,{get actions(){return pe},get data(){return t(I)},children:(N,ne)=>{var ve=Ze(),Oe=Ue(ve);mr(Oe,r,"default",{},null),y(N,ve)},$$slots:{default:!0}})},te=T=>{var N=Ze(),ne=Ue(N);mr(ne,r,"default",{},null),y(T,N)};oe(he,T=>{de()?T(P):T(te,!1)})}y(e,q),vr(r,"size",$),vr(r,"formState",Q);var M=Dt(X);return g(),M}function zp(e,r){kt(r,!1);const n=()=>Be(H,"$component",s),i=()=>Be(R,"$context",s),[s,a]=Gt(),o=h(),c=h(),u=h(),g=ie=>{let z=0;for(let ge=0;ge<ie.length;ge++){const O=ie.charCodeAt(ge);z=(z<<5)-z+O,z=z&z}return z.toString(16)};let d=m(r,"dataSource",8),p=m(r,"size",8),_=m(r,"disabled",8,!1),S=m(r,"readonly",8,!1),E=m(r,"actionType",8,"Create"),A=m(r,"initialFormStep",8,1),I=m(r,"disableSchemaValidation",8,!1),k=m(r,"editAutoColumns",8,!1),C=m(r,"provideContext",8,!0),D=m(r,"form",12),w=m(r,"formState",12),B=m(r,"formValue",28,()=>({})),$=m(r,"row",8);const R=we.getContext("context"),H=we.getContext("component"),{fetchDatasourceSchema:Z,fetchDatasourceDefinition:ue}=we.getContext("sdk"),de=()=>{const ie=parseInt(A().toString());return isNaN(ie)?1:ie};let Se=h(),ce=h(),ke=h(!1),De=we.getContext("current-step")||ai(de());const ye=(ie,z,ge,O)=>{var re,ae,ee;if(ie!=="Update"&&ie!=="View")return{};const G=z==null?void 0:z.type;if(G!=="table"&&G!=="viewV2")return{};if($()&&G==="table"&&((re=$())==null?void 0:re.tableId)===z.tableId)return $();for(let pe of ge.toReversed().slice(1))if(z.type==="viewV2"&&((ae=O[pe])==null?void 0:ae._viewId)===z.id||z.type==="table"&&((ee=O[pe])==null?void 0:ee.tableId)===z.tableId)return O[pe];return{}},le=async ie=>{try{l(Se,await ue(ie))}catch{l(Se,void 0)}const z=await Z(ie);l(ce,z||{}),t(ke)||l(ke,!0)},Q=ie=>{if(!ie)return null;const z=Object.keys(ie);return z.sort(),z.map(ge=>`${ge}:${ie[ge].type}`).join("-")};x(()=>v(d()),()=>{le(d())}),x(()=>t(ce),()=>{l(o,Q(t(ce)))}),x(()=>(v(E()),v(d()),n(),i(),v($())),()=>{l(c,ye(E(),d(),n().path,i(),$()))}),x(()=>(t(o),t(c),v(E())),()=>{l(u,g(t(o)+JSON.stringify(t(c))+E()))}),Pt(),Ot();var Y=Ze(),J=Ue(Y);{var K=ie=>{var z=Ze(),ge=Ue(z);$i(ge,()=>t(u),O=>{{let G=Rt(()=>S()||E()=="View");Hp(O,{get dataSource(){return d()},get size(){return p()},get disabled(){return _()},get readonly(){return t(G)},get schema(){return t(ce)},get definition(){return t(Se)},get initialValues(){return t(c)},get disableSchemaValidation(){return I()},get editAutoColumns(){return k()},get currentStep(){return De},get provideContext(){return C()},get form(){return D()},set form(re){D(re)},get formState(){return w()},set formState(re){w(re)},get formValue(){return B()},set formValue(re){B(re)},$$events:{change(re){Yn.call(this,r,re)},reset(re){Yn.call(this,r,re)}},children:(re,ae)=>{var ee=Ze(),pe=Ue(ee);mr(pe,r,"default",{},null),y(re,ee)},$$slots:{default:!0},$$legacy:!0})}}),y(ie,z)};oe(J,ie=>{t(ke)&&ie(K)})}y(e,Y),Dt(),a()}function Tf(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function so(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?Tf(Object(n),!0).forEach(function(i){Ra(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tf(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Ia(e){"@babel/helpers - typeof";return Ia=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ia(e)}function Ra(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function jp(e,r){if(e==null)return{};var n={},i=Object.keys(e),s,a;for(a=0;a<i.length;a++)s=i[a],!(r.indexOf(s)>=0)&&(n[s]=e[s]);return n}function Gp(e,r){if(e==null)return{};var n=jp(e,r),i,s;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(s=0;s<a.length;s++)i=a[s],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function qp(e,r){return Yp(e)||Xp(e,r)||Ol(e,r)||Zp()}function Pn(e){return Wp(e)||Kp(e)||Ol(e)||Qp()}function Wp(e){if(Array.isArray(e))return Il(e)}function Yp(e){if(Array.isArray(e))return e}function Kp(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Xp(e,r){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var i=[],s=!0,a=!1,o,c;try{for(n=n.call(e);!(s=(o=n.next()).done)&&(i.push(o.value),!(r&&i.length===r));s=!0);}catch(u){a=!0,c=u}finally{try{!s&&n.return!=null&&n.return()}finally{if(a)throw c}}return i}}function Ol(e,r){if(e){if(typeof e=="string")return Il(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Il(e,r)}}function Il(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,i=new Array(r);n<r;n++)i[n]=e[n];return i}function Qp(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
5
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Zp(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
6
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fs(e,r){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Ol(e))||r){n&&(e=n);var i=0,s=function(){};return{s,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(u){throw u},f:s}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
7
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,c;return{s:function(){n=n.call(e)},n:function(){var u=n.next();return a=u.done,u},e:function(u){o=!0,c=u},f:function(){try{!a&&n.return!=null&&n.return()}finally{if(o)throw c}}}}var Jp="finalize",$p="consider";function Pa(e,r,n){e.dispatchEvent(new CustomEvent(Jp,{detail:{items:r,info:n}}))}function Fi(e,r,n){e.dispatchEvent(new CustomEvent($p,{detail:{items:r,info:n}}))}var oo="draggedEntered",hs="draggedLeft",lo="draggedOverIndex",Rl="draggedLeftDocument",uo={LEFT_FOR_ANOTHER:"leftForAnother",OUTSIDE_OF_ANY:"outsideOfAny"};function em(e,r,n){e.dispatchEvent(new CustomEvent(oo,{detail:{indexObj:r,draggedEl:n}}))}function tm(e,r,n){e.dispatchEvent(new CustomEvent(hs,{detail:{draggedEl:r,type:uo.LEFT_FOR_ANOTHER,theOtherDz:n}}))}function rm(e,r){e.dispatchEvent(new CustomEvent(hs,{detail:{draggedEl:r,type:uo.OUTSIDE_OF_ANY}}))}function nm(e,r,n){e.dispatchEvent(new CustomEvent(lo,{detail:{indexObj:r,draggedEl:n}}))}function im(e){window.dispatchEvent(new CustomEvent(Rl,{detail:{draggedEl:e}}))}var ln={DRAG_STARTED:"dragStarted",DRAGGED_ENTERED:oo,DRAGGED_ENTERED_ANOTHER:"dragEnteredAnother",DRAGGED_OVER_INDEX:lo,DRAGGED_LEFT:hs,DRAGGED_LEFT_ALL:"draggedLeftAll",DROPPED_INTO_ZONE:"droppedIntoZone",DROPPED_INTO_ANOTHER:"droppedIntoAnother",DROPPED_OUTSIDE_OF_ANY:"droppedOutsideOfAny",DRAG_STOPPED:"dragStopped"},gn={POINTER:"pointer",KEYBOARD:"keyboard"},co="isDndShadowItem",fo="data-is-dnd-shadow-item-internal",am="data-is-dnd-shadow-item-hint",kf="id:dnd-shadow-placeholder-0000",sm="dnd-action-dragged-el",xr="id",Pl=0;function Df(){Pl++}function xf(){if(Pl===0)throw new Error("Bug! trying to decrement when there are no dropzones");Pl--}var Ml=typeof window>"u";function Nl(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n,i=r?um(e):e.getBoundingClientRect(),s=getComputedStyle(e),a=s.transform;if(a){var o,c,u,g;if(a.startsWith("matrix3d("))n=a.slice(9,-1).split(/, /),o=+n[0],c=+n[5],u=+n[12],g=+n[13];else if(a.startsWith("matrix("))n=a.slice(7,-1).split(/, /),o=+n[0],c=+n[3],u=+n[4],g=+n[5];else return i;var d=s.transformOrigin,p=i.x-u-(1-o)*parseFloat(d),_=i.y-g-(1-c)*parseFloat(d.slice(d.indexOf(" ")+1)),S=o?i.width/o:e.offsetWidth,E=c?i.height/c:e.offsetHeight;return{x:p,y:_,width:S,height:E,top:_,right:p+S,bottom:_+E,left:p}}else return i}function Ll(e){var r=Nl(e);return{top:r.top+window.scrollY,bottom:r.bottom+window.scrollY,left:r.left+window.scrollX,right:r.right+window.scrollX}}function Of(e){var r=e.getBoundingClientRect();return{top:r.top+window.scrollY,bottom:r.bottom+window.scrollY,left:r.left+window.scrollX,right:r.right+window.scrollX}}function If(e){return{x:(e.left+e.right)/2,y:(e.top+e.bottom)/2}}function om(e,r){return Math.sqrt(Math.pow(e.x-r.x,2)+Math.pow(e.y-r.y,2))}function gs(e,r){return e.y<=r.bottom&&e.y>=r.top&&e.x>=r.left&&e.x<=r.right}function Rf(e){return If(Of(e))}function Pf(e,r){var n=Rf(r);return om(e,n)}function lm(e){var r=Of(e);return r.right<0||r.left>document.documentElement.scrollWidth||r.bottom<0||r.top>document.documentElement.scrollHeight}function um(e){for(var r=e.getBoundingClientRect(),n={top:r.top,bottom:r.bottom,left:r.left,right:r.right},i=!1,s=!1,a=e.parentElement;a&&a!==document.body;){var o=window.getComputedStyle(a),c=o.overflowY,u=o.overflowX,g=c==="scroll"||c==="auto",d=u==="scroll"||u==="auto";if(g||d){var p=a.getBoundingClientRect();if(g){var _=Math.max(n.top,p.top),S=Math.min(n.bottom,p.bottom);(_!==n.top||S!==n.bottom)&&(i=!0),n.top=_,n.bottom=S}if(d){var E=Math.max(n.left,p.left),A=Math.min(n.right,p.right);(E!==n.left||A!==n.right)&&(s=!0),n.left=E,n.right=A}}a=a.parentElement}return i||s?{top:n.top,bottom:n.bottom,left:n.left,right:n.right,width:Math.max(0,n.right-n.left),height:Math.max(0,n.bottom-n.top)}:{top:r.top,bottom:r.bottom,left:r.left,right:r.right,width:Math.max(0,r.right-r.left),height:Math.max(0,r.bottom-r.top)}}var Ma;function Fl(){Ma=new Map}Fl();function cm(e){var r=Array.from(e.children).findIndex(function(n){return n.getAttribute(fo)});if(r>=0)return Ma.has(e)||Ma.set(e,new Map),Ma.get(e).set(r,Ll(e.children[r])),r}function dm(e,r){var n=Ll(r);if(!gs(e,n))return null;var i=r.children;if(i.length===0)return{index:0,isProximityBased:!0};for(var s=cm(r),a=0;a<i.length;a++){var o=Ll(i[a]);if(gs(e,o)){var c=Ma.has(r)&&Ma.get(r).get(a);return c&&!gs(e,c)?{index:s,isProximityBased:!1}:{index:a,isProximityBased:!1}}}for(var u=Number.MAX_VALUE,g=void 0,d=0;d<i.length;d++){var p=Pf(e,i[d]);p<u&&(u=p,g=d)}if(i.length>0){var _=i.length,S=i[_-1],E=S.cloneNode(!1);E.style.visibility="hidden",E.style.pointerEvents="none",r.appendChild(E);var A=Pf(e,E);A<u&&(g=_),r.removeChild(E)}return{index:g,isProximityBased:!0}}function vs(e){return JSON.stringify(e,null,2)}function ho(e){if(!e)throw new Error("cannot get depth of a falsy node");return Mf(e,0)}function Mf(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return e.parentElement?Mf(e.parentElement,r+1):r-1}function fm(e,r){if(Object.keys(e).length!==Object.keys(r).length)return!1;for(var n in e)if(!{}.hasOwnProperty.call(r,n)||r[n]!==e[n])return!1;return!0}function hm(e,r){if(e.length!==r.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==r[n])return!1;return!0}var gm=200,Nf=10,Vl;function vm(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:gm,i=arguments.length>3?arguments[3]:void 0,s=arguments.length>4?arguments[4]:void 0,a,o,c=!1,u,g=Array.from(r).sort(function(p,_){return ho(_)-ho(p)});function d(){var p=s(),_=i.multiScrollIfNeeded();if(!_&&u&&Math.abs(u.x-p.x)<Nf&&Math.abs(u.y-p.y)<Nf){Vl=window.setTimeout(d,n);return}if(lm(e)){im(e);return}u=p;var S=!1,E=fs(g),A;try{for(E.s();!(A=E.n()).done;){var I=A.value;_&&Fl();var k=dm(p,I);if(k!==null){var C=k.index;S=!0,I!==a?(a&&tm(a,e,I),em(I,k,e),a=I):C!==o&&(nm(I,k,e),o=C);break}}}catch(D){E.e(D)}finally{E.f()}!S&&c&&a?(rm(a,e),a=void 0,o=void 0,c=!1):c=!0,Vl=window.setTimeout(d,n)}d()}function pm(){clearTimeout(Vl),Fl()}var ps=30;function mm(){var e;function r(){e={directionObj:void 0,stepPx:0}}r();function n(a){var o=e,c=o.directionObj,u=o.stepPx;c&&(a.scrollBy(c.x*u,c.y*u),window.requestAnimationFrame(function(){return n(a)}))}function i(a){return ps-a}function s(a,o){if(!o)return!1;var c=_m(a,o),u=!!e.directionObj;if(c===null)return u&&r(),!1;var g=!1,d=!1;return o.scrollHeight>o.clientHeight&&(c.bottom<ps?(g=!0,e.directionObj={x:0,y:1},e.stepPx=i(c.bottom)):c.top<ps&&(g=!0,e.directionObj={x:0,y:-1},e.stepPx=i(c.top)),!u&&g)||o.scrollWidth>o.clientWidth&&(c.right<ps?(d=!0,e.directionObj={x:1,y:0},e.stepPx=i(c.right)):c.left<ps&&(d=!0,e.directionObj={x:-1,y:0},e.stepPx=i(c.left)),!u&&d)?(n(o),!0):(r(),!1)}return{scrollIfNeeded:s,resetScrolling:r}}function _m(e,r){var n=r===document.scrollingElement?{top:0,bottom:window.innerHeight,left:0,right:window.innerWidth}:r.getBoundingClientRect();return gs(e,n)?{top:e.y-n.top,bottom:n.bottom-e.y,left:e.x-n.left,right:n.right-e.x}:null}function bm(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=arguments.length>1?arguments[1]:void 0,n=wm(e),i=Array.from(n).sort(function(u,g){return ho(g)-ho(u)}),s=mm(),a=s.scrollIfNeeded,o=s.resetScrolling;function c(){var u=r();if(!u||!i)return!1;for(var g=i.filter(function(_){return gs(u,_.getBoundingClientRect())||_===document.scrollingElement}),d=0;d<g.length;d++){var p=a(u,g[d]);if(p)return!0}return!1}return{multiScrollIfNeeded:n.size>0?c:function(){return!1},destroy:function(){return o()}}}function ym(e){if(!e)return[];for(var r=[],n=e;n;){var i=window.getComputedStyle(n),s=i.overflow;s.split(" ").some(function(a){return a.includes("auto")||a.includes("scroll")})&&r.push(n),n=n.parentElement}return r}function wm(e){var r=new Set,n=fs(e),i;try{for(n.s();!(i=n.n()).done;){var s=i.value;ym(s).forEach(function(a){return r.add(a)})}}catch(a){n.e(a)}finally{n.f()}return(document.scrollingElement.scrollHeight>document.scrollingElement.clientHeight||document.scrollingElement.scrollWidth>document.scrollingElement.clientHeight)&&r.add(document.scrollingElement),r}function Em(e){var r=e.cloneNode(!0),n=[],i=e.tagName==="SELECT",s=i?[e]:Pn(e.querySelectorAll("select")),a=fs(s),o;try{for(a.s();!(o=a.n()).done;){var c=o.value;n.push(c.value)}}catch(D){a.e(D)}finally{a.f()}if(s.length>0)for(var u=i?[r]:Pn(r.querySelectorAll("select")),g=0;g<u.length;g++){var d=u[g],p=n[g],_=d.querySelector('option[value="'.concat(p,'"'));_&&_.setAttribute("selected",!0)}var S=e.tagName==="CANVAS",E=S?[e]:Pn(e.querySelectorAll("canvas"));if(E.length>0)for(var A=S?[r]:Pn(r.querySelectorAll("canvas")),I=0;I<A.length;I++){var k=E[I],C=A[I];C.width=k.width,C.height=k.height,k.width>0&&k.height>0&&C.getContext("2d").drawImage(k,0,0)}return r}var ms=Object.freeze({USE_COMPUTED_STYLE_INSTEAD_OF_BOUNDING_RECT:"USE_COMPUTED_STYLE_INSTEAD_OF_BOUNDING_RECT"}),Sm=Ra({},ms.USE_COMPUTED_STYLE_INSTEAD_OF_BOUNDING_RECT,!1);function Lf(e){if(!ms[e])throw new Error("Can't get non existing feature flag ".concat(e,"! Supported flags: ").concat(Object.keys(ms)));return Sm[e]}var Cm=.2;function ra(e){return"".concat(e," ").concat(Cm,"s ease")}function Am(e,r){var n=e.getBoundingClientRect(),i=Em(e);Ff(e,i),i.id=sm,i.style.position="fixed";var s=n.top,a=n.left;if(i.style.top="".concat(s,"px"),i.style.left="".concat(a,"px"),r){var o=If(n);s-=o.y-r.y,a-=o.x-r.x,window.setTimeout(function(){i.style.top="".concat(s,"px"),i.style.left="".concat(a,"px")},0)}return i.style.margin="0",i.style.boxSizing="border-box",i.style.height="".concat(n.height,"px"),i.style.width="".concat(n.width,"px"),i.style.transition="".concat(ra("top"),", ").concat(ra("left"),", ").concat(ra("background-color"),", ").concat(ra("opacity"),", ").concat(ra("color")," "),window.setTimeout(function(){return i.style.transition+=", ".concat(ra("width"),", ").concat(ra("height"))},0),i.style.zIndex="9999",i.style.cursor="grabbing",i}function Tm(e){e.style.cursor="grab"}function km(e,r,n,i){Ff(r,e);var s=r.getBoundingClientRect(),a=e.getBoundingClientRect(),o=s.width-a.width,c=s.height-a.height;if(o||c){var u={left:(n-a.left)/a.width,top:(i-a.top)/a.height};Lf(ms.USE_COMPUTED_STYLE_INSTEAD_OF_BOUNDING_RECT)||(e.style.height="".concat(s.height,"px"),e.style.width="".concat(s.width,"px")),e.style.left="".concat(parseFloat(e.style.left)-u.left*o,"px"),e.style.top="".concat(parseFloat(e.style.top)-u.top*c,"px")}}function Ff(e,r){var n=window.getComputedStyle(e);Array.from(n).filter(function(i){return i.startsWith("background")||i.startsWith("padding")||i.startsWith("font")||i.startsWith("text")||i.startsWith("align")||i.startsWith("justify")||i.startsWith("display")||i.startsWith("flex")||i.startsWith("border")||i==="opacity"||i==="color"||i==="list-style-type"||Lf(ms.USE_COMPUTED_STYLE_INSTEAD_OF_BOUNDING_RECT)&&(i==="width"||i==="height")}).forEach(function(i){return r.style.setProperty(i,n.getPropertyValue(i),n.getPropertyPriority(i))})}function Dm(e,r){e.draggable=!1,e.ondragstart=function(){return!1},r?(e.style.userSelect="",e.style.WebkitUserSelect="",e.style.cursor=""):(e.style.userSelect="none",e.style.WebkitUserSelect="none",e.style.cursor="grab")}function Vf(e){e.style.display="none",e.style.position="fixed",e.style.zIndex="-5"}function xm(e){e.style.visibility="hidden",e.setAttribute(fo,"true")}function Om(e){e.style.visibility="",e.removeAttribute(fo)}function go(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){return[]};e.forEach(function(i){var s=r(i);Object.keys(s).forEach(function(a){i.style[a]=s[a]}),n(i).forEach(function(a){return i.classList.add(a)})})}function vo(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){return[]};e.forEach(function(i){var s=r(i);Object.keys(s).forEach(function(a){i.style[a]=""}),n(i).forEach(function(a){return i.classList.contains(a)&&i.classList.remove(a)})})}function Im(e){var r=e.style.minHeight;e.style.minHeight=window.getComputedStyle(e).getPropertyValue("height");var n=e.style.minWidth;return e.style.minWidth=window.getComputedStyle(e).getPropertyValue("width"),function(){e.style.minHeight=r,e.style.minWidth=n}}var Rm="--any--",Pm=100,Mm=20,po=3,Nm=80,Uf={outline:"rgba(255, 255, 102, 0.7) solid 2px"},Bf="data-is-dnd-original-dragged-item",vn,Or,pn,mo,ar,_o,Vi,jr,si,Lr,Ui=!1,Ul=!1,Bl,_s=!1,bo=[],bs,oi,ys=!1,Hl=!1,Kn=new Map,_r=new Map,zl=new WeakMap;function Lm(e,r){Kn.has(r)||Kn.set(r,new Set),Kn.get(r).has(e)||(Kn.get(r).add(e),Df())}function Hf(e,r){Kn.get(r).delete(e),xf(),Kn.get(r).size===0&&Kn.delete(r)}function Fm(){var e=Kn.get(mo),r=fs(e),n;try{for(r.s();!(n=r.n()).done;){var i=n.value;i.addEventListener(oo,zf),i.addEventListener(hs,jf),i.addEventListener(lo,Gf)}}catch(c){r.e(c)}finally{r.f()}window.addEventListener(Rl,Na);var s=Math.max.apply(Math,Pn(Array.from(e.keys()).map(function(c){return _r.get(c).dropAnimationDurationMs}))),a=s===0?Mm:Math.max(s,Pm);bs=bm(e,function(){return Lr});var o=Hl?function(){return{x:Lr.x+window.scrollX,y:Lr.y+window.scrollY}}:function(){return Rf(Or)};vm(Or,e,a*1.07,bs,o)}function Vm(){var e=Kn.get(mo),r=fs(e),n;try{for(r.s();!(n=r.n()).done;){var i=n.value;i.removeEventListener(oo,zf),i.removeEventListener(hs,jf),i.removeEventListener(lo,Gf)}}catch(s){r.e(s)}finally{r.f()}window.removeEventListener(Rl,Na),bs&&(bs.destroy(),bs=void 0),pm()}function yo(e){return e.findIndex(function(r){return!!r[co]})}function Um(e){var r;return so(so({},e),{},(r={},Ra(r,co,!0),Ra(r,xr,kf),r))}function zf(e){var r=_r.get(e.currentTarget),n=r.items,i=r.dropFromOthersDisabled;if(!(i&&e.currentTarget!==ar)){if(_s=!1,n=n.filter(function(c){return c[xr]!==Vi[xr]&&c[xr]!==kf}),ar!==e.currentTarget){var s=_r.get(ar).items,a=s.filter(function(c){return!c[co]});Fi(ar,a,{trigger:ln.DRAGGED_ENTERED_ANOTHER,id:pn[xr],source:gn.POINTER})}var o=e.detail.indexObj.index;jr=e.currentTarget,n.splice(o,0,Vi),Fi(e.currentTarget,n,{trigger:ln.DRAGGED_ENTERED,id:pn[xr],source:gn.POINTER})}}function jf(e){if(Ui){var r=_r.get(e.currentTarget),n=r.items,i=r.dropFromOthersDisabled;if(!(i&&e.currentTarget!==ar&&e.currentTarget!==jr)){var s=Pn(n),a=yo(s);a!==-1&&s.splice(a,1);var o=jr;jr=void 0;var c=e.detail,u=c.type,g=c.theOtherDz;if(u===uo.OUTSIDE_OF_ANY||u===uo.LEFT_FOR_ANOTHER&&g!==ar&&_r.get(g).dropFromOthersDisabled){_s=!0,jr=ar;var d=o===ar?s:Pn(_r.get(ar).items);d.splice(_o,0,Vi),Fi(ar,d,{trigger:ln.DRAGGED_LEFT_ALL,id:pn[xr],source:gn.POINTER})}Fi(e.currentTarget,s,{trigger:ln.DRAGGED_LEFT,id:pn[xr],source:gn.POINTER})}}}function Gf(e){var r=_r.get(e.currentTarget),n=r.items,i=r.dropFromOthersDisabled;if(!(i&&e.currentTarget!==ar)){var s=Pn(n);_s=!1;var a=e.detail.indexObj.index,o=yo(s);o!==-1&&s.splice(o,1),s.splice(a,0,Vi),Fi(e.currentTarget,s,{trigger:ln.DRAGGED_OVER_INDEX,id:pn[xr],source:gn.POINTER})}}function wo(e){e.preventDefault();var r=e.touches?e.touches[0]:e;Lr={x:r.clientX,y:r.clientY},Or.style.transform="translate3d(".concat(Lr.x-si.x,"px, ").concat(Lr.y-si.y,"px, 0)")}function Na(){Ul=!0,window.removeEventListener("mousemove",wo),window.removeEventListener("touchmove",wo),window.removeEventListener("mouseup",Na),window.removeEventListener("touchend",Na),Vm(),Tm(Or),jr||(jr=ar);var e=_r.get(jr),r=e.items,n=e.type;vo(Kn.get(n),function(a){return _r.get(a).dropTargetStyle},function(a){return _r.get(a).dropTargetClasses});var i=yo(r);i===-1&&jr===ar&&(i=_o),r=r.map(function(a){return a[co]?pn:a});function s(){Bl(),Pa(jr,r,{trigger:_s?ln.DROPPED_OUTSIDE_OF_ANY:ln.DROPPED_INTO_ZONE,id:pn[xr],source:gn.POINTER}),jr!==ar&&Pa(ar,_r.get(ar).items,{trigger:ln.DROPPED_INTO_ANOTHER,id:pn[xr],source:gn.POINTER});var a=Array.from(jr.children).find(function(o){return o.getAttribute(fo)});a&&Om(a),zm()}_r.get(jr).dropAnimationDisabled?s():Bm(i,s)}function Bm(e,r){var n=e>-1?Nl(jr.children[e],!1):Nl(jr,!1),i={x:n.left-parseFloat(Or.style.left),y:n.top-parseFloat(Or.style.top)},s=_r.get(jr),a=s.dropAnimationDurationMs,o="transform ".concat(a,"ms ease");Or.style.transition=Or.style.transition?Or.style.transition+","+o:o,Or.style.transform="translate3d(".concat(i.x,"px, ").concat(i.y,"px, 0)"),window.setTimeout(r,a)}function Hm(e,r){bo.push({dz:e,destroy:r}),window.requestAnimationFrame(function(){Vf(e),document.body.appendChild(e)})}function zm(){Or&&Or.remove&&Or.remove(),vn&&vn.remove&&vn.remove(),Or=void 0,vn=void 0,pn=void 0,mo=void 0,ar=void 0,_o=void 0,Vi=void 0,jr=void 0,si=void 0,Lr=void 0,Ui=!1,Ul=!1,Bl=void 0,_s=!1,oi&&clearTimeout(oi),oi=void 0,ys=!1,Hl=!1,bo.length&&(bo.forEach(function(e){var r=e.dz,n=e.destroy;n(),r.remove()}),bo=[])}function jm(e,r){var n=!1,i={items:void 0,type:void 0,flipDurationMs:0,dragDisabled:!1,morphDisabled:!1,dropFromOthersDisabled:!1,dropTargetStyle:Uf,dropTargetClasses:[],transformDraggedElement:function(){},centreDraggedOnCursor:!1,useCursorForDetection:!1,dropAnimationDisabled:!1,delayTouchStartMs:0},s=new Map;function a(){window.addEventListener("mousemove",u,{passive:!1}),window.addEventListener("touchmove",u,{passive:!1,capture:!1}),window.addEventListener("mouseup",c,{passive:!1}),window.addEventListener("touchend",c,{passive:!1})}function o(){window.removeEventListener("mousemove",u),window.removeEventListener("touchmove",u),window.removeEventListener("mouseup",c),window.removeEventListener("touchend",c),oi&&(clearTimeout(oi),oi=void 0,ys=!1)}function c(_){if(o(),vn=void 0,si=void 0,Lr=void 0,_.type==="touchend"){var S=new Event("click",{bubbles:!0,cancelable:!0});_.target.dispatchEvent(S)}}function u(_){var S=!!_.touches,E=S?_.touches[0]:_;if(S&&i.delayTouchStartMs>0&&!ys){Lr={x:E.clientX,y:E.clientY},(Math.abs(Lr.x-si.x)>=po||Math.abs(Lr.y-si.y)>=po)&&(oi&&(clearTimeout(oi),oi=void 0),c(_));return}_.preventDefault(),Lr={x:E.clientX,y:E.clientY},(Math.abs(Lr.x-si.x)>=po||Math.abs(Lr.y-si.y)>=po)&&(o(),d())}function g(_){if(!(_.target!==_.currentTarget&&(_.target.value!==void 0||_.target.isContentEditable))&&!_.button&&!Ui){var S=!!_.touches,E=S&&i.delayTouchStartMs>0;E||_.preventDefault(),_.stopPropagation();var A=S?_.touches[0]:_;si={x:A.clientX,y:A.clientY},Lr=so({},si),vn=_.currentTarget,E&&(ys=!1,oi=window.setTimeout(function(){vn&&(ys=!0,o(),d())},i.delayTouchStartMs)),a()}}function d(){Ui=!0;var _=s.get(vn);_o=_,ar=vn.parentElement;var S=ar.closest("dialog")||ar.closest("[popover]")||ar.getRootNode(),E=S.body||S,A=i.items,I=i.type,k=i.centreDraggedOnCursor,C=i.useCursorForDetection,D=Pn(A);pn=D[_],mo=I,Vi=Um(pn),Hl=C,Or=Am(vn,k&&Lr),E.appendChild(Or);function w(){vn.parentElement?window.requestAnimationFrame(w):(vn.setAttribute(Bf,!0),E.appendChild(vn),Fm(),Vf(vn),Vi[xr]=pn[xr],Or.focus())}window.requestAnimationFrame(w),go(Array.from(Kn.get(i.type)).filter(function(B){return B===ar||!_r.get(B).dropFromOthersDisabled}),function(B){return _r.get(B).dropTargetStyle},function(B){return _r.get(B).dropTargetClasses}),D.splice(_,1,Vi),Bl=Im(ar),Fi(ar,D,{trigger:ln.DRAG_STARTED,id:pn[xr],source:gn.POINTER}),window.addEventListener("mousemove",wo,{passive:!1}),window.addEventListener("touchmove",wo,{passive:!1,capture:!1}),window.addEventListener("mouseup",Na,{passive:!1}),window.addEventListener("touchend",Na,{passive:!1})}function p(_){var S=_.items,E=S===void 0?void 0:S,A=_.flipDurationMs,I=A===void 0?0:A,k=_.type,C=k===void 0?Rm:k,D=_.dragDisabled,w=D===void 0?!1:D,B=_.morphDisabled,$=B===void 0?!1:B,R=_.dropFromOthersDisabled,H=R===void 0?!1:R,Z=_.dropTargetStyle,ue=Z===void 0?Uf:Z,de=_.dropTargetClasses,Se=de===void 0?[]:de,ce=_.transformDraggedElement,ke=ce===void 0?function(){}:ce,De=_.centreDraggedOnCursor,ye=De===void 0?!1:De,le=_.useCursorForDetection,Q=le===void 0?!1:le,Y=_.dropAnimationDisabled,J=Y===void 0?!1:Y,K=_.delayTouchStart,ie=K===void 0?!1:K;i.dropAnimationDurationMs=I;var z=0;ie===!0?z=Nm:typeof ie=="number"&&isFinite(ie)&&ie>=0&&(z=ie),i.delayTouchStartMs=z,i.type&&C!==i.type&&Hf(e,i.type),i.type=C,i.items=Pn(E),i.dragDisabled=w,i.morphDisabled=$,i.transformDraggedElement=ke,i.centreDraggedOnCursor=ye,i.useCursorForDetection=Q,i.dropAnimationDisabled=J,n&&Ui&&!Ul&&(!fm(ue,i.dropTargetStyle)||!hm(Se,i.dropTargetClasses))&&(vo([e],function(){return i.dropTargetStyle},function(){return Se}),go([e],function(){return ue},function(){return Se})),i.dropTargetStyle=ue,i.dropTargetClasses=Pn(Se);function ge(ae,ee){return _r.get(ae)?_r.get(ae)[ee]:i[ee]}n&&Ui&&i.dropFromOthersDisabled!==H&&(H?vo([e],function(ae){return ge(ae,"dropTargetStyle")},function(ae){return ge(ae,"dropTargetClasses")}):go([e],function(ae){return ge(ae,"dropTargetStyle")},function(ae){return ge(ae,"dropTargetClasses")})),i.dropFromOthersDisabled=H,_r.set(e,i),Lm(e,C);for(var O=Ui?yo(i.items):-1,G=0;G<e.children.length;G++){var re=e.children[G];if(Dm(re,w),G===O){$||km(Or,re,Lr.x,Lr.y),i.transformDraggedElement(Or,pn,G),xm(re);continue}re.removeEventListener("mousedown",zl.get(re)),re.removeEventListener("touchstart",zl.get(re)),w||(re.addEventListener("mousedown",g),re.addEventListener("touchstart",g),zl.set(re,g)),s.set(re,G),n||(n=!0)}}return p(r),{update:function(S){p(S)},destroy:function(){function S(){Hf(e,_r.get(e).type),_r.delete(e)}Ui&&!e.closest("[".concat(Bf,"]"))?Hm(e,S):S()}}}var Eo,jl={DND_ZONE_ACTIVE:"dnd-zone-active",DND_ZONE_DRAG_DISABLED:"dnd-zone-drag-disabled"},qf=(Eo={},Ra(Eo,jl.DND_ZONE_ACTIVE,"Tab to one the items and press space-bar or enter to start dragging it"),Ra(Eo,jl.DND_ZONE_DRAG_DISABLED,"This is a disabled drag and drop list"),Eo),Gm="dnd-action-aria-alert",Sr;function Gl(){Sr||(Sr=document.createElement("div"),function(){Sr.id=Gm,Sr.style.position="fixed",Sr.style.bottom="0",Sr.style.left="0",Sr.style.zIndex="-5",Sr.style.opacity="0",Sr.style.height="0",Sr.style.width="0",Sr.setAttribute("role","alert")}(),document.body.prepend(Sr),Object.entries(qf).forEach(function(e){var r=qp(e,2),n=r[0],i=r[1];return document.body.prepend(Ym(n,i))}))}function qm(){return Ml?null:(document.readyState==="complete"?Gl():window.addEventListener("DOMContentLoaded",Gl),so({},jl))}function Wm(){Ml||!Sr||(Object.keys(qf).forEach(function(e){var r;return(r=document.getElementById(e))===null||r===void 0?void 0:r.remove()}),Sr.remove(),Sr=void 0)}function Ym(e,r){var n=document.createElement("div");return n.id=e,n.innerHTML="<p>".concat(r,"</p>"),n.style.display="none",n.style.position="fixed",n.style.zIndex="-5",n}function La(e){if(!Ml){Sr||Gl(),Sr.innerHTML="";var r=document.createTextNode(e);Sr.appendChild(r),Sr.style.display="none",Sr.style.display="inline"}}var Km="--any--",Wf={outline:"rgba(255, 255, 102, 0.7) solid 2px"},Mn=!1,ql,Zr,na="",ia,li,Bi="",So=new WeakSet,Yf=new WeakMap,Kf=new WeakMap,Wl=new Map,Gr=new Map,Xn=new Map,Co;function Xm(e,r){Xn.size===0&&(Co=qm(),window.addEventListener("keydown",Qf),window.addEventListener("click",Zf)),Xn.has(r)||Xn.set(r,new Set),Xn.get(r).has(e)||(Xn.get(r).add(e),Df())}function Xf(e,r){Zr===e&&ws(),Xn.get(r).delete(e),xf(),Xn.get(r).size===0&&Xn.delete(r),Xn.size===0&&(window.removeEventListener("keydown",Qf),window.removeEventListener("click",Zf),Co=void 0,Wm())}function Qf(e){if(Mn)switch(e.key){case"Escape":{ws();break}}}function Zf(){Mn&&(So.has(document.activeElement)||ws())}function Qm(e){if(Mn){var r=e.currentTarget;if(r!==Zr){na=r.getAttribute("aria-label")||"";var n=Gr.get(Zr),i=n.items,s=i.find(function(p){return p[xr]===li}),a=i.indexOf(s),o=i.splice(a,1)[0],c=Gr.get(r),u=c.items,g=c.autoAriaDisabled;r.getBoundingClientRect().top<Zr.getBoundingClientRect().top||r.getBoundingClientRect().left<Zr.getBoundingClientRect().left?(u.push(o),g||La("Moved item ".concat(Bi," to the end of the list ").concat(na))):(u.unshift(o),g||La("Moved item ".concat(Bi," to the beginning of the list ").concat(na)));var d=Zr;Pa(d,i,{trigger:ln.DROPPED_INTO_ANOTHER,id:li,source:gn.KEYBOARD}),Pa(r,u,{trigger:ln.DROPPED_INTO_ZONE,id:li,source:gn.KEYBOARD}),Zr=r}}}function Jf(){Wl.forEach(function(e,r){var n=e.update;return n(Gr.get(r))})}function ws(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;Gr.get(Zr).autoAriaDisabled||La("Stopped dragging item ".concat(Bi)),So.has(document.activeElement)&&document.activeElement.blur(),e&&Fi(Zr,Gr.get(Zr).items,{trigger:ln.DRAG_STOPPED,id:li,source:gn.KEYBOARD}),vo(Xn.get(ql),function(r){return Gr.get(r).dropTargetStyle},function(r){return Gr.get(r).dropTargetClasses}),ia=null,li=null,Bi="",ql=null,Zr=null,na="",Mn=!1,Jf()}function Zm(e,r){var n={items:void 0,type:void 0,dragDisabled:!1,zoneTabIndex:0,zoneItemTabIndex:0,dropFromOthersDisabled:!1,dropTargetStyle:Wf,dropTargetClasses:[],autoAriaDisabled:!1};function i(d,p,_){d.length<=1||d.splice(_,1,d.splice(p,1,d[_])[0])}function s(d){switch(d.key){case"Enter":case" ":{if((d.target.disabled!==void 0||d.target.href||d.target.isContentEditable)&&!So.has(d.target))return;d.preventDefault(),d.stopPropagation(),Mn?ws():a(d);break}case"ArrowDown":case"ArrowRight":{if(!Mn)return;d.preventDefault(),d.stopPropagation();var p=Gr.get(e),_=p.items,S=Array.from(e.children),E=S.indexOf(d.currentTarget);E<S.length-1&&(n.autoAriaDisabled||La("Moved item ".concat(Bi," to position ").concat(E+2," in the list ").concat(na)),i(_,E,E+1),Pa(e,_,{trigger:ln.DROPPED_INTO_ZONE,id:li,source:gn.KEYBOARD}));break}case"ArrowUp":case"ArrowLeft":{if(!Mn)return;d.preventDefault(),d.stopPropagation();var A=Gr.get(e),I=A.items,k=Array.from(e.children),C=k.indexOf(d.currentTarget);C>0&&(n.autoAriaDisabled||La("Moved item ".concat(Bi," to position ").concat(C," in the list ").concat(na)),i(I,C,C-1),Pa(e,I,{trigger:ln.DROPPED_INTO_ZONE,id:li,source:gn.KEYBOARD}));break}}}function a(d){c(d.currentTarget),Zr=e,ql=n.type,Mn=!0;var p=Array.from(Xn.get(n.type)).filter(function(S){return S===Zr||!Gr.get(S).dropFromOthersDisabled});if(go(p,function(S){return Gr.get(S).dropTargetStyle},function(S){return Gr.get(S).dropTargetClasses}),!n.autoAriaDisabled){var _="Started dragging item ".concat(Bi,". Use the arrow keys to move it within its list ").concat(na);p.length>1&&(_+=", or tab to another list in order to move the item into it"),La(_)}Fi(e,Gr.get(e).items,{trigger:ln.DRAG_STARTED,id:li,source:gn.KEYBOARD}),Jf()}function o(d){Mn&&d.currentTarget!==ia&&(d.stopPropagation(),ws(!1),a(d))}function c(d){var p=Gr.get(e),_=p.items,S=Array.from(e.children),E=S.indexOf(d);ia=d,ia.tabIndex=n.zoneItemTabIndex,li=_[E][xr],Bi=S[E].getAttribute("aria-label")||""}function u(d){var p=d.items,_=p===void 0?[]:p,S=d.type,E=S===void 0?Km:S,A=d.dragDisabled,I=A===void 0?!1:A,k=d.zoneTabIndex,C=k===void 0?0:k,D=d.zoneItemTabIndex,w=D===void 0?0:D,B=d.dropFromOthersDisabled,$=B===void 0?!1:B,R=d.dropTargetStyle,H=R===void 0?Wf:R,Z=d.dropTargetClasses,ue=Z===void 0?[]:Z,de=d.autoAriaDisabled,Se=de===void 0?!1:de;n.items=Pn(_),n.dragDisabled=I,n.dropFromOthersDisabled=$,n.zoneTabIndex=C,n.zoneItemTabIndex=w,n.dropTargetStyle=H,n.dropTargetClasses=ue,n.autoAriaDisabled=Se,n.type&&E!==n.type&&Xf(e,n.type),n.type=E,Xm(e,E),Se||(e.setAttribute("role","list"),e.setAttribute("aria-describedby",I?Co.DND_ZONE_DRAG_DISABLED:Co.DND_ZONE_ACTIVE)),Gr.set(e,n),Mn?e.tabIndex=e===Zr||ia.contains(e)||n.dropFromOthersDisabled||Zr&&n.type!==Gr.get(Zr).type?-1:0:e.tabIndex=n.zoneTabIndex,e.addEventListener("focus",Qm);for(var ce=function(ye){var le=e.children[ye];So.add(le),le.tabIndex=Mn?-1:n.zoneItemTabIndex,Se||le.setAttribute("role","listitem"),le.removeEventListener("keydown",Yf.get(le)),le.removeEventListener("click",Kf.get(le)),I||(le.addEventListener("keydown",s),Yf.set(le,s),le.addEventListener("click",o),Kf.set(le,o)),Mn&&n.items[ye][xr]===li&&(ia=le,ia.tabIndex=n.zoneItemTabIndex,le.focus())},ke=0;ke<e.children.length;ke++)ce(ke)}u(r);var g={update:function(p){u(p)},destroy:function(){Xf(e,n.type),Gr.delete(e),Wl.delete(e)}};return Wl.set(e,g),g}var Jm=["items","flipDurationMs","type","dragDisabled","morphDisabled","dropFromOthersDisabled","zoneTabIndex","zoneItemTabIndex","dropTargetStyle","dropTargetClasses","transformDraggedElement","autoAriaDisabled","centreDraggedOnCursor","useCursorForDetection","delayTouchStart","dropAnimationDisabled"];function Yl(e,r){if($m(e))return{update:function(){},destroy:function(){}};$f(r);var n=jm(e,r),i=Zm(e,r);return{update:function(a){$f(a),n.update(a),i.update(a)},destroy:function(){n.destroy(),i.destroy()}}}function $m(e){return!!e.closest("[".concat(am,'="true"]'))}function $f(e){var r=e.items;e.flipDurationMs,e.type,e.dragDisabled,e.morphDisabled,e.dropFromOthersDisabled;var n=e.zoneTabIndex,i=e.zoneItemTabIndex;e.dropTargetStyle;var s=e.dropTargetClasses;e.transformDraggedElement,e.autoAriaDisabled,e.centreDraggedOnCursor,e.useCursorForDetection;var a=e.delayTouchStart;e.dropAnimationDisabled;var o=Gp(e,Jm);if(Object.keys(o).length>0&&console.warn("dndzone will ignore unknown options",o),!r)throw new Error("no 'items' key provided to dndzone");var c=r.find(function(d){return!{}.hasOwnProperty.call(d,xr)});if(c)throw new Error("missing '".concat(xr,"' property for item ").concat(vs(c)));if(s&&!Array.isArray(s))throw new Error("dropTargetClasses should be an array but instead it is a ".concat(Ia(s),", ").concat(vs(s)));if(n&&!eh(n))throw new Error("zoneTabIndex should be a number but instead it is a ".concat(Ia(n),", ").concat(vs(n)));if(i&&!eh(i))throw new Error("zoneItemTabIndex should be a number but instead it is a ".concat(Ia(i),", ").concat(vs(i)));if(a!==void 0&&a!==!1){var u=a===!0,g=typeof a=="number"&&isFinite(a)&&a>=0;if(!u&&!g)throw new Error("delayTouchStart should be a boolean (true/false) or a non-negative number but instead it is a ".concat(Ia(a),", ").concat(vs(a)))}}function eh(e){return!isNaN(e)&&function(r){return(r|0)===r}(parseFloat(e))}var th={exports:{}},Ao=1;function e_(){return Ao=(Ao*9301+49297)%233280,Ao/233280}function t_(e){Ao=e}var r_={nextValue:e_,seed:t_},Kl=r_,aa="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-",Hi,rh,Es;function Xl(){Es=!1}function nh(e){if(!e){Hi!==aa&&(Hi=aa,Xl());return}if(e!==Hi){if(e.length!==aa.length)throw new Error("Custom alphabet for shortid must be "+aa.length+" unique characters. You submitted "+e.length+" characters: "+e);var r=e.split("").filter(function(n,i,s){return i!==s.lastIndexOf(n)});if(r.length)throw new Error("Custom alphabet for shortid must be "+aa.length+" unique characters. These characters were not unique: "+r.join(", "));Hi=e,Xl()}}function n_(e){return nh(e),Hi}function i_(e){Kl.seed(e),rh!==e&&(Xl(),rh=e)}function a_(){Hi||nh(aa);for(var e=Hi.split(""),r=[],n=Kl.nextValue(),i;e.length>0;)n=Kl.nextValue(),i=Math.floor(n*e.length),r.push(e.splice(i,1)[0]);return r.join("")}function ih(){return Es||(Es=a_(),Es)}function s_(e){var r=ih();return r[e]}function o_(){return Hi||aa}var Ql={get:o_,characters:n_,seed:i_,lookup:s_,shuffled:ih},Zl=typeof window=="object"&&(window.crypto||window.msCrypto),Jl;!Zl||!Zl.getRandomValues?Jl=function(e){for(var r=[],n=0;n<e;n++)r.push(Math.floor(Math.random()*256));return r}:Jl=function(e){return Zl.getRandomValues(new Uint8Array(e))};var l_=Jl;let u_="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",ah=e=>crypto.getRandomValues(new Uint8Array(e)),sh=(e,r,n)=>{let i=(2<<Math.log(e.length-1)/Math.LN2)-1,s=-~(1.6*i*r/e.length);return(a=r)=>{let o="";for(;;){let c=n(s),u=s|0;for(;u--;)if(o+=e[c[u]&i]||"",o.length===a)return o}}};const c_=Hv(Object.freeze(Object.defineProperty({__proto__:null,customAlphabet:(e,r=21)=>sh(e,r,ah),customRandom:sh,nanoid:(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((r,n)=>(n&=63,n<36?r+=n.toString(36):n<62?r+=(n-26).toString(36).toUpperCase():n>62?r+="-":r+="_",r),""),random:ah,urlAlphabet:u_},Symbol.toStringTag,{value:"Module"})));var d_=Ql,f_=l_,h_=c_.customRandom;function g_(e){for(var r=0,n,i="";!n;)i=i+h_(d_.get(),1,f_)(),n=e<Math.pow(16,r+1),r++;return i}var v_=g_,To=v_,p_=1567752802062,m_=7,ko,oh;function __(e){var r="",n=Math.floor((Date.now()-p_)*.001);return n===oh?ko++:(ko=0,oh=n),r=r+To(m_),r=r+To(e),ko>0&&(r=r+To(ko)),r=r+To(n),r}var b_=__,y_=Ql;function w_(e){if(!e||typeof e!="string"||e.length<6)return!1;var r=new RegExp("[^"+y_.get().replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&")+"]");return!r.test(e)}var E_=w_;(function(e){var r=Ql,n=b_,i=E_,s=0;function a(g){return r.seed(g),e.exports}function o(g){return s=g,e.exports}function c(g){return g!==void 0&&r.characters(g),r.shuffled()}function u(){return n(s)}e.exports=u,e.exports.generate=u,e.exports.seed=a,e.exports.worker=o,e.exports.characters=c,e.exports.isValid=i})(th);var S_=th.exports,lh=S_,C_=U('<div aria-label="drag-handle"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="14" height="18" class="svelte-kbua7a"><path d="M8.5 7C9.32843 7 10 6.32843 10 5.5C10 4.67157 9.32843 4 8.5 4C7.67157 4 7 4.67157 7 5.5C7 6.32843 7.67157 7 8.5 7ZM8.5 13.5C9.32843 13.5 10 12.8284 10 12C10 11.1716 9.32843 10.5 8.5 10.5C7.67157 10.5 7 11.1716 7 12C7 12.8284 7.67157 13.5 8.5 13.5ZM10 18.5C10 19.3284 9.32843 20 8.5 20C7.67157 20 7 19.3284 7 18.5C7 17.6716 7.67157 17 8.5 17C9.32843 17 10 17.6716 10 18.5ZM15.5 7C16.3284 7 17 6.32843 17 5.5C17 4.67157 16.3284 4 15.5 4C14.6716 4 14 4.67157 14 5.5C14 6.32843 14.6716 7 15.5 7ZM17 12C17 12.8284 16.3284 13.5 15.5 13.5C14.6716 13.5 14 12.8284 14 12C14 11.1716 14.6716 10.5 15.5 10.5C16.3284 10.5 17 11.1716 17 12ZM15.5 20C16.3284 20 17 19.3284 17 18.5C17 17.6716 16.3284 17 15.5 17C14.6716 17 14 17.6716 14 18.5C14 19.3284 14.6716 20 15.5 20Z"></path></svg></div>'),A_=U('<i class="ph ph-trash-simple svelte-kbua7a"></i>'),T_=U('<li class="svelte-kbua7a"><!> <div><i class="ri-checkbox-blank-fill svelte-kbua7a"></i> <span class="svelte-kbua7a"> </span></div> <!></li>'),k_=U('<div class="clear-button svelte-kbua7a">Clear</div>'),D_=U("<li><div> </div> <!></li>"),x_=U('<li class="buttons svelte-kbua7a"><div class="add-button placeholder svelte-kbua7a"> </div></li>'),O_=U("<ul><!> <!></ul>");function uh(e,r){kt(r,!1);const n=()=>Be(I(),"$editorState",i),[i,s]=Gt(),a=h(),o=h();let c=m(r,"items",24,()=>[]),u=m(r,"itemsColors",24,()=>[]),g=m(r,"itemsLabels",24,()=>[]),d=m(r,"showColors",8),p=m(r,"showHandle",12,!0),_=m(r,"listItemKey",8);const S="primaryDisplay";let E=m(r,"draggable",8,!0),A=m(r,"focus",8),I=m(r,"editorState",8);const k=void 0;let C=m(r,"reorderOnly",8),D=m(r,"placeholder",8),w=m(r,"fullSelection",8),B=m(r,"readonly",8),$=lh.generate(),R=ai({selected:null,actions:{select:O=>{R.update(G=>({...G,selected:O}))}}});const H=we.createEventDispatcher();let Z=h({}),ue=h([]),de=m(r,"inactive",12,!0);const Se=O=>O.map(G=>({id:_()?G[_()]:lh.generate(),color:u()[G],item:G,type:$})).filter(G=>G.id),ce=O=>{l(ue,O.detail.items)},ke=()=>t(ue).reduce((O,G)=>(O.push(G.item),O),[]),De=O=>{de(!0),ce(O),H("change",ke())},ye=O=>{let G=t(ue).findIndex(re=>re.id==O);G>-1&&(t(ue).splice(G,1),H("change",ke()))};x(()=>(v(A()),hr),()=>{A()&&R&&hr(R).actions.select(A())}),x(()=>v(B()),()=>{l(a,!B())}),x(()=>(v(E()),t(a)),()=>{p(E()&&t(a))}),x(()=>v(c()),()=>{l(ue,Se(c()))}),x(()=>t(ue),()=>{var O;l(o,((O=t(ue))==null?void 0:O.length)<1)}),Pt();var le={listItemText:S,cellState:k};Ot();var Q=O_();let Y;var J=j(Q);xt(J,3,()=>t(ue),O=>O.id,(O,G)=>{var re=T_(),ae=j(re);{var ee=q=>{var he=C_();let P;Ce(()=>{P=Pe(he,1,"handle svelte-kbua7a",null,P,{inEdit:t(a)}),We(he,de()?"cursor:grab":"cursor:grabbing")}),W("mousedown",he,()=>{de(!1)}),W("mouseup",he,()=>{de(!0)}),y(q,he)};oe(ae,q=>{p()&&q(ee)})}var pe=Ee(ae,2);let Ne,He;var me=Ee(j(pe),2),V=j(me),fe=Ee(pe,2);{var X=q=>{var he=A_();W("mousedown",he,$t(()=>ye(t(G).id))),y(q,he)};oe(fe,q=>{!C()&&t(a)&&q(X)})}ht(re,(q,he)=>Ht(Z,t(Z)[he.id]=q),q=>{var he;return(he=t(Z))==null?void 0:he[q.id]},()=>[t(G)]),Ce(()=>{Ne=Pe(pe,1,"right-content svelte-kbua7a",null,Ne,{showColors:d()}),He=We(pe,"",He,{"--option-color":(v(u()),t(G),b(()=>u()[t(G).item]))}),Xe(V,(v(g()),t(G),b(()=>g()[t(G).item]||t(G).item)))}),W("click",re,()=>{hr(R).actions.select(t(G).id)}),y(O,re)});var K=Ee(J,2);{var ie=O=>{var G=D_();let re;var ae=j(G);let ee;var pe=j(ae),Ne=Ee(ae,2);{var He=me=>{var V=k_();W("click",V,$t(()=>H("clear"))),y(me,V)};oe(Ne,me=>{t(ue),b(()=>t(ue).length)&&me(He)})}Ce(()=>{re=Pe(G,1,"buttons svelte-kbua7a",null,re,{inEdit:t(a)}),ee=Pe(ae,1,"add-button svelte-kbua7a",null,ee,{disabled:w()}),Xe(pe,n()=="Closed"?w()?"All Selected":"Select":"Close")}),W("click",ae,$t(()=>H("togglePicker"))),y(O,G)},z=O=>{var G=Ze(),re=Ue(G);{var ae=ee=>{var pe=x_(),Ne=j(pe),He=j(Ne);Ce(()=>Xe(He,D())),y(ee,pe)};oe(re,ee=>{v(c()),b(()=>c().length<1)&&ee(ae)},!0)}y(O,G)};oe(K,O=>{t(a)&&!C()?O(ie):O(z,!1)})}zr(Q,(O,G)=>Yl==null?void 0:Yl(O,G),()=>({items:t(ue),dropTargetStyle:{outline:"none"},dragDisabled:!E()||de(),type:$,dropFromOthersDisabled:!0})),Ut(()=>W("finalize",Q,De)),Ut(()=>W("consider",Q,ce)),Ce(()=>Y=Pe(Q,1,"list-wrap svelte-kbua7a",null,Y,{inEdit:t(a)})),y(e,Q),vr(r,"listItemText",S),vr(r,"cellState",k);var ge=Dt(le);return s(),ge}var I_=U("<button><i></i></button> <!>",1);function $l(e,r){kt(r,!1);const n=we.createEventDispatcher();let i=m(r,"icon",8),s=m(r,"disabled",8,!1),a=m(r,"size",8,"medium"),o=m(r,"tooltip",24,()=>{}),c=m(r,"variant",8,"primary"),u=h(),g=h(!1),d;const p=()=>{d&&clearTimeout(d),d=setTimeout(()=>{l(g,!0)},750)},_=()=>{d&&(clearTimeout(d),d=void 0),l(g,!1)};we.onDestroy(()=>{d&&clearTimeout(d)});function S(){s()||n("click")}Ot();var E=I_(),A=Ue(E);let I;var k=j(A);ht(A,w=>l(u,w),()=>t(u));var C=Ee(A,2);{var D=w=>{io(w,{get anchor(){return t(u)},get content(){return o()},get show(){return t(g)}})};oe(C,w=>{o()&&w(D)})}Ce(()=>{I=Pe(A,1,`icon-button ${a()??""} ${c()??""}`,"svelte-eijxgh",I,{disabled:s()}),Pe(k,1,`ph ph-${i()??""}`,"svelte-eijxgh")}),W("click",A,S),W("mouseenter",A,function(...w){var B;(B=o()?p:void 0)==null||B.apply(this,w)}),W("mouseleave",A,function(...w){var B;(B=o()?_:void 0)==null||B.apply(this,w)}),y(e,E),Dt()}function sr(e,r={}){const n=new Set;let i;function s(d){if(!(d instanceof Function))throw new TypeError("callback is not a function");return n.add(d),d(e),()=>n.delete(d)}function a(d,p,_){const S={from:e,to:d,event:p,args:_};o("_exit",S),e=d,n.forEach(E=>E(e)),o("_enter",S)}function o(d,...p){var S,E;const _=((S=r[e])==null?void 0:S[d])??((E=r["*"])==null?void 0:E[d]);return _ instanceof Function?_.apply(i,p):_}function c(d,...p){var S;const _=(S=o(d,...p))==null?void 0:S.valueOf();return["string","symbol"].includes(typeof _)&&_!==e&&a(_,d,p),e}const u={};async function g(d,p=100,..._){return clearTimeout(u[d]),p===null?e:(await new Promise(S=>u[d]=setTimeout(S,p)),delete u[d],c(d,..._))}return i=new Proxy({subscribe:s},{get(d,p){return Reflect.has(d,p)||(d[p]=c.bind(null,p),d[p].debounce=g.bind(null,p)),Reflect.get(d,p)}}),o("_enter",{from:null,to:e,event:null,args:[]}),i}const Nn={S:{cellPadding:"0.4rem",rowFontSize:12,rowHeight:32,headerFontSize:10,headerHeight:32,checkboxSize:12},M:{cellPadding:"0.5rem",rowFontSize:13,rowHeight:36,headerFontSize:11,headerHeight:38,checkboxSize:14},L:{cellPadding:"0.85rem",rowFontSize:15,rowHeight:42,headerFontSize:12,headerHeight:48,checkboxSize:14}},ch={string:"fuzzy",longform:"fuzzy",formula:"fuzzy",array:"contains",options:"equal",datetime:"rangeLow",boolean:"equal",number:"equal",bigint:"equal",link:"fuzzy",bb_reference_single:"equal",bb_reference:"equal"},R_={string:!0,longform:!0,array:!0,options:!0,datetime:!0,boolean:!0,number:!0,bigint:!0,link:!0,bb_reference_single:!1,bb_reference:!1},P_={string:!0,longform:!0,formula:!0,array:!0,options:!0,datetime:!0,boolean:!0,number:!0,bigint:!0},M_={string:!0,longform:!0,array:!0,link:!0,json:!0,bb_reference:!0,bb_reference_single:!0,options:!0,datetime:!0,boolean:!0,number:!0,bigint:!0,attachment:!0,attachment_single:!0};var N_=U("<div><div></div></div> <div><div></div></div>",1);function L_(e,r){kt(r,!1);const n=()=>Be(E,"$stbSettings",a),i=()=>Be(_,"$stbScrollPos",a),s=()=>Be(S,"$stbHorizontalScrollPos",a),[a,o]=Gt(),c=h(),u=h(),g=h(),d=h(),p=h(),_=we.getContext("stbScrollPos"),S=we.getContext("stbHorizontalScrollPos"),E=we.getContext("stbSettings");let A=m(r,"highlighted",8),I=m(r,"horizontalOffset",8,"0px"),k=m(r,"clientHeight",8),C=m(r,"scrollHeight",8),D=m(r,"scrollWidth",12),w=m(r,"visible",12),B=m(r,"horizontalVisible",12),$=m(r,"anchor",12);const R=we.createEventDispatcher();let H=h(),Z=h(),ue=h(),de=h(),Se=h(),ce=h(!1),ke=h(!1),De=h(0),ye=h(),le=h();const Q=()=>{var V,fe,X,q,he;$()&&(l(de,Math.max(C()-k(),0)),l(Se,((V=$())==null?void 0:V.scrollWidth)-((fe=$())==null?void 0:fe.clientWidth)),w(t(de)),B(t(Se)),D((X=$())==null?void 0:X.scrollWidth),l(ye,((q=$())==null?void 0:q.clientWidth)/((he=$())==null?void 0:he.scrollWidth)*100+"%"))};we.afterUpdate(()=>{Q==null||Q()}),x(()=>n(),()=>{l(c,n().appearance.headerHeight+8+"px")}),x(()=>n(),()=>{l(u,n().appearance.footerHeight+16+"px")}),x(()=>n(),()=>{l(g,n().appearance.footerHeight+8+"px")}),x(()=>(i(),v(C())),()=>{l(d,i()/(C()+32)*100+"%")}),x(()=>(s(),v(D())),()=>{l(le,s()/D()*100+"%")}),x(()=>(v(k()),v(C())),()=>{l(p,k()/C()*100+"%")}),Pt();var Y={calculate:Q};Ot();var J=N_();W("mouseup",Ws,()=>{l(ce,!1),l(ke,!1),l(De,0),l(H,0),l(ue,0)}),W("mousemove",Ws,function(...V){var fe;(fe=t(ce)||t(ke)?X=>{var q,he;t(ce)&&(X.preventDefault(),X.stopPropagation(),l(De,(X.clientY-t(H))*(C()/k())+t(Z)),t(De)>0&&t(De)<=t(de)&&Qe(_,t(De)),R("positionChange")),t(ke)&&(X.preventDefault(),X.stopPropagation(),l(De,(X.clientX-t(ue))*(((q=$())==null?void 0:q.scrollWidth)/((he=$())==null?void 0:he.clientWidth))+t(Z)),t(De)>0&&t(De)<=t(Se)&&Qe(S,t(De))),$($().scrollLeft=s(),!0)}:()=>{})==null||fe.apply(this,V)});var K=Ue(J);let ie,z;var ge=j(K);let O,G;var re=Ee(K,2);let ae,ee;var pe=j(re);let Ne,He;Ce(()=>{ie=Pe(K,1,"stb-scrollbar svelte-axd59o",null,ie,{hidden:!t(de),highlighted:A()||t(ce)}),z=We(K,"",z,{"--offset":t(c),"--bottomOffset":t(u)}),O=Pe(ge,1,"stb-scrollbar-indicator svelte-axd59o",null,O,{dragging:t(ce)}),G=We(ge,"",G,{top:t(d),height:t(p)}),ae=Pe(re,1,"stb-scrollbar horizontal svelte-axd59o",null,ae,{hidden:!t(Se),highlighted:A()||t(ke)}),ee=We(re,"",ee,{"--horizontalOffset":I(),"--horizontalBottomOffset":t(g)}),Ne=Pe(pe,1,"stb-scrollbar-indicator horizontal svelte-axd59o",null,Ne,{dragging:t(ke)}),He=We(pe,"",He,{left:t(le),width:t(ye)})}),W("mousedown",ge,$t(fr(V=>{l(ce,!0),l(H,V.clientY),l(Z,i())}))),W("mousedown",pe,$t(fr(V=>{l(ke,!0),l(ue,V.clientX),l(Z,s())}))),y(e,J),vr(r,"calculate",Q);var me=Dt(Y);return o(),me}var F_=U('<div class="emptyTable"><i class="ri-search-line"></i> </div>');function V_(e,r){let n=m(r,"top",8),i=m(r,"bottom",8),s=m(r,"isEmpty",8),a=m(r,"message",8,"No Records Found");var o=Ze(),c=Ue(o);{var u=g=>{var d=F_();let p;var _=Ee(j(d));Ce(()=>{p=We(d,"",p,{top:n(),bottom:i()}),Xe(_,` ${a()??""}`)}),y(g,d)};oe(c,g=>{s()&&g(u)})}y(e,o)}var U_=U('<i class="ri-loader-2-line"></i>'),B_=U('<i class="ri-save-fill"></i>'),H_=U("<div><span>+</span></div> <div><!></div>",1),z_=U('<div><i class="ri-filter-off-line"></i></div>'),j_=U("<!> <!>",1);function G_(e,r){kt(r,!1);const n=()=>Be(o(),"$stbState",i),[i,s]=Gt(),a=h();let o=m(r,"stbState",8),c=m(r,"tableAPI",8),u=m(r,"highlighted",8),g=m(r,"footer",8),d=m(r,"tableActions",8);x(()=>n(),()=>{l(a,n()=="Inserting")}),Pt(),Ot();var p=j_(),_=Ue(p);{var S=I=>{var k=H_(),C=Ue(k);let D;var w=Ee(C,2);let B;var $=j(w);{var R=Z=>{var ue=U_();y(Z,ue)},H=Z=>{var ue=B_();y(Z,ue)};oe($,Z=>{n()=="Saving"?Z(R):Z(H,!1)})}Ce(()=>{D=Pe(C,1,"overlay-button add-row-overlay",null,D,{highlighted:u(),footer:g(),"in-insert":t(a)}),B=Pe(w,1,"overlay-button save-row-overlay",null,B,{highlighted:u(),footer:g(),"in-insert":t(a)})}),W("click",C,()=>t(a)?o().cancelAddRow():o().addRow()),W("click",w,function(...Z){var ue;(ue=c().insertRow)==null||ue.apply(this,Z)}),y(I,k)};oe(_,I=>{n(),t(a),v(d()),b(()=>{var k;return n()=="Idle"||t(a)||((k=d())==null?void 0:k.length)})&&I(S)})}var E=Ee(_,2);{var A=I=>{var k=z_(),C=es(()=>o().clear());let D;Ce(()=>D=Pe(k,1,"overlay-button filter-row-overlay",null,D,{highlighted:u(),footer:g()})),W("click",k,function(...w){var B;(B=t(C))==null||B.apply(this,w)}),y(I,k)};oe(E,I=>{n()=="Filtered"&&I(A)})}y(e,p),Dt(),s()}function q_(e){return--e*e*e*e*e+1}var W_=U('<div><!> <span class="text"> </span> <!></div>');function Y_(e,r){kt(r,!1);const n=()=>Be(A(),"$stbSelected",a),i=()=>Be(d(),"$stbSettings",a),s=()=>Be(g(),"$stbState",a),[a,o]=Gt(),c=h(),u=h();let g=m(r,"stbState",8),d=m(r,"stbSettings",8),p=m(r,"tableAPI",8),_=m(r,"highlighted",8),S=m(r,"footer",8),E=m(r,"selectedActions",8),A=m(r,"stbSelected",8),I=m(r,"entityPlural",8,"Rows"),k=m(r,"entitySingular",8,"Row"),C=h();x(()=>n(),()=>{n().length==0&&l(C,!1)}),x(()=>i(),()=>{l(c,!i().appearance.hideSelectionColumn)}),x(()=>(t(c),i()),()=>{l(u,1+(t(c)+i().features.canDelete+i().appearance.numberingColumn)*2+"rem")}),Pt(),Ot();var D=Ze(),w=Ue(D);{var B=$=>{var R=W_();let H,Z;var ue=j(R);ta(ue,{icon:"ri-close-line",quiet:!0,size:"S",type:"secondary",onClick:()=>l(C,!0)});var de=Ee(ue,2),Se=j(de),ce=Ee(de,2);xt(ce,1,E,Nt,(ke,De)=>{let ye=()=>t(De).text,le=()=>t(De).icon,Q=()=>t(De).disabled,Y=()=>t(De).type,J=()=>t(De).size,K=()=>t(De).onClick;{let ie=Rt(()=>(v(p()),K(),b(()=>p().executeSelectedRowsAction(K()))));ta(ke,{get text(){return ye()},get icon(){return le()},quiet:!0,get type(){return Y()},get disabled(){return Q()},get size(){return J()},get onClick(){return t(ie)}})}}),Ce(()=>{H=Pe(R,1,"selected-row-actions-overlay",null,H,{highlighted:_(),footer:S()}),Z=We(R,"",Z,{bottom:(i(),b(()=>i().appearance.footerHeight+20)),left:t(u)}),Xe(Se,`${n(),v(k()),v(I()),b(()=>n().length==1?n().length+" "+(k()||"Row")+" ":n().length+" "+(I()||"Rows")+" ")??""} Selected`)}),dl(3,R,()=>Pv,()=>({delay:25,duration:230,easing:q_,axis:"y"})),y($,R)};oe(w,$=>{n(),s(),t(C),b(()=>n().length&&s()!="Inserting"&&!t(C))&&$(B)})}y(e,D),Dt(),o()}var K_=U('<div class="overlay-button loader-overlay"><i class="ri-refresh-line"></i></div>');function X_(e){var r=K_();y(e,r)}var Q_=U('<i class="ri-filter-3-line svelte-18zlale" tabindex="0" style="align-self: center; font-size: 14px;"></i>'),Z_=U("<!> <!>",1),J_=U('<div class="headerLabel"><div> </div></div>'),$_=U("<i></i>"),eb=U('<span class="placeholder svelte-18zlale"><!></span>'),tb=U('<li role="menuitem"><span class="spectrum-Menu-itemLabel"> </span></li>'),rb=U('<ul class="spectrum-Menu" role="menu" style="background-color: var(--spectrum-global-color-gray-75 );"></ul>'),nb=U("<div><!> <!></div> <!>",1);function ib(e,r){kt(r,!1);const n=()=>Be(g,"$columnOptions",a),i=()=>Be(p,"$columnState",a),s=()=>Be(d,"$cellOptions",a),[a,o]=Gt(),c=h(),u=h(),g=we.getContext("stColumnOptions"),d=we.getContext("stHeaderCellOptions"),p=we.getContext("stColumnState"),{API:_}=we.getContext("sdk");let S=m(r,"sorted",8),E=h(),A=h(!1),I=h(),k=h(n().defaultFilteringOperator),C=h(),D=h(),w=h();const B=K=>{K.detail!=null&&K.detail!=null&&K.detail!=""?(l(I,K.detail),n().schema.type=="boolean"&&t(I)===!1?p.filter($("notEqual",!0)):Array.isArray(K.detail)&&K.detail.length==0?p.clear():p.filter($(t(k),t(I)))):(l(A,!1),l(I,null),p.clear())},$=(K,ie)=>{let z;return K=="oneOf"&&!Array.isArray(ie)?z=ie.split(","):K!="oneOf"&&K!="containsAny"&&Array.isArray(ie)?(z=ie[0],l(I,z)):z=ie,{field:t(D),operator:K,value:z,type:t(c)?"string":n().schema.type,valueType:"Value"}},R=K=>{l(k,K),(t(I)||K=="empty"||K=="notEmpty")&&p.filter($(t(k),t(I)??"")),l(A,!1)},H=K=>{t(E).matches(":focus-within")||p.cancel()},Z=async K=>{K&&l(C,await _.fetchTableDefinition(K))};x(()=>n(),()=>{l(c,n().schema.type=="link")}),x(()=>(t(c),t(C),n()),()=>{t(c)&&!t(C)&&n().canFilter&&Z(n().schema.tableId)}),x(()=>(t(c),t(C),n()),()=>{var K;t(c)&&t(C)?l(D,"1:"+n().name+"."+((K=t(C))==null?void 0:K.primaryDisplay)):l(D,n().name)}),x(()=>i(),()=>{l(u,i()=="Entering")}),Pt(),Ot();var ue=nb(),de=Ue(ue);let Se,ce;var ke=j(de);{var De=K=>{var ie=Z_(),z=Ue(ie);{var ge=G=>{var re=Q_();W("click",re,$t(()=>l(A,!t(A)))),y(G,re)};oe(z,G=>{n(),b(()=>n().canFilter=="advanced")&&G(ge)})}var O=Ee(z,2);{let G=Rt(()=>(s(),t(k),b(()=>({...s(),placeholder:t(k),disabled:t(k)=="empty"||t(k)=="notEmpty"})))),re=Rt(()=>t(k)=="containsAny"||t(k)=="oneOf");cl(O,()=>n().headerComponent,(ae,ee)=>{ee(ae,{get cellOptions(){return t(G)},get value(){return t(I)},get fieldSchema(){return n(),b(()=>n().schema)},get multi(){return t(re)},$$events:{change:B,cancel(...pe){var Ne;(Ne=p.cancel)==null||Ne.apply(this,pe)},focusout:H}})})}y(K,ie)},ye=K=>{var ie=J_();let z;var ge=j(ie);let O;var G=j(ge);Ce(()=>{z=We(ie,"",z,{"justify-content":(n(),b(()=>{var re;return(re=n())==null?void 0:re.headerAlign}))}),O=Pe(ge,1,"innerText svelte-18zlale",null,O,{sortable:n().canSort}),Xe(G,(n(),b(()=>n().displayName??n().name)))}),W("click",ie,function(...re){var ae;(ae=p.headerClicked)==null||ae.apply(this,re)}),y(K,ie)};oe(ke,K=>{i()=="Entering"||i()=="Filtered"?K(De):K(ye,!1)})}var le=Ee(ke,2);{var Q=K=>{var ie=eb(),z=j(ie);{var ge=O=>{var G=$_();let re;Ce(()=>re=Pe(G,1,Cn(S()=="ascending"?"ri-sort-asc":"ri-sort-desc"),"svelte-18zlale",re,{sorted:S()})),y(O,G)};oe(z,O=>{(t(w)||S())&&O(ge)})}W("click",ie,function(...O){var G;(G=p.sort)==null||G.apply(this,O)}),y(K,ie)};oe(le,K=>{n(),i(),b(()=>n().canSort&&i()=="Idle")&&K(Q)})}ht(de,K=>l(E,K),()=>t(E));var Y=Ee(de,2);{var J=K=>{Qr(K,{get anchor(){return t(E)},get open(){return t(A)},align:"left",minWidth:160,$$events:{close:()=>{l(A,!1),H()}},children:(ie,z)=>{var ge=rb();xt(ge,5,()=>(n(),b(()=>n().filteringOperators)),Nt,(O,G)=>{var re=tb();let ae;var ee=j(re),pe=j(ee);Ce(()=>{ae=Pe(re,1,"spectrum-Menu-item svelte-18zlale",null,ae,{selected:t(G).value==t(k)}),Xe(pe,(t(G),b(()=>t(G).label)))}),W("mousedown",re,$t(()=>R(t(G).value))),y(O,re)}),y(ie,ge)},$$slots:{default:!0}})};oe(Y,K=>{n(),i(),b(()=>n().canFilter=="advanced"&&i()!="Idle")&&K(J)})}Ce(()=>{Se=Pe(de,1,"super-column-header svelte-18zlale",null,Se,{isEntering:t(u),filtered:i()=="Filtered",idle:i()!="Entering"&&i()!="Filtered"}),ce=We(de,"",ce,{"padding-left":(s(),b(()=>s().padding)),"padding-right":(s(),b(()=>s().padding))})}),W("mouseenter",de,()=>l(w,!0)),W("mouseleave",de,()=>l(w,!1)),y(e,ue),Dt(),o()}var ab=U("<div> </div>"),sb=U("<!> <!>",1),ob=U("<div><!></div>");function lb(e,r){kt(r,!1);const n=()=>Be(B,"$rowMetadata",u),i=()=>Be($,"$stbHovered",u),s=()=>Be(ue,"$stbMenuID",u),a=()=>Be(C,"$columnSettings",u),o=()=>Be(R,"$stbEditing",u),c=()=>Be(w,"$rowCellOptions",u),[u,g]=Gt(),d=h(),p=h(),_=h(),S=h(),E=h(),A=h(),{Provider:I,ContextScopes:k}=we.getContext("sdk"),C=we.getContext("stColumnOptions"),D=we.getContext("stColumnState"),w=we.getContext("stRowCellOptions"),B=we.getContext("stbRowMetadata"),$=we.getContext("stbHovered"),R=we.getContext("stbEditing"),H=we.getContext("stbAPI"),Z=we.getContext("stbState"),ue=we.getContext("stbMenuID");let de=m(r,"index",8),Se=m(r,"row",12),ce=m(r,"field",8),ke=m(r,"idField",8),De=m(r,"isEditing",8),ye=m(r,"isLast",8),le=m(r,"disabled",8),Q=h(),Y=h();const J=async ae=>{let ee={...Se(),[ce()]:ae};try{l(_,"");let pe=await H.patchRow(ee);Se({...pe})}catch(pe){pe.json.validationErrors?l(Y,pe.json.validationErrors[ce()][0]):l(Y,pe.message),setTimeout(()=>{l(Y,void 0)},3250)}finally{l(_,K(Se(),ce()))}},K=(ae,ee)=>{if(ae&&(ee!=null&&ee.includes("."))){for(var pe=0,ee=ee.split("."),Ne=ee.length;pe<Ne;pe++)if(ae[ee[pe]])Array.isArray(ae[ee[pe]])?ae=ae[ee[pe]][0]:ae=ae[ee[pe]];else{ae=null;break}return ae}else return ae[ee]??void 0};we.onDestroy(()=>{o()==de()&&D.exitedit()}),x(()=>(n(),v(de())),()=>{var ae;l(d,((ae=n())==null?void 0:ae[de()])??{})}),x(()=>(v(Se()),v(ke()),v(de())),()=>{var ae;l(p,((ae=Se())==null?void 0:ae[ke()])??de())}),x(()=>(v(Se()),v(ce())),()=>{l(_,K(Se(),ce()))}),x(()=>(i(),v(de()),s()),()=>{l(S,i()==de()||s()==de())}),x(()=>(n(),v(de())),()=>{var ae,ee;l(E,((ee=(ae=n())==null?void 0:ae[de()])==null?void 0:ee.selected)??!1)}),x(()=>a(),()=>{l(A,a().hasChildren>0)}),Pt(),Ot();var ie=ob();let z,ge;var O=j(ie);{var G=ae=>{var ee=sb(),pe=Ue(ee);{let me=Rt(()=>(c(),v(le()),t(Y),b(()=>({...c(),disabled:le(),error:t(Y)}))));cl(pe,()=>a().cellComponent,(V,fe)=>{fe(V,{get cellOptions(){return t(me)},get fieldSchema(){return a(),b(()=>a().schema)},get ownId(){return v(Se()),v(ke()),b(()=>Se()[ke()])},get value(){return t(_)},$$events:{enteredit:()=>D.enteredit(de()),exitedit(...X){var q;(q=D.exitedit)==null||q.apply(this,X)},change:X=>J(X.detail),linkClick:X=>{H.executeOnLinkClickAction(ce(),X.detail)}}})})}var Ne=Ee(pe,2);{var He=me=>{var V=ab();let fe;var X=j(V);Ce(()=>{fe=Pe(V,1,"info svelte-2uugwz",null,fe,{bottom:de()==0}),Xe(X,t(Y))}),y(me,V)};oe(Ne,me=>{t(Y)&&me(He)})}y(ae,ee)},re=ae=>{{let ee=Rt(()=>({id:t(p),value:t(_),row:Se(),index:de()}));I(ae,{get data(){return t(ee)},get scope(){return b(()=>k.Local)},children:(pe,Ne)=>{var He=Ze(),me=Ue(He);mr(me,r,"default",{},null),y(pe,He)},$$slots:{default:!0}})}};oe(O,ae=>{t(A)?ae(re,!1):ae(G)})}ht(ie,ae=>l(Q,ae),()=>t(Q)),Ce(()=>{z=Pe(ie,1,"super-row",null,z,{"is-selected":t(E),"is-hovered":t(S),"is-editing":De(),"is-disabled":t(d).disabled,isLast:ye()}),ge=We(ie,"",ge,{height:(t(d),b(()=>t(d).height+"px")),color:(t(d),b(()=>t(d).color)),"background-color":(t(d),b(()=>t(d).bgcolor)),"justify-content":(a(),b(()=>a().align))})}),W("mouseenter",ie,()=>Qe($,de())),W("mouseleave",ie,()=>Qe($,void 0)),W("click",ie,()=>{t(d).disabled||Z.handleRowClick(de(),ce(),K(Se(),ce()),t(p))}),W("contextmenu",ie,$t(()=>{H.showContextMenu(de(),t(Q))})),y(e,ie),Dt(),g()}var ub=U("<i></i>"),cb=U('<textarea tabindex="0"></textarea>'),db=U('<i class="ri-close-line clearIcon"></i>'),fb=U('<input tabindex="0"/> <!>',1),hb=U("<div> </div>"),gb=U("<div><span> </span></div>"),vb=U("<div><!> <!></div>");function Jr(e,r){var He,me;kt(r,!1);const n=()=>Be(Y,"$cellState",i),[i,s]=Gt(),a=h(),o=h(),c=h(),u=h(),g=h(),d=h(),p=h(),_=h(),S=h(),E=h(),A=h(),I=h(),k=h(),C=h(),D=h(),w=h(),B=h(),$=h(),R=we.createEventDispatcher(),{processStringSync:H}=we.getContext("sdk");let Z=m(r,"value",12),ue=m(r,"formattedValue",12,void 0),de=m(r,"cellOptions",24,()=>({role:"formInput",initialState:"Editing",debounce:250})),Se=m(r,"autofocus",8,!1),ce,ke=h(),De=h(),ye=h(Z()),le=(((He=de())==null?void 0:He.initialState)==="Loading"?"View":(me=de())==null?void 0:me.initialState)??"View",Q=h([]);const Y=sr(le??"View",{"*":{goTo(V){return V},reset(V){if(V!=t(ye))return l(ye,Z()),l(De,void 0),l(Q,[]),le}},View:{_enter(){l(ye,Z())},focus(){if(!t(u)&&!t(c))return"Editing"}},Editing:{_enter(){setTimeout(()=>{var V;(V=t(ke))==null||V.focus()},50),R("enteredit")},_exit(){l(De,void 0),R("exitedit")},focus(){var V;(V=t(ke))==null||V.focus()},clear(){var V;t(I)&&R("change",null),l(De,new Date),l(ye,null),(V=t(ke))==null||V.focus(),R("clear",null)},focusout(V){R("focusout"),this.submit()},submit(){return t(w)&&R("change",t(ye)),le},cancel(){return l(ye,Z()),R("cancel"),le},debounce(V){const fe=V.target;l(ye,fe.value),l(De,new Date),t(I)&&(clearTimeout(ce),ce=setTimeout(()=>{R("change",t(ye))},t(I)))},handleKeyboard(V){V.key==="Enter"&&!V.shiftKey&&this.submit(),V.key==="Escape"&&this.cancel()}}}),J={focus:()=>Y.focus(),reset:()=>Y.reset(Z()),isEditing:()=>n()==="Editing",isDirty:()=>t(w),getValue:()=>t(ye),setError:V=>{l(Q,[...t(Q),V])},clearError:()=>{l(Q,[])},setValue:V=>{Z(V)}},K=V=>{V==null||V.focus()};we.onMount(()=>{Se()&&setTimeout(()=>{Y.focus()},50)}),we.onDestroy(()=>{ce&&clearTimeout(ce)}),x(()=>(t(a),t(o),t(c),t(u),t(g),t(d),t(p),t(_),t(S),t(E),t(A),t(I),v(de())),()=>{(V=>{l(a,V.controlType),l(o,V.role),l(c,V.disabled),l(u,V.readonly),l(g,V.error),l(d,V.icon),l(p,V.color),l(_,V.background),l(S,V.showDirty),l(E,V.template),l(A,V.placeholder),l(I,V.debounce)})(de()??{})}),x(()=>(t(g),t(Q)),()=>{l(k,t(g)||t(Q).length>0)}),x(()=>(t(k),t(d)),()=>{l(C,t(k)?"ph ph-warning":t(d))}),x(()=>n(),()=>{l(D,n()==="Editing")}),x(()=>(t(De),v(Z()),t(ye)),()=>{l(w,!!t(De)&&Z()!==t(ye))}),x(()=>(t(E),v(Z())),()=>{ue(t(E)?H(t(E),{value:Z()}):Z()??void 0)}),x(()=>t(A),()=>{l(B,t(A)??"")}),x(()=>t(a),()=>{l($,t(a)==="textarea")}),x(()=>v(Z()),()=>{Y.reset(Z())}),Pt();var ie={cellState:Y,cellApi:J};Ot();var z=vb();let ge,O;var G=j(z);{var re=V=>{var fe=ub();let X;Ce(()=>X=Pe(fe,1,t(C)+" field-icon","svelte-1qezgyl",X,{"with-error":t(k)})),y(V,fe)};oe(G,V=>{t(C)&&V(re)})}var ae=Ee(G,2);{var ee=V=>{var fe=Ze(),X=Ue(fe);{var q=P=>{var te=cb();let M,T;ht(te,N=>l(ke,N),()=>t(ke)),Ut(()=>W("input",te,function(...N){var ne;(ne=Y.debounce)==null||ne.apply(this,N)})),Ut(()=>W("focusout",te,function(...N){var ne;(ne=Y.focusout)==null||ne.apply(this,N)})),Ut(()=>W("keydown",te,function(...N){var ne;(ne=Y.handleKeyboard)==null||ne.apply(this,N)})),zr(te,N=>K==null?void 0:K(N)),Ce(()=>{M=Pe(te,1,"editor textarea svelte-1qezgyl",null,M,{placeholder:!Z()&&!ue()&&!t(ye)}),Lt(te,"placeholder",(v(de()),b(()=>{var N;return((N=de())==null?void 0:N.placeholder)??""}))),us(te,t(ye)??""),T=We(te,"",T,{"text-align":(v(de()),b(()=>de().align=="center"?"center":de().align=="flex-end"?"right":"left"))})}),y(P,te)},he=P=>{var te=fb(),M=Ue(te);let T,N;ht(M,Oe=>l(ke,Oe),()=>t(ke)),Ut(()=>W("input",M,function(...Oe){var Me;(Me=Y.debounce)==null||Me.apply(this,Oe)})),Ut(()=>W("focusout",M,function(...Oe){var Me;(Me=Y.focusout)==null||Me.apply(this,Oe)})),Ut(()=>W("keydown",M,function(...Oe){var Me;(Me=Y.handleKeyboard)==null||Me.apply(this,Oe)})),zr(M,Oe=>K==null?void 0:K(Oe));var ne=Ee(M,2);{var ve=Oe=>{var Me=db();W("mousedown",Me,cs($t(function(...Re){var se;(se=Y.clear)==null||se.apply(this,Re)}))),y(Oe,Me)};oe(ne,Oe=>{t(ye),v(de()),b(()=>{var Me;return t(ye)&&((Me=de())==null?void 0:Me.clearIcon)!==!1})&&Oe(ve)})}Ce(()=>{T=Pe(M,1,"editor",null,T,{placeholder:!Z()&&!ue()&&!t(ye)}),us(M,t(ye)??""),Lt(M,"placeholder",(v(de()),b(()=>{var Oe;return((Oe=de())==null?void 0:Oe.placeholder)??""}))),N=We(M,"",N,{"text-align":(v(de()),b(()=>de().align=="center"?"center":de().align=="flex-end"?"right":"left")),"padding-right":(v(de()),b(()=>de().align!="flex-start"?"2rem":"0.75rem"))})}),y(P,te)};oe(X,P=>{t($)?P(q):P(he,!1)})}y(V,fe)},pe=V=>{var fe=Ze(),X=Ue(fe);{var q=P=>{var te=hb();let M,T;var N=j(te);Ce(()=>{M=Pe(te,1,"value textarea svelte-1qezgyl",null,M,{"with-icon":de().icon||t(k),placeholder:!Z()&&!ue()}),Lt(te,"tabindex",(v(de()),b(()=>de().readonly||de().disabled?-1:0))),T=We(te,"",T,{"justify-content":(v(de()),b(()=>de().align))}),Xe(N,ue()||Z()||t(B))}),W("focusin",te,function(...ne){var ve;(ve=Y.focus)==null||ve.apply(this,ne)}),y(P,te)},he=P=>{var te=gb();let M,T;var N=j(te),ne=j(N);Ce(()=>{M=Pe(te,1,"value",null,M,{placeholder:!Z()}),Lt(te,"tabindex",(v(de()),b(()=>de().readonly||de().disabled?-1:0))),T=We(te,"",T,{"justify-content":(v(de()),b(()=>de().align))}),Xe(ne,ue()||Z()||t(B))}),W("focusin",te,function(...ve){var Oe;(Oe=Y.focus)==null||Oe.apply(this,ve)}),y(P,te)};oe(X,P=>{t($)?P(q):P(he,!1)},!0)}y(V,fe)};oe(ae,V=>{t(D)?V(ee):V(pe,!1)})}Ce(()=>{ge=Pe(z,1,"superCell svelte-1qezgyl",null,ge,{multirow:t(a)=="textarea",textarea:t(a)=="textarea",inEdit:t(D),isDirty:t(w)&&t(S),inline:t(o)=="inlineInput",tableCell:t(o)=="tableCell",formInput:t(o)=="formInput",disabled:t(c),readonly:t(u),error:t(k)}),O=We(z,"",O,{color:t(p),background:t(_)})}),y(e,z),vr(r,"cellState",Y),vr(r,"cellApi",J);var Ne=Dt(ie);return s(),Ne}var pb=U("<i></i>"),mb=U("<div><!> <div><span> </span></div></div>");function eu(e,r){kt(r,!1);const n=h(),{processStringSync:i}=we.getContext("sdk");let s=m(r,"value",8,null),a=m(r,"formattedValue",12),o=m(r,"cellOptions",24,()=>({role:"formInput",initialState:"Editing",debounce:250}));x(()=>(v(o()),v(s())),()=>{var k;a((k=o())!=null&&k.template?i(o().template,{value:s()}):void 0)}),x(()=>v(o()),()=>{l(n,o().readonly||o().disabled?"":o().placeholder||"")}),Pt(),Ot();var c=mb();let u,g;var d=j(c);{var p=k=>{var C=pb();Ce(()=>Pe(C,1,(v(o()),b(()=>o().icon+" icon")))),y(k,C)};oe(d,k=>{v(o()),b(()=>o().icon)&&k(p)})}var _=Ee(d,2);let S,E;var A=j(_),I=j(A);Ce(()=>{u=Pe(c,1,"superCell",null,u,{inline:o().role=="inlineInput",tableCell:o().role=="tableCell",formInput:o().role=="formInput",disabled:o().disabled,readonly:o().readonly,error:o().error}),g=We(c,"",g,{color:(v(o()),b(()=>o().color)),background:(v(o()),b(()=>o().background)),"font-weight":(v(o()),b(()=>o().fontWeight))}),S=Pe(_,1,"value",null,S,{"with-icon":o().icon,placeholder:!s()}),E=We(_,"",E,{"justify-content":(v(o()),b(()=>o().align))}),Xe(I,a()||s()||t(n))}),y(e,c),Dt()}var _b=U("<div> </div>"),bb=U("<div><!> <!></div>");function yb(e,r){kt(r,!1);const n=()=>Be(g,"$columnSettings",a),i=()=>Be(_,"$stbSettings",a),s=()=>Be(d,"$rowCellOptions",a),[a,o]=Gt(),c=h(),u=h(),g=we.getContext("stColumnOptions"),d=we.getContext("stRowCellOptions"),p=we.getContext("stbState"),_=we.getContext("stbSettings");let S=m(r,"row",24,()=>({})),E=m(r,"isFirst",8),A=m(r,"isLast",8),I=m(r,"color",8);x(()=>(n(),i(),Jr),()=>{l(c,n().cellComponent===eu&&i().features.canInsert?Jr:n().cellComponent)}),x(()=>(v(S()),n()),()=>{l(u,S().errors&&S().errors[n().name])}),Pt(),Ot();var k=bb();let C,D;var w=j(k);{let R=Rt(()=>(s(),t(u),b(()=>({...s(),readonly:!1,error:t(u),showDirty:!1})))),H=Rt(()=>(n(),b(()=>n().schema.type=="array")));cl(w,()=>t(c),(Z,ue)=>{ue(Z,{get cellOptions(){return t(R)},get autofocus(){return E()},get fieldSchema(){return n(),b(()=>n().schema)},get value(){return v(S()),n(),b(()=>S()[n().name])},get multi(){return t(H)},$$events:{change:de=>{p.setValue(n().name,de.detail)}}})})}var B=Ee(w,2);{var $=R=>{var H=_b();Pe(H,1,"info svelte-18lma75",null,{},{bottom:!0});var Z=j(H);Ce(()=>Xe(Z,t(u))),y(R,H)};oe(B,R=>{t(u)&&R($)})}Ce(()=>{C=Pe(k,1,"super-row new-row",null,C,{isLast:A()}),D=We(k,"",D,{"min-height":"2rem",color:I()})}),y(e,k),Dt(),o()}var wb=U('<div tabindex="-1"><!> <!></div>');function Eb(e,r){kt(r,!1);const n=()=>Be(_,"$columnState",o),i=()=>Be(p,"$columnSettings",o),s=()=>Be(S,"$stbVisibleRows",o),a=()=>Be(E,"$new_row",o),[o,c]=Gt(),u=h(),g=h(),d=h(),p=we.getContext("stColumnOptions"),_=we.getContext("stColumnState"),S=we.getContext("stbVisibleRows"),E=we.getContext("new_row");let A=m(r,"field",8),I=m(r,"idField",8),k=m(r,"isLast",8),C=m(r,"isFirst",8),D=m(r,"zebra",8),w=m(r,"rowHeight",8),B=m(r,"rows",8);x(()=>n(),()=>{l(u,n()=="Inserting")}),x(()=>i(),()=>{l(g,i().quiet)}),x(()=>(n(),i()),()=>{l(d,n()=="EditingCell"&&(i().highlighters=="vertical"||i().highlighters=="both"))}),Pt(),Ot();var $=wb();let R;We($,"",{},{"margin-top":"var(--super-column-top-offset)"});var H=j($);xt(H,1,s,de=>de,(de,Se)=>{lb(de,{get isLast(){return k()},get index(){return t(Se)},get row(){return v(B()),t(Se),b(()=>B()[t(Se)])},get field(){return A()},get idField(){return I()},get disabled(){return t(u)},get rowHeight(){return w()},children:(ce,ke)=>{var De=Ze(),ye=Ue(De);mr(ye,r,"default",{},null),y(ce,De)},$$slots:{default:!0}})});var Z=Ee(H,2);{var ue=de=>{yb(de,{get isFirst(){return C()},get isLast(){return k()},get row(){return a()}})};oe(Z,de=>{t(u)&&de(ue)})}Ce(()=>R=Pe($,1,"super-column-body",null,R,{quiet:t(g),zebra:D(),inserting:t(u),filtered:n()=="Filtered","is-editing":t(d)})),y(e,$),Dt(),c()}var Sb=U('<div class="super-column-footer"><span> </span></div>');function Cb(e,r){kt(r,!1);const n=()=>Be(a,"$columnOptions",i),[i,s]=Gt(),a=we.getContext("stColumnOptions");let o=m(r,"footerLabel",8);Ot();var c=Sb();let u;var g=j(c),d=j(g);Ce(()=>{u=We(c,"",u,{"justify-content":(n(),b(()=>{var p;return(p=n())==null?void 0:p.headerAlign}))}),Xe(d,(v(o()),n(),b(()=>o()||n().displayName||n().name)))}),y(e,c),Dt(),s()}var Ab=U("<i></i>"),Tb=U('<div class="loope"></div>'),kb=U('<div class="item"><!> <span> </span></div>'),Db=U('<div class="value"><div></div></div>'),xb=U('<!> <input class="editor"/> <div class="action-icon svelte-16609pi"><i class="ph ph-caret-down"></i></div>',1),Ob=U("<span> </span>"),Ib=U("<span> </span>"),Rb=U("<span> </span>"),Pb=U('<div class="item"><i></i> <span> </span></div>'),Mb=U("<div></div>"),Nb=U('<i class="ph ph-caret-down control-icon"></i>'),Lb=U("<div><!></div> <!>",1),Fb=U('<div class="searchControl svelte-16609pi"><i></i> <span class="search-term svelte-16609pi"> </span></div>'),Vb=U('<div class="option loading svelte-16609pi"><i class="ph ph-spinner spin"></i> Loading...</div>'),Ub=U('<div><span class="svelte-16609pi"><i></i> </span> <i class="ph ph-check svelte-16609pi"></i></div>'),Bb=U('<div class="option loading svelte-16609pi"><i class="ph ph-spinner spin"></i> Loading more...</div>'),Hb=U("<!> <!>",1),zb=U('<div class="option svelte-16609pi"><span class="svelte-16609pi"><i class="ri-close-line"></i> No Options Found</span></div>'),jb=U('<div class="picker svelte-16609pi"><!> <div class="options svelte-16609pi"><!></div></div>'),Gb=U("<div><!> <!></div> <!>",1);function sa(e,r){var ot;kt(r,!1);const n=()=>Be(me,"$options",u),i=()=>Be(t(H),"$fetch",u),s=()=>Be(Oe,"$editorState",u),a=()=>Be(Ie,"$dataSourceStore",u),o=()=>Be(ve,"$cellState",u),c=()=>Be(Me,"$colors",u),[u,g]=Gt(),d=h(),p=h(),_=h(),S=h(),E=h(),A=h(),I=h(),k=h(),C=h(),D=h(),w=h(),B=h(),$=h(),R=h(),H=h(),Z=h(),ue=h(),de=h(),Se=h(),ce=h(),ke=h(),De=h(),ye=h(),le=h(),Q=h(),Y=we.createEventDispatcher(),{API:J,QueryUtils:K,fetchData:ie,memo:z,derivedMemo:ge}=we.getContext("sdk");let O=m(r,"cellOptions",8),G=m(r,"value",8),re=m(r,"fieldSchema",8),ae=m(r,"multi",12,!1),ee=m(r,"autofocus",8),pe=h(),Ne=h(),He=h(),me=z([]),V=h({}),fe={},X=h([]),q=h(-1),he,P=h([]),te=h(""),M=h(""),T=h(!1),N=h(15);const ne=Te=>t(p)!="data"?z({}):ie({API:J,datasource:Te,options:{sortColumn:O().sortColumn,sortOrder:O().sortOrder,limit:t(N)}}),ve=sr("Loading",{"*":{goTo(Te){return Te},refresh(){return Qe(me,[]),"Loading"},loadSchemaOptions(){var Te,Ke,et;fe=((Te=re())==null?void 0:Te.optionColors)||{},Qe(me,((et=(Ke=re())==null?void 0:Ke.constraints)==null?void 0:et.inclusion)||[]),l(V,{}),l(X,n())},loadDataOptions(Te){Qe(me,[]),l(V,{}),Te&&Te.length&&Te.forEach(Ke=>{var et;n().push((et=Ke[t(_)])==null?void 0:et.toString()),Ht(V,t(V)[Ke[t(_)]]=Ke[t(S)||t(_)]),t(A)&&(fe[Ke[t(_)]]=Ke[t(A)])}),Qe(me,n()),l(X,n()),t(T)&&l(T,!1)},loadCustomOptions(){var Te;(Te=t(I))!=null&&Te.length&&t(I).forEach(Ke=>{n().push(Ke.value||Ke),Ht(V,t(V)[Ke.value]=Ke.label||Ke)}),Qe(me,n())},clearFilters(){l(X,n())}},Loading:{_enter(){var Te;(O().optionsSource!="data"||(Te=i())!=null&&Te.loaded)&&this.goTo.debounce(15,O().initialState||"View")},_exit(){var Te;O().optionsSource=="custom"?this.loadCustomOptions():t(p)=="data"?this.loadDataOptions((Te=i())==null?void 0:Te.rows):this.loadSchemaOptions(),l(X,n())},syncFetch(Te){if(Te!=null&&Te.loaded)return O().initialState||"View"},focus(Te){if(!O().readonly&&!O().disabled)return"Editing"}},View:{_enter(){l(te,null)},focus(Te){if(!O().readonly&&!O().disabled)return"Editing"}},Editing:{_enter(){l(se,JSON.stringify(Array.isArray(G())?G():G()?[G()]:[])),l(M,ae()?"":t(V)[t(P)[0]]||t(P)[0]||""),Oe.open(),Y("enteredit")},_exit(){Oe.close(),Oe.filterOptions(),Y("exitedit")},focusout(Te){if(!t(pe).contains(Te.relatedTarget))return Y("focusout"),O().debounce&&t(ce)?(clearTimeout(he),Y("change",ae()?t(P):t(P)[0])):this.submit(),"View"},submit(){t(ce)&&!O().debounce&&(ae()?Y("change",t(P)):Y("change",t(P)[0]))},clear(){var Te;l(P,[]),(Te=t(pe))==null||Te.focus(),O().debounce&&Y("change",null)},cancel(){var Te;return l(P,JSON.parse(t(se))),l(te,null),(Te=t(pe))==null||Te.blur(),"View"}}}),Oe=sr("Closed",{"*":{toggleOption(Te){var gt,pt;if(Te<0||O().disabled||O().readonly)return;let Ke=t(X)[Te],et=t(P).indexOf(Ke);ae()&&et>-1?(t(P).splice(et,1),l(P,[...t(P)])):ae()?l(P,[...t(P),Ke]):(t(P)[0]==Ke?Ht(P,t(P).length=0):Ht(P,t(P)[0]=Ke),l(M,t(V)[t(P)[0]]||t(P)[0]||"")),O().debounce&&(clearTimeout(he),he=setTimeout(()=>{Y("change",ae()?t(P):t(P)[0])},O().debounce??0)),O().autocomplete&&ae()&&this.filterOptions(),ae()||(this.close.debounce(10),O().controlType!="inputSelect"?(gt=t(pe))==null||gt.focus():(pt=t(Ne))==null||pt.focus())}},Open:{_enter(){l(te,""),l(q,-1)},filterOptions(Te){var Ke;if(O().optionsSource=="data"){let et=[];Te?et=[...O().filter||[],{field:t(S)||t(_),type:"string",operator:"fuzzy",value:Te,valueType:"Value"}]:et=O().filter||[],(Ke=t(H))==null||Ke.update({query:K.buildQuery(et)}),l(X,n())}else Te?l(X,n().filter(et=>et==null?void 0:et.toLocaleLowerCase().startsWith(Te.toLocaleLowerCase()))):l(X,n())},toggle(){return"Closed"},close(){return"Closed"},handleKeyboard(Te){var Ke;if(Te.key==="Backspace"||Te.key==="Delete"?(l(te,t(te).slice(0,-1)),this.filterOptions(t(te))):Te.key.length===1&&/[a-zA-Z0-9]/.test(Te.key)&&(l(te,t(te)+Te.key),this.filterOptions(t(te)),(Ke=t(te))!=null&&Ke.length&&s()=="Closed"&&this.toggle()),Te.keyCode==32&&(t(q)>-1?(this.toggleOption(t(q),Te.preventDefault()),ae()||this.close(Te.preventDefault())):t(ue)||this.close()),Te.key=="Escape")return Te.stopPropagation(),Te.preventDefault(),l(te,null),"Closed";Te.key=="Enter"&&(t(q)>-1&&t(X)[t(q)]&&(ae()||this.toggleOption(t(q))),ve.submit(),Oe.close()),Te.key=="ArrowDown"&&this.highlightNext(),Te.key=="ArrowUp"&&this.highlightPrevious()},highlightNext(){l(q,t(q)+1),t(q)>t(X).length-1&&l(q,0),we.tick().then(()=>{const Te=t(He).querySelector(".option.focused");Te&&Te.scrollIntoView({behavior:"smooth",block:"nearest"})})},highlightPrevious(){l(q,t(q)-1),t(q)<0&&l(q,t(X).length-1),we.tick().then(()=>{const Te=t(He).querySelector(".option.focused");Te&&Te.scrollIntoView({behavior:"smooth",block:"nearest"})})},fetchMore(){var Te,Ke,et,gt;(Te=i())!=null&&Te.loading||((et=(Ke=i())==null?void 0:Ke.rows)==null?void 0:et.length)<t(N)||(l(N,t(N)+100),(gt=t(H))==null||gt.update({limit:t(N)}))},handleScroll(Te){const Ke=Te.target,et=Ke.scrollTop,gt=Ke.scrollHeight,pt=Ke.clientHeight;et+pt>=gt-50&&this.fetchMore()}},Closed:{_enter(){l(te,null),l(q,-1)},toggle(){return"Open"},open(){return"Open"},highlightNext(){this.open(),l(q,0),we.tick().then(()=>{const Te=t(He).querySelector(".option.focused");Te&&Te.scrollIntoView({behavior:"smooth",block:"nearest"})})},handleKeyboard(Te){var Ke;if(Te.key=="Escape"){ve.cancel();return}Te.key=="Enter"&&(Ke=t(M))!=null&&Ke.trim()&&(ae()?l(P,[...t(P),t(M).trim()]):l(P,[t(M).trim()]),l(M,"")),t(d)=="select"&&(this.open(),this.handleKeyboard(Te),(Te.key=="ArrowDown"||Te.keyCode==32)&&this.toggle(),(Te.key=="Backspace"||Te.key=="Delete")&&(l(P,[]),Y("change",t(P))))}}}),Me=ge(me,Te=>{let Ke={};return Te.forEach((et,gt)=>Ke[et]=fe[et]??Re[gt%Re.length]),Ke}),Re=["hsla(175, 90%, 75%, 0.35)","hsla(25, 90%, 75%, 0.35)","hsla(340, 85%, 72%, 0.35)","hsla(75, 80%, 75%, 0.35)","hsla(265, 85%, 70%, 0.35)","hsla(125, 90%, 75%, 0.35)","hsla(0, 90%, 75%, 0.35)","hsla(225, 90%, 75%, 0.35)","hsla(100, 80%, 75%, 0.35)","hsla(315, 85%, 70%, 0.35)","hsla(50, 80%, 75%, 0.35)","hsla(165, 85%, 70%, 0.35)","hsla(200, 90%, 75%, 0.35)","hsla(290, 85%, 72%, 0.35)","hsla(85, 85%, 72%, 0.35)","hsla(140, 85%, 72%, 0.35)","hsla(250, 90%, 75%, 0.35)","hsla(35, 85%, 72%, 0.35)","hsla(190, 85%, 72%, 0.35)","hsla(350, 90%, 75%, 0.35)","hsla(60, 85%, 70%, 0.35)","hsla(150, 90%, 75%, 0.35)","hsla(300, 90%, 75%, 0.35)","hsla(10, 85%, 70%, 0.35)","hsla(215, 85%, 70%, 0.35)","hsla(325, 90%, 75%, 0.35)","hsla(115, 85%, 70%, 0.35)","hsla(240, 85%, 72%, 0.35)","hsla(275, 90%, 75%, 0.35)"];let se=h(JSON.stringify(Array.isArray(G())?G():G()?[G()]:[]));const Ie=z(((ot=O())==null?void 0:ot.datasource)??{}),Le=Te=>{Te==null||Te.focus()};we.onMount(()=>{ee()&&setTimeout(()=>{var Te;ve.focus(),(Te=t(Ne))==null||Te.focus()},30)}),x(()=>(t(d),t(p),t(_),t(S),t(E),t(A),t(I),t(k),t(C),t(D),t(w),t(B),t($),t(R),v(O())),()=>{(Te=>{l(d,Te.controlType),l(p,Te.optionsSource),l(_,Te.valueColumn),l(S,Te.labelColumn),l(E,Te.iconColumn),l(A,Te.colorColumn),l(I,Te.customOptions),l(k,Te.optionsViewMode),l(C,Te.role),l(D,Te.readonly),l(w,Te.disabled),l(B,Te.error),l($,Te.color),l(R,Te.background)})(O())}),x(()=>v(O()),()=>{Ie.set(O().datasource)}),x(()=>a(),()=>{on(l(H,ne(a())),"$fetch",u)}),x(()=>t(p),()=>{t(p)=="data"&&(l(N,15),l(T,!0))}),x(()=>v(O()),()=>{l(Z,K.buildQuery(O().filter))}),x(()=>t(d),()=>{l(ue,t(d)=="inputSelect")}),x(()=>(v(O()),t(H),t(Z),t(N)),()=>{O().optionsSource=="data"&&t(H).update({query:t(Z),sortColumn:O().sortColumn,sortOrder:O().sortOrder,limit:t(N)})}),x(()=>i(),()=>{ve.syncFetch(i())}),x(()=>i(),()=>{var Te;ve.loadDataOptions((Te=i())==null?void 0:Te.rows)}),x(()=>(v(re()),t(p),t(S),t(_),t(E),t(A),a(),t(I)),()=>{ve.refresh(re(),t(p),t(S),t(_),t(E),t(A),a(),t(I))}),x(()=>v(G()),()=>{l(P,Array.isArray(G())?G():G()?[G()]:[])}),x(()=>t(P),()=>{l(de,!!(t(P).length&&typeof t(P)[0]=="object"))}),x(()=>t(P),()=>{l(Se,t(P).length<1)}),x(()=>o(),()=>{l(ke,o()=="Editing")}),x(()=>(t(ke),t(se),t(P)),()=>{l(ce,t(ke)&&t(se)!==JSON.stringify(t(P)))}),x(()=>t(k),()=>{l(De,t(k)=="pills")}),x(()=>(v(ae()),v(re())),()=>{ae(re()&&re().type?re().type=="array":ae())}),x(()=>(t(w),t(D),v(O())),()=>{l(ye,t(w)||t(D)?"":O().placeholder||"")}),x(()=>(t(te),t(Se),v(O())),()=>{l(le,t(te)&&t(Se)?"ph ph-magnifying-glass":O().icon)}),x(()=>s(),()=>{l(Q,s()=="Open")}),Pt();var je={cellState:ve};Ot();var Fe=Gb(),Ae=Ue(Fe);let Ge,$e;var Je=j(Ae);{var rt=Te=>{var Ke=Ab();let et;Ce(()=>et=Pe(Ke,1,t(le)+" field-icon","svelte-16609pi",et,{active:t(te)})),y(Te,Ke)};oe(Je,Te=>{t(le)&&Te(rt)})}var st=Ee(Je,2);{var ut=Te=>{var Ke=xb(),et=Ue(Ke);{var gt=Tt=>{var _t=Ze(),wt=Ue(_t);{var dt=nt=>{var at=Db();let bt;var Bt=j(at);let Ft,Vt;xt(Bt,5,()=>t(P),yt=>yt,(yt,tr)=>{var or=kb();let er;var rr=j(or);{var Kt=pr=>{var br=Tb();y(pr,br)};oe(rr,pr=>{t(De)&&pr(Kt)})}var jt=Ee(rr,2),gr=j(jt);Ce(()=>{er=We(or,"",er,{"--option-color":(c(),t(tr),b(()=>c()[t(tr)])),"min-width":"4rem"}),Xe(gr,(t(V),t(tr),b(()=>t(V)[t(tr)]||t(tr))))}),y(yt,or)}),Ce(()=>{bt=We(at,"",bt,{width:"auto","padding-left":(v(O()),b(()=>O().icon?"32px":O().padding))}),Ft=Pe(Bt,1,"items",null,Ft,{pills:t(De)}),Vt=We(Bt,"",Vt,{"justify-content":(v(O()),b(()=>O().align??"flex-start"))})}),y(nt,at)};oe(wt,nt=>{t(P),b(()=>t(P).length>0)&&nt(dt)})}y(Tt,_t)};oe(et,Tt=>{ae()&&Tt(gt)})}var pt=Ee(et,2);ht(pt,Tt=>l(Ne,Tt),()=>t(Ne)),Ut(()=>ea(pt,()=>t(M),Tt=>l(M,Tt))),Ut(()=>W("input",pt,Tt=>{var _t;ae()||Ht(P,t(P)[0]=(_t=Tt.target.value)==null?void 0:_t.trim()),Oe.filterOptions(Tt.target.value)})),zr(pt,Tt=>Le==null?void 0:Le(Tt));var Yt=Ee(pt,2);Ce(()=>Lt(pt,"placeholder",t(ye))),W("click",Yt,function(...Tt){var _t;(_t=Oe.toggle)==null||_t.apply(this,Tt)}),y(Te,Ke)},it=Te=>{var Ke=Lb(),et=Ue(Ke);let gt;var pt=j(et);{var Yt=dt=>{var nt=Ob(),at=j(nt);Ce(()=>Xe(at,t(te)||t(ye))),y(dt,nt)},Tt=dt=>{var nt=Ze(),at=Ue(nt);{var bt=Ft=>{var Vt=Ib(),yt=j(Vt);Ce(()=>Xe(yt,t(te)||"Type to search...")),y(Ft,Vt)},Bt=Ft=>{var Vt=Ze(),yt=Ue(Vt);{var tr=er=>{var rr=Rb(),Kt=j(rr);Ce(jt=>Xe(Kt,jt),[()=>(v(ae()),t(P),t(V),b(()=>ae()||t(P).length>1?t(P).join(", "):t(V)[t(P)[0]]||t(P)[0]))]),y(er,rr)},or=er=>{var rr=Mb();let Kt,jt;xt(rr,7,()=>t(P),gr=>gr,(gr,pr,br)=>{var Ir=Pb();let lr;var Cr=j(Ir);Pe(Cr,1,"ph-fill ph-square");var _n=Ee(Cr,2),Fr=j(_n);Ce(()=>{lr=We(Ir,"",lr,{"--option-color":(c(),t(pr),v(t(br)),b(()=>c()[t(pr)]||Re[t(br)%Re.length]))}),Xe(Fr,(t(de),t(V),t(pr),b(()=>t(de)?"JSON":t(V)[t(pr)]||t(pr))))}),y(gr,Ir)}),Ce(()=>{Kt=Pe(rr,1,"items",null,Kt,{pills:t(De),colorText:t(k)=="colorText"}),jt=We(rr,"",jt,{"justify-content":(v(O()),b(()=>O().align??"flex-start"))})}),y(er,rr)};oe(yt,er=>{t(k)=="text"?er(tr):er(or,!1)},!0)}y(Ft,Vt)};oe(at,Ft=>{t(Se)&&t(Q)?Ft(bt):Ft(Bt,!1)},!0)}y(dt,nt)};oe(pt,dt=>{t(Se)&&!t(Q)?dt(Yt):dt(Tt,!1)})}var _t=Ee(et,2);{var wt=dt=>{var nt=Nb();W("mousedown",nt,function(...at){var bt;(bt=t(ke)?Oe.toggle:null)==null||bt.apply(this,at)}),y(dt,nt)};oe(_t,dt=>{!t(D)&&(t(C)=="formInput"||t(ke))&&dt(wt)})}Ce(()=>gt=Pe(et,1,"value",null,gt,{placeholder:t(Se)&&!t(te)})),W("mousedown",et,function(...dt){var nt;(nt=t(ke)?Oe.toggle:()=>{})==null||nt.apply(this,dt)}),y(Te,Ke)};oe(st,Te=>{t(ke)&&t(d)=="inputSelect"?Te(ut):Te(it,!1)})}ht(Ae,Te=>l(pe,Te),()=>t(pe));var _e=Ee(Ae,2);{var qe=Te=>{Qr(Te,{get anchor(){return t(pe)},useAnchorWidth:!0,maxHeight:250,get open(){return t(Q)},children:(Ke,et)=>{var gt=jb(),pt=j(gt);{var Yt=nt=>{var at=Fb(),bt=j(at);let Bt;var Ft=Ee(bt,2),Vt=j(Ft);Ce(()=>{Bt=Pe(bt,1,"search-icon ph ph-magnifying-glass svelte-16609pi",null,Bt,{active:t(te)}),Xe(Vt,t(te))}),y(nt,at)};oe(pt,nt=>{t(te)&&!t(Se)&&nt(Yt)})}var Tt=Ee(pt,2),_t=j(Tt);{var wt=nt=>{var at=Vb();y(nt,at)},dt=nt=>{var at=Ze(),bt=Ue(at);{var Bt=Vt=>{var yt=Hb(),tr=Ue(yt);xt(tr,1,()=>t(X),Nt,(rr,Kt,jt)=>{var gr=Ub();let pr,br;var Ir=j(gr),lr=j(Ir);let Cr;var _n=Ee(lr);Ce(Fr=>{pr=Pe(gr,1,"option svelte-16609pi",null,pr,Fr),br=We(gr,"",br,{"--option-color":(c(),t(Kt),b(()=>c()[t(Kt)]))}),Pe(lr,1,Cn((t(E),i(),b(()=>{var yr,un,wr;return t(E)?"ph ph-"+((wr=(un=(yr=i())==null?void 0:yr.rows)==null?void 0:un[jt])==null?void 0:wr[t(E)]):"ph-fill ph-square"}))),"svelte-16609pi"),Cr=We(lr,"",Cr,{color:(c(),t(Kt),b(()=>c()[t(Kt)]))}),Xe(_n,` ${t(V),t(Kt),b(()=>t(V)[t(Kt)]||t(Kt))??""}`)},[()=>{var Fr;return{text:t(k)=="text",focused:t(q)===jt,selected:(Fr=t(P))==null?void 0:Fr.includes(t(Kt))}}]),W("mousedown",gr,$t(fr(Fr=>Oe.toggleOption(jt)))),W("mouseenter",gr,()=>l(q,jt)),y(rr,gr)});var or=Ee(tr,2);{var er=rr=>{var Kt=Bb();y(rr,Kt)};oe(or,rr=>{t(p),i(),b(()=>{var Kt;return t(p)=="data"&&((Kt=i())==null?void 0:Kt.loading)})&&rr(er)})}y(Vt,yt)},Ft=Vt=>{var yt=zb();y(Vt,yt)};oe(bt,Vt=>{t(X),b(()=>{var yt;return(yt=t(X))==null?void 0:yt.length})?Vt(Bt):Vt(Ft,!1)},!0)}y(nt,at)};oe(_t,nt=>{t(p),i(),b(()=>{var at,bt,Bt;return t(p)=="data"&&((at=i())==null?void 0:at.loading)&&!((Bt=(bt=i())==null?void 0:bt.rows)!=null&&Bt.length)})?nt(wt):nt(dt,!1)})}ht(Tt,nt=>l(He,nt),()=>t(He)),W("wheel",Tt,nt=>nt.stopPropagation()),W("mouseleave",Tt,()=>l(q,-1)),W("scroll",Tt,function(...nt){var at;(at=t(p)=="data"?Oe.handleScroll:null)==null||at.apply(this,nt)}),W("mousedown",gt,$t(fr(function(nt){Yn.call(this,r,nt)}))),y(Ke,gt)},$$slots:{default:!0}})};oe(_e,Te=>{t(ke)&&Te(qe)})}Ce(()=>{Ge=Pe(Ae,1,"superCell",null,Ge,{isDirty:t(ce)&&O().showDirty,inEdit:t(ke),disabled:t(w),readonly:t(D),error:t(B),inline:t(C)=="inlineInput",tableCell:t(C)=="tableCell",formInput:t(C)=="formInput"}),Lt(Ae,"tabindex",(v(O()),b(()=>{var Te;return(Te=O())!=null&&Te.disabled?-1:0}))),$e=We(Ae,"",$e,{color:t($),background:t(R)})}),W("focusin",Ae,function(...Te){var Ke;(Ke=ve.focus)==null||Ke.apply(this,Te)}),W("focusout",Ae,function(...Te){var Ke;(Ke=ve.focusout)==null||Ke.apply(this,Te)}),W("keydown",Ae,function(...Te){var Ke;(Ke=Oe.handleKeyboard)==null||Ke.apply(this,Te)}),y(e,Fe),vr(r,"cellState",ve);var Ye=Dt(je);return g(),Ye}var qb=U("<i></i>"),Wb=U('<div class="controls svelte-1mbmiop"><i class="ph ph-minus svelte-1mbmiop"></i> <i class="ph ph-plus svelte-1mbmiop"></i></div>'),Yb=U('<input/> <i class="ri-close-line clear-icon visible"></i> <!>',1),Kb=U("<div> </div>"),Xb=U("<div><!> <!></div>");function Ss(e,r){var te;kt(r,!1);const n=()=>Be(re(),"$cellState",s),i=()=>Be(ye,"$context",s),[s,a]=Gt(),o=h(),c=h(),u=h(),g=h(),d=h(),p=h(),_=h(),S=h(),E=h(),A=h(),I=h(),k=h(),C=h(),D=h(),w=h(),B=h(),$=h(),R=h(),H=h(),Z=h(),ue=h(),de=h(),Se=h(),ce=h(),ke=h(),{processStringSync:De}=we.getContext("sdk"),ye=we.getContext("context"),le=we.createEventDispatcher();let Q=m(r,"value",12),Y=m(r,"cellOptions",24,()=>({})),J=m(r,"autofocus",8,!1),K=h(Q()??0),ie=h(),z=h(),ge,O=((te=Y())==null?void 0:te.initialState)??"View";function G(M,T,N){const ne=typeof M=="string"?parseFloat(M):M;if(isNaN(ne)||ne!==0&&!ne)return"";let ve;if(N===void 0&&typeof M=="string"?ve=ne.toString():ve=ne.toFixed(N??0),!T)return ve;const Oe=ve.split(".");return Oe[0]=Oe[0].replace(/\B(?=(\d{3})+(?!\d))/g,T),Oe.join(".")}let re=m(r,"cellState",24,()=>sr(O??"View",{"*":{goTo(M){return M}},View:{_enter(){const M=Number(Q());l(K,isNaN(M)?null:M),l(z,void 0)},reset(M){if(M==t(K))return;const T=Number(Q());return l(K,isNaN(T)?null:T),l(z,void 0),O},focus(){if(!t(o)&&!t(c))return"Editing"}},Editing:{_enter(){var M;(M=t(ie))==null||M.focus(),le("enteredit")},_exit(){l(z,void 0),le("exitedit")},clear(){le("change",null),l(z,new Date),l(K,null)},focusout(M){le("focusout",M),this.submit()},submit(){return t(de)&&le("change",Number(t(K))),O},cancel(){return l(K,Q()),le("cancel"),O},debouncedDispatch(){t(A)&&(clearTimeout(ge),ge=setTimeout(()=>{le("change",t(K))},t(A)))},handleKeyboard(M){const T=M.target,N=M.key;if(["Enter","Escape","ArrowLeft","ArrowRight","Tab","ArrowUp","ArrowDown"].includes(N)){if(N==="Enter")return this.submit();if(N==="Escape")return this.cancel();if(N==="ArrowUp"){M.preventDefault(),this.increment(M);return}if(N==="ArrowDown"){M.preventDefault(),this.decrement(M);return}return}(N.length===1&&!/[\d.-]/.test(N)||N==="."&&T.value.includes(".")||N==="."&&(t(w)??0)===0||N==="-"&&(T.value.includes("-")||T.selectionStart!==0))&&M.preventDefault()},handleInput(M){var ne,ve;const T=M.target,N=T.value;if(N!==""&&N!=="-"&&!/^-?\d*\.?\d*$/.test(N)){T.value=((ne=t(K))==null?void 0:ne.toString())??"";return}if(N.includes(".")&&N.split(".")[1].length>(t(w)??0)){T.value=((ve=t(K))==null?void 0:ve.toString())??"";return}l(K,N===""||N==="-"?0:Number(N)||0),l(K,Number(t(K).toFixed(t(w)??0))),t(C)!==void 0&&t(K)<t(C)&&l(K,t(C)),t(D)!==void 0&&t(K)>t(D)&&l(K,t(D)),l(z,new Date),this.debouncedDispatch()},increment(M){const T=M.shiftKey?10:1;l(K,t(K)+t(ke)*T),t(D)!==void 0&&t(K)>t(D)&&l(K,t(D)),l(z,new Date),this.debouncedDispatch()},decrement(M){const T=M.shiftKey?10:1;l(K,t(K)-t(ke)*T),t(C)!==void 0&&t(K)<t(C)&&l(K,t(C)),l(z,new Date),this.debouncedDispatch()},handleWheel(M){M.preventDefault(),M.stopPropagation(),M.shiftKey?M.deltaX<0?this.increment(M):this.decrement(M):M.deltaY<0?this.increment(M):this.decrement(M)}}}));const ae={focus:()=>re().focus(),reset:()=>re().reset(Q()),isEditing:()=>n()==="Editing",isDirty:()=>t(de),getValue:()=>t(K),setError:M=>{},clearError:()=>{},setValue:M=>{Q(M)}};function ee(M){setTimeout(()=>M==null?void 0:M.focus(),10)}we.onMount(()=>{J()&&setTimeout(()=>{var M;re().focus(),(M=t(ie))==null||M.focus()},50)}),we.onDestroy(()=>{clearTimeout(ge)}),x(()=>(t(o),t(c),t(u),t(g),t(d),t(p),t(_),t(S),t(E),t(A),t(I),t(k),t(C),t(D),t(w),t(B),t($),v(Y())),()=>{(M=>{l(o,M.readonly),l(c,M.disabled),l(u,M.error),l(g,M.icon),l(d,M.color),l(p,M.background),l(_,M.showDirty),l(S,M.template),l(E,M.placeholder),l(A,M.debounce),l(I,M.showStepper),l(k,M.stepSize),l(C,M.min),l(D,M.max),l(w,M.decimals),l(B,M.thousandsSeparator),l($,M.role)})(Y()??{})}),x(()=>t(u),()=>{l(R,t(u))}),x(()=>(t(R),t(g)),()=>{l(H,t(R)?"ph ph-warning":t(g))}),x(()=>n(),()=>{l(Z,n()==="Editing")}),x(()=>t($),()=>{l(ue,t($)==="inlineInput")}),x(()=>(t(z),v(Q()),t(K)),()=>{l(de,!!t(z)&&Q()!==t(K))}),x(()=>(t(Z),t(K),v(Q())),()=>{l(Se,t(Z)?t(K):Q()??0)}),x(()=>(t(S),i(),v(Q()),t(Se),t(B),t(w)),()=>{l(ce,t(S)?De(t(S),{...i(),value:Q()}):G(t(Se),t(B),t(w)))}),x(()=>t(k),()=>{l(ke,t(k)??1)}),x(()=>(v(re()),v(Q())),()=>{re().reset(Q())}),Pt();var pe={cellApi:ae};Ot();var Ne=Xb();let He,me;var V=j(Ne);{var fe=M=>{var T=qb();let N;Ce(()=>N=Pe(T,1,t(H)+" field-icon","svelte-1mbmiop",N,{"with-error":t(R)})),y(M,T)};oe(V,M=>{t(H)&&M(fe)})}var X=Ee(V,2);{var q=M=>{var T=Yb(),N=Ue(T);let ne,ve;ht(N,se=>l(ie,se),()=>t(ie)),Ut(()=>W("keydown",N,se=>re().handleKeyboard(se))),Ut(()=>W("input",N,se=>re().handleInput(se))),Ut(()=>W("focusout",N,se=>re().focusout(se))),Ut(()=>W("wheel",N,se=>re().handleWheel(se))),zr(N,se=>ee==null?void 0:ee(se));var Oe=Ee(N,2),Me=Ee(Oe,2);{var Re=se=>{var Ie=Wb(),Le=j(Ie),je=Ee(Le,2);W("mousedown",Le,$t(fr(Fe=>re().decrement(Fe)))),W("mousedown",je,$t(fr(Fe=>re().increment(Fe)))),y(se,Ie)};oe(Me,se=>{t(I)&&se(Re)})}Ce(()=>{ne=Pe(N,1,"editor",null,ne,{placeholder:!t(K)}),us(N,t(K)||""),ve=We(N,"",ve,{"text-align":(v(Y()),b(()=>Y().align=="flex-start"?"left":Y().align=="center"?"center":"right "))})}),W("mousedown",Oe,$t(fr(function(...se){var Ie;(Ie=re().clear)==null||Ie.apply(this,se)}))),y(M,T)},he=M=>{var T=Kb();let N,ne;var ve=j(T);Ce(()=>{N=Pe(T,1,"value",null,N,{placeholder:!Q()&&Q()!==0}),ne=We(T,"",ne,{"padding-right":"12px","justify-content":(v(Y()),b(()=>Y().align??"flex-end"))}),Xe(ve,Q()!=null?t(ce):t(E)||"")}),y(M,T)};oe(X,M=>{n()=="Editing"?M(q):M(he,!1)})}Ce(()=>{He=Pe(Ne,1,"superCell",null,He,{error:t(R),readonly:t(o),disabled:t(c),inEdit:t(Z),isDirty:t(de)&&t(_),inline:t(ue),tableCell:t($)=="tableCell",formInput:t($)=="formInput"}),Lt(Ne,"tabindex",t(c)?-1:0),me=We(Ne,"",me,{color:t(d),background:t(p)})}),W("focusin",Ne,function(...M){var T;(T=re().focus)==null||T.apply(this,M)}),y(e,Ne),vr(r,"cellApi",ae);var P=Dt(pe);return a(),P}var Qb=U("<i></i>"),Zb=U('<span class="spectrum-Switch-label"> </span>'),Jb=U('<div class="spectrum-Switch spectrum-Switch--emphasized svelte-1l9mgx0"><input class="spectrum-Switch-input" type="checkbox"/> <span class="spectrum-Switch-switch"></span> <!></div>'),$b=U('<span class="checkbox-label svelte-1l9mgx0"> </span>'),ey=U('<input class="checkbox" type="checkbox"/> <!>',1),ty=U("<div><!></div>"),ry=U('<i class="ri-check-line valueicon"></i>'),ny=U('<i class="ri-close-line valueicon"></i>'),iy=U('<div tabIndex="0"><!></div>'),ay=U("<div><!> <!></div>");function tu(e,r){kt(r,!1);const n=()=>Be(D(),"$cellState",i),[i,s]=Gt(),a=h(),o=h(),c=h(),u=h(),g=h(),d=h(),p=h(),_=h();let S=m(r,"value",12),E=m(r,"formattedValue",8),A=m(r,"cellOptions",8),I=h(S()),k=h();const C=we.createEventDispatcher();let D=m(r,"cellState",24,()=>sr(A().initialState??"View",{"*":{goTo(ce){return ce}},View:{focus(){var ce;if(!A().readonly&&!A().disabled)return"Editing";(ce=t(k))==null||ce.focus()}},Editing:{_enter(){var ce;l(I,S()),(ce=t(k))==null||ce.focus(),C("enteredit")},_exit(){C("exitedit")},focus(){var ce;(ce=t(k))==null||ce.focus()},change(ce){A().debounce&&C("change",S())},submit(){return S()!==t(I)&&C("change",S()),C("focusout"),"View"},cancel(){return S(t(I)),"View"}}}));const w=ce=>{A().role=="tableCell"&&ce.focus()};x(()=>v(A()),()=>{l(a,A().role=="inlineInput")}),x(()=>n(),()=>{l(o,n()=="Editing")}),x(()=>(t(o),t(I),v(S())),()=>{l(c,t(o)&&t(I)!==S())}),x(()=>v(A()),()=>{var ce;l(u,((ce=A())==null?void 0:ce.controlType)=="checkbox")}),x(()=>v(A()),()=>{l(g,A().role=="tableCell")}),x(()=>v(A()),()=>{l(d,A().inlineLabel)}),x(()=>v(A()),()=>{l(p,A().error?"ri-error-warning-line":A().icon)}),x(()=>v(A()),()=>{l(_,A().error)}),Pt(),Ot();var B=ay();let $,R;var H=j(B);{var Z=ce=>{var ke=Qb();let De;Ce(()=>De=Pe(ke,1,t(p)+" field-icon","svelte-1l9mgx0",De,{"with-error":t(_)})),y(ce,ke)};oe(H,ce=>{t(p)&&ce(Z)})}var ue=Ee(H,2);{var de=ce=>{var ke=ty();let De,ye;var le=j(ke);{var Q=J=>{var K=Jb(),ie=j(K);Ut(()=>xc(ie,S)),ht(ie,O=>l(k,O),()=>t(k)),Ut(()=>W("focusin",ie,function(...O){var G;(G=D().focus)==null||G.apply(this,O)})),Ut(()=>W("focusout",ie,function(...O){var G;(G=D().submit)==null||G.apply(this,O)})),Ut(()=>W("change",ie,function(...O){var G;(G=D().change)==null||G.apply(this,O)})),zr(ie,O=>w==null?void 0:w(O));var z=Ee(ie,4);{var ge=O=>{var G=Zb(),re=j(G);Ce(()=>Xe(re,t(d))),y(O,G)};oe(z,O=>{t(d)&&O(ge)})}Ce(()=>ie.disabled=(v(A()),b(()=>A().disabled||A().readonly))),y(J,K)},Y=J=>{var K=ey(),ie=Ue(K);Ut(()=>xc(ie,S)),ht(ie,O=>l(k,O),()=>t(k)),Ut(()=>W("focusin",ie,function(...O){var G;(G=D().focus)==null||G.apply(this,O)})),Ut(()=>W("focusout",ie,function(...O){var G;(G=D().submit)==null||G.apply(this,O)})),Ut(()=>W("change",ie,function(...O){var G;(G=D().change)==null||G.apply(this,O)})),zr(ie,O=>w==null?void 0:w(O));var z=Ee(ie,2);{var ge=O=>{var G=$b(),re=j(G);Ce(()=>Xe(re,t(d))),y(O,G)};oe(z,O=>{t(d)&&O(ge)})}Ce(()=>ie.disabled=(v(A()),b(()=>A().disabled||A().readonly))),y(J,K)};oe(le,J=>{t(u)?J(Y,!1):J(Q)})}Ce(()=>{De=Pe(ke,1,"editor",null,De,{"naked-field":!t(g)}),ye=We(ke,"",ye,{"justify-content":(v(A()),b(()=>A().align??"center"))})}),y(ce,ke)},Se=ce=>{var ke=iy();let De,ye;var le=j(ke);{var Q=J=>{var K=ry();y(J,K)},Y=J=>{var K=Ze(),ie=Ue(K);{var z=ge=>{var O=ny();y(ge,O)};oe(ie,ge=>{v(A()),b(()=>A().showFalse)&&ge(z)},!0)}y(J,K)};oe(le,J=>{S()?J(Q):J(Y,!1)})}Ce(()=>{De=Pe(ke,1,"value",null,De,{"with-icon":A().icon}),ye=We(ke,"",ye,{"justify-content":(v(A()),b(()=>A().align??"center"))})}),W("focusin",ke,function(...J){var K;(K=D().focus)==null||K.apply(this,J)}),y(ce,ke)};oe(ue,ce=>{n(),v(A()),v(E()),b(()=>n()=="Editing"||A().role!="tableCell"&&!E())?ce(de):ce(Se,!1)})}Ce(()=>{$=Pe(B,1,"superCell",null,$,{inEdit:t(o),isDirty:t(c)&&A().showDirty,inline:t(a),tableCell:t(g),disabled:A().disabled,readonly:A().readonly,"naked-field":!t(g)}),R=We(B,"",R,{color:(v(A()),b(()=>A().color)),background:(n(),v(A()),b(()=>n()=="Editing"&&A().role!="inline"?"var(--spectrum-global-color-gray-50)":A().background)),"font-weight":(v(A()),b(()=>A().fontWeight))})}),y(e,B),Dt(),s()}var sy=U('.<span role="spinbutton" aria-label="Milliseconds" tabindex="0" contenteditable="" inputmode="numeric" class="svelte-1y5bf7z"> </span>',1),oy=U(':<span role="spinbutton" aria-label="Seconds" tabindex="0" contenteditable="" inputmode="numeric" class="svelte-1y5bf7z"> </span> <!>',1),ly=U('<div class="time-picker svelte-1y5bf7z" role="none"><span role="spinbutton" aria-label="Hours" tabindex="0" contenteditable="" inputmode="numeric" class="svelte-1y5bf7z"> </span>: <span role="spinbutton" aria-label="Minutes" tabindex="0" contenteditable="" inputmode="numeric" class="svelte-1y5bf7z"> </span> <!></div>');function uy(e,r){kt(r,!1);let n=m(r,"browseDate",12),i=m(r,"timePrecision",8),s=m(r,"setTime",8),a=h([]);function o(D){const w=window.getSelection(),B=document.createRange();B.selectNodeContents(D),w==null||w.removeAllRanges(),w==null||w.addRange(B)}function c(D){if(D.key==="ArrowUp"||D.key==="ArrowDown"){const w=u(D.currentTarget),B=D.key==="ArrowUp"?1:-1;_(D.currentTarget,w+B,!0),D.preventDefault(),o(D.currentTarget)}else if(D.key==="ArrowLeft"||D.key==="ArrowRight"||":;-,.".includes(D.key)){const w=t(a).indexOf(D.currentTarget),B=D.key==="ArrowLeft"?-1:1,$=t(a)[w+B];D.preventDefault(),$&&($.focus(),o($))}}function u(D){const w=d(D).label;return w==="Hours"?n().getHours():w==="Minutes"?n().getMinutes():w==="Seconds"?n().getSeconds():n().getMilliseconds()}function g(D,w,B){return B&&D<0?w:B&&D>w?0:Math.max(0,Math.min(w,D))}function d(D){const w=D.getAttribute("aria-label");if(w==="Hours")return{label:w,len:2,max:23};if(w==="Minutes")return{label:w,len:2,max:59};if(w==="Seconds")return{label:w,len:2,max:59};if(w==="Milliseconds")return{label:w,len:3,max:999};throw new Error("Invalid label "+w)}function p(D){const w=("00"+D.getHours()).slice(-2),B=("00"+D.getMinutes()).slice(-2),$=("00"+D.getSeconds()).slice(-2),R=("000"+D.getMilliseconds()).slice(-3);t(a)[0]&&t(a)[0].innerText!==w&&Ht(a,t(a)[0].innerText=w),t(a)[1]&&t(a)[1].innerText!==B&&Ht(a,t(a)[1].innerText=B),t(a)[2]&&t(a)[2].innerText!==$&&Ht(a,t(a)[2].innerText=$),t(a)[3]&&t(a)[3].innerText!==R&&Ht(a,t(a)[3].innerText=R)}function _(D,w,B=!1){const $=d(D);w=g(w,$.max,B),$.label==="Hours"?n().setHours(w):$.label==="Minutes"?n().setMinutes(w):$.label==="Seconds"?n().setSeconds(w):$.label==="Milliseconds"&&n().setMilliseconds(w),n(s()(n())),p(n())}function S(D,w){return parseInt(D.replace(/[^\d]/g,"").slice(-w))}function E(D){const w=D,B=d(w.currentTarget);let $;if(w.inputType==="insertText"){const R="000"+u(w.currentTarget);$=S(R+w.currentTarget.innerText,B.len),$>B.max&&w.data&&($=S(w.data,B.len))}else $=S("000"+w.currentTarget.innerText,B.len);_(w.currentTarget,$),o(w.currentTarget)}function A(D){o(D.currentTarget)}x(()=>v(n()),()=>{p(n())}),Pt(),Ot();var I=Ze(),k=Ue(I);{var C=D=>{var w=ly(),B=j(w),$=j(B);ht(B,de=>Ht(a,t(a)[0]=de),()=>{var de;return(de=t(a))==null?void 0:de[0]});var R=Ee(B,2),H=j(R);ht(R,de=>Ht(a,t(a)[1]=de),()=>{var de;return(de=t(a))==null?void 0:de[1]});var Z=Ee(R,2);{var ue=de=>{var Se=oy(),ce=Ee(Ue(Se)),ke=j(ce);ht(ce,le=>Ht(a,t(a)[2]=le),()=>{var le;return(le=t(a))==null?void 0:le[2]});var De=Ee(ce,2);{var ye=le=>{var Q=sy(),Y=Ee(Ue(Q)),J=j(Y);ht(Y,K=>Ht(a,t(a)[3]=K),()=>{var K;return(K=t(a))==null?void 0:K[3]}),Ce(K=>Xe(J,K),[()=>(v(n()),b(()=>("000"+n().getMilliseconds()).slice(-3)))]),W("keydown",Y,c),W("input",Y,E),W("focus",Y,A),y(le,Q)};oe(De,le=>{i()!=="second"&&le(ye)})}Ce(le=>Xe(ke,le),[()=>(v(n()),b(()=>("00"+n().getSeconds()).slice(-2)))]),W("keydown",ce,c),W("input",ce,E),W("focus",ce,A),y(de,Se)};oe(Z,de=>{i()!=="minute"&&de(ue)})}Ce((de,Se)=>{Xe($,de),Xe(H,Se)},[()=>(v(n()),b(()=>("00"+n().getHours()).slice(-2))),()=>(v(n()),b(()=>("00"+n().getMinutes()).slice(-2)))]),W("keydown",B,c),W("input",B,E),W("focus",B,A),W("keydown",R,c),W("input",R,E),W("focus",R,A),W("mousedown",w,de=>{de.target instanceof HTMLElement&&de.target.tagName==="SPAN"&&(de.target.focus(),de.preventDefault())}),y(D,w)};oe(k,D=>{i()&&D(C)})}y(e,I),Dt()}function cy(e){return e%4===0&&e%100!==0||e%400===0}function Do(e,r){return[31,cy(e)?29:28,31,30,31,30,31,31,30,31,30,31][r]}function ru(e,r){const n=Do(e,r),i=[];for(let s=0;s<n;s++)i.push({year:e,month:r,number:s+1});return i}function dy(e,r){const n=e.getFullYear(),i=e.getMonth(),s=new Date(n,i,1).getDay();let a=[];const o=(s-r+7)%7;if(o>0){let d=i-1,p=n;d===-1&&(d=11,p=n-1),a=ru(p,d).slice(-o)}a=a.concat(ru(n,i));let c=i+1,u=n;c===12&&(c=0,u=n+1);const g=42-a.length;return a=a.concat(ru(u,c).slice(0,g)),a}function dh(e,r){r===null?e.setHours(0,0,0,0):r==="minute"?e.setSeconds(0,0):r==="second"&&e.setMilliseconds(0)}function ui(e){return new Date(e)}function xo(e,r,n,i,s){let a=ui(r);return e>r?(Oo(a,-1,n,i,s),a<n&&(a=Io(a,n,i),Oo(a,1,n,i,s))):a>=e&&(Oo(a,1,n,i,s),a>i&&(a=Io(a,n,i),Oo(a,-1,n,i,s))),(a<n||a>i)&&(a=nu(a,n,i)),a}function Oo(e,r,n,i,s){let o=0;for(;s!=null&&s(e)&&e>=n&&e<=i&&o<=36525;)e.setDate(e.getDate()+r),o++}function nu(e,r,n){return e>n?ui(n):e<r?ui(r):ui(e)}function Io(e,r,n){const i=nu(e,r,n);return e=new Date(i.getFullYear(),i.getMonth(),i.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),e>n&&e.setDate(n.getDate()),e<r&&e.setDate(r.getDate()),e}function fy(){return{weekdays:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekStartsOn:1}}function hy(e){const r=fy();return typeof e.weekStartsOn=="number"&&(r.weekStartsOn=e.weekStartsOn),e.months&&(r.months=e.months),e.shortMonths&&(r.shortMonths=e.shortMonths),e.weekdays&&(r.weekdays=e.weekdays),r}var gy=U("<option> </option>"),vy=U("<option> </option>"),py=U("<option> </option>"),my=U("<option> </option>"),_y=U('<div class="header-cell svelte-pdppv4"> </div>'),by=U('<div class="header-cell svelte-pdppv4"> </div>'),yy=U('<div><span class="svelte-pdppv4"> </span></div>'),wy=U('<div class="week svelte-pdppv4"></div>'),Ey=U('<div class="date-time-picker svelte-pdppv4" tabindex="0"><div class="tab-container svelte-pdppv4" tabindex="-1"><div class="top svelte-pdppv4"><button type="button" aria-label="Previous month" class="page-button svelte-pdppv4" tabindex="-1"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="svelte-pdppv4"><path d="M5 3l3.057-3 11.943 12-11.943 12-3.057-3 9-9z" transform="rotate(180, 12, 12)"></path></svg></button> <div class="dropdown month svelte-pdppv4"><select class="svelte-pdppv4"></select> <select class="dummy-select svelte-pdppv4" tabindex="-1"></select> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="svelte-pdppv4"><path d="M6 0l12 12-12 12z" transform="rotate(90, 12, 12)"></path></svg></div> <div class="dropdown year svelte-pdppv4"><select class="svelte-pdppv4"></select> <select class="dummy-select svelte-pdppv4" tabindex="-1"></select> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="svelte-pdppv4"><path d="M6 0l12 12-12 12z" transform="rotate(90, 12, 12)"></path></svg></div> <button type="button" aria-label="Next month" class="page-button svelte-pdppv4" tabindex="-1"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="svelte-pdppv4"><path d="M5 3l3.057-3 11.943 12-11.943 12-3.057-3 9-9z"></path></svg></button></div> <div class="header svelte-pdppv4"></div> <!> <!> <!></div></div>');function iu(e,r){kt(r,!1);const n=h(),i=h(),s=h(),a=h(),o=we.createEventDispatcher();let c=m(r,"value",12,null);function u(me){var V;me.getTime()!==((V=c())==null?void 0:V.getTime())&&(l(C,xo(c()??t(C),me,E(),A(),I())),dh(t(C),S()),c(ui(t(C))))}function g(me){l(C,Io(me,E(),A())),!R()&&c()&&u(t(C))}function d(me){return l(C,nu(me,E(),A())),c()&&u(t(C)),t(C)}const p=new Date,_=new Date;let S=m(r,"timePrecision",8,null),E=m(r,"min",24,()=>new Date(_.getFullYear()-20,0,1)),A=m(r,"max",24,()=>new Date(_.getFullYear(),11,31,23,59,59,999)),I=m(r,"isDisabledDate",8,null);function k(me){var V;return(V=I())==null?void 0:V(new Date(me.year,me.month,me.number))}let C=h(c()?ui(c()):ui(Io(_,E(),A())));function D(me){t(C).getTime()!==(me==null?void 0:me.getTime())&&(l(C,me?ui(me):t(C)),dh(t(C),S()))}let w=h(B(E(),A()));function B(me,V){let fe=[];for(let X=me.getFullYear();X<=V.getFullYear();X++)fe.push(X);return fe}let $=m(r,"locale",24,()=>({})),R=m(r,"browseWithoutSelecting",8,!1);function H(me){t(C).setFullYear(me),g(t(C))}function Z(me){let V=t(C).getFullYear();me===12?(me=0,V++):me===-1&&(me=11,V--);const fe=Do(V,me),X=Math.min(t(C).getDate(),fe);g(new Date(V,me,X,t(C).getHours(),t(C).getMinutes(),t(C).getSeconds(),t(C).getMilliseconds()))}function ue(me){de(me,E(),A())&&!k(me)&&(t(C).setFullYear(0),t(C).setMonth(0),t(C).setDate(1),t(C).setFullYear(me.year),t(C).setMonth(me.month),t(C).setDate(me.number),u(t(C)),o("select",ui(t(C))))}function de(me,V,fe){const X=new Date(me.year,me.month,me.number),q=new Date(V.getFullYear(),V.getMonth(),V.getDate()),he=new Date(fe.getFullYear(),fe.getMonth(),fe.getDate());return X>=q&&X<=he}function Se(me){if(me.shiftKey&&me.key==="ArrowUp")H(t(C).getFullYear()-1);else if(me.shiftKey&&me.key==="ArrowDown")H(t(C).getFullYear()+1);else if(me.shiftKey&&me.key==="ArrowLeft")Z(t(C).getMonth()-1);else if(me.shiftKey&&me.key==="ArrowRight")Z(t(C).getMonth()+1);else return!1;return me.preventDefault(),!0}function ce(me){if(me.shiftKey||me.altKey){Se(me);return}else if(me.key==="ArrowUp")H(t(C).getFullYear()-1);else if(me.key==="ArrowDown")H(t(C).getFullYear()+1);else if(me.key==="ArrowLeft")Z(t(C).getMonth()-1);else if(me.key==="ArrowRight")Z(t(C).getMonth()+1);else{Se(me);return}me.preventDefault()}function ke(me){if(me.shiftKey||me.altKey){Se(me);return}else if(me.key==="ArrowUp"||me.key==="ArrowLeft")Z(t(C).getMonth()-1);else if(me.key==="ArrowDown"||me.key==="ArrowRight")Z(t(C).getMonth()+1);else{Se(me);return}me.preventDefault()}function De(me){var fe,X;let V=me.shiftKey||me.altKey;if(!(((fe=me.target)==null?void 0:fe.tagName)==="SELECT"||((X=me.target)==null?void 0:X.tagName)==="SPAN")){if(V){Se(me);return}else if(me.key==="ArrowUp")t(C).setDate(t(C).getDate()-7),u(t(C));else if(me.key==="ArrowDown")t(C).setDate(t(C).getDate()+7),u(t(C));else if(me.key==="ArrowLeft")t(C).setDate(t(C).getDate()-1),u(t(C));else if(me.key==="ArrowRight")t(C).setDate(t(C).getDate()+1),u(t(C));else if(me.key==="Enter")u(t(C)),o("select",ui(t(C)));else return;me.preventDefault()}}x(()=>(v(c()),v(A()),v(E()),v(I()),t(C)),()=>{var me;c()&&c()>A()?u(xo(c(),A(),E(),A(),I())):c()&&c()<E()?u(xo(c(),E(),E(),A(),I())):c()&&((me=I())!=null&&me(c()))&&u(xo(t(C),c(),E(),A(),I()))}),x(()=>v(c()),()=>{D(c())}),x(()=>(v(E()),v(A())),()=>{l(w,B(E(),A()))}),x(()=>v($()),()=>{l(n,hy($()))}),x(()=>t(C),()=>{l(i,t(C).getFullYear())}),x(()=>t(C),()=>{l(s,t(C).getMonth())}),x(()=>(t(C),t(n)),()=>{l(a,dy(t(C),t(n).weekStartsOn))}),Pt(),Ot();var ye=Ey(),le=j(ye),Q=j(le),Y=j(Q),J=Ee(Y,2),K=j(J);xt(K,5,()=>(t(n),b(()=>t(n).months)),Nt,(me,V,fe)=>{var X=gy(),q=j(X);X.value=X.__value=fe,Ce(he=>{X.disabled=he,Xe(q,t(V))},[()=>(t(i),v(Do),v(E()),v(A()),b(()=>new Date(t(i),fe,Do(t(i),fe),23,59,59,999)<E()||new Date(t(i),fe)>A()))]),y(me,X)});var ie;Cc(K);var z=Ee(K,2);xt(z,5,()=>(t(n),b(()=>t(n).months)),Nt,(me,V,fe)=>{var X=vy(),q=j(X);X.value=X.__value=fe,Ce(()=>{kc(X,fe===t(s)),Xe(q,t(V))}),y(me,X)});var ge=Ee(J,2),O=j(ge);xt(O,5,()=>t(w),Nt,(me,V)=>{var fe=py(),X=j(fe),q={};Ce(()=>{Xe(X,t(V)),q!==(q=t(V))&&(fe.value=(fe.__value=t(V))??"")}),y(me,fe)});var G;Cc(O);var re=Ee(O,2);xt(re,5,()=>t(w),Nt,(me,V)=>{var fe=my(),X=j(fe),q={};Ce(he=>{kc(fe,he),Xe(X,t(V)),q!==(q=t(V))&&(fe.value=(fe.__value=t(V))??"")},[()=>(t(V),t(C),b(()=>t(V)===t(C).getFullYear()))]),y(me,fe)});var ae=Ee(ge,2),ee=Ee(Q,2);xt(ee,4,()=>Array(7),Nt,(me,V,fe)=>{var X=Ze(),q=Ue(X);{var he=te=>{var M=_y(),T=j(M);Ce(()=>Xe(T,(t(n),b(()=>t(n).weekdays[t(n).weekStartsOn+fe])))),y(te,M)},P=te=>{var M=by(),T=j(M);Ce(()=>Xe(T,(t(n),b(()=>t(n).weekdays[t(n).weekStartsOn+fe-7])))),y(te,M)};oe(q,te=>{t(n),b(()=>fe+t(n).weekStartsOn<7)?te(he):te(P,!1)})}y(me,X)});var pe=Ee(ee,2);xt(pe,0,()=>Array(6),Nt,(me,V,fe)=>{var X=wy();xt(X,5,()=>(t(a),b(()=>t(a).slice(fe*7,fe*7+7))),Nt,(q,he)=>{var P=yy();let te;var M=j(P),T=j(M);Ce(N=>{te=Pe(P,1,"cell svelte-pdppv4",null,te,N),Xe(T,(t(he),b(()=>t(he).number)))},[()=>({disabled:!de(t(he),E(),A())||k(t(he)),selected:c()&&t(he).year===c().getFullYear()&&t(he).month===c().getMonth()&&t(he).number===c().getDate(),today:t(he).year===p.getFullYear()&&t(he).month===p.getMonth()&&t(he).number===p.getDate(),"other-month":t(he).month!==t(s)})]),W("click",P,()=>ue(t(he))),y(q,P)}),y(me,X)});var Ne=Ee(pe,2);uy(Ne,{get timePrecision(){return S()},setTime:d,get browseDate(){return t(C)},set browseDate(me){l(C,me)},$$legacy:!0});var He=Ee(Ne,2);mr(He,r,"default",{},null),Ce(()=>{ie!==(ie=t(s))&&(K.value=(K.__value=t(s))??"",vl(K,t(s))),G!==(G=t(i))&&(O.value=(O.__value=t(i))??"",vl(O,t(i)))}),W("click",Y,()=>Z(t(C).getMonth()-1)),W("keydown",K,ke),W("input",K,me=>Z(parseInt(me.currentTarget.value))),W("input",O,me=>H(parseInt(me.currentTarget.value))),W("keydown",O,ce),W("click",ae,()=>Z(t(C).getMonth()+1)),W("focusout",ye,function(me){Yn.call(this,r,me)}),W("keydown",ye,De),y(e,ye),Dt()}var Sy=U("<i></i>"),Cy=U('<div> <i class="ri-calendar-line" style="font-size: 16px; justify-self: flex-end"></i></div>'),Ay=U("<div><span> </span></div>"),Ty=U('<div class="time-section svelte-oxi4kl"><input type="time" class="time-input svelte-oxi4kl" step="900"/></div>'),ky=U('<div class="datetime-picker-container svelte-oxi4kl"><!> <!></div>'),Dy=U("<div><!> <!></div> <!>",1);function au(e,r){kt(r,!1);const n=()=>Be(w(),"$cellState",i),[i,s]=Gt(),a=h(),o=h(),c=h(),u=h(),g=h(),d=h(),p=h(),_=h(),S=new we.createEventDispatcher,{processStringSync:E}=we.getContext("sdk");let A=m(r,"value",12),I=m(r,"formattedValue",12),k=m(r,"cellOptions",8),C=m(r,"autofocus",8),D=h(),w=m(r,"cellState",24,()=>sr("View",{"*":{goTo(z){return z}},View:{focus(){if(!k().readonly)return"Editing"}},Editing:{_enter(){l(D,A()),l(H,!0),S("enteredit")},_exit(){S("exitedit")},handleKeyboard(z){z.keyCode==32&&(z.stopPropagation(),z.preventDefault(),l(H,!t(H)))},focusout(z){var G,re;const ge=(G=t($))==null?void 0:G.contains(z.relatedTarget),O=(re=t(R))==null?void 0:re.contains(z.relatedTarget);if(!ge&&!O)return l(H,!1),A()!=t(D)&&S("change",A()),"View"},cancel(){return A(Array.isArray(t(D))?[...t(D)]:t(D)),"View"}}})),B=h(),$=h(),R=h(),H=h();function Z(){if(!A())return"00:00";const z=new Date(A());return`${z.getHours().toString().padStart(2,"0")}:${z.getMinutes().toString().padStart(2,"0")}`}function ue(z,ge){if(!z)return"";if(!ge||ge==="default")return z==null?void 0:z.toDateString();if(ge==="MM/DD/YYYY")return`${(z.getMonth()+1).toString().padStart(2,"0")}/${z.getDate().toString().padStart(2,"0")}/${z.getFullYear()}`;if(ge==="DD/MM/YYYY")return`${z.getDate().toString().padStart(2,"0")}/${(z.getMonth()+1).toString().padStart(2,"0")}/${z.getFullYear()}`;if(ge==="YYYY-MM-DD")return`${z.getFullYear()}-${(z.getMonth()+1).toString().padStart(2,"0")}-${z.getDate().toString().padStart(2,"0")}`;const G={"MMM DD, YYYY":{month:"short",day:"numeric",year:"numeric",timeZone:"UTC"},"DD MMM YYYY":{day:"numeric",month:"short",year:"numeric",timeZone:"UTC"}}[ge];return G?z.toLocaleDateString("en-US",G):z==null?void 0:z.toDateString()}we.onMount(()=>{C()&&setTimeout(()=>{w().focus(),editor==null||editor.focus()},30)});const de=z=>{if(!A()||!t(o))return;const ge=z.target.value,O=new Date(A()),[G,re]=ge.split(":").map(Number);O.setHours(G,re,0,0),A(O.toISOString()),S("change",A())};x(()=>v(k()),()=>{var z;l(a,(z=k())==null?void 0:z.dateFormat)}),x(()=>v(k()),()=>{var z;l(o,(z=k())==null?void 0:z.showTime)}),x(()=>(t(o),v(A())),()=>{l(c,t(o)&&A()?Z():"00:00")}),x(()=>v(A()),()=>{l(u,A()?new Date(A()):new Date)}),x(()=>(v(k()),v(A()),t(u),t(a)),()=>{I(k().template&&A()?E(k().template,{value:A()}):A()?ue(t(u),t(a)):"")}),x(()=>v(k()),()=>{var z;l(g,((z=k())==null?void 0:z.placeholder)||"")}),x(()=>n(),()=>{l(d,n()=="Editing")}),x(()=>v(k()),()=>{l(p,k().role=="inlineInpur")}),x(()=>(t(d),t(D),v(A())),()=>{l(_,t(d)&&t(D)!=A())}),Pt(),Ot();var Se=Dy(),ce=Ue(Se);let ke,De;var ye=j(ce);{var le=z=>{var ge=Sy();Ce(()=>Pe(ge,1,(v(k()),b(()=>k().icon+" icon")),"svelte-oxi4kl")),y(z,ge)};oe(ye,z=>{v(k()),b(()=>k().icon)&&z(le)})}var Q=Ee(ye,2);{var Y=z=>{var ge=Cy();let O;var G=j(ge);Ce(()=>{O=Pe(ge,1,"editor",null,O,{"with-icon":k().icon,placeholder:!I()}),Xe(G,`${(I()||t(g))??""} `)}),W("click",ge,()=>l(H,!t(H))),y(z,ge)},J=z=>{var ge=Ay();let O,G;var re=j(ge),ae=j(re);Ce(()=>{O=Pe(ge,1,"value",null,O,{"with-icon":k().icon,placeholder:!I()}),G=We(ge,"",G,{"justify-content":(v(k()),b(()=>k().align))}),Xe(ae,I()||t(g))}),y(z,ge)};oe(Q,z=>{t(d)?z(Y):z(J,!1)})}ht(ce,z=>l(B,z),()=>t(B));var K=Ee(ce,2);{var ie=z=>{Qr(z,{get anchor(){return t(B)},dismissible:!1,get open(){return t(H)},align:"right",maxHeight:400,children:(ge,O)=>{var G=ky();We(G,"",{},{"--date-picker-background":"var(--spectrum-global-color-gray-75)","--date-picker-foreground":"var(--spectrum-global-color-gray-800)","--date-picker-selected-background":"var(--accent-color)"});var re=j(G);iu(re,{get value(){return t(u)},set value(pe){l(u,pe)},$$events:{select:pe=>{var Ne;A(pe.detail),(Ne=t(B))==null||Ne.focus(),l(H,!1)}},$$legacy:!0});var ae=Ee(re,2);{var ee=pe=>{var Ne=Ty(),He=j(Ne);ht(He,me=>l(R,me),()=>t(R)),ea(He,()=>t(c),me=>l(c,me)),W("change",He,de),y(pe,Ne)};oe(ae,pe=>{t(o)&&pe(ee)})}ht(G,pe=>l($,pe),()=>t($)),y(ge,G)},$$slots:{default:!0}})};oe(K,z=>{t(d)&&z(ie)})}Ce(()=>{ke=Pe(ce,1,"superCell",null,ke,{inEdit:t(d),isDirty:t(_)&&k().showDirty,inline:t(p),tableCell:k().role=="tableCell",formInput:k().role=="formInput",disabled:k().disabled,readonly:k().readonly,error:k().error}),Lt(ce,"tabindex",(v(k()),b(()=>k().readonly||k().disabled?"-1":"0"))),De=We(ce,"",De,{color:(v(k()),b(()=>k().color)),background:(v(k()),b(()=>k().background)),"font-weight":(v(k()),b(()=>k().fontWeight))})}),W("focus",ce,function(...z){var ge;(ge=w().focus)==null||ge.apply(this,z)}),W("keypress",ce,function(...z){var ge;(ge=w().handleKeyboard)==null||ge.apply(this,z)}),W("focusout",ce,function(...z){var ge;(ge=w().focusout)==null||ge.apply(this,z)}),y(e,Se),Dt(),s()}var xy=U('<div> <i class="ri-add-line svelte-r807au"></i></div>'),Oy=U('<div class="option wide loading svelte-r807au"><i class="ri-loader-2-line rotating svelte-r807au"></i> Loading more...</div>'),Iy=U("<!> <!>",1),Ry=U('<div class="option wide loading svelte-r807au"><i class="ri-loader-2-line rotating svelte-r807au"></i> Loading...</div>'),Py=U('<div class="option wide svelte-r807au">No Results Found</div>'),My=U('<div class="option wide selected svelte-r807au"> <i class="ri-close-line svelte-r807au"></i></div>'),Ny=U('<span class="svelte-r807au">Nothing Selected</span>'),Ly=U('<div class="listWrapper svelte-r807au"><div class="list svelte-r807au"><div class="options svelte-r807au"><!></div></div> <div class="list listSelected svelte-r807au"><div class="options svelte-r807au"><!></div></div></div>'),Fy=U('<div> <i class="ri-check-line svelte-r807au"></i></div>'),Vy=U('<div class="option loading svelte-r807au"><i class="ri-loader-2-line rotating svelte-r807au"></i> Loading more...</div>'),Uy=U("<!> <!>",1),By=U('<div class="option loading svelte-r807au"><i class="ri-loader-2-line rotating svelte-r807au"></i> Loading...</div>'),Hy=U('<div class="option svelte-r807au">No Results Found</div>'),zy=U('<div class="listWrapper svelte-r807au"><div class="list svelte-r807au"><div class="options svelte-r807au"><!></div></div></div>'),jy=U('<div class="control svelte-r807au"><div class="searchControl svelte-r807au"><i></i> <input type="text"/></div> <!></div>');function fh(e,r){kt(r,!1);const n=()=>Be(t(g),"$fetch",i),[i,s]=Gt(),a=h(),o=h(),c=h(),u=h(),g=h(),d=h(),{API:p,fetchData:_}=we.getContext("sdk"),S=we.createEventDispatcher();let E=m(r,"value",24,()=>[]),A=m(r,"fieldSchema",8),I=m(r,"filter",24,()=>[]),k=m(r,"wide",8,!1),C=m(r,"singleSelect",8);A();let D=A().tableId,w=[],B=h(-1),$=h(),R=h(),H=15,Z=h(),ue=!0;const de=ee=>{if(E())return E().find(Ne=>Ne._id==ee._id)},Se=ee=>{var pe;if(C())((pe=t(u)[0])==null?void 0:pe._id)==ee._id?l(u,[]):l(u,[{_id:ee._id,primaryDisplay:ee[t(d)]}]);else{let Ne=t(u).findIndex(He=>He._id==ee._id);Ne>-1?(t(u).splice(Ne,1),l(u,t(u))):(t(u).push({_id:ee._id,primaryDisplay:ee[t(d)]}),l(u,t(u)))}S("change",t(u))},ce=ee=>{t(u).splice(t(u).findIndex(pe=>pe._id===ee._id),1),l(u,t(u)),S("change",t(u))},ke=ee=>{var pe;l(R,ee.target.value),ee.target.value?w=[...I(),{field:t(d),type:"string",operator:"fuzzy",value:ee.target.value,valueType:"Value"}]:w=I()??[],(pe=t(g))==null||pe.update({filter:w})},De=()=>{var ee,pe;(ee=n())!=null&&ee.loading||n().rows.length<H||(H+=100,(pe=t(g))==null||pe.update({limit:H}))},ye=ee=>{const pe=ee.target,Ne=pe.scrollTop,He=pe.scrollHeight,me=pe.clientHeight;Ne+me>=He-50&&De()},le=ee=>{ee.key=="ArrowDown"?(ee.preventDefault(),l(B,t(B)+1),t(B)>n().rows.length-1&&l(B,0)):ee.key=="ArrowUp"?(ee.preventDefault(),l(B,t(B)-1),t(B)<0&&l(B,n().rows.length-1)):ee.key=="Enter"&&t(B)>-1&&Se(n().rows[t(B)])},Q={focus:()=>{var ee;(ee=t($))==null||ee.focus()},hasFocus:()=>document.activeElement===t($)};x(()=>v(A()),()=>{var ee,pe;l(a,(pe=(ee=A())==null?void 0:ee.type)==null?void 0:pe.includes("bb_reference"))}),x(()=>(t(a),v(A())),()=>{var ee,pe;l(o,t(a)&&!((pe=(ee=A())==null?void 0:ee.type)!=null&&pe.includes("_single")))}),x(()=>t(a),()=>{l(c,t(a)?"user":"table")}),x(()=>v(E()),()=>{l(u,Array.isArray(E())?E():[])}),x(()=>(t(c),v(I())),()=>{on(l(g,_({API:p,datasource:{type:t(c),tableId:D},options:{filter:I(),limit:15}})),"$fetch",i)}),x(()=>n(),()=>{var ee,pe;l(d,((pe=(ee=n())==null?void 0:ee.definition)==null?void 0:pe.primaryDisplay)||"email")}),x(()=>(n(),t(B)),()=>{var ee;(ee=n())!=null&&ee.rows&&l(B,Math.min(t(B),n().rows.length-1))}),x(()=>(n(),t(Z)),()=>{var ee,pe;((pe=(ee=n())==null?void 0:ee.rows)==null?void 0:pe.length)>0}),Pt();var Y={api:Q};Ot();var J=jy(),K=j(J),ie=j(K);let z;var ge=Ee(ie,2);let O;ht(ge,ee=>l($,ee),()=>t($));var G=Ee(K,2);{var re=ee=>{var pe=Ze(),Ne=Ue(pe);{var He=V=>{var fe=Ly(),X=j(fe),q=j(X),he=j(q);$i(he,()=>t(u),ne=>{var ve=Ze(),Oe=Ue(ve);{var Me=se=>{var Ie=Iy(),Le=Ue(Ie);xt(Le,1,()=>(n(),b(()=>{var Ae;return((Ae=n())==null?void 0:Ae.rows)||[]})),Nt,(Ae,Ge,$e)=>{var Je=Ze(),rt=Ue(Je);{var st=ut=>{var it=xy(),_e=es(()=>Se(t(Ge)));let qe;var Ye=j(it);Ce(()=>{qe=Pe(it,1,"option wide svelte-r807au",null,qe,{highlighted:t(B)==$e}),Xe(Ye,`${t(Ge),t(d),b(()=>t(Ge)[t(d)])??""} `)}),W("mouseenter",it,()=>l(B,$e)),W("mouseleave",it,()=>l(B,-1)),W("mousedown",it,$t(fr(function(...ot){var Te;(Te=t(_e))==null||Te.apply(this,ot)}))),y(ut,it)};oe(rt,ut=>{t(Ge),b(()=>!de(t(Ge)))&&ut(st)})}y(Ae,Je)});var je=Ee(Le,2);{var Fe=Ae=>{var Ge=Oy();y(Ae,Ge)};oe(je,Ae=>{n(),b(()=>{var Ge;return((Ge=n())==null?void 0:Ge.loading)&&n().loaded})&&Ae(Fe)})}y(se,Ie)},Re=se=>{var Ie=Ze(),Le=Ue(Ie);{var je=Ae=>{var Ge=Ry();y(Ae,Ge)},Fe=Ae=>{var Ge=Py();y(Ae,Ge)};oe(Le,Ae=>{n(),b(()=>{var Ge;return(Ge=n())==null?void 0:Ge.loading})?Ae(je):Ae(Fe,!1)},!0)}y(se,Ie)};oe(Oe,se=>{n(),b(()=>{var Ie,Le,je;return((Le=(Ie=n())==null?void 0:Ie.rows)==null?void 0:Le.length)||((je=n())==null?void 0:je.loading)&&!ue})?se(Me):se(Re,!1)})}y(ne,ve)}),ht(X,ne=>l(Z,ne),()=>t(Z));var P=Ee(X,2),te=j(P),M=j(te);{var T=ne=>{var ve=Ze(),Oe=Ue(ve);xt(Oe,1,()=>t(u),Nt,(Me,Re)=>{var se=Ze(),Ie=Ue(se);{var Le=je=>{var Fe=My(),Ae=es(()=>ce(t(Re))),Ge=j(Fe);Ce(()=>Xe(Ge,`${t(Re),b(()=>t(Re).primaryDisplay)??""} `)),dl(3,Fe,()=>Nc,()=>({x:-20,duration:130})),W("mousedown",Fe,$t(fr(function(...$e){var Je;(Je=t(Ae))==null||Je.apply(this,$e)}))),y(je,Fe)};oe(Ie,je=>{t(Re),b(()=>de(t(Re)))&&je(Le)})}y(Me,se)}),y(ne,ve)},N=ne=>{var ve=Ny();y(ne,ve)};oe(M,ne=>{t(u),b(()=>t(u).length)?ne(T):ne(N,!1)})}W("scroll",X,ye),W("mousedown",fe,$t(()=>{})),y(V,fe)},me=V=>{var fe=zy(),X=j(fe),q=j(X),he=j(q);$i(he,()=>t(u),P=>{var te=Ze(),M=Ue(te);{var T=ne=>{var ve=Uy(),Oe=Ue(ve);xt(Oe,1,()=>(n(),b(()=>{var se;return((se=n())==null?void 0:se.rows)||[]})),Nt,(se,Ie,Le)=>{var je=Fy(),Fe=es(()=>Se(t(Ie)));let Ae;var Ge=j(je);Ce($e=>{Ae=Pe(je,1,"option svelte-r807au",null,Ae,$e),Xe(Ge,`${t(Ie),t(d),b(()=>t(Ie)[t(d)])??""} `)},[()=>({selected:de(t(Ie)),highlighted:t(B)==Le})]),W("mouseenter",je,()=>l(B,Le)),W("mouseleave",je,()=>l(B,-1)),W("mousedown",je,$t(fr(function(...$e){var Je;(Je=t(Fe))==null||Je.apply(this,$e)}))),y(se,je)});var Me=Ee(Oe,2);{var Re=se=>{var Ie=Vy();y(se,Ie)};oe(Me,se=>{n(),b(()=>{var Ie;return((Ie=n())==null?void 0:Ie.loading)&&n().loaded})&&se(Re)})}y(ne,ve)},N=ne=>{var ve=Ze(),Oe=Ue(ve);{var Me=se=>{var Ie=By();y(se,Ie)},Re=se=>{var Ie=Hy();y(se,Ie)};oe(Oe,se=>{n(),b(()=>{var Ie;return(Ie=n())==null?void 0:Ie.loading})?se(Me):se(Re,!1)},!0)}y(ne,ve)};oe(M,ne=>{n(),b(()=>{var ve,Oe,Me,Re;return((Oe=(ve=n())==null?void 0:ve.rows)==null?void 0:Oe.length)||((Me=n())==null?void 0:Me.loading)&&!((Re=n())!=null&&Re.loaded)})?ne(T):ne(N,!1)})}y(P,te)}),ht(X,P=>l(Z,P),()=>t(Z)),W("scroll",X,ye),W("mousedown",fe,$t(()=>{})),y(V,fe)};oe(Ne,V=>{k()?V(He):V(me,!1)})}y(ee,pe)};oe(G,ee=>{n(),b(()=>{var pe;return(pe=n())==null?void 0:pe.rows})&&ee(re)})}Ce(()=>{Pe(ie,1,Cn((n(),t($),b(()=>{var ee;return n().loading&&ue?"ri-loader-2-line":(ee=t($))!=null&&ee.value?"ri-filter-fill":"ri-search-line"}))),"svelte-r807au"),z=We(ie,"",z,{color:t(R)?"var(--spectrum-global-color-blue-400)":"var(--spectrum-global-color-gray-700)"}),O=Pe(ge,1,"search svelte-r807au",null,O,{placeholder:!t(R)}),Lt(ge,"placeholder",(n(),b(()=>{var ee,pe,Ne;return(ee=n())!=null&&ee.loading&&!((Ne=(pe=n())==null?void 0:pe.rows)!=null&&Ne.length)&&ue?"Loading...":"Search"})))}),W("input",ge,ke),W("keydown",ge,le),y(e,J),vr(r,"api",Q);var ae=Dt(Y);return s(),ae}var Gy=U("<i></i>"),qy=U('<ul class="spectrum-TreeView"></ul>'),Wy=U('<li><div class="spectrum-TreeView-itemLink svelte-146t7q6"><i></i> <div><div class="spectrum-TreeView-itemLabel"> </div></div> <!></div> <!> <!></li>');function su(e,r){kt(r,!1);const n=()=>Be(E(),"$selectedGroups",s),i=()=>Be(S(),"$selectedNodes",s),[s,a]=Gt(),o=h(),c=h(),u=h(),g=we.createEventDispatcher();let d=m(r,"tree",8),p=m(r,"open",12,!1),_=m(r,"nodeSelection",8),S=m(r,"selectedNodes",8),E=m(r,"selectedGroups",8),A=h(),I=h(!1),k;const C=()=>{t(u)&&(k&&clearTimeout(k),k=setTimeout(()=>{l(I,!0)},750))},D=()=>{k&&(clearTimeout(k),k=null),l(I,!1)},w=K=>{d().disabled||p()&&B(d().children||[])||(p(!p()),g("nodeClick",{id:d().id,label:d().label}))},B=K=>{if(!K||!K.length)return!1;for(let ie of K)if((ie.isGroup?n().includes(ie.id):i().some(z=>z.id===ie.id))||B(ie.children))return!0;return!1},$=K=>{g("nodeSelect",{id:d().id,label:d().label,row:d().row,group:d().group})};we.onDestroy(()=>{k&&clearTimeout(k)}),x(()=>v(d()),()=>{d().disabled&&p(!1)}),x(()=>(v(d()),n(),i()),()=>{l(o,d().isGroup?n().includes(d().id):!!i().find(K=>K.id==d().id))}),x(()=>v(d()),()=>{B(d().children||[])&&p(!0)}),x(()=>t(A),()=>{l(c,t(A)&&t(A).scrollWidth>t(A).clientWidth)}),x(()=>(t(c),v(d())),()=>{l(u,t(c)?d().label||"Not Set":null)}),Pt(),Ot();var R=Wy();let H;var Z=j(R);We(Z,"",{},{"padding-right":"0.5rem"});var ue=j(Z);let de;We(ue,"",{},{"font-size":"16px","z-index":"1"});var Se=Ee(ue,2);We(Se,"",{},{width:"100%","z-index":"1"});var ce=j(Se);We(ce,"",{},{"padding-left":"0.25rem","z-index":"10","text-overflow":"ellipsis",overflow:"hidden","white-space":"nowrap"});var ke=j(ce);ht(ce,K=>l(A,K),()=>t(A));var De=Ee(Se,2);{var ye=K=>{var ie=Gy();Pe(ie,1,"ri-checkbox-circle-fill svelte-146t7q6"),We(ie,"",{},{color:"var(--spectrum-global-color-green-500)","font-size":"16px"}),y(K,ie)};oe(De,K=>{t(o)&&K(ye)})}var le=Ee(Z,2);{var Q=K=>{io(K,{get anchor(){return t(A)},get content(){return t(u)},get show(){return t(I)}})};oe(le,K=>{t(u)&&K(Q)})}var Y=Ee(le,2);{var J=K=>{var ie=qy();xt(ie,5,()=>(v(d()),b(()=>d().children)),Nt,(z,ge)=>{var O=Ze(),G=Ue(O);su(G,{get tree(){return t(ge)},get nodeSelection(){return _()},get selectedNodes(){return S()},get selectedGroups(){return E()},get open(){return t(ge),b(()=>t(ge).open)},$$events:{nodeSelect(re){Yn.call(this,r,re)},nodeClick(re){Yn.call(this,r,re)}}}),y(z,O)}),y(K,ie)};oe(Y,K=>{v(d()),b(()=>{var ie;return(ie=d().children)==null?void 0:ie.length})&&K(J)})}Ce(()=>{H=Pe(R,1,"spectrum-TreeView-item svelte-146t7q6",null,H,{"is-disabled":d().disabled,"is-open":p()}),de=Pe(ue,1,"ri-arrow-right-s-line svelte-146t7q6",null,de,{open:p(),"is-disabled":d().children.length==0||d().disabled}),Xe(ke,(v(d()),b(()=>d().label||"Not Set")))}),W("mousedown",ue,fr(w)),W("mouseenter",ce,C),W("mouseleave",ce,D),W("mousedown",Se,$t(fr($))),y(e,R),Dt(),a()}var Yy=U('<div class="search svelte-50nv4i"><!></div>'),Ky=U('<li><div class="spectrum-TreeView-itemLink">Loading</div></li>'),Xy=U('<li><div class="spectrum-TreeView-itemLink">No Matches</div></li>'),Qy=U('<div class="control svelte-50nv4i"><!> <ul style="margin: unset;"><!></ul></div>');function Ro(e,r){kt(r,!1);const n=()=>Be(t(o),"$fetch",s),i=()=>Be(H,"$selectedNodes",s),[s,a]=Gt(),o=h(),c=h(),u=h(),{API:g,fetchData:d,notificationStore:p}=we.getContext("sdk"),_=we.createEventDispatcher();let S=m(r,"value",24,()=>[]),E=m(r,"ownId",8),A=m(r,"fieldSchema",8),I=m(r,"joinColumn",8),k=m(r,"sortColumn",8),C=m(r,"sortOrder",8),D=m(r,"filter",24,()=>[]),w=m(r,"limit",8,250),B=m(r,"multi",8,!1),$=m(r,"quiet",8),R=m(r,"search",8),H=new ai([]),Z=10,ue=I()||A().name,de=[],Se=h({root:!0,id:"root",label:"Super Tree",children:[]});const ce=(re,ae)=>{let ee=[];return re==null||re.forEach(pe=>{pe[ue]==ae[t(u)]&&ee.push({id:pe[t(u)],disabled:pe[t(u)]==E(),disableChildren:!0,label:pe[n().definition.primaryDisplay],children:ce(re,pe)})}),ee},ke=re=>{Ht(Se,t(Se).children=[]),re!=null&&re.length&&(re==null||re.forEach(ae=>{ae[ue]||t(Se).children.push({id:ae[t(u)],disabled:ae[t(u)]==E(),disableChildren:!0,label:ae[n().definition.primaryDisplay],children:ce(re,ae)})}),l(Se,t(Se)))},De=re=>{var ae;if(re.detail.id!=E()){if(B()){let ee=i().findIndex(pe=>pe.id==re.detail.id);ee>-1?(i().splice(ee,1),Qe(H,i())):i().length<Z?Qe(H,[...i(),re.detail]):p.actions.warning("Cannot select more than "+Z+" items")}else Qe(H,((ae=i()[0])==null?void 0:ae.id)!==re.detail.id?[{id:re.detail.id,label:re.detail.label}]:[]);Q.debounce&&_("change",i().map(ee=>({_id:ee.id,primaryDisplay:ee.label})))}},ye=()=>{S()&&S().length&&(Qe(H,[]),Qe(H,S().map(re=>({id:re._id,label:re.primaryDisplay}))))},le=re=>{var ae;re.detail&&re.detail!=""?de=[...D(),{field:t(c),type:"string",operator:"fuzzy",value:re.detail,valueType:"Value"}]:de=D()??[],(ae=t(o))==null||ae.update({filter:de})};let Q={icon:"ri-search-line",initialState:"Editing",role:"inlineInput",debounce:50};x(()=>(v(A()),v(C()),v(k()),v(D()),v(w())),()=>{on(l(o,d({API:g,datasource:{type:"table",tableId:A().tableId},options:{sortOrder:C(),sortColumn:k(),filter:D(),limit:w()}})),"$fetch",s)}),x(()=>n(),()=>{var re,ae;l(c,(ae=(re=n())==null?void 0:re.definition)==null?void 0:ae.primaryDisplay)}),x(()=>n(),()=>{var re,ae,ee;l(u,((ee=(ae=(re=n())==null?void 0:re.definition)==null?void 0:ae.primary)==null?void 0:ee[0])??"_id")}),x(()=>n(),()=>{ke(n().rows)}),x(()=>v(S()),()=>{ye(S())}),Pt(),Ot();var Y=Qy(),J=j(Y);{var K=re=>{var ae=Yy(),ee=j(ae);Jr(ee,{autofocus:!0,get cellOptions(){return Q},$$events:{change:le,exitedit:()=>_("focusout",{})}}),y(re,ae)};oe(J,re=>{R()&&re(K)})}var ie=Ee(J,2);let z;var ge=j(ie);{var O=re=>{var ae=Ze(),ee=Ue(ae);xt(ee,1,()=>(t(Se),b(()=>{var pe;return(pe=t(Se))==null?void 0:pe.children})),Nt,(pe,Ne)=>{su(pe,{get tree(){return t(Ne)},nodeSelection:!0,get selectedNodes(){return H},$$events:{nodeSelect:De}})}),y(re,ae)},G=re=>{var ae=Ze(),ee=Ue(ae);{var pe=He=>{var me=Ky();Pe(me,1,"spectrum-TreeView-item",null,{},{"is-open":!0}),y(He,me)},Ne=He=>{var me=Xy();Pe(me,1,"spectrum-TreeView-item",null,{},{"is-open":!0}),y(He,me)};oe(ee,He=>{n(),b(()=>n().loading)?He(pe):He(Ne,!1)},!0)}y(re,ae)};oe(ge,re=>{n(),b(()=>{var ae;return n().loaded&&((ae=n().rows)==null?void 0:ae.length)})?re(O):re(G,!1)})}Ce(()=>z=Pe(ie,1,"spectrum-TreeView svelte-50nv4i",null,z,{"spectrum-TreeView--quiet":$()})),y(e,Y),Dt(),a()}var Zy=U("<i></i>"),Jy=U("<span> </span>"),$y=U('<div class="item"><i></i> <span> </span></div>'),e0=U('<span class="count"> </span>'),t0=U("<div><!> <!></div>"),r0=U("<span><!> </span>"),n0=U('<i class="ph ph-caret-down control-icon"></i>'),i0=U('<div class="picker-container"><!></div>'),a0=U("<div><!> <div><!></div> <!></div> <!>",1);function Po(e,r){kt(r,!1);const n=()=>Be(Y(),"$cellState",s),i=()=>Be(J,"$editorState",s),[s,a]=Gt(),o=h(),c=h(),u=h(),g=h(),d=h(),p=h(),_=h(),S=h(),E=h(),A=h(),I=h(),k=h(),C=h(),D=h(),w=we.createEventDispatcher(),{API:B}=we.getContext("sdk");let $=m(r,"value",8),R=m(r,"fieldSchema",8),H=m(r,"cellOptions",8),Z=m(r,"simpleView",12,!0),ue=m(r,"filter",24,()=>[]),de=m(r,"limit",8,100),Se=m(r,"ownId",12),ce=m(r,"isUserSelect",8),ke=h(JSON.stringify($())),De=h(),ye=h(),le,Q=h(),Y=m(r,"cellState",24,()=>sr(H().initialState??"View",{"*":{goTo(P){return P},reset(P){l(p,void 0)}},View:{_enter(){},focus(){if(!H().readonly&&!H().disabled)return"Editing"}},Editing:{_enter(){l(ke,JSON.stringify(t(p))),J.open(),w("enteredit")},_exit(){J.close(),w("exitedit")},focusout(P){var te,M;(te=t(De))!=null&&te.contains(P==null?void 0:P.relatedTarget)||(M=t(ye))!=null&&M.contains(P==null?void 0:P.relatedTarget)||this.submit()},clear(){l(p,[])},submit(){return t(S)&&w("change",t(k)&&t(p)?t(p)[0]:t(p)),"View"},cancel(){var P;return l(p,JSON.parse(t(ke))),(P=t(De))==null||P.blur(),"View"}}}));const J=sr("Closed",{Open:{close(){return"Closed"},toggle(){return"Closed"}},Closed:{open(){return"Open"},toggle(){return"Open"}}}),K=P=>{var te;if(P.key=="Escape"&&i()=="Open"){J.close();return}else P.key=="Escape"?Y().cancel():P.keyCode==32&&n()=="Editing"?J.toggle():P.key=="Tab"&&i()=="Open"?Y().focusout():i()=="Open"&&((te=t(Q))==null||te.focus())},ie=P=>{l(p,P.detail),t(I)&&(J.close(),t(De).focus())},z=P=>R().relationshipType=="self"&&P&&!Array.isArray(P)?(B.fetchRow(R().tableId,P,!0).then(te=>{l(p,[{_id:te.id,primaryDisplay:R().primaryDisplay?te[R().primaryDisplay]:te.name||te.id}])}).catch(te=>{l(p,[])}),t(p)||[]):t(o)?$()?[...$()]:[]:$()?[$()]:[];x(()=>v(R()),()=>{var P,te;l(o,!((te=(P=R())==null?void 0:P.type)!=null&&te.includes("_single")))}),x(()=>(v(R()),v(ce())),()=>{var P,te;l(c,((te=(P=R())==null?void 0:P.type)==null?void 0:te.includes("bb_reference"))||ce())}),x(()=>v(H()),()=>{l(u,H().relViewMode=="pills")}),x(()=>v(R()),()=>{l(g,R().type=="link"?"ri-edit-box-line":"ri-user-line")}),x(()=>(v(H()),t(c)),()=>{l(d,H().relViewMode=="links"&&!t(c))}),x(()=>(v(Se()),v(H())),()=>{var P;Se(Se()||((P=H())==null?void 0:P.ownId))}),x(()=>v($()),()=>{l(p,z($()))}),x(()=>n(),()=>{l(_,n()=="Editing")}),x(()=>(t(_),t(ke),t(p)),()=>{l(S,t(_)&&t(ke)!=JSON.stringify(t(p)))}),x(()=>v(H()),()=>{Z(H().relViewMode=="text")}),x(()=>v(H()),()=>{l(E,H().role=="inlineInput")}),x(()=>(v(H()),t(p),t(_)),()=>{var P;l(A,H().controlType=="expanded"&&(((P=t(p))==null?void 0:P.length)>1||t(_)))}),x(()=>(v(R()),t(o)),()=>{var P,te;l(I,((P=R())==null?void 0:P.relationshipType)=="one-to-many"||((te=R())==null?void 0:te.relationshipType)=="self"||!t(o))}),x(()=>(t(c),t(o)),()=>{l(k,t(c)&&!t(o))}),x(()=>v(H()),()=>{l(C,H().placeholder||"")}),x(()=>v(H()),()=>{l(D,H().readonly||H().disabled)}),Pt(),Ot();var ge=a0(),O=Ue(ge);let G,re;var ae=j(O);{var ee=P=>{var te=Zy();Ce(()=>Pe(te,1,(v(H()),b(()=>H().icon+" field-icon")))),y(P,te)};oe(ae,P=>{v(H()),b(()=>{var te;return(te=H())==null?void 0:te.icon})&&P(ee)})}var pe=Ee(ae,2);let Ne;var He=j(pe);{var me=P=>{var te=Jy(),M=j(te);Ce(()=>Xe(M,t(C))),y(P,te)},V=P=>{var te=Ze(),M=Ue(te);{var T=ne=>{var ve=t0();let Oe;var Me=j(ve);xt(Me,1,()=>t(p),Nt,(Ie,Le,je)=>{var Fe=Ze(),Ae=Ue(Fe);{var Ge=$e=>{var Je=$y(),rt=j(Je),st=Ee(rt,2),ut=j(st);Ce(()=>{Pe(rt,1,Cn(t(g))),Xe(ut,(t(Le),b(()=>t(Le).primaryDisplay)))}),W("click",Je,function(...it){var _e;(_e=t(d)?()=>{w("linkClick",t(Le))}:null)==null||_e.apply(this,it)}),y($e,Je)};oe(Ae,$e=>{je<5&&$e(Ge)})}y(Ie,Fe)});var Re=Ee(Me,2);{var se=Ie=>{var Le=e0(),je=j(Le);Ce(()=>Xe(je,`(+ ${t(p),b(()=>t(p).length-5)??""})`)),y(Ie,Le)};oe(Re,Ie=>{t(p),b(()=>t(p).length>5)&&Ie(se)})}Ce(()=>Oe=Pe(ve,1,"items",null,Oe,{pills:t(u),links:t(d),isUser:t(c),withCount:t(p).length>5,inEdit:t(_)})),y(ne,ve)},N=ne=>{var ve=r0(),Oe=j(ve);{var Me=se=>{var Ie=Ni();Ce(()=>Xe(Ie,`(${t(p),b(()=>t(p).length)??""})`)),y(se,Ie)};oe(Oe,se=>{v(H()),t(p),b(()=>H().role=="formInput"&&t(p).length>1)&&se(Me)})}var Re=Ee(Oe);Ce(se=>Xe(Re,` ${se??""}`),[()=>(t(p),b(()=>t(p).map(se=>se.primaryDisplay).join(", ")))]),y(ne,ve)};oe(M,ne=>{t(u)||t(d)?ne(T):ne(N,!1)},!0)}y(P,te)};oe(He,P=>{t(p),b(()=>{var te;return((te=t(p))==null?void 0:te.length)<1})?P(me):P(V,!1)})}var fe=Ee(pe,2);{var X=P=>{var te=n0();y(P,te)};oe(fe,P=>{t(D),v(H()),t(_),b(()=>!t(D)&&(H().role=="formInput"||t(_)))&&P(X)})}ht(O,P=>l(De,P),()=>t(De));var q=Ee(O,2);{var he=P=>{{let te=Rt(()=>i()=="Open");Qr(P,{get anchor(){return t(De)},useAnchorWidth:!0,get open(){return t(te)},get popup(){return t(ye)},set popup(M){l(ye,M)},$$events:{close(...M){var T;(T=Y().cancel)==null||T.apply(this,M)}},children:(M,T)=>{var N=i0(),ne=j(N);{var ve=Me=>{{let Re=Rt(()=>ue()??[]),se=Rt(()=>(v(R()),b(()=>R().relationshipType=="many-to-many"||R().relationshipType=="many-to-one")));Ro(Me,{get fieldSchema(){return R()},get filter(){return t(Re)},get search(){return le},get limit(){return de()},get joinColumn(){return v(H()),b(()=>H().joinColumn)},get value(){return t(p)},get ownId(){return Se()},get multi(){return t(se)},$$events:{change:ie}})}},Oe=Me=>{{let Re=Rt(()=>ue()??[]),se=Rt(()=>(v(H()),t(I),b(()=>H().wide&&!t(I))));fh(Me,{get fieldSchema(){return R()},get filter(){return t(Re)},get singleSelect(){return t(I)},get value(){return t(p)},get search(){return le},get wide(){return t(se)},get api(){return t(Q)},set api(Ie){l(Q,Ie)},$$events:{change:ie},$$legacy:!0})}};oe(ne,Me=>{v(R()),b(()=>R().recursiveTable)?Me(ve):Me(Oe,!1)})}W("keydown",N,Me=>{(Me.key=="Escape"||Me.key=="Tab")&&(t(De).focus(),J.close(),Me.preventDefault())}),y(M,N)},$$slots:{default:!0},$$legacy:!0})}};oe(q,P=>{t(_)&&P(he)})}Ce(()=>{var P;G=Pe(O,1,"superCell",null,G,{isDirty:t(S)&&H().showDirty,inEdit:t(_),inline:t(E),multirow:t(A),tableCell:H().role=="tableCell",formInput:H().role=="formInput",disabled:H().disabled,readonly:t(D),error:H().error}),Lt(O,"tabindex",(v(H()),b(()=>{var te;return(te=H())!=null&&te.disabled?-1:0}))),re=We(O,"",re,{color:(v(H()),b(()=>H().color)),background:(v(H()),b(()=>H().background))}),Ne=Pe(pe,1,"value",null,Ne,{placeholder:((P=t(p))==null?void 0:P.length)<1})}),W("mousedown",O,function(...P){var te;(te=J.toggle)==null||te.apply(this,P)}),W("focusin",O,function(...P){var te;(te=Y().focus)==null||te.apply(this,P)}),W("keydown",O,cs(K)),W("focusout",O,function(...P){var te;(te=Y().focusout)==null||te.apply(this,P)}),y(e,ge),Dt(),a()}var s0=U("<i></i>"),o0=U('<textarea tabindex="0"></textarea>'),l0=U('<input tabindex="0"/>'),u0=U('<i class="ri-close-line clearIcon"></i>'),c0=U("<!> <!>",1),d0=U('<div><span class="svelte-l7bjji"> </span></div>'),f0=U("<div><!> <!></div>");function ou(e,r){kt(r,!1);const n=()=>Be(R(),"$cellState",i),[i,s]=Gt(),a=h(),o=h(),c=h(),u=h(),g=h(),d=we.createEventDispatcher(),{processStringSync:p}=we.getContext("sdk");we.getContext("context");let _=m(r,"value",12,null),S=m(r,"formattedValue",12),E=m(r,"cellOptions",24,()=>({role:"formInput",initialState:"Editing",debounce:250,multiline:!0})),A=m(r,"autofocus",8),I,k=h(),C=h(null),D=h(!0),w=h(),B=h();const $=Q=>{if(Q==null||Q==="")return!0;try{return JSON.parse(typeof Q=="string"?Q:JSON.stringify(Q)),!0}catch{return!1}};let R=m(r,"cellState",24,()=>{var Q;return sr(((Q=E())==null?void 0:Q.initialState)??"View",{"*":{goTo(Y){return Y},reset(){l(C,t(a)),l(B,void 0),l(D,!0)}},View:{_enter(){l(C,t(a)),l(D,$(_()))},focus(){if(!E().readonly&&!E().disabled)return"Editing"}},Editing:{_enter(){l(k,t(a)),l(C,t(a)),l(D,$(_())),d("enteredit")},_exit(){l(k,void 0),d("exitedit"),d("focusout")},clear(){E().debounce&&d("change",null),_(null),l(C,null),l(D,!0)},focusout(Y){this.submit()},submit(){return t(u)&&t(D)&&d("change",t(C)),"View"},cancel(){return _(t(k)),d("cancel"),"View"},handleKeyboard(Y){Y.key=="Enter"&&!E().multiline&&this.submit(),Y.key=="Escape"&&this.cancel()}}})});const H=Q=>{var J;const Y=Q.target.value;l(D,$(Y)),l(C,Y),l(B,new Date),(J=E())!=null&&J.debounce&&t(D)&&(clearTimeout(I),I=setTimeout(()=>{d("change",t(C))},E().debounce??0))},Z=Q=>{Q==null||Q.focus()};we.onMount(()=>{A()&&setTimeout(()=>{R().focus()},50)}),x(()=>v(_()),()=>{l(a,_()&&$(_())&&typeof _()!="string"?JSON.stringify(_()):_())}),x(()=>v(E()),()=>{l(g,E().readonly||E().disabled?"":E().placeholder||"")}),x(()=>(t(a),t(g),v(E())),()=>{l(o,!t(a)||t(a)===""&&t(g)?t(g):$(t(a))?E().multiline?JSON.stringify(JSON.parse(t(a)),null,2):JSON.stringify(JSON.parse(t(a))):"Invalid JSON")}),x(()=>(v(R()),t(a)),()=>{R().reset(t(a))}),x(()=>n(),()=>{l(c,n()=="Editing")}),x(()=>(t(B),t(k),t(C)),()=>{l(u,t(B)&&t(k)!==t(C))}),x(()=>(v(S()),v(E()),t(a)),()=>{var Q;S(!S()&&((Q=E())!=null&&Q.template)?p(E().template,{value:t(a)}):S())}),Pt(),Ot();var ue=f0();let de,Se;var ce=j(ue);{var ke=Q=>{var Y=s0();Ce(()=>Pe(Y,1,(v(E()),b(()=>E().icon+" icon")),"svelte-l7bjji")),y(Q,Y)};oe(ce,Q=>{v(E()),b(()=>E().icon&&!E().multiline)&&Q(ke)})}var De=Ee(ce,2);{var ye=Q=>{var Y=c0(),J=Ue(Y);{var K=O=>{var G=o0();let re,ae;ht(G,ee=>l(w,ee),()=>t(w)),Ut(()=>W("input",G,H)),Ut(()=>W("focusout",G,function(...ee){var pe;(pe=R().focusout)==null||pe.apply(this,ee)})),Ut(()=>W("keydown",G,function(...ee){var pe;(pe=R().handleKeyboard)==null||pe.apply(this,ee)})),zr(G,ee=>Z==null?void 0:Z(ee)),Ce(()=>{re=Pe(G,1,"editor svelte-l7bjji",null,re,{"with-icon":E().icon,placeholder:!_()&&!S()&&!t(C)}),us(G,t(o)),Lt(G,"placeholder",(v(E()),b(()=>{var ee;return((ee=E())==null?void 0:ee.placeholder)??""}))),ae=We(G,"",ae,{"text-align":(v(E()),b(()=>E().align=="center"?"center":E().align=="flex-end"?"right":"left")),"padding-right":(v(E()),b(()=>E().align!="flex-start"?"2rem":"0.75rem")),"white-space":"pre-wrap","overflow-wrap":"break-word","min-height":"8rem","overflow-y":"auto",resize:"vertical"})}),y(O,G)},ie=O=>{var G=l0();let re,ae;ht(G,ee=>l(w,ee),()=>t(w)),Ut(()=>W("input",G,H)),Ut(()=>W("focusout",G,function(...ee){var pe;(pe=R().focusout)==null||pe.apply(this,ee)})),Ut(()=>W("keydown",G,function(...ee){var pe;(pe=R().handleKeyboard)==null||pe.apply(this,ee)})),zr(G,ee=>Z==null?void 0:Z(ee)),Ce(()=>{re=Pe(G,1,"editor svelte-l7bjji",null,re,{"with-icon":E().icon,placeholder:!_()&&!S()&&!t(C)}),us(G,t(C)??""),Lt(G,"placeholder",(v(E()),b(()=>{var ee;return((ee=E())==null?void 0:ee.placeholder)??""}))),ae=We(G,"",ae,{"text-align":(v(E()),b(()=>E().align=="center"?"center":E().align=="flex-end"?"right":"left")),"padding-right":(v(E()),b(()=>E().align!="flex-start"?"2rem":"0.75rem"))})}),y(O,G)};oe(J,O=>{v(E()),b(()=>E().multiline)?O(K):O(ie,!1)})}var z=Ee(J,2);{var ge=O=>{var G=u0();W("mousedown",G,cs($t(function(...re){var ae;(ae=R().clear)==null||ae.apply(this,re)}))),y(O,G)};oe(z,O=>{t(C),v(E()),b(()=>{var G;return t(C)&&((G=E())==null?void 0:G.clearIcon)!==!1})&&O(ge)})}y(Q,Y)},le=Q=>{var Y=d0();let J,K;var ie=j(Y),z=j(ie);Ce(()=>{J=Pe(Y,1,"value svelte-l7bjji",null,J,{multiline:E().multiline,"with-icon":E().icon,placeholder:!_()}),Lt(Y,"tabindex",(v(E()),b(()=>E().readonly||E().disabled?"-1":"0"))),K=We(Y,"",K,{"justify-content":(v(E()),b(()=>E().align))}),Xe(z,t(o))}),W("focusin",Y,function(...ge){var O;(O=R().focus)==null||O.apply(this,ge)}),y(Q,Y)};oe(De,Q=>{t(c)?Q(ye):Q(le,!1)})}Ce(()=>{de=Pe(ue,1,"superCell multirow svelte-l7bjji",null,de,{inEdit:t(c),isDirty:t(u)&&E().showDirty,focused:t(c),inline:E().role=="inlineInput",tableCell:E().role=="tableCell",formInput:E().role=="formInput",disabled:E().disabled,readonly:E().readonly,error:E().error||!t(D),multirow:E().multiline}),Se=We(ue,"",Se,{color:(v(E()),b(()=>E().color)),background:(v(E()),b(()=>E().background)),"font-weight":(v(E()),b(()=>E().fontWeight))})}),y(e,ue),Dt(),s()}var h0=U('<div class="item pill svelte-1dwl5ut"><span> </span></div>'),g0=U('<span class="remaining-count svelte-1dwl5ut"> </span>'),v0=U('<div class="items"><!> <!></div>'),p0=U("<span> </span>"),m0=U('<i class="ph ph-caret-down action-icon svelte-1dwl5ut"></i>'),_0=U('<button class="btn-delete svelte-1dwl5ut" tabindex="-1" aria-label="Delete" title="Delete" type="button"><i class="ph ph-trash-simple"></i></button>'),b0=U('<div><button class="btn-delete svelte-1dwl5ut" tabindex="-1" aria-label="Delete" title="Delete" type="button"><i class="ph ph-download-simple"></i></button> <div class="pill svelte-1dwl5ut"> </div> <a class="filename svelte-1dwl5ut" download=""> </a> <!></div>'),y0=U('<div class="attachments svelte-1dwl5ut"><!> <button class="btn-upload-empty svelte-1dwl5ut" aria-label="Upload attachment" type="button"><i class="ph ph-plus"></i> Add Attachment</button> <input type="file" style="display: none;"/></div>'),w0=U("<div><div><!> <!></div></div> <!>",1);function lu(e,r){kt(r,!1);const n=()=>Be(R(),"$cellState",i),[i,s]=Gt(),a=h(),o=h(),c=h(),u=h(),g=h(),d=h(),p=we.createEventDispatcher(),{API:_}=we.getContext("sdk");let S=m(r,"value",12),E=m(r,"cellOptions",8),A=m(r,"fieldSchema",8),I=m(r,"tableid",8),k=S(),C=h(),D=h(),w=h(),B=h(),$=h(),R=m(r,"cellState",24,()=>sr(E().initialState??"View",{"*":{goTo(O){return O}},View:{_enter(){l(w,!1)},focus(){if(!E().readonly)return"Editing"}},Editing:{_enter(){k=S(),p("enteredit")},_exit(){p("exitedit")},toggle(){l(w,!t(w))},focusout(O){var G,re;if(!((G=t(C))!=null&&G.contains(O.relatedTarget))&&!((re=t(D))!=null&&re.contains(O.relatedTarget)))return S()!==k&&p("change",S()),"View"},change(O){E().debounce&&p("change",S())},submit(O){if(!t(D).contains(O.relatedTarget))return S()!==k&&p("change",S()),p("focusout"),"View"},cancel(){return S(k),"View"}}}));const H=async O=>{let G=new FormData;for(let re=0;re<O.length;re++)G.append("file",O[re]);try{let re=await _.uploadAttachment(I(),G);return l(o,[...t(o),...re]),p("change",[...t(o)]),re}catch(re){return console.error("Upload failed:",re),[]}};function Z(O){const G=O.target,re=Array.from(G.files||[]);H(re)}async function ue(O){t(o).splice(O,1),l(o,t(o)),p("change",t(o))}x(()=>v(A()),()=>{var O,G;l(a,((G=(O=A())==null?void 0:O.type)==null?void 0:G.includes("single"))!==!0)}),x(()=>(v(S()),t(a)),()=>{l(o,S()&&t(a)?S():S()?[S()]:[])}),x(()=>n(),()=>{l(c,n()=="Editing")}),x(()=>v(E()),()=>{l(u,E().readonly)}),x(()=>v(E()),()=>{l(g,E().disabled)}),x(()=>v(E()),()=>{l(d,E().placeholder??"")}),Pt(),Ot();var de=w0(),Se=Ue(de);let ce,ke;var De=j(Se);let ye,le;var Q=j(De);{var Y=O=>{var G=v0(),re=j(G);xt(re,1,()=>(t(o),b(()=>t(o).slice(0,5))),Nt,(pe,Ne)=>{var He=Ze(),me=Ue(He);{var V=fe=>{var X=h0();We(X,"",{},{border:"1px solid var(--spectrum-global-color-gray-300)"});var q=j(X),he=j(q);Ce(P=>Xe(he,P),[()=>(t(Ne),b(()=>{var P,te;return(te=(P=t(Ne))==null?void 0:P.extension)==null?void 0:te.toUpperCase()}))]),y(fe,X)};oe(me,fe=>{t(Ne)&&fe(V)})}y(pe,He)});var ae=Ee(re,2);{var ee=pe=>{var Ne=g0(),He=j(Ne);Ce(()=>Xe(He,`( + ${t(o),b(()=>t(o).length-5)??""} )`)),y(pe,Ne)};oe(ae,pe=>{t(o),b(()=>t(o).length>5)&&pe(ee)})}y(O,G)},J=O=>{var G=p0(),re=j(G);Ce(()=>Xe(re,t(d))),y(O,G)};oe(Q,O=>{t(o),t(c),b(()=>t(o).length||t(c))?O(Y):O(J,!1)})}var K=Ee(Q,2);{var ie=O=>{var G=m0();y(O,G)};oe(K,O=>{t(u),t(g),v(E()),b(()=>!t(u)&&!t(g)&&E().role!="tableCell")&&O(ie)})}ht(Se,O=>l(C,O),()=>t(C));var z=Ee(Se,2);{var ge=O=>{Qr(O,{get anchor(){return t(C)},get open(){return t(w)},maxHeight:350,useAnchorWidth:!0,children:(G,re)=>{var ae=y0(),ee=j(ae);{var pe=me=>{var V=Ze(),fe=Ue(V);xt(fe,1,()=>t(o),Nt,(X,q,he)=>{var P=b0();let te;var M=j(P),T=Ee(M,2),N=j(T),ne=Ee(T,2),ve=j(ne),Oe=Ee(ne,2);{var Me=Re=>{var se=_0();W("click",se,()=>ue(he)),y(Re,se)};oe(Oe,Re=>{t(u)||Re(Me)})}Ce(Re=>{te=Pe(P,1,"attachment svelte-1dwl5ut",null,te,{focused:t(B)===he}),Xe(N,Re),Lt(ne,"href",(t(q),b(()=>t(q).url))),Xe(ve,(t(q),b(()=>t(q).name)))},[()=>(t(q),b(()=>{var Re;return(Re=t(q).extension)==null?void 0:Re.toUpperCase()}))]),W("click",M,()=>ue(he)),W("mouseenter",P,()=>l(B,he)),y(X,P)}),y(me,V)};oe(ee,me=>{t(o),b(()=>{var V;return(V=t(o))==null?void 0:V.length})&&me(pe)})}var Ne=Ee(ee,2),He=Ee(Ne,2);ht(He,me=>l($,me),()=>t($)),ht(ae,me=>l(D,me),()=>t(D)),Ce(()=>{Ne.disabled=(v(E()),b(()=>E().disabled||E().readonly)),He.multiple=t(a)}),W("click",Ne,()=>{var me;return(me=t($))==null?void 0:me.click()}),W("change",He,Z),y(G,ae)},$$slots:{default:!0}})};oe(z,O=>{t(c)&&O(ge)})}Ce(()=>{ce=Pe(Se,1,"superCell",null,ce,{inEdit:n()=="Editing",inline:E().role=="inlineInput",tableCell:E().role=="tableCell",formInput:E().role=="formInput",disabled:E().disabled,readonly:E().readonly}),Lt(Se,"tabindex",(v(E()),b(()=>E().readonly||E().disabled?-1:0))),ke=We(Se,"",ke,{color:(v(E()),b(()=>E().color)),background:(v(E()),b(()=>E().background))}),ye=Pe(De,1,"value",null,ye,{placeholder:t(o).length<1}),le=We(De,"",le,{"padding-left":(v(E()),b(()=>E().icon?"32px":E().padding)),"padding-right":(v(E()),b(()=>E().clearValueIcon?"32px":E().padding))})}),W("click",De,function(...O){var G;(G=R().toggle)==null||G.apply(this,O)}),W("focusin",Se,function(...O){var G;(G=R().focus)==null||G.apply(this,O)}),W("focusout",Se,function(...O){var G;(G=R().focusout)==null||G.apply(this,O)}),y(e,de),Dt(),s()}var E0=U('<div class="grabber"></div>'),S0=U("<div><!> <!> <!> <!></div>");function uu(e,r){var ve,Oe,Me,Re;kt(r,!1);const n=()=>Be(D,"$builderStore",g),i=()=>Be(ge,"$lockWidth",g),s=()=>Be(O,"$columnOptionsStore",g),a=()=>Be(ye(),"$stbData",g),o=()=>Be(B,"$stbSortColumn",g),c=()=>Be($,"$stbSortOrder",g),u=()=>Be(w,"$stbSettings",g),[g,d]=Gt(),p=h(),_=h(),S=h(),E=h(),A=h(),{memo:I,derivedMemo:k,processStringSync:C,builderStore:D}=we.getContext("sdk"),w=we.getContext("stbSettings"),B=we.getContext("stbSortColumn"),$=we.getContext("stbSortOrder"),R=we.getContext("stbHovered"),H=we.getContext("stbEditing"),Z=we.getContext("stbState"),ue=we.getContext("stbAPI"),de={string:Jr,longform:Jr,number:Ss,bigint:Ss,options:sa,array:sa,jsonarray:sa,boolean:tu,datetime:au,link:Po,json:ou,attachment_single:lu,attachment:lu,bb_reference_single:Po,bb_reference:Po},Se={string:Jr,number:Ss,bigint:Ss,options:sa,array:sa,jsonarray:sa,boolean:tu,datetime:au,link:Jr,json:ou,attachment_single:null,attachment:null,bb_reference_single:Jr,bb_reference:Jr};let ce=m(r,"columnOptions",8),ke=m(r,"sticky",8),De=m(r,"scrollPos",8),ye=m(r,"stbData",8),le=Math.random()*100,Q=h(),Y=h(),J,K=0,ie=h(),z=h(),ge=I(0);const O=I({...ce(),cellComponent:de[(Oe=(ve=ce())==null?void 0:ve.schema)==null?void 0:Oe.type]??Jr,headerComponent:Se[(Re=(Me=ce())==null?void 0:Me.schema)==null?void 0:Re.type]??Jr}),G=k(O,se=>({role:"tableCell",showDirty:!0,readonly:!se.canEdit,align:se.align,template:se.template,optionsViewMode:se.optionsViewMode,relViewMode:se.relViewMode,padding:se.isFirst?"1rem":"0.5rem",background:se.background,color:se.color,controlType:"checkbox"})),re=k(O,se=>({align:se==null?void 0:se.align,color:se==null?void 0:se.color,background:"var(--spectrum-global-color-gray-50)",fontWeight:se==null?void 0:se.fontWeight,padding:se==null?void 0:se.cellPadding,placeholder:se.defaultFilteringOperator,clearValueIcon:!0,optionsViewMode:"text",optionsSource:"schema",debounce:250,controlType:"select",initialState:"Editing",role:"inlineInput"})),ae=sr("Idle",{"*":{reset(){return"Idle"},headerClicked(){s().canFilter?this.filter():this.sort()},sort(){ce().canSort&&(Z.sortBy(ce().name,t(ie)=="ascending"?"descending":"ascending"),l(ie,"descending"))},lockWidth(){var se;t(Q)||Qe(ge,(se=t(z))==null?void 0:se.clientWidth)},unlockWidth(){t(Q)||(Qe(ge,0),ce().asComponent||this.lockWidth.debounce(50))},startResizing(se){se.stopPropagation(),se.preventDefault(),l(Q,!0),J=se.clientX,K=t(z).clientWidth,Qe(ge,K)},resize(se){Qe(ge,K+se.clientX-J)},stopResizing(se){se.preventDefault(),se.stopPropagation(),l(Q,!1),J=void 0,i()},resetSize(se){se.preventDefault(),se.stopPropagation(),Qe(ge,0)}},Idle:{_enter(){Qe(ge,0)},filter(){return ce().canFilter?"Entering":"Idle"},enteredit(se){if(!t(p))return Qe(H,se),Z.edit(),"EditingCell"},addRow(){return"Inserting"}},Entering:{_enter(){Qe(ge,t(z).clientWidth)},filter(se){return Z.addFilter({...se,id:le}),"Filtered"},cancel(){return"Idle"},clear(){return"Idle"}},Filtered:{filter(se){Z.removeFilter(le),Z.addFilter({...se,id:le})},clear(){return Z.clearFilter(le),"Entering"}},EditingCell:{_enter(){Qe(ge,t(z).clientWidth),Z.edit.debounce(30)},patchRow(se,Ie,Le,je,Fe){Z.patchRow(se,Ie,Le,je,Fe)},exitedit(se){return Qe(H,-1),Z.endEdit.debounce(50),"Idle"}},Inserting:{_enter(){Qe(ge,t(z).clientWidth)},_exit(){Qe(ge,0)},cancelAddRow(){return"Idle"}}}),ee=(se,Ie)=>{if(se&&(Ie!=null&&Ie.includes("."))){for(var Le=0,Ie=Ie.split("."),je=Ie.length;Le<je;Le++)if(se[Ie[Le]])se=se[Ie[Le]];else{se=null;break}return se}else return se[Ie]??void 0},pe=(se,Ie)=>se>0?se:Ie.widthOverride?Ie.widthOverride:Ie.sizing=="fixed"?Ie.fixedWidth:Ie.minWidth,Ne=(se,Ie)=>se>0?se:Ie.widthOverride?Ie.widthOverride:Ie.sizing=="fixed"?Ie.fixedWidth:"unset",He=se=>{let Ie,Le=ce().canEdit;return(se==null?void 0:se.type)=="json",Ie=de[se==null?void 0:se.type]||Jr,Ie==Jr&&!Le&&(Ie=eu),Ie};we.setContext("stColumnOptions",O),we.setContext("stRowCellOptions",G),we.setContext("stHeaderCellOptions",re),we.setContext("stColumnState",ae),we.onMount(()=>{ue==null||ue.registerSuperColumn(le,ae),(s().sizing==="flexible"||s().sizing==="flex")&&s().sizing!=="fixed"&&setTimeout(()=>{t(z)&&i()===0&&!ce().asComponent&&Qe(ge,t(z).clientWidth)},0)}),we.onDestroy(()=>{ue==null||ue.unregisterSuperColumn(le)}),x(()=>n(),()=>{var se;l(p,(se=n())==null?void 0:se.inBuilder)}),x(()=>(v(ce()),t(p),v(ke()),v(De())),()=>{var se,Ie;O.set({...ce(),inBuilder:t(p),cellComponent:He(ce().schema),headerComponent:Se[(Ie=(se=ce())==null?void 0:se.schema)==null?void 0:Ie.type]??Jr,background:ke()&&De()?"var(--spectrum-global-color-gray-75)":ce().quiet?"transparent":ce().background})}),x(()=>(i(),s()),()=>{l(_,Ne(i(),s()))}),x(()=>(i(),s()),()=>{l(S,pe(i(),s()))}),x(()=>(a(),s()),()=>{var se,Ie;l(A,(Ie=(se=a())==null?void 0:se.rows)==null?void 0:Ie.map(Le=>ee(Le,s().name)))}),x(()=>(s(),t(A)),()=>{l(E,s().footerTemplate?C(s().footerTemplate,{values:t(A)}):void 0)}),x(()=>(o(),s(),t(ie),c()),()=>{o()==s().name?l(ie,c()):o()!=s().name&&t(ie)&&l(ie,void 0)}),Pt();var me={columnState:ae};Ot();var V=S0();W("mouseup",Ws,function(...se){var Ie;(Ie=s().canResize?Le=>{t(Q)&&ae.stopResizing(Le)}:null)==null||Ie.apply(this,se)}),W("mousemove",Ws,function(...se){var Ie;(Ie=s().canResize?Le=>{t(Q)&&ae.resize(Le)}:null)==null||Ie.apply(this,se)});let fe,X;var q=j(V);{var he=se=>{var Ie=E0();let Le;Ce(()=>Le=We(Ie,"",Le,{height:(s(),b(()=>s().headerHeight-16))})),W("mousedown",Ie,function(...je){var Fe;(Fe=ae.startResizing)==null||Fe.apply(this,je)}),W("dblclick",Ie,function(...je){var Fe;(Fe=ae.resetSize)==null||Fe.apply(this,je)}),W("mouseenter",Ie,()=>l(Y,!0)),W("mouseleave",Ie,()=>l(Y,!1)),y(se,Ie)};oe(q,se=>{s(),b(()=>s().showHeader&&s().canResize)&&se(he)})}var P=Ee(q,2);{var te=se=>{ib(se,{get sorted(){return t(ie)}})};oe(P,se=>{s(),b(()=>s().showHeader)&&se(te)})}var M=Ee(P,2);{let se=Rt(()=>(a(),b(()=>{var Ie;return(Ie=a())==null?void 0:Ie.rows})));Eb(M,{get rows(){return t(se)},get rowHeight(){return u(),b(()=>u().appearance.rowHeight)},get field(){return s(),b(()=>s().name)},get idField(){return u(),b(()=>u().data.idColumn)},get zebra(){return u(),b(()=>u().appearance.zebraColors)},get isLast(){return s(),b(()=>s().isLast)},get isFirst(){return s(),b(()=>s().isFirst)},children:(Ie,Le)=>{var je=Ze(),Fe=Ue(je);mr(Fe,r,"default",{},null),y(Ie,je)},$$slots:{default:!0}})}var T=Ee(M,2);{var N=se=>{Cb(se,{get footerLabel(){return t(E)}})};oe(T,se=>{s(),b(()=>s().showFooter)&&se(N)})}ht(V,se=>l(z,se),()=>t(z)),Ce(()=>{fe=Pe(V,1,"super-column",null,fe,{sticky:ke()&&De(),resizing:t(Q),considerResizing:t(Y)&&!t(Q),isLast:s().isLast}),X=We(V,"",X,{"max-width":t(_),"min-width":t(S)})}),W("mouseleave",V,()=>Qe(R,null)),y(e,V),vr(r,"columnState",ae);var ne=Dt(me);return d(),ne}var C0=U('<div class="super-column-header"><span></span></div>'),A0=U('<div><div class="row-buttons svelte-1rx9pah"><!> <!></div></div>'),T0=U('<div class="add-row" style="padding: unset;"></div>'),k0=U('<div class="super-column-footer"></div>'),D0=U('<div class="action-menu svelte-1rx9pah"></div>'),x0=U("<div><!> <div></div> <!> <!></div> <!>",1);function hh(e,r){kt(r,!1);const n=()=>Be(D,"$stbSettings",p),i=()=>Be($,"$stbHorizontalScrollPos",p),s=()=>Be(w,"$stbState",p),a=()=>Be(Z,"$stbMenuID",p),o=()=>Be(de,"$stbVisibleRows",p),c=()=>Be(R,"$stbHovered",p),u=()=>Be(ue,"$rowMetadata",p),g=()=>Be(H,"$stbEditing",p),d=()=>Be(B,"$stbData",p),[p,_]=Gt(),S=h(),E=h(),A=h(),I=h(),k=h(),C=h(),D=we.getContext("stbSettings"),w=we.getContext("stbState"),B=we.getContext("stbData"),$=we.getContext("stbHorizontalScrollPos"),R=we.getContext("stbHovered"),H=we.getContext("stbEditing"),Z=we.getContext("stbMenuID"),ue=we.getContext("stbRowMetadata"),de=we.getContext("stbVisibleRows"),Se=we.getContext("stbAPI");let ce=m(r,"right",8),ke=m(r,"rowMenu",8),De=m(r,"rowMenuItems",8),ye=m(r,"menuItemsVisible",8,0),le=m(r,"canScroll",8),Q=h(),Y=h();const J=(V,fe)=>{l(Q,V.target),l(Y,!t(Y)),Qe(Z,t(Y)?fe:-1)};x(()=>n(),()=>{l(S,n().appearance.quiet)}),x(()=>n(),()=>{l(E,n().rowMenuIcon)}),x(()=>(i(),v(ce())),()=>{l(A,i()>0&&!ce())}),x(()=>s(),()=>{l(I,s()=="Inserting")}),x(()=>(v(ye()),v(De())),()=>{var V;l(k,ye()<((V=De())==null?void 0:V.length)?De().slice(0,ye()):De())}),x(()=>(v(ye()),v(De())),()=>{var V;l(C,ye()<((V=De())==null?void 0:V.length)?De().slice(ye(),De().length):[])}),Pt(),Ot();var K=x0(),ie=Ue(K);let z;We(ie,"",{},{flex:"none"});var ge=j(ie);{var O=V=>{var fe=C0();y(V,fe)};oe(ge,V=>{n(),b(()=>n().showHeader)&&V(O)})}var G=Ee(ge,2);let re;We(G,"",{},{"margin-top":"var(--super-column-top-offset)"}),xt(G,5,o,Nt,(V,fe)=>{var X=A0();let q,he;var P=j(X);let te;var M=j(P);{var T=ve=>{var Oe=Ze(),Me=Ue(Oe);xt(Me,1,()=>t(k),Nt,(Re,se)=>{let Ie=()=>t(se).conditions,Le=()=>t(se).disabledTemplate,je=()=>t(se).onClick,Fe=()=>t(se).disabled,Ae=()=>sv(t(se),["conditions","disabledTemplate","onClick","disabled"]);var Ge=Ze(),$e=Ue(Ge);{var Je=rt=>{{let st=Rt(()=>(Fe(),g(),t(fe),u(),Le(),d(),b(()=>{var ut,it;return Fe()||g()==t(fe)||u()[t(fe)].disabled||Se.shouldDisableButton(Le(),Se.enrichContext((it=(ut=d())==null?void 0:ut.rows)==null?void 0:it[t(fe)]))})));ta(rt,kv(Ae,{get disabled(){return t(st)},onClick:()=>{Se.executeRowButtonAction(t(fe),je())}}))}};oe($e,rt=>{Ie(),d(),t(fe),b(()=>{var st,ut;return Se.shouldShowButton(Ie()||[],Se.enrichContext((ut=(st=d())==null?void 0:st.rows)==null?void 0:ut[t(fe)]))})&&rt(Je)})}y(Re,Ge)}),y(ve,Oe)};oe(M,ve=>{v(ke()),t(k),b(()=>{var Oe;return ke()&&((Oe=t(k))==null?void 0:Oe.length)})&&ve(T)})}var N=Ee(M,2);{var ne=ve=>{ta(ve,{size:"S",get icon(){return t(E)},text:"",quiet:"true",type:"secondary",onClick:Oe=>J(Oe,t(fe))})};oe(N,ve=>{v(ke()),t(C),b(()=>{var Oe;return ke()&&((Oe=t(C))==null?void 0:Oe.length)})&&ve(ne)})}Ce(()=>{q=Pe(X,1,"super-row",null,q,{"is-selected":u()[t(fe)].selected,"is-hovered":c()==t(fe)||a()==t(fe),"is-editing":g()==t(fe),"is-disabled":u()[t(fe)].disabled}),he=We(X,"",he,{"min-height":(u(),t(fe),b(()=>u()[t(fe)].height)),"padding-right":le()&&ce()?"1.5rem":"0.5rem"}),te=We(P,"",te,{gap:(t(k),b(()=>t(k).length>1?"0.5rem":"0rem"))})}),W("mouseenter",X,()=>Qe(R,t(fe))),W("mouseleave",X,()=>Qe(R,null)),y(V,X)});var ae=Ee(G,2);{var ee=V=>{var fe=T0();y(V,fe)};oe(ae,V=>{t(I)&&V(ee)})}var pe=Ee(ae,2);{var Ne=V=>{var fe=k0();y(V,fe)};oe(pe,V=>{n(),b(()=>n().showFooter)&&V(Ne)})}var He=Ee(ie,2);{var me=V=>{{let fe=Rt(()=>ce()?"right":"left");Qr(V,{open:!0,get anchor(){return t(Q)},minWidth:150,get align(){return t(fe)},$$events:{close:()=>{l(Y,!1),Qe(Z,void 0)}},children:(X,q)=>{var he=Ze(),P=Ue(he);{var te=M=>{var T=D0();xt(T,5,()=>t(C),Nt,(N,ne)=>{let ve=()=>t(ne).text,Oe=()=>t(ne).icon,Me=()=>t(ne).disabled,Re=()=>t(ne).onClick,se=()=>t(ne).size;{let Ie=Rt(()=>ce()?"right":"left");ta(N,{get size(){return se()},get icon(){return Oe()},get text(){return ve()},get disabled(){return Me()},menuItem:!0,get menuAlign(){return t(Ie)},onClick:()=>{Se.executeRowButtonAction(a(),Re()),l(Y,!1),Qe(Z,void 0)}})}}),y(M,T)};oe(P,M=>{t(C),b(()=>{var T;return(T=t(C))==null?void 0:T.length})&&M(te)})}y(X,he)},$$slots:{default:!0}})}};oe(He,V=>{t(Y)&&V(me)})}Ce(()=>{z=Pe(ie,1,"super-column",null,z,{right:ce(),sticky:t(A)}),re=Pe(G,1,"super-column-body",null,re,{quiet:t(S),sticky:t(A),zebra:n().appearance.zebraColors})}),y(e,K),Dt(),_()}var O0=U('<i class="ph ph-check svelte-4c8yj5"></i>'),I0=U('<i class="ph ph-minus svelte-4c8yj5"></i>'),R0=U("<button><!></button>");function gh(e,r){kt(r,!1);const n=we.createEventDispatcher();let i=m(r,"checked",12,!1),s=m(r,"partial",8,!1),a=m(r,"disabled",8,!1),o=m(r,"hovered",8,!1);function c(){a()||(i(!i()),n("change",{checked:i()}))}Ot();var u=R0();let g;var d=j(u);{var p=S=>{var E=O0();y(S,E)},_=S=>{var E=Ze(),A=Ue(E);{var I=k=>{var C=I0();y(k,C)};oe(A,k=>{s()&&k(I)},!0)}y(S,E)};oe(d,S=>{i()?S(p):S(_,!1)})}Ce(()=>g=Pe(u,1,"svelte-4c8yj5",null,g,{checked:i(),disabled:a(),hovered:o()})),W("click",u,c),y(e,u),Dt()}var P0=U('<span class="row-number"></span>'),M0=U('<div class="control-column-header"><!> <!> <!></div>'),N0=U('<div class="row-number"> </div>'),L0=U("<div><!> <!> <!></div>"),F0=U('<div class="add-row" style="padding: unset;"></div>'),V0=U('<div class="super-column-footer"></div>'),U0=U("<div><!> <div><!> <!></div> <!></div>");function B0(e,r){kt(r,!1);const n=()=>Be(de,"$stbSelected",p),i=()=>Be(le(),"$stbData",p),s=()=>Be(R,"$stbSettings",p),a=()=>Be(H,"$stbHorizontalScrollPos",p),o=()=>Be(ce,"$stbVisibleRows",p),c=()=>Be(ke,"$stbRowMetadata",p),u=()=>Be(Z,"$stbHovered",p),g=()=>Be(ue,"$stbMenuID",p),d=()=>Be($,"$stbState",p),[p,_]=Gt(),S=h(),E=h(),A=h(),I=h(),k=h(),C=h(),D=h(),w=h(),B=h(),$=we.getContext("stbState"),R=we.getContext("stbSettings"),H=we.getContext("stbHorizontalScrollPos"),Z=we.getContext("stbHovered"),ue=we.getContext("stbMenuID"),de=we.getContext("stbSelected"),Se=we.getContext("stbAPI"),ce=we.getContext("stbVisibleRows"),ke=we.getContext("stbRowMetadata");let De=m(r,"sticky",12),ye=m(r,"hideSelectionColumn",8),le=m(r,"stbData",8);x(()=>(n(),i()),()=>{var K,ie;l(S,n().length&&n().length!=((ie=(K=i())==null?void 0:K.rows)==null?void 0:ie.length))}),x(()=>(n(),i()),()=>{var K,ie,z,ge;l(E,n().length==((ie=(K=i())==null?void 0:K.rows)==null?void 0:ie.length)&&((ge=(z=i())==null?void 0:z.rows)==null?void 0:ge.length)>0)}),x(()=>s(),()=>{l(A,s().appearance.numberingColumn)}),x(()=>(s(),v(ye())),()=>{l(I,s().features.canSelect&&!ye())}),x(()=>s(),()=>{l(k,s().features.canDelete)}),x(()=>a(),()=>{De(a()>0)}),x(()=>(t(A),t(I),t(k)),()=>{l(C,t(A)||t(I)||t(k))}),x(()=>s(),()=>{l(D,s().appearance.zebraColors)}),x(()=>s(),()=>{l(w,s().appearance.quiet)}),x(()=>(t(I),s(),o()),()=>{l(B,t(I)&&s().features.maxSelected!=1&&o().length>0)}),Pt(),Ot();var Q=Ze(),Y=Ue(Q);{var J=K=>{var ie=U0();let z;var ge=j(ie);{var O=me=>{var V=M0();We(V,"",{},{gap:"1rem"});var fe=j(V);{var X=M=>{var T=P0();y(M,T)};oe(fe,M=>{t(A)&&M(X)})}var q=Ee(fe,2);{var he=M=>{gh(M,{get checked(){return t(E)},get partial(){return t(S)},$$events:{change(...T){var N;(N=Se.selectAllRows)==null||N.apply(this,T)}}})};oe(q,M=>{t(B)&&M(he)})}var P=Ee(q,2);{var te=M=>{{let T=Rt(()=>(n(),b(()=>n().length==0)));$l(M,{icon:"trash",size:"small",variant:"warning",get disabled(){return t(T)},tooltip:"Delete Selected Rows",$$events:{click(...N){var ne;(ne=Se.deleteSelectedRows)==null||ne.apply(this,N)}}})}};oe(P,M=>{t(k),n(),b(()=>t(k)&&n().length>1)&&M(te)})}y(me,V)};oe(ge,me=>{s(),b(()=>{var V;return(V=s())==null?void 0:V.showHeader})&&me(O)})}var G=Ee(ge,2);let re;We(G,"",{},{"margin-top":"var(--super-column-top-offset)"});var ae=j(G);xt(ae,1,o,me=>me,(me,V)=>{const fe=Rt(()=>(c(),t(V),b(()=>{var ve;return(ve=c()[t(V)])==null?void 0:ve.selected})));var X=L0();let q,he;var P=j(X);{var te=ve=>{var Oe=N0(),Me=j(Oe);Ce(()=>Xe(Me,t(V)+1)),y(ve,Oe)};oe(P,ve=>{t(A)&&ve(te)})}var M=Ee(P,2);{var T=ve=>{{let Oe=Rt(()=>(c(),t(V),b(()=>{var Re;return(Re=c()[t(V)])==null?void 0:Re.disabled}))),Me=Rt(()=>u()==t(V));gh(ve,{get checked(){return t(fe)},get disabled(){return t(Oe)},get hovered(){return t(Me)},$$events:{change:()=>Se.selectRow(t(V))}})}};oe(M,ve=>{s(),v(ye()),b(()=>s().features.canSelect&&!ye())&&ve(T)})}var N=Ee(M,2);{var ne=ve=>{{let Oe=Rt(()=>(c(),t(V),b(()=>{var Me;return(Me=c()[t(V)])==null?void 0:Me.disabled})));$l(ve,{icon:"trash",size:"small",variant:"warning",get disabled(){return t(Oe)},tooltip:"Delete Row",$$events:{click:()=>Se.deleteRow(t(V))}})}};oe(N,ve=>{t(k)&&ve(ne)})}Ce(()=>{var ve;q=Pe(X,1,"super-row selection svelte-1oaf1jq",null,q,{"is-selected":t(fe),"is-hovered":u()==t(V)||g()==t(V),"is-disabled":(ve=c()[t(V)])==null?void 0:ve.disabled}),he=We(X,"",he,{"min-height":(c(),t(V),b(()=>{var Oe;return(Oe=c()[t(V)])==null?void 0:Oe.height}))})}),W("mouseenter",X,()=>Qe(Z,t(V))),W("mouseleave",X,()=>Qe(Z,null)),y(me,X)});var ee=Ee(ae,2);{var pe=me=>{var V=F0();y(me,V)};oe(ee,me=>{d()=="Inserting"&&me(pe)})}var Ne=Ee(G,2);{var He=me=>{var V=V0();We(V,"",{},{padding:"unset"}),y(me,V)};oe(Ne,me=>{s(),b(()=>s().showFooter)&&me(He)})}Ce(()=>{z=Pe(ie,1,"super-column control-column",null,z,{sticky:De()}),re=Pe(G,1,"super-column-body",null,re,{zebra:t(D),quiet:t(w),sticky:De()})}),y(K,ie)};oe(Y,K=>{t(C)&&K(J)})}y(e,Q),Dt(),_()}var H0=U('<div class="action-menu svelte-1lstotj"></div>');function z0(e,r){kt(r,!1);const n=()=>Be(d,"$stbMenuAnchor",s),i=()=>Be(g,"$stbMenuID",s),[s,a]=Gt(),o=h(),c=h(),u=we.getContext("stbAPI"),g=we.getContext("stbMenuID"),d=we.getContext("stbMenuAnchor");let p=m(r,"rowContextMenuItems",8),_=m(r,"right",8,!0),S=m(r,"row",8);x(()=>n(),()=>{l(o,n()!=-1)}),x(()=>(v(p()),v(S())),()=>{var k;l(c,(k=p())==null?void 0:k.filter(({conditions:C})=>u.shouldShowButton(C||[],u.enrichContext(S()))))}),Pt(),Ot();var E=Ze(),A=Ue(E);{var I=k=>{{let C=Rt(()=>_()?"right":"left");Qr(k,{open:!0,get anchor(){return n()},get align(){return t(C)},ignoreAnchor:!1,$$events:{close:()=>{Qe(g,-1),Qe(d,-1)}},children:(D,w)=>{var B=H0();xt(B,5,()=>t(c),Nt,($,R)=>{let H=()=>t(R).text,Z=()=>t(R).icon,ue=()=>t(R).disabled,de=()=>t(R).onClick,Se=()=>t(R).size,ce=()=>t(R).type;{let ke=Rt(()=>_()?"right":"left");ta($,{get size(){return Se()},get type(){return ce()},get icon(){return Z()},get text(){return H()},get disabled(){return ue()},quiet:!0,menuItem:!0,get menuAlign(){return t(ke)},onClick:()=>{u.executeRowContextMenuAction(i(),de())}})}}),y(D,B)},$$slots:{default:!0}})}};oe(A,k=>{t(o),t(c),b(()=>{var C;return t(o)&&((C=t(c))==null?void 0:C.length)})&&k(I)})}y(e,E),Dt(),a()}var j0=U('<div class="st-control-columns"><!></div>');function vh(e,r){var n=j0(),i=j(n);mr(i,r,"default",{},null),y(e,n)}var G0=U('<div class="no-columns-placeholder">No columns defined. Please add columns to the Super Table.</div>'),q0=U('<div class="st-master-columns" tabIndex="-1"><!> <!> <!></div>');function W0(e,r){kt(r,!1);const n=()=>Be(g(),"$stbSettings",a),i=()=>Be(c(),"$superColumns",a),s=()=>Be(u(),"$commonColumnOptions",a),[a,o]=Gt();let c=m(r,"superColumns",8),u=m(r,"commonColumnOptions",8),g=m(r,"stbSettings",8),d=m(r,"columnsViewport",12),p=m(r,"showActionColumn",8),_=m(r,"canScroll",8),S=m(r,"stbData",8);Ot();var E=q0(),A=j(E);{var I=$=>{var R=Ze(),H=Ue(R);mr(H,r,"default",{},null),y($,R)};oe(A,$=>{n(),b(()=>n().superColumnsPos=="first")&&$(I)})}var k=Ee(A,2);{var C=$=>{var R=G0();y($,R)},D=$=>{var R=Ze(),H=Ue(R);xt(H,1,i,Nt,(Z,ue,de)=>{{let Se=Rt(()=>(s(),t(ue),i(),v(p()),v(_()),b(()=>({...s(),...t(ue),isFirst:de==0,isLast:de==i().length-1&&!p()&&_()}))));uu(Z,{get stbData(){return S()},get columnOptions(){return t(Se)}})}}),y($,R)};oe(k,$=>{i(),b(()=>i().length===0)?$(C):$(D,!1)})}var w=Ee(k,2);{var B=$=>{var R=Ze(),H=Ue(R);mr(H,r,"default",{},null),y($,R)};oe(w,$=>{n(),b(()=>n().superColumnsPos=="last")&&$(B)})}ht(E,$=>d($),()=>d()),y(e,E),Dt(),o()}var Y0=U('<div class="pagination-limit-offset svelte-vhhjk6"><div class="pagination-controls svelte-vhhjk6"><button class="pagination-btn svelte-vhhjk6" title="First Page"><i class="ph ph-caret-double-left"></i></button> <button class="pagination-btn svelte-vhhjk6" title="Previous Page"><i class="ph ph-caret-left"></i></button> <span class="pagination-info svelte-vhhjk6"> </span> <button class="pagination-btn svelte-vhhjk6" title="Next Page"><i class="ph ph-caret-right"></i></button></div></div>');function K0(e,r){kt(r,!1);const n=()=>Be(_(),"$dataSource",s),i=()=>Be(S(),"$fetch",s),[s,a]=Gt(),o=h(),c=h(),u=h();we.createEventDispatcher();let g=m(r,"limit",8,50),d=m(r,"pagination",8,"none"),p=m(r,"currentOffset",12,0),_=m(r,"dataSource",8,null),S=m(r,"fetch",8,null);function E(){p()>0&&(p(Math.max(0,p()-g())),k())}function A(){t(u)&&(p(p()+g()),k())}function I(){p(0),k()}function k(){_()&&Qe(_(),{...n(),queryParams:{...n().queryParams,offset:p()}})}const C=$=>{if(!$||!$.parameters)return!1;const R=$.parameters.map(H=>H.name.toLowerCase());return R.includes("offset")&&R.includes("limit")};x(()=>(n(),v(d())),()=>{l(o,C(n())&&d()==="limitOffset")}),x(()=>n(),()=>{var $,R;p(((R=($=n())==null?void 0:$.queryParams)==null?void 0:R.offset)||0)}),x(()=>(v(p()),v(g())),()=>{l(c,Math.floor(p()/g())+1)}),x(()=>(i(),v(g())),()=>{var $,R;l(u,((R=($=i())==null?void 0:$.rows)==null?void 0:R.length)>=g())}),Pt(),Ot();var D=Ze(),w=Ue(D);{var B=$=>{var R=Y0(),H=j(R),Z=j(H);We(Z,"",{},{"margin-right":"-0.25rem"});var ue=Ee(Z,2),de=Ee(ue,2),Se=j(de),ce=Ee(de,2);Ce(()=>{Z.disabled=t(c)<=1,ue.disabled=t(c)<=1,Xe(Se,`Page ${t(c)??""}
|
|
8
|
+
( ${p()??""} - ${v(p()),i(),b(()=>{var ke,De;return p()+(((De=(ke=i())==null?void 0:ke.rows)==null?void 0:De.length)||0)})??""} )`),ce.disabled=!t(u)}),W("click",Z,I),W("click",ue,E),W("click",ce,A),y($,R)};oe(w,$=>{t(o)&&$(B)})}y(e,D),Dt(),a()}var X0=U("<!> <!> <!>",1),Q0=U('<div class="wrapper svelte-qwchjq"><div><!> <!> <!> <!> <!> <!> <!> <!> <!> <!></div> <!></div>');function Z0(e,r){kt(r,!1);const n=()=>Be(di,"$dataSourceStore",ue),i=()=>Be(t(cr),"$stbData",ue),s=()=>Be(He,"$builderStore",ue),a=()=>Be(me,"$context",ue),o=()=>Be(be,"$stbMenuID",ue),c=()=>Be(bn,"$stbRowMetadata",ue),u=()=>Be(At,"$stbSelected",ue),g=()=>Be(Vr,"$new_row",ue),d=()=>Be(Dn,"$stbSettings",ue),p=()=>Be(Hn,"$stbScrollPos",ue),_=()=>Be($n,"$stbScrollOffset",ue),S=()=>Be(t(le),"$cumulativeHeights",ue),E=()=>Be(qt,"$stbState",ue),A=()=>Be(xn,"$stbHorizontalScrollPos",ue),I=()=>Be(dr,"$stbSortColumn",ue),k=()=>Be(Zt,"$stbSortOrder",ue),C=()=>Be(cn,"$filterStore",ue),D=()=>Be(t(ce),"$stbSelectedRows",ue),w=()=>Be(V,"$component",ue),B=()=>Be(fn,"$stbSchema",ue),$=()=>Be(Fn,"$columnsStore",ue),R=()=>Be(vi,"$tableStyles",ue),H=()=>Be(t(ye),"$superColumns",ue),Z=()=>Be(Tr,"$commonColumnOptions",ue),[ue,de]=Gt(),Se=h(),ce=h(),ke=h(),De=h(),ye=h(),le=h(),Q=h(),Y=h(),J=h(),K=h(),{API:ie,processStringSync:z,notificationStore:ge,enrichButtonActions:O,ActionTypes:G,Provider:re,fetchData:ae,QueryUtils:ee,memo:pe,derivedMemo:Ne,builderStore:He}=we.getContext("sdk"),me=we.getContext("context"),V=we.getContext("component");let fe=m(r,"comp_id",8),X=m(r,"inBuilder",8),q=m(r,"dataSource",8),he=m(r,"sortColumn",12),P=m(r,"sortOrder",12),te=m(r,"limit",8,50),M=m(r,"autoRefreshRate",8),T=m(r,"paginate",8),N=m(r,"filter",8),ne=m(r,"columnList",8),ve=m(r,"tableActions",8),Oe=m(r,"showFooter",8),Me=m(r,"showHeader",8,!0),Re=m(r,"size",8,"M"),se=m(r,"canInsert",8),Ie=m(r,"canDelete",8),Le=m(r,"canEdit",8),je=m(r,"canResize",8),Fe=m(r,"canFilter",8),Ae=m(r,"canSelect",8),Ge=m(r,"insertFieldsConfig",8),$e=m(r,"superColumnsPos",8),Je=m(r,"showAutoColumns",8),rt=m(r,"showSpecialColumns",8),st=m(r,"debounce",8,750),ut=m(r,"rowMenu",8),it=m(r,"rowMenuItems",8),_e=m(r,"rowMenuIcon",8,"ri-more-fill"),qe=m(r,"menuItemsVisible",8,0),Ye=m(r,"rowContextMenuItems",8),ot=m(r,"preselectedIds",8),Te=m(r,"hideSelectionColumn",8),Ke=m(r,"numberingColumn",8),et=m(r,"stickFirstColumn",8,!1),gt=m(r,"maxSelected",8,0),pt=m(r,"selectedActions",8),Yt=m(r,"beautifyLabels",8),Tt=m(r,"columnSizing",8,"flex"),_t=m(r,"columnMinWidth",8,"7rem"),wt=m(r,"columnMaxWidth",8,"auto"),dt=m(r,"columnFixedWidth",8,"7rem"),nt=m(r,"dividers",8,"horizontal"),at=m(r,"dividersColor",8),bt=m(r,"rowColorTemplate",8),Bt=m(r,"rowBGColorTemplate",8),Ft=m(r,"rowDisabledTemplate",8),Vt=m(r,"rowHeight",8),yt=m(r,"footerColorTemplate",8),tr=m(r,"footerBGColorTemplate",8),or=m(r,"useOptionColors",8,!0),er=m(r,"optionsViewMode",8,"colorText"),rr=m(r,"relViewMode",8,"pills"),Kt=m(r,"zebraColors",8,!1),jt=m(r,"quiet",8),gr=m(r,"highlighters",8),pr=m(r,"entitySingular",8,"Row"),br=m(r,"entityPlural",8,"Rows"),Ir=m(r,"onRowSelect",8),lr=m(r,"onCellChange",8),Cr=m(r,"onRowClick",8),_n=m(r,"onCellClick",8),Fr=m(r,"onLinkClick",8),yr=m(r,"onInsert",8),un=m(r,"afterInsert",8),wr=m(r,"onDelete",8),Zn=m(r,"afterDelete",8),ji=m(r,"afterEdit",8),va=m(r,"onRefresh",8);const di=pe(q()),Fn=pe(ne()),bn=ai([]),cn=pe(N());let $r=h(),Wr=h(),fi=h(),hi=h(!1),Ai,Ti=h(),en=h(),pa=h(),Yr=h([]),tn=h(),dn=h(),ur=h(),yn=h(),Kr=h(),wn=0,ma=0,_a=h(),Jn=h(),gi=te(),Gi=h(!1),Ar,cr=h(ai({rows:[],count:0,definition:{}})),ki=!1,Vn=h(0),Un=new Set,kn=h({}),Ka;const Vr=ai({});let Bn;const Dn=pe({}),fn=pe({}),Hn=pe(0),$n=pe(0),Xa=pe(0),xn=pe(0),f=pe(0),L=pe([]),be=pe(-1),ze=pe(-1),At=pe([]),Et=pe(gt()),Xt=pe(-1),Qt=pe(-1),dr=pe({}),Zt=pe({}),Rr=["created_by","created_at","updated_by","updated_at","deleted_by","deleted_at"],rn=F=>(F.parameters&&(F={...F,queryParams:{...F.queryParams,limit:te()}}),ae({API:ie,datasource:F,options:{query:t(De),sortColumn:he(),sortOrder:P(),limit:te(),paginate:!0}})),ft={unflattenObject:(F,xe=".")=>F?Object.keys(F).reduce((Ve,tt)=>{const vt=tt.split(xe);return vt.reduce((St,lt,Mt)=>{if(Mt===vt.length-1)return St[lt]=F[tt],St;const Ct=vt[Mt+1];return St[lt]||(St[lt]=isNaN(Number(Ct))?{}:[]),St[lt]},Ve),Ve},{}):{},populateColumns:(F,xe,Ve,tt)=>{let vt=[],St=[],lt=[],Mt=[];return l(Wr,ft.detectPK(i())),F?(xe!=null&&xe.length?Mt=xe.map(Ct=>ft.enrichColumn(F,{...Ct,field:Ct.name})):(Ve&&(St=Object.keys(F).filter(Ct=>{var Mr;return(Mr=F[Ct])==null?void 0:Mr.autocolumn}).map(Ct=>ft.enrichColumn(F,F[Ct]))),tt&&(lt=Object.keys(F).filter(Ct=>Rr.includes(Ct)).map(Ct=>ft.enrichColumn(F,F[Ct]))),vt=Object.keys(F).filter(Ct=>F[Ct].nestedJSON).map(Ct=>ft.enrichColumn(F,F[Ct])),Mt=Object.keys(F).filter(Ct=>{var Mr;return!F[Ct].autocolumn&&!Rr.includes(Ct)&&!F[Ct].nestedJSON&&((Mr=F[Ct])==null?void 0:Mr.visible)!=!1&&Ct!=t(Wr)}).map(Ct=>ft.enrichColumn(F,F[Ct]))),[...St,...Mt,...vt,...lt].sort((Ct,Mr)=>Ct.order-Mr.order)):[]},enrichColumn:(F,xe)=>{var lt,Mt,Ct,Mr;let Ve,tt,vt,St=(lt=q())==null?void 0:lt.tableId;if(xe.name.includes(".")){let qi=xe.name.split("."),Wo=(Mt=F[qi[0]])==null?void 0:Mt.schema;Wo&&Wo[qi[1]]?(tt=Wo[qi[1]],Ve=tt.type):(Ve="string",tt={})}else tt=F[xe.name],tt?Ve=tt.type:(Ve="string",tt={}),xe.name.startsWith("fk_self_")&&(vt=!0,Ve="link",xe.displayName=xe.displayName||xe.name.replace("fk_self_","").replace("_id","").replace(/_/g," "),tt={...tt,tableId:St,relationshipType:"self",recursiveTable:!0,primaryDisplay:(Mr=(Ct=i())==null?void 0:Ct.definition)==null?void 0:Mr.primaryDisplay,type:"link"});return{...xe,widthOverride:xe.width,readonly:tt==null?void 0:tt.readonly,canEdit:!X()&&St&&M_[Ve]&&Le()&&!(tt!=null&&tt.readonly)&&!vt&&!xe.autocolumn,canFilter:R_[Ve]?Fe():!1,canSort:P_[Ve],filteringOperators:ee.getValidOperatorsForType({type:Ve}),defaultFilteringOperator:ch[Ve],headerAlign:xe.align?xe.align:"flex-start",type:Ve,displayName:ft.beautifyLabel(xe.displayName??xe.name),schema:tt}},enrichContext:F=>({...a(),[fe()]:{...a()[fe()],row:F}}),registerSuperColumn:(F,xe)=>{l(Yr,[...t(Yr),{id:F,state:xe}])},unregisterSuperColumn:F=>{let xe=t(Yr).findIndex(Ve=>Ve.id==F);xe>-1&&(t(Yr).splice(xe,1),l(Yr,t(Yr)))},shouldDisableButton:(F,xe)=>F?z(F,xe):!1,shouldShowButton:(F,xe)=>{function Ve(lt,Mt){switch(Mt.toLowerCase()){case"number":return Number(lt);case"string":return String(lt);case"boolean":return lt==="true"||lt===!0;default:return lt}}function tt(lt,Mt,Ct){switch(Mt.toLowerCase()){case"equal":case"equals":return lt==Ct;case"not equal":case"not equals":return lt!=Ct;case"greater than":return lt>Ct;case"less than":return lt<Ct;case"greater than or equal":return lt>=Ct;case"less than or equal":return lt<=Ct;case"contains":return typeof lt=="string"&<.includes(Ct);case"not contains":return typeof lt=="string"&&!lt.includes(Ct);case"starts with":return typeof lt=="string"&<.startsWith(Ct);case"ends with":return typeof lt=="string"&<.endsWith(Ct);case"is empty":return lt==null||lt==="";case"is not empty":return lt!=null&<!=="";default:return!1}}if(!F||F.length===0)return!0;let St=!F.some(lt=>lt.action.toLowerCase()==="show");for(const lt of F){const Mt=z(lt.referenceValue,xe),Ct=z(lt.newValue,xe),Mr=Ve(Mt,lt.type),qi=Ve(Ct,lt.valueType);tt(Mr,lt.operator,qi)&&(St=lt.action.toLowerCase()==="show")}return St},executeRowButtonAction:async(F,xe)=>{var tt;let Ve=O(xe,ft.enrichContext((tt=i())==null?void 0:tt.rows[F]));await(Ve==null?void 0:Ve())},executeRowOnClickAction:async F=>{await ft.executeRowButtonAction(F,Cr())},executeCellOnClickAction:async(F,xe,Ve,tt)=>{var St;let vt=O(_n(),ft.enrichContext((St=i())==null?void 0:St.rows[F]));await(vt==null?void 0:vt({column:xe,value:Ve,id:tt}))},executeOnLinkClickAction:async(F,xe)=>{let Ve=O(Fr(),{column:F,id:xe._id,primaryDisplay:xe.primaryDisplay});await(Ve==null?void 0:Ve({column:F,id:xe._id,primaryDisplay:xe.primaryDisplay}))},executeRowOnSelectAction:async F=>{var Ve;await we.tick();let xe=O(Ir(),ft.enrichContext((Ve=i())==null?void 0:Ve.rows[F]));await(xe==null?void 0:xe())},showContextMenu:(F,xe)=>{var Ve;(Ve=Ye())!=null&&Ve.length&&o()!=F?(Qe(be,F),Qe(ze,xe)):(Qe(be,-1),Qe(ze,-1))},executeRowContextMenuAction:async(F,xe)=>{await ft.executeRowButtonAction(F,xe),Qe(be,-1),Qe(ze,-1)},executeSelectedRowsAction:async F=>{ft.executeRowButtonAction(null,F)},selectRow:F=>{var Ve;let xe=ft.getRowId((Ve=i())==null?void 0:Ve.rows[F],F);c()[F].disabled,gt()!=1?u().includes(xe)?(u().splice(u().indexOf(xe),1),Qe(At,u())):gt()==0||u().length<gt()?Qe(At,[...u(),xe]):ge.actions.warning("Cannot select more than "+gt()+" "+(br()||"Rows")):u().includes(xe)?Qe(At,[]):Qe(At,[xe]),u().length&&ft.executeRowOnSelectAction(F)},selectAllRows:()=>{var F,xe;u().length!=((F=i())==null?void 0:F.rows.length)?Qe(At,(xe=i())==null?void 0:xe.rows.map((Ve,tt)=>ft.getRowId(Ve,tt))):Qe(At,[])},clearSelection:()=>{Qe(At,[])},insertRow:async F=>{O(un(),a());let xe;if(yr()&&yr().length){let Ve=O(yr(),a());await(Ve==null?void 0:Ve())}else{qt.startSave();try{xe=await ie.saveRow({...g(),tableId:t($r)},{suppressErrors:!0}),Si(Vr,b(g).errors={},b(g)),Qe(Vr,g()),qt.refresh();let Ve={...a(),[fe()]:{row:xe}},tt=O(un(),Ve);return await(tt==null?void 0:tt({row:xe})),qt.endSave(),xe}catch(Ve){if(Bn&&clearTimeout(Bn),Bn=setTimeout(()=>{Qe(Vr,{...g(),errors:{}})},2e3),Si(Vr,b(g).errors={},b(g)),Ve.json&&Ve.json.validationErrors){const tt=Ve.json.validationErrors;Object.keys(tt).forEach(vt=>{Si(Vr,b(g).errors[vt]=tt[vt][0]||"Validation error",b(g))})}else Ve.details||Ve.errors?(Ve.details||Ve.errors).forEach(vt=>{vt.field&&Si(Vr,b(g).errors[vt.field]=vt.message||"Validation error",b(g))}):Si(Vr,b(g).errors={general:Ve.message||"Save failed"},b(g))}}},deleteRow:async F=>{var lt,Mt,Ct,Mr;let xe=(lt=i())==null?void 0:lt.rows[F];Si(bn,b(c)[F].disabled=!0,b(c)),await we.tick();let Ve=xe[t(Wr)];if(!Ve||!t($r))return;let tt=[{parameters:{confirm:!0,notificationOverride:!1,customTitleText:"Delete "+(pr()||"Row")+" ?",confirmText:"Are you sure you want to delete this "+(pr()||"Row")+" ?",tableId:t($r),rowId:Ve},"##eventHandlerType":"Delete Row"}],vt,St=O(Zn(),ft.enrichContext((Mt=i())==null?void 0:Mt.rows[F]));(Ct=wr())!=null&&Ct.length?vt=O(wr(),ft.enrichContext((Mr=i())==null?void 0:Mr.rows[F])):vt=O(tt,{}),await(vt==null?void 0:vt({row:xe})),await(St==null?void 0:St({row:xe})),u().includes(ft.getRowId(xe,F))&&(u().splice(u().indexOf(ft.getRowId(xe,F)),1),Qe(At,u())),t(cr).refresh()},deleteSelectedRows:async()=>{let F=u().map(St=>ft.getRowById(St)).filter(St=>St),xe=F.map(St=>St._id);F.forEach(St=>{const lt=i().rows.indexOf(St);lt!==-1&&Si(bn,b(c)[lt].disabled=!0,b(c))}),await we.tick();let Ve=[{parameters:{confirm:!0,notificationOverride:!0,customTitleText:"Delete "+u().length+" "+(br()||"Rows")+" ?",confirmText:"Are you sure you want to delete these "+(br()||"Rows")+" ?",tableId:t($r),rowId:xe.map(St=>({_id:St.toString()}))},"##eventHandlerType":"Delete Row"}],tt=O(Ve,{}),vt=O(Zn(),a());await(tt==null?void 0:tt()),await(vt==null?void 0:vt()),t(cr).refresh()},patchRow:async F=>{if(!t($r))return;F=ft.unflattenObject(F);let xe;xe=await ie.patchRow({tableId:t($r),...F},!0),qt.refresh();let Ve={...a(),[fe()]:{row:xe}},tt=O(ji(),Ve);return await(tt==null?void 0:tt({row:xe})),xe},getRowId:(F,xe)=>{var Ve;return t(Wr)?((Ve=F[t(Wr)])==null?void 0:Ve.toString())??xe.toString():xe.toString()},getRowById:F=>t(Wr)?i().rows.find(xe=>{var Ve;return((Ve=xe[t(Wr)])==null?void 0:Ve.toString())===F}):i().rows[parseInt(F)],extendQuery:(F,xe)=>{var tt,vt;if(!Object.keys(xe).length)return F;const Ve={[Oa.LogicalOperator.AND]:{conditions:[...F?[F]:[],...Object.values(xe||{})]},onEmptyFilter:Oa.EmptyFilterOption.RETURN_NONE};return(((vt=(tt=Ve[Oa.LogicalOperator.AND])==null?void 0:tt.conditions)==null?void 0:vt.length)??0)>0?Ve:{}},addQueryExtension:(F,xe)=>{!F||!xe||l(kn,{...t(kn),[F]:xe})},removeQueryExtension:F=>{if(!F)return;const xe={...t(kn)};delete xe[F],l(kn,xe)},beautifyLabel:F=>{if(!Yt()||!F)return F;let xe=F.split(".");return xe.forEach((Ve,tt)=>{let vt=Ve.split("_");vt.forEach((St,lt)=>{var Mt;St&&(vt[lt]=((Mt=St[0])==null?void 0:Mt.toUpperCase())+(St==null?void 0:St.slice(1)))}),xe[tt]=vt.join(" ")}),xe.join(" - ")},detectPK:F=>{var Ve,tt,vt;if(((tt=(Ve=F==null?void 0:F.definition)==null?void 0:Ve.primary)==null?void 0:tt.length)===1)return F.definition.primary[0];const xe=((vt=F==null?void 0:F.definition)==null?void 0:vt.schema)||(F==null?void 0:F.schema)||{};return"id"in xe?"id":"_id"in xe||n().type=="viewV2"?"_id":null},loadPreSelections:F=>{Qe(At,Array.isArray(F)?F.map(xe=>xe.toString()):typeof F=="string"?F.split(",").map(xe=>xe.trim()):F?[F]:[])},decidePagination:F=>{if(!F){l(fi,"none");return}if(F.parameters&&F.parameters.length){const xe=F.parameters.map(Ve=>Ve.name.toLowerCase());xe.includes("offset")&&xe.includes("limit")&&l(fi,"limitOffset")}else q().tableId?l(fi,"cursor"):l(fi,"none");l(hi,t(fi)=="cursor")}},qt=sr("Init",{"*":{init(){return"Init"},refresh(){var F;(F=t(cr))==null||F.refresh()},enrichRows(F,xe,Ve,tt,vt,St){var lt;F!=null&&F.loading||Qe(bn,((lt=F==null?void 0:F.rows)==null?void 0:lt.map((Mt,Ct)=>({height:tt&&zn(z(tt,{...a(),[fe()]:{row:Mt}}))||d().appearance.rowHeight,bgcolor:xe?z(xe,{...a(),[fe()]:{row:Mt}}):void 0,color:Ve?z(Ve,{...a(),[fe()]:{row:Mt}}):void 0,disabled:vt?z(vt,{...a(),[fe()]:{row:Mt}}):void 0,selected:St.includes(ft.getRowId(Mt,Ct))})))||[{}])},lockColumnWidths(){ki||(ki=!0,t(Yr).forEach(({state:F})=>F.lockWidth()))},unlockColumnWidths(){ki&&(ki=!1,t(Yr).forEach(({state:F})=>F.unlockWidth()))},scrollToTop(){Qe(Hn,0),Qe($n,0),this.calculateRowBoundaries()},scrollTo(F){Qe(Hn,F),this.calculateRowBoundaries()},scrollToEnd(){Qe(Hn,t(en)>t(ur)?t(en)-t(ur):p()),this.calculateRowBoundaries()},calculateBoundaries(){var Ve;if(!((Ve=i())==null?void 0:Ve.rows)||!t(yn))return;const xe=d().appearance.rowHeight;l(en,(S()[S().length-1]||0)+(se()?4*xe:2*xe)),l(ur,t(yn).clientHeight-d().appearance.headerHeight-d().appearance.footerHeight+xe),l(tn,t(en)>t(ur)),l(_a,t(tn)),Qe(Xa,t(en)>t(ur)?p()/(t(en)-t(ur)):0),this.calculateRowBoundaries()},calculateRowBoundaries(){var vt,St,lt;let F=0,xe=0,Ve=((vt=i())==null?void 0:vt.rows)||[];xe=Ve.length;for(let Mt=0;Mt<Ve.length;Mt++)if(S()[Mt]>p()){F=Mt;break}for(let Mt=F;Mt<Ve.length;Mt++)if(S()[Mt]>=p()+t(ur)){xe=Mt+1;break}Qe(L,(St=i())==null?void 0:St.rows.slice(F,xe).map((Mt,Ct)=>Ct+F));const tt=F>0?S()[F-1]:0;if(Qe($n,p()-tt),t(hi)&&Ve.length>0){const Ct=S()[Ve.length-1]-(p()+t(ur)),Mr=!((lt=i().info)!=null&<.total)||Ve.length<i().info.total;Ct<t(ur)&&Ve.length===gi&&Mr&&p()>0&&qt.fetchMoreRows(te())}},handleVerticalScroll(F){this.lockColumnWidths(),Qe(Hn,Math.max(Math.min(p()+F,Math.max(0,t(en)-t(ur))),0)),Qe(Xa,t(en)>t(ur)?p()/(t(en)-t(ur)):0),window.requestAnimationFrame(()=>this.calculateRowBoundaries())},handleWheel(F){var xe,Ve;if(E()=="Inserting"){F.preventDefault(),F.stopPropagation();return}if(F.deltaY&&t(tn))F.preventDefault(),F.stopPropagation(),this.handleVerticalScroll(F.deltaY);else if(F.deltaX){if(this.lockColumnWidths(),A()+F.deltaX<0){Qe(xn,0),Qe(f,0);return}if(A()+F.deltaX>((xe=t(Kr))==null?void 0:xe.scrollWidth)-t(Kr).clientWidth){Qe(xn,((Ve=t(Kr))==null?void 0:Ve.scrollWidth)-t(Kr).clientWidth),Qe(f,1);return}Qe(xn,A()+F.deltaX),Qe(f,A()/t(Kr).scrollWidth)}},handleKeyboard(F){},handleTouch(F,xe){var Ve,tt;if(i().loading||E()==="Inserting"){F.preventDefault();return}if(xe==="start")wn=F.touches[0].clientY,ma=F.touches[0].clientX;else if(xe==="move"&&t(tn)){const vt=F.touches[0].clientY,St=F.touches[0].clientX,lt=wn-vt,Mt=ma-St;Math.abs(lt)>Math.abs(Mt)?(F.preventDefault(),this.handleVerticalScroll(lt*.5),wn=vt):Math.abs(Mt)>Math.abs(lt)&&(this.lockColumnWidths(),A()+Mt<0?(Qe(xn,0),Qe(f,0)):A()+Mt>((Ve=t(Kr))==null?void 0:Ve.scrollWidth)-t(Kr).clientWidth?(Qe(xn,((tt=t(Kr))==null?void 0:tt.scrollWidth)-t(Kr).clientWidth),Qe(f,1)):(Qe(xn,A()+Mt),Qe(f,A()/t(Kr).scrollWidth)),ma=St)}},sortBy(F,xe){he(F),P(xe),Qe(dr,F),Qe(Zt,xe)},handleRowClick(F,xe,Ve,tt){Ae()&&!Le()&&ft.selectRow(F),_n()&&ft.executeCellOnClickAction(F,xe,Ve,tt),ft.executeRowOnClickAction(F)},addRow(){var F;if(!yr()||((F=yr())==null?void 0:F.length)==0)return"Inserting";ft.insertRow()},edit(){return"Editing"}},Init:{_enter(){Ai&&clearInterval(Ai),Ar&&clearTimeout(Ar),Qe(Hn,0),Qe($n,0),Qe(xn,0),Qe(At,[]),Qe(L,[]),gi!=te()&&(gi=te()),on(l(cr,rn(n())),"$stbData",ue),Ar=setTimeout(()=>{l(Gi,!0)},130)},synch(F){if(l($r,n().tableId),ft.loadPreSelections(ot()),F.loaded)return M()&&!X()&&(Ai=setInterval(()=>{var xe,Ve,tt;(xe=i())!=null&&xe.loading||(Ve=t(cr))==null||Ve.refresh(),(tt=va())==null||tt()},M()*1e3)),"Idle"}},Idle:{_enter(){var F;clearTimeout(Ar),l(Gi,!1),l(Jn,((F=i())==null?void 0:F.rows.length)<1),this.calculateRowBoundaries()},_exit(){},synch(F){var xe;F.loading&&!F.loaded||(l(Jn,!((xe=i())!=null&&xe.rows.length)),F.loaded&&this.calculateRowBoundaries())},addFilter(F){let xe=ee.buildQuery([{...F}]);return Un.add(F.id),ft.addQueryExtension(F.id,xe),"Filtered"},fetchMoreRows(F){gi=gi+F,t(cr).update({limit:gi})}},Filtered:{_enter(){},_exit(){},addFilter(F){let xe=ee.buildQuery([{...F}]);ft.removeQueryExtension(F.id),Un.add(F.id),ft.addQueryExtension(F.id,xe)},removeFilter(F){Un.delete(F),ft.removeQueryExtension(F)},clearFilter(F){return Un.delete(F),ft.removeQueryExtension(F),"Idle"},clear(){return Un.forEach(F=>{ft.removeQueryExtension(F)}),Un.clear(),t(Yr).forEach(({state:F})=>F.reset()),"Idle"},synch(F){F.loaded&&(l(Jn,F.rows.length<1),this.calculateRowBoundaries())}},Editing:{async patchRow(F,xe,Ve,tt,vt){let St={_id:xe,_rev:Ve,[tt]:vt};return await ft.patchRow(F,St),qt.refresh(),"Idle"},endEdit(){return"Idle"}},Inserting:{_enter(){var F;l(Jn,!1),t(Yr).forEach(({state:xe})=>xe.addRow()),Qe(Vr,{}),(F=Ge())==null||F.forEach(xe=>{xe.defaultValue&&Si(Vr,b(g)[xe.field]=z(xe.defaultValue,a()),b(g))}),Ka=p(),this.scrollToEnd()},_exit(){t(Yr).forEach(({state:F})=>F.cancelAddRow()),this.scrollTo(Ka)},cancelAddRow(){return"Idle"},endSave(){return this.refresh(),"Idle"},setValue(F,xe){Si(Vr,b(g)[F]=xe,b(g)),g().errors&&g().errors[F]&&(delete g().errors[F],Bn&&(clearTimeout(Bn),Bn=null)),Qe(Vr,{...g()})}}}),Tr=Ne(Dn,F=>{var xe;return{hasChildren:!1,maxWidth:wt()||"auto",minWidth:_t()||"7rem",fixedWidth:dt()||"7rem",sizing:Tt(),canResize:je(),canEdit:X()?!1:Le(),showFooter:Oe(),showHeader:Me(),cellPadding:Nn[Re()].cellPadding,headerHeight:Nn[Re()].headerHeight,rowHeight:Nn[Re()].rowHeight,highlighters:gr(),useOptionColors:((xe=F==null?void 0:F.appearance)==null?void 0:xe.useOptionColors)||!1,optionsViewMode:er(),relViewMode:rr(),zebraColors:Kt(),quiet:jt()}}),vi=Ne(Dn,F=>{var xe,Ve;return{color:F.dividersColor??"var(--spectrum-global-color-gray-200)",horizontal:F.dividers=="both"||F.dividers=="horizontal"?"1px solid var(--super-table-devider-color)":"1px solid transparent",vertical:F.dividers=="both"||F.dividers=="vertical"?"1px solid var(--super-table-devider-color)":"none",headerHeight:((xe=F.appearance)==null?void 0:xe.headerHeight)||"0px",footerHeight:((Ve=F.appearance)==null?void 0:Ve.footerHeight)||"0px"}});we.setContext("stbScrollPos",Hn),we.setContext("stbScrollOffset",$n),we.setContext("stbHorizontalScrollPos",xn),we.setContext("stbHovered",Xt),we.setContext("stbSelected",At),we.setContext("stbEditing",Qt),we.setContext("stbState",qt),we.setContext("stbSettings",Dn),we.setContext("stbSortColumn",dr),we.setContext("stbSortOrder",Zt),we.setContext("stbMenuID",be),we.setContext("stbMenuAnchor",ze),we.setContext("stbAPI",ft),we.setContext("stbVisibleRows",L),we.setContext("stbRowMetadata",bn);function zn(F){const xe=Number(F);return isNaN(xe)?null:xe}we.onDestroy(()=>{Ai&&clearInterval(Ai)});let ei=h(0);x(()=>v(q()),()=>{di.set(q())}),x(()=>n(),()=>{ft.decidePagination(n())}),x(()=>v(N()),()=>{cn.set(N())}),x(()=>i(),()=>{var F,xe;fn.set((xe=(F=i())==null?void 0:F.definition)==null?void 0:xe.schema)}),x(()=>v(ne()),()=>{Fn.set(ne()||[])}),x(()=>(v(Vt()),v(fe()),v(Re())),()=>{l(Se,Vt()&&zn(z(Vt(),{[fe()]:{row:{}}}))||Nn[Re()].rowHeight)}),x(()=>v(gt()),()=>{Et.set(gt())}),x(()=>(s(),v(Je()),v(rt()),v($e()),v(Tt()),v(wt()),v(_t()),v(dt()),v(st()),v(Te()),v(nt()),v(at()),v(Oe()),v(Me()),v(_e()),v(Ae()),v(gt()),v(Fe()),v(Le()),v(Ie()),t($r),v(se()),v(je()),v(q()),t(Wr),v(N()),v(he()),v(P()),v(te()),v(br()),v(T()),v(M()),t(hi),v(Re()),t(Se),v(Ke()),v(jt()),v(or()),v(er()),v(rr()),v(Kt()),v(gr()),v(bt()),v(Bt()),v(Ft()),v(yt()),v(tr()),v(Yt()),v(Cr()),v(lr()),v(Ir()),v(wr()),v(Zn())),()=>{var F;Dn.set({inBuilder:(F=s())==null?void 0:F.inBuilder,showAutoColumns:Je(),showSpecialColumns:rt(),superColumnsPos:$e(),columnSizing:Tt()||"flexible",columnMaxWidth:wt()||"auto",columnMinWidth:_t()||"7rem",columnFixedWidth:dt()||"7rem",debounce:st(),hideSelectionColumn:Te(),dividers:nt(),dividersColor:at(),showFooter:Oe(),showHeader:Me(),rowMenuIcon:_e(),features:{canSelect:Ae(),maxSelected:gt(),canFilter:Fe(),canEdit:Le(),canDelete:Ie()&&t($r),canInsert:se(),canResize:je()},data:{dataSource:q(),idColumn:t(Wr),filter:N(),sortColumn:he(),sortOrder:P(),limit:te(),emptyMessage:br()?"No "+br()+" found":"No Rows Found",paginate:T(),autoRefreshRate:M(),fetchOnScroll:t(hi)},appearance:{size:Re(),headerHeight:Me()?Nn[Re()].headerHeight:0,footerHeight:Oe()?Nn[Re()].headerHeight:0,rowHeight:t(Se),numberingColumn:Ke(),hideSelectionColumn:Te(),quiet:jt(),useOptionColors:or(),optionsViewMode:er(),relViewMode:rr(),zebraColors:Kt(),dynamicColors:!0,highlighters:gr(),rowColorTemplate:bt(),rowBGColorTemplate:Bt(),rowDisabledTemplate:Ft(),footerColorTemplate:yt(),footerBGColorTemplate:tr(),cellPadding:Nn[Re()].cellPadding,beautifyLabels:Yt()},events:{onRowClick:Cr(),onCellChange:lr(),onRowSelect:Ir(),onDelete:wr(),afterDelete:Zn()}})}),x(()=>n(),()=>{qt.init(n())}),x(()=>i(),()=>{qt.synch(i())}),x(()=>(i(),v(Bt()),v(bt()),v(Vt()),v(Ft()),u()),()=>{qt.enrichRows(i(),Bt(),bt(),Vt(),Ft(),u())}),x(()=>t(cr),()=>{on(l(ce,Ne([t(cr),At,Et],([F,xe,Ve])=>{var vt;F!=null&&F.rows&&(xe=xe.filter(St=>F.rows.some((lt,Mt)=>ft.getRowId(lt,Mt)===St)));const tt=(vt=F==null?void 0:F.rows)==null?void 0:vt.filter((St,lt)=>xe==null?void 0:xe.includes(ft.getRowId(St,lt)));return Ve===1?tt.length>0?tt[0]:[]:tt})),"$stbSelectedRows",ue)}),x(()=>C(),()=>{l(ke,ee.buildQuery(C()))}),x(()=>(t(ke),t(kn)),()=>{l(De,ft.extendQuery(t(ke),t(kn)))}),x(()=>t(De),()=>{qt.scrollToTop(t(De))}),x(()=>(t(cr),t(De),v(he()),v(P())),()=>{var F;(F=t(cr))==null||F.update({query:t(De),sortColumn:he(),sortOrder:P()})}),x(()=>{},()=>{on(l(ye,Ne([fn,Fn,Dn],([F,xe,Ve])=>ft.populateColumns(F,xe,Ve.showAutoColumns,Ve.showSpecialColumns))),"$superColumns",ue)}),x(()=>{},()=>{on(l(le,Ne(bn,F=>F==null?void 0:F.map((xe,Ve)=>F.slice(0,Ve+1).reduce((tt,vt)=>tt+Math.max(vt.height,0),0)))),"$cumulativeHeights",ue)}),x(()=>(t(pa),v(se()),I(),t(hi),k(),S()),()=>{qt.calculateBoundaries(t(pa),se(),I(),t(hi),I(),k(),S())}),x(()=>t(cr),()=>{var F;l(Q,[{type:G.ClearRowSelection,callback:ft.clearSelection},{type:G.RefreshDatasource,callback:(F=t(cr))==null?void 0:F.refresh},{type:G.AddDataProviderQueryExtension,callback:ft.addQueryExtension},{type:G.RemoveDataProviderQueryExtension,callback:ft.removeQueryExtension}])}),x(()=>(v(X()),i(),g(),D(),t(Wr),w(),n(),B()),()=>{var F,xe,Ve,tt,vt,St;l(Y,{row:X()?(F=i())==null?void 0:F.rows[0]:{},newRow:g(),rows:(xe=i())==null?void 0:xe.rows,selectedRows:D(),selectedIds:Array.isArray(D())?D().map(lt=>lt[t(Wr)]):D()&&typeof D()=="object"?[D()[t(Wr)]]:[],id:w().id,info:(Ve=i())==null?void 0:Ve.info,datasource:n()||{},schema:B(),state:{query:i().query},loaded:(tt=i())==null?void 0:tt.loaded,rowsLength:(vt=i())==null?void 0:vt.rows.length,pageNumber:((St=i())==null?void 0:St.pageNumber)+1})}),x(()=>(v(ut()),v(it())),()=>{var F;l(J,ut()=="columnRight"&&((F=it())==null?void 0:F.length))}),x(()=>(v(ut()),v(it())),()=>{var F;l(K,ut()=="columnLeft"&&((F=it())==null?void 0:F.length))}),x(()=>t(cr),()=>{we.setContext("stbData",t(cr))}),x(()=>we.setContext,()=>{we.setContext("stbSchema",fn)}),x(()=>we.setContext,()=>{we.setContext("new_row",Vr)}),x(()=>(t(Vn),t(ei),$(),t(Yr)),()=>{var F;(t(Vn)>0&&t(Vn)!==t(ei)||$())&&(l(ei,t(Vn)),(F=t(Yr))==null||F.forEach(({state:xe})=>xe.unlockWidth()))}),Pt(),Ot();var Rs=Q0(),Pr=j(Rs);let ba,zh;var jh=j(Pr);re(jh,{get actions(){return t(Q)},get data(){return t(Y)}});var Gh=Ee(jh,2);vh(Gh,{children:(F,xe)=>{var Ve=X0(),tt=Ue(Ve);B0(tt,{get stbData(){return t(cr)},get hideSelectionColumn(){return Te()}});var vt=Ee(tt,2);{var St=Ct=>{hh(Ct,{get rowMenuItems(){return it()},get menuItemsVisible(){return qe()},get rowMenu(){return ut()}})};oe(vt,Ct=>{t(K)&&Ct(St)})}var lt=Ee(vt,2);{var Mt=Ct=>{{let Mr=Rt(()=>(H(),Z(),t(_a),t(J),t(tn),b(()=>{var qi;return{...H()[0],...Z(),overflow:t(_a),isFirst:!0,isLast:((qi=H())==null?void 0:qi.length)==1&&!t(J)&&t(tn)}})));uu(Ct,{get stbData(){return t(cr)},sticky:!0,get scrollPos(){return A()},get columnOptions(){return t(Mr)}})}};oe(lt,Ct=>{v(et()),H(),b(()=>et()&&H().length>1)&&Ct(Mt)})}y(F,Ve)},$$slots:{default:!0}});var qh=Ee(Gh,2);W0(qh,{get stbData(){return t(cr)},get stbSettings(){return Dn},get superColumns(){return t(ye)},get commonColumnOptions(){return Tr},get canScroll(){return t(tn)},get columnsViewport(){return t(Kr)},set columnsViewport(F){l(Kr,F)},children:(F,xe)=>{var Ve=Ze(),tt=Ue(Ve);$i(tt,Tt,vt=>{var St=Ze(),lt=Ue(St);mr(lt,r,"default",{},null),y(vt,St)}),y(F,Ve)},$$slots:{default:!0},$$legacy:!0});var Wh=Ee(qh,2);{var oA=F=>{vh(F,{children:(xe,Ve)=>{hh(xe,{get rowMenuItems(){return it()},get menuItemsVisible(){return qe()},get rowMenu(){return ut()},get canScroll(){return t(tn)},right:!0})},$$slots:{default:!0}})};oe(Wh,F=>{t(J)&&!t(Jn)&&F(oA)})}var Yh=Ee(Wh,2);L_(Yh,{get anchor(){return t(Kr)},get clientHeight(){return t(ur)},get scrollHeight(){return t(en)},get highlighted(){return t(Ti)},get isEmpty(){return t(Jn)},get horizontalVisible(){return t(dn)},set horizontalVisible(F){l(dn,F)},$$events:{positionChange(...F){var xe;(xe=qt.calculateRowBoundaries)==null||xe.apply(this,F)}},$$legacy:!0});var Kh=Ee(Yh,2);{let F=Rt(()=>(H(),d(),b(()=>{var Ve;return(Ve=H())!=null&&Ve.length?d().appearance.headerHeight+16:16}))),xe=Rt(()=>t(dn)?24:16);V_(Kh,{get isEmpty(){return t(Jn)},get message(){return d(),b(()=>d().data.emptyMessage)},get top(){return t(F)},get bottom(){return t(xe)}})}var Xh=Ee(Kh,2);{let F=Rt(()=>(i(),o(),b(()=>{var xe,Ve;return(Ve=(xe=i())==null?void 0:xe.rows)==null?void 0:Ve[o()]})));z0(Xh,{get rowContextMenuItems(){return Ye()},get row(){return t(F)}})}var Qh=Ee(Xh,2);{var lA=F=>{G_(F,{get stbState(){return qt},get tableAPI(){return ft},get highlighted(){return t(Ti)},get tableActions(){return ve()},get footer(){return d(),b(()=>d().showFooter)}})};oe(Qh,F=>{d(),E(),b(()=>d().features.canInsert||E()=="Filtered")&&F(lA)})}var Zh=Ee(Qh,2);{var uA=F=>{Y_(F,{get stbSettings(){return Dn},get selectedActions(){return pt()},get stbSelected(){return At},get tableAPI(){return ft},get stbState(){return qt},get highlighted(){return t(Ti)},get entitySingular(){return pr()},get entityPlural(){return br()}})};oe(Zh,F=>{d(),v(pt()),b(()=>{var xe;return d().features.canSelect&&((xe=pt())==null?void 0:xe.length)})&&F(uA)})}var cA=Ee(Zh,2);{var dA=F=>{X_(F)};oe(cA,F=>{i(),b(()=>i().loading&&i().loaded)&&F(dA)})}ht(Pr,F=>l(yn,F),()=>t(yn));var fA=Ee(Pr,2);K0(fA,{get pagination(){return t(fi)},get limit(){return te()},get dataSource(){return di},get fetch(){return t(cr)}}),Ce(()=>{ba=Pe(Pr,1,"super-table",null,ba,{quiet:jt(),initializing:t(Gi)}),zh=We(Pr,"",zh,{"font-size":(v(Nn),v(Re()),b(()=>Nn[Re()].rowFontSize)),"--super-table-devider-color":(R(),b(()=>R().color)),"--super-table-body-height":t(ur),"--super-table-header-height":(R(),b(()=>R().headerHeight)),"--super-table-footer-height":(R(),b(()=>R().footerHeight)),"--super-table-horizontal-dividers":(R(),b(()=>R().horizontal)),"--super-table-vertical-dividers":(R(),b(()=>R().vertical)),"--super-table-cell-padding":(v(Nn),v(Re()),b(()=>Nn[Re()].cellPadding)),"--super-column-top-offset":_()*-1})}),yl(Pr,"clientWidth",F=>l(Vn,F)),yl(Pr,"clientHeight",F=>l(pa,F)),W("mouseenter",Pr,()=>l(Ti,!0)),W("mouseleave",Pr,()=>{l(Ti,!1),Qe(Xt,null)}),W("keydown",Pr,function(...F){var xe;(xe=qt.handleKeyboard)==null||xe.apply(this,F)}),W("wheel",Pr,function(...F){var xe;(xe=qt.handleWheel)==null||xe.apply(this,F)}),W("touchstart",Pr,F=>qt.handleTouch(F,"start")),W("touchmove",Pr,F=>qt.handleTouch(F,"move")),W("touchend",Pr,F=>qt.handleTouch(F,"end")),y(e,Rs),Dt(),de()}var J0=U("<i></i>"),$0=U('<div class="tab list-title svelte-1fuoz6m"><!> </div>'),e1=U("<i></i>"),t1=U('<span class="tab-text svelte-1fuoz6m"> </span>'),r1=U("<button><!> <!></button>"),n1=U("<div><div><!> <!></div></div>");function i1(e,r){kt(r,!1);const n=h(),i=h(),s=h(),a=we.createEventDispatcher();let o=m(r,"containers",8),c=m(r,"direction",8),u=m(r,"selectedTab",8),g=m(r,"hAlign",8),d=m(r,"vAlign",8),p=m(r,"theme",8,"buttons"),_=m(r,"tabsPosition",8,"top"),S=m(r,"tabsAlignment",8),E=m(r,"buttonsAlignment",8,"flex-start"),A=m(r,"tabsIconsOnly",8),I=m(r,"list_icon",8),k=m(r,"list_title",8),C=m(r,"wide",8,!0),D=m(r,"quietTabs",8);x(()=>(v(_()),v(p())),()=>{l(n,_()=="left"||p()==="list")}),x(()=>(v(c()),v(g()),v(d())),()=>{l(i,c()==="row"?g():d())}),x(()=>v(p()),()=>{l(s,p()==="buttons"||p()==="wideButtons")}),Pt(),Ot();var w=Ze(),B=Ue(w);{var $=R=>{var H=n1();let Z,ue;var de=j(H);let Se,ce;var ke=j(de);{var De=le=>{var Q=$0(),Y=j(Q);{var J=ie=>{var z=J0();Ce(()=>Pe(z,1,Cn(I()),"svelte-1fuoz6m")),y(ie,z)};oe(Y,ie=>{I()&&ie(J)})}var K=Ee(Y);Ce(()=>Xe(K,` ${k()??""}`)),y(le,Q)};oe(ke,le=>{p()==="list"&&k()&&le(De)})}var ye=Ee(ke,2);xt(ye,1,o,Nt,(le,Q,Y)=>{var J=r1();let K,ie;var z=j(J);{var ge=re=>{var ae=e1();let ee;Ce(()=>{Pe(ae,1,Cn((t(Q),b(()=>t(Q).icon))),"svelte-1fuoz6m"),ee=We(ae,"",ee,{"font-size":A()?"20px":null,color:(t(Q),b(()=>t(Q).color))})}),y(re,ae)};oe(z,re=>{t(Q),b(()=>t(Q).icon)&&re(ge)})}var O=Ee(z,2);{var G=re=>{var ae=t1(),ee=j(ae);Ce(()=>Xe(ee,(t(Q),b(()=>t(Q).title||"Tab "+Y)))),y(re,ae)};oe(O,re=>{v(A()),t(Q),b(()=>!A()||!t(Q).icon)&&re(G)})}Ce(()=>{K=Pe(J,1,"tab svelte-1fuoz6m",null,K,{vertical:t(n),button:t(s),list:p()==="list",selected:t(Q).id===u(),disabled:t(Q).disabled,"list-section":t(Q).isTabSection}),ie=We(J,"",ie,{flex:E()=="stretch"?"1":null})}),W("click",J,()=>{!t(Q).disabled&&!t(Q).isTabSection&&a("change",t(Q))}),y(le,J)}),Ce(()=>{Z=Pe(H,1,"outer-tabs svelte-1fuoz6m",null,Z,{quietTabs:D(),list:p()==="list",vertical:t(n),wide:p()==="wideButtons"&&C()}),ue=We(H,"",ue,{"justify-content":t(i)}),Se=Pe(de,1,"tabs svelte-1fuoz6m",null,Se,{vertical:t(n),buttons:t(s),list:p()==="list",wide:p()==="wideButtons"&&C()}),ce=We(de,"",ce,{"justify-content":E(),"--tab-alignment":S(),"--tab-track-thickness":"1px"})}),y(R,H)};oe(B,R=>{v(o()),b(()=>{var H;return(H=o())==null?void 0:H.length})&&R($)})}y(e,w),Dt()}var a1=U('<img class="modal-image svelte-1o3clre"/>'),s1=U('<div class="modal-fallback svelte-1o3clre"><div class="pill svelte-1o3clre"> </div> <span class="filename svelte-1o3clre"> </span></div>'),o1=U('<button type="button"></button>'),l1=U('<div class="modal-indicators svelte-1o3clre"></div>'),u1=U('<button type="button"><i></i></button>'),c1=U('<button class="btn-nav large btn-modal-delete svelte-1o3clre" aria-label="Delete" type="button"><i class="ph ph-trash-simple"></i></button>'),d1=U('<div class="image-modal svelte-1o3clre" role="dialog" aria-modal="true" aria-labelledby="modal-title" tabindex="-1"><div class="image-modal-content svelte-1o3clre" tabindex="0"><div><button class="modal-close svelte-1o3clre" aria-label="Close modal" type="button">×</button> <!> <div class="modal-controls svelte-1o3clre"><div class="modal-navigation svelte-1o3clre"><button class="btn-nav large svelte-1o3clre" aria-label="Previous image" type="button"><i class="ph ph-caret-left"></i></button> <!> <button class="btn-nav large svelte-1o3clre" aria-label="Next image" type="button"><i class="ph ph-caret-right"></i></button></div> <div class="modal-actions svelte-1o3clre"><!> <!></div></div></div></div></div>');function cu(e,r){kt(r,!1);const n=h(),i=h(),s=h();let a=m(r,"items",24,()=>[]),o=m(r,"currentIndex",12,0),c=m(r,"open",12,!1),u=m(r,"selectedIndices",28,()=>new Set),g=m(r,"canSelect",8,!0),d=m(r,"canDelete",8,!1);const p=we.createEventDispatcher(),_={navigateNext(){var C;((C=a())==null?void 0:C.length)>1&&o((o()+1)%a().length)},navigatePrev(){var C;((C=a())==null?void 0:C.length)>1&&o((o()-1+a().length)%a().length)},navigateTo(C){var D;C>=0&&C<((D=a())==null?void 0:D.length)&&o(C)},toggleSelection(C){const D=new Set(u());D.has(C)?D.delete(C):D.add(C),u(D)},closeModal(){c(!1),p("close")},handleKeydown(C){var D,w;switch(C.key){case"Escape":_.closeModal();break;case"ArrowLeft":C.preventDefault(),_.navigatePrev();break;case"ArrowRight":case" ":C.preventDefault(),_.navigateNext();break;case"Home":C.preventDefault(),_.navigateTo(0);break;case"End":C.preventDefault(),_.navigateTo(((D=a())==null?void 0:D.length)-1||0);break;case"PageUp":C.preventDefault(),_.navigatePrev();break;case"PageDown":C.preventDefault(),_.navigateNext();break;default:if(C.key>="1"&&C.key<="9"){const B=parseInt(C.key)-1;B<(((w=a())==null?void 0:w.length)||0)&&(C.preventDefault(),_.navigateTo(B))}break}},isImage(C){var w;return["jpg","jpeg","png","gif","bmp","webp"].includes((w=C==null?void 0:C.extension)==null?void 0:w.toLowerCase())}},S=C=>{C.focus()};x(()=>(v(a()),v(o())),()=>{var C;l(n,((C=a())==null?void 0:C.length)>1&&o()>0)}),x(()=>(v(a()),v(o())),()=>{var C,D;l(i,((C=a())==null?void 0:C.length)>1&&o()<(((D=a())==null?void 0:D.length)-1||0))}),x(()=>(v(a()),v(o())),()=>{var C;l(s,(C=a())==null?void 0:C[o()])}),Pt();var E={lightboxAPI:_};Ot();var A=Ze(),I=Ue(A);{var k=C=>{var D=d1(),w=j(D),B=j(w);let $;var R=j(B),H=Ee(R,2);{var Z=ie=>{var z=a1();Ce(()=>{Lt(z,"src",(t(s),b(()=>t(s).url))),Lt(z,"alt",(t(s),b(()=>t(s).name)))}),y(ie,z)},ue=ie=>{var z=s1(),ge=j(z),O=j(ge),G=Ee(ge,2),re=j(G);Ce(ae=>{Xe(O,ae),Xe(re,(t(s),b(()=>{var ee;return(ee=t(s))==null?void 0:ee.name})))},[()=>(t(s),b(()=>{var ae,ee;return(ee=(ae=t(s))==null?void 0:ae.extension)==null?void 0:ee.toUpperCase()}))]),y(ie,z)};oe(H,ie=>{t(s),b(()=>_.isImage(t(s)))?ie(Z):ie(ue,!1)})}var de=Ee(H,2),Se=j(de),ce=j(Se),ke=Ee(ce,2);{var De=ie=>{var z=l1();xt(z,5,a,Nt,(ge,O,G)=>{var re=o1();let ae;Lt(re,"aria-label",`Go to image ${G+1}`),Ce(()=>ae=Pe(re,1,"indicator large svelte-1o3clre",null,ae,{active:G===o()})),W("click",re,()=>_.navigateTo(G)),y(ge,re)}),y(ie,z)};oe(ke,ie=>{v(a()),b(()=>{var z;return((z=a())==null?void 0:z.length)>1})&&ie(De)})}var ye=Ee(ke,2),le=Ee(Se,2),Q=j(le);{var Y=ie=>{var z=u1();let ge;var O=j(z);Ce((G,re,ae)=>{ge=Pe(z,1,"btn-nav large btn-modal-select svelte-1o3clre",null,ge,G),Lt(z,"aria-label",re),Pe(O,1,`ph ${ae??""}`)},[()=>({selected:u().has(o())}),()=>(v(u()),v(o()),b(()=>u().has(o())?"Deselect":"Select")),()=>(v(u()),v(o()),b(()=>u().has(o())?"ph-check-square":"ph-square"))]),W("click",z,()=>_.toggleSelection(o())),y(ie,z)};oe(Q,ie=>{g()&&ie(Y)})}var J=Ee(Q,2);{var K=ie=>{var z=c1();W("click",z,()=>p("delete",{index:o(),item:a()[o()]})),y(ie,z)};oe(J,ie=>{d()&&ie(K)})}Ut(()=>W("click",w,fr(function(ie){Yn.call(this,r,ie)}))),Ut(()=>W("keydown",w,function(...ie){var z;(z=_.handleKeydown)==null||z.apply(this,ie)})),zr(w,ie=>S==null?void 0:S(ie)),Ce(ie=>{$=Pe(B,1,"modal-image-container svelte-1o3clre",null,$,ie),Lt(B,"aria-label",`Image ${o()+1} of ${v(a()),b(()=>{var z;return((z=a())==null?void 0:z.length)||1})??""}. Use arrow keys to navigate, Home/End for first/last, numbers 1-9 to jump to images, Space for next, Escape to close.`),ce.disabled=!t(n),ye.disabled=!t(i)},[()=>({selected:u().has(o())})]),W("click",R,function(...ie){var z;(z=_.closeModal)==null||z.apply(this,ie)}),W("click",ce,function(...ie){var z;(z=_.navigatePrev)==null||z.apply(this,ie)}),W("click",ye,function(...ie){var z;(z=_.navigateNext)==null||z.apply(this,ie)}),W("click",D,function(...ie){var z;(z=_.closeModal)==null||z.apply(this,ie)}),y(C,D)};oe(I,C=>{c()&&C(k)})}return y(e,A),vr(r,"lightboxAPI",_),Dt(E)}var f1=U('<i class="ri-check-line svelte-ncsr1h"></i>'),h1=U('<div class="color-swatch svelte-ncsr1h" role="button" tabindex="0"><div><!></div></div>'),g1=U('<div class="category"><div class="heading svelte-ncsr1h"> </div> <div class="colors svelte-ncsr1h"></div></div>'),v1=U('<i class="ri-check-line svelte-ncsr1h"></i>'),p1=U('<div class="color-swatch svelte-ncsr1h" role="button" tabindex="0"><div><!></div></div>'),m1=U('<div class="category"><div class="heading svelte-ncsr1h"><i class="ri-palette-line heading-icon svelte-ncsr1h"></i> </div> <div class="colors svelte-ncsr1h"></div></div>'),_1=U('<div class="category category--custom svelte-ncsr1h"><div class="heading svelte-ncsr1h">Custom</div> <div class="custom svelte-ncsr1h"><input type="text" class="custom-input svelte-ncsr1h" placeholder="Enter custom color"/> <button class="clear-value svelte-ncsr1h"><i class="ri-close-line"></i></button></div></div>'),b1=U('<div class="container svelte-ncsr1h"><!> <!> <!></div>'),y1=U('<div role="button" tabindex="0"><div></div></div> <!>',1);function w1(e,r){kt(r,!1);const n=h(),i=h(),s=h(),a=h(),o=h(),c=h(),u=h(),g=h(),d=h(),p=h();let _=m(r,"value",12),S=m(r,"size",8,"M"),E=m(r,"spectrumTheme",8),A=m(r,"offset",8),I=m(r,"cellOptions",24,()=>({})),k=h(!1),C=h(),D=h(!1);const w=we.createEventDispatcher();function B(Y,J){return[...Y?[{label:"Theme colors",colors:["red-100","orange-100","yellow-100","green-100","seafoam-100","blue-100","indigo-100","magenta-100","red-400","orange-400","yellow-400","green-400","seafoam-400","blue-400","indigo-400","magenta-400","red-500","orange-500","yellow-500","green-500","seafoam-500","blue-500","indigo-500","magenta-500","red-600","orange-600","yellow-600","green-600","seafoam-600","blue-600","indigo-600","magenta-600","red-700","orange-700","yellow-700","green-700","seafoam-700","blue-700","indigo-700","magenta-700","gray-50","gray-75","gray-100","gray-200","gray-300","gray-400","gray-500","gray-600","gray-700","gray-800","gray-900"]}]:[],...J?[{label:"Static colors",colors:["static-red-400","static-orange-400","static-yellow-400","static-green-400","static-seafoam-400","static-blue-400","static-indigo-400","static-magenta-400","static-red-800","static-orange-800","static-yellow-800","static-green-800","static-seafoam-800","static-blue-800","static-indigo-800","static-magenta-800","static-red-1200","static-orange-1200","static-yellow-1200","static-green-1200","static-seafoam-1200","static-blue-1200","static-indigo-1200","static-magenta-1200","static-white","static-black"]}]:[]]}function $(Y){return{label:"Palette",colors:Y.map(J=>J.value),customLabels:Y.reduce((J,K)=>(J[K.value]=K.label,J),{})}}const R=Y=>{const J=Y===_()?null:Y;_(J),w("change",J),l(k,!1),l(D,!1)},H=Y=>{var K;return Y&&(((K=t(d))==null?void 0:K.some(ie=>ie.colors.some(z=>`var(--spectrum-global-color-${z})`===Y)))?null:Y)},Z=(Y,J)=>J.customLabels&&J.customLabels[Y]?J.customLabels[Y]:Y.split("-").join(" "),ue=Y=>Y?Y.includes("-gray-")?/^.*(gray-(50|75|100|200|300|400|500))\)$/.test(Y)?"var(--spectrum-global-color-gray-900)":"var(--spectrum-global-color-gray-50)":Y.includes("-100")?"var(--spectrum-global-color-gray-900)":Y.includes("static-black")?"var(--spectrum-global-color-static-gray-50)":"var(--spectrum-global-color-static-gray-900)":"var(--spectrum-global-color-static-gray-900)",de=(Y,J,K)=>{(Y.key==="Enter"||Y.key===" ")&&(Y.preventDefault(),R(K?J:`var(--spectrum-global-color-${J})`))};x(()=>v(_()),()=>{l(n,H(_()))}),x(()=>v(_()),()=>{l(i,ue(_()))}),x(()=>v(I()),()=>{var Y;l(s,((Y=I())==null?void 0:Y.allowCustom)!==!1)}),x(()=>v(I()),()=>{var Y;l(a,((Y=I())==null?void 0:Y.swatch)==="circle")}),x(()=>v(I()),()=>{var Y,J;l(o,((Y=I())==null?void 0:Y.readonly)||((J=I())==null?void 0:J.disabled))}),x(()=>v(I()),()=>{var Y;l(c,((Y=I())==null?void 0:Y.customColors)||[])}),x(()=>v(I()),()=>{var Y;l(u,((Y=I())==null?void 0:Y.themeColors)!==!1)}),x(()=>v(I()),()=>{var Y;l(g,((Y=I())==null?void 0:Y.staticColors)!==!1)}),x(()=>(t(u),t(g)),()=>{l(d,B(t(u),t(g)))}),x(()=>t(c),()=>{l(p,$(t(c)))}),Pt(),Ot();var Se=y1(),ce=Ue(Se);let ke;var De=j(ce);let ye;ht(ce,Y=>l(C,Y),()=>t(C));var le=Ee(ce,2);{var Q=Y=>{Qr(Y,{get anchor(){return t(C)},get open(){return t(k)},align:"left",get offset(){return A()},children:(J,K)=>{var ie=b1(),z=j(ie);xt(z,1,()=>t(d),Nt,(ae,ee)=>{var pe=g1(),Ne=j(pe),He=j(Ne),me=Ee(Ne,2);xt(me,5,()=>(t(ee),b(()=>t(ee).colors)),Nt,(V,fe)=>{var X=h1(),q=j(X),he=j(q);{var P=te=>{var M=f1();Ce(()=>We(M,`color: ${t(i)??""};`)),y(te,M)};oe(he,te=>{_()===`var(--spectrum-global-color-${t(fe)})`&&te(P)})}Ce(te=>{Lt(X,"title",te),Pe(q,1,`color-fill ${(E()||"")??""}`,"svelte-ncsr1h"),We(q,`background: var(--spectrum-global-color-${t(fe)??""});`)},[()=>(t(fe),t(ee),b(()=>Z(t(fe),t(ee))))]),W("click",X,()=>R(`var(--spectrum-global-color-${t(fe)})`)),W("keydown",X,te=>de(te,t(fe),!1)),y(V,X)}),Ce(()=>Xe(He,(t(ee),b(()=>t(ee).label)))),y(ae,pe)});var ge=Ee(z,2);{var O=ae=>{var ee=m1(),pe=j(ee),Ne=Ee(j(pe)),He=Ee(pe,2);xt(He,5,()=>(t(p),b(()=>t(p).colors)),Nt,(me,V)=>{var fe=p1(),X=j(fe),q=j(X);{var he=P=>{var te=v1();Ce(()=>We(te,`color: ${t(i)??""};`)),y(P,te)};oe(q,P=>{_()===t(V)&&P(he)})}Ce(P=>{Lt(fe,"title",P),Pe(X,1,`color-fill ${(E()||"")??""}`,"svelte-ncsr1h"),We(X,`background: ${t(V)??""};`)},[()=>(t(V),t(p),b(()=>Z(t(V),t(p))))]),W("click",fe,()=>R(t(V))),W("keydown",fe,P=>de(P,t(V),!0)),y(me,fe)}),Ce(()=>Xe(Ne,` ${t(p),b(()=>t(p).label)??""}`)),y(ae,ee)};oe(ge,ae=>{t(p),b(()=>t(p).colors.length>0)&&ae(O)})}var G=Ee(ge,2);{var re=ae=>{var ee=_1(),pe=Ee(j(ee),2),Ne=j(pe),He=Ee(Ne,2);ea(Ne,()=>t(n),me=>l(n,me)),W("change",Ne,()=>{t(n)&&R(t(n))}),W("click",He,()=>R(null)),y(ae,ee)};oe(G,ae=>{t(s)&&ae(re)})}y(J,ie)},$$slots:{default:!0}})};oe(le,Y=>{t(D)&&Y(Q)})}Ce(()=>{ke=Pe(ce,1,`preview-swatch size--${S()||"M"}`,"svelte-ncsr1h",ke,{circle:t(a),readonly:t(o)}),ye=Pe(De,1,`preview-fill ${(E()||"")??""}`,"svelte-ncsr1h",ye,{circle:t(a),placeholder:!_()}),We(De,_()?`background: ${_()};`:"")}),W("click",ce,function(...Y){var J;(J=t(o)?null:()=>{l(D,!0),l(k,!t(k))})==null||J.apply(this,Y)}),W("keydown",ce,Y=>{(Y.key==="Enter"||Y.key===" "&&!t(o))&&(l(D,!0),l(k,!t(k)))}),y(e,Se),Dt()}var E1=U("<i></i>"),S1=U('<button class="clear-button ri-close-line svelte-ht1x6b" style="font-size: 14px; color: var(--spectrum-global-color-gray-500);" aria-label="Clear date range"></button>'),C1=U('<div><span> </span> <i class="ri-calendar-line" style="font-size: 16px; justify-self: flex-end"></i> <!></div>'),A1=U("<div><span><!></span></div>"),T1=U('<div class="time-section svelte-ht1x6b"><input type="time" class="time-input svelte-ht1x6b" step="900"/></div>'),k1=U('<div class="time-section svelte-ht1x6b"><input type="time" class="time-input svelte-ht1x6b" step="900"/></div>'),D1=U('<div class="range-error svelte-ht1x6b"><i class="ri-error-warning-line" style="color: var(--spectrum-global-color-red-500);"></i> <span style="color: var(--spectrum-global-color-red-500); font-size: 12px;">End date cannot be before start date</span></div>'),x1=U('<div class="range-picker-container svelte-ht1x6b"><div class="datepickers-container svelte-ht1x6b"><div class="range-section svelte-ht1x6b"><label class="range-label svelte-ht1x6b">From:</label> <div><!></div> <!></div> <div class="range-section svelte-ht1x6b"><label class="range-label svelte-ht1x6b">To:</label> <div><!></div> <!></div></div> <!></div>'),O1=U("<div><!> <!></div> <!>",1);function I1(e,r){kt(r,!1);const n=()=>Be(ue(),"$cellState",i),[i,s]=Gt(),a=h(),o=h(),c=h(),u=h(),g=h(),d=h(),p=h(),_=h(),S=h(),E=h(),A=h(),I=h(),k=h(),C=h(),D=new we.createEventDispatcher,{processStringSync:w}=we.getContext("sdk");let B=m(r,"value",12),$=m(r,"formattedValue",12),R=m(r,"cellOptions",8),H=m(r,"autofocus",8),Z=h(),ue=m(r,"cellState",24,()=>sr("View",{"*":{goTo(X){return X}},View:{focus(){if(!R().readonly)return"Editing"}},Editing:{_enter(){l(Z,B()?{...B()}:null),l(ce,!0),D("enteredit")},_exit(){D("exitedit")},handleKeyboard(X){X.keyCode==32&&(X.stopPropagation(),X.preventDefault(),l(ce,!t(ce)))},focusout(X){var te,M,T,N,ne;const q=(te=t(Se))==null?void 0:te.contains(X.relatedTarget),he=(M=t(ye))!=null&&M.contains?(T=t(ye))==null?void 0:T.contains(X.relatedTarget):!1,P=(N=t(le))!=null&&N.contains?(ne=t(le))==null?void 0:ne.contains(X.relatedTarget):!1;if(!q&&!he&&!P)return l(ce,!1),JSON.stringify(B())!=JSON.stringify(t(Z))&&D("change",B()),"View"},cancel(){return B(t(Z)?{...t(Z)}:null),"View"}}})),de=h(),Se=h(),ce=h(!1),ke=h(),De=h(),ye=h(),le=h();function Q(X,q,he,P,te,M){const T=Y(X,X,he).from+" "+P,N=Y(q,q,he).to+" "+te;return{from:T,to:N}}function Y(X,q,he){if(console.log("🔍 formatDateRange called with:",{fromDate:X,toDate:q,dateFormat:he}),!he||he==="default")return console.log("➡️ Using default format"),{from:X.toDateString(),to:q.toDateString()};if(he==="MM/DD/YYYY"){const M=`${(X.getMonth()+1).toString().padStart(2,"0")}/${X.getDate().toString().padStart(2,"0")}/${X.getFullYear()}`,T=`${(q.getMonth()+1).toString().padStart(2,"0")}/${q.getDate().toString().padStart(2,"0")}/${q.getFullYear()}`;return console.log("✅ MM/DD/YYYY formatted:",{from:M,to:T}),{from:M,to:T}}if(he==="DD/MM/YYYY"){const M=`${X.getDate().toString().padStart(2,"0")}/${(X.getMonth()+1).toString().padStart(2,"0")}/${X.getFullYear()}`,T=`${q.getDate().toString().padStart(2,"0")}/${(q.getMonth()+1).toString().padStart(2,"0")}/${q.getFullYear()}`;return console.log("✅ DD/MM/YYYY formatted:",{from:M,to:T}),{from:M,to:T}}if(he==="YYYY-MM-DD"){const M=`${X.getFullYear()}-${(X.getMonth()+1).toString().padStart(2,"0")}-${X.getDate().toString().padStart(2,"0")}`,T=`${q.getFullYear()}-${(q.getMonth()+1).toString().padStart(2,"0")}-${q.getDate().toString().padStart(2,"0")}`;return console.log("✅ YYYY-MM-DD formatted:",{from:M,to:T}),{from:M,to:T}}const te={"MMM DD, YYYY":{month:"short",day:"numeric",year:"numeric",timeZone:"UTC"},"DD MMM YYYY":{day:"numeric",month:"short",year:"numeric",timeZone:"UTC"}}[he];if(console.log("📅 Format object:",te),te){const M=X.toLocaleDateString("en-US",te),T=q.toLocaleDateString("en-US",te);return console.log("✅ Formatted result:",{from:M,to:T}),{from:M,to:T}}return console.log("⚠️ Format not found, using fallback"),{from:X.toDateString(),to:q.toDateString()}}we.onMount(()=>{H()&&setTimeout(()=>{ue().focus()},30)});const J=X=>{const q=X.detail;B({...B(),from:q}),B().to&&new Date(B().to)<q&&B({...B(),to:null}),D("change",B())},K=X=>{const q=X.detail;B({...B(),to:q}),D("change",B())},ie=X=>{const q=X.target.value;B({...B(),fromTime:q}),D("change",B())},z=X=>{const q=X.target.value;B({...B(),toTime:q}),D("change",B())},ge=()=>{B(null),D("change",null)};x(()=>v(R()),()=>{var X;l(a,(X=R())==null?void 0:X.dateFormat)}),x(()=>v(R()),()=>{var X;l(o,(X=R())==null?void 0:X.showTime)}),x(()=>(t(o),v(B())),()=>{var X;l(c,t(o)&&((X=B())!=null&&X.fromTime)?B().fromTime:"00:00")}),x(()=>(t(o),v(B())),()=>{var X;l(u,t(o)&&((X=B())!=null&&X.toTime)?B().toTime:"00:00")}),x(()=>v(B()),()=>{var X;l(g,(X=B())!=null&&X.from?new Date(B().from):new Date)}),x(()=>v(B()),()=>{var X;l(d,(X=B())!=null&&X.to?new Date(B().to):new Date)}),x(()=>(t(o),v(B()),t(g),t(c)),()=>{var X;l(p,t(o)&&((X=B())!=null&&X.from)?new Date(`${t(g).toISOString().split("T")[0]}T${t(c)}`):t(g))}),x(()=>(t(o),v(B()),t(d),t(u)),()=>{var X;l(_,t(o)&&((X=B())!=null&&X.to)?new Date(`${t(d).toISOString().split("T")[0]}T${t(u)}`):t(d))}),x(()=>(v(B()),t(o),t(p),t(_),t(g),t(d)),()=>{l(S,(()=>{var X,q;return!((X=B())!=null&&X.from)||!((q=B())!=null&&q.to)?!0:t(o)?t(p)<=t(_):t(g)<=t(d)})())}),x(()=>(v(R()),v(B())),()=>{$(R().template&&B()?w(R().template,{value:B()}):void 0)}),x(()=>v(R()),()=>{l(A,R().readonly||R().disabled?"":R().placeholder||"Select date range")}),x(()=>(v($()),v(B()),t(A),t(a),t(o),t(g),t(c),t(d),t(u)),()=>{l(E,(()=>{var P,te,M,T,N,ne,ve,Oe;if($())return $();if(!((P=B())!=null&&P.from)&&!((te=B())!=null&&te.to))return t(A);const X=t(a);let q=t(A),he=t(A);return(M=B())!=null&&M.from&&(X==="default"||!X?q=t(o)?t(g).toDateString()+" "+t(c):t(g).toDateString():t(o)?q=Q(t(g),t(g),X,t(c),t(c)).from:q=Y(t(g),t(g),X).from),(T=B())!=null&&T.to&&(X==="default"||!X?he=t(o)?t(d).toDateString()+" "+t(u):t(d).toDateString():t(o)?he=Q(t(d),t(d),X,t(u),t(u)).to:he=Y(t(d),t(d),X).to),(N=B())!=null&&N.from&&((ne=B())!=null&&ne.to)?`${q} - ${he}`:(ve=B())!=null&&ve.from?`${q} - [Select end date]`:(Oe=B())!=null&&Oe.to?`[Select start date] - ${he}`:t(A)})())}),x(()=>n(),()=>{l(I,n()=="Editing")}),x(()=>v(R()),()=>{l(k,R().role=="inlineInput")}),x(()=>(t(I),v(B()),t(Z)),()=>{l(C,t(I)&&JSON.stringify(B())!=JSON.stringify(t(Z)))}),Pt(),Ot();var O=O1(),G=Ue(O);let re,ae;var ee=j(G);{var pe=X=>{var q=E1();Ce(()=>Pe(q,1,(v(R()),b(()=>R().icon+" icon")),"svelte-ht1x6b")),y(X,q)};oe(ee,X=>{v(R()),b(()=>R().icon)&&X(pe)})}var Ne=Ee(ee,2);{var He=X=>{var q=C1();let he;var P=j(q),te=j(P),M=Ee(P,4);{var T=N=>{var ne=S1();W("click",ne,fr(ge)),y(N,ne)};oe(M,N=>{v(B()),v(R()),b(()=>B()&&R().showDirty!=!1)&&N(T)})}Ce(()=>{he=Pe(q,1,"editor svelte-ht1x6b",null,he,{"with-icon":R().icon,placeholder:!B()}),Xe(te,t(E))}),W("click",q,()=>l(ce,!t(ce))),y(X,q)},me=X=>{var q=A1();let he,P;var te=j(q),M=j(te);{var T=ne=>{var ve=Ni();Ce(()=>Xe(ve,t(E))),y(ne,ve)},N=ne=>{var ve=Ni();Ce(()=>Xe(ve,t(A))),y(ne,ve)};oe(M,ne=>{t(E)?ne(T):ne(N,!1)})}Ce(()=>{he=Pe(q,1,"value",null,he,{"with-icon":R().icon,placeholder:!B()}),P=We(q,"",P,{"justify-content":(v(R()),b(()=>R().align))})}),y(X,q)};oe(Ne,X=>{t(I)?X(He):X(me,!1)})}ht(G,X=>l(de,X),()=>t(de));var V=Ee(G,2);{var fe=X=>{Qr(X,{get anchor(){return t(de)},dismissible:!1,get open(){return t(ce)},align:"right",children:(q,he)=>{var P=x1();We(P,"",{},{"--date-picker-background":"var(--spectrum-global-color-gray-75)","--date-picker-foreground":"var(--spectrum-global-color-gray-800)","--date-picker-selected-background":"var(--accent-color)"});var te=j(P),M=j(te),T=Ee(j(M),2),N=j(T);iu(N,{get value(){return t(g)},$$events:{select:J}}),ht(T,Fe=>l(ke,Fe),()=>t(ke));var ne=Ee(T,2);{var ve=Fe=>{var Ae=T1(),Ge=j(Ae);ht(Ge,$e=>l(ye,$e),()=>t(ye)),ea(Ge,()=>t(c),$e=>l(c,$e)),W("change",Ge,ie),y(Fe,Ae)};oe(ne,Fe=>{t(o)&&Fe(ve)})}var Oe=Ee(M,2),Me=Ee(j(Oe),2),Re=j(Me);iu(Re,{get value(){return t(d)},get min(){return t(g)},$$events:{select:K}}),ht(Me,Fe=>l(De,Fe),()=>t(De));var se=Ee(Me,2);{var Ie=Fe=>{var Ae=k1(),Ge=j(Ae);ht(Ge,$e=>l(le,$e),()=>t(le)),ea(Ge,()=>t(u),$e=>l(u,$e)),W("change",Ge,z),y(Fe,Ae)};oe(se,Fe=>{t(o)&&Fe(Ie)})}var Le=Ee(te,2);{var je=Fe=>{var Ae=D1();y(Fe,Ae)};oe(Le,Fe=>{t(S)||Fe(je)})}ht(P,Fe=>l(Se,Fe),()=>t(Se)),y(q,P)},$$slots:{default:!0}})};oe(V,X=>{t(I)&&X(fe)})}Ce(()=>{re=Pe(G,1,"superCell",null,re,{inEdit:t(I),isDirty:t(C)&&R().showDirty,inline:t(k),tableCell:R().role=="tableCell",formInput:R().role=="formInput",disabled:R().disabled,readonly:R().readonly,error:R().error}),Lt(G,"tabindex",(v(R()),b(()=>R().readonly||R().disabled?"-1":"0"))),ae=We(G,"",ae,{color:(v(R()),b(()=>R().color)),background:(v(R()),b(()=>R().background)),"font-weight":(v(R()),b(()=>R().fontWeight))})}),W("focus",G,function(...X){var q;(q=ue().focus)==null||q.apply(this,X)}),W("keypress",G,function(...X){var q;(q=ue().handleKeyboard)==null||q.apply(this,X)}),W("focusout",G,function(...X){var q;(q=ue().focusout)==null||q.apply(this,X)}),y(e,O),Dt(),s()}const R1={all:"All Icons",business:"Business",communication:"Communication",design:"Design",development:"Development",document:"Document",editor:"Editor",finance:"Finance",health:"Health",logistics:"Logistics",map:"Maps",media:"Media",system:"System",user:"User",weather:"Weather"},du={all:["acorn","address-book","address-book-tabs","air-traffic-control","airplane","airplane-in-flight","airplane-landing","airplane-takeoff","airplane-taxiing","airplane-tilt","airplay","alarm","alien","align-bottom","align-bottom-simple","align-center-horizontal","align-center-horizontal-simple","align-center-vertical","align-center-vertical-simple","align-left","align-left-simple","align-right","align-right-simple","align-top","align-top-simple","amazon-logo","ambulance","anchor","anchor-simple","android-logo","angle","angular-logo","aperture","app-store-logo","app-window","apple-logo","apple-podcasts-logo","approximate-equals","archive","armchair","arrow-arc-left","arrow-arc-right","arrow-bend-double-up-left","arrow-bend-double-up-right","arrow-bend-down-left","arrow-bend-down-right","arrow-bend-left-down","arrow-bend-left-up","arrow-bend-right-down","arrow-bend-right-up","arrow-bend-up-left","arrow-bend-up-right","arrow-circle-down","arrow-circle-down-left","arrow-circle-down-right","arrow-circle-left","arrow-circle-right","arrow-circle-up","arrow-circle-up-left","arrow-circle-up-right","arrow-clockwise","arrow-counter-clockwise","arrow-down","arrow-down-left","arrow-down-right","arrow-elbow-down-left","arrow-elbow-down-right","arrow-elbow-left","arrow-elbow-left-down","arrow-elbow-left-up","arrow-elbow-right","arrow-elbow-right-down","arrow-elbow-right-up","arrow-elbow-up-left","arrow-elbow-up-right","arrow-fat-down","arrow-fat-left","arrow-fat-line-down","arrow-fat-line-left","arrow-fat-line-right","arrow-fat-line-up","arrow-fat-lines-down","arrow-fat-lines-left","arrow-fat-lines-right","arrow-fat-lines-up","arrow-fat-right","arrow-fat-up","arrow-left","arrow-line-down","arrow-line-down-left","arrow-line-down-right","arrow-line-left","arrow-line-right","arrow-line-up","arrow-line-up-left","arrow-line-up-right","arrow-right","arrow-square-down","arrow-square-down-left","arrow-square-down-right","arrow-square-in","arrow-square-left","arrow-square-out","arrow-square-right","arrow-square-up","arrow-square-up-left","arrow-square-up-right","arrow-u-down-left","arrow-u-down-right","arrow-u-left-down","arrow-u-left-up","arrow-u-right-down","arrow-u-right-up","arrow-u-up-left","arrow-u-up-right","arrow-up","arrow-up-left","arrow-up-right","arrows-clockwise","arrows-counter-clockwise","arrows-down-up","arrows-horizontal","arrows-in","arrows-in-cardinal","arrows-in-line-horizontal","arrows-in-line-vertical","arrows-in-simple","arrows-left-right","arrows-merge","arrows-out","arrows-out-cardinal","arrows-out-line-horizontal","arrows-out-line-vertical","arrows-out-simple","arrows-split","arrows-vertical","article","article-medium","article-ny-times","asclepius","caduceus","asterisk","asterisk-simple","at","atom","avocado","axe","baby","baby-carriage","backpack","backspace","bag","bag-simple","balloon","bandaids","bank","barbell","barcode","barn","barricade","baseball","baseball-cap","baseball-helmet","basket","basketball","bathtub","battery-charging","battery-charging-vertical","battery-empty","battery-full","battery-high","battery-low","battery-medium","battery-plus","battery-plus-vertical","battery-vertical-empty","battery-vertical-full","battery-vertical-high","battery-vertical-low","battery-vertical-medium","battery-warning","battery-warning-vertical","beach-ball","beanie","bed","beer-bottle","beer-stein","behance-logo","bell","bell-ringing","bell-simple","bell-simple-ringing","bell-simple-slash","bell-simple-z","bell-slash","bell-z","belt","bezier-curve","bicycle","binary","binoculars","biohazard","bird","blueprint","bluetooth","bluetooth-connected","bluetooth-slash","bluetooth-x","boat","bomb","bone","book","book-bookmark","book-open","book-open-text","book-open-user","bookmark","bookmark-simple","bookmarks","bookmarks-simple","books","boot","boules","bounding-box","bowl-food","bowl-steam","bowling-ball","box-arrow-down","archive-box","box-arrow-up","boxing-glove","brackets-angle","brackets-curly","brackets-round","brackets-square","brain","brandy","bread","bridge","briefcase","briefcase-metal","broadcast","broom","browser","browsers","bug","bug-beetle","bug-droid","building","building-apartment","building-office","buildings","bulldozer","bus","butterfly","cable-car","cactus","cake","calculator","calendar","calendar-blank","calendar-check","calendar-dot","calendar-dots","calendar-heart","calendar-minus","calendar-plus","calendar-slash","calendar-star","calendar-x","call-bell","camera","camera-plus","camera-rotate","camera-slash","campfire","car","car-battery","car-profile","car-simple","cardholder","cards","cards-three","caret-circle-double-down","caret-circle-double-left","caret-circle-double-right","caret-circle-double-up","caret-circle-down","caret-circle-left","caret-circle-right","caret-circle-up","caret-circle-up-down","caret-double-down","caret-double-left","caret-double-right","caret-double-up","caret-down","caret-left","caret-line-down","caret-line-left","caret-line-right","caret-line-up","caret-right","caret-up","caret-up-down","carrot","cash-register","cassette-tape","castle-turret","cat","cell-signal-full","cell-signal-high","cell-signal-low","cell-signal-medium","cell-signal-none","cell-signal-slash","cell-signal-x","cell-tower","certificate","chair","chalkboard","chalkboard-simple","chalkboard-teacher","champagne","charging-station","chart-bar","chart-bar-horizontal","chart-donut","chart-line","chart-line-down","chart-line-up","chart-pie","chart-pie-slice","chart-polar","chart-scatter","chat","chat-centered","chat-centered-dots","chat-centered-slash","chat-centered-text","chat-circle","chat-circle-dots","chat-circle-slash","chat-circle-text","chat-dots","chat-slash","chat-teardrop","chat-teardrop-dots","chat-teardrop-slash","chat-teardrop-text","chat-text","chats","chats-circle","chats-teardrop","check","check-circle","check-fat","check-square","check-square-offset","checkerboard","checks","cheers","cheese","chef-hat","cherries","church","cigarette","cigarette-slash","circle","circle-dashed","circle-half","circle-half-tilt","circle-notch","circles-four","circles-three","circles-three-plus","circuitry","city","clipboard","clipboard-text","clock","clock-afternoon","clock-clockwise","clock-countdown","clock-counter-clockwise","clock-user","closed-captioning","cloud","cloud-arrow-down","cloud-arrow-up","cloud-check","cloud-fog","cloud-lightning","cloud-moon","cloud-rain","cloud-slash","cloud-snow","cloud-sun","cloud-warning","cloud-x","clover","club","coat-hanger","coda-logo","code","code-block","code-simple","codepen-logo","codesandbox-logo","coffee","coffee-bean","coin","coin-vertical","coins","columns","columns-plus-left","columns-plus-right","command","compass","compass-rose","compass-tool","computer-tower","confetti","contactless-payment","control","cookie","cooking-pot","copy","copy-simple","copyleft","copyright","corners-in","corners-out","couch","court-basketball","cow","cowboy-hat","cpu","crane","crane-tower","credit-card","cricket","crop","cross","crosshair","crosshair-simple","crown","crown-cross","crown-simple","cube","cube-focus","cube-transparent","currency-btc","currency-circle-dollar","currency-cny","currency-dollar","currency-dollar-simple","currency-eth","currency-eur","currency-gbp","currency-inr","currency-jpy","currency-krw","currency-kzt","currency-ngn","currency-rub","cursor","cursor-click","cursor-text","cylinder","database","desk","desktop","desktop-tower","detective","dev-to-logo","device-mobile","device-mobile-camera","device-mobile-slash","device-mobile-speaker","device-rotate","device-tablet","device-tablet-camera","device-tablet-speaker","devices","diamond","diamonds-four","dice-five","dice-four","dice-one","dice-six","dice-three","dice-two","disc","disco-ball","discord-logo","divide","dna","dog","door","door-open","dot","dot-outline","dots-nine","dots-six","dots-six-vertical","dots-three","dots-three-circle","dots-three-circle-vertical","dots-three-outline","dots-three-outline-vertical","dots-three-vertical","download","download-simple","dress","dresser","dribbble-logo","drone","drop","drop-half","drop-half-bottom","drop-simple","drop-slash","dropbox-logo","ear","ear-slash","egg","egg-crack","eject","eject-simple","elevator","engine","envelope","envelope-open","envelope-simple","envelope-simple-open","equalizer","equals","eraser","escalator-down","escalator-up","exam","exclamation-mark","exclude","exclude-square","export","eye","eye-closed","eye-slash","eyedropper","eyedropper-sample","eyeglasses","eyes","face-mask","facebook-logo","factory","faders","faders-horizontal","fallout-shelter","fan","farm","fast-forward","fast-forward-circle","feather","fediverse-logo","figma-logo","file","file-archive","file-arrow-down","file-arrow-up","file-audio","file-c","file-c-sharp","file-cloud","file-code","file-cpp","file-css","file-csv","file-dashed","file-dotted","file-doc","file-html","file-image","file-ini","file-jpg","file-js","file-jsx","file-lock","file-magnifying-glass","file-search","file-md","file-minus","file-pdf","file-plus","file-png","file-ppt","file-py","file-rs","file-sql","file-svg","file-text","file-ts","file-tsx","file-txt","file-video","file-vue","file-x","file-xls","file-zip","files","film-reel","film-script","film-slate","film-strip","fingerprint","fingerprint-simple","finn-the-human","fire","fire-extinguisher","fire-simple","fire-truck","first-aid","first-aid-kit","fish","fish-simple","flag","flag-banner","flag-banner-fold","flag-checkered","flag-pennant","flame","flashlight","flask","flip-horizontal","flip-vertical","floppy-disk","floppy-disk-back","flow-arrow","flower","flower-lotus","flower-tulip","flying-saucer","folder","folder-notch","folder-dashed","folder-dotted","folder-lock","folder-minus","folder-notch-minus","folder-open","folder-notch-open","folder-plus","folder-notch-plus","folder-simple","folder-simple-dashed","folder-simple-dotted","folder-simple-lock","folder-simple-minus","folder-simple-plus","folder-simple-star","folder-simple-user","folder-star","folder-user","folders","football","football-helmet","footprints","fork-knife","four-k","frame-corners","framer-logo","function","funnel","funnel-simple","funnel-simple-x","funnel-x","game-controller","garage","gas-can","gas-pump","gauge","gavel","gear","gear-fine","gear-six","gender-female","gender-intersex","gender-male","gender-neuter","gender-nonbinary","gender-transgender","ghost","gif","gift","git-branch","git-commit","git-diff","git-fork","git-merge","git-pull-request","github-logo","gitlab-logo","gitlab-logo-simple","globe","globe-hemisphere-east","globe-hemisphere-west","globe-simple","globe-simple-x","globe-stand","globe-x","goggles","golf","goodreads-logo","google-cardboard-logo","google-chrome-logo","google-drive-logo","google-logo","google-photos-logo","google-play-logo","google-podcasts-logo","gps","gps-fix","gps-slash","gradient","graduation-cap","grains","grains-slash","graph","graphics-card","greater-than","greater-than-or-equal","grid-four","grid-nine","guitar","hair-dryer","hamburger","hammer","hand","hand-arrow-down","hand-arrow-up","hand-coins","hand-deposit","hand-eye","hand-fist","hand-grabbing","hand-heart","hand-palm","hand-peace","hand-pointing","hand-soap","hand-swipe-left","hand-swipe-right","hand-tap","hand-waving","hand-withdraw","handbag","handbag-simple","hands-clapping","hands-praying","handshake","hard-drive","hard-drives","hard-hat","hash","hash-straight","head-circuit","headlights","headphones","headset","heart","heart-break","heart-half","heart-straight","heart-straight-break","heartbeat","hexagon","high-definition","high-heel","highlighter","highlighter-circle","hockey","hoodie","horse","hospital","hourglass","hourglass-high","hourglass-low","hourglass-medium","hourglass-simple","hourglass-simple-high","hourglass-simple-low","hourglass-simple-medium","house","house-line","house-simple","hurricane","ice-cream","identification-badge","identification-card","image","image-broken","image-square","images","images-square","infinity","lemniscate","info","instagram-logo","intersect","intersect-square","intersect-three","intersection","invoice","island","jar","jar-label","jeep","joystick","kanban","key","key-return","keyboard","keyhole","knife","ladder","ladder-simple","lamp","lamp-pendant","laptop","lasso","lastfm-logo","layout","leaf","lectern","lego","lego-smiley","less-than","less-than-or-equal","letter-circle-h","letter-circle-p","letter-circle-v","lifebuoy","lightbulb","lightbulb-filament","lighthouse","lightning","lightning-a","lightning-slash","line-segment","line-segments","line-vertical","link","link-break","link-simple","link-simple-break","link-simple-horizontal","link-simple-horizontal-break","linkedin-logo","linktree-logo","linux-logo","list","list-bullets","list-checks","list-dashes","list-heart","list-magnifying-glass","list-numbers","list-plus","list-star","lock","lock-key","lock-key-open","lock-laminated","lock-laminated-open","lock-open","lock-simple","lock-simple-open","lockers","log","magic-wand","magnet","magnet-straight","magnifying-glass","magnifying-glass-minus","magnifying-glass-plus","mailbox","map-pin","map-pin-area","map-pin-line","map-pin-plus","map-pin-simple","map-pin-simple-area","map-pin-simple-line","map-trifold","markdown-logo","marker-circle","martini","mask-happy","mask-sad","mastodon-logo","math-operations","matrix-logo","medal","medal-military","medium-logo","megaphone","megaphone-simple","member-of","memory","messenger-logo","meta-logo","meteor","metronome","microphone","microphone-slash","microphone-stage","microscope","microsoft-excel-logo","microsoft-outlook-logo","microsoft-powerpoint-logo","microsoft-teams-logo","microsoft-word-logo","minus","minus-circle","minus-square","money","money-wavy","monitor","monitor-arrow-up","monitor-play","moon","moon-stars","moped","moped-front","mosque","motorcycle","mountains","mouse","mouse-left-click","mouse-middle-click","mouse-right-click","mouse-scroll","mouse-simple","music-note","music-note-simple","music-notes","music-notes-minus","music-notes-plus","music-notes-simple","navigation-arrow","needle","network","network-slash","network-x","newspaper","newspaper-clipping","not-equals","not-member-of","not-subset-of","not-superset-of","notches","note","note-blank","note-pencil","notebook","notepad","notification","notion-logo","nuclear-plant","number-circle-eight","number-circle-five","number-circle-four","number-circle-nine","number-circle-one","number-circle-seven","number-circle-six","number-circle-three","number-circle-two","number-circle-zero","number-eight","number-five","number-four","number-nine","number-one","number-seven","number-six","number-square-eight","number-square-five","number-square-four","number-square-nine","number-square-one","number-square-seven","number-square-six","number-square-three","number-square-two","number-square-zero","number-three","number-two","number-zero","numpad","nut","ny-times-logo","octagon","office-chair","onigiri","open-ai-logo","option","orange","orange-slice","oven","package","paint-brush","paint-brush-broad","paint-brush-household","paint-bucket","paint-roller","palette","panorama","pants","paper-plane","paper-plane-right","paper-plane-tilt","paperclip","paperclip-horizontal","parachute","paragraph","parallelogram","park","password","path","patreon-logo","pause","pause-circle","paw-print","paypal-logo","peace","pen","pen-nib","pen-nib-straight","pencil","pencil-circle","pencil-line","pencil-ruler","pencil-simple","pencil-simple-line","pencil-simple-slash","pencil-slash","pentagon","pentagram","pepper","percent","person","person-arms-spread","person-simple","person-simple-bike","person-simple-circle","person-simple-hike","person-simple-run","person-simple-ski","person-simple-snowboard","person-simple-swim","person-simple-tai-chi","person-simple-throw","person-simple-walk","perspective","phone","phone-call","phone-disconnect","phone-incoming","phone-list","phone-outgoing","phone-pause","phone-plus","phone-slash","phone-transfer","phone-x","phosphor-logo","pi","piano-keys","picnic-table","picture-in-picture","piggy-bank","pill","ping-pong","pint-glass","pinterest-logo","pinwheel","pipe","pipe-wrench","pix-logo","pizza","placeholder","planet","plant","play","play-circle","play-pause","playlist","plug","plug-charging","plugs","plugs-connected","plus","plus-circle","plus-minus","plus-square","poker-chip","police-car","polygon","popcorn","popsicle","potted-plant","power","prescription","presentation","presentation-chart","printer","prohibit","prohibit-inset","projector-screen","projector-screen-chart","pulse","activity","push-pin","push-pin-simple","push-pin-simple-slash","push-pin-slash","puzzle-piece","qr-code","question","question-mark","queue","quotes","rabbit","racquet","radical","radio","radio-button","radioactive","rainbow","rainbow-cloud","ranking","read-cv-logo","receipt","receipt-x","record","rectangle","rectangle-dashed","recycle","reddit-logo","repeat","repeat-once","replit-logo","resize","rewind","rewind-circle","road-horizon","robot","rocket","rocket-launch","rows","rows-plus-bottom","rows-plus-top","rss","rss-simple","rug","ruler","sailboat","scales","scan","scan-smiley","scissors","scooter","screencast","screwdriver","scribble","scribble-loop","scroll","seal","circle-wavy","seal-check","circle-wavy-check","seal-percent","circle-wavy-question","seal-warning","circle-wavy-warning","seat","seatbelt","security-camera","selection","selection-all","selection-background","selection-foreground","selection-inverse","selection-plus","selection-slash","shapes","share","share-fat","share-network","shield","shield-check","shield-checkered","shield-chevron","shield-plus","shield-slash","shield-star","shield-warning","shipping-container","shirt-folded","shooting-star","shopping-bag","shopping-bag-open","shopping-cart","shopping-cart-simple","shovel","shower","shrimp","shuffle","shuffle-angular","shuffle-simple","sidebar","sidebar-simple","sigma","sign-in","sign-out","signature","signpost","sim-card","siren","sketch-logo","skip-back","skip-back-circle","skip-forward","skip-forward-circle","skull","skype-logo","slack-logo","sliders","sliders-horizontal","slideshow","smiley","smiley-angry","smiley-blank","smiley-meh","smiley-melting","smiley-nervous","smiley-sad","smiley-sticker","smiley-wink","smiley-x-eyes","snapchat-logo","sneaker","sneaker-move","snowflake","soccer-ball","sock","solar-panel","solar-roof","sort-ascending","sort-descending","soundcloud-logo","spade","sparkle","speaker-hifi","speaker-high","speaker-low","speaker-none","speaker-simple-high","speaker-simple-low","speaker-simple-none","speaker-simple-slash","speaker-simple-x","speaker-slash","speaker-x","speedometer","sphere","spinner","spinner-ball","spinner-gap","spiral","split-horizontal","split-vertical","spotify-logo","spray-bottle","square","square-half","square-half-bottom","square-logo","square-split-horizontal","square-split-vertical","squares-four","stack","stack-minus","stack-overflow-logo","stack-plus","stack-simple","stairs","stamp","standard-definition","star","star-and-crescent","star-four","star-half","star-of-david","steam-logo","steering-wheel","steps","stethoscope","sticker","stool","stop","stop-circle","storefront","strategy","stripe-logo","student","subset-of","subset-proper-of","subtitles","subtitles-slash","subtract","subtract-square","subway","suitcase","suitcase-rolling","suitcase-simple","sun","sun-dim","sun-horizon","sunglasses","superset-of","superset-proper-of","swap","swatches","swimming-pool","sword","synagogue","syringe","t-shirt","table","tabs","tag","tag-chevron","tag-simple","target","taxi","tea-bag","telegram-logo","television","television-simple","tennis-ball","tent","terminal","terminal-window","test-tube","text-a-underline","text-aa","text-align-center","text-align-justify","text-align-left","text-align-right","text-b","text-bolder","text-columns","text-h","text-h-five","text-h-four","text-h-one","text-h-six","text-h-three","text-h-two","text-indent","text-italic","text-outdent","text-strikethrough","text-subscript","text-superscript","text-t","text-t-slash","text-underline","textbox","thermometer","thermometer-cold","thermometer-hot","thermometer-simple","threads-logo","three-d","thumbs-down","thumbs-up","ticket","tidal-logo","tiktok-logo","tilde","timer","tip-jar","tipi","tire","toggle-left","toggle-right","toilet","toilet-paper","toolbox","tooth","tornado","tote","tote-simple","towel","tractor","trademark","trademark-registered","traffic-cone","traffic-sign","traffic-signal","train","train-regional","train-simple","tram","translate","trash","trash-simple","tray","tray-arrow-down","archive-tray","tray-arrow-up","treasure-chest","tree","tree-evergreen","tree-palm","tree-structure","tree-view","trend-down","trend-up","triangle","triangle-dashed","trolley","trolley-suitcase","trophy","truck","truck-trailer","tumblr-logo","twitch-logo","twitter-logo","umbrella","umbrella-simple","union","unite","unite-square","upload","upload-simple","usb","user","user-check","user-circle","user-circle-check","user-circle-dashed","user-circle-gear","user-circle-minus","user-circle-plus","user-focus","user-gear","user-list","user-minus","user-plus","user-rectangle","user-sound","user-square","user-switch","users","users-four","users-three","van","vault","vector-three","vector-two","vibrate","video","video-camera","video-camera-slash","video-conference","vignette","vinyl-record","virtual-reality","virus","visor","voicemail","volleyball","wall","wallet","warehouse","warning","warning-circle","warning-diamond","warning-octagon","washing-machine","watch","wave-sawtooth","wave-sine","wave-square","wave-triangle","waveform","waveform-slash","waves","webcam","webcam-slash","webhooks-logo","wechat-logo","whatsapp-logo","wheelchair","wheelchair-motion","wifi-high","wifi-low","wifi-medium","wifi-none","wifi-slash","wifi-x","wind","windmill","windows-logo","wine","wrench","x","x-circle","x-square","yarn","yin-yang","youtube-logo"],business:["briefcase","briefcase-fill","building","building-fill","chart-bar","chart-bar-fill","chart-line","chart-line-fill","currency-dollar","currency-dollar-fill","presentation","presentation-fill","users","users-fill"],communication:["chat","chat-fill","envelope","envelope-fill","phone","phone-fill","video-camera","video-camera-fill","microphone","microphone-fill","speaker","speaker-fill"],design:["palette","palette-fill","paint-brush","paint-brush-fill","scissors","scissors-fill","crop","crop-fill"],development:["code","code-fill","terminal","terminal-fill","bug","bug-fill","git-branch","git-branch-fill"],document:["file","file-fill","file-text","file-text-fill","file-pdf","file-pdf-fill","folder","folder-fill"],editor:["pencil","pencil-fill","text-b","text-b-fill","text-italic","text-italic-fill","list","list-fill"],finance:["currency-dollar","currency-dollar-fill","credit-card","credit-card-fill","bank","bank-fill"],health:["heart","heart-fill","stethoscope","stethoscope-fill","pill","pill-fill"],logistics:["truck","truck-fill","package","package-fill","map-pin","map-pin-fill"],map:["map","map-fill","map-pin","map-pin-fill","navigation","navigation-fill"],media:["play","play-fill","pause","pause-fill","stop","stop-fill","image","image-fill","video-camera","video-camera-fill"],system:["gear","gear-fill","settings","settings-fill","cog","cog-fill"],user:["user","user-fill","users","users-fill","user-circle","user-circle-fill"],weather:["sun","sun-fill","cloud","cloud-fill","rain","rain-fill","snow","snow-fill"]};du.all;var P1=U("<svelte-virtual-list-row><!></svelte-virtual-list-row>",2),M1=U("<svelte-virtual-list-viewport><svelte-virtual-list-contents></svelte-virtual-list-contents></svelte-virtual-list-viewport>",2);function N1(e,r){kt(r,!1);let n=m(r,"items",8),i=m(r,"height",8,"100%"),s=m(r,"itemHeight",8,void 0),a=m(r,"start",12,0),o=m(r,"end",12,0),c=[],u,g=h(),d=h(),p=h(0),_=h(),S=h(),E=h(0),A=h(0),I;async function k(B,$,R){const{scrollTop:H}=t(g);await we.tick();let Z=t(E)-H,ue=a();for(;Z<$&&ue<B.length;){let Se=u[ue-a()];Se||(o(ue+1),await we.tick(),Se=u[ue-a()]);const ce=c[ue]=R||Se.offsetHeight;Z+=ce,ue+=1}o(ue);const de=B.length-o();I=(t(E)+Z)/o(),l(A,de*I),c.length=B.length}async function C(){const{scrollTop:B}=t(g),$=a();for(let ue=0;ue<u.length;ue+=1)c[a()+ue]=s()||u[ue].offsetHeight;let R=0,H=0;for(;R<n().length;){const ue=c[R]||I;if(H+ue>B){a(R),l(E,H);break}H+=ue,R+=1}for(;R<n().length&&(H+=c[R]||I,R+=1,!(H>B+t(p))););o(R);const Z=n().length-o();for(I=H/o();R<n().length;)c[R++]=I;if(l(A,Z*I),a()<$){await we.tick();let ue=0,de=0;for(let ce=a();ce<$;ce+=1)u[ce-a()]&&(ue+=c[ce],de+=s()||u[ce-a()].offsetHeight);const Se=de-ue;t(g).scrollTo(0,B+Se)}}we.onMount(()=>{u=t(d).getElementsByTagName("svelte-virtual-list-row"),l(S,!0)}),x(()=>(v(n()),v(a()),v(o())),()=>{l(_,n().slice(a(),o()).map((B,$)=>({index:$+a(),data:B})))}),x(()=>(t(S),v(n()),t(p),v(s())),()=>{t(S)&&k(n(),t(p),s())}),Pt(),Ot();var D=M1();Pe(D,1,"svelte-m5no5e");var w=j(D);Pe(w,1,"svelte-m5no5e"),xt(w,5,()=>t(_),B=>B.index,(B,$)=>{var R=P1();Pe(R,1,"svelte-m5no5e");var H=j(R);mr(H,r,"default",{get item(){return t($),b(()=>t($).data)}},Z=>{var ue=Ni("Missing template");y(Z,ue)}),y(B,R)}),ht(w,B=>l(d,B),()=>t(d)),ht(D,B=>l(g,B),()=>t(g)),Ce(()=>{We(D,`height: ${i()??""};`),We(w,`padding-top: ${t(E)??""}px; padding-bottom: ${t(A)??""}px;`)}),yl(D,"offsetHeight",B=>l(p,B)),W("scroll",D,C),y(e,D),Dt()}var L1=U("<i></i>"),F1=U('<div class="empty-state svelte-9pwd3t"><i class="ph ph-image"></i></div>'),V1=U("<button> </button>"),U1=U('<div class="category-tabs svelte-9pwd3t"></div>'),B1=U('<button class="clear-search svelte-9pwd3t" aria-label="Clear search"><i class="ph ph-x"></i></button>'),H1=U('<button tabindex="0"><i></i></button>'),z1=U('<div class="icons-row svelte-9pwd3t"></div>'),j1=U('<div class="no-results svelte-9pwd3t"><i class="ph ph-magnifying-glass svelte-9pwd3t"></i> <p>No icons found</p></div>'),G1=U('<button class="clear-button svelte-9pwd3t"><i class="ph ph-x"></i> Clear</button>'),q1=U('<div><div class="header svelte-9pwd3t"><!> <div class="search-container svelte-9pwd3t"><i class="ph ph-magnifying-glass search-icon svelte-9pwd3t"></i> <input type="text" placeholder="Search icons..." class="search-input svelte-9pwd3t" aria-label="Search icons"/> <!></div></div> <div class="icons-grid-container svelte-9pwd3t"><!></div> <div class="footer svelte-9pwd3t"><!></div></div>'),W1=U('<div role="button" aria-haspopup="dialog" aria-label="Select icon"><!></div> <!>',1);function Y1(e,r){kt(r,!1);const n=h(),i=h(),s=h(),a=h();let o=m(r,"value",12),c=m(r,"cellOptions",24,()=>({})),u=m(r,"align",8,"left"),g=h(!1),d=h(),p=h(""),_=h("all"),S=h("");const E=we.createEventDispatcher();let A=h("");const I=32,k=8,C=8,D=I;let w=h([]);function B(le,Q,Y,J){const K=t(n).find(ge=>ge.id===Y);if(!K)return[];let ie=[...K.icons];if(J){const ge=J.toLowerCase();ie=ie.filter(O=>O.replace(/-line|-fill$/,"").toLowerCase().includes(ge))}const z=[];for(let ge=0;ge<ie.length;ge+=Q)z.push(ie.slice(ge,ge+Q));return z}const $=le=>{const Q=le,Y=Q===o()?"":Q;o(Y),E("change",Y),l(g,!1)};function R(le){l(S,`ph ph-${le}`)}const H=(le,Q)=>{(le.key==="Enter"||le.key===" ")&&(le.preventDefault(),$(Q))},Z=()=>{o(""),E("change",null),l(S,null)};x(()=>du,()=>{l(n,Object.entries(R1).map(([le,Q])=>({id:le,label:Q,icons:du[le]||[]})))}),x(()=>(t(n),t(_)),()=>{t(n).length>0&&!t(_)&&l(_,"all")}),x(()=>v(c()),()=>{var le,Q;l(i,((le=c())==null?void 0:le.readonly)||((Q=c())==null?void 0:Q.disabled))}),x(()=>v(o()),()=>{if(o()){let le=o().startsWith("ph-")?o().slice(3):o();l(A,le)}else l(A,"")}),x(()=>v(c()),()=>{var le;l(s,(le=c())!=null&&le.showCategories?9:6)}),x(()=>{},()=>{l(a,I*k+C*2)}),x(()=>(v(o()),t(s),t(_),t(p)),()=>{l(w,B(o(),t(s),t(_),t(p)))}),Pt(),Ot();var ue=W1(),de=Ue(ue);let Se;var ce=j(de);{var ke=le=>{var Q=L1();Ce(()=>Pe(Q,1,`ph ph-${t(A)??""}`,"svelte-9pwd3t")),y(le,Q)},De=le=>{var Q=F1();y(le,Q)};oe(ce,le=>{o()?le(ke):le(De,!1)})}ht(de,le=>l(d,le),()=>t(d));var ye=Ee(de,2);Qr(ye,{get open(){return t(g)},get anchor(){return t(d)},get align(){return u()},$$events:{close:()=>l(g,!1)},children:(le,Q)=>{var Y=q1();let J;var K=j(Y),ie=j(K);{var z=fe=>{var X=U1();xt(X,5,()=>t(n),Nt,(q,he)=>{var P=V1();let te;var M=j(P);Ce(()=>{Lt(P,"aria-label",(t(he),b(()=>`Show ${t(he).label} icons`))),te=Pe(P,1,"svelte-9pwd3t",null,te,{selected:t(_)===t(he).id}),Xe(M,(t(he),b(()=>t(he).label)))}),W("click",P,()=>l(_,t(he).id)),y(q,P)}),y(fe,X)};oe(ie,fe=>{v(c()),b(()=>c().showCategories)&&fe(z)})}var ge=Ee(ie,2),O=Ee(j(ge),2),G=Ee(O,2);{var re=fe=>{var X=B1();W("click",X,()=>l(p,"")),y(fe,X)};oe(G,fe=>{t(p)&&fe(re)})}var ae=Ee(K,2),ee=j(ae);{var pe=fe=>{N1(fe,{get items(){return t(w)},itemHeight:D,get height(){return t(a)},width:"100%",children:Cg,$$slots:{default:(X,q)=>{const he=Rt(()=>q.item),P=Rt(()=>q.style);var te=z1();xt(te,5,()=>t(he),Nt,(M,T)=>{var N=H1();let ne;var ve=j(N);Ce(()=>{ne=Pe(N,1,"icon-button svelte-9pwd3t",null,ne,{selected:t(A)===t(T)}),Lt(N,"aria-label",`Select ${t(T)} icon`),Pe(ve,1,`ph ph-${t(T)??""}`,"svelte-9pwd3t")}),W("click",N,()=>$(t(T))),W("keydown",N,Oe=>H(Oe,t(T))),W("mouseenter",N,()=>R(t(T))),W("mouseleave",N,()=>l(S,"")),y(M,N)}),Ce(()=>We(te,t(P))),y(X,te)}}})},Ne=fe=>{var X=j1();y(fe,X)};oe(ee,fe=>{t(w),b(()=>t(w).length>0)?fe(pe):fe(Ne,!1)})}var He=Ee(ae,2),me=j(He);{var V=fe=>{var X=G1();W("click",X,Z),y(fe,X)};oe(me,fe=>{o()&&fe(V)})}Ce(()=>{J=Pe(Y,1,"icon-picker svelte-9pwd3t",null,J,{"with-categories":c().showCategories}),We(Y,`
|
|
9
|
+
--icon-size: 24;
|
|
10
|
+
--icon-padding: 4;
|
|
11
|
+
--items-per-row: ${t(s)??""};
|
|
12
|
+
--row-height: 40;
|
|
13
|
+
`)}),ea(O,()=>t(p),fe=>l(p,fe)),y(le,Y)},$$slots:{default:!0}}),Ce(()=>{Se=Pe(de,1,"preview-icon svelte-9pwd3t",null,Se,{readonly:t(i)}),Lt(de,"tabindex",t(i)?-1:0),Lt(de,"aria-expanded",t(g))}),W("click",de,function(...le){var Q;(Q=t(i)?null:()=>{l(g,!t(g))})==null||Q.apply(this,le)}),W("keydown",de,le=>{(le.key==="Enter"||le.key===" ")&&(le.preventDefault(),t(i)||l(g,!t(g)))}),y(e,ue),Dt()}var K1=U('<div class="header-cell svelte-fjnh72"> </div>'),X1=U('<div class="data-cell svelte-fjnh72"> </div>'),Q1=U('<div><!> <div class="data-cell check svelte-fjnh72"><i class="ri-check-line svelte-fjnh72"></i></div></div>'),Z1=U('<div class="data-cell svelte-fjnh72"> </div>'),J1=U('<div><!> <div class="data-cell check svelte-fjnh72"><i class="ri-check-line svelte-fjnh72"></i></div></div>'),$1=U('<div class="data-row loading svelte-fjnh72"><div class="data-cell svelte-fjnh72" style="grid-column: 1 / -1;"><i class="ri-loader-2-line rotating svelte-fjnh72"></i> Loading more...</div></div>'),ew=U('<div class="data-row loading svelte-fjnh72"><div class="data-cell svelte-fjnh72" style="grid-column: 1 / -1;"><i class="ri-loader-2-line rotating svelte-fjnh72"></i> Loading...</div></div>'),tw=U('<div class="data-row svelte-fjnh72"><div class="data-cell svelte-fjnh72" style="grid-column: 1 / -1;">No Results Found</div></div>'),rw=U('<div class="grid-container svelte-fjnh72"><div class="header-row svelte-fjnh72"><!> <div class="header-cell check svelte-fjnh72"></div></div> <!> <!> <!></div>'),nw=U('<div> <i class="ri-check-line svelte-fjnh72"></i></div>'),iw=U('<div> <i class="ri-check-line svelte-fjnh72"></i></div>'),aw=U('<div class="option loading svelte-fjnh72"><i class="ri-loader-2-line rotating svelte-fjnh72"></i> Loading more...</div>'),sw=U("<!> <!>",1),ow=U('<div class="option loading svelte-fjnh72"><i class="ri-loader-2-line rotating svelte-fjnh72"></i> Loading...</div>'),lw=U('<div class="option svelte-fjnh72">No Results Found</div>'),uw=U('<div class="options svelte-fjnh72"><!> <!></div>'),cw=U('<div class="control svelte-fjnh72"><div class="searchControl svelte-fjnh72"><i></i> <input type="text"/></div> <div class="listWrapper svelte-fjnh72"><div><!></div></div></div>');function dw(e,r){var te;kt(r,!1);const n=()=>Be(t(De),"$optionsFetch",i),[i,s]=Gt(),a=h(),o=h(),c=h(),u=h(),g=h(),d=h(),p=h(),{API:_,fetchData:S,QueryUtils:E}=we.getContext("sdk"),A=we.createEventDispatcher();let I=m(r,"value",24,()=>[]),k=m(r,"fieldSchema",8),C=m(r,"filter",24,()=>[]),D=m(r,"relatedColumns",24,()=>{var M;return((M=k())==null?void 0:M.relatedColumns)||[]}),w=m(r,"multi",8,!1),B=k().tableId,$=((te=k())==null?void 0:te.relatedField)||"id",R=h(-1),H=h(),Z=h(),ue=15,de=h(),Se=!0,ce=h(!0),ke=h([]),De=h(),ye=h(),le=h(ue);const Q=(M,T)=>{var ne,ve;if(!Object.keys(T).length)return M;const N={[Oa.LogicalOperator.AND]:{conditions:[...M?[M]:[],...Object.values(T||{})]},onEmptyFilter:Oa.EmptyFilterOption.RETURN_NONE};return(((ve=(ne=N[Oa.LogicalOperator.AND])==null?void 0:ne.conditions)==null?void 0:ve.length)??0)>0?N:{}},Y=M=>{if(I())return I().find(N=>N[$]==M[$])},J=M=>{var ne;const T=D()&&D().length>0?M[D()[0].name]:M[t(g)],N={[$]:M[$],primaryDisplay:T};if(!w())((ne=t(a)[0])==null?void 0:ne[$])==M[$]?l(a,[]):l(a,[N]);else{let ve=t(a).findIndex(Oe=>Oe[$]==M[$]);ve>-1?(t(a).splice(ve,1),l(a,t(a))):(t(a).push(N),l(a,t(a)))}A("change",t(a))},K=M=>{l(Z,M.target.value),M.target.value?l(ye,[{field:t(g),type:"string",operator:"fuzzy",value:M.target.value,valueType:"Value"}]):l(ye,void 0),l(le,ue)},ie=()=>{var M;(M=n())!=null&&M.loading||!t(ce)||l(le,t(le)+100)},z=M=>{const T=M.target,N=T.scrollTop,ne=T.scrollHeight,ve=T.clientHeight;N+ve>=ne-50&&ie()},ge=M=>{if(M.key=="ArrowDown")M.preventDefault(),l(R,t(R)+1),t(R)>t(d)-1&&l(R,0);else if(M.key=="ArrowUp")M.preventDefault(),l(R,t(R)-1),t(R)<0&&l(R,t(d)-1);else if(M.key=="Enter"&&t(R)>-1){const T=t(R)<t(a).length?t(a)[t(R)]:n().rows[t(R)-t(a).length];J(T)}(M.key=="Tab"||M.key=="Escape")&&A("close")},O={focus:()=>{var M;(M=t(H))==null||M.focus()},hasFocus:()=>document.activeElement===t(H),setSearch:M=>{var T;l(Z,M),(T=t(H))==null||T.focus()},focusList:()=>{var M;(M=t(de))==null||M.focus()}};x(()=>v(I()),()=>{l(a,Array.isArray(I())?I():[])}),x(()=>v(C()),()=>{l(o,E.buildQuery(C()))}),x(()=>t(ye),()=>{l(c,t(ye)?{search:E.buildQuery(t(ye))}:{})}),x(()=>(t(o),t(c)),()=>{l(u,Q(t(o),t(c)))}),x(()=>t(o),()=>{on(l(De,S({API:_,datasource:{type:"table",tableId:B},options:{query:t(o),limit:ue}})),"$optionsFetch",i)}),x(()=>(t(De),t(u),t(le)),()=>{var M;(M=t(De))==null||M.update({query:t(u),limit:t(le)})}),x(()=>n(),()=>{var M,T;l(g,((T=(M=n())==null?void 0:M.definition)==null?void 0:T.primaryDisplay)||"id")}),x(()=>(n(),t(le)),()=>{var M;(M=n())!=null&&M.loaded&&l(ce,n().rows.length>=t(le))}),x(()=>(t(a),n()),()=>{var M,T;l(d,t(a).length+(((T=(M=n())==null?void 0:M.rows)==null?void 0:T.length)||0))}),x(()=>(t(R),t(d)),()=>{l(R,Math.min(t(R),t(d)-1))}),x(()=>(t(R),t(ke),we.tick),()=>{t(R)>=0&&t(ke)[t(R)]&&we.tick().then(()=>{t(ke)[t(R)].scrollIntoView({block:"nearest"})})}),x(()=>v(D()),()=>{l(p,D().length)}),Pt();var G={api:O};Ot();var re=cw(),ae=j(re),ee=j(ae);let pe;var Ne=Ee(ee,2);let He;ht(Ne,M=>l(H,M),()=>t(H));var me=Ee(ae,2),V=j(me);let fe;var X=j(V);{var q=M=>{var T=rw(),N=j(T),ne=j(N);xt(ne,1,D,Nt,(Le,je)=>{var Fe=K1(),Ae=j(Fe);Ce(()=>Xe(Ae,(t(je),b(()=>t(je).displayName)))),y(Le,Fe)});var ve=Ee(N,2);xt(ve,3,()=>t(a),Le=>Le[$],(Le,je,Fe)=>{var Ae=Q1();let Ge;var $e=j(Ae);xt($e,1,D,Nt,(Je,rt)=>{var st=X1(),ut=j(st);Ce(()=>Xe(ut,(t(je),t(rt),b(()=>t(je)[t(rt).name]||"")))),y(Je,st)}),ht(Ae,(Je,rt)=>Ht(ke,t(ke)[rt]=Je),Je=>{var rt;return(rt=t(ke))==null?void 0:rt[Je]},()=>[t(Fe)]),Ce(Je=>Ge=Pe(Ae,1,"data-row svelte-fjnh72",null,Ge,Je),[()=>({selected:Y(t(je)),highlighted:t(R)==t(Fe)})]),W("mouseenter",Ae,()=>l(R,t(Fe))),W("mouseleave",Ae,()=>l(R,-1)),W("mousedown",Ae,$t(()=>J(t(je)))),y(Le,Ae)});var Oe=Ee(ve,2);{var Me=Le=>{var je=Ze(),Fe=Ue(je);$i(Fe,()=>(t(a),b(()=>t(a).length)),Ae=>{var Ge=Ze(),$e=Ue(Ge);xt($e,3,()=>(n(),b(()=>n().rows)),Je=>Je[$],(Je,rt,st)=>{var ut=Ze(),it=Ue(ut);{var _e=qe=>{var Ye=J1();let ot;var Te=j(Ye);xt(Te,1,D,Nt,(Ke,et)=>{var gt=Z1(),pt=j(gt);Ce(()=>Xe(pt,(t(rt),t(et),b(()=>t(rt)[t(et).name]||"")))),y(Ke,gt)}),ht(Ye,(Ke,et)=>Ht(ke,t(ke)[et+t(a).length]=Ke),Ke=>{var et;return(et=t(ke))==null?void 0:et[Ke+t(a).length]},()=>[t(st)]),Ce(()=>ot=Pe(Ye,1,"data-row svelte-fjnh72",null,ot,{highlighted:t(R)==t(st)+t(a).length})),W("mouseenter",Ye,()=>l(R,t(st)+t(a).length)),W("mouseleave",Ye,()=>l(R,-1)),W("mousedown",Ye,$t(()=>J(t(rt)))),y(qe,Ye)};oe(it,qe=>{t(rt),b(()=>!Y(t(rt)))&&qe(_e)})}y(Je,ut)}),y(Ae,Ge)}),y(Le,je)};oe(Oe,Le=>{n(),b(()=>n()&&n().loaded)&&Le(Me)})}var Re=Ee(Oe,2);{var se=Le=>{var je=$1();y(Le,je)},Ie=Le=>{var je=Ze(),Fe=Ue(je);{var Ae=$e=>{var Je=ew();y($e,Je)},Ge=$e=>{var Je=Ze(),rt=Ue(Je);{var st=ut=>{var it=tw();y(ut,it)};oe(rt,ut=>{n(),b(()=>{var it,_e,qe;return!((it=n())!=null&&it.loading)&&((_e=n())==null?void 0:_e.loaded)&&!((qe=n().rows)!=null&&qe.length)})&&ut(st)},!0)}y($e,Je)};oe(Fe,$e=>{n(),b(()=>{var Je;return((Je=n())==null?void 0:Je.loading)&&!n().loaded})?$e(Ae):$e(Ge,!1)},!0)}y(Le,je)};oe(Re,Le=>{n(),b(()=>{var je;return(je=n())==null?void 0:je.loading})?Le(se):Le(Ie,!1)})}Ce(()=>We(T,`--num-cols: ${t(p)??""}`)),W("scroll",T,z),y(M,T)},he=M=>{var T=uw(),N=j(T);xt(N,3,()=>t(a),Me=>Me[$],(Me,Re,se)=>{var Ie=nw();let Le;var je=j(Ie);ht(Ie,(Fe,Ae)=>Ht(ke,t(ke)[Ae]=Fe),Fe=>{var Ae;return(Ae=t(ke))==null?void 0:Ae[Fe]},()=>[t(se)]),Ce(Fe=>{Le=Pe(Ie,1,"option svelte-fjnh72",null,Le,Fe),Xe(je,`${t(Re),t(g),b(()=>t(Re).primaryDisplay||t(Re)[t(g)])??""} `)},[()=>({selected:Y(t(Re)),highlighted:t(R)==t(se)})]),W("mouseenter",Ie,()=>l(R,t(se))),W("mouseleave",Ie,()=>l(R,-1)),W("mousedown",Ie,$t(fr(()=>J(t(Re))))),y(Me,Ie)});var ne=Ee(N,2);{var ve=Me=>{var Re=sw(),se=Ue(Re);$i(se,()=>(t(a),b(()=>t(a).length)),je=>{var Fe=Ze(),Ae=Ue(Fe);xt(Ae,3,()=>(n(),b(()=>n().rows)),Ge=>Ge[$],(Ge,$e,Je)=>{var rt=Ze(),st=Ue(rt);{var ut=it=>{var _e=iw();let qe;var Ye=j(_e);ht(_e,(ot,Te)=>Ht(ke,t(ke)[Te+t(a).length]=ot),ot=>{var Te;return(Te=t(ke))==null?void 0:Te[ot+t(a).length]},()=>[t(Je)]),Ce(()=>{qe=Pe(_e,1,"option svelte-fjnh72",null,qe,{highlighted:t(R)==t(Je)+t(a).length}),Xe(Ye,`${t($e),t(g),b(()=>t($e).primaryDisplay||t($e)[t(g)])??""} `)}),W("mouseenter",_e,()=>l(R,t(Je)+t(a).length)),W("mouseleave",_e,()=>l(R,-1)),W("mousedown",_e,$t(()=>J(t($e)))),y(it,_e)};oe(st,it=>{t($e),b(()=>!Y(t($e)))&&it(ut)})}y(Ge,rt)}),y(je,Fe)});var Ie=Ee(se,2);{var Le=je=>{var Fe=aw();y(je,Fe)};oe(Ie,je=>{n(),b(()=>{var Fe;return(Fe=n())==null?void 0:Fe.loading})&&je(Le)})}y(Me,Re)},Oe=Me=>{var Re=Ze(),se=Ue(Re);{var Ie=je=>{var Fe=ow();y(je,Fe)},Le=je=>{var Fe=lw();y(je,Fe)};oe(se,je=>{n(),b(()=>{var Fe;return((Fe=n())==null?void 0:Fe.loading)&&!n().loaded})?je(Ie):je(Le,!1)},!0)}y(Me,Re)};oe(ne,Me=>{n(),b(()=>n()&&n().loaded)?Me(ve):Me(Oe,!1)})}y(M,T)};oe(X,M=>{v(D()),b(()=>D()&&D().length>1)?M(q):M(he,!1)})}ht(V,M=>l(de,M),()=>t(de)),Ce(()=>{Pe(ee,1,Cn((n(),t(H),b(()=>{var M,T;return(M=n())!=null&&M.loading&&Se?"ri-loader-2-line":(T=t(H))!=null&&T.value?"ri-filter-fill":"ri-search-line"}))),"svelte-fjnh72"),pe=We(ee,"",pe,{color:t(Z)?"var(--spectrum-global-color-blue-400)":"var(--spectrum-global-color-gray-700)"}),He=Pe(Ne,1,"search svelte-fjnh72",null,He,{placeholder:!t(Z)}),Lt(Ne,"placeholder",(n(),b(()=>{var M,T,N;return(M=n())!=null&&M.loading&&!((N=(T=n())==null?void 0:T.rows)!=null&&N.length)&&Se?"Loading...":"Search"}))),fe=Pe(V,1,"list svelte-fjnh72",null,fe,{"table-mode":D()&&D().length>0})}),W("input",Ne,K),W("keydown",Ne,ge),W("blur",Ne,()=>A("close")),W("scroll",V,z),W("mousedown",me,$t(()=>{})),y(e,re),vr(r,"api",O);var P=Dt(G);return s(),P}var fw=U("<i></i>"),hw=U("<span> </span>"),gw=U('<div class="item"><span> </span></div>'),vw=U('<span class="count"> </span>'),pw=U("<div><!> <!></div>"),mw=U("<span><!> </span>"),_w=U('<i class="ph ph-caret-down control-icon"></i>'),bw=U("<div><!> <div><!></div> <!></div> <!>",1);function yw(e,r){kt(r,!1);const n=()=>Be(De(),"$cellState",s),i=()=>Be(ke,"$editorState",s),[s,a]=Gt(),o=h(),c=h(),u=h(),g=h(),d=h(),p=h(),_=h(),S=h(),E=h(),A=h(),I=we.createEventDispatcher(),{API:k}=we.getContext("sdk");let C=m(r,"value",8),D=m(r,"fieldSchema",12),w=m(r,"cellOptions",8),B=m(r,"simpleView",12,!0),$=m(r,"filter",24,()=>[]),R=m(r,"limit",8,100),H=m(r,"multi",8,!1),Z=m(r,"ownId",12),ue=h(JSON.stringify(C())),de=h(),Se,ce=h();const ke=sr("Closed",{Open:{close(){return"Closed"},toggle(){return"Closed"}},Closed:{open(){return"Open"},toggle(){return"Open"}}});let De=m(r,"cellState",24,()=>sr(w().initialState??"View",{"*":{goTo(V){return V},reset(V){l(d,void 0)}},View:{_enter(){},focus(){if(!w().readonly&&!w().disabled)return"Editing"}},Editing:{_enter(){l(ue,JSON.stringify(t(d))),ke.open(),I("enteredit")},_exit(){ke.close(),I("exitedit")},focusout(V){this.submit()},clear(){l(d,[])},submit(){return t(_)&&I("change",t(d)),"View"},cancel(){return"View"}}}));const ye=V=>{var fe,X,q,he,P;V.key=="Escape"?i()=="Open"?ke.close():De().focusout(V):V.keyCode==32&&n()=="Editing"?ke.toggle():V.key=="Tab"&&i()=="Open"?De().focusout(V):i()=="Open"&&(V.key==="ArrowUp"?(V.preventDefault(),(fe=t(ce))==null||fe.focusPrev(),(X=t(ce))==null||X.scrollIntoView()):V.key==="ArrowDown"?(V.preventDefault(),(q=t(ce))==null||q.focusNext(),(he=t(ce))==null||he.scrollIntoView()):V.key.length==1&&V.key.match(/\S/)&&((P=t(ce))==null||P.setSearch(V.key)))},le=V=>{l(d,V.detail),H()||ke.close()},Q=V=>{if(Array.isArray(V)&&H()){const fe=t(d)?t(d).map(q=>q[t(o)]):[],X=V.filter(q=>!fe.includes(q));return X.length>0&&(k.fetchTableDefinition(t(c)).then(q=>{D(D().primaryDisplay=q.primaryDisplay,!0)}),Promise.all(X.map(q=>k.fetchRow(t(c),q,!0))).then(q=>{const he=q.map(P=>({[t(o)]:P[t(o)],primaryDisplay:D().primaryDisplay?P[D().primaryDisplay]:P.name||P.id}));l(d,[...t(d)||[],...he])}).catch(q=>{})),t(d)||[]}else return V&&!Array.isArray(V)?(t(d)&&t(d).find(X=>X[t(o)]===V)||(k.fetchTableDefinition(t(c)).then(X=>{D(D().primaryDisplay=X.primaryDisplay,!0)}),k.fetchRow(t(c),V,!0).then(X=>{l(d,[{[t(o)]:X[t(o)],primaryDisplay:D().primaryDisplay?X[D().primaryDisplay]:X.name||X.id}])}).catch(X=>{l(d,[])})),t(d)||[]):H()?C()&&Array.isArray(C())?C():[]:C()?[C()]:[]};x(()=>v(D()),()=>{var V;l(o,((V=D())==null?void 0:V.relatedField)||"id")}),x(()=>v(D()),()=>{var V;l(c,(V=D())==null?void 0:V.tableId)}),x(()=>v(D()),()=>{var V;l(u,((V=D())==null?void 0:V.relatedColumns)||[])}),x(()=>v(w()),()=>{l(g,w().relViewMode=="pills")}),x(()=>(v(Z()),v(w())),()=>{var V;Z(Z()||((V=w())==null?void 0:V.ownId))}),x(()=>v(C()),()=>{l(d,Q(C()))}),x(()=>n(),()=>{l(p,n()=="Editing")}),x(()=>(t(p),t(ue),t(d)),()=>{l(_,t(p)&&t(ue)!=JSON.stringify(t(d)))}),x(()=>v(w()),()=>{B(w().relViewMode=="text")}),x(()=>v(w()),()=>{l(S,w().role=="inlineInput")}),x(()=>v(w()),()=>{l(E,w().placeholder||"")}),x(()=>v(w()),()=>{l(A,w().readonly||w().disabled)}),Pt(),Ot();var Y=bw(),J=Ue(Y);let K,ie;var z=j(J);{var ge=V=>{var fe=fw();Ce(()=>Pe(fe,1,(v(w()),b(()=>w().icon+" field-icon")))),y(V,fe)};oe(z,V=>{v(w()),b(()=>{var fe;return(fe=w())==null?void 0:fe.icon})&&V(ge)})}var O=Ee(z,2);let G;var re=j(O);{var ae=V=>{var fe=hw(),X=j(fe);Ce(()=>Xe(X,t(E))),y(V,fe)},ee=V=>{var fe=Ze(),X=Ue(fe);{var q=P=>{var te=pw();let M;var T=j(te);xt(T,1,()=>t(d),Nt,(ve,Oe,Me)=>{var Re=Ze(),se=Ue(Re);{var Ie=Le=>{var je=gw(),Fe=j(je),Ae=j(Fe);Ce(()=>Xe(Ae,(t(Oe),b(()=>t(Oe).primaryDisplay)))),y(Le,je)};oe(se,Le=>{Me<5&&Le(Ie)})}y(ve,Re)});var N=Ee(T,2);{var ne=ve=>{var Oe=vw(),Me=j(Oe);Ce(()=>Xe(Me,`(+ ${t(d),b(()=>t(d).length-5)??""})`)),y(ve,Oe)};oe(N,ve=>{t(d),b(()=>t(d).length>5)&&ve(ne)})}Ce(()=>M=Pe(te,1,"items",null,M,{pills:t(g),withCount:t(d).length>5,inEdit:t(p)})),y(P,te)},he=P=>{var te=mw(),M=j(te);{var T=ne=>{var ve=Ni();Ce(()=>Xe(ve,`(${t(d),b(()=>t(d).length)??""})`)),y(ne,ve)};oe(M,ne=>{v(w()),t(d),b(()=>w().role=="formInput"&&t(d).length>1)&&ne(T)})}var N=Ee(M);Ce(ne=>Xe(N,` ${ne??""}`),[()=>(t(d),b(()=>t(d).map(ne=>ne.primaryDisplay).join(", ")))]),y(P,te)};oe(X,P=>{t(g)?P(q):P(he,!1)},!0)}y(V,fe)};oe(re,V=>{t(d),b(()=>{var fe;return((fe=t(d))==null?void 0:fe.length)<1})?V(ae):V(ee,!1)})}var pe=Ee(O,2);{var Ne=V=>{var fe=_w();W("click",fe,function(...X){var q;(q=ke.toggle)==null||q.apply(this,X)}),y(V,fe)};oe(pe,V=>{t(A),v(w()),t(p),b(()=>!t(A)&&(w().role=="formInput"||t(p)))&&V(Ne)})}ht(J,V=>l(de,V),()=>t(de));var He=Ee(J,2);{var me=V=>{{let fe=Rt(()=>i()=="Open");Qr(V,{get anchor(){return t(de)},useAnchorWidth:!0,get open(){return t(fe)},$$events:{close:X=>{console.log("closing editor"),ke.close()}},children:(X,q)=>{var he=Ze(),P=Ue(he);{var te=T=>{{let N=Rt(()=>$()??[]);Ro(T,{get fieldSchema(){return D()},get filter(){return t(N)},get search(){return Se},get limit(){return R()},get joinColumn(){return v(w()),b(()=>w().joinColumn)},get value(){return t(d)},get ownId(){return Z()},get multi(){return H()},$$events:{change:le}})}},M=T=>{dw(T,{get fieldSchema(){return D()},get filter(){return $()},get multi(){return H()},get value(){return t(d)},get api(){return t(ce)},set api(N){l(ce,N)},$$events:{change:le},$$legacy:!0})};oe(P,T=>{v(D()),b(()=>D().recursiveTable)?T(te):T(M,!1)})}y(X,he)},$$slots:{default:!0}})}};oe(He,V=>{t(p)&&V(me)})}Ce(()=>{var V;K=Pe(J,1,"superCell",null,K,{isDirty:t(_)&&w().showDirty,inEdit:t(p),inline:t(S),tableCell:w().role=="tableCell",formInput:w().role=="formInput",disabled:w().disabled,readonly:t(A),error:w().error}),Lt(J,"tabindex",(v(w()),b(()=>{var fe;return(fe=w())!=null&&fe.disabled?-1:0}))),ie=We(J,"",ie,{color:(v(w()),b(()=>w().color)),background:(v(w()),b(()=>w().background)),"font-weight":(v(w()),b(()=>w().fontWeight))}),G=Pe(O,1,"value",null,G,{placeholder:((V=t(d))==null?void 0:V.length)<1})}),W("focusin",J,function(...V){var fe;(fe=De().focus)==null||fe.apply(this,V)}),W("keydown",J,cs(ye)),W("focusout",J,function(...V){var fe;(fe=De().focusout)==null||fe.apply(this,V)}),y(e,Y),Dt(),a()}var ww=U("<i></i>"),Ew=U('<span class="svelte-tuph9y"> </span>'),Sw=U("<i></i>"),Cw=U('<div><!> <span class="svelte-tuph9y"> </span></div>'),Aw=U("<div></div>"),Tw=U('<i class="ri-close-line clearIcon svelte-tuph9y"></i>'),kw=U('<i class="ph ph-caret-down control-icon svelte-tuph9y"></i>'),Dw=U("<div><!> <div><!> <!></div> <!></div> <!>",1);function xw(e,r){kt(r,!1);const n=()=>Be(ke(),"$cellState",s),i=()=>Be(De,"$editorState",s),[s,a]=Gt(),o=h(),c=h(),u=h(),g=h(),d=h(),p=h(),_=h(),S=h(),E=h(),A=h(),I=h(),k=we.createEventDispatcher();let C=m(r,"value",8),D=m(r,"fieldSchema",8),w=m(r,"cellOptions",8),B=m(r,"simpleView",12,!0),$=m(r,"filter",24,()=>[]),R=m(r,"limit",8,100),H=h(JSON.stringify(C())),Z=h(),ue=h(),de=h(),Se,ce,ke=m(r,"cellState",24,()=>sr(w().initialState??"View",{"*":{goTo(q){return q}},View:{_enter(){l(de,!1)},focus(){if(!w().readonly&&!w().disabled)return"Editing"}},Editing:{_enter(){l(H,JSON.stringify(t(g))),De.open(),k("enteredit")},_exit(){De.close(),k("exitedit")},checkFocus(){return Se()},focusout(q){var he;(he=t(ue))!=null&&he.contains(q.relatedTarget)||this.submit()},popupfocusout(q){},clear(){l(g,[])},submit(){return t(p)&&k("change",t(I)&&t(g)?t(g)[0]:t(g)),De.close(),"View"},cancel(){return De.close(),"View"}}}));const De=sr("Closed",{Open:{close(){return"Closed"},toggle(){return"Closed"}},Closed:{open(){return"Open"},toggle(){return"Open"}}}),ye=q=>{q.keyCode==32&&n()=="Editing"?(q.preventDefault(),q.stopPropagation(),De.toggle()):q.key!="Tab"&&l(de,!0)},le=q=>{l(g,q.detail);let he=t(I)?t(g)[0]??{}:t(g);t(S)&&k("change",he),t(A)&&De.close()},Q=q=>D().relationshipType=="self"&&q?Y(q):t(c)?C()?[...C()]:[]:C()?[C()]:[],Y=q=>{let he;try{he=JSON.parse(q)}catch{he=void 0}return he};x(()=>v(w()),()=>{l(o,w().relViewMode=="pills")}),x(()=>v(D()),()=>{var q,he;l(c,!((he=(q=D())==null?void 0:q.type)!=null&&he.includes("_single")))}),x(()=>v(D()),()=>{var q,he;l(u,(he=(q=D())==null?void 0:q.type)==null?void 0:he.includes("bb_reference"))}),x(()=>v(C()),()=>{l(g,Q(C()))}),x(()=>n(),()=>{l(d,n()=="Editing")}),x(()=>(t(d),t(H),t(g)),()=>{l(p,t(d)&&t(H)!=JSON.stringify(t(g)))}),x(()=>v(w()),()=>{B(w().relViewMode=="text")}),x(()=>v(w()),()=>{l(_,w().role=="inlineInput")}),x(()=>v(w()),()=>{l(S,w().controlType=="expanded")}),x(()=>(v(w()),t(g),t(d)),()=>{var q;l(E,w().controlType=="expanded"&&(((q=t(g))==null?void 0:q.length)>1||t(d)))}),x(()=>(v(D()),t(c)),()=>{var q,he,P;l(A,((q=D())==null?void 0:q.relationshipType)=="one-to-many"||((he=D())==null?void 0:he.relationshipType)=="many-to-one"||((P=D())==null?void 0:P.relationshipType)=="self"||!t(c))}),x(()=>(t(u),t(c)),()=>{l(I,t(u)&&!t(c))}),Pt(),Ot();var J=Dw(),K=Ue(J);let ie;Lt(K,"tabindex","0");let z;var ge=j(K);{var O=q=>{var he=ww();Ce(()=>Pe(he,1,(v(w()),b(()=>w().icon+" icon")),"svelte-tuph9y")),y(q,he)};oe(ge,q=>{v(w()),b(()=>{var he;return(he=w())==null?void 0:he.icon})&&q(O)})}var G=Ee(ge,2);let re;var ae=j(G);{var ee=q=>{var he=Ew(),P=j(he);Ce(()=>Xe(P,(v(w()),b(()=>w().placeholder??null)))),y(q,he)},pe=q=>{var he=Ze(),P=Ue(he);{var te=M=>{var T=Aw();let N;xt(T,5,()=>t(g),Nt,(ne,ve)=>{var Oe=Cw();let Me;var Re=j(Oe);{var se=je=>{var Fe=Sw();Ce(()=>Pe(Fe,1,Cn((v(D()),b(()=>D().type=="link"?"ri-links-line":"ri-user-line"))),"svelte-tuph9y")),y(je,Fe)};oe(Re,je=>{B()||je(se)})}var Ie=Ee(Re,2),Le=j(Ie);Ce(()=>{Me=Pe(Oe,1,"item svelte-tuph9y",null,Me,{"rel-bb-reference":!B()&&D().type!="link"}),Xe(Le,(t(ve),b(()=>t(ve).primaryDisplay)))}),y(ne,Oe)}),Ce(()=>N=Pe(T,1,"items svelte-tuph9y",null,N,{pills:t(o)})),y(M,T)};oe(P,M=>{t(g),b(()=>{var T;return((T=t(g))==null?void 0:T.length)>0})&&M(te)},!0)}y(q,he)};oe(ae,q=>{t(g),b(()=>{var he;return((he=t(g))==null?void 0:he.length)<1})?q(ee):q(pe,!1)})}var Ne=Ee(ae,2);{var He=q=>{var he=Tw();W("mousedown",he,$t(function(...P){var te;(te=ke().clear)==null||te.apply(this,P)})),y(q,he)};oe(Ne,q=>{t(d),t(g),b(()=>{var he;return t(d)&&((he=t(g))==null?void 0:he.length)})&&q(He)})}var me=Ee(G,2);{var V=q=>{var he=kw();y(q,he)};oe(me,q=>{v(w()),t(d),b(()=>!w().readonly&&(w().role=="formInput"||t(d)))&&q(V)})}ht(K,q=>l(Z,q),()=>t(Z));var fe=Ee(K,2);{var X=q=>{{let he=Rt(()=>i()=="Open");Qr(q,{get anchor(){return t(Z)},useAnchorWidth:!0,get open(){return t(he)},get popup(){return t(ue)},set popup(P){l(ue,P)},$$events:{close(...P){var te;(te=ke().focusout)==null||te.apply(this,P)}},children:(P,te)=>{Ro(P,{get fieldSchema(){return D()},get filter(){return $()},get search(){return t(de)},get searchTerm(){return ce},get limit(){return R()},get joinColumn(){return v(w()),b(()=>w().joinColumn)},get value(){return t(g)},multi:!1,$$events:{change:le,focusout:M=>setTimeout(ke().focusout,20,M)}})},$$slots:{default:!0},$$legacy:!0})}};oe(fe,q=>{t(d)&&q(X)})}Ce(()=>{var q,he;ie=Pe(K,1,"superCell svelte-tuph9y",null,ie,{inEdit:t(d),isDirty:t(p)&&w().showDirty,focused:n()=="Editing",inline:t(_),multirow:t(E),tableCell:w().role=="tableCell",formInput:w().role=="formInput",disabled:w().disabled,readonly:w().readonly,error:w().error}),z=We(K,"",z,{color:(v(w()),b(()=>w().color)),background:(v(w()),b(()=>w().background)),"font-weight":(v(w()),b(()=>w().fontWeight))}),re=Pe(G,1,"value svelte-tuph9y",null,re,{"with-icon":(q=w())==null?void 0:q.icon,placeholder:((he=t(g))==null?void 0:he.length)<1})}),W("keydown",K,ye),W("focusin",K,function(...q){var he;(he=ke().focus)==null||he.apply(this,q)}),W("focusout",K,function(...q){var he;(he=ke().focusout)==null||he.apply(this,q)}),W("mousedown",K,function(...q){var he;(he=De.toggle)==null||he.apply(this,q)}),y(e,J),Dt(),a()}var Ow=U('<div class="skeleton svelte-in3ggf"><div class="children svelte-in3ggf"></div></div>');function ph(e,r){let n=m(r,"active",8,!0),i=m(r,"minHeight",8,"2rem");var s=Ze(),a=Ue(s);{var o=u=>{var g=Ow();let d;Ce(()=>d=We(g,"",d,{"min-height":i()})),y(u,g)},c=u=>{var g=Ze(),d=Ue(g);mr(d,r,"default",{},null),y(u,g)};oe(a,u=>{n()?u(o):u(c,!1)})}y(e,s)}var Iw=U("<div> </div>"),Rw=U('<div class="buttons svelte-17k8iag"></div>'),Pw=U("<div><i></i> </div>"),Mw=U("<div></div>"),Nw=U('<div class="spectrum-Switch spectrum-Switch--emphasized svelte-17k8iag"><input type="checkbox" class="spectrum-Switch-input"/> <span class="spectrum-Switch-switch"></span></div>'),Lw=U('<div class="switch toggleAll svelte-17k8iag"><div class="text title svelte-17k8iag"> </div> <!></div>'),Fw=U('<div><i></i> <div class="text svelte-17k8iag"> </div> <div class="spectrum-Switch spectrum-Switch--emphasized svelte-17k8iag"><input type="checkbox" class="spectrum-Switch-input"/> <span class="spectrum-Switch-switch small"></span></div></div>'),Vw=U("<div><!> <!></div>"),Uw=U('<div class="option svelte-17k8iag"><span class="svelte-17k8iag"><i class="ri-close-line svelte-17k8iag"></i> No Options Found</span></div>'),Bw=U('<div><span class="svelte-17k8iag"><i class="ri-checkbox-blank-fill svelte-17k8iag"></i> </span></div>'),Hw=U('<div class="options svelte-17k8iag"><!></div>'),zw=U("<div><!></div> <!>",1);function jw(e,r){var Fe;kt(r,!1);const n=()=>Be(te,"$dataSourceStore",u),i=()=>Be(t(R),"$fetch",u),s=()=>Be(M(),"$cellState",u),a=()=>Be(re,"$options",u),o=()=>Be(q,"$colors",u),c=()=>Be(T,"$editorState",u),[u,g]=Gt(),d=h(),p=h(),_=h(),S=h(),E=h(),A=h(),I=h(),k=h(),C=h(),D=h(),w=h(),B=h(),$=h(),R=h(),H=h(),Z=h(),ue=h(),de=h(),Se=h(),ce=h(),ke=we.createEventDispatcher(),{API:De,QueryUtils:ye,fetchData:le,memo:Q,derivedMemo:Y}=we.getContext("sdk");let J=m(r,"cellOptions",8),K=m(r,"value",8),ie=m(r,"fieldSchema",8),z=m(r,"multi",8,!0),ge=m(r,"autofocus",8),O=m(r,"label",8),G=h(),re=Q([]),ae=h({}),ee={},pe=h({}),Ne=h([]),He=h(-1),me,V=h(),fe=h(!0),X=h(!1);const q=Y(re,Ae=>{let Ge={};return J().optionsSource=="custom"||Ae.forEach(($e,Je)=>Ge[$e]=ee[$e]??he[Je%14]),Ge}),he=["hsla(0, 90%, 75%, 0.35)","hsla(25, 90%, 75%, 0.35)","hsla(50, 80%, 75%, 0.35)","hsla(75, 80%, 75%, 0.35)","hsla(100, 80%, 75%, 0.35)","hsla(125, 90%, 75%, 0.35)","hsla(150, 90%, 75%, 0.35)","hsla(175, 90%, 75%, 0.35)","hsla(200, 90%, 75%, 0.35)","hsla(225, 90%, 75%, 0.35)","hsla(250, 90%, 75%, 0.35)","hsla(275, 90%, 75%, 0.35)","hsla(300, 90%, 75%, 0.35)","hsla(325, 90%, 75%, 0.35)","hsla(350, 90%, 75%, 0.35)"];let P=h(JSON.stringify(Array.isArray(K())?K():K()?[K()]:[]));const te=Q(((Fe=J())==null?void 0:Fe.datasource)??{});let M=m(r,"cellState",24,()=>sr("Loading",{"*":{goTo(Ae){return Ae},refresh(){return Qe(re,[]),"Loading"},loadSchemaOptions(){var Ae,Ge,$e;ee=((Ae=ie())==null?void 0:Ae.optionColors)||{},Qe(re,(($e=(Ge=ie())==null?void 0:Ge.constraints)==null?void 0:$e.inclusion)||[])},loadDataOptions(Ae){Ae&&Ae.length&&Ae.forEach(Ge=>{var $e;a().push(($e=Ge[t(S)])==null?void 0:$e.toString()),Ht(ae,t(ae)[Ge[t(S)]]=Ge[t(_)||i().definition.primaryDisplay]),ee[Ge[t(S)]]=Ge[t(A)],Ht(pe,t(pe)[Ge[t(S)]]=Ge[t(E)])}),Qe(re,a())},loadCustomOptions(){var Ae;(Ae=t(I))!=null&&Ae.length&&t(I).forEach(Ge=>{a().push(Ge.value),Ht(ae,t(ae)[Ge.value]=Ge.label)}),Qe(re,a())},clearFilters(){l(Ne,a())}},Loading:{_enter(){var Ae;(J().optionsSource!="data"||(Ae=i())!=null&&Ae.loaded)&&this.goTo.debounce(10,J().initialState||"View")},_exit(){var Ae;t(p)=="custom"?this.loadCustomOptions():t(p)=="data"?this.loadDataOptions((Ae=i())==null?void 0:Ae.rows):this.loadSchemaOptions(),l(Ne,a())},syncFetch(){var Ae;if((Ae=i())!=null&&Ae.loaded)return J().initialState||"View"}},View:{_enter(){},focus(Ae){if(!J().readonly&&!J().disabled)return"Editing"}},Editing:{_enter(){l(P,JSON.stringify(Array.isArray(K())?K():K()?[K()]:[])),ke("enteredit")},_exit(){T.close(),ke("exitedit")},handleKeyboard(Ae){},focusout(Ae){var Ge;if(T.close(),!((Ge=t(G))!=null&&Ge.contains(Ae.relatedTarget))&&t(fe))return this.submit(),"View"},submit(){t(ue)&&!J().debounce&&(z()?ke("change",t(Z)):ke("change",t(Z)[0]))},cancel(){return"View"}}})),T=sr("Closed",{"*":{toggleOption(Ae){var Je;let Ge=a()[Ae],$e=t(Z).indexOf(Ge);z()&&$e>-1?(t(Z).splice($e,1),l(Z,[...t(Z)])):z()?l(Z,[...t(Z),Ge]):t(Z)[0]==Ge?Ht(Z,t(Z).length=0):Ht(Z,t(Z)[0]=Ge),(J().debounce||t(ce))&&(clearTimeout(me),me=setTimeout(()=>{ke("change",z()?t(Z):t(Z)[0])},J().debounce??0)),(!z()||t(Ne).length==t(Z).length)&&((Je=t(G))==null||Je.focus())},toggleAll(){t(X)?l(Z,[]):l(Z,[...t(Ne)]),J().debounce&&(clearTimeout(me),me=setTimeout(()=>{ke("change",z()?t(Z):t(Z)[0])},J().debounce??0))},handleKeyboard(Ae){Ae.keyCode==32&&T.toggle(),Ae.key=="Escape"&&this.cancel(),Ae.key=="Enter"&&(z()?(this.toggleOption(t(He),Ae.preventDefault()),this.close()):this.toggleOption(t(He))),Ae.key=="ArrowDown"&&this.highlightNext(Ae.preventDefault(),Ae.stopPropagation()),Ae.key=="ArrowUp"&&this.highlightPrevious(Ae.preventDefault(),Ae.stopPropagation()),Ae.key=="Escape"&&this.close(Ae.stopPropagation())},highlightNext(){l(He,t(He)+1),t(He)>a().length-1&&l(He,0)},highlightPrevious(){l(He,t(He)-1),t(He)<0&&l(He,a().length-1)}},Open:{_enter(){l(He,-1),this.refocus.debounce(10)},_exit(){},filterOptions(Ae){Ae&&Ae.target.value!=""?l(Ne,a().filter(Ge=>Ge==null?void 0:Ge.startsWith(Ae.target.value))):l(Ne,a())},close(){return"Closed"},toggle(){return"Closed"}},Closed:{toggle(){return"Open"},open(){return"Open"},filterOptions(Ae){this.open(),this.filterOptions(Ae)},handleKeyboard(Ae){!J().autocomplete&&t(d)=="select"?(Ae.keyCode==32&&(Ae.preventDefault(),Ae.stopPropagation(),this.toggle()),(Ae.key=="Backspace"||Ae.key=="Delete")&&(Ae.stopPropagation(),l(Z,[]),ke("change",t(Z)))):t(d)!="select"&&((Ae.keyCode==32||Ae.key=="Enter")&&this.toggleOption(t(He),Ae.preventDefault()),Ae.key=="ArrowDown"&&this.highlightNext(Ae.preventDefault(),Ae.stopPropagation()),Ae.key=="ArrowUp"&&this.highlightPrevious(Ae.preventDefault(),Ae.stopPropagation()),Ae.key=="Escape"&&this.close(Ae.stopPropagation()))}}});const N=Ae=>le({API:De,datasource:Ae,options:{query:ye.buildQuery(J().filter),sortColumn:J().sortColumn,sortOrder:J().sortOrder,limit:J().limit||1e3}});we.onMount(()=>{ge()&&setTimeout(()=>{M().focus()},30)}),x(()=>(t(d),t(p),t(_),t(S),t(E),t(A),t(I),t(k),t(C),t(D),t(w),t(B),t($),v(J())),()=>{(Ae=>{l(d,Ae.controlType),l(p,Ae.optionsSource),l(_,Ae.labelColumn),l(S,Ae.valueColumn),l(E,Ae.iconColumn),l(A,Ae.colorColumn),l(I,Ae.customOptions),l(k,Ae.role),l(C,Ae.readonly),l(D,Ae.disabled),l(w,Ae.error),l(B,Ae.color),l($,Ae.background)})(J())}),x(()=>v(J()),()=>{te.set(J().datasource)}),x(()=>(t(p),n()),()=>{on(l(R,t(p)=="data"?N(n()):Q({loaded:!0})),"$fetch",u)}),x(()=>v(K()),()=>{l(Z,Array.isArray(K())?K():K()?[K()]:[])}),x(()=>(t(Ne),t(Z)),()=>{l(H,t(Ne).length==t(Z).length&&t(Ne).length>0)}),x(()=>(v(M()),v(ie()),t(p),t(_),t(S),t(E),t(A),n()),()=>{M().refresh(ie(),t(p),t(_),t(S),t(E),t(A),n())}),x(()=>(v(M()),i()),()=>{M().syncFetch(i())}),x(()=>s(),()=>{l(de,s()=="Editing")}),x(()=>(t(de),t(P),t(Z)),()=>{l(ue,t(de)&&t(P)!==JSON.stringify(t(Z)))}),x(()=>t(d),()=>{l(Se,t(d)=="radio")}),x(()=>t(d),()=>{l(ce,t(d)=="buttons")}),x(()=>(t(Ne),t(Z)),()=>{l(X,t(Ne).length==t(Z).length)}),Pt(),Ot();var ne=zw(),ve=Ue(ne);let Oe,Me;var Re=j(ve);{var se=Ae=>{ph(Ae,{children:(Ge,$e)=>{var Je=Ni("Initializing ..");y(Ge,Je)},$$slots:{default:!0}})},Ie=Ae=>{var Ge=Ze(),$e=Ue(Ge);{var Je=st=>{{let ut=Rt(()=>(v(J()),b(()=>J().optionsViewMode!="text"))),it=Rt(()=>(v(J()),b(()=>J().readonly||J().disabled)));uh(st,{get items(){return t(Z)},get itemsColors(){return o()},get itemsLabels(){return t(ae)},get showColors(){return t(ut)},get reorderOnly(){return v(J()),b(()=>J().reorderOnly)},get placeholder(){return v(J()),b(()=>J().placeholder)},get readonly(){return t(it)},get editorState(){return T},get cellState(){return M()},get fullSelection(){return t(H)},get inactive(){return t(fe)},set inactive(_e){l(fe,_e)},$$events:{togglePicker(..._e){var qe;(qe=T.toggle)==null||qe.apply(this,_e)},clear:()=>{l(Z,[]),T.close(),t(G).focus()},change:_e=>{l(Z,[..._e.detail]),t(G).focus()}},$$legacy:!0})}},rt=st=>{var ut=Ze(),it=Ue(ut);{var _e=Ye=>{var ot=Ze(),Te=Ue(ot);{var Ke=gt=>{var pt=Rw();xt(pt,5,a,Nt,(Yt,Tt,_t)=>{var wt=Iw();let dt,nt;var at=j(wt);Ce(bt=>{dt=Pe(wt,1,"button svelte-17k8iag",null,dt,bt),nt=We(wt,"",nt,{"--option-color":(o(),t(Tt),b(()=>o()[t(Tt)]))}),Xe(at,(t(ae),t(Tt),b(()=>t(ae)[t(Tt)]||t(Tt))))},[()=>{var bt;return{selected:(bt=t(Z))==null?void 0:bt.includes(t(Tt))}}]),W("click",wt,()=>T.toggleOption(_t)),y(Yt,wt)}),y(gt,pt)},et=gt=>{var pt=Ze(),Yt=Ue(pt);{var Tt=_t=>{var wt=Mw();let dt;xt(wt,5,a,Nt,(nt,at,bt)=>{var Bt=Pw();let Ft,Vt;var yt=j(Bt);let tr;var or=Ee(yt);Ce((er,rr)=>{Ft=Pe(Bt,1,"radio svelte-17k8iag",null,Ft,er),Vt=We(Bt,"",Vt,{"--option-color":(o(),t(at),b(()=>o()[t(at)]))}),Pe(yt,1,rr,"svelte-17k8iag"),tr=We(yt,"",tr,{color:(o(),t(at),b(()=>o()[t(at)]))}),Xe(or,` ${t(ae),t(at),b(()=>t(ae)[t(at)]||t(at))??""}`)},[()=>{var er;return{selected:(er=t(Z))==null?void 0:er.includes(t(at)),focused:t(He)===bt}},()=>Cn((t(Se),t(Z),t(at),b(()=>t(Se)&&t(Z).includes(t(at))?"ph-fill ph-radio-button":t(Se)?"ph ph-circle":t(Z).includes(t(at))?"ph-fill ph-check-square":"ph ph-square")))]),W("mousedown",Bt,er=>T.toggleOption(bt)),W("mouseenter",Bt,()=>l(He,bt)),y(nt,Bt)}),Ce(()=>dt=Pe(wt,1,"radios svelte-17k8iag",null,dt,{column:J().direction=="column"})),W("mouseleave",wt,()=>l(He,-1)),y(_t,wt)};oe(Yt,_t=>{t(Se)&&_t(Tt)},!0)}y(gt,pt)};oe(Te,gt=>{t(ce)?gt(Ke):gt(et,!1)})}y(Ye,ot)},qe=Ye=>{var ot=Ze(),Te=Ue(ot);{var Ke=et=>{var gt=Vw();let pt;var Yt=j(gt);{var Tt=wt=>{var dt=Lw(),nt=j(dt),at=j(nt),bt=Ee(nt,2);{var Bt=Ft=>{var Vt=Nw(),yt=j(Vt);Ce(()=>Tc(yt,t(X))),y(Ft,Vt)};oe(bt,Ft=>{v(J()),t(C),t(D),b(()=>J().toggleAll&&!(t(C)||t(D)))&&Ft(Bt)})}Ce(()=>Xe(at,O()??"Toggle All")),W("click",dt,function(...Ft){var Vt;(Vt=J().toggleAll?T.toggleAll:void 0)==null||Vt.apply(this,Ft)}),W("mouseenter",dt,function(Ft){Yn.call(this,r,Ft)}),y(wt,dt)};oe(Yt,wt=>{v(O()),v(J()),b(()=>O()||J().toggleAll)&&wt(Tt)})}var _t=Ee(Yt,2);xt(_t,1,a,Nt,(wt,dt,nt)=>{var at=Fw();let bt,Bt;var Ft=j(at),Vt=Ee(Ft,2),yt=j(Vt),tr=Ee(Vt,2),or=j(tr);Lt(or,"id",nt),Ce((er,rr)=>{bt=Pe(at,1,"switch svelte-17k8iag",null,bt,er),Bt=We(at,"",Bt,{"--option-color":(o(),t(dt),b(()=>o()[t(dt)]))}),Pe(Ft,1,Cn((t(pe),t(dt),b(()=>t(pe)[t(dt)]||"no-icon"))),"svelte-17k8iag"),Xe(yt,(t(ae),t(dt),b(()=>t(ae)[t(dt)]||t(dt)))),Tc(or,rr)},[()=>({selected:t(Z).includes(t(dt)),focused:t(He)===nt}),()=>(t(Z),t(dt),b(()=>t(Z).includes(t(dt))))]),W("click",at,er=>T.toggleOption(nt)),W("mouseenter",at,()=>l(He,nt)),y(wt,at)}),Ce(()=>pt=Pe(gt,1,"radios svelte-17k8iag",null,pt,{formInput:t(k)=="formInput",inlineInput:t(k)=="inlineInput",column:J().direction=="column"})),W("mouseleave",gt,()=>l(He,-1)),y(et,gt)};oe(Te,et=>{t(d)=="switch"&&et(Ke)},!0)}y(Ye,ot)};oe(it,Ye=>{t(d)=="radio"||t(d)=="buttons"?Ye(_e):Ye(qe,!1)},!0)}y(st,ut)};oe($e,st=>{t(d)=="list"?st(Je):st(rt,!1)},!0)}y(Ae,Ge)};oe(Re,Ae=>{s()=="Loading"?Ae(se):Ae(Ie,!1)})}ht(ve,Ae=>l(G,Ae),()=>t(G));var Le=Ee(ve,2);{var je=Ae=>{{let Ge=Rt(()=>c()=="Open");Qr(Ae,{get anchor(){return t(G)},useAnchorWidth:!0,maxHeight:400,get open(){return t(Ge)},$$events:{close(...$e){var Je;(Je=M().focusout)==null||Je.apply(this,$e)}},children:($e,Je)=>{var rt=Hw(),st=j(rt);{var ut=_e=>{var qe=Uw();y(_e,qe)},it=_e=>{var qe=Ze(),Ye=Ue(qe);xt(Ye,1,()=>t(Ne),Nt,(ot,Te,Ke)=>{var et=Bw();let gt,pt;var Yt=j(et),Tt=Ee(j(Yt));Ce(_t=>{gt=Pe(et,1,"option svelte-17k8iag",null,gt,_t),pt=We(et,"",pt,{"--option-color":(o(),t(Te),b(()=>o()[t(Te)]))}),Xe(Tt,` ${t(ae),t(Te),b(()=>t(ae)[t(Te)]||t(Te))??""}`)},[()=>{var _t;return{focused:t(He)===Ke,selected:(_t=t(Z))==null?void 0:_t.includes(t(Te))}}]),W("mousedown",et,$t(_t=>T.toggleOption.debounce(150,Ke))),W("mouseenter",et,()=>l(He,Ke)),y(ot,et)}),y(_e,qe)};oe(st,_e=>{t(Ne),t(Z),b(()=>{var qe;return((qe=t(Ne))==null?void 0:qe.length)<1||t(Ne).length==t(Z).length})?_e(ut):_e(it,!1)})}ht(rt,_e=>l(V,_e),()=>t(V)),W("wheel",rt,_e=>_e.stopPropagation()),W("mouseleave",rt,()=>l(He,-1)),y($e,rt)},$$slots:{default:!0}})}};oe(Le,Ae=>{t(de)&&t(d)=="list"&&Ae(je)})}Ce(()=>{Oe=Pe(ve,1,"superCell multirow",null,Oe,{inEdit:t(de)&&t(d)!="buttons",isDirty:t(ue)&&J().showDirty,disabled:t(D),readonly:t(C),error:t(w),inline:t(k)=="inlineInput",tableCell:t(k)=="tableCell",formInput:t(k)=="formInput","naked-field":t(d)=="buttons"}),Lt(ve,"tabindex",(v(J()),b(()=>{var Ae;return(Ae=J())!=null&&Ae.disabled?-1:0}))),Me=We(ve,"",Me,{color:t(B),background:t($),"font-weight":(v(J()),b(()=>J().fontWeight))})}),W("focusin",ve,function(...Ae){var Ge;(Ge=M().focus)==null||Ge.apply(this,Ae)}),W("focusout",ve,function(...Ae){var Ge;(Ge=M().focusout)==null||Ge.apply(this,Ae)}),W("keydown",ve,function(...Ae){var Ge;(Ge=T.handleKeyboard)==null||Ge.apply(this,Ae)}),y(e,ne),Dt(),g()}function Fa(e,r){if(e==null)return{};var n={},i=Object.keys(e),s,a;for(a=0;a<i.length;a++)s=i[a],!(r.indexOf(s)>=0)&&(n[s]=e[s]);return n}function zt(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return new zt.InputMask(e,r)}class ir{constructor(r){Object.assign(this,{inserted:"",rawInserted:"",skip:!1,tailShift:0},r)}aggregate(r){return this.rawInserted+=r.rawInserted,this.skip=this.skip||r.skip,this.inserted+=r.inserted,this.tailShift+=r.tailShift,this}get offset(){return this.tailShift+this.inserted.length}}zt.ChangeDetails=ir;function Va(e){return typeof e=="string"||e instanceof String}const It={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function Gw(e){switch(e){case It.LEFT:return It.FORCE_LEFT;case It.RIGHT:return It.FORCE_RIGHT;default:return e}}function fu(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function Cs(e){return Array.isArray(e)?e:[e,new ir]}function Mo(e,r){if(r===e)return!0;var n=Array.isArray(r),i=Array.isArray(e),s;if(n&&i){if(r.length!=e.length)return!1;for(s=0;s<r.length;s++)if(!Mo(r[s],e[s]))return!1;return!0}if(n!=i)return!1;if(r&&e&&typeof r=="object"&&typeof e=="object"){var a=r instanceof Date,o=e instanceof Date;if(a&&o)return r.getTime()==e.getTime();if(a!=o)return!1;var c=r instanceof RegExp,u=e instanceof RegExp;if(c&&u)return r.toString()==e.toString();if(c!=u)return!1;var g=Object.keys(r);for(s=0;s<g.length;s++)if(!Object.prototype.hasOwnProperty.call(e,g[s]))return!1;for(s=0;s<g.length;s++)if(!Mo(e[g[s]],r[g[s]]))return!1;return!0}else if(r&&e&&typeof r=="function"&&typeof e=="function")return r.toString()===e.toString();return!1}class qw{constructor(r,n,i,s){for(this.value=r,this.cursorPos=n,this.oldValue=i,this.oldSelection=s;this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?It.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?It.RIGHT:It.LEFT}}class Ci{constructor(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=arguments.length>2?arguments[2]:void 0;this.value=r,this.from=n,this.stop=i}toString(){return this.value}extend(r){this.value+=String(r)}appendTo(r){return r.append(this.toString(),{tail:!0}).aggregate(r._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(r){Object.assign(this,r)}unshift(r){if(!this.value.length||r!=null&&this.from>=r)return"";const n=this.value[0];return this.value=this.value.slice(1),n}shift(){if(!this.value.length)return"";const r=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),r}}class mn{constructor(r){this._value="",this._update(Object.assign({},mn.DEFAULTS,r)),this.isInitialized=!0}updateOptions(r){Object.keys(r).length&&this.withValueRefresh(this._update.bind(this,r))}_update(r){Object.assign(this,r)}get state(){return{_value:this.value}}set state(r){this._value=r._value}reset(){this._value=""}get value(){return this._value}set value(r){this.resolve(r)}resolve(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{input:!0};return this.reset(),this.append(r,n,""),this.doCommit(),this.value}get unmaskedValue(){return this.value}set unmaskedValue(r){this.reset(),this.append(r,{},""),this.doCommit()}get typedValue(){return this.doParse(this.value)}set typedValue(r){this.value=this.doFormat(r)}get rawInputValue(){return this.extractInput(0,this.value.length,{raw:!0})}set rawInputValue(r){this.reset(),this.append(r,{raw:!0},""),this.doCommit()}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(r,n){return r}totalInputPositions(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length;return Math.min(this.value.length,n-r)}extractInput(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length;return this.value.slice(r,n)}extractTail(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length;return new Ci(this.extractInput(r,n),r)}appendTail(r){return Va(r)&&(r=new Ci(String(r))),r.appendTo(this)}_appendCharRaw(r){return r?(this._value+=r,new ir({inserted:r,rawInserted:r})):new ir}_appendChar(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;const s=this.state;let a;if([r,a]=Cs(this.doPrepare(r,n)),a=a.aggregate(this._appendCharRaw(r,n)),a.inserted){let o,c=this.doValidate(n)!==!1;if(c&&i!=null){const u=this.state;this.overwrite===!0&&(o=i.state,i.unshift(this.value.length-a.tailShift));let g=this.appendTail(i);c=g.rawInserted===i.toString(),!(c&&g.inserted)&&this.overwrite==="shift"&&(this.state=u,o=i.state,i.shift(),g=this.appendTail(i),c=g.rawInserted===i.toString()),c&&g.inserted&&(this.state=u)}c||(a=new ir,this.state=s,i&&o&&(i.state=o))}return a}_appendPlaceholder(){return new ir}_appendEager(){return new ir}append(r,n,i){if(!Va(r))throw new Error("value should be string");const s=new ir,a=Va(i)?new Ci(String(i)):i;n!=null&&n.tail&&(n._beforeTailState=this.state);for(let o=0;o<r.length;++o){const c=this._appendChar(r[o],n,a);if(!c.rawInserted&&!this.doSkipInvalid(r[o],n,a))break;s.aggregate(c)}return(this.eager===!0||this.eager==="append")&&n!==null&&n!==void 0&&n.input&&r&&s.aggregate(this._appendEager()),a!=null&&(s.tailShift+=this.appendTail(a).tailShift),s}remove(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length;return this._value=this.value.slice(0,r)+this.value.slice(n),new ir}withValueRefresh(r){if(this._refreshing||!this.isInitialized)return r();this._refreshing=!0;const n=this.rawInputValue,i=this.value,s=r();return this.rawInputValue=n,this.value&&this.value!==i&&i.indexOf(this.value)===0&&this.append(i.slice(this.value.length),{},""),delete this._refreshing,s}runIsolated(r){if(this._isolated||!this.isInitialized)return r(this);this._isolated=!0;const n=this.state,i=r(this);return this.state=n,delete this._isolated,i}doSkipInvalid(r){return this.skipInvalid}doPrepare(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.prepare?this.prepare(r,this,n):r}doValidate(r){return(!this.validate||this.validate(this.value,this,r))&&(!this.parent||this.parent.doValidate(r))}doCommit(){this.commit&&this.commit(this.value,this)}doFormat(r){return this.format?this.format(r,this):r}doParse(r){return this.parse?this.parse(r,this):r}splice(r,n,i,s){let a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{input:!0};const o=r+n,c=this.extractTail(o),u=this.eager===!0||this.eager==="remove";let g;u&&(s=Gw(s),g=this.extractInput(0,o,{raw:!0}));let d=r;const p=new ir;if(s!==It.NONE&&(d=this.nearestInputPos(r,n>1&&r!==0&&!u?It.NONE:s),p.tailShift=d-r),p.aggregate(this.remove(d)),u&&s!==It.NONE&&g===this.rawInputValue)if(s===It.FORCE_LEFT){let _;for(;g===this.rawInputValue&&(_=this.value.length);)p.aggregate(new ir({tailShift:-1})).aggregate(this.remove(_-1))}else s===It.FORCE_RIGHT&&c.unshift();return p.aggregate(this.append(i,a,c))}maskEquals(r){return this.mask===r}typedValueEquals(r){const n=this.typedValue;return r===n||mn.EMPTY_VALUES.includes(r)&&mn.EMPTY_VALUES.includes(n)||this.doFormat(r)===this.doFormat(this.typedValue)}}mn.DEFAULTS={format:String,parse:e=>e,skipInvalid:!0},mn.EMPTY_VALUES=[void 0,null,""],zt.Masked=mn;function mh(e){if(e==null)throw new Error("mask property should be defined");return e instanceof RegExp?zt.MaskedRegExp:Va(e)?zt.MaskedPattern:e instanceof Date||e===Date?zt.MaskedDate:e instanceof Number||typeof e=="number"||e===Number?zt.MaskedNumber:Array.isArray(e)||e===Array?zt.MaskedDynamic:zt.Masked&&e.prototype instanceof zt.Masked?e:e instanceof zt.Masked?e.constructor:e instanceof Function?zt.MaskedFunction:(console.warn("Mask not found for mask",e),zt.Masked)}function oa(e){if(zt.Masked&&e instanceof zt.Masked)return e;e=Object.assign({},e);const r=e.mask;if(zt.Masked&&r instanceof zt.Masked)return r;const n=mh(r);if(!n)throw new Error("Masked class is not found for provided mask, appropriate module needs to be import manually before creating mask.");return new n(e)}zt.createMask=oa;const Ww=["parent","isOptional","placeholderChar","displayChar","lazy","eager"],Yw={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class _h{constructor(r){const{parent:n,isOptional:i,placeholderChar:s,displayChar:a,lazy:o,eager:c}=r,u=Fa(r,Ww);this.masked=oa(u),Object.assign(this,{parent:n,isOptional:i,placeholderChar:s,displayChar:a,lazy:o,eager:c})}reset(){this.isFilled=!1,this.masked.reset()}remove(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length;return r===0&&n>=1?(this.isFilled=!1,this.masked.remove(r,n)):new ir}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.isFilled)return new ir;const i=this.masked.state,s=this.masked._appendChar(r,n);return s.inserted&&this.doValidate(n)===!1&&(s.inserted=s.rawInserted="",this.masked.state=i),!s.inserted&&!this.isOptional&&!this.lazy&&!n.input&&(s.inserted=this.placeholderChar),s.skip=!s.inserted&&!this.isOptional,this.isFilled=!!s.inserted,s}append(){return this.masked.append(...arguments)}_appendPlaceholder(){const r=new ir;return this.isFilled||this.isOptional||(this.isFilled=!0,r.inserted=this.placeholderChar),r}_appendEager(){return new ir}extractTail(){return this.masked.extractTail(...arguments)}appendTail(){return this.masked.appendTail(...arguments)}extractInput(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length,i=arguments.length>2?arguments[2]:void 0;return this.masked.extractInput(r,n,i)}nearestInputPos(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:It.NONE;const i=0,s=this.value.length,a=Math.min(Math.max(r,i),s);switch(n){case It.LEFT:case It.FORCE_LEFT:return this.isComplete?a:i;case It.RIGHT:case It.FORCE_RIGHT:return this.isComplete?a:s;case It.NONE:default:return a}}totalInputPositions(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length;return this.value.slice(r,n).length}doValidate(){return this.masked.doValidate(...arguments)&&(!this.parent||this.parent.doValidate(...arguments))}doCommit(){this.masked.doCommit()}get state(){return{masked:this.masked.state,isFilled:this.isFilled}}set state(r){this.masked.state=r.masked,this.isFilled=r.isFilled}}class bh{constructor(r){Object.assign(this,r),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._value.length;return this._value=this._value.slice(0,r)+this._value.slice(n),this._value||(this._isRawInput=!1),new ir}nearestInputPos(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:It.NONE;const i=0,s=this._value.length;switch(n){case It.LEFT:case It.FORCE_LEFT:return i;case It.NONE:case It.RIGHT:case It.FORCE_RIGHT:default:return s}}totalInputPositions(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._value.length;return this._isRawInput?n-r:0}extractInput(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._value.length;return(arguments.length>2&&arguments[2]!==void 0?arguments[2]:{}).raw&&this._isRawInput&&this._value.slice(r,n)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=new ir;if(this.isFilled)return i;const s=this.eager===!0||this.eager==="append",o=this.char===r&&(this.isUnmasking||n.input||n.raw)&&(!n.raw||!s)&&!n.tail;return o&&(i.rawInserted=this.char),this._value=i.inserted=this.char,this._isRawInput=o&&(n.raw||n.input),i}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const r=new ir;return this.isFilled||(this._value=r.inserted=this.char),r}extractTail(){return arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length,new Ci("")}appendTail(r){return Va(r)&&(r=new Ci(String(r))),r.appendTo(this)}append(r,n,i){const s=this._appendChar(r[0],n);return i!=null&&(s.tailShift+=this.appendTail(i).tailShift),s}doCommit(){}get state(){return{_value:this._value,_isRawInput:this._isRawInput}}set state(r){Object.assign(this,r)}}const Kw=["chunks"];class la{constructor(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;this.chunks=r,this.from=n}toString(){return this.chunks.map(String).join("")}extend(r){if(!String(r))return;Va(r)&&(r=new Ci(String(r)));const n=this.chunks[this.chunks.length-1],i=n&&(n.stop===r.stop||r.stop==null)&&r.from===n.from+n.toString().length;if(r instanceof Ci)i?n.extend(r.toString()):this.chunks.push(r);else if(r instanceof la){if(r.stop==null){let s;for(;r.chunks.length&&r.chunks[0].stop==null;)s=r.chunks.shift(),s.from+=r.from,this.extend(s)}r.toString()&&(r.stop=r.blockIndex,this.chunks.push(r))}}appendTo(r){if(!(r instanceof zt.MaskedPattern))return new Ci(this.toString()).appendTo(r);const n=new ir;for(let i=0;i<this.chunks.length&&!n.skip;++i){const s=this.chunks[i],a=r._mapPosToBlock(r.value.length),o=s.stop;let c;if(o!=null&&(!a||a.index<=o)){if(s instanceof la||r._stops.indexOf(o)>=0){const u=r._appendPlaceholder(o);n.aggregate(u)}c=s instanceof la&&r._blocks[o]}if(c){const u=c.appendTail(s);u.skip=!1,n.aggregate(u),r._value+=u.inserted;const g=s.toString().slice(u.rawInserted.length);g&&n.aggregate(r.append(g,{tail:!0}))}else n.aggregate(r.append(s.toString(),{tail:!0}))}return n}get state(){return{chunks:this.chunks.map(r=>r.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(r){const{chunks:n}=r,i=Fa(r,Kw);Object.assign(this,i),this.chunks=n.map(s=>{const a="chunks"in s?new la:new Ci;return a.state=s,a})}unshift(r){if(!this.chunks.length||r!=null&&this.from>=r)return"";const n=r!=null?r-this.from:r;let i=0;for(;i<this.chunks.length;){const s=this.chunks[i],a=s.unshift(n);if(s.toString()){if(!a)break;++i}else this.chunks.splice(i,1);if(a)return a}return""}shift(){if(!this.chunks.length)return"";let r=this.chunks.length-1;for(;0<=r;){const n=this.chunks[r],i=n.shift();if(n.toString()){if(!i)break;--r}else this.chunks.splice(r,1);if(i)return i}return""}}class Xw{constructor(r,n){this.masked=r,this._log=[];const{offset:i,index:s}=r._mapPosToBlock(n)||(n<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=i,this.index=s,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(r){Object.assign(this,r)}pushState(){this._log.push(this.state)}popState(){const r=this._log.pop();return this.state=r,r}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.value.length))}_pushLeft(r){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((n=this.block)===null||n===void 0?void 0:n.value.length)||0){var n;if(r())return this.ok=!0}return this.ok=!1}_pushRight(r){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(r())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,It.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,It.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,It.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,It.FORCE_RIGHT),this.offset!==this.block.value.length))return!0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,It.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,It.NONE),!0})}}class Qw extends mn{_update(r){r.mask&&(r.validate=n=>n.search(r.mask)>=0),super._update(r)}}zt.MaskedRegExp=Qw;const Zw=["_blocks"];class An extends mn{constructor(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};r.definitions=Object.assign({},Yw,r.definitions),super(Object.assign({},An.DEFAULTS,r))}_update(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};r.definitions=Object.assign({},this.definitions,r.definitions),super._update(r),this._rebuildMask()}_rebuildMask(){const r=this.definitions;this._blocks=[],this._stops=[],this._maskedBlocks={};let n=this.mask;if(!n||!r)return;let i=!1,s=!1;for(let c=0;c<n.length;++c){var a,o;if(this.blocks){const _=n.slice(c),S=Object.keys(this.blocks).filter(A=>_.indexOf(A)===0);S.sort((A,I)=>I.length-A.length);const E=S[0];if(E){const A=oa(Object.assign({parent:this,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite},this.blocks[E]));A&&(this._blocks.push(A),this._maskedBlocks[E]||(this._maskedBlocks[E]=[]),this._maskedBlocks[E].push(this._blocks.length-1)),c+=E.length-1;continue}}let u=n[c],g=u in r;if(u===An.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(u==="{"||u==="}"){i=!i;continue}if(u==="["||u==="]"){s=!s;continue}if(u===An.ESCAPE_CHAR){if(++c,u=n[c],!u)break;g=!1}const d=(a=r[u])!==null&&a!==void 0&&a.mask&&!(((o=r[u])===null||o===void 0?void 0:o.mask.prototype)instanceof zt.Masked)?r[u]:{mask:r[u]},p=g?new _h(Object.assign({parent:this,isOptional:s,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar},d)):new bh({char:u,eager:this.eager,isUnmasking:i});this._blocks.push(p)}}get state(){return Object.assign({},super.state,{_blocks:this._blocks.map(r=>r.state)})}set state(r){const{_blocks:n}=r,i=Fa(r,Zw);this._blocks.forEach((s,a)=>s.state=n[a]),super.state=i}reset(){super.reset(),this._blocks.forEach(r=>r.reset())}get isComplete(){return this._blocks.every(r=>r.isComplete)}get isFilled(){return this._blocks.every(r=>r.isFilled)}get isFixed(){return this._blocks.every(r=>r.isFixed)}get isOptional(){return this._blocks.every(r=>r.isOptional)}doCommit(){this._blocks.forEach(r=>r.doCommit()),super.doCommit()}get unmaskedValue(){return this._blocks.reduce((r,n)=>r+=n.unmaskedValue,"")}set unmaskedValue(r){super.unmaskedValue=r}get value(){return this._blocks.reduce((r,n)=>r+=n.value,"")}set value(r){super.value=r}get displayValue(){return this._blocks.reduce((r,n)=>r+=n.displayValue,"")}appendTail(r){return super.appendTail(r).aggregate(this._appendPlaceholder())}_appendEager(){var r;const n=new ir;let i=(r=this._mapPosToBlock(this.value.length))===null||r===void 0?void 0:r.index;if(i==null)return n;this._blocks[i].isFilled&&++i;for(let s=i;s<this._blocks.length;++s){const a=this._blocks[s]._appendEager();if(!a.inserted)break;n.aggregate(a)}return n}_appendCharRaw(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=this._mapPosToBlock(this.value.length),s=new ir;if(!i)return s;for(let c=i.index;;++c){var a,o;const u=this._blocks[c];if(!u)break;const g=u._appendChar(r,Object.assign({},n,{_beforeTailState:(a=n._beforeTailState)===null||a===void 0||(o=a._blocks)===null||o===void 0?void 0:o[c]})),d=g.skip;if(s.aggregate(g),d||g.rawInserted)break}return s}extractTail(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length;const i=new la;return r===n||this._forEachBlocksInRange(r,n,(s,a,o,c)=>{const u=s.extractTail(o,c);u.stop=this._findStopBefore(a),u.from=this._blockStartPos(a),u instanceof la&&(u.blockIndex=a),i.extend(u)}),i}extractInput(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(r===n)return"";let s="";return this._forEachBlocksInRange(r,n,(a,o,c,u)=>{s+=a.extractInput(c,u,i)}),s}_findStopBefore(r){let n;for(let i=0;i<this._stops.length;++i){const s=this._stops[i];if(s<=r)n=s;else break}return n}_appendPlaceholder(r){const n=new ir;if(this.lazy&&r==null)return n;const i=this._mapPosToBlock(this.value.length);if(!i)return n;const s=i.index,a=r??this._blocks.length;return this._blocks.slice(s,a).forEach(o=>{if(!o.lazy||r!=null){const c=o._blocks!=null?[o._blocks.length]:[],u=o._appendPlaceholder(...c);this._value+=u.inserted,n.aggregate(u)}}),n}_mapPosToBlock(r){let n="";for(let i=0;i<this._blocks.length;++i){const s=this._blocks[i],a=n.length;if(n+=s.value,r<=n.length)return{index:i,offset:r-a}}}_blockStartPos(r){return this._blocks.slice(0,r).reduce((n,i)=>n+=i.value.length,0)}_forEachBlocksInRange(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length,i=arguments.length>2?arguments[2]:void 0;const s=this._mapPosToBlock(r);if(s){const a=this._mapPosToBlock(n),o=a&&s.index===a.index,c=s.offset,u=a&&o?a.offset:this._blocks[s.index].value.length;if(i(this._blocks[s.index],s.index,c,u),a&&!o){for(let g=s.index+1;g<a.index;++g)i(this._blocks[g],g,0,this._blocks[g].value.length);i(this._blocks[a.index],a.index,0,a.offset)}}}remove(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length;const i=super.remove(r,n);return this._forEachBlocksInRange(r,n,(s,a,o,c)=>{i.aggregate(s.remove(o,c))}),i}nearestInputPos(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:It.NONE;if(!this._blocks.length)return 0;const i=new Xw(this,r);if(n===It.NONE)return i.pushRightBeforeInput()||(i.popState(),i.pushLeftBeforeInput())?i.pos:this.value.length;if(n===It.LEFT||n===It.FORCE_LEFT){if(n===It.LEFT){if(i.pushRightBeforeFilled(),i.ok&&i.pos===r)return r;i.popState()}if(i.pushLeftBeforeInput(),i.pushLeftBeforeRequired(),i.pushLeftBeforeFilled(),n===It.LEFT){if(i.pushRightBeforeInput(),i.pushRightBeforeRequired(),i.ok&&i.pos<=r||(i.popState(),i.ok&&i.pos<=r))return i.pos;i.popState()}return i.ok?i.pos:n===It.FORCE_LEFT?0:(i.popState(),i.ok||(i.popState(),i.ok)?i.pos:0)}return n===It.RIGHT||n===It.FORCE_RIGHT?(i.pushRightBeforeInput(),i.pushRightBeforeRequired(),i.pushRightBeforeFilled()?i.pos:n===It.FORCE_RIGHT?this.value.length:(i.popState(),i.ok||(i.popState(),i.ok)?i.pos:this.nearestInputPos(r,It.LEFT))):r}totalInputPositions(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length,i=0;return this._forEachBlocksInRange(r,n,(s,a,o,c)=>{i+=s.totalInputPositions(o,c)}),i}maskedBlock(r){return this.maskedBlocks(r)[0]}maskedBlocks(r){const n=this._maskedBlocks[r];return n?n.map(i=>this._blocks[i]):[]}}An.DEFAULTS={lazy:!0,placeholderChar:"_"},An.STOP_CHAR="`",An.ESCAPE_CHAR="\\",An.InputDefinition=_h,An.FixedDefinition=bh,zt.MaskedPattern=An;class No extends An{get _matchFrom(){return this.maxLength-String(this.from).length}_update(r){r=Object.assign({to:this.to||0,from:this.from||0,maxLength:this.maxLength||0},r);let n=String(r.to).length;r.maxLength!=null&&(n=Math.max(n,r.maxLength)),r.maxLength=n;const i=String(r.from).padStart(n,"0"),s=String(r.to).padStart(n,"0");let a=0;for(;a<s.length&&s[a]===i[a];)++a;r.mask=s.slice(0,a).replace(/0/g,"\\0")+"0".repeat(n-a),super._update(r)}get isComplete(){return super.isComplete&&!!this.value}boundaries(r){let n="",i="";const[,s,a]=r.match(/^(\D*)(\d*)(\D*)/)||[];return a&&(n="0".repeat(s.length)+a,i="9".repeat(s.length)+a),n=n.padEnd(this.maxLength,"0"),i=i.padEnd(this.maxLength,"9"),[n,i]}doPrepare(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i;if([r,i]=Cs(super.doPrepare(r.replace(/\D/g,""),n)),!this.autofix||!r)return r;const s=String(this.from).padStart(this.maxLength,"0"),a=String(this.to).padStart(this.maxLength,"0");let o=this.value+r;if(o.length>this.maxLength)return"";const[c,u]=this.boundaries(o);return Number(u)<this.from?s[o.length-1]:Number(c)>this.to?this.autofix==="pad"&&o.length<this.maxLength?["",i.aggregate(this.append(s[o.length-1]+r,n))]:a[o.length-1]:r}doValidate(){const r=this.value;if(r.search(/[^0]/)===-1&&r.length<=this._matchFrom)return!0;const[i,s]=this.boundaries(r);return this.from<=Number(s)&&Number(i)<=this.to&&super.doValidate(...arguments)}}zt.MaskedRange=No;class Ua extends An{constructor(r){super(Object.assign({},Ua.DEFAULTS,r))}_update(r){r.mask===Date&&delete r.mask,r.pattern&&(r.mask=r.pattern);const n=r.blocks;r.blocks=Object.assign({},Ua.GET_DEFAULT_BLOCKS()),r.min&&(r.blocks.Y.from=r.min.getFullYear()),r.max&&(r.blocks.Y.to=r.max.getFullYear()),r.min&&r.max&&r.blocks.Y.from===r.blocks.Y.to&&(r.blocks.m.from=r.min.getMonth()+1,r.blocks.m.to=r.max.getMonth()+1,r.blocks.m.from===r.blocks.m.to&&(r.blocks.d.from=r.min.getDate(),r.blocks.d.to=r.max.getDate())),Object.assign(r.blocks,this.blocks,n),Object.keys(r.blocks).forEach(i=>{const s=r.blocks[i];!("autofix"in s)&&"autofix"in r&&(s.autofix=r.autofix)}),super._update(r)}doValidate(){const r=this.date;return super.doValidate(...arguments)&&(!this.isComplete||this.isDateExist(this.value)&&r!=null&&(this.min==null||this.min<=r)&&(this.max==null||r<=this.max))}isDateExist(r){return this.format(this.parse(r,this),this).indexOf(r)>=0}get date(){return this.typedValue}set date(r){this.typedValue=r}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(r){super.typedValue=r}maskEquals(r){return r===Date||super.maskEquals(r)}}Ua.DEFAULTS={pattern:"d{.}`m{.}`Y",format:e=>{if(!e)return"";const r=String(e.getDate()).padStart(2,"0"),n=String(e.getMonth()+1).padStart(2,"0"),i=e.getFullYear();return[r,n,i].join(".")},parse:e=>{const[r,n,i]=e.split(".");return new Date(i,n-1,r)}},Ua.GET_DEFAULT_BLOCKS=()=>({d:{mask:No,from:1,to:31,maxLength:2},m:{mask:No,from:1,to:12,maxLength:2},Y:{mask:No,from:1900,to:9999}}),zt.MaskedDate=Ua;class hu{get selectionStart(){let r;try{r=this._unsafeSelectionStart}catch{}return r??this.value.length}get selectionEnd(){let r;try{r=this._unsafeSelectionEnd}catch{}return r??this.value.length}select(r,n){if(!(r==null||n==null||r===this.selectionStart&&n===this.selectionEnd))try{this._unsafeSelect(r,n)}catch{}}_unsafeSelect(r,n){}get isActive(){return!1}bindEvents(r){}unbindEvents(){}}zt.MaskElement=hu;class Ba extends hu{constructor(r){super(),this.input=r,this._handlers={}}get rootElement(){var r,n,i;return(r=(n=(i=this.input).getRootNode)===null||n===void 0?void 0:n.call(i))!==null&&r!==void 0?r:document}get isActive(){return this.input===this.rootElement.activeElement}get _unsafeSelectionStart(){return this.input.selectionStart}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(r,n){this.input.setSelectionRange(r,n)}get value(){return this.input.value}set value(r){this.input.value=r}bindEvents(r){Object.keys(r).forEach(n=>this._toggleEventHandler(Ba.EVENTS_MAP[n],r[n]))}unbindEvents(){Object.keys(this._handlers).forEach(r=>this._toggleEventHandler(r))}_toggleEventHandler(r,n){this._handlers[r]&&(this.input.removeEventListener(r,this._handlers[r]),delete this._handlers[r]),n&&(this.input.addEventListener(r,n),this._handlers[r]=n)}}Ba.EVENTS_MAP={selectionChange:"keydown",input:"input",drop:"drop",click:"click",focus:"focus",commit:"blur"},zt.HTMLMaskElement=Ba;class yh extends Ba{get _unsafeSelectionStart(){const r=this.rootElement,n=r.getSelection&&r.getSelection(),i=n&&n.anchorOffset,s=n&&n.focusOffset;return s==null||i==null||i<s?i:s}get _unsafeSelectionEnd(){const r=this.rootElement,n=r.getSelection&&r.getSelection(),i=n&&n.anchorOffset,s=n&&n.focusOffset;return s==null||i==null||i>s?i:s}_unsafeSelect(r,n){if(!this.rootElement.createRange)return;const i=this.rootElement.createRange();i.setStart(this.input.firstChild||this.input,r),i.setEnd(this.input.lastChild||this.input,n);const s=this.rootElement,a=s.getSelection&&s.getSelection();a&&(a.removeAllRanges(),a.addRange(i))}get value(){return this.input.textContent}set value(r){this.input.textContent=r}}zt.HTMLContenteditableMaskElement=yh;const Jw=["mask"];class $w{constructor(r,n){this.el=r instanceof hu?r:r.isContentEditable&&r.tagName!=="INPUT"&&r.tagName!=="TEXTAREA"?new yh(r):new Ba(r),this.masked=oa(n),this._listeners={},this._value="",this._unmaskedValue="",this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}get mask(){return this.masked.mask}maskEquals(r){var n;return r==null||((n=this.masked)===null||n===void 0?void 0:n.maskEquals(r))}set mask(r){if(this.maskEquals(r))return;if(!(r instanceof zt.Masked)&&this.masked.constructor===mh(r)){this.masked.updateOptions({mask:r});return}const n=oa({mask:r});n.unmaskedValue=this.masked.unmaskedValue,this.masked=n}get value(){return this._value}set value(r){this.value!==r&&(this.masked.value=r,this.updateControl(),this.alignCursor())}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(r){this.unmaskedValue!==r&&(this.masked.unmaskedValue=r,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(r){this.masked.typedValueEquals(r)||(this.masked.typedValue=r,this.updateControl(),this.alignCursor())}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(r){for(var n=arguments.length,i=new Array(n>1?n-1:0),s=1;s<n;s++)i[s-1]=arguments[s];const a=this._listeners[r];a&&a.forEach(o=>o(...i))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(r){!this.el||!this.el.isActive||(this.el.select(r,r),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value}updateControl(){const r=this.masked.unmaskedValue,n=this.masked.value,i=this.displayValue,s=this.unmaskedValue!==r||this.value!==n;this._unmaskedValue=r,this._value=n,this.el.value!==i&&(this.el.value=i),s&&this._fireChangeEvents()}updateOptions(r){const{mask:n}=r,i=Fa(r,Jw),s=!this.maskEquals(n),a=!Mo(this.masked,i);s&&(this.mask=n),a&&this.masked.updateOptions(i),(s||a)&&this.updateControl()}updateCursor(r){r!=null&&(this.cursorPos=r,this._delayUpdateCursor(r))}_delayUpdateCursor(r){this._abortUpdateCursor(),this._changingCursorPos=r,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,It.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(r,n){return this._listeners[r]||(this._listeners[r]=[]),this._listeners[r].push(n),this}off(r,n){if(!this._listeners[r])return this;if(!n)return delete this._listeners[r],this;const i=this._listeners[r].indexOf(n);return i>=0&&this._listeners[r].splice(i,1),this}_onInput(r){if(this._inputEvent=r,this._abortUpdateCursor(),!this._selection)return this.updateValue();const n=new qw(this.el.value,this.cursorPos,this.displayValue,this._selection),i=this.masked.rawInputValue,s=this.masked.splice(n.startChangePos,n.removed.length,n.inserted,n.removeDirection,{input:!0,raw:!0}).offset,a=i===this.masked.rawInputValue?n.removeDirection:It.NONE;let o=this.masked.nearestInputPos(n.startChangePos+s,a);a!==It.NONE&&(o=this.masked.nearestInputPos(o,It.NONE)),this.updateControl(),this.updateCursor(o),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(r){r.preventDefault(),r.stopPropagation()}_onFocus(r){this.alignCursorFriendly()}_onClick(r){this.alignCursorFriendly()}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}zt.InputMask=$w;class eE extends An{_update(r){r.enum&&(r.mask="*".repeat(r.enum[0].length)),super._update(r)}doValidate(){return this.enum.some(r=>r.indexOf(this.unmaskedValue)>=0)&&super.doValidate(...arguments)}}zt.MaskedEnum=eE;class Ln extends mn{constructor(r){super(Object.assign({},Ln.DEFAULTS,r))}_update(r){super._update(r),this._updateRegExps()}_updateRegExps(){let r="^"+(this.allowNegative?"[+|\\-]?":""),n="\\d*",i=(this.scale?"(".concat(fu(this.radix),"\\d{0,").concat(this.scale,"})?"):"")+"$";this._numberRegExp=new RegExp(r+n+i),this._mapToRadixRegExp=new RegExp("[".concat(this.mapToRadix.map(fu).join(""),"]"),"g"),this._thousandsSeparatorRegExp=new RegExp(fu(this.thousandsSeparator),"g")}_removeThousandsSeparators(r){return r.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(r){const n=r.split(this.radix);return n[0]=n[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),n.join(this.radix)}doPrepare(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};r=this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(n.input&&n.raw||!n.input&&!n.raw)?r.replace(this._mapToRadixRegExp,this.radix):r);const[i,s]=Cs(super.doPrepare(r,n));return r&&!i&&(s.skip=!0),[i,s]}_separatorsCount(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=0;for(let s=0;s<r;++s)this._value.indexOf(this.thousandsSeparator,s)===s&&(++i,n&&(r+=this.thousandsSeparator.length));return i}_separatorsCountFromSlice(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this._value;return this._separatorsCount(this._removeThousandsSeparators(r).length,!0)}extractInput(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length,i=arguments.length>2?arguments[2]:void 0;return[r,n]=this._adjustRangeWithSeparators(r,n),this._removeThousandsSeparators(super.extractInput(r,n,i))}_appendCharRaw(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.thousandsSeparator)return super._appendCharRaw(r,n);const i=n.tail&&n._beforeTailState?n._beforeTailState._value:this._value,s=this._separatorsCountFromSlice(i);this._value=this._removeThousandsSeparators(this.value);const a=super._appendCharRaw(r,n);this._value=this._insertThousandsSeparators(this._value);const o=n.tail&&n._beforeTailState?n._beforeTailState._value:this._value,c=this._separatorsCountFromSlice(o);return a.tailShift+=(c-s)*this.thousandsSeparator.length,a.skip=!a.rawInserted&&r===this.thousandsSeparator,a}_findSeparatorAround(r){if(this.thousandsSeparator){const n=r-this.thousandsSeparator.length+1,i=this.value.indexOf(this.thousandsSeparator,n);if(i<=r)return i}return-1}_adjustRangeWithSeparators(r,n){const i=this._findSeparatorAround(r);i>=0&&(r=i);const s=this._findSeparatorAround(n);return s>=0&&(n=s+this.thousandsSeparator.length),[r,n]}remove(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length;[r,n]=this._adjustRangeWithSeparators(r,n);const i=this.value.slice(0,r),s=this.value.slice(n),a=this._separatorsCount(i.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(i+s));const o=this._separatorsCountFromSlice(i);return new ir({tailShift:(o-a)*this.thousandsSeparator.length})}nearestInputPos(r,n){if(!this.thousandsSeparator)return r;switch(n){case It.NONE:case It.LEFT:case It.FORCE_LEFT:{const i=this._findSeparatorAround(r-1);if(i>=0){const s=i+this.thousandsSeparator.length;if(r<s||this.value.length<=s||n===It.FORCE_LEFT)return i}break}case It.RIGHT:case It.FORCE_RIGHT:{const i=this._findSeparatorAround(r);if(i>=0)return i+this.thousandsSeparator.length}}return r}doValidate(r){let n=!!this._removeThousandsSeparators(this.value).match(this._numberRegExp);if(n){const i=this.number;n=n&&!isNaN(i)&&(this.min==null||this.min>=0||this.min<=this.number)&&(this.max==null||this.max<=0||this.number<=this.max)}return n&&super.doValidate(r)}doCommit(){if(this.value){const r=this.number;let n=r;this.min!=null&&(n=Math.max(n,this.min)),this.max!=null&&(n=Math.min(n,this.max)),n!==r&&(this.unmaskedValue=this.doFormat(n));let i=this.value;this.normalizeZeros&&(i=this._normalizeZeros(i)),this.padFractionalZeros&&this.scale>0&&(i=this._padFractionalZeros(i)),this._value=i}super.doCommit()}_normalizeZeros(r){const n=this._removeThousandsSeparators(r).split(this.radix);return n[0]=n[0].replace(/^(\D*)(0*)(\d*)/,(i,s,a,o)=>s+o),r.length&&!/\d$/.test(n[0])&&(n[0]=n[0]+"0"),n.length>1&&(n[1]=n[1].replace(/0*$/,""),n[1].length||(n.length=1)),this._insertThousandsSeparators(n.join(this.radix))}_padFractionalZeros(r){if(!r)return r;const n=r.split(this.radix);return n.length<2&&n.push(""),n[1]=n[1].padEnd(this.scale,"0"),n.join(this.radix)}doSkipInvalid(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;const s=this.scale===0&&r!==this.thousandsSeparator&&(r===this.radix||r===Ln.UNMASKED_RADIX||this.mapToRadix.includes(r));return super.doSkipInvalid(r,n,i)&&!s}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,Ln.UNMASKED_RADIX)}set unmaskedValue(r){super.unmaskedValue=r}get typedValue(){return this.doParse(this.unmaskedValue)}set typedValue(r){this.rawInputValue=this.doFormat(r).replace(Ln.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(r){this.typedValue=r}get allowNegative(){return this.signed||this.min!=null&&this.min<0||this.max!=null&&this.max<0}typedValueEquals(r){return(super.typedValueEquals(r)||Ln.EMPTY_VALUES.includes(r)&&Ln.EMPTY_VALUES.includes(this.typedValue))&&!(r===0&&this.value==="")}}Ln.UNMASKED_RADIX=".",Ln.DEFAULTS={radix:",",thousandsSeparator:"",mapToRadix:[Ln.UNMASKED_RADIX],scale:2,signed:!1,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:e=>e.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})},Ln.EMPTY_VALUES=[...mn.EMPTY_VALUES,0],zt.MaskedNumber=Ln;class tE extends mn{_update(r){r.mask&&(r.validate=r.mask),super._update(r)}}zt.MaskedFunction=tE;const rE=["compiledMasks","currentMaskRef","currentMask"],nE=["mask"];class Lo extends mn{constructor(r){super(Object.assign({},Lo.DEFAULTS,r)),this.currentMask=null}_update(r){super._update(r),"mask"in r&&(this.compiledMasks=Array.isArray(r.mask)?r.mask.map(n=>oa(n)):[])}_appendCharRaw(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=this._applyDispatch(r,n);return this.currentMask&&i.aggregate(this.currentMask._appendChar(r,this.currentMaskFlags(n))),i}_applyDispatch(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"";const s=n.tail&&n._beforeTailState!=null?n._beforeTailState._value:this.value,a=this.rawInputValue,o=n.tail&&n._beforeTailState!=null?n._beforeTailState._rawInputValue:a,c=a.slice(o.length),u=this.currentMask,g=new ir,d=u==null?void 0:u.state;if(this.currentMask=this.doDispatch(r,Object.assign({},n),i),this.currentMask)if(this.currentMask!==u){if(this.currentMask.reset(),o){const p=this.currentMask.append(o,{raw:!0});g.tailShift=p.inserted.length-s.length}c&&(g.tailShift+=this.currentMask.append(c,{raw:!0,tail:!0}).tailShift)}else this.currentMask.state=d;return g}_appendPlaceholder(){const r=this._applyDispatch(...arguments);return this.currentMask&&r.aggregate(this.currentMask._appendPlaceholder()),r}_appendEager(){const r=this._applyDispatch(...arguments);return this.currentMask&&r.aggregate(this.currentMask._appendEager()),r}appendTail(r){const n=new ir;return r&&n.aggregate(this._applyDispatch("",{},r)),n.aggregate(this.currentMask?this.currentMask.appendTail(r):super.appendTail(r))}currentMaskFlags(r){var n,i;return Object.assign({},r,{_beforeTailState:((n=r._beforeTailState)===null||n===void 0?void 0:n.currentMaskRef)===this.currentMask&&((i=r._beforeTailState)===null||i===void 0?void 0:i.currentMask)||r._beforeTailState})}doDispatch(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"";return this.dispatch(r,this,n,i)}doValidate(r){return super.doValidate(r)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(r)))}doPrepare(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},[i,s]=Cs(super.doPrepare(r,n));if(this.currentMask){let a;[i,a]=Cs(super.doPrepare(i,this.currentMaskFlags(n))),s=s.aggregate(a)}return[i,s]}reset(){var r;(r=this.currentMask)===null||r===void 0||r.reset(),this.compiledMasks.forEach(n=>n.reset())}get value(){return this.currentMask?this.currentMask.value:""}set value(r){super.value=r}get unmaskedValue(){return this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(r){super.unmaskedValue=r}get typedValue(){return this.currentMask?this.currentMask.typedValue:""}set typedValue(r){let n=String(r);this.currentMask&&(this.currentMask.typedValue=r,n=this.currentMask.unmaskedValue),this.unmaskedValue=n}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var r;return!!(!((r=this.currentMask)===null||r===void 0)&&r.isComplete)}get isFilled(){var r;return!!(!((r=this.currentMask)===null||r===void 0)&&r.isFilled)}remove(){const r=new ir;return this.currentMask&&r.aggregate(this.currentMask.remove(...arguments)).aggregate(this._applyDispatch()),r}get state(){var r;return Object.assign({},super.state,{_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(n=>n.state),currentMaskRef:this.currentMask,currentMask:(r=this.currentMask)===null||r===void 0?void 0:r.state})}set state(r){const{compiledMasks:n,currentMaskRef:i,currentMask:s}=r,a=Fa(r,rE);this.compiledMasks.forEach((o,c)=>o.state=n[c]),i!=null&&(this.currentMask=i,this.currentMask.state=s),super.state=a}extractInput(){return this.currentMask?this.currentMask.extractInput(...arguments):""}extractTail(){return this.currentMask?this.currentMask.extractTail(...arguments):super.extractTail(...arguments)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(){return this.currentMask?this.currentMask.nearestInputPos(...arguments):super.nearestInputPos(...arguments)}get overwrite(){return this.currentMask?this.currentMask.overwrite:super.overwrite}set overwrite(r){console.warn('"overwrite" option is not available in dynamic mask, use this option in siblings')}get eager(){return this.currentMask?this.currentMask.eager:super.eager}set eager(r){console.warn('"eager" option is not available in dynamic mask, use this option in siblings')}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:super.skipInvalid}set skipInvalid(r){(this.isInitialized||r!==mn.DEFAULTS.skipInvalid)&&console.warn('"skipInvalid" option is not available in dynamic mask, use this option in siblings')}maskEquals(r){return Array.isArray(r)&&this.compiledMasks.every((n,i)=>{if(!r[i])return;const s=r[i],{mask:a}=s,o=Fa(s,nE);return Mo(n,o)&&n.maskEquals(a)})}typedValueEquals(r){var n;return!!(!((n=this.currentMask)===null||n===void 0)&&n.typedValueEquals(r))}}Lo.DEFAULTS={dispatch:(e,r,n,i)=>{if(!r.compiledMasks.length)return;const s=r.rawInputValue,a=r.compiledMasks.map((o,c)=>{const u=r.currentMask===o,g=u?o.value.length:o.nearestInputPos(o.value.length,It.FORCE_LEFT);return o.rawInputValue!==s?(o.reset(),o.append(s,{raw:!0})):u||o.remove(g),o.append(e,r.currentMaskFlags(n)),o.appendTail(i),{index:c,weight:o.rawInputValue.length,totalInputPositions:o.totalInputPositions(0,Math.max(g,o.nearestInputPos(o.value.length,It.FORCE_LEFT)))}});return a.sort((o,c)=>c.weight-o.weight||c.totalInputPositions-o.totalInputPositions),r.compiledMasks[a[0].index]}},zt.MaskedDynamic=Lo;const gu={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function wh(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:gu.MASKED,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:gu.MASKED;const i=oa(e);return s=>i.runIsolated(a=>(a[r]=s,a[n]))}function iE(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return wh(...n)(e)}zt.PIPE_TYPE=gu,zt.createPipe=wh,zt.pipe=iE;try{globalThis.IMask=zt}catch{}var aE=U("<i></i>"),sE=U('<i class="ri-close-line clearIcon"></i>'),oE=U('<input tabindex="0"/> <!>',1),lE=U("<div><span> </span></div>"),uE=U("<div><!> <!></div>");function cE(e,r){kt(r,!1);const n=()=>Be(R(),"$cellState",i),[i,s]=Gt(),a=h(),o=h(),c=h(),u=h(),g=we.createEventDispatcher();let d=m(r,"value",8),p=m(r,"cellOptions",24,()=>({role:"formInput",initialState:"Editing",debounce:250,placeholder:""})),_=m(r,"autofocus",8),S=m(r,"mask",8,""),E,A=h(),I=h(d()),k=h(!1),C=h(!1),D,w=h();function B(Q){if(!S()||!Q)return Q;const Y=zt.createMask({mask:S()});return Y.unmaskedValue=Q,Y.value}function $(){if(!S()){l(C,!1);return}if(!t(I)){l(C,!1);return}const Q=zt.createMask({mask:S()});Q.resolve(t(I)),l(C,Q.isComplete)}let R=m(r,"cellState",24,()=>{var Q;return sr(((Q=p())==null?void 0:Q.initialState)??"View",{"*":{reset(Y){l(I,d()),$(),D&&(D.unmaskedValue=t(I)||""),!S()&&t(w)&&Ht(w,t(w).value=t(I)||"")}},View:{_enter(){l(I,d()),$()},focus(){if(!p().readonly&&!p().disabled)return"Editing"}},Editing:{_enter(){l(A,d()),l(I,d()),l(k,!1),$(),g("enteredit"),D&&(D.unmaskedValue=t(I)||""),!S()&&t(w)&&Ht(w,t(w).value=t(I)||"")},_exit(){l(A,void 0),g("exitedit"),g("focusout")},clear(){l(I,null),$(),l(k,t(A)!==t(I)),t(w)&&Ht(w,t(w).value=t(I))},focusout(Y){this.submit()},submit(){if(t(k)){if(S()&&t(I)&&!t(C))return l(I,t(A)),"View";g("change",t(I))}return"View"},cancel(){return l(I,t(A)),$(),l(k,!1),g("cancel"),D&&(D.unmaskedValue=t(I)),!S()&&t(w)&&Ht(w,t(w).value=t(I)),"View"},handleKeyboard(Y){var K;if(!Y)return;l(k,t(A)!==t(I));const J=["Backspace","Delete","Enter","Escape","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"];if(t(C)&&!J.includes(Y.key)&&Y.key.length===1){Y.preventDefault();return}if(Y.key=="Enter"&&this.submit(),Y.key=="Escape"&&this.cancel(),Y.key.length===1&&S()){const ie=zt.createMask({mask:S()});if((t(I)||"").length,(((K=ie.blocks[0])==null?void 0:K.placeholder)||(ie.mask.includes("0")?"0":null))==="0"&&!/\d/.test(Y.key)){Y.preventDefault();return}}}}})});const H=Q=>{Q==null||Q.focus()};we.onMount(()=>{_()&&setTimeout(()=>{R().focus()},50)}),we.onDestroy(()=>{clearTimeout(E),R().reset()});function Z(Q,Y){if(!Y){const J=K=>{l(I,Q.value)};return Q.addEventListener("input",J),Q.value=t(I)||"",{destroy(){Q.removeEventListener("input",J)}}}return D=zt(Q,{mask:Y}),D.unmaskedValue=t(I)||"",D.on("accept",()=>{l(I,D.unmaskedValue),$()}),D.on("complete",()=>{l(C,!0)}),{destroy(){D&&D.destroy()}}}x(()=>n(),()=>{l(a,n()=="Editing")}),x(()=>(t(A),t(I)),()=>{l(k,t(A)!==t(I))}),x(()=>(v(p()),v(S())),()=>{var Q;l(o,(Q=p())!=null&&Q.placeholder?p().placeholder:S())}),x(()=>v(p()),()=>{var Q;l(c,(Q=p())==null?void 0:Q.error)}),x(()=>(t(c),v(p())),()=>{var Q;l(u,t(c)?"ph ph-warning":(Q=p())==null?void 0:Q.icon)}),x(()=>(v(R()),v(d())),()=>{R().reset(d())}),Pt(),Ot();var ue=uE();let de,Se;var ce=j(ue);{var ke=Q=>{var Y=aE();let J;Ce(()=>J=Pe(Y,1,t(u)+" field-icon",null,J,{"with-error":t(c)})),y(Q,Y)};oe(ce,Q=>{t(u)&&Q(ke)})}var De=Ee(ce,2);{var ye=Q=>{var Y=oE(),J=Ue(Y);let K,ie;ht(J,O=>l(w,O),()=>t(w)),Ut(()=>W("focusout",J,function(...O){var G;(G=R().focusout)==null||G.apply(this,O)})),Ut(()=>W("keydown",J,function(...O){var G;(G=R().handleKeyboard)==null||G.apply(this,O)})),zr(J,O=>H==null?void 0:H(O)),zr(J,(O,G)=>Z==null?void 0:Z(O,G),S);var z=Ee(J,2);{var ge=O=>{var G=sE();W("mousedown",G,cs($t(function(...re){var ae;(ae=R().clear)==null||ae.apply(this,re)}))),y(O,G)};oe(z,O=>{t(I),v(p()),b(()=>{var G;return t(I)&&((G=p())==null?void 0:G.clearIcon)!==!1})&&O(ge)})}Ce(()=>{K=Pe(J,1,"editor",null,K,{"with-icon":p().icon}),Lt(J,"placeholder",t(o)),ie=We(J,"",ie,{color:(t(C),v(p()),b(()=>t(C)?p().color:"var(--spectrum-global-color-gray-700)")),"text-align":(v(p()),b(()=>p().align=="center"?"center":p().align=="flex-end"?"right":"left")),"padding-right":(v(p()),b(()=>p().align!="flex-start"?"2rem":"0.75rem"))})}),y(Q,Y)},le=Q=>{var Y=lE();let J,K;var ie=j(Y),z=j(ie);Ce(ge=>{J=Pe(Y,1,"value",null,J,{"with-icon":p().icon,placeholder:!d()}),Lt(Y,"tabindex",(v(p()),b(()=>p().readonly||p().disabled?"-1":"0"))),K=We(Y,"",K,{"justify-content":(v(p()),b(()=>p().align))}),Xe(z,ge)},[()=>(t(I),t(o),b(()=>B(t(I))||t(o)))]),W("focusin",Y,function(...ge){var O;(O=R().focus)==null||O.apply(this,ge)}),y(Q,Y)};oe(De,Q=>{t(a)?Q(ye):Q(le,!1)})}Ce(()=>{de=Pe(ue,1,"superCell",null,de,{inEdit:t(a),isDirty:t(k)&&p().showDirty,focused:t(a),inline:p().role=="inlineInput",tableCell:p().role=="tableCell",formInput:p().role=="formInput",disabled:p().disabled,readonly:p().readonly,error:p().error||t(I)&&S()&&!t(C),complete:t(C)}),Se=We(ue,"",Se,{color:(v(p()),b(()=>p().color)),background:(n(),v(p()),b(()=>n()=="Editing"&&p().role!="inline"?"var(--spectrum-global-color-gray-50)":p().background)),"font-weight":(v(p()),b(()=>p().fontWeight))})}),y(e,ue),Dt(),s()}var dE=U("<span> </span>"),fE=U('<i class="ph ph-x svelte-1nqvnqd"></i>'),hE=U('<div class="tag svelte-1nqvnqd"><span class="tag-wrap svelte-1nqvnqd"><span> </span></span> <!></div>'),gE=U('<i class="ph ph-plus actionIcon svelte-1nqvnqd"></i>'),vE=U('<div class="option loading svelte-1nqvnqd"><i class="ri-loader-2-line rotating svelte-1nqvnqd"></i> Loading...</div>'),pE=U('<i class="ri-checkbox-blank-fill svelte-1nqvnqd"></i>'),mE=U('<div><span class="svelte-1nqvnqd"><!> </span></div>'),_E=U('<div class="option loading svelte-1nqvnqd"><i class="ri-loader-2-line rotating svelte-1nqvnqd"></i> Loading more...</div>'),bE=U("<!> <!>",1),yE=U('<div class="option not-found svelte-1nqvnqd"><span class="svelte-1nqvnqd"><i class="ri-close-line svelte-1nqvnqd"></i> No matches found, Tag will be added as new</span></div>'),wE=U('<div class="options svelte-1nqvnqd"><!></div>'),EE=U('<div class="editor" tabindex="-1"><div class="searchControl svelte-1nqvnqd"><i></i> <input type="text" class="searchInput svelte-1nqvnqd"/></div> <!></div>'),SE=U('<div><div tabindex="-1"><!> <div class="tags svelte-1nqvnqd" tabindex="-1"><!> <!></div></div></div> <!>',1);function CE(e,r){var it;kt(r,!1);const n=()=>Be(q,"$dataSourceStore",u),i=()=>Be(t(B),"$fetch",u),s=()=>Be(he(),"$cellState",u),a=()=>Be(K,"$options",u),o=()=>Be(V,"$colors",u),c=()=>Be(P,"$editorState",u),[u,g]=Gt(),d=h(),p=h(),_=h(),S=h(),E=h(),A=h(),I=h(),k=h(),C=h(),D=h(),w=h(),B=h(),$=h(),R=h(),H=h(),Z=h(),ue=we.createEventDispatcher(),{API:de,QueryUtils:Se,fetchData:ce,memo:ke,derivedMemo:De}=we.getContext("sdk");let ye=m(r,"cellOptions",8),le=m(r,"value",8),Q=m(r,"autofocus",8),Y=h(),J=h(),K=ke([]),ie={},z=h([]),ge=h(-1),O,G=h(),re=h(30),ae=h(!0),ee=h(le()?[...le()]:[]),pe,Ne=h(""),He=h();const me=_e=>{if(!_e||!_e.length)return;const qe=new Set((t(ee)||[]).map(ot=>String(ot||"").toLowerCase().trim())),Ye=[];_e.forEach(ot=>{const Te=String(ot||"").trim();Te&&!qe.has(Te.toLowerCase())&&(Ye.push(Te),qe.add(Te.toLowerCase()))}),Ye.length&&(l(ee,[...t(ee)||[],...Ye]),he().change())},V=De(K,_e=>{let qe={};return _e.forEach((Ye,ot)=>qe[Ye]=ie[Ye]??fe[ot%14]),qe}),fe=["hsla(358, 95%, 80%, 0.35)","hsla(22, 90%, 78%, 0.35)","hsla(45, 85%, 76%, 0.35)","hsla(110, 90%, 75%, 0.35)","hsla(175, 95%, 70%, 0.35)","hsla(205, 100%, 65%, 0.35)","hsla(245, 95%, 75%, 0.35)","hsla(310, 90%, 80%, 0.35)","hsla(15, 80%, 75%, 0.35)","hsla(60, 85%, 72%, 0.35)","hsla(135, 95%, 70%, 0.35)","hsla(190, 90%, 75%, 0.35)","hsla(260, 85%, 78%, 0.35)","hsla(330, 95%, 76%, 0.35)"];let X=h(JSON.stringify(Array.isArray(le())?le():le()?[le()]:[]));const q=ke(((it=ye())==null?void 0:it.datasource)??{});let he=m(r,"cellState",24,()=>sr("Loading",{"*":{goTo(_e){return _e},refresh(){return Qe(K,[]),"Loading"},loadDataOptions(_e){if(t(te)){if(_e&&_e.length){const qe=_e.map(Ye=>Ye[t(_)]);Qe(K,[...a(),...qe])}l(te,!1)}else Qe(K,[]),_e&&_e.length&&_e.forEach(qe=>{a().push(qe[t(_)])});Qe(K,a()),l(z,a()),t(ae)&&l(ae,!1)},loadCustomOptions(){var _e;(_e=t(S))!=null&&_e.length&&t(S).forEach(qe=>{a().push(qe.value||qe)}),Qe(K,a())},clearFilters(){l(z,a())},reset(_e){l(ee,[..._e]),l(X,JSON.stringify(t(ee)))}},Loading:{_enter(){var _e;(!t(p)||(_e=i())!=null&&_e.loaded)&&this.goTo.debounce(5,ye().initialState||"View")},_exit(){var _e;ye().suggestions?this.loadDataOptions((_e=i())==null?void 0:_e.rows):ye().optionsSource=="custom"&&this.loadCustomOptions(),l(z,a())},syncFetch(_e){if(_e!=null&&_e.loaded)return ye().initialState||"View"}},View:{_enter(){},focus(_e){if(!ye().readonly&&!ye().disabled)return"Editing"}},Editing:{_enter(){l(X,JSON.stringify(Array.isArray(le())?le():le()?[le()]:[])),this.clearFilters(),P.open(),ue("enteredit")},_exit(){P.close(),ue("exitedit")},focus(){var _e;(_e=t(Y))==null||_e.focus()},focusout(_e){var qe,Ye;(qe=t(Y))!=null&&qe.contains(_e.relatedTarget)||(Ye=t(J))!=null&&Ye.contains(_e.relatedTarget)||this.submit()},change(){ye().debounce&&(clearTimeout(O),O=setTimeout(()=>{ue("change",t(ee))},ye().debounce))},submit(){if(t(H))return ue("change",t(ee)),"View";this.cancel()},clear(){l(ee,[]),this.submit()},cancel(){var _e;return P.close(),l(ee,JSON.parse(t(X))),(_e=t(Y))==null||_e.blur(),"View"}}})),P=sr("Closed",{"*":{close(){return"Closed"},toggleOption(_e){if(!(ye().disabled||ye().readonly))if(typeof _e=="string"){let qe=_e,Ye=t(ee).indexOf(qe);Ye>-1?(t(ee).splice(Ye,1),l(ee,[...t(ee)])):me([qe]),he().change(),T()}else{if(_e<0)return;let qe=t(z)[_e],Ye=t(ee).indexOf(qe);Ye>-1?(t(ee).splice(Ye,1),l(ee,[...t(ee)])):me([qe]),he().change(),T()}}},Open:{_enter(){l(ge,-1),setTimeout(()=>{var _e;return(_e=t(He))==null?void 0:_e.focus()},0),P.filterOptions(t(Ne))},_exit(){if(pe!=null&&pe.trim()&&t(z).length==0){const _e=pe.split(",").map(qe=>qe.trim()).filter(qe=>qe);me(_e)}l(Ne,""),pe=null},filterOptions(_e){var qe;if(_e?pe=_e.trim():pe=null,ye().suggestions){let Ye=[];_e?Ye=[...ye().filter||[],{field:t(_),type:"string",operator:"fuzzy",value:_e,valueType:"Value"}]:Ye=ye().filter||[],l(te,!1),(qe=t(B))==null||qe.update({query:Se.buildQuery(Ye)}),l(z,a())}else _e?l(z,a().filter(Ye=>Ye==null?void 0:Ye.toLocaleLowerCase().startsWith(_e.toLocaleLowerCase()))):l(z,a())},toggle(){return"Closed"},handleInputKeyboard(_e){var qe,Ye;if(_e.key=="Enter"){if(pe!=null&&pe.trim()){const ot=pe.split(",").map(Te=>Te.trim()).filter(Te=>Te);me(ot),pe=null,l(Ne,""),setTimeout(()=>{var Te;return(Te=t(He))==null?void 0:Te.focus()},0)}_e.preventDefault();return}if(_e.key==" "&&t(ge)>-1&&(this.toggleOption(t(ge)),_e.preventDefault()),_e.key=="Tab"){(qe=t(Y))==null||qe.focus(),P.close(),_e.preventDefault();return}if(_e.key=="Escape"){pe=null,P.close(),(Ye=t(Y))==null||Ye.focus(),_e.preventDefault(),_e.stopPropagation();return}_e.key=="ArrowDown"&&this.highlightNext(_e.stopPropagation()),_e.key=="ArrowUp"&&this.highlightPrevious(_e.preventDefault(),_e.stopPropagation()),_e.key=="Escape"&&he().cancel()},handleKeyboard(_e){_e.keyCode==32&&(t(ge)>-1?this.toggleOption(t(ge)):ye().autocomplete||this.close(_e.preventDefault())),_e.key=="Escape"&&he().cancel(),(_e.key=="Enter"||_e.key=="Tab")&&t(ge)>-1&&t(z)[t(ge)]&&this.toggleOption(t(ge)),_e.key=="ArrowDown"&&this.highlightNext(),_e.key=="ArrowUp"&&this.highlightPrevious(_e.preventDefault()),t(d)!="inputSelect"},highlightNext(){l(ge,t(ge)+1),t(ge)>t(z).length-1&&l(ge,0)},highlightPrevious(){l(ge,t(ge)-1),t(ge)<0&&l(ge,t(z).length-1)}},Closed:{toggle(){return"Open"},open(){return"Open"},highlightNext(){this.open(),l(ge,0)},handleInputKeyboard(_e){_e.key=="Escape"&&he().cancel(),_e.key!="Tab"&&(this.open(),l(ge,0))},handleKeyboard(_e){_e.key=="Escape"&&he().cancel(),t(d)=="select"&&_e.key!="Tab"&&((_e.key=="ArrowDown"||_e.keyCode==32)&&this.toggle(),(_e.key=="Backspace"||_e.key=="Delete")&&(l(ee,[]),he().change()))}}}),te=h(!1);const M=()=>{var _e,qe,Ye,ot;(_e=i())!=null&&_e.loading||((Ye=(qe=i())==null?void 0:qe.rows)==null?void 0:Ye.length)<t(re)||(l(te,!0),l(re,t(re)+100),(ot=t(B))==null||ot.update({limit:t(re)}))},T=()=>{var Ye,ot,Te;t(z).filter(Ke=>{var et;return!((et=t(ee))!=null&&et.includes(Ke))}).length<10&&!((Ye=i())!=null&&Ye.loading)&&((Te=(ot=i())==null?void 0:ot.rows)==null?void 0:Te.length)>=t(re)&&M()},N=_e=>{const qe=_e.target,Ye=qe.scrollTop,ot=qe.scrollHeight,Te=qe.clientHeight;Ye+Te>=ot-50&&M()},ne=_e=>{if(t(p))return ce({API:de,datasource:_e,options:{limit:t(re)}})};we.onMount(()=>{Q()&&setTimeout(()=>{he().focus()},30)}),we.onDestroy(()=>{clearTimeout(O)}),x(()=>(t(d),t(p),t(_),t(S),t(E),t(A),t(I),t(k),t(C),t(D),t(w),v(ye())),()=>{(_e=>{l(d,_e.controlType),l(p,_e.suggestions),l(_,_e.valueColumn),l(S,_e.customOptions),l(E,_e.optionsViewMode),l(A,_e.role),l(I,_e.readonly),l(k,_e.disabled),l(C,_e.error),l(D,_e.color),l(w,_e.background)})(ye())}),x(()=>v(ye()),()=>{q.set(ye().datasource)}),x(()=>n(),()=>{on(l(B,ne(n())),"$fetch",u)}),x(()=>v(ye()),()=>{ye().suggestions&&(l(re,15),l(ae,!0),l(te,!1))}),x(()=>v(ye()),()=>{l($,Se.buildQuery(ye().filter))}),x(()=>(t(B),t($),t(re)),()=>{var _e;(_e=t(B))==null||_e.update({query:t($),limit:t(re)})}),x(()=>(v(he()),i()),()=>{he().syncFetch(i())}),x(()=>(v(he()),i()),()=>{var _e;he().loadDataOptions((_e=i())==null?void 0:_e.rows)}),x(()=>(v(he()),v(le())),()=>{he().reset(le())}),x(()=>t(ee),()=>{l(R,t(ee).length<1)}),x(()=>s(),()=>{l(Z,s()=="Editing")}),x(()=>(t(Z),t(X),t(ee)),()=>{l(H,t(Z)&&t(X)!==JSON.stringify(t(ee)))}),x(()=>(t(z),t(p),i()),()=>{var _e;t(z)&&t(p)&&!((_e=i())!=null&&_e.loading)&&setTimeout(()=>T(),0)}),Pt(),Ot();var ve=SE(),Oe=Ue(ve);let Me,Re;var se=j(Oe);let Ie;var Le=j(se);{var je=_e=>{var qe=dE(),Ye=j(qe);Ce(()=>Xe(Ye,(v(ye()),b(()=>ye().placeholder||"Add some Tags")))),y(_e,qe)};oe(Le,_e=>{t(R)&&!t(Z)&&_e(je)})}var Fe=Ee(Le,2);let Ae;var Ge=j(Fe);{var $e=_e=>{var qe=Ze(),Ye=Ue(qe);xt(Ye,1,()=>t(ee),Nt,(ot,Te,Ke)=>{var et=hE();let gt;var pt=j(et),Yt=j(pt),Tt=j(Yt),_t=Ee(pt,2);{var wt=dt=>{var nt=fE();We(nt,"",{},{"font-size":"12px","z-index":2}),W("mousedown",nt,$t(fr(()=>P.toggleOption(t(Te))))),y(dt,nt)};oe(_t,dt=>{t(Z)&&dt(wt)})}Ce(()=>{gt=We(et,"",gt,{"--option-color":(o(),t(Te),b(()=>o()[t(Te)]||fe[Ke%fe.length]))}),Xe(Tt,t(Te))}),y(ot,et)}),y(_e,qe)};oe(Ge,_e=>{t(ee),b(()=>t(ee).length)&&_e($e)})}var Je=Ee(Ge,2);{var rt=_e=>{var qe=gE();W("mouseup",qe,$t(fr(function(...Ye){var ot;(ot=P.toggle)==null||ot.apply(this,Ye)}))),y(_e,qe)};oe(Je,_e=>{t(Z)&&_e(rt)})}ht(Oe,_e=>l(Y,_e),()=>t(Y));var st=Ee(Oe,2);{var ut=_e=>{{let qe=Rt(()=>c()=="Open");Qr(_e,{get anchor(){return t(Y)},useAnchorWidth:!0,maxHeight:250,get open(){return t(qe)},children:(Ye,ot)=>{var Te=EE(),Ke=j(Te),et=j(Ke);let gt;var pt=Ee(et,2);ht(pt,_t=>l(He,_t),()=>t(He));var Yt=Ee(Ke,2);{var Tt=_t=>{var wt=wE(),dt=j(wt);{var nt=at=>{var bt=Ze(),Bt=Ue(bt);{var Ft=yt=>{var tr=vE();y(yt,tr)},Vt=yt=>{var tr=Ze(),or=Ue(tr);{var er=Kt=>{var jt=bE(),gr=Ue(jt);xt(gr,1,()=>t(z),Nt,(Ir,lr,Cr)=>{var _n=Ze(),Fr=Ue(_n);{var yr=un=>{var wr=mE();let Zn,ji;var va=j(wr),di=j(va);{var Fn=cn=>{var $r=pE();y(cn,$r)};oe(di,cn=>{v(ye()),b(()=>ye().optionsViewMode!=="text")&&cn(Fn)})}var bn=Ee(di);Ce(()=>{Zn=Pe(wr,1,"option svelte-1nqvnqd",null,Zn,{text:t(E)=="text",focused:t(ge)===Cr}),ji=We(wr,"",ji,{"--option-color":(o(),t(lr),b(()=>o()[t(lr)]))}),Xe(bn,` ${t(lr)??""}`)}),W("mousedown",wr,$t(cn=>P.toggleOption(Cr))),W("mouseenter",wr,()=>l(ge,Cr)),y(un,wr)};oe(Fr,un=>{t(ee),t(lr),b(()=>{var wr;return!((wr=t(ee))!=null&&wr.includes(t(lr)))})&&un(yr)})}y(Ir,_n)});var pr=Ee(gr,2);{var br=Ir=>{var lr=_E();y(Ir,lr)};oe(pr,Ir=>{i(),b(()=>{var lr;return(lr=i())==null?void 0:lr.loading})&&Ir(br)})}y(Kt,jt)},rr=Kt=>{var jt=yE();y(Kt,jt)};oe(or,Kt=>{t(z),b(()=>{var jt;return(jt=t(z))==null?void 0:jt.length})?Kt(er):Kt(rr,!1)},!0)}y(yt,tr)};oe(Bt,yt=>{i(),b(()=>{var tr,or,er;return((tr=i())==null?void 0:tr.loading)&&!((er=(or=i())==null?void 0:or.rows)!=null&&er.length)})?yt(Ft):yt(Vt,!1)})}y(at,bt)};oe(dt,at=>{t(p)&&at(nt)})}ht(wt,at=>l(G,at),()=>t(G)),W("wheel",wt,at=>at.stopPropagation()),W("mouseleave",wt,()=>l(ge,-1)),W("scroll",wt,function(...at){var bt;(bt=t(p)?N:null)==null||bt.apply(this,at)}),W("mousedown",wt,$t(fr(function(at){Yn.call(this,r,at)}))),y(_t,wt)};oe(Yt,_t=>{t(p)&&_t(Tt)})}ht(Te,_t=>l(J,_t),()=>t(J)),Ce(()=>{gt=Pe(et,1,Cn(t(p)?"ph ph-magnifying-glass":"ph ph-pencil-simple"),"svelte-1nqvnqd",gt,{actionIcon:!0}),Lt(pt,"placeholder",t(p)?"Search or Add":"Enter tag...")}),ea(pt,()=>t(Ne),_t=>l(Ne,_t)),W("input",pt,_t=>P.filterOptions(_t.target.value)),W("focusout",pt,function(..._t){var wt;(wt=he().focusout)==null||wt.apply(this,_t)}),W("keydown",Ke,function(..._t){var wt;(wt=P.handleInputKeyboard)==null||wt.apply(this,_t)}),y(Ye,Te)},$$slots:{default:!0}})}};oe(st,_e=>{t(Z)&&_e(ut)})}Ce(()=>{Me=Pe(Oe,1,"superCell",null,Me,{isDirty:t(H)&&ye().showDirty,inEdit:t(Z),disabled:t(k),readonly:t(I),error:t(C),multirow:!0,inline:t(A)=="inlineInput",tableCell:t(A)=="tableCell",formInput:t(A)=="formInput"}),Lt(Oe,"tabindex",(v(ye()),b(()=>{var _e;return(_e=ye())!=null&&_e.disabled?-1:0}))),Re=We(Oe,"",Re,{color:t(D),background:t(w)}),Ie=Pe(se,1,"value svelte-1nqvnqd",null,Ie,{placeholder:t(R)}),Ae=We(Fe,"",Ae,{"justify-content":(v(ye()),b(()=>ye().align??"flex-start")),"flex-wrap":"wrap"})}),W("focusin",Oe,function(..._e){var qe;(qe=he().focus)==null||qe.apply(this,_e)}),W("focusout",Oe,function(..._e){var qe;(qe=he().focusout)==null||qe.apply(this,_e)}),W("keydown",Oe,function(..._e){var qe;(qe=P.handleKeyboard)==null||qe.apply(this,_e)}),y(e,ve),Dt(),g()}var AE=U('<button class="btn-delete svelte-ab5e84" tabindex="-1" aria-label="Delete" title="Delete" type="button"><i class="ph ph-trash-simple"></i></button>'),TE=U('<div><button class="btn-download svelte-ab5e84" tabindex="-1" type="button"><i class="ph ph-download-simple"></i></button> <a class="filename svelte-ab5e84"> </a> <!></div>'),kE=U('<button class="btn-upload-empty list svelte-ab5e84" aria-label="Upload attachment" type="button"><i class="ph ph-plus"></i> Add Attachment</button>'),DE=U('<div class="attachments svelte-ab5e84"><!> <!></div>'),xE=U('<button type="button"></button>'),OE=U('<button class="btn-nav svelte-ab5e84" aria-label="Previous attachment" type="button"><i class="ph ph-caret-left"></i></button> <div class="indicators svelte-ab5e84"></div> <button class="btn-nav svelte-ab5e84" aria-label="Next attachment" type="button"><i class="ph ph-caret-right"></i></button> <button class="btn-nav svelte-ab5e84" style="align-self: flex-end;" aria-label="Full Screen" type="button"><i class="ph ph-arrows-out-simple"></i></button>',1),IE=U('<button class="btn-nav add svelte-ab5e84" style="align-self: flex-end;" aria-label="Next attachment" type="button"><i class="ph ph-upload"></i></button>'),RE=U('<div class="carousel-controls svelte-ab5e84"><!> <!></div>'),PE=U("<div><!></div>"),ME=U('<div class="carousel-fallback svelte-ab5e84"><div class="pill svelte-ab5e84"> </div> <span class="filename svelte-ab5e84"> </span></div>'),NE=U('<div class="carousel-content svelte-ab5e84"><!></div>'),LE=U('<button class="btn-upload-empty svelte-ab5e84" aria-label="Upload attachment" type="button"><i class="ph ph-plus"></i> Upload Attachment</button>'),FE=U('<div class="carousel-placeholder svelte-ab5e84"><!></div>'),VE=U('<div class="carousel svelte-ab5e84"><!></div>'),UE=U('<div class="slot-container svelte-ab5e84"><!></div>'),BE=U('<div class="grid-overlay-top svelte-ab5e84"><button class="btn-grid-download svelte-ab5e84" tabindex="-1" type="button"><i class="ph ph-download-simple"></i></button> <button class="btn-grid-delete svelte-ab5e84" tabindex="-1" type="button"><i class="ph ph-trash-simple"></i></button></div>'),HE=U('<div><div class="grid-image svelte-ab5e84" role="button" tabindex="0"><!> <!></div></div>'),zE=U('<div><div class="grid-fallback svelte-ab5e84"><div class="pill svelte-ab5e84"> </div> <span class="filename svelte-ab5e84"> </span></div></div>'),jE=U('<div class="grid-item grid-add-item svelte-ab5e84"><button class="btn-upload-empty grid svelte-ab5e84" aria-label="Upload attachment" type="button"><i class="ph ph-plus"></i> <span>Add Images</span></button></div>'),GE=U("<!> <!>",1),qE=U('<button class="btn-upload-empty grid svelte-ab5e84" aria-label="Upload attachment" type="button"><i class="ph ph-plus"></i> <span>Add Images</span></button>'),WE=U('<div class="grid-empty svelte-ab5e84"><!></div>'),YE=U('<div class="attachment-grid-wrapper svelte-ab5e84"><div class="attachment-grid svelte-ab5e84"><!></div></div>'),KE=U('<div class="bulk-actions-overlay svelte-ab5e84"><button class="btn-bulk-action btn-close svelte-ab5e84" type="button" title="Clear Selection"><i class="ph ph-x"></i></button> <span class="selection-count svelte-ab5e84"> </span> <button class="btn-bulk-action btn-bulk-delete svelte-ab5e84" type="button" title="Delete Selected"><i class="ph ph-trash-simple"></i></button></div>'),XE=U('<div tabindex="0"><!> <!> <input type="file" style="display: none"/> <!></div>');function QE(e,r){kt(r,!1);const n=()=>Be(Q(),"$cellState",i),[i,s]=Gt(),a=h(),o=h(),c=h(),u=h(),g=h(),d=h(),p=h(),_=h(),S=h(),E=h(),A=h(),I=h(),k=h(),C=h();let D=m(r,"value",12),w=m(r,"cellOptions",8),B=m(r,"fieldSchema",8),$=m(r,"tableid",8),R=m(r,"API",8);const H="auto";let Z=m(r,"inBuilder",8);const ue=we.createEventDispatcher();let de=D(),Se=h(),ce=h(),ke=h(),De=h(new Set),ye=h(0),le=h(!1),Q=m(r,"cellState",24,()=>sr(w().initialState??"View",{"*":{goTo(T){return T}},View:{_enter(){},focus(){if(!w().readonly)return"Editing"}},Editing:{_enter(){var T;de=D(),(T=t(Se))==null||T.focus(),ue("enteredit")},_exit(){ue("exitedit")},focousout(T){var N;if(!((N=t(Se))!=null&&N.contains(T.relatedTarget)))return"View"},change(T){w().debounce&&ue("change",D())},submit(T){return D()!==de&&ue("change",D()),ue("focusout"),"View"},cancel(){return D(de),"View"}}}));const Y=async T=>{let N=new FormData;for(let ne=0;ne<T.length;ne++)N.append("file",T[ne]);try{let ne=await R().uploadAttachment($(),N);return ue("change",[...t(o),...ne]),ne}catch(ne){return console.error("Upload failed:",ne),[]}};function J(T){t(o).splice(T,1),l(o,[...t(o)]),ue("change",t(o))}function K(T){const N=new Set(t(De));N.has(T)?N.delete(T):N.add(T),l(De,N)}function ie(){l(De,new Set)}function z(){if(t(De).size===0)return;Array.from(t(De)).sort((N,ne)=>ne-N).forEach(N=>{t(o).splice(N,1)}),l(o,t(o)),ie(),ue("change",t(o))}function ge(){t(ke)&&t(ke).click()}function O(T){const N=T.target,ne=Array.from(N.files||[]);Y(ne)}function G(T){var N;!t(_)&&!Z()&&((N=t(o))!=null&&N[T])&&ae(t(o)[T])&&l(le,!0)}const re={next(){var T;((T=t(o))==null?void 0:T.length)>1&&(l(ye,(t(ye)+1)%t(o).length),ue("view",{attachment:t(o)[t(ye)],index:t(ye)}))},prev(){var T;((T=t(o))==null?void 0:T.length)>1&&(l(ye,(t(ye)-1+t(o).length)%t(o).length),ue("view",{attachment:t(o)[t(ye)],index:t(ye)}))},goTo(T){var N;T>=0&&T<((N=t(o))==null?void 0:N.length)&&(l(ye,T),ue("view",{attachment:t(o)[t(ye)],index:t(ye)}))},handleKeydown(T){var N;t(c)==="carousel"&&((N=t(o))==null?void 0:N.length)>1&&(T.key==="ArrowLeft"?(T.preventDefault(),this.prev()):T.key==="ArrowRight"&&(T.preventDefault(),this.next()))}};function ae(T){var ne;return["jpg","jpeg","png","gif","bmp","webp"].includes((ne=T.extension)==null?void 0:ne.toLowerCase())}function ee(T){var N,ne;if(!(!t(E)||t(E)==="none")){if(t(E)==="view")G(T);else if(t(E)==="select")K(T);else if(t(E)==="custom"){let ve=t(o)[T];(ne=(N=w()).onItemClick)==null||ne.call(N,{item:ve,index:T})}}}x(()=>v(B()),()=>{var T,N;l(a,((N=(T=B())==null?void 0:T.type)==null?void 0:N.includes("single"))!==!0)}),x(()=>(v(D()),t(a)),()=>{l(o,D()&&t(a)?D():D()?[D()]:[])}),x(()=>v(w()),()=>{l(c,w().controlType||"list")}),x(()=>v(w()),()=>{l(u,w().imageRatio||"landscape")}),x(()=>v(w()),()=>{l(g,w().gridColumns||4)}),x(()=>v(w()),()=>{l(d,!w().readonly&&!w().disabled)}),x(()=>v(w()),()=>{l(p,w().isGallery)}),x(()=>v(w()),()=>{l(_,w().disabled)}),x(()=>v(w()),()=>{l(S,w().readonly)}),x(()=>v(w()),()=>{l(E,w().onClickAction)}),x(()=>n(),()=>{l(A,n()=="Editing")}),x(()=>(t(S),t(_),t(p)),()=>{l(I,!t(S)&&!t(_)&&!t(p))}),x(()=>(t(S),t(_),t(p)),()=>{l(k,!t(S)&&!t(_)&&!t(p))}),x(()=>v(w()),()=>{l(C,w().slotted)}),Pt();var pe={height:H};Ot();var Ne=XE();let He,me;var V=j(Ne);{var fe=T=>{var N=DE(),ne=j(N);{var ve=Re=>{var se=Ze(),Ie=Ue(se);xt(Ie,1,()=>t(o),Nt,(Le,je,Fe)=>{var Ae=TE();let Ge;var $e=j(Ae),Je=Ee($e,2),rt=j(Je),st=Ee(Je,2);{var ut=it=>{var _e=AE();W("click",_e,()=>J(Fe)),y(it,_e)};oe(st,it=>{t(S)||it(ut)})}Ce(it=>{Ge=Pe(Ae,1,"attachment svelte-ab5e84",null,Ge,it),Lt($e,"aria-label",`Download ${t(je),b(()=>t(je).name)??""}`),Lt($e,"title",`Download ${t(je),b(()=>t(je).name)??""}`),Lt(Je,"href",(t(je),b(()=>t(je).url))),Xe(rt,(t(je),b(()=>t(je).name)))},[()=>({focused:t(ce)===Fe,selected:t(De).has(Fe)})]),W("click",$e,()=>J(Fe)),W("mouseenter",Ae,()=>l(ce,Fe)),W("click",Ae,()=>K(Fe)),y(Le,Ae)}),y(Re,se)};oe(ne,Re=>{t(o),b(()=>{var se;return(se=t(o))==null?void 0:se.length})&&Re(ve)})}var Oe=Ee(ne,2);{var Me=Re=>{var se=kE();let Ie;Ce(()=>{se.disabled=(v(w()),b(()=>w().disabled||w().readonly)),Ie=We(se,"",Ie,{"margin-top":(t(o),b(()=>{var Le;return(Le=t(o))!=null&&Le.length?"0.5rem":"0"}))})}),W("click",se,ge),y(Re,se)};oe(Oe,Re=>{t(d)&&Re(Me)})}y(T,N)},X=T=>{var N=Ze(),ne=Ue(N);{var ve=Me=>{var Re=VE(),se=j(Re);{var Ie=je=>{var Fe=NE(),Ae=j(Fe);{var Ge=Je=>{var rt=PE();let st;var ut=j(rt);{var it=_e=>{var qe=RE(),Ye=j(qe);{var ot=et=>{var gt=OE(),pt=Ue(gt),Yt=Ee(pt,2);xt(Yt,5,()=>t(o),Nt,(wt,dt,nt)=>{var at=xE();let bt;Lt(at,"aria-label",`Go to attachment ${nt+1}`),Ce(()=>{bt=Pe(at,1,"indicator svelte-ab5e84",null,bt,{active:nt===t(ye)}),at.disabled=(v(w()),b(()=>w().disabled))}),W("click",at,fr(()=>re.goTo(nt))),y(wt,at)});var Tt=Ee(Yt,2),_t=Ee(Tt,2);Ce(()=>{pt.disabled=(v(w()),b(()=>w().disabled)),Tt.disabled=(v(w()),b(()=>w().disabled)),_t.disabled=(v(w()),b(()=>w().disabled))}),W("click",pt,fr(function(...wt){var dt;(dt=re.prev)==null||dt.apply(this,wt)})),W("click",Tt,fr(function(...wt){var dt;(dt=re.next)==null||dt.apply(this,wt)})),W("click",_t,fr(()=>G(t(ye)))),y(et,gt)};oe(Ye,et=>{t(o),b(()=>t(o).length>1)&&et(ot)})}var Te=Ee(Ye,2);{var Ke=et=>{var gt=IE();W("click",gt,fr(ge)),y(et,gt)};oe(Te,et=>{t(d)&&et(Ke)})}y(_e,qe)};oe(ut,_e=>{t(o),t(d),b(()=>t(o).length>1||t(d))&&_e(it)})}Ce(_e=>{st=Pe(rt,1,"carousel-image svelte-ab5e84",null,st,_e),We(rt,`background-image: url('${t(o),t(ye),b(()=>t(o)[t(ye)].url)??""}')`),Lt(rt,"aria-label",(t(o),t(ye),b(()=>t(o)[t(ye)].name)))},[()=>({selected:t(De).has(t(ye))})]),W("click",rt,()=>{t(A)&&ee(t(o)[t(ye)],t(ye))}),y(Je,rt)},$e=Je=>{var rt=Ze(),st=Ue(rt);{var ut=it=>{var _e=ME(),qe=j(_e),Ye=j(qe),ot=Ee(qe,2),Te=j(ot);Ce(Ke=>{Xe(Ye,Ke),Xe(Te,(t(o),t(ye),b(()=>t(o)[t(ye)].name)))},[()=>(t(o),t(ye),b(()=>{var Ke;return(Ke=t(o)[t(ye)].extension)==null?void 0:Ke.toUpperCase()}))]),y(it,_e)};oe(st,it=>{t(p)||it(ut)},!0)}y(Je,rt)};oe(Ae,Je=>{t(o),t(ye),b(()=>ae(t(o)[t(ye)]))?Je(Ge):Je($e,!1)})}y(je,Fe)},Le=je=>{var Fe=Ze(),Ae=Ue(Fe);{var Ge=$e=>{var Je=FE(),rt=j(Je);{var st=ut=>{var it=LE();Ce(()=>it.disabled=(v(w()),b(()=>w().disabled||w().readonly))),W("click",it,ge),y(ut,it)};oe(rt,ut=>{t(d)&&ut(st)})}y($e,Je)};oe(Ae,$e=>{t(p)||$e(Ge)},!0)}y(je,Fe)};oe(se,je=>{t(o),b(()=>{var Fe;return(Fe=t(o))==null?void 0:Fe.length})?je(Ie):je(Le,!1)})}y(Me,Re)},Oe=Me=>{var Re=Ze(),se=Ue(Re);{var Ie=Le=>{var je=YE(),Fe=j(je);let Ae;var Ge=j(Fe);{var $e=rt=>{var st=GE(),ut=Ue(st);xt(ut,1,()=>t(o),Nt,(qe,Ye,ot)=>{var Te=Ze(),Ke=Ue(Te);{var et=pt=>{var Yt=HE();let Tt;var _t=j(Yt),wt=j(_t);{var dt=bt=>{var Bt=UE(),Ft=j(Bt);mr(Ft,r,"default",{},null),y(bt,Bt)};oe(wt,bt=>{t(C)&&bt(dt)})}var nt=Ee(wt,2);{var at=bt=>{var Bt=BE(),Ft=j(Bt),Vt=Ee(Ft,2);Ce(()=>{Lt(Ft,"aria-label",`Download ${t(Ye),b(()=>t(Ye).name)??""}`),Lt(Vt,"aria-label",`Delete ${t(Ye),b(()=>t(Ye).name)??""}`)}),W("click",Ft,()=>{const yt=document.createElement("a");yt.href=t(Ye).url,yt.download=t(Ye).name,document.body.appendChild(yt),yt.click(),document.body.removeChild(yt)}),W("click",Vt,()=>J(ot)),y(bt,Bt)};oe(nt,bt=>{!t(p)&&!t(S)&&bt(at)})}Ce(bt=>{Tt=Pe(Yt,1,"grid-item svelte-ab5e84",null,Tt,bt),We(Yt,`aspect-ratio: ${t(u)==="landscape"?"4 / 3":t(u)==="square"?"1 / 1":"3 / 4"}`),We(_t,`background-image: url('${t(Ye),b(()=>t(Ye).url)??""}');`),Lt(_t,"aria-label",(t(Ye),b(()=>t(Ye).name)))},[()=>({focused:t(ce)===ot,selected:t(De).has(ot)})]),W("click",_t,()=>ee(t(Ye))),W("keydown",_t,bt=>bt.key==="Enter"&&K(ot)),y(pt,Yt)},gt=pt=>{var Yt=Ze(),Tt=Ue(Yt);{var _t=wt=>{var dt=zE();let nt;var at=j(dt),bt=j(at),Bt=j(bt),Ft=Ee(bt,2),Vt=j(Ft);Ce((yt,tr)=>{nt=Pe(dt,1,"grid-item svelte-ab5e84",null,nt,yt),We(dt,`aspect-ratio: ${t(u)==="landscape"?"4 / 3":t(u)==="square"?"1 / 1":"3 / 4"}`),Xe(Bt,tr),Xe(Vt,(t(Ye),b(()=>t(Ye).name)))},[()=>({focused:t(ce)===ot,selected:t(De).has(ot)}),()=>(t(Ye),b(()=>{var yt;return(yt=t(Ye).extension)==null?void 0:yt.toUpperCase()}))]),y(wt,dt)};oe(Tt,wt=>{t(p)||wt(_t)},!0)}y(pt,Yt)};oe(Ke,pt=>{t(Ye),b(()=>ae(t(Ye)))?pt(et):pt(gt,!1)})}y(qe,Te)});var it=Ee(ut,2);{var _e=qe=>{var Ye=jE(),ot=j(Ye);Ce(()=>{We(Ye,`aspect-ratio: ${t(u)==="landscape"?"4 / 3":t(u)==="square"?"1 / 1":"3 / 4"}`),ot.disabled=(v(w()),b(()=>w().disabled||w().readonly))}),W("click",ot,ge),y(qe,Ye)};oe(it,qe=>{t(d)&&qe(_e)})}y(rt,st)},Je=rt=>{var st=WE(),ut=j(st);{var it=_e=>{var qe=qE();Ce(()=>qe.disabled=(v(w()),b(()=>w().disabled||w().readonly))),W("click",qe,ge),y(_e,qe)};oe(ut,_e=>{t(d)&&_e(it)})}y(rt,st)};oe(Ge,rt=>{t(o),b(()=>{var st;return(st=t(o))==null?void 0:st.length})?rt($e):rt(Je,!1)})}Ce(()=>Ae=We(Fe,"",Ae,{"--grid-columns":t(g)})),y(Le,je)};oe(se,Le=>{t(c)=="grid"&&Le(Ie)},!0)}y(Me,Re)};oe(ne,Me=>{t(c)=="carousel"?Me(ve):Me(Oe,!1)},!0)}y(T,N)};oe(V,T=>{t(c)=="list"?T(fe):T(X,!1)})}var q=Ee(V,2);{var he=T=>{var N=KE(),ne=j(N),ve=Ee(ne,2),Oe=j(ve),Me=Ee(ve,2);Ce(()=>Xe(Oe,`${t(De),b(()=>t(De).size==1?t(De).size+" Item ":t(De).size+" Items ")??""} Selected`)),W("click",ne,ie),W("click",Me,z),y(T,N)};oe(q,T=>{t(De),t(c),t(S),t(p),b(()=>t(De).size>0&&t(c)==="grid"&&!t(S)&&!t(p))&&T(he)})}var P=Ee(q,2);ht(P,T=>l(ke,T),()=>t(ke));var te=Ee(P,2);cu(te,{get canSelect(){return t(I)},get canDelete(){return t(k)},get items(){return t(o)},set items(T){l(o,T)},get open(){return t(le)},set open(T){l(le,T)},get currentIndex(){return t(ye)},set currentIndex(T){l(ye,T)},get selectedIndices(){return t(De)},set selectedIndices(T){l(De,T)},$$events:{close:()=>console.log("closed")},$$legacy:!0}),ht(Ne,T=>l(Se,T),()=>t(Se)),Ce(()=>{He=Pe(Ne,1,"superCell",null,He,{multirow:!0,inEdit:n()=="Editing",inline:w().role=="tableCell",tableCell:w().role=="tableCell",formInput:w().role=="formInput",disabled:w().disabled,readonly:w().readonly}),me=We(Ne,"",me,{color:(v(w()),b(()=>w().color)),background:(v(w()),b(()=>w().background))}),P.multiple=t(a)}),W("change",P,O),W("keydown",Ne,T=>{re.handleKeydown(T)}),W("focusin",Ne,function(...T){var N;(N=Q().focus)==null||N.apply(this,T)}),W("focusout",Ne,function(...T){var N;(N=Q().focousout)==null||N.apply(this,T)}),y(e,Ne),vr(r,"height",H);var M=Dt(pe);return s(),M}var ZE=U("<button></button>");function JE(e,r){let n=m(r,"active",8,!1);var i=ZE();let s;Ce(()=>s=Pe(i,1,"sc-carousel-button sc-carousel-dot__dot svelte-1mtaq3v",null,s,{"sc-carousel-dot__dot_active":n()})),W("click",i,function(a){Yn.call(this,r,a)}),y(e,i)}var $E=U('<div class="sc-carousel-dots__dot-container svelte-1pld061"><!></div>'),eS=U('<div class="sc-carousel-dots__container svelte-1pld061"></div>');function tS(e,r){kt(r,!1);const n=we.createEventDispatcher();let i=m(r,"pagesCount",8,1),s=m(r,"currentPageIndex",8,0);function a(c){n("pageChange",c)}Ot();var o=eS();xt(o,5,()=>(v(i()),b(()=>Array(i()))),Nt,(c,u,g)=>{var d=$E(),p=j(d);{let _=Rt(()=>s()===g);JE(p,{get active(){return t(_)},$$events:{click:()=>a(g)}})}y(c,d)}),y(e,o),Dt()}const As="prev",ua="next";var rS=U("<button><i></i></button>");function Eh(e,r){let n=m(r,"direction",8,ua),i=m(r,"disabled",8,!1);var s=rS();let a;var o=j(s);let c;Ce(()=>{a=Pe(s,1,"sc-carousel-button sc-carousel-arrow__circle svelte-1pnlyzn",null,a,{"sc-carousel-arrow__circle_disabled":i()}),c=Pe(o,1,"sc-carousel-arrow__arrow svelte-1pnlyzn",null,c,{"sc-carousel-arrow__arrow-next":n()===ua,"sc-carousel-arrow__arrow-prev":n()===As})}),W("click",s,function(u){Yn.call(this,r,u)}),y(e,s)}var nS=U('<div class="sc-carousel-progress__indicator svelte-1pc71g7"></div>');function iS(e,r){kt(r,!1);const n=h(),i=100;let s=m(r,"value",8,0);x(()=>v(s()),()=>{l(n,Math.min(Math.max(s()*i,0),i))}),Pt();var a=nS();Ce(()=>We(a,`
|
|
14
|
+
width: ${t(n)??""}%;
|
|
15
|
+
`)),y(e,a),Dt()}function aS(e,r){e.addEventListener("mousedown",r),e.addEventListener("touchstart",r,{passive:!0})}function sS(e,r){e.removeEventListener("mousedown",r),e.removeEventListener("touchstart",r)}function oS(e,r){e.addEventListener("mouseup",r),e.addEventListener("touchend",r)}function Sh(e,r){e.removeEventListener("mouseup",r),e.removeEventListener("touchend",r)}function lS(e,r){e.addEventListener("mousemove",r),e.addEventListener("touchmove",r)}function Ch(e,r){e.removeEventListener("mousemove",r),e.removeEventListener("touchmove",r)}function vu(e){return function(r,n){e.dispatchEvent(new CustomEvent(r,{detail:n}))}}const uS=110,cS=9,dS=111,fS=20;function pu(e){if("TouchEvent"in window&&e instanceof TouchEvent){const r=e.touches[0];return{x:r?r.clientX:0,y:r?r.clientY:0}}return{x:e.clientX,y:e.clientY}}function mu(e,{thresholdProvider:r}){const n=vu(e);let i,s,a=0,o,c=!1;function u(){return Date.now()-o>=dS&&Math.abs(a)>=fS}function g(_){o=Date.now(),a=0,c=!0;const S=pu(_);i=S.x,s=S.y,n("swipeStart",{x:i,y:s}),lS(window,d),oS(window,p)}function d(_){if(!c)return;const S=pu(_),E=S.x-i,A=S.y-s;i=S.x,s=S.y,n("swipeMove",{x:i,y:s,dx:E,dy:A}),E!==0&&Math.sign(E)!==Math.sign(a)&&(a=0),a+=E,Math.abs(a)>r()&&(n("swipeThresholdReached",{direction:a>0?As:ua}),Sh(window,p),Ch(window,d))}function p(_){if(Sh(window,p),Ch(window,d),c=!1,!u()){n("swipeFailed");return}const S=pu(_);n("swipeEnd",{x:S.x,y:S.y})}return aS(e,g),{destroy(){sS(e,g)}}}function hS(e,r){e.addEventListener("mouseenter",r)}function gS(e,r){e.removeEventListener("mouseenter",r)}function vS(e,r){e.addEventListener("mouseleave",r)}function Ah(e,r){e.removeEventListener("mouseleave",r)}function _u(e){const r=vu(e);function n(){vS(e,i),r("hovered",{value:!0})}function i(){r("hovered",{value:!1}),Ah(e,i)}return hS(e,n),{destroy(){gS(e,n),Ah(e,i)}}}const pS=(e,r)=>{const n=r.x-e.x,i=r.y-e.y;return Math.sqrt(n*n+i*i)};function Ha(e,r,n){return Math.max(e,Math.min(r,n))}function mS(e,r){e.addEventListener("touchstart",r,{passive:!0})}function _S(e,r){e.removeEventListener("touchstart",r)}function bS(e,r){e.addEventListener("touchend",r)}function Th(e,r){e.removeEventListener("touchend",r)}function bu(e){const r=vu(e);let n=0,i={x:0,y:0};function s({tapEndedAt:c,tapEndedPos:u}){const g=c-n,d=pS(i,u);return g<=uS&&d<=cS}function a(c){n=Date.now();const u=c.touches[0];i={x:u.clientX,y:u.clientY},bS(e,o)}function o(c){Th(e,o);const u=c.changedTouches[0];s({tapEndedAt:Date.now(),tapEndedPos:{x:u.clientX,y:u.clientY}})&&r("tapped")}return mS(e,a),{destroy(){_S(e,a),Th(e,o)}}}function yS({currentParticleIndex:e,particlesCount:r,clonesCountHead:n,clonesCountTotal:i,particlesToScroll:s}){return e===r-n?0:e===0?kh({particlesCountWithoutClones:r-i,particlesToScroll:s})-1:Math.floor((e-n)/s)}function wS({currentParticleIndex:e,particlesToScroll:r}){return Math.ceil(e/r)}function ES({currentParticleIndex:e,particlesCount:r,clonesCountHead:n,clonesCountTotal:i,infinite:s,particlesToScroll:a}){return s?yS({currentParticleIndex:e,particlesCount:r,clonesCountHead:n,clonesCountTotal:i,particlesToScroll:a}):wS({currentParticleIndex:e,particlesToScroll:a})}function kh({particlesCountWithoutClones:e,particlesToScroll:r}){return Math.ceil(e/r)}function SS({particlesCountWithoutClones:e,particlesToScroll:r,particlesToShow:n}){const i=Dh({particlesCountWithoutClones:e,particlesToScroll:r,particlesToShow:n});return Math.ceil(e/r)-i}function CS({infinite:e,particlesCountWithoutClones:r,particlesToScroll:n,particlesToShow:i}){return e?kh({particlesCountWithoutClones:r,particlesToScroll:n}):SS({particlesCountWithoutClones:r,particlesToScroll:n,particlesToShow:i})}function AS({pageIndex:e,clonesCountHead:r,clonesCountTail:n,particlesToScroll:i,particlesCount:s}){return Ha(0,Math.min(r+e*i,s-n),s-1)}function TS({pageIndex:e,particlesToScroll:r,particlesCount:n,particlesToShow:i}){return Ha(0,Math.min(e*r,n-i),n-1)}function yu({infinite:e,pageIndex:r,clonesCountHead:n,clonesCountTail:i,particlesToScroll:s,particlesCount:a,particlesToShow:o}){return e?AS({pageIndex:r,clonesCountHead:n,clonesCountTail:i,particlesToScroll:s,particlesCount:a}):TS({pageIndex:r,particlesToScroll:s,particlesCount:a,particlesToShow:o})}function kS({particlesContainerChildren:e,particleWidth:r}){for(let n=0;n<e.length;n++)e[n].style.minWidth=`${r}px`,e[n].style.maxWidth=`${r}px`}function Dh({particlesToScroll:e,particlesToShow:r,particlesCountWithoutClones:n}){const i=e-r;let s=r;for(;;){const a=n-s-i;if(a<r)return Math.max(a,0);s+=r+i}}function DS(e){return new ResizeObserver(r=>{e({width:r[0].contentRect.width})})}function xS({clonesCountHead:e,clonesCountTail:r,particlesContainerChildren:n}){const i=[];for(let o=0;o<r;o++)i.push(n[o].cloneNode(!0));const s=[],a=n.length;for(let o=a-1;o>a-1-e;o--)s.push(n[o].cloneNode(!0));return{clonesToAppend:i,clonesToPrepend:s}}function OS({particlesContainer:e,clonesToAppend:r,clonesToPrepend:n}){for(let i=0;i<r.length;i++)e.append(r[i]);for(let i=0;i<n.length;i++)e.prepend(n[i])}function IS({infinite:e,particlesToShow:r,partialPageSize:n}){const i=e?{head:Math.ceil(n||r),tail:Math.ceil(r)}:{head:0,tail:0};return{...i,total:i.head+i.tail}}const Ts=(e,r,n)=>e&&e.hasOwnProperty(r)?e[r]:n,wu=e=>r=>{e[r]&&e[r]()};var RS="Expected a function",xh="__lodash_hash_undefined__",PS="[object Function]",MS="[object GeneratorFunction]",NS="[object Symbol]",LS=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,FS=/^\w*$/,VS=/^\./,US=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,BS=/[\\^$.*+?()[\]{}|]/g,HS=/\\(\\)?/g,zS=/^\[object .+?Constructor\]$/,jS=typeof Rn=="object"&&Rn&&Rn.Object===Object&&Rn,GS=typeof self=="object"&&self&&self.Object===Object&&self,Eu=jS||GS||Function("return this")();function qS(e,r){return e==null?void 0:e[r]}function WS(e){var r=!1;if(e!=null&&typeof e.toString!="function")try{r=!!(e+"")}catch{}return r}var YS=Array.prototype,KS=Function.prototype,Oh=Object.prototype,Su=Eu["__core-js_shared__"],Ih=function(){var e=/[^.]+$/.exec(Su&&Su.keys&&Su.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Rh=KS.toString,Cu=Oh.hasOwnProperty,Ph=Oh.toString,XS=RegExp("^"+Rh.call(Cu).replace(BS,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Mh=Eu.Symbol,QS=YS.splice,ZS=Fh(Eu,"Map"),ks=Fh(Object,"create"),Nh=Mh?Mh.prototype:void 0,Lh=Nh?Nh.toString:void 0;function ca(e){var r=-1,n=e?e.length:0;for(this.clear();++r<n;){var i=e[r];this.set(i[0],i[1])}}function JS(){this.__data__=ks?ks(null):{}}function $S(e){return this.has(e)&&delete this.__data__[e]}function eC(e){var r=this.__data__;if(ks){var n=r[e];return n===xh?void 0:n}return Cu.call(r,e)?r[e]:void 0}function tC(e){var r=this.__data__;return ks?r[e]!==void 0:Cu.call(r,e)}function rC(e,r){var n=this.__data__;return n[e]=ks&&r===void 0?xh:r,this}ca.prototype.clear=JS,ca.prototype.delete=$S,ca.prototype.get=eC,ca.prototype.has=tC,ca.prototype.set=rC;function za(e){var r=-1,n=e?e.length:0;for(this.clear();++r<n;){var i=e[r];this.set(i[0],i[1])}}function nC(){this.__data__=[]}function iC(e){var r=this.__data__,n=Fo(r,e);if(n<0)return!1;var i=r.length-1;return n==i?r.pop():QS.call(r,n,1),!0}function aC(e){var r=this.__data__,n=Fo(r,e);return n<0?void 0:r[n][1]}function sC(e){return Fo(this.__data__,e)>-1}function oC(e,r){var n=this.__data__,i=Fo(n,e);return i<0?n.push([e,r]):n[i][1]=r,this}za.prototype.clear=nC,za.prototype.delete=iC,za.prototype.get=aC,za.prototype.has=sC,za.prototype.set=oC;function da(e){var r=-1,n=e?e.length:0;for(this.clear();++r<n;){var i=e[r];this.set(i[0],i[1])}}function lC(){this.__data__={hash:new ca,map:new(ZS||za),string:new ca}}function uC(e){return Vo(this,e).delete(e)}function cC(e){return Vo(this,e).get(e)}function dC(e){return Vo(this,e).has(e)}function fC(e,r){return Vo(this,e).set(e,r),this}da.prototype.clear=lC,da.prototype.delete=uC,da.prototype.get=cC,da.prototype.has=dC,da.prototype.set=fC;function Fo(e,r){for(var n=e.length;n--;)if(SC(e[n][0],r))return n;return-1}function hC(e,r){r=mC(r,e)?[r]:pC(r);for(var n=0,i=r.length;e!=null&&n<i;)e=e[wC(r[n++])];return n&&n==i?e:void 0}function gC(e){if(!Uh(e)||bC(e))return!1;var r=CC(e)||WS(e)?XS:zS;return r.test(EC(e))}function vC(e){if(typeof e=="string")return e;if(Tu(e))return Lh?Lh.call(e):"";var r=e+"";return r=="0"&&1/e==-1/0?"-0":r}function pC(e){return Vh(e)?e:yC(e)}function Vo(e,r){var n=e.__data__;return _C(r)?n[typeof r=="string"?"string":"hash"]:n.map}function Fh(e,r){var n=qS(e,r);return gC(n)?n:void 0}function mC(e,r){if(Vh(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Tu(e)?!0:FS.test(e)||!LS.test(e)||r!=null&&e in Object(r)}function _C(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}function bC(e){return!!Ih&&Ih in e}var yC=Au(function(e){e=TC(e);var r=[];return VS.test(e)&&r.push(""),e.replace(US,function(n,i,s,a){r.push(s?a.replace(HS,"$1"):i||n)}),r});function wC(e){if(typeof e=="string"||Tu(e))return e;var r=e+"";return r=="0"&&1/e==-1/0?"-0":r}function EC(e){if(e!=null){try{return Rh.call(e)}catch{}try{return e+""}catch{}}return""}function Au(e,r){if(typeof e!="function"||r&&typeof r!="function")throw new TypeError(RS);var n=function(){var i=arguments,s=r?r.apply(this,i):i[0],a=n.cache;if(a.has(s))return a.get(s);var o=e.apply(this,i);return n.cache=a.set(s,o),o};return n.cache=new(Au.Cache||da),n}Au.Cache=da;function SC(e,r){return e===r||e!==e&&r!==r}var Vh=Array.isArray;function CC(e){var r=Uh(e)?Ph.call(e):"";return r==PS||r==MS}function Uh(e){var r=typeof e;return!!e&&(r=="object"||r=="function")}function AC(e){return!!e&&typeof e=="object"}function Tu(e){return typeof e=="symbol"||AC(e)&&Ph.call(e)==NS}function TC(e){return e==null?"":vC(e)}function kC(e,r,n){var i=e==null?void 0:hC(e,r);return i===void 0?n:i}var DC=kC;const Uo=Sl(DC);var Bo={exports:{}};Bo.exports,function(e,r){var n=200,i="__lodash_hash_undefined__",s=9007199254740991,a="[object Arguments]",o="[object Array]",c="[object Boolean]",u="[object Date]",g="[object Error]",d="[object Function]",p="[object GeneratorFunction]",_="[object Map]",S="[object Number]",E="[object Object]",A="[object Promise]",I="[object RegExp]",k="[object Set]",C="[object String]",D="[object Symbol]",w="[object WeakMap]",B="[object ArrayBuffer]",$="[object DataView]",R="[object Float32Array]",H="[object Float64Array]",Z="[object Int8Array]",ue="[object Int16Array]",de="[object Int32Array]",Se="[object Uint8Array]",ce="[object Uint8ClampedArray]",ke="[object Uint16Array]",De="[object Uint32Array]",ye=/[\\^$.*+?()[\]{}|]/g,le=/\w*$/,Q=/^\[object .+?Constructor\]$/,Y=/^(?:0|[1-9]\d*)$/,J={};J[a]=J[o]=J[B]=J[$]=J[c]=J[u]=J[R]=J[H]=J[Z]=J[ue]=J[de]=J[_]=J[S]=J[E]=J[I]=J[k]=J[C]=J[D]=J[Se]=J[ce]=J[ke]=J[De]=!0,J[g]=J[d]=J[w]=!1;var K=typeof Rn=="object"&&Rn&&Rn.Object===Object&&Rn,ie=typeof self=="object"&&self&&self.Object===Object&&self,z=K||ie||Function("return this")(),ge=r&&!r.nodeType&&r,O=ge&&!0&&e&&!e.nodeType&&e,G=O&&O.exports===ge;function re(f,L){return f.set(L[0],L[1]),f}function ae(f,L){return f.add(L),f}function ee(f,L){for(var be=-1,ze=f?f.length:0;++be<ze&&L(f[be],be,f)!==!1;);return f}function pe(f,L){for(var be=-1,ze=L.length,At=f.length;++be<ze;)f[At+be]=L[be];return f}function Ne(f,L,be,ze){for(var At=-1,Et=f?f.length:0;++At<Et;)be=L(be,f[At],At,f);return be}function He(f,L){for(var be=-1,ze=Array(f);++be<f;)ze[be]=L(be);return ze}function me(f,L){return f==null?void 0:f[L]}function V(f){var L=!1;if(f!=null&&typeof f.toString!="function")try{L=!!(f+"")}catch{}return L}function fe(f){var L=-1,be=Array(f.size);return f.forEach(function(ze,At){be[++L]=[At,ze]}),be}function X(f,L){return function(be){return f(L(be))}}function q(f){var L=-1,be=Array(f.size);return f.forEach(function(ze){be[++L]=ze}),be}var he=Array.prototype,P=Function.prototype,te=Object.prototype,M=z["__core-js_shared__"],T=function(){var f=/[^.]+$/.exec(M&&M.keys&&M.keys.IE_PROTO||"");return f?"Symbol(src)_1."+f:""}(),N=P.toString,ne=te.hasOwnProperty,ve=te.toString,Oe=RegExp("^"+N.call(ne).replace(ye,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Me=G?z.Buffer:void 0,Re=z.Symbol,se=z.Uint8Array,Ie=X(Object.getPrototypeOf,Object),Le=Object.create,je=te.propertyIsEnumerable,Fe=he.splice,Ae=Object.getOwnPropertySymbols,Ge=Me?Me.isBuffer:void 0,$e=X(Object.keys,Object),Je=dn(z,"DataView"),rt=dn(z,"Map"),st=dn(z,"Promise"),ut=dn(z,"Set"),it=dn(z,"WeakMap"),_e=dn(Object,"create"),qe=Ar(Je),Ye=Ar(rt),ot=Ar(st),Te=Ar(ut),Ke=Ar(it),et=Re?Re.prototype:void 0,gt=et?et.valueOf:void 0;function pt(f){var L=-1,be=f?f.length:0;for(this.clear();++L<be;){var ze=f[L];this.set(ze[0],ze[1])}}function Yt(){this.__data__=_e?_e(null):{}}function Tt(f){return this.has(f)&&delete this.__data__[f]}function _t(f){var L=this.__data__;if(_e){var be=L[f];return be===i?void 0:be}return ne.call(L,f)?L[f]:void 0}function wt(f){var L=this.__data__;return _e?L[f]!==void 0:ne.call(L,f)}function dt(f,L){var be=this.__data__;return be[f]=_e&&L===void 0?i:L,this}pt.prototype.clear=Yt,pt.prototype.delete=Tt,pt.prototype.get=_t,pt.prototype.has=wt,pt.prototype.set=dt;function nt(f){var L=-1,be=f?f.length:0;for(this.clear();++L<be;){var ze=f[L];this.set(ze[0],ze[1])}}function at(){this.__data__=[]}function bt(f){var L=this.__data__,be=Fr(L,f);if(be<0)return!1;var ze=L.length-1;return be==ze?L.pop():Fe.call(L,be,1),!0}function Bt(f){var L=this.__data__,be=Fr(L,f);return be<0?void 0:L[be][1]}function Ft(f){return Fr(this.__data__,f)>-1}function Vt(f,L){var be=this.__data__,ze=Fr(be,f);return ze<0?be.push([f,L]):be[ze][1]=L,this}nt.prototype.clear=at,nt.prototype.delete=bt,nt.prototype.get=Bt,nt.prototype.has=Ft,nt.prototype.set=Vt;function yt(f){var L=-1,be=f?f.length:0;for(this.clear();++L<be;){var ze=f[L];this.set(ze[0],ze[1])}}function tr(){this.__data__={hash:new pt,map:new(rt||nt),string:new pt}}function or(f){return tn(this,f).delete(f)}function er(f){return tn(this,f).get(f)}function rr(f){return tn(this,f).has(f)}function Kt(f,L){return tn(this,f).set(f,L),this}yt.prototype.clear=tr,yt.prototype.delete=or,yt.prototype.get=er,yt.prototype.has=rr,yt.prototype.set=Kt;function jt(f){this.__data__=new nt(f)}function gr(){this.__data__=new nt}function pr(f){return this.__data__.delete(f)}function br(f){return this.__data__.get(f)}function Ir(f){return this.__data__.has(f)}function lr(f,L){var be=this.__data__;if(be instanceof nt){var ze=be.__data__;if(!rt||ze.length<n-1)return ze.push([f,L]),this;be=this.__data__=new yt(ze)}return be.set(f,L),this}jt.prototype.clear=gr,jt.prototype.delete=pr,jt.prototype.get=br,jt.prototype.has=Ir,jt.prototype.set=lr;function Cr(f,L){var be=Un(f)||Vn(f)?He(f.length,String):[],ze=be.length,At=!!ze;for(var Et in f)ne.call(f,Et)&&!(At&&(Et=="length"||_a(Et,ze)))&&be.push(Et);return be}function _n(f,L,be){var ze=f[L];(!(ne.call(f,L)&&ki(ze,be))||be===void 0&&!(L in f))&&(f[L]=be)}function Fr(f,L){for(var be=f.length;be--;)if(ki(f[be][0],L))return be;return-1}function yr(f,L){return f&&en(L,$n(L),f)}function un(f,L,be,ze,At,Et,Xt){var Qt;if(ze&&(Qt=Et?ze(f,At,Et,Xt):ze(f)),Qt!==void 0)return Qt;if(!fn(f))return f;var dr=Un(f);if(dr){if(Qt=Kr(f),!L)return Ti(f,Qt)}else{var Zt=yn(f),Rr=Zt==d||Zt==p;if(Vr(f))return Fn(f,L);if(Zt==E||Zt==a||Rr&&!Et){if(V(f))return Et?f:{};if(Qt=wn(Rr?{}:f),!L)return pa(f,yr(Qt,f))}else{if(!J[Zt])return Et?f:{};Qt=ma(f,Zt,un,L)}}Xt||(Xt=new jt);var rn=Xt.get(f);if(rn)return rn;if(Xt.set(f,Qt),!dr)var ft=be?Yr(f):$n(f);return ee(ft||f,function(qt,Tr){ft&&(Tr=qt,qt=f[Tr]),_n(Qt,Tr,un(qt,L,be,ze,Tr,f,Xt))}),Qt}function wr(f){return fn(f)?Le(f):{}}function Zn(f,L,be){var ze=L(f);return Un(f)?ze:pe(ze,be(f))}function ji(f){return ve.call(f)}function va(f){if(!fn(f)||gi(f))return!1;var L=Bn(f)||V(f)?Oe:Q;return L.test(Ar(f))}function di(f){if(!Gi(f))return $e(f);var L=[];for(var be in Object(f))ne.call(f,be)&&be!="constructor"&&L.push(be);return L}function Fn(f,L){if(L)return f.slice();var be=new f.constructor(f.length);return f.copy(be),be}function bn(f){var L=new f.constructor(f.byteLength);return new se(L).set(new se(f)),L}function cn(f,L){var be=L?bn(f.buffer):f.buffer;return new f.constructor(be,f.byteOffset,f.byteLength)}function $r(f,L,be){var ze=L?be(fe(f),!0):fe(f);return Ne(ze,re,new f.constructor)}function Wr(f){var L=new f.constructor(f.source,le.exec(f));return L.lastIndex=f.lastIndex,L}function fi(f,L,be){var ze=L?be(q(f),!0):q(f);return Ne(ze,ae,new f.constructor)}function hi(f){return gt?Object(gt.call(f)):{}}function Ai(f,L){var be=L?bn(f.buffer):f.buffer;return new f.constructor(be,f.byteOffset,f.length)}function Ti(f,L){var be=-1,ze=f.length;for(L||(L=Array(ze));++be<ze;)L[be]=f[be];return L}function en(f,L,be,ze){be||(be={});for(var At=-1,Et=L.length;++At<Et;){var Xt=L[At],Qt=void 0;_n(be,Xt,Qt===void 0?f[Xt]:Qt)}return be}function pa(f,L){return en(f,ur(f),L)}function Yr(f){return Zn(f,$n,ur)}function tn(f,L){var be=f.__data__;return Jn(L)?be[typeof L=="string"?"string":"hash"]:be.map}function dn(f,L){var be=me(f,L);return va(be)?be:void 0}var ur=Ae?X(Ae,Object):Xa,yn=ji;(Je&&yn(new Je(new ArrayBuffer(1)))!=$||rt&&yn(new rt)!=_||st&&yn(st.resolve())!=A||ut&&yn(new ut)!=k||it&&yn(new it)!=w)&&(yn=function(f){var L=ve.call(f),be=L==E?f.constructor:void 0,ze=be?Ar(be):void 0;if(ze)switch(ze){case qe:return $;case Ye:return _;case ot:return A;case Te:return k;case Ke:return w}return L});function Kr(f){var L=f.length,be=f.constructor(L);return L&&typeof f[0]=="string"&&ne.call(f,"index")&&(be.index=f.index,be.input=f.input),be}function wn(f){return typeof f.constructor=="function"&&!Gi(f)?wr(Ie(f)):{}}function ma(f,L,be,ze){var At=f.constructor;switch(L){case B:return bn(f);case c:case u:return new At(+f);case $:return cn(f,ze);case R:case H:case Z:case ue:case de:case Se:case ce:case ke:case De:return Ai(f,ze);case _:return $r(f,ze,be);case S:case C:return new At(f);case I:return Wr(f);case k:return fi(f,ze,be);case D:return hi(f)}}function _a(f,L){return L=L??s,!!L&&(typeof f=="number"||Y.test(f))&&f>-1&&f%1==0&&f<L}function Jn(f){var L=typeof f;return L=="string"||L=="number"||L=="symbol"||L=="boolean"?f!=="__proto__":f===null}function gi(f){return!!T&&T in f}function Gi(f){var L=f&&f.constructor,be=typeof L=="function"&&L.prototype||te;return f===be}function Ar(f){if(f!=null){try{return N.call(f)}catch{}try{return f+""}catch{}}return""}function cr(f){return un(f,!0,!0)}function ki(f,L){return f===L||f!==f&&L!==L}function Vn(f){return Ka(f)&&ne.call(f,"callee")&&(!je.call(f,"callee")||ve.call(f)==a)}var Un=Array.isArray;function kn(f){return f!=null&&Dn(f.length)&&!Bn(f)}function Ka(f){return Hn(f)&&kn(f)}var Vr=Ge||xn;function Bn(f){var L=fn(f)?ve.call(f):"";return L==d||L==p}function Dn(f){return typeof f=="number"&&f>-1&&f%1==0&&f<=s}function fn(f){var L=typeof f;return!!f&&(L=="object"||L=="function")}function Hn(f){return!!f&&typeof f=="object"}function $n(f){return kn(f)?Cr(f):di(f)}function Xa(){return[]}function xn(){return!1}e.exports=cr}(Bo,Bo.exports);var xC=Bo.exports;const OC=Sl(xC);var Ho={exports:{}};Ho.exports,function(e,r){var n=200,i="__lodash_hash_undefined__",s=1,a=2,o=9007199254740991,c="[object Arguments]",u="[object Array]",g="[object AsyncFunction]",d="[object Boolean]",p="[object Date]",_="[object Error]",S="[object Function]",E="[object GeneratorFunction]",A="[object Map]",I="[object Number]",k="[object Null]",C="[object Object]",D="[object Promise]",w="[object Proxy]",B="[object RegExp]",$="[object Set]",R="[object String]",H="[object Symbol]",Z="[object Undefined]",ue="[object WeakMap]",de="[object ArrayBuffer]",Se="[object DataView]",ce="[object Float32Array]",ke="[object Float64Array]",De="[object Int8Array]",ye="[object Int16Array]",le="[object Int32Array]",Q="[object Uint8Array]",Y="[object Uint8ClampedArray]",J="[object Uint16Array]",K="[object Uint32Array]",ie=/[\\^$.*+?()[\]{}|]/g,z=/^\[object .+?Constructor\]$/,ge=/^(?:0|[1-9]\d*)$/,O={};O[ce]=O[ke]=O[De]=O[ye]=O[le]=O[Q]=O[Y]=O[J]=O[K]=!0,O[c]=O[u]=O[de]=O[d]=O[Se]=O[p]=O[_]=O[S]=O[A]=O[I]=O[C]=O[B]=O[$]=O[R]=O[ue]=!1;var G=typeof Rn=="object"&&Rn&&Rn.Object===Object&&Rn,re=typeof self=="object"&&self&&self.Object===Object&&self,ae=G||re||Function("return this")(),ee=r&&!r.nodeType&&r,pe=ee&&!0&&e&&!e.nodeType&&e,Ne=pe&&pe.exports===ee,He=Ne&&G.process,me=function(){try{return He&&He.binding&&He.binding("util")}catch{}}(),V=me&&me.isTypedArray;function fe(f,L){for(var be=-1,ze=f==null?0:f.length,At=0,Et=[];++be<ze;){var Xt=f[be];L(Xt,be,f)&&(Et[At++]=Xt)}return Et}function X(f,L){for(var be=-1,ze=L.length,At=f.length;++be<ze;)f[At+be]=L[be];return f}function q(f,L){for(var be=-1,ze=f==null?0:f.length;++be<ze;)if(L(f[be],be,f))return!0;return!1}function he(f,L){for(var be=-1,ze=Array(f);++be<f;)ze[be]=L(be);return ze}function P(f){return function(L){return f(L)}}function te(f,L){return f.has(L)}function M(f,L){return f==null?void 0:f[L]}function T(f){var L=-1,be=Array(f.size);return f.forEach(function(ze,At){be[++L]=[At,ze]}),be}function N(f,L){return function(be){return f(L(be))}}function ne(f){var L=-1,be=Array(f.size);return f.forEach(function(ze){be[++L]=ze}),be}var ve=Array.prototype,Oe=Function.prototype,Me=Object.prototype,Re=ae["__core-js_shared__"],se=Oe.toString,Ie=Me.hasOwnProperty,Le=function(){var f=/[^.]+$/.exec(Re&&Re.keys&&Re.keys.IE_PROTO||"");return f?"Symbol(src)_1."+f:""}(),je=Me.toString,Fe=RegExp("^"+se.call(Ie).replace(ie,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ae=Ne?ae.Buffer:void 0,Ge=ae.Symbol,$e=ae.Uint8Array,Je=Me.propertyIsEnumerable,rt=ve.splice,st=Ge?Ge.toStringTag:void 0,ut=Object.getOwnPropertySymbols,it=Ae?Ae.isBuffer:void 0,_e=N(Object.keys,Object),qe=ur(ae,"DataView"),Ye=ur(ae,"Map"),ot=ur(ae,"Promise"),Te=ur(ae,"Set"),Ke=ur(ae,"WeakMap"),et=ur(Object,"create"),gt=Ar(qe),pt=Ar(Ye),Yt=Ar(ot),Tt=Ar(Te),_t=Ar(Ke),wt=Ge?Ge.prototype:void 0,dt=wt?wt.valueOf:void 0;function nt(f){var L=-1,be=f==null?0:f.length;for(this.clear();++L<be;){var ze=f[L];this.set(ze[0],ze[1])}}function at(){this.__data__=et?et(null):{},this.size=0}function bt(f){var L=this.has(f)&&delete this.__data__[f];return this.size-=L?1:0,L}function Bt(f){var L=this.__data__;if(et){var be=L[f];return be===i?void 0:be}return Ie.call(L,f)?L[f]:void 0}function Ft(f){var L=this.__data__;return et?L[f]!==void 0:Ie.call(L,f)}function Vt(f,L){var be=this.__data__;return this.size+=this.has(f)?0:1,be[f]=et&&L===void 0?i:L,this}nt.prototype.clear=at,nt.prototype.delete=bt,nt.prototype.get=Bt,nt.prototype.has=Ft,nt.prototype.set=Vt;function yt(f){var L=-1,be=f==null?0:f.length;for(this.clear();++L<be;){var ze=f[L];this.set(ze[0],ze[1])}}function tr(){this.__data__=[],this.size=0}function or(f){var L=this.__data__,be=Fn(L,f);if(be<0)return!1;var ze=L.length-1;return be==ze?L.pop():rt.call(L,be,1),--this.size,!0}function er(f){var L=this.__data__,be=Fn(L,f);return be<0?void 0:L[be][1]}function rr(f){return Fn(this.__data__,f)>-1}function Kt(f,L){var be=this.__data__,ze=Fn(be,f);return ze<0?(++this.size,be.push([f,L])):be[ze][1]=L,this}yt.prototype.clear=tr,yt.prototype.delete=or,yt.prototype.get=er,yt.prototype.has=rr,yt.prototype.set=Kt;function jt(f){var L=-1,be=f==null?0:f.length;for(this.clear();++L<be;){var ze=f[L];this.set(ze[0],ze[1])}}function gr(){this.size=0,this.__data__={hash:new nt,map:new(Ye||yt),string:new nt}}function pr(f){var L=dn(this,f).delete(f);return this.size-=L?1:0,L}function br(f){return dn(this,f).get(f)}function Ir(f){return dn(this,f).has(f)}function lr(f,L){var be=dn(this,f),ze=be.size;return be.set(f,L),this.size+=be.size==ze?0:1,this}jt.prototype.clear=gr,jt.prototype.delete=pr,jt.prototype.get=br,jt.prototype.has=Ir,jt.prototype.set=lr;function Cr(f){var L=-1,be=f==null?0:f.length;for(this.__data__=new jt;++L<be;)this.add(f[L])}function _n(f){return this.__data__.set(f,i),this}function Fr(f){return this.__data__.has(f)}Cr.prototype.add=Cr.prototype.push=_n,Cr.prototype.has=Fr;function yr(f){var L=this.__data__=new yt(f);this.size=L.size}function un(){this.__data__=new yt,this.size=0}function wr(f){var L=this.__data__,be=L.delete(f);return this.size=L.size,be}function Zn(f){return this.__data__.get(f)}function ji(f){return this.__data__.has(f)}function va(f,L){var be=this.__data__;if(be instanceof yt){var ze=be.__data__;if(!Ye||ze.length<n-1)return ze.push([f,L]),this.size=++be.size,this;be=this.__data__=new jt(ze)}return be.set(f,L),this.size=be.size,this}yr.prototype.clear=un,yr.prototype.delete=wr,yr.prototype.get=Zn,yr.prototype.has=ji,yr.prototype.set=va;function di(f,L){var be=Vn(f),ze=!be&&ki(f),At=!be&&!ze&&kn(f),Et=!be&&!ze&&!At&&Hn(f),Xt=be||ze||At||Et,Qt=Xt?he(f.length,String):[],dr=Qt.length;for(var Zt in f)Ie.call(f,Zt)&&!(Xt&&(Zt=="length"||At&&(Zt=="offset"||Zt=="parent")||Et&&(Zt=="buffer"||Zt=="byteLength"||Zt=="byteOffset")||ma(Zt,dr)))&&Qt.push(Zt);return Qt}function Fn(f,L){for(var be=f.length;be--;)if(cr(f[be][0],L))return be;return-1}function bn(f,L,be){var ze=L(f);return Vn(f)?ze:X(ze,be(f))}function cn(f){return f==null?f===void 0?Z:k:st&&st in Object(f)?yn(f):Gi(f)}function $r(f){return fn(f)&&cn(f)==c}function Wr(f,L,be,ze,At){return f===L?!0:f==null||L==null||!fn(f)&&!fn(L)?f!==f&&L!==L:fi(f,L,be,ze,Wr,At)}function fi(f,L,be,ze,At,Et){var Xt=Vn(f),Qt=Vn(L),dr=Xt?u:wn(f),Zt=Qt?u:wn(L);dr=dr==c?C:dr,Zt=Zt==c?C:Zt;var Rr=dr==C,rn=Zt==C,ft=dr==Zt;if(ft&&kn(f)){if(!kn(L))return!1;Xt=!0,Rr=!1}if(ft&&!Rr)return Et||(Et=new yr),Xt||Hn(f)?en(f,L,be,ze,At,Et):pa(f,L,dr,be,ze,At,Et);if(!(be&s)){var qt=Rr&&Ie.call(f,"__wrapped__"),Tr=rn&&Ie.call(L,"__wrapped__");if(qt||Tr){var vi=qt?f.value():f,zn=Tr?L.value():L;return Et||(Et=new yr),At(vi,zn,be,ze,Et)}}return ft?(Et||(Et=new yr),Yr(f,L,be,ze,At,Et)):!1}function hi(f){if(!Dn(f)||Jn(f))return!1;var L=Vr(f)?Fe:z;return L.test(Ar(f))}function Ai(f){return fn(f)&&Bn(f.length)&&!!O[cn(f)]}function Ti(f){if(!gi(f))return _e(f);var L=[];for(var be in Object(f))Ie.call(f,be)&&be!="constructor"&&L.push(be);return L}function en(f,L,be,ze,At,Et){var Xt=be&s,Qt=f.length,dr=L.length;if(Qt!=dr&&!(Xt&&dr>Qt))return!1;var Zt=Et.get(f);if(Zt&&Et.get(L))return Zt==L;var Rr=-1,rn=!0,ft=be&a?new Cr:void 0;for(Et.set(f,L),Et.set(L,f);++Rr<Qt;){var qt=f[Rr],Tr=L[Rr];if(ze)var vi=Xt?ze(Tr,qt,Rr,L,f,Et):ze(qt,Tr,Rr,f,L,Et);if(vi!==void 0){if(vi)continue;rn=!1;break}if(ft){if(!q(L,function(zn,ei){if(!te(ft,ei)&&(qt===zn||At(qt,zn,be,ze,Et)))return ft.push(ei)})){rn=!1;break}}else if(!(qt===Tr||At(qt,Tr,be,ze,Et))){rn=!1;break}}return Et.delete(f),Et.delete(L),rn}function pa(f,L,be,ze,At,Et,Xt){switch(be){case Se:if(f.byteLength!=L.byteLength||f.byteOffset!=L.byteOffset)return!1;f=f.buffer,L=L.buffer;case de:return!(f.byteLength!=L.byteLength||!Et(new $e(f),new $e(L)));case d:case p:case I:return cr(+f,+L);case _:return f.name==L.name&&f.message==L.message;case B:case R:return f==L+"";case A:var Qt=T;case $:var dr=ze&s;if(Qt||(Qt=ne),f.size!=L.size&&!dr)return!1;var Zt=Xt.get(f);if(Zt)return Zt==L;ze|=a,Xt.set(f,L);var Rr=en(Qt(f),Qt(L),ze,At,Et,Xt);return Xt.delete(f),Rr;case H:if(dt)return dt.call(f)==dt.call(L)}return!1}function Yr(f,L,be,ze,At,Et){var Xt=be&s,Qt=tn(f),dr=Qt.length,Zt=tn(L),Rr=Zt.length;if(dr!=Rr&&!Xt)return!1;for(var rn=dr;rn--;){var ft=Qt[rn];if(!(Xt?ft in L:Ie.call(L,ft)))return!1}var qt=Et.get(f);if(qt&&Et.get(L))return qt==L;var Tr=!0;Et.set(f,L),Et.set(L,f);for(var vi=Xt;++rn<dr;){ft=Qt[rn];var zn=f[ft],ei=L[ft];if(ze)var Rs=Xt?ze(ei,zn,ft,L,f,Et):ze(zn,ei,ft,f,L,Et);if(!(Rs===void 0?zn===ei||At(zn,ei,be,ze,Et):Rs)){Tr=!1;break}vi||(vi=ft=="constructor")}if(Tr&&!vi){var Pr=f.constructor,ba=L.constructor;Pr!=ba&&"constructor"in f&&"constructor"in L&&!(typeof Pr=="function"&&Pr instanceof Pr&&typeof ba=="function"&&ba instanceof ba)&&(Tr=!1)}return Et.delete(f),Et.delete(L),Tr}function tn(f){return bn(f,$n,Kr)}function dn(f,L){var be=f.__data__;return _a(L)?be[typeof L=="string"?"string":"hash"]:be.map}function ur(f,L){var be=M(f,L);return hi(be)?be:void 0}function yn(f){var L=Ie.call(f,st),be=f[st];try{f[st]=void 0;var ze=!0}catch{}var At=je.call(f);return ze&&(L?f[st]=be:delete f[st]),At}var Kr=ut?function(f){return f==null?[]:(f=Object(f),fe(ut(f),function(L){return Je.call(f,L)}))}:Xa,wn=cn;(qe&&wn(new qe(new ArrayBuffer(1)))!=Se||Ye&&wn(new Ye)!=A||ot&&wn(ot.resolve())!=D||Te&&wn(new Te)!=$||Ke&&wn(new Ke)!=ue)&&(wn=function(f){var L=cn(f),be=L==C?f.constructor:void 0,ze=be?Ar(be):"";if(ze)switch(ze){case gt:return Se;case pt:return A;case Yt:return D;case Tt:return $;case _t:return ue}return L});function ma(f,L){return L=L??o,!!L&&(typeof f=="number"||ge.test(f))&&f>-1&&f%1==0&&f<L}function _a(f){var L=typeof f;return L=="string"||L=="number"||L=="symbol"||L=="boolean"?f!=="__proto__":f===null}function Jn(f){return!!Le&&Le in f}function gi(f){var L=f&&f.constructor,be=typeof L=="function"&&L.prototype||Me;return f===be}function Gi(f){return je.call(f)}function Ar(f){if(f!=null){try{return se.call(f)}catch{}try{return f+""}catch{}}return""}function cr(f,L){return f===L||f!==f&&L!==L}var ki=$r(function(){return arguments}())?$r:function(f){return fn(f)&&Ie.call(f,"callee")&&!Je.call(f,"callee")},Vn=Array.isArray;function Un(f){return f!=null&&Bn(f.length)&&!Vr(f)}var kn=it||xn;function Ka(f,L){return Wr(f,L)}function Vr(f){if(!Dn(f))return!1;var L=cn(f);return L==S||L==E||L==g||L==w}function Bn(f){return typeof f=="number"&&f>-1&&f%1==0&&f<=o}function Dn(f){var L=typeof f;return f!=null&&(L=="object"||L=="function")}function fn(f){return f!=null&&typeof f=="object"}var Hn=V?P(V):Ai;function $n(f){return Un(f)?di(f):Ti(f)}function Xa(){return[]}function xn(){return!1}e.exports=Ka}(Ho,Ho.exports);var IC=Ho.exports;const RC=Sl(IC),PC=(e,r)=>RC(e,r),MC=e=>Object.keys(e||{}),NC=(e,r)=>{const n={};return e.forEach(i=>{n[i]=r[i]}),n},LC=()=>{const e={},r=(n,i)=>{const{watcherName:s,fn:a}=n,{prop:o,value:c}=i;e[s]||(e[s]={deps:{},fn:a}),e[s].deps[o]=c};return{subscribers:e,subscribe(n,i){n&&r(n,i)},notify(n,i){Object.entries(e).forEach(([s,{deps:a,fn:o}])=>{const c=MC(a);if(c.includes(i)){const u=NC(c,n);PC(a,u)||(e[s].deps=u,o())}})}}},FC=()=>{let e=null;return{targetWatcher(r,n){e={watcherName:r,fn:n},e.fn(),e=null},getTarget(){return e}}};function VC(e,r){const n=Uo(e,"data",{}),i=Uo(e,"watch",{}),s=Uo(e,"methods",{}),a=Uo(r,"onChange",()=>{}),{subscribe:o,notify:c,subscribers:u}=LC(),{targetWatcher:g,getTarget:d}=FC();let p;const _={},S=()=>({data:p,methods:_});let E=!1;const A=k=>(...C)=>{E=!0;const D=k(...C);return E=!1,D};Object.entries(s).forEach(([k,C])=>{_[k]=A((...D)=>C(S(),...D)),Object.defineProperty(_[k],"name",{value:k})}),p=new Proxy(OC(n),{get(k,C){return d()&&!E&&o(d(),{prop:C,value:k[C]}),Reflect.get(...arguments)},set(k,C,D){return k[C]===D||(Reflect.set(...arguments),d()||(a&&a(C,D),c(p,C))),!0}}),Object.entries(i).forEach(([k,C])=>{g(k,()=>{C(S())})});const I=[p,_];return I._internal={_getSubscribers(){return u}},I}function UC({pageIndex:e,particlesToShow:r,particlesToScroll:n,particlesCount:i}){const s=e===0?0:r-n,a=e*r-e*s,o=a+Math.max(r,n)-1,c=[];for(let u=a;u<=Math.min(i-1,o);u++)c.push(u);return c}function BC({infinite:e,pageIndex:r,pagesCount:n,particlesCount:i,particlesToShow:s,particlesToScroll:a}){const o=Ha(0,r,n-1);let c=o-1,u=o+1;c=e?c<0?n-1:c:Math.max(0,c),u=e?u>n-1?0:u:Math.min(n-1,u);const g=[...new Set([c,o,u,0,n-1])].sort((p,_)=>p-_),d=g.flatMap(p=>UC({pageIndex:p,particlesToShow:s,particlesToScroll:a,particlesCount:i}));return{pageIndexes:g,particleIndexes:[...new Set(d)].sort((p,_)=>p-_)}}const HC=(e,r)=>(e(),setInterval(e,r)),zC=35,Bh=1;class jC{constructor({onProgressValueChange:r}){this._onProgressValueChange=r,this._autoplayDuration,this._onProgressValueChange,this._interval,this._paused=!1}setAutoplayDuration(r){this._autoplayDuration=r}start(r){return new Promise(n=>{this.reset();const i=Math.min(zC,Math.max(this._autoplayDuration,1));let s=-i;this._interval=HC(async()=>{if(this._paused)return;s+=i;const a=s/this._autoplayDuration;this._onProgressValueChange(a),a>Bh&&(this.reset(),await r(),n())},i)})}pause(){this._paused=!0}resume(){this._paused=!1}reset(){clearInterval(this._interval),this._onProgressValueChange(Bh)}}function GC(e){const r=new jC({onProgressValueChange:a=>{e("progressValue",1-a)}}),n=VC({data:{particlesCountWithoutClones:0,particlesToShow:1,particlesToShowInit:1,particlesToScroll:1,particlesToScrollInit:1,particlesCount:1,currentParticleIndex:1,infinite:!1,autoplayDuration:1e3,clonesCountHead:0,clonesCountTail:0,clonesCountTotal:0,partialPageSize:1,currentPageIndex:1,pagesCount:1,pauseOnFocus:!1,focused:!1,autoplay:!1,autoplayDirection:"next",disabled:!1,durationMsInit:1e3,durationMs:1e3,offset:0,particleWidth:0,loaded:[]},watch:{setLoaded({data:a}){a.loaded=BC({infinite:a.infinite,pageIndex:a.currentPageIndex,pagesCount:a.pagesCount,particlesCount:a.particlesCountWithoutClones,particlesToShow:a.particlesToShow,particlesToScroll:a.particlesToScroll}).particleIndexes},setCurrentPageIndex({data:a}){a.currentPageIndex=ES({currentParticleIndex:a.currentParticleIndex,particlesCount:a.particlesCount,clonesCountHead:a.clonesCountHead,clonesCountTotal:a.clonesCountTotal,infinite:a.infinite,particlesToScroll:a.particlesToScroll})},setPartialPageSize({data:a}){a.partialPageSize=Dh({particlesToScroll:a.particlesToScroll,particlesToShow:a.particlesToShow,particlesCountWithoutClones:a.particlesCountWithoutClones})},setClonesCount({data:a}){const{head:o,tail:c}=IS({infinite:a.infinite,particlesToShow:a.particlesToShow,partialPageSize:a.partialPageSize});a.clonesCountHead=o,a.clonesCountTail=c,a.clonesCountTotal=o+c},setProgressManagerAutoplayDuration({data:a}){r.setAutoplayDuration(a.autoplayDuration)},toggleProgressManager({data:{pauseOnFocus:a,focused:o}}){a&&(o?r.pause():r.resume())},initDuration({data:a}){a.durationMs=a.durationMsInit},applyAutoplay({data:a,methods:{_applyAutoplayIfNeeded:o}}){a.autoplay&&o(a.autoplay)},setPagesCount({data:a}){a.pagesCount=CS({infinite:a.infinite,particlesCountWithoutClones:a.particlesCountWithoutClones,particlesToScroll:a.particlesToScroll,particlesToShow:a.particlesToShow})},setParticlesToShow({data:a}){a.particlesToShow=Ha(1,a.particlesToShowInit,a.particlesCountWithoutClones)},setParticlesToScroll({data:a}){a.particlesToScroll=Ha(1,a.particlesToScrollInit,a.particlesCountWithoutClones)}},methods:{_prev({data:a}){a.currentParticleIndex=yu({infinite:a.infinite,pageIndex:a.currentPageIndex-1,clonesCountHead:a.clonesCountHead,clonesCountTail:a.clonesCountTail,particlesToScroll:a.particlesToScroll,particlesCount:a.particlesCount,particlesToShow:a.particlesToShow})},_next({data:a}){a.currentParticleIndex=yu({infinite:a.infinite,pageIndex:a.currentPageIndex+1,clonesCountHead:a.clonesCountHead,clonesCountTail:a.clonesCountTail,particlesToScroll:a.particlesToScroll,particlesCount:a.particlesCount,particlesToShow:a.particlesToShow})},_moveToParticle({data:a},o){a.currentParticleIndex=Ha(0,o,a.particlesCount-1)},toggleFocused({data:a}){a.focused=!a.focused},async _applyAutoplayIfNeeded({data:a,methods:o}){if(!a.infinite&&(a.autoplayDirection===ua&&a.currentParticleIndex===a.particlesCount-1||a.autoplayDirection===As&&a.currentParticleIndex===0)){r.reset();return}if(a.autoplay){const c=()=>wu({[ua]:async()=>o.showNextPage(),[As]:async()=>o.showPrevPage()})(a.autoplayDirection);await r.start(c)}},async _jumpIfNeeded({data:a,methods:o}){let c=!1;return a.infinite&&(a.currentParticleIndex===0?(await o.showParticle(a.particlesCount-a.clonesCountTotal,{animated:!1}),c=!0):a.currentParticleIndex===a.particlesCount-a.clonesCountTail&&(await o.showParticle(a.clonesCountHead,{animated:!1}),c=!0)),c},async changePage({data:a,methods:o},c,u){if(r.reset(),a.disabled)return;a.disabled=!0,c(),await o.offsetPage({animated:Ts(u,"animated",!0)}),a.disabled=!1,!await o._jumpIfNeeded()&&o._applyAutoplayIfNeeded()},async showNextPage({data:a,methods:o},c){a.disabled||await o.changePage(o._next,c)},async showPrevPage({data:a,methods:o},c){a.disabled||await o.changePage(o._prev,c)},async showParticle({methods:a},o,c){await a.changePage(()=>a._moveToParticle(o),c)},_getParticleIndexByPageIndex({data:a},o){return yu({infinite:a.infinite,pageIndex:o,clonesCountHead:a.clonesCountHead,clonesCountTail:a.clonesCountTail,particlesToScroll:a.particlesToScroll,particlesCount:a.particlesCount,particlesToShow:a.particlesToShow})},async showPage({methods:a},o,c){const u=a._getParticleIndexByPageIndex(o);await a.showParticle(u,c)},offsetPage({data:a},o){const c=Ts(o,"animated",!0);return new Promise(u=>{a.durationMs=c?a.durationMsInit:0,a.offset=-a.currentParticleIndex*a.particleWidth,setTimeout(()=>{u()},a.durationMs)})}}},{onChange:e}),[i,s]=n;return[{data:i,progressManager:r},s,n._internal]}var qC=U('<div class="sc-carousel__arrow-container svelte-1yu03g9"><!></div>'),WC=U('<div class="sc-carousel-progress__container svelte-1yu03g9"><!></div>'),YC=U('<div class="sc-carousel__arrow-container svelte-1yu03g9"><!></div>'),KC=U('<div class="sc-carousel__carousel-container svelte-1yu03g9"><div class="sc-carousel__content-container svelte-1yu03g9"><!> <div class="sc-carousel__pages-window svelte-1yu03g9"><div class="sc-carousel__pages-container svelte-1yu03g9"><!></div> <!></div> <!></div> <!></div>');function XC(e,r){kt(r,!1);let n=h([]),i=h(),s=h(),a=h(0),o=h(0),c=h(1);const u=GC((N,ne)=>{wu({currentPageIndex:()=>l(i,ne),progressValue:()=>l(s,ne),offset:()=>l(a,ne),durationMs:()=>l(o,ne),pagesCount:()=>l(c,ne),loaded:()=>l(n,ne)})(N)}),g=es(()=>wg(u,3)),d=h(t(g)[0].data),p=t(g)[0].progressManager,_=t(g)[1];t(g)[2];const S=we.createEventDispatcher();let E=m(r,"timingFunction",8,"ease-in-out"),A=m(r,"arrows",8,!0),I=m(r,"infinite",8,!0),k=m(r,"initialPageIndex",8,0),C=m(r,"duration",8,500),D=m(r,"autoplay",8,!1),w=m(r,"autoplayDuration",8,3e3),B=m(r,"autoplayDirection",8,ua),$=m(r,"pauseOnFocus",8,!1),R=m(r,"autoplayProgressVisible",8,!1),H=m(r,"dots",8,!0),Z=m(r,"swiping",8,!0),ue=m(r,"particlesToShow",8,1),de=m(r,"particlesToScroll",8,1);async function Se(N,ne){const ve=Ts(ne,"animated",!0);if(typeof N!="number")throw new Error("pageIndex should be a number");await _.showPage(N,{animated:ve})}async function ce(N){const ne=Ts(N,"animated",!0);await _.showPrevPage({animated:ne})}async function ke(N){const ne=Ts(N,"animated",!0);await _.showNextPage({animated:ne})}let De=h(0),ye=h(),le=h();const Q=DS(({width:N})=>{l(De,N),Ht(d,t(d).particleWidth=t(De)/t(d).particlesToShow),kS({particlesContainerChildren:t(le).children,particleWidth:t(d).particleWidth}),_.offsetPage({animated:!1})});function Y(){const{clonesToAppend:N,clonesToPrepend:ne}=xS({clonesCountHead:t(d).clonesCountHead,clonesCountTail:t(d).clonesCountTail,particlesContainerChildren:t(le).children});OS({particlesContainer:t(le),clonesToAppend:N,clonesToPrepend:ne})}we.onMount(()=>{(async()=>(await we.tick(),t(le)&&t(ye)&&(Ht(d,t(d).particlesCountWithoutClones=t(le).children.length),await we.tick(),t(d).infinite&&Y(),Ht(d,t(d).particlesCount=t(le).children.length),_.showPage(k(),{animated:!1}),Q.observe(t(ye)))))()}),we.onDestroy(()=>{Q.disconnect(),p.reset()});async function J(N){await _.showPage(N,{animated:!0})}function K(){Z()&&Ht(d,t(d).durationMs=0)}async function ie(N){Z()&&await wu({[ua]:_.showNextPage,[As]:_.showPrevPage})(N.detail.direction)}function z(N){Z()&&Ht(d,t(d).offset+=N.detail.dx)}function ge(){Z()&&_.showParticle(t(d).currentParticleIndex)}async function O(){Z()&&await _.offsetPage({animated:!0})}function G(N){Ht(d,t(d).focused=N.detail.value)}function re(){_.toggleFocused()}function ae(){_.showPrevPage()}x(()=>t(i),()=>{S("pageChange",t(i))}),x(()=>v(I()),()=>{Ht(d,t(d).infinite=I())}),x(()=>v(C()),()=>{Ht(d,t(d).durationMsInit=C())}),x(()=>v(D()),()=>{Ht(d,t(d).autoplay=D())}),x(()=>v(w()),()=>{Ht(d,t(d).autoplayDuration=w())}),x(()=>v(B()),()=>{Ht(d,t(d).autoplayDirection=B())}),x(()=>v($()),()=>{Ht(d,t(d).pauseOnFocus=$())}),x(()=>v(ue()),()=>{Ht(d,t(d).particlesToShowInit=ue())}),x(()=>v(de()),()=>{Ht(d,t(d).particlesToScrollInit=de())}),Pt();var ee={goTo:Se,goToPrev:ce,goToNext:ke};Ot();var pe=KC(),Ne=j(pe),He=j(Ne);{var me=N=>{var ne=Ze(),ve=Ue(ne);mr(ve,r,"prev",{get showPrevPage(){return b(()=>_.showPrevPage)}},Oe=>{var Me=qC(),Re=j(Me);{let se=Rt(()=>!I()&&t(i)===0);Eh(Re,{direction:"prev",get disabled(){return t(se)},$$events:{click:ae}})}y(Oe,Me)}),y(N,ne)};oe(He,N=>{A()&&N(me)})}var V=Ee(He,2),fe=j(V),X=j(fe);mr(X,r,"default",{get loaded(){return t(n)},get currentPageIndex(){return t(i)}},null),zr(fe,(N,ne)=>mu==null?void 0:mu(N,ne),()=>({thresholdProvider:()=>t(De)/3})),Ut(()=>W("swipeStart",fe,K)),Ut(()=>W("swipeMove",fe,z)),Ut(()=>W("swipeEnd",fe,ge)),Ut(()=>W("swipeFailed",fe,O)),Ut(()=>W("swipeThresholdReached",fe,ie)),ht(fe,N=>l(le,N),()=>t(le));var q=Ee(fe,2);{var he=N=>{var ne=WC(),ve=j(ne);iS(ve,{get value(){return t(s)}}),y(N,ne)};oe(q,N=>{R()&&N(he)})}ht(V,N=>l(ye,N),()=>t(ye)),zr(V,N=>_u==null?void 0:_u(N)),Ut(()=>W("hovered",V,G)),zr(V,N=>bu==null?void 0:bu(N)),Ut(()=>W("tapped",V,re));var P=Ee(V,2);{var te=N=>{var ne=Ze(),ve=Ue(ne);mr(ve,r,"next",{get showNextPage(){return b(()=>_.showNextPage)}},Oe=>{var Me=YC(),Re=j(Me);{let se=Rt(()=>!I()&&t(i)===t(c)-1);Eh(Re,{direction:"next",get disabled(){return t(se)},$$events:{click(...Ie){var Le;(Le=_.showNextPage)==null||Le.apply(this,Ie)}}})}y(Oe,Me)}),y(N,ne)};oe(P,N=>{A()&&N(te)})}var M=Ee(Ne,2);{var T=N=>{var ne=Ze(),ve=Ue(ne);mr(ve,r,"dots",{get currentPageIndex(){return t(i)},get pagesCount(){return t(c)},showPage:J},Oe=>{tS(Oe,{get pagesCount(){return t(c)},get currentPageIndex(){return t(i)},$$events:{pageChange:Me=>J(Me.detail)}})}),y(N,ne)};oe(M,N=>{H()&&N(T)})}return Ce(()=>We(fe,`
|
|
16
|
+
transform: translateX(${t(a)??""}px);
|
|
17
|
+
transition-duration: ${t(o)??""}ms;
|
|
18
|
+
transition-timing-function: ${E()??""};
|
|
19
|
+
`)),y(e,pe),vr(r,"goTo",Se),vr(r,"goToPrev",ce),vr(r,"goToNext",ke),Dt(ee)}var QC=U('<div class="slot-container svelte-15fd5yc"><!></div>'),ZC=U("<div><!></div>"),JC=U('<div class="slider-fallback svelte-15fd5yc"><div class="pill svelte-15fd5yc"> </div> <span class="filename svelte-15fd5yc"> </span></div>'),$C=U('<div class="slider-item svelte-15fd5yc"><!></div>'),eA=U('<div slot="prev" class="slider-navbutton svelte-15fd5yc"><i class="ph ph-caret-left"></i></div>'),tA=U('<div slot="next" class="slider-navbutton svelte-15fd5yc"><i class="ph ph-caret-right"></i></div>'),rA=U('<button class="btn-upload-empty svelte-15fd5yc" aria-label="Upload attachment" type="button"><i class="ph ph-plus"></i> Upload Attachment</button>'),nA=U('<div class="slider-placeholder svelte-15fd5yc"><!></div>'),iA=U('<div tabindex="0"><div class="slider svelte-15fd5yc"><!></div> <input type="file" style="display: none"/> <!></div>');function aA(e,r){kt(r,!1);const n=()=>Be(Y(),"$cellState",i),[i,s]=Gt(),a=h(),o=h(),c=h(),u=h(),g=h(),d=h(),p=h(),_=h(),S=h(),E=h(),A=h(),I=h(),k=h(),C=h(),D=h(),w=h(),B=h(),$=h();let R=m(r,"value",12),H=m(r,"cellOptions",8),Z=m(r,"fieldSchema",8),ue=m(r,"tableid",8),de=m(r,"API",8),Se=m(r,"inBuilder",8);const ce=we.createEventDispatcher();let ke=R(),De=h(),ye=h(),le=h(new Set),Q=0,Y=m(r,"cellState",24,()=>sr(H().initialState??"View",{"*":{goTo(P){return P}},View:{_enter(){},focus(){if(!H().readonly)return"Editing"}},Editing:{_enter(){var P;ke=R(),(P=t(De))==null||P.focus(),ce("enteredit")},_exit(){ce("exitedit")},focousout(P){var te;if(!((te=t(De))!=null&&te.contains(P.relatedTarget)))return"View"},change(P){H().debounce&&ce("change",R())},submit(P){return R()!==ke&&ce("change",R()),ce("focusout"),"View"},cancel(){return R(ke),"View"}}}));const J=async P=>{let te=new FormData;for(let M=0;M<P.length;M++)te.append("file",P[M]);try{let M=await de().uploadAttachment(ue(),te);return ce("change",[...t(o),...M]),M}catch(M){return console.error("Upload failed:",M),[]}};function K(P){t(o).splice(P,1),l(o,[...t(o)]),ce("change",t(o))}function ie(P){const te=new Set(t(le));te.has(P)?te.delete(P):te.add(P),l(le,te)}function z(){t(ye)&&t(ye).click()}function ge(P){const te=P.target,M=Array.from(te.files||[]);J(M)}let O=h(!1),G=h(0);function re(P){var te,M;if(!(!t($)||t($)==="none")){if(t($)==="view")ae(P);else if(t($)==="select")ie(P);else if(t($)==="custom"){let T=t(o)[P];(M=(te=H()).onItemClick)==null||M.call(te,{item:T,index:P})}}}function ae(P=Q){var te;!t(g)&&!Se()&&((te=t(o))!=null&&te[P])&&ee(t(o)[P])&&(l(G,P),l(O,!0))}function ee(P){var M;return["jpg","jpeg","png","gif","bmp","webp"].includes((M=P.extension)==null?void 0:M.toLowerCase())}x(()=>v(Z()),()=>{var P,te;l(a,((te=(P=Z())==null?void 0:P.type)==null?void 0:te.includes("single"))!==!0)}),x(()=>(v(R()),t(a)),()=>{l(o,R()&&t(a)?R():R()?[R()]:[])}),x(()=>v(H()),()=>{l(c,!H().readonly&&!H().disabled)}),x(()=>v(H()),()=>{l(u,H().isGallery)}),x(()=>v(H()),()=>{l(g,H().disabled)}),x(()=>v(H()),()=>{l(d,H().readonly)}),x(()=>(t(d),t(g),t(u)),()=>{l(p,!t(d)&&!t(g)&&!t(u))}),x(()=>(t(d),t(g),t(u)),()=>{l(_,!t(d)&&!t(g)&&!t(u))}),x(()=>v(H()),()=>{l(S,H().slotted)}),x(()=>(v(H()),t(o)),()=>{var P;l(E,H().carouselDots!==void 0?H().carouselDots:((P=t(o))==null?void 0:P.length)>1)}),x(()=>(v(H()),t(o)),()=>{var P;l(A,H().carouselArrows!==void 0?H().carouselArrows:((P=t(o))==null?void 0:P.length)>1)}),x(()=>(v(H()),t(o)),()=>{var P;l(I,H().carouselInfinite!==void 0?H().carouselInfinite:((P=t(o))==null?void 0:P.length)>1)}),x(()=>v(H()),()=>{l(k,H().carouselAutoplay!==void 0?H().carouselAutoplay:!1)}),x(()=>v(H()),()=>{l(C,H().carouselAutoplaySpeed!==void 0?H().carouselAutoplaySpeed:1e3)}),x(()=>v(H()),()=>{l(D,H().carouselItemsToShow!==void 0?H().carouselItemsToShow:3)}),x(()=>v(H()),()=>{l(w,H().carouselItemsToScroll!==void 0?H().carouselItemsToScroll:1)}),x(()=>v(H()),()=>{l(B,H().carouselMode==="marquee")}),x(()=>v(H()),()=>{l($,H().onClickAction)}),Pt(),Ot();var pe=iA();let Ne,He;var me=j(pe),V=j(me);{var fe=P=>{var te=Ze(),M=Ue(te);$i(M,()=>t(D),T=>{{let N=Rt(()=>t(E)&&!t(B)),ne=Rt(()=>t(A)&&!t(B)),ve=Rt(()=>t(k)||t(B));XC(T,{get particlesToShow(){return t(D)},get particlesToScroll(){return t(w)},get dots(){return t(N)},get arrows(){return t(ne)},get infinite(){return t(I)},get autoplay(){return t(ve)},height:"100%",children:(Oe,Me)=>{var Re=Ze(),se=Ue(Re);xt(se,1,()=>t(o),Nt,(Ie,Le,je)=>{var Fe=$C();We(Fe,"",{},{height:"100%"});var Ae=j(Fe);{var Ge=Je=>{var rt=ZC();let st;var ut=j(rt);{var it=_e=>{var qe=QC(),Ye=j(qe);mr(Ye,r,"default",{},null),y(_e,qe)};oe(ut,_e=>{t(S)&&_e(it)})}Ce(_e=>{st=Pe(rt,1,"slider-image svelte-15fd5yc",null,st,_e),We(rt,`background-image: url('${t(Le),b(()=>t(Le).url)??""}')`),Lt(rt,"aria-label",(t(Le),b(()=>t(Le).name)))},[()=>({selected:t(le).has(je)})]),y(Je,rt)},$e=Je=>{var rt=Ze(),st=Ue(rt);{var ut=it=>{var _e=JC(),qe=j(_e),Ye=j(qe),ot=Ee(qe,2),Te=j(ot);Ce(Ke=>{Xe(Ye,Ke),Xe(Te,(t(Le),b(()=>t(Le).name)))},[()=>(t(Le),b(()=>{var Ke;return(Ke=t(Le).extension)==null?void 0:Ke.toUpperCase()}))]),y(it,_e)};oe(st,it=>{t(u)||it(ut)},!0)}y(Je,rt)};oe(Ae,Je=>{t(Le),b(()=>ee(t(Le)))?Je(Ge):Je($e,!1)})}W("click",Fe,()=>{re(je)}),y(Ie,Fe)}),y(Oe,Re)},$$slots:{default:!0,prev:(Oe,Me)=>{var Re=eA();const se=Rt(()=>Me.showPrevPage);W("click",Re,function(...Ie){var Le;(Le=t(se))==null||Le.apply(this,Ie)}),y(Oe,Re)},next:(Oe,Me)=>{var Re=tA();const se=Rt(()=>Me.showNextPage);W("click",Re,function(...Ie){var Le;(Le=t(se))==null||Le.apply(this,Ie)}),y(Oe,Re)}}})}}),y(P,te)},X=P=>{var te=Ze(),M=Ue(te);{var T=N=>{var ne=nA(),ve=j(ne);{var Oe=Me=>{var Re=rA();Ce(()=>Re.disabled=(v(H()),b(()=>H().disabled||H().readonly))),W("click",Re,z),y(Me,Re)};oe(ve,Me=>{t(c)&&Me(Oe)})}y(N,ne)};oe(M,N=>{t(u)||N(T)},!0)}y(P,te)};oe(V,P=>{t(o),b(()=>{var te;return(te=t(o))==null?void 0:te.length})?P(fe):P(X,!1)})}var q=Ee(me,2);ht(q,P=>l(ye,P),()=>t(ye));var he=Ee(q,2);cu(he,{get canSelect(){return t(p)},get canDelete(){return t(_)},get items(){return t(o)},set items(P){l(o,P)},get open(){return t(O)},set open(P){l(O,P)},get currentIndex(){return t(G)},set currentIndex(P){l(G,P)},get selectedIndices(){return t(le)},set selectedIndices(P){l(le,P)},$$events:{close:()=>console.log("lightbox closed"),delete:P=>{K(P.detail.index)}},$$legacy:!0}),ht(pe,P=>l(De,P),()=>t(De)),Ce(()=>{Ne=Pe(pe,1,"superCell",null,Ne,{multirow:!0,inEdit:n()=="Editing",inline:H().role=="tableCell",tableCell:H().role=="tableCell",formInput:H().role=="formInput",disabled:H().disabled,readonly:H().readonly}),He=We(pe,"",He,{color:(v(H()),b(()=>H().color)),background:(v(H()),b(()=>H().background)),overflow:"hidden"}),q.multiple=t(a)}),W("change",q,ge),W("focusin",pe,function(...P){var te;(te=Y().focus)==null||te.apply(this,P)}),W("focusout",pe,function(...P){var te;(te=Y().focousout)==null||te.apply(this,P)}),y(e,pe),Dt(),s()}function ku({target:e}){e.style.height="1px",e.style.height=+e.scrollHeight+"px"}function sA(e){return ku({target:e}),e.style.overflow="hidden",e.addEventListener("input",ku),{destroy:()=>e.removeEventListener("input",ku)}}ct.CellAttachment=lu,ct.CellAttachmentExpanded=QE,ct.CellAttachmentSlider=aA,ct.CellBoolean=tu,ct.CellColor=w1,ct.CellDateRange=I1,ct.CellDatetime=au,ct.CellIcon=Y1,ct.CellJSON=ou,ct.CellLink=Po,ct.CellLinkAdvanced=xw,ct.CellLinkPickerSelect=fh,ct.CellLinkPickerTree=Ro,ct.CellNumber=Ss,ct.CellOptions=sa,ct.CellOptionsAdvanced=jw,ct.CellSQLLink=yw,ct.CellSkeleton=ph,ct.CellString=Jr,ct.CellStringMask=cE,ct.CellStringSimple=eu,ct.CellTags=CE,ct.IconButton=$l,ct.SuperButton=ta,ct.SuperField=Bv,ct.SuperForm=zp,ct.SuperLightbox=cu,ct.SuperList=uh,ct.SuperPopover=Qr,ct.SuperTable=Z0,ct.SuperTableColumn=uu,ct.SuperTabs=i1,ct.SuperTree=su,ct.Tooltip=io,ct.autoresizeTextarea=sA,ct.clickOutside=no,ct.defaultOperatorMap=ch,ct.positionDropdown=ro,Object.defineProperty(ct,Symbol.toStringTag,{value:"Module"})});
|