@ws-ui/shared 0.0.47 → 0.0.49

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.
@@ -1,7 +1,9 @@
1
- declare let DataSource: typeof datasources.DataSource;
2
- declare let Method4D: typeof datasources.Method4D;
3
- declare let restRequest: typeof datasources.restRequest;
4
- declare let Utils: typeof datasources.Utils;
5
- declare let $$datastores: {
6
- [dsName: string]: datasources.DataStore;
7
- };
1
+ interface Window {
2
+ DataSource: typeof datasources.DataSource;
3
+ Method4D: typeof datasources.Method4D;
4
+ restRequest: typeof datasources.restRequest;
5
+ Utils: typeof datasources.Utils;
6
+ $$datastores: {
7
+ [dsName: string]: datasources.DataStore;
8
+ };
9
+ }
package/dist/index.cjs.js CHANGED
@@ -123,7 +123,7 @@ You may have forgotten to import it.`);var o=r.__emotion_real===r,a=o&&r.__emoti
123
123
  `)},LO=function(e){var r=e.noRelative,n=e.noImportant,o=e.gapMode,a=o===void 0?"margin":o,u=I.useMemo(function(){return PO(a)},[a]);return I.createElement(AO,{styles:IO(u,!r,a,n?"":"!important")})},oc=!1;if(typeof window<"u")try{var ha=Object.defineProperty({},"passive",{get:function(){return oc=!0,!0}});window.addEventListener("test",ha,ha),window.removeEventListener("test",ha,ha)}catch{oc=!1}var vi=oc?{passive:!1}:!1,MO=function(e){return e.tagName==="TEXTAREA"},Xh=function(e,r){var n=window.getComputedStyle(e);return n[r]!=="hidden"&&!(n.overflowY===n.overflowX&&!MO(e)&&n[r]==="visible")},DO=function(e){return Xh(e,"overflowY")},kO=function(e){return Xh(e,"overflowX")},tp=function(e,r){var n=r.ownerDocument,o=r;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var a=Vh(e,o);if(a){var u=Jh(e,o),c=u[1],f=u[2];if(c>f)return!0}o=o.parentNode}while(o&&o!==n.body);return!1},NO=function(e){var r=e.scrollTop,n=e.scrollHeight,o=e.clientHeight;return[r,n,o]},$O=function(e){var r=e.scrollLeft,n=e.scrollWidth,o=e.clientWidth;return[r,n,o]},Vh=function(e,r){return e==="v"?DO(r):kO(r)},Jh=function(e,r){return e==="v"?NO(r):$O(r)},jO=function(e,r){return e==="h"&&r==="rtl"?-1:1},FO=function(e,r,n,o,a){var u=jO(e,window.getComputedStyle(r).direction),c=u*o,f=n.target,h=r.contains(f),m=!1,y=c>0,_=0,O=0;do{var v=Jh(e,f),S=v[0],w=v[1],T=v[2],D=w-T-u*S;(S||D)&&Vh(e,f)&&(_+=D,O+=S),f instanceof ShadowRoot?f=f.host:f=f.parentNode}while(!h&&f!==document.body||h&&(r.contains(f)||r===f));return(y&&(a&&Math.abs(_)<1||!a&&c>_)||!y&&(a&&Math.abs(O)<1||!a&&-c>O))&&(m=!0),m},va=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},np=function(e){return[e.deltaX,e.deltaY]},rp=function(e){return e&&"current"in e?e.current:e},WO=function(e,r){return e[0]===r[0]&&e[1]===r[1]},UO=function(e){return`
124
124
  .block-interactivity-`.concat(e,` {pointer-events: none;}
125
125
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
126
- `)},BO=0,mi=[];function HO(e){var r=I.useRef([]),n=I.useRef([0,0]),o=I.useRef(),a=I.useState(BO++)[0],u=I.useState(Yh)[0],c=I.useRef(e);I.useEffect(function(){c.current=e},[e]),I.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var w=ro([e.lockRef.current],(e.shards||[]).map(rp),!0).filter(Boolean);return w.forEach(function(T){return T.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),w.forEach(function(T){return T.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var f=I.useCallback(function(w,T){if("touches"in w&&w.touches.length===2)return!c.current.allowPinchZoom;var D=va(w),M=n.current,R="deltaX"in w?w.deltaX:M[0]-D[0],k="deltaY"in w?w.deltaY:M[1]-D[1],x,W=w.target,F=Math.abs(R)>Math.abs(k)?"h":"v";if("touches"in w&&F==="h"&&W.type==="range")return!1;var $=tp(F,W);if(!$)return!0;if($?x=F:(x=F==="v"?"h":"v",$=tp(F,W)),!$)return!1;if(!o.current&&"changedTouches"in w&&(R||k)&&(o.current=x),!x)return!0;var Z=o.current||x;return FO(Z,T,w,Z==="h"?R:k,!0)},[]),h=I.useCallback(function(w){var T=w;if(!(!mi.length||mi[mi.length-1]!==u)){var D="deltaY"in T?np(T):va(T),M=r.current.filter(function(x){return x.name===T.type&&(x.target===T.target||T.target===x.shadowParent)&&WO(x.delta,D)})[0];if(M&&M.should){T.cancelable&&T.preventDefault();return}if(!M){var R=(c.current.shards||[]).map(rp).filter(Boolean).filter(function(x){return x.contains(T.target)}),k=R.length>0?f(T,R[0]):!c.current.noIsolation;k&&T.cancelable&&T.preventDefault()}}},[]),m=I.useCallback(function(w,T,D,M){var R={name:w,delta:T,target:D,should:M,shadowParent:zO(D)};r.current.push(R),setTimeout(function(){r.current=r.current.filter(function(k){return k!==R})},1)},[]),y=I.useCallback(function(w){n.current=va(w),o.current=void 0},[]),_=I.useCallback(function(w){m(w.type,np(w),w.target,f(w,e.lockRef.current))},[]),O=I.useCallback(function(w){m(w.type,va(w),w.target,f(w,e.lockRef.current))},[]);I.useEffect(function(){return mi.push(u),e.setCallbacks({onScrollCapture:_,onWheelCapture:_,onTouchMoveCapture:O}),document.addEventListener("wheel",h,vi),document.addEventListener("touchmove",h,vi),document.addEventListener("touchstart",y,vi),function(){mi=mi.filter(function(w){return w!==u}),document.removeEventListener("wheel",h,vi),document.removeEventListener("touchmove",h,vi),document.removeEventListener("touchstart",y,vi)}},[]);var v=e.removeScrollBar,S=e.inert;return I.createElement(I.Fragment,null,S?I.createElement(u,{styles:UO(a)}):null,v?I.createElement(LO,{gapMode:e.gapMode}):null)}function zO(e){for(var r=null;e!==null;)e instanceof ShadowRoot&&(r=e.host,e=e.host),e=e.parentNode;return r}const qO=bO(Gh,HO);var Zh=I.forwardRef(function(e,r){return I.createElement(Ya,Mn({},e,{ref:r,sideCar:qO}))});Zh.classNames=Ya.classNames;const KO=Zh,io=globalThis!=null&&globalThis.document?I.useLayoutEffect:()=>{},GO=I["useId".toString()]||(()=>{});let YO=0;function XO(e){const[r,n]=I.useState(GO());return io(()=>{e||n(o=>o??String(YO++))},[e]),e||(r?`radix-${r}`:"")}function Qh(...e){return r=>e.forEach(n=>function(o,a){typeof o=="function"?o(a):o!=null&&(o.current=a)}(n,r))}function Gr(...e){return I.useCallback(Qh(...e),e)}const ev=I.forwardRef((e,r)=>{const{children:n,...o}=e;return I.Children.toArray(n).some(ip)?I.createElement(I.Fragment,null,I.Children.map(n,a=>ip(a)?I.createElement(ac,gt({},o,{ref:r}),a.props.children):a)):I.createElement(ac,gt({},o,{ref:r}),n)});ev.displayName="Slot";const ac=I.forwardRef((e,r)=>{const{children:n,...o}=e;return I.isValidElement(n)?I.cloneElement(n,{...JO(o,n.props),ref:Qh(r,n.ref)}):I.Children.count(n)>1?I.Children.only(null):null});ac.displayName="SlotClone";const VO=({children:e})=>I.createElement(I.Fragment,null,e);function ip(e){return I.isValidElement(e)&&e.type===VO}function JO(e,r){const n={...r};for(const o in r){const a=e[o],u=r[o];/^on[A-Z]/.test(o)?n[o]=(...c)=>{u==null||u(...c),a==null||a(...c)}:o==="style"?n[o]={...a,...u}:o==="className"&&(n[o]=[a,u].filter(Boolean).join(" "))}return{...e,...n}}const Ei=["a","button","div","h2","h3","img","li","nav","ol","p","span","svg","ul"].reduce((e,r)=>({...e,[r]:I.forwardRef((n,o)=>{const{asChild:a,...u}=n,c=a?ev:r;return I.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),I.createElement(c,gt({},u,{ref:o}))})}),{}),tv=e=>{const{present:r,children:n}=e,o=function(c){const[f,h]=I.useState(),m=I.useRef({}),y=I.useRef(c),_=I.useRef("none"),O=c?"mounted":"unmounted",[v,S]=function(w,T){return I.useReducer((D,M)=>{const R=T[D][M];return R??D},w)}(O,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return I.useEffect(()=>{const w=ma(m.current);_.current=v==="mounted"?w:"none"},[v]),io(()=>{const w=m.current,T=y.current;if(T!==c){const D=_.current,M=ma(w);c?S("MOUNT"):M==="none"||(w==null?void 0:w.display)==="none"?S("UNMOUNT"):S(T&&D!==M?"ANIMATION_OUT":"UNMOUNT"),y.current=c}},[c,S]),io(()=>{if(f){const w=D=>{const M=ma(m.current).includes(D.animationName);D.target===f&&M&&S("ANIMATION_END")},T=D=>{D.target===f&&(_.current=ma(m.current))};return f.addEventListener("animationstart",T),f.addEventListener("animationcancel",w),f.addEventListener("animationend",w),()=>{f.removeEventListener("animationstart",T),f.removeEventListener("animationcancel",w),f.removeEventListener("animationend",w)}}S("ANIMATION_END")},[f,S]),{isPresent:["mounted","unmountSuspended"].includes(v),ref:I.useCallback(w=>{w&&(m.current=getComputedStyle(w)),h(w)},[])}}(r),a=typeof n=="function"?n({present:o.isPresent}):I.Children.only(n),u=Gr(o.ref,a.ref);return typeof n=="function"||o.isPresent?I.cloneElement(a,{ref:u}):null};function ma(e){return(e==null?void 0:e.animationName)||"none"}tv.displayName="Presence";let Lu=0;function ZO(){I.useEffect(()=>{var e,r;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:op()),document.body.insertAdjacentElement("beforeend",(r=n[1])!==null&&r!==void 0?r:op()),Lu++,()=>{Lu===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(o=>o.remove()),Lu--}},[])}function op(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const nv=I.forwardRef((e,r)=>{var n,o;const{containerRef:a,style:u,...c}=e,f=(n=a==null?void 0:a.current)!==null&&n!==void 0?n:globalThis==null||(o=globalThis.document)===null||o===void 0?void 0:o.body,[,h]=I.useState({});return io(()=>{h({})},[]),f?Ba.createPortal(I.createElement(Ei.div,gt({"data-radix-portal":""},c,{ref:r,style:f===document.body?{position:"absolute",top:0,left:0,zIndex:2147483647,...u}:void 0})),f):null});function Kr(e){const r=I.useRef(e);return I.useEffect(()=>{r.current=e}),I.useMemo(()=>(...n)=>{var o;return(o=r.current)===null||o===void 0?void 0:o.call(r,...n)},[])}const ap={bubbles:!1,cancelable:!0},QO=I.forwardRef((e,r)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:a,onUnmountAutoFocus:u,...c}=e,[f,h]=I.useState(null),m=Kr(a),y=Kr(u),_=I.useRef(null),O=Gr(r,w=>h(w)),v=I.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;I.useEffect(()=>{if(o){let w=function(D){if(v.paused||!f)return;const M=D.target;f.contains(M)?_.current=M:Nr(_.current,{select:!0})},T=function(D){!v.paused&&f&&(f.contains(D.relatedTarget)||Nr(_.current,{select:!0}))};return document.addEventListener("focusin",w),document.addEventListener("focusout",T),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",T)}}},[o,f,v.paused]),I.useEffect(()=>{if(f){cp.add(v);const T=document.activeElement;if(!f.contains(T)){const D=new Event("focusScope.autoFocusOnMount",ap);f.addEventListener("focusScope.autoFocusOnMount",m),f.dispatchEvent(D),D.defaultPrevented||(function(M,{select:R=!1}={}){const k=document.activeElement;for(const x of M)if(Nr(x,{select:R}),document.activeElement!==k)return}((w=sp(f),w.filter(M=>M.tagName!=="A")),{select:!0}),document.activeElement===T&&Nr(f))}return()=>{f.removeEventListener("focusScope.autoFocusOnMount",m),setTimeout(()=>{const D=new Event("focusScope.autoFocusOnUnmount",ap);f.addEventListener("focusScope.autoFocusOnUnmount",y),f.dispatchEvent(D),D.defaultPrevented||Nr(T??document.body,{select:!0}),f.removeEventListener("focusScope.autoFocusOnUnmount",y),cp.remove(v)},0)}}var w},[f,m,y,v]);const S=I.useCallback(w=>{if(!n&&!o||v.paused)return;const T=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,D=document.activeElement;if(T&&D){const M=w.currentTarget,[R,k]=function(x){const W=sp(x),F=up(W,x),$=up(W.reverse(),x);return[F,$]}(M);R&&k?w.shiftKey||D!==k?w.shiftKey&&D===R&&(w.preventDefault(),n&&Nr(k,{select:!0})):(w.preventDefault(),n&&Nr(R,{select:!0})):D===M&&w.preventDefault()}},[n,o,v.paused]);return I.createElement(Ei.div,gt({tabIndex:-1},c,{ref:O,onKeyDown:S}))});function sp(e){const r=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const a=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||a?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)r.push(n.currentNode);return r}function up(e,r){for(const n of e)if(!eT(n,{upTo:r}))return n}function eT(e,{upTo:r}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(r!==void 0&&e===r)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Nr(e,{select:r=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(o){return o instanceof HTMLInputElement&&"select"in o}(e)&&r&&e.select()}}const cp=function(){let e=[];return{add(r){const n=e[0];r!==n&&(n==null||n.pause()),e=lp(e,r),e.unshift(r)},remove(r){var n;e=lp(e,r),(n=e[0])===null||n===void 0||n.resume()}}}();function lp(e,r){const n=[...e],o=n.indexOf(r);return o!==-1&&n.splice(o,1),n}function tT(e){const r=Kr(e);I.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[r])}let fp,ga=0;function nT({disabled:e}){const r=I.useRef(!1);io(()=>{if(e){let n=function(){ga--,ga===0&&(document.body.style.pointerEvents=fp)},o=function(a){r.current=a.pointerType!=="mouse"};return ga===0&&(fp=document.body.style.pointerEvents),document.body.style.pointerEvents="none",ga++,document.addEventListener("pointerup",o),()=>{r.current?document.addEventListener("click",n,{once:!0}):n(),document.removeEventListener("pointerup",o)}}},[e])}function Hr(e,r,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return r==null?void 0:r(o)}}const rT=I.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),iT=I.forwardRef((e,r)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:u,onInteractOutside:c,onDismiss:f,...h}=e,m=I.useContext(rT),[y,_]=I.useState(null),[,O]=I.useState({}),v=Gr(r,W=>_(W)),S=Array.from(m.layers),[w]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),T=S.indexOf(w),D=y?S.indexOf(y):-1,M=m.layersWithOutsidePointerEventsDisabled.size>0,R=D>=T,k=function(W){const F=Kr(W),$=I.useRef(!1);return I.useEffect(()=>{const Z=we=>{we.target&&!$.current&&pp("dismissableLayer.pointerDownOutside",F,{originalEvent:we}),$.current=!1},ne=window.setTimeout(()=>{document.addEventListener("pointerdown",Z)},0);return()=>{window.clearTimeout(ne),document.removeEventListener("pointerdown",Z)}},[F]),{onPointerDownCapture:()=>$.current=!0}}(W=>{const F=W.target,$=[...m.branches].some(Z=>Z.contains(F));R&&!$&&(a==null||a(W),c==null||c(W),W.defaultPrevented||f==null||f())}),x=function(W){const F=Kr(W),$=I.useRef(!1);return I.useEffect(()=>{const Z=ne=>{ne.target&&!$.current&&pp("dismissableLayer.focusOutside",F,{originalEvent:ne})};return document.addEventListener("focusin",Z),()=>document.removeEventListener("focusin",Z)},[F]),{onFocusCapture:()=>$.current=!0,onBlurCapture:()=>$.current=!1}}(W=>{const F=W.target;[...m.branches].some($=>$.contains(F))||(u==null||u(W),c==null||c(W),W.defaultPrevented||f==null||f())});return tT(W=>{D===m.layers.size-1&&(o==null||o(W),W.defaultPrevented||f==null||f())}),nT({disabled:n}),I.useEffect(()=>{y&&(n&&m.layersWithOutsidePointerEventsDisabled.add(y),m.layers.add(y),dp())},[y,n,m]),I.useEffect(()=>()=>{y&&(m.layers.delete(y),m.layersWithOutsidePointerEventsDisabled.delete(y),dp())},[y,m]),I.useEffect(()=>{const W=()=>O({});return document.addEventListener("dismissableLayer.update",W),()=>document.removeEventListener("dismissableLayer.update",W)},[]),I.createElement(Ei.div,gt({},h,{ref:v,style:{pointerEvents:M?R?"auto":"none":void 0,...e.style},onFocusCapture:Hr(e.onFocusCapture,x.onFocusCapture),onBlurCapture:Hr(e.onBlurCapture,x.onBlurCapture),onPointerDownCapture:Hr(e.onPointerDownCapture,k.onPointerDownCapture)}))});function dp(){const e=new Event("dismissableLayer.update");document.dispatchEvent(e)}function pp(e,r,n){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});return r&&o.addEventListener(e,r,{once:!0}),!o.dispatchEvent(a)}function hp(e){const[r,n]=I.useState(void 0);return I.useEffect(()=>{if(e){const o=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const u=a[0];let c,f;if("borderBoxSize"in u){const h=u.borderBoxSize,m=Array.isArray(h)?h[0]:h;c=m.inlineSize,f=m.blockSize}else{const h=e.getBoundingClientRect();c=h.width,f=h.height}n({width:c,height:f})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}n(void 0)},[e]),r}function oT(e,r){const n=jr.get(e);return n===void 0?(jr.set(e,{rect:{},callbacks:[r]}),jr.size===1&&(sc=requestAnimationFrame(rv))):(n.callbacks.push(r),r(e.getBoundingClientRect())),()=>{const o=jr.get(e);if(o===void 0)return;const a=o.callbacks.indexOf(r);a>-1&&o.callbacks.splice(a,1),o.callbacks.length===0&&(jr.delete(e),jr.size===0&&cancelAnimationFrame(sc))}}let sc;const jr=new Map;function rv(){const e=[];jr.forEach((r,n)=>{const o=n.getBoundingClientRect();var a,u;a=r.rect,u=o,(a.width!==u.width||a.height!==u.height||a.top!==u.top||a.right!==u.right||a.bottom!==u.bottom||a.left!==u.left)&&(r.rect=o,e.push(r))}),e.forEach(r=>{r.callbacks.forEach(n=>n(r.rect))}),sc=requestAnimationFrame(rv)}function aT(e){const[r,n]=I.useState();return I.useEffect(()=>{if(e){const o=oT(e,n);return()=>{n(void 0),o()}}},[e]),r}function iv(e,r=[]){let n=[];const o=()=>{const a=n.map(u=>I.createContext(u));return function(u){const c=(u==null?void 0:u[e])||a;return I.useMemo(()=>({[`__scope${e}`]:{...u,[e]:c}}),[u,c])}};return o.scopeName=e,[function(a,u){const c=I.createContext(u),f=n.length;function h(m){const{scope:y,children:_,...O}=m,v=(y==null?void 0:y[e][f])||c,S=I.useMemo(()=>O,Object.values(O));return I.createElement(v.Provider,{value:S},_)}return n=[...n,u],h.displayName=a+"Provider",[h,function(m,y){const _=(y==null?void 0:y[e][f])||c,O=I.useContext(_);if(O)return O;if(u!==void 0)return u;throw new Error(`\`${m}\` must be used within \`${a}\``)}]},sT(o,...r)]}function sT(...e){const r=e[0];if(e.length===1)return r;const n=()=>{const o=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(a){const u=o.reduce((c,{useScope:f,scopeName:h})=>({...c,...f(a)[`__scope${h}`]}),{});return I.useMemo(()=>({[`__scope${r.scopeName}`]:u}),[u])}};return n.scopeName=r.scopeName,n}function uT({anchorRect:e,popperSize:r,arrowSize:n,arrowOffset:o=0,side:a,sideOffset:u=0,align:c,alignOffset:f=0,shouldAvoidCollisions:h=!0,collisionBoundariesRect:m,collisionTolerance:y=0}){if(!e||!r||!m)return{popperStyles:cT,arrowStyles:Mu};const _=function(F,$,Z=0,ne=0,we){const Me=we?we.height:0,Oe=vp($,F,"x"),ue=vp($,F,"y"),ke=ue.before-Z-Me,_e=ue.after+Z+Me,Ie=Oe.before-Z-Me,qe=Oe.after+Z+Me;return{top:{start:{x:Oe.start+ne,y:ke},center:{x:Oe.center,y:ke},end:{x:Oe.end-ne,y:ke}},right:{start:{x:qe,y:ue.start+ne},center:{x:qe,y:ue.center},end:{x:qe,y:ue.end-ne}},bottom:{start:{x:Oe.start+ne,y:_e},center:{x:Oe.center,y:_e},end:{x:Oe.end-ne,y:_e}},left:{start:{x:Ie,y:ue.start+ne},center:{x:Ie,y:ue.center},end:{x:Ie,y:ue.end-ne}}}}(r,e,u,f,n),O=_[a][c];if(h===!1){const F=mp(O);let $=Mu;return n&&($=yp({popperSize:r,arrowSize:n,arrowOffset:o,side:a,align:c})),{popperStyles:{...F,"--radix-popper-transform-origin":gp(r,a,c,o,n)},arrowStyles:$,placedSide:a,placedAlign:c}}const v=DOMRect.fromRect({...r,...O}),S=(w=m,T=y,DOMRect.fromRect({width:w.width-2*T,height:w.height-2*T,x:w.left+T,y:w.top+T}));var w,T;const D=bp(v,S),M=_[wp(a)][c],R=function(F,$,Z){const ne=wp(F);return $[F]&&!Z[ne]?ne:F}(a,D,bp(DOMRect.fromRect({...r,...M}),S)),k=function(F,$,Z,ne,we){const Me=Z==="top"||Z==="bottom",Oe=Me?"left":"top",ue=Me?"right":"bottom",ke=Me?"width":"height",_e=$[ke]>F[ke];return(ne==="start"||ne==="center")&&(we[Oe]&&_e||we[ue]&&!_e)?"end":(ne==="end"||ne==="center")&&(we[ue]&&_e||we[Oe]&&!_e)?"start":ne}(r,e,a,c,D),x=mp(_[R][k]);let W=Mu;return n&&(W=yp({popperSize:r,arrowSize:n,arrowOffset:o,side:R,align:k})),{popperStyles:{...x,"--radix-popper-transform-origin":gp(r,R,k,o,n)},arrowStyles:W,placedSide:R,placedAlign:k}}function vp(e,r,n){const o=e[n==="x"?"left":"top"],a=n==="x"?"width":"height",u=e[a],c=r[a];return{before:o-c,start:o,center:o+(u-c)/2,end:o+u-c,after:o+u}}function mp(e){return{position:"absolute",top:0,left:0,minWidth:"max-content",willChange:"transform",transform:`translate3d(${Math.round(e.x+window.scrollX)}px, ${Math.round(e.y+window.scrollY)}px, 0)`}}function gp(e,r,n,o,a){const u=r==="top"||r==="bottom",c=a?a.width:0,f=a?a.height:0,h=c/2+o;let m="",y="";return u?(m={start:`${h}px`,center:"center",end:e.width-h+"px"}[n],y=r==="top"?`${e.height+f}px`:-f+"px"):(m=r==="left"?`${e.width+f}px`:-f+"px",y={start:`${h}px`,center:"center",end:e.height-h+"px"}[n]),`${m} ${y}`}const cT={position:"fixed",top:0,left:0,opacity:0,transform:"translate3d(0, -200%, 0)"},Mu={position:"absolute",opacity:0};function yp({popperSize:e,arrowSize:r,arrowOffset:n,side:o,align:a}){const u=(e.width-r.width)/2,c=(e.height-r.width)/2,f={top:0,right:90,bottom:180,left:-90}[o],h=Math.max(r.width,r.height),m={width:`${h}px`,height:`${h}px`,transform:`rotate(${f}deg)`,willChange:"transform",position:"absolute",[o]:"100%",direction:lT(o,a)};return o!=="top"&&o!=="bottom"||(a==="start"&&(m.left=`${n}px`),a==="center"&&(m.left=`${u}px`),a==="end"&&(m.right=`${n}px`)),o!=="left"&&o!=="right"||(a==="start"&&(m.top=`${n}px`),a==="center"&&(m.top=`${c}px`),a==="end"&&(m.bottom=`${n}px`)),m}function lT(e,r){return(e!=="top"&&e!=="right"||r!=="end")&&(e!=="bottom"&&e!=="left"||r==="end")?"ltr":"rtl"}function wp(e){return{top:"bottom",right:"left",bottom:"top",left:"right"}[e]}function bp(e,r){return{top:e.top<r.top,right:e.right>r.right,bottom:e.bottom>r.bottom,left:e.left<r.left}}const[ov,av]=iv("Popper"),[fT,sv]=ov("Popper"),dT=e=>{const{__scopePopper:r,children:n}=e,[o,a]=I.useState(null);return I.createElement(fT,{scope:r,anchor:o,onAnchorChange:a},n)},pT=I.forwardRef((e,r)=>{const{__scopePopper:n,virtualRef:o,...a}=e,u=sv("PopperAnchor",n),c=I.useRef(null),f=Gr(r,c);return I.useEffect(()=>{u.onAnchorChange((o==null?void 0:o.current)||c.current)}),o?null:I.createElement(Ei.div,gt({},a,{ref:f}))}),[hT,bA]=ov("PopperContent"),vT=I.forwardRef((e,r)=>{const{__scopePopper:n,side:o="bottom",sideOffset:a,align:u="center",alignOffset:c,collisionTolerance:f,avoidCollisions:h=!0,...m}=e,y=sv("PopperContent",n),[_,O]=I.useState(),v=aT(y.anchor),[S,w]=I.useState(null),T=hp(S),[D,M]=I.useState(null),R=hp(D),k=Gr(r,Me=>w(Me)),x=function(){const[Me,Oe]=I.useState(void 0);return I.useEffect(()=>{let ue;function ke(){Oe({width:window.innerWidth,height:window.innerHeight})}function _e(){window.clearTimeout(ue),ue=window.setTimeout(ke,100)}return ke(),window.addEventListener("resize",_e),()=>window.removeEventListener("resize",_e)},[]),Me}(),W=x?DOMRect.fromRect({...x,x:0,y:0}):void 0,{popperStyles:F,arrowStyles:$,placedSide:Z,placedAlign:ne}=uT({anchorRect:v,popperSize:T,arrowSize:R,arrowOffset:_,side:o,sideOffset:a,align:u,alignOffset:c,shouldAvoidCollisions:h,collisionBoundariesRect:W,collisionTolerance:f}),we=Z!==void 0;return I.createElement("div",{style:F,"data-radix-popper-content-wrapper":""},I.createElement(hT,{scope:n,arrowStyles:$,onArrowChange:M,onArrowOffsetChange:O},I.createElement(Ei.div,gt({"data-side":Z,"data-align":ne},m,{style:{...m.style,animation:we?void 0:"none"},ref:k}))))}),mT=dT,gT=pT,yT=vT;function wT({prop:e,defaultProp:r,onChange:n=()=>{}}){const[o,a]=function({defaultProp:h,onChange:m}){const y=I.useState(h),[_]=y,O=I.useRef(_),v=Kr(m);return I.useEffect(()=>{O.current!==_&&(v(_),O.current=_)},[_,O,v]),y}({defaultProp:r,onChange:n}),u=e!==void 0,c=u?e:o,f=Kr(n);return[c,I.useCallback(h=>{if(u){const m=h,y=typeof h=="function"?m(e):h;y!==e&&f(y)}else a(h)},[u,e,a,f])]}const[bT,_A]=iv("Popover",[av]),Lc=av(),[_T,fo]=bT("Popover"),ST=e=>{const{__scopePopover:r,children:n,open:o,defaultOpen:a,onOpenChange:u,modal:c=!1}=e,f=Lc(r),h=I.useRef(null),[m,y]=I.useState(!1),[_=!1,O]=wT({prop:o,defaultProp:a,onChange:u});return I.createElement(mT,f,I.createElement(_T,{scope:r,contentId:XO(),triggerRef:h,open:_,onOpenChange:O,onOpenToggle:I.useCallback(()=>O(v=>!v),[O]),hasCustomAnchor:m,onCustomAnchorAdd:I.useCallback(()=>y(!0),[]),onCustomAnchorRemove:I.useCallback(()=>y(!1),[]),modal:c},n))},ET=I.forwardRef((e,r)=>{const{__scopePopover:n,...o}=e,a=fo("PopoverTrigger",n),u=Lc(n),c=Gr(r,a.triggerRef),f=I.createElement(Ei.button,gt({type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":cv(a.open)},o,{ref:c,onClick:Hr(e.onClick,a.onOpenToggle)}));return a.hasCustomAnchor?f:I.createElement(gT,gt({asChild:!0},u),f)}),xT=I.forwardRef((e,r)=>{const{forceMount:n,...o}=e,a=fo("PopoverContent",e.__scopePopover);return I.createElement(tv,{present:n||a.open},a.modal?I.createElement(OT,gt({},o,{ref:r})):I.createElement(TT,gt({},o,{ref:r})))}),OT=I.forwardRef((e,r)=>{const{allowPinchZoom:n,portalled:o=!0,...a}=e,u=fo("PopoverContent",e.__scopePopover),c=I.useRef(null),f=Gr(r,c),h=I.useRef(!1);I.useEffect(()=>{const y=c.current;if(y)return fO(y)},[]);const m=o?nv:I.Fragment;return I.createElement(m,null,I.createElement(KO,{allowPinchZoom:n},I.createElement(uv,gt({},a,{ref:f,trapFocus:u.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Hr(e.onCloseAutoFocus,y=>{var _;y.preventDefault(),h.current||(_=u.triggerRef.current)===null||_===void 0||_.focus()}),onPointerDownOutside:Hr(e.onPointerDownOutside,y=>{const _=y.detail.originalEvent,O=_.button===0&&_.ctrlKey===!0,v=_.button===2||O;h.current=v},{checkForDefaultPrevented:!1}),onFocusOutside:Hr(e.onFocusOutside,y=>y.preventDefault(),{checkForDefaultPrevented:!1})}))))}),TT=I.forwardRef((e,r)=>{const{portalled:n=!0,...o}=e,a=fo("PopoverContent",e.__scopePopover),u=I.useRef(!1),c=n?nv:I.Fragment;return I.createElement(c,null,I.createElement(uv,gt({},o,{ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:f=>{var h,m;(h=e.onCloseAutoFocus)===null||h===void 0||h.call(e,f),f.defaultPrevented||(u.current||(m=a.triggerRef.current)===null||m===void 0||m.focus(),f.preventDefault()),u.current=!1},onInteractOutside:f=>{var h,m;(h=e.onInteractOutside)===null||h===void 0||h.call(e,f),f.defaultPrevented||(u.current=!0);const y=f.target;!((m=a.triggerRef.current)===null||m===void 0)&&m.contains(y)&&f.preventDefault()}})))}),uv=I.forwardRef((e,r)=>{const{__scopePopover:n,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:u,disableOutsidePointerEvents:c,onEscapeKeyDown:f,onPointerDownOutside:h,onFocusOutside:m,onInteractOutside:y,..._}=e,O=fo("PopoverContent",n),v=Lc(n);return ZO(),I.createElement(QO,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:a,onUnmountAutoFocus:u},I.createElement(iT,{asChild:!0,disableOutsidePointerEvents:c,onInteractOutside:y,onEscapeKeyDown:f,onPointerDownOutside:h,onFocusOutside:m,onDismiss:()=>O.onOpenChange(!1)},I.createElement(yT,gt({"data-state":cv(O.open),role:"dialog",id:O.contentId},v,_,{ref:r,style:{..._.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)"}}))))});function cv(e){return e?"open":"closed"}const CT=ST,RT=ET,PT=xT;var Ia=(e=>(e.VIDEO="video",e.CAROUSEL="carousel",e.TEXT="text",e))(Ia||{});var lv={},Xa={},Mc={},Du={},ya={exports:{}},wa={exports:{}},Ue={};/** @license React v16.13.1
126
+ `)},BO=0,mi=[];function HO(e){var r=I.useRef([]),n=I.useRef([0,0]),o=I.useRef(),a=I.useState(BO++)[0],u=I.useState(Yh)[0],c=I.useRef(e);I.useEffect(function(){c.current=e},[e]),I.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var w=ro([e.lockRef.current],(e.shards||[]).map(rp),!0).filter(Boolean);return w.forEach(function(T){return T.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),w.forEach(function(T){return T.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var f=I.useCallback(function(w,T){if("touches"in w&&w.touches.length===2)return!c.current.allowPinchZoom;var D=va(w),M=n.current,R="deltaX"in w?w.deltaX:M[0]-D[0],k="deltaY"in w?w.deltaY:M[1]-D[1],x,W=w.target,F=Math.abs(R)>Math.abs(k)?"h":"v";if("touches"in w&&F==="h"&&W.type==="range")return!1;var $=tp(F,W);if(!$)return!0;if($?x=F:(x=F==="v"?"h":"v",$=tp(F,W)),!$)return!1;if(!o.current&&"changedTouches"in w&&(R||k)&&(o.current=x),!x)return!0;var Z=o.current||x;return FO(Z,T,w,Z==="h"?R:k,!0)},[]),h=I.useCallback(function(w){var T=w;if(!(!mi.length||mi[mi.length-1]!==u)){var D="deltaY"in T?np(T):va(T),M=r.current.filter(function(x){return x.name===T.type&&(x.target===T.target||T.target===x.shadowParent)&&WO(x.delta,D)})[0];if(M&&M.should){T.cancelable&&T.preventDefault();return}if(!M){var R=(c.current.shards||[]).map(rp).filter(Boolean).filter(function(x){return x.contains(T.target)}),k=R.length>0?f(T,R[0]):!c.current.noIsolation;k&&T.cancelable&&T.preventDefault()}}},[]),m=I.useCallback(function(w,T,D,M){var R={name:w,delta:T,target:D,should:M,shadowParent:zO(D)};r.current.push(R),setTimeout(function(){r.current=r.current.filter(function(k){return k!==R})},1)},[]),y=I.useCallback(function(w){n.current=va(w),o.current=void 0},[]),_=I.useCallback(function(w){m(w.type,np(w),w.target,f(w,e.lockRef.current))},[]),O=I.useCallback(function(w){m(w.type,va(w),w.target,f(w,e.lockRef.current))},[]);I.useEffect(function(){return mi.push(u),e.setCallbacks({onScrollCapture:_,onWheelCapture:_,onTouchMoveCapture:O}),document.addEventListener("wheel",h,vi),document.addEventListener("touchmove",h,vi),document.addEventListener("touchstart",y,vi),function(){mi=mi.filter(function(w){return w!==u}),document.removeEventListener("wheel",h,vi),document.removeEventListener("touchmove",h,vi),document.removeEventListener("touchstart",y,vi)}},[]);var v=e.removeScrollBar,S=e.inert;return I.createElement(I.Fragment,null,S?I.createElement(u,{styles:UO(a)}):null,v?I.createElement(LO,{gapMode:e.gapMode}):null)}function zO(e){for(var r=null;e!==null;)e instanceof ShadowRoot&&(r=e.host,e=e.host),e=e.parentNode;return r}const qO=bO(Gh,HO);var Zh=I.forwardRef(function(e,r){return I.createElement(Ya,Mn({},e,{ref:r,sideCar:qO}))});Zh.classNames=Ya.classNames;const KO=Zh,io=globalThis!=null&&globalThis.document?I.useLayoutEffect:()=>{},GO=I["useId".toString()]||(()=>{});let YO=0;function XO(e){const[r,n]=I.useState(GO());return io(()=>{e||n(o=>o??String(YO++))},[e]),e||(r?`radix-${r}`:"")}function Qh(...e){return r=>e.forEach(n=>function(o,a){typeof o=="function"?o(a):o!=null&&(o.current=a)}(n,r))}function Gr(...e){return I.useCallback(Qh(...e),e)}const ev=I.forwardRef((e,r)=>{const{children:n,...o}=e;return I.Children.toArray(n).some(ip)?I.createElement(I.Fragment,null,I.Children.map(n,a=>ip(a)?I.createElement(ac,gt({},o,{ref:r}),a.props.children):a)):I.createElement(ac,gt({},o,{ref:r}),n)});ev.displayName="Slot";const ac=I.forwardRef((e,r)=>{const{children:n,...o}=e;return I.isValidElement(n)?I.cloneElement(n,{...JO(o,n.props),ref:Qh(r,n.ref)}):I.Children.count(n)>1?I.Children.only(null):null});ac.displayName="SlotClone";const VO=({children:e})=>I.createElement(I.Fragment,null,e);function ip(e){return I.isValidElement(e)&&e.type===VO}function JO(e,r){const n={...r};for(const o in r){const a=e[o],u=r[o];/^on[A-Z]/.test(o)?n[o]=(...c)=>{u==null||u(...c),a==null||a(...c)}:o==="style"?n[o]={...a,...u}:o==="className"&&(n[o]=[a,u].filter(Boolean).join(" "))}return{...e,...n}}const Ei=["a","button","div","h2","h3","img","li","nav","ol","p","span","svg","ul"].reduce((e,r)=>({...e,[r]:I.forwardRef((n,o)=>{const{asChild:a,...u}=n,c=a?ev:r;return I.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),I.createElement(c,gt({},u,{ref:o}))})}),{}),tv=e=>{const{present:r,children:n}=e,o=function(c){const[f,h]=I.useState(),m=I.useRef({}),y=I.useRef(c),_=I.useRef("none"),O=c?"mounted":"unmounted",[v,S]=function(w,T){return I.useReducer((D,M)=>{const R=T[D][M];return R??D},w)}(O,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return I.useEffect(()=>{const w=ma(m.current);_.current=v==="mounted"?w:"none"},[v]),io(()=>{const w=m.current,T=y.current;if(T!==c){const D=_.current,M=ma(w);c?S("MOUNT"):M==="none"||(w==null?void 0:w.display)==="none"?S("UNMOUNT"):S(T&&D!==M?"ANIMATION_OUT":"UNMOUNT"),y.current=c}},[c,S]),io(()=>{if(f){const w=D=>{const M=ma(m.current).includes(D.animationName);D.target===f&&M&&S("ANIMATION_END")},T=D=>{D.target===f&&(_.current=ma(m.current))};return f.addEventListener("animationstart",T),f.addEventListener("animationcancel",w),f.addEventListener("animationend",w),()=>{f.removeEventListener("animationstart",T),f.removeEventListener("animationcancel",w),f.removeEventListener("animationend",w)}}S("ANIMATION_END")},[f,S]),{isPresent:["mounted","unmountSuspended"].includes(v),ref:I.useCallback(w=>{w&&(m.current=getComputedStyle(w)),h(w)},[])}}(r),a=typeof n=="function"?n({present:o.isPresent}):I.Children.only(n),u=Gr(o.ref,a.ref);return typeof n=="function"||o.isPresent?I.cloneElement(a,{ref:u}):null};function ma(e){return(e==null?void 0:e.animationName)||"none"}tv.displayName="Presence";let Lu=0;function ZO(){I.useEffect(()=>{var e,r;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:op()),document.body.insertAdjacentElement("beforeend",(r=n[1])!==null&&r!==void 0?r:op()),Lu++,()=>{Lu===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(o=>o.remove()),Lu--}},[])}function op(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const nv=I.forwardRef((e,r)=>{var n,o;const{containerRef:a,style:u,...c}=e,f=(n=a==null?void 0:a.current)!==null&&n!==void 0?n:globalThis==null||(o=globalThis.document)===null||o===void 0?void 0:o.body,[,h]=I.useState({});return io(()=>{h({})},[]),f?Ba.createPortal(I.createElement(Ei.div,gt({"data-radix-portal":""},c,{ref:r,style:f===document.body?{position:"absolute",top:0,left:0,zIndex:2147483647,...u}:void 0})),f):null});function Kr(e){const r=I.useRef(e);return I.useEffect(()=>{r.current=e}),I.useMemo(()=>(...n)=>{var o;return(o=r.current)===null||o===void 0?void 0:o.call(r,...n)},[])}const ap={bubbles:!1,cancelable:!0},QO=I.forwardRef((e,r)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:a,onUnmountAutoFocus:u,...c}=e,[f,h]=I.useState(null),m=Kr(a),y=Kr(u),_=I.useRef(null),O=Gr(r,w=>h(w)),v=I.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;I.useEffect(()=>{if(o){let w=function(D){if(v.paused||!f)return;const M=D.target;f.contains(M)?_.current=M:Nr(_.current,{select:!0})},T=function(D){!v.paused&&f&&(f.contains(D.relatedTarget)||Nr(_.current,{select:!0}))};return document.addEventListener("focusin",w),document.addEventListener("focusout",T),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",T)}}},[o,f,v.paused]),I.useEffect(()=>{if(f){cp.add(v);const T=document.activeElement;if(!f.contains(T)){const D=new Event("focusScope.autoFocusOnMount",ap);f.addEventListener("focusScope.autoFocusOnMount",m),f.dispatchEvent(D),D.defaultPrevented||(function(M,{select:R=!1}={}){const k=document.activeElement;for(const x of M)if(Nr(x,{select:R}),document.activeElement!==k)return}((w=sp(f),w.filter(M=>M.tagName!=="A")),{select:!0}),document.activeElement===T&&Nr(f))}return()=>{f.removeEventListener("focusScope.autoFocusOnMount",m),setTimeout(()=>{const D=new Event("focusScope.autoFocusOnUnmount",ap);f.addEventListener("focusScope.autoFocusOnUnmount",y),f.dispatchEvent(D),D.defaultPrevented||Nr(T??document.body,{select:!0}),f.removeEventListener("focusScope.autoFocusOnUnmount",y),cp.remove(v)},0)}}var w},[f,m,y,v]);const S=I.useCallback(w=>{if(!n&&!o||v.paused)return;const T=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,D=document.activeElement;if(T&&D){const M=w.currentTarget,[R,k]=function(x){const W=sp(x),F=up(W,x),$=up(W.reverse(),x);return[F,$]}(M);R&&k?w.shiftKey||D!==k?w.shiftKey&&D===R&&(w.preventDefault(),n&&Nr(k,{select:!0})):(w.preventDefault(),n&&Nr(R,{select:!0})):D===M&&w.preventDefault()}},[n,o,v.paused]);return I.createElement(Ei.div,gt({tabIndex:-1},c,{ref:O,onKeyDown:S}))});function sp(e){const r=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const a=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||a?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)r.push(n.currentNode);return r}function up(e,r){for(const n of e)if(!eT(n,{upTo:r}))return n}function eT(e,{upTo:r}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(r!==void 0&&e===r)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Nr(e,{select:r=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(o){return o instanceof HTMLInputElement&&"select"in o}(e)&&r&&e.select()}}const cp=function(){let e=[];return{add(r){const n=e[0];r!==n&&(n==null||n.pause()),e=lp(e,r),e.unshift(r)},remove(r){var n;e=lp(e,r),(n=e[0])===null||n===void 0||n.resume()}}}();function lp(e,r){const n=[...e],o=n.indexOf(r);return o!==-1&&n.splice(o,1),n}function tT(e){const r=Kr(e);I.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[r])}let fp,ga=0;function nT({disabled:e}){const r=I.useRef(!1);io(()=>{if(e){let n=function(){ga--,ga===0&&(document.body.style.pointerEvents=fp)},o=function(a){r.current=a.pointerType!=="mouse"};return ga===0&&(fp=document.body.style.pointerEvents),document.body.style.pointerEvents="none",ga++,document.addEventListener("pointerup",o),()=>{r.current?document.addEventListener("click",n,{once:!0}):n(),document.removeEventListener("pointerup",o)}}},[e])}function Hr(e,r,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return r==null?void 0:r(o)}}const rT=I.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),iT=I.forwardRef((e,r)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:u,onInteractOutside:c,onDismiss:f,...h}=e,m=I.useContext(rT),[y,_]=I.useState(null),[,O]=I.useState({}),v=Gr(r,W=>_(W)),S=Array.from(m.layers),[w]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),T=S.indexOf(w),D=y?S.indexOf(y):-1,M=m.layersWithOutsidePointerEventsDisabled.size>0,R=D>=T,k=function(W){const F=Kr(W),$=I.useRef(!1);return I.useEffect(()=>{const Z=we=>{we.target&&!$.current&&pp("dismissableLayer.pointerDownOutside",F,{originalEvent:we}),$.current=!1},ne=window.setTimeout(()=>{document.addEventListener("pointerdown",Z)},0);return()=>{window.clearTimeout(ne),document.removeEventListener("pointerdown",Z)}},[F]),{onPointerDownCapture:()=>$.current=!0}}(W=>{const F=W.target,$=[...m.branches].some(Z=>Z.contains(F));R&&!$&&(a==null||a(W),c==null||c(W),W.defaultPrevented||f==null||f())}),x=function(W){const F=Kr(W),$=I.useRef(!1);return I.useEffect(()=>{const Z=ne=>{ne.target&&!$.current&&pp("dismissableLayer.focusOutside",F,{originalEvent:ne})};return document.addEventListener("focusin",Z),()=>document.removeEventListener("focusin",Z)},[F]),{onFocusCapture:()=>$.current=!0,onBlurCapture:()=>$.current=!1}}(W=>{const F=W.target;[...m.branches].some($=>$.contains(F))||(u==null||u(W),c==null||c(W),W.defaultPrevented||f==null||f())});return tT(W=>{D===m.layers.size-1&&(o==null||o(W),W.defaultPrevented||f==null||f())}),nT({disabled:n}),I.useEffect(()=>{y&&(n&&m.layersWithOutsidePointerEventsDisabled.add(y),m.layers.add(y),dp())},[y,n,m]),I.useEffect(()=>()=>{y&&(m.layers.delete(y),m.layersWithOutsidePointerEventsDisabled.delete(y),dp())},[y,m]),I.useEffect(()=>{const W=()=>O({});return document.addEventListener("dismissableLayer.update",W),()=>document.removeEventListener("dismissableLayer.update",W)},[]),I.createElement(Ei.div,gt({},h,{ref:v,style:{pointerEvents:M?R?"auto":"none":void 0,...e.style},onFocusCapture:Hr(e.onFocusCapture,x.onFocusCapture),onBlurCapture:Hr(e.onBlurCapture,x.onBlurCapture),onPointerDownCapture:Hr(e.onPointerDownCapture,k.onPointerDownCapture)}))});function dp(){const e=new Event("dismissableLayer.update");document.dispatchEvent(e)}function pp(e,r,n){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});return r&&o.addEventListener(e,r,{once:!0}),!o.dispatchEvent(a)}function hp(e){const[r,n]=I.useState(void 0);return I.useEffect(()=>{if(e){const o=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const u=a[0];let c,f;if("borderBoxSize"in u){const h=u.borderBoxSize,m=Array.isArray(h)?h[0]:h;c=m.inlineSize,f=m.blockSize}else{const h=e.getBoundingClientRect();c=h.width,f=h.height}n({width:c,height:f})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}n(void 0)},[e]),r}function oT(e,r){const n=jr.get(e);return n===void 0?(jr.set(e,{rect:{},callbacks:[r]}),jr.size===1&&(sc=requestAnimationFrame(rv))):(n.callbacks.push(r),r(e.getBoundingClientRect())),()=>{const o=jr.get(e);if(o===void 0)return;const a=o.callbacks.indexOf(r);a>-1&&o.callbacks.splice(a,1),o.callbacks.length===0&&(jr.delete(e),jr.size===0&&cancelAnimationFrame(sc))}}let sc;const jr=new Map;function rv(){const e=[];jr.forEach((r,n)=>{const o=n.getBoundingClientRect();var a,u;a=r.rect,u=o,(a.width!==u.width||a.height!==u.height||a.top!==u.top||a.right!==u.right||a.bottom!==u.bottom||a.left!==u.left)&&(r.rect=o,e.push(r))}),e.forEach(r=>{r.callbacks.forEach(n=>n(r.rect))}),sc=requestAnimationFrame(rv)}function aT(e){const[r,n]=I.useState();return I.useEffect(()=>{if(e){const o=oT(e,n);return()=>{n(void 0),o()}}},[e]),r}function iv(e,r=[]){let n=[];const o=()=>{const a=n.map(u=>I.createContext(u));return function(u){const c=(u==null?void 0:u[e])||a;return I.useMemo(()=>({[`__scope${e}`]:{...u,[e]:c}}),[u,c])}};return o.scopeName=e,[function(a,u){const c=I.createContext(u),f=n.length;function h(m){const{scope:y,children:_,...O}=m,v=(y==null?void 0:y[e][f])||c,S=I.useMemo(()=>O,Object.values(O));return I.createElement(v.Provider,{value:S},_)}return n=[...n,u],h.displayName=a+"Provider",[h,function(m,y){const _=(y==null?void 0:y[e][f])||c,O=I.useContext(_);if(O)return O;if(u!==void 0)return u;throw new Error(`\`${m}\` must be used within \`${a}\``)}]},sT(o,...r)]}function sT(...e){const r=e[0];if(e.length===1)return r;const n=()=>{const o=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(a){const u=o.reduce((c,{useScope:f,scopeName:h})=>({...c,...f(a)[`__scope${h}`]}),{});return I.useMemo(()=>({[`__scope${r.scopeName}`]:u}),[u])}};return n.scopeName=r.scopeName,n}function uT({anchorRect:e,popperSize:r,arrowSize:n,arrowOffset:o=0,side:a,sideOffset:u=0,align:c,alignOffset:f=0,shouldAvoidCollisions:h=!0,collisionBoundariesRect:m,collisionTolerance:y=0}){if(!e||!r||!m)return{popperStyles:cT,arrowStyles:Mu};const _=function(F,$,Z=0,ne=0,we){const Me=we?we.height:0,Oe=vp($,F,"x"),ue=vp($,F,"y"),ke=ue.before-Z-Me,_e=ue.after+Z+Me,Ie=Oe.before-Z-Me,qe=Oe.after+Z+Me;return{top:{start:{x:Oe.start+ne,y:ke},center:{x:Oe.center,y:ke},end:{x:Oe.end-ne,y:ke}},right:{start:{x:qe,y:ue.start+ne},center:{x:qe,y:ue.center},end:{x:qe,y:ue.end-ne}},bottom:{start:{x:Oe.start+ne,y:_e},center:{x:Oe.center,y:_e},end:{x:Oe.end-ne,y:_e}},left:{start:{x:Ie,y:ue.start+ne},center:{x:Ie,y:ue.center},end:{x:Ie,y:ue.end-ne}}}}(r,e,u,f,n),O=_[a][c];if(h===!1){const F=mp(O);let $=Mu;return n&&($=yp({popperSize:r,arrowSize:n,arrowOffset:o,side:a,align:c})),{popperStyles:{...F,"--radix-popper-transform-origin":gp(r,a,c,o,n)},arrowStyles:$,placedSide:a,placedAlign:c}}const v=DOMRect.fromRect({...r,...O}),S=(w=m,T=y,DOMRect.fromRect({width:w.width-2*T,height:w.height-2*T,x:w.left+T,y:w.top+T}));var w,T;const D=bp(v,S),M=_[wp(a)][c],R=function(F,$,Z){const ne=wp(F);return $[F]&&!Z[ne]?ne:F}(a,D,bp(DOMRect.fromRect({...r,...M}),S)),k=function(F,$,Z,ne,we){const Me=Z==="top"||Z==="bottom",Oe=Me?"left":"top",ue=Me?"right":"bottom",ke=Me?"width":"height",_e=$[ke]>F[ke];return(ne==="start"||ne==="center")&&(we[Oe]&&_e||we[ue]&&!_e)?"end":(ne==="end"||ne==="center")&&(we[ue]&&_e||we[Oe]&&!_e)?"start":ne}(r,e,a,c,D),x=mp(_[R][k]);let W=Mu;return n&&(W=yp({popperSize:r,arrowSize:n,arrowOffset:o,side:R,align:k})),{popperStyles:{...x,"--radix-popper-transform-origin":gp(r,R,k,o,n)},arrowStyles:W,placedSide:R,placedAlign:k}}function vp(e,r,n){const o=e[n==="x"?"left":"top"],a=n==="x"?"width":"height",u=e[a],c=r[a];return{before:o-c,start:o,center:o+(u-c)/2,end:o+u-c,after:o+u}}function mp(e){return{position:"absolute",top:0,left:0,minWidth:"max-content",willChange:"transform",transform:`translate3d(${Math.round(e.x+window.scrollX)}px, ${Math.round(e.y+window.scrollY)}px, 0)`}}function gp(e,r,n,o,a){const u=r==="top"||r==="bottom",c=a?a.width:0,f=a?a.height:0,h=c/2+o;let m="",y="";return u?(m={start:`${h}px`,center:"center",end:e.width-h+"px"}[n],y=r==="top"?`${e.height+f}px`:-f+"px"):(m=r==="left"?`${e.width+f}px`:-f+"px",y={start:`${h}px`,center:"center",end:e.height-h+"px"}[n]),`${m} ${y}`}const cT={position:"fixed",top:0,left:0,opacity:0,transform:"translate3d(0, -200%, 0)"},Mu={position:"absolute",opacity:0};function yp({popperSize:e,arrowSize:r,arrowOffset:n,side:o,align:a}){const u=(e.width-r.width)/2,c=(e.height-r.width)/2,f={top:0,right:90,bottom:180,left:-90}[o],h=Math.max(r.width,r.height),m={width:`${h}px`,height:`${h}px`,transform:`rotate(${f}deg)`,willChange:"transform",position:"absolute",[o]:"100%",direction:lT(o,a)};return o!=="top"&&o!=="bottom"||(a==="start"&&(m.left=`${n}px`),a==="center"&&(m.left=`${u}px`),a==="end"&&(m.right=`${n}px`)),o!=="left"&&o!=="right"||(a==="start"&&(m.top=`${n}px`),a==="center"&&(m.top=`${c}px`),a==="end"&&(m.bottom=`${n}px`)),m}function lT(e,r){return(e!=="top"&&e!=="right"||r!=="end")&&(e!=="bottom"&&e!=="left"||r==="end")?"ltr":"rtl"}function wp(e){return{top:"bottom",right:"left",bottom:"top",left:"right"}[e]}function bp(e,r){return{top:e.top<r.top,right:e.right>r.right,bottom:e.bottom>r.bottom,left:e.left<r.left}}const[ov,av]=iv("Popper"),[fT,sv]=ov("Popper"),dT=e=>{const{__scopePopper:r,children:n}=e,[o,a]=I.useState(null);return I.createElement(fT,{scope:r,anchor:o,onAnchorChange:a},n)},pT=I.forwardRef((e,r)=>{const{__scopePopper:n,virtualRef:o,...a}=e,u=sv("PopperAnchor",n),c=I.useRef(null),f=Gr(r,c);return I.useEffect(()=>{u.onAnchorChange((o==null?void 0:o.current)||c.current)}),o?null:I.createElement(Ei.div,gt({},a,{ref:f}))}),[hT,_A]=ov("PopperContent"),vT=I.forwardRef((e,r)=>{const{__scopePopper:n,side:o="bottom",sideOffset:a,align:u="center",alignOffset:c,collisionTolerance:f,avoidCollisions:h=!0,...m}=e,y=sv("PopperContent",n),[_,O]=I.useState(),v=aT(y.anchor),[S,w]=I.useState(null),T=hp(S),[D,M]=I.useState(null),R=hp(D),k=Gr(r,Me=>w(Me)),x=function(){const[Me,Oe]=I.useState(void 0);return I.useEffect(()=>{let ue;function ke(){Oe({width:window.innerWidth,height:window.innerHeight})}function _e(){window.clearTimeout(ue),ue=window.setTimeout(ke,100)}return ke(),window.addEventListener("resize",_e),()=>window.removeEventListener("resize",_e)},[]),Me}(),W=x?DOMRect.fromRect({...x,x:0,y:0}):void 0,{popperStyles:F,arrowStyles:$,placedSide:Z,placedAlign:ne}=uT({anchorRect:v,popperSize:T,arrowSize:R,arrowOffset:_,side:o,sideOffset:a,align:u,alignOffset:c,shouldAvoidCollisions:h,collisionBoundariesRect:W,collisionTolerance:f}),we=Z!==void 0;return I.createElement("div",{style:F,"data-radix-popper-content-wrapper":""},I.createElement(hT,{scope:n,arrowStyles:$,onArrowChange:M,onArrowOffsetChange:O},I.createElement(Ei.div,gt({"data-side":Z,"data-align":ne},m,{style:{...m.style,animation:we?void 0:"none"},ref:k}))))}),mT=dT,gT=pT,yT=vT;function wT({prop:e,defaultProp:r,onChange:n=()=>{}}){const[o,a]=function({defaultProp:h,onChange:m}){const y=I.useState(h),[_]=y,O=I.useRef(_),v=Kr(m);return I.useEffect(()=>{O.current!==_&&(v(_),O.current=_)},[_,O,v]),y}({defaultProp:r,onChange:n}),u=e!==void 0,c=u?e:o,f=Kr(n);return[c,I.useCallback(h=>{if(u){const m=h,y=typeof h=="function"?m(e):h;y!==e&&f(y)}else a(h)},[u,e,a,f])]}const[bT,SA]=iv("Popover",[av]),Lc=av(),[_T,fo]=bT("Popover"),ST=e=>{const{__scopePopover:r,children:n,open:o,defaultOpen:a,onOpenChange:u,modal:c=!1}=e,f=Lc(r),h=I.useRef(null),[m,y]=I.useState(!1),[_=!1,O]=wT({prop:o,defaultProp:a,onChange:u});return I.createElement(mT,f,I.createElement(_T,{scope:r,contentId:XO(),triggerRef:h,open:_,onOpenChange:O,onOpenToggle:I.useCallback(()=>O(v=>!v),[O]),hasCustomAnchor:m,onCustomAnchorAdd:I.useCallback(()=>y(!0),[]),onCustomAnchorRemove:I.useCallback(()=>y(!1),[]),modal:c},n))},ET=I.forwardRef((e,r)=>{const{__scopePopover:n,...o}=e,a=fo("PopoverTrigger",n),u=Lc(n),c=Gr(r,a.triggerRef),f=I.createElement(Ei.button,gt({type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":cv(a.open)},o,{ref:c,onClick:Hr(e.onClick,a.onOpenToggle)}));return a.hasCustomAnchor?f:I.createElement(gT,gt({asChild:!0},u),f)}),xT=I.forwardRef((e,r)=>{const{forceMount:n,...o}=e,a=fo("PopoverContent",e.__scopePopover);return I.createElement(tv,{present:n||a.open},a.modal?I.createElement(OT,gt({},o,{ref:r})):I.createElement(TT,gt({},o,{ref:r})))}),OT=I.forwardRef((e,r)=>{const{allowPinchZoom:n,portalled:o=!0,...a}=e,u=fo("PopoverContent",e.__scopePopover),c=I.useRef(null),f=Gr(r,c),h=I.useRef(!1);I.useEffect(()=>{const y=c.current;if(y)return fO(y)},[]);const m=o?nv:I.Fragment;return I.createElement(m,null,I.createElement(KO,{allowPinchZoom:n},I.createElement(uv,gt({},a,{ref:f,trapFocus:u.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Hr(e.onCloseAutoFocus,y=>{var _;y.preventDefault(),h.current||(_=u.triggerRef.current)===null||_===void 0||_.focus()}),onPointerDownOutside:Hr(e.onPointerDownOutside,y=>{const _=y.detail.originalEvent,O=_.button===0&&_.ctrlKey===!0,v=_.button===2||O;h.current=v},{checkForDefaultPrevented:!1}),onFocusOutside:Hr(e.onFocusOutside,y=>y.preventDefault(),{checkForDefaultPrevented:!1})}))))}),TT=I.forwardRef((e,r)=>{const{portalled:n=!0,...o}=e,a=fo("PopoverContent",e.__scopePopover),u=I.useRef(!1),c=n?nv:I.Fragment;return I.createElement(c,null,I.createElement(uv,gt({},o,{ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:f=>{var h,m;(h=e.onCloseAutoFocus)===null||h===void 0||h.call(e,f),f.defaultPrevented||(u.current||(m=a.triggerRef.current)===null||m===void 0||m.focus(),f.preventDefault()),u.current=!1},onInteractOutside:f=>{var h,m;(h=e.onInteractOutside)===null||h===void 0||h.call(e,f),f.defaultPrevented||(u.current=!0);const y=f.target;!((m=a.triggerRef.current)===null||m===void 0)&&m.contains(y)&&f.preventDefault()}})))}),uv=I.forwardRef((e,r)=>{const{__scopePopover:n,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:u,disableOutsidePointerEvents:c,onEscapeKeyDown:f,onPointerDownOutside:h,onFocusOutside:m,onInteractOutside:y,..._}=e,O=fo("PopoverContent",n),v=Lc(n);return ZO(),I.createElement(QO,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:a,onUnmountAutoFocus:u},I.createElement(iT,{asChild:!0,disableOutsidePointerEvents:c,onInteractOutside:y,onEscapeKeyDown:f,onPointerDownOutside:h,onFocusOutside:m,onDismiss:()=>O.onOpenChange(!1)},I.createElement(yT,gt({"data-state":cv(O.open),role:"dialog",id:O.contentId},v,_,{ref:r,style:{..._.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)"}}))))});function cv(e){return e?"open":"closed"}const CT=ST,RT=ET,PT=xT;var Ia=(e=>(e.VIDEO="video",e.CAROUSEL="carousel",e.TEXT="text",e))(Ia||{});var lv={},Xa={},Mc={},Du={},ya={exports:{}},wa={exports:{}},Ue={};/** @license React v16.13.1
127
127
  * react-is.production.min.js
128
128
  *
129
129
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -201,6 +201,6 @@ function print() { __p += __j.call(arguments, '') }
201
201
  `)+K+`return __p
202
202
  }`;var Ce=pd(function(){return Fe(b,re+"return "+K).apply(n,E)});if(Ce.source=K,tu(Ce))throw Ce;return Ce}function Db(t){return We(t).toLowerCase()}function kb(t){return We(t).toUpperCase()}function Nb(t,i,s){if(t=We(t),t&&(s||i===n))return _l(t);if(!t||!(i=Xt(i)))return t;var l=bn(t),p=bn(i),b=Sl(l,p),E=El(l,p)+1;return ur(l,b,E).join("")}function $b(t,i,s){if(t=We(t),t&&(s||i===n))return t.slice(0,Ol(t)+1);if(!t||!(i=Xt(i)))return t;var l=bn(t),p=El(l,bn(i))+1;return ur(l,0,p).join("")}function jb(t,i,s){if(t=We(t),t&&(s||i===n))return t.replace(N,"");if(!t||!(i=Xt(i)))return t;var l=bn(t),p=Sl(l,bn(i));return ur(l,p).join("")}function Fb(t,i){var s=ne,l=we;if(tt(i)){var p="separator"in i?i.separator:p;s="length"in i?Te(i.length):s,l="omission"in i?Xt(i.omission):l}t=We(t);var b=t.length;if(Qr(t)){var E=bn(t);b=E.length}if(s>=b)return t;var C=s-ei(l);if(C<1)return l;var L=E?ur(E,0,C).join(""):t.slice(0,C);if(p===n)return L+l;if(E&&(C+=L.length-C),nu(p)){if(t.slice(C).search(p)){var H,z=L;for(p.global||(p=ys(p.source,We(it.exec(p))+"g")),p.lastIndex=0;H=p.exec(z);)var K=H.index;L=L.slice(0,K===n?C:K)}}else if(t.indexOf(Xt(p),C)!=C){var J=L.lastIndexOf(p);J>-1&&(L=L.slice(0,J))}return L+l}function Wb(t){return t=We(t),t&&xr.test(t)?t.replace(Xr,vg):t}var Ub=si(function(t,i,s){return t+(s?" ":"")+i.toUpperCase()}),ou=hf("toUpperCase");function dd(t,i,s){return t=We(t),i=s?n:i,i===n?lg(t)?yg(t):tg(t):t.match(i)||[]}var pd=Re(function(t,i){try{return Gt(t,n,i)}catch(s){return tu(s)?s:new Se(s)}}),Bb=zn(function(t,i){return on(i,function(s){s=Ln(s),Bn(t,s,Qs(t[s],t))}),t});function Hb(t){var i=t==null?0:t.length,s=de();return t=i?et(t,function(l){if(typeof l[1]!="function")throw new an(c);return[s(l[0]),l[1]]}):[],Re(function(l){for(var p=-1;++p<i;){var b=t[p];if(Gt(b[0],this,l))return Gt(b[1],this,l)}})}function zb(t){return v0(un(t,_))}function au(t){return function(){return t}}function qb(t,i){return t==null||t!==t?i:t}var Kb=mf(),Gb=mf(!0);function Bt(t){return t}function su(t){return ql(typeof t=="function"?t:un(t,_))}function Yb(t){return Gl(un(t,_))}function Xb(t,i){return Yl(t,un(i,_))}var Vb=Re(function(t,i){return function(s){return Wi(s,t,i)}}),Jb=Re(function(t,i){return function(s){return Wi(t,s,i)}});function uu(t,i,s){var l=mt(i),p=Bo(i,l);s==null&&!(tt(i)&&(p.length||!l.length))&&(s=i,i=t,t=this,p=Bo(i,mt(i)));var b=!(tt(s)&&"chain"in s)||!!s.chain,E=Kn(t);return on(p,function(C){var L=i[C];t[C]=L,E&&(t.prototype[C]=function(){var H=this.__chain__;if(b||H){var z=t(this.__wrapped__),K=z.__actions__=Ft(this.__actions__);return K.push({func:L,args:arguments,thisArg:t}),z.__chain__=H,z}return L.apply(t,nr([this.value()],arguments))})}),t}function Zb(){return wt._===this&&(wt._=xg),this}function cu(){}function Qb(t){return t=Te(t),Re(function(i){return Xl(i,t)})}var e_=Ws(et),t_=Ws(ml),n_=Ws(fs);function hd(t){return Gs(t)?ds(Ln(t)):L0(t)}function r_(t){return function(i){return t==null?n:Lr(t,i)}}var i_=yf(),o_=yf(!0);function lu(){return[]}function fu(){return!1}function a_(){return{}}function s_(){return""}function u_(){return!0}function c_(t,i){if(t=Te(t),t<1||t>qe)return[];var s=X,l=xt(t,X);i=de(i),t-=X;for(var p=vs(l,i);++s<t;)i(s);return p}function l_(t){return xe(t)?et(t,Ln):Vt(t)?[t]:Ft(Df(We(t)))}function f_(t){var i=++Sg;return We(t)+i}var d_=Yo(function(t,i){return t+i},0),p_=Us("ceil"),h_=Yo(function(t,i){return t/i},1),v_=Us("floor");function m_(t){return t&&t.length?Uo(t,Bt,Ts):n}function g_(t,i){return t&&t.length?Uo(t,de(i,2),Ts):n}function y_(t){return wl(t,Bt)}function w_(t,i){return wl(t,de(i,2))}function b_(t){return t&&t.length?Uo(t,Bt,As):n}function __(t,i){return t&&t.length?Uo(t,de(i,2),As):n}var S_=Yo(function(t,i){return t*i},1),E_=Us("round"),x_=Yo(function(t,i){return t-i},0);function O_(t){return t&&t.length?hs(t,Bt):0}function T_(t,i){return t&&t.length?hs(t,de(i,2)):0}return g.after=Y1,g.ary=qf,g.assign=kw,g.assignIn=od,g.assignInWith=sa,g.assignWith=Nw,g.at=$w,g.before=Kf,g.bind=Qs,g.bindAll=Bb,g.bindKey=Gf,g.castArray=aw,g.chain=Bf,g.chunk=vy,g.compact=my,g.concat=gy,g.cond=Hb,g.conforms=zb,g.constant=au,g.countBy=O1,g.create=jw,g.curry=Yf,g.curryRight=Xf,g.debounce=Vf,g.defaults=Fw,g.defaultsDeep=Ww,g.defer=X1,g.delay=V1,g.difference=yy,g.differenceBy=wy,g.differenceWith=by,g.drop=_y,g.dropRight=Sy,g.dropRightWhile=Ey,g.dropWhile=xy,g.fill=Oy,g.filter=C1,g.flatMap=A1,g.flatMapDeep=I1,g.flatMapDepth=L1,g.flatten=jf,g.flattenDeep=Ty,g.flattenDepth=Cy,g.flip=J1,g.flow=Kb,g.flowRight=Gb,g.fromPairs=Ry,g.functions=Gw,g.functionsIn=Yw,g.groupBy=M1,g.initial=Ay,g.intersection=Iy,g.intersectionBy=Ly,g.intersectionWith=My,g.invert=Vw,g.invertBy=Jw,g.invokeMap=k1,g.iteratee=su,g.keyBy=N1,g.keys=mt,g.keysIn=Ut,g.map=ta,g.mapKeys=Qw,g.mapValues=eb,g.matches=Yb,g.matchesProperty=Xb,g.memoize=ra,g.merge=tb,g.mergeWith=ad,g.method=Vb,g.methodOf=Jb,g.mixin=uu,g.negate=ia,g.nthArg=Qb,g.omit=nb,g.omitBy=rb,g.once=Z1,g.orderBy=$1,g.over=e_,g.overArgs=Q1,g.overEvery=t_,g.overSome=n_,g.partial=eu,g.partialRight=Jf,g.partition=j1,g.pick=ib,g.pickBy=sd,g.property=hd,g.propertyOf=r_,g.pull=$y,g.pullAll=Wf,g.pullAllBy=jy,g.pullAllWith=Fy,g.pullAt=Wy,g.range=i_,g.rangeRight=o_,g.rearg=ew,g.reject=U1,g.remove=Uy,g.rest=tw,g.reverse=Js,g.sampleSize=H1,g.set=ab,g.setWith=sb,g.shuffle=z1,g.slice=By,g.sortBy=G1,g.sortedUniq=Xy,g.sortedUniqBy=Vy,g.split=Ab,g.spread=nw,g.tail=Jy,g.take=Zy,g.takeRight=Qy,g.takeRightWhile=e1,g.takeWhile=t1,g.tap=m1,g.throttle=rw,g.thru=ea,g.toArray=nd,g.toPairs=ud,g.toPairsIn=cd,g.toPath=l_,g.toPlainObject=id,g.transform=ub,g.unary=iw,g.union=n1,g.unionBy=r1,g.unionWith=i1,g.uniq=o1,g.uniqBy=a1,g.uniqWith=s1,g.unset=cb,g.unzip=Zs,g.unzipWith=Uf,g.update=lb,g.updateWith=fb,g.values=li,g.valuesIn=db,g.without=u1,g.words=dd,g.wrap=ow,g.xor=c1,g.xorBy=l1,g.xorWith=f1,g.zip=d1,g.zipObject=p1,g.zipObjectDeep=h1,g.zipWith=v1,g.entries=ud,g.entriesIn=cd,g.extend=od,g.extendWith=sa,uu(g,g),g.add=d_,g.attempt=pd,g.camelCase=mb,g.capitalize=ld,g.ceil=p_,g.clamp=pb,g.clone=sw,g.cloneDeep=cw,g.cloneDeepWith=lw,g.cloneWith=uw,g.conformsTo=fw,g.deburr=fd,g.defaultTo=qb,g.divide=h_,g.endsWith=gb,g.eq=Sn,g.escape=yb,g.escapeRegExp=wb,g.every=T1,g.find=R1,g.findIndex=Nf,g.findKey=Uw,g.findLast=P1,g.findLastIndex=$f,g.findLastKey=Bw,g.floor=v_,g.forEach=Hf,g.forEachRight=zf,g.forIn=Hw,g.forInRight=zw,g.forOwn=qw,g.forOwnRight=Kw,g.get=ru,g.gt=dw,g.gte=pw,g.has=Xw,g.hasIn=iu,g.head=Ff,g.identity=Bt,g.includes=D1,g.indexOf=Py,g.inRange=hb,g.invoke=Zw,g.isArguments=kr,g.isArray=xe,g.isArrayBuffer=hw,g.isArrayLike=Wt,g.isArrayLikeObject=ut,g.isBoolean=vw,g.isBuffer=cr,g.isDate=mw,g.isElement=gw,g.isEmpty=yw,g.isEqual=ww,g.isEqualWith=bw,g.isError=tu,g.isFinite=_w,g.isFunction=Kn,g.isInteger=Zf,g.isLength=oa,g.isMap=Qf,g.isMatch=Sw,g.isMatchWith=Ew,g.isNaN=xw,g.isNative=Ow,g.isNil=Cw,g.isNull=Tw,g.isNumber=ed,g.isObject=tt,g.isObjectLike=ot,g.isPlainObject=Ki,g.isRegExp=nu,g.isSafeInteger=Rw,g.isSet=td,g.isString=aa,g.isSymbol=Vt,g.isTypedArray=ci,g.isUndefined=Pw,g.isWeakMap=Aw,g.isWeakSet=Iw,g.join=Dy,g.kebabCase=bb,g.last=ln,g.lastIndexOf=ky,g.lowerCase=_b,g.lowerFirst=Sb,g.lt=Lw,g.lte=Mw,g.max=m_,g.maxBy=g_,g.mean=y_,g.meanBy=w_,g.min=b_,g.minBy=__,g.stubArray=lu,g.stubFalse=fu,g.stubObject=a_,g.stubString=s_,g.stubTrue=u_,g.multiply=S_,g.nth=Ny,g.noConflict=Zb,g.noop=cu,g.now=na,g.pad=Eb,g.padEnd=xb,g.padStart=Ob,g.parseInt=Tb,g.random=vb,g.reduce=F1,g.reduceRight=W1,g.repeat=Cb,g.replace=Rb,g.result=ob,g.round=E_,g.runInContext=A,g.sample=B1,g.size=q1,g.snakeCase=Pb,g.some=K1,g.sortedIndex=Hy,g.sortedIndexBy=zy,g.sortedIndexOf=qy,g.sortedLastIndex=Ky,g.sortedLastIndexBy=Gy,g.sortedLastIndexOf=Yy,g.startCase=Ib,g.startsWith=Lb,g.subtract=x_,g.sum=O_,g.sumBy=T_,g.template=Mb,g.times=c_,g.toFinite=Gn,g.toInteger=Te,g.toLength=rd,g.toLower=Db,g.toNumber=fn,g.toSafeInteger=Dw,g.toString=We,g.toUpper=kb,g.trim=Nb,g.trimEnd=$b,g.trimStart=jb,g.truncate=Fb,g.unescape=Wb,g.uniqueId=f_,g.upperCase=Ub,g.upperFirst=ou,g.each=Hf,g.eachRight=zf,g.first=Ff,uu(g,function(){var t={};return An(g,function(i,s){He.call(g.prototype,s)||(t[s]=i)}),t}(),{chain:!1}),g.VERSION=o,on(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){g[t].placeholder=g}),on(["drop","take"],function(t,i){De.prototype[t]=function(s){s=s===n?1:pt(Te(s),0);var l=this.__filtered__&&!i?new De(this):this.clone();return l.__filtered__?l.__takeCount__=xt(s,l.__takeCount__):l.__views__.push({size:xt(s,X),type:t+(l.__dir__<0?"Right":"")}),l},De.prototype[t+"Right"]=function(s){return this.reverse()[t](s).reverse()}}),on(["filter","map","takeWhile"],function(t,i){var s=i+1,l=s==ue||s==_e;De.prototype[t]=function(p){var b=this.clone();return b.__iteratees__.push({iteratee:de(p,3),type:s}),b.__filtered__=b.__filtered__||l,b}}),on(["head","last"],function(t,i){var s="take"+(i?"Right":"");De.prototype[t]=function(){return this[s](1).value()[0]}}),on(["initial","tail"],function(t,i){var s="drop"+(i?"":"Right");De.prototype[t]=function(){return this.__filtered__?new De(this):this[s](1)}}),De.prototype.compact=function(){return this.filter(Bt)},De.prototype.find=function(t){return this.filter(t).head()},De.prototype.findLast=function(t){return this.reverse().find(t)},De.prototype.invokeMap=Re(function(t,i){return typeof t=="function"?new De(this):this.map(function(s){return Wi(s,t,i)})}),De.prototype.reject=function(t){return this.filter(ia(de(t)))},De.prototype.slice=function(t,i){t=Te(t);var s=this;return s.__filtered__&&(t>0||i<0)?new De(s):(t<0?s=s.takeRight(-t):t&&(s=s.drop(t)),i!==n&&(i=Te(i),s=i<0?s.dropRight(-i):s.take(i-t)),s)},De.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},De.prototype.toArray=function(){return this.take(X)},An(De.prototype,function(t,i){var s=/^(?:filter|find|map|reject)|While$/.test(i),l=/^(?:head|last)$/.test(i),p=g[l?"take"+(i=="last"?"Right":""):i],b=l||/^find/.test(i);p&&(g.prototype[i]=function(){var E=this.__wrapped__,C=l?[1]:arguments,L=E instanceof De,H=C[0],z=L||xe(E),K=function(Le){var Ne=p.apply(g,nr([Le],C));return l&&J?Ne[0]:Ne};z&&s&&typeof H=="function"&&H.length!=1&&(L=z=!1);var J=this.__chain__,re=!!this.__actions__.length,pe=b&&!J,Ce=L&&!re;if(!b&&z){E=Ce?E:new De(this);var he=t.apply(E,C);return he.__actions__.push({func:ea,args:[K],thisArg:n}),new sn(he,J)}return pe&&Ce?t.apply(this,C):(he=this.thru(K),pe?l?he.value()[0]:he.value():he)})}),on(["pop","push","shift","sort","splice","unshift"],function(t){var i=To[t],s=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",l=/^(?:pop|shift)$/.test(t);g.prototype[t]=function(){var p=arguments;if(l&&!this.__chain__){var b=this.value();return i.apply(xe(b)?b:[],p)}return this[s](function(E){return i.apply(xe(E)?E:[],p)})}}),An(De.prototype,function(t,i){var s=g[i];if(s){var l=s.name+"";He.call(ii,l)||(ii[l]=[]),ii[l].push({name:i,func:s})}}),ii[Go(n,D).name]=[{name:"wrapper",func:n}],De.prototype.clone=Wg,De.prototype.reverse=Ug,De.prototype.value=Bg,g.prototype.at=g1,g.prototype.chain=y1,g.prototype.commit=w1,g.prototype.next=b1,g.prototype.plant=S1,g.prototype.reverse=E1,g.prototype.toJSON=g.prototype.valueOf=g.prototype.value=x1,g.prototype.first=g.prototype.head,Mi&&(g.prototype[Mi]=_1),g},ti=wg();Cr?((Cr.exports=ti)._=ti,ss._=ti):wt._=ti}).call(Fr)})(Ua,Ua.exports);var vn=Ua.exports;function GR(e){const[r,n]=q.useState(e),o=q.useMemo(()=>YR(r,n),[]);return{state:r,actions:{...o,set:n}}}function YR(e,r=()=>{}){return Object.keys(e).reduce((o,a)=>({...o,[`set${vn.upperFirst(a)}`]:u=>r(c=>({...c,[a]:u}))}),{})}const XR=(e,r,n={})=>{n={timeout:200,...n};const o=q.useRef(),a=()=>{o.current&&(clearTimeout(o.current),o.current=null)};return q.useCallback((u,...c)=>{a(),r&&u.detail===1&&(o.current=setTimeout(()=>{r(u,...c)},n.timeout)),u.detail%2===0&&e(u,...c)},[r,e,n.timeout])};function Jn(e){return typeof e=="function"}function $v(e){var r=function(o){Error.call(o),o.stack=new Error().stack},n=e(r);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var Yu=$v(function(e){return function(n){e(this),this.message=n?n.length+` errors occurred during unsubscription:
203
203
  `+n.map(function(o,a){return a+1+") "+o.toString()}).join(`
204
- `):"",this.name="UnsubscriptionError",this.errors=n}});function vc(e,r){if(e){var n=e.indexOf(r);0<=n&&e.splice(n,1)}}var es=function(){function e(r){this.initialTeardown=r,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var r,n,o,a,u;if(!this.closed){this.closed=!0;var c=this._parentage;if(c)if(this._parentage=null,Array.isArray(c))try{for(var f=ic(c),h=f.next();!h.done;h=f.next()){var m=h.value;m.remove(this)}}catch(w){r={error:w}}finally{try{h&&!h.done&&(n=f.return)&&n.call(f)}finally{if(r)throw r.error}}else c.remove(this);var y=this.initialTeardown;if(Jn(y))try{y()}catch(w){u=w instanceof Yu?w.errors:[w]}var _=this._finalizers;if(_){this._finalizers=null;try{for(var O=ic(_),v=O.next();!v.done;v=O.next()){var S=v.value;try{zp(S)}catch(w){u=u??[],w instanceof Yu?u=ro(ro([],$a(u)),$a(w.errors)):u.push(w)}}}catch(w){o={error:w}}finally{try{v&&!v.done&&(a=O.return)&&a.call(O)}finally{if(o)throw o.error}}}if(u)throw new Yu(u)}},e.prototype.add=function(r){var n;if(r&&r!==this)if(this.closed)zp(r);else{if(r instanceof e){if(r.closed||r._hasParent(this))return;r._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(r)}},e.prototype._hasParent=function(r){var n=this._parentage;return n===r||Array.isArray(n)&&n.includes(r)},e.prototype._addParent=function(r){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(r),n):n?[n,r]:r},e.prototype._removeParent=function(r){var n=this._parentage;n===r?this._parentage=null:Array.isArray(n)&&vc(n,r)},e.prototype.remove=function(r){var n=this._finalizers;n&&vc(n,r),r instanceof e&&r._removeParent(this)},e.EMPTY=function(){var r=new e;return r.closed=!0,r}(),e}(),jv=es.EMPTY;function Fv(e){return e instanceof es||e&&"closed"in e&&Jn(e.remove)&&Jn(e.add)&&Jn(e.unsubscribe)}function zp(e){Jn(e)?e():e.unsubscribe()}var Wv={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},mc={setTimeout:function(e,r){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];var a=mc.delegate;return a!=null&&a.setTimeout?a.setTimeout.apply(a,ro([e,r],$a(n))):setTimeout.apply(void 0,ro([e,r],$a(n)))},clearTimeout:function(e){var r=mc.delegate;return((r==null?void 0:r.clearTimeout)||clearTimeout)(e)},delegate:void 0};function VR(e){mc.setTimeout(function(){throw e})}function qp(){}function La(e){e()}var Uv=function(e){Ga(r,e);function r(n){var o=e.call(this)||this;return o.isStopped=!1,n?(o.destination=n,Fv(n)&&n.add(o)):o.destination=eP,o}return r.create=function(n,o,a){return new gc(n,o,a)},r.prototype.next=function(n){this.isStopped||this._next(n)},r.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},r.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},r.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},r.prototype._next=function(n){this.destination.next(n)},r.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},r.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},r}(es),JR=Function.prototype.bind;function Xu(e,r){return JR.call(e,r)}var ZR=function(){function e(r){this.partialObserver=r}return e.prototype.next=function(r){var n=this.partialObserver;if(n.next)try{n.next(r)}catch(o){Oa(o)}},e.prototype.error=function(r){var n=this.partialObserver;if(n.error)try{n.error(r)}catch(o){Oa(o)}else Oa(r)},e.prototype.complete=function(){var r=this.partialObserver;if(r.complete)try{r.complete()}catch(n){Oa(n)}},e}(),gc=function(e){Ga(r,e);function r(n,o,a){var u=e.call(this)||this,c;if(Jn(n)||!n)c={next:n??void 0,error:o??void 0,complete:a??void 0};else{var f;u&&Wv.useDeprecatedNextContext?(f=Object.create(n),f.unsubscribe=function(){return u.unsubscribe()},c={next:n.next&&Xu(n.next,f),error:n.error&&Xu(n.error,f),complete:n.complete&&Xu(n.complete,f)}):c=n}return u.destination=new ZR(c),u}return r}(Uv);function Oa(e){VR(e)}function QR(e){throw e}var eP={closed:!0,next:qp,error:QR,complete:qp},tP=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function nP(e){return e}function rP(e){return e.length===0?nP:e.length===1?e[0]:function(n){return e.reduce(function(o,a){return a(o)},n)}}var Kp=function(){function e(r){r&&(this._subscribe=r)}return e.prototype.lift=function(r){var n=new e;return n.source=this,n.operator=r,n},e.prototype.subscribe=function(r,n,o){var a=this,u=oP(r)?r:new gc(r,n,o);return La(function(){var c=a,f=c.operator,h=c.source;u.add(f?f.call(u,h):h?a._subscribe(u):a._trySubscribe(u))}),u},e.prototype._trySubscribe=function(r){try{return this._subscribe(r)}catch(n){r.error(n)}},e.prototype.forEach=function(r,n){var o=this;return n=Gp(n),new n(function(a,u){var c=new gc({next:function(f){try{r(f)}catch(h){u(h),c.unsubscribe()}},error:u,complete:a});o.subscribe(c)})},e.prototype._subscribe=function(r){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(r)},e.prototype[tP]=function(){return this},e.prototype.pipe=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return rP(r)(this)},e.prototype.toPromise=function(r){var n=this;return r=Gp(r),new r(function(o,a){var u;n.subscribe(function(c){return u=c},function(c){return a(c)},function(){return o(u)})})},e.create=function(r){return new e(r)},e}();function Gp(e){var r;return(r=e??Wv.Promise)!==null&&r!==void 0?r:Promise}function iP(e){return e&&Jn(e.next)&&Jn(e.error)&&Jn(e.complete)}function oP(e){return e&&e instanceof Uv||iP(e)&&Fv(e)}var aP=$v(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Oi=function(e){Ga(r,e);function r(){var n=e.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return r.prototype.lift=function(n){var o=new Yp(this,this);return o.operator=n,o},r.prototype._throwIfClosed=function(){if(this.closed)throw new aP},r.prototype.next=function(n){var o=this;La(function(){var a,u;if(o._throwIfClosed(),!o.isStopped){o.currentObservers||(o.currentObservers=Array.from(o.observers));try{for(var c=ic(o.currentObservers),f=c.next();!f.done;f=c.next()){var h=f.value;h.next(n)}}catch(m){a={error:m}}finally{try{f&&!f.done&&(u=c.return)&&u.call(c)}finally{if(a)throw a.error}}}})},r.prototype.error=function(n){var o=this;La(function(){if(o._throwIfClosed(),!o.isStopped){o.hasError=o.isStopped=!0,o.thrownError=n;for(var a=o.observers;a.length;)a.shift().error(n)}})},r.prototype.complete=function(){var n=this;La(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var o=n.observers;o.length;)o.shift().complete()}})},r.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(r.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),r.prototype._trySubscribe=function(n){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,n)},r.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},r.prototype._innerSubscribe=function(n){var o=this,a=this,u=a.hasError,c=a.isStopped,f=a.observers;return u||c?jv:(this.currentObservers=null,f.push(n),new es(function(){o.currentObservers=null,vc(f,n)}))},r.prototype._checkFinalizedStatuses=function(n){var o=this,a=o.hasError,u=o.thrownError,c=o.isStopped;a?n.error(u):c&&n.complete()},r.prototype.asObservable=function(){var n=new Kp;return n.source=this,n},r.create=function(n,o){return new Yp(n,o)},r}(Kp),Yp=function(e){Ga(r,e);function r(n,o){var a=e.call(this)||this;return a.destination=n,a.source=o,a}return r.prototype.next=function(n){var o,a;(a=(o=this.destination)===null||o===void 0?void 0:o.next)===null||a===void 0||a.call(o,n)},r.prototype.error=function(n){var o,a;(a=(o=this.destination)===null||o===void 0?void 0:o.error)===null||a===void 0||a.call(o,n)},r.prototype.complete=function(){var n,o;(o=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||o===void 0||o.call(n)},r.prototype._subscribe=function(n){var o,a;return(a=(o=this.source)===null||o===void 0?void 0:o.subscribe(n))!==null&&a!==void 0?a:jv},r}(Oi),Bv=(e=>(e.RELOAD="reload",e))(Bv||{}),Hv=(e=>(e.RENAME="rename",e))(Hv||{});const sP=new Oi,uP=new Oi,cP=new Oi;var zv=(e=>(e.SAVE_ALL="save-all",e))(zv||{});const lP=new Oi;var qv=(e=>(e.WILL_SAVE="will-save",e.DID_SAVE="did-save",e.WILL_CREATE="will-create",e.WILL_RENAME="will-rename",e.WILL_DELETE="will-delete",e.DID_CREATE="did-create",e.DID_RENAME="did-rename",e.DID_DELETE="did-delete",e))(qv||{});const fP=new Oi;function Kv(e){if(e==="")throw new Error("Please enter a valid name");if(!/^[a-zA-Z]/i.test(e))throw new Error("The name can only start with a letter");if(!/^[\w-]+$/i.test(e))throw new Error("Invalid name");return!0}function dP(e){if(!e)return null;if(typeof e=="string")try{Kv(e)}catch(r){return r.message}}function ts(e){const r=new RegExp(':(?!4D\\.\\w+)[CPK]?\\d+(?=(?:[^"\\\\]*(?:\\\\.|"(?:[^"\\\\]*\\\\.)*[^"\\\\]*"))*[^"]*$)',"gm");return e.replace(r,"")}var Wc=(e=>(e.METHODS="method",e.WEBFORMS="webform",e.CLASSES="class",e.WELCOME="welcome",e.SETTINGS="settings",e.ROOT="root",e))(Wc||{});const zr={CLASSES:"Classes",METHODS:"Methods",SHARED:"Shared",WEBFORMS:"WebForms"};var Tn=(e=>(e.FOLDER="folder",e.WEBFORM="webform",e.METHOD="method",e.CLASS="class",e.DEBUGGER="debugger",e.WELCOME="welcome",e.SETTINGS="settings",e.METHODS="method",e.WEBFORMS="webform",e.CLASSES="class",e.DEBUGGERS="debugger",e.MODELS="models",e.ROLES="roles",e.MODEL="model",e.DATA_EXPLORER="dataexplorer",e.MOBILE="mobile",e.MOBILEFORM="mform",e.FILE="file",e))(Tn||{}),Yr=(e=>(e.GET_FOLDER="getFolder",e.GET="get",e.SAVE="save",e.RENAME="rename",e.DROP="drop",e.ADD_FOLDER="addFolder",e.CREATE_FOLDER="mkdir",e.RENAME_FOLDER="renameFolder",e.DROP_FOLDER="dropFolder",e.REMOVE_ITEM="removeItem",e.MOVE_ITEM="moveItem",e.GET_INFO="getInfo",e.SAVE_CONTENT="save",e.UPDATE_CHECK="update:check",e.UPDATE_INSTALL="update:install",e.GET_APP_SETTINGS="getWebServerInfo",e.GET_FILE_CONTENT="getFileContent",e.SET_FILE_CONTENT="setFileContent",e.GET_FILES_INFO="getFilesInfo",e))(Yr||{}),Uc=(e=>(e[e.DISABLED=0]="DISABLED",e[e.ENABLED=1]="ENABLED",e))(Uc||{});const Gv="roles.json",Yv="qodlyApp.json",pP="model.4DModel";function Xv(e){const r=e.split("."),n=r.pop(),o=r.join(".").split("/")[0];switch(!0){case n==="4DModel":return Tn.MODEL;case n==="WebForm":return Tn.WEBFORM;case(["4dm","4qs","4qm"].includes(n)&&o===zr.METHODS):return Tn.METHOD;case(["4dm","4qs","4qm"].includes(n)&&o===zr.CLASSES):return Tn.CLASS;case e===Gv:return Tn.ROLES;case e===Yv:return Tn.SETTINGS;default:return Tn.WEBFORM}}function hP(e,r=!1){switch(e){case zr.WEBFORMS:case"webform":return"WebForm";case"Mobile":case"mform":return"MForm";case"class":case"method":case zr.CLASSES:case zr.METHODS:return r?"4qs":"4dm";default:return""}}function vP(e,r=""){const n=new RegExp("(?<=\\/)(\\w+)(?=\\.)").exec(e);return n?n[1]:r}class Vv{constructor(){md(this,"current",Promise.resolve())}lock(){let r;const n=new Promise(a=>{r=a}),o=this.current.then(()=>r);return this.current=n,o}}function Jv(){const e=new Vv;return async r=>{const n=await e.lock(),o=await r();return n(),o}}const Zv=vn.curry((e,r,n)=>e&&vn.get(n,e)===r),mP=vn.curry((e,r,n)=>vn.get(n,e)!==r),gP=vn.curry((e,r)=>vn.get(r,"id")!==e),yP=vn.curry((e,r)=>vn.get(r,"id")===e),wP=vn.curry((e,r)=>vn.get(r,"path")===e);function bP(e="id",r,n){return n.findIndex(Zv(e,r))!==-1}function _P(e){if(!e)return"";const{id:r,namespace:n}=e;return n?`${n}:${r}`:r}function Qv(e){return!!["bool","word","string","text","uuid","short","long","number","long64","duration","object","date","image","blob"].includes(e.type||"")}function em(e){var r;return!!(e.kind==="relatedEntities"||(r=e.type)!=null&&r.includes("Selection")||e.behavior==="relatedEntities")}function tm(e){return e.kind==="relatedEntity"||e.behavior==="relatedEntity"||!Qv(e)}function SP(e){return em(e)||tm(e)}function EP(e){return e.applyTo==="dataStore"}function xP(e){return e.applyTo==="dataClass"}function OP(e){return e.applyTo==="entity"}function TP(e){return e.applyTo==="entityCollection"}function CP(e){return e.type==="entity"}function RP(e){return e.type==="entitysel"}function nm(e){return e.dataType==="array"}function rm(e){return e.dataType==="object"}function im(e){return e.type==="scalar"}function PP(e){return nm(e)||rm(e)||im(e)}const AP=e=>e!=null&&e.type==="entity",IP=e=>e.type==="entitysel",LP=e=>e.type==="array"||e.type==="scalar"&&e.dataType==="array",MP=e=>e.type==="object"||e.type==="scalar"&&e.dataType==="object",DP=e=>e.type==="scalar"&&e.dataType==="date";function kP(){return new Promise((e,r)=>{window.addEventListener("bundle:ready",n=>n.data?e():r(n.caughtErr))})}var so=(e=>(e.capable="capable",e.incapable="incapable",e.indifferent="indifferent",e))(so||{}),om=(e=>(e.soap="soap",e.web="web",e.sql="sql",e.rest="rest",e))(om||{}),Bc=(e=>(e.table="table",e.catalog="catalog",e.currentRecord="currentRecord",e.currentSelection="currentSelection",e))(Bc||{});const NP={publishedSoap:"soap",publishedWeb:"web",publishedSql:"sql",publishedRest:"rest"};function $P(e){var u;let r={};try{const c=((u=e.match(/\/\/%attributes = (.*)/))==null?void 0:u[1])||"";r=JSON.parse(c)}catch{}const{published4DMobile:n,...o}=r;return{...{invisible:!1,shared:!1,executedOnServer:!1,preemptive:so.indifferent,publishedSoap:!1,publishedWsdl:!1,publishedWeb:!1,publishedSql:!1,publishedRest:!!n,publishedRestOptions:n||{table:"",scope:Bc.table}},...o}}function am(e){const r={};return e.invisible&&(r.invisible=!0),e.shared&&(r.shared=!0),e.executedOnServer&&(r.executedOnServer=!0),e.preemptive&&[so.capable,so.incapable].includes(e.preemptive)&&(r.preemptive=e.preemptive),e.publishedSoap&&(r.publishedSoap=!0,e.publishedWsdl&&(r.publishedWsdl=!0)),e.publishedWeb&&(r.publishedWeb=!0),e.publishedSql&&(r.publishedSql=!0),e.publishedRest&&e.publishedRestOptions&&(r.published4DMobile=e.publishedRestOptions),JSON.stringify(r).replace(/"(true|false)"/g,"$1")}function jP(e,r,n=!1){const o=vn.isString(r)?r:am(r);if(!n&&sm(e))return e;const a=um(e);return`//%attributes = ${o}\r
205
- ${a}`}function sm(e){return/^\/\/%attributes.*(?:\r\n|\n)?/g.test(e)}function um(e){return e.replace(/^\/\/%attributes.*(?:\r\n|\n)?/g,"")}const ht="/rest/$designer",wo="/rest/$designer-ext",Hc="/$shared";function FP(...e){return r=>{if(e.length===0)return r;const n={...r};return e.forEach(o=>{typeof n[o]=="string"&&(n[o]=new Date(n[o]))}),n}}class yc extends Error{constructor(r,n,o){super(),this.url=r,this.response=n,this.data=o}log(){console.error("Error while sending the request",this)}}async function Ke(e,r){const n=await window.fetch(e,r);if(/401/.test(n.status.toString())&&(window.location.href="/login.html?redirect=studio"),/^[45]/.test(n.status.toString())){let a;try{const u=await n.json();a=new yc(e,n,u)}catch{a=new yc(e,n)}throw a.log(),a}return await n.json()}function WP(e){return Ke(wo,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function UP(e){return Ke(wo,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}const cm=()=>{const{host:e,protocol:r}=window.location,n=r==="https:";return{projectOpened:!1,remoteDebuggerMode:Uc.DISABLED,baseUrl:"",qodly:!0,urls:{renderer:"/$lib/renderer/",debugger:`ws${n?"s":""}://${e}/remoteDebugger`,lsp:`ws${n?"s":""}://${e}/LSP`},isRestActive:!0}};async function BP(){const{hostname:e,host:r,protocol:n}=window.location,o=n==="https:";try{const a=await Ke(ht,{method:"POST",body:JSON.stringify({verb:Yr.GET_APP_SETTINGS}),headers:new Headers({"Content-Type":"application/json"})}),u=(()=>{if(a.rendererPath)return a.rendererPath;const c=`http://${e}:${a.webServerHTTPPort}`,f=`https://${e}:${a.webServerHTTPSPort}`;return a.webServerHTTPPort&&a.webServerHTTPSPort?o?f:c:a.webServerHTTPPort?c:f})();return{projectOpened:a.webServerHTTPSPort>0||a.webServerHTTPPort>0,remoteDebuggerMode:a.remoteDebuggerMode,baseUrl:u,qodly:typeof a.qodly>"u"?!0:a.qodly,urls:{renderer:a.rendererPath||`${u}/$lib/renderer/`,debugger:`ws${o?"s":""}://${r}/remoteDebugger`,lsp:`ws${o?"s":""}://${r}/LSP`},isRestActive:a.isRESTActive}}catch(a){return console.error(a),cm()}}async function lm(e){return await Ke(ht,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}async function HP(...e){return(await Promise.all(e.map(o=>lm({root:o,verb:Yr.GET_FOLDER})))).map(({children:o})=>o.map(({name:a,date:u,type:c})=>({name:a,type:c,date:u,path:`${c}/${a}`}))).flat()}function zP(e){return Ke(`/rest/$getWebForm/${e}`,{method:"GET"})}function qP(e){return Ke(ht,{method:"POST",headers:new Headers({"Content-Type":"application/json"}),body:JSON.stringify(e)}).then(r=>({...r,content:[Tn.METHOD,Tn.CLASS].includes(r.type)?ts(r.content):r.content}))}function KP(e){return e.type==="folder"?Ke(wo,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})}):Ke(ht,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}async function GP(e){return e.type==="folder"?(await Ke(wo,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})).deleted:(await Ke(ht,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})).deleted}function YP(e){return Ke(ht,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function XP(e){return Ke(ht,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}async function VP(e){return(await Ke(ht,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})).deleted}async function JP(...e){return await Ke(ht,{method:"POST",body:JSON.stringify({verb:Yr.GET_FILES_INFO,files:e}),headers:new Headers({"Content-Type":"application/json"})})}async function ZP(e){const r=await Ke("/api/login",{method:"POST",body:JSON.stringify({accessKey:e}),headers:new Headers({"Content-Type":"application/json"})});return r.isLogged&&r.success}async function QP(){return await Ke("/rest/$catalog/$all?$metadata=full",{method:"GET",headers:new Headers({"Content-Type":"application/json"})})}async function eA({name:e,path:r="",root:n="root",asText:o=!1}){return Ke(ht,{method:"POST",body:JSON.stringify({verb:"getFileContent",root:n,path:r,name:e,asText:o}),headers:new Headers({"Content-Type":"application/json"})})}async function tA(){try{const e=await Ke(`${Hc}/shared_datasources.json?t=${Date.now()}`,{method:"GET",headers:new Headers({"Content-Type":"application/json"})});return typeof e=="string"?JSON.parse(e):e}catch{return{}}}async function nA(){try{const e=await Ke(`${Hc}/shared_css.json?t=${Date.now()}`,{method:"GET",headers:new Headers({"Content-Type":"application/json"})});return typeof e=="string"?JSON.parse(e):e}catch{return{classes:[]}}}async function rA(){try{return await(await fetch(`monaco_theme.json?t=${Date.now()}`)).json()}catch{return null}}const iA=Jv(),oA=async e=>{const r={verb:Yr.SET_FILE_CONTENT,asText:!1,name:"shared_datasources.json",path:"",root:"shared",content:e};return iA(async()=>(await Ke(ht,{method:"POST",body:JSON.stringify(r),headers:new Headers({"Content-Type":"application/json"})}),e))},fm=async e=>{const r=await Ke(ht,{method:"POST",body:JSON.stringify({...e,verb:Yr.SET_FILE_CONTENT,root:Wc.ROOT}),headers:new Headers({"Content-Type":"application/json"})}),n=Xv(`${e.path||"Sources"}/${e.name}`);return{...r,type:n,size:0}},aA=async e=>await fm({name:"crafted_components.json",path:zr.WEBFORMS,content:e});function sA(e){return Ke(ht,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function uA(e){return Ke(ht,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function cA(e){return Ke(ht,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function lA(e){return Ke(ht,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})}).then(r=>Array.isArray(r)?r:{...r,content:["4dm","4qm","4qs"].includes(r.ext)?ts(r.content):r.content})}function fA(e){return Ke(ht,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function dA(e){const r=new RegExp(/^\((.+)(?=\))/gi).exec(e);return r!==null?r[1]:""}function pA(e){const r=new RegExp(/(->)(.*)/gi).exec(e);if(r!==null)return r[0].replace("->","");const n=/:([^)]*)$/.exec(e);return n!==null?`result : ${n[1].trim()}`:""}function hA(e){const r=dA(e).split(/[;,]/g).filter(Boolean).map(a=>{const u=a.split(":")[0].trim(),c=a.split(":")[1].trim();return{name:u,type:c}}),n=pA(e),o=n?{name:n.split(":")[0].trim(),type:n.split(":")[1].trim()}:{name:"result",type:"Variable"};return{params:r,result:o}}async function vA(e,r){const o=e.split(".").pop();try{const a=await Ke(ht,{method:"POST",body:JSON.stringify({verb:"getFunctionContent",className:r,functionName:o}),headers:new Headers({"Content-Type":"application/json"})});a.content=ts(a.content);const{params:u,result:c}=hA(a.parameters);return{...a,params:u,returns:c}}catch(a){return console.error(a),{className:r,functionName:o,filePath:e,content:"",params:[]}}}var dm=(e=>(e.STUDIO_LOADED="UA-1-0",e.WELCOME_TOUR_INIT="UA-1-3",e.WELCOME_TOUR_END="UA-1-4",e))(dm||{});function mA(e,r){fetch("/api/v1/activity",{body:JSON.stringify({AID:e,...r}),headers:{"Content-Type":"application/json"},method:"POST"}).catch(n=>{})}var pm=(e=>(e.LOCAL="local",e.SHARED="shared",e.THEME="theme",e))(pm||{}),hm=(e=>(e.WelCome="WelCome",e.ActionPanel="ActionPanel",e.SideBar="SideBar",e.Settings="Settings",e.Main="Main",e.Explorer="Explorer",e.Header="Header",e.ComponentList="ComponentList",e))(hm||{}),vm=(e=>(e[e.FILE_NOT_FOUND=1839]="FILE_NOT_FOUND",e[e.JSON_MALFORMED=554]="JSON_MALFORMED",e[e.JSON_MALFORMED_AT_LINE=550]="JSON_MALFORMED_AT_LINE",e))(vm||{});const gA={transparent:{backgroundColor:"transparent"},black:{backgroundColor:"#4a4a4a",color:"white",padding:"3px 5px",borderRadius:5},grey:{backgroundColor:"#e8e8e8",color:"#262626",padding:"3px 5px",borderRadius:5}},yA={Code:{key:"editors:code",config:{language:"4d",theme:"fd-dark"}},WebForm:{key:"editors:webforms"}};exports.API_PREFIX=ht;exports.AppLoader=SR;exports.ControlledSwitch=wR;exports.DATASOURCE_THEMES=gA;exports.DatasourcesActions=Hv;exports.DesignerRequestVerb=Yr;exports.Dialog=KS;exports.DialogBody=ch;exports.EActivity=dm;exports.EDITOR=yA;exports.EIDENTIFIERS=hm;exports.ERROR_CODES=vm;exports.EWebFormStyleClassScope=pm;exports.EXT_API_PREFIX=wo;exports.FileFolderType=Tn;exports.FolderRootPath=zr;exports.FolderRootType=Wc;exports.HTTPError=yc;exports.IPreemptive=so;exports.IPublished=om;exports.IPublishedRestScope=Bc;exports.IdentityProvider=qR;exports.Incase=$x;exports.IndentLines=$h;exports.LogoSVG=Av;exports.LspActions=qv;exports.MODEL_TAB_PATH=pP;exports.Mutex=Vv;exports.Overlay=uh;exports.Portal=Jp;exports.PublishOptions=NP;exports.ROLES_TAB_PATH=Gv;exports.RemoteDebuggerMode=Uc;exports.SETTINGS_TAB_PATH=Yv;exports.SHARED_API_PREFIX=Hc;exports.Switcher=jh;exports.TabEventsActions=zv;exports.Tip=kC;exports.TipsProvider=LC;exports.Toast=nx;exports.Tooltip=bR;exports.Tree=Nx;exports.TreeIcon=Lh;exports.TreeNode=Ac;exports.WebformActions=Bv;exports._isArrayDatasource=LP;exports._isObjectDatasource=MP;exports.addAttributesToContent=jP;exports.addFolder=YP;exports.by=Zv;exports.byId=yP;exports.byPath=wP;exports.checkUpdates=WP;exports.createFolder=sA;exports.datasourcesSubject=sP;exports.dropFile=GP;exports.dropFolder=VP;exports.exists=bP;exports.extractWebformName=vP;exports.getAppSettings=BP;exports.getCatalog=QP;exports.getDatasourceId=_P;exports.getDefaultAppSettings=cm;exports.getFile=qP;exports.getFileContent=eA;exports.getFileExtentionFromType=hP;exports.getFilesInfo=JP;exports.getFolder=lm;exports.getFolders=HP;exports.getFunctionContent=vA;exports.getMonacoTheme=rA;exports.getNodeInfo=lA;exports.getSharedCSS=nA;exports.getSharedDatasources=tA;exports.getTypeFromExtension=Xv;exports.getWebForm=zP;exports.hasAttributesString=sm;exports.http=Ke;exports.installUpdates=UP;exports.isArrayDatasource=nm;exports.isDataClassMethod=xP;exports.isDataStoreMethod=EP;exports.isDateDatasource=DP;exports.isEntity=AP;exports.isEntityDatasource=CP;exports.isEntityMethod=OP;exports.isEntitySelection=IP;exports.isEntitySelectionDatasource=RP;exports.isEntitySelectionMethod=TP;exports.isObjectDatasource=rm;exports.isRelatedAttribute=SP;exports.isRelatedEntitiesAttribute=em;exports.isRelatedEntityAttribute=tm;exports.isScalarDatasource=im;exports.isSimpleAttribute=Qv;exports.isSimpleDatasource=PP;exports.loadDS=kP;exports.log=mA;exports.login=ZP;exports.lspSubject=fP;exports.moveItem=cA;exports.outBy=mP;exports.outById=gP;exports.parseAttributes=$P;exports.queue=Jv;exports.removeAttributesString=um;exports.removeItem=uA;exports.renameFile=KP;exports.renameFolder=XP;exports.sanitizeContent=ts;exports.saveContent=fA;exports.setCraftedComponents=aA;exports.setFileContent=fm;exports.setSharedSources=oA;exports.stringifyAttributes=am;exports.tabEventsSubject=lP;exports.toastSubject=cP;exports.transformDates=FP;exports.useDidMountEffect=ER;exports.useDoubleClick=XR;exports.useFeatureFlags=zR;exports.useForwardedRef=BR;exports.useHotkeys=jR;exports.useIdentity=KR;exports.useOutsideClick=FR;exports.usePrevious=WR;exports.useStateObject=GR;exports.useStateRef=UR;exports.useTip=_v;exports.validateName=Kv;exports.validateServerSide=dP;exports.webformSubject=uP;
204
+ `):"",this.name="UnsubscriptionError",this.errors=n}});function vc(e,r){if(e){var n=e.indexOf(r);0<=n&&e.splice(n,1)}}var es=function(){function e(r){this.initialTeardown=r,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var r,n,o,a,u;if(!this.closed){this.closed=!0;var c=this._parentage;if(c)if(this._parentage=null,Array.isArray(c))try{for(var f=ic(c),h=f.next();!h.done;h=f.next()){var m=h.value;m.remove(this)}}catch(w){r={error:w}}finally{try{h&&!h.done&&(n=f.return)&&n.call(f)}finally{if(r)throw r.error}}else c.remove(this);var y=this.initialTeardown;if(Jn(y))try{y()}catch(w){u=w instanceof Yu?w.errors:[w]}var _=this._finalizers;if(_){this._finalizers=null;try{for(var O=ic(_),v=O.next();!v.done;v=O.next()){var S=v.value;try{zp(S)}catch(w){u=u??[],w instanceof Yu?u=ro(ro([],$a(u)),$a(w.errors)):u.push(w)}}}catch(w){o={error:w}}finally{try{v&&!v.done&&(a=O.return)&&a.call(O)}finally{if(o)throw o.error}}}if(u)throw new Yu(u)}},e.prototype.add=function(r){var n;if(r&&r!==this)if(this.closed)zp(r);else{if(r instanceof e){if(r.closed||r._hasParent(this))return;r._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(r)}},e.prototype._hasParent=function(r){var n=this._parentage;return n===r||Array.isArray(n)&&n.includes(r)},e.prototype._addParent=function(r){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(r),n):n?[n,r]:r},e.prototype._removeParent=function(r){var n=this._parentage;n===r?this._parentage=null:Array.isArray(n)&&vc(n,r)},e.prototype.remove=function(r){var n=this._finalizers;n&&vc(n,r),r instanceof e&&r._removeParent(this)},e.EMPTY=function(){var r=new e;return r.closed=!0,r}(),e}(),jv=es.EMPTY;function Fv(e){return e instanceof es||e&&"closed"in e&&Jn(e.remove)&&Jn(e.add)&&Jn(e.unsubscribe)}function zp(e){Jn(e)?e():e.unsubscribe()}var Wv={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},mc={setTimeout:function(e,r){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];var a=mc.delegate;return a!=null&&a.setTimeout?a.setTimeout.apply(a,ro([e,r],$a(n))):setTimeout.apply(void 0,ro([e,r],$a(n)))},clearTimeout:function(e){var r=mc.delegate;return((r==null?void 0:r.clearTimeout)||clearTimeout)(e)},delegate:void 0};function VR(e){mc.setTimeout(function(){throw e})}function qp(){}function La(e){e()}var Uv=function(e){Ga(r,e);function r(n){var o=e.call(this)||this;return o.isStopped=!1,n?(o.destination=n,Fv(n)&&n.add(o)):o.destination=eP,o}return r.create=function(n,o,a){return new gc(n,o,a)},r.prototype.next=function(n){this.isStopped||this._next(n)},r.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},r.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},r.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},r.prototype._next=function(n){this.destination.next(n)},r.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},r.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},r}(es),JR=Function.prototype.bind;function Xu(e,r){return JR.call(e,r)}var ZR=function(){function e(r){this.partialObserver=r}return e.prototype.next=function(r){var n=this.partialObserver;if(n.next)try{n.next(r)}catch(o){Oa(o)}},e.prototype.error=function(r){var n=this.partialObserver;if(n.error)try{n.error(r)}catch(o){Oa(o)}else Oa(r)},e.prototype.complete=function(){var r=this.partialObserver;if(r.complete)try{r.complete()}catch(n){Oa(n)}},e}(),gc=function(e){Ga(r,e);function r(n,o,a){var u=e.call(this)||this,c;if(Jn(n)||!n)c={next:n??void 0,error:o??void 0,complete:a??void 0};else{var f;u&&Wv.useDeprecatedNextContext?(f=Object.create(n),f.unsubscribe=function(){return u.unsubscribe()},c={next:n.next&&Xu(n.next,f),error:n.error&&Xu(n.error,f),complete:n.complete&&Xu(n.complete,f)}):c=n}return u.destination=new ZR(c),u}return r}(Uv);function Oa(e){VR(e)}function QR(e){throw e}var eP={closed:!0,next:qp,error:QR,complete:qp},tP=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function nP(e){return e}function rP(e){return e.length===0?nP:e.length===1?e[0]:function(n){return e.reduce(function(o,a){return a(o)},n)}}var Kp=function(){function e(r){r&&(this._subscribe=r)}return e.prototype.lift=function(r){var n=new e;return n.source=this,n.operator=r,n},e.prototype.subscribe=function(r,n,o){var a=this,u=oP(r)?r:new gc(r,n,o);return La(function(){var c=a,f=c.operator,h=c.source;u.add(f?f.call(u,h):h?a._subscribe(u):a._trySubscribe(u))}),u},e.prototype._trySubscribe=function(r){try{return this._subscribe(r)}catch(n){r.error(n)}},e.prototype.forEach=function(r,n){var o=this;return n=Gp(n),new n(function(a,u){var c=new gc({next:function(f){try{r(f)}catch(h){u(h),c.unsubscribe()}},error:u,complete:a});o.subscribe(c)})},e.prototype._subscribe=function(r){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(r)},e.prototype[tP]=function(){return this},e.prototype.pipe=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return rP(r)(this)},e.prototype.toPromise=function(r){var n=this;return r=Gp(r),new r(function(o,a){var u;n.subscribe(function(c){return u=c},function(c){return a(c)},function(){return o(u)})})},e.create=function(r){return new e(r)},e}();function Gp(e){var r;return(r=e??Wv.Promise)!==null&&r!==void 0?r:Promise}function iP(e){return e&&Jn(e.next)&&Jn(e.error)&&Jn(e.complete)}function oP(e){return e&&e instanceof Uv||iP(e)&&Fv(e)}var aP=$v(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Oi=function(e){Ga(r,e);function r(){var n=e.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return r.prototype.lift=function(n){var o=new Yp(this,this);return o.operator=n,o},r.prototype._throwIfClosed=function(){if(this.closed)throw new aP},r.prototype.next=function(n){var o=this;La(function(){var a,u;if(o._throwIfClosed(),!o.isStopped){o.currentObservers||(o.currentObservers=Array.from(o.observers));try{for(var c=ic(o.currentObservers),f=c.next();!f.done;f=c.next()){var h=f.value;h.next(n)}}catch(m){a={error:m}}finally{try{f&&!f.done&&(u=c.return)&&u.call(c)}finally{if(a)throw a.error}}}})},r.prototype.error=function(n){var o=this;La(function(){if(o._throwIfClosed(),!o.isStopped){o.hasError=o.isStopped=!0,o.thrownError=n;for(var a=o.observers;a.length;)a.shift().error(n)}})},r.prototype.complete=function(){var n=this;La(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var o=n.observers;o.length;)o.shift().complete()}})},r.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(r.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),r.prototype._trySubscribe=function(n){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,n)},r.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},r.prototype._innerSubscribe=function(n){var o=this,a=this,u=a.hasError,c=a.isStopped,f=a.observers;return u||c?jv:(this.currentObservers=null,f.push(n),new es(function(){o.currentObservers=null,vc(f,n)}))},r.prototype._checkFinalizedStatuses=function(n){var o=this,a=o.hasError,u=o.thrownError,c=o.isStopped;a?n.error(u):c&&n.complete()},r.prototype.asObservable=function(){var n=new Kp;return n.source=this,n},r.create=function(n,o){return new Yp(n,o)},r}(Kp),Yp=function(e){Ga(r,e);function r(n,o){var a=e.call(this)||this;return a.destination=n,a.source=o,a}return r.prototype.next=function(n){var o,a;(a=(o=this.destination)===null||o===void 0?void 0:o.next)===null||a===void 0||a.call(o,n)},r.prototype.error=function(n){var o,a;(a=(o=this.destination)===null||o===void 0?void 0:o.error)===null||a===void 0||a.call(o,n)},r.prototype.complete=function(){var n,o;(o=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||o===void 0||o.call(n)},r.prototype._subscribe=function(n){var o,a;return(a=(o=this.source)===null||o===void 0?void 0:o.subscribe(n))!==null&&a!==void 0?a:jv},r}(Oi),Bv=(e=>(e.RELOAD="reload",e))(Bv||{}),Hv=(e=>(e.RENAME="rename",e))(Hv||{});const sP=new Oi,uP=new Oi,cP=new Oi;var zv=(e=>(e.SAVE_ALL="save-all",e))(zv||{});const lP=new Oi;var qv=(e=>(e.WILL_SAVE="will-save",e.DID_SAVE="did-save",e.WILL_CREATE="will-create",e.WILL_RENAME="will-rename",e.WILL_DELETE="will-delete",e.DID_CREATE="did-create",e.DID_RENAME="did-rename",e.DID_DELETE="did-delete",e))(qv||{});const fP=new Oi;function Kv(e){if(e==="")throw new Error("Please enter a valid name");if(!/^[a-zA-Z]/i.test(e))throw new Error("The name can only start with a letter");if(!/^[\w-]+$/i.test(e))throw new Error("Invalid name");return!0}function dP(e){if(!e)return null;if(typeof e=="string")try{Kv(e)}catch(r){return r.message}}function ts(e){const r=new RegExp(':(?!4D\\.\\w+)[CPK]?\\d+(?=(?:[^"\\\\]*(?:\\\\.|"(?:[^"\\\\]*\\\\.)*[^"\\\\]*"))*[^"]*$)',"gm");return e.replace(r,"")}var Wc=(e=>(e.METHODS="method",e.WEBFORMS="webform",e.CLASSES="class",e.WELCOME="welcome",e.SETTINGS="settings",e.ROOT="root",e))(Wc||{});const zr={CLASSES:"Classes",METHODS:"Methods",SHARED:"Shared",WEBFORMS:"WebForms"};var Tn=(e=>(e.FOLDER="folder",e.WEBFORM="webform",e.METHOD="method",e.CLASS="class",e.DEBUGGER="debugger",e.WELCOME="welcome",e.SETTINGS="settings",e.METHODS="method",e.WEBFORMS="webform",e.CLASSES="class",e.DEBUGGERS="debugger",e.MODELS="models",e.ROLES="roles",e.MODEL="model",e.DATA_EXPLORER="dataexplorer",e.MOBILE="mobile",e.MOBILEFORM="mform",e.FILE="file",e))(Tn||{}),Yr=(e=>(e.GET_FOLDER="getFolder",e.GET="get",e.SAVE="save",e.RENAME="rename",e.DROP="drop",e.ADD_FOLDER="addFolder",e.CREATE_FOLDER="mkdir",e.RENAME_FOLDER="renameFolder",e.DROP_FOLDER="dropFolder",e.REMOVE_ITEM="removeItem",e.MOVE_ITEM="moveItem",e.GET_INFO="getInfo",e.SAVE_CONTENT="save",e.UPDATE_CHECK="update:check",e.UPDATE_INSTALL="update:install",e.GET_APP_SETTINGS="getWebServerInfo",e.GET_FILE_CONTENT="getFileContent",e.SET_FILE_CONTENT="setFileContent",e.GET_FILES_INFO="getFilesInfo",e))(Yr||{}),Uc=(e=>(e[e.DISABLED=0]="DISABLED",e[e.ENABLED=1]="ENABLED",e))(Uc||{});const Gv="roles.json",Yv="qodlyApp.json",pP="model.4DModel";function Xv(e){const r=e.split("."),n=r.pop(),o=r.join(".").split("/")[0];switch(!0){case n==="4DModel":return Tn.MODEL;case n==="WebForm":return Tn.WEBFORM;case(["4dm","4qs","4qm"].includes(n)&&o===zr.METHODS):return Tn.METHOD;case(["4dm","4qs","4qm"].includes(n)&&o===zr.CLASSES):return Tn.CLASS;case e===Gv:return Tn.ROLES;case e===Yv:return Tn.SETTINGS;default:return Tn.WEBFORM}}function hP(e,r=!1){switch(e){case zr.WEBFORMS:case"webform":return"WebForm";case"Mobile":case"mform":return"MForm";case"class":case"method":case zr.CLASSES:case zr.METHODS:return r?"4qs":"4dm";default:return""}}function vP(e,r=""){const n=new RegExp("(?<=\\/)(\\w+)(?=\\.)").exec(e);return n?n[1]:r}class Vv{constructor(){md(this,"current",Promise.resolve())}lock(){let r;const n=new Promise(a=>{r=a}),o=this.current.then(()=>r);return this.current=n,o}}function Jv(){const e=new Vv;return async r=>{const n=await e.lock(),o=await r();return n(),o}}const Zv=vn.curry((e,r,n)=>e&&vn.get(n,e)===r),mP=vn.curry((e,r,n)=>vn.get(n,e)!==r),gP=vn.curry((e,r)=>vn.get(r,"id")!==e),yP=vn.curry((e,r)=>vn.get(r,"id")===e),wP=vn.curry((e,r)=>vn.get(r,"path")===e);function bP(e="id",r,n){return n.findIndex(Zv(e,r))!==-1}function _P(e){if(!e)return"";const{id:r,namespace:n}=e;return n?`${n}:${r}`:r}function Qv(e){return["bool","word","string","text","uuid","short","long","number","long64","duration","object","date","image","blob"].includes(e.type||"")}function SP(e){return e.type==="object"}function em(e){var r;return e.kind==="relatedEntities"||((r=e.type)==null?void 0:r.includes("Selection"))||e.behavior==="relatedEntities"}function tm(e){return e.kind==="relatedEntity"||e.behavior==="relatedEntity"||!Qv(e)}function EP(e){return em(e)||tm(e)}function xP(e){return e.applyTo==="dataStore"}function OP(e){return e.applyTo==="dataClass"}function TP(e){return e.applyTo==="entity"}function CP(e){return e.applyTo==="entityCollection"}function RP(e){return e.type==="entity"}function PP(e){return e.type==="entitysel"}function nm(e){return e.dataType==="array"}function rm(e){return e.dataType==="object"}function im(e){return e.type==="scalar"}function AP(e){return nm(e)||rm(e)||im(e)}const IP=e=>e!=null&&e.type==="entity",LP=e=>e.type==="entitysel",MP=e=>e.type==="array"||e.type==="scalar"&&e.dataType==="array",DP=e=>e.type==="object"||e.type==="scalar"&&e.dataType==="object",kP=e=>e.type==="scalar"&&e.dataType==="date";function NP(){return new Promise((e,r)=>{window.addEventListener("bundle:ready",n=>n.data?e():r(n.caughtErr))})}var so=(e=>(e.capable="capable",e.incapable="incapable",e.indifferent="indifferent",e))(so||{}),om=(e=>(e.soap="soap",e.web="web",e.sql="sql",e.rest="rest",e))(om||{}),Bc=(e=>(e.table="table",e.catalog="catalog",e.currentRecord="currentRecord",e.currentSelection="currentSelection",e))(Bc||{});const $P={publishedSoap:"soap",publishedWeb:"web",publishedSql:"sql",publishedRest:"rest"};function jP(e){var u;let r={};try{const c=((u=e.match(/\/\/%attributes = (.*)/))==null?void 0:u[1])||"";r=JSON.parse(c)}catch{}const{published4DMobile:n,...o}=r;return{...{invisible:!1,shared:!1,executedOnServer:!1,preemptive:so.indifferent,publishedSoap:!1,publishedWsdl:!1,publishedWeb:!1,publishedSql:!1,publishedRest:!!n,publishedRestOptions:n||{table:"",scope:Bc.table}},...o}}function am(e){const r={};return e.invisible&&(r.invisible=!0),e.shared&&(r.shared=!0),e.executedOnServer&&(r.executedOnServer=!0),e.preemptive&&[so.capable,so.incapable].includes(e.preemptive)&&(r.preemptive=e.preemptive),e.publishedSoap&&(r.publishedSoap=!0,e.publishedWsdl&&(r.publishedWsdl=!0)),e.publishedWeb&&(r.publishedWeb=!0),e.publishedSql&&(r.publishedSql=!0),e.publishedRest&&e.publishedRestOptions&&(r.published4DMobile=e.publishedRestOptions),JSON.stringify(r).replace(/"(true|false)"/g,"$1")}function FP(e,r,n=!1){const o=vn.isString(r)?r:am(r);if(!n&&sm(e))return e;const a=um(e);return`//%attributes = ${o}\r
205
+ ${a}`}function sm(e){return/^\/\/%attributes.*(?:\r\n|\n)?/g.test(e)}function um(e){return e.replace(/^\/\/%attributes.*(?:\r\n|\n)?/g,"")}const ht="/rest/$designer",wo="/rest/$designer-ext",Hc="/$shared";function WP(...e){return r=>{if(e.length===0)return r;const n={...r};return e.forEach(o=>{typeof n[o]=="string"&&(n[o]=new Date(n[o]))}),n}}class yc extends Error{constructor(r,n,o){super(),this.url=r,this.response=n,this.data=o}log(){console.error("Error while sending the request",this)}}async function Ke(e,r){const n=await window.fetch(e,r);if(/401/.test(n.status.toString())&&(window.location.href="/login.html?redirect=studio"),/^[45]/.test(n.status.toString())){let a;try{const u=await n.json();a=new yc(e,n,u)}catch{a=new yc(e,n)}throw a.log(),a}return await n.json()}function UP(e){return Ke(wo,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function BP(e){return Ke(wo,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}const cm=()=>{const{host:e,protocol:r}=window.location,n=r==="https:";return{projectOpened:!1,remoteDebuggerMode:Uc.DISABLED,baseUrl:"",qodly:!0,urls:{renderer:"/$lib/renderer/",debugger:`ws${n?"s":""}://${e}/remoteDebugger`,lsp:`ws${n?"s":""}://${e}/LSP`},isRestActive:!0}};async function HP(){const{hostname:e,host:r,protocol:n}=window.location,o=n==="https:";try{const a=await Ke(ht,{method:"POST",body:JSON.stringify({verb:Yr.GET_APP_SETTINGS}),headers:new Headers({"Content-Type":"application/json"})}),u=(()=>{if(a.rendererPath)return a.rendererPath;const c=`http://${e}:${a.webServerHTTPPort}`,f=`https://${e}:${a.webServerHTTPSPort}`;return a.webServerHTTPPort&&a.webServerHTTPSPort?o?f:c:a.webServerHTTPPort?c:f})();return{projectOpened:a.webServerHTTPSPort>0||a.webServerHTTPPort>0,remoteDebuggerMode:a.remoteDebuggerMode,baseUrl:u,qodly:typeof a.qodly>"u"?!0:a.qodly,urls:{renderer:a.rendererPath||`${u}/$lib/renderer/`,debugger:`ws${o?"s":""}://${r}/remoteDebugger`,lsp:`ws${o?"s":""}://${r}/LSP`},isRestActive:a.isRESTActive}}catch(a){return console.error(a),cm()}}async function lm(e){return await Ke(ht,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}async function zP(...e){return(await Promise.all(e.map(o=>lm({root:o,verb:Yr.GET_FOLDER})))).map(({children:o})=>o.map(({name:a,date:u,type:c})=>({name:a,type:c,date:u,path:`${c}/${a}`}))).flat()}function qP(e){return Ke(`/rest/$getWebForm/${e}`,{method:"GET"})}function KP(e){return Ke(ht,{method:"POST",headers:new Headers({"Content-Type":"application/json"}),body:JSON.stringify(e)}).then(r=>({...r,content:[Tn.METHOD,Tn.CLASS].includes(r.type)?ts(r.content):r.content}))}function GP(e){return e.type==="folder"?Ke(wo,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})}):Ke(ht,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}async function YP(e){return e.type==="folder"?(await Ke(wo,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})).deleted:(await Ke(ht,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})).deleted}function XP(e){return Ke(ht,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function VP(e){return Ke(ht,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}async function JP(e){return(await Ke(ht,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})).deleted}async function ZP(...e){return await Ke(ht,{method:"POST",body:JSON.stringify({verb:Yr.GET_FILES_INFO,files:e}),headers:new Headers({"Content-Type":"application/json"})})}async function QP(e){const r=await Ke("/api/login",{method:"POST",body:JSON.stringify({accessKey:e}),headers:new Headers({"Content-Type":"application/json"})});return r.isLogged&&r.success}async function eA(){return await Ke("/rest/$catalog/$all?$metadata=full",{method:"GET",headers:new Headers({"Content-Type":"application/json"})})}async function tA({name:e,path:r="",root:n="root",asText:o=!1}){return Ke(ht,{method:"POST",body:JSON.stringify({verb:"getFileContent",root:n,path:r,name:e,asText:o}),headers:new Headers({"Content-Type":"application/json"})})}async function nA(){try{const e=await Ke(`${Hc}/shared_datasources.json?t=${Date.now()}`,{method:"GET",headers:new Headers({"Content-Type":"application/json"})});return typeof e=="string"?JSON.parse(e):e}catch{return{}}}async function rA(){try{const e=await Ke(`${Hc}/shared_css.json?t=${Date.now()}`,{method:"GET",headers:new Headers({"Content-Type":"application/json"})});return typeof e=="string"?JSON.parse(e):e}catch{return{classes:[]}}}async function iA(){try{return await(await fetch(`monaco_theme.json?t=${Date.now()}`)).json()}catch{return null}}const oA=Jv(),aA=async e=>{const r={verb:Yr.SET_FILE_CONTENT,asText:!1,name:"shared_datasources.json",path:"",root:"shared",content:e};return oA(async()=>(await Ke(ht,{method:"POST",body:JSON.stringify(r),headers:new Headers({"Content-Type":"application/json"})}),e))},fm=async e=>{const r=await Ke(ht,{method:"POST",body:JSON.stringify({...e,verb:Yr.SET_FILE_CONTENT,root:Wc.ROOT}),headers:new Headers({"Content-Type":"application/json"})}),n=Xv(`${e.path||"Sources"}/${e.name}`);return{...r,type:n,size:0}},sA=async e=>await fm({name:"crafted_components.json",path:zr.WEBFORMS,content:e});function uA(e){return Ke(ht,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function cA(e){return Ke(ht,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function lA(e){return Ke(ht,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function fA(e){return Ke(ht,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})}).then(r=>Array.isArray(r)?r:{...r,content:["4dm","4qm","4qs"].includes(r.ext)?ts(r.content):r.content})}function dA(e){return Ke(ht,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function pA(e){const r=new RegExp(/^\((.+)(?=\))/gi).exec(e);return r!==null?r[1]:""}function hA(e){const r=new RegExp(/(->)(.*)/gi).exec(e);if(r!==null)return r[0].replace("->","");const n=/:([^)]*)$/.exec(e);return n!==null?`result : ${n[1].trim()}`:""}function vA(e){const r=pA(e).split(/[;,]/g).filter(Boolean).map(a=>{const u=a.split(":")[0].trim(),c=a.split(":")[1].trim();return{name:u,type:c}}),n=hA(e),o=n?{name:n.split(":")[0].trim(),type:n.split(":")[1].trim()}:{name:"result",type:"Variable"};return{params:r,result:o}}async function mA(e,r){const o=e.split(".").pop();try{const a=await Ke(ht,{method:"POST",body:JSON.stringify({verb:"getFunctionContent",className:r,functionName:o}),headers:new Headers({"Content-Type":"application/json"})});a.content=ts(a.content);const{params:u,result:c}=vA(a.parameters);return{...a,params:u,returns:c}}catch(a){return console.error(a),{className:r,functionName:o,filePath:e,content:"",params:[]}}}var dm=(e=>(e.STUDIO_LOADED="UA-1-0",e.WELCOME_TOUR_INIT="UA-1-3",e.WELCOME_TOUR_END="UA-1-4",e))(dm||{});function gA(e,r){fetch("/api/v1/activity",{body:JSON.stringify({AID:e,...r}),headers:{"Content-Type":"application/json"},method:"POST"}).catch(n=>{})}var pm=(e=>(e.LOCAL="local",e.SHARED="shared",e.THEME="theme",e))(pm||{}),hm=(e=>(e.WelCome="WelCome",e.ActionPanel="ActionPanel",e.SideBar="SideBar",e.Settings="Settings",e.Main="Main",e.Explorer="Explorer",e.Header="Header",e.ComponentList="ComponentList",e))(hm||{}),vm=(e=>(e[e.FILE_NOT_FOUND=1839]="FILE_NOT_FOUND",e[e.JSON_MALFORMED=554]="JSON_MALFORMED",e[e.JSON_MALFORMED_AT_LINE=550]="JSON_MALFORMED_AT_LINE",e))(vm||{});const yA={transparent:{backgroundColor:"transparent"},black:{backgroundColor:"#4a4a4a",color:"white",padding:"3px 5px",borderRadius:5},grey:{backgroundColor:"#e8e8e8",color:"#262626",padding:"3px 5px",borderRadius:5}},wA={Code:{key:"editors:code",config:{language:"4d",theme:"fd-dark"}},WebForm:{key:"editors:webforms"}};exports.API_PREFIX=ht;exports.AppLoader=SR;exports.ControlledSwitch=wR;exports.DATASOURCE_THEMES=yA;exports.DatasourcesActions=Hv;exports.DesignerRequestVerb=Yr;exports.Dialog=KS;exports.DialogBody=ch;exports.EActivity=dm;exports.EDITOR=wA;exports.EIDENTIFIERS=hm;exports.ERROR_CODES=vm;exports.EWebFormStyleClassScope=pm;exports.EXT_API_PREFIX=wo;exports.FileFolderType=Tn;exports.FolderRootPath=zr;exports.FolderRootType=Wc;exports.HTTPError=yc;exports.IPreemptive=so;exports.IPublished=om;exports.IPublishedRestScope=Bc;exports.IdentityProvider=qR;exports.Incase=$x;exports.IndentLines=$h;exports.LogoSVG=Av;exports.LspActions=qv;exports.MODEL_TAB_PATH=pP;exports.Mutex=Vv;exports.Overlay=uh;exports.Portal=Jp;exports.PublishOptions=$P;exports.ROLES_TAB_PATH=Gv;exports.RemoteDebuggerMode=Uc;exports.SETTINGS_TAB_PATH=Yv;exports.SHARED_API_PREFIX=Hc;exports.Switcher=jh;exports.TabEventsActions=zv;exports.Tip=kC;exports.TipsProvider=LC;exports.Toast=nx;exports.Tooltip=bR;exports.Tree=Nx;exports.TreeIcon=Lh;exports.TreeNode=Ac;exports.WebformActions=Bv;exports._isArrayDatasource=MP;exports._isObjectDatasource=DP;exports.addAttributesToContent=FP;exports.addFolder=XP;exports.by=Zv;exports.byId=yP;exports.byPath=wP;exports.checkUpdates=UP;exports.createFolder=uA;exports.datasourcesSubject=sP;exports.dropFile=YP;exports.dropFolder=JP;exports.exists=bP;exports.extractWebformName=vP;exports.getAppSettings=HP;exports.getCatalog=eA;exports.getDatasourceId=_P;exports.getDefaultAppSettings=cm;exports.getFile=KP;exports.getFileContent=tA;exports.getFileExtentionFromType=hP;exports.getFilesInfo=ZP;exports.getFolder=lm;exports.getFolders=zP;exports.getFunctionContent=mA;exports.getMonacoTheme=iA;exports.getNodeInfo=fA;exports.getSharedCSS=rA;exports.getSharedDatasources=nA;exports.getTypeFromExtension=Xv;exports.getWebForm=qP;exports.hasAttributesString=sm;exports.http=Ke;exports.installUpdates=BP;exports.isArrayDatasource=nm;exports.isDataClassMethod=OP;exports.isDataStoreMethod=xP;exports.isDateDatasource=kP;exports.isEntity=IP;exports.isEntityDatasource=RP;exports.isEntityMethod=TP;exports.isEntitySelection=LP;exports.isEntitySelectionDatasource=PP;exports.isEntitySelectionMethod=CP;exports.isObjectAttribute=SP;exports.isObjectDatasource=rm;exports.isRelatedAttribute=EP;exports.isRelatedEntitiesAttribute=em;exports.isRelatedEntityAttribute=tm;exports.isScalarDatasource=im;exports.isSimpleAttribute=Qv;exports.isSimpleDatasource=AP;exports.loadDS=NP;exports.log=gA;exports.login=QP;exports.lspSubject=fP;exports.moveItem=lA;exports.outBy=mP;exports.outById=gP;exports.parseAttributes=jP;exports.queue=Jv;exports.removeAttributesString=um;exports.removeItem=cA;exports.renameFile=GP;exports.renameFolder=VP;exports.sanitizeContent=ts;exports.saveContent=dA;exports.setCraftedComponents=sA;exports.setFileContent=fm;exports.setSharedSources=aA;exports.stringifyAttributes=am;exports.tabEventsSubject=lP;exports.toastSubject=cP;exports.transformDates=WP;exports.useDidMountEffect=ER;exports.useDoubleClick=XR;exports.useFeatureFlags=zR;exports.useForwardedRef=BR;exports.useHotkeys=jR;exports.useIdentity=KR;exports.useOutsideClick=FR;exports.usePrevious=WR;exports.useStateObject=GR;exports.useStateRef=UR;exports.useTip=_v;exports.validateName=Kv;exports.validateServerSide=dP;exports.webformSubject=uP;
206
206
  //# sourceMappingURL=index.cjs.js.map