@ws-ui/shared 1.11.1 → 1.11.3-rc1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -1,157 +1,157 @@
1
- "use strict";var pO=Object.defineProperty;var sh=e=>{throw TypeError(e)};var hO=(e,t,r)=>t in e?pO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var me=(e,t,r)=>hO(e,typeof t!="symbol"?t+"":t,r),gl=(e,t,r)=>t.has(e)||sh("Cannot "+r);var re=(e,t,r)=>(gl(e,t,"read from private field"),r?r.call(e):t.get(e)),xt=(e,t,r)=>t.has(e)?sh("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Ye=(e,t,r,i)=>(gl(e,t,"write to private field"),i?i.call(e,r):t.set(e,r),r),$e=(e,t,r)=>(gl(e,t,"access private method"),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const D=require("react/jsx-runtime"),W=require("react"),Fo=require("react-dom"),tt=require("@ws-ui/icons"),sc=require("@emotion/react"),gO=require("re-resizable");function zv(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const $=zv(W),vO=zv(Fo),Wv=({children:e,container:t=document.body})=>Fo.createPortal(e,t);var ah=function(t){return t.reduce(function(r,i){var s=i[0],a=i[1];return r[s]=a,r},{})},uh=typeof window<"u"&&window.document&&window.document.createElement?$.useLayoutEffect:$.useEffect,It="top",or="bottom",sr="right",Lt="left",Ic="auto",Do=[It,or,sr,Lt],mi="start",Oo="end",mO="clippingParents",Bv="viewport",Bi="popper",yO="reference",lh=Do.reduce(function(e,t){return e.concat([t+"-"+mi,t+"-"+Oo])},[]),Uv=[].concat(Do,[Ic]).reduce(function(e,t){return e.concat([t,t+"-"+mi,t+"-"+Oo])},[]),bO="beforeRead",wO="read",xO="afterRead",SO="beforeMain",EO="main",_O="afterMain",OO="beforeWrite",AO="write",TO="afterWrite",RO=[bO,wO,xO,SO,EO,_O,OO,AO,TO];function Pr(e){return e?(e.nodeName||"").toLowerCase():null}function Ht(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Wn(e){var t=Ht(e).Element;return e instanceof t||e instanceof Element}function ir(e){var t=Ht(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Lc(e){if(typeof ShadowRoot>"u")return!1;var t=Ht(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function PO(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var i=t.styles[r]||{},s=t.attributes[r]||{},a=t.elements[r];!ir(a)||!Pr(a)||(Object.assign(a.style,i),Object.keys(s).forEach(function(l){var c=s[l];c===!1?a.removeAttribute(l):a.setAttribute(l,c===!0?"":c)}))})}function CO(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(i){var s=t.elements[i],a=t.attributes[i]||{},l=Object.keys(t.styles.hasOwnProperty(i)?t.styles[i]:r[i]),c=l.reduce(function(f,m){return f[m]="",f},{});!ir(s)||!Pr(s)||(Object.assign(s.style,c),Object.keys(a).forEach(function(f){s.removeAttribute(f)}))})}}const kO={name:"applyStyles",enabled:!0,phase:"write",fn:PO,effect:CO,requires:["computeStyles"]};function Tr(e){return e.split("-")[0]}var jn=Math.max,ha=Math.min,yi=Math.round;function ac(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Hv(){return!/^((?!chrome|android).)*safari/i.test(ac())}function bi(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var i=e.getBoundingClientRect(),s=1,a=1;t&&ir(e)&&(s=e.offsetWidth>0&&yi(i.width)/e.offsetWidth||1,a=e.offsetHeight>0&&yi(i.height)/e.offsetHeight||1);var l=Wn(e)?Ht(e):window,c=l.visualViewport,f=!Hv()&&r,m=(i.left+(f&&c?c.offsetLeft:0))/s,v=(i.top+(f&&c?c.offsetTop:0))/a,g=i.width/s,p=i.height/a;return{width:g,height:p,top:v,right:m+g,bottom:v+p,left:m,x:m,y:v}}function Mc(e){var t=bi(e),r=e.offsetWidth,i=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:i}}function qv(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&Lc(r)){var i=t;do{if(i&&e.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function Gr(e){return Ht(e).getComputedStyle(e)}function $O(e){return["table","td","th"].indexOf(Pr(e))>=0}function vn(e){return((Wn(e)?e.ownerDocument:e.document)||window.document).documentElement}function Pa(e){return Pr(e)==="html"?e:e.assignedSlot||e.parentNode||(Lc(e)?e.host:null)||vn(e)}function ch(e){return!ir(e)||Gr(e).position==="fixed"?null:e.offsetParent}function IO(e){var t=/firefox/i.test(ac()),r=/Trident/i.test(ac());if(r&&ir(e)){var i=Gr(e);if(i.position==="fixed")return null}var s=Pa(e);for(Lc(s)&&(s=s.host);ir(s)&&["html","body"].indexOf(Pr(s))<0;){var a=Gr(s);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||t&&a.willChange==="filter"||t&&a.filter&&a.filter!=="none")return s;s=s.parentNode}return null}function No(e){for(var t=Ht(e),r=ch(e);r&&$O(r)&&Gr(r).position==="static";)r=ch(r);return r&&(Pr(r)==="html"||Pr(r)==="body"&&Gr(r).position==="static")?t:r||IO(e)||t}function Fc(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function wo(e,t,r){return jn(e,ha(t,r))}function LO(e,t,r){var i=wo(e,t,r);return i>r?r:i}function Zv(){return{top:0,right:0,bottom:0,left:0}}function Gv(e){return Object.assign({},Zv(),e)}function Kv(e,t){return t.reduce(function(r,i){return r[i]=e,r},{})}var MO=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,Gv(typeof t!="number"?t:Kv(t,Do))};function FO(e){var t,r=e.state,i=e.name,s=e.options,a=r.elements.arrow,l=r.modifiersData.popperOffsets,c=Tr(r.placement),f=Fc(c),m=[Lt,sr].indexOf(c)>=0,v=m?"height":"width";if(!(!a||!l)){var g=MO(s.padding,r),p=Mc(a),b=f==="y"?It:Lt,x=f==="y"?or:sr,d=r.rects.reference[v]+r.rects.reference[f]-l[f]-r.rects.popper[v],w=l[f]-r.rects.reference[f],h=No(a),S=h?f==="y"?h.clientHeight||0:h.clientWidth||0:0,E=d/2-w/2,R=g[b],O=S-p[v]-g[x],k=S/2-p[v]/2+E,B=wo(R,k,O),M=f;r.modifiersData[i]=(t={},t[M]=B,t.centerOffset=B-k,t)}}function DO(e){var t=e.state,r=e.options,i=r.element,s=i===void 0?"[data-popper-arrow]":i;s!=null&&(typeof s=="string"&&(s=t.elements.popper.querySelector(s),!s)||qv(t.elements.popper,s)&&(t.elements.arrow=s))}const NO={name:"arrow",enabled:!0,phase:"main",fn:FO,effect:DO,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function wi(e){return e.split("-")[1]}var jO={top:"auto",right:"auto",bottom:"auto",left:"auto"};function zO(e,t){var r=e.x,i=e.y,s=t.devicePixelRatio||1;return{x:yi(r*s)/s||0,y:yi(i*s)/s||0}}function fh(e){var t,r=e.popper,i=e.popperRect,s=e.placement,a=e.variation,l=e.offsets,c=e.position,f=e.gpuAcceleration,m=e.adaptive,v=e.roundOffsets,g=e.isFixed,p=l.x,b=p===void 0?0:p,x=l.y,d=x===void 0?0:x,w=typeof v=="function"?v({x:b,y:d}):{x:b,y:d};b=w.x,d=w.y;var h=l.hasOwnProperty("x"),S=l.hasOwnProperty("y"),E=Lt,R=It,O=window;if(m){var k=No(r),B="clientHeight",M="clientWidth";if(k===Ht(r)&&(k=vn(r),Gr(k).position!=="static"&&c==="absolute"&&(B="scrollHeight",M="scrollWidth")),k=k,s===It||(s===Lt||s===sr)&&a===Oo){R=or;var F=g&&k===O&&O.visualViewport?O.visualViewport.height:k[B];d-=F-i.height,d*=f?1:-1}if(s===Lt||(s===It||s===or)&&a===Oo){E=sr;var G=g&&k===O&&O.visualViewport?O.visualViewport.width:k[M];b-=G-i.width,b*=f?1:-1}}var j=Object.assign({position:c},m&&jO),L=v===!0?zO({x:b,y:d},Ht(r)):{x:b,y:d};if(b=L.x,d=L.y,f){var U;return Object.assign({},j,(U={},U[R]=S?"0":"",U[E]=h?"0":"",U.transform=(O.devicePixelRatio||1)<=1?"translate("+b+"px, "+d+"px)":"translate3d("+b+"px, "+d+"px, 0)",U))}return Object.assign({},j,(t={},t[R]=S?d+"px":"",t[E]=h?b+"px":"",t.transform="",t))}function WO(e){var t=e.state,r=e.options,i=r.gpuAcceleration,s=i===void 0?!0:i,a=r.adaptive,l=a===void 0?!0:a,c=r.roundOffsets,f=c===void 0?!0:c,m={placement:Tr(t.placement),variation:wi(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:s,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,fh(Object.assign({},m,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:l,roundOffsets:f})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,fh(Object.assign({},m,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:f})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const BO={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:WO,data:{}};var Fs={passive:!0};function UO(e){var t=e.state,r=e.instance,i=e.options,s=i.scroll,a=s===void 0?!0:s,l=i.resize,c=l===void 0?!0:l,f=Ht(t.elements.popper),m=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&m.forEach(function(v){v.addEventListener("scroll",r.update,Fs)}),c&&f.addEventListener("resize",r.update,Fs),function(){a&&m.forEach(function(v){v.removeEventListener("scroll",r.update,Fs)}),c&&f.removeEventListener("resize",r.update,Fs)}}const HO={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:UO,data:{}};var qO={left:"right",right:"left",bottom:"top",top:"bottom"};function ia(e){return e.replace(/left|right|bottom|top/g,function(t){return qO[t]})}var ZO={start:"end",end:"start"};function dh(e){return e.replace(/start|end/g,function(t){return ZO[t]})}function Dc(e){var t=Ht(e),r=t.pageXOffset,i=t.pageYOffset;return{scrollLeft:r,scrollTop:i}}function Nc(e){return bi(vn(e)).left+Dc(e).scrollLeft}function GO(e,t){var r=Ht(e),i=vn(e),s=r.visualViewport,a=i.clientWidth,l=i.clientHeight,c=0,f=0;if(s){a=s.width,l=s.height;var m=Hv();(m||!m&&t==="fixed")&&(c=s.offsetLeft,f=s.offsetTop)}return{width:a,height:l,x:c+Nc(e),y:f}}function KO(e){var t,r=vn(e),i=Dc(e),s=(t=e.ownerDocument)==null?void 0:t.body,a=jn(r.scrollWidth,r.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),l=jn(r.scrollHeight,r.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),c=-i.scrollLeft+Nc(e),f=-i.scrollTop;return Gr(s||r).direction==="rtl"&&(c+=jn(r.clientWidth,s?s.clientWidth:0)-a),{width:a,height:l,x:c,y:f}}function jc(e){var t=Gr(e),r=t.overflow,i=t.overflowX,s=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+s+i)}function Vv(e){return["html","body","#document"].indexOf(Pr(e))>=0?e.ownerDocument.body:ir(e)&&jc(e)?e:Vv(Pa(e))}function xo(e,t){var r;t===void 0&&(t=[]);var i=Vv(e),s=i===((r=e.ownerDocument)==null?void 0:r.body),a=Ht(i),l=s?[a].concat(a.visualViewport||[],jc(i)?i:[]):i,c=t.concat(l);return s?c:c.concat(xo(Pa(l)))}function uc(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function VO(e,t){var r=bi(e,!1,t==="fixed");return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}function ph(e,t,r){return t===Bv?uc(GO(e,r)):Wn(t)?VO(t,r):uc(KO(vn(e)))}function XO(e){var t=xo(Pa(e)),r=["absolute","fixed"].indexOf(Gr(e).position)>=0,i=r&&ir(e)?No(e):e;return Wn(i)?t.filter(function(s){return Wn(s)&&qv(s,i)&&Pr(s)!=="body"}):[]}function YO(e,t,r,i){var s=t==="clippingParents"?XO(e):[].concat(t),a=[].concat(s,[r]),l=a[0],c=a.reduce(function(f,m){var v=ph(e,m,i);return f.top=jn(v.top,f.top),f.right=ha(v.right,f.right),f.bottom=ha(v.bottom,f.bottom),f.left=jn(v.left,f.left),f},ph(e,l,i));return c.width=c.right-c.left,c.height=c.bottom-c.top,c.x=c.left,c.y=c.top,c}function Xv(e){var t=e.reference,r=e.element,i=e.placement,s=i?Tr(i):null,a=i?wi(i):null,l=t.x+t.width/2-r.width/2,c=t.y+t.height/2-r.height/2,f;switch(s){case It:f={x:l,y:t.y-r.height};break;case or:f={x:l,y:t.y+t.height};break;case sr:f={x:t.x+t.width,y:c};break;case Lt:f={x:t.x-r.width,y:c};break;default:f={x:t.x,y:t.y}}var m=s?Fc(s):null;if(m!=null){var v=m==="y"?"height":"width";switch(a){case mi:f[m]=f[m]-(t[v]/2-r[v]/2);break;case Oo:f[m]=f[m]+(t[v]/2-r[v]/2);break}}return f}function Ao(e,t){t===void 0&&(t={});var r=t,i=r.placement,s=i===void 0?e.placement:i,a=r.strategy,l=a===void 0?e.strategy:a,c=r.boundary,f=c===void 0?mO:c,m=r.rootBoundary,v=m===void 0?Bv:m,g=r.elementContext,p=g===void 0?Bi:g,b=r.altBoundary,x=b===void 0?!1:b,d=r.padding,w=d===void 0?0:d,h=Gv(typeof w!="number"?w:Kv(w,Do)),S=p===Bi?yO:Bi,E=e.rects.popper,R=e.elements[x?S:p],O=YO(Wn(R)?R:R.contextElement||vn(e.elements.popper),f,v,l),k=bi(e.elements.reference),B=Xv({reference:k,element:E,placement:s}),M=uc(Object.assign({},E,B)),F=p===Bi?M:k,G={top:O.top-F.top+h.top,bottom:F.bottom-O.bottom+h.bottom,left:O.left-F.left+h.left,right:F.right-O.right+h.right},j=e.modifiersData.offset;if(p===Bi&&j){var L=j[s];Object.keys(G).forEach(function(U){var q=[sr,or].indexOf(U)>=0?1:-1,C=[It,or].indexOf(U)>=0?"y":"x";G[U]+=L[C]*q})}return G}function JO(e,t){t===void 0&&(t={});var r=t,i=r.placement,s=r.boundary,a=r.rootBoundary,l=r.padding,c=r.flipVariations,f=r.allowedAutoPlacements,m=f===void 0?Uv:f,v=wi(i),g=v?c?lh:lh.filter(function(x){return wi(x)===v}):Do,p=g.filter(function(x){return m.indexOf(x)>=0});p.length===0&&(p=g);var b=p.reduce(function(x,d){return x[d]=Ao(e,{placement:d,boundary:s,rootBoundary:a,padding:l})[Tr(d)],x},{});return Object.keys(b).sort(function(x,d){return b[x]-b[d]})}function QO(e){if(Tr(e)===Ic)return[];var t=ia(e);return[dh(e),t,dh(t)]}function eA(e){var t=e.state,r=e.options,i=e.name;if(!t.modifiersData[i]._skip){for(var s=r.mainAxis,a=s===void 0?!0:s,l=r.altAxis,c=l===void 0?!0:l,f=r.fallbackPlacements,m=r.padding,v=r.boundary,g=r.rootBoundary,p=r.altBoundary,b=r.flipVariations,x=b===void 0?!0:b,d=r.allowedAutoPlacements,w=t.options.placement,h=Tr(w),S=h===w,E=f||(S||!x?[ia(w)]:QO(w)),R=[w].concat(E).reduce(function(ne,ce){return ne.concat(Tr(ce)===Ic?JO(t,{placement:ce,boundary:v,rootBoundary:g,padding:m,flipVariations:x,allowedAutoPlacements:d}):ce)},[]),O=t.rects.reference,k=t.rects.popper,B=new Map,M=!0,F=R[0],G=0;G<R.length;G++){var j=R[G],L=Tr(j),U=wi(j)===mi,q=[It,or].indexOf(L)>=0,C=q?"width":"height",J=Ao(t,{placement:j,boundary:v,rootBoundary:g,altBoundary:p,padding:m}),X=q?U?sr:Lt:U?or:It;O[C]>k[C]&&(X=ia(X));var te=ia(X),de=[];if(a&&de.push(J[L]<=0),c&&de.push(J[X]<=0,J[te]<=0),de.every(function(ne){return ne})){F=j,M=!1;break}B.set(j,de)}if(M)for(var Z=x?3:1,Q=function(ce){var fe=R.find(function(ye){var ve=B.get(ye);if(ve)return ve.slice(0,ce).every(function(Ee){return Ee})});if(fe)return F=fe,"break"},se=Z;se>0;se--){var ue=Q(se);if(ue==="break")break}t.placement!==F&&(t.modifiersData[i]._skip=!0,t.placement=F,t.reset=!0)}}const tA={name:"flip",enabled:!0,phase:"main",fn:eA,requiresIfExists:["offset"],data:{_skip:!1}};function hh(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function gh(e){return[It,sr,or,Lt].some(function(t){return e[t]>=0})}function rA(e){var t=e.state,r=e.name,i=t.rects.reference,s=t.rects.popper,a=t.modifiersData.preventOverflow,l=Ao(t,{elementContext:"reference"}),c=Ao(t,{altBoundary:!0}),f=hh(l,i),m=hh(c,s,a),v=gh(f),g=gh(m);t.modifiersData[r]={referenceClippingOffsets:f,popperEscapeOffsets:m,isReferenceHidden:v,hasPopperEscaped:g},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":v,"data-popper-escaped":g})}const nA={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:rA};function iA(e,t,r){var i=Tr(e),s=[Lt,It].indexOf(i)>=0?-1:1,a=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,l=a[0],c=a[1];return l=l||0,c=(c||0)*s,[Lt,sr].indexOf(i)>=0?{x:c,y:l}:{x:l,y:c}}function oA(e){var t=e.state,r=e.options,i=e.name,s=r.offset,a=s===void 0?[0,0]:s,l=Uv.reduce(function(v,g){return v[g]=iA(g,t.rects,a),v},{}),c=l[t.placement],f=c.x,m=c.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=f,t.modifiersData.popperOffsets.y+=m),t.modifiersData[i]=l}const sA={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:oA};function aA(e){var t=e.state,r=e.name;t.modifiersData[r]=Xv({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const uA={name:"popperOffsets",enabled:!0,phase:"read",fn:aA,data:{}};function lA(e){return e==="x"?"y":"x"}function cA(e){var t=e.state,r=e.options,i=e.name,s=r.mainAxis,a=s===void 0?!0:s,l=r.altAxis,c=l===void 0?!1:l,f=r.boundary,m=r.rootBoundary,v=r.altBoundary,g=r.padding,p=r.tether,b=p===void 0?!0:p,x=r.tetherOffset,d=x===void 0?0:x,w=Ao(t,{boundary:f,rootBoundary:m,padding:g,altBoundary:v}),h=Tr(t.placement),S=wi(t.placement),E=!S,R=Fc(h),O=lA(R),k=t.modifiersData.popperOffsets,B=t.rects.reference,M=t.rects.popper,F=typeof d=="function"?d(Object.assign({},t.rects,{placement:t.placement})):d,G=typeof F=="number"?{mainAxis:F,altAxis:F}:Object.assign({mainAxis:0,altAxis:0},F),j=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,L={x:0,y:0};if(k){if(a){var U,q=R==="y"?It:Lt,C=R==="y"?or:sr,J=R==="y"?"height":"width",X=k[R],te=X+w[q],de=X-w[C],Z=b?-M[J]/2:0,Q=S===mi?B[J]:M[J],se=S===mi?-M[J]:-B[J],ue=t.elements.arrow,ne=b&&ue?Mc(ue):{width:0,height:0},ce=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Zv(),fe=ce[q],ye=ce[C],ve=wo(0,B[J],ne[J]),Ee=E?B[J]/2-Z-ve-fe-G.mainAxis:Q-ve-fe-G.mainAxis,Ae=E?-B[J]/2+Z+ve+ye+G.mainAxis:se+ve+ye+G.mainAxis,Ze=t.elements.arrow&&No(t.elements.arrow),ie=Ze?R==="y"?Ze.clientTop||0:Ze.clientLeft||0:0,mt=(U=j==null?void 0:j[R])!=null?U:0,ut=X+Ee-mt-ie,vr=X+Ae-mt,qo=wo(b?ha(te,ut):te,X,b?jn(de,vr):de);k[R]=qo,L[R]=qo-X}if(c){var Gt,Zo=R==="x"?It:Lt,Ga=R==="x"?or:sr,Mt=k[O],yt=O==="y"?"height":"width",Kr=Mt+w[Zo],wn=Mt-w[Ga],Ai=[It,Lt].indexOf(h)!==-1,Vr=(Gt=j==null?void 0:j[O])!=null?Gt:0,Go=Ai?Kr:Mt-B[yt]-M[yt]-Vr+G.altAxis,Xr=Ai?Mt+B[yt]+M[yt]-Vr-G.altAxis:wn,$r=b&&Ai?LO(Go,Mt,Xr):wo(b?Go:Kr,Mt,b?Xr:wn);k[O]=$r,L[O]=$r-Mt}t.modifiersData[i]=L}}const fA={name:"preventOverflow",enabled:!0,phase:"main",fn:cA,requiresIfExists:["offset"]};function dA(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function pA(e){return e===Ht(e)||!ir(e)?Dc(e):dA(e)}function hA(e){var t=e.getBoundingClientRect(),r=yi(t.width)/e.offsetWidth||1,i=yi(t.height)/e.offsetHeight||1;return r!==1||i!==1}function gA(e,t,r){r===void 0&&(r=!1);var i=ir(t),s=ir(t)&&hA(t),a=vn(t),l=bi(e,s,r),c={scrollLeft:0,scrollTop:0},f={x:0,y:0};return(i||!i&&!r)&&((Pr(t)!=="body"||jc(a))&&(c=pA(t)),ir(t)?(f=bi(t,!0),f.x+=t.clientLeft,f.y+=t.clientTop):a&&(f.x=Nc(a))),{x:l.left+c.scrollLeft-f.x,y:l.top+c.scrollTop-f.y,width:l.width,height:l.height}}function vA(e){var t=new Map,r=new Set,i=[];e.forEach(function(a){t.set(a.name,a)});function s(a){r.add(a.name);var l=[].concat(a.requires||[],a.requiresIfExists||[]);l.forEach(function(c){if(!r.has(c)){var f=t.get(c);f&&s(f)}}),i.push(a)}return e.forEach(function(a){r.has(a.name)||s(a)}),i}function mA(e){var t=vA(e);return RO.reduce(function(r,i){return r.concat(t.filter(function(s){return s.phase===i}))},[])}function yA(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function bA(e){var t=e.reduce(function(r,i){var s=r[i.name];return r[i.name]=s?Object.assign({},s,i,{options:Object.assign({},s.options,i.options),data:Object.assign({},s.data,i.data)}):i,r},{});return Object.keys(t).map(function(r){return t[r]})}var vh={placement:"bottom",modifiers:[],strategy:"absolute"};function mh(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return!t.some(function(i){return!(i&&typeof i.getBoundingClientRect=="function")})}function wA(e){e===void 0&&(e={});var t=e,r=t.defaultModifiers,i=r===void 0?[]:r,s=t.defaultOptions,a=s===void 0?vh:s;return function(c,f,m){m===void 0&&(m=a);var v={placement:"bottom",orderedModifiers:[],options:Object.assign({},vh,a),modifiersData:{},elements:{reference:c,popper:f},attributes:{},styles:{}},g=[],p=!1,b={state:v,setOptions:function(h){var S=typeof h=="function"?h(v.options):h;d(),v.options=Object.assign({},a,v.options,S),v.scrollParents={reference:Wn(c)?xo(c):c.contextElement?xo(c.contextElement):[],popper:xo(f)};var E=mA(bA([].concat(i,v.options.modifiers)));return v.orderedModifiers=E.filter(function(R){return R.enabled}),x(),b.update()},forceUpdate:function(){if(!p){var h=v.elements,S=h.reference,E=h.popper;if(mh(S,E)){v.rects={reference:gA(S,No(E),v.options.strategy==="fixed"),popper:Mc(E)},v.reset=!1,v.placement=v.options.placement,v.orderedModifiers.forEach(function(G){return v.modifiersData[G.name]=Object.assign({},G.data)});for(var R=0;R<v.orderedModifiers.length;R++){if(v.reset===!0){v.reset=!1,R=-1;continue}var O=v.orderedModifiers[R],k=O.fn,B=O.options,M=B===void 0?{}:B,F=O.name;typeof k=="function"&&(v=k({state:v,options:M,name:F,instance:b})||v)}}}},update:yA(function(){return new Promise(function(w){b.forceUpdate(),w(v)})}),destroy:function(){d(),p=!0}};if(!mh(c,f))return b;b.setOptions(m).then(function(w){!p&&m.onFirstUpdate&&m.onFirstUpdate(w)});function x(){v.orderedModifiers.forEach(function(w){var h=w.name,S=w.options,E=S===void 0?{}:S,R=w.effect;if(typeof R=="function"){var O=R({state:v,name:h,instance:b,options:E}),k=function(){};g.push(O||k)}})}function d(){g.forEach(function(w){return w()}),g=[]}return b}}var xA=[HO,uA,BO,kO,sA,tA,fA,NO,nA],SA=wA({defaultModifiers:xA}),Ds=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Yv(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var vl,yh;function EA(){if(yh)return vl;yh=1;var e=typeof Element<"u",t=typeof Map=="function",r=typeof Set=="function",i=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function s(a,l){if(a===l)return!0;if(a&&l&&typeof a=="object"&&typeof l=="object"){if(a.constructor!==l.constructor)return!1;var c,f,m;if(Array.isArray(a)){if(c=a.length,c!=l.length)return!1;for(f=c;f--!==0;)if(!s(a[f],l[f]))return!1;return!0}var v;if(t&&a instanceof Map&&l instanceof Map){if(a.size!==l.size)return!1;for(v=a.entries();!(f=v.next()).done;)if(!l.has(f.value[0]))return!1;for(v=a.entries();!(f=v.next()).done;)if(!s(f.value[1],l.get(f.value[0])))return!1;return!0}if(r&&a instanceof Set&&l instanceof Set){if(a.size!==l.size)return!1;for(v=a.entries();!(f=v.next()).done;)if(!l.has(f.value[0]))return!1;return!0}if(i&&ArrayBuffer.isView(a)&&ArrayBuffer.isView(l)){if(c=a.length,c!=l.length)return!1;for(f=c;f--!==0;)if(a[f]!==l[f])return!1;return!0}if(a.constructor===RegExp)return a.source===l.source&&a.flags===l.flags;if(a.valueOf!==Object.prototype.valueOf&&typeof a.valueOf=="function"&&typeof l.valueOf=="function")return a.valueOf()===l.valueOf();if(a.toString!==Object.prototype.toString&&typeof a.toString=="function"&&typeof l.toString=="function")return a.toString()===l.toString();if(m=Object.keys(a),c=m.length,c!==Object.keys(l).length)return!1;for(f=c;f--!==0;)if(!Object.prototype.hasOwnProperty.call(l,m[f]))return!1;if(e&&a instanceof Element)return!1;for(f=c;f--!==0;)if(!((m[f]==="_owner"||m[f]==="__v"||m[f]==="__o")&&a.$$typeof)&&!s(a[m[f]],l[m[f]]))return!1;return!0}return a!==a&&l!==l}return vl=function(l,c){try{return s(l,c)}catch(f){if((f.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw f}},vl}var _A=EA();const OA=Yv(_A);var AA=[],Jv=function(t,r,i){i===void 0&&(i={});var s=$.useRef(null),a={onFirstUpdate:i.onFirstUpdate,placement:i.placement||"bottom",strategy:i.strategy||"absolute",modifiers:i.modifiers||AA},l=$.useState({styles:{popper:{position:a.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),c=l[0],f=l[1],m=$.useMemo(function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(b){var x=b.state,d=Object.keys(x.elements);vO.flushSync(function(){f({styles:ah(d.map(function(w){return[w,x.styles[w]||{}]})),attributes:ah(d.map(function(w){return[w,x.attributes[w]]}))})})},requires:["computeStyles"]}},[]),v=$.useMemo(function(){var p={onFirstUpdate:a.onFirstUpdate,placement:a.placement,strategy:a.strategy,modifiers:[].concat(a.modifiers,[m,{name:"applyStyles",enabled:!1}])};return OA(s.current,p)?s.current||p:(s.current=p,p)},[a.onFirstUpdate,a.placement,a.strategy,a.modifiers,m]),g=$.useRef();return uh(function(){g.current&&g.current.setOptions(v)},[v]),uh(function(){if(!(t==null||r==null)){var p=i.createPopper||SA,b=p(t,r,v);return g.current=b,function(){b.destroy(),g.current=null}}},[t,r,i.createPopper]),{state:g.current?g.current.state:null,styles:c.styles,attributes:c.attributes,update:g.current?g.current.update:null,forceUpdate:g.current?g.current.forceUpdate:null}};const Qv=e=>D.jsx("div",{className:"absolute inset-0 z-[1999]",onClick:e.onClick}),em=W.forwardRef(({children:e,style:t,attributes:r},i)=>D.jsx("div",{style:{...t,zIndex:2e3},...r,ref:i,className:"w-60 rounded border rounded border border-grey-50 bg-grey-900 shadow-2xl","data-cy":"dialogBody",children:e})),TA=({referenceElement:e,placement:t,isOpen:r,children:i,onClose:s})=>{const[a,l]=W.useState(null),{styles:c,attributes:f}=Jv(e,a,{placement:t||"bottom-start"}),m=W.useCallback(()=>{s&&s()},[s]);return r?D.jsxs(Wv,{children:[D.jsx(Qv,{onClick:()=>m()}),D.jsx(em,{ref:l,style:c.popper,attributes:f.popper,children:i})]}):null};var ml={exports:{}};/*!
1
+ "use strict";var kO=Object.defineProperty;var vh=e=>{throw TypeError(e)};var $O=(e,t,r)=>t in e?kO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var ve=(e,t,r)=>$O(e,typeof t!="symbol"?t+"":t,r),_l=(e,t,r)=>t.has(e)||vh("Cannot "+r);var re=(e,t,r)=>(_l(e,t,"read from private field"),r?r.call(e):t.get(e)),Et=(e,t,r)=>t.has(e)?vh("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),tt=(e,t,r,i)=>(_l(e,t,"write to private field"),i?i.call(e,r):t.set(e,r),r),$e=(e,t,r)=>(_l(e,t,"access private method"),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const D=require("react/jsx-runtime"),B=require("react"),Pi=require("react-dom"),ot=require("@ws-ui/icons"),gc=require("@emotion/react"),IO=require("re-resizable");function Qm(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const $=Qm(B),LO=Qm(Pi),ev=({children:e,container:t=document.body})=>Pi.createPortal(e,t);var yh=function(t){return t.reduce(function(r,i){var s=i[0],a=i[1];return r[s]=a,r},{})},wh=typeof window<"u"&&window.document&&window.document.createElement?$.useLayoutEffect:$.useEffect,Mt="top",ar="bottom",ur="right",Dt="left",Wc="auto",Wo=[Mt,ar,ur,Dt],Si="start",ko="end",MO="clippingParents",tv="viewport",Ki="popper",DO="reference",bh=Wo.reduce(function(e,t){return e.concat([t+"-"+Si,t+"-"+ko])},[]),rv=[].concat(Wo,[Wc]).reduce(function(e,t){return e.concat([t,t+"-"+Si,t+"-"+ko])},[]),FO="beforeRead",NO="read",jO="afterRead",zO="beforeMain",BO="main",WO="afterMain",HO="beforeWrite",UO="write",qO="afterWrite",ZO=[FO,NO,jO,zO,BO,WO,HO,UO,qO];function $r(e){return e?(e.nodeName||"").toLowerCase():null}function Zt(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function qn(e){var t=Zt(e).Element;return e instanceof t||e instanceof Element}function sr(e){var t=Zt(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Hc(e){if(typeof ShadowRoot>"u")return!1;var t=Zt(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function GO(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var i=t.styles[r]||{},s=t.attributes[r]||{},a=t.elements[r];!sr(a)||!$r(a)||(Object.assign(a.style,i),Object.keys(s).forEach(function(u){var c=s[u];c===!1?a.removeAttribute(u):a.setAttribute(u,c===!0?"":c)}))})}function KO(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(i){var s=t.elements[i],a=t.attributes[i]||{},u=Object.keys(t.styles.hasOwnProperty(i)?t.styles[i]:r[i]),c=u.reduce(function(f,g){return f[g]="",f},{});!sr(s)||!$r(s)||(Object.assign(s.style,c),Object.keys(a).forEach(function(f){s.removeAttribute(f)}))})}}const VO={name:"applyStyles",enabled:!0,phase:"write",fn:GO,effect:KO,requires:["computeStyles"]};function Cr(e){return e.split("-")[0]}var Hn=Math.max,wa=Math.min,Ei=Math.round;function mc(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function nv(){return!/^((?!chrome|android).)*safari/i.test(mc())}function _i(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var i=e.getBoundingClientRect(),s=1,a=1;t&&sr(e)&&(s=e.offsetWidth>0&&Ei(i.width)/e.offsetWidth||1,a=e.offsetHeight>0&&Ei(i.height)/e.offsetHeight||1);var u=qn(e)?Zt(e):window,c=u.visualViewport,f=!nv()&&r,g=(i.left+(f&&c?c.offsetLeft:0))/s,h=(i.top+(f&&c?c.offsetTop:0))/a,v=i.width/s,p=i.height/a;return{width:v,height:p,top:h,right:g+v,bottom:h+p,left:g,x:g,y:h}}function Uc(e){var t=_i(e),r=e.offsetWidth,i=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:i}}function iv(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&Hc(r)){var i=t;do{if(i&&e.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function Yr(e){return Zt(e).getComputedStyle(e)}function YO(e){return["table","td","th"].indexOf($r(e))>=0}function bn(e){return((qn(e)?e.ownerDocument:e.document)||window.document).documentElement}function Da(e){return $r(e)==="html"?e:e.assignedSlot||e.parentNode||(Hc(e)?e.host:null)||bn(e)}function xh(e){return!sr(e)||Yr(e).position==="fixed"?null:e.offsetParent}function XO(e){var t=/firefox/i.test(mc()),r=/Trident/i.test(mc());if(r&&sr(e)){var i=Yr(e);if(i.position==="fixed")return null}var s=Da(e);for(Hc(s)&&(s=s.host);sr(s)&&["html","body"].indexOf($r(s))<0;){var a=Yr(s);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||t&&a.willChange==="filter"||t&&a.filter&&a.filter!=="none")return s;s=s.parentNode}return null}function Ho(e){for(var t=Zt(e),r=xh(e);r&&YO(r)&&Yr(r).position==="static";)r=xh(r);return r&&($r(r)==="html"||$r(r)==="body"&&Yr(r).position==="static")?t:r||XO(e)||t}function qc(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function To(e,t,r){return Hn(e,wa(t,r))}function JO(e,t,r){var i=To(e,t,r);return i>r?r:i}function ov(){return{top:0,right:0,bottom:0,left:0}}function sv(e){return Object.assign({},ov(),e)}function av(e,t){return t.reduce(function(r,i){return r[i]=e,r},{})}var QO=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,sv(typeof t!="number"?t:av(t,Wo))};function eT(e){var t,r=e.state,i=e.name,s=e.options,a=r.elements.arrow,u=r.modifiersData.popperOffsets,c=Cr(r.placement),f=qc(c),g=[Dt,ur].indexOf(c)>=0,h=g?"height":"width";if(!(!a||!u)){var v=QO(s.padding,r),p=Uc(a),y=f==="y"?Mt:Dt,x=f==="y"?ar:ur,d=r.rects.reference[h]+r.rects.reference[f]-u[f]-r.rects.popper[h],b=u[f]-r.rects.reference[f],m=Ho(a),S=m?f==="y"?m.clientHeight||0:m.clientWidth||0:0,E=d/2-b/2,R=v[y],O=S-p[h]-v[x],k=S/2-p[h]/2+E,W=To(R,k,O),M=f;r.modifiersData[i]=(t={},t[M]=W,t.centerOffset=W-k,t)}}function tT(e){var t=e.state,r=e.options,i=r.element,s=i===void 0?"[data-popper-arrow]":i;s!=null&&(typeof s=="string"&&(s=t.elements.popper.querySelector(s),!s)||iv(t.elements.popper,s)&&(t.elements.arrow=s))}const rT={name:"arrow",enabled:!0,phase:"main",fn:eT,effect:tT,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Oi(e){return e.split("-")[1]}var nT={top:"auto",right:"auto",bottom:"auto",left:"auto"};function iT(e,t){var r=e.x,i=e.y,s=t.devicePixelRatio||1;return{x:Ei(r*s)/s||0,y:Ei(i*s)/s||0}}function Sh(e){var t,r=e.popper,i=e.popperRect,s=e.placement,a=e.variation,u=e.offsets,c=e.position,f=e.gpuAcceleration,g=e.adaptive,h=e.roundOffsets,v=e.isFixed,p=u.x,y=p===void 0?0:p,x=u.y,d=x===void 0?0:x,b=typeof h=="function"?h({x:y,y:d}):{x:y,y:d};y=b.x,d=b.y;var m=u.hasOwnProperty("x"),S=u.hasOwnProperty("y"),E=Dt,R=Mt,O=window;if(g){var k=Ho(r),W="clientHeight",M="clientWidth";if(k===Zt(r)&&(k=bn(r),Yr(k).position!=="static"&&c==="absolute"&&(W="scrollHeight",M="scrollWidth")),k=k,s===Mt||(s===Dt||s===ur)&&a===ko){R=ar;var F=v&&k===O&&O.visualViewport?O.visualViewport.height:k[W];d-=F-i.height,d*=f?1:-1}if(s===Dt||(s===Mt||s===ar)&&a===ko){E=ur;var G=v&&k===O&&O.visualViewport?O.visualViewport.width:k[M];y-=G-i.width,y*=f?1:-1}}var j=Object.assign({position:c},g&&nT),L=h===!0?iT({x:y,y:d},Zt(r)):{x:y,y:d};if(y=L.x,d=L.y,f){var H;return Object.assign({},j,(H={},H[R]=S?"0":"",H[E]=m?"0":"",H.transform=(O.devicePixelRatio||1)<=1?"translate("+y+"px, "+d+"px)":"translate3d("+y+"px, "+d+"px, 0)",H))}return Object.assign({},j,(t={},t[R]=S?d+"px":"",t[E]=m?y+"px":"",t.transform="",t))}function oT(e){var t=e.state,r=e.options,i=r.gpuAcceleration,s=i===void 0?!0:i,a=r.adaptive,u=a===void 0?!0:a,c=r.roundOffsets,f=c===void 0?!0:c,g={placement:Cr(t.placement),variation:Oi(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:s,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Sh(Object.assign({},g,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:u,roundOffsets:f})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Sh(Object.assign({},g,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:f})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const sT={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:oT,data:{}};var Bs={passive:!0};function aT(e){var t=e.state,r=e.instance,i=e.options,s=i.scroll,a=s===void 0?!0:s,u=i.resize,c=u===void 0?!0:u,f=Zt(t.elements.popper),g=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&g.forEach(function(h){h.addEventListener("scroll",r.update,Bs)}),c&&f.addEventListener("resize",r.update,Bs),function(){a&&g.forEach(function(h){h.removeEventListener("scroll",r.update,Bs)}),c&&f.removeEventListener("resize",r.update,Bs)}}const uT={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:aT,data:{}};var lT={left:"right",right:"left",bottom:"top",top:"bottom"};function la(e){return e.replace(/left|right|bottom|top/g,function(t){return lT[t]})}var cT={start:"end",end:"start"};function Eh(e){return e.replace(/start|end/g,function(t){return cT[t]})}function Zc(e){var t=Zt(e),r=t.pageXOffset,i=t.pageYOffset;return{scrollLeft:r,scrollTop:i}}function Gc(e){return _i(bn(e)).left+Zc(e).scrollLeft}function fT(e,t){var r=Zt(e),i=bn(e),s=r.visualViewport,a=i.clientWidth,u=i.clientHeight,c=0,f=0;if(s){a=s.width,u=s.height;var g=nv();(g||!g&&t==="fixed")&&(c=s.offsetLeft,f=s.offsetTop)}return{width:a,height:u,x:c+Gc(e),y:f}}function dT(e){var t,r=bn(e),i=Zc(e),s=(t=e.ownerDocument)==null?void 0:t.body,a=Hn(r.scrollWidth,r.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),u=Hn(r.scrollHeight,r.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),c=-i.scrollLeft+Gc(e),f=-i.scrollTop;return Yr(s||r).direction==="rtl"&&(c+=Hn(r.clientWidth,s?s.clientWidth:0)-a),{width:a,height:u,x:c,y:f}}function Kc(e){var t=Yr(e),r=t.overflow,i=t.overflowX,s=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+s+i)}function uv(e){return["html","body","#document"].indexOf($r(e))>=0?e.ownerDocument.body:sr(e)&&Kc(e)?e:uv(Da(e))}function Ao(e,t){var r;t===void 0&&(t=[]);var i=uv(e),s=i===((r=e.ownerDocument)==null?void 0:r.body),a=Zt(i),u=s?[a].concat(a.visualViewport||[],Kc(i)?i:[]):i,c=t.concat(u);return s?c:c.concat(Ao(Da(u)))}function vc(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function pT(e,t){var r=_i(e,!1,t==="fixed");return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}function _h(e,t,r){return t===tv?vc(fT(e,r)):qn(t)?pT(t,r):vc(dT(bn(e)))}function hT(e){var t=Ao(Da(e)),r=["absolute","fixed"].indexOf(Yr(e).position)>=0,i=r&&sr(e)?Ho(e):e;return qn(i)?t.filter(function(s){return qn(s)&&iv(s,i)&&$r(s)!=="body"}):[]}function gT(e,t,r,i){var s=t==="clippingParents"?hT(e):[].concat(t),a=[].concat(s,[r]),u=a[0],c=a.reduce(function(f,g){var h=_h(e,g,i);return f.top=Hn(h.top,f.top),f.right=wa(h.right,f.right),f.bottom=wa(h.bottom,f.bottom),f.left=Hn(h.left,f.left),f},_h(e,u,i));return c.width=c.right-c.left,c.height=c.bottom-c.top,c.x=c.left,c.y=c.top,c}function lv(e){var t=e.reference,r=e.element,i=e.placement,s=i?Cr(i):null,a=i?Oi(i):null,u=t.x+t.width/2-r.width/2,c=t.y+t.height/2-r.height/2,f;switch(s){case Mt:f={x:u,y:t.y-r.height};break;case ar:f={x:u,y:t.y+t.height};break;case ur:f={x:t.x+t.width,y:c};break;case Dt:f={x:t.x-r.width,y:c};break;default:f={x:t.x,y:t.y}}var g=s?qc(s):null;if(g!=null){var h=g==="y"?"height":"width";switch(a){case Si:f[g]=f[g]-(t[h]/2-r[h]/2);break;case ko:f[g]=f[g]+(t[h]/2-r[h]/2);break}}return f}function $o(e,t){t===void 0&&(t={});var r=t,i=r.placement,s=i===void 0?e.placement:i,a=r.strategy,u=a===void 0?e.strategy:a,c=r.boundary,f=c===void 0?MO:c,g=r.rootBoundary,h=g===void 0?tv:g,v=r.elementContext,p=v===void 0?Ki:v,y=r.altBoundary,x=y===void 0?!1:y,d=r.padding,b=d===void 0?0:d,m=sv(typeof b!="number"?b:av(b,Wo)),S=p===Ki?DO:Ki,E=e.rects.popper,R=e.elements[x?S:p],O=gT(qn(R)?R:R.contextElement||bn(e.elements.popper),f,h,u),k=_i(e.elements.reference),W=lv({reference:k,element:E,placement:s}),M=vc(Object.assign({},E,W)),F=p===Ki?M:k,G={top:O.top-F.top+m.top,bottom:F.bottom-O.bottom+m.bottom,left:O.left-F.left+m.left,right:F.right-O.right+m.right},j=e.modifiersData.offset;if(p===Ki&&j){var L=j[s];Object.keys(G).forEach(function(H){var q=[ur,ar].indexOf(H)>=0?1:-1,C=[Mt,ar].indexOf(H)>=0?"y":"x";G[H]+=L[C]*q})}return G}function mT(e,t){t===void 0&&(t={});var r=t,i=r.placement,s=r.boundary,a=r.rootBoundary,u=r.padding,c=r.flipVariations,f=r.allowedAutoPlacements,g=f===void 0?rv:f,h=Oi(i),v=h?c?bh:bh.filter(function(x){return Oi(x)===h}):Wo,p=v.filter(function(x){return g.indexOf(x)>=0});p.length===0&&(p=v);var y=p.reduce(function(x,d){return x[d]=$o(e,{placement:d,boundary:s,rootBoundary:a,padding:u})[Cr(d)],x},{});return Object.keys(y).sort(function(x,d){return y[x]-y[d]})}function vT(e){if(Cr(e)===Wc)return[];var t=la(e);return[Eh(e),t,Eh(t)]}function yT(e){var t=e.state,r=e.options,i=e.name;if(!t.modifiersData[i]._skip){for(var s=r.mainAxis,a=s===void 0?!0:s,u=r.altAxis,c=u===void 0?!0:u,f=r.fallbackPlacements,g=r.padding,h=r.boundary,v=r.rootBoundary,p=r.altBoundary,y=r.flipVariations,x=y===void 0?!0:y,d=r.allowedAutoPlacements,b=t.options.placement,m=Cr(b),S=m===b,E=f||(S||!x?[la(b)]:vT(b)),R=[b].concat(E).reduce(function(ne,ce){return ne.concat(Cr(ce)===Wc?mT(t,{placement:ce,boundary:h,rootBoundary:v,padding:g,flipVariations:x,allowedAutoPlacements:d}):ce)},[]),O=t.rects.reference,k=t.rects.popper,W=new Map,M=!0,F=R[0],G=0;G<R.length;G++){var j=R[G],L=Cr(j),H=Oi(j)===Si,q=[Mt,ar].indexOf(L)>=0,C=q?"width":"height",J=$o(t,{placement:j,boundary:h,rootBoundary:v,altBoundary:p,padding:g}),Y=q?H?ur:Dt:H?ar:Mt;O[C]>k[C]&&(Y=la(Y));var te=la(Y),de=[];if(a&&de.push(J[L]<=0),c&&de.push(J[Y]<=0,J[te]<=0),de.every(function(ne){return ne})){F=j,M=!1;break}W.set(j,de)}if(M)for(var Z=x?3:1,Q=function(ce){var fe=R.find(function(ye){var me=W.get(ye);if(me)return me.slice(0,ce).every(function(Ee){return Ee})});if(fe)return F=fe,"break"},se=Z;se>0;se--){var ue=Q(se);if(ue==="break")break}t.placement!==F&&(t.modifiersData[i]._skip=!0,t.placement=F,t.reset=!0)}}const wT={name:"flip",enabled:!0,phase:"main",fn:yT,requiresIfExists:["offset"],data:{_skip:!1}};function Oh(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function Th(e){return[Mt,ur,ar,Dt].some(function(t){return e[t]>=0})}function bT(e){var t=e.state,r=e.name,i=t.rects.reference,s=t.rects.popper,a=t.modifiersData.preventOverflow,u=$o(t,{elementContext:"reference"}),c=$o(t,{altBoundary:!0}),f=Oh(u,i),g=Oh(c,s,a),h=Th(f),v=Th(g);t.modifiersData[r]={referenceClippingOffsets:f,popperEscapeOffsets:g,isReferenceHidden:h,hasPopperEscaped:v},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":v})}const xT={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:bT};function ST(e,t,r){var i=Cr(e),s=[Dt,Mt].indexOf(i)>=0?-1:1,a=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,u=a[0],c=a[1];return u=u||0,c=(c||0)*s,[Dt,ur].indexOf(i)>=0?{x:c,y:u}:{x:u,y:c}}function ET(e){var t=e.state,r=e.options,i=e.name,s=r.offset,a=s===void 0?[0,0]:s,u=rv.reduce(function(h,v){return h[v]=ST(v,t.rects,a),h},{}),c=u[t.placement],f=c.x,g=c.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=f,t.modifiersData.popperOffsets.y+=g),t.modifiersData[i]=u}const _T={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:ET};function OT(e){var t=e.state,r=e.name;t.modifiersData[r]=lv({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const TT={name:"popperOffsets",enabled:!0,phase:"read",fn:OT,data:{}};function AT(e){return e==="x"?"y":"x"}function RT(e){var t=e.state,r=e.options,i=e.name,s=r.mainAxis,a=s===void 0?!0:s,u=r.altAxis,c=u===void 0?!1:u,f=r.boundary,g=r.rootBoundary,h=r.altBoundary,v=r.padding,p=r.tether,y=p===void 0?!0:p,x=r.tetherOffset,d=x===void 0?0:x,b=$o(t,{boundary:f,rootBoundary:g,padding:v,altBoundary:h}),m=Cr(t.placement),S=Oi(t.placement),E=!S,R=qc(m),O=AT(R),k=t.modifiersData.popperOffsets,W=t.rects.reference,M=t.rects.popper,F=typeof d=="function"?d(Object.assign({},t.rects,{placement:t.placement})):d,G=typeof F=="number"?{mainAxis:F,altAxis:F}:Object.assign({mainAxis:0,altAxis:0},F),j=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,L={x:0,y:0};if(k){if(a){var H,q=R==="y"?Mt:Dt,C=R==="y"?ar:ur,J=R==="y"?"height":"width",Y=k[R],te=Y+b[q],de=Y-b[C],Z=y?-M[J]/2:0,Q=S===Si?W[J]:M[J],se=S===Si?-M[J]:-W[J],ue=t.elements.arrow,ne=y&&ue?Uc(ue):{width:0,height:0},ce=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:ov(),fe=ce[q],ye=ce[C],me=To(0,W[J],ne[J]),Ee=E?W[J]/2-Z-me-fe-G.mainAxis:Q-me-fe-G.mainAxis,Te=E?-W[J]/2+Z+me+ye+G.mainAxis:se+me+ye+G.mainAxis,Ve=t.elements.arrow&&Ho(t.elements.arrow),ie=Ve?R==="y"?Ve.clientTop||0:Ve.clientLeft||0:0,wt=(H=j==null?void 0:j[R])!=null?H:0,ft=Y+Ee-wt-ie,wr=Y+Te-wt,Yo=To(y?wa(te,ft):te,Y,y?Hn(de,wr):de);k[R]=Yo,L[R]=Yo-Y}if(c){var Vt,Xo=R==="x"?Mt:Dt,ru=R==="x"?ar:ur,Ft=k[O],bt=O==="y"?"height":"width",Jr=Ft+b[Xo],_n=Ft-b[ru],$i=[Mt,Dt].indexOf(m)!==-1,Qr=(Vt=j==null?void 0:j[O])!=null?Vt:0,Jo=$i?Jr:Ft-W[bt]-M[bt]-Qr+G.altAxis,en=$i?Ft+W[bt]+M[bt]-Qr-G.altAxis:_n,Mr=y&&$i?JO(Jo,Ft,en):To(y?Jo:Jr,Ft,y?en:_n);k[O]=Mr,L[O]=Mr-Ft}t.modifiersData[i]=L}}const PT={name:"preventOverflow",enabled:!0,phase:"main",fn:RT,requiresIfExists:["offset"]};function CT(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function kT(e){return e===Zt(e)||!sr(e)?Zc(e):CT(e)}function $T(e){var t=e.getBoundingClientRect(),r=Ei(t.width)/e.offsetWidth||1,i=Ei(t.height)/e.offsetHeight||1;return r!==1||i!==1}function IT(e,t,r){r===void 0&&(r=!1);var i=sr(t),s=sr(t)&&$T(t),a=bn(t),u=_i(e,s,r),c={scrollLeft:0,scrollTop:0},f={x:0,y:0};return(i||!i&&!r)&&(($r(t)!=="body"||Kc(a))&&(c=kT(t)),sr(t)?(f=_i(t,!0),f.x+=t.clientLeft,f.y+=t.clientTop):a&&(f.x=Gc(a))),{x:u.left+c.scrollLeft-f.x,y:u.top+c.scrollTop-f.y,width:u.width,height:u.height}}function LT(e){var t=new Map,r=new Set,i=[];e.forEach(function(a){t.set(a.name,a)});function s(a){r.add(a.name);var u=[].concat(a.requires||[],a.requiresIfExists||[]);u.forEach(function(c){if(!r.has(c)){var f=t.get(c);f&&s(f)}}),i.push(a)}return e.forEach(function(a){r.has(a.name)||s(a)}),i}function MT(e){var t=LT(e);return ZO.reduce(function(r,i){return r.concat(t.filter(function(s){return s.phase===i}))},[])}function DT(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function FT(e){var t=e.reduce(function(r,i){var s=r[i.name];return r[i.name]=s?Object.assign({},s,i,{options:Object.assign({},s.options,i.options),data:Object.assign({},s.data,i.data)}):i,r},{});return Object.keys(t).map(function(r){return t[r]})}var Ah={placement:"bottom",modifiers:[],strategy:"absolute"};function Rh(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return!t.some(function(i){return!(i&&typeof i.getBoundingClientRect=="function")})}function NT(e){e===void 0&&(e={});var t=e,r=t.defaultModifiers,i=r===void 0?[]:r,s=t.defaultOptions,a=s===void 0?Ah:s;return function(c,f,g){g===void 0&&(g=a);var h={placement:"bottom",orderedModifiers:[],options:Object.assign({},Ah,a),modifiersData:{},elements:{reference:c,popper:f},attributes:{},styles:{}},v=[],p=!1,y={state:h,setOptions:function(m){var S=typeof m=="function"?m(h.options):m;d(),h.options=Object.assign({},a,h.options,S),h.scrollParents={reference:qn(c)?Ao(c):c.contextElement?Ao(c.contextElement):[],popper:Ao(f)};var E=MT(FT([].concat(i,h.options.modifiers)));return h.orderedModifiers=E.filter(function(R){return R.enabled}),x(),y.update()},forceUpdate:function(){if(!p){var m=h.elements,S=m.reference,E=m.popper;if(Rh(S,E)){h.rects={reference:IT(S,Ho(E),h.options.strategy==="fixed"),popper:Uc(E)},h.reset=!1,h.placement=h.options.placement,h.orderedModifiers.forEach(function(G){return h.modifiersData[G.name]=Object.assign({},G.data)});for(var R=0;R<h.orderedModifiers.length;R++){if(h.reset===!0){h.reset=!1,R=-1;continue}var O=h.orderedModifiers[R],k=O.fn,W=O.options,M=W===void 0?{}:W,F=O.name;typeof k=="function"&&(h=k({state:h,options:M,name:F,instance:y})||h)}}}},update:DT(function(){return new Promise(function(b){y.forceUpdate(),b(h)})}),destroy:function(){d(),p=!0}};if(!Rh(c,f))return y;y.setOptions(g).then(function(b){!p&&g.onFirstUpdate&&g.onFirstUpdate(b)});function x(){h.orderedModifiers.forEach(function(b){var m=b.name,S=b.options,E=S===void 0?{}:S,R=b.effect;if(typeof R=="function"){var O=R({state:h,name:m,instance:y,options:E}),k=function(){};v.push(O||k)}})}function d(){v.forEach(function(b){return b()}),v=[]}return y}}var jT=[uT,TT,sT,VO,_T,wT,PT,rT,xT],zT=NT({defaultModifiers:jT}),Ws=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function cv(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ol,Ph;function BT(){if(Ph)return Ol;Ph=1;var e=typeof Element<"u",t=typeof Map=="function",r=typeof Set=="function",i=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function s(a,u){if(a===u)return!0;if(a&&u&&typeof a=="object"&&typeof u=="object"){if(a.constructor!==u.constructor)return!1;var c,f,g;if(Array.isArray(a)){if(c=a.length,c!=u.length)return!1;for(f=c;f--!==0;)if(!s(a[f],u[f]))return!1;return!0}var h;if(t&&a instanceof Map&&u instanceof Map){if(a.size!==u.size)return!1;for(h=a.entries();!(f=h.next()).done;)if(!u.has(f.value[0]))return!1;for(h=a.entries();!(f=h.next()).done;)if(!s(f.value[1],u.get(f.value[0])))return!1;return!0}if(r&&a instanceof Set&&u instanceof Set){if(a.size!==u.size)return!1;for(h=a.entries();!(f=h.next()).done;)if(!u.has(f.value[0]))return!1;return!0}if(i&&ArrayBuffer.isView(a)&&ArrayBuffer.isView(u)){if(c=a.length,c!=u.length)return!1;for(f=c;f--!==0;)if(a[f]!==u[f])return!1;return!0}if(a.constructor===RegExp)return a.source===u.source&&a.flags===u.flags;if(a.valueOf!==Object.prototype.valueOf&&typeof a.valueOf=="function"&&typeof u.valueOf=="function")return a.valueOf()===u.valueOf();if(a.toString!==Object.prototype.toString&&typeof a.toString=="function"&&typeof u.toString=="function")return a.toString()===u.toString();if(g=Object.keys(a),c=g.length,c!==Object.keys(u).length)return!1;for(f=c;f--!==0;)if(!Object.prototype.hasOwnProperty.call(u,g[f]))return!1;if(e&&a instanceof Element)return!1;for(f=c;f--!==0;)if(!((g[f]==="_owner"||g[f]==="__v"||g[f]==="__o")&&a.$$typeof)&&!s(a[g[f]],u[g[f]]))return!1;return!0}return a!==a&&u!==u}return Ol=function(u,c){try{return s(u,c)}catch(f){if((f.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw f}},Ol}var WT=BT();const HT=cv(WT);var UT=[],Vc=function(t,r,i){i===void 0&&(i={});var s=$.useRef(null),a={onFirstUpdate:i.onFirstUpdate,placement:i.placement||"bottom",strategy:i.strategy||"absolute",modifiers:i.modifiers||UT},u=$.useState({styles:{popper:{position:a.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),c=u[0],f=u[1],g=$.useMemo(function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(y){var x=y.state,d=Object.keys(x.elements);LO.flushSync(function(){f({styles:yh(d.map(function(b){return[b,x.styles[b]||{}]})),attributes:yh(d.map(function(b){return[b,x.attributes[b]]}))})})},requires:["computeStyles"]}},[]),h=$.useMemo(function(){var p={onFirstUpdate:a.onFirstUpdate,placement:a.placement,strategy:a.strategy,modifiers:[].concat(a.modifiers,[g,{name:"applyStyles",enabled:!1}])};return HT(s.current,p)?s.current||p:(s.current=p,p)},[a.onFirstUpdate,a.placement,a.strategy,a.modifiers,g]),v=$.useRef();return wh(function(){v.current&&v.current.setOptions(h)},[h]),wh(function(){if(!(t==null||r==null)){var p=i.createPopper||zT,y=p(t,r,h);return v.current=y,function(){y.destroy(),v.current=null}}},[t,r,i.createPopper]),{state:v.current?v.current.state:null,styles:c.styles,attributes:c.attributes,update:v.current?v.current.update:null,forceUpdate:v.current?v.current.forceUpdate:null}};const fv=e=>D.jsx("div",{className:"absolute inset-0 z-[1999]",onClick:e.onClick}),dv=B.forwardRef(({children:e,style:t,attributes:r},i)=>D.jsx("div",{style:{...t,zIndex:2e3},...r,ref:i,className:"w-60 rounded border rounded border border-grey-50 bg-grey-900 shadow-2xl","data-cy":"dialogBody",children:e})),qT=({referenceElement:e,placement:t,isOpen:r,children:i,onClose:s})=>{const[a,u]=B.useState(null),{styles:c,attributes:f}=Vc(e,a,{placement:t||"bottom-start"}),g=B.useCallback(()=>{s&&s()},[s]);return r?D.jsxs(ev,{children:[D.jsx(fv,{onClick:()=>g()}),D.jsx(dv,{ref:u,style:c.popper,attributes:f.popper,children:i})]}):null};var Tl={exports:{}};/*!
2
2
  Copyright (c) 2018 Jed Watson.
3
3
  Licensed under the MIT License (MIT), see
4
4
  http://jedwatson.github.io/classnames
5
- */var bh;function tm(){return bh||(bh=1,(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var a="",l=0;l<arguments.length;l++){var c=arguments[l];c&&(a=s(a,i(c)))}return a}function i(a){if(typeof a=="string"||typeof a=="number")return a;if(typeof a!="object")return"";if(Array.isArray(a))return r.apply(null,a);if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]"))return a.toString();var l="";for(var c in a)t.call(a,c)&&a[c]&&(l=s(l,c));return l}function s(a,l){return l?a?a+" "+l:a+l:a}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(ml)),ml.exports}var RA=tm();const We=Yv(RA);function Mn(){return Mn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},Mn.apply(this,arguments)}const PA=["children","options"],wh=["allowFullScreen","allowTransparency","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","charSet","classId","colSpan","contentEditable","contextMenu","crossOrigin","encType","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","hrefLang","inputMode","keyParams","keyType","marginHeight","marginWidth","maxLength","mediaGroup","minLength","noValidate","radioGroup","readOnly","rowSpan","spellCheck","srcDoc","srcLang","srcSet","tabIndex","useMap"].reduce((e,t)=>(e[t.toLowerCase()]=t,e),{class:"className",for:"htmlFor"}),xh={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},CA=["style","script","pre"],kA=["src","href","data","formAction","srcDoc","action"],$A=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,IA=/\n{2,}$/,Sh=/^(\s*>[\s\S]*?)(?=\n\n|$)/,LA=/^ *> ?/gm,MA=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,FA=/^ {2,}\n/,DA=/^(?:([-*_])( *\1){2,}) *(?:\n *)+\n/,Eh=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,_h=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,NA=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,jA=/^(?:\n *)*\n/,zA=/\r\n?/g,WA=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,BA=/^\[\^([^\]]+)]/,UA=/\f/g,HA=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,qA=/^\s*?\[(x|\s)\]/,Oh=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,Ah=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,Th=/^([^\n]+)\n *(=|-)\2{2,} *\n/,yl=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i,ZA=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,Rh=/^<!--[\s\S]*?(?:-->)/,GA=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,bl=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,KA=/^\{.*\}$/,VA=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,XA=/^<([^ >]+[:@\/][^ >]+)>/,YA=/-([a-z])?/gi,Ph=/^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,JA=/^[^\n]+(?: \n|\n{2,})/,QA=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,eT=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,tT=/^\[([^\]]*)\] ?\[([^\]]*)\]/,rT=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,nT=/\t/g,iT=/(^ *\||\| *$)/g,oT=/^ *:-+: *$/,sT=/^ *:-+ *$/,aT=/^ *-+: *$/,Ca=e=>`(?=[\\s\\S]+?\\1${e?"\\1":""})`,ka="((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\1|[\\s\\S])+?)",uT=RegExp(`^([*_])\\1${Ca(1)}${ka}\\1\\1(?!\\1)`),lT=RegExp(`^([*_])${Ca(0)}${ka}\\1(?!\\1)`),cT=RegExp(`^(==)${Ca(0)}${ka}\\1`),fT=RegExp(`^(~~)${Ca(0)}${ka}\\1`),dT=/^(:[a-zA-Z0-9-_]+:)/,pT=/^\\([^0-9A-Za-z\s])/,hT=/\\([^0-9A-Za-z\s])/g,gT=/^[\s\S](?:(?! \n|[0-9]\.|http)[^=*_~\-\n:<`\\\[!])*/,vT=/^\n+/,mT=/^([ \t]*)/,yT=/(?:^|\n)( *)$/,zc="(?:\\d+\\.)",Wc="(?:[*+-])";function rm(e){return"( *)("+(e===1?zc:Wc)+") +"}const nm=rm(1),im=rm(2);function om(e){return RegExp("^"+(e===1?nm:im))}const bT=om(1),wT=om(2);function sm(e){return RegExp("^"+(e===1?nm:im)+"[^\\n]*(?:\\n(?!\\1"+(e===1?zc:Wc)+" )[^\\n]*)*(\\n|$)","gm")}const xT=sm(1),ST=sm(2);function am(e){const t=e===1?zc:Wc;return RegExp("^( *)("+t+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+t+" (?!"+t+" ))\\n*|\\s*\\n*$)")}const um=am(1),lm=am(2);function Ch(e,t){const r=t===1,i=r?um:lm,s=r?xT:ST,a=r?bT:wT;return{t:l=>a.test(l),o:xi(function(l,c){const f=yT.exec(c.prevCapture);return f&&(c.list||!c.inline&&!c.simple)?i.exec(l=f[1]+l):null}),i:1,u(l,c,f){const m=r?+l[2]:void 0,v=l[0].replace(IA,`
6
- `).match(s);let g=!1;return{items:v.map(function(p,b){const x=a.exec(p)[0].length,d=RegExp("^ {1,"+x+"}","gm"),w=p.replace(d,"").replace(a,""),h=b===v.length-1,S=w.indexOf(`
5
+ */var Ch;function pv(){return Ch||(Ch=1,(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var a="",u=0;u<arguments.length;u++){var c=arguments[u];c&&(a=s(a,i(c)))}return a}function i(a){if(typeof a=="string"||typeof a=="number")return a;if(typeof a!="object")return"";if(Array.isArray(a))return r.apply(null,a);if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]"))return a.toString();var u="";for(var c in a)t.call(a,c)&&a[c]&&(u=s(u,c));return u}function s(a,u){return u?a?a+" "+u:a+u:a}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(Tl)),Tl.exports}var ZT=pv();const je=cv(ZT);function jn(){return jn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},jn.apply(this,arguments)}const GT=["children","options"],kh=["allowFullScreen","allowTransparency","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","charSet","classId","colSpan","contentEditable","contextMenu","crossOrigin","encType","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","hrefLang","inputMode","keyParams","keyType","marginHeight","marginWidth","maxLength","mediaGroup","minLength","noValidate","radioGroup","readOnly","rowSpan","spellCheck","srcDoc","srcLang","srcSet","tabIndex","useMap"].reduce((e,t)=>(e[t.toLowerCase()]=t,e),{class:"className",for:"htmlFor"}),$h={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},KT=["style","script","pre"],VT=["src","href","data","formAction","srcDoc","action"],YT=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,XT=/\n{2,}$/,Ih=/^(\s*>[\s\S]*?)(?=\n\n|$)/,JT=/^ *> ?/gm,QT=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,eA=/^ {2,}\n/,tA=/^(?:([-*_])( *\1){2,}) *(?:\n *)+\n/,Lh=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,Mh=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,rA=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,nA=/^(?:\n *)*\n/,iA=/\r\n?/g,oA=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,sA=/^\[\^([^\]]+)]/,aA=/\f/g,uA=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,lA=/^\s*?\[(x|\s)\]/,Dh=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,Fh=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,Nh=/^([^\n]+)\n *(=|-)\2{2,} *\n/,Al=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i,cA=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,jh=/^<!--[\s\S]*?(?:-->)/,fA=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,Rl=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,dA=/^\{.*\}$/,pA=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,hA=/^<([^ >]+[:@\/][^ >]+)>/,gA=/-([a-z])?/gi,zh=/^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,mA=/^[^\n]+(?: \n|\n{2,})/,vA=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,yA=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,wA=/^\[([^\]]*)\] ?\[([^\]]*)\]/,bA=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,xA=/\t/g,SA=/(^ *\||\| *$)/g,EA=/^ *:-+: *$/,_A=/^ *:-+ *$/,OA=/^ *-+: *$/,Fa=e=>`(?=[\\s\\S]+?\\1${e?"\\1":""})`,Na="((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\1|[\\s\\S])+?)",TA=RegExp(`^([*_])\\1${Fa(1)}${Na}\\1\\1(?!\\1)`),AA=RegExp(`^([*_])${Fa(0)}${Na}\\1(?!\\1)`),RA=RegExp(`^(==)${Fa(0)}${Na}\\1`),PA=RegExp(`^(~~)${Fa(0)}${Na}\\1`),CA=/^(:[a-zA-Z0-9-_]+:)/,kA=/^\\([^0-9A-Za-z\s])/,$A=/\\([^0-9A-Za-z\s])/g,IA=/^[\s\S](?:(?! \n|[0-9]\.|http)[^=*_~\-\n:<`\\\[!])*/,LA=/^\n+/,MA=/^([ \t]*)/,DA=/(?:^|\n)( *)$/,Yc="(?:\\d+\\.)",Xc="(?:[*+-])";function hv(e){return"( *)("+(e===1?Yc:Xc)+") +"}const gv=hv(1),mv=hv(2);function vv(e){return RegExp("^"+(e===1?gv:mv))}const FA=vv(1),NA=vv(2);function yv(e){return RegExp("^"+(e===1?gv:mv)+"[^\\n]*(?:\\n(?!\\1"+(e===1?Yc:Xc)+" )[^\\n]*)*(\\n|$)","gm")}const jA=yv(1),zA=yv(2);function wv(e){const t=e===1?Yc:Xc;return RegExp("^( *)("+t+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+t+" (?!"+t+" ))\\n*|\\s*\\n*$)")}const bv=wv(1),xv=wv(2);function Bh(e,t){const r=t===1,i=r?bv:xv,s=r?jA:zA,a=r?FA:NA;return{t:u=>a.test(u),o:Ti(function(u,c){const f=DA.exec(c.prevCapture);return f&&(c.list||!c.inline&&!c.simple)?i.exec(u=f[1]+u):null}),i:1,u(u,c,f){const g=r?+u[2]:void 0,h=u[0].replace(XT,`
6
+ `).match(s);let v=!1;return{items:h.map(function(p,y){const x=a.exec(p)[0].length,d=RegExp("^ {1,"+x+"}","gm"),b=p.replace(d,"").replace(a,""),m=y===h.length-1,S=b.indexOf(`
7
7
 
8
- `)!==-1||h&&g;g=S;const E=f.inline,R=f.list;let O;f.list=!0,S?(f.inline=!1,O=So(w)+`
8
+ `)!==-1||m&&v;v=S;const E=f.inline,R=f.list;let O;f.list=!0,S?(f.inline=!1,O=Ro(b)+`
9
9
 
10
- `):(f.inline=!0,O=So(w));const k=c(O,f);return f.inline=E,f.list=R,k}),ordered:r,start:m}},l:(l,c,f)=>e(l.ordered?"ol":"ul",{key:f.key,start:l.type==="20"?l.start:void 0},l.items.map(function(m,v){return e("li",{key:v},c(m,f))}))}}const ET=RegExp(`^\\[((?:\\[[^\\[\\]]*(?:\\[[^\\[\\]]*\\][^\\[\\]]*)*\\]|[^\\[\\]])*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`),_T=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/;function kh(e){return typeof e=="string"}function So(e){let t=e.length;for(;t>0&&e[t-1]<=" ";)t--;return e.slice(0,t)}function oa(e,t){return e.startsWith(t)}function OT(e,t,r){if(Array.isArray(r)){for(let i=0;i<r.length;i++)if(oa(e,r[i]))return!0;return!1}return r(e,t)}function Ui(e){return e.replace(/[ÀÁÂÃÄÅàáâãä忯]/g,"a").replace(/[çÇ]/g,"c").replace(/[ðÐ]/g,"d").replace(/[ÈÉÊËéèêë]/g,"e").replace(/[ÏïÎîÍíÌì]/g,"i").replace(/[Ññ]/g,"n").replace(/[øØœŒÕõÔôÓóÒò]/g,"o").replace(/[ÜüÛûÚúÙù]/g,"u").replace(/[ŸÿÝý]/g,"y").replace(/[^a-z0-9- ]/gi,"").replace(/ /gi,"-").toLowerCase()}function AT(e){return aT.test(e)?"right":oT.test(e)?"center":sT.test(e)?"left":null}function $h(e,t,r,i){const s=r.inTable;r.inTable=!0;let a=[[]],l="";function c(){if(!l)return;const f=a[a.length-1];f.push.apply(f,t(l,r)),l=""}return e.trim().split(/(`[^`]*`|\\\||\|)/).filter(Boolean).forEach((f,m,v)=>{f.trim()==="|"&&(c(),i)?m!==0&&m!==v.length-1&&a.push([]):l+=f}),c(),r.inTable=s,a}function TT(e,t,r){r.inline=!0;const i=e[2]?e[2].replace(iT,"").split("|").map(AT):[],s=e[3]?(function(l,c,f){return l.trim().split(`
11
- `).map(function(m){return $h(m,c,f,!0)})})(e[3],t,r):[],a=$h(e[1],t,r,!!s.length);return r.inline=!1,s.length?{align:i,cells:s,header:a,type:"25"}:{children:a,type:"21"}}function Ih(e,t){return e.align[t]==null?{}:{textAlign:e.align[t]}}function xi(e){return e.inline=1,e}function Cn(e){return xi(function(t,r){return r.inline?e.exec(t):null})}function an(e){return xi(function(t,r){return r.inline||r.simple?e.exec(t):null})}function Br(e){return function(t,r){return r.inline||r.simple?null:e.exec(t)}}function Ns(e){return xi(function(t){return e.exec(t)})}const RT=/(javascript|vbscript|data(?!:image)):/i;function PT(e){try{const t=decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"");if(RT.test(t))return null}catch{return null}return e}function wr(e){return e&&e.replace(hT,"$1")}function sa(e,t,r){const i=r.inline||!1,s=r.simple||!1;r.inline=!0,r.simple=!0;const a=e(t,r);return r.inline=i,r.simple=s,a}function CT(e,t,r){const i=r.inline||!1,s=r.simple||!1;r.inline=!1,r.simple=!0;const a=e(t,r);return r.inline=i,r.simple=s,a}function kT(e,t,r){const i=r.inline||!1;r.inline=!1;const s=e(t,r);return r.inline=i,s}const wl=(e,t,r)=>({children:sa(t,e[2],r)});function xl(){return{}}function Sl(){return null}function $T(...e){return e.filter(Boolean).join(" ")}function El(e,t,r){let i=e;const s=t.split(".");for(;s.length&&(i=i[s[0]],i!==void 0);)s.shift();return i||r}function IT(e="",t={}){t.overrides=t.overrides||{},t.namedCodesToUnicode=t.namedCodesToUnicode?Mn({},xh,t.namedCodesToUnicode):xh;const r=t.slugify||Ui,i=t.sanitizer||PT,s=t.createElement||$.createElement,a=[Sh,Eh,_h,t.enforceAtxHeadings?Ah:Oh,Th,Ph,um,lm],l=[...a,JA,yl,Rh,bl];function c(h,S){for(let E=0;E<h.length;E++)if(h[E].test(S))return!0;return!1}function f(h,S,...E){const R=El(t.overrides,h+".props",{});return s((function(O,k){const B=El(k,O);return B?typeof B=="function"||typeof B=="object"&&"render"in B?B:El(k,O+".component",O):O})(h,t.overrides),Mn({},S,R,{className:$T(S==null?void 0:S.className,R.className)||void 0}),...E)}function m(h){h=h.replace(HA,"");let S=!1;t.forceInline?S=!0:t.forceBlock||(S=rT.test(h)===!1);const E=d(x(S?h:So(h).replace(vT,"")+`
10
+ `):(f.inline=!0,O=Ro(b));const k=c(O,f);return f.inline=E,f.list=R,k}),ordered:r,start:g}},l:(u,c,f)=>e(u.ordered?"ol":"ul",{key:f.key,start:u.type==="20"?u.start:void 0},u.items.map(function(g,h){return e("li",{key:h},c(g,f))}))}}const BA=RegExp(`^\\[((?:\\[[^\\[\\]]*(?:\\[[^\\[\\]]*\\][^\\[\\]]*)*\\]|[^\\[\\]])*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`),WA=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/;function Wh(e){return typeof e=="string"}function Ro(e){let t=e.length;for(;t>0&&e[t-1]<=" ";)t--;return e.slice(0,t)}function ca(e,t){return e.startsWith(t)}function HA(e,t,r){if(Array.isArray(r)){for(let i=0;i<r.length;i++)if(ca(e,r[i]))return!0;return!1}return r(e,t)}function Vi(e){return e.replace(/[ÀÁÂÃÄÅàáâãä忯]/g,"a").replace(/[çÇ]/g,"c").replace(/[ðÐ]/g,"d").replace(/[ÈÉÊËéèêë]/g,"e").replace(/[ÏïÎîÍíÌì]/g,"i").replace(/[Ññ]/g,"n").replace(/[øØœŒÕõÔôÓóÒò]/g,"o").replace(/[ÜüÛûÚúÙù]/g,"u").replace(/[ŸÿÝý]/g,"y").replace(/[^a-z0-9- ]/gi,"").replace(/ /gi,"-").toLowerCase()}function UA(e){return OA.test(e)?"right":EA.test(e)?"center":_A.test(e)?"left":null}function Hh(e,t,r,i){const s=r.inTable;r.inTable=!0;let a=[[]],u="";function c(){if(!u)return;const f=a[a.length-1];f.push.apply(f,t(u,r)),u=""}return e.trim().split(/(`[^`]*`|\\\||\|)/).filter(Boolean).forEach((f,g,h)=>{f.trim()==="|"&&(c(),i)?g!==0&&g!==h.length-1&&a.push([]):u+=f}),c(),r.inTable=s,a}function qA(e,t,r){r.inline=!0;const i=e[2]?e[2].replace(SA,"").split("|").map(UA):[],s=e[3]?(function(u,c,f){return u.trim().split(`
11
+ `).map(function(g){return Hh(g,c,f,!0)})})(e[3],t,r):[],a=Hh(e[1],t,r,!!s.length);return r.inline=!1,s.length?{align:i,cells:s,header:a,type:"25"}:{children:a,type:"21"}}function Uh(e,t){return e.align[t]==null?{}:{textAlign:e.align[t]}}function Ti(e){return e.inline=1,e}function Ln(e){return Ti(function(t,r){return r.inline?e.exec(t):null})}function fn(e){return Ti(function(t,r){return r.inline||r.simple?e.exec(t):null})}function qr(e){return function(t,r){return r.inline||r.simple?null:e.exec(t)}}function Hs(e){return Ti(function(t){return e.exec(t)})}const ZA=/(javascript|vbscript|data(?!:image)):/i;function GA(e){try{const t=decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"");if(ZA.test(t))return null}catch{return null}return e}function Er(e){return e&&e.replace($A,"$1")}function fa(e,t,r){const i=r.inline||!1,s=r.simple||!1;r.inline=!0,r.simple=!0;const a=e(t,r);return r.inline=i,r.simple=s,a}function KA(e,t,r){const i=r.inline||!1,s=r.simple||!1;r.inline=!1,r.simple=!0;const a=e(t,r);return r.inline=i,r.simple=s,a}function VA(e,t,r){const i=r.inline||!1;r.inline=!1;const s=e(t,r);return r.inline=i,s}const Pl=(e,t,r)=>({children:fa(t,e[2],r)});function Cl(){return{}}function kl(){return null}function YA(...e){return e.filter(Boolean).join(" ")}function $l(e,t,r){let i=e;const s=t.split(".");for(;s.length&&(i=i[s[0]],i!==void 0);)s.shift();return i||r}function XA(e="",t={}){t.overrides=t.overrides||{},t.namedCodesToUnicode=t.namedCodesToUnicode?jn({},$h,t.namedCodesToUnicode):$h;const r=t.slugify||Vi,i=t.sanitizer||GA,s=t.createElement||$.createElement,a=[Ih,Lh,Mh,t.enforceAtxHeadings?Fh:Dh,Nh,zh,bv,xv],u=[...a,mA,Al,jh,Rl];function c(m,S){for(let E=0;E<m.length;E++)if(m[E].test(S))return!0;return!1}function f(m,S,...E){const R=$l(t.overrides,m+".props",{});return s((function(O,k){const W=$l(k,O);return W?typeof W=="function"||typeof W=="object"&&"render"in W?W:$l(k,O+".component",O):O})(m,t.overrides),jn({},S,R,{className:YA(S==null?void 0:S.className,R.className)||void 0}),...E)}function g(m){m=m.replace(uA,"");let S=!1;t.forceInline?S=!0:t.forceBlock||(S=bA.test(m)===!1);const E=d(x(S?m:Ro(m).replace(LA,"")+`
12
12
 
13
- `,{inline:S}));for(;kh(E[E.length-1])&&!E[E.length-1].trim();)E.pop();if(t.wrapper===null)return E;const R=t.wrapper||(S?"span":"div");let O;if(E.length>1||t.forceWrapper)O=E;else{if(E.length===1)return O=E[0],typeof O=="string"?f("span",{key:"outer"},O):O;O=null}return s(R,{key:"outer"},O)}function v(h,S){if(!S||!S.trim())return null;const E=S.match($A);return E?E.reduce(function(R,O){const k=O.indexOf("=");if(k!==-1){const B=(function(j){return j.indexOf("-")!==-1&&j.match(GA)===null&&(j=j.replace(YA,function(L,U){return U.toUpperCase()})),j})(O.slice(0,k)).trim(),M=(function(j){const L=j[0];return(L==='"'||L==="'")&&j.length>=2&&j[j.length-1]===L?j.slice(1,-1):j})(O.slice(k+1).trim()),F=wh[B]||B;if(F==="ref")return R;const G=R[F]=(function(j,L,U,q){return L==="style"?(function(C){const J=[];let X="",te=!1,de=!1,Z="";if(!C)return J;for(let se=0;se<C.length;se++){const ue=C[se];if(ue!=='"'&&ue!=="'"||te||(de?ue===Z&&(de=!1,Z=""):(de=!0,Z=ue)),ue==="("&&X.endsWith("url")?te=!0:ue===")"&&te&&(te=!1),ue!==";"||de||te)X+=ue;else{const ne=X.trim();if(ne){const ce=ne.indexOf(":");if(ce>0){const fe=ne.slice(0,ce).trim(),ye=ne.slice(ce+1).trim();J.push([fe,ye])}}X=""}}const Q=X.trim();if(Q){const se=Q.indexOf(":");if(se>0){const ue=Q.slice(0,se).trim(),ne=Q.slice(se+1).trim();J.push([ue,ne])}}return J})(U).reduce(function(C,[J,X]){return C[J.replace(/(-[a-z])/g,te=>te[1].toUpperCase())]=q(X,j,J),C},{}):kA.indexOf(L)!==-1?q(wr(U),j,L):(U.match(KA)&&(U=wr(U.slice(1,U.length-1))),U==="true"||U!=="false"&&U)})(h,B,M,i);typeof G=="string"&&(yl.test(G)||bl.test(G))&&(R[F]=m(G.trim()))}else O!=="style"&&(R[wh[O]||O]=!0);return R},{}):null}const g=[],p={},b={0:{t:[">"],o:Br(Sh),i:1,u(h,S,E){const[,R,O]=h[0].replace(LA,"").match(MA);return{alert:R,children:S(O,E)}},l(h,S,E){const R={key:E.key};return h.alert&&(R.className="markdown-alert-"+r(h.alert.toLowerCase(),Ui),h.children.unshift({attrs:{},children:[{type:"27",text:h.alert}],noInnerParse:!0,type:"11",tag:"header"})),f("blockquote",R,S(h.children,E))}},1:{t:[" "],o:Ns(FA),i:1,u:xl,l:(h,S,E)=>f("br",{key:E.key})},2:{t:["--","__","**","- ","* ","_ "],o:Br(DA),i:1,u:xl,l:(h,S,E)=>f("hr",{key:E.key})},3:{t:[" "],o:Br(_h),i:0,u:h=>({lang:void 0,text:wr(So(h[0].replace(/^ {4}/gm,"")))}),l:(h,S,E)=>f("pre",{key:E.key},f("code",Mn({},h.attrs,{className:h.lang?"lang-"+h.lang:""}),h.text))},4:{t:["```","~~~"],o:Br(Eh),i:0,u:h=>({attrs:v("code",h[3]||""),lang:h[2]||void 0,text:h[4],type:"3"})},5:{t:["`"],o:an(NA),i:3,u:h=>({text:wr(h[2])}),l:(h,S,E)=>f("code",{key:E.key},h.text)},6:{t:["[^"],o:Br(WA),i:0,u:h=>(g.push({footnote:h[2],identifier:h[1]}),{}),l:Sl},7:{t:["[^"],o:Cn(BA),i:1,u:h=>({target:"#"+r(h[1],Ui),text:h[1]}),l:(h,S,E)=>f("a",{key:E.key,href:i(h.target,"a","href")},f("sup",{key:E.key},h.text))},8:{t:["[ ]","[x]"],o:Cn(qA),i:1,u:h=>({completed:h[1].toLowerCase()==="x"}),l:(h,S,E)=>f("input",{checked:h.completed,key:E.key,readOnly:!0,type:"checkbox"})},9:{t:["#"],o:Br(t.enforceAtxHeadings?Ah:Oh),i:1,u:(h,S,E)=>({children:sa(S,h[2],E),id:r(h[2],Ui),level:h[1].length}),l:(h,S,E)=>f("h"+h.level,{id:h.id,key:E.key},S(h.children,E))},10:{t:h=>{const S=h.indexOf(`
14
- `);return S>0&&S<h.length-1&&(h[S+1]==="="||h[S+1]==="-")},o:Br(Th),i:0,u:(h,S,E)=>({children:sa(S,h[1],E),level:h[2]==="="?1:2,type:"9"})},11:{t:["<"],o:Ns(yl),i:1,u(h,S,E){const[,R]=h[3].match(mT),O=RegExp("^"+R,"gm"),k=h[3].replace(O,""),B=c(l,k)?kT:sa,M=h[1].toLowerCase(),F=CA.indexOf(M)!==-1,G=(F?M:h[1]).trim(),j={attrs:v(G,h[2]),noInnerParse:F,tag:G};if(E.inAnchor=E.inAnchor||M==="a",F)j.text=h[3];else{const L=E.inHTML;E.inHTML=!0,j.children=B(S,k,E),E.inHTML=L}return E.inAnchor=!1,j},l:(h,S,E)=>f(h.tag,Mn({key:E.key},h.attrs),h.text||(h.children?S(h.children,E):""))},13:{t:["<"],o:Ns(bl),i:1,u(h){const S=h[1].trim();return{attrs:v(S,h[2]||""),tag:S}},l:(h,S,E)=>f(h.tag,Mn({},h.attrs,{key:E.key}))},12:{t:["<!--"],o:Ns(Rh),i:1,u:()=>({}),l:Sl},14:{t:["!["],o:an(_T),i:1,u:h=>({alt:wr(h[1]),target:wr(h[2]),title:wr(h[3])}),l:(h,S,E)=>f("img",{key:E.key,alt:h.alt||void 0,title:h.title||void 0,src:i(h.target,"img","src")})},15:{t:["["],o:Cn(ET),i:3,u:(h,S,E)=>({children:CT(S,h[1],E),target:wr(h[2]),title:wr(h[3])}),l:(h,S,E)=>f("a",{key:E.key,href:i(h.target,"a","href"),title:h.title},S(h.children,E))},16:{t:["<"],o:Cn(XA),i:0,u(h){let S=h[1],E=!1;return S.indexOf("@")!==-1&&S.indexOf("//")===-1&&(E=!0,S=S.replace("mailto:","")),{children:[{text:S,type:"27"}],target:E?"mailto:"+S:S,type:"15"}}},17:{t:(h,S)=>!S.inAnchor&&!t.disableAutoLink&&(oa(h,"http://")||oa(h,"https://")),o:Cn(VA),i:0,u:h=>({children:[{text:h[1],type:"27"}],target:h[1],title:void 0,type:"15"})},20:Ch(f,1),33:Ch(f,2),19:{t:[`
15
- `],o:Br(jA),i:3,u:xl,l:()=>`
16
- `},21:{o:xi(function(h,S){if(S.inline||S.simple||S.inHTML&&h.indexOf(`
13
+ `,{inline:S}));for(;Wh(E[E.length-1])&&!E[E.length-1].trim();)E.pop();if(t.wrapper===null)return E;const R=t.wrapper||(S?"span":"div");let O;if(E.length>1||t.forceWrapper)O=E;else{if(E.length===1)return O=E[0],typeof O=="string"?f("span",{key:"outer"},O):O;O=null}return s(R,{key:"outer"},O)}function h(m,S){if(!S||!S.trim())return null;const E=S.match(YT);return E?E.reduce(function(R,O){const k=O.indexOf("=");if(k!==-1){const W=(function(j){return j.indexOf("-")!==-1&&j.match(fA)===null&&(j=j.replace(gA,function(L,H){return H.toUpperCase()})),j})(O.slice(0,k)).trim(),M=(function(j){const L=j[0];return(L==='"'||L==="'")&&j.length>=2&&j[j.length-1]===L?j.slice(1,-1):j})(O.slice(k+1).trim()),F=kh[W]||W;if(F==="ref")return R;const G=R[F]=(function(j,L,H,q){return L==="style"?(function(C){const J=[];let Y="",te=!1,de=!1,Z="";if(!C)return J;for(let se=0;se<C.length;se++){const ue=C[se];if(ue!=='"'&&ue!=="'"||te||(de?ue===Z&&(de=!1,Z=""):(de=!0,Z=ue)),ue==="("&&Y.endsWith("url")?te=!0:ue===")"&&te&&(te=!1),ue!==";"||de||te)Y+=ue;else{const ne=Y.trim();if(ne){const ce=ne.indexOf(":");if(ce>0){const fe=ne.slice(0,ce).trim(),ye=ne.slice(ce+1).trim();J.push([fe,ye])}}Y=""}}const Q=Y.trim();if(Q){const se=Q.indexOf(":");if(se>0){const ue=Q.slice(0,se).trim(),ne=Q.slice(se+1).trim();J.push([ue,ne])}}return J})(H).reduce(function(C,[J,Y]){return C[J.replace(/(-[a-z])/g,te=>te[1].toUpperCase())]=q(Y,j,J),C},{}):VT.indexOf(L)!==-1?q(Er(H),j,L):(H.match(dA)&&(H=Er(H.slice(1,H.length-1))),H==="true"||H!=="false"&&H)})(m,W,M,i);typeof G=="string"&&(Al.test(G)||Rl.test(G))&&(R[F]=g(G.trim()))}else O!=="style"&&(R[kh[O]||O]=!0);return R},{}):null}const v=[],p={},y={0:{t:[">"],o:qr(Ih),i:1,u(m,S,E){const[,R,O]=m[0].replace(JT,"").match(QT);return{alert:R,children:S(O,E)}},l(m,S,E){const R={key:E.key};return m.alert&&(R.className="markdown-alert-"+r(m.alert.toLowerCase(),Vi),m.children.unshift({attrs:{},children:[{type:"27",text:m.alert}],noInnerParse:!0,type:"11",tag:"header"})),f("blockquote",R,S(m.children,E))}},1:{t:[" "],o:Hs(eA),i:1,u:Cl,l:(m,S,E)=>f("br",{key:E.key})},2:{t:["--","__","**","- ","* ","_ "],o:qr(tA),i:1,u:Cl,l:(m,S,E)=>f("hr",{key:E.key})},3:{t:[" "],o:qr(Mh),i:0,u:m=>({lang:void 0,text:Er(Ro(m[0].replace(/^ {4}/gm,"")))}),l:(m,S,E)=>f("pre",{key:E.key},f("code",jn({},m.attrs,{className:m.lang?"lang-"+m.lang:""}),m.text))},4:{t:["```","~~~"],o:qr(Lh),i:0,u:m=>({attrs:h("code",m[3]||""),lang:m[2]||void 0,text:m[4],type:"3"})},5:{t:["`"],o:fn(rA),i:3,u:m=>({text:Er(m[2])}),l:(m,S,E)=>f("code",{key:E.key},m.text)},6:{t:["[^"],o:qr(oA),i:0,u:m=>(v.push({footnote:m[2],identifier:m[1]}),{}),l:kl},7:{t:["[^"],o:Ln(sA),i:1,u:m=>({target:"#"+r(m[1],Vi),text:m[1]}),l:(m,S,E)=>f("a",{key:E.key,href:i(m.target,"a","href")},f("sup",{key:E.key},m.text))},8:{t:["[ ]","[x]"],o:Ln(lA),i:1,u:m=>({completed:m[1].toLowerCase()==="x"}),l:(m,S,E)=>f("input",{checked:m.completed,key:E.key,readOnly:!0,type:"checkbox"})},9:{t:["#"],o:qr(t.enforceAtxHeadings?Fh:Dh),i:1,u:(m,S,E)=>({children:fa(S,m[2],E),id:r(m[2],Vi),level:m[1].length}),l:(m,S,E)=>f("h"+m.level,{id:m.id,key:E.key},S(m.children,E))},10:{t:m=>{const S=m.indexOf(`
14
+ `);return S>0&&S<m.length-1&&(m[S+1]==="="||m[S+1]==="-")},o:qr(Nh),i:0,u:(m,S,E)=>({children:fa(S,m[1],E),level:m[2]==="="?1:2,type:"9"})},11:{t:["<"],o:Hs(Al),i:1,u(m,S,E){const[,R]=m[3].match(MA),O=RegExp("^"+R,"gm"),k=m[3].replace(O,""),W=c(u,k)?VA:fa,M=m[1].toLowerCase(),F=KT.indexOf(M)!==-1,G=(F?M:m[1]).trim(),j={attrs:h(G,m[2]),noInnerParse:F,tag:G};if(E.inAnchor=E.inAnchor||M==="a",F)j.text=m[3];else{const L=E.inHTML;E.inHTML=!0,j.children=W(S,k,E),E.inHTML=L}return E.inAnchor=!1,j},l:(m,S,E)=>f(m.tag,jn({key:E.key},m.attrs),m.text||(m.children?S(m.children,E):""))},13:{t:["<"],o:Hs(Rl),i:1,u(m){const S=m[1].trim();return{attrs:h(S,m[2]||""),tag:S}},l:(m,S,E)=>f(m.tag,jn({},m.attrs,{key:E.key}))},12:{t:["<!--"],o:Hs(jh),i:1,u:()=>({}),l:kl},14:{t:["!["],o:fn(WA),i:1,u:m=>({alt:Er(m[1]),target:Er(m[2]),title:Er(m[3])}),l:(m,S,E)=>f("img",{key:E.key,alt:m.alt||void 0,title:m.title||void 0,src:i(m.target,"img","src")})},15:{t:["["],o:Ln(BA),i:3,u:(m,S,E)=>({children:KA(S,m[1],E),target:Er(m[2]),title:Er(m[3])}),l:(m,S,E)=>f("a",{key:E.key,href:i(m.target,"a","href"),title:m.title},S(m.children,E))},16:{t:["<"],o:Ln(hA),i:0,u(m){let S=m[1],E=!1;return S.indexOf("@")!==-1&&S.indexOf("//")===-1&&(E=!0,S=S.replace("mailto:","")),{children:[{text:S,type:"27"}],target:E?"mailto:"+S:S,type:"15"}}},17:{t:(m,S)=>!S.inAnchor&&!t.disableAutoLink&&(ca(m,"http://")||ca(m,"https://")),o:Ln(pA),i:0,u:m=>({children:[{text:m[1],type:"27"}],target:m[1],title:void 0,type:"15"})},20:Bh(f,1),33:Bh(f,2),19:{t:[`
15
+ `],o:qr(nA),i:3,u:Cl,l:()=>`
16
+ `},21:{o:Ti(function(m,S){if(S.inline||S.simple||S.inHTML&&m.indexOf(`
17
17
 
18
18
  `)===-1&&S.prevCapture.indexOf(`
19
19
 
20
- `)===-1)return null;let E="",R=0;for(;;){const k=h.indexOf(`
21
- `,R),B=h.slice(R,k===-1?void 0:k+1);if(c(a,B)||(E+=B,k===-1||!B.trim()))break;R=k+1}const O=So(E);return O===""?null:[E,,O]}),i:3,u:wl,l:(h,S,E)=>f("p",{key:E.key},S(h.children,E))},22:{t:["["],o:Cn(QA),i:0,u:h=>(p[h[1]]={target:h[2],title:h[4]},{}),l:Sl},23:{t:["!["],o:an(eT),i:0,u:h=>({alt:h[1]?wr(h[1]):void 0,ref:h[2]}),l:(h,S,E)=>p[h.ref]?f("img",{key:E.key,alt:h.alt,src:i(p[h.ref].target,"img","src"),title:p[h.ref].title}):null},24:{t:h=>h[0]==="["&&h.indexOf("](")===-1,o:Cn(tT),i:0,u:(h,S,E)=>({children:S(h[1],E),fallbackChildren:h[0],ref:h[2]}),l:(h,S,E)=>p[h.ref]?f("a",{key:E.key,href:i(p[h.ref].target,"a","href"),title:p[h.ref].title},S(h.children,E)):f("span",{key:E.key},h.fallbackChildren)},25:{t:["|"],o:Br(Ph),i:1,u:TT,l(h,S,E){const R=h;return f("table",{key:E.key},f("thead",null,f("tr",null,R.header.map(function(O,k){return f("th",{key:k,style:Ih(R,k)},S(O,E))}))),f("tbody",null,R.cells.map(function(O,k){return f("tr",{key:k},O.map(function(B,M){return f("td",{key:M,style:Ih(R,M)},S(B,E))}))})))}},27:{o:xi(function(h,S){let E;return oa(h,":")&&(E=dT.exec(h)),E||gT.exec(h)}),i:4,u(h){const S=h[0];return{text:S.indexOf("&")===-1?S:S.replace(ZA,(E,R)=>t.namedCodesToUnicode[R]||E)}},l:h=>h.text},28:{t:["**","__"],o:an(uT),i:2,u:(h,S,E)=>({children:S(h[2],E)}),l:(h,S,E)=>f("strong",{key:E.key},S(h.children,E))},29:{t:h=>{const S=h[0];return(S==="*"||S==="_")&&h[1]!==S},o:an(lT),i:3,u:(h,S,E)=>({children:S(h[2],E)}),l:(h,S,E)=>f("em",{key:E.key},S(h.children,E))},30:{t:["\\"],o:an(pT),i:1,u:h=>({text:h[1],type:"27"})},31:{t:["=="],o:an(cT),i:3,u:wl,l:(h,S,E)=>f("mark",{key:E.key},S(h.children,E))},32:{t:["~~"],o:an(fT),i:3,u:wl,l:(h,S,E)=>f("del",{key:E.key},S(h.children,E))}};t.disableParsingRawHTML===!0&&(delete b[11],delete b[13]);const x=(function(h){var S=Object.keys(h);function E(R,O){var k=[];if(O.prevCapture=O.prevCapture||"",R.trim())for(;R;)for(var B=0;B<S.length;){var M=S[B],F=h[M];if(!F.t||OT(R,O,F.t)){var G=F.o(R,O);if(G&&G[0]){R=R.substring(G[0].length);var j=F.u(G,E,O);O.prevCapture+=G[0],j.type||(j.type=M),k.push(j);break}B++}else B++}return O.prevCapture="",k}return S.sort(function(R,O){return h[R].i-h[O].i||(R<O?-1:1)}),function(R,O){return E((function(k){return k.replace(zA,`
22
- `).replace(UA,"").replace(nT," ")})(R),O)}})(b),d=(function(h,S){return function E(R,O={}){if(Array.isArray(R)){const k=O.key,B=[];let M=!1;for(let F=0;F<R.length;F++){O.key=F;const G=E(R[F],O),j=kh(G);j&&M?B[B.length-1]+=G:G!==null&&B.push(G),M=j}return O.key=k,B}return(function(k,B,M){const F=h[k.type].l;return S?S(()=>F(k,B,M),k,B,M):F(k,B,M)})(R,E,O)}})(b,t.renderRule),w=m(e);return g.length?f("div",null,w,f("footer",{key:"footer"},g.map(function(h){return f("div",{id:r(h.identifier,Ui),key:h.identifier},h.identifier,d(x(h.footnote,{inline:!0})))}))):w}const ga=e=>{let{children:t="",options:r}=e,i=(function(s,a){if(s==null)return{};var l,c,f={},m=Object.keys(s);for(c=0;c<m.length;c++)a.indexOf(l=m[c])>=0||(f[l]=s[l]);return f})(e,PA);return $.cloneElement(IT(t,r),i)},Lh=({kind:e,customIcon:t})=>{const r={"text-yellow-400":e==="warning","text-red-500":e==="danger"||e==="error","text-primary":e==="info","text-green-500":e==="message"};if(t)return D.jsx(t,{className:We("flex-none size-6",r)});switch(e){case"error":case"danger":return D.jsx(tt.FdSanityCheckInfo,{className:We("flex-none size-6",r)});case"info":return D.jsx(D.Fragment,{children:D.jsx(tt.FdInfoBold,{className:We("flex-none size-6",r)})});case"warning":return D.jsx(D.Fragment,{children:D.jsx(tt.FdWarningDanger,{className:We("flex-none size-6",r)})});case"message":return D.jsx(D.Fragment,{children:D.jsx(tt.FdInfoBold,{className:We("flex-none size-6",r)})});default:return null}},LT=({id:e,onClose:t,kind:r,message:i,markdown:s,customIcon:a})=>{const l=({className:c}={})=>D.jsx("button",{onClick:t,className:We("flex justify-center p-1",c),children:D.jsx(tt.FdCloseNaked,{className:"size-4 font-thin stroke-current"})});return D.jsx("div",{className:We("relative flex items-center rounded-lg py-2 px-4 text-sm text-slate-500 bg-white shadow-md"),children:typeof i=="string"?D.jsxs("div",{className:"w-full flex justify-between gap-x-3",children:[D.jsx("div",{className:"pt-1",children:D.jsx(Lh,{kind:r,customIcon:a})}),D.jsx("div",{className:"flex items-center gap-1 prose",children:s?D.jsx(ga,{children:i}):D.jsx(D.Fragment,{children:i})}),l()]}):D.jsxs("div",{className:"flex items-start",children:[D.jsx("div",{className:"flex flex-col gap-2 justify-between",children:i.filter(c=>c.messages.length>0).map(c=>D.jsxs(D.Fragment,{children:[c.title&&D.jsxs("span",{className:"flex items-center gap-1 font-bold capitalize",children:[D.jsx(Lh,{kind:r,customIcon:a}),D.jsxs("span",{children:[c.title," :"]})]}),D.jsx("ul",{className:We("list-disc",{"px-12":c.title,"px-6":!c.title}),children:c.messages.map(f=>D.jsx("li",{children:s?D.jsx(ga,{children:f}):D.jsx(D.Fragment,{children:f})}))})]}))}),l({className:"absolute top-1 right-1"})]})},e)},cm=({children:e,size:t,className:r,...i})=>D.jsx("div",{style:{"--width":`${t||24}px`},className:We("h-6 flex items-center pr-1 w-[--width]",r),...i,children:e});var _l={},Hi={},js={},Mh;function fm(){if(Mh)return js;Mh=1,Object.defineProperty(js,"__esModule",{value:!0}),js.default=r;let e;const t=new Uint8Array(16);function r(){if(!e&&(e=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!e))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return e(t)}return js}var li={},qi={},Zi={},Fh;function MT(){if(Fh)return Zi;Fh=1,Object.defineProperty(Zi,"__esModule",{value:!0}),Zi.default=void 0;var e=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;return Zi.default=e,Zi}var Dh;function $a(){if(Dh)return qi;Dh=1,Object.defineProperty(qi,"__esModule",{value:!0}),qi.default=void 0;var e=t(MT());function t(s){return s&&s.__esModule?s:{default:s}}function r(s){return typeof s=="string"&&e.default.test(s)}var i=r;return qi.default=i,qi}var Nh;function Ia(){if(Nh)return li;Nh=1,Object.defineProperty(li,"__esModule",{value:!0}),li.default=void 0,li.unsafeStringify=i;var e=t($a());function t(l){return l&&l.__esModule?l:{default:l}}const r=[];for(let l=0;l<256;++l)r.push((l+256).toString(16).slice(1));function i(l,c=0){return r[l[c+0]]+r[l[c+1]]+r[l[c+2]]+r[l[c+3]]+"-"+r[l[c+4]]+r[l[c+5]]+"-"+r[l[c+6]]+r[l[c+7]]+"-"+r[l[c+8]]+r[l[c+9]]+"-"+r[l[c+10]]+r[l[c+11]]+r[l[c+12]]+r[l[c+13]]+r[l[c+14]]+r[l[c+15]]}function s(l,c=0){const f=i(l,c);if(!(0,e.default)(f))throw TypeError("Stringified UUID is invalid");return f}var a=s;return li.default=a,li}var jh;function FT(){if(jh)return Hi;jh=1,Object.defineProperty(Hi,"__esModule",{value:!0}),Hi.default=void 0;var e=r(fm()),t=Ia();function r(m){return m&&m.__esModule?m:{default:m}}let i,s,a=0,l=0;function c(m,v,g){let p=v&&g||0;const b=v||new Array(16);m=m||{};let x=m.node||i,d=m.clockseq!==void 0?m.clockseq:s;if(x==null||d==null){const O=m.random||(m.rng||e.default)();x==null&&(x=i=[O[0]|1,O[1],O[2],O[3],O[4],O[5]]),d==null&&(d=s=(O[6]<<8|O[7])&16383)}let w=m.msecs!==void 0?m.msecs:Date.now(),h=m.nsecs!==void 0?m.nsecs:l+1;const S=w-a+(h-l)/1e4;if(S<0&&m.clockseq===void 0&&(d=d+1&16383),(S<0||w>a)&&m.nsecs===void 0&&(h=0),h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");a=w,l=h,s=d,w+=122192928e5;const E=((w&268435455)*1e4+h)%4294967296;b[p++]=E>>>24&255,b[p++]=E>>>16&255,b[p++]=E>>>8&255,b[p++]=E&255;const R=w/4294967296*1e4&268435455;b[p++]=R>>>8&255,b[p++]=R&255,b[p++]=R>>>24&15|16,b[p++]=R>>>16&255,b[p++]=d>>>8|128,b[p++]=d&255;for(let O=0;O<6;++O)b[p+O]=x[O];return v||(0,t.unsafeStringify)(b)}var f=c;return Hi.default=f,Hi}var Gi={},un={},Ki={},zh;function dm(){if(zh)return Ki;zh=1,Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.default=void 0;var e=t($a());function t(s){return s&&s.__esModule?s:{default:s}}function r(s){if(!(0,e.default)(s))throw TypeError("Invalid UUID");let a;const l=new Uint8Array(16);return l[0]=(a=parseInt(s.slice(0,8),16))>>>24,l[1]=a>>>16&255,l[2]=a>>>8&255,l[3]=a&255,l[4]=(a=parseInt(s.slice(9,13),16))>>>8,l[5]=a&255,l[6]=(a=parseInt(s.slice(14,18),16))>>>8,l[7]=a&255,l[8]=(a=parseInt(s.slice(19,23),16))>>>8,l[9]=a&255,l[10]=(a=parseInt(s.slice(24,36),16))/1099511627776&255,l[11]=a/4294967296&255,l[12]=a>>>24&255,l[13]=a>>>16&255,l[14]=a>>>8&255,l[15]=a&255,l}var i=r;return Ki.default=i,Ki}var Wh;function pm(){if(Wh)return un;Wh=1,Object.defineProperty(un,"__esModule",{value:!0}),un.URL=un.DNS=void 0,un.default=l;var e=Ia(),t=r(dm());function r(c){return c&&c.__esModule?c:{default:c}}function i(c){c=unescape(encodeURIComponent(c));const f=[];for(let m=0;m<c.length;++m)f.push(c.charCodeAt(m));return f}const s="6ba7b810-9dad-11d1-80b4-00c04fd430c8";un.DNS=s;const a="6ba7b811-9dad-11d1-80b4-00c04fd430c8";un.URL=a;function l(c,f,m){function v(g,p,b,x){var d;if(typeof g=="string"&&(g=i(g)),typeof p=="string"&&(p=(0,t.default)(p)),((d=p)===null||d===void 0?void 0:d.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let w=new Uint8Array(16+g.length);if(w.set(p),w.set(g,p.length),w=m(w),w[6]=w[6]&15|f,w[8]=w[8]&63|128,b){x=x||0;for(let h=0;h<16;++h)b[x+h]=w[h];return b}return(0,e.unsafeStringify)(w)}try{v.name=c}catch{}return v.DNS=s,v.URL=a,v}return un}var Vi={},Bh;function DT(){if(Bh)return Vi;Bh=1,Object.defineProperty(Vi,"__esModule",{value:!0}),Vi.default=void 0;function e(b){if(typeof b=="string"){const x=unescape(encodeURIComponent(b));b=new Uint8Array(x.length);for(let d=0;d<x.length;++d)b[d]=x.charCodeAt(d)}return t(i(s(b),b.length*8))}function t(b){const x=[],d=b.length*32,w="0123456789abcdef";for(let h=0;h<d;h+=8){const S=b[h>>5]>>>h%32&255,E=parseInt(w.charAt(S>>>4&15)+w.charAt(S&15),16);x.push(E)}return x}function r(b){return(b+64>>>9<<4)+14+1}function i(b,x){b[x>>5]|=128<<x%32,b[r(x)-1]=x;let d=1732584193,w=-271733879,h=-1732584194,S=271733878;for(let E=0;E<b.length;E+=16){const R=d,O=w,k=h,B=S;d=f(d,w,h,S,b[E],7,-680876936),S=f(S,d,w,h,b[E+1],12,-389564586),h=f(h,S,d,w,b[E+2],17,606105819),w=f(w,h,S,d,b[E+3],22,-1044525330),d=f(d,w,h,S,b[E+4],7,-176418897),S=f(S,d,w,h,b[E+5],12,1200080426),h=f(h,S,d,w,b[E+6],17,-1473231341),w=f(w,h,S,d,b[E+7],22,-45705983),d=f(d,w,h,S,b[E+8],7,1770035416),S=f(S,d,w,h,b[E+9],12,-1958414417),h=f(h,S,d,w,b[E+10],17,-42063),w=f(w,h,S,d,b[E+11],22,-1990404162),d=f(d,w,h,S,b[E+12],7,1804603682),S=f(S,d,w,h,b[E+13],12,-40341101),h=f(h,S,d,w,b[E+14],17,-1502002290),w=f(w,h,S,d,b[E+15],22,1236535329),d=m(d,w,h,S,b[E+1],5,-165796510),S=m(S,d,w,h,b[E+6],9,-1069501632),h=m(h,S,d,w,b[E+11],14,643717713),w=m(w,h,S,d,b[E],20,-373897302),d=m(d,w,h,S,b[E+5],5,-701558691),S=m(S,d,w,h,b[E+10],9,38016083),h=m(h,S,d,w,b[E+15],14,-660478335),w=m(w,h,S,d,b[E+4],20,-405537848),d=m(d,w,h,S,b[E+9],5,568446438),S=m(S,d,w,h,b[E+14],9,-1019803690),h=m(h,S,d,w,b[E+3],14,-187363961),w=m(w,h,S,d,b[E+8],20,1163531501),d=m(d,w,h,S,b[E+13],5,-1444681467),S=m(S,d,w,h,b[E+2],9,-51403784),h=m(h,S,d,w,b[E+7],14,1735328473),w=m(w,h,S,d,b[E+12],20,-1926607734),d=v(d,w,h,S,b[E+5],4,-378558),S=v(S,d,w,h,b[E+8],11,-2022574463),h=v(h,S,d,w,b[E+11],16,1839030562),w=v(w,h,S,d,b[E+14],23,-35309556),d=v(d,w,h,S,b[E+1],4,-1530992060),S=v(S,d,w,h,b[E+4],11,1272893353),h=v(h,S,d,w,b[E+7],16,-155497632),w=v(w,h,S,d,b[E+10],23,-1094730640),d=v(d,w,h,S,b[E+13],4,681279174),S=v(S,d,w,h,b[E],11,-358537222),h=v(h,S,d,w,b[E+3],16,-722521979),w=v(w,h,S,d,b[E+6],23,76029189),d=v(d,w,h,S,b[E+9],4,-640364487),S=v(S,d,w,h,b[E+12],11,-421815835),h=v(h,S,d,w,b[E+15],16,530742520),w=v(w,h,S,d,b[E+2],23,-995338651),d=g(d,w,h,S,b[E],6,-198630844),S=g(S,d,w,h,b[E+7],10,1126891415),h=g(h,S,d,w,b[E+14],15,-1416354905),w=g(w,h,S,d,b[E+5],21,-57434055),d=g(d,w,h,S,b[E+12],6,1700485571),S=g(S,d,w,h,b[E+3],10,-1894986606),h=g(h,S,d,w,b[E+10],15,-1051523),w=g(w,h,S,d,b[E+1],21,-2054922799),d=g(d,w,h,S,b[E+8],6,1873313359),S=g(S,d,w,h,b[E+15],10,-30611744),h=g(h,S,d,w,b[E+6],15,-1560198380),w=g(w,h,S,d,b[E+13],21,1309151649),d=g(d,w,h,S,b[E+4],6,-145523070),S=g(S,d,w,h,b[E+11],10,-1120210379),h=g(h,S,d,w,b[E+2],15,718787259),w=g(w,h,S,d,b[E+9],21,-343485551),d=a(d,R),w=a(w,O),h=a(h,k),S=a(S,B)}return[d,w,h,S]}function s(b){if(b.length===0)return[];const x=b.length*8,d=new Uint32Array(r(x));for(let w=0;w<x;w+=8)d[w>>5]|=(b[w/8]&255)<<w%32;return d}function a(b,x){const d=(b&65535)+(x&65535);return(b>>16)+(x>>16)+(d>>16)<<16|d&65535}function l(b,x){return b<<x|b>>>32-x}function c(b,x,d,w,h,S){return a(l(a(a(x,b),a(w,S)),h),d)}function f(b,x,d,w,h,S,E){return c(x&d|~x&w,b,x,h,S,E)}function m(b,x,d,w,h,S,E){return c(x&w|d&~w,b,x,h,S,E)}function v(b,x,d,w,h,S,E){return c(x^d^w,b,x,h,S,E)}function g(b,x,d,w,h,S,E){return c(d^(x|~w),b,x,h,S,E)}var p=e;return Vi.default=p,Vi}var Uh;function NT(){if(Uh)return Gi;Uh=1,Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.default=void 0;var e=r(pm()),t=r(DT());function r(a){return a&&a.__esModule?a:{default:a}}var s=(0,e.default)("v3",48,t.default);return Gi.default=s,Gi}var Xi={},Yi={},Hh;function jT(){if(Hh)return Yi;Hh=1,Object.defineProperty(Yi,"__esModule",{value:!0}),Yi.default=void 0;var t={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};return Yi.default=t,Yi}var qh;function zT(){if(qh)return Xi;qh=1,Object.defineProperty(Xi,"__esModule",{value:!0}),Xi.default=void 0;var e=i(jT()),t=i(fm()),r=Ia();function i(l){return l&&l.__esModule?l:{default:l}}function s(l,c,f){if(e.default.randomUUID&&!c&&!l)return e.default.randomUUID();l=l||{};const m=l.random||(l.rng||t.default)();if(m[6]=m[6]&15|64,m[8]=m[8]&63|128,c){f=f||0;for(let v=0;v<16;++v)c[f+v]=m[v];return c}return(0,r.unsafeStringify)(m)}var a=s;return Xi.default=a,Xi}var Ji={},Qi={},Zh;function WT(){if(Zh)return Qi;Zh=1,Object.defineProperty(Qi,"__esModule",{value:!0}),Qi.default=void 0;function e(s,a,l,c){switch(s){case 0:return a&l^~a&c;case 1:return a^l^c;case 2:return a&l^a&c^l&c;case 3:return a^l^c}}function t(s,a){return s<<a|s>>>32-a}function r(s){const a=[1518500249,1859775393,2400959708,3395469782],l=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof s=="string"){const v=unescape(encodeURIComponent(s));s=[];for(let g=0;g<v.length;++g)s.push(v.charCodeAt(g))}else Array.isArray(s)||(s=Array.prototype.slice.call(s));s.push(128);const c=s.length/4+2,f=Math.ceil(c/16),m=new Array(f);for(let v=0;v<f;++v){const g=new Uint32Array(16);for(let p=0;p<16;++p)g[p]=s[v*64+p*4]<<24|s[v*64+p*4+1]<<16|s[v*64+p*4+2]<<8|s[v*64+p*4+3];m[v]=g}m[f-1][14]=(s.length-1)*8/Math.pow(2,32),m[f-1][14]=Math.floor(m[f-1][14]),m[f-1][15]=(s.length-1)*8&4294967295;for(let v=0;v<f;++v){const g=new Uint32Array(80);for(let h=0;h<16;++h)g[h]=m[v][h];for(let h=16;h<80;++h)g[h]=t(g[h-3]^g[h-8]^g[h-14]^g[h-16],1);let p=l[0],b=l[1],x=l[2],d=l[3],w=l[4];for(let h=0;h<80;++h){const S=Math.floor(h/20),E=t(p,5)+e(S,b,x,d)+w+a[S]+g[h]>>>0;w=d,d=x,x=t(b,30)>>>0,b=p,p=E}l[0]=l[0]+p>>>0,l[1]=l[1]+b>>>0,l[2]=l[2]+x>>>0,l[3]=l[3]+d>>>0,l[4]=l[4]+w>>>0}return[l[0]>>24&255,l[0]>>16&255,l[0]>>8&255,l[0]&255,l[1]>>24&255,l[1]>>16&255,l[1]>>8&255,l[1]&255,l[2]>>24&255,l[2]>>16&255,l[2]>>8&255,l[2]&255,l[3]>>24&255,l[3]>>16&255,l[3]>>8&255,l[3]&255,l[4]>>24&255,l[4]>>16&255,l[4]>>8&255,l[4]&255]}var i=r;return Qi.default=i,Qi}var Gh;function BT(){if(Gh)return Ji;Gh=1,Object.defineProperty(Ji,"__esModule",{value:!0}),Ji.default=void 0;var e=r(pm()),t=r(WT());function r(a){return a&&a.__esModule?a:{default:a}}var s=(0,e.default)("v5",80,t.default);return Ji.default=s,Ji}var eo={},Kh;function UT(){if(Kh)return eo;Kh=1,Object.defineProperty(eo,"__esModule",{value:!0}),eo.default=void 0;var e="00000000-0000-0000-0000-000000000000";return eo.default=e,eo}var to={},Vh;function HT(){if(Vh)return to;Vh=1,Object.defineProperty(to,"__esModule",{value:!0}),to.default=void 0;var e=t($a());function t(s){return s&&s.__esModule?s:{default:s}}function r(s){if(!(0,e.default)(s))throw TypeError("Invalid UUID");return parseInt(s.slice(14,15),16)}var i=r;return to.default=i,to}var Xh;function qT(){return Xh||(Xh=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"NIL",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return m.default}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,"v1",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"v3",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(e,"v4",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"v5",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"validate",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,"version",{enumerable:!0,get:function(){return l.default}});var t=v(FT()),r=v(NT()),i=v(zT()),s=v(BT()),a=v(UT()),l=v(HT()),c=v($a()),f=v(Ia()),m=v(dm());function v(g){return g&&g.__esModule?g:{default:g}}})(_l)),_l}var Ol,Yh;function ZT(){if(Yh)return Ol;Yh=1;function e(t,r){if(!t||!r||!t.length||!r.length)throw new Error("Bad alphabet");this.srcAlphabet=t,this.dstAlphabet=r}return e.prototype.convert=function(t){var r,i,s,a={},l=this.srcAlphabet.length,c=this.dstAlphabet.length,f=t.length,m=typeof t=="string"?"":[];if(!this.isValid(t))throw new Error('Number "'+t+'" contains of non-alphabetic digits ('+this.srcAlphabet+")");if(this.srcAlphabet===this.dstAlphabet)return t;for(r=0;r<f;r++)a[r]=this.srcAlphabet.indexOf(t[r]);do{for(i=0,s=0,r=0;r<f;r++)i=i*l+a[r],i>=c?(a[s++]=parseInt(i/c,10),i=i%c):s>0&&(a[s++]=0);f=s,m=this.dstAlphabet.slice(i,i+1).concat(m)}while(s!==0);return m},e.prototype.isValid=function(t){for(var r=0;r<t.length;++r)if(this.srcAlphabet.indexOf(t[r])===-1)return!1;return!0},Ol=e,Ol}var Al,Jh;function GT(){if(Jh)return Al;Jh=1;var e=ZT();function t(r,i){var s=new e(r,i);return function(a){return s.convert(a)}}return t.BIN="01",t.OCT="01234567",t.DEC="0123456789",t.HEX="0123456789abcdef",Al=t,Al}var Tl,Qh;function KT(){if(Qh)return Tl;Qh=1;const{v4:e,validate:t}=qT(),r=GT(),i={cookieBase90:"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!#$%&'()*+-./:<=>?@[]^_`{|}~",flickrBase58:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ",uuid25Base36:"0123456789abcdefghijklmnopqrstuvwxyz"},s={consistentLength:!0};let a;const l=(m,v,g)=>{const p=v(m.toLowerCase().replace(/-/g,""));return!g||!g.consistentLength?p:p.padStart(g.shortIdLength,g.paddingChar)},c=(m,v)=>{const p=v(m).padStart(32,"0").match(/(\w{8})(\w{4})(\w{4})(\w{4})(\w{12})/);return[p[1],p[2],p[3],p[4],p[5]].join("-")},f=m=>Math.ceil(Math.log(2**128)/Math.log(m));return Tl=(()=>{const m=(v,g)=>{const p=v||i.flickrBase58,b={...s,...g};if([...new Set(Array.from(p))].length!==p.length)throw new Error("The provided Alphabet has duplicate characters resulting in unreliable results");const x=f(p.length),d={shortIdLength:x,consistentLength:b.consistentLength,paddingChar:p[0]},w=r(r.HEX,p),h=r(p,r.HEX),S=()=>l(e(),w,d),R={alphabet:p,fromUUID:O=>l(O,w,d),maxLength:x,generate:S,new:S,toUUID:O=>c(O,h),uuid:e,validate:(O,k=!1)=>{if(!O||typeof O!="string")return!1;const B=b.consistentLength?O.length===x:O.length<=x,M=O.split("").every(F=>p.includes(F));return k===!1?B&&M:B&&M&&t(c(O,h))}};return Object.freeze(R),R};return m.constants=i,m.uuid=e,m.generate=()=>(a||(a=m(i.flickrBase58).generate),a()),m})(),Tl}var Bc=KT();const hm=({depth:e,height:t=24,width:r=11,showLines:i=!0,stroke:s="rgb(241, 245, 249)"})=>{const a=`indent_line_${Bc.generate()}`;return D.jsxs("svg",{viewBox:`0 0 ${11*e} ${t}`,width:`${11*e}`,height:t,children:[D.jsx("defs",{children:D.jsx("pattern",{id:a,x:"0",y:"0",width:r,height:t,patternUnits:"userSpaceOnUse",children:D.jsx("line",{x1:r/2,y1:"0",x2:r/2,y2:t,stroke:s})})}),i?D.jsx("rect",{fill:`url(#${a})`,x:"0",y:"0",width:`${11*e}`,height:t}):D.jsx("rect",{fill:i?`url(#${a})`:"",x:"0",y:"0",width:0,height:t})]})},gm=({show:e,expanded:t,onClick:r,variant:i="arrow"})=>e?D.jsx("div",{className:"flex h-6 w-5 items-center",onClick:s=>r&&r(s),children:(()=>{switch(i){case"arrow":return D.jsx(tt.FdDown,{className:We(["h-3 w-3 transform text-grey-50 transition ease-in-out",{"rotate-0":t,"-rotate-90":!t}])});case"caret":return t?D.jsx(tt.FdDown,{}):D.jsx(tt.FdRight,{});default:return D.jsx(tt.FdDown,{className:"h-3 w-3 transform text-grey-50 transition ease-in-out"})}})()}):D.jsx("div",{className:"flex h-6 w-3 items-center"}),Uc=({node:e,depth:t,expandedKeys:r,selectedKeys:i,actions:s,searchQuery:a,renderNode:l,onNodeClick:c})=>{var b;const{key:f,children:m}=e,v=W.useMemo(()=>({expanded:r.includes(e.key),selected:i.includes(e.key)}),[r,e.key,i]),g=l&&typeof l=="function"?l(e,t,v,s,a):YT(e,t,v,c);return!((b=e.options)!=null&&b.filterable)||!a||e.title.toLowerCase().includes(a.toLowerCase())?D.jsxs(D.Fragment,{children:[D.jsx("div",{className:"flex items-center space-x-2",children:g},f),XT(m||[],t,a,r,i,v.expanded,s,c,l)]}):null},VT=function(e,t){var l;const{title:r,icon:i,subtitle:s}=e;let a=null;return i&&(a=D.jsx(cm,{children:i})),D.jsxs("div",{className:"flex flex-1 select-none items-center overflow-hidden text-ellipsis whitespace-nowrap",draggable:(l=e.options)==null?void 0:l.draggable,onClick:()=>{t&&t(e)},children:[a,D.jsx("div",{style:{lineHeight:"24px",fontSize:11},children:r}),s&&D.jsx("div",{className:"mx-1 min-w-0 text-xxs italic text-fd-gray-mild",children:s})]})},XT=function(e,t,r,i,s,a,l,c,f){return e.length&&a?e.map(m=>D.jsx(Uc,{actions:l,node:m,searchQuery:r,depth:t+1,expandedKeys:i,selectedKeys:s,onNodeClick:c,renderNode:f},m.key)):null},YT=function(e,t,r,i){return D.jsxs(D.Fragment,{children:[D.jsx(hm,{showLines:!0,depth:t}),D.jsx(gm,{show:e.children&&e.children.length>0||!1,expanded:r.expanded}),VT(e,i)]})},zs=e=>t=>e===t,JT=function({treeData:t,renderNode:r,onNodeClick:i,onExpandNode:s,searchQuery:a,expandedKeys:l,expandCondition:c="always",encapsulated:f,className:m}){const[v,g]=W.useState(()=>({expandedKeys:l||[],selectedKeys:[]}));W.useEffect(()=>{c==="when-collapsed"&&v.expandedKeys.length>0||g({...v,expandedKeys:l||v.expandedKeys})},[l]);const p=W.useCallback(h=>{if(!h)return;const S=v.expandedKeys.findIndex(zs(h.key));let E=[];S===-1?(E=[...v.expandedKeys,h.key],g(()=>({...v,expandedKeys:E})),s&&s(E)):(E=v.expandedKeys.filter(R=>R!==h.key),g(()=>({...v,expandedKeys:E})),s&&s(E))},[v]),b=W.useCallback(h=>{var E;if(!((E=h==null?void 0:h.options)!=null&&E.selectable))return;v.selectedKeys.findIndex(zs(h.key))===-1&&g({...v,selectedKeys:[...v.selectedKeys,h.key]})},[v]),x=W.useCallback(h=>{var E;if(!((E=h==null?void 0:h.options)!=null&&E.selectable))return;v.selectedKeys.findIndex(zs(h.key))===-1&&g({...v,selectedKeys:[h.key]})},[v]),d=W.useCallback(h=>{var E;if(!((E=h==null?void 0:h.options)!=null&&E.selectable)){g({...v,selectedKeys:[]});return}v.selectedKeys.findIndex(zs(h.key))!==-1&&g({...v,selectedKeys:v.selectedKeys.filter(R=>R!==h.key)})},[v]),w=W.useMemo(()=>({expand:p,select:b,selectSingle:x,deselect:d}),[d,p,b,x]);return D.jsx("div",{className:We("fd-tree",m,{"pl-2 mb-1 rounded border bg-grey-900 p-1":f}),children:t.map(h=>D.jsx(Uc,{node:h,searchQuery:a||"",depth:0,expandedKeys:v.expandedKeys,selectedKeys:v.selectedKeys,actions:w,renderNode:r,onNodeClick:i},h.key))})};function aa(e){return e.of&&e.children?D.jsx(D.Fragment,{children:e.children}):null}function Ve(){return Ve=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},Ve.apply(null,arguments)}function QT(e){for(var t=0,r,i=0,s=e.length;s>=4;++i,s-=4)r=e.charCodeAt(i)&255|(e.charCodeAt(++i)&255)<<8|(e.charCodeAt(++i)&255)<<16|(e.charCodeAt(++i)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(s){case 3:t^=(e.charCodeAt(i+2)&255)<<16;case 2:t^=(e.charCodeAt(i+1)&255)<<8;case 1:t^=e.charCodeAt(i)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var eR={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function vm(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var tR=/[A-Z]|^ms/g,rR=/_EMO_([^_]+?)_([^]*?)_EMO_/g,mm=function(t){return t.charCodeAt(1)===45},eg=function(t){return t!=null&&typeof t!="boolean"},Rl=vm(function(e){return mm(e)?e:e.replace(tR,"-$&").toLowerCase()}),tg=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(rR,function(i,s,a){return _r={name:s,styles:a,next:_r},s})}return eR[t]!==1&&!mm(t)&&typeof r=="number"&&r!==0?r+"px":r};function To(e,t,r){if(r==null)return"";var i=r;if(i.__emotion_styles!==void 0)return i;switch(typeof r){case"boolean":return"";case"object":{var s=r;if(s.anim===1)return _r={name:s.name,styles:s.styles,next:_r},s.name;var a=r;if(a.styles!==void 0){var l=a.next;if(l!==void 0)for(;l!==void 0;)_r={name:l.name,styles:l.styles,next:_r},l=l.next;var c=a.styles+";";return c}return nR(e,t,r)}case"function":{if(e!==void 0){var f=_r,m=r(e);return _r=f,To(e,t,m)}break}}var v=r;if(t==null)return v;var g=t[v];return g!==void 0?g:v}function nR(e,t,r){var i="";if(Array.isArray(r))for(var s=0;s<r.length;s++)i+=To(e,t,r[s])+";";else for(var a in r){var l=r[a];if(typeof l!="object"){var c=l;t!=null&&t[c]!==void 0?i+=a+"{"+t[c]+"}":eg(c)&&(i+=Rl(a)+":"+tg(a,c)+";")}else if(Array.isArray(l)&&typeof l[0]=="string"&&(t==null||t[l[0]]===void 0))for(var f=0;f<l.length;f++)eg(l[f])&&(i+=Rl(a)+":"+tg(a,l[f])+";");else{var m=To(e,t,l);switch(a){case"animation":case"animationName":{i+=Rl(a)+":"+m+";";break}default:i+=a+"{"+m+"}"}}}return i}var rg=/label:\s*([^\s;{]+)\s*(;|$)/g,_r;function iR(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var i=!0,s="";_r=void 0;var a=e[0];if(a==null||a.raw===void 0)i=!1,s+=To(r,t,a);else{var l=a;s+=l[0]}for(var c=1;c<e.length;c++)if(s+=To(r,t,e[c]),i){var f=a;s+=f[c]}rg.lastIndex=0;for(var m="",v;(v=rg.exec(s))!==null;)m+="-"+v[1];var g=QT(s)+m;return{name:g,styles:s,next:_r}}var oR=function(t){return t()},sR=$.useInsertionEffect?$.useInsertionEffect:!1,aR=sR||oR,uR=!0;function lR(e,t,r){var i="";return r.split(" ").forEach(function(s){e[s]!==void 0?t.push(e[s]+";"):s&&(i+=s+" ")}),i}var ym=function(t,r,i){var s=t.key+"-"+r.name;(i===!1||uR===!1)&&t.registered[s]===void 0&&(t.registered[s]=r.styles)},cR=function(t,r,i){ym(t,r,i);var s=t.key+"-"+r.name;if(t.inserted[r.name]===void 0){var a=r;do t.insert(r===a?"."+s:"",a,t.sheet,!0),a=a.next;while(a!==void 0)}},fR=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,dR=vm(function(e){return fR.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),pR=dR,hR=function(t){return t!=="theme"},ng=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?pR:hR},ig=function(t,r,i){var s;if(r){var a=r.shouldForwardProp;s=t.__emotion_forwardProp&&a?function(l){return t.__emotion_forwardProp(l)&&a(l)}:a}return typeof s!="function"&&i&&(s=t.__emotion_forwardProp),s},gR=function(t){var r=t.cache,i=t.serialized,s=t.isStringTag;return ym(r,i,s),aR(function(){return cR(r,i,s)}),null},vR=function e(t,r){var i=t.__emotion_real===t,s=i&&t.__emotion_base||t,a,l;r!==void 0&&(a=r.label,l=r.target);var c=ig(t,r,i),f=c||ng(s),m=!f("as");return function(){var v=arguments,g=i&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(a!==void 0&&g.push("label:"+a+";"),v[0]==null||v[0].raw===void 0)g.push.apply(g,v);else{var p=v[0];g.push(p[0]);for(var b=v.length,x=1;x<b;x++)g.push(v[x],p[x])}var d=sc.withEmotionCache(function(w,h,S){var E=m&&w.as||s,R="",O=[],k=w;if(w.theme==null){k={};for(var B in w)k[B]=w[B];k.theme=$.useContext(sc.ThemeContext)}typeof w.className=="string"?R=lR(h.registered,O,w.className):w.className!=null&&(R=w.className+" ");var M=iR(g.concat(O),h.registered,k);R+=h.key+"-"+M.name,l!==void 0&&(R+=" "+l);var F=m&&c===void 0?ng(E):f,G={};for(var j in w)m&&j==="as"||F(j)&&(G[j]=w[j]);return G.className=R,S&&(G.ref=S),$.createElement($.Fragment,null,$.createElement(gR,{cache:h,serialized:M,isStringTag:typeof E=="string"}),$.createElement(E,G))});return d.displayName=a!==void 0?a:"Styled("+(typeof s=="string"?s:s.displayName||s.name||"Component")+")",d.defaultProps=t.defaultProps,d.__emotion_real=d,d.__emotion_base=s,d.__emotion_styles=g,d.__emotion_forwardProp=c,Object.defineProperty(d,"toString",{value:function(){return"."+l}}),d.withComponent=function(w,h){var S=e(w,Ve({},r,h,{shouldForwardProp:ig(d,h,!0)}));return S.apply(void 0,g)},d}},mR=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],va=vR.bind(null);mR.forEach(function(e){va[e]=va(e)});var yR=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ci=new WeakMap,Ws=new WeakMap,Bs={},Pl=0,bm=function(e){return e&&(e.host||bm(e.parentNode))},bR=function(e,t){return t.map(function(r){if(e.contains(r))return r;var i=bm(r);return i&&e.contains(i)?i:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},wR=function(e,t,r,i){var s=bR(t,Array.isArray(e)?e:[e]);Bs[r]||(Bs[r]=new WeakMap);var a=Bs[r],l=[],c=new Set,f=new Set(s),m=function(g){!g||c.has(g)||(c.add(g),m(g.parentNode))};s.forEach(m);var v=function(g){!g||f.has(g)||Array.prototype.forEach.call(g.children,function(p){if(c.has(p))v(p);else try{var b=p.getAttribute(i),x=b!==null&&b!=="false",d=(ci.get(p)||0)+1,w=(a.get(p)||0)+1;ci.set(p,d),a.set(p,w),l.push(p),d===1&&x&&Ws.set(p,!0),w===1&&p.setAttribute(r,"true"),x||p.setAttribute(i,"true")}catch(h){console.error("aria-hidden: cannot operate on ",p,h)}})};return v(t),c.clear(),Pl++,function(){l.forEach(function(g){var p=ci.get(g)-1,b=a.get(g)-1;ci.set(g,p),a.set(g,b),p||(Ws.has(g)||g.removeAttribute(i),Ws.delete(g)),b||g.removeAttribute(r)}),Pl--,Pl||(ci=new WeakMap,ci=new WeakMap,Ws=new WeakMap,Bs={})}},xR=function(e,t,r){r===void 0&&(r="data-aria-hidden");var i=Array.from(Array.isArray(e)?e:[e]),s=yR(e);return s?(i.push.apply(i,Array.from(s.querySelectorAll("[aria-live], script"))),wR(i,s,r,"aria-hidden")):function(){return null}},lc=function(e,t){return lc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},lc(e,t)};function La(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");lc(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var Or=function(){return Or=Object.assign||function(t){for(var r,i=1,s=arguments.length;i<s;i++){r=arguments[i];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Or.apply(this,arguments)};function wm(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,i=Object.getOwnPropertySymbols(e);s<i.length;s++)t.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(r[i[s]]=e[i[s]]);return r}function cc(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],i=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function fc(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var i=r.call(e),s,a=[],l;try{for(;(t===void 0||t-- >0)&&!(s=i.next()).done;)a.push(s.value)}catch(c){l={error:c}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(l)throw l.error}}return a}function ma(e,t,r){if(r||arguments.length===2)for(var i=0,s=t.length,a;i<s;i++)(a||!(i in t))&&(a||(a=Array.prototype.slice.call(t,0,i)),a[i]=t[i]);return e.concat(a||Array.prototype.slice.call(t))}var ua="right-scroll-bar-position",la="width-before-scroll-bar",SR="with-scroll-bars-hidden",ER="--removed-body-scroll-bar-size";function Cl(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function _R(e,t){var r=W.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(i){var s=r.value;s!==i&&(r.value=i,r.callback(i,s))}}}})[0];return r.callback=t,r.facade}var OR=typeof window<"u"?$.useLayoutEffect:$.useEffect,og=new WeakMap;function AR(e,t){var r=_R(null,function(i){return e.forEach(function(s){return Cl(s,i)})});return OR(function(){var i=og.get(r);if(i){var s=new Set(i),a=new Set(e),l=r.current;s.forEach(function(c){a.has(c)||Cl(c,null)}),a.forEach(function(c){s.has(c)||Cl(c,l)})}og.set(r,e)},[e]),r}function TR(e){return e}function RR(e,t){t===void 0&&(t=TR);var r=[],i=!1,s={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(a){var l=t(a,i);return r.push(l),function(){r=r.filter(function(c){return c!==l})}},assignSyncMedium:function(a){for(i=!0;r.length;){var l=r;r=[],l.forEach(a)}r={push:function(c){return a(c)},filter:function(){return r}}},assignMedium:function(a){i=!0;var l=[];if(r.length){var c=r;r=[],c.forEach(a),l=r}var f=function(){var v=l;l=[],v.forEach(a)},m=function(){return Promise.resolve().then(f)};m(),r={push:function(v){l.push(v),m()},filter:function(v){return l=l.filter(v),r}}}};return s}function PR(e){e===void 0&&(e={});var t=RR(null);return t.options=Or({async:!0,ssr:!1},e),t}var xm=function(e){var t=e.sideCar,r=wm(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=t.read();if(!i)throw new Error("Sidecar medium not found");return $.createElement(i,Or({},r))};xm.isSideCarExport=!0;function CR(e,t){return e.useMedium(t),xm}var Sm=PR(),kl=function(){},Ma=$.forwardRef(function(e,t){var r=$.useRef(null),i=$.useState({onScrollCapture:kl,onWheelCapture:kl,onTouchMoveCapture:kl}),s=i[0],a=i[1],l=e.forwardProps,c=e.children,f=e.className,m=e.removeScrollBar,v=e.enabled,g=e.shards,p=e.sideCar,b=e.noRelative,x=e.noIsolation,d=e.inert,w=e.allowPinchZoom,h=e.as,S=h===void 0?"div":h,E=e.gapMode,R=wm(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),O=p,k=AR([r,t]),B=Or(Or({},R),s);return $.createElement($.Fragment,null,v&&$.createElement(O,{sideCar:Sm,removeScrollBar:m,shards:g,noRelative:b,noIsolation:x,inert:d,setCallbacks:a,allowPinchZoom:!!w,lockRef:r,gapMode:E}),l?$.cloneElement($.Children.only(c),Or(Or({},B),{ref:k})):$.createElement(S,Or({},B,{className:f,ref:k}),c))});Ma.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ma.classNames={fullWidth:la,zeroRight:ua};var kR=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function $R(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=kR();return t&&e.setAttribute("nonce",t),e}function IR(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function LR(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var MR=function(){var e=0,t=null;return{add:function(r){e==0&&(t=$R())&&(IR(t,r),LR(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},FR=function(){var e=MR();return function(t,r){$.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Em=function(){var e=FR(),t=function(r){var i=r.styles,s=r.dynamic;return e(i,s),null};return t},DR={left:0,top:0,right:0,gap:0},$l=function(e){return parseInt(e||"",10)||0},NR=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],i=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[$l(r),$l(i),$l(s)]},jR=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return DR;var t=NR(e),r=document.documentElement.clientWidth,i=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,i-r+t[2]-t[0])}},zR=Em(),hi="data-scroll-locked",WR=function(e,t,r,i){var s=e.left,a=e.top,l=e.right,c=e.gap;return r===void 0&&(r="margin"),`
23
- .`.concat(SR,` {
20
+ `)===-1)return null;let E="",R=0;for(;;){const k=m.indexOf(`
21
+ `,R),W=m.slice(R,k===-1?void 0:k+1);if(c(a,W)||(E+=W,k===-1||!W.trim()))break;R=k+1}const O=Ro(E);return O===""?null:[E,,O]}),i:3,u:Pl,l:(m,S,E)=>f("p",{key:E.key},S(m.children,E))},22:{t:["["],o:Ln(vA),i:0,u:m=>(p[m[1]]={target:m[2],title:m[4]},{}),l:kl},23:{t:["!["],o:fn(yA),i:0,u:m=>({alt:m[1]?Er(m[1]):void 0,ref:m[2]}),l:(m,S,E)=>p[m.ref]?f("img",{key:E.key,alt:m.alt,src:i(p[m.ref].target,"img","src"),title:p[m.ref].title}):null},24:{t:m=>m[0]==="["&&m.indexOf("](")===-1,o:Ln(wA),i:0,u:(m,S,E)=>({children:S(m[1],E),fallbackChildren:m[0],ref:m[2]}),l:(m,S,E)=>p[m.ref]?f("a",{key:E.key,href:i(p[m.ref].target,"a","href"),title:p[m.ref].title},S(m.children,E)):f("span",{key:E.key},m.fallbackChildren)},25:{t:["|"],o:qr(zh),i:1,u:qA,l(m,S,E){const R=m;return f("table",{key:E.key},f("thead",null,f("tr",null,R.header.map(function(O,k){return f("th",{key:k,style:Uh(R,k)},S(O,E))}))),f("tbody",null,R.cells.map(function(O,k){return f("tr",{key:k},O.map(function(W,M){return f("td",{key:M,style:Uh(R,M)},S(W,E))}))})))}},27:{o:Ti(function(m,S){let E;return ca(m,":")&&(E=CA.exec(m)),E||IA.exec(m)}),i:4,u(m){const S=m[0];return{text:S.indexOf("&")===-1?S:S.replace(cA,(E,R)=>t.namedCodesToUnicode[R]||E)}},l:m=>m.text},28:{t:["**","__"],o:fn(TA),i:2,u:(m,S,E)=>({children:S(m[2],E)}),l:(m,S,E)=>f("strong",{key:E.key},S(m.children,E))},29:{t:m=>{const S=m[0];return(S==="*"||S==="_")&&m[1]!==S},o:fn(AA),i:3,u:(m,S,E)=>({children:S(m[2],E)}),l:(m,S,E)=>f("em",{key:E.key},S(m.children,E))},30:{t:["\\"],o:fn(kA),i:1,u:m=>({text:m[1],type:"27"})},31:{t:["=="],o:fn(RA),i:3,u:Pl,l:(m,S,E)=>f("mark",{key:E.key},S(m.children,E))},32:{t:["~~"],o:fn(PA),i:3,u:Pl,l:(m,S,E)=>f("del",{key:E.key},S(m.children,E))}};t.disableParsingRawHTML===!0&&(delete y[11],delete y[13]);const x=(function(m){var S=Object.keys(m);function E(R,O){var k=[];if(O.prevCapture=O.prevCapture||"",R.trim())for(;R;)for(var W=0;W<S.length;){var M=S[W],F=m[M];if(!F.t||HA(R,O,F.t)){var G=F.o(R,O);if(G&&G[0]){R=R.substring(G[0].length);var j=F.u(G,E,O);O.prevCapture+=G[0],j.type||(j.type=M),k.push(j);break}W++}else W++}return O.prevCapture="",k}return S.sort(function(R,O){return m[R].i-m[O].i||(R<O?-1:1)}),function(R,O){return E((function(k){return k.replace(iA,`
22
+ `).replace(aA,"").replace(xA," ")})(R),O)}})(y),d=(function(m,S){return function E(R,O={}){if(Array.isArray(R)){const k=O.key,W=[];let M=!1;for(let F=0;F<R.length;F++){O.key=F;const G=E(R[F],O),j=Wh(G);j&&M?W[W.length-1]+=G:G!==null&&W.push(G),M=j}return O.key=k,W}return(function(k,W,M){const F=m[k.type].l;return S?S(()=>F(k,W,M),k,W,M):F(k,W,M)})(R,E,O)}})(y,t.renderRule),b=g(e);return v.length?f("div",null,b,f("footer",{key:"footer"},v.map(function(m){return f("div",{id:r(m.identifier,Vi),key:m.identifier},m.identifier,d(x(m.footnote,{inline:!0})))}))):b}const ba=e=>{let{children:t="",options:r}=e,i=(function(s,a){if(s==null)return{};var u,c,f={},g=Object.keys(s);for(c=0;c<g.length;c++)a.indexOf(u=g[c])>=0||(f[u]=s[u]);return f})(e,GT);return $.cloneElement(XA(t,r),i)},qh=({kind:e,customIcon:t})=>{const r={"text-yellow-400":e==="warning","text-red-500":e==="danger"||e==="error","text-primary":e==="info","text-green-500":e==="message"};if(t)return D.jsx(t,{className:je("flex-none size-6",r)});switch(e){case"error":case"danger":return D.jsx(ot.FdSanityCheckInfo,{className:je("flex-none size-6",r)});case"info":return D.jsx(D.Fragment,{children:D.jsx(ot.FdInfoBold,{className:je("flex-none size-6",r)})});case"warning":return D.jsx(D.Fragment,{children:D.jsx(ot.FdWarningDanger,{className:je("flex-none size-6",r)})});case"message":return D.jsx(D.Fragment,{children:D.jsx(ot.FdInfoBold,{className:je("flex-none size-6",r)})});default:return null}},JA=({id:e,onClose:t,kind:r,message:i,markdown:s,customIcon:a})=>{const u=({className:c}={})=>D.jsx("button",{onClick:t,className:je("flex justify-center p-1",c),children:D.jsx(ot.FdCloseNaked,{className:"size-4 font-thin stroke-current"})});return D.jsx("div",{className:je("relative flex items-center rounded-lg py-2 px-4 text-sm text-slate-500 bg-white shadow-md"),children:typeof i=="string"?D.jsxs("div",{className:"w-full flex justify-between gap-x-3",children:[D.jsx("div",{className:"pt-1",children:D.jsx(qh,{kind:r,customIcon:a})}),D.jsx("div",{className:"flex items-center gap-1 prose",children:s?D.jsx(ba,{children:i}):D.jsx(D.Fragment,{children:i})}),u()]}):D.jsxs("div",{className:"flex items-start",children:[D.jsx("div",{className:"flex flex-col gap-2 justify-between",children:i.filter(c=>c.messages.length>0).map(c=>D.jsxs(D.Fragment,{children:[c.title&&D.jsxs("span",{className:"flex items-center gap-1 font-bold capitalize",children:[D.jsx(qh,{kind:r,customIcon:a}),D.jsxs("span",{children:[c.title," :"]})]}),D.jsx("ul",{className:je("list-disc",{"px-12":c.title,"px-6":!c.title}),children:c.messages.map(f=>D.jsx("li",{children:s?D.jsx(ba,{children:f}):D.jsx(D.Fragment,{children:f})}))})]}))}),u({className:"absolute top-1 right-1"})]})},e)},Sv=({children:e,size:t,className:r,...i})=>D.jsx("div",{style:{"--width":`${t||24}px`},className:je("h-6 flex items-center pr-1 w-[--width]",r),...i,children:e});var Il={},Yi={},Us={},Zh;function Ev(){if(Zh)return Us;Zh=1,Object.defineProperty(Us,"__esModule",{value:!0}),Us.default=r;let e;const t=new Uint8Array(16);function r(){if(!e&&(e=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!e))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return e(t)}return Us}var hi={},Xi={},Ji={},Gh;function QA(){if(Gh)return Ji;Gh=1,Object.defineProperty(Ji,"__esModule",{value:!0}),Ji.default=void 0;var e=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;return Ji.default=e,Ji}var Kh;function ja(){if(Kh)return Xi;Kh=1,Object.defineProperty(Xi,"__esModule",{value:!0}),Xi.default=void 0;var e=t(QA());function t(s){return s&&s.__esModule?s:{default:s}}function r(s){return typeof s=="string"&&e.default.test(s)}var i=r;return Xi.default=i,Xi}var Vh;function za(){if(Vh)return hi;Vh=1,Object.defineProperty(hi,"__esModule",{value:!0}),hi.default=void 0,hi.unsafeStringify=i;var e=t(ja());function t(u){return u&&u.__esModule?u:{default:u}}const r=[];for(let u=0;u<256;++u)r.push((u+256).toString(16).slice(1));function i(u,c=0){return r[u[c+0]]+r[u[c+1]]+r[u[c+2]]+r[u[c+3]]+"-"+r[u[c+4]]+r[u[c+5]]+"-"+r[u[c+6]]+r[u[c+7]]+"-"+r[u[c+8]]+r[u[c+9]]+"-"+r[u[c+10]]+r[u[c+11]]+r[u[c+12]]+r[u[c+13]]+r[u[c+14]]+r[u[c+15]]}function s(u,c=0){const f=i(u,c);if(!(0,e.default)(f))throw TypeError("Stringified UUID is invalid");return f}var a=s;return hi.default=a,hi}var Yh;function eR(){if(Yh)return Yi;Yh=1,Object.defineProperty(Yi,"__esModule",{value:!0}),Yi.default=void 0;var e=r(Ev()),t=za();function r(g){return g&&g.__esModule?g:{default:g}}let i,s,a=0,u=0;function c(g,h,v){let p=h&&v||0;const y=h||new Array(16);g=g||{};let x=g.node||i,d=g.clockseq!==void 0?g.clockseq:s;if(x==null||d==null){const O=g.random||(g.rng||e.default)();x==null&&(x=i=[O[0]|1,O[1],O[2],O[3],O[4],O[5]]),d==null&&(d=s=(O[6]<<8|O[7])&16383)}let b=g.msecs!==void 0?g.msecs:Date.now(),m=g.nsecs!==void 0?g.nsecs:u+1;const S=b-a+(m-u)/1e4;if(S<0&&g.clockseq===void 0&&(d=d+1&16383),(S<0||b>a)&&g.nsecs===void 0&&(m=0),m>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");a=b,u=m,s=d,b+=122192928e5;const E=((b&268435455)*1e4+m)%4294967296;y[p++]=E>>>24&255,y[p++]=E>>>16&255,y[p++]=E>>>8&255,y[p++]=E&255;const R=b/4294967296*1e4&268435455;y[p++]=R>>>8&255,y[p++]=R&255,y[p++]=R>>>24&15|16,y[p++]=R>>>16&255,y[p++]=d>>>8|128,y[p++]=d&255;for(let O=0;O<6;++O)y[p+O]=x[O];return h||(0,t.unsafeStringify)(y)}var f=c;return Yi.default=f,Yi}var Qi={},dn={},eo={},Xh;function _v(){if(Xh)return eo;Xh=1,Object.defineProperty(eo,"__esModule",{value:!0}),eo.default=void 0;var e=t(ja());function t(s){return s&&s.__esModule?s:{default:s}}function r(s){if(!(0,e.default)(s))throw TypeError("Invalid UUID");let a;const u=new Uint8Array(16);return u[0]=(a=parseInt(s.slice(0,8),16))>>>24,u[1]=a>>>16&255,u[2]=a>>>8&255,u[3]=a&255,u[4]=(a=parseInt(s.slice(9,13),16))>>>8,u[5]=a&255,u[6]=(a=parseInt(s.slice(14,18),16))>>>8,u[7]=a&255,u[8]=(a=parseInt(s.slice(19,23),16))>>>8,u[9]=a&255,u[10]=(a=parseInt(s.slice(24,36),16))/1099511627776&255,u[11]=a/4294967296&255,u[12]=a>>>24&255,u[13]=a>>>16&255,u[14]=a>>>8&255,u[15]=a&255,u}var i=r;return eo.default=i,eo}var Jh;function Ov(){if(Jh)return dn;Jh=1,Object.defineProperty(dn,"__esModule",{value:!0}),dn.URL=dn.DNS=void 0,dn.default=u;var e=za(),t=r(_v());function r(c){return c&&c.__esModule?c:{default:c}}function i(c){c=unescape(encodeURIComponent(c));const f=[];for(let g=0;g<c.length;++g)f.push(c.charCodeAt(g));return f}const s="6ba7b810-9dad-11d1-80b4-00c04fd430c8";dn.DNS=s;const a="6ba7b811-9dad-11d1-80b4-00c04fd430c8";dn.URL=a;function u(c,f,g){function h(v,p,y,x){var d;if(typeof v=="string"&&(v=i(v)),typeof p=="string"&&(p=(0,t.default)(p)),((d=p)===null||d===void 0?void 0:d.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let b=new Uint8Array(16+v.length);if(b.set(p),b.set(v,p.length),b=g(b),b[6]=b[6]&15|f,b[8]=b[8]&63|128,y){x=x||0;for(let m=0;m<16;++m)y[x+m]=b[m];return y}return(0,e.unsafeStringify)(b)}try{h.name=c}catch{}return h.DNS=s,h.URL=a,h}return dn}var to={},Qh;function tR(){if(Qh)return to;Qh=1,Object.defineProperty(to,"__esModule",{value:!0}),to.default=void 0;function e(y){if(typeof y=="string"){const x=unescape(encodeURIComponent(y));y=new Uint8Array(x.length);for(let d=0;d<x.length;++d)y[d]=x.charCodeAt(d)}return t(i(s(y),y.length*8))}function t(y){const x=[],d=y.length*32,b="0123456789abcdef";for(let m=0;m<d;m+=8){const S=y[m>>5]>>>m%32&255,E=parseInt(b.charAt(S>>>4&15)+b.charAt(S&15),16);x.push(E)}return x}function r(y){return(y+64>>>9<<4)+14+1}function i(y,x){y[x>>5]|=128<<x%32,y[r(x)-1]=x;let d=1732584193,b=-271733879,m=-1732584194,S=271733878;for(let E=0;E<y.length;E+=16){const R=d,O=b,k=m,W=S;d=f(d,b,m,S,y[E],7,-680876936),S=f(S,d,b,m,y[E+1],12,-389564586),m=f(m,S,d,b,y[E+2],17,606105819),b=f(b,m,S,d,y[E+3],22,-1044525330),d=f(d,b,m,S,y[E+4],7,-176418897),S=f(S,d,b,m,y[E+5],12,1200080426),m=f(m,S,d,b,y[E+6],17,-1473231341),b=f(b,m,S,d,y[E+7],22,-45705983),d=f(d,b,m,S,y[E+8],7,1770035416),S=f(S,d,b,m,y[E+9],12,-1958414417),m=f(m,S,d,b,y[E+10],17,-42063),b=f(b,m,S,d,y[E+11],22,-1990404162),d=f(d,b,m,S,y[E+12],7,1804603682),S=f(S,d,b,m,y[E+13],12,-40341101),m=f(m,S,d,b,y[E+14],17,-1502002290),b=f(b,m,S,d,y[E+15],22,1236535329),d=g(d,b,m,S,y[E+1],5,-165796510),S=g(S,d,b,m,y[E+6],9,-1069501632),m=g(m,S,d,b,y[E+11],14,643717713),b=g(b,m,S,d,y[E],20,-373897302),d=g(d,b,m,S,y[E+5],5,-701558691),S=g(S,d,b,m,y[E+10],9,38016083),m=g(m,S,d,b,y[E+15],14,-660478335),b=g(b,m,S,d,y[E+4],20,-405537848),d=g(d,b,m,S,y[E+9],5,568446438),S=g(S,d,b,m,y[E+14],9,-1019803690),m=g(m,S,d,b,y[E+3],14,-187363961),b=g(b,m,S,d,y[E+8],20,1163531501),d=g(d,b,m,S,y[E+13],5,-1444681467),S=g(S,d,b,m,y[E+2],9,-51403784),m=g(m,S,d,b,y[E+7],14,1735328473),b=g(b,m,S,d,y[E+12],20,-1926607734),d=h(d,b,m,S,y[E+5],4,-378558),S=h(S,d,b,m,y[E+8],11,-2022574463),m=h(m,S,d,b,y[E+11],16,1839030562),b=h(b,m,S,d,y[E+14],23,-35309556),d=h(d,b,m,S,y[E+1],4,-1530992060),S=h(S,d,b,m,y[E+4],11,1272893353),m=h(m,S,d,b,y[E+7],16,-155497632),b=h(b,m,S,d,y[E+10],23,-1094730640),d=h(d,b,m,S,y[E+13],4,681279174),S=h(S,d,b,m,y[E],11,-358537222),m=h(m,S,d,b,y[E+3],16,-722521979),b=h(b,m,S,d,y[E+6],23,76029189),d=h(d,b,m,S,y[E+9],4,-640364487),S=h(S,d,b,m,y[E+12],11,-421815835),m=h(m,S,d,b,y[E+15],16,530742520),b=h(b,m,S,d,y[E+2],23,-995338651),d=v(d,b,m,S,y[E],6,-198630844),S=v(S,d,b,m,y[E+7],10,1126891415),m=v(m,S,d,b,y[E+14],15,-1416354905),b=v(b,m,S,d,y[E+5],21,-57434055),d=v(d,b,m,S,y[E+12],6,1700485571),S=v(S,d,b,m,y[E+3],10,-1894986606),m=v(m,S,d,b,y[E+10],15,-1051523),b=v(b,m,S,d,y[E+1],21,-2054922799),d=v(d,b,m,S,y[E+8],6,1873313359),S=v(S,d,b,m,y[E+15],10,-30611744),m=v(m,S,d,b,y[E+6],15,-1560198380),b=v(b,m,S,d,y[E+13],21,1309151649),d=v(d,b,m,S,y[E+4],6,-145523070),S=v(S,d,b,m,y[E+11],10,-1120210379),m=v(m,S,d,b,y[E+2],15,718787259),b=v(b,m,S,d,y[E+9],21,-343485551),d=a(d,R),b=a(b,O),m=a(m,k),S=a(S,W)}return[d,b,m,S]}function s(y){if(y.length===0)return[];const x=y.length*8,d=new Uint32Array(r(x));for(let b=0;b<x;b+=8)d[b>>5]|=(y[b/8]&255)<<b%32;return d}function a(y,x){const d=(y&65535)+(x&65535);return(y>>16)+(x>>16)+(d>>16)<<16|d&65535}function u(y,x){return y<<x|y>>>32-x}function c(y,x,d,b,m,S){return a(u(a(a(x,y),a(b,S)),m),d)}function f(y,x,d,b,m,S,E){return c(x&d|~x&b,y,x,m,S,E)}function g(y,x,d,b,m,S,E){return c(x&b|d&~b,y,x,m,S,E)}function h(y,x,d,b,m,S,E){return c(x^d^b,y,x,m,S,E)}function v(y,x,d,b,m,S,E){return c(d^(x|~b),y,x,m,S,E)}var p=e;return to.default=p,to}var eg;function rR(){if(eg)return Qi;eg=1,Object.defineProperty(Qi,"__esModule",{value:!0}),Qi.default=void 0;var e=r(Ov()),t=r(tR());function r(a){return a&&a.__esModule?a:{default:a}}var s=(0,e.default)("v3",48,t.default);return Qi.default=s,Qi}var ro={},no={},tg;function nR(){if(tg)return no;tg=1,Object.defineProperty(no,"__esModule",{value:!0}),no.default=void 0;var t={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};return no.default=t,no}var rg;function iR(){if(rg)return ro;rg=1,Object.defineProperty(ro,"__esModule",{value:!0}),ro.default=void 0;var e=i(nR()),t=i(Ev()),r=za();function i(u){return u&&u.__esModule?u:{default:u}}function s(u,c,f){if(e.default.randomUUID&&!c&&!u)return e.default.randomUUID();u=u||{};const g=u.random||(u.rng||t.default)();if(g[6]=g[6]&15|64,g[8]=g[8]&63|128,c){f=f||0;for(let h=0;h<16;++h)c[f+h]=g[h];return c}return(0,r.unsafeStringify)(g)}var a=s;return ro.default=a,ro}var io={},oo={},ng;function oR(){if(ng)return oo;ng=1,Object.defineProperty(oo,"__esModule",{value:!0}),oo.default=void 0;function e(s,a,u,c){switch(s){case 0:return a&u^~a&c;case 1:return a^u^c;case 2:return a&u^a&c^u&c;case 3:return a^u^c}}function t(s,a){return s<<a|s>>>32-a}function r(s){const a=[1518500249,1859775393,2400959708,3395469782],u=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof s=="string"){const h=unescape(encodeURIComponent(s));s=[];for(let v=0;v<h.length;++v)s.push(h.charCodeAt(v))}else Array.isArray(s)||(s=Array.prototype.slice.call(s));s.push(128);const c=s.length/4+2,f=Math.ceil(c/16),g=new Array(f);for(let h=0;h<f;++h){const v=new Uint32Array(16);for(let p=0;p<16;++p)v[p]=s[h*64+p*4]<<24|s[h*64+p*4+1]<<16|s[h*64+p*4+2]<<8|s[h*64+p*4+3];g[h]=v}g[f-1][14]=(s.length-1)*8/Math.pow(2,32),g[f-1][14]=Math.floor(g[f-1][14]),g[f-1][15]=(s.length-1)*8&4294967295;for(let h=0;h<f;++h){const v=new Uint32Array(80);for(let m=0;m<16;++m)v[m]=g[h][m];for(let m=16;m<80;++m)v[m]=t(v[m-3]^v[m-8]^v[m-14]^v[m-16],1);let p=u[0],y=u[1],x=u[2],d=u[3],b=u[4];for(let m=0;m<80;++m){const S=Math.floor(m/20),E=t(p,5)+e(S,y,x,d)+b+a[S]+v[m]>>>0;b=d,d=x,x=t(y,30)>>>0,y=p,p=E}u[0]=u[0]+p>>>0,u[1]=u[1]+y>>>0,u[2]=u[2]+x>>>0,u[3]=u[3]+d>>>0,u[4]=u[4]+b>>>0}return[u[0]>>24&255,u[0]>>16&255,u[0]>>8&255,u[0]&255,u[1]>>24&255,u[1]>>16&255,u[1]>>8&255,u[1]&255,u[2]>>24&255,u[2]>>16&255,u[2]>>8&255,u[2]&255,u[3]>>24&255,u[3]>>16&255,u[3]>>8&255,u[3]&255,u[4]>>24&255,u[4]>>16&255,u[4]>>8&255,u[4]&255]}var i=r;return oo.default=i,oo}var ig;function sR(){if(ig)return io;ig=1,Object.defineProperty(io,"__esModule",{value:!0}),io.default=void 0;var e=r(Ov()),t=r(oR());function r(a){return a&&a.__esModule?a:{default:a}}var s=(0,e.default)("v5",80,t.default);return io.default=s,io}var so={},og;function aR(){if(og)return so;og=1,Object.defineProperty(so,"__esModule",{value:!0}),so.default=void 0;var e="00000000-0000-0000-0000-000000000000";return so.default=e,so}var ao={},sg;function uR(){if(sg)return ao;sg=1,Object.defineProperty(ao,"__esModule",{value:!0}),ao.default=void 0;var e=t(ja());function t(s){return s&&s.__esModule?s:{default:s}}function r(s){if(!(0,e.default)(s))throw TypeError("Invalid UUID");return parseInt(s.slice(14,15),16)}var i=r;return ao.default=i,ao}var ag;function lR(){return ag||(ag=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"NIL",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,"v1",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"v3",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(e,"v4",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"v5",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"validate",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,"version",{enumerable:!0,get:function(){return u.default}});var t=h(eR()),r=h(rR()),i=h(iR()),s=h(sR()),a=h(aR()),u=h(uR()),c=h(ja()),f=h(za()),g=h(_v());function h(v){return v&&v.__esModule?v:{default:v}}})(Il)),Il}var Ll,ug;function cR(){if(ug)return Ll;ug=1;function e(t,r){if(!t||!r||!t.length||!r.length)throw new Error("Bad alphabet");this.srcAlphabet=t,this.dstAlphabet=r}return e.prototype.convert=function(t){var r,i,s,a={},u=this.srcAlphabet.length,c=this.dstAlphabet.length,f=t.length,g=typeof t=="string"?"":[];if(!this.isValid(t))throw new Error('Number "'+t+'" contains of non-alphabetic digits ('+this.srcAlphabet+")");if(this.srcAlphabet===this.dstAlphabet)return t;for(r=0;r<f;r++)a[r]=this.srcAlphabet.indexOf(t[r]);do{for(i=0,s=0,r=0;r<f;r++)i=i*u+a[r],i>=c?(a[s++]=parseInt(i/c,10),i=i%c):s>0&&(a[s++]=0);f=s,g=this.dstAlphabet.slice(i,i+1).concat(g)}while(s!==0);return g},e.prototype.isValid=function(t){for(var r=0;r<t.length;++r)if(this.srcAlphabet.indexOf(t[r])===-1)return!1;return!0},Ll=e,Ll}var Ml,lg;function fR(){if(lg)return Ml;lg=1;var e=cR();function t(r,i){var s=new e(r,i);return function(a){return s.convert(a)}}return t.BIN="01",t.OCT="01234567",t.DEC="0123456789",t.HEX="0123456789abcdef",Ml=t,Ml}var Dl,cg;function dR(){if(cg)return Dl;cg=1;const{v4:e,validate:t}=lR(),r=fR(),i={cookieBase90:"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!#$%&'()*+-./:<=>?@[]^_`{|}~",flickrBase58:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ",uuid25Base36:"0123456789abcdefghijklmnopqrstuvwxyz"},s={consistentLength:!0};let a;const u=(g,h,v)=>{const p=h(g.toLowerCase().replace(/-/g,""));return!v||!v.consistentLength?p:p.padStart(v.shortIdLength,v.paddingChar)},c=(g,h)=>{const p=h(g).padStart(32,"0").match(/(\w{8})(\w{4})(\w{4})(\w{4})(\w{12})/);return[p[1],p[2],p[3],p[4],p[5]].join("-")},f=g=>Math.ceil(Math.log(2**128)/Math.log(g));return Dl=(()=>{const g=(h,v)=>{const p=h||i.flickrBase58,y={...s,...v};if([...new Set(Array.from(p))].length!==p.length)throw new Error("The provided Alphabet has duplicate characters resulting in unreliable results");const x=f(p.length),d={shortIdLength:x,consistentLength:y.consistentLength,paddingChar:p[0]},b=r(r.HEX,p),m=r(p,r.HEX),S=()=>u(e(),b,d),R={alphabet:p,fromUUID:O=>u(O,b,d),maxLength:x,generate:S,new:S,toUUID:O=>c(O,m),uuid:e,validate:(O,k=!1)=>{if(!O||typeof O!="string")return!1;const W=y.consistentLength?O.length===x:O.length<=x,M=O.split("").every(F=>p.includes(F));return k===!1?W&&M:W&&M&&t(c(O,m))}};return Object.freeze(R),R};return g.constants=i,g.uuid=e,g.generate=()=>(a||(a=g(i.flickrBase58).generate),a()),g})(),Dl}var Zn=dR();const Tv=({depth:e,height:t=24,width:r=11,showLines:i=!0,stroke:s="rgb(241, 245, 249)"})=>{const a=`indent_line_${Zn.generate()}`;return D.jsxs("svg",{viewBox:`0 0 ${11*e} ${t}`,width:`${11*e}`,height:t,children:[D.jsx("defs",{children:D.jsx("pattern",{id:a,x:"0",y:"0",width:r,height:t,patternUnits:"userSpaceOnUse",children:D.jsx("line",{x1:r/2,y1:"0",x2:r/2,y2:t,stroke:s})})}),i?D.jsx("rect",{fill:`url(#${a})`,x:"0",y:"0",width:`${11*e}`,height:t}):D.jsx("rect",{fill:i?`url(#${a})`:"",x:"0",y:"0",width:0,height:t})]})},Av=({show:e,expanded:t,onClick:r,variant:i="arrow"})=>e?D.jsx("div",{className:"flex h-6 w-5 items-center",onClick:s=>r&&r(s),children:(()=>{switch(i){case"arrow":return D.jsx(ot.FdDown,{className:je(["h-3 w-3 transform text-grey-50 transition ease-in-out",{"rotate-0":t,"-rotate-90":!t}])});case"caret":return t?D.jsx(ot.FdDown,{}):D.jsx(ot.FdRight,{});default:return D.jsx(ot.FdDown,{className:"h-3 w-3 transform text-grey-50 transition ease-in-out"})}})()}):D.jsx("div",{className:"flex h-6 w-3 items-center"}),Jc=({node:e,depth:t,expandedKeys:r,selectedKeys:i,actions:s,searchQuery:a,renderNode:u,onNodeClick:c})=>{var y;const{key:f,children:g}=e,h=B.useMemo(()=>({expanded:r.includes(e.key),selected:i.includes(e.key)}),[r,e.key,i]),v=u&&typeof u=="function"?u(e,t,h,s,a):gR(e,t,h,c);return!((y=e.options)!=null&&y.filterable)||!a||e.title.toLowerCase().includes(a.toLowerCase())?D.jsxs(D.Fragment,{children:[D.jsx("div",{className:"flex items-center space-x-2",children:v},f),hR(g||[],t,a,r,i,h.expanded,s,c,u)]}):null},pR=function(e,t){var u;const{title:r,icon:i,subtitle:s}=e;let a=null;return i&&(a=D.jsx(Sv,{children:i})),D.jsxs("div",{className:"flex flex-1 select-none items-center overflow-hidden text-ellipsis whitespace-nowrap",draggable:(u=e.options)==null?void 0:u.draggable,onClick:()=>{t&&t(e)},children:[a,D.jsx("div",{style:{lineHeight:"24px",fontSize:11},children:r}),s&&D.jsx("div",{className:"mx-1 min-w-0 text-xxs italic text-fd-gray-mild",children:s})]})},hR=function(e,t,r,i,s,a,u,c,f){return e.length&&a?e.map(g=>D.jsx(Jc,{actions:u,node:g,searchQuery:r,depth:t+1,expandedKeys:i,selectedKeys:s,onNodeClick:c,renderNode:f},g.key)):null},gR=function(e,t,r,i){return D.jsxs(D.Fragment,{children:[D.jsx(Tv,{showLines:!0,depth:t}),D.jsx(Av,{show:e.children&&e.children.length>0||!1,expanded:r.expanded}),pR(e,i)]})},qs=e=>t=>e===t,mR=function({treeData:t,renderNode:r,onNodeClick:i,onExpandNode:s,searchQuery:a,expandedKeys:u,expandCondition:c="always",encapsulated:f,className:g}){const[h,v]=B.useState(()=>({expandedKeys:u||[],selectedKeys:[]}));B.useEffect(()=>{c==="when-collapsed"&&h.expandedKeys.length>0||v({...h,expandedKeys:u||h.expandedKeys})},[u]);const p=B.useCallback(m=>{if(!m)return;const S=h.expandedKeys.findIndex(qs(m.key));let E=[];S===-1?(E=[...h.expandedKeys,m.key],v(()=>({...h,expandedKeys:E})),s&&s(E)):(E=h.expandedKeys.filter(R=>R!==m.key),v(()=>({...h,expandedKeys:E})),s&&s(E))},[h]),y=B.useCallback(m=>{var E;if(!((E=m==null?void 0:m.options)!=null&&E.selectable))return;h.selectedKeys.findIndex(qs(m.key))===-1&&v({...h,selectedKeys:[...h.selectedKeys,m.key]})},[h]),x=B.useCallback(m=>{var E;if(!((E=m==null?void 0:m.options)!=null&&E.selectable))return;h.selectedKeys.findIndex(qs(m.key))===-1&&v({...h,selectedKeys:[m.key]})},[h]),d=B.useCallback(m=>{var E;if(!((E=m==null?void 0:m.options)!=null&&E.selectable)){v({...h,selectedKeys:[]});return}h.selectedKeys.findIndex(qs(m.key))!==-1&&v({...h,selectedKeys:h.selectedKeys.filter(R=>R!==m.key)})},[h]),b=B.useMemo(()=>({expand:p,select:y,selectSingle:x,deselect:d}),[d,p,y,x]);return D.jsx("div",{className:je("fd-tree",g,{"pl-2 mb-1 rounded border bg-grey-900 p-1":f}),children:t.map(m=>D.jsx(Jc,{node:m,searchQuery:a||"",depth:0,expandedKeys:h.expandedKeys,selectedKeys:h.selectedKeys,actions:b,renderNode:r,onNodeClick:i},m.key))})};function da(e){return e.of&&e.children?D.jsx(D.Fragment,{children:e.children}):null}function Qe(){return Qe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},Qe.apply(null,arguments)}function vR(e){for(var t=0,r,i=0,s=e.length;s>=4;++i,s-=4)r=e.charCodeAt(i)&255|(e.charCodeAt(++i)&255)<<8|(e.charCodeAt(++i)&255)<<16|(e.charCodeAt(++i)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(s){case 3:t^=(e.charCodeAt(i+2)&255)<<16;case 2:t^=(e.charCodeAt(i+1)&255)<<8;case 1:t^=e.charCodeAt(i)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var yR={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Rv(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var wR=/[A-Z]|^ms/g,bR=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Pv=function(t){return t.charCodeAt(1)===45},fg=function(t){return t!=null&&typeof t!="boolean"},Fl=Rv(function(e){return Pv(e)?e:e.replace(wR,"-$&").toLowerCase()}),dg=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(bR,function(i,s,a){return Ar={name:s,styles:a,next:Ar},s})}return yR[t]!==1&&!Pv(t)&&typeof r=="number"&&r!==0?r+"px":r};function Io(e,t,r){if(r==null)return"";var i=r;if(i.__emotion_styles!==void 0)return i;switch(typeof r){case"boolean":return"";case"object":{var s=r;if(s.anim===1)return Ar={name:s.name,styles:s.styles,next:Ar},s.name;var a=r;if(a.styles!==void 0){var u=a.next;if(u!==void 0)for(;u!==void 0;)Ar={name:u.name,styles:u.styles,next:Ar},u=u.next;var c=a.styles+";";return c}return xR(e,t,r)}case"function":{if(e!==void 0){var f=Ar,g=r(e);return Ar=f,Io(e,t,g)}break}}var h=r;if(t==null)return h;var v=t[h];return v!==void 0?v:h}function xR(e,t,r){var i="";if(Array.isArray(r))for(var s=0;s<r.length;s++)i+=Io(e,t,r[s])+";";else for(var a in r){var u=r[a];if(typeof u!="object"){var c=u;t!=null&&t[c]!==void 0?i+=a+"{"+t[c]+"}":fg(c)&&(i+=Fl(a)+":"+dg(a,c)+";")}else if(Array.isArray(u)&&typeof u[0]=="string"&&(t==null||t[u[0]]===void 0))for(var f=0;f<u.length;f++)fg(u[f])&&(i+=Fl(a)+":"+dg(a,u[f])+";");else{var g=Io(e,t,u);switch(a){case"animation":case"animationName":{i+=Fl(a)+":"+g+";";break}default:i+=a+"{"+g+"}"}}}return i}var pg=/label:\s*([^\s;{]+)\s*(;|$)/g,Ar;function SR(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var i=!0,s="";Ar=void 0;var a=e[0];if(a==null||a.raw===void 0)i=!1,s+=Io(r,t,a);else{var u=a;s+=u[0]}for(var c=1;c<e.length;c++)if(s+=Io(r,t,e[c]),i){var f=a;s+=f[c]}pg.lastIndex=0;for(var g="",h;(h=pg.exec(s))!==null;)g+="-"+h[1];var v=vR(s)+g;return{name:v,styles:s,next:Ar}}var ER=function(t){return t()},_R=$.useInsertionEffect?$.useInsertionEffect:!1,OR=_R||ER,TR=!0;function AR(e,t,r){var i="";return r.split(" ").forEach(function(s){e[s]!==void 0?t.push(e[s]+";"):s&&(i+=s+" ")}),i}var Cv=function(t,r,i){var s=t.key+"-"+r.name;(i===!1||TR===!1)&&t.registered[s]===void 0&&(t.registered[s]=r.styles)},RR=function(t,r,i){Cv(t,r,i);var s=t.key+"-"+r.name;if(t.inserted[r.name]===void 0){var a=r;do t.insert(r===a?"."+s:"",a,t.sheet,!0),a=a.next;while(a!==void 0)}},PR=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,CR=Rv(function(e){return PR.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),kR=CR,$R=function(t){return t!=="theme"},hg=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?kR:$R},gg=function(t,r,i){var s;if(r){var a=r.shouldForwardProp;s=t.__emotion_forwardProp&&a?function(u){return t.__emotion_forwardProp(u)&&a(u)}:a}return typeof s!="function"&&i&&(s=t.__emotion_forwardProp),s},IR=function(t){var r=t.cache,i=t.serialized,s=t.isStringTag;return Cv(r,i,s),OR(function(){return RR(r,i,s)}),null},LR=function e(t,r){var i=t.__emotion_real===t,s=i&&t.__emotion_base||t,a,u;r!==void 0&&(a=r.label,u=r.target);var c=gg(t,r,i),f=c||hg(s),g=!f("as");return function(){var h=arguments,v=i&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(a!==void 0&&v.push("label:"+a+";"),h[0]==null||h[0].raw===void 0)v.push.apply(v,h);else{var p=h[0];v.push(p[0]);for(var y=h.length,x=1;x<y;x++)v.push(h[x],p[x])}var d=gc.withEmotionCache(function(b,m,S){var E=g&&b.as||s,R="",O=[],k=b;if(b.theme==null){k={};for(var W in b)k[W]=b[W];k.theme=$.useContext(gc.ThemeContext)}typeof b.className=="string"?R=AR(m.registered,O,b.className):b.className!=null&&(R=b.className+" ");var M=SR(v.concat(O),m.registered,k);R+=m.key+"-"+M.name,u!==void 0&&(R+=" "+u);var F=g&&c===void 0?hg(E):f,G={};for(var j in b)g&&j==="as"||F(j)&&(G[j]=b[j]);return G.className=R,S&&(G.ref=S),$.createElement($.Fragment,null,$.createElement(IR,{cache:m,serialized:M,isStringTag:typeof E=="string"}),$.createElement(E,G))});return d.displayName=a!==void 0?a:"Styled("+(typeof s=="string"?s:s.displayName||s.name||"Component")+")",d.defaultProps=t.defaultProps,d.__emotion_real=d,d.__emotion_base=s,d.__emotion_styles=v,d.__emotion_forwardProp=c,Object.defineProperty(d,"toString",{value:function(){return"."+u}}),d.withComponent=function(b,m){var S=e(b,Qe({},r,m,{shouldForwardProp:gg(d,m,!0)}));return S.apply(void 0,v)},d}},MR=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],xa=LR.bind(null);MR.forEach(function(e){xa[e]=xa(e)});var DR=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},gi=new WeakMap,Zs=new WeakMap,Gs={},Nl=0,kv=function(e){return e&&(e.host||kv(e.parentNode))},FR=function(e,t){return t.map(function(r){if(e.contains(r))return r;var i=kv(r);return i&&e.contains(i)?i:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},NR=function(e,t,r,i){var s=FR(t,Array.isArray(e)?e:[e]);Gs[r]||(Gs[r]=new WeakMap);var a=Gs[r],u=[],c=new Set,f=new Set(s),g=function(v){!v||c.has(v)||(c.add(v),g(v.parentNode))};s.forEach(g);var h=function(v){!v||f.has(v)||Array.prototype.forEach.call(v.children,function(p){if(c.has(p))h(p);else try{var y=p.getAttribute(i),x=y!==null&&y!=="false",d=(gi.get(p)||0)+1,b=(a.get(p)||0)+1;gi.set(p,d),a.set(p,b),u.push(p),d===1&&x&&Zs.set(p,!0),b===1&&p.setAttribute(r,"true"),x||p.setAttribute(i,"true")}catch(m){console.error("aria-hidden: cannot operate on ",p,m)}})};return h(t),c.clear(),Nl++,function(){u.forEach(function(v){var p=gi.get(v)-1,y=a.get(v)-1;gi.set(v,p),a.set(v,y),p||(Zs.has(v)||v.removeAttribute(i),Zs.delete(v)),y||v.removeAttribute(r)}),Nl--,Nl||(gi=new WeakMap,gi=new WeakMap,Zs=new WeakMap,Gs={})}},jR=function(e,t,r){r===void 0&&(r="data-aria-hidden");var i=Array.from(Array.isArray(e)?e:[e]),s=DR(e);return s?(i.push.apply(i,Array.from(s.querySelectorAll("[aria-live], script"))),NR(i,s,r,"aria-hidden")):function(){return null}},yc=function(e,t){return yc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},yc(e,t)};function Ba(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");yc(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var Rr=function(){return Rr=Object.assign||function(t){for(var r,i=1,s=arguments.length;i<s;i++){r=arguments[i];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Rr.apply(this,arguments)};function $v(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,i=Object.getOwnPropertySymbols(e);s<i.length;s++)t.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(r[i[s]]=e[i[s]]);return r}function wc(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],i=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function bc(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var i=r.call(e),s,a=[],u;try{for(;(t===void 0||t-- >0)&&!(s=i.next()).done;)a.push(s.value)}catch(c){u={error:c}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(u)throw u.error}}return a}function Sa(e,t,r){if(r||arguments.length===2)for(var i=0,s=t.length,a;i<s;i++)(a||!(i in t))&&(a||(a=Array.prototype.slice.call(t,0,i)),a[i]=t[i]);return e.concat(a||Array.prototype.slice.call(t))}var pa="right-scroll-bar-position",ha="width-before-scroll-bar",zR="with-scroll-bars-hidden",BR="--removed-body-scroll-bar-size";function jl(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function WR(e,t){var r=B.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(i){var s=r.value;s!==i&&(r.value=i,r.callback(i,s))}}}})[0];return r.callback=t,r.facade}var HR=typeof window<"u"?$.useLayoutEffect:$.useEffect,mg=new WeakMap;function UR(e,t){var r=WR(null,function(i){return e.forEach(function(s){return jl(s,i)})});return HR(function(){var i=mg.get(r);if(i){var s=new Set(i),a=new Set(e),u=r.current;s.forEach(function(c){a.has(c)||jl(c,null)}),a.forEach(function(c){s.has(c)||jl(c,u)})}mg.set(r,e)},[e]),r}function qR(e){return e}function ZR(e,t){t===void 0&&(t=qR);var r=[],i=!1,s={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(a){var u=t(a,i);return r.push(u),function(){r=r.filter(function(c){return c!==u})}},assignSyncMedium:function(a){for(i=!0;r.length;){var u=r;r=[],u.forEach(a)}r={push:function(c){return a(c)},filter:function(){return r}}},assignMedium:function(a){i=!0;var u=[];if(r.length){var c=r;r=[],c.forEach(a),u=r}var f=function(){var h=u;u=[],h.forEach(a)},g=function(){return Promise.resolve().then(f)};g(),r={push:function(h){u.push(h),g()},filter:function(h){return u=u.filter(h),r}}}};return s}function GR(e){e===void 0&&(e={});var t=ZR(null);return t.options=Rr({async:!0,ssr:!1},e),t}var Iv=function(e){var t=e.sideCar,r=$v(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=t.read();if(!i)throw new Error("Sidecar medium not found");return $.createElement(i,Rr({},r))};Iv.isSideCarExport=!0;function KR(e,t){return e.useMedium(t),Iv}var Lv=GR(),zl=function(){},Wa=$.forwardRef(function(e,t){var r=$.useRef(null),i=$.useState({onScrollCapture:zl,onWheelCapture:zl,onTouchMoveCapture:zl}),s=i[0],a=i[1],u=e.forwardProps,c=e.children,f=e.className,g=e.removeScrollBar,h=e.enabled,v=e.shards,p=e.sideCar,y=e.noRelative,x=e.noIsolation,d=e.inert,b=e.allowPinchZoom,m=e.as,S=m===void 0?"div":m,E=e.gapMode,R=$v(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),O=p,k=UR([r,t]),W=Rr(Rr({},R),s);return $.createElement($.Fragment,null,h&&$.createElement(O,{sideCar:Lv,removeScrollBar:g,shards:v,noRelative:y,noIsolation:x,inert:d,setCallbacks:a,allowPinchZoom:!!b,lockRef:r,gapMode:E}),u?$.cloneElement($.Children.only(c),Rr(Rr({},W),{ref:k})):$.createElement(S,Rr({},W,{className:f,ref:k}),c))});Wa.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Wa.classNames={fullWidth:ha,zeroRight:pa};var VR=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function YR(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=VR();return t&&e.setAttribute("nonce",t),e}function XR(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function JR(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var QR=function(){var e=0,t=null;return{add:function(r){e==0&&(t=YR())&&(XR(t,r),JR(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},eP=function(){var e=QR();return function(t,r){$.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Mv=function(){var e=eP(),t=function(r){var i=r.styles,s=r.dynamic;return e(i,s),null};return t},tP={left:0,top:0,right:0,gap:0},Bl=function(e){return parseInt(e||"",10)||0},rP=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],i=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[Bl(r),Bl(i),Bl(s)]},nP=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return tP;var t=rP(e),r=document.documentElement.clientWidth,i=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,i-r+t[2]-t[0])}},iP=Mv(),wi="data-scroll-locked",oP=function(e,t,r,i){var s=e.left,a=e.top,u=e.right,c=e.gap;return r===void 0&&(r="margin"),`
23
+ .`.concat(zR,` {
24
24
  overflow: hidden `).concat(i,`;
25
25
  padding-right: `).concat(c,"px ").concat(i,`;
26
26
  }
27
- body[`).concat(hi,`] {
27
+ body[`).concat(wi,`] {
28
28
  overflow: hidden `).concat(i,`;
29
29
  overscroll-behavior: contain;
30
30
  `).concat([t&&"position: relative ".concat(i,";"),r==="margin"&&`
31
31
  padding-left: `.concat(s,`px;
32
32
  padding-top: `).concat(a,`px;
33
- padding-right: `).concat(l,`px;
33
+ padding-right: `).concat(u,`px;
34
34
  margin-left:0;
35
35
  margin-top:0;
36
36
  margin-right: `).concat(c,"px ").concat(i,`;
37
37
  `),r==="padding"&&"padding-right: ".concat(c,"px ").concat(i,";")].filter(Boolean).join(""),`
38
38
  }
39
39
 
40
- .`).concat(ua,` {
40
+ .`).concat(pa,` {
41
41
  right: `).concat(c,"px ").concat(i,`;
42
42
  }
43
43
 
44
- .`).concat(la,` {
44
+ .`).concat(ha,` {
45
45
  margin-right: `).concat(c,"px ").concat(i,`;
46
46
  }
47
47
 
48
- .`).concat(ua," .").concat(ua,` {
48
+ .`).concat(pa," .").concat(pa,` {
49
49
  right: 0 `).concat(i,`;
50
50
  }
51
51
 
52
- .`).concat(la," .").concat(la,` {
52
+ .`).concat(ha," .").concat(ha,` {
53
53
  margin-right: 0 `).concat(i,`;
54
54
  }
55
55
 
56
- body[`).concat(hi,`] {
57
- `).concat(ER,": ").concat(c,`px;
56
+ body[`).concat(wi,`] {
57
+ `).concat(BR,": ").concat(c,`px;
58
58
  }
59
- `)},sg=function(){var e=parseInt(document.body.getAttribute(hi)||"0",10);return isFinite(e)?e:0},BR=function(){$.useEffect(function(){return document.body.setAttribute(hi,(sg()+1).toString()),function(){var e=sg()-1;e<=0?document.body.removeAttribute(hi):document.body.setAttribute(hi,e.toString())}},[])},UR=function(e){var t=e.noRelative,r=e.noImportant,i=e.gapMode,s=i===void 0?"margin":i;BR();var a=$.useMemo(function(){return jR(s)},[s]);return $.createElement(zR,{styles:WR(a,!t,s,r?"":"!important")})},dc=!1;if(typeof window<"u")try{var Us=Object.defineProperty({},"passive",{get:function(){return dc=!0,!0}});window.addEventListener("test",Us,Us),window.removeEventListener("test",Us,Us)}catch{dc=!1}var fi=dc?{passive:!1}:!1,HR=function(e){return e.tagName==="TEXTAREA"},_m=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!HR(e)&&r[t]==="visible")},qR=function(e){return _m(e,"overflowY")},ZR=function(e){return _m(e,"overflowX")},ag=function(e,t){var r=t.ownerDocument,i=t;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var s=Om(e,i);if(s){var a=Am(e,i),l=a[1],c=a[2];if(l>c)return!0}i=i.parentNode}while(i&&i!==r.body);return!1},GR=function(e){var t=e.scrollTop,r=e.scrollHeight,i=e.clientHeight;return[t,r,i]},KR=function(e){var t=e.scrollLeft,r=e.scrollWidth,i=e.clientWidth;return[t,r,i]},Om=function(e,t){return e==="v"?qR(t):ZR(t)},Am=function(e,t){return e==="v"?GR(t):KR(t)},VR=function(e,t){return e==="h"&&t==="rtl"?-1:1},XR=function(e,t,r,i,s){var a=VR(e,window.getComputedStyle(t).direction),l=a*i,c=r.target,f=t.contains(c),m=!1,v=l>0,g=0,p=0;do{if(!c)break;var b=Am(e,c),x=b[0],d=b[1],w=b[2],h=d-w-a*x;(x||h)&&Om(e,c)&&(g+=h,p+=x);var S=c.parentNode;c=S&&S.nodeType===Node.DOCUMENT_FRAGMENT_NODE?S.host:S}while(!f&&c!==document.body||f&&(t.contains(c)||t===c));return(v&&Math.abs(g)<1||!v&&Math.abs(p)<1)&&(m=!0),m},Hs=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ug=function(e){return[e.deltaX,e.deltaY]},lg=function(e){return e&&"current"in e?e.current:e},YR=function(e,t){return e[0]===t[0]&&e[1]===t[1]},JR=function(e){return`
59
+ `)},vg=function(){var e=parseInt(document.body.getAttribute(wi)||"0",10);return isFinite(e)?e:0},sP=function(){$.useEffect(function(){return document.body.setAttribute(wi,(vg()+1).toString()),function(){var e=vg()-1;e<=0?document.body.removeAttribute(wi):document.body.setAttribute(wi,e.toString())}},[])},aP=function(e){var t=e.noRelative,r=e.noImportant,i=e.gapMode,s=i===void 0?"margin":i;sP();var a=$.useMemo(function(){return nP(s)},[s]);return $.createElement(iP,{styles:oP(a,!t,s,r?"":"!important")})},xc=!1;if(typeof window<"u")try{var Ks=Object.defineProperty({},"passive",{get:function(){return xc=!0,!0}});window.addEventListener("test",Ks,Ks),window.removeEventListener("test",Ks,Ks)}catch{xc=!1}var mi=xc?{passive:!1}:!1,uP=function(e){return e.tagName==="TEXTAREA"},Dv=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!uP(e)&&r[t]==="visible")},lP=function(e){return Dv(e,"overflowY")},cP=function(e){return Dv(e,"overflowX")},yg=function(e,t){var r=t.ownerDocument,i=t;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var s=Fv(e,i);if(s){var a=Nv(e,i),u=a[1],c=a[2];if(u>c)return!0}i=i.parentNode}while(i&&i!==r.body);return!1},fP=function(e){var t=e.scrollTop,r=e.scrollHeight,i=e.clientHeight;return[t,r,i]},dP=function(e){var t=e.scrollLeft,r=e.scrollWidth,i=e.clientWidth;return[t,r,i]},Fv=function(e,t){return e==="v"?lP(t):cP(t)},Nv=function(e,t){return e==="v"?fP(t):dP(t)},pP=function(e,t){return e==="h"&&t==="rtl"?-1:1},hP=function(e,t,r,i,s){var a=pP(e,window.getComputedStyle(t).direction),u=a*i,c=r.target,f=t.contains(c),g=!1,h=u>0,v=0,p=0;do{if(!c)break;var y=Nv(e,c),x=y[0],d=y[1],b=y[2],m=d-b-a*x;(x||m)&&Fv(e,c)&&(v+=m,p+=x);var S=c.parentNode;c=S&&S.nodeType===Node.DOCUMENT_FRAGMENT_NODE?S.host:S}while(!f&&c!==document.body||f&&(t.contains(c)||t===c));return(h&&Math.abs(v)<1||!h&&Math.abs(p)<1)&&(g=!0),g},Vs=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},wg=function(e){return[e.deltaX,e.deltaY]},bg=function(e){return e&&"current"in e?e.current:e},gP=function(e,t){return e[0]===t[0]&&e[1]===t[1]},mP=function(e){return`
60
60
  .block-interactivity-`.concat(e,` {pointer-events: none;}
61
61
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
62
- `)},QR=0,di=[];function eP(e){var t=$.useRef([]),r=$.useRef([0,0]),i=$.useRef(),s=$.useState(QR++)[0],a=$.useState(Em)[0],l=$.useRef(e);$.useEffect(function(){l.current=e},[e]),$.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var d=ma([e.lockRef.current],(e.shards||[]).map(lg),!0).filter(Boolean);return d.forEach(function(w){return w.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),d.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var c=$.useCallback(function(d,w){if("touches"in d&&d.touches.length===2||d.type==="wheel"&&d.ctrlKey)return!l.current.allowPinchZoom;var h=Hs(d),S=r.current,E="deltaX"in d?d.deltaX:S[0]-h[0],R="deltaY"in d?d.deltaY:S[1]-h[1],O,k=d.target,B=Math.abs(E)>Math.abs(R)?"h":"v";if("touches"in d&&B==="h"&&k.type==="range")return!1;var M=ag(B,k);if(!M)return!0;if(M?O=B:(O=B==="v"?"h":"v",M=ag(B,k)),!M)return!1;if(!i.current&&"changedTouches"in d&&(E||R)&&(i.current=O),!O)return!0;var F=i.current||O;return XR(F,w,d,F==="h"?E:R)},[]),f=$.useCallback(function(d){var w=d;if(!(!di.length||di[di.length-1]!==a)){var h="deltaY"in w?ug(w):Hs(w),S=t.current.filter(function(O){return O.name===w.type&&(O.target===w.target||w.target===O.shadowParent)&&YR(O.delta,h)})[0];if(S&&S.should){w.cancelable&&w.preventDefault();return}if(!S){var E=(l.current.shards||[]).map(lg).filter(Boolean).filter(function(O){return O.contains(w.target)}),R=E.length>0?c(w,E[0]):!l.current.noIsolation;R&&w.cancelable&&w.preventDefault()}}},[]),m=$.useCallback(function(d,w,h,S){var E={name:d,delta:w,target:h,should:S,shadowParent:tP(h)};t.current.push(E),setTimeout(function(){t.current=t.current.filter(function(R){return R!==E})},1)},[]),v=$.useCallback(function(d){r.current=Hs(d),i.current=void 0},[]),g=$.useCallback(function(d){m(d.type,ug(d),d.target,c(d,e.lockRef.current))},[]),p=$.useCallback(function(d){m(d.type,Hs(d),d.target,c(d,e.lockRef.current))},[]);$.useEffect(function(){return di.push(a),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:p}),document.addEventListener("wheel",f,fi),document.addEventListener("touchmove",f,fi),document.addEventListener("touchstart",v,fi),function(){di=di.filter(function(d){return d!==a}),document.removeEventListener("wheel",f,fi),document.removeEventListener("touchmove",f,fi),document.removeEventListener("touchstart",v,fi)}},[]);var b=e.removeScrollBar,x=e.inert;return $.createElement($.Fragment,null,x?$.createElement(a,{styles:JR(s)}):null,b?$.createElement(UR,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function tP(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const rP=CR(Sm,eP);var Tm=$.forwardRef(function(e,t){return $.createElement(Ma,Or({},e,{ref:t,sideCar:rP}))});Tm.classNames=Ma.classNames;const nP=globalThis!=null&&globalThis.document?$.useLayoutEffect:()=>{},iP=$.useId||(()=>{});let oP=0;function Rm(e){const[t,r]=$.useState(iP());return nP((()=>{r((i=>i??String(oP++)))}),[e]),e||(t?`radix-${t}`:"")}function Pm(...e){return t=>e.forEach((r=>(function(i,s){typeof i=="function"?i(s):i!=null&&(i.current=s)})(r,t)))}function mn(...e){return $.useCallback(Pm(...e),e)}const Cm=$.forwardRef(((e,t)=>{const{children:r,...i}=e;return $.Children.toArray(r).some(cg)?$.createElement($.Fragment,null,$.Children.map(r,(s=>cg(s)?$.createElement(pc,Ve({},i,{ref:t}),s.props.children):s))):$.createElement(pc,Ve({},i,{ref:t}),r)}));Cm.displayName="Slot";const pc=$.forwardRef(((e,t)=>{const{children:r,...i}=e;return $.isValidElement(r)?$.cloneElement(r,{...sP(i,r.props),ref:Pm(t,r.ref)}):$.Children.count(r)>1?$.Children.only(null):null}));pc.displayName="SlotClone";const km=({children:e})=>$.createElement($.Fragment,null,e);function cg(e){return $.isValidElement(e)&&e.type===km}function sP(e,t){const r={...t};for(const i in t){const s=e[i],a=t[i];/^on[A-Z]/.test(i)?r[i]=(...l)=>{a==null||a(...l),s==null||s(...l)}:i==="style"?r[i]={...s,...a}:i==="className"&&(r[i]=[s,a].filter(Boolean).join(" "))}return{...e,...r}}const yn=["a","button","div","h2","h3","img","li","nav","ol","p","span","svg","ul"].reduce(((e,t)=>({...e,[t]:$.forwardRef(((r,i)=>{const{asChild:s,...a}=r,l=s?Cm:t;return $.useEffect((()=>{window[Symbol.for("radix-ui")]=!0}),[]),$.createElement(l,Ve({},a,{ref:i}))}))})),{}),fg=globalThis!=null&&globalThis.document?$.useLayoutEffect:()=>{},Hc=e=>{const{present:t,children:r}=e,i=(function(l){const[c,f]=$.useState(),m=$.useRef({}),v=$.useRef(l),g=$.useRef("none"),p=l?"mounted":"unmounted",[b,x]=(function(d,w){return $.useReducer(((h,S)=>{const E=w[h][S];return E??h}),d)})(p,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return $.useEffect((()=>{const d=qs(m.current);g.current=b==="mounted"?d:"none"}),[b]),fg((()=>{const d=m.current,w=v.current;if(w!==l){const h=g.current,S=qs(d);l?x("MOUNT"):S==="none"||(d==null?void 0:d.display)==="none"?x("UNMOUNT"):x(w&&h!==S?"ANIMATION_OUT":"UNMOUNT"),v.current=l}}),[l,x]),fg((()=>{if(c){const d=h=>{const S=qs(m.current).includes(h.animationName);h.target===c&&S&&x("ANIMATION_END")},w=h=>{h.target===c&&(g.current=qs(m.current))};return c.addEventListener("animationstart",w),c.addEventListener("animationcancel",d),c.addEventListener("animationend",d),()=>{c.removeEventListener("animationstart",w),c.removeEventListener("animationcancel",d),c.removeEventListener("animationend",d)}}x("ANIMATION_END")}),[c,x]),{isPresent:["mounted","unmountSuspended"].includes(b),ref:$.useCallback((d=>{d&&(m.current=getComputedStyle(d)),f(d)}),[])}})(t),s=typeof r=="function"?r({present:i.isPresent}):$.Children.only(r),a=mn(i.ref,s.ref);return typeof r=="function"||i.isPresent?$.cloneElement(s,{ref:a}):null};function qs(e){return(e==null?void 0:e.animationName)||"none"}Hc.displayName="Presence";let Il=0;function aP(){$.useEffect((()=>{var e,t;const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=r[0])!==null&&e!==void 0?e:dg()),document.body.insertAdjacentElement("beforeend",(t=r[1])!==null&&t!==void 0?t:dg()),Il++,()=>{Il===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach((i=>i.remove())),Il--}}),[])}function dg(){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 uP=globalThis!=null&&globalThis.document?$.useLayoutEffect:()=>{},qc=$.forwardRef(((e,t)=>{var r,i;const{containerRef:s,style:a,...l}=e,c=(r=s==null?void 0:s.current)!==null&&r!==void 0?r:globalThis==null||(i=globalThis.document)===null||i===void 0?void 0:i.body,[,f]=$.useState({});return uP((()=>{f({})}),[]),c?Fo.createPortal($.createElement(yn.div,Ve({"data-radix-portal":""},l,{ref:t,style:c===document.body?{position:"absolute",top:0,left:0,zIndex:2147483647,...a}:void 0})),c):null}));function Bn(e){const t=$.useRef(e);return $.useEffect((()=>{t.current=e})),$.useMemo((()=>(...r)=>{var i;return(i=t.current)===null||i===void 0?void 0:i.call(t,...r)}),[])}const pg={bubbles:!1,cancelable:!0},lP=$.forwardRef(((e,t)=>{const{loop:r=!1,trapped:i=!1,onMountAutoFocus:s,onUnmountAutoFocus:a,...l}=e,[c,f]=$.useState(null),m=Bn(s),v=Bn(a),g=$.useRef(null),p=mn(t,(d=>f(d))),b=$.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;$.useEffect((()=>{if(i){let d=function(h){if(b.paused||!c)return;const S=h.target;c.contains(S)?g.current=S:kn(g.current,{select:!0})},w=function(h){!b.paused&&c&&(c.contains(h.relatedTarget)||kn(g.current,{select:!0}))};return document.addEventListener("focusin",d),document.addEventListener("focusout",w),()=>{document.removeEventListener("focusin",d),document.removeEventListener("focusout",w)}}}),[i,c,b.paused]),$.useEffect((()=>{if(c){vg.add(b);const w=document.activeElement;if(!c.contains(w)){const h=new Event("focusScope.autoFocusOnMount",pg);c.addEventListener("focusScope.autoFocusOnMount",m),c.dispatchEvent(h),h.defaultPrevented||((function(S,{select:E=!1}={}){const R=document.activeElement;for(const O of S)if(kn(O,{select:E}),document.activeElement!==R)return})((d=hg(c),d.filter((S=>S.tagName!=="A"))),{select:!0}),document.activeElement===w&&kn(c))}return()=>{c.removeEventListener("focusScope.autoFocusOnMount",m),setTimeout((()=>{const h=new Event("focusScope.autoFocusOnUnmount",pg);c.addEventListener("focusScope.autoFocusOnUnmount",v),c.dispatchEvent(h),h.defaultPrevented||kn(w??document.body,{select:!0}),c.removeEventListener("focusScope.autoFocusOnUnmount",v),vg.remove(b)}),0)}}var d}),[c,m,v,b]);const x=$.useCallback((d=>{if(!r&&!i||b.paused)return;const w=d.key==="Tab"&&!d.altKey&&!d.ctrlKey&&!d.metaKey,h=document.activeElement;if(w&&h){const S=d.currentTarget,[E,R]=(function(O){const k=hg(O),B=gg(k,O),M=gg(k.reverse(),O);return[B,M]})(S);E&&R?d.shiftKey||h!==R?d.shiftKey&&h===E&&(d.preventDefault(),r&&kn(R,{select:!0})):(d.preventDefault(),r&&kn(E,{select:!0})):h===S&&d.preventDefault()}}),[r,i,b.paused]);return $.createElement(yn.div,Ve({tabIndex:-1},l,{ref:p,onKeyDown:x}))}));function hg(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const s=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||s?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function gg(e,t){for(const r of e)if(!cP(r,{upTo:t}))return r}function cP(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function kn(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&(function(i){return i instanceof HTMLInputElement&&"select"in i})(e)&&t&&e.select()}}const vg=(function(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=mg(e,t),e.unshift(t)},remove(t){var r;e=mg(e,t),(r=e[0])===null||r===void 0||r.resume()}}})();function mg(e,t){const r=[...e],i=r.indexOf(t);return i!==-1&&r.splice(i,1),r}function $m(e){const t=Bn(e);$.useEffect((()=>{const r=i=>{i.key==="Escape"&&t(i)};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)}),[t])}const fP=globalThis!=null&&globalThis.document?$.useLayoutEffect:()=>{};let yg,Zs=0;function dP({disabled:e}){const t=$.useRef(!1);fP((()=>{if(e){let r=function(){Zs--,Zs===0&&(document.body.style.pointerEvents=yg)},i=function(s){t.current=s.pointerType!=="mouse"};return Zs===0&&(yg=document.body.style.pointerEvents),document.body.style.pointerEvents="none",Zs++,document.addEventListener("pointerup",i),()=>{t.current?document.addEventListener("click",r,{once:!0}):r(),document.removeEventListener("pointerup",i)}}}),[e])}function Ut(e,t,{checkForDefaultPrevented:r=!0}={}){return function(i){if(e==null||e(i),r===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}const pP=$.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),hP=$.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:a,onInteractOutside:l,onDismiss:c,...f}=e,m=$.useContext(pP),[v,g]=$.useState(null),[,p]=$.useState({}),b=mn(t,(k=>g(k))),x=Array.from(m.layers),[d]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),w=x.indexOf(d),h=v?x.indexOf(v):-1,S=m.layersWithOutsidePointerEventsDisabled.size>0,E=h>=w,R=(function(k){const B=Bn(k),M=$.useRef(!1);return $.useEffect((()=>{const F=j=>{j.target&&!M.current&&wg("dismissableLayer.pointerDownOutside",B,{originalEvent:j}),M.current=!1},G=window.setTimeout((()=>{document.addEventListener("pointerdown",F)}),0);return()=>{window.clearTimeout(G),document.removeEventListener("pointerdown",F)}}),[B]),{onPointerDownCapture:()=>M.current=!0}})((k=>{const B=k.target,M=[...m.branches].some((F=>F.contains(B)));E&&!M&&(s==null||s(k),l==null||l(k),k.defaultPrevented||c==null||c())})),O=(function(k){const B=Bn(k),M=$.useRef(!1);return $.useEffect((()=>{const F=G=>{G.target&&!M.current&&wg("dismissableLayer.focusOutside",B,{originalEvent:G})};return document.addEventListener("focusin",F),()=>document.removeEventListener("focusin",F)}),[B]),{onFocusCapture:()=>M.current=!0,onBlurCapture:()=>M.current=!1}})((k=>{const B=k.target;[...m.branches].some((M=>M.contains(B)))||(a==null||a(k),l==null||l(k),k.defaultPrevented||c==null||c())}));return $m((k=>{h===m.layers.size-1&&(i==null||i(k),k.defaultPrevented||c==null||c())})),dP({disabled:r}),$.useEffect((()=>{v&&(r&&m.layersWithOutsidePointerEventsDisabled.add(v),m.layers.add(v),bg())}),[v,r,m]),$.useEffect((()=>()=>{v&&(m.layers.delete(v),m.layersWithOutsidePointerEventsDisabled.delete(v),bg())}),[v,m]),$.useEffect((()=>{const k=()=>p({});return document.addEventListener("dismissableLayer.update",k),()=>document.removeEventListener("dismissableLayer.update",k)}),[]),$.createElement(yn.div,Ve({},f,{ref:b,style:{pointerEvents:S?E?"auto":"none":void 0,...e.style},onFocusCapture:Ut(e.onFocusCapture,O.onFocusCapture),onBlurCapture:Ut(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:Ut(e.onPointerDownCapture,R.onPointerDownCapture)}))}));function bg(){const e=new Event("dismissableLayer.update");document.dispatchEvent(e)}function wg(e,t,r){const i=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});return t&&i.addEventListener(e,t,{once:!0}),!i.dispatchEvent(s)}function xg(e){const[t,r]=$.useState(void 0);return $.useEffect((()=>{if(e){const i=new ResizeObserver((s=>{if(!Array.isArray(s)||!s.length)return;const a=s[0];let l,c;if("borderBoxSize"in a){const f=a.borderBoxSize,m=Array.isArray(f)?f[0]:f;l=m.inlineSize,c=m.blockSize}else{const f=e.getBoundingClientRect();l=f.width,c=f.height}r({width:l,height:c})}));return i.observe(e,{box:"border-box"}),()=>i.unobserve(e)}r(void 0)}),[e]),t}function gP(e,t){const r=$n.get(e);return r===void 0?($n.set(e,{rect:{},callbacks:[t]}),$n.size===1&&(hc=requestAnimationFrame(Im))):(r.callbacks.push(t),t(e.getBoundingClientRect())),()=>{const i=$n.get(e);if(i===void 0)return;const s=i.callbacks.indexOf(t);s>-1&&i.callbacks.splice(s,1),i.callbacks.length===0&&($n.delete(e),$n.size===0&&cancelAnimationFrame(hc))}}let hc;const $n=new Map;function Im(){const e=[];$n.forEach(((t,r)=>{const i=r.getBoundingClientRect();var s,a;s=t.rect,a=i,(s.width!==a.width||s.height!==a.height||s.top!==a.top||s.right!==a.right||s.bottom!==a.bottom||s.left!==a.left)&&(t.rect=i,e.push(t))})),e.forEach((t=>{t.callbacks.forEach((r=>r(t.rect)))})),hc=requestAnimationFrame(Im)}function Lm(e){const[t,r]=$.useState();return $.useEffect((()=>{if(e){const i=gP(e,r);return()=>{r(void 0),i()}}}),[e]),t}function Zc(e,t=[]){let r=[];const i=()=>{const s=r.map((a=>$.createContext(a)));return function(a){const l=(a==null?void 0:a[e])||s;return $.useMemo((()=>({[`__scope${e}`]:{...a,[e]:l}})),[a,l])}};return i.scopeName=e,[function(s,a){const l=$.createContext(a),c=r.length;function f(m){const{scope:v,children:g,...p}=m,b=(v==null?void 0:v[e][c])||l,x=$.useMemo((()=>p),Object.values(p));return $.createElement(b.Provider,{value:x},g)}return r=[...r,a],f.displayName=s+"Provider",[f,function(m,v){const g=(v==null?void 0:v[e][c])||l,p=$.useContext(g);if(p)return p;if(a!==void 0)return a;throw new Error(`\`${m}\` must be used within \`${s}\``)}]},vP(i,...t)]}function vP(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const i=e.map((s=>({useScope:s(),scopeName:s.scopeName})));return function(s){const a=i.reduce(((l,{useScope:c,scopeName:f})=>({...l,...c(s)[`__scope${f}`]})),{});return $.useMemo((()=>({[`__scope${t.scopeName}`]:a})),[a])}};return r.scopeName=t.scopeName,r}function mP({anchorRect:e,popperSize:t,arrowSize:r,arrowOffset:i=0,side:s,sideOffset:a=0,align:l,alignOffset:c=0,shouldAvoidCollisions:f=!0,collisionBoundariesRect:m,collisionTolerance:v=0}){if(!e||!t||!m)return{popperStyles:yP,arrowStyles:Ll};const g=(function(B,M,F=0,G=0,j){const L=j?j.height:0,U=Sg(M,B,"x"),q=Sg(M,B,"y"),C=q.before-F-L,J=q.after+F+L,X=U.before-F-L,te=U.after+F+L;return{top:{start:{x:U.start+G,y:C},center:{x:U.center,y:C},end:{x:U.end-G,y:C}},right:{start:{x:te,y:q.start+G},center:{x:te,y:q.center},end:{x:te,y:q.end-G}},bottom:{start:{x:U.start+G,y:J},center:{x:U.center,y:J},end:{x:U.end-G,y:J}},left:{start:{x:X,y:q.start+G},center:{x:X,y:q.center},end:{x:X,y:q.end-G}}}})(t,e,a,c,r),p=g[s][l];if(f===!1){const B=Eg(p);let M=Ll;return r&&(M=Og({popperSize:t,arrowSize:r,arrowOffset:i,side:s,align:l})),{popperStyles:{...B,"--radix-popper-transform-origin":_g(t,s,l,i,r)},arrowStyles:M,placedSide:s,placedAlign:l}}const b=DOMRect.fromRect({...t,...p}),x=(d=m,w=v,DOMRect.fromRect({width:d.width-2*w,height:d.height-2*w,x:d.left+w,y:d.top+w}));var d,w;const h=Tg(b,x),S=g[Ag(s)][l],E=(function(B,M,F){const G=Ag(B);return M[B]&&!F[G]?G:B})(s,h,Tg(DOMRect.fromRect({...t,...S}),x)),R=(function(B,M,F,G,j){const L=F==="top"||F==="bottom",U=L?"left":"top",q=L?"right":"bottom",C=L?"width":"height",J=M[C]>B[C];return(G==="start"||G==="center")&&(j[U]&&J||j[q]&&!J)?"end":(G==="end"||G==="center")&&(j[q]&&J||j[U]&&!J)?"start":G})(t,e,s,l,h),O=Eg(g[E][R]);let k=Ll;return r&&(k=Og({popperSize:t,arrowSize:r,arrowOffset:i,side:E,align:R})),{popperStyles:{...O,"--radix-popper-transform-origin":_g(t,E,R,i,r)},arrowStyles:k,placedSide:E,placedAlign:R}}function Sg(e,t,r){const i=e[r==="x"?"left":"top"],s=r==="x"?"width":"height",a=e[s],l=t[s];return{before:i-l,start:i,center:i+(a-l)/2,end:i+a-l,after:i+a}}function Eg(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 _g(e,t,r,i,s){const a=t==="top"||t==="bottom",l=s?s.width:0,c=s?s.height:0,f=l/2+i;let m="",v="";return a?(m={start:`${f}px`,center:"center",end:e.width-f+"px"}[r],v=t==="top"?`${e.height+c}px`:-c+"px"):(m=t==="left"?`${e.width+c}px`:-c+"px",v={start:`${f}px`,center:"center",end:e.height-f+"px"}[r]),`${m} ${v}`}const yP={position:"fixed",top:0,left:0,opacity:0,transform:"translate3d(0, -200%, 0)"},Ll={position:"absolute",opacity:0};function Og({popperSize:e,arrowSize:t,arrowOffset:r,side:i,align:s}){const a=(e.width-t.width)/2,l=(e.height-t.width)/2,c={top:0,right:90,bottom:180,left:-90}[i],f=Math.max(t.width,t.height),m={width:`${f}px`,height:`${f}px`,transform:`rotate(${c}deg)`,willChange:"transform",position:"absolute",[i]:"100%",direction:bP(i,s)};return i!=="top"&&i!=="bottom"||(s==="start"&&(m.left=`${r}px`),s==="center"&&(m.left=`${a}px`),s==="end"&&(m.right=`${r}px`)),i!=="left"&&i!=="right"||(s==="start"&&(m.top=`${r}px`),s==="center"&&(m.top=`${l}px`),s==="end"&&(m.bottom=`${r}px`)),m}function bP(e,t){return(e!=="top"&&e!=="right"||t!=="end")&&(e!=="bottom"&&e!=="left"||t==="end")?"ltr":"rtl"}function Ag(e){return{top:"bottom",right:"left",bottom:"top",left:"right"}[e]}function Tg(e,t){return{top:e.top<t.top,right:e.right>t.right,bottom:e.bottom>t.bottom,left:e.left<t.left}}const[Mm,Fa]=Zc("Popper"),[wP,Fm]=Mm("Popper"),xP=e=>{const{__scopePopper:t,children:r}=e,[i,s]=$.useState(null);return $.createElement(wP,{scope:t,anchor:i,onAnchorChange:s},r)},SP=$.forwardRef(((e,t)=>{const{__scopePopper:r,virtualRef:i,...s}=e,a=Fm("PopperAnchor",r),l=$.useRef(null),c=mn(t,l);return $.useEffect((()=>{a.onAnchorChange((i==null?void 0:i.current)||l.current)})),i?null:$.createElement(yn.div,Ve({},s,{ref:c}))})),[EP,QL]=Mm("PopperContent"),_P=$.forwardRef(((e,t)=>{const{__scopePopper:r,side:i="bottom",sideOffset:s,align:a="center",alignOffset:l,collisionTolerance:c,avoidCollisions:f=!0,...m}=e,v=Fm("PopperContent",r),[g,p]=$.useState(),b=Lm(v.anchor),[x,d]=$.useState(null),w=xg(x),[h,S]=$.useState(null),E=xg(h),R=mn(t,(L=>d(L))),O=(function(){const[L,U]=$.useState(void 0);return $.useEffect((()=>{let q;function C(){U({width:window.innerWidth,height:window.innerHeight})}function J(){window.clearTimeout(q),q=window.setTimeout(C,100)}return C(),window.addEventListener("resize",J),()=>window.removeEventListener("resize",J)}),[]),L})(),k=O?DOMRect.fromRect({...O,x:0,y:0}):void 0,{popperStyles:B,arrowStyles:M,placedSide:F,placedAlign:G}=mP({anchorRect:b,popperSize:w,arrowSize:E,arrowOffset:g,side:i,sideOffset:s,align:a,alignOffset:l,shouldAvoidCollisions:f,collisionBoundariesRect:k,collisionTolerance:c}),j=F!==void 0;return $.createElement("div",{style:B,"data-radix-popper-content-wrapper":""},$.createElement(EP,{scope:r,arrowStyles:M,onArrowChange:S,onArrowOffsetChange:p},$.createElement(yn.div,Ve({"data-side":F,"data-align":G},m,{style:{...m.style,animation:j?void 0:"none"},ref:R}))))})),Dm=xP,Nm=SP,jm=_P;function zm({prop:e,defaultProp:t,onChange:r=(()=>{})}){const[i,s]=(function({defaultProp:f,onChange:m}){const v=$.useState(f),[g]=v,p=$.useRef(g),b=Bn(m);return $.useEffect((()=>{p.current!==g&&(b(g),p.current=g)}),[g,p,b]),v})({defaultProp:t,onChange:r}),a=e!==void 0,l=a?e:i,c=Bn(r);return[l,$.useCallback((f=>{if(a){const m=f,v=typeof f=="function"?m(e):f;v!==e&&c(v)}else s(f)}),[a,e,s,c])]}const[OP]=Zc("Popover",[Fa]),Gc=Fa(),[AP,jo]=OP("Popover"),TP=e=>{const{__scopePopover:t,children:r,open:i,defaultOpen:s,onOpenChange:a,modal:l=!1}=e,c=Gc(t),f=$.useRef(null),[m,v]=$.useState(!1),[g=!1,p]=zm({prop:i,defaultProp:s,onChange:a});return $.createElement(Dm,c,$.createElement(AP,{scope:t,contentId:Rm(),triggerRef:f,open:g,onOpenChange:p,onOpenToggle:$.useCallback((()=>p((b=>!b))),[p]),hasCustomAnchor:m,onCustomAnchorAdd:$.useCallback((()=>v(!0)),[]),onCustomAnchorRemove:$.useCallback((()=>v(!1)),[]),modal:l},r))},RP=$.forwardRef(((e,t)=>{const{__scopePopover:r,...i}=e,s=jo("PopoverTrigger",r),a=Gc(r),l=mn(t,s.triggerRef),c=$.createElement(yn.button,Ve({type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":Bm(s.open)},i,{ref:l,onClick:Ut(e.onClick,s.onOpenToggle)}));return s.hasCustomAnchor?c:$.createElement(Nm,Ve({asChild:!0},a),c)})),PP=$.forwardRef(((e,t)=>{const{forceMount:r,...i}=e,s=jo("PopoverContent",e.__scopePopover);return $.createElement(Hc,{present:r||s.open},s.modal?$.createElement(CP,Ve({},i,{ref:t})):$.createElement(kP,Ve({},i,{ref:t})))})),CP=$.forwardRef(((e,t)=>{const{allowPinchZoom:r,portalled:i=!0,...s}=e,a=jo("PopoverContent",e.__scopePopover),l=$.useRef(null),c=mn(t,l),f=$.useRef(!1);$.useEffect((()=>{const v=l.current;if(v)return xR(v)}),[]);const m=i?qc:$.Fragment;return $.createElement(m,null,$.createElement(Tm,{allowPinchZoom:r},$.createElement(Wm,Ve({},s,{ref:c,trapFocus:a.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ut(e.onCloseAutoFocus,(v=>{var g;v.preventDefault(),f.current||(g=a.triggerRef.current)===null||g===void 0||g.focus()})),onPointerDownOutside:Ut(e.onPointerDownOutside,(v=>{const g=v.detail.originalEvent,p=g.button===0&&g.ctrlKey===!0,b=g.button===2||p;f.current=b}),{checkForDefaultPrevented:!1}),onFocusOutside:Ut(e.onFocusOutside,(v=>v.preventDefault()),{checkForDefaultPrevented:!1})}))))})),kP=$.forwardRef(((e,t)=>{const{portalled:r=!0,...i}=e,s=jo("PopoverContent",e.__scopePopover),a=$.useRef(!1),l=r?qc:$.Fragment;return $.createElement(l,null,$.createElement(Wm,Ve({},i,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:c=>{var f,m;(f=e.onCloseAutoFocus)===null||f===void 0||f.call(e,c),c.defaultPrevented||(a.current||(m=s.triggerRef.current)===null||m===void 0||m.focus(),c.preventDefault()),a.current=!1},onInteractOutside:c=>{var f,m;(f=e.onInteractOutside)===null||f===void 0||f.call(e,c),c.defaultPrevented||(a.current=!0);const v=c.target;!((m=s.triggerRef.current)===null||m===void 0)&&m.contains(v)&&c.preventDefault()}})))})),Wm=$.forwardRef(((e,t)=>{const{__scopePopover:r,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:l,onEscapeKeyDown:c,onPointerDownOutside:f,onFocusOutside:m,onInteractOutside:v,...g}=e,p=jo("PopoverContent",r),b=Gc(r);return aP(),$.createElement(lP,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:s,onUnmountAutoFocus:a},$.createElement(hP,{asChild:!0,disableOutsidePointerEvents:l,onInteractOutside:v,onEscapeKeyDown:c,onPointerDownOutside:f,onFocusOutside:m,onDismiss:()=>p.onOpenChange(!1)},$.createElement(jm,Ve({"data-state":Bm(p.open),role:"dialog",id:p.contentId},b,g,{ref:t,style:{...g.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)"}}))))}));function Bm(e){return e?"open":"closed"}const $P=TP,IP=RP,LP=PP;var ca=(e=>(e.VIDEO="video",e.CAROUSEL="carousel",e.TEXT="text",e))(ca||{}),Ml={},ro={},Gs={},Ks={},Vs={exports:{}},Xs={exports:{}},Ie={};/** @license React v16.13.1
62
+ `)},vP=0,vi=[];function yP(e){var t=$.useRef([]),r=$.useRef([0,0]),i=$.useRef(),s=$.useState(vP++)[0],a=$.useState(Mv)[0],u=$.useRef(e);$.useEffect(function(){u.current=e},[e]),$.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var d=Sa([e.lockRef.current],(e.shards||[]).map(bg),!0).filter(Boolean);return d.forEach(function(b){return b.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),d.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var c=$.useCallback(function(d,b){if("touches"in d&&d.touches.length===2||d.type==="wheel"&&d.ctrlKey)return!u.current.allowPinchZoom;var m=Vs(d),S=r.current,E="deltaX"in d?d.deltaX:S[0]-m[0],R="deltaY"in d?d.deltaY:S[1]-m[1],O,k=d.target,W=Math.abs(E)>Math.abs(R)?"h":"v";if("touches"in d&&W==="h"&&k.type==="range")return!1;var M=yg(W,k);if(!M)return!0;if(M?O=W:(O=W==="v"?"h":"v",M=yg(W,k)),!M)return!1;if(!i.current&&"changedTouches"in d&&(E||R)&&(i.current=O),!O)return!0;var F=i.current||O;return hP(F,b,d,F==="h"?E:R)},[]),f=$.useCallback(function(d){var b=d;if(!(!vi.length||vi[vi.length-1]!==a)){var m="deltaY"in b?wg(b):Vs(b),S=t.current.filter(function(O){return O.name===b.type&&(O.target===b.target||b.target===O.shadowParent)&&gP(O.delta,m)})[0];if(S&&S.should){b.cancelable&&b.preventDefault();return}if(!S){var E=(u.current.shards||[]).map(bg).filter(Boolean).filter(function(O){return O.contains(b.target)}),R=E.length>0?c(b,E[0]):!u.current.noIsolation;R&&b.cancelable&&b.preventDefault()}}},[]),g=$.useCallback(function(d,b,m,S){var E={name:d,delta:b,target:m,should:S,shadowParent:wP(m)};t.current.push(E),setTimeout(function(){t.current=t.current.filter(function(R){return R!==E})},1)},[]),h=$.useCallback(function(d){r.current=Vs(d),i.current=void 0},[]),v=$.useCallback(function(d){g(d.type,wg(d),d.target,c(d,e.lockRef.current))},[]),p=$.useCallback(function(d){g(d.type,Vs(d),d.target,c(d,e.lockRef.current))},[]);$.useEffect(function(){return vi.push(a),e.setCallbacks({onScrollCapture:v,onWheelCapture:v,onTouchMoveCapture:p}),document.addEventListener("wheel",f,mi),document.addEventListener("touchmove",f,mi),document.addEventListener("touchstart",h,mi),function(){vi=vi.filter(function(d){return d!==a}),document.removeEventListener("wheel",f,mi),document.removeEventListener("touchmove",f,mi),document.removeEventListener("touchstart",h,mi)}},[]);var y=e.removeScrollBar,x=e.inert;return $.createElement($.Fragment,null,x?$.createElement(a,{styles:mP(s)}):null,y?$.createElement(aP,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function wP(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const bP=KR(Lv,yP);var jv=$.forwardRef(function(e,t){return $.createElement(Wa,Rr({},e,{ref:t,sideCar:bP}))});jv.classNames=Wa.classNames;const xP=globalThis!=null&&globalThis.document?$.useLayoutEffect:()=>{},SP=$.useId||(()=>{});let EP=0;function zv(e){const[t,r]=$.useState(SP());return xP((()=>{r((i=>i??String(EP++)))}),[e]),e||(t?`radix-${t}`:"")}function Bv(...e){return t=>e.forEach((r=>(function(i,s){typeof i=="function"?i(s):i!=null&&(i.current=s)})(r,t)))}function xn(...e){return $.useCallback(Bv(...e),e)}const Wv=$.forwardRef(((e,t)=>{const{children:r,...i}=e;return $.Children.toArray(r).some(xg)?$.createElement($.Fragment,null,$.Children.map(r,(s=>xg(s)?$.createElement(Sc,Qe({},i,{ref:t}),s.props.children):s))):$.createElement(Sc,Qe({},i,{ref:t}),r)}));Wv.displayName="Slot";const Sc=$.forwardRef(((e,t)=>{const{children:r,...i}=e;return $.isValidElement(r)?$.cloneElement(r,{..._P(i,r.props),ref:Bv(t,r.ref)}):$.Children.count(r)>1?$.Children.only(null):null}));Sc.displayName="SlotClone";const Hv=({children:e})=>$.createElement($.Fragment,null,e);function xg(e){return $.isValidElement(e)&&e.type===Hv}function _P(e,t){const r={...t};for(const i in t){const s=e[i],a=t[i];/^on[A-Z]/.test(i)?r[i]=(...u)=>{a==null||a(...u),s==null||s(...u)}:i==="style"?r[i]={...s,...a}:i==="className"&&(r[i]=[s,a].filter(Boolean).join(" "))}return{...e,...r}}const Sn=["a","button","div","h2","h3","img","li","nav","ol","p","span","svg","ul"].reduce(((e,t)=>({...e,[t]:$.forwardRef(((r,i)=>{const{asChild:s,...a}=r,u=s?Wv:t;return $.useEffect((()=>{window[Symbol.for("radix-ui")]=!0}),[]),$.createElement(u,Qe({},a,{ref:i}))}))})),{}),Sg=globalThis!=null&&globalThis.document?$.useLayoutEffect:()=>{},Qc=e=>{const{present:t,children:r}=e,i=(function(u){const[c,f]=$.useState(),g=$.useRef({}),h=$.useRef(u),v=$.useRef("none"),p=u?"mounted":"unmounted",[y,x]=(function(d,b){return $.useReducer(((m,S)=>{const E=b[m][S];return E??m}),d)})(p,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return $.useEffect((()=>{const d=Ys(g.current);v.current=y==="mounted"?d:"none"}),[y]),Sg((()=>{const d=g.current,b=h.current;if(b!==u){const m=v.current,S=Ys(d);u?x("MOUNT"):S==="none"||(d==null?void 0:d.display)==="none"?x("UNMOUNT"):x(b&&m!==S?"ANIMATION_OUT":"UNMOUNT"),h.current=u}}),[u,x]),Sg((()=>{if(c){const d=m=>{const S=Ys(g.current).includes(m.animationName);m.target===c&&S&&x("ANIMATION_END")},b=m=>{m.target===c&&(v.current=Ys(g.current))};return c.addEventListener("animationstart",b),c.addEventListener("animationcancel",d),c.addEventListener("animationend",d),()=>{c.removeEventListener("animationstart",b),c.removeEventListener("animationcancel",d),c.removeEventListener("animationend",d)}}x("ANIMATION_END")}),[c,x]),{isPresent:["mounted","unmountSuspended"].includes(y),ref:$.useCallback((d=>{d&&(g.current=getComputedStyle(d)),f(d)}),[])}})(t),s=typeof r=="function"?r({present:i.isPresent}):$.Children.only(r),a=xn(i.ref,s.ref);return typeof r=="function"||i.isPresent?$.cloneElement(s,{ref:a}):null};function Ys(e){return(e==null?void 0:e.animationName)||"none"}Qc.displayName="Presence";let Wl=0;function OP(){$.useEffect((()=>{var e,t;const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=r[0])!==null&&e!==void 0?e:Eg()),document.body.insertAdjacentElement("beforeend",(t=r[1])!==null&&t!==void 0?t:Eg()),Wl++,()=>{Wl===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach((i=>i.remove())),Wl--}}),[])}function Eg(){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 TP=globalThis!=null&&globalThis.document?$.useLayoutEffect:()=>{},ef=$.forwardRef(((e,t)=>{var r,i;const{containerRef:s,style:a,...u}=e,c=(r=s==null?void 0:s.current)!==null&&r!==void 0?r:globalThis==null||(i=globalThis.document)===null||i===void 0?void 0:i.body,[,f]=$.useState({});return TP((()=>{f({})}),[]),c?Pi.createPortal($.createElement(Sn.div,Qe({"data-radix-portal":""},u,{ref:t,style:c===document.body?{position:"absolute",top:0,left:0,zIndex:2147483647,...a}:void 0})),c):null}));function Gn(e){const t=$.useRef(e);return $.useEffect((()=>{t.current=e})),$.useMemo((()=>(...r)=>{var i;return(i=t.current)===null||i===void 0?void 0:i.call(t,...r)}),[])}const _g={bubbles:!1,cancelable:!0},AP=$.forwardRef(((e,t)=>{const{loop:r=!1,trapped:i=!1,onMountAutoFocus:s,onUnmountAutoFocus:a,...u}=e,[c,f]=$.useState(null),g=Gn(s),h=Gn(a),v=$.useRef(null),p=xn(t,(d=>f(d))),y=$.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;$.useEffect((()=>{if(i){let d=function(m){if(y.paused||!c)return;const S=m.target;c.contains(S)?v.current=S:Mn(v.current,{select:!0})},b=function(m){!y.paused&&c&&(c.contains(m.relatedTarget)||Mn(v.current,{select:!0}))};return document.addEventListener("focusin",d),document.addEventListener("focusout",b),()=>{document.removeEventListener("focusin",d),document.removeEventListener("focusout",b)}}}),[i,c,y.paused]),$.useEffect((()=>{if(c){Ag.add(y);const b=document.activeElement;if(!c.contains(b)){const m=new Event("focusScope.autoFocusOnMount",_g);c.addEventListener("focusScope.autoFocusOnMount",g),c.dispatchEvent(m),m.defaultPrevented||((function(S,{select:E=!1}={}){const R=document.activeElement;for(const O of S)if(Mn(O,{select:E}),document.activeElement!==R)return})((d=Og(c),d.filter((S=>S.tagName!=="A"))),{select:!0}),document.activeElement===b&&Mn(c))}return()=>{c.removeEventListener("focusScope.autoFocusOnMount",g),setTimeout((()=>{const m=new Event("focusScope.autoFocusOnUnmount",_g);c.addEventListener("focusScope.autoFocusOnUnmount",h),c.dispatchEvent(m),m.defaultPrevented||Mn(b??document.body,{select:!0}),c.removeEventListener("focusScope.autoFocusOnUnmount",h),Ag.remove(y)}),0)}}var d}),[c,g,h,y]);const x=$.useCallback((d=>{if(!r&&!i||y.paused)return;const b=d.key==="Tab"&&!d.altKey&&!d.ctrlKey&&!d.metaKey,m=document.activeElement;if(b&&m){const S=d.currentTarget,[E,R]=(function(O){const k=Og(O),W=Tg(k,O),M=Tg(k.reverse(),O);return[W,M]})(S);E&&R?d.shiftKey||m!==R?d.shiftKey&&m===E&&(d.preventDefault(),r&&Mn(R,{select:!0})):(d.preventDefault(),r&&Mn(E,{select:!0})):m===S&&d.preventDefault()}}),[r,i,y.paused]);return $.createElement(Sn.div,Qe({tabIndex:-1},u,{ref:p,onKeyDown:x}))}));function Og(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const s=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||s?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Tg(e,t){for(const r of e)if(!RP(r,{upTo:t}))return r}function RP(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Mn(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&(function(i){return i instanceof HTMLInputElement&&"select"in i})(e)&&t&&e.select()}}const Ag=(function(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=Rg(e,t),e.unshift(t)},remove(t){var r;e=Rg(e,t),(r=e[0])===null||r===void 0||r.resume()}}})();function Rg(e,t){const r=[...e],i=r.indexOf(t);return i!==-1&&r.splice(i,1),r}function Uv(e){const t=Gn(e);$.useEffect((()=>{const r=i=>{i.key==="Escape"&&t(i)};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)}),[t])}const PP=globalThis!=null&&globalThis.document?$.useLayoutEffect:()=>{};let Pg,Xs=0;function CP({disabled:e}){const t=$.useRef(!1);PP((()=>{if(e){let r=function(){Xs--,Xs===0&&(document.body.style.pointerEvents=Pg)},i=function(s){t.current=s.pointerType!=="mouse"};return Xs===0&&(Pg=document.body.style.pointerEvents),document.body.style.pointerEvents="none",Xs++,document.addEventListener("pointerup",i),()=>{t.current?document.addEventListener("click",r,{once:!0}):r(),document.removeEventListener("pointerup",i)}}}),[e])}function qt(e,t,{checkForDefaultPrevented:r=!0}={}){return function(i){if(e==null||e(i),r===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}const kP=$.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),$P=$.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:a,onInteractOutside:u,onDismiss:c,...f}=e,g=$.useContext(kP),[h,v]=$.useState(null),[,p]=$.useState({}),y=xn(t,(k=>v(k))),x=Array.from(g.layers),[d]=[...g.layersWithOutsidePointerEventsDisabled].slice(-1),b=x.indexOf(d),m=h?x.indexOf(h):-1,S=g.layersWithOutsidePointerEventsDisabled.size>0,E=m>=b,R=(function(k){const W=Gn(k),M=$.useRef(!1);return $.useEffect((()=>{const F=j=>{j.target&&!M.current&&kg("dismissableLayer.pointerDownOutside",W,{originalEvent:j}),M.current=!1},G=window.setTimeout((()=>{document.addEventListener("pointerdown",F)}),0);return()=>{window.clearTimeout(G),document.removeEventListener("pointerdown",F)}}),[W]),{onPointerDownCapture:()=>M.current=!0}})((k=>{const W=k.target,M=[...g.branches].some((F=>F.contains(W)));E&&!M&&(s==null||s(k),u==null||u(k),k.defaultPrevented||c==null||c())})),O=(function(k){const W=Gn(k),M=$.useRef(!1);return $.useEffect((()=>{const F=G=>{G.target&&!M.current&&kg("dismissableLayer.focusOutside",W,{originalEvent:G})};return document.addEventListener("focusin",F),()=>document.removeEventListener("focusin",F)}),[W]),{onFocusCapture:()=>M.current=!0,onBlurCapture:()=>M.current=!1}})((k=>{const W=k.target;[...g.branches].some((M=>M.contains(W)))||(a==null||a(k),u==null||u(k),k.defaultPrevented||c==null||c())}));return Uv((k=>{m===g.layers.size-1&&(i==null||i(k),k.defaultPrevented||c==null||c())})),CP({disabled:r}),$.useEffect((()=>{h&&(r&&g.layersWithOutsidePointerEventsDisabled.add(h),g.layers.add(h),Cg())}),[h,r,g]),$.useEffect((()=>()=>{h&&(g.layers.delete(h),g.layersWithOutsidePointerEventsDisabled.delete(h),Cg())}),[h,g]),$.useEffect((()=>{const k=()=>p({});return document.addEventListener("dismissableLayer.update",k),()=>document.removeEventListener("dismissableLayer.update",k)}),[]),$.createElement(Sn.div,Qe({},f,{ref:y,style:{pointerEvents:S?E?"auto":"none":void 0,...e.style},onFocusCapture:qt(e.onFocusCapture,O.onFocusCapture),onBlurCapture:qt(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:qt(e.onPointerDownCapture,R.onPointerDownCapture)}))}));function Cg(){const e=new Event("dismissableLayer.update");document.dispatchEvent(e)}function kg(e,t,r){const i=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});return t&&i.addEventListener(e,t,{once:!0}),!i.dispatchEvent(s)}function $g(e){const[t,r]=$.useState(void 0);return $.useEffect((()=>{if(e){const i=new ResizeObserver((s=>{if(!Array.isArray(s)||!s.length)return;const a=s[0];let u,c;if("borderBoxSize"in a){const f=a.borderBoxSize,g=Array.isArray(f)?f[0]:f;u=g.inlineSize,c=g.blockSize}else{const f=e.getBoundingClientRect();u=f.width,c=f.height}r({width:u,height:c})}));return i.observe(e,{box:"border-box"}),()=>i.unobserve(e)}r(void 0)}),[e]),t}function IP(e,t){const r=Dn.get(e);return r===void 0?(Dn.set(e,{rect:{},callbacks:[t]}),Dn.size===1&&(Ec=requestAnimationFrame(qv))):(r.callbacks.push(t),t(e.getBoundingClientRect())),()=>{const i=Dn.get(e);if(i===void 0)return;const s=i.callbacks.indexOf(t);s>-1&&i.callbacks.splice(s,1),i.callbacks.length===0&&(Dn.delete(e),Dn.size===0&&cancelAnimationFrame(Ec))}}let Ec;const Dn=new Map;function qv(){const e=[];Dn.forEach(((t,r)=>{const i=r.getBoundingClientRect();var s,a;s=t.rect,a=i,(s.width!==a.width||s.height!==a.height||s.top!==a.top||s.right!==a.right||s.bottom!==a.bottom||s.left!==a.left)&&(t.rect=i,e.push(t))})),e.forEach((t=>{t.callbacks.forEach((r=>r(t.rect)))})),Ec=requestAnimationFrame(qv)}function Zv(e){const[t,r]=$.useState();return $.useEffect((()=>{if(e){const i=IP(e,r);return()=>{r(void 0),i()}}}),[e]),t}function tf(e,t=[]){let r=[];const i=()=>{const s=r.map((a=>$.createContext(a)));return function(a){const u=(a==null?void 0:a[e])||s;return $.useMemo((()=>({[`__scope${e}`]:{...a,[e]:u}})),[a,u])}};return i.scopeName=e,[function(s,a){const u=$.createContext(a),c=r.length;function f(g){const{scope:h,children:v,...p}=g,y=(h==null?void 0:h[e][c])||u,x=$.useMemo((()=>p),Object.values(p));return $.createElement(y.Provider,{value:x},v)}return r=[...r,a],f.displayName=s+"Provider",[f,function(g,h){const v=(h==null?void 0:h[e][c])||u,p=$.useContext(v);if(p)return p;if(a!==void 0)return a;throw new Error(`\`${g}\` must be used within \`${s}\``)}]},LP(i,...t)]}function LP(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const i=e.map((s=>({useScope:s(),scopeName:s.scopeName})));return function(s){const a=i.reduce(((u,{useScope:c,scopeName:f})=>({...u,...c(s)[`__scope${f}`]})),{});return $.useMemo((()=>({[`__scope${t.scopeName}`]:a})),[a])}};return r.scopeName=t.scopeName,r}function MP({anchorRect:e,popperSize:t,arrowSize:r,arrowOffset:i=0,side:s,sideOffset:a=0,align:u,alignOffset:c=0,shouldAvoidCollisions:f=!0,collisionBoundariesRect:g,collisionTolerance:h=0}){if(!e||!t||!g)return{popperStyles:DP,arrowStyles:Hl};const v=(function(W,M,F=0,G=0,j){const L=j?j.height:0,H=Ig(M,W,"x"),q=Ig(M,W,"y"),C=q.before-F-L,J=q.after+F+L,Y=H.before-F-L,te=H.after+F+L;return{top:{start:{x:H.start+G,y:C},center:{x:H.center,y:C},end:{x:H.end-G,y:C}},right:{start:{x:te,y:q.start+G},center:{x:te,y:q.center},end:{x:te,y:q.end-G}},bottom:{start:{x:H.start+G,y:J},center:{x:H.center,y:J},end:{x:H.end-G,y:J}},left:{start:{x:Y,y:q.start+G},center:{x:Y,y:q.center},end:{x:Y,y:q.end-G}}}})(t,e,a,c,r),p=v[s][u];if(f===!1){const W=Lg(p);let M=Hl;return r&&(M=Dg({popperSize:t,arrowSize:r,arrowOffset:i,side:s,align:u})),{popperStyles:{...W,"--radix-popper-transform-origin":Mg(t,s,u,i,r)},arrowStyles:M,placedSide:s,placedAlign:u}}const y=DOMRect.fromRect({...t,...p}),x=(d=g,b=h,DOMRect.fromRect({width:d.width-2*b,height:d.height-2*b,x:d.left+b,y:d.top+b}));var d,b;const m=Ng(y,x),S=v[Fg(s)][u],E=(function(W,M,F){const G=Fg(W);return M[W]&&!F[G]?G:W})(s,m,Ng(DOMRect.fromRect({...t,...S}),x)),R=(function(W,M,F,G,j){const L=F==="top"||F==="bottom",H=L?"left":"top",q=L?"right":"bottom",C=L?"width":"height",J=M[C]>W[C];return(G==="start"||G==="center")&&(j[H]&&J||j[q]&&!J)?"end":(G==="end"||G==="center")&&(j[q]&&J||j[H]&&!J)?"start":G})(t,e,s,u,m),O=Lg(v[E][R]);let k=Hl;return r&&(k=Dg({popperSize:t,arrowSize:r,arrowOffset:i,side:E,align:R})),{popperStyles:{...O,"--radix-popper-transform-origin":Mg(t,E,R,i,r)},arrowStyles:k,placedSide:E,placedAlign:R}}function Ig(e,t,r){const i=e[r==="x"?"left":"top"],s=r==="x"?"width":"height",a=e[s],u=t[s];return{before:i-u,start:i,center:i+(a-u)/2,end:i+a-u,after:i+a}}function Lg(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 Mg(e,t,r,i,s){const a=t==="top"||t==="bottom",u=s?s.width:0,c=s?s.height:0,f=u/2+i;let g="",h="";return a?(g={start:`${f}px`,center:"center",end:e.width-f+"px"}[r],h=t==="top"?`${e.height+c}px`:-c+"px"):(g=t==="left"?`${e.width+c}px`:-c+"px",h={start:`${f}px`,center:"center",end:e.height-f+"px"}[r]),`${g} ${h}`}const DP={position:"fixed",top:0,left:0,opacity:0,transform:"translate3d(0, -200%, 0)"},Hl={position:"absolute",opacity:0};function Dg({popperSize:e,arrowSize:t,arrowOffset:r,side:i,align:s}){const a=(e.width-t.width)/2,u=(e.height-t.width)/2,c={top:0,right:90,bottom:180,left:-90}[i],f=Math.max(t.width,t.height),g={width:`${f}px`,height:`${f}px`,transform:`rotate(${c}deg)`,willChange:"transform",position:"absolute",[i]:"100%",direction:FP(i,s)};return i!=="top"&&i!=="bottom"||(s==="start"&&(g.left=`${r}px`),s==="center"&&(g.left=`${a}px`),s==="end"&&(g.right=`${r}px`)),i!=="left"&&i!=="right"||(s==="start"&&(g.top=`${r}px`),s==="center"&&(g.top=`${u}px`),s==="end"&&(g.bottom=`${r}px`)),g}function FP(e,t){return(e!=="top"&&e!=="right"||t!=="end")&&(e!=="bottom"&&e!=="left"||t==="end")?"ltr":"rtl"}function Fg(e){return{top:"bottom",right:"left",bottom:"top",left:"right"}[e]}function Ng(e,t){return{top:e.top<t.top,right:e.right>t.right,bottom:e.bottom>t.bottom,left:e.left<t.left}}const[Gv,Ha]=tf("Popper"),[NP,Kv]=Gv("Popper"),jP=e=>{const{__scopePopper:t,children:r}=e,[i,s]=$.useState(null);return $.createElement(NP,{scope:t,anchor:i,onAnchorChange:s},r)},zP=$.forwardRef(((e,t)=>{const{__scopePopper:r,virtualRef:i,...s}=e,a=Kv("PopperAnchor",r),u=$.useRef(null),c=xn(t,u);return $.useEffect((()=>{a.onAnchorChange((i==null?void 0:i.current)||u.current)})),i?null:$.createElement(Sn.div,Qe({},s,{ref:c}))})),[BP,z2]=Gv("PopperContent"),WP=$.forwardRef(((e,t)=>{const{__scopePopper:r,side:i="bottom",sideOffset:s,align:a="center",alignOffset:u,collisionTolerance:c,avoidCollisions:f=!0,...g}=e,h=Kv("PopperContent",r),[v,p]=$.useState(),y=Zv(h.anchor),[x,d]=$.useState(null),b=$g(x),[m,S]=$.useState(null),E=$g(m),R=xn(t,(L=>d(L))),O=(function(){const[L,H]=$.useState(void 0);return $.useEffect((()=>{let q;function C(){H({width:window.innerWidth,height:window.innerHeight})}function J(){window.clearTimeout(q),q=window.setTimeout(C,100)}return C(),window.addEventListener("resize",J),()=>window.removeEventListener("resize",J)}),[]),L})(),k=O?DOMRect.fromRect({...O,x:0,y:0}):void 0,{popperStyles:W,arrowStyles:M,placedSide:F,placedAlign:G}=MP({anchorRect:y,popperSize:b,arrowSize:E,arrowOffset:v,side:i,sideOffset:s,align:a,alignOffset:u,shouldAvoidCollisions:f,collisionBoundariesRect:k,collisionTolerance:c}),j=F!==void 0;return $.createElement("div",{style:W,"data-radix-popper-content-wrapper":""},$.createElement(BP,{scope:r,arrowStyles:M,onArrowChange:S,onArrowOffsetChange:p},$.createElement(Sn.div,Qe({"data-side":F,"data-align":G},g,{style:{...g.style,animation:j?void 0:"none"},ref:R}))))})),Vv=jP,Yv=zP,Xv=WP;function Jv({prop:e,defaultProp:t,onChange:r=(()=>{})}){const[i,s]=(function({defaultProp:f,onChange:g}){const h=$.useState(f),[v]=h,p=$.useRef(v),y=Gn(g);return $.useEffect((()=>{p.current!==v&&(y(v),p.current=v)}),[v,p,y]),h})({defaultProp:t,onChange:r}),a=e!==void 0,u=a?e:i,c=Gn(r);return[u,$.useCallback((f=>{if(a){const g=f,h=typeof f=="function"?g(e):f;h!==e&&c(h)}else s(f)}),[a,e,s,c])]}const[HP]=tf("Popover",[Ha]),rf=Ha(),[UP,Uo]=HP("Popover"),qP=e=>{const{__scopePopover:t,children:r,open:i,defaultOpen:s,onOpenChange:a,modal:u=!1}=e,c=rf(t),f=$.useRef(null),[g,h]=$.useState(!1),[v=!1,p]=Jv({prop:i,defaultProp:s,onChange:a});return $.createElement(Vv,c,$.createElement(UP,{scope:t,contentId:zv(),triggerRef:f,open:v,onOpenChange:p,onOpenToggle:$.useCallback((()=>p((y=>!y))),[p]),hasCustomAnchor:g,onCustomAnchorAdd:$.useCallback((()=>h(!0)),[]),onCustomAnchorRemove:$.useCallback((()=>h(!1)),[]),modal:u},r))},ZP=$.forwardRef(((e,t)=>{const{__scopePopover:r,...i}=e,s=Uo("PopoverTrigger",r),a=rf(r),u=xn(t,s.triggerRef),c=$.createElement(Sn.button,Qe({type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":ey(s.open)},i,{ref:u,onClick:qt(e.onClick,s.onOpenToggle)}));return s.hasCustomAnchor?c:$.createElement(Yv,Qe({asChild:!0},a),c)})),GP=$.forwardRef(((e,t)=>{const{forceMount:r,...i}=e,s=Uo("PopoverContent",e.__scopePopover);return $.createElement(Qc,{present:r||s.open},s.modal?$.createElement(KP,Qe({},i,{ref:t})):$.createElement(VP,Qe({},i,{ref:t})))})),KP=$.forwardRef(((e,t)=>{const{allowPinchZoom:r,portalled:i=!0,...s}=e,a=Uo("PopoverContent",e.__scopePopover),u=$.useRef(null),c=xn(t,u),f=$.useRef(!1);$.useEffect((()=>{const h=u.current;if(h)return jR(h)}),[]);const g=i?ef:$.Fragment;return $.createElement(g,null,$.createElement(jv,{allowPinchZoom:r},$.createElement(Qv,Qe({},s,{ref:c,trapFocus:a.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:qt(e.onCloseAutoFocus,(h=>{var v;h.preventDefault(),f.current||(v=a.triggerRef.current)===null||v===void 0||v.focus()})),onPointerDownOutside:qt(e.onPointerDownOutside,(h=>{const v=h.detail.originalEvent,p=v.button===0&&v.ctrlKey===!0,y=v.button===2||p;f.current=y}),{checkForDefaultPrevented:!1}),onFocusOutside:qt(e.onFocusOutside,(h=>h.preventDefault()),{checkForDefaultPrevented:!1})}))))})),VP=$.forwardRef(((e,t)=>{const{portalled:r=!0,...i}=e,s=Uo("PopoverContent",e.__scopePopover),a=$.useRef(!1),u=r?ef:$.Fragment;return $.createElement(u,null,$.createElement(Qv,Qe({},i,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:c=>{var f,g;(f=e.onCloseAutoFocus)===null||f===void 0||f.call(e,c),c.defaultPrevented||(a.current||(g=s.triggerRef.current)===null||g===void 0||g.focus(),c.preventDefault()),a.current=!1},onInteractOutside:c=>{var f,g;(f=e.onInteractOutside)===null||f===void 0||f.call(e,c),c.defaultPrevented||(a.current=!0);const h=c.target;!((g=s.triggerRef.current)===null||g===void 0)&&g.contains(h)&&c.preventDefault()}})))})),Qv=$.forwardRef(((e,t)=>{const{__scopePopover:r,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:u,onEscapeKeyDown:c,onPointerDownOutside:f,onFocusOutside:g,onInteractOutside:h,...v}=e,p=Uo("PopoverContent",r),y=rf(r);return OP(),$.createElement(AP,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:s,onUnmountAutoFocus:a},$.createElement($P,{asChild:!0,disableOutsidePointerEvents:u,onInteractOutside:h,onEscapeKeyDown:c,onPointerDownOutside:f,onFocusOutside:g,onDismiss:()=>p.onOpenChange(!1)},$.createElement(Xv,Qe({"data-state":ey(p.open),role:"dialog",id:p.contentId},y,v,{ref:t,style:{...v.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)"}}))))}));function ey(e){return e?"open":"closed"}const YP=qP,XP=ZP,JP=GP;var ga=(e=>(e.VIDEO="video",e.CAROUSEL="carousel",e.TEXT="text",e))(ga||{}),Ul={},uo={},Js={},Qs={},ea={exports:{}},ta={exports:{}},Ie={};/** @license React v16.13.1
63
63
  * react-is.production.min.js
64
64
  *
65
65
  * Copyright (c) Facebook, Inc. and its affiliates.
66
66
  *
67
67
  * This source code is licensed under the MIT license found in the
68
68
  * LICENSE file in the root directory of this source tree.
69
- */var Rg;function MP(){if(Rg)return Ie;Rg=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,i=e?Symbol.for("react.fragment"):60107,s=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,l=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,f=e?Symbol.for("react.async_mode"):60111,m=e?Symbol.for("react.concurrent_mode"):60111,v=e?Symbol.for("react.forward_ref"):60112,g=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,b=e?Symbol.for("react.memo"):60115,x=e?Symbol.for("react.lazy"):60116,d=e?Symbol.for("react.block"):60121,w=e?Symbol.for("react.fundamental"):60117,h=e?Symbol.for("react.responder"):60118,S=e?Symbol.for("react.scope"):60119;function E(O){if(typeof O=="object"&&O!==null){var k=O.$$typeof;switch(k){case t:switch(O=O.type,O){case f:case m:case i:case a:case s:case g:return O;default:switch(O=O&&O.$$typeof,O){case c:case v:case x:case b:case l:return O;default:return k}}case r:return k}}}function R(O){return E(O)===m}return Ie.AsyncMode=f,Ie.ConcurrentMode=m,Ie.ContextConsumer=c,Ie.ContextProvider=l,Ie.Element=t,Ie.ForwardRef=v,Ie.Fragment=i,Ie.Lazy=x,Ie.Memo=b,Ie.Portal=r,Ie.Profiler=a,Ie.StrictMode=s,Ie.Suspense=g,Ie.isAsyncMode=function(O){return R(O)||E(O)===f},Ie.isConcurrentMode=R,Ie.isContextConsumer=function(O){return E(O)===c},Ie.isContextProvider=function(O){return E(O)===l},Ie.isElement=function(O){return typeof O=="object"&&O!==null&&O.$$typeof===t},Ie.isForwardRef=function(O){return E(O)===v},Ie.isFragment=function(O){return E(O)===i},Ie.isLazy=function(O){return E(O)===x},Ie.isMemo=function(O){return E(O)===b},Ie.isPortal=function(O){return E(O)===r},Ie.isProfiler=function(O){return E(O)===a},Ie.isStrictMode=function(O){return E(O)===s},Ie.isSuspense=function(O){return E(O)===g},Ie.isValidElementType=function(O){return typeof O=="string"||typeof O=="function"||O===i||O===m||O===a||O===s||O===g||O===p||typeof O=="object"&&O!==null&&(O.$$typeof===x||O.$$typeof===b||O.$$typeof===l||O.$$typeof===c||O.$$typeof===v||O.$$typeof===w||O.$$typeof===h||O.$$typeof===S||O.$$typeof===d)},Ie.typeOf=E,Ie}var Le={};/** @license React v16.13.1
69
+ */var jg;function QP(){if(jg)return Ie;jg=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,i=e?Symbol.for("react.fragment"):60107,s=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,u=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,f=e?Symbol.for("react.async_mode"):60111,g=e?Symbol.for("react.concurrent_mode"):60111,h=e?Symbol.for("react.forward_ref"):60112,v=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,y=e?Symbol.for("react.memo"):60115,x=e?Symbol.for("react.lazy"):60116,d=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,m=e?Symbol.for("react.responder"):60118,S=e?Symbol.for("react.scope"):60119;function E(O){if(typeof O=="object"&&O!==null){var k=O.$$typeof;switch(k){case t:switch(O=O.type,O){case f:case g:case i:case a:case s:case v:return O;default:switch(O=O&&O.$$typeof,O){case c:case h:case x:case y:case u:return O;default:return k}}case r:return k}}}function R(O){return E(O)===g}return Ie.AsyncMode=f,Ie.ConcurrentMode=g,Ie.ContextConsumer=c,Ie.ContextProvider=u,Ie.Element=t,Ie.ForwardRef=h,Ie.Fragment=i,Ie.Lazy=x,Ie.Memo=y,Ie.Portal=r,Ie.Profiler=a,Ie.StrictMode=s,Ie.Suspense=v,Ie.isAsyncMode=function(O){return R(O)||E(O)===f},Ie.isConcurrentMode=R,Ie.isContextConsumer=function(O){return E(O)===c},Ie.isContextProvider=function(O){return E(O)===u},Ie.isElement=function(O){return typeof O=="object"&&O!==null&&O.$$typeof===t},Ie.isForwardRef=function(O){return E(O)===h},Ie.isFragment=function(O){return E(O)===i},Ie.isLazy=function(O){return E(O)===x},Ie.isMemo=function(O){return E(O)===y},Ie.isPortal=function(O){return E(O)===r},Ie.isProfiler=function(O){return E(O)===a},Ie.isStrictMode=function(O){return E(O)===s},Ie.isSuspense=function(O){return E(O)===v},Ie.isValidElementType=function(O){return typeof O=="string"||typeof O=="function"||O===i||O===g||O===a||O===s||O===v||O===p||typeof O=="object"&&O!==null&&(O.$$typeof===x||O.$$typeof===y||O.$$typeof===u||O.$$typeof===c||O.$$typeof===h||O.$$typeof===b||O.$$typeof===m||O.$$typeof===S||O.$$typeof===d)},Ie.typeOf=E,Ie}var Le={};/** @license React v16.13.1
70
70
  * react-is.development.js
71
71
  *
72
72
  * Copyright (c) Facebook, Inc. and its affiliates.
73
73
  *
74
74
  * This source code is licensed under the MIT license found in the
75
75
  * LICENSE file in the root directory of this source tree.
76
- */var Pg;function FP(){return Pg||(Pg=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,i=e?Symbol.for("react.fragment"):60107,s=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,l=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,f=e?Symbol.for("react.async_mode"):60111,m=e?Symbol.for("react.concurrent_mode"):60111,v=e?Symbol.for("react.forward_ref"):60112,g=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,b=e?Symbol.for("react.memo"):60115,x=e?Symbol.for("react.lazy"):60116,d=e?Symbol.for("react.block"):60121,w=e?Symbol.for("react.fundamental"):60117,h=e?Symbol.for("react.responder"):60118,S=e?Symbol.for("react.scope"):60119;function E(ie){return typeof ie=="string"||typeof ie=="function"||ie===i||ie===m||ie===a||ie===s||ie===g||ie===p||typeof ie=="object"&&ie!==null&&(ie.$$typeof===x||ie.$$typeof===b||ie.$$typeof===l||ie.$$typeof===c||ie.$$typeof===v||ie.$$typeof===w||ie.$$typeof===h||ie.$$typeof===S||ie.$$typeof===d)}function R(ie){if(typeof ie=="object"&&ie!==null){var mt=ie.$$typeof;switch(mt){case t:var ut=ie.type;switch(ut){case f:case m:case i:case a:case s:case g:return ut;default:var vr=ut&&ut.$$typeof;switch(vr){case c:case v:case x:case b:case l:return vr;default:return mt}}case r:return mt}}}var O=f,k=m,B=c,M=l,F=t,G=v,j=i,L=x,U=b,q=r,C=a,J=s,X=g,te=!1;function de(ie){return te||(te=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),Z(ie)||R(ie)===f}function Z(ie){return R(ie)===m}function Q(ie){return R(ie)===c}function se(ie){return R(ie)===l}function ue(ie){return typeof ie=="object"&&ie!==null&&ie.$$typeof===t}function ne(ie){return R(ie)===v}function ce(ie){return R(ie)===i}function fe(ie){return R(ie)===x}function ye(ie){return R(ie)===b}function ve(ie){return R(ie)===r}function Ee(ie){return R(ie)===a}function Ae(ie){return R(ie)===s}function Ze(ie){return R(ie)===g}Le.AsyncMode=O,Le.ConcurrentMode=k,Le.ContextConsumer=B,Le.ContextProvider=M,Le.Element=F,Le.ForwardRef=G,Le.Fragment=j,Le.Lazy=L,Le.Memo=U,Le.Portal=q,Le.Profiler=C,Le.StrictMode=J,Le.Suspense=X,Le.isAsyncMode=de,Le.isConcurrentMode=Z,Le.isContextConsumer=Q,Le.isContextProvider=se,Le.isElement=ue,Le.isForwardRef=ne,Le.isFragment=ce,Le.isLazy=fe,Le.isMemo=ye,Le.isPortal=ve,Le.isProfiler=Ee,Le.isStrictMode=Ae,Le.isSuspense=Ze,Le.isValidElementType=E,Le.typeOf=R})()),Le}var Cg;function Um(){return Cg||(Cg=1,process.env.NODE_ENV==="production"?Xs.exports=MP():Xs.exports=FP()),Xs.exports}/*
76
+ */var zg;function eC(){return zg||(zg=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,i=e?Symbol.for("react.fragment"):60107,s=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,u=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,f=e?Symbol.for("react.async_mode"):60111,g=e?Symbol.for("react.concurrent_mode"):60111,h=e?Symbol.for("react.forward_ref"):60112,v=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,y=e?Symbol.for("react.memo"):60115,x=e?Symbol.for("react.lazy"):60116,d=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,m=e?Symbol.for("react.responder"):60118,S=e?Symbol.for("react.scope"):60119;function E(ie){return typeof ie=="string"||typeof ie=="function"||ie===i||ie===g||ie===a||ie===s||ie===v||ie===p||typeof ie=="object"&&ie!==null&&(ie.$$typeof===x||ie.$$typeof===y||ie.$$typeof===u||ie.$$typeof===c||ie.$$typeof===h||ie.$$typeof===b||ie.$$typeof===m||ie.$$typeof===S||ie.$$typeof===d)}function R(ie){if(typeof ie=="object"&&ie!==null){var wt=ie.$$typeof;switch(wt){case t:var ft=ie.type;switch(ft){case f:case g:case i:case a:case s:case v:return ft;default:var wr=ft&&ft.$$typeof;switch(wr){case c:case h:case x:case y:case u:return wr;default:return wt}}case r:return wt}}}var O=f,k=g,W=c,M=u,F=t,G=h,j=i,L=x,H=y,q=r,C=a,J=s,Y=v,te=!1;function de(ie){return te||(te=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),Z(ie)||R(ie)===f}function Z(ie){return R(ie)===g}function Q(ie){return R(ie)===c}function se(ie){return R(ie)===u}function ue(ie){return typeof ie=="object"&&ie!==null&&ie.$$typeof===t}function ne(ie){return R(ie)===h}function ce(ie){return R(ie)===i}function fe(ie){return R(ie)===x}function ye(ie){return R(ie)===y}function me(ie){return R(ie)===r}function Ee(ie){return R(ie)===a}function Te(ie){return R(ie)===s}function Ve(ie){return R(ie)===v}Le.AsyncMode=O,Le.ConcurrentMode=k,Le.ContextConsumer=W,Le.ContextProvider=M,Le.Element=F,Le.ForwardRef=G,Le.Fragment=j,Le.Lazy=L,Le.Memo=H,Le.Portal=q,Le.Profiler=C,Le.StrictMode=J,Le.Suspense=Y,Le.isAsyncMode=de,Le.isConcurrentMode=Z,Le.isContextConsumer=Q,Le.isContextProvider=se,Le.isElement=ue,Le.isForwardRef=ne,Le.isFragment=ce,Le.isLazy=fe,Le.isMemo=ye,Le.isPortal=me,Le.isProfiler=Ee,Le.isStrictMode=Te,Le.isSuspense=Ve,Le.isValidElementType=E,Le.typeOf=R})()),Le}var Bg;function ty(){return Bg||(Bg=1,process.env.NODE_ENV==="production"?ta.exports=QP():ta.exports=eC()),ta.exports}/*
77
77
  object-assign
78
78
  (c) Sindre Sorhus
79
79
  @license MIT
80
- */var Fl,kg;function DP(){if(kg)return Fl;kg=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function i(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function s(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var l={},c=0;c<10;c++)l["_"+String.fromCharCode(c)]=c;var f=Object.getOwnPropertyNames(l).map(function(v){return l[v]});if(f.join("")!=="0123456789")return!1;var m={};return"abcdefghijklmnopqrst".split("").forEach(function(v){m[v]=v}),Object.keys(Object.assign({},m)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Fl=s()?Object.assign:function(a,l){for(var c,f=i(a),m,v=1;v<arguments.length;v++){c=Object(arguments[v]);for(var g in c)t.call(c,g)&&(f[g]=c[g]);if(e){m=e(c);for(var p=0;p<m.length;p++)r.call(c,m[p])&&(f[m[p]]=c[m[p]])}}return f},Fl}var Dl,$g;function Kc(){if($g)return Dl;$g=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Dl=e,Dl}var Nl,Ig;function Hm(){return Ig||(Ig=1,Nl=Function.call.bind(Object.prototype.hasOwnProperty)),Nl}var jl,Lg;function NP(){if(Lg)return jl;Lg=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Kc(),r={},i=Hm();e=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}}}function s(a,l,c,f,m){if(process.env.NODE_ENV!=="production"){for(var v in a)if(i(a,v)){var g;try{if(typeof a[v]!="function"){var p=Error((f||"React class")+": "+c+" type `"+v+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[v]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}g=a[v](l,v,f,c,null,t)}catch(x){g=x}if(g&&!(g instanceof Error)&&e((f||"React class")+": type specification of "+c+" `"+v+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof g+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),g instanceof Error&&!(g.message in r)){r[g.message]=!0;var b=m?m():"";e("Failed "+c+" type: "+g.message+(b??""))}}}}return s.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},jl=s,jl}var zl,Mg;function jP(){if(Mg)return zl;Mg=1;var e=Um(),t=DP(),r=Kc(),i=Hm(),s=NP(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(c){var f="Warning: "+c;typeof console<"u"&&console.error(f);try{throw new Error(f)}catch{}});function l(){return null}return zl=function(c,f){var m=typeof Symbol=="function"&&Symbol.iterator,v="@@iterator";function g(Z){var Q=Z&&(m&&Z[m]||Z[v]);if(typeof Q=="function")return Q}var p="<<anonymous>>",b={array:h("array"),bigint:h("bigint"),bool:h("boolean"),func:h("function"),number:h("number"),object:h("object"),string:h("string"),symbol:h("symbol"),any:S(),arrayOf:E,element:R(),elementType:O(),instanceOf:k,node:G(),objectOf:M,oneOf:B,oneOfType:F,shape:L,exact:U};function x(Z,Q){return Z===Q?Z!==0||1/Z===1/Q:Z!==Z&&Q!==Q}function d(Z,Q){this.message=Z,this.data=Q&&typeof Q=="object"?Q:{},this.stack=""}d.prototype=Error.prototype;function w(Z){if(process.env.NODE_ENV!=="production")var Q={},se=0;function ue(ce,fe,ye,ve,Ee,Ae,Ze){if(ve=ve||p,Ae=Ae||ye,Ze!==r){if(f){var ie=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw ie.name="Invariant Violation",ie}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var mt=ve+":"+ye;!Q[mt]&&se<3&&(a("You are manually calling a React.PropTypes validation function for the `"+Ae+"` prop on `"+ve+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),Q[mt]=!0,se++)}}return fe[ye]==null?ce?fe[ye]===null?new d("The "+Ee+" `"+Ae+"` is marked as required "+("in `"+ve+"`, but its value is `null`.")):new d("The "+Ee+" `"+Ae+"` is marked as required in "+("`"+ve+"`, but its value is `undefined`.")):null:Z(fe,ye,ve,Ee,Ae)}var ne=ue.bind(null,!1);return ne.isRequired=ue.bind(null,!0),ne}function h(Z){function Q(se,ue,ne,ce,fe,ye){var ve=se[ue],Ee=J(ve);if(Ee!==Z){var Ae=X(ve);return new d("Invalid "+ce+" `"+fe+"` of type "+("`"+Ae+"` supplied to `"+ne+"`, expected ")+("`"+Z+"`."),{expectedType:Z})}return null}return w(Q)}function S(){return w(l)}function E(Z){function Q(se,ue,ne,ce,fe){if(typeof Z!="function")return new d("Property `"+fe+"` of component `"+ne+"` has invalid PropType notation inside arrayOf.");var ye=se[ue];if(!Array.isArray(ye)){var ve=J(ye);return new d("Invalid "+ce+" `"+fe+"` of type "+("`"+ve+"` supplied to `"+ne+"`, expected an array."))}for(var Ee=0;Ee<ye.length;Ee++){var Ae=Z(ye,Ee,ne,ce,fe+"["+Ee+"]",r);if(Ae instanceof Error)return Ae}return null}return w(Q)}function R(){function Z(Q,se,ue,ne,ce){var fe=Q[se];if(!c(fe)){var ye=J(fe);return new d("Invalid "+ne+" `"+ce+"` of type "+("`"+ye+"` supplied to `"+ue+"`, expected a single ReactElement."))}return null}return w(Z)}function O(){function Z(Q,se,ue,ne,ce){var fe=Q[se];if(!e.isValidElementType(fe)){var ye=J(fe);return new d("Invalid "+ne+" `"+ce+"` of type "+("`"+ye+"` supplied to `"+ue+"`, expected a single ReactElement type."))}return null}return w(Z)}function k(Z){function Q(se,ue,ne,ce,fe){if(!(se[ue]instanceof Z)){var ye=Z.name||p,ve=de(se[ue]);return new d("Invalid "+ce+" `"+fe+"` of type "+("`"+ve+"` supplied to `"+ne+"`, expected ")+("instance of `"+ye+"`."))}return null}return w(Q)}function B(Z){if(!Array.isArray(Z))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):a("Invalid argument supplied to oneOf, expected an array.")),l;function Q(se,ue,ne,ce,fe){for(var ye=se[ue],ve=0;ve<Z.length;ve++)if(x(ye,Z[ve]))return null;var Ee=JSON.stringify(Z,function(Ze,ie){var mt=X(ie);return mt==="symbol"?String(ie):ie});return new d("Invalid "+ce+" `"+fe+"` of value `"+String(ye)+"` "+("supplied to `"+ne+"`, expected one of "+Ee+"."))}return w(Q)}function M(Z){function Q(se,ue,ne,ce,fe){if(typeof Z!="function")return new d("Property `"+fe+"` of component `"+ne+"` has invalid PropType notation inside objectOf.");var ye=se[ue],ve=J(ye);if(ve!=="object")return new d("Invalid "+ce+" `"+fe+"` of type "+("`"+ve+"` supplied to `"+ne+"`, expected an object."));for(var Ee in ye)if(i(ye,Ee)){var Ae=Z(ye,Ee,ne,ce,fe+"."+Ee,r);if(Ae instanceof Error)return Ae}return null}return w(Q)}function F(Z){if(!Array.isArray(Z))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),l;for(var Q=0;Q<Z.length;Q++){var se=Z[Q];if(typeof se!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+te(se)+" at index "+Q+"."),l}function ue(ne,ce,fe,ye,ve){for(var Ee=[],Ae=0;Ae<Z.length;Ae++){var Ze=Z[Ae],ie=Ze(ne,ce,fe,ye,ve,r);if(ie==null)return null;ie.data&&i(ie.data,"expectedType")&&Ee.push(ie.data.expectedType)}var mt=Ee.length>0?", expected one of type ["+Ee.join(", ")+"]":"";return new d("Invalid "+ye+" `"+ve+"` supplied to "+("`"+fe+"`"+mt+"."))}return w(ue)}function G(){function Z(Q,se,ue,ne,ce){return q(Q[se])?null:new d("Invalid "+ne+" `"+ce+"` supplied to "+("`"+ue+"`, expected a ReactNode."))}return w(Z)}function j(Z,Q,se,ue,ne){return new d((Z||"React class")+": "+Q+" type `"+se+"."+ue+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+ne+"`.")}function L(Z){function Q(se,ue,ne,ce,fe){var ye=se[ue],ve=J(ye);if(ve!=="object")return new d("Invalid "+ce+" `"+fe+"` of type `"+ve+"` "+("supplied to `"+ne+"`, expected `object`."));for(var Ee in Z){var Ae=Z[Ee];if(typeof Ae!="function")return j(ne,ce,fe,Ee,X(Ae));var Ze=Ae(ye,Ee,ne,ce,fe+"."+Ee,r);if(Ze)return Ze}return null}return w(Q)}function U(Z){function Q(se,ue,ne,ce,fe){var ye=se[ue],ve=J(ye);if(ve!=="object")return new d("Invalid "+ce+" `"+fe+"` of type `"+ve+"` "+("supplied to `"+ne+"`, expected `object`."));var Ee=t({},se[ue],Z);for(var Ae in Ee){var Ze=Z[Ae];if(i(Z,Ae)&&typeof Ze!="function")return j(ne,ce,fe,Ae,X(Ze));if(!Ze)return new d("Invalid "+ce+" `"+fe+"` key `"+Ae+"` supplied to `"+ne+"`.\nBad object: "+JSON.stringify(se[ue],null," ")+`
81
- Valid keys: `+JSON.stringify(Object.keys(Z),null," "));var ie=Ze(ye,Ae,ne,ce,fe+"."+Ae,r);if(ie)return ie}return null}return w(Q)}function q(Z){switch(typeof Z){case"number":case"string":case"undefined":return!0;case"boolean":return!Z;case"object":if(Array.isArray(Z))return Z.every(q);if(Z===null||c(Z))return!0;var Q=g(Z);if(Q){var se=Q.call(Z),ue;if(Q!==Z.entries){for(;!(ue=se.next()).done;)if(!q(ue.value))return!1}else for(;!(ue=se.next()).done;){var ne=ue.value;if(ne&&!q(ne[1]))return!1}}else return!1;return!0;default:return!1}}function C(Z,Q){return Z==="symbol"?!0:Q?Q["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&Q instanceof Symbol:!1}function J(Z){var Q=typeof Z;return Array.isArray(Z)?"array":Z instanceof RegExp?"object":C(Q,Z)?"symbol":Q}function X(Z){if(typeof Z>"u"||Z===null)return""+Z;var Q=J(Z);if(Q==="object"){if(Z instanceof Date)return"date";if(Z instanceof RegExp)return"regexp"}return Q}function te(Z){var Q=X(Z);switch(Q){case"array":case"object":return"an "+Q;case"boolean":case"date":case"regexp":return"a "+Q;default:return Q}}function de(Z){return!Z.constructor||!Z.constructor.name?p:Z.constructor.name}return b.checkPropTypes=s,b.resetWarningCache=s.resetWarningCache,b.PropTypes=b,b},zl}var Wl,Fg;function zP(){if(Fg)return Wl;Fg=1;var e=Kc();function t(){}function r(){}return r.resetWarningCache=t,Wl=function(){function i(l,c,f,m,v,g){if(g!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}i.isRequired=i;function s(){return i}var a={array:i,bigint:i,bool:i,func:i,number:i,object:i,string:i,symbol:i,any:i,arrayOf:s,element:i,elementType:i,instanceOf:s,node:i,objectOf:s,oneOf:s,oneOfType:s,shape:s,exact:s,checkPropTypes:r,resetWarningCache:t};return a.PropTypes=a,a},Wl}var Dg;function WP(){if(Dg)return Vs.exports;if(Dg=1,process.env.NODE_ENV!=="production"){var e=Um(),t=!0;Vs.exports=jP()(e.isElement,t)}else Vs.exports=zP()();return Vs.exports}var Ng;function BP(){return Ng||(Ng=1,(function(e){(function(t,r){r(e,W,WP())})(Ks,function(t,r,i){Object.defineProperty(t,"__esModule",{value:!0}),t.setHasSupportToCaptureOption=x;var s=l(r),a=l(i);function l(S){return S&&S.__esModule?S:{default:S}}var c=Object.assign||function(S){for(var E=1;E<arguments.length;E++){var R=arguments[E];for(var O in R)Object.prototype.hasOwnProperty.call(R,O)&&(S[O]=R[O])}return S};function f(S,E){var R={};for(var O in S)E.indexOf(O)>=0||Object.prototype.hasOwnProperty.call(S,O)&&(R[O]=S[O]);return R}function m(S,E){if(!(S instanceof E))throw new TypeError("Cannot call a class as a function")}var v=(function(){function S(E,R){for(var O=0;O<R.length;O++){var k=R[O];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(E,k.key,k)}}return function(E,R,O){return R&&S(E.prototype,R),O&&S(E,O),E}})();function g(S,E){if(!S)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E&&(typeof E=="object"||typeof E=="function")?E:S}function p(S,E){if(typeof E!="function"&&E!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof E);S.prototype=Object.create(E&&E.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}),E&&(Object.setPrototypeOf?Object.setPrototypeOf(S,E):S.__proto__=E)}var b=!1;function x(S){b=S}try{addEventListener("test",null,Object.defineProperty({},"capture",{get:function(){x(!0)}}))}catch{}function d(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{capture:!0};return b?S:S.capture}function w(S){if("touches"in S){var E=S.touches[0],R=E.pageX,O=E.pageY;return{x:R,y:O}}var k=S.screenX,B=S.screenY;return{x:k,y:B}}var h=(function(S){p(E,S);function E(){var R;m(this,E);for(var O=arguments.length,k=Array(O),B=0;B<O;B++)k[B]=arguments[B];var M=g(this,(R=E.__proto__||Object.getPrototypeOf(E)).call.apply(R,[this].concat(k)));return M._handleSwipeStart=M._handleSwipeStart.bind(M),M._handleSwipeMove=M._handleSwipeMove.bind(M),M._handleSwipeEnd=M._handleSwipeEnd.bind(M),M._onMouseDown=M._onMouseDown.bind(M),M._onMouseMove=M._onMouseMove.bind(M),M._onMouseUp=M._onMouseUp.bind(M),M._setSwiperRef=M._setSwiperRef.bind(M),M}return v(E,[{key:"componentDidMount",value:function(){this.swiper&&this.swiper.addEventListener("touchmove",this._handleSwipeMove,d({capture:!0,passive:!1}))}},{key:"componentWillUnmount",value:function(){this.swiper&&this.swiper.removeEventListener("touchmove",this._handleSwipeMove,d({capture:!0,passive:!1}))}},{key:"_onMouseDown",value:function(O){this.props.allowMouseEvents&&(this.mouseDown=!0,document.addEventListener("mouseup",this._onMouseUp),document.addEventListener("mousemove",this._onMouseMove),this._handleSwipeStart(O))}},{key:"_onMouseMove",value:function(O){this.mouseDown&&this._handleSwipeMove(O)}},{key:"_onMouseUp",value:function(O){this.mouseDown=!1,document.removeEventListener("mouseup",this._onMouseUp),document.removeEventListener("mousemove",this._onMouseMove),this._handleSwipeEnd(O)}},{key:"_handleSwipeStart",value:function(O){var k=w(O),B=k.x,M=k.y;this.moveStart={x:B,y:M},this.props.onSwipeStart(O)}},{key:"_handleSwipeMove",value:function(O){if(this.moveStart){var k=w(O),B=k.x,M=k.y,F=B-this.moveStart.x,G=M-this.moveStart.y;this.moving=!0;var j=this.props.onSwipeMove({x:F,y:G},O);j&&O.cancelable&&O.preventDefault(),this.movePosition={deltaX:F,deltaY:G}}}},{key:"_handleSwipeEnd",value:function(O){this.props.onSwipeEnd(O);var k=this.props.tolerance;this.moving&&this.movePosition&&(this.movePosition.deltaX<-k?this.props.onSwipeLeft(1,O):this.movePosition.deltaX>k&&this.props.onSwipeRight(1,O),this.movePosition.deltaY<-k?this.props.onSwipeUp(1,O):this.movePosition.deltaY>k&&this.props.onSwipeDown(1,O)),this.moveStart=null,this.moving=!1,this.movePosition=null}},{key:"_setSwiperRef",value:function(O){this.swiper=O,this.props.innerRef(O)}},{key:"render",value:function(){var O=this.props;O.tagName;var k=O.className,B=O.style,M=O.children;O.allowMouseEvents,O.onSwipeUp,O.onSwipeDown,O.onSwipeLeft,O.onSwipeRight,O.onSwipeStart,O.onSwipeMove,O.onSwipeEnd,O.innerRef,O.tolerance;var F=f(O,["tagName","className","style","children","allowMouseEvents","onSwipeUp","onSwipeDown","onSwipeLeft","onSwipeRight","onSwipeStart","onSwipeMove","onSwipeEnd","innerRef","tolerance"]);return s.default.createElement(this.props.tagName,c({ref:this._setSwiperRef,onMouseDown:this._onMouseDown,onTouchStart:this._handleSwipeStart,onTouchEnd:this._handleSwipeEnd,className:k,style:B},F),M)}}]),E})(r.Component);h.displayName="ReactSwipe",h.propTypes={tagName:a.default.string,className:a.default.string,style:a.default.object,children:a.default.node,allowMouseEvents:a.default.bool,onSwipeUp:a.default.func,onSwipeDown:a.default.func,onSwipeLeft:a.default.func,onSwipeRight:a.default.func,onSwipeStart:a.default.func,onSwipeMove:a.default.func,onSwipeEnd:a.default.func,innerRef:a.default.func,tolerance:a.default.number.isRequired},h.defaultProps={tagName:"div",allowMouseEvents:!1,onSwipeUp:function(){},onSwipeDown:function(){},onSwipeLeft:function(){},onSwipeRight:function(){},onSwipeStart:function(){},onSwipeMove:function(){},onSwipeEnd:function(){},innerRef:function(){},tolerance:0},t.default=h})})(Ks)),Ks}var jg;function qm(){return jg||(jg=1,(function(e){(function(t,r){r(e,BP())})(Gs,function(t,r){Object.defineProperty(t,"__esModule",{value:!0});var i=s(r);function s(a){return a&&a.__esModule?a:{default:a}}t.default=i.default})})(Gs)),Gs}var no={},zg;function Zm(){if(zg)return no;zg=1,Object.defineProperty(no,"__esModule",{value:!0}),no.default=void 0;var e=t(tm());function t(s){return s&&s.__esModule?s:{default:s}}function r(s,a,l){return a in s?Object.defineProperty(s,a,{value:l,enumerable:!0,configurable:!0,writable:!0}):s[a]=l,s}var i={ROOT:function(a){return(0,e.default)(r({"carousel-root":!0},a||"",!!a))},CAROUSEL:function(a){return(0,e.default)({carousel:!0,"carousel-slider":a})},WRAPPER:function(a,l){return(0,e.default)({"thumbs-wrapper":!a,"slider-wrapper":a,"axis-horizontal":l==="horizontal","axis-vertical":l!=="horizontal"})},SLIDER:function(a,l){return(0,e.default)({thumbs:!a,slider:a,animated:!l})},ITEM:function(a,l,c){return(0,e.default)({thumb:!a,slide:a,selected:l,previous:c})},ARROW_PREV:function(a){return(0,e.default)({"control-arrow control-prev":!0,"control-disabled":a})},ARROW_NEXT:function(a){return(0,e.default)({"control-arrow control-next":!0,"control-disabled":a})},DOT:function(a){return(0,e.default)({dot:!0,selected:a})}};return no.default=i,no}var io={},oo={},Wg;function UP(){if(Wg)return oo;Wg=1,Object.defineProperty(oo,"__esModule",{value:!0}),oo.outerWidth=void 0;var e=function(r){var i=r.offsetWidth,s=getComputedStyle(r);return i+=parseInt(s.marginLeft)+parseInt(s.marginRight),i};return oo.outerWidth=e,oo}var so={},Bg;function Vc(){if(Bg)return so;Bg=1,Object.defineProperty(so,"__esModule",{value:!0}),so.default=void 0;var e=function(r,i,s){var a=r===0?r:r+i,l=s==="horizontal"?[a,0,0]:[0,a,0],c="translate3d",f="("+l.join(",")+")";return c+f};return so.default=e,so}var ao={},Ug;function Gm(){if(Ug)return ao;Ug=1,Object.defineProperty(ao,"__esModule",{value:!0}),ao.default=void 0;var e=function(){return window};return ao.default=e,ao}var Hg;function Km(){if(Hg)return io;Hg=1,Object.defineProperty(io,"__esModule",{value:!0}),io.default=void 0;var e=f(W),t=l(Zm()),r=UP(),i=l(Vc()),s=l(qm()),a=l(Gm());function l(M){return M&&M.__esModule?M:{default:M}}function c(){if(typeof WeakMap!="function")return null;var M=new WeakMap;return c=function(){return M},M}function f(M){if(M&&M.__esModule)return M;if(M===null||m(M)!=="object"&&typeof M!="function")return{default:M};var F=c();if(F&&F.has(M))return F.get(M);var G={},j=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var L in M)if(Object.prototype.hasOwnProperty.call(M,L)){var U=j?Object.getOwnPropertyDescriptor(M,L):null;U&&(U.get||U.set)?Object.defineProperty(G,L,U):G[L]=M[L]}return G.default=M,F&&F.set(M,G),G}function m(M){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?m=function(G){return typeof G}:m=function(G){return G&&typeof Symbol=="function"&&G.constructor===Symbol&&G!==Symbol.prototype?"symbol":typeof G},m(M)}function v(){return v=Object.assign||function(M){for(var F=1;F<arguments.length;F++){var G=arguments[F];for(var j in G)Object.prototype.hasOwnProperty.call(G,j)&&(M[j]=G[j])}return M},v.apply(this,arguments)}function g(M,F){if(!(M instanceof F))throw new TypeError("Cannot call a class as a function")}function p(M,F){for(var G=0;G<F.length;G++){var j=F[G];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(M,j.key,j)}}function b(M,F,G){return F&&p(M.prototype,F),M}function x(M,F){if(typeof F!="function"&&F!==null)throw new TypeError("Super expression must either be null or a function");M.prototype=Object.create(F&&F.prototype,{constructor:{value:M,writable:!0,configurable:!0}}),F&&d(M,F)}function d(M,F){return d=Object.setPrototypeOf||function(j,L){return j.__proto__=L,j},d(M,F)}function w(M){var F=E();return function(){var j=R(M),L;if(F){var U=R(this).constructor;L=Reflect.construct(j,arguments,U)}else L=j.apply(this,arguments);return h(this,L)}}function h(M,F){return F&&(m(F)==="object"||typeof F=="function")?F:S(M)}function S(M){if(M===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return M}function E(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function R(M){return R=Object.setPrototypeOf?Object.getPrototypeOf:function(G){return G.__proto__||Object.getPrototypeOf(G)},R(M)}function O(M,F,G){return F in M?Object.defineProperty(M,F,{value:G,enumerable:!0,configurable:!0,writable:!0}):M[F]=G,M}var k=function(F){return F.hasOwnProperty("key")},B=(function(M){x(G,M);var F=w(G);function G(j){var L;return g(this,G),L=F.call(this,j),O(S(L),"itemsWrapperRef",void 0),O(S(L),"itemsListRef",void 0),O(S(L),"thumbsRef",void 0),O(S(L),"setItemsWrapperRef",function(U){L.itemsWrapperRef=U}),O(S(L),"setItemsListRef",function(U){L.itemsListRef=U}),O(S(L),"setThumbsRef",function(U,q){L.thumbsRef||(L.thumbsRef=[]),L.thumbsRef[q]=U}),O(S(L),"updateSizes",function(){if(!(!L.props.children||!L.itemsWrapperRef||!L.thumbsRef)){var U=e.Children.count(L.props.children),q=L.itemsWrapperRef.clientWidth,C=L.props.thumbWidth?L.props.thumbWidth:(0,r.outerWidth)(L.thumbsRef[0]),J=Math.floor(q/C),X=J<U,te=X?U-J:0;L.setState(function(de,Z){return{itemSize:C,visibleItems:J,firstItem:X?L.getFirstItem(Z.selectedItem):0,lastPosition:te,showArrows:X}})}}),O(S(L),"handleClickItem",function(U,q,C){if(!k(C)||C.key==="Enter"){var J=L.props.onSelectItem;typeof J=="function"&&J(U,q)}}),O(S(L),"onSwipeStart",function(){L.setState({swiping:!0})}),O(S(L),"onSwipeEnd",function(){L.setState({swiping:!1})}),O(S(L),"onSwipeMove",function(U){var q=U.x;if(!L.state.itemSize||!L.itemsWrapperRef||!L.state.visibleItems)return!1;var C=0,J=e.Children.count(L.props.children),X=-(L.state.firstItem*100)/L.state.visibleItems,te=Math.max(J-L.state.visibleItems,0),de=-te*100/L.state.visibleItems;X===C&&q>0&&(q=0),X===de&&q<0&&(q=0);var Z=L.itemsWrapperRef.clientWidth,Q=X+100/(Z/q);return L.itemsListRef&&["WebkitTransform","MozTransform","MsTransform","OTransform","transform","msTransform"].forEach(function(se){L.itemsListRef.style[se]=(0,i.default)(Q,"%",L.props.axis)}),!0}),O(S(L),"slideRight",function(U){L.moveTo(L.state.firstItem-(typeof U=="number"?U:1))}),O(S(L),"slideLeft",function(U){L.moveTo(L.state.firstItem+(typeof U=="number"?U:1))}),O(S(L),"moveTo",function(U){U=U<0?0:U,U=U>=L.state.lastPosition?L.state.lastPosition:U,L.setState({firstItem:U})}),L.state={selectedItem:j.selectedItem,swiping:!1,showArrows:!1,firstItem:0,visibleItems:0,lastPosition:0},L}return b(G,[{key:"componentDidMount",value:function(){this.setupThumbs()}},{key:"componentDidUpdate",value:function(L){this.props.selectedItem!==this.state.selectedItem&&this.setState({selectedItem:this.props.selectedItem,firstItem:this.getFirstItem(this.props.selectedItem)}),this.props.children!==L.children&&this.updateSizes()}},{key:"componentWillUnmount",value:function(){this.destroyThumbs()}},{key:"setupThumbs",value:function(){(0,a.default)().addEventListener("resize",this.updateSizes),(0,a.default)().addEventListener("DOMContentLoaded",this.updateSizes),this.updateSizes()}},{key:"destroyThumbs",value:function(){(0,a.default)().removeEventListener("resize",this.updateSizes),(0,a.default)().removeEventListener("DOMContentLoaded",this.updateSizes)}},{key:"getFirstItem",value:function(L){var U=L;return L>=this.state.lastPosition&&(U=this.state.lastPosition),L<this.state.firstItem+this.state.visibleItems&&(U=this.state.firstItem),L<this.state.firstItem&&(U=L),U}},{key:"renderItems",value:function(){var L=this;return this.props.children.map(function(U,q){var C=t.default.ITEM(!1,q===L.state.selectedItem),J={key:q,ref:function(te){return L.setThumbsRef(te,q)},className:C,onClick:L.handleClickItem.bind(L,q,L.props.children[q]),onKeyDown:L.handleClickItem.bind(L,q,L.props.children[q]),"aria-label":"".concat(L.props.labels.item," ").concat(q+1),style:{width:L.props.thumbWidth}};return e.default.createElement("li",v({},J,{role:"button",tabIndex:0}),U)})}},{key:"render",value:function(){var L=this;if(!this.props.children)return null;var U=e.Children.count(this.props.children)>1,q=this.state.showArrows&&this.state.firstItem>0,C=this.state.showArrows&&this.state.firstItem<this.state.lastPosition,J={},X=-this.state.firstItem*(this.state.itemSize||0),te=(0,i.default)(X,"px",this.props.axis),de=this.props.transitionTime+"ms";return J={WebkitTransform:te,MozTransform:te,MsTransform:te,OTransform:te,transform:te,msTransform:te,WebkitTransitionDuration:de,MozTransitionDuration:de,MsTransitionDuration:de,OTransitionDuration:de,transitionDuration:de,msTransitionDuration:de},e.default.createElement("div",{className:t.default.CAROUSEL(!1)},e.default.createElement("div",{className:t.default.WRAPPER(!1),ref:this.setItemsWrapperRef},e.default.createElement("button",{type:"button",className:t.default.ARROW_PREV(!q),onClick:function(){return L.slideRight()},"aria-label":this.props.labels.leftArrow}),U?e.default.createElement(s.default,{tagName:"ul",className:t.default.SLIDER(!1,this.state.swiping),onSwipeLeft:this.slideLeft,onSwipeRight:this.slideRight,onSwipeMove:this.onSwipeMove,onSwipeStart:this.onSwipeStart,onSwipeEnd:this.onSwipeEnd,style:J,innerRef:this.setItemsListRef,allowMouseEvents:this.props.emulateTouch},this.renderItems()):e.default.createElement("ul",{className:t.default.SLIDER(!1,this.state.swiping),ref:function(Q){return L.setItemsListRef(Q)},style:J},this.renderItems()),e.default.createElement("button",{type:"button",className:t.default.ARROW_NEXT(!C),onClick:function(){return L.slideLeft()},"aria-label":this.props.labels.rightArrow})))}}]),G})(e.Component);return io.default=B,O(B,"displayName","Thumbs"),O(B,"defaultProps",{axis:"horizontal",labels:{leftArrow:"previous slide / item",rightArrow:"next slide / item",item:"slide item"},selectedItem:0,thumbWidth:80,transitionTime:350}),io}var uo={},qg;function HP(){if(qg)return uo;qg=1,Object.defineProperty(uo,"__esModule",{value:!0}),uo.default=void 0;var e=function(){return document};return uo.default=e,uo}var Bt={},Zg;function Vm(){if(Zg)return Bt;Zg=1,Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.setPosition=Bt.getPosition=Bt.isKeyboardEvent=Bt.defaultStatusFormatter=Bt.noop=void 0;var e=W,t=r(Vc());function r(f){return f&&f.__esModule?f:{default:f}}var i=function(){};Bt.noop=i;var s=function(m,v){return"".concat(m," of ").concat(v)};Bt.defaultStatusFormatter=s;var a=function(m){return m?m.hasOwnProperty("key"):!1};Bt.isKeyboardEvent=a;var l=function(m,v){if(v.infiniteLoop&&++m,m===0)return 0;var g=e.Children.count(v.children);if(v.centerMode&&v.axis==="horizontal"){var p=-m*v.centerSlidePercentage,b=g-1;return m&&(m!==b||v.infiniteLoop)?p+=(100-v.centerSlidePercentage)/2:m===b&&(p+=100-v.centerSlidePercentage),p}return-m*100};Bt.getPosition=l;var c=function(m,v){var g={};return["WebkitTransform","MozTransform","MsTransform","OTransform","transform","msTransform"].forEach(function(p){g[p]=(0,t.default)(m,"%",v)}),g};return Bt.setPosition=c,Bt}var fr={},Gg;function qP(){if(Gg)return fr;Gg=1,Object.defineProperty(fr,"__esModule",{value:!0}),fr.fadeAnimationHandler=fr.slideStopSwipingHandler=fr.slideSwipeAnimationHandler=fr.slideAnimationHandler=void 0;var e=W,t=i(Vc()),r=Vm();function i(g){return g&&g.__esModule?g:{default:g}}function s(g,p){var b=Object.keys(g);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(g);p&&(x=x.filter(function(d){return Object.getOwnPropertyDescriptor(g,d).enumerable})),b.push.apply(b,x)}return b}function a(g){for(var p=1;p<arguments.length;p++){var b=arguments[p]!=null?arguments[p]:{};p%2?s(Object(b),!0).forEach(function(x){l(g,x,b[x])}):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(b)):s(Object(b)).forEach(function(x){Object.defineProperty(g,x,Object.getOwnPropertyDescriptor(b,x))})}return g}function l(g,p,b){return p in g?Object.defineProperty(g,p,{value:b,enumerable:!0,configurable:!0,writable:!0}):g[p]=b,g}var c=function(p,b){var x={},d=b.selectedItem,w=d,h=e.Children.count(p.children)-1,S=p.infiniteLoop&&(d<0||d>h);if(S)return w<0?p.centerMode&&p.centerSlidePercentage&&p.axis==="horizontal"?x.itemListStyle=(0,r.setPosition)(-(h+2)*p.centerSlidePercentage-(100-p.centerSlidePercentage)/2,p.axis):x.itemListStyle=(0,r.setPosition)(-(h+2)*100,p.axis):w>h&&(x.itemListStyle=(0,r.setPosition)(0,p.axis)),x;var E=(0,r.getPosition)(d,p),R=(0,t.default)(E,"%",p.axis),O=p.transitionTime+"ms";return x.itemListStyle={WebkitTransform:R,msTransform:R,OTransform:R,transform:R},b.swiping||(x.itemListStyle=a(a({},x.itemListStyle),{},{WebkitTransitionDuration:O,MozTransitionDuration:O,OTransitionDuration:O,transitionDuration:O,msTransitionDuration:O})),x};fr.slideAnimationHandler=c;var f=function(p,b,x,d){var w={},h=b.axis==="horizontal",S=e.Children.count(b.children),E=0,R=(0,r.getPosition)(x.selectedItem,b),O=b.infiniteLoop?(0,r.getPosition)(S-1,b)-100:(0,r.getPosition)(S-1,b),k=h?p.x:p.y,B=k;R===E&&k>0&&(B=0),R===O&&k<0&&(B=0);var M=R+100/(x.itemSize/B),F=Math.abs(k)>b.swipeScrollTolerance;return b.infiniteLoop&&F&&(x.selectedItem===0&&M>-100?M-=S*100:x.selectedItem===S-1&&M<-S*100&&(M+=S*100)),(!b.preventMovementUntilSwipeScrollTolerance||F||x.swipeMovementStarted)&&(x.swipeMovementStarted||d({swipeMovementStarted:!0}),w.itemListStyle=(0,r.setPosition)(M,b.axis)),F&&!x.cancelClick&&d({cancelClick:!0}),w};fr.slideSwipeAnimationHandler=f;var m=function(p,b){var x=(0,r.getPosition)(b.selectedItem,p),d=(0,r.setPosition)(x,p.axis);return{itemListStyle:d}};fr.slideStopSwipingHandler=m;var v=function(p,b){var x=p.transitionTime+"ms",d="ease-in-out",w={position:"absolute",display:"block",zIndex:-2,minHeight:"100%",opacity:0,top:0,right:0,left:0,bottom:0,transitionTimingFunction:d,msTransitionTimingFunction:d,MozTransitionTimingFunction:d,WebkitTransitionTimingFunction:d,OTransitionTimingFunction:d};return b.swiping||(w=a(a({},w),{},{WebkitTransitionDuration:x,MozTransitionDuration:x,OTransitionDuration:x,transitionDuration:x,msTransitionDuration:x})),{slideStyle:w,selectedStyle:a(a({},w),{},{opacity:1,position:"relative"}),prevStyle:a({},w)}};return fr.fadeAnimationHandler=v,fr}var Kg;function ZP(){if(Kg)return ro;Kg=1,Object.defineProperty(ro,"__esModule",{value:!0}),ro.default=void 0;var e=v(W),t=f(qm()),r=f(Zm()),i=f(Km()),s=f(HP()),a=f(Gm()),l=Vm(),c=qP();function f(j){return j&&j.__esModule?j:{default:j}}function m(){if(typeof WeakMap!="function")return null;var j=new WeakMap;return m=function(){return j},j}function v(j){if(j&&j.__esModule)return j;if(j===null||g(j)!=="object"&&typeof j!="function")return{default:j};var L=m();if(L&&L.has(j))return L.get(j);var U={},q=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var C in j)if(Object.prototype.hasOwnProperty.call(j,C)){var J=q?Object.getOwnPropertyDescriptor(j,C):null;J&&(J.get||J.set)?Object.defineProperty(U,C,J):U[C]=j[C]}return U.default=j,L&&L.set(j,U),U}function g(j){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?g=function(U){return typeof U}:g=function(U){return U&&typeof Symbol=="function"&&U.constructor===Symbol&&U!==Symbol.prototype?"symbol":typeof U},g(j)}function p(){return p=Object.assign||function(j){for(var L=1;L<arguments.length;L++){var U=arguments[L];for(var q in U)Object.prototype.hasOwnProperty.call(U,q)&&(j[q]=U[q])}return j},p.apply(this,arguments)}function b(j,L){var U=Object.keys(j);if(Object.getOwnPropertySymbols){var q=Object.getOwnPropertySymbols(j);L&&(q=q.filter(function(C){return Object.getOwnPropertyDescriptor(j,C).enumerable})),U.push.apply(U,q)}return U}function x(j){for(var L=1;L<arguments.length;L++){var U=arguments[L]!=null?arguments[L]:{};L%2?b(Object(U),!0).forEach(function(q){F(j,q,U[q])}):Object.getOwnPropertyDescriptors?Object.defineProperties(j,Object.getOwnPropertyDescriptors(U)):b(Object(U)).forEach(function(q){Object.defineProperty(j,q,Object.getOwnPropertyDescriptor(U,q))})}return j}function d(j,L){if(!(j instanceof L))throw new TypeError("Cannot call a class as a function")}function w(j,L){for(var U=0;U<L.length;U++){var q=L[U];q.enumerable=q.enumerable||!1,q.configurable=!0,"value"in q&&(q.writable=!0),Object.defineProperty(j,q.key,q)}}function h(j,L,U){return L&&w(j.prototype,L),j}function S(j,L){if(typeof L!="function"&&L!==null)throw new TypeError("Super expression must either be null or a function");j.prototype=Object.create(L&&L.prototype,{constructor:{value:j,writable:!0,configurable:!0}}),L&&E(j,L)}function E(j,L){return E=Object.setPrototypeOf||function(q,C){return q.__proto__=C,q},E(j,L)}function R(j){var L=B();return function(){var q=M(j),C;if(L){var J=M(this).constructor;C=Reflect.construct(q,arguments,J)}else C=q.apply(this,arguments);return O(this,C)}}function O(j,L){return L&&(g(L)==="object"||typeof L=="function")?L:k(j)}function k(j){if(j===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return j}function B(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function M(j){return M=Object.setPrototypeOf?Object.getPrototypeOf:function(U){return U.__proto__||Object.getPrototypeOf(U)},M(j)}function F(j,L,U){return L in j?Object.defineProperty(j,L,{value:U,enumerable:!0,configurable:!0,writable:!0}):j[L]=U,j}var G=(function(j){S(U,j);var L=R(U);function U(q){var C;d(this,U),C=L.call(this,q),F(k(C),"thumbsRef",void 0),F(k(C),"carouselWrapperRef",void 0),F(k(C),"listRef",void 0),F(k(C),"itemsRef",void 0),F(k(C),"timer",void 0),F(k(C),"animationHandler",void 0),F(k(C),"setThumbsRef",function(X){C.thumbsRef=X}),F(k(C),"setCarouselWrapperRef",function(X){C.carouselWrapperRef=X}),F(k(C),"setListRef",function(X){C.listRef=X}),F(k(C),"setItemsRef",function(X,te){C.itemsRef||(C.itemsRef=[]),C.itemsRef[te]=X}),F(k(C),"autoPlay",function(){e.Children.count(C.props.children)<=1||(C.clearAutoPlay(),C.props.autoPlay&&(C.timer=setTimeout(function(){C.increment()},C.props.interval)))}),F(k(C),"clearAutoPlay",function(){C.timer&&clearTimeout(C.timer)}),F(k(C),"resetAutoPlay",function(){C.clearAutoPlay(),C.autoPlay()}),F(k(C),"stopOnHover",function(){C.setState({isMouseEntered:!0},C.clearAutoPlay)}),F(k(C),"startOnLeave",function(){C.setState({isMouseEntered:!1},C.autoPlay)}),F(k(C),"isFocusWithinTheCarousel",function(){return C.carouselWrapperRef?!!((0,s.default)().activeElement===C.carouselWrapperRef||C.carouselWrapperRef.contains((0,s.default)().activeElement)):!1}),F(k(C),"navigateWithKeyboard",function(X){if(C.isFocusWithinTheCarousel()){var te=C.props.axis,de=te==="horizontal",Z={ArrowUp:38,ArrowRight:39,ArrowDown:40,ArrowLeft:37},Q=de?Z.ArrowRight:Z.ArrowDown,se=de?Z.ArrowLeft:Z.ArrowUp;Q===X.keyCode?C.increment():se===X.keyCode&&C.decrement()}}),F(k(C),"updateSizes",function(){if(!(!C.state.initialized||!C.itemsRef||C.itemsRef.length===0)){var X=C.props.axis==="horizontal",te=C.itemsRef[0];if(te){var de=X?te.clientWidth:te.clientHeight;C.setState({itemSize:de}),C.thumbsRef&&C.thumbsRef.updateSizes()}}}),F(k(C),"setMountState",function(){C.setState({hasMount:!0}),C.updateSizes()}),F(k(C),"handleClickItem",function(X,te){if(e.Children.count(C.props.children)!==0){if(C.state.cancelClick){C.setState({cancelClick:!1});return}C.props.onClickItem(X,te),X!==C.state.selectedItem&&C.setState({selectedItem:X})}}),F(k(C),"handleOnChange",function(X,te){e.Children.count(C.props.children)<=1||C.props.onChange(X,te)}),F(k(C),"handleClickThumb",function(X,te){C.props.onClickThumb(X,te),C.moveTo(X)}),F(k(C),"onSwipeStart",function(X){C.setState({swiping:!0}),C.props.onSwipeStart(X)}),F(k(C),"onSwipeEnd",function(X){C.setState({swiping:!1,cancelClick:!1,swipeMovementStarted:!1}),C.props.onSwipeEnd(X),C.clearAutoPlay(),C.state.autoPlay&&C.autoPlay()}),F(k(C),"onSwipeMove",function(X,te){C.props.onSwipeMove(te);var de=C.props.swipeAnimationHandler(X,C.props,C.state,C.setState.bind(k(C)));return C.setState(x({},de)),!!Object.keys(de).length}),F(k(C),"decrement",function(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;C.moveTo(C.state.selectedItem-(typeof X=="number"?X:1))}),F(k(C),"increment",function(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;C.moveTo(C.state.selectedItem+(typeof X=="number"?X:1))}),F(k(C),"moveTo",function(X){if(typeof X=="number"){var te=e.Children.count(C.props.children)-1;X<0&&(X=C.props.infiniteLoop?te:0),X>te&&(X=C.props.infiniteLoop?0:te),C.selectItem({selectedItem:X}),C.state.autoPlay&&C.state.isMouseEntered===!1&&C.resetAutoPlay()}}),F(k(C),"onClickNext",function(){C.increment(1)}),F(k(C),"onClickPrev",function(){C.decrement(1)}),F(k(C),"onSwipeForward",function(){C.increment(1),C.props.emulateTouch&&C.setState({cancelClick:!0})}),F(k(C),"onSwipeBackwards",function(){C.decrement(1),C.props.emulateTouch&&C.setState({cancelClick:!0})}),F(k(C),"changeItem",function(X){return function(te){(!(0,l.isKeyboardEvent)(te)||te.key==="Enter")&&C.moveTo(X)}}),F(k(C),"selectItem",function(X){C.setState(x({previousItem:C.state.selectedItem},X),function(){C.setState(C.animationHandler(C.props,C.state))}),C.handleOnChange(X.selectedItem,e.Children.toArray(C.props.children)[X.selectedItem])}),F(k(C),"getInitialImage",function(){var X=C.props.selectedItem,te=C.itemsRef&&C.itemsRef[X],de=te&&te.getElementsByTagName("img")||[];return de[0]}),F(k(C),"getVariableItemHeight",function(X){var te=C.itemsRef&&C.itemsRef[X];if(C.state.hasMount&&te&&te.children.length){var de=te.children[0].getElementsByTagName("img")||[];if(de.length>0){var Z=de[0];if(!Z.complete){var Q=function ne(){C.forceUpdate(),Z.removeEventListener("load",ne)};Z.addEventListener("load",Q)}}var se=de[0]||te.children[0],ue=se.clientHeight;return ue>0?ue:null}return null});var J={initialized:!1,previousItem:q.selectedItem,selectedItem:q.selectedItem,hasMount:!1,isMouseEntered:!1,autoPlay:q.autoPlay,swiping:!1,swipeMovementStarted:!1,cancelClick:!1,itemSize:1,itemListStyle:{},slideStyle:{},selectedStyle:{},prevStyle:{}};return C.animationHandler=typeof q.animationHandler=="function"&&q.animationHandler||q.animationHandler==="fade"&&c.fadeAnimationHandler||c.slideAnimationHandler,C.state=x(x({},J),C.animationHandler(q,J)),C}return h(U,[{key:"componentDidMount",value:function(){this.props.children&&this.setupCarousel()}},{key:"componentDidUpdate",value:function(C,J){!C.children&&this.props.children&&!this.state.initialized&&this.setupCarousel(),!C.autoFocus&&this.props.autoFocus&&this.forceFocus(),J.swiping&&!this.state.swiping&&this.setState(x({},this.props.stopSwipingHandler(this.props,this.state))),(C.selectedItem!==this.props.selectedItem||C.centerMode!==this.props.centerMode)&&(this.updateSizes(),this.moveTo(this.props.selectedItem)),C.autoPlay!==this.props.autoPlay&&(this.props.autoPlay?this.setupAutoPlay():this.destroyAutoPlay(),this.setState({autoPlay:this.props.autoPlay}))}},{key:"componentWillUnmount",value:function(){this.destroyCarousel()}},{key:"setupCarousel",value:function(){var C=this;this.bindEvents(),this.state.autoPlay&&e.Children.count(this.props.children)>1&&this.setupAutoPlay(),this.props.autoFocus&&this.forceFocus(),this.setState({initialized:!0},function(){var J=C.getInitialImage();J&&!J.complete?J.addEventListener("load",C.setMountState):C.setMountState()})}},{key:"destroyCarousel",value:function(){this.state.initialized&&(this.unbindEvents(),this.destroyAutoPlay())}},{key:"setupAutoPlay",value:function(){this.autoPlay();var C=this.carouselWrapperRef;this.props.stopOnHover&&C&&(C.addEventListener("mouseenter",this.stopOnHover),C.addEventListener("mouseleave",this.startOnLeave))}},{key:"destroyAutoPlay",value:function(){this.clearAutoPlay();var C=this.carouselWrapperRef;this.props.stopOnHover&&C&&(C.removeEventListener("mouseenter",this.stopOnHover),C.removeEventListener("mouseleave",this.startOnLeave))}},{key:"bindEvents",value:function(){(0,a.default)().addEventListener("resize",this.updateSizes),(0,a.default)().addEventListener("DOMContentLoaded",this.updateSizes),this.props.useKeyboardArrows&&(0,s.default)().addEventListener("keydown",this.navigateWithKeyboard)}},{key:"unbindEvents",value:function(){(0,a.default)().removeEventListener("resize",this.updateSizes),(0,a.default)().removeEventListener("DOMContentLoaded",this.updateSizes);var C=this.getInitialImage();C&&C.removeEventListener("load",this.setMountState),this.props.useKeyboardArrows&&(0,s.default)().removeEventListener("keydown",this.navigateWithKeyboard)}},{key:"forceFocus",value:function(){var C;(C=this.carouselWrapperRef)===null||C===void 0||C.focus()}},{key:"renderItems",value:function(C){var J=this;return this.props.children?e.Children.map(this.props.children,function(X,te){var de=te===J.state.selectedItem,Z=te===J.state.previousItem,Q=de&&J.state.selectedStyle||Z&&J.state.prevStyle||J.state.slideStyle||{};J.props.centerMode&&J.props.axis==="horizontal"&&(Q=x(x({},Q),{},{minWidth:J.props.centerSlidePercentage+"%"})),J.state.swiping&&J.state.swipeMovementStarted&&(Q=x(x({},Q),{},{pointerEvents:"none"}));var se={ref:function(ne){return J.setItemsRef(ne,te)},key:"itemKey"+te+(C?"clone":""),className:r.default.ITEM(!0,te===J.state.selectedItem,te===J.state.previousItem),onClick:J.handleClickItem.bind(J,te,X),style:Q};return e.default.createElement("li",se,J.props.renderItem(X,{isSelected:te===J.state.selectedItem,isPrevious:te===J.state.previousItem}))}):[]}},{key:"renderControls",value:function(){var C=this,J=this.props,X=J.showIndicators,te=J.labels,de=J.renderIndicator,Z=J.children;return X?e.default.createElement("ul",{className:"control-dots"},e.Children.map(Z,function(Q,se){return de&&de(C.changeItem(se),se===C.state.selectedItem,se,te.item)})):null}},{key:"renderStatus",value:function(){return this.props.showStatus?e.default.createElement("p",{className:"carousel-status"},this.props.statusFormatter(this.state.selectedItem+1,e.Children.count(this.props.children))):null}},{key:"renderThumbs",value:function(){return!this.props.showThumbs||!this.props.children||e.Children.count(this.props.children)===0?null:e.default.createElement(i.default,{ref:this.setThumbsRef,onSelectItem:this.handleClickThumb,selectedItem:this.state.selectedItem,transitionTime:this.props.transitionTime,thumbWidth:this.props.thumbWidth,labels:this.props.labels,emulateTouch:this.props.emulateTouch},this.props.renderThumbs(this.props.children))}},{key:"render",value:function(){var C=this;if(!this.props.children||e.Children.count(this.props.children)===0)return null;var J=this.props.swipeable&&e.Children.count(this.props.children)>1,X=this.props.axis==="horizontal",te=this.props.showArrows&&e.Children.count(this.props.children)>1,de=te&&(this.state.selectedItem>0||this.props.infiniteLoop)||!1,Z=te&&(this.state.selectedItem<e.Children.count(this.props.children)-1||this.props.infiniteLoop)||!1,Q=this.renderItems(!0),se=Q.shift(),ue=Q.pop(),ne={className:r.default.SLIDER(!0,this.state.swiping),onSwipeMove:this.onSwipeMove,onSwipeStart:this.onSwipeStart,onSwipeEnd:this.onSwipeEnd,style:this.state.itemListStyle,tolerance:this.props.swipeScrollTolerance},ce={};if(X){if(ne.onSwipeLeft=this.onSwipeForward,ne.onSwipeRight=this.onSwipeBackwards,this.props.dynamicHeight){var fe=this.getVariableItemHeight(this.state.selectedItem);ce.height=fe||"auto"}}else ne.onSwipeUp=this.props.verticalSwipe==="natural"?this.onSwipeBackwards:this.onSwipeForward,ne.onSwipeDown=this.props.verticalSwipe==="natural"?this.onSwipeForward:this.onSwipeBackwards,ne.style=x(x({},ne.style),{},{height:this.state.itemSize}),ce.height=this.state.itemSize;return e.default.createElement("div",{"aria-label":this.props.ariaLabel,className:r.default.ROOT(this.props.className),ref:this.setCarouselWrapperRef,tabIndex:this.props.useKeyboardArrows?0:void 0},e.default.createElement("div",{className:r.default.CAROUSEL(!0),style:{width:this.props.width}},this.renderControls(),this.props.renderArrowPrev(this.onClickPrev,de,this.props.labels.leftArrow),e.default.createElement("div",{className:r.default.WRAPPER(!0,this.props.axis),style:ce},J?e.default.createElement(t.default,p({tagName:"ul",innerRef:this.setListRef},ne,{allowMouseEvents:this.props.emulateTouch}),this.props.infiniteLoop&&ue,this.renderItems(),this.props.infiniteLoop&&se):e.default.createElement("ul",{className:r.default.SLIDER(!0,this.state.swiping),ref:function(ve){return C.setListRef(ve)},style:this.state.itemListStyle||{}},this.props.infiniteLoop&&ue,this.renderItems(),this.props.infiniteLoop&&se)),this.props.renderArrowNext(this.onClickNext,Z,this.props.labels.rightArrow),this.renderStatus()),this.renderThumbs())}}]),U})(e.default.Component);return ro.default=G,F(G,"displayName","Carousel"),F(G,"defaultProps",{ariaLabel:void 0,axis:"horizontal",centerSlidePercentage:80,interval:3e3,labels:{leftArrow:"previous slide / item",rightArrow:"next slide / item",item:"slide item"},onClickItem:l.noop,onClickThumb:l.noop,onChange:l.noop,onSwipeStart:function(){},onSwipeEnd:function(){},onSwipeMove:function(){return!1},preventMovementUntilSwipeScrollTolerance:!1,renderArrowPrev:function(L,U,q){return e.default.createElement("button",{type:"button","aria-label":q,className:r.default.ARROW_PREV(!U),onClick:L})},renderArrowNext:function(L,U,q){return e.default.createElement("button",{type:"button","aria-label":q,className:r.default.ARROW_NEXT(!U),onClick:L})},renderIndicator:function(L,U,q,C){return e.default.createElement("li",{className:r.default.DOT(U),onClick:L,onKeyDown:L,value:q,key:q,role:"button",tabIndex:0,"aria-label":"".concat(C," ").concat(q+1)})},renderItem:function(L){return L},renderThumbs:function(L){var U=e.Children.map(L,function(q){var C=q;if(q.type!=="img"&&(C=e.Children.toArray(q.props.children).find(function(J){return J.type==="img"})),!!C)return C});return U.filter(function(q){return q}).length===0?(console.warn("No images found! Can't build the thumb list without images. If you don't need thumbs, set showThumbs={false} in the Carousel. Note that it's not possible to get images rendered inside custom components. More info at https://github.com/leandrowd/react-responsive-carousel/blob/master/TROUBLESHOOTING.md"),[]):U},statusFormatter:l.defaultStatusFormatter,selectedItem:0,showArrows:!0,showIndicators:!0,showStatus:!0,showThumbs:!0,stopOnHover:!0,swipeScrollTolerance:5,swipeable:!0,transitionTime:350,verticalSwipe:"standard",width:"100%",animationHandler:"slide",swipeAnimationHandler:c.slideSwipeAnimationHandler,stopSwipingHandler:c.slideStopSwipingHandler}),ro}var Vg={},Xg;function GP(){return Xg||(Xg=1),Vg}var Yg;function KP(){return Yg||(Yg=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"Carousel",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"CarouselProps",{enumerable:!0,get:function(){return r.CarouselProps}}),Object.defineProperty(e,"Thumbs",{enumerable:!0,get:function(){return i.default}});var t=s(ZP()),r=GP(),i=s(Km());function s(a){return a&&a.__esModule?a:{default:a}}})(Ml)),Ml}var VP=KP();const XP=({tip:e})=>D.jsx("div",{className:"h-full grid pb-8 px-8 place-content-center",children:Xm(e,!0)}),YP=({pages:e})=>D.jsx("div",{className:"min-h-[10rem] w-96",children:D.jsx(VP.Carousel,{autoPlay:!1,infiniteLoop:!0,showThumbs:!1,showArrows:!0,showStatus:!1,children:e&&e.map(t=>D.jsx(XP,{tip:t},t.key))})}),JP=({body:e,isInsideCarousel:t})=>D.jsx("article",{className:We(["prose prose-sm max-h-[10rem] overflow-auto p-1 px-2 text-left text-[12px] text-grey-100 ",{"w-60":!t}]),children:D.jsx(ga,{children:e,options:{overrides:{a:{component:({children:r,...i})=>D.jsxs("a",{...i,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-start text-primary-dark",children:[r,D.jsx(tt.FdOutload,{className:"ml-1 mt-px h-4 w-4"})]})}}}})}),QP=({video:e,body:t,title:r,isInsideCarousel:i})=>D.jsxs("div",{className:We([{"flex flex-row":!i,"flex max-h-[10rem] flex-col overflow-y-auto":i}]),children:[D.jsx("div",{className:We([{"mr-1":!i,"mb-1":i}]),children:D.jsx("iframe",{height:i?"auto":90,width:i?"100%":160,src:e==null?void 0:e.link,title:r,allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0})}),D.jsx("article",{className:We(["prose prose-sm p-1 text-left text-xs text-grey-100",{"w-60 overflow-auto":!i,"-mt-6":i}]),children:D.jsx(ga,{children:t||"",options:{overrides:{a:{component:({children:s,...a})=>D.jsxs("a",{...a,target:"_blank",rel:"noopener noreferrer",className:"flex items-start",children:[s,D.jsx(tt.FdOutload,{className:"ml-1 mt-px h-4 w-4"})]})}}}})})]}),Xm=(e,t)=>{switch(e.type){case ca.TEXT:return D.jsx(JP,{body:e.body,isInsideCarousel:t});case ca.VIDEO:return D.jsx(QP,{video:e.video,body:e.body,title:e.title,isInsideCarousel:t});case ca.CAROUSEL:return D.jsx(YP,{pages:e.pages})}},Ym=W.createContext(void 0);function Jg(e,t){const r=[];return e.forEach(i=>{i.key===t&&r.push(i)}),r}const eC=({children:e,enabled:t,baseUrl:r="https://raw.githubusercontent.com/4d/Web-studio-TIPS/main"})=>{const[{tips:i,show:s},a]=W.useState({tips:{},show:!0});W.useEffect(()=>{const c=new AbortController;try{fetch(`${r}/tips.json`,{signal:c.signal}).then(f=>f.json()).then(f=>{const m=f.reduce((v,g)=>Jg(f,g.key).length>1?{...v,[g.key]:{type:"carousel",pages:Jg(f,g.key)}}:{...v,[g.key]:g},{});a(v=>({...v,tips:m}))})}catch{}return()=>{c.abort()}},[]);const l=()=>{a(c=>({...c,show:!s}))};return D.jsx(Ym.Provider,{value:{tips:i,toggleTips:l,show:s,enabled:t},children:e})},Jm=e=>{const t=W.useContext(Ym);if(t===void 0)throw new Error("useTip must be used within a TipsContext");return{tip:e?t.tips[e]:null,toggleTips:t.toggleTips,show:t.show,enabled:t.enabled}},tC=va(IP)`
80
+ */var ql,Wg;function tC(){if(Wg)return ql;Wg=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function i(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function s(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var u={},c=0;c<10;c++)u["_"+String.fromCharCode(c)]=c;var f=Object.getOwnPropertyNames(u).map(function(h){return u[h]});if(f.join("")!=="0123456789")return!1;var g={};return"abcdefghijklmnopqrst".split("").forEach(function(h){g[h]=h}),Object.keys(Object.assign({},g)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return ql=s()?Object.assign:function(a,u){for(var c,f=i(a),g,h=1;h<arguments.length;h++){c=Object(arguments[h]);for(var v in c)t.call(c,v)&&(f[v]=c[v]);if(e){g=e(c);for(var p=0;p<g.length;p++)r.call(c,g[p])&&(f[g[p]]=c[g[p]])}}return f},ql}var Zl,Hg;function nf(){if(Hg)return Zl;Hg=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Zl=e,Zl}var Gl,Ug;function ry(){return Ug||(Ug=1,Gl=Function.call.bind(Object.prototype.hasOwnProperty)),Gl}var Kl,qg;function rC(){if(qg)return Kl;qg=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=nf(),r={},i=ry();e=function(a){var u="Warning: "+a;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}}}function s(a,u,c,f,g){if(process.env.NODE_ENV!=="production"){for(var h in a)if(i(a,h)){var v;try{if(typeof a[h]!="function"){var p=Error((f||"React class")+": "+c+" type `"+h+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[h]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}v=a[h](u,h,f,c,null,t)}catch(x){v=x}if(v&&!(v instanceof Error)&&e((f||"React class")+": type specification of "+c+" `"+h+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof v+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),v instanceof Error&&!(v.message in r)){r[v.message]=!0;var y=g?g():"";e("Failed "+c+" type: "+v.message+(y??""))}}}}return s.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},Kl=s,Kl}var Vl,Zg;function nC(){if(Zg)return Vl;Zg=1;var e=ty(),t=tC(),r=nf(),i=ry(),s=rC(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(c){var f="Warning: "+c;typeof console<"u"&&console.error(f);try{throw new Error(f)}catch{}});function u(){return null}return Vl=function(c,f){var g=typeof Symbol=="function"&&Symbol.iterator,h="@@iterator";function v(Z){var Q=Z&&(g&&Z[g]||Z[h]);if(typeof Q=="function")return Q}var p="<<anonymous>>",y={array:m("array"),bigint:m("bigint"),bool:m("boolean"),func:m("function"),number:m("number"),object:m("object"),string:m("string"),symbol:m("symbol"),any:S(),arrayOf:E,element:R(),elementType:O(),instanceOf:k,node:G(),objectOf:M,oneOf:W,oneOfType:F,shape:L,exact:H};function x(Z,Q){return Z===Q?Z!==0||1/Z===1/Q:Z!==Z&&Q!==Q}function d(Z,Q){this.message=Z,this.data=Q&&typeof Q=="object"?Q:{},this.stack=""}d.prototype=Error.prototype;function b(Z){if(process.env.NODE_ENV!=="production")var Q={},se=0;function ue(ce,fe,ye,me,Ee,Te,Ve){if(me=me||p,Te=Te||ye,Ve!==r){if(f){var ie=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw ie.name="Invariant Violation",ie}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var wt=me+":"+ye;!Q[wt]&&se<3&&(a("You are manually calling a React.PropTypes validation function for the `"+Te+"` prop on `"+me+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),Q[wt]=!0,se++)}}return fe[ye]==null?ce?fe[ye]===null?new d("The "+Ee+" `"+Te+"` is marked as required "+("in `"+me+"`, but its value is `null`.")):new d("The "+Ee+" `"+Te+"` is marked as required in "+("`"+me+"`, but its value is `undefined`.")):null:Z(fe,ye,me,Ee,Te)}var ne=ue.bind(null,!1);return ne.isRequired=ue.bind(null,!0),ne}function m(Z){function Q(se,ue,ne,ce,fe,ye){var me=se[ue],Ee=J(me);if(Ee!==Z){var Te=Y(me);return new d("Invalid "+ce+" `"+fe+"` of type "+("`"+Te+"` supplied to `"+ne+"`, expected ")+("`"+Z+"`."),{expectedType:Z})}return null}return b(Q)}function S(){return b(u)}function E(Z){function Q(se,ue,ne,ce,fe){if(typeof Z!="function")return new d("Property `"+fe+"` of component `"+ne+"` has invalid PropType notation inside arrayOf.");var ye=se[ue];if(!Array.isArray(ye)){var me=J(ye);return new d("Invalid "+ce+" `"+fe+"` of type "+("`"+me+"` supplied to `"+ne+"`, expected an array."))}for(var Ee=0;Ee<ye.length;Ee++){var Te=Z(ye,Ee,ne,ce,fe+"["+Ee+"]",r);if(Te instanceof Error)return Te}return null}return b(Q)}function R(){function Z(Q,se,ue,ne,ce){var fe=Q[se];if(!c(fe)){var ye=J(fe);return new d("Invalid "+ne+" `"+ce+"` of type "+("`"+ye+"` supplied to `"+ue+"`, expected a single ReactElement."))}return null}return b(Z)}function O(){function Z(Q,se,ue,ne,ce){var fe=Q[se];if(!e.isValidElementType(fe)){var ye=J(fe);return new d("Invalid "+ne+" `"+ce+"` of type "+("`"+ye+"` supplied to `"+ue+"`, expected a single ReactElement type."))}return null}return b(Z)}function k(Z){function Q(se,ue,ne,ce,fe){if(!(se[ue]instanceof Z)){var ye=Z.name||p,me=de(se[ue]);return new d("Invalid "+ce+" `"+fe+"` of type "+("`"+me+"` supplied to `"+ne+"`, expected ")+("instance of `"+ye+"`."))}return null}return b(Q)}function W(Z){if(!Array.isArray(Z))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):a("Invalid argument supplied to oneOf, expected an array.")),u;function Q(se,ue,ne,ce,fe){for(var ye=se[ue],me=0;me<Z.length;me++)if(x(ye,Z[me]))return null;var Ee=JSON.stringify(Z,function(Ve,ie){var wt=Y(ie);return wt==="symbol"?String(ie):ie});return new d("Invalid "+ce+" `"+fe+"` of value `"+String(ye)+"` "+("supplied to `"+ne+"`, expected one of "+Ee+"."))}return b(Q)}function M(Z){function Q(se,ue,ne,ce,fe){if(typeof Z!="function")return new d("Property `"+fe+"` of component `"+ne+"` has invalid PropType notation inside objectOf.");var ye=se[ue],me=J(ye);if(me!=="object")return new d("Invalid "+ce+" `"+fe+"` of type "+("`"+me+"` supplied to `"+ne+"`, expected an object."));for(var Ee in ye)if(i(ye,Ee)){var Te=Z(ye,Ee,ne,ce,fe+"."+Ee,r);if(Te instanceof Error)return Te}return null}return b(Q)}function F(Z){if(!Array.isArray(Z))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),u;for(var Q=0;Q<Z.length;Q++){var se=Z[Q];if(typeof se!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+te(se)+" at index "+Q+"."),u}function ue(ne,ce,fe,ye,me){for(var Ee=[],Te=0;Te<Z.length;Te++){var Ve=Z[Te],ie=Ve(ne,ce,fe,ye,me,r);if(ie==null)return null;ie.data&&i(ie.data,"expectedType")&&Ee.push(ie.data.expectedType)}var wt=Ee.length>0?", expected one of type ["+Ee.join(", ")+"]":"";return new d("Invalid "+ye+" `"+me+"` supplied to "+("`"+fe+"`"+wt+"."))}return b(ue)}function G(){function Z(Q,se,ue,ne,ce){return q(Q[se])?null:new d("Invalid "+ne+" `"+ce+"` supplied to "+("`"+ue+"`, expected a ReactNode."))}return b(Z)}function j(Z,Q,se,ue,ne){return new d((Z||"React class")+": "+Q+" type `"+se+"."+ue+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+ne+"`.")}function L(Z){function Q(se,ue,ne,ce,fe){var ye=se[ue],me=J(ye);if(me!=="object")return new d("Invalid "+ce+" `"+fe+"` of type `"+me+"` "+("supplied to `"+ne+"`, expected `object`."));for(var Ee in Z){var Te=Z[Ee];if(typeof Te!="function")return j(ne,ce,fe,Ee,Y(Te));var Ve=Te(ye,Ee,ne,ce,fe+"."+Ee,r);if(Ve)return Ve}return null}return b(Q)}function H(Z){function Q(se,ue,ne,ce,fe){var ye=se[ue],me=J(ye);if(me!=="object")return new d("Invalid "+ce+" `"+fe+"` of type `"+me+"` "+("supplied to `"+ne+"`, expected `object`."));var Ee=t({},se[ue],Z);for(var Te in Ee){var Ve=Z[Te];if(i(Z,Te)&&typeof Ve!="function")return j(ne,ce,fe,Te,Y(Ve));if(!Ve)return new d("Invalid "+ce+" `"+fe+"` key `"+Te+"` supplied to `"+ne+"`.\nBad object: "+JSON.stringify(se[ue],null," ")+`
81
+ Valid keys: `+JSON.stringify(Object.keys(Z),null," "));var ie=Ve(ye,Te,ne,ce,fe+"."+Te,r);if(ie)return ie}return null}return b(Q)}function q(Z){switch(typeof Z){case"number":case"string":case"undefined":return!0;case"boolean":return!Z;case"object":if(Array.isArray(Z))return Z.every(q);if(Z===null||c(Z))return!0;var Q=v(Z);if(Q){var se=Q.call(Z),ue;if(Q!==Z.entries){for(;!(ue=se.next()).done;)if(!q(ue.value))return!1}else for(;!(ue=se.next()).done;){var ne=ue.value;if(ne&&!q(ne[1]))return!1}}else return!1;return!0;default:return!1}}function C(Z,Q){return Z==="symbol"?!0:Q?Q["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&Q instanceof Symbol:!1}function J(Z){var Q=typeof Z;return Array.isArray(Z)?"array":Z instanceof RegExp?"object":C(Q,Z)?"symbol":Q}function Y(Z){if(typeof Z>"u"||Z===null)return""+Z;var Q=J(Z);if(Q==="object"){if(Z instanceof Date)return"date";if(Z instanceof RegExp)return"regexp"}return Q}function te(Z){var Q=Y(Z);switch(Q){case"array":case"object":return"an "+Q;case"boolean":case"date":case"regexp":return"a "+Q;default:return Q}}function de(Z){return!Z.constructor||!Z.constructor.name?p:Z.constructor.name}return y.checkPropTypes=s,y.resetWarningCache=s.resetWarningCache,y.PropTypes=y,y},Vl}var Yl,Gg;function iC(){if(Gg)return Yl;Gg=1;var e=nf();function t(){}function r(){}return r.resetWarningCache=t,Yl=function(){function i(u,c,f,g,h,v){if(v!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}i.isRequired=i;function s(){return i}var a={array:i,bigint:i,bool:i,func:i,number:i,object:i,string:i,symbol:i,any:i,arrayOf:s,element:i,elementType:i,instanceOf:s,node:i,objectOf:s,oneOf:s,oneOfType:s,shape:s,exact:s,checkPropTypes:r,resetWarningCache:t};return a.PropTypes=a,a},Yl}var Kg;function oC(){if(Kg)return ea.exports;if(Kg=1,process.env.NODE_ENV!=="production"){var e=ty(),t=!0;ea.exports=nC()(e.isElement,t)}else ea.exports=iC()();return ea.exports}var Vg;function sC(){return Vg||(Vg=1,(function(e){(function(t,r){r(e,B,oC())})(Qs,function(t,r,i){Object.defineProperty(t,"__esModule",{value:!0}),t.setHasSupportToCaptureOption=x;var s=u(r),a=u(i);function u(S){return S&&S.__esModule?S:{default:S}}var c=Object.assign||function(S){for(var E=1;E<arguments.length;E++){var R=arguments[E];for(var O in R)Object.prototype.hasOwnProperty.call(R,O)&&(S[O]=R[O])}return S};function f(S,E){var R={};for(var O in S)E.indexOf(O)>=0||Object.prototype.hasOwnProperty.call(S,O)&&(R[O]=S[O]);return R}function g(S,E){if(!(S instanceof E))throw new TypeError("Cannot call a class as a function")}var h=(function(){function S(E,R){for(var O=0;O<R.length;O++){var k=R[O];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(E,k.key,k)}}return function(E,R,O){return R&&S(E.prototype,R),O&&S(E,O),E}})();function v(S,E){if(!S)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E&&(typeof E=="object"||typeof E=="function")?E:S}function p(S,E){if(typeof E!="function"&&E!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof E);S.prototype=Object.create(E&&E.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}),E&&(Object.setPrototypeOf?Object.setPrototypeOf(S,E):S.__proto__=E)}var y=!1;function x(S){y=S}try{addEventListener("test",null,Object.defineProperty({},"capture",{get:function(){x(!0)}}))}catch{}function d(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{capture:!0};return y?S:S.capture}function b(S){if("touches"in S){var E=S.touches[0],R=E.pageX,O=E.pageY;return{x:R,y:O}}var k=S.screenX,W=S.screenY;return{x:k,y:W}}var m=(function(S){p(E,S);function E(){var R;g(this,E);for(var O=arguments.length,k=Array(O),W=0;W<O;W++)k[W]=arguments[W];var M=v(this,(R=E.__proto__||Object.getPrototypeOf(E)).call.apply(R,[this].concat(k)));return M._handleSwipeStart=M._handleSwipeStart.bind(M),M._handleSwipeMove=M._handleSwipeMove.bind(M),M._handleSwipeEnd=M._handleSwipeEnd.bind(M),M._onMouseDown=M._onMouseDown.bind(M),M._onMouseMove=M._onMouseMove.bind(M),M._onMouseUp=M._onMouseUp.bind(M),M._setSwiperRef=M._setSwiperRef.bind(M),M}return h(E,[{key:"componentDidMount",value:function(){this.swiper&&this.swiper.addEventListener("touchmove",this._handleSwipeMove,d({capture:!0,passive:!1}))}},{key:"componentWillUnmount",value:function(){this.swiper&&this.swiper.removeEventListener("touchmove",this._handleSwipeMove,d({capture:!0,passive:!1}))}},{key:"_onMouseDown",value:function(O){this.props.allowMouseEvents&&(this.mouseDown=!0,document.addEventListener("mouseup",this._onMouseUp),document.addEventListener("mousemove",this._onMouseMove),this._handleSwipeStart(O))}},{key:"_onMouseMove",value:function(O){this.mouseDown&&this._handleSwipeMove(O)}},{key:"_onMouseUp",value:function(O){this.mouseDown=!1,document.removeEventListener("mouseup",this._onMouseUp),document.removeEventListener("mousemove",this._onMouseMove),this._handleSwipeEnd(O)}},{key:"_handleSwipeStart",value:function(O){var k=b(O),W=k.x,M=k.y;this.moveStart={x:W,y:M},this.props.onSwipeStart(O)}},{key:"_handleSwipeMove",value:function(O){if(this.moveStart){var k=b(O),W=k.x,M=k.y,F=W-this.moveStart.x,G=M-this.moveStart.y;this.moving=!0;var j=this.props.onSwipeMove({x:F,y:G},O);j&&O.cancelable&&O.preventDefault(),this.movePosition={deltaX:F,deltaY:G}}}},{key:"_handleSwipeEnd",value:function(O){this.props.onSwipeEnd(O);var k=this.props.tolerance;this.moving&&this.movePosition&&(this.movePosition.deltaX<-k?this.props.onSwipeLeft(1,O):this.movePosition.deltaX>k&&this.props.onSwipeRight(1,O),this.movePosition.deltaY<-k?this.props.onSwipeUp(1,O):this.movePosition.deltaY>k&&this.props.onSwipeDown(1,O)),this.moveStart=null,this.moving=!1,this.movePosition=null}},{key:"_setSwiperRef",value:function(O){this.swiper=O,this.props.innerRef(O)}},{key:"render",value:function(){var O=this.props;O.tagName;var k=O.className,W=O.style,M=O.children;O.allowMouseEvents,O.onSwipeUp,O.onSwipeDown,O.onSwipeLeft,O.onSwipeRight,O.onSwipeStart,O.onSwipeMove,O.onSwipeEnd,O.innerRef,O.tolerance;var F=f(O,["tagName","className","style","children","allowMouseEvents","onSwipeUp","onSwipeDown","onSwipeLeft","onSwipeRight","onSwipeStart","onSwipeMove","onSwipeEnd","innerRef","tolerance"]);return s.default.createElement(this.props.tagName,c({ref:this._setSwiperRef,onMouseDown:this._onMouseDown,onTouchStart:this._handleSwipeStart,onTouchEnd:this._handleSwipeEnd,className:k,style:W},F),M)}}]),E})(r.Component);m.displayName="ReactSwipe",m.propTypes={tagName:a.default.string,className:a.default.string,style:a.default.object,children:a.default.node,allowMouseEvents:a.default.bool,onSwipeUp:a.default.func,onSwipeDown:a.default.func,onSwipeLeft:a.default.func,onSwipeRight:a.default.func,onSwipeStart:a.default.func,onSwipeMove:a.default.func,onSwipeEnd:a.default.func,innerRef:a.default.func,tolerance:a.default.number.isRequired},m.defaultProps={tagName:"div",allowMouseEvents:!1,onSwipeUp:function(){},onSwipeDown:function(){},onSwipeLeft:function(){},onSwipeRight:function(){},onSwipeStart:function(){},onSwipeMove:function(){},onSwipeEnd:function(){},innerRef:function(){},tolerance:0},t.default=m})})(Qs)),Qs}var Yg;function ny(){return Yg||(Yg=1,(function(e){(function(t,r){r(e,sC())})(Js,function(t,r){Object.defineProperty(t,"__esModule",{value:!0});var i=s(r);function s(a){return a&&a.__esModule?a:{default:a}}t.default=i.default})})(Js)),Js}var lo={},Xg;function iy(){if(Xg)return lo;Xg=1,Object.defineProperty(lo,"__esModule",{value:!0}),lo.default=void 0;var e=t(pv());function t(s){return s&&s.__esModule?s:{default:s}}function r(s,a,u){return a in s?Object.defineProperty(s,a,{value:u,enumerable:!0,configurable:!0,writable:!0}):s[a]=u,s}var i={ROOT:function(a){return(0,e.default)(r({"carousel-root":!0},a||"",!!a))},CAROUSEL:function(a){return(0,e.default)({carousel:!0,"carousel-slider":a})},WRAPPER:function(a,u){return(0,e.default)({"thumbs-wrapper":!a,"slider-wrapper":a,"axis-horizontal":u==="horizontal","axis-vertical":u!=="horizontal"})},SLIDER:function(a,u){return(0,e.default)({thumbs:!a,slider:a,animated:!u})},ITEM:function(a,u,c){return(0,e.default)({thumb:!a,slide:a,selected:u,previous:c})},ARROW_PREV:function(a){return(0,e.default)({"control-arrow control-prev":!0,"control-disabled":a})},ARROW_NEXT:function(a){return(0,e.default)({"control-arrow control-next":!0,"control-disabled":a})},DOT:function(a){return(0,e.default)({dot:!0,selected:a})}};return lo.default=i,lo}var co={},fo={},Jg;function aC(){if(Jg)return fo;Jg=1,Object.defineProperty(fo,"__esModule",{value:!0}),fo.outerWidth=void 0;var e=function(r){var i=r.offsetWidth,s=getComputedStyle(r);return i+=parseInt(s.marginLeft)+parseInt(s.marginRight),i};return fo.outerWidth=e,fo}var po={},Qg;function of(){if(Qg)return po;Qg=1,Object.defineProperty(po,"__esModule",{value:!0}),po.default=void 0;var e=function(r,i,s){var a=r===0?r:r+i,u=s==="horizontal"?[a,0,0]:[0,a,0],c="translate3d",f="("+u.join(",")+")";return c+f};return po.default=e,po}var ho={},em;function oy(){if(em)return ho;em=1,Object.defineProperty(ho,"__esModule",{value:!0}),ho.default=void 0;var e=function(){return window};return ho.default=e,ho}var tm;function sy(){if(tm)return co;tm=1,Object.defineProperty(co,"__esModule",{value:!0}),co.default=void 0;var e=f(B),t=u(iy()),r=aC(),i=u(of()),s=u(ny()),a=u(oy());function u(M){return M&&M.__esModule?M:{default:M}}function c(){if(typeof WeakMap!="function")return null;var M=new WeakMap;return c=function(){return M},M}function f(M){if(M&&M.__esModule)return M;if(M===null||g(M)!=="object"&&typeof M!="function")return{default:M};var F=c();if(F&&F.has(M))return F.get(M);var G={},j=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var L in M)if(Object.prototype.hasOwnProperty.call(M,L)){var H=j?Object.getOwnPropertyDescriptor(M,L):null;H&&(H.get||H.set)?Object.defineProperty(G,L,H):G[L]=M[L]}return G.default=M,F&&F.set(M,G),G}function g(M){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?g=function(G){return typeof G}:g=function(G){return G&&typeof Symbol=="function"&&G.constructor===Symbol&&G!==Symbol.prototype?"symbol":typeof G},g(M)}function h(){return h=Object.assign||function(M){for(var F=1;F<arguments.length;F++){var G=arguments[F];for(var j in G)Object.prototype.hasOwnProperty.call(G,j)&&(M[j]=G[j])}return M},h.apply(this,arguments)}function v(M,F){if(!(M instanceof F))throw new TypeError("Cannot call a class as a function")}function p(M,F){for(var G=0;G<F.length;G++){var j=F[G];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(M,j.key,j)}}function y(M,F,G){return F&&p(M.prototype,F),M}function x(M,F){if(typeof F!="function"&&F!==null)throw new TypeError("Super expression must either be null or a function");M.prototype=Object.create(F&&F.prototype,{constructor:{value:M,writable:!0,configurable:!0}}),F&&d(M,F)}function d(M,F){return d=Object.setPrototypeOf||function(j,L){return j.__proto__=L,j},d(M,F)}function b(M){var F=E();return function(){var j=R(M),L;if(F){var H=R(this).constructor;L=Reflect.construct(j,arguments,H)}else L=j.apply(this,arguments);return m(this,L)}}function m(M,F){return F&&(g(F)==="object"||typeof F=="function")?F:S(M)}function S(M){if(M===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return M}function E(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function R(M){return R=Object.setPrototypeOf?Object.getPrototypeOf:function(G){return G.__proto__||Object.getPrototypeOf(G)},R(M)}function O(M,F,G){return F in M?Object.defineProperty(M,F,{value:G,enumerable:!0,configurable:!0,writable:!0}):M[F]=G,M}var k=function(F){return F.hasOwnProperty("key")},W=(function(M){x(G,M);var F=b(G);function G(j){var L;return v(this,G),L=F.call(this,j),O(S(L),"itemsWrapperRef",void 0),O(S(L),"itemsListRef",void 0),O(S(L),"thumbsRef",void 0),O(S(L),"setItemsWrapperRef",function(H){L.itemsWrapperRef=H}),O(S(L),"setItemsListRef",function(H){L.itemsListRef=H}),O(S(L),"setThumbsRef",function(H,q){L.thumbsRef||(L.thumbsRef=[]),L.thumbsRef[q]=H}),O(S(L),"updateSizes",function(){if(!(!L.props.children||!L.itemsWrapperRef||!L.thumbsRef)){var H=e.Children.count(L.props.children),q=L.itemsWrapperRef.clientWidth,C=L.props.thumbWidth?L.props.thumbWidth:(0,r.outerWidth)(L.thumbsRef[0]),J=Math.floor(q/C),Y=J<H,te=Y?H-J:0;L.setState(function(de,Z){return{itemSize:C,visibleItems:J,firstItem:Y?L.getFirstItem(Z.selectedItem):0,lastPosition:te,showArrows:Y}})}}),O(S(L),"handleClickItem",function(H,q,C){if(!k(C)||C.key==="Enter"){var J=L.props.onSelectItem;typeof J=="function"&&J(H,q)}}),O(S(L),"onSwipeStart",function(){L.setState({swiping:!0})}),O(S(L),"onSwipeEnd",function(){L.setState({swiping:!1})}),O(S(L),"onSwipeMove",function(H){var q=H.x;if(!L.state.itemSize||!L.itemsWrapperRef||!L.state.visibleItems)return!1;var C=0,J=e.Children.count(L.props.children),Y=-(L.state.firstItem*100)/L.state.visibleItems,te=Math.max(J-L.state.visibleItems,0),de=-te*100/L.state.visibleItems;Y===C&&q>0&&(q=0),Y===de&&q<0&&(q=0);var Z=L.itemsWrapperRef.clientWidth,Q=Y+100/(Z/q);return L.itemsListRef&&["WebkitTransform","MozTransform","MsTransform","OTransform","transform","msTransform"].forEach(function(se){L.itemsListRef.style[se]=(0,i.default)(Q,"%",L.props.axis)}),!0}),O(S(L),"slideRight",function(H){L.moveTo(L.state.firstItem-(typeof H=="number"?H:1))}),O(S(L),"slideLeft",function(H){L.moveTo(L.state.firstItem+(typeof H=="number"?H:1))}),O(S(L),"moveTo",function(H){H=H<0?0:H,H=H>=L.state.lastPosition?L.state.lastPosition:H,L.setState({firstItem:H})}),L.state={selectedItem:j.selectedItem,swiping:!1,showArrows:!1,firstItem:0,visibleItems:0,lastPosition:0},L}return y(G,[{key:"componentDidMount",value:function(){this.setupThumbs()}},{key:"componentDidUpdate",value:function(L){this.props.selectedItem!==this.state.selectedItem&&this.setState({selectedItem:this.props.selectedItem,firstItem:this.getFirstItem(this.props.selectedItem)}),this.props.children!==L.children&&this.updateSizes()}},{key:"componentWillUnmount",value:function(){this.destroyThumbs()}},{key:"setupThumbs",value:function(){(0,a.default)().addEventListener("resize",this.updateSizes),(0,a.default)().addEventListener("DOMContentLoaded",this.updateSizes),this.updateSizes()}},{key:"destroyThumbs",value:function(){(0,a.default)().removeEventListener("resize",this.updateSizes),(0,a.default)().removeEventListener("DOMContentLoaded",this.updateSizes)}},{key:"getFirstItem",value:function(L){var H=L;return L>=this.state.lastPosition&&(H=this.state.lastPosition),L<this.state.firstItem+this.state.visibleItems&&(H=this.state.firstItem),L<this.state.firstItem&&(H=L),H}},{key:"renderItems",value:function(){var L=this;return this.props.children.map(function(H,q){var C=t.default.ITEM(!1,q===L.state.selectedItem),J={key:q,ref:function(te){return L.setThumbsRef(te,q)},className:C,onClick:L.handleClickItem.bind(L,q,L.props.children[q]),onKeyDown:L.handleClickItem.bind(L,q,L.props.children[q]),"aria-label":"".concat(L.props.labels.item," ").concat(q+1),style:{width:L.props.thumbWidth}};return e.default.createElement("li",h({},J,{role:"button",tabIndex:0}),H)})}},{key:"render",value:function(){var L=this;if(!this.props.children)return null;var H=e.Children.count(this.props.children)>1,q=this.state.showArrows&&this.state.firstItem>0,C=this.state.showArrows&&this.state.firstItem<this.state.lastPosition,J={},Y=-this.state.firstItem*(this.state.itemSize||0),te=(0,i.default)(Y,"px",this.props.axis),de=this.props.transitionTime+"ms";return J={WebkitTransform:te,MozTransform:te,MsTransform:te,OTransform:te,transform:te,msTransform:te,WebkitTransitionDuration:de,MozTransitionDuration:de,MsTransitionDuration:de,OTransitionDuration:de,transitionDuration:de,msTransitionDuration:de},e.default.createElement("div",{className:t.default.CAROUSEL(!1)},e.default.createElement("div",{className:t.default.WRAPPER(!1),ref:this.setItemsWrapperRef},e.default.createElement("button",{type:"button",className:t.default.ARROW_PREV(!q),onClick:function(){return L.slideRight()},"aria-label":this.props.labels.leftArrow}),H?e.default.createElement(s.default,{tagName:"ul",className:t.default.SLIDER(!1,this.state.swiping),onSwipeLeft:this.slideLeft,onSwipeRight:this.slideRight,onSwipeMove:this.onSwipeMove,onSwipeStart:this.onSwipeStart,onSwipeEnd:this.onSwipeEnd,style:J,innerRef:this.setItemsListRef,allowMouseEvents:this.props.emulateTouch},this.renderItems()):e.default.createElement("ul",{className:t.default.SLIDER(!1,this.state.swiping),ref:function(Q){return L.setItemsListRef(Q)},style:J},this.renderItems()),e.default.createElement("button",{type:"button",className:t.default.ARROW_NEXT(!C),onClick:function(){return L.slideLeft()},"aria-label":this.props.labels.rightArrow})))}}]),G})(e.Component);return co.default=W,O(W,"displayName","Thumbs"),O(W,"defaultProps",{axis:"horizontal",labels:{leftArrow:"previous slide / item",rightArrow:"next slide / item",item:"slide item"},selectedItem:0,thumbWidth:80,transitionTime:350}),co}var go={},rm;function uC(){if(rm)return go;rm=1,Object.defineProperty(go,"__esModule",{value:!0}),go.default=void 0;var e=function(){return document};return go.default=e,go}var Ut={},nm;function ay(){if(nm)return Ut;nm=1,Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.setPosition=Ut.getPosition=Ut.isKeyboardEvent=Ut.defaultStatusFormatter=Ut.noop=void 0;var e=B,t=r(of());function r(f){return f&&f.__esModule?f:{default:f}}var i=function(){};Ut.noop=i;var s=function(g,h){return"".concat(g," of ").concat(h)};Ut.defaultStatusFormatter=s;var a=function(g){return g?g.hasOwnProperty("key"):!1};Ut.isKeyboardEvent=a;var u=function(g,h){if(h.infiniteLoop&&++g,g===0)return 0;var v=e.Children.count(h.children);if(h.centerMode&&h.axis==="horizontal"){var p=-g*h.centerSlidePercentage,y=v-1;return g&&(g!==y||h.infiniteLoop)?p+=(100-h.centerSlidePercentage)/2:g===y&&(p+=100-h.centerSlidePercentage),p}return-g*100};Ut.getPosition=u;var c=function(g,h){var v={};return["WebkitTransform","MozTransform","MsTransform","OTransform","transform","msTransform"].forEach(function(p){v[p]=(0,t.default)(g,"%",h)}),v};return Ut.setPosition=c,Ut}var hr={},im;function lC(){if(im)return hr;im=1,Object.defineProperty(hr,"__esModule",{value:!0}),hr.fadeAnimationHandler=hr.slideStopSwipingHandler=hr.slideSwipeAnimationHandler=hr.slideAnimationHandler=void 0;var e=B,t=i(of()),r=ay();function i(v){return v&&v.__esModule?v:{default:v}}function s(v,p){var y=Object.keys(v);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(v);p&&(x=x.filter(function(d){return Object.getOwnPropertyDescriptor(v,d).enumerable})),y.push.apply(y,x)}return y}function a(v){for(var p=1;p<arguments.length;p++){var y=arguments[p]!=null?arguments[p]:{};p%2?s(Object(y),!0).forEach(function(x){u(v,x,y[x])}):Object.getOwnPropertyDescriptors?Object.defineProperties(v,Object.getOwnPropertyDescriptors(y)):s(Object(y)).forEach(function(x){Object.defineProperty(v,x,Object.getOwnPropertyDescriptor(y,x))})}return v}function u(v,p,y){return p in v?Object.defineProperty(v,p,{value:y,enumerable:!0,configurable:!0,writable:!0}):v[p]=y,v}var c=function(p,y){var x={},d=y.selectedItem,b=d,m=e.Children.count(p.children)-1,S=p.infiniteLoop&&(d<0||d>m);if(S)return b<0?p.centerMode&&p.centerSlidePercentage&&p.axis==="horizontal"?x.itemListStyle=(0,r.setPosition)(-(m+2)*p.centerSlidePercentage-(100-p.centerSlidePercentage)/2,p.axis):x.itemListStyle=(0,r.setPosition)(-(m+2)*100,p.axis):b>m&&(x.itemListStyle=(0,r.setPosition)(0,p.axis)),x;var E=(0,r.getPosition)(d,p),R=(0,t.default)(E,"%",p.axis),O=p.transitionTime+"ms";return x.itemListStyle={WebkitTransform:R,msTransform:R,OTransform:R,transform:R},y.swiping||(x.itemListStyle=a(a({},x.itemListStyle),{},{WebkitTransitionDuration:O,MozTransitionDuration:O,OTransitionDuration:O,transitionDuration:O,msTransitionDuration:O})),x};hr.slideAnimationHandler=c;var f=function(p,y,x,d){var b={},m=y.axis==="horizontal",S=e.Children.count(y.children),E=0,R=(0,r.getPosition)(x.selectedItem,y),O=y.infiniteLoop?(0,r.getPosition)(S-1,y)-100:(0,r.getPosition)(S-1,y),k=m?p.x:p.y,W=k;R===E&&k>0&&(W=0),R===O&&k<0&&(W=0);var M=R+100/(x.itemSize/W),F=Math.abs(k)>y.swipeScrollTolerance;return y.infiniteLoop&&F&&(x.selectedItem===0&&M>-100?M-=S*100:x.selectedItem===S-1&&M<-S*100&&(M+=S*100)),(!y.preventMovementUntilSwipeScrollTolerance||F||x.swipeMovementStarted)&&(x.swipeMovementStarted||d({swipeMovementStarted:!0}),b.itemListStyle=(0,r.setPosition)(M,y.axis)),F&&!x.cancelClick&&d({cancelClick:!0}),b};hr.slideSwipeAnimationHandler=f;var g=function(p,y){var x=(0,r.getPosition)(y.selectedItem,p),d=(0,r.setPosition)(x,p.axis);return{itemListStyle:d}};hr.slideStopSwipingHandler=g;var h=function(p,y){var x=p.transitionTime+"ms",d="ease-in-out",b={position:"absolute",display:"block",zIndex:-2,minHeight:"100%",opacity:0,top:0,right:0,left:0,bottom:0,transitionTimingFunction:d,msTransitionTimingFunction:d,MozTransitionTimingFunction:d,WebkitTransitionTimingFunction:d,OTransitionTimingFunction:d};return y.swiping||(b=a(a({},b),{},{WebkitTransitionDuration:x,MozTransitionDuration:x,OTransitionDuration:x,transitionDuration:x,msTransitionDuration:x})),{slideStyle:b,selectedStyle:a(a({},b),{},{opacity:1,position:"relative"}),prevStyle:a({},b)}};return hr.fadeAnimationHandler=h,hr}var om;function cC(){if(om)return uo;om=1,Object.defineProperty(uo,"__esModule",{value:!0}),uo.default=void 0;var e=h(B),t=f(ny()),r=f(iy()),i=f(sy()),s=f(uC()),a=f(oy()),u=ay(),c=lC();function f(j){return j&&j.__esModule?j:{default:j}}function g(){if(typeof WeakMap!="function")return null;var j=new WeakMap;return g=function(){return j},j}function h(j){if(j&&j.__esModule)return j;if(j===null||v(j)!=="object"&&typeof j!="function")return{default:j};var L=g();if(L&&L.has(j))return L.get(j);var H={},q=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var C in j)if(Object.prototype.hasOwnProperty.call(j,C)){var J=q?Object.getOwnPropertyDescriptor(j,C):null;J&&(J.get||J.set)?Object.defineProperty(H,C,J):H[C]=j[C]}return H.default=j,L&&L.set(j,H),H}function v(j){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?v=function(H){return typeof H}:v=function(H){return H&&typeof Symbol=="function"&&H.constructor===Symbol&&H!==Symbol.prototype?"symbol":typeof H},v(j)}function p(){return p=Object.assign||function(j){for(var L=1;L<arguments.length;L++){var H=arguments[L];for(var q in H)Object.prototype.hasOwnProperty.call(H,q)&&(j[q]=H[q])}return j},p.apply(this,arguments)}function y(j,L){var H=Object.keys(j);if(Object.getOwnPropertySymbols){var q=Object.getOwnPropertySymbols(j);L&&(q=q.filter(function(C){return Object.getOwnPropertyDescriptor(j,C).enumerable})),H.push.apply(H,q)}return H}function x(j){for(var L=1;L<arguments.length;L++){var H=arguments[L]!=null?arguments[L]:{};L%2?y(Object(H),!0).forEach(function(q){F(j,q,H[q])}):Object.getOwnPropertyDescriptors?Object.defineProperties(j,Object.getOwnPropertyDescriptors(H)):y(Object(H)).forEach(function(q){Object.defineProperty(j,q,Object.getOwnPropertyDescriptor(H,q))})}return j}function d(j,L){if(!(j instanceof L))throw new TypeError("Cannot call a class as a function")}function b(j,L){for(var H=0;H<L.length;H++){var q=L[H];q.enumerable=q.enumerable||!1,q.configurable=!0,"value"in q&&(q.writable=!0),Object.defineProperty(j,q.key,q)}}function m(j,L,H){return L&&b(j.prototype,L),j}function S(j,L){if(typeof L!="function"&&L!==null)throw new TypeError("Super expression must either be null or a function");j.prototype=Object.create(L&&L.prototype,{constructor:{value:j,writable:!0,configurable:!0}}),L&&E(j,L)}function E(j,L){return E=Object.setPrototypeOf||function(q,C){return q.__proto__=C,q},E(j,L)}function R(j){var L=W();return function(){var q=M(j),C;if(L){var J=M(this).constructor;C=Reflect.construct(q,arguments,J)}else C=q.apply(this,arguments);return O(this,C)}}function O(j,L){return L&&(v(L)==="object"||typeof L=="function")?L:k(j)}function k(j){if(j===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return j}function W(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function M(j){return M=Object.setPrototypeOf?Object.getPrototypeOf:function(H){return H.__proto__||Object.getPrototypeOf(H)},M(j)}function F(j,L,H){return L in j?Object.defineProperty(j,L,{value:H,enumerable:!0,configurable:!0,writable:!0}):j[L]=H,j}var G=(function(j){S(H,j);var L=R(H);function H(q){var C;d(this,H),C=L.call(this,q),F(k(C),"thumbsRef",void 0),F(k(C),"carouselWrapperRef",void 0),F(k(C),"listRef",void 0),F(k(C),"itemsRef",void 0),F(k(C),"timer",void 0),F(k(C),"animationHandler",void 0),F(k(C),"setThumbsRef",function(Y){C.thumbsRef=Y}),F(k(C),"setCarouselWrapperRef",function(Y){C.carouselWrapperRef=Y}),F(k(C),"setListRef",function(Y){C.listRef=Y}),F(k(C),"setItemsRef",function(Y,te){C.itemsRef||(C.itemsRef=[]),C.itemsRef[te]=Y}),F(k(C),"autoPlay",function(){e.Children.count(C.props.children)<=1||(C.clearAutoPlay(),C.props.autoPlay&&(C.timer=setTimeout(function(){C.increment()},C.props.interval)))}),F(k(C),"clearAutoPlay",function(){C.timer&&clearTimeout(C.timer)}),F(k(C),"resetAutoPlay",function(){C.clearAutoPlay(),C.autoPlay()}),F(k(C),"stopOnHover",function(){C.setState({isMouseEntered:!0},C.clearAutoPlay)}),F(k(C),"startOnLeave",function(){C.setState({isMouseEntered:!1},C.autoPlay)}),F(k(C),"isFocusWithinTheCarousel",function(){return C.carouselWrapperRef?!!((0,s.default)().activeElement===C.carouselWrapperRef||C.carouselWrapperRef.contains((0,s.default)().activeElement)):!1}),F(k(C),"navigateWithKeyboard",function(Y){if(C.isFocusWithinTheCarousel()){var te=C.props.axis,de=te==="horizontal",Z={ArrowUp:38,ArrowRight:39,ArrowDown:40,ArrowLeft:37},Q=de?Z.ArrowRight:Z.ArrowDown,se=de?Z.ArrowLeft:Z.ArrowUp;Q===Y.keyCode?C.increment():se===Y.keyCode&&C.decrement()}}),F(k(C),"updateSizes",function(){if(!(!C.state.initialized||!C.itemsRef||C.itemsRef.length===0)){var Y=C.props.axis==="horizontal",te=C.itemsRef[0];if(te){var de=Y?te.clientWidth:te.clientHeight;C.setState({itemSize:de}),C.thumbsRef&&C.thumbsRef.updateSizes()}}}),F(k(C),"setMountState",function(){C.setState({hasMount:!0}),C.updateSizes()}),F(k(C),"handleClickItem",function(Y,te){if(e.Children.count(C.props.children)!==0){if(C.state.cancelClick){C.setState({cancelClick:!1});return}C.props.onClickItem(Y,te),Y!==C.state.selectedItem&&C.setState({selectedItem:Y})}}),F(k(C),"handleOnChange",function(Y,te){e.Children.count(C.props.children)<=1||C.props.onChange(Y,te)}),F(k(C),"handleClickThumb",function(Y,te){C.props.onClickThumb(Y,te),C.moveTo(Y)}),F(k(C),"onSwipeStart",function(Y){C.setState({swiping:!0}),C.props.onSwipeStart(Y)}),F(k(C),"onSwipeEnd",function(Y){C.setState({swiping:!1,cancelClick:!1,swipeMovementStarted:!1}),C.props.onSwipeEnd(Y),C.clearAutoPlay(),C.state.autoPlay&&C.autoPlay()}),F(k(C),"onSwipeMove",function(Y,te){C.props.onSwipeMove(te);var de=C.props.swipeAnimationHandler(Y,C.props,C.state,C.setState.bind(k(C)));return C.setState(x({},de)),!!Object.keys(de).length}),F(k(C),"decrement",function(){var Y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;C.moveTo(C.state.selectedItem-(typeof Y=="number"?Y:1))}),F(k(C),"increment",function(){var Y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;C.moveTo(C.state.selectedItem+(typeof Y=="number"?Y:1))}),F(k(C),"moveTo",function(Y){if(typeof Y=="number"){var te=e.Children.count(C.props.children)-1;Y<0&&(Y=C.props.infiniteLoop?te:0),Y>te&&(Y=C.props.infiniteLoop?0:te),C.selectItem({selectedItem:Y}),C.state.autoPlay&&C.state.isMouseEntered===!1&&C.resetAutoPlay()}}),F(k(C),"onClickNext",function(){C.increment(1)}),F(k(C),"onClickPrev",function(){C.decrement(1)}),F(k(C),"onSwipeForward",function(){C.increment(1),C.props.emulateTouch&&C.setState({cancelClick:!0})}),F(k(C),"onSwipeBackwards",function(){C.decrement(1),C.props.emulateTouch&&C.setState({cancelClick:!0})}),F(k(C),"changeItem",function(Y){return function(te){(!(0,u.isKeyboardEvent)(te)||te.key==="Enter")&&C.moveTo(Y)}}),F(k(C),"selectItem",function(Y){C.setState(x({previousItem:C.state.selectedItem},Y),function(){C.setState(C.animationHandler(C.props,C.state))}),C.handleOnChange(Y.selectedItem,e.Children.toArray(C.props.children)[Y.selectedItem])}),F(k(C),"getInitialImage",function(){var Y=C.props.selectedItem,te=C.itemsRef&&C.itemsRef[Y],de=te&&te.getElementsByTagName("img")||[];return de[0]}),F(k(C),"getVariableItemHeight",function(Y){var te=C.itemsRef&&C.itemsRef[Y];if(C.state.hasMount&&te&&te.children.length){var de=te.children[0].getElementsByTagName("img")||[];if(de.length>0){var Z=de[0];if(!Z.complete){var Q=function ne(){C.forceUpdate(),Z.removeEventListener("load",ne)};Z.addEventListener("load",Q)}}var se=de[0]||te.children[0],ue=se.clientHeight;return ue>0?ue:null}return null});var J={initialized:!1,previousItem:q.selectedItem,selectedItem:q.selectedItem,hasMount:!1,isMouseEntered:!1,autoPlay:q.autoPlay,swiping:!1,swipeMovementStarted:!1,cancelClick:!1,itemSize:1,itemListStyle:{},slideStyle:{},selectedStyle:{},prevStyle:{}};return C.animationHandler=typeof q.animationHandler=="function"&&q.animationHandler||q.animationHandler==="fade"&&c.fadeAnimationHandler||c.slideAnimationHandler,C.state=x(x({},J),C.animationHandler(q,J)),C}return m(H,[{key:"componentDidMount",value:function(){this.props.children&&this.setupCarousel()}},{key:"componentDidUpdate",value:function(C,J){!C.children&&this.props.children&&!this.state.initialized&&this.setupCarousel(),!C.autoFocus&&this.props.autoFocus&&this.forceFocus(),J.swiping&&!this.state.swiping&&this.setState(x({},this.props.stopSwipingHandler(this.props,this.state))),(C.selectedItem!==this.props.selectedItem||C.centerMode!==this.props.centerMode)&&(this.updateSizes(),this.moveTo(this.props.selectedItem)),C.autoPlay!==this.props.autoPlay&&(this.props.autoPlay?this.setupAutoPlay():this.destroyAutoPlay(),this.setState({autoPlay:this.props.autoPlay}))}},{key:"componentWillUnmount",value:function(){this.destroyCarousel()}},{key:"setupCarousel",value:function(){var C=this;this.bindEvents(),this.state.autoPlay&&e.Children.count(this.props.children)>1&&this.setupAutoPlay(),this.props.autoFocus&&this.forceFocus(),this.setState({initialized:!0},function(){var J=C.getInitialImage();J&&!J.complete?J.addEventListener("load",C.setMountState):C.setMountState()})}},{key:"destroyCarousel",value:function(){this.state.initialized&&(this.unbindEvents(),this.destroyAutoPlay())}},{key:"setupAutoPlay",value:function(){this.autoPlay();var C=this.carouselWrapperRef;this.props.stopOnHover&&C&&(C.addEventListener("mouseenter",this.stopOnHover),C.addEventListener("mouseleave",this.startOnLeave))}},{key:"destroyAutoPlay",value:function(){this.clearAutoPlay();var C=this.carouselWrapperRef;this.props.stopOnHover&&C&&(C.removeEventListener("mouseenter",this.stopOnHover),C.removeEventListener("mouseleave",this.startOnLeave))}},{key:"bindEvents",value:function(){(0,a.default)().addEventListener("resize",this.updateSizes),(0,a.default)().addEventListener("DOMContentLoaded",this.updateSizes),this.props.useKeyboardArrows&&(0,s.default)().addEventListener("keydown",this.navigateWithKeyboard)}},{key:"unbindEvents",value:function(){(0,a.default)().removeEventListener("resize",this.updateSizes),(0,a.default)().removeEventListener("DOMContentLoaded",this.updateSizes);var C=this.getInitialImage();C&&C.removeEventListener("load",this.setMountState),this.props.useKeyboardArrows&&(0,s.default)().removeEventListener("keydown",this.navigateWithKeyboard)}},{key:"forceFocus",value:function(){var C;(C=this.carouselWrapperRef)===null||C===void 0||C.focus()}},{key:"renderItems",value:function(C){var J=this;return this.props.children?e.Children.map(this.props.children,function(Y,te){var de=te===J.state.selectedItem,Z=te===J.state.previousItem,Q=de&&J.state.selectedStyle||Z&&J.state.prevStyle||J.state.slideStyle||{};J.props.centerMode&&J.props.axis==="horizontal"&&(Q=x(x({},Q),{},{minWidth:J.props.centerSlidePercentage+"%"})),J.state.swiping&&J.state.swipeMovementStarted&&(Q=x(x({},Q),{},{pointerEvents:"none"}));var se={ref:function(ne){return J.setItemsRef(ne,te)},key:"itemKey"+te+(C?"clone":""),className:r.default.ITEM(!0,te===J.state.selectedItem,te===J.state.previousItem),onClick:J.handleClickItem.bind(J,te,Y),style:Q};return e.default.createElement("li",se,J.props.renderItem(Y,{isSelected:te===J.state.selectedItem,isPrevious:te===J.state.previousItem}))}):[]}},{key:"renderControls",value:function(){var C=this,J=this.props,Y=J.showIndicators,te=J.labels,de=J.renderIndicator,Z=J.children;return Y?e.default.createElement("ul",{className:"control-dots"},e.Children.map(Z,function(Q,se){return de&&de(C.changeItem(se),se===C.state.selectedItem,se,te.item)})):null}},{key:"renderStatus",value:function(){return this.props.showStatus?e.default.createElement("p",{className:"carousel-status"},this.props.statusFormatter(this.state.selectedItem+1,e.Children.count(this.props.children))):null}},{key:"renderThumbs",value:function(){return!this.props.showThumbs||!this.props.children||e.Children.count(this.props.children)===0?null:e.default.createElement(i.default,{ref:this.setThumbsRef,onSelectItem:this.handleClickThumb,selectedItem:this.state.selectedItem,transitionTime:this.props.transitionTime,thumbWidth:this.props.thumbWidth,labels:this.props.labels,emulateTouch:this.props.emulateTouch},this.props.renderThumbs(this.props.children))}},{key:"render",value:function(){var C=this;if(!this.props.children||e.Children.count(this.props.children)===0)return null;var J=this.props.swipeable&&e.Children.count(this.props.children)>1,Y=this.props.axis==="horizontal",te=this.props.showArrows&&e.Children.count(this.props.children)>1,de=te&&(this.state.selectedItem>0||this.props.infiniteLoop)||!1,Z=te&&(this.state.selectedItem<e.Children.count(this.props.children)-1||this.props.infiniteLoop)||!1,Q=this.renderItems(!0),se=Q.shift(),ue=Q.pop(),ne={className:r.default.SLIDER(!0,this.state.swiping),onSwipeMove:this.onSwipeMove,onSwipeStart:this.onSwipeStart,onSwipeEnd:this.onSwipeEnd,style:this.state.itemListStyle,tolerance:this.props.swipeScrollTolerance},ce={};if(Y){if(ne.onSwipeLeft=this.onSwipeForward,ne.onSwipeRight=this.onSwipeBackwards,this.props.dynamicHeight){var fe=this.getVariableItemHeight(this.state.selectedItem);ce.height=fe||"auto"}}else ne.onSwipeUp=this.props.verticalSwipe==="natural"?this.onSwipeBackwards:this.onSwipeForward,ne.onSwipeDown=this.props.verticalSwipe==="natural"?this.onSwipeForward:this.onSwipeBackwards,ne.style=x(x({},ne.style),{},{height:this.state.itemSize}),ce.height=this.state.itemSize;return e.default.createElement("div",{"aria-label":this.props.ariaLabel,className:r.default.ROOT(this.props.className),ref:this.setCarouselWrapperRef,tabIndex:this.props.useKeyboardArrows?0:void 0},e.default.createElement("div",{className:r.default.CAROUSEL(!0),style:{width:this.props.width}},this.renderControls(),this.props.renderArrowPrev(this.onClickPrev,de,this.props.labels.leftArrow),e.default.createElement("div",{className:r.default.WRAPPER(!0,this.props.axis),style:ce},J?e.default.createElement(t.default,p({tagName:"ul",innerRef:this.setListRef},ne,{allowMouseEvents:this.props.emulateTouch}),this.props.infiniteLoop&&ue,this.renderItems(),this.props.infiniteLoop&&se):e.default.createElement("ul",{className:r.default.SLIDER(!0,this.state.swiping),ref:function(me){return C.setListRef(me)},style:this.state.itemListStyle||{}},this.props.infiniteLoop&&ue,this.renderItems(),this.props.infiniteLoop&&se)),this.props.renderArrowNext(this.onClickNext,Z,this.props.labels.rightArrow),this.renderStatus()),this.renderThumbs())}}]),H})(e.default.Component);return uo.default=G,F(G,"displayName","Carousel"),F(G,"defaultProps",{ariaLabel:void 0,axis:"horizontal",centerSlidePercentage:80,interval:3e3,labels:{leftArrow:"previous slide / item",rightArrow:"next slide / item",item:"slide item"},onClickItem:u.noop,onClickThumb:u.noop,onChange:u.noop,onSwipeStart:function(){},onSwipeEnd:function(){},onSwipeMove:function(){return!1},preventMovementUntilSwipeScrollTolerance:!1,renderArrowPrev:function(L,H,q){return e.default.createElement("button",{type:"button","aria-label":q,className:r.default.ARROW_PREV(!H),onClick:L})},renderArrowNext:function(L,H,q){return e.default.createElement("button",{type:"button","aria-label":q,className:r.default.ARROW_NEXT(!H),onClick:L})},renderIndicator:function(L,H,q,C){return e.default.createElement("li",{className:r.default.DOT(H),onClick:L,onKeyDown:L,value:q,key:q,role:"button",tabIndex:0,"aria-label":"".concat(C," ").concat(q+1)})},renderItem:function(L){return L},renderThumbs:function(L){var H=e.Children.map(L,function(q){var C=q;if(q.type!=="img"&&(C=e.Children.toArray(q.props.children).find(function(J){return J.type==="img"})),!!C)return C});return H.filter(function(q){return q}).length===0?(console.warn("No images found! Can't build the thumb list without images. If you don't need thumbs, set showThumbs={false} in the Carousel. Note that it's not possible to get images rendered inside custom components. More info at https://github.com/leandrowd/react-responsive-carousel/blob/master/TROUBLESHOOTING.md"),[]):H},statusFormatter:u.defaultStatusFormatter,selectedItem:0,showArrows:!0,showIndicators:!0,showStatus:!0,showThumbs:!0,stopOnHover:!0,swipeScrollTolerance:5,swipeable:!0,transitionTime:350,verticalSwipe:"standard",width:"100%",animationHandler:"slide",swipeAnimationHandler:c.slideSwipeAnimationHandler,stopSwipingHandler:c.slideStopSwipingHandler}),uo}var sm={},am;function fC(){return am||(am=1),sm}var um;function dC(){return um||(um=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"Carousel",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"CarouselProps",{enumerable:!0,get:function(){return r.CarouselProps}}),Object.defineProperty(e,"Thumbs",{enumerable:!0,get:function(){return i.default}});var t=s(cC()),r=fC(),i=s(sy());function s(a){return a&&a.__esModule?a:{default:a}}})(Ul)),Ul}var pC=dC();const hC=({tip:e})=>D.jsx("div",{className:"h-full grid pb-8 px-8 place-content-center",children:uy(e,!0)}),gC=({pages:e})=>D.jsx("div",{className:"min-h-[10rem] w-96",children:D.jsx(pC.Carousel,{autoPlay:!1,infiniteLoop:!0,showThumbs:!1,showArrows:!0,showStatus:!1,children:e&&e.map(t=>D.jsx(hC,{tip:t},t.key))})}),mC=({body:e,isInsideCarousel:t})=>D.jsx("article",{className:je(["prose prose-sm max-h-[10rem] overflow-auto p-1 px-2 text-left text-[12px] text-grey-100 ",{"w-60":!t}]),children:D.jsx(ba,{children:e,options:{overrides:{a:{component:({children:r,...i})=>D.jsxs("a",{...i,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-start text-primary-dark",children:[r,D.jsx(ot.FdOutload,{className:"ml-1 mt-px h-4 w-4"})]})}}}})}),vC=({video:e,body:t,title:r,isInsideCarousel:i})=>D.jsxs("div",{className:je([{"flex flex-row":!i,"flex max-h-[10rem] flex-col overflow-y-auto":i}]),children:[D.jsx("div",{className:je([{"mr-1":!i,"mb-1":i}]),children:D.jsx("iframe",{height:i?"auto":90,width:i?"100%":160,src:e==null?void 0:e.link,title:r,allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0})}),D.jsx("article",{className:je(["prose prose-sm p-1 text-left text-xs text-grey-100",{"w-60 overflow-auto":!i,"-mt-6":i}]),children:D.jsx(ba,{children:t||"",options:{overrides:{a:{component:({children:s,...a})=>D.jsxs("a",{...a,target:"_blank",rel:"noopener noreferrer",className:"flex items-start",children:[s,D.jsx(ot.FdOutload,{className:"ml-1 mt-px h-4 w-4"})]})}}}})})]}),uy=(e,t)=>{switch(e.type){case ga.TEXT:return D.jsx(mC,{body:e.body,isInsideCarousel:t});case ga.VIDEO:return D.jsx(vC,{video:e.video,body:e.body,title:e.title,isInsideCarousel:t});case ga.CAROUSEL:return D.jsx(gC,{pages:e.pages})}},ly=B.createContext(void 0);function lm(e,t){const r=[];return e.forEach(i=>{i.key===t&&r.push(i)}),r}const yC=({children:e,enabled:t,baseUrl:r="https://raw.githubusercontent.com/4d/Web-studio-TIPS/main"})=>{const[{tips:i,show:s},a]=B.useState({tips:{},show:!0});B.useEffect(()=>{const c=new AbortController;try{fetch(`${r}/tips.json`,{signal:c.signal}).then(f=>f.json()).then(f=>{const g=f.reduce((h,v)=>lm(f,v.key).length>1?{...h,[v.key]:{type:"carousel",pages:lm(f,v.key)}}:{...h,[v.key]:v},{});a(h=>({...h,tips:g}))})}catch{}return()=>{c.abort()}},[]);const u=()=>{a(c=>({...c,show:!s}))};return D.jsx(ly.Provider,{value:{tips:i,toggleTips:u,show:s,enabled:t},children:e})},cy=e=>{const t=B.useContext(ly);if(t===void 0)throw new Error("useTip must be used within a TipsContext");return{tip:e?t.tips[e]:null,toggleTips:t.toggleTips,show:t.show,enabled:t.enabled}},wC=xa(XP)`
82
82
  &[data-state='open'] > * {
83
83
  display: block !important;
84
84
  }
85
- `,Qm=({tipKey:e,side:t="right",alwaysOn:r,asButton:i=!1})=>{const{tip:s,enabled:a}=Jm(e),[l,c]=W.useState(!1),f=W.useRef(null);return W.useEffect(()=>{if(f.current){const m=new IntersectionObserver(v=>{v[0].isIntersecting||c(!1)});return m.observe(f.current),()=>{f.current&&m.unobserve(f.current)}}},[]),s&&a?D.jsxs($P,{open:l,onOpenChange:c,children:[D.jsx(tC,{ref:f,className:We("focus:outline-none",{"rounded p-1 text-gray-100 hover:bg-primary-hover":i}),onClick:m=>m.stopPropagation(),children:D.jsx("span",{className:We("group-hover:block",{hidden:!r}),children:D.jsx(tt.FdBulb,{className:"h-4 w-4 text-yellow-300"})})}),D.jsx(LP,{side:t,sideOffset:5,onClick:m=>m.stopPropagation(),children:D.jsx("div",{className:"relative rounded border border-grey-50 bg-grey-900 p-2 text-xs text-white shadow-2xl",children:Xm(s)})})]}):null};var rC=Object.defineProperty,nC=(e,t,r)=>t in e?rC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Bl=(e,t,r)=>(nC(e,typeof t!="symbol"?t+"":t,r),r);let iC=class{constructor(){Bl(this,"current",this.detect()),Bl(this,"handoffState","pending"),Bl(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},gi=new iC,Cr=(e,t)=>{gi.isServer?W.useEffect(e,t):W.useLayoutEffect(e,t)};function vi(e){let t=W.useRef(e);return Cr(()=>{t.current=e},[e]),t}let St=function(e){let t=vi(e);return W.useCallback((...r)=>t.current(...r),[t])};function oC(e,t,r){let[i,s]=W.useState(r),a=e!==void 0,l=W.useRef(a),c=W.useRef(!1),f=W.useRef(!1);return a&&!l.current&&!c.current?(c.current=!0,l.current=a,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!a&&l.current&&!f.current&&(f.current=!0,l.current=a,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[a?e:i,St(m=>(a||s(m),t==null?void 0:t(m)))]}function sC(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function zo(){let e=[],t={addEventListener(r,i,s,a){return r.addEventListener(i,s,a),t.add(()=>r.removeEventListener(i,s,a))},requestAnimationFrame(...r){let i=requestAnimationFrame(...r);return t.add(()=>cancelAnimationFrame(i))},nextFrame(...r){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...r))},setTimeout(...r){let i=setTimeout(...r);return t.add(()=>clearTimeout(i))},microTask(...r){let i={current:!0};return sC(()=>{i.current&&r[0]()}),t.add(()=>{i.current=!1})},style(r,i,s){let a=r.style.getPropertyValue(i);return Object.assign(r.style,{[i]:s}),this.add(()=>{Object.assign(r.style,{[i]:a})})},group(r){let i=zo();return r(i),this.add(()=>i.dispose())},add(r){return e.push(r),()=>{let i=e.indexOf(r);if(i>=0)for(let s of e.splice(i,1))s()}},dispose(){for(let r of e.splice(0))r()}};return t}function Xc(){let[e]=W.useState(zo);return W.useEffect(()=>()=>e.dispose(),[e]),e}function aC(){let e=typeof document>"u";return"useSyncExternalStore"in $?(t=>t.useSyncExternalStore)($)(()=>()=>{},()=>!1,()=>!e):!1}function Yc(){let e=aC(),[t,r]=$.useState(gi.isHandoffComplete);return t&&gi.isHandoffComplete===!1&&r(!1),$.useEffect(()=>{t!==!0&&r(!0)},[t]),$.useEffect(()=>gi.handoff(),[]),e?!1:t}var Qg;let Jc=(Qg=W.useId)!=null?Qg:function(){let e=Yc(),[t,r]=W.useState(e?()=>gi.nextId():null);return Cr(()=>{t===null&&r(gi.nextId())},[t]),t!=null?""+t:void 0};function Ar(e,t,...r){if(e in t){let s=t[e];return typeof s=="function"?s(...r):s}let i=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(s=>`"${s}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(i,Ar),i}function ev(e){var t;if(e.type)return e.type;let r=(t=e.as)!=null?t:"button";if(typeof r=="string"&&r.toLowerCase()==="button")return"button"}function uC(e,t){let[r,i]=W.useState(()=>ev(e));return Cr(()=>{i(ev(e))},[e.type,e.as]),Cr(()=>{r||t.current&&t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&i("button")},[r,t]),r}let lC=Symbol();function Wo(...e){let t=W.useRef(e);W.useEffect(()=>{t.current=e},[e]);let r=St(i=>{for(let s of t.current)s!=null&&(typeof s=="function"?s(i):s.current=i)});return e.every(i=>i==null||(i==null?void 0:i[lC]))?void 0:r}function ya(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}var ey=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(ey||{}),pn=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(pn||{});function Zn({ourProps:e,theirProps:t,slot:r,defaultTag:i,features:s,visible:a=!0,name:l,mergeRefs:c}){c=c??cC;let f=ty(t,e);if(a)return Ys(f,r,i,l,c);let m=s??0;if(m&2){let{static:v=!1,...g}=f;if(v)return Ys(g,r,i,l,c)}if(m&1){let{unmount:v=!0,...g}=f;return Ar(v?0:1,{0(){return null},1(){return Ys({...g,hidden:!0,style:{display:"none"}},r,i,l,c)}})}return Ys(f,r,i,l,c)}function Ys(e,t={},r,i,s){let{as:a=r,children:l,refName:c="ref",...f}=Ul(e,["unmount","static"]),m=e.ref!==void 0?{[c]:e.ref}:{},v=typeof l=="function"?l(t):l;"className"in f&&f.className&&typeof f.className=="function"&&(f.className=f.className(t));let g={};if(t){let p=!1,b=[];for(let[x,d]of Object.entries(t))typeof d=="boolean"&&(p=!0),d===!0&&b.push(x);p&&(g["data-headlessui-state"]=b.join(" "))}if(a===W.Fragment&&Object.keys(gc(f)).length>0){if(!W.isValidElement(v)||Array.isArray(v)&&v.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${i} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(f).map(d=>` - ${d}`).join(`
85
+ `,fy=({tipKey:e,side:t="right",alwaysOn:r,asButton:i=!1})=>{const{tip:s,enabled:a}=cy(e),[u,c]=B.useState(!1),f=B.useRef(null);return B.useEffect(()=>{if(f.current){const g=new IntersectionObserver(h=>{h[0].isIntersecting||c(!1)});return g.observe(f.current),()=>{f.current&&g.unobserve(f.current)}}},[]),s&&a?D.jsxs(YP,{open:u,onOpenChange:c,children:[D.jsx(wC,{ref:f,className:je("focus:outline-none",{"rounded p-1 text-gray-100 hover:bg-primary-hover":i}),onClick:g=>g.stopPropagation(),children:D.jsx("span",{className:je("group-hover:block",{hidden:!r}),children:D.jsx(ot.FdBulb,{className:"h-4 w-4 text-yellow-300"})})}),D.jsx(JP,{side:t,sideOffset:5,onClick:g=>g.stopPropagation(),children:D.jsx("div",{className:"relative rounded border border-grey-50 bg-grey-900 p-2 text-xs text-white shadow-2xl",children:uy(s)})})]}):null};var bC=Object.defineProperty,xC=(e,t,r)=>t in e?bC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Xl=(e,t,r)=>(xC(e,typeof t!="symbol"?t+"":t,r),r);let SC=class{constructor(){Xl(this,"current",this.detect()),Xl(this,"handoffState","pending"),Xl(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},bi=new SC,Ir=(e,t)=>{bi.isServer?B.useEffect(e,t):B.useLayoutEffect(e,t)};function xi(e){let t=B.useRef(e);return Ir(()=>{t.current=e},[e]),t}let _t=function(e){let t=xi(e);return B.useCallback((...r)=>t.current(...r),[t])};function EC(e,t,r){let[i,s]=B.useState(r),a=e!==void 0,u=B.useRef(a),c=B.useRef(!1),f=B.useRef(!1);return a&&!u.current&&!c.current?(c.current=!0,u.current=a,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!a&&u.current&&!f.current&&(f.current=!0,u.current=a,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[a?e:i,_t(g=>(a||s(g),t==null?void 0:t(g)))]}function _C(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function qo(){let e=[],t={addEventListener(r,i,s,a){return r.addEventListener(i,s,a),t.add(()=>r.removeEventListener(i,s,a))},requestAnimationFrame(...r){let i=requestAnimationFrame(...r);return t.add(()=>cancelAnimationFrame(i))},nextFrame(...r){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...r))},setTimeout(...r){let i=setTimeout(...r);return t.add(()=>clearTimeout(i))},microTask(...r){let i={current:!0};return _C(()=>{i.current&&r[0]()}),t.add(()=>{i.current=!1})},style(r,i,s){let a=r.style.getPropertyValue(i);return Object.assign(r.style,{[i]:s}),this.add(()=>{Object.assign(r.style,{[i]:a})})},group(r){let i=qo();return r(i),this.add(()=>i.dispose())},add(r){return e.push(r),()=>{let i=e.indexOf(r);if(i>=0)for(let s of e.splice(i,1))s()}},dispose(){for(let r of e.splice(0))r()}};return t}function sf(){let[e]=B.useState(qo);return B.useEffect(()=>()=>e.dispose(),[e]),e}function OC(){let e=typeof document>"u";return"useSyncExternalStore"in $?(t=>t.useSyncExternalStore)($)(()=>()=>{},()=>!1,()=>!e):!1}function af(){let e=OC(),[t,r]=$.useState(bi.isHandoffComplete);return t&&bi.isHandoffComplete===!1&&r(!1),$.useEffect(()=>{t!==!0&&r(!0)},[t]),$.useEffect(()=>bi.handoff(),[]),e?!1:t}var cm;let uf=(cm=B.useId)!=null?cm:function(){let e=af(),[t,r]=B.useState(e?()=>bi.nextId():null);return Ir(()=>{t===null&&r(bi.nextId())},[t]),t!=null?""+t:void 0};function Pr(e,t,...r){if(e in t){let s=t[e];return typeof s=="function"?s(...r):s}let i=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(s=>`"${s}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(i,Pr),i}function fm(e){var t;if(e.type)return e.type;let r=(t=e.as)!=null?t:"button";if(typeof r=="string"&&r.toLowerCase()==="button")return"button"}function TC(e,t){let[r,i]=B.useState(()=>fm(e));return Ir(()=>{i(fm(e))},[e.type,e.as]),Ir(()=>{r||t.current&&t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&i("button")},[r,t]),r}let AC=Symbol();function Zo(...e){let t=B.useRef(e);B.useEffect(()=>{t.current=e},[e]);let r=_t(i=>{for(let s of t.current)s!=null&&(typeof s=="function"?s(i):s.current=i)});return e.every(i=>i==null||(i==null?void 0:i[AC]))?void 0:r}function Ea(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}var dy=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(dy||{}),vn=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(vn||{});function Xn({ourProps:e,theirProps:t,slot:r,defaultTag:i,features:s,visible:a=!0,name:u,mergeRefs:c}){c=c??RC;let f=py(t,e);if(a)return ra(f,r,i,u,c);let g=s??0;if(g&2){let{static:h=!1,...v}=f;if(h)return ra(v,r,i,u,c)}if(g&1){let{unmount:h=!0,...v}=f;return Pr(h?0:1,{0(){return null},1(){return ra({...v,hidden:!0,style:{display:"none"}},r,i,u,c)}})}return ra(f,r,i,u,c)}function ra(e,t={},r,i,s){let{as:a=r,children:u,refName:c="ref",...f}=Jl(e,["unmount","static"]),g=e.ref!==void 0?{[c]:e.ref}:{},h=typeof u=="function"?u(t):u;"className"in f&&f.className&&typeof f.className=="function"&&(f.className=f.className(t));let v={};if(t){let p=!1,y=[];for(let[x,d]of Object.entries(t))typeof d=="boolean"&&(p=!0),d===!0&&y.push(x);p&&(v["data-headlessui-state"]=y.join(" "))}if(a===B.Fragment&&Object.keys(_c(f)).length>0){if(!B.isValidElement(h)||Array.isArray(h)&&h.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${i} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(f).map(d=>` - ${d}`).join(`
86
86
  `),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(d=>` - ${d}`).join(`
87
87
  `)].join(`
88
- `));let p=v.props,b=typeof(p==null?void 0:p.className)=="function"?(...d)=>ya(p==null?void 0:p.className(...d),f.className):ya(p==null?void 0:p.className,f.className),x=b?{className:b}:{};return W.cloneElement(v,Object.assign({},ty(v.props,gc(Ul(f,["ref"]))),g,m,{ref:s(v.ref,m.ref)},x))}return W.createElement(a,Object.assign({},Ul(f,["ref"]),a!==W.Fragment&&m,a!==W.Fragment&&g),v)}function cC(...e){return e.every(t=>t==null)?void 0:t=>{for(let r of e)r!=null&&(typeof r=="function"?r(t):r.current=t)}}function ty(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},r={};for(let i of e)for(let s in i)s.startsWith("on")&&typeof i[s]=="function"?(r[s]!=null||(r[s]=[]),r[s].push(i[s])):t[s]=i[s];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(r).map(i=>[i,void 0])));for(let i in r)Object.assign(t,{[i](s,...a){let l=r[i];for(let c of l){if((s instanceof Event||(s==null?void 0:s.nativeEvent)instanceof Event)&&s.defaultPrevented)return;c(s,...a)}}});return t}function Gn(e){var t;return Object.assign(W.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function gc(e){let t=Object.assign({},e);for(let r in t)t[r]===void 0&&delete t[r];return t}function Ul(e,t=[]){let r=Object.assign({},e);for(let i of t)i in r&&delete r[i];return r}let fC="div";var ry=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(ry||{});function dC(e,t){var r;let{features:i=1,...s}=e,a={ref:t,"aria-hidden":(i&2)===2?!0:(r=s["aria-hidden"])!=null?r:void 0,hidden:(i&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(i&4)===4&&(i&2)!==2&&{display:"none"}}};return Zn({ourProps:a,theirProps:s,slot:{},defaultTag:fC,name:"Hidden"})}let pC=Gn(dC),Qc=W.createContext(null);Qc.displayName="OpenClosedContext";var Hr=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Hr||{});function ny(){return W.useContext(Qc)}function hC({value:e,children:t}){return W.createElement(Qc.Provider,{value:e},t)}function gC(e){let t=e.parentElement,r=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(r=t),t=t.parentElement;let i=(t==null?void 0:t.getAttribute("disabled"))==="";return i&&vC(r)?!1:i}function vC(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}function mC(e){var t,r;let i=(t=e==null?void 0:e.form)!=null?t:e.closest("form");if(i){for(let s of i.elements)if(s!==e&&(s.tagName==="INPUT"&&s.type==="submit"||s.tagName==="BUTTON"&&s.type==="submit"||s.nodeName==="INPUT"&&s.type==="image")){s.click();return}(r=i.requestSubmit)==null||r.call(i)}}var vc=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(vc||{});function ef(){let e=W.useRef(!1);return Cr(()=>(e.current=!0,()=>{e.current=!1}),[]),e}let iy=W.createContext(null);function oy(){let e=W.useContext(iy);if(e===null){let t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,oy),t}return e}function yC(){let[e,t]=W.useState([]);return[e.length>0?e.join(" "):void 0,W.useMemo(()=>function(r){let i=St(a=>(t(l=>[...l,a]),()=>t(l=>{let c=l.slice(),f=c.indexOf(a);return f!==-1&&c.splice(f,1),c}))),s=W.useMemo(()=>({register:i,slot:r.slot,name:r.name,props:r.props}),[i,r.slot,r.name,r.props]);return W.createElement(iy.Provider,{value:s},r.children)},[t])]}let bC="p";function wC(e,t){let r=Jc(),{id:i=`headlessui-description-${r}`,...s}=e,a=oy(),l=Wo(t);Cr(()=>a.register(i),[i,a.register]);let c={ref:l,...a.props,id:i};return Zn({ourProps:c,theirProps:s,slot:a.slot||{},defaultTag:bC,name:a.name||"Description"})}let xC=Gn(wC),SC=Object.assign(xC,{}),sy=W.createContext(null);function ay(){let e=W.useContext(sy);if(e===null){let t=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,ay),t}return e}function EC(){let[e,t]=W.useState([]);return[e.length>0?e.join(" "):void 0,W.useMemo(()=>function(r){let i=St(a=>(t(l=>[...l,a]),()=>t(l=>{let c=l.slice(),f=c.indexOf(a);return f!==-1&&c.splice(f,1),c}))),s=W.useMemo(()=>({register:i,slot:r.slot,name:r.name,props:r.props}),[i,r.slot,r.name,r.props]);return W.createElement(sy.Provider,{value:s},r.children)},[t])]}let _C="label";function OC(e,t){let r=Jc(),{id:i=`headlessui-label-${r}`,passive:s=!1,...a}=e,l=ay(),c=Wo(t);Cr(()=>l.register(i),[i,l.register]);let f={ref:c,...l.props,id:i};return s&&("onClick"in f&&(delete f.htmlFor,delete f.onClick),"onClick"in a&&delete a.onClick),Zn({ourProps:f,theirProps:a,slot:l.slot||{},defaultTag:_C,name:l.name||"Label"})}let AC=Gn(OC),TC=Object.assign(AC,{});function RC(e=0){let[t,r]=W.useState(e),i=ef(),s=W.useCallback(f=>{i.current&&r(m=>m|f)},[t,i]),a=W.useCallback(f=>!!(t&f),[t]),l=W.useCallback(f=>{i.current&&r(m=>m&~f)},[r,i]),c=W.useCallback(f=>{i.current&&r(m=>m^f)},[r]);return{flags:t,addFlag:s,hasFlag:a,removeFlag:l,toggleFlag:c}}let tf=W.createContext(null);tf.displayName="GroupContext";let PC=W.Fragment;function CC(e){var t;let[r,i]=W.useState(null),[s,a]=EC(),[l,c]=yC(),f=W.useMemo(()=>({switch:r,setSwitch:i,labelledby:s,describedby:l}),[r,i,s,l]),m={},v=e;return W.createElement(c,{name:"Switch.Description"},W.createElement(a,{name:"Switch.Label",props:{htmlFor:(t=f.switch)==null?void 0:t.id,onClick(g){r&&(g.currentTarget.tagName==="LABEL"&&g.preventDefault(),r.click(),r.focus({preventScroll:!0}))}}},W.createElement(tf.Provider,{value:f},Zn({ourProps:m,theirProps:v,defaultTag:PC,name:"Switch.Group"}))))}let kC="button";function $C(e,t){var r;let i=Jc(),{id:s=`headlessui-switch-${i}`,checked:a,defaultChecked:l=!1,onChange:c,disabled:f=!1,name:m,value:v,form:g,...p}=e,b=W.useContext(tf),x=W.useRef(null),d=Wo(x,t,b===null?null:b.setSwitch),[w,h]=oC(a,c,l),S=St(()=>h==null?void 0:h(!w)),E=St(F=>{if(gC(F.currentTarget))return F.preventDefault();F.preventDefault(),S()}),R=St(F=>{F.key===vc.Space?(F.preventDefault(),S()):F.key===vc.Enter&&mC(F.currentTarget)}),O=St(F=>F.preventDefault()),k=W.useMemo(()=>({checked:w}),[w]),B={id:s,ref:d,role:"switch",type:uC(e,x),tabIndex:e.tabIndex===-1?0:(r=e.tabIndex)!=null?r:0,"aria-checked":w,"aria-labelledby":b==null?void 0:b.labelledby,"aria-describedby":b==null?void 0:b.describedby,disabled:f,onClick:E,onKeyUp:R,onKeyPress:O},M=Xc();return W.useEffect(()=>{var F;let G=(F=x.current)==null?void 0:F.closest("form");G&&l!==void 0&&M.addEventListener(G,"reset",()=>{h(l)})},[x,h]),W.createElement(W.Fragment,null,m!=null&&w&&W.createElement(pC,{features:ry.Hidden,...gc({as:"input",type:"checkbox",hidden:!0,readOnly:!0,disabled:f,form:g,checked:w,name:m,value:v})}),Zn({ourProps:B,theirProps:p,slot:k,defaultTag:kC,name:"Switch"}))}let IC=Gn($C),LC=CC,MC=Object.assign(IC,{Group:LC,Label:TC,Description:SC});function FC(e){let t={called:!1};return(...r)=>{if(!t.called)return t.called=!0,e(...r)}}function Hl(e,...t){e&&t.length>0&&e.classList.add(...t)}function ql(e,...t){e&&t.length>0&&e.classList.remove(...t)}function DC(e,t){let r=zo();if(!e)return r.dispose;let{transitionDuration:i,transitionDelay:s}=getComputedStyle(e),[a,l]=[i,s].map(f=>{let[m=0]=f.split(",").filter(Boolean).map(v=>v.includes("ms")?parseFloat(v):parseFloat(v)*1e3).sort((v,g)=>g-v);return m}),c=a+l;if(c!==0){r.group(m=>{m.setTimeout(()=>{t(),m.dispose()},c),m.addEventListener(e,"transitionrun",v=>{v.target===v.currentTarget&&m.dispose()})});let f=r.addEventListener(e,"transitionend",m=>{m.target===m.currentTarget&&(t(),f())})}else t();return r.add(()=>t()),r.dispose}function NC(e,t,r,i){let s=r?"enter":"leave",a=zo(),l=i!==void 0?FC(i):()=>{};s==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let c=Ar(s,{enter:()=>t.enter,leave:()=>t.leave}),f=Ar(s,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),m=Ar(s,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return ql(e,...t.base,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),Hl(e,...t.base,...c,...m),a.nextFrame(()=>{ql(e,...t.base,...c,...m),Hl(e,...t.base,...c,...f),DC(e,()=>(ql(e,...t.base,...c),Hl(e,...t.base,...t.entered),l()))}),a.dispose}function jC({immediate:e,container:t,direction:r,classes:i,onStart:s,onStop:a}){let l=ef(),c=Xc(),f=vi(r);Cr(()=>{e&&(f.current="enter")},[e]),Cr(()=>{let m=zo();c.add(m.dispose);let v=t.current;if(v&&f.current!=="idle"&&l.current)return m.dispose(),s.current(f.current),m.add(NC(v,i.current,f.current==="enter",()=>{m.dispose(),a.current(f.current)})),m.dispose},[r])}function ln(e=""){return e.split(/\s+/).filter(t=>t.length>1)}let Da=W.createContext(null);Da.displayName="TransitionContext";var zC=(e=>(e.Visible="visible",e.Hidden="hidden",e))(zC||{});function WC(){let e=W.useContext(Da);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function BC(){let e=W.useContext(Na);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let Na=W.createContext(null);Na.displayName="NestingContext";function ja(e){return"children"in e?ja(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function uy(e,t){let r=vi(e),i=W.useRef([]),s=ef(),a=Xc(),l=St((b,x=pn.Hidden)=>{let d=i.current.findIndex(({el:w})=>w===b);d!==-1&&(Ar(x,{[pn.Unmount](){i.current.splice(d,1)},[pn.Hidden](){i.current[d].state="hidden"}}),a.microTask(()=>{var w;!ja(i)&&s.current&&((w=r.current)==null||w.call(r))}))}),c=St(b=>{let x=i.current.find(({el:d})=>d===b);return x?x.state!=="visible"&&(x.state="visible"):i.current.push({el:b,state:"visible"}),()=>l(b,pn.Unmount)}),f=W.useRef([]),m=W.useRef(Promise.resolve()),v=W.useRef({enter:[],leave:[],idle:[]}),g=St((b,x,d)=>{f.current.splice(0),t&&(t.chains.current[x]=t.chains.current[x].filter(([w])=>w!==b)),t==null||t.chains.current[x].push([b,new Promise(w=>{f.current.push(w)})]),t==null||t.chains.current[x].push([b,new Promise(w=>{Promise.all(v.current[x].map(([h,S])=>S)).then(()=>w())})]),x==="enter"?m.current=m.current.then(()=>t==null?void 0:t.wait.current).then(()=>d(x)):d(x)}),p=St((b,x,d)=>{Promise.all(v.current[x].splice(0).map(([w,h])=>h)).then(()=>{var w;(w=f.current.shift())==null||w()}).then(()=>d(x))});return W.useMemo(()=>({children:i,register:c,unregister:l,onStart:g,onStop:p,wait:m,chains:v}),[c,l,i,g,p,v,m])}function UC(){}let HC=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function tv(e){var t;let r={};for(let i of HC)r[i]=(t=e[i])!=null?t:UC;return r}function qC(e){let t=W.useRef(tv(e));return W.useEffect(()=>{t.current=tv(e)},[e]),t}let ZC="div",ly=ey.RenderStrategy;function GC(e,t){var r,i;let{beforeEnter:s,afterEnter:a,beforeLeave:l,afterLeave:c,enter:f,enterFrom:m,enterTo:v,entered:g,leave:p,leaveFrom:b,leaveTo:x,...d}=e,w=W.useRef(null),h=Wo(w,t),S=(r=d.unmount)==null||r?pn.Unmount:pn.Hidden,{show:E,appear:R,initial:O}=WC(),[k,B]=W.useState(E?"visible":"hidden"),M=BC(),{register:F,unregister:G}=M;W.useEffect(()=>F(w),[F,w]),W.useEffect(()=>{if(S===pn.Hidden&&w.current){if(E&&k!=="visible"){B("visible");return}return Ar(k,{hidden:()=>G(w),visible:()=>F(w)})}},[k,w,F,G,E,S]);let j=vi({base:ln(d.className),enter:ln(f),enterFrom:ln(m),enterTo:ln(v),entered:ln(g),leave:ln(p),leaveFrom:ln(b),leaveTo:ln(x)}),L=qC({beforeEnter:s,afterEnter:a,beforeLeave:l,afterLeave:c}),U=Yc();W.useEffect(()=>{if(U&&k==="visible"&&w.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[w,k,U]);let q=O&&!R,C=R&&E&&O,J=!U||q?"idle":E?"enter":"leave",X=RC(0),te=St(ne=>Ar(ne,{enter:()=>{X.addFlag(Hr.Opening),L.current.beforeEnter()},leave:()=>{X.addFlag(Hr.Closing),L.current.beforeLeave()},idle:()=>{}})),de=St(ne=>Ar(ne,{enter:()=>{X.removeFlag(Hr.Opening),L.current.afterEnter()},leave:()=>{X.removeFlag(Hr.Closing),L.current.afterLeave()},idle:()=>{}})),Z=uy(()=>{B("hidden"),G(w)},M),Q=W.useRef(!1);jC({immediate:C,container:w,classes:j,direction:J,onStart:vi(ne=>{Q.current=!0,Z.onStart(w,ne,te)}),onStop:vi(ne=>{Q.current=!1,Z.onStop(w,ne,de),ne==="leave"&&!ja(Z)&&(B("hidden"),G(w))})});let se=d,ue={ref:h};return C?se={...se,className:ya(d.className,...j.current.enter,...j.current.enterFrom)}:Q.current&&(se.className=ya(d.className,(i=w.current)==null?void 0:i.className),se.className===""&&delete se.className),W.createElement(Na.Provider,{value:Z},W.createElement(hC,{value:Ar(k,{visible:Hr.Open,hidden:Hr.Closed})|X.flags},Zn({ourProps:ue,theirProps:se,defaultTag:ZC,features:ly,visible:k==="visible",name:"Transition.Child"})))}function KC(e,t){let{show:r,appear:i=!1,unmount:s=!0,...a}=e,l=W.useRef(null),c=Wo(l,t);Yc();let f=ny();if(r===void 0&&f!==null&&(r=(f&Hr.Open)===Hr.Open),![!0,!1].includes(r))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[m,v]=W.useState(r?"visible":"hidden"),g=uy(()=>{v("hidden")}),[p,b]=W.useState(!0),x=W.useRef([r]);Cr(()=>{p!==!1&&x.current[x.current.length-1]!==r&&(x.current.push(r),b(!1))},[x,r]);let d=W.useMemo(()=>({show:r,appear:i,initial:p}),[r,i,p]);W.useEffect(()=>{if(r)v("visible");else if(!ja(g))v("hidden");else{let E=l.current;if(!E)return;let R=E.getBoundingClientRect();R.x===0&&R.y===0&&R.width===0&&R.height===0&&v("hidden")}},[r,g]);let w={unmount:s},h=St(()=>{var E;p&&b(!1),(E=e.beforeEnter)==null||E.call(e)}),S=St(()=>{var E;p&&b(!1),(E=e.beforeLeave)==null||E.call(e)});return W.createElement(Na.Provider,{value:g},W.createElement(Da.Provider,{value:d},Zn({ourProps:{...w,as:W.Fragment,children:W.createElement(cy,{ref:c,...w,...a,beforeEnter:h,beforeLeave:S})},theirProps:{},defaultTag:W.Fragment,features:ly,visible:m==="visible",name:"Transition"})))}function VC(e,t){let r=W.useContext(Da)!==null,i=ny()!==null;return W.createElement(W.Fragment,null,!r&&i?W.createElement(mc,{ref:t,...e}):W.createElement(cy,{ref:t,...e}))}let mc=Gn(KC),cy=Gn(GC),XC=Gn(VC),ba=Object.assign(mc,{Child:XC,Root:mc});const Zl={xs:{switch:"h-2.5 w-2.5",translate:"translate-x-2.5",container:"w-6 h-3.5"},sm:{switch:"h-3.5 w-3.5",translate:"translate-x-[0.85rem]",container:"h-4.5 w-8"},md:{switch:"h-4 w-4",translate:"translate-x-3",container:"h-5 w-8"},lg:{switch:"h-4 w-4",translate:"translate-x-3",container:"h-5 w-8"}},fy=W.forwardRef(({onChange:e,value:t,size:r="md",className:i="ml-auto"},s)=>{const a=l=>{e(l)};return D.jsx("div",{className:We("flex items-center",i),children:D.jsx(MC,{as:"span",ref:s,checked:t,onChange:a,onKeyDown:l=>{l.key==="Enter"&&a(!t)},className:`${t?"bg-primary-dark":"bg-grey-200"}
89
- relative inline-flex shrink-0 ${Zl[r].container} cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75`,children:D.jsx("span",{"aria-hidden":"true",className:`${t?Zl[r].translate:"translate-x-0"}
90
- pointer-events-none inline-block ${Zl[r].switch} transform rounded-full bg-white shadow-lg ring-0 transition duration-200 ease-in-out`})})})});function rf(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Kn=rf();function dy(e){Kn=e}var Eo={exec:()=>null};function Ce(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(s,a)=>{let l=typeof a=="string"?a:a.source;return l=l.replace(Rt.caret,"$1"),r=r.replace(s,l),i},getRegex:()=>new RegExp(r,t)};return i}var Rt={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},YC=/^(?:[ \t]*(?:\n|$))+/,JC=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,QC=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Bo=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,ek=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,nf=/(?:[*+-]|\d{1,9}[.)])/,py=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,hy=Ce(py).replace(/bull/g,nf).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),tk=Ce(py).replace(/bull/g,nf).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),of=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,rk=/^[^\n]+/,sf=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,nk=Ce(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",sf).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),ik=Ce(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,nf).getRegex(),za="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",af=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,ok=Ce("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",af).replace("tag",za).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),gy=Ce(of).replace("hr",Bo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",za).getRegex(),sk=Ce(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",gy).getRegex(),uf={blockquote:sk,code:JC,def:nk,fences:QC,heading:ek,hr:Bo,html:ok,lheading:hy,list:ik,newline:YC,paragraph:gy,table:Eo,text:rk},rv=Ce("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Bo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",za).getRegex(),ak={...uf,lheading:tk,table:rv,paragraph:Ce(of).replace("hr",Bo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",rv).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",za).getRegex()},uk={...uf,html:Ce(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",af).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Eo,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Ce(of).replace("hr",Bo).replace("heading",` *#{1,6} *[^
91
- ]`).replace("lheading",hy).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},lk=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ck=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,vy=/^( {2,}|\\)\n(?!\s*$)/,fk=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Wa=/[\p{P}\p{S}]/u,lf=/[\s\p{P}\p{S}]/u,my=/[^\s\p{P}\p{S}]/u,dk=Ce(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,lf).getRegex(),yy=/(?!~)[\p{P}\p{S}]/u,pk=/(?!~)[\s\p{P}\p{S}]/u,hk=/(?:[^\s\p{P}\p{S}]|~)/u,gk=/\[(?:[^\[\]`]|`[^`]*?`)*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g,by=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,vk=Ce(by,"u").replace(/punct/g,Wa).getRegex(),mk=Ce(by,"u").replace(/punct/g,yy).getRegex(),wy="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",yk=Ce(wy,"gu").replace(/notPunctSpace/g,my).replace(/punctSpace/g,lf).replace(/punct/g,Wa).getRegex(),bk=Ce(wy,"gu").replace(/notPunctSpace/g,hk).replace(/punctSpace/g,pk).replace(/punct/g,yy).getRegex(),wk=Ce("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,my).replace(/punctSpace/g,lf).replace(/punct/g,Wa).getRegex(),xk=Ce(/\\(punct)/,"gu").replace(/punct/g,Wa).getRegex(),Sk=Ce(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Ek=Ce(af).replace("(?:-->|$)","-->").getRegex(),_k=Ce("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Ek).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),wa=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,Ok=Ce(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",wa).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),xy=Ce(/^!?\[(label)\]\[(ref)\]/).replace("label",wa).replace("ref",sf).getRegex(),Sy=Ce(/^!?\[(ref)\](?:\[\])?/).replace("ref",sf).getRegex(),Ak=Ce("reflink|nolink(?!\\()","g").replace("reflink",xy).replace("nolink",Sy).getRegex(),nv=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,cf={_backpedal:Eo,anyPunctuation:xk,autolink:Sk,blockSkip:gk,br:vy,code:ck,del:Eo,emStrongLDelim:vk,emStrongRDelimAst:yk,emStrongRDelimUnd:wk,escape:lk,link:Ok,nolink:Sy,punctuation:dk,reflink:xy,reflinkSearch:Ak,tag:_k,text:fk,url:Eo},Tk={...cf,link:Ce(/^!?\[(label)\]\((.*?)\)/).replace("label",wa).getRegex(),reflink:Ce(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",wa).getRegex()},yc={...cf,emStrongRDelimAst:bk,emStrongLDelim:mk,url:Ce(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",nv).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:Ce(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",nv).getRegex()},Rk={...yc,br:Ce(vy).replace("{2,}","*").getRegex(),text:Ce(yc.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Js={normal:uf,gfm:ak,pedantic:uk},lo={normal:cf,gfm:yc,breaks:Rk,pedantic:Tk},Pk={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},iv=e=>Pk[e];function Sr(e,t){if(t){if(Rt.escapeTest.test(e))return e.replace(Rt.escapeReplace,iv)}else if(Rt.escapeTestNoEncode.test(e))return e.replace(Rt.escapeReplaceNoEncode,iv);return e}function ov(e){try{e=encodeURI(e).replace(Rt.percentDecode,"%")}catch{return null}return e}function sv(e,t){var a;let r=e.replace(Rt.findPipe,(l,c,f)=>{let m=!1,v=c;for(;--v>=0&&f[v]==="\\";)m=!m;return m?"|":" |"}),i=r.split(Rt.splitPipe),s=0;if(i[0].trim()||i.shift(),i.length>0&&!((a=i.at(-1))!=null&&a.trim())&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;s<i.length;s++)i[s]=i[s].trim().replace(Rt.slashPipe,"|");return i}function co(e,t,r){let i=e.length;if(i===0)return"";let s=0;for(;s<i&&e.charAt(i-s-1)===t;)s++;return e.slice(0,i-s)}function Ck(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let i=0;i<e.length;i++)if(e[i]==="\\")i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return r>0?-2:-1}function av(e,t,r,i,s){let a=t.href,l=t.title||null,c=e[1].replace(s.other.outputLinkReplace,"$1");i.state.inLink=!0;let f={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:l,text:c,tokens:i.inlineTokens(c)};return i.state.inLink=!1,f}function kk(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let s=i[1];return t.split(`
92
- `).map(a=>{let l=a.match(r.other.beginningSpace);if(l===null)return a;let[c]=l;return c.length>=s.length?a.slice(s.length):a}).join(`
93
- `)}var xa=class{constructor(t){me(this,"options");me(this,"rules");me(this,"lexer");this.options=t||Kn}space(t){let r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){let r=this.rules.block.code.exec(t);if(r){let i=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?i:co(i,`
94
- `)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],s=kk(i,r[3]||"",this.rules);return{type:"code",raw:i,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:s}}}heading(t){let r=this.rules.block.heading.exec(t);if(r){let i=r[2].trim();if(this.rules.other.endingHash.test(i)){let s=co(i,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(i=s.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(t){let r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:co(r[0],`
95
- `)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=co(r[0],`
88
+ `));let p=h.props,y=typeof(p==null?void 0:p.className)=="function"?(...d)=>Ea(p==null?void 0:p.className(...d),f.className):Ea(p==null?void 0:p.className,f.className),x=y?{className:y}:{};return B.cloneElement(h,Object.assign({},py(h.props,_c(Jl(f,["ref"]))),v,g,{ref:s(h.ref,g.ref)},x))}return B.createElement(a,Object.assign({},Jl(f,["ref"]),a!==B.Fragment&&g,a!==B.Fragment&&v),h)}function RC(...e){return e.every(t=>t==null)?void 0:t=>{for(let r of e)r!=null&&(typeof r=="function"?r(t):r.current=t)}}function py(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},r={};for(let i of e)for(let s in i)s.startsWith("on")&&typeof i[s]=="function"?(r[s]!=null||(r[s]=[]),r[s].push(i[s])):t[s]=i[s];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(r).map(i=>[i,void 0])));for(let i in r)Object.assign(t,{[i](s,...a){let u=r[i];for(let c of u){if((s instanceof Event||(s==null?void 0:s.nativeEvent)instanceof Event)&&s.defaultPrevented)return;c(s,...a)}}});return t}function Jn(e){var t;return Object.assign(B.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function _c(e){let t=Object.assign({},e);for(let r in t)t[r]===void 0&&delete t[r];return t}function Jl(e,t=[]){let r=Object.assign({},e);for(let i of t)i in r&&delete r[i];return r}let PC="div";var hy=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(hy||{});function CC(e,t){var r;let{features:i=1,...s}=e,a={ref:t,"aria-hidden":(i&2)===2?!0:(r=s["aria-hidden"])!=null?r:void 0,hidden:(i&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(i&4)===4&&(i&2)!==2&&{display:"none"}}};return Xn({ourProps:a,theirProps:s,slot:{},defaultTag:PC,name:"Hidden"})}let kC=Jn(CC),lf=B.createContext(null);lf.displayName="OpenClosedContext";var Gr=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Gr||{});function gy(){return B.useContext(lf)}function $C({value:e,children:t}){return B.createElement(lf.Provider,{value:e},t)}function IC(e){let t=e.parentElement,r=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(r=t),t=t.parentElement;let i=(t==null?void 0:t.getAttribute("disabled"))==="";return i&&LC(r)?!1:i}function LC(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}function MC(e){var t,r;let i=(t=e==null?void 0:e.form)!=null?t:e.closest("form");if(i){for(let s of i.elements)if(s!==e&&(s.tagName==="INPUT"&&s.type==="submit"||s.tagName==="BUTTON"&&s.type==="submit"||s.nodeName==="INPUT"&&s.type==="image")){s.click();return}(r=i.requestSubmit)==null||r.call(i)}}var Oc=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(Oc||{});function cf(){let e=B.useRef(!1);return Ir(()=>(e.current=!0,()=>{e.current=!1}),[]),e}let my=B.createContext(null);function vy(){let e=B.useContext(my);if(e===null){let t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,vy),t}return e}function DC(){let[e,t]=B.useState([]);return[e.length>0?e.join(" "):void 0,B.useMemo(()=>function(r){let i=_t(a=>(t(u=>[...u,a]),()=>t(u=>{let c=u.slice(),f=c.indexOf(a);return f!==-1&&c.splice(f,1),c}))),s=B.useMemo(()=>({register:i,slot:r.slot,name:r.name,props:r.props}),[i,r.slot,r.name,r.props]);return B.createElement(my.Provider,{value:s},r.children)},[t])]}let FC="p";function NC(e,t){let r=uf(),{id:i=`headlessui-description-${r}`,...s}=e,a=vy(),u=Zo(t);Ir(()=>a.register(i),[i,a.register]);let c={ref:u,...a.props,id:i};return Xn({ourProps:c,theirProps:s,slot:a.slot||{},defaultTag:FC,name:a.name||"Description"})}let jC=Jn(NC),zC=Object.assign(jC,{}),yy=B.createContext(null);function wy(){let e=B.useContext(yy);if(e===null){let t=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,wy),t}return e}function BC(){let[e,t]=B.useState([]);return[e.length>0?e.join(" "):void 0,B.useMemo(()=>function(r){let i=_t(a=>(t(u=>[...u,a]),()=>t(u=>{let c=u.slice(),f=c.indexOf(a);return f!==-1&&c.splice(f,1),c}))),s=B.useMemo(()=>({register:i,slot:r.slot,name:r.name,props:r.props}),[i,r.slot,r.name,r.props]);return B.createElement(yy.Provider,{value:s},r.children)},[t])]}let WC="label";function HC(e,t){let r=uf(),{id:i=`headlessui-label-${r}`,passive:s=!1,...a}=e,u=wy(),c=Zo(t);Ir(()=>u.register(i),[i,u.register]);let f={ref:c,...u.props,id:i};return s&&("onClick"in f&&(delete f.htmlFor,delete f.onClick),"onClick"in a&&delete a.onClick),Xn({ourProps:f,theirProps:a,slot:u.slot||{},defaultTag:WC,name:u.name||"Label"})}let UC=Jn(HC),qC=Object.assign(UC,{});function ZC(e=0){let[t,r]=B.useState(e),i=cf(),s=B.useCallback(f=>{i.current&&r(g=>g|f)},[t,i]),a=B.useCallback(f=>!!(t&f),[t]),u=B.useCallback(f=>{i.current&&r(g=>g&~f)},[r,i]),c=B.useCallback(f=>{i.current&&r(g=>g^f)},[r]);return{flags:t,addFlag:s,hasFlag:a,removeFlag:u,toggleFlag:c}}let ff=B.createContext(null);ff.displayName="GroupContext";let GC=B.Fragment;function KC(e){var t;let[r,i]=B.useState(null),[s,a]=BC(),[u,c]=DC(),f=B.useMemo(()=>({switch:r,setSwitch:i,labelledby:s,describedby:u}),[r,i,s,u]),g={},h=e;return B.createElement(c,{name:"Switch.Description"},B.createElement(a,{name:"Switch.Label",props:{htmlFor:(t=f.switch)==null?void 0:t.id,onClick(v){r&&(v.currentTarget.tagName==="LABEL"&&v.preventDefault(),r.click(),r.focus({preventScroll:!0}))}}},B.createElement(ff.Provider,{value:f},Xn({ourProps:g,theirProps:h,defaultTag:GC,name:"Switch.Group"}))))}let VC="button";function YC(e,t){var r;let i=uf(),{id:s=`headlessui-switch-${i}`,checked:a,defaultChecked:u=!1,onChange:c,disabled:f=!1,name:g,value:h,form:v,...p}=e,y=B.useContext(ff),x=B.useRef(null),d=Zo(x,t,y===null?null:y.setSwitch),[b,m]=EC(a,c,u),S=_t(()=>m==null?void 0:m(!b)),E=_t(F=>{if(IC(F.currentTarget))return F.preventDefault();F.preventDefault(),S()}),R=_t(F=>{F.key===Oc.Space?(F.preventDefault(),S()):F.key===Oc.Enter&&MC(F.currentTarget)}),O=_t(F=>F.preventDefault()),k=B.useMemo(()=>({checked:b}),[b]),W={id:s,ref:d,role:"switch",type:TC(e,x),tabIndex:e.tabIndex===-1?0:(r=e.tabIndex)!=null?r:0,"aria-checked":b,"aria-labelledby":y==null?void 0:y.labelledby,"aria-describedby":y==null?void 0:y.describedby,disabled:f,onClick:E,onKeyUp:R,onKeyPress:O},M=sf();return B.useEffect(()=>{var F;let G=(F=x.current)==null?void 0:F.closest("form");G&&u!==void 0&&M.addEventListener(G,"reset",()=>{m(u)})},[x,m]),B.createElement(B.Fragment,null,g!=null&&b&&B.createElement(kC,{features:hy.Hidden,..._c({as:"input",type:"checkbox",hidden:!0,readOnly:!0,disabled:f,form:v,checked:b,name:g,value:h})}),Xn({ourProps:W,theirProps:p,slot:k,defaultTag:VC,name:"Switch"}))}let XC=Jn(YC),JC=KC,QC=Object.assign(XC,{Group:JC,Label:qC,Description:zC});function ek(e){let t={called:!1};return(...r)=>{if(!t.called)return t.called=!0,e(...r)}}function Ql(e,...t){e&&t.length>0&&e.classList.add(...t)}function ec(e,...t){e&&t.length>0&&e.classList.remove(...t)}function tk(e,t){let r=qo();if(!e)return r.dispose;let{transitionDuration:i,transitionDelay:s}=getComputedStyle(e),[a,u]=[i,s].map(f=>{let[g=0]=f.split(",").filter(Boolean).map(h=>h.includes("ms")?parseFloat(h):parseFloat(h)*1e3).sort((h,v)=>v-h);return g}),c=a+u;if(c!==0){r.group(g=>{g.setTimeout(()=>{t(),g.dispose()},c),g.addEventListener(e,"transitionrun",h=>{h.target===h.currentTarget&&g.dispose()})});let f=r.addEventListener(e,"transitionend",g=>{g.target===g.currentTarget&&(t(),f())})}else t();return r.add(()=>t()),r.dispose}function rk(e,t,r,i){let s=r?"enter":"leave",a=qo(),u=i!==void 0?ek(i):()=>{};s==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let c=Pr(s,{enter:()=>t.enter,leave:()=>t.leave}),f=Pr(s,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),g=Pr(s,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return ec(e,...t.base,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),Ql(e,...t.base,...c,...g),a.nextFrame(()=>{ec(e,...t.base,...c,...g),Ql(e,...t.base,...c,...f),tk(e,()=>(ec(e,...t.base,...c),Ql(e,...t.base,...t.entered),u()))}),a.dispose}function nk({immediate:e,container:t,direction:r,classes:i,onStart:s,onStop:a}){let u=cf(),c=sf(),f=xi(r);Ir(()=>{e&&(f.current="enter")},[e]),Ir(()=>{let g=qo();c.add(g.dispose);let h=t.current;if(h&&f.current!=="idle"&&u.current)return g.dispose(),s.current(f.current),g.add(rk(h,i.current,f.current==="enter",()=>{g.dispose(),a.current(f.current)})),g.dispose},[r])}function pn(e=""){return e.split(/\s+/).filter(t=>t.length>1)}let Ua=B.createContext(null);Ua.displayName="TransitionContext";var ik=(e=>(e.Visible="visible",e.Hidden="hidden",e))(ik||{});function ok(){let e=B.useContext(Ua);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function sk(){let e=B.useContext(qa);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let qa=B.createContext(null);qa.displayName="NestingContext";function Za(e){return"children"in e?Za(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function by(e,t){let r=xi(e),i=B.useRef([]),s=cf(),a=sf(),u=_t((y,x=vn.Hidden)=>{let d=i.current.findIndex(({el:b})=>b===y);d!==-1&&(Pr(x,{[vn.Unmount](){i.current.splice(d,1)},[vn.Hidden](){i.current[d].state="hidden"}}),a.microTask(()=>{var b;!Za(i)&&s.current&&((b=r.current)==null||b.call(r))}))}),c=_t(y=>{let x=i.current.find(({el:d})=>d===y);return x?x.state!=="visible"&&(x.state="visible"):i.current.push({el:y,state:"visible"}),()=>u(y,vn.Unmount)}),f=B.useRef([]),g=B.useRef(Promise.resolve()),h=B.useRef({enter:[],leave:[],idle:[]}),v=_t((y,x,d)=>{f.current.splice(0),t&&(t.chains.current[x]=t.chains.current[x].filter(([b])=>b!==y)),t==null||t.chains.current[x].push([y,new Promise(b=>{f.current.push(b)})]),t==null||t.chains.current[x].push([y,new Promise(b=>{Promise.all(h.current[x].map(([m,S])=>S)).then(()=>b())})]),x==="enter"?g.current=g.current.then(()=>t==null?void 0:t.wait.current).then(()=>d(x)):d(x)}),p=_t((y,x,d)=>{Promise.all(h.current[x].splice(0).map(([b,m])=>m)).then(()=>{var b;(b=f.current.shift())==null||b()}).then(()=>d(x))});return B.useMemo(()=>({children:i,register:c,unregister:u,onStart:v,onStop:p,wait:g,chains:h}),[c,u,i,v,p,h,g])}function ak(){}let uk=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function dm(e){var t;let r={};for(let i of uk)r[i]=(t=e[i])!=null?t:ak;return r}function lk(e){let t=B.useRef(dm(e));return B.useEffect(()=>{t.current=dm(e)},[e]),t}let ck="div",xy=dy.RenderStrategy;function fk(e,t){var r,i;let{beforeEnter:s,afterEnter:a,beforeLeave:u,afterLeave:c,enter:f,enterFrom:g,enterTo:h,entered:v,leave:p,leaveFrom:y,leaveTo:x,...d}=e,b=B.useRef(null),m=Zo(b,t),S=(r=d.unmount)==null||r?vn.Unmount:vn.Hidden,{show:E,appear:R,initial:O}=ok(),[k,W]=B.useState(E?"visible":"hidden"),M=sk(),{register:F,unregister:G}=M;B.useEffect(()=>F(b),[F,b]),B.useEffect(()=>{if(S===vn.Hidden&&b.current){if(E&&k!=="visible"){W("visible");return}return Pr(k,{hidden:()=>G(b),visible:()=>F(b)})}},[k,b,F,G,E,S]);let j=xi({base:pn(d.className),enter:pn(f),enterFrom:pn(g),enterTo:pn(h),entered:pn(v),leave:pn(p),leaveFrom:pn(y),leaveTo:pn(x)}),L=lk({beforeEnter:s,afterEnter:a,beforeLeave:u,afterLeave:c}),H=af();B.useEffect(()=>{if(H&&k==="visible"&&b.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[b,k,H]);let q=O&&!R,C=R&&E&&O,J=!H||q?"idle":E?"enter":"leave",Y=ZC(0),te=_t(ne=>Pr(ne,{enter:()=>{Y.addFlag(Gr.Opening),L.current.beforeEnter()},leave:()=>{Y.addFlag(Gr.Closing),L.current.beforeLeave()},idle:()=>{}})),de=_t(ne=>Pr(ne,{enter:()=>{Y.removeFlag(Gr.Opening),L.current.afterEnter()},leave:()=>{Y.removeFlag(Gr.Closing),L.current.afterLeave()},idle:()=>{}})),Z=by(()=>{W("hidden"),G(b)},M),Q=B.useRef(!1);nk({immediate:C,container:b,classes:j,direction:J,onStart:xi(ne=>{Q.current=!0,Z.onStart(b,ne,te)}),onStop:xi(ne=>{Q.current=!1,Z.onStop(b,ne,de),ne==="leave"&&!Za(Z)&&(W("hidden"),G(b))})});let se=d,ue={ref:m};return C?se={...se,className:Ea(d.className,...j.current.enter,...j.current.enterFrom)}:Q.current&&(se.className=Ea(d.className,(i=b.current)==null?void 0:i.className),se.className===""&&delete se.className),B.createElement(qa.Provider,{value:Z},B.createElement($C,{value:Pr(k,{visible:Gr.Open,hidden:Gr.Closed})|Y.flags},Xn({ourProps:ue,theirProps:se,defaultTag:ck,features:xy,visible:k==="visible",name:"Transition.Child"})))}function dk(e,t){let{show:r,appear:i=!1,unmount:s=!0,...a}=e,u=B.useRef(null),c=Zo(u,t);af();let f=gy();if(r===void 0&&f!==null&&(r=(f&Gr.Open)===Gr.Open),![!0,!1].includes(r))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[g,h]=B.useState(r?"visible":"hidden"),v=by(()=>{h("hidden")}),[p,y]=B.useState(!0),x=B.useRef([r]);Ir(()=>{p!==!1&&x.current[x.current.length-1]!==r&&(x.current.push(r),y(!1))},[x,r]);let d=B.useMemo(()=>({show:r,appear:i,initial:p}),[r,i,p]);B.useEffect(()=>{if(r)h("visible");else if(!Za(v))h("hidden");else{let E=u.current;if(!E)return;let R=E.getBoundingClientRect();R.x===0&&R.y===0&&R.width===0&&R.height===0&&h("hidden")}},[r,v]);let b={unmount:s},m=_t(()=>{var E;p&&y(!1),(E=e.beforeEnter)==null||E.call(e)}),S=_t(()=>{var E;p&&y(!1),(E=e.beforeLeave)==null||E.call(e)});return B.createElement(qa.Provider,{value:v},B.createElement(Ua.Provider,{value:d},Xn({ourProps:{...b,as:B.Fragment,children:B.createElement(Sy,{ref:c,...b,...a,beforeEnter:m,beforeLeave:S})},theirProps:{},defaultTag:B.Fragment,features:xy,visible:g==="visible",name:"Transition"})))}function pk(e,t){let r=B.useContext(Ua)!==null,i=gy()!==null;return B.createElement(B.Fragment,null,!r&&i?B.createElement(Tc,{ref:t,...e}):B.createElement(Sy,{ref:t,...e}))}let Tc=Jn(dk),Sy=Jn(fk),hk=Jn(pk),_a=Object.assign(Tc,{Child:hk,Root:Tc});const tc={xs:{switch:"h-2.5 w-2.5",translate:"translate-x-2.5",container:"w-6 h-3.5"},sm:{switch:"h-3.5 w-3.5",translate:"translate-x-[0.85rem]",container:"h-4.5 w-8"},md:{switch:"h-4 w-4",translate:"translate-x-3",container:"h-5 w-8"},lg:{switch:"h-4 w-4",translate:"translate-x-3",container:"h-5 w-8"}},Ey=B.forwardRef(({onChange:e,value:t,size:r="md",className:i="ml-auto"},s)=>{const a=u=>{e(u)};return D.jsx("div",{className:je("flex items-center",i),children:D.jsx(QC,{as:"span",ref:s,checked:t,onChange:a,onKeyDown:u=>{u.key==="Enter"&&a(!t)},className:`${t?"bg-primary-dark":"bg-grey-200"}
89
+ relative inline-flex shrink-0 ${tc[r].container} cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75`,children:D.jsx("span",{"aria-hidden":"true",className:`${t?tc[r].translate:"translate-x-0"}
90
+ pointer-events-none inline-block ${tc[r].switch} transform rounded-full bg-white shadow-lg ring-0 transition duration-200 ease-in-out`})})})});function df(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Qn=df();function _y(e){Qn=e}var Po={exec:()=>null};function Ce(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(s,a)=>{let u=typeof a=="string"?a:a.source;return u=u.replace(Ct.caret,"$1"),r=r.replace(s,u),i},getRegex:()=>new RegExp(r,t)};return i}var Ct={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},gk=/^(?:[ \t]*(?:\n|$))+/,mk=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,vk=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Go=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,yk=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,pf=/(?:[*+-]|\d{1,9}[.)])/,Oy=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Ty=Ce(Oy).replace(/bull/g,pf).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),wk=Ce(Oy).replace(/bull/g,pf).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),hf=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,bk=/^[^\n]+/,gf=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,xk=Ce(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",gf).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Sk=Ce(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,pf).getRegex(),Ga="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",mf=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Ek=Ce("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",mf).replace("tag",Ga).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ay=Ce(hf).replace("hr",Go).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ga).getRegex(),_k=Ce(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Ay).getRegex(),vf={blockquote:_k,code:mk,def:xk,fences:vk,heading:yk,hr:Go,html:Ek,lheading:Ty,list:Sk,newline:gk,paragraph:Ay,table:Po,text:bk},pm=Ce("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Go).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ga).getRegex(),Ok={...vf,lheading:wk,table:pm,paragraph:Ce(hf).replace("hr",Go).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",pm).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ga).getRegex()},Tk={...vf,html:Ce(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",mf).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Po,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Ce(hf).replace("hr",Go).replace("heading",` *#{1,6} *[^
91
+ ]`).replace("lheading",Ty).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Ak=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Rk=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ry=/^( {2,}|\\)\n(?!\s*$)/,Pk=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Ka=/[\p{P}\p{S}]/u,yf=/[\s\p{P}\p{S}]/u,Py=/[^\s\p{P}\p{S}]/u,Ck=Ce(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,yf).getRegex(),Cy=/(?!~)[\p{P}\p{S}]/u,kk=/(?!~)[\s\p{P}\p{S}]/u,$k=/(?:[^\s\p{P}\p{S}]|~)/u,Ik=/\[(?:[^\[\]`]|`[^`]*?`)*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g,ky=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Lk=Ce(ky,"u").replace(/punct/g,Ka).getRegex(),Mk=Ce(ky,"u").replace(/punct/g,Cy).getRegex(),$y="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Dk=Ce($y,"gu").replace(/notPunctSpace/g,Py).replace(/punctSpace/g,yf).replace(/punct/g,Ka).getRegex(),Fk=Ce($y,"gu").replace(/notPunctSpace/g,$k).replace(/punctSpace/g,kk).replace(/punct/g,Cy).getRegex(),Nk=Ce("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Py).replace(/punctSpace/g,yf).replace(/punct/g,Ka).getRegex(),jk=Ce(/\\(punct)/,"gu").replace(/punct/g,Ka).getRegex(),zk=Ce(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Bk=Ce(mf).replace("(?:-->|$)","-->").getRegex(),Wk=Ce("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Bk).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Oa=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,Hk=Ce(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Oa).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Iy=Ce(/^!?\[(label)\]\[(ref)\]/).replace("label",Oa).replace("ref",gf).getRegex(),Ly=Ce(/^!?\[(ref)\](?:\[\])?/).replace("ref",gf).getRegex(),Uk=Ce("reflink|nolink(?!\\()","g").replace("reflink",Iy).replace("nolink",Ly).getRegex(),hm=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,wf={_backpedal:Po,anyPunctuation:jk,autolink:zk,blockSkip:Ik,br:Ry,code:Rk,del:Po,emStrongLDelim:Lk,emStrongRDelimAst:Dk,emStrongRDelimUnd:Nk,escape:Ak,link:Hk,nolink:Ly,punctuation:Ck,reflink:Iy,reflinkSearch:Uk,tag:Wk,text:Pk,url:Po},qk={...wf,link:Ce(/^!?\[(label)\]\((.*?)\)/).replace("label",Oa).getRegex(),reflink:Ce(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Oa).getRegex()},Ac={...wf,emStrongRDelimAst:Fk,emStrongLDelim:Mk,url:Ce(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",hm).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:Ce(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",hm).getRegex()},Zk={...Ac,br:Ce(Ry).replace("{2,}","*").getRegex(),text:Ce(Ac.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},na={normal:vf,gfm:Ok,pedantic:Tk},mo={normal:wf,gfm:Ac,breaks:Zk,pedantic:qk},Gk={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},gm=e=>Gk[e];function Or(e,t){if(t){if(Ct.escapeTest.test(e))return e.replace(Ct.escapeReplace,gm)}else if(Ct.escapeTestNoEncode.test(e))return e.replace(Ct.escapeReplaceNoEncode,gm);return e}function mm(e){try{e=encodeURI(e).replace(Ct.percentDecode,"%")}catch{return null}return e}function vm(e,t){var a;let r=e.replace(Ct.findPipe,(u,c,f)=>{let g=!1,h=c;for(;--h>=0&&f[h]==="\\";)g=!g;return g?"|":" |"}),i=r.split(Ct.splitPipe),s=0;if(i[0].trim()||i.shift(),i.length>0&&!((a=i.at(-1))!=null&&a.trim())&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;s<i.length;s++)i[s]=i[s].trim().replace(Ct.slashPipe,"|");return i}function vo(e,t,r){let i=e.length;if(i===0)return"";let s=0;for(;s<i&&e.charAt(i-s-1)===t;)s++;return e.slice(0,i-s)}function Kk(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let i=0;i<e.length;i++)if(e[i]==="\\")i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return r>0?-2:-1}function ym(e,t,r,i,s){let a=t.href,u=t.title||null,c=e[1].replace(s.other.outputLinkReplace,"$1");i.state.inLink=!0;let f={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:u,text:c,tokens:i.inlineTokens(c)};return i.state.inLink=!1,f}function Vk(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let s=i[1];return t.split(`
92
+ `).map(a=>{let u=a.match(r.other.beginningSpace);if(u===null)return a;let[c]=u;return c.length>=s.length?a.slice(s.length):a}).join(`
93
+ `)}var Ta=class{constructor(t){ve(this,"options");ve(this,"rules");ve(this,"lexer");this.options=t||Qn}space(t){let r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){let r=this.rules.block.code.exec(t);if(r){let i=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?i:vo(i,`
94
+ `)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],s=Vk(i,r[3]||"",this.rules);return{type:"code",raw:i,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:s}}}heading(t){let r=this.rules.block.heading.exec(t);if(r){let i=r[2].trim();if(this.rules.other.endingHash.test(i)){let s=vo(i,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(i=s.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(t){let r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:vo(r[0],`
95
+ `)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=vo(r[0],`
96
96
  `).split(`
97
- `),s="",a="",l=[];for(;i.length>0;){let c=!1,f=[],m;for(m=0;m<i.length;m++)if(this.rules.other.blockquoteStart.test(i[m]))f.push(i[m]),c=!0;else if(!c)f.push(i[m]);else break;i=i.slice(m);let v=f.join(`
98
- `),g=v.replace(this.rules.other.blockquoteSetextReplace,`
97
+ `),s="",a="",u=[];for(;i.length>0;){let c=!1,f=[],g;for(g=0;g<i.length;g++)if(this.rules.other.blockquoteStart.test(i[g]))f.push(i[g]),c=!0;else if(!c)f.push(i[g]);else break;i=i.slice(g);let h=f.join(`
98
+ `),v=h.replace(this.rules.other.blockquoteSetextReplace,`
99
99
  $1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
100
- ${v}`:v,a=a?`${a}
101
- ${g}`:g;let p=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(g,l,!0),this.lexer.state.top=p,i.length===0)break;let b=l.at(-1);if((b==null?void 0:b.type)==="code")break;if((b==null?void 0:b.type)==="blockquote"){let x=b,d=x.raw+`
100
+ ${h}`:h,a=a?`${a}
101
+ ${v}`:v;let p=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(v,u,!0),this.lexer.state.top=p,i.length===0)break;let y=u.at(-1);if((y==null?void 0:y.type)==="code")break;if((y==null?void 0:y.type)==="blockquote"){let x=y,d=x.raw+`
102
102
  `+i.join(`
103
- `),w=this.blockquote(d);l[l.length-1]=w,s=s.substring(0,s.length-x.raw.length)+w.raw,a=a.substring(0,a.length-x.text.length)+w.text;break}else if((b==null?void 0:b.type)==="list"){let x=b,d=x.raw+`
103
+ `),b=this.blockquote(d);u[u.length-1]=b,s=s.substring(0,s.length-x.raw.length)+b.raw,a=a.substring(0,a.length-x.text.length)+b.text;break}else if((y==null?void 0:y.type)==="list"){let x=y,d=x.raw+`
104
104
  `+i.join(`
105
- `),w=this.list(d);l[l.length-1]=w,s=s.substring(0,s.length-b.raw.length)+w.raw,a=a.substring(0,a.length-x.raw.length)+w.raw,i=d.substring(l.at(-1).raw.length).split(`
106
- `);continue}}return{type:"blockquote",raw:s,tokens:l,text:a}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),s=i.length>1,a={type:"list",raw:"",ordered:s,start:s?+i.slice(0,-1):"",loose:!1,items:[]};i=s?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=s?i:"[*+-]");let l=this.rules.other.listItemRegex(i),c=!1;for(;t;){let m=!1,v="",g="";if(!(r=l.exec(t))||this.rules.block.hr.test(t))break;v=r[0],t=t.substring(v.length);let p=r[2].split(`
107
- `,1)[0].replace(this.rules.other.listReplaceTabs,S=>" ".repeat(3*S.length)),b=t.split(`
108
- `,1)[0],x=!p.trim(),d=0;if(this.options.pedantic?(d=2,g=p.trimStart()):x?d=r[1].length+1:(d=r[2].search(this.rules.other.nonSpaceChar),d=d>4?1:d,g=p.slice(d),d+=r[1].length),x&&this.rules.other.blankLine.test(b)&&(v+=b+`
109
- `,t=t.substring(b.length+1),m=!0),!m){let S=this.rules.other.nextBulletRegex(d),E=this.rules.other.hrRegex(d),R=this.rules.other.fencesBeginRegex(d),O=this.rules.other.headingBeginRegex(d),k=this.rules.other.htmlBeginRegex(d);for(;t;){let B=t.split(`
110
- `,1)[0],M;if(b=B,this.options.pedantic?(b=b.replace(this.rules.other.listReplaceNesting," "),M=b):M=b.replace(this.rules.other.tabCharGlobal," "),R.test(b)||O.test(b)||k.test(b)||S.test(b)||E.test(b))break;if(M.search(this.rules.other.nonSpaceChar)>=d||!b.trim())g+=`
111
- `+M.slice(d);else{if(x||p.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||R.test(p)||O.test(p)||E.test(p))break;g+=`
112
- `+b}!x&&!b.trim()&&(x=!0),v+=B+`
113
- `,t=t.substring(B.length+1),p=M.slice(d)}}a.loose||(c?a.loose=!0:this.rules.other.doubleBlankLine.test(v)&&(c=!0));let w=null,h;this.options.gfm&&(w=this.rules.other.listIsTask.exec(g),w&&(h=w[0]!=="[ ] ",g=g.replace(this.rules.other.listReplaceTask,""))),a.items.push({type:"list_item",raw:v,task:!!w,checked:h,loose:!1,text:g,tokens:[]}),a.raw+=v}let f=a.items.at(-1);if(f)f.raw=f.raw.trimEnd(),f.text=f.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let m=0;m<a.items.length;m++)if(this.lexer.state.top=!1,a.items[m].tokens=this.lexer.blockTokens(a.items[m].text,[]),!a.loose){let v=a.items[m].tokens.filter(p=>p.type==="space"),g=v.length>0&&v.some(p=>this.rules.other.anyLine.test(p.raw));a.loose=g}if(a.loose)for(let m=0;m<a.items.length;m++)a.items[m].loose=!0;return a}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let i=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:i,raw:r[0],href:s,title:a}}}table(t){var c;let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=sv(r[1]),s=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=(c=r[3])!=null&&c.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
114
- `):[],l={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===s.length){for(let f of s)this.rules.other.tableAlignRight.test(f)?l.align.push("right"):this.rules.other.tableAlignCenter.test(f)?l.align.push("center"):this.rules.other.tableAlignLeft.test(f)?l.align.push("left"):l.align.push(null);for(let f=0;f<i.length;f++)l.header.push({text:i[f],tokens:this.lexer.inline(i[f]),header:!0,align:l.align[f]});for(let f of a)l.rows.push(sv(f,l.header.length).map((m,v)=>({text:m,tokens:this.lexer.inline(m),header:!1,align:l.align[v]})));return l}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let i=r[1].charAt(r[1].length-1)===`
115
- `?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let l=co(i.slice(0,-1),"\\");if((i.length-l.length)%2===0)return}else{let l=Ck(r[2],"()");if(l===-2)return;if(l>-1){let c=(r[0].indexOf("!")===0?5:4)+r[1].length+l;r[2]=r[2].substring(0,l),r[0]=r[0].substring(0,c).trim(),r[3]=""}}let s=r[2],a="";if(this.options.pedantic){let l=this.rules.other.pedanticHrefTitle.exec(s);l&&(s=l[1],a=l[3])}else a=r[3]?r[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?s=s.slice(1):s=s.slice(1,-1)),av(r,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){let s=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=r[s.toLowerCase()];if(!a){let l=i[0].charAt(0);return{type:"text",raw:l,text:l}}return av(i,a,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let s=this.rules.inline.emStrongLDelim.exec(t);if(!(!s||s[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[2])||!i||this.rules.inline.punctuation.exec(i))){let a=[...s[0]].length-1,l,c,f=a,m=0,v=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(v.lastIndex=0,r=r.slice(-1*t.length+a);(s=v.exec(r))!=null;){if(l=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!l)continue;if(c=[...l].length,s[3]||s[4]){f+=c;continue}else if((s[5]||s[6])&&a%3&&!((a+c)%3)){m+=c;continue}if(f-=c,f>0)continue;c=Math.min(c,c+f+m);let g=[...s[0]][0].length,p=t.slice(0,a+s.index+g+c);if(Math.min(a,c)%2){let x=p.slice(1,-1);return{type:"em",raw:p,text:x,tokens:this.lexer.inlineTokens(x)}}let b=p.slice(2,-2);return{type:"strong",raw:p,text:b,tokens:this.lexer.inlineTokens(b)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(i),a=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return s&&a&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let i,s;return r[2]==="@"?(i=r[1],s="mailto:"+i):(i=r[1],s=i),{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}url(t){var i;let r;if(r=this.rules.inline.url.exec(t)){let s,a;if(r[2]==="@")s=r[0],a="mailto:"+s;else{let l;do l=r[0],r[0]=((i=this.rules.inline._backpedal.exec(r[0]))==null?void 0:i[0])??"";while(l!==r[0]);s=r[0],r[1]==="www."?a="http://"+r[0]:a=r[0]}return{type:"link",raw:r[0],text:s,href:a,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let i=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:i}}}},dr=class bc{constructor(t){me(this,"tokens");me(this,"options");me(this,"state");me(this,"tokenizer");me(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Kn,this.options.tokenizer=this.options.tokenizer||new xa,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:Rt,block:Js.normal,inline:lo.normal};this.options.pedantic?(r.block=Js.pedantic,r.inline=lo.pedantic):this.options.gfm&&(r.block=Js.gfm,this.options.breaks?r.inline=lo.breaks:r.inline=lo.gfm),this.tokenizer.rules=r}static get rules(){return{block:Js,inline:lo}}static lex(t,r){return new bc(r).lex(t)}static lexInline(t,r){return new bc(r).inlineTokens(t)}lex(t){t=t.replace(Rt.carriageReturn,`
116
- `),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],i=!1){var s,a,l;for(this.options.pedantic&&(t=t.replace(Rt.tabCharGlobal," ").replace(Rt.spaceLine,""));t;){let c;if((a=(s=this.options.extensions)==null?void 0:s.block)!=null&&a.some(m=>(c=m.call({lexer:this},t,r))?(t=t.substring(c.raw.length),r.push(c),!0):!1))continue;if(c=this.tokenizer.space(t)){t=t.substring(c.raw.length);let m=r.at(-1);c.raw.length===1&&m!==void 0?m.raw+=`
117
- `:r.push(c);continue}if(c=this.tokenizer.code(t)){t=t.substring(c.raw.length);let m=r.at(-1);(m==null?void 0:m.type)==="paragraph"||(m==null?void 0:m.type)==="text"?(m.raw+=(m.raw.endsWith(`
105
+ `),b=this.list(d);u[u.length-1]=b,s=s.substring(0,s.length-y.raw.length)+b.raw,a=a.substring(0,a.length-x.raw.length)+b.raw,i=d.substring(u.at(-1).raw.length).split(`
106
+ `);continue}}return{type:"blockquote",raw:s,tokens:u,text:a}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),s=i.length>1,a={type:"list",raw:"",ordered:s,start:s?+i.slice(0,-1):"",loose:!1,items:[]};i=s?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=s?i:"[*+-]");let u=this.rules.other.listItemRegex(i),c=!1;for(;t;){let g=!1,h="",v="";if(!(r=u.exec(t))||this.rules.block.hr.test(t))break;h=r[0],t=t.substring(h.length);let p=r[2].split(`
107
+ `,1)[0].replace(this.rules.other.listReplaceTabs,S=>" ".repeat(3*S.length)),y=t.split(`
108
+ `,1)[0],x=!p.trim(),d=0;if(this.options.pedantic?(d=2,v=p.trimStart()):x?d=r[1].length+1:(d=r[2].search(this.rules.other.nonSpaceChar),d=d>4?1:d,v=p.slice(d),d+=r[1].length),x&&this.rules.other.blankLine.test(y)&&(h+=y+`
109
+ `,t=t.substring(y.length+1),g=!0),!g){let S=this.rules.other.nextBulletRegex(d),E=this.rules.other.hrRegex(d),R=this.rules.other.fencesBeginRegex(d),O=this.rules.other.headingBeginRegex(d),k=this.rules.other.htmlBeginRegex(d);for(;t;){let W=t.split(`
110
+ `,1)[0],M;if(y=W,this.options.pedantic?(y=y.replace(this.rules.other.listReplaceNesting," "),M=y):M=y.replace(this.rules.other.tabCharGlobal," "),R.test(y)||O.test(y)||k.test(y)||S.test(y)||E.test(y))break;if(M.search(this.rules.other.nonSpaceChar)>=d||!y.trim())v+=`
111
+ `+M.slice(d);else{if(x||p.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||R.test(p)||O.test(p)||E.test(p))break;v+=`
112
+ `+y}!x&&!y.trim()&&(x=!0),h+=W+`
113
+ `,t=t.substring(W.length+1),p=M.slice(d)}}a.loose||(c?a.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(c=!0));let b=null,m;this.options.gfm&&(b=this.rules.other.listIsTask.exec(v),b&&(m=b[0]!=="[ ] ",v=v.replace(this.rules.other.listReplaceTask,""))),a.items.push({type:"list_item",raw:h,task:!!b,checked:m,loose:!1,text:v,tokens:[]}),a.raw+=h}let f=a.items.at(-1);if(f)f.raw=f.raw.trimEnd(),f.text=f.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let g=0;g<a.items.length;g++)if(this.lexer.state.top=!1,a.items[g].tokens=this.lexer.blockTokens(a.items[g].text,[]),!a.loose){let h=a.items[g].tokens.filter(p=>p.type==="space"),v=h.length>0&&h.some(p=>this.rules.other.anyLine.test(p.raw));a.loose=v}if(a.loose)for(let g=0;g<a.items.length;g++)a.items[g].loose=!0;return a}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let i=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:i,raw:r[0],href:s,title:a}}}table(t){var c;let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=vm(r[1]),s=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=(c=r[3])!=null&&c.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
114
+ `):[],u={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===s.length){for(let f of s)this.rules.other.tableAlignRight.test(f)?u.align.push("right"):this.rules.other.tableAlignCenter.test(f)?u.align.push("center"):this.rules.other.tableAlignLeft.test(f)?u.align.push("left"):u.align.push(null);for(let f=0;f<i.length;f++)u.header.push({text:i[f],tokens:this.lexer.inline(i[f]),header:!0,align:u.align[f]});for(let f of a)u.rows.push(vm(f,u.header.length).map((g,h)=>({text:g,tokens:this.lexer.inline(g),header:!1,align:u.align[h]})));return u}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let i=r[1].charAt(r[1].length-1)===`
115
+ `?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let u=vo(i.slice(0,-1),"\\");if((i.length-u.length)%2===0)return}else{let u=Kk(r[2],"()");if(u===-2)return;if(u>-1){let c=(r[0].indexOf("!")===0?5:4)+r[1].length+u;r[2]=r[2].substring(0,u),r[0]=r[0].substring(0,c).trim(),r[3]=""}}let s=r[2],a="";if(this.options.pedantic){let u=this.rules.other.pedanticHrefTitle.exec(s);u&&(s=u[1],a=u[3])}else a=r[3]?r[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?s=s.slice(1):s=s.slice(1,-1)),ym(r,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){let s=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=r[s.toLowerCase()];if(!a){let u=i[0].charAt(0);return{type:"text",raw:u,text:u}}return ym(i,a,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let s=this.rules.inline.emStrongLDelim.exec(t);if(!(!s||s[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[2])||!i||this.rules.inline.punctuation.exec(i))){let a=[...s[0]].length-1,u,c,f=a,g=0,h=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,r=r.slice(-1*t.length+a);(s=h.exec(r))!=null;){if(u=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!u)continue;if(c=[...u].length,s[3]||s[4]){f+=c;continue}else if((s[5]||s[6])&&a%3&&!((a+c)%3)){g+=c;continue}if(f-=c,f>0)continue;c=Math.min(c,c+f+g);let v=[...s[0]][0].length,p=t.slice(0,a+s.index+v+c);if(Math.min(a,c)%2){let x=p.slice(1,-1);return{type:"em",raw:p,text:x,tokens:this.lexer.inlineTokens(x)}}let y=p.slice(2,-2);return{type:"strong",raw:p,text:y,tokens:this.lexer.inlineTokens(y)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(i),a=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return s&&a&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let i,s;return r[2]==="@"?(i=r[1],s="mailto:"+i):(i=r[1],s=i),{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}url(t){var i;let r;if(r=this.rules.inline.url.exec(t)){let s,a;if(r[2]==="@")s=r[0],a="mailto:"+s;else{let u;do u=r[0],r[0]=((i=this.rules.inline._backpedal.exec(r[0]))==null?void 0:i[0])??"";while(u!==r[0]);s=r[0],r[1]==="www."?a="http://"+r[0]:a=r[0]}return{type:"link",raw:r[0],text:s,href:a,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let i=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:i}}}},gr=class Rc{constructor(t){ve(this,"tokens");ve(this,"options");ve(this,"state");ve(this,"tokenizer");ve(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Qn,this.options.tokenizer=this.options.tokenizer||new Ta,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:Ct,block:na.normal,inline:mo.normal};this.options.pedantic?(r.block=na.pedantic,r.inline=mo.pedantic):this.options.gfm&&(r.block=na.gfm,this.options.breaks?r.inline=mo.breaks:r.inline=mo.gfm),this.tokenizer.rules=r}static get rules(){return{block:na,inline:mo}}static lex(t,r){return new Rc(r).lex(t)}static lexInline(t,r){return new Rc(r).inlineTokens(t)}lex(t){t=t.replace(Ct.carriageReturn,`
116
+ `),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],i=!1){var s,a,u;for(this.options.pedantic&&(t=t.replace(Ct.tabCharGlobal," ").replace(Ct.spaceLine,""));t;){let c;if((a=(s=this.options.extensions)==null?void 0:s.block)!=null&&a.some(g=>(c=g.call({lexer:this},t,r))?(t=t.substring(c.raw.length),r.push(c),!0):!1))continue;if(c=this.tokenizer.space(t)){t=t.substring(c.raw.length);let g=r.at(-1);c.raw.length===1&&g!==void 0?g.raw+=`
117
+ `:r.push(c);continue}if(c=this.tokenizer.code(t)){t=t.substring(c.raw.length);let g=r.at(-1);(g==null?void 0:g.type)==="paragraph"||(g==null?void 0:g.type)==="text"?(g.raw+=(g.raw.endsWith(`
118
118
  `)?"":`
119
- `)+c.raw,m.text+=`
120
- `+c.text,this.inlineQueue.at(-1).src=m.text):r.push(c);continue}if(c=this.tokenizer.fences(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.heading(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.hr(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.blockquote(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.list(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.html(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.def(t)){t=t.substring(c.raw.length);let m=r.at(-1);(m==null?void 0:m.type)==="paragraph"||(m==null?void 0:m.type)==="text"?(m.raw+=(m.raw.endsWith(`
119
+ `)+c.raw,g.text+=`
120
+ `+c.text,this.inlineQueue.at(-1).src=g.text):r.push(c);continue}if(c=this.tokenizer.fences(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.heading(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.hr(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.blockquote(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.list(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.html(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.def(t)){t=t.substring(c.raw.length);let g=r.at(-1);(g==null?void 0:g.type)==="paragraph"||(g==null?void 0:g.type)==="text"?(g.raw+=(g.raw.endsWith(`
121
121
  `)?"":`
122
- `)+c.raw,m.text+=`
123
- `+c.raw,this.inlineQueue.at(-1).src=m.text):this.tokens.links[c.tag]||(this.tokens.links[c.tag]={href:c.href,title:c.title},r.push(c));continue}if(c=this.tokenizer.table(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.lheading(t)){t=t.substring(c.raw.length),r.push(c);continue}let f=t;if((l=this.options.extensions)!=null&&l.startBlock){let m=1/0,v=t.slice(1),g;this.options.extensions.startBlock.forEach(p=>{g=p.call({lexer:this},v),typeof g=="number"&&g>=0&&(m=Math.min(m,g))}),m<1/0&&m>=0&&(f=t.substring(0,m+1))}if(this.state.top&&(c=this.tokenizer.paragraph(f))){let m=r.at(-1);i&&(m==null?void 0:m.type)==="paragraph"?(m.raw+=(m.raw.endsWith(`
122
+ `)+c.raw,g.text+=`
123
+ `+c.raw,this.inlineQueue.at(-1).src=g.text):this.tokens.links[c.tag]||(this.tokens.links[c.tag]={href:c.href,title:c.title},r.push(c));continue}if(c=this.tokenizer.table(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.lheading(t)){t=t.substring(c.raw.length),r.push(c);continue}let f=t;if((u=this.options.extensions)!=null&&u.startBlock){let g=1/0,h=t.slice(1),v;this.options.extensions.startBlock.forEach(p=>{v=p.call({lexer:this},h),typeof v=="number"&&v>=0&&(g=Math.min(g,v))}),g<1/0&&g>=0&&(f=t.substring(0,g+1))}if(this.state.top&&(c=this.tokenizer.paragraph(f))){let g=r.at(-1);i&&(g==null?void 0:g.type)==="paragraph"?(g.raw+=(g.raw.endsWith(`
124
124
  `)?"":`
125
- `)+c.raw,m.text+=`
126
- `+c.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=m.text):r.push(c),i=f.length!==t.length,t=t.substring(c.raw.length);continue}if(c=this.tokenizer.text(t)){t=t.substring(c.raw.length);let m=r.at(-1);(m==null?void 0:m.type)==="text"?(m.raw+=(m.raw.endsWith(`
125
+ `)+c.raw,g.text+=`
126
+ `+c.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=g.text):r.push(c),i=f.length!==t.length,t=t.substring(c.raw.length);continue}if(c=this.tokenizer.text(t)){t=t.substring(c.raw.length);let g=r.at(-1);(g==null?void 0:g.type)==="text"?(g.raw+=(g.raw.endsWith(`
127
127
  `)?"":`
128
- `)+c.raw,m.text+=`
129
- `+c.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=m.text):r.push(c);continue}if(t){let m="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(m);break}else throw new Error(m)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var c,f,m,v,g;let i=t,s=null;if(this.tokens.links){let p=Object.keys(this.tokens.links);if(p.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)p.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,s.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(s=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)i=i.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=((f=(c=this.options.hooks)==null?void 0:c.emStrongMask)==null?void 0:f.call({lexer:this},i))??i;let a=!1,l="";for(;t;){a||(l=""),a=!1;let p;if((v=(m=this.options.extensions)==null?void 0:m.inline)!=null&&v.some(x=>(p=x.call({lexer:this},t,r))?(t=t.substring(p.raw.length),r.push(p),!0):!1))continue;if(p=this.tokenizer.escape(t)){t=t.substring(p.raw.length),r.push(p);continue}if(p=this.tokenizer.tag(t)){t=t.substring(p.raw.length),r.push(p);continue}if(p=this.tokenizer.link(t)){t=t.substring(p.raw.length),r.push(p);continue}if(p=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(p.raw.length);let x=r.at(-1);p.type==="text"&&(x==null?void 0:x.type)==="text"?(x.raw+=p.raw,x.text+=p.text):r.push(p);continue}if(p=this.tokenizer.emStrong(t,i,l)){t=t.substring(p.raw.length),r.push(p);continue}if(p=this.tokenizer.codespan(t)){t=t.substring(p.raw.length),r.push(p);continue}if(p=this.tokenizer.br(t)){t=t.substring(p.raw.length),r.push(p);continue}if(p=this.tokenizer.del(t)){t=t.substring(p.raw.length),r.push(p);continue}if(p=this.tokenizer.autolink(t)){t=t.substring(p.raw.length),r.push(p);continue}if(!this.state.inLink&&(p=this.tokenizer.url(t))){t=t.substring(p.raw.length),r.push(p);continue}let b=t;if((g=this.options.extensions)!=null&&g.startInline){let x=1/0,d=t.slice(1),w;this.options.extensions.startInline.forEach(h=>{w=h.call({lexer:this},d),typeof w=="number"&&w>=0&&(x=Math.min(x,w))}),x<1/0&&x>=0&&(b=t.substring(0,x+1))}if(p=this.tokenizer.inlineText(b)){t=t.substring(p.raw.length),p.raw.slice(-1)!=="_"&&(l=p.raw.slice(-1)),a=!0;let x=r.at(-1);(x==null?void 0:x.type)==="text"?(x.raw+=p.raw,x.text+=p.text):r.push(p);continue}if(t){let x="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(x);break}else throw new Error(x)}}return r}},Sa=class{constructor(t){me(this,"options");me(this,"parser");this.options=t||Kn}space(t){return""}code({text:t,lang:r,escaped:i}){var l;let s=(l=(r||"").match(Rt.notSpaceStart))==null?void 0:l[0],a=t.replace(Rt.endingNewline,"")+`
130
- `;return s?'<pre><code class="language-'+Sr(s)+'">'+(i?a:Sr(a,!0))+`</code></pre>
131
- `:"<pre><code>"+(i?a:Sr(a,!0))+`</code></pre>
128
+ `)+c.raw,g.text+=`
129
+ `+c.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=g.text):r.push(c);continue}if(t){let g="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(g);break}else throw new Error(g)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var c,f,g,h,v;let i=t,s=null;if(this.tokens.links){let p=Object.keys(this.tokens.links);if(p.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)p.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,s.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(s=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)i=i.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=((f=(c=this.options.hooks)==null?void 0:c.emStrongMask)==null?void 0:f.call({lexer:this},i))??i;let a=!1,u="";for(;t;){a||(u=""),a=!1;let p;if((h=(g=this.options.extensions)==null?void 0:g.inline)!=null&&h.some(x=>(p=x.call({lexer:this},t,r))?(t=t.substring(p.raw.length),r.push(p),!0):!1))continue;if(p=this.tokenizer.escape(t)){t=t.substring(p.raw.length),r.push(p);continue}if(p=this.tokenizer.tag(t)){t=t.substring(p.raw.length),r.push(p);continue}if(p=this.tokenizer.link(t)){t=t.substring(p.raw.length),r.push(p);continue}if(p=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(p.raw.length);let x=r.at(-1);p.type==="text"&&(x==null?void 0:x.type)==="text"?(x.raw+=p.raw,x.text+=p.text):r.push(p);continue}if(p=this.tokenizer.emStrong(t,i,u)){t=t.substring(p.raw.length),r.push(p);continue}if(p=this.tokenizer.codespan(t)){t=t.substring(p.raw.length),r.push(p);continue}if(p=this.tokenizer.br(t)){t=t.substring(p.raw.length),r.push(p);continue}if(p=this.tokenizer.del(t)){t=t.substring(p.raw.length),r.push(p);continue}if(p=this.tokenizer.autolink(t)){t=t.substring(p.raw.length),r.push(p);continue}if(!this.state.inLink&&(p=this.tokenizer.url(t))){t=t.substring(p.raw.length),r.push(p);continue}let y=t;if((v=this.options.extensions)!=null&&v.startInline){let x=1/0,d=t.slice(1),b;this.options.extensions.startInline.forEach(m=>{b=m.call({lexer:this},d),typeof b=="number"&&b>=0&&(x=Math.min(x,b))}),x<1/0&&x>=0&&(y=t.substring(0,x+1))}if(p=this.tokenizer.inlineText(y)){t=t.substring(p.raw.length),p.raw.slice(-1)!=="_"&&(u=p.raw.slice(-1)),a=!0;let x=r.at(-1);(x==null?void 0:x.type)==="text"?(x.raw+=p.raw,x.text+=p.text):r.push(p);continue}if(t){let x="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(x);break}else throw new Error(x)}}return r}},Aa=class{constructor(t){ve(this,"options");ve(this,"parser");this.options=t||Qn}space(t){return""}code({text:t,lang:r,escaped:i}){var u;let s=(u=(r||"").match(Ct.notSpaceStart))==null?void 0:u[0],a=t.replace(Ct.endingNewline,"")+`
130
+ `;return s?'<pre><code class="language-'+Or(s)+'">'+(i?a:Or(a,!0))+`</code></pre>
131
+ `:"<pre><code>"+(i?a:Or(a,!0))+`</code></pre>
132
132
  `}blockquote({tokens:t}){return`<blockquote>
133
133
  ${this.parser.parse(t)}</blockquote>
134
134
  `}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
135
135
  `}hr(t){return`<hr>
136
- `}list(t){let r=t.ordered,i=t.start,s="";for(let c=0;c<t.items.length;c++){let f=t.items[c];s+=this.listitem(f)}let a=r?"ol":"ul",l=r&&i!==1?' start="'+i+'"':"";return"<"+a+l+`>
136
+ `}list(t){let r=t.ordered,i=t.start,s="";for(let c=0;c<t.items.length;c++){let f=t.items[c];s+=this.listitem(f)}let a=r?"ol":"ul",u=r&&i!==1?' start="'+i+'"':"";return"<"+a+u+`>
137
137
  `+s+"</"+a+`>
138
- `}listitem(t){var i;let r="";if(t.task){let s=this.checkbox({checked:!!t.checked});t.loose?((i=t.tokens[0])==null?void 0:i.type)==="paragraph"?(t.tokens[0].text=s+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=s+" "+Sr(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:s+" ",text:s+" ",escaped:!0}):r+=s+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`<li>${r}</li>
138
+ `}listitem(t){var i;let r="";if(t.task){let s=this.checkbox({checked:!!t.checked});t.loose?((i=t.tokens[0])==null?void 0:i.type)==="paragraph"?(t.tokens[0].text=s+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=s+" "+Or(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:s+" ",text:s+" ",escaped:!0}):r+=s+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`<li>${r}</li>
139
139
  `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
140
- `}table(t){let r="",i="";for(let a=0;a<t.header.length;a++)i+=this.tablecell(t.header[a]);r+=this.tablerow({text:i});let s="";for(let a=0;a<t.rows.length;a++){let l=t.rows[a];i="";for(let c=0;c<l.length;c++)i+=this.tablecell(l[c]);s+=this.tablerow({text:i})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
140
+ `}table(t){let r="",i="";for(let a=0;a<t.header.length;a++)i+=this.tablecell(t.header[a]);r+=this.tablerow({text:i});let s="";for(let a=0;a<t.rows.length;a++){let u=t.rows[a];i="";for(let c=0;c<u.length;c++)i+=this.tablecell(u[c]);s+=this.tablerow({text:i})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
141
141
  <thead>
142
142
  `+r+`</thead>
143
143
  `+s+`</table>
144
144
  `}tablerow({text:t}){return`<tr>
145
145
  ${t}</tr>
146
146
  `}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
147
- `}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Sr(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:r,tokens:i}){let s=this.parser.parseInline(i),a=ov(t);if(a===null)return s;t=a;let l='<a href="'+t+'"';return r&&(l+=' title="'+Sr(r)+'"'),l+=">"+s+"</a>",l}image({href:t,title:r,text:i,tokens:s}){s&&(i=this.parser.parseInline(s,this.parser.textRenderer));let a=ov(t);if(a===null)return Sr(i);t=a;let l=`<img src="${t}" alt="${i}"`;return r&&(l+=` title="${Sr(r)}"`),l+=">",l}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Sr(t.text)}},ff=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},pr=class wc{constructor(t){me(this,"options");me(this,"renderer");me(this,"textRenderer");this.options=t||Kn,this.options.renderer=this.options.renderer||new Sa,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ff}static parse(t,r){return new wc(r).parse(t)}static parseInline(t,r){return new wc(r).parseInline(t)}parse(t,r=!0){var s,a;let i="";for(let l=0;l<t.length;l++){let c=t[l];if((a=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&a[c.type]){let m=c,v=this.options.extensions.renderers[m.type].call({parser:this},m);if(v!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(m.type)){i+=v||"";continue}}let f=c;switch(f.type){case"space":{i+=this.renderer.space(f);continue}case"hr":{i+=this.renderer.hr(f);continue}case"heading":{i+=this.renderer.heading(f);continue}case"code":{i+=this.renderer.code(f);continue}case"table":{i+=this.renderer.table(f);continue}case"blockquote":{i+=this.renderer.blockquote(f);continue}case"list":{i+=this.renderer.list(f);continue}case"html":{i+=this.renderer.html(f);continue}case"def":{i+=this.renderer.def(f);continue}case"paragraph":{i+=this.renderer.paragraph(f);continue}case"text":{let m=f,v=this.renderer.text(m);for(;l+1<t.length&&t[l+1].type==="text";)m=t[++l],v+=`
148
- `+this.renderer.text(m);r?i+=this.renderer.paragraph({type:"paragraph",raw:v,text:v,tokens:[{type:"text",raw:v,text:v,escaped:!0}]}):i+=v;continue}default:{let m='Token with "'+f.type+'" type was not found.';if(this.options.silent)return console.error(m),"";throw new Error(m)}}}return i}parseInline(t,r=this.renderer){var s,a;let i="";for(let l=0;l<t.length;l++){let c=t[l];if((a=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&a[c.type]){let m=this.options.extensions.renderers[c.type].call({parser:this},c);if(m!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(c.type)){i+=m||"";continue}}let f=c;switch(f.type){case"escape":{i+=r.text(f);break}case"html":{i+=r.html(f);break}case"link":{i+=r.link(f);break}case"image":{i+=r.image(f);break}case"strong":{i+=r.strong(f);break}case"em":{i+=r.em(f);break}case"codespan":{i+=r.codespan(f);break}case"br":{i+=r.br(f);break}case"del":{i+=r.del(f);break}case"text":{i+=r.text(f);break}default:{let m='Token with "'+f.type+'" type was not found.';if(this.options.silent)return console.error(m),"";throw new Error(m)}}}return i}},na,ho=(na=class{constructor(t){me(this,"options");me(this,"block");this.options=t||Kn}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?dr.lex:dr.lexInline}provideParser(){return this.block?pr.parse:pr.parseInline}},me(na,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),me(na,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),na),Ey=class{constructor(...t){me(this,"defaults",rf());me(this,"options",this.setOptions);me(this,"parse",this.parseMarkdown(!0));me(this,"parseInline",this.parseMarkdown(!1));me(this,"Parser",pr);me(this,"Renderer",Sa);me(this,"TextRenderer",ff);me(this,"Lexer",dr);me(this,"Tokenizer",xa);me(this,"Hooks",ho);this.use(...t)}walkTokens(t,r){var s,a;let i=[];for(let l of t)switch(i=i.concat(r.call(this,l)),l.type){case"table":{let c=l;for(let f of c.header)i=i.concat(this.walkTokens(f.tokens,r));for(let f of c.rows)for(let m of f)i=i.concat(this.walkTokens(m.tokens,r));break}case"list":{let c=l;i=i.concat(this.walkTokens(c.items,r));break}default:{let c=l;(a=(s=this.defaults.extensions)==null?void 0:s.childTokens)!=null&&a[c.type]?this.defaults.extensions.childTokens[c.type].forEach(f=>{let m=c[f].flat(1/0);i=i.concat(this.walkTokens(m,r))}):c.tokens&&(i=i.concat(this.walkTokens(c.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let s={...i};if(s.async=this.defaults.async||s.async||!1,i.extensions&&(i.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let l=r.renderers[a.name];l?r.renderers[a.name]=function(...c){let f=a.renderer.apply(this,c);return f===!1&&(f=l.apply(this,c)),f}:r.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let l=r[a.level];l?l.unshift(a.tokenizer):r[a.level]=[a.tokenizer],a.start&&(a.level==="block"?r.startBlock?r.startBlock.push(a.start):r.startBlock=[a.start]:a.level==="inline"&&(r.startInline?r.startInline.push(a.start):r.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(r.childTokens[a.name]=a.childTokens)}),s.extensions=r),i.renderer){let a=this.defaults.renderer||new Sa(this.defaults);for(let l in i.renderer){if(!(l in a))throw new Error(`renderer '${l}' does not exist`);if(["options","parser"].includes(l))continue;let c=l,f=i.renderer[c],m=a[c];a[c]=(...v)=>{let g=f.apply(a,v);return g===!1&&(g=m.apply(a,v)),g||""}}s.renderer=a}if(i.tokenizer){let a=this.defaults.tokenizer||new xa(this.defaults);for(let l in i.tokenizer){if(!(l in a))throw new Error(`tokenizer '${l}' does not exist`);if(["options","rules","lexer"].includes(l))continue;let c=l,f=i.tokenizer[c],m=a[c];a[c]=(...v)=>{let g=f.apply(a,v);return g===!1&&(g=m.apply(a,v)),g}}s.tokenizer=a}if(i.hooks){let a=this.defaults.hooks||new ho;for(let l in i.hooks){if(!(l in a))throw new Error(`hook '${l}' does not exist`);if(["options","block"].includes(l))continue;let c=l,f=i.hooks[c],m=a[c];ho.passThroughHooks.has(l)?a[c]=v=>{if(this.defaults.async&&ho.passThroughHooksRespectAsync.has(l))return(async()=>{let p=await f.call(a,v);return m.call(a,p)})();let g=f.call(a,v);return m.call(a,g)}:a[c]=(...v)=>{if(this.defaults.async)return(async()=>{let p=await f.apply(a,v);return p===!1&&(p=await m.apply(a,v)),p})();let g=f.apply(a,v);return g===!1&&(g=m.apply(a,v)),g}}s.hooks=a}if(i.walkTokens){let a=this.defaults.walkTokens,l=i.walkTokens;s.walkTokens=function(c){let f=[];return f.push(l.call(this,c)),a&&(f=f.concat(a.call(this,c))),f}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return dr.lex(t,r??this.defaults)}parser(t,r){return pr.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let s={...i},a={...this.defaults,...s},l=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&s.async===!1)return l(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return l(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(a.hooks&&(a.hooks.options=a,a.hooks.block=t),a.async)return(async()=>{let c=a.hooks?await a.hooks.preprocess(r):r,f=await(a.hooks?await a.hooks.provideLexer():t?dr.lex:dr.lexInline)(c,a),m=a.hooks?await a.hooks.processAllTokens(f):f;a.walkTokens&&await Promise.all(this.walkTokens(m,a.walkTokens));let v=await(a.hooks?await a.hooks.provideParser():t?pr.parse:pr.parseInline)(m,a);return a.hooks?await a.hooks.postprocess(v):v})().catch(l);try{a.hooks&&(r=a.hooks.preprocess(r));let c=(a.hooks?a.hooks.provideLexer():t?dr.lex:dr.lexInline)(r,a);a.hooks&&(c=a.hooks.processAllTokens(c)),a.walkTokens&&this.walkTokens(c,a.walkTokens);let f=(a.hooks?a.hooks.provideParser():t?pr.parse:pr.parseInline)(c,a);return a.hooks&&(f=a.hooks.postprocess(f)),f}catch(c){return l(c)}}}onError(t,r){return i=>{if(i.message+=`
149
- Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+Sr(i.message+"",!0)+"</pre>";return r?Promise.resolve(s):s}if(r)return Promise.reject(i);throw i}}},Un=new Ey;function De(e,t){return Un.parse(e,t)}De.options=De.setOptions=function(e){return Un.setOptions(e),De.defaults=Un.defaults,dy(De.defaults),De};De.getDefaults=rf;De.defaults=Kn;De.use=function(...e){return Un.use(...e),De.defaults=Un.defaults,dy(De.defaults),De};De.walkTokens=function(e,t){return Un.walkTokens(e,t)};De.parseInline=Un.parseInline;De.Parser=pr;De.parser=pr.parse;De.Renderer=Sa;De.TextRenderer=ff;De.Lexer=dr;De.lexer=dr.lex;De.Tokenizer=xa;De.Hooks=ho;De.parse=De;De.options;De.setOptions;De.use;De.walkTokens;De.parseInline;pr.parse;dr.lex;const $k={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},_y=/&(?:amp|lt|gt|quot|#(?:0+)?39);/g,Ik=RegExp(_y.source),uv=(e="")=>Ik.test(e)?e.replace(_y,t=>$k[t]||"'"):e,lv=(e,t)=>{if(!t)return e;try{return new URL(e,t).href}catch{return e}};var Lk=class{constructor(e){me(this,"renderer");this.renderer=e.renderer}parse(e){this.renderer.elIdList.push(0);const t=e.map(r=>{switch(r.type){case"space":return null;case"heading":{const i=r.depth;return this.renderer.heading(this.parseInline(r.tokens),i)}case"paragraph":return this.renderer.paragraph(this.parseInline(r.tokens));case"text":{const i=r;return i.tokens?this.parseInline(i.tokens):r.text}case"blockquote":{const i=r,s=this.parse(i.tokens);return this.renderer.blockquote(s)}case"list":{const i=r;this.renderer.elIdList.push(0);const s=i.items.map(a=>{const l=[];return a.task&&l.push(this.renderer.checkbox(a.checked??!1)),l.push(this.parse(a.tokens)),this.renderer.listItem(l)});return this.renderer.elIdList.pop(),this.renderer.list(s,r.ordered,r.ordered?r.start:void 0)}case"code":return this.renderer.code(r.text,r.lang);case"html":return this.renderer.html(r.text);case"table":{const i=r;this.renderer.elIdList.push(0);const s=i.header.map((m,v)=>this.renderer.tableCell(this.parseInline(m.tokens),{header:!0,align:r.align[v]}));this.renderer.elIdList.pop();const a=this.renderer.tableRow(s),l=this.renderer.tableHeader(a);this.renderer.elIdList.push(0);const c=i.rows.map(m=>{this.renderer.elIdList.push(0);const v=m.map((g,p)=>this.renderer.tableCell(this.parseInline(g.tokens),{header:!1,align:r.align[p]}));return this.renderer.elIdList.pop(),this.renderer.tableRow(v)});this.renderer.elIdList.pop();const f=this.renderer.tableBody(c);return this.renderer.table([l,f])}case"hr":return this.renderer.hr();default:return console.warn(`Token with "${r.type}" type was not found`),null}});return this.renderer.elIdList.pop(),t}parseInline(e=[]){this.renderer.elIdList.push(0);const t=e.map(r=>{switch(r.type){case"text":return this.renderer.text(uv(r.text));case"strong":return this.renderer.strong(this.parseInline(r.tokens));case"em":return this.renderer.em(this.parseInline(r.tokens));case"del":return this.renderer.del(this.parseInline(r.tokens));case"codespan":return this.renderer.codespan(uv(r.text));case"link":return this.renderer.link(r.href,this.parseInline(r.tokens));case"image":return this.renderer.image(r.href,r.text,r.title);case"html":return this.renderer.html(r.text);case"br":return this.renderer.br();case"escape":return this.renderer.text(r.text);default:return console.warn(`Token with "${r.type}" type was not found`),null}});return this.renderer.elIdList.pop(),t}},Mk=Lk,cn,ze,et,xc,jv,Fk=(jv=class{constructor(e={}){xt(this,ze);me(this,"elIdList",[]);xt(this,cn);const{renderer:t}=e;Ye(this,cn,e),t&&typeof t=="object"&&Object.entries(t).forEach(([r,i])=>{const s=r,a=i;!this[s]||s==="elementId"||s==="elIdList"||typeof a!="function"||Object.defineProperty(this,s,{value(...l){return $e(this,ze,xc).call(this),a.apply(this,l)},writable:!0,enumerable:!0,configurable:!0})})}get elementId(){return this.elIdList.join("-")}heading(e,t){return $e(this,ze,et).call(this,`h${t}`,e)}paragraph(e){return $e(this,ze,et).call(this,"p",e)}link(e,t){const r=lv(e,re(this,cn).baseURL),i=re(this,cn).openLinksInNewTab?"_blank":null;return $e(this,ze,et).call(this,"a",t,{href:r,target:i})}image(e,t,r=null){const i=lv(e,re(this,cn).baseURL);return $e(this,ze,et).call(this,"img",null,{src:i,alt:t,title:r})}codespan(e,t=null){const r=t?`${re(this,cn).langPrefix}${t}`:null;return $e(this,ze,et).call(this,"code",e,{className:r})}code(e,t){return $e(this,ze,et).call(this,"pre",this.codespan(e,t))}blockquote(e){return $e(this,ze,et).call(this,"blockquote",e)}list(e,t,r){return $e(this,ze,et).call(this,t?"ol":"ul",e,t&&r!==1?{start:r}:{})}listItem(e){return $e(this,ze,et).call(this,"li",e)}checkbox(e){return $e(this,ze,et).call(this,"input",null,{type:"checkbox",disabled:!0,checked:e})}table(e){return $e(this,ze,et).call(this,"table",e)}tableHeader(e){return $e(this,ze,et).call(this,"thead",e)}tableBody(e){return $e(this,ze,et).call(this,"tbody",e)}tableRow(e){return $e(this,ze,et).call(this,"tr",e)}tableCell(e,t){const r=t.header?"th":"td";return $e(this,ze,et).call(this,r,e,{align:t.align})}strong(e){return $e(this,ze,et).call(this,"strong",e)}em(e){return $e(this,ze,et).call(this,"em",e)}del(e){return $e(this,ze,et).call(this,"del",e)}text(e){return e}html(e){return e}hr(){return $e(this,ze,et).call(this,"hr")}br(){return $e(this,ze,et).call(this,"br")}},cn=new WeakMap,ze=new WeakSet,et=function(e,t=null,r={}){const i={key:`marked-react-${this.elementId}`,suppressHydrationWarning:!0};return $e(this,ze,xc).call(this),W.createElement(e,{...r,...i},t)},xc=function(){this.elIdList[this.elIdList.length-1]+=1},jv),Dk=Fk;const Nk=e=>{if(e.value&&typeof e.value!="string")throw new TypeError(`[marked-react]: Expected value to be of type string but got ${typeof e.value}`);if(e.children&&typeof e.children!="string")throw new TypeError(`[marked-react]: Expected children to be of type string but got ${typeof e.children}`)},jk={isInline:!1,breaks:!1,gfm:!0,baseURL:void 0,openLinksInNewTab:!0,langPrefix:"language-",renderer:void 0},zk=new Ey,Wk=e=>{Nk(e);const t={...jk,...e},r=t.instance??zk,i={breaks:t.breaks,gfm:t.gfm,tokenizer:r.defaults.tokenizer},s=t.value??t.children??"",a=t.isInline?r.Lexer.lexInline(s,i):r.lexer(s,i),l={renderer:new Dk({renderer:t.renderer,baseURL:t.baseURL,openLinksInNewTab:t.openLinksInNewTab,langPrefix:t.langPrefix})},c=new Mk(l),f=t.isInline?c.parseInline(a):c.parse(a);return W.createElement(W.Fragment,null,f)};var Bk=Wk,Uk=Bk;const Hk=({children:e,label:t,placement:r="top",className:i,isDisabled:s,container:a})=>{const[l,c]=W.useState(null),f=W.useRef(null),[m,v]=W.useState(null),[g,p]=W.useState(!1),{styles:b,attributes:x}=Jv(l,m,{placement:r,modifiers:[{name:"offset",options:{offset:[0,8]}},{name:"preventOverflow",options:{rootBoundary:"viewport",padding:8}}]}),d=W.Children.map(e,w=>W.isValidElement(w)?W.cloneElement(w,{ref:c,onMouseEnter:()=>p(!0),onMouseLeave:()=>{f.current=setTimeout(()=>p(!1),50)}}):w);return s?D.jsx(D.Fragment,{children:d}):D.jsxs(D.Fragment,{children:[d,g&&t&&Fo.createPortal(D.jsx("div",{ref:v,style:b.popper,...x.popper,className:We("z-10 select-none rounded bg-purple-200 font-poppins font-medium text-s px-2 py-0.5 text-purple-900 shadow-md",i),onMouseEnter:()=>{f.current&&clearTimeout(f.current),p(!0)},onMouseLeave:()=>p(!1),children:D.jsx(Uk,{openLinksInNewTab:!0,children:t})}),a||document.body)]})},qk=sc.keyframes`
147
+ `}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Or(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:r,tokens:i}){let s=this.parser.parseInline(i),a=mm(t);if(a===null)return s;t=a;let u='<a href="'+t+'"';return r&&(u+=' title="'+Or(r)+'"'),u+=">"+s+"</a>",u}image({href:t,title:r,text:i,tokens:s}){s&&(i=this.parser.parseInline(s,this.parser.textRenderer));let a=mm(t);if(a===null)return Or(i);t=a;let u=`<img src="${t}" alt="${i}"`;return r&&(u+=` title="${Or(r)}"`),u+=">",u}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Or(t.text)}},bf=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},mr=class Pc{constructor(t){ve(this,"options");ve(this,"renderer");ve(this,"textRenderer");this.options=t||Qn,this.options.renderer=this.options.renderer||new Aa,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new bf}static parse(t,r){return new Pc(r).parse(t)}static parseInline(t,r){return new Pc(r).parseInline(t)}parse(t,r=!0){var s,a;let i="";for(let u=0;u<t.length;u++){let c=t[u];if((a=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&a[c.type]){let g=c,h=this.options.extensions.renderers[g.type].call({parser:this},g);if(h!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(g.type)){i+=h||"";continue}}let f=c;switch(f.type){case"space":{i+=this.renderer.space(f);continue}case"hr":{i+=this.renderer.hr(f);continue}case"heading":{i+=this.renderer.heading(f);continue}case"code":{i+=this.renderer.code(f);continue}case"table":{i+=this.renderer.table(f);continue}case"blockquote":{i+=this.renderer.blockquote(f);continue}case"list":{i+=this.renderer.list(f);continue}case"html":{i+=this.renderer.html(f);continue}case"def":{i+=this.renderer.def(f);continue}case"paragraph":{i+=this.renderer.paragraph(f);continue}case"text":{let g=f,h=this.renderer.text(g);for(;u+1<t.length&&t[u+1].type==="text";)g=t[++u],h+=`
148
+ `+this.renderer.text(g);r?i+=this.renderer.paragraph({type:"paragraph",raw:h,text:h,tokens:[{type:"text",raw:h,text:h,escaped:!0}]}):i+=h;continue}default:{let g='Token with "'+f.type+'" type was not found.';if(this.options.silent)return console.error(g),"";throw new Error(g)}}}return i}parseInline(t,r=this.renderer){var s,a;let i="";for(let u=0;u<t.length;u++){let c=t[u];if((a=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&a[c.type]){let g=this.options.extensions.renderers[c.type].call({parser:this},c);if(g!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(c.type)){i+=g||"";continue}}let f=c;switch(f.type){case"escape":{i+=r.text(f);break}case"html":{i+=r.html(f);break}case"link":{i+=r.link(f);break}case"image":{i+=r.image(f);break}case"strong":{i+=r.strong(f);break}case"em":{i+=r.em(f);break}case"codespan":{i+=r.codespan(f);break}case"br":{i+=r.br(f);break}case"del":{i+=r.del(f);break}case"text":{i+=r.text(f);break}default:{let g='Token with "'+f.type+'" type was not found.';if(this.options.silent)return console.error(g),"";throw new Error(g)}}}return i}},ua,bo=(ua=class{constructor(t){ve(this,"options");ve(this,"block");this.options=t||Qn}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?gr.lex:gr.lexInline}provideParser(){return this.block?mr.parse:mr.parseInline}},ve(ua,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),ve(ua,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),ua),My=class{constructor(...t){ve(this,"defaults",df());ve(this,"options",this.setOptions);ve(this,"parse",this.parseMarkdown(!0));ve(this,"parseInline",this.parseMarkdown(!1));ve(this,"Parser",mr);ve(this,"Renderer",Aa);ve(this,"TextRenderer",bf);ve(this,"Lexer",gr);ve(this,"Tokenizer",Ta);ve(this,"Hooks",bo);this.use(...t)}walkTokens(t,r){var s,a;let i=[];for(let u of t)switch(i=i.concat(r.call(this,u)),u.type){case"table":{let c=u;for(let f of c.header)i=i.concat(this.walkTokens(f.tokens,r));for(let f of c.rows)for(let g of f)i=i.concat(this.walkTokens(g.tokens,r));break}case"list":{let c=u;i=i.concat(this.walkTokens(c.items,r));break}default:{let c=u;(a=(s=this.defaults.extensions)==null?void 0:s.childTokens)!=null&&a[c.type]?this.defaults.extensions.childTokens[c.type].forEach(f=>{let g=c[f].flat(1/0);i=i.concat(this.walkTokens(g,r))}):c.tokens&&(i=i.concat(this.walkTokens(c.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let s={...i};if(s.async=this.defaults.async||s.async||!1,i.extensions&&(i.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let u=r.renderers[a.name];u?r.renderers[a.name]=function(...c){let f=a.renderer.apply(this,c);return f===!1&&(f=u.apply(this,c)),f}:r.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let u=r[a.level];u?u.unshift(a.tokenizer):r[a.level]=[a.tokenizer],a.start&&(a.level==="block"?r.startBlock?r.startBlock.push(a.start):r.startBlock=[a.start]:a.level==="inline"&&(r.startInline?r.startInline.push(a.start):r.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(r.childTokens[a.name]=a.childTokens)}),s.extensions=r),i.renderer){let a=this.defaults.renderer||new Aa(this.defaults);for(let u in i.renderer){if(!(u in a))throw new Error(`renderer '${u}' does not exist`);if(["options","parser"].includes(u))continue;let c=u,f=i.renderer[c],g=a[c];a[c]=(...h)=>{let v=f.apply(a,h);return v===!1&&(v=g.apply(a,h)),v||""}}s.renderer=a}if(i.tokenizer){let a=this.defaults.tokenizer||new Ta(this.defaults);for(let u in i.tokenizer){if(!(u in a))throw new Error(`tokenizer '${u}' does not exist`);if(["options","rules","lexer"].includes(u))continue;let c=u,f=i.tokenizer[c],g=a[c];a[c]=(...h)=>{let v=f.apply(a,h);return v===!1&&(v=g.apply(a,h)),v}}s.tokenizer=a}if(i.hooks){let a=this.defaults.hooks||new bo;for(let u in i.hooks){if(!(u in a))throw new Error(`hook '${u}' does not exist`);if(["options","block"].includes(u))continue;let c=u,f=i.hooks[c],g=a[c];bo.passThroughHooks.has(u)?a[c]=h=>{if(this.defaults.async&&bo.passThroughHooksRespectAsync.has(u))return(async()=>{let p=await f.call(a,h);return g.call(a,p)})();let v=f.call(a,h);return g.call(a,v)}:a[c]=(...h)=>{if(this.defaults.async)return(async()=>{let p=await f.apply(a,h);return p===!1&&(p=await g.apply(a,h)),p})();let v=f.apply(a,h);return v===!1&&(v=g.apply(a,h)),v}}s.hooks=a}if(i.walkTokens){let a=this.defaults.walkTokens,u=i.walkTokens;s.walkTokens=function(c){let f=[];return f.push(u.call(this,c)),a&&(f=f.concat(a.call(this,c))),f}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return gr.lex(t,r??this.defaults)}parser(t,r){return mr.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let s={...i},a={...this.defaults,...s},u=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&s.async===!1)return u(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return u(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return u(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(a.hooks&&(a.hooks.options=a,a.hooks.block=t),a.async)return(async()=>{let c=a.hooks?await a.hooks.preprocess(r):r,f=await(a.hooks?await a.hooks.provideLexer():t?gr.lex:gr.lexInline)(c,a),g=a.hooks?await a.hooks.processAllTokens(f):f;a.walkTokens&&await Promise.all(this.walkTokens(g,a.walkTokens));let h=await(a.hooks?await a.hooks.provideParser():t?mr.parse:mr.parseInline)(g,a);return a.hooks?await a.hooks.postprocess(h):h})().catch(u);try{a.hooks&&(r=a.hooks.preprocess(r));let c=(a.hooks?a.hooks.provideLexer():t?gr.lex:gr.lexInline)(r,a);a.hooks&&(c=a.hooks.processAllTokens(c)),a.walkTokens&&this.walkTokens(c,a.walkTokens);let f=(a.hooks?a.hooks.provideParser():t?mr.parse:mr.parseInline)(c,a);return a.hooks&&(f=a.hooks.postprocess(f)),f}catch(c){return u(c)}}}onError(t,r){return i=>{if(i.message+=`
149
+ Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+Or(i.message+"",!0)+"</pre>";return r?Promise.resolve(s):s}if(r)return Promise.reject(i);throw i}}},Kn=new My;function ze(e,t){return Kn.parse(e,t)}ze.options=ze.setOptions=function(e){return Kn.setOptions(e),ze.defaults=Kn.defaults,_y(ze.defaults),ze};ze.getDefaults=df;ze.defaults=Qn;ze.use=function(...e){return Kn.use(...e),ze.defaults=Kn.defaults,_y(ze.defaults),ze};ze.walkTokens=function(e,t){return Kn.walkTokens(e,t)};ze.parseInline=Kn.parseInline;ze.Parser=mr;ze.parser=mr.parse;ze.Renderer=Aa;ze.TextRenderer=bf;ze.Lexer=gr;ze.lexer=gr.lex;ze.Tokenizer=Ta;ze.Hooks=bo;ze.parse=ze;ze.options;ze.setOptions;ze.use;ze.walkTokens;ze.parseInline;mr.parse;gr.lex;const Yk={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Dy=/&(?:amp|lt|gt|quot|#(?:0+)?39);/g,Xk=RegExp(Dy.source),wm=(e="")=>Xk.test(e)?e.replace(Dy,t=>Yk[t]||"'"):e,bm=(e,t)=>{if(!t)return e;try{return new URL(e,t).href}catch{return e}};var Jk=class{constructor(e){ve(this,"renderer");this.renderer=e.renderer}parse(e){this.renderer.elIdList.push(0);const t=e.map(r=>{switch(r.type){case"space":return null;case"heading":{const i=r.depth;return this.renderer.heading(this.parseInline(r.tokens),i)}case"paragraph":return this.renderer.paragraph(this.parseInline(r.tokens));case"text":{const i=r;return i.tokens?this.parseInline(i.tokens):r.text}case"blockquote":{const i=r,s=this.parse(i.tokens);return this.renderer.blockquote(s)}case"list":{const i=r;this.renderer.elIdList.push(0);const s=i.items.map(a=>{const u=[];return a.task&&u.push(this.renderer.checkbox(a.checked??!1)),u.push(this.parse(a.tokens)),this.renderer.listItem(u)});return this.renderer.elIdList.pop(),this.renderer.list(s,r.ordered,r.ordered?r.start:void 0)}case"code":return this.renderer.code(r.text,r.lang);case"html":return this.renderer.html(r.text);case"table":{const i=r;this.renderer.elIdList.push(0);const s=i.header.map((g,h)=>this.renderer.tableCell(this.parseInline(g.tokens),{header:!0,align:r.align[h]}));this.renderer.elIdList.pop();const a=this.renderer.tableRow(s),u=this.renderer.tableHeader(a);this.renderer.elIdList.push(0);const c=i.rows.map(g=>{this.renderer.elIdList.push(0);const h=g.map((v,p)=>this.renderer.tableCell(this.parseInline(v.tokens),{header:!1,align:r.align[p]}));return this.renderer.elIdList.pop(),this.renderer.tableRow(h)});this.renderer.elIdList.pop();const f=this.renderer.tableBody(c);return this.renderer.table([u,f])}case"hr":return this.renderer.hr();default:return console.warn(`Token with "${r.type}" type was not found`),null}});return this.renderer.elIdList.pop(),t}parseInline(e=[]){this.renderer.elIdList.push(0);const t=e.map(r=>{switch(r.type){case"text":return this.renderer.text(wm(r.text));case"strong":return this.renderer.strong(this.parseInline(r.tokens));case"em":return this.renderer.em(this.parseInline(r.tokens));case"del":return this.renderer.del(this.parseInline(r.tokens));case"codespan":return this.renderer.codespan(wm(r.text));case"link":return this.renderer.link(r.href,this.parseInline(r.tokens));case"image":return this.renderer.image(r.href,r.text,r.title);case"html":return this.renderer.html(r.text);case"br":return this.renderer.br();case"escape":return this.renderer.text(r.text);default:return console.warn(`Token with "${r.type}" type was not found`),null}});return this.renderer.elIdList.pop(),t}},Qk=Jk,hn,He,it,Cc,Jm,e$=(Jm=class{constructor(e={}){Et(this,He);ve(this,"elIdList",[]);Et(this,hn);const{renderer:t}=e;tt(this,hn,e),t&&typeof t=="object"&&Object.entries(t).forEach(([r,i])=>{const s=r,a=i;!this[s]||s==="elementId"||s==="elIdList"||typeof a!="function"||Object.defineProperty(this,s,{value(...u){return $e(this,He,Cc).call(this),a.apply(this,u)},writable:!0,enumerable:!0,configurable:!0})})}get elementId(){return this.elIdList.join("-")}heading(e,t){return $e(this,He,it).call(this,`h${t}`,e)}paragraph(e){return $e(this,He,it).call(this,"p",e)}link(e,t){const r=bm(e,re(this,hn).baseURL),i=re(this,hn).openLinksInNewTab?"_blank":null;return $e(this,He,it).call(this,"a",t,{href:r,target:i})}image(e,t,r=null){const i=bm(e,re(this,hn).baseURL);return $e(this,He,it).call(this,"img",null,{src:i,alt:t,title:r})}codespan(e,t=null){const r=t?`${re(this,hn).langPrefix}${t}`:null;return $e(this,He,it).call(this,"code",e,{className:r})}code(e,t){return $e(this,He,it).call(this,"pre",this.codespan(e,t))}blockquote(e){return $e(this,He,it).call(this,"blockquote",e)}list(e,t,r){return $e(this,He,it).call(this,t?"ol":"ul",e,t&&r!==1?{start:r}:{})}listItem(e){return $e(this,He,it).call(this,"li",e)}checkbox(e){return $e(this,He,it).call(this,"input",null,{type:"checkbox",disabled:!0,checked:e})}table(e){return $e(this,He,it).call(this,"table",e)}tableHeader(e){return $e(this,He,it).call(this,"thead",e)}tableBody(e){return $e(this,He,it).call(this,"tbody",e)}tableRow(e){return $e(this,He,it).call(this,"tr",e)}tableCell(e,t){const r=t.header?"th":"td";return $e(this,He,it).call(this,r,e,{align:t.align})}strong(e){return $e(this,He,it).call(this,"strong",e)}em(e){return $e(this,He,it).call(this,"em",e)}del(e){return $e(this,He,it).call(this,"del",e)}text(e){return e}html(e){return e}hr(){return $e(this,He,it).call(this,"hr")}br(){return $e(this,He,it).call(this,"br")}},hn=new WeakMap,He=new WeakSet,it=function(e,t=null,r={}){const i={key:`marked-react-${this.elementId}`,suppressHydrationWarning:!0};return $e(this,He,Cc).call(this),B.createElement(e,{...r,...i},t)},Cc=function(){this.elIdList[this.elIdList.length-1]+=1},Jm),t$=e$;const r$=e=>{if(e.value&&typeof e.value!="string")throw new TypeError(`[marked-react]: Expected value to be of type string but got ${typeof e.value}`);if(e.children&&typeof e.children!="string")throw new TypeError(`[marked-react]: Expected children to be of type string but got ${typeof e.children}`)},n$={isInline:!1,breaks:!1,gfm:!0,baseURL:void 0,openLinksInNewTab:!0,langPrefix:"language-",renderer:void 0},i$=new My,o$=e=>{r$(e);const t={...n$,...e},r=t.instance??i$,i={breaks:t.breaks,gfm:t.gfm,tokenizer:r.defaults.tokenizer},s=t.value??t.children??"",a=t.isInline?r.Lexer.lexInline(s,i):r.lexer(s,i),u={renderer:new t$({renderer:t.renderer,baseURL:t.baseURL,openLinksInNewTab:t.openLinksInNewTab,langPrefix:t.langPrefix})},c=new Qk(u),f=t.isInline?c.parseInline(a):c.parse(a);return B.createElement(B.Fragment,null,f)};var s$=o$,a$=s$;const u$=({children:e,label:t,placement:r="top",className:i,isDisabled:s,container:a})=>{const[u,c]=B.useState(null),f=B.useRef(null),[g,h]=B.useState(null),[v,p]=B.useState(!1),{styles:y,attributes:x}=Vc(u,g,{placement:r,modifiers:[{name:"offset",options:{offset:[0,8]}},{name:"preventOverflow",options:{rootBoundary:"viewport",padding:8}}]}),d=B.Children.map(e,b=>B.isValidElement(b)?B.cloneElement(b,{ref:c,onMouseEnter:()=>p(!0),onMouseLeave:()=>{f.current=setTimeout(()=>p(!1),50)}}):b);return s?D.jsx(D.Fragment,{children:d}):D.jsxs(D.Fragment,{children:[d,v&&t&&Pi.createPortal(D.jsx("div",{ref:h,style:y.popper,...x.popper,className:je("z-10 select-none rounded bg-purple-200 font-poppins font-medium text-s px-2 py-0.5 text-purple-900 shadow-md",i),onMouseEnter:()=>{f.current&&clearTimeout(f.current),p(!0)},onMouseLeave:()=>p(!1),children:typeof t=="string"?D.jsx(a$,{openLinksInNewTab:!0,children:t}):t}),a||document.body)]})},Fy=({referenceElement:e,label:t})=>{const[r,i]=B.useState(null),{styles:s,attributes:a}=Vc(e,r,{placement:"bottom",modifiers:[{name:"offset",options:{offset:[0,5]}},{name:"preventOverflow",options:{rootBoundary:"viewport"}}]});return D.jsx("div",{className:"z-[1000] rounded bg-purple-200 font-poppins font-medium text-s px-2 py-0.5 text-purple-900 shadow-md",ref:i,style:s.popper,...a.popper,children:t})},l$=gc.keyframes`
150
150
  to {
151
151
  fill: url(#d);
152
152
  stroke-dashoffset: 0;
153
153
  }
154
- `,Oy=va.svg`
154
+ `,Ny=xa.svg`
155
155
  & .e {
156
156
  fill: url(#d);
157
157
  }
@@ -162,7 +162,7 @@ Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error
162
162
  fill: transparent;
163
163
  stroke-dasharray: 700;
164
164
  stroke-dashoffset: 700;
165
- animation: ${qk} 1.5s ease-in-out infinite alternate-reverse;
165
+ animation: ${l$} 1.5s ease-in-out infinite alternate-reverse;
166
166
  }
167
167
 
168
168
  & #circle {
@@ -172,37 +172,37 @@ Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error
172
172
  stroke-dasharray: 700;
173
173
  stroke-dashoffset: 700;
174
174
  }
175
- `,Zk=({message:e,version:t})=>D.jsx("div",{className:"absolute inset-0 flex h-screen w-screen flex-col items-center justify-center bg-fd-gray-default text-white",children:D.jsxs("div",{className:"flex flex-col text-center",children:[D.jsx("div",{className:"relative mr-4 self-center",children:D.jsx("div",{className:"flex items-center justify-center rounded",children:D.jsxs(Oy,{className:"h-60 w-60",viewBox:"0 0 143.14 136.27",children:[D.jsx("defs",{children:D.jsxs("linearGradient",{id:"d",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[D.jsx("stop",{offset:"0%",stopColor:"#2743a6",children:D.jsx("animate",{attributeName:"stop-color",values:"#ffa4c0; #2743a6;",dur:"6s",repeatCount:"indefinite"})}),D.jsx("stop",{offset:"100%",stopColor:"#ffa4c0",children:D.jsx("animate",{attributeName:"stop-color",values:"#2743a6; #ffa4c0;",dur:"2ds",repeatCount:"indefinite"})})]})}),D.jsx("g",{id:"a"}),D.jsx("g",{id:"b",children:D.jsx("g",{id:"c",children:D.jsxs("g",{children:[D.jsx("path",{id:"tail",className:"e",d:"M134.13,79.9l.25-1.2h-21.87l-.21,.7c-.03,.08-2.41,7.72-7.11,14.56-5.87,8.54-12.57,12.63-12.63,12.67l-1,.6,24.25,28.96h27.33l-22.61-26.46c2.2-2.67,10.06-13.09,13.6-29.83Z"}),D.jsx("path",{id:"circle",className:"f",d:"M83.08,113.64l18.93,22.6-33.68,.03-11.17-.03c-9.38,.01-18.55-2.45-26.56-7.11-2.94-1.71-5.72-3.71-8.29-6-8.79-7.8-17.6-19.72-20.92-37.37-.01-.02-.02-.03-.03-.05v-.09c-1.68-9.04-1.93-19.58,0-31.84C8.57,21.67,36.68-.66,69.93,.02c12.81,.27,25.06,4.28,35.59,11.48,.31,.2,.62,.41,.92,.62,.25,.18,.5,.35,.74,.53,8.82,6.31,16.06,14.69,21.02,24.42,.17,.33,.34,.65,.5,.98,.1,.21,.2,.41,.3,.61,4.35,8.92,6.63,18.54,6.54,28.06,0,.36,.02,.71,.02,1.06,0,.82-.03,1.62-.06,2.43h-22c.04-.81,.06-1.61,.06-2.43,0-1.52-.08-3.02-.23-4.5-2.68-22.17-21.26-39.86-43.98-40.63-4.43-.15-8.75,.29-12.88,1.28-.02,0-.04,.01-.05,.01-.48,.12-.95,.24-1.42,.38-.97,.26-1.94,.56-2.89,.9-.23,.07-.46,.15-.69,.24-6.2,2.27-11.84,5.87-16.59,10.67-8.99,9.09-13.84,21.44-13.3,33.9,0,19.98,17.86,39.48,35.59,42.56,6.4,1.37,24.04,1.24,25.96,1.05Z"})]})})})]})})}),D.jsxs("div",{children:[D.jsx("span",{className:"text-xs text-grey-200",children:t}),D.jsx("h2",{className:"text-lg text-grey-100",children:e})]})]})});var go={exports:{}};/**
175
+ `,c$=({message:e,version:t})=>D.jsx("div",{className:"absolute inset-0 flex h-screen w-screen flex-col items-center justify-center bg-fd-gray-default text-white",children:D.jsxs("div",{className:"flex flex-col text-center",children:[D.jsx("div",{className:"relative mr-4 self-center",children:D.jsx("div",{className:"flex items-center justify-center rounded",children:D.jsxs(Ny,{className:"h-60 w-60",viewBox:"0 0 143.14 136.27",children:[D.jsx("defs",{children:D.jsxs("linearGradient",{id:"d",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[D.jsx("stop",{offset:"0%",stopColor:"#2743a6",children:D.jsx("animate",{attributeName:"stop-color",values:"#ffa4c0; #2743a6;",dur:"6s",repeatCount:"indefinite"})}),D.jsx("stop",{offset:"100%",stopColor:"#ffa4c0",children:D.jsx("animate",{attributeName:"stop-color",values:"#2743a6; #ffa4c0;",dur:"2ds",repeatCount:"indefinite"})})]})}),D.jsx("g",{id:"a"}),D.jsx("g",{id:"b",children:D.jsx("g",{id:"c",children:D.jsxs("g",{children:[D.jsx("path",{id:"tail",className:"e",d:"M134.13,79.9l.25-1.2h-21.87l-.21,.7c-.03,.08-2.41,7.72-7.11,14.56-5.87,8.54-12.57,12.63-12.63,12.67l-1,.6,24.25,28.96h27.33l-22.61-26.46c2.2-2.67,10.06-13.09,13.6-29.83Z"}),D.jsx("path",{id:"circle",className:"f",d:"M83.08,113.64l18.93,22.6-33.68,.03-11.17-.03c-9.38,.01-18.55-2.45-26.56-7.11-2.94-1.71-5.72-3.71-8.29-6-8.79-7.8-17.6-19.72-20.92-37.37-.01-.02-.02-.03-.03-.05v-.09c-1.68-9.04-1.93-19.58,0-31.84C8.57,21.67,36.68-.66,69.93,.02c12.81,.27,25.06,4.28,35.59,11.48,.31,.2,.62,.41,.92,.62,.25,.18,.5,.35,.74,.53,8.82,6.31,16.06,14.69,21.02,24.42,.17,.33,.34,.65,.5,.98,.1,.21,.2,.41,.3,.61,4.35,8.92,6.63,18.54,6.54,28.06,0,.36,.02,.71,.02,1.06,0,.82-.03,1.62-.06,2.43h-22c.04-.81,.06-1.61,.06-2.43,0-1.52-.08-3.02-.23-4.5-2.68-22.17-21.26-39.86-43.98-40.63-4.43-.15-8.75,.29-12.88,1.28-.02,0-.04,.01-.05,.01-.48,.12-.95,.24-1.42,.38-.97,.26-1.94,.56-2.89,.9-.23,.07-.46,.15-.69,.24-6.2,2.27-11.84,5.87-16.59,10.67-8.99,9.09-13.84,21.44-13.3,33.9,0,19.98,17.86,39.48,35.59,42.56,6.4,1.37,24.04,1.24,25.96,1.05Z"})]})})})]})})}),D.jsxs("div",{children:[D.jsx("span",{className:"text-xs text-grey-200",children:t}),D.jsx("h2",{className:"text-lg text-grey-100",children:e})]})]})});var xo={exports:{}};/**
176
176
  * @license
177
177
  * Lodash <https://lodash.com/>
178
178
  * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
179
179
  * Released under MIT license <https://lodash.com/license>
180
180
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
181
181
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
182
- */var Gk=go.exports,cv;function Kk(){return cv||(cv=1,(function(e,t){(function(){var r,i="4.17.21",s=200,a="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",l="Expected a function",c="Invalid `variable` option passed into `_.template`",f="__lodash_hash_undefined__",m=500,v="__lodash_placeholder__",g=1,p=2,b=4,x=1,d=2,w=1,h=2,S=4,E=8,R=16,O=32,k=64,B=128,M=256,F=512,G=30,j="...",L=800,U=16,q=1,C=2,J=3,X=1/0,te=9007199254740991,de=17976931348623157e292,Z=NaN,Q=4294967295,se=Q-1,ue=Q>>>1,ne=[["ary",B],["bind",w],["bindKey",h],["curry",E],["curryRight",R],["flip",F],["partial",O],["partialRight",k],["rearg",M]],ce="[object Arguments]",fe="[object Array]",ye="[object AsyncFunction]",ve="[object Boolean]",Ee="[object Date]",Ae="[object DOMException]",Ze="[object Error]",ie="[object Function]",mt="[object GeneratorFunction]",ut="[object Map]",vr="[object Number]",qo="[object Null]",Gt="[object Object]",Zo="[object Promise]",Ga="[object Proxy]",Mt="[object RegExp]",yt="[object Set]",Kr="[object String]",wn="[object Symbol]",Ai="[object Undefined]",Vr="[object WeakMap]",Go="[object WeakSet]",Xr="[object ArrayBuffer]",$r="[object DataView]",Ka="[object Float32Array]",Va="[object Float64Array]",Xa="[object Int8Array]",Ya="[object Int16Array]",Ja="[object Int32Array]",Qa="[object Uint8Array]",eu="[object Uint8ClampedArray]",tu="[object Uint16Array]",ru="[object Uint32Array]",L0=/\b__p \+= '';/g,M0=/\b(__p \+=) '' \+/g,F0=/(__e\(.*?\)|\b__t\)) \+\n'';/g,kf=/&(?:amp|lt|gt|quot|#39);/g,$f=/[&<>"']/g,D0=RegExp(kf.source),N0=RegExp($f.source),j0=/<%-([\s\S]+?)%>/g,z0=/<%([\s\S]+?)%>/g,If=/<%=([\s\S]+?)%>/g,W0=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,B0=/^\w*$/,U0=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,nu=/[\\^$.*+?()[\]{}|]/g,H0=RegExp(nu.source),iu=/^\s+/,q0=/\s/,Z0=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,G0=/\{\n\/\* \[wrapped with (.+)\] \*/,K0=/,? & /,V0=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,X0=/[()=,{}\[\]\/\s]/,Y0=/\\(\\)?/g,J0=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Lf=/\w*$/,Q0=/^[-+]0x[0-9a-f]+$/i,eb=/^0b[01]+$/i,tb=/^\[object .+?Constructor\]$/,rb=/^0o[0-7]+$/i,nb=/^(?:0|[1-9]\d*)$/,ib=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ko=/($^)/,ob=/['\n\r\u2028\u2029\\]/g,Vo="\\ud800-\\udfff",sb="\\u0300-\\u036f",ab="\\ufe20-\\ufe2f",ub="\\u20d0-\\u20ff",Mf=sb+ab+ub,Ff="\\u2700-\\u27bf",Df="a-z\\xdf-\\xf6\\xf8-\\xff",lb="\\xac\\xb1\\xd7\\xf7",cb="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",fb="\\u2000-\\u206f",db=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Nf="A-Z\\xc0-\\xd6\\xd8-\\xde",jf="\\ufe0e\\ufe0f",zf=lb+cb+fb+db,ou="['’]",pb="["+Vo+"]",Wf="["+zf+"]",Xo="["+Mf+"]",Bf="\\d+",hb="["+Ff+"]",Uf="["+Df+"]",Hf="[^"+Vo+zf+Bf+Ff+Df+Nf+"]",su="\\ud83c[\\udffb-\\udfff]",gb="(?:"+Xo+"|"+su+")",qf="[^"+Vo+"]",au="(?:\\ud83c[\\udde6-\\uddff]){2}",uu="[\\ud800-\\udbff][\\udc00-\\udfff]",Vn="["+Nf+"]",Zf="\\u200d",Gf="(?:"+Uf+"|"+Hf+")",vb="(?:"+Vn+"|"+Hf+")",Kf="(?:"+ou+"(?:d|ll|m|re|s|t|ve))?",Vf="(?:"+ou+"(?:D|LL|M|RE|S|T|VE))?",Xf=gb+"?",Yf="["+jf+"]?",mb="(?:"+Zf+"(?:"+[qf,au,uu].join("|")+")"+Yf+Xf+")*",yb="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",bb="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Jf=Yf+Xf+mb,wb="(?:"+[hb,au,uu].join("|")+")"+Jf,xb="(?:"+[qf+Xo+"?",Xo,au,uu,pb].join("|")+")",Sb=RegExp(ou,"g"),Eb=RegExp(Xo,"g"),lu=RegExp(su+"(?="+su+")|"+xb+Jf,"g"),_b=RegExp([Vn+"?"+Uf+"+"+Kf+"(?="+[Wf,Vn,"$"].join("|")+")",vb+"+"+Vf+"(?="+[Wf,Vn+Gf,"$"].join("|")+")",Vn+"?"+Gf+"+"+Kf,Vn+"+"+Vf,bb,yb,Bf,wb].join("|"),"g"),Ob=RegExp("["+Zf+Vo+Mf+jf+"]"),Ab=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Tb=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Rb=-1,Be={};Be[Ka]=Be[Va]=Be[Xa]=Be[Ya]=Be[Ja]=Be[Qa]=Be[eu]=Be[tu]=Be[ru]=!0,Be[ce]=Be[fe]=Be[Xr]=Be[ve]=Be[$r]=Be[Ee]=Be[Ze]=Be[ie]=Be[ut]=Be[vr]=Be[Gt]=Be[Mt]=Be[yt]=Be[Kr]=Be[Vr]=!1;var je={};je[ce]=je[fe]=je[Xr]=je[$r]=je[ve]=je[Ee]=je[Ka]=je[Va]=je[Xa]=je[Ya]=je[Ja]=je[ut]=je[vr]=je[Gt]=je[Mt]=je[yt]=je[Kr]=je[wn]=je[Qa]=je[eu]=je[tu]=je[ru]=!0,je[Ze]=je[ie]=je[Vr]=!1;var Pb={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Cb={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},kb={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},$b={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ib=parseFloat,Lb=parseInt,Qf=typeof Ds=="object"&&Ds&&Ds.Object===Object&&Ds,Mb=typeof self=="object"&&self&&self.Object===Object&&self,dt=Qf||Mb||Function("return this")(),cu=t&&!t.nodeType&&t,xn=cu&&!0&&e&&!e.nodeType&&e,ed=xn&&xn.exports===cu,fu=ed&&Qf.process,Kt=(function(){try{var N=xn&&xn.require&&xn.require("util").types;return N||fu&&fu.binding&&fu.binding("util")}catch{}})(),td=Kt&&Kt.isArrayBuffer,rd=Kt&&Kt.isDate,nd=Kt&&Kt.isMap,id=Kt&&Kt.isRegExp,od=Kt&&Kt.isSet,sd=Kt&&Kt.isTypedArray;function Ft(N,K,H){switch(H.length){case 0:return N.call(K);case 1:return N.call(K,H[0]);case 2:return N.call(K,H[0],H[1]);case 3:return N.call(K,H[0],H[1],H[2])}return N.apply(K,H)}function Fb(N,K,H,ae){for(var be=-1,Pe=N==null?0:N.length;++be<Pe;){var ot=N[be];K(ae,ot,H(ot),N)}return ae}function Vt(N,K){for(var H=-1,ae=N==null?0:N.length;++H<ae&&K(N[H],H,N)!==!1;);return N}function Db(N,K){for(var H=N==null?0:N.length;H--&&K(N[H],H,N)!==!1;);return N}function ad(N,K){for(var H=-1,ae=N==null?0:N.length;++H<ae;)if(!K(N[H],H,N))return!1;return!0}function Yr(N,K){for(var H=-1,ae=N==null?0:N.length,be=0,Pe=[];++H<ae;){var ot=N[H];K(ot,H,N)&&(Pe[be++]=ot)}return Pe}function Yo(N,K){var H=N==null?0:N.length;return!!H&&Xn(N,K,0)>-1}function du(N,K,H){for(var ae=-1,be=N==null?0:N.length;++ae<be;)if(H(K,N[ae]))return!0;return!1}function Ue(N,K){for(var H=-1,ae=N==null?0:N.length,be=Array(ae);++H<ae;)be[H]=K(N[H],H,N);return be}function Jr(N,K){for(var H=-1,ae=K.length,be=N.length;++H<ae;)N[be+H]=K[H];return N}function pu(N,K,H,ae){var be=-1,Pe=N==null?0:N.length;for(ae&&Pe&&(H=N[++be]);++be<Pe;)H=K(H,N[be],be,N);return H}function Nb(N,K,H,ae){var be=N==null?0:N.length;for(ae&&be&&(H=N[--be]);be--;)H=K(H,N[be],be,N);return H}function hu(N,K){for(var H=-1,ae=N==null?0:N.length;++H<ae;)if(K(N[H],H,N))return!0;return!1}var jb=gu("length");function zb(N){return N.split("")}function Wb(N){return N.match(V0)||[]}function ud(N,K,H){var ae;return H(N,function(be,Pe,ot){if(K(be,Pe,ot))return ae=Pe,!1}),ae}function Jo(N,K,H,ae){for(var be=N.length,Pe=H+(ae?1:-1);ae?Pe--:++Pe<be;)if(K(N[Pe],Pe,N))return Pe;return-1}function Xn(N,K,H){return K===K?Qb(N,K,H):Jo(N,ld,H)}function Bb(N,K,H,ae){for(var be=H-1,Pe=N.length;++be<Pe;)if(ae(N[be],K))return be;return-1}function ld(N){return N!==N}function cd(N,K){var H=N==null?0:N.length;return H?mu(N,K)/H:Z}function gu(N){return function(K){return K==null?r:K[N]}}function vu(N){return function(K){return N==null?r:N[K]}}function fd(N,K,H,ae,be){return be(N,function(Pe,ot,Ne){H=ae?(ae=!1,Pe):K(H,Pe,ot,Ne)}),H}function Ub(N,K){var H=N.length;for(N.sort(K);H--;)N[H]=N[H].value;return N}function mu(N,K){for(var H,ae=-1,be=N.length;++ae<be;){var Pe=K(N[ae]);Pe!==r&&(H=H===r?Pe:H+Pe)}return H}function yu(N,K){for(var H=-1,ae=Array(N);++H<N;)ae[H]=K(H);return ae}function Hb(N,K){return Ue(K,function(H){return[H,N[H]]})}function dd(N){return N&&N.slice(0,vd(N)+1).replace(iu,"")}function Dt(N){return function(K){return N(K)}}function bu(N,K){return Ue(K,function(H){return N[H]})}function Ti(N,K){return N.has(K)}function pd(N,K){for(var H=-1,ae=N.length;++H<ae&&Xn(K,N[H],0)>-1;);return H}function hd(N,K){for(var H=N.length;H--&&Xn(K,N[H],0)>-1;);return H}function qb(N,K){for(var H=N.length,ae=0;H--;)N[H]===K&&++ae;return ae}var Zb=vu(Pb),Gb=vu(Cb);function Kb(N){return"\\"+$b[N]}function Vb(N,K){return N==null?r:N[K]}function Yn(N){return Ob.test(N)}function Xb(N){return Ab.test(N)}function Yb(N){for(var K,H=[];!(K=N.next()).done;)H.push(K.value);return H}function wu(N){var K=-1,H=Array(N.size);return N.forEach(function(ae,be){H[++K]=[be,ae]}),H}function gd(N,K){return function(H){return N(K(H))}}function Qr(N,K){for(var H=-1,ae=N.length,be=0,Pe=[];++H<ae;){var ot=N[H];(ot===K||ot===v)&&(N[H]=v,Pe[be++]=H)}return Pe}function Qo(N){var K=-1,H=Array(N.size);return N.forEach(function(ae){H[++K]=ae}),H}function Jb(N){var K=-1,H=Array(N.size);return N.forEach(function(ae){H[++K]=[ae,ae]}),H}function Qb(N,K,H){for(var ae=H-1,be=N.length;++ae<be;)if(N[ae]===K)return ae;return-1}function ew(N,K,H){for(var ae=H+1;ae--;)if(N[ae]===K)return ae;return ae}function Jn(N){return Yn(N)?rw(N):jb(N)}function ar(N){return Yn(N)?nw(N):zb(N)}function vd(N){for(var K=N.length;K--&&q0.test(N.charAt(K)););return K}var tw=vu(kb);function rw(N){for(var K=lu.lastIndex=0;lu.test(N);)++K;return K}function nw(N){return N.match(lu)||[]}function iw(N){return N.match(_b)||[]}var ow=(function N(K){K=K==null?dt:Qn.defaults(dt.Object(),K,Qn.pick(dt,Tb));var H=K.Array,ae=K.Date,be=K.Error,Pe=K.Function,ot=K.Math,Ne=K.Object,xu=K.RegExp,sw=K.String,Xt=K.TypeError,es=H.prototype,aw=Pe.prototype,ei=Ne.prototype,ts=K["__core-js_shared__"],rs=aw.toString,Fe=ei.hasOwnProperty,uw=0,md=(function(){var n=/[^.]+$/.exec(ts&&ts.keys&&ts.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""})(),ns=ei.toString,lw=rs.call(Ne),cw=dt._,fw=xu("^"+rs.call(Fe).replace(nu,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),is=ed?K.Buffer:r,en=K.Symbol,os=K.Uint8Array,yd=is?is.allocUnsafe:r,ss=gd(Ne.getPrototypeOf,Ne),bd=Ne.create,wd=ei.propertyIsEnumerable,as=es.splice,xd=en?en.isConcatSpreadable:r,Ri=en?en.iterator:r,Sn=en?en.toStringTag:r,us=(function(){try{var n=Tn(Ne,"defineProperty");return n({},"",{}),n}catch{}})(),dw=K.clearTimeout!==dt.clearTimeout&&K.clearTimeout,pw=ae&&ae.now!==dt.Date.now&&ae.now,hw=K.setTimeout!==dt.setTimeout&&K.setTimeout,ls=ot.ceil,cs=ot.floor,Su=Ne.getOwnPropertySymbols,gw=is?is.isBuffer:r,Sd=K.isFinite,vw=es.join,mw=gd(Ne.keys,Ne),st=ot.max,bt=ot.min,yw=ae.now,bw=K.parseInt,Ed=ot.random,ww=es.reverse,Eu=Tn(K,"DataView"),Pi=Tn(K,"Map"),_u=Tn(K,"Promise"),ti=Tn(K,"Set"),Ci=Tn(K,"WeakMap"),ki=Tn(Ne,"create"),fs=Ci&&new Ci,ri={},xw=Rn(Eu),Sw=Rn(Pi),Ew=Rn(_u),_w=Rn(ti),Ow=Rn(Ci),ds=en?en.prototype:r,$i=ds?ds.valueOf:r,_d=ds?ds.toString:r;function A(n){if(Xe(n)&&!we(n)&&!(n instanceof Te)){if(n instanceof Yt)return n;if(Fe.call(n,"__wrapped__"))return Op(n)}return new Yt(n)}var ni=(function(){function n(){}return function(o){if(!Ge(o))return{};if(bd)return bd(o);n.prototype=o;var u=new n;return n.prototype=r,u}})();function ps(){}function Yt(n,o){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!o,this.__index__=0,this.__values__=r}A.templateSettings={escape:j0,evaluate:z0,interpolate:If,variable:"",imports:{_:A}},A.prototype=ps.prototype,A.prototype.constructor=A,Yt.prototype=ni(ps.prototype),Yt.prototype.constructor=Yt;function Te(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Q,this.__views__=[]}function Aw(){var n=new Te(this.__wrapped__);return n.__actions__=Pt(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Pt(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Pt(this.__views__),n}function Tw(){if(this.__filtered__){var n=new Te(this);n.__dir__=-1,n.__filtered__=!0}else n=this.clone(),n.__dir__*=-1;return n}function Rw(){var n=this.__wrapped__.value(),o=this.__dir__,u=we(n),y=o<0,_=u?n.length:0,T=z1(0,_,this.__views__),P=T.start,I=T.end,z=I-P,V=y?I:P-1,Y=this.__iteratees__,ee=Y.length,oe=0,le=bt(z,this.__takeCount__);if(!u||!y&&_==z&&le==z)return Kd(n,this.__actions__);var he=[];e:for(;z--&&oe<le;){V+=o;for(var Se=-1,ge=n[V];++Se<ee;){var Oe=Y[Se],Re=Oe.iteratee,zt=Oe.type,At=Re(ge);if(zt==C)ge=At;else if(!At){if(zt==q)continue e;break e}}he[oe++]=ge}return he}Te.prototype=ni(ps.prototype),Te.prototype.constructor=Te;function En(n){var o=-1,u=n==null?0:n.length;for(this.clear();++o<u;){var y=n[o];this.set(y[0],y[1])}}function Pw(){this.__data__=ki?ki(null):{},this.size=0}function Cw(n){var o=this.has(n)&&delete this.__data__[n];return this.size-=o?1:0,o}function kw(n){var o=this.__data__;if(ki){var u=o[n];return u===f?r:u}return Fe.call(o,n)?o[n]:r}function $w(n){var o=this.__data__;return ki?o[n]!==r:Fe.call(o,n)}function Iw(n,o){var u=this.__data__;return this.size+=this.has(n)?0:1,u[n]=ki&&o===r?f:o,this}En.prototype.clear=Pw,En.prototype.delete=Cw,En.prototype.get=kw,En.prototype.has=$w,En.prototype.set=Iw;function Ir(n){var o=-1,u=n==null?0:n.length;for(this.clear();++o<u;){var y=n[o];this.set(y[0],y[1])}}function Lw(){this.__data__=[],this.size=0}function Mw(n){var o=this.__data__,u=hs(o,n);if(u<0)return!1;var y=o.length-1;return u==y?o.pop():as.call(o,u,1),--this.size,!0}function Fw(n){var o=this.__data__,u=hs(o,n);return u<0?r:o[u][1]}function Dw(n){return hs(this.__data__,n)>-1}function Nw(n,o){var u=this.__data__,y=hs(u,n);return y<0?(++this.size,u.push([n,o])):u[y][1]=o,this}Ir.prototype.clear=Lw,Ir.prototype.delete=Mw,Ir.prototype.get=Fw,Ir.prototype.has=Dw,Ir.prototype.set=Nw;function Lr(n){var o=-1,u=n==null?0:n.length;for(this.clear();++o<u;){var y=n[o];this.set(y[0],y[1])}}function jw(){this.size=0,this.__data__={hash:new En,map:new(Pi||Ir),string:new En}}function zw(n){var o=As(this,n).delete(n);return this.size-=o?1:0,o}function Ww(n){return As(this,n).get(n)}function Bw(n){return As(this,n).has(n)}function Uw(n,o){var u=As(this,n),y=u.size;return u.set(n,o),this.size+=u.size==y?0:1,this}Lr.prototype.clear=jw,Lr.prototype.delete=zw,Lr.prototype.get=Ww,Lr.prototype.has=Bw,Lr.prototype.set=Uw;function _n(n){var o=-1,u=n==null?0:n.length;for(this.__data__=new Lr;++o<u;)this.add(n[o])}function Hw(n){return this.__data__.set(n,f),this}function qw(n){return this.__data__.has(n)}_n.prototype.add=_n.prototype.push=Hw,_n.prototype.has=qw;function ur(n){var o=this.__data__=new Ir(n);this.size=o.size}function Zw(){this.__data__=new Ir,this.size=0}function Gw(n){var o=this.__data__,u=o.delete(n);return this.size=o.size,u}function Kw(n){return this.__data__.get(n)}function Vw(n){return this.__data__.has(n)}function Xw(n,o){var u=this.__data__;if(u instanceof Ir){var y=u.__data__;if(!Pi||y.length<s-1)return y.push([n,o]),this.size=++u.size,this;u=this.__data__=new Lr(y)}return u.set(n,o),this.size=u.size,this}ur.prototype.clear=Zw,ur.prototype.delete=Gw,ur.prototype.get=Kw,ur.prototype.has=Vw,ur.prototype.set=Xw;function Od(n,o){var u=we(n),y=!u&&Pn(n),_=!u&&!y&&sn(n),T=!u&&!y&&!_&&ai(n),P=u||y||_||T,I=P?yu(n.length,sw):[],z=I.length;for(var V in n)(o||Fe.call(n,V))&&!(P&&(V=="length"||_&&(V=="offset"||V=="parent")||T&&(V=="buffer"||V=="byteLength"||V=="byteOffset")||Nr(V,z)))&&I.push(V);return I}function Ad(n){var o=n.length;return o?n[Mu(0,o-1)]:r}function Yw(n,o){return Ts(Pt(n),On(o,0,n.length))}function Jw(n){return Ts(Pt(n))}function Ou(n,o,u){(u!==r&&!lr(n[o],u)||u===r&&!(o in n))&&Mr(n,o,u)}function Ii(n,o,u){var y=n[o];(!(Fe.call(n,o)&&lr(y,u))||u===r&&!(o in n))&&Mr(n,o,u)}function hs(n,o){for(var u=n.length;u--;)if(lr(n[u][0],o))return u;return-1}function Qw(n,o,u,y){return tn(n,function(_,T,P){o(y,_,u(_),P)}),y}function Td(n,o){return n&&yr(o,lt(o),n)}function e1(n,o){return n&&yr(o,kt(o),n)}function Mr(n,o,u){o=="__proto__"&&us?us(n,o,{configurable:!0,enumerable:!0,value:u,writable:!0}):n[o]=u}function Au(n,o){for(var u=-1,y=o.length,_=H(y),T=n==null;++u<y;)_[u]=T?r:sl(n,o[u]);return _}function On(n,o,u){return n===n&&(u!==r&&(n=n<=u?n:u),o!==r&&(n=n>=o?n:o)),n}function Jt(n,o,u,y,_,T){var P,I=o&g,z=o&p,V=o&b;if(u&&(P=_?u(n,y,_,T):u(n)),P!==r)return P;if(!Ge(n))return n;var Y=we(n);if(Y){if(P=B1(n),!I)return Pt(n,P)}else{var ee=wt(n),oe=ee==ie||ee==mt;if(sn(n))return Yd(n,I);if(ee==Gt||ee==ce||oe&&!_){if(P=z||oe?{}:vp(n),!I)return z?k1(n,e1(P,n)):C1(n,Td(P,n))}else{if(!je[ee])return _?n:{};P=U1(n,ee,I)}}T||(T=new ur);var le=T.get(n);if(le)return le;T.set(n,P),qp(n)?n.forEach(function(ge){P.add(Jt(ge,o,u,ge,n,T))}):Up(n)&&n.forEach(function(ge,Oe){P.set(Oe,Jt(ge,o,u,Oe,n,T))});var he=V?z?Zu:qu:z?kt:lt,Se=Y?r:he(n);return Vt(Se||n,function(ge,Oe){Se&&(Oe=ge,ge=n[Oe]),Ii(P,Oe,Jt(ge,o,u,Oe,n,T))}),P}function t1(n){var o=lt(n);return function(u){return Rd(u,n,o)}}function Rd(n,o,u){var y=u.length;if(n==null)return!y;for(n=Ne(n);y--;){var _=u[y],T=o[_],P=n[_];if(P===r&&!(_ in n)||!T(P))return!1}return!0}function Pd(n,o,u){if(typeof n!="function")throw new Xt(l);return zi(function(){n.apply(r,u)},o)}function Li(n,o,u,y){var _=-1,T=Yo,P=!0,I=n.length,z=[],V=o.length;if(!I)return z;u&&(o=Ue(o,Dt(u))),y?(T=du,P=!1):o.length>=s&&(T=Ti,P=!1,o=new _n(o));e:for(;++_<I;){var Y=n[_],ee=u==null?Y:u(Y);if(Y=y||Y!==0?Y:0,P&&ee===ee){for(var oe=V;oe--;)if(o[oe]===ee)continue e;z.push(Y)}else T(o,ee,y)||z.push(Y)}return z}var tn=rp(mr),Cd=rp(Ru,!0);function r1(n,o){var u=!0;return tn(n,function(y,_,T){return u=!!o(y,_,T),u}),u}function gs(n,o,u){for(var y=-1,_=n.length;++y<_;){var T=n[y],P=o(T);if(P!=null&&(I===r?P===P&&!jt(P):u(P,I)))var I=P,z=T}return z}function n1(n,o,u,y){var _=n.length;for(u=xe(u),u<0&&(u=-u>_?0:_+u),y=y===r||y>_?_:xe(y),y<0&&(y+=_),y=u>y?0:Gp(y);u<y;)n[u++]=o;return n}function kd(n,o){var u=[];return tn(n,function(y,_,T){o(y,_,T)&&u.push(y)}),u}function pt(n,o,u,y,_){var T=-1,P=n.length;for(u||(u=q1),_||(_=[]);++T<P;){var I=n[T];o>0&&u(I)?o>1?pt(I,o-1,u,y,_):Jr(_,I):y||(_[_.length]=I)}return _}var Tu=np(),$d=np(!0);function mr(n,o){return n&&Tu(n,o,lt)}function Ru(n,o){return n&&$d(n,o,lt)}function vs(n,o){return Yr(o,function(u){return jr(n[u])})}function An(n,o){o=nn(o,n);for(var u=0,y=o.length;n!=null&&u<y;)n=n[br(o[u++])];return u&&u==y?n:r}function Id(n,o,u){var y=o(n);return we(n)?y:Jr(y,u(n))}function _t(n){return n==null?n===r?Ai:qo:Sn&&Sn in Ne(n)?j1(n):J1(n)}function Pu(n,o){return n>o}function i1(n,o){return n!=null&&Fe.call(n,o)}function o1(n,o){return n!=null&&o in Ne(n)}function s1(n,o,u){return n>=bt(o,u)&&n<st(o,u)}function Cu(n,o,u){for(var y=u?du:Yo,_=n[0].length,T=n.length,P=T,I=H(T),z=1/0,V=[];P--;){var Y=n[P];P&&o&&(Y=Ue(Y,Dt(o))),z=bt(Y.length,z),I[P]=!u&&(o||_>=120&&Y.length>=120)?new _n(P&&Y):r}Y=n[0];var ee=-1,oe=I[0];e:for(;++ee<_&&V.length<z;){var le=Y[ee],he=o?o(le):le;if(le=u||le!==0?le:0,!(oe?Ti(oe,he):y(V,he,u))){for(P=T;--P;){var Se=I[P];if(!(Se?Ti(Se,he):y(n[P],he,u)))continue e}oe&&oe.push(he),V.push(le)}}return V}function a1(n,o,u,y){return mr(n,function(_,T,P){o(y,u(_),T,P)}),y}function Mi(n,o,u){o=nn(o,n),n=wp(n,o);var y=n==null?n:n[br(er(o))];return y==null?r:Ft(y,n,u)}function Ld(n){return Xe(n)&&_t(n)==ce}function u1(n){return Xe(n)&&_t(n)==Xr}function l1(n){return Xe(n)&&_t(n)==Ee}function Fi(n,o,u,y,_){return n===o?!0:n==null||o==null||!Xe(n)&&!Xe(o)?n!==n&&o!==o:c1(n,o,u,y,Fi,_)}function c1(n,o,u,y,_,T){var P=we(n),I=we(o),z=P?fe:wt(n),V=I?fe:wt(o);z=z==ce?Gt:z,V=V==ce?Gt:V;var Y=z==Gt,ee=V==Gt,oe=z==V;if(oe&&sn(n)){if(!sn(o))return!1;P=!0,Y=!1}if(oe&&!Y)return T||(T=new ur),P||ai(n)?pp(n,o,u,y,_,T):D1(n,o,z,u,y,_,T);if(!(u&x)){var le=Y&&Fe.call(n,"__wrapped__"),he=ee&&Fe.call(o,"__wrapped__");if(le||he){var Se=le?n.value():n,ge=he?o.value():o;return T||(T=new ur),_(Se,ge,u,y,T)}}return oe?(T||(T=new ur),N1(n,o,u,y,_,T)):!1}function f1(n){return Xe(n)&&wt(n)==ut}function ku(n,o,u,y){var _=u.length,T=_,P=!y;if(n==null)return!T;for(n=Ne(n);_--;){var I=u[_];if(P&&I[2]?I[1]!==n[I[0]]:!(I[0]in n))return!1}for(;++_<T;){I=u[_];var z=I[0],V=n[z],Y=I[1];if(P&&I[2]){if(V===r&&!(z in n))return!1}else{var ee=new ur;if(y)var oe=y(V,Y,z,n,o,ee);if(!(oe===r?Fi(Y,V,x|d,y,ee):oe))return!1}}return!0}function Md(n){if(!Ge(n)||G1(n))return!1;var o=jr(n)?fw:tb;return o.test(Rn(n))}function d1(n){return Xe(n)&&_t(n)==Mt}function p1(n){return Xe(n)&&wt(n)==yt}function h1(n){return Xe(n)&&Is(n.length)&&!!Be[_t(n)]}function Fd(n){return typeof n=="function"?n:n==null?$t:typeof n=="object"?we(n)?jd(n[0],n[1]):Nd(n):ih(n)}function $u(n){if(!ji(n))return mw(n);var o=[];for(var u in Ne(n))Fe.call(n,u)&&u!="constructor"&&o.push(u);return o}function g1(n){if(!Ge(n))return Y1(n);var o=ji(n),u=[];for(var y in n)y=="constructor"&&(o||!Fe.call(n,y))||u.push(y);return u}function Iu(n,o){return n<o}function Dd(n,o){var u=-1,y=Ct(n)?H(n.length):[];return tn(n,function(_,T,P){y[++u]=o(_,T,P)}),y}function Nd(n){var o=Ku(n);return o.length==1&&o[0][2]?yp(o[0][0],o[0][1]):function(u){return u===n||ku(u,n,o)}}function jd(n,o){return Xu(n)&&mp(o)?yp(br(n),o):function(u){var y=sl(u,n);return y===r&&y===o?al(u,n):Fi(o,y,x|d)}}function ms(n,o,u,y,_){n!==o&&Tu(o,function(T,P){if(_||(_=new ur),Ge(T))v1(n,o,P,u,ms,y,_);else{var I=y?y(Ju(n,P),T,P+"",n,o,_):r;I===r&&(I=T),Ou(n,P,I)}},kt)}function v1(n,o,u,y,_,T,P){var I=Ju(n,u),z=Ju(o,u),V=P.get(z);if(V){Ou(n,u,V);return}var Y=T?T(I,z,u+"",n,o,P):r,ee=Y===r;if(ee){var oe=we(z),le=!oe&&sn(z),he=!oe&&!le&&ai(z);Y=z,oe||le||he?we(I)?Y=I:Je(I)?Y=Pt(I):le?(ee=!1,Y=Yd(z,!0)):he?(ee=!1,Y=Jd(z,!0)):Y=[]:Wi(z)||Pn(z)?(Y=I,Pn(I)?Y=Kp(I):(!Ge(I)||jr(I))&&(Y=vp(z))):ee=!1}ee&&(P.set(z,Y),_(Y,z,y,T,P),P.delete(z)),Ou(n,u,Y)}function zd(n,o){var u=n.length;if(u)return o+=o<0?u:0,Nr(o,u)?n[o]:r}function Wd(n,o,u){o.length?o=Ue(o,function(T){return we(T)?function(P){return An(P,T.length===1?T[0]:T)}:T}):o=[$t];var y=-1;o=Ue(o,Dt(pe()));var _=Dd(n,function(T,P,I){var z=Ue(o,function(V){return V(T)});return{criteria:z,index:++y,value:T}});return Ub(_,function(T,P){return P1(T,P,u)})}function m1(n,o){return Bd(n,o,function(u,y){return al(n,y)})}function Bd(n,o,u){for(var y=-1,_=o.length,T={};++y<_;){var P=o[y],I=An(n,P);u(I,P)&&Di(T,nn(P,n),I)}return T}function y1(n){return function(o){return An(o,n)}}function Lu(n,o,u,y){var _=y?Bb:Xn,T=-1,P=o.length,I=n;for(n===o&&(o=Pt(o)),u&&(I=Ue(n,Dt(u)));++T<P;)for(var z=0,V=o[T],Y=u?u(V):V;(z=_(I,Y,z,y))>-1;)I!==n&&as.call(I,z,1),as.call(n,z,1);return n}function Ud(n,o){for(var u=n?o.length:0,y=u-1;u--;){var _=o[u];if(u==y||_!==T){var T=_;Nr(_)?as.call(n,_,1):Nu(n,_)}}return n}function Mu(n,o){return n+cs(Ed()*(o-n+1))}function b1(n,o,u,y){for(var _=-1,T=st(ls((o-n)/(u||1)),0),P=H(T);T--;)P[y?T:++_]=n,n+=u;return P}function Fu(n,o){var u="";if(!n||o<1||o>te)return u;do o%2&&(u+=n),o=cs(o/2),o&&(n+=n);while(o);return u}function _e(n,o){return Qu(bp(n,o,$t),n+"")}function w1(n){return Ad(ui(n))}function x1(n,o){var u=ui(n);return Ts(u,On(o,0,u.length))}function Di(n,o,u,y){if(!Ge(n))return n;o=nn(o,n);for(var _=-1,T=o.length,P=T-1,I=n;I!=null&&++_<T;){var z=br(o[_]),V=u;if(z==="__proto__"||z==="constructor"||z==="prototype")return n;if(_!=P){var Y=I[z];V=y?y(Y,z,I):r,V===r&&(V=Ge(Y)?Y:Nr(o[_+1])?[]:{})}Ii(I,z,V),I=I[z]}return n}var Hd=fs?function(n,o){return fs.set(n,o),n}:$t,S1=us?function(n,o){return us(n,"toString",{configurable:!0,enumerable:!1,value:ll(o),writable:!0})}:$t;function E1(n){return Ts(ui(n))}function Qt(n,o,u){var y=-1,_=n.length;o<0&&(o=-o>_?0:_+o),u=u>_?_:u,u<0&&(u+=_),_=o>u?0:u-o>>>0,o>>>=0;for(var T=H(_);++y<_;)T[y]=n[y+o];return T}function _1(n,o){var u;return tn(n,function(y,_,T){return u=o(y,_,T),!u}),!!u}function ys(n,o,u){var y=0,_=n==null?y:n.length;if(typeof o=="number"&&o===o&&_<=ue){for(;y<_;){var T=y+_>>>1,P=n[T];P!==null&&!jt(P)&&(u?P<=o:P<o)?y=T+1:_=T}return _}return Du(n,o,$t,u)}function Du(n,o,u,y){var _=0,T=n==null?0:n.length;if(T===0)return 0;o=u(o);for(var P=o!==o,I=o===null,z=jt(o),V=o===r;_<T;){var Y=cs((_+T)/2),ee=u(n[Y]),oe=ee!==r,le=ee===null,he=ee===ee,Se=jt(ee);if(P)var ge=y||he;else V?ge=he&&(y||oe):I?ge=he&&oe&&(y||!le):z?ge=he&&oe&&!le&&(y||!Se):le||Se?ge=!1:ge=y?ee<=o:ee<o;ge?_=Y+1:T=Y}return bt(T,se)}function qd(n,o){for(var u=-1,y=n.length,_=0,T=[];++u<y;){var P=n[u],I=o?o(P):P;if(!u||!lr(I,z)){var z=I;T[_++]=P===0?0:P}}return T}function Zd(n){return typeof n=="number"?n:jt(n)?Z:+n}function Nt(n){if(typeof n=="string")return n;if(we(n))return Ue(n,Nt)+"";if(jt(n))return _d?_d.call(n):"";var o=n+"";return o=="0"&&1/n==-X?"-0":o}function rn(n,o,u){var y=-1,_=Yo,T=n.length,P=!0,I=[],z=I;if(u)P=!1,_=du;else if(T>=s){var V=o?null:M1(n);if(V)return Qo(V);P=!1,_=Ti,z=new _n}else z=o?[]:I;e:for(;++y<T;){var Y=n[y],ee=o?o(Y):Y;if(Y=u||Y!==0?Y:0,P&&ee===ee){for(var oe=z.length;oe--;)if(z[oe]===ee)continue e;o&&z.push(ee),I.push(Y)}else _(z,ee,u)||(z!==I&&z.push(ee),I.push(Y))}return I}function Nu(n,o){return o=nn(o,n),n=wp(n,o),n==null||delete n[br(er(o))]}function Gd(n,o,u,y){return Di(n,o,u(An(n,o)),y)}function bs(n,o,u,y){for(var _=n.length,T=y?_:-1;(y?T--:++T<_)&&o(n[T],T,n););return u?Qt(n,y?0:T,y?T+1:_):Qt(n,y?T+1:0,y?_:T)}function Kd(n,o){var u=n;return u instanceof Te&&(u=u.value()),pu(o,function(y,_){return _.func.apply(_.thisArg,Jr([y],_.args))},u)}function ju(n,o,u){var y=n.length;if(y<2)return y?rn(n[0]):[];for(var _=-1,T=H(y);++_<y;)for(var P=n[_],I=-1;++I<y;)I!=_&&(T[_]=Li(T[_]||P,n[I],o,u));return rn(pt(T,1),o,u)}function Vd(n,o,u){for(var y=-1,_=n.length,T=o.length,P={};++y<_;){var I=y<T?o[y]:r;u(P,n[y],I)}return P}function zu(n){return Je(n)?n:[]}function Wu(n){return typeof n=="function"?n:$t}function nn(n,o){return we(n)?n:Xu(n,o)?[n]:_p(ke(n))}var O1=_e;function on(n,o,u){var y=n.length;return u=u===r?y:u,!o&&u>=y?n:Qt(n,o,u)}var Xd=dw||function(n){return dt.clearTimeout(n)};function Yd(n,o){if(o)return n.slice();var u=n.length,y=yd?yd(u):new n.constructor(u);return n.copy(y),y}function Bu(n){var o=new n.constructor(n.byteLength);return new os(o).set(new os(n)),o}function A1(n,o){var u=o?Bu(n.buffer):n.buffer;return new n.constructor(u,n.byteOffset,n.byteLength)}function T1(n){var o=new n.constructor(n.source,Lf.exec(n));return o.lastIndex=n.lastIndex,o}function R1(n){return $i?Ne($i.call(n)):{}}function Jd(n,o){var u=o?Bu(n.buffer):n.buffer;return new n.constructor(u,n.byteOffset,n.length)}function Qd(n,o){if(n!==o){var u=n!==r,y=n===null,_=n===n,T=jt(n),P=o!==r,I=o===null,z=o===o,V=jt(o);if(!I&&!V&&!T&&n>o||T&&P&&z&&!I&&!V||y&&P&&z||!u&&z||!_)return 1;if(!y&&!T&&!V&&n<o||V&&u&&_&&!y&&!T||I&&u&&_||!P&&_||!z)return-1}return 0}function P1(n,o,u){for(var y=-1,_=n.criteria,T=o.criteria,P=_.length,I=u.length;++y<P;){var z=Qd(_[y],T[y]);if(z){if(y>=I)return z;var V=u[y];return z*(V=="desc"?-1:1)}}return n.index-o.index}function ep(n,o,u,y){for(var _=-1,T=n.length,P=u.length,I=-1,z=o.length,V=st(T-P,0),Y=H(z+V),ee=!y;++I<z;)Y[I]=o[I];for(;++_<P;)(ee||_<T)&&(Y[u[_]]=n[_]);for(;V--;)Y[I++]=n[_++];return Y}function tp(n,o,u,y){for(var _=-1,T=n.length,P=-1,I=u.length,z=-1,V=o.length,Y=st(T-I,0),ee=H(Y+V),oe=!y;++_<Y;)ee[_]=n[_];for(var le=_;++z<V;)ee[le+z]=o[z];for(;++P<I;)(oe||_<T)&&(ee[le+u[P]]=n[_++]);return ee}function Pt(n,o){var u=-1,y=n.length;for(o||(o=H(y));++u<y;)o[u]=n[u];return o}function yr(n,o,u,y){var _=!u;u||(u={});for(var T=-1,P=o.length;++T<P;){var I=o[T],z=y?y(u[I],n[I],I,u,n):r;z===r&&(z=n[I]),_?Mr(u,I,z):Ii(u,I,z)}return u}function C1(n,o){return yr(n,Vu(n),o)}function k1(n,o){return yr(n,hp(n),o)}function ws(n,o){return function(u,y){var _=we(u)?Fb:Qw,T=o?o():{};return _(u,n,pe(y,2),T)}}function ii(n){return _e(function(o,u){var y=-1,_=u.length,T=_>1?u[_-1]:r,P=_>2?u[2]:r;for(T=n.length>3&&typeof T=="function"?(_--,T):r,P&&Ot(u[0],u[1],P)&&(T=_<3?r:T,_=1),o=Ne(o);++y<_;){var I=u[y];I&&n(o,I,y,T)}return o})}function rp(n,o){return function(u,y){if(u==null)return u;if(!Ct(u))return n(u,y);for(var _=u.length,T=o?_:-1,P=Ne(u);(o?T--:++T<_)&&y(P[T],T,P)!==!1;);return u}}function np(n){return function(o,u,y){for(var _=-1,T=Ne(o),P=y(o),I=P.length;I--;){var z=P[n?I:++_];if(u(T[z],z,T)===!1)break}return o}}function $1(n,o,u){var y=o&w,_=Ni(n);function T(){var P=this&&this!==dt&&this instanceof T?_:n;return P.apply(y?u:this,arguments)}return T}function ip(n){return function(o){o=ke(o);var u=Yn(o)?ar(o):r,y=u?u[0]:o.charAt(0),_=u?on(u,1).join(""):o.slice(1);return y[n]()+_}}function oi(n){return function(o){return pu(rh(th(o).replace(Sb,"")),n,"")}}function Ni(n){return function(){var o=arguments;switch(o.length){case 0:return new n;case 1:return new n(o[0]);case 2:return new n(o[0],o[1]);case 3:return new n(o[0],o[1],o[2]);case 4:return new n(o[0],o[1],o[2],o[3]);case 5:return new n(o[0],o[1],o[2],o[3],o[4]);case 6:return new n(o[0],o[1],o[2],o[3],o[4],o[5]);case 7:return new n(o[0],o[1],o[2],o[3],o[4],o[5],o[6])}var u=ni(n.prototype),y=n.apply(u,o);return Ge(y)?y:u}}function I1(n,o,u){var y=Ni(n);function _(){for(var T=arguments.length,P=H(T),I=T,z=si(_);I--;)P[I]=arguments[I];var V=T<3&&P[0]!==z&&P[T-1]!==z?[]:Qr(P,z);if(T-=V.length,T<u)return lp(n,o,xs,_.placeholder,r,P,V,r,r,u-T);var Y=this&&this!==dt&&this instanceof _?y:n;return Ft(Y,this,P)}return _}function op(n){return function(o,u,y){var _=Ne(o);if(!Ct(o)){var T=pe(u,3);o=lt(o),u=function(I){return T(_[I],I,_)}}var P=n(o,u,y);return P>-1?_[T?o[P]:P]:r}}function sp(n){return Dr(function(o){var u=o.length,y=u,_=Yt.prototype.thru;for(n&&o.reverse();y--;){var T=o[y];if(typeof T!="function")throw new Xt(l);if(_&&!P&&Os(T)=="wrapper")var P=new Yt([],!0)}for(y=P?y:u;++y<u;){T=o[y];var I=Os(T),z=I=="wrapper"?Gu(T):r;z&&Yu(z[0])&&z[1]==(B|E|O|M)&&!z[4].length&&z[9]==1?P=P[Os(z[0])].apply(P,z[3]):P=T.length==1&&Yu(T)?P[I]():P.thru(T)}return function(){var V=arguments,Y=V[0];if(P&&V.length==1&&we(Y))return P.plant(Y).value();for(var ee=0,oe=u?o[ee].apply(this,V):Y;++ee<u;)oe=o[ee].call(this,oe);return oe}})}function xs(n,o,u,y,_,T,P,I,z,V){var Y=o&B,ee=o&w,oe=o&h,le=o&(E|R),he=o&F,Se=oe?r:Ni(n);function ge(){for(var Oe=arguments.length,Re=H(Oe),zt=Oe;zt--;)Re[zt]=arguments[zt];if(le)var At=si(ge),Wt=qb(Re,At);if(y&&(Re=ep(Re,y,_,le)),T&&(Re=tp(Re,T,P,le)),Oe-=Wt,le&&Oe<V){var Qe=Qr(Re,At);return lp(n,o,xs,ge.placeholder,u,Re,Qe,I,z,V-Oe)}var cr=ee?u:this,Wr=oe?cr[n]:n;return Oe=Re.length,I?Re=Q1(Re,I):he&&Oe>1&&Re.reverse(),Y&&z<Oe&&(Re.length=z),this&&this!==dt&&this instanceof ge&&(Wr=Se||Ni(Wr)),Wr.apply(cr,Re)}return ge}function ap(n,o){return function(u,y){return a1(u,n,o(y),{})}}function Ss(n,o){return function(u,y){var _;if(u===r&&y===r)return o;if(u!==r&&(_=u),y!==r){if(_===r)return y;typeof u=="string"||typeof y=="string"?(u=Nt(u),y=Nt(y)):(u=Zd(u),y=Zd(y)),_=n(u,y)}return _}}function Uu(n){return Dr(function(o){return o=Ue(o,Dt(pe())),_e(function(u){var y=this;return n(o,function(_){return Ft(_,y,u)})})})}function Es(n,o){o=o===r?" ":Nt(o);var u=o.length;if(u<2)return u?Fu(o,n):o;var y=Fu(o,ls(n/Jn(o)));return Yn(o)?on(ar(y),0,n).join(""):y.slice(0,n)}function L1(n,o,u,y){var _=o&w,T=Ni(n);function P(){for(var I=-1,z=arguments.length,V=-1,Y=y.length,ee=H(Y+z),oe=this&&this!==dt&&this instanceof P?T:n;++V<Y;)ee[V]=y[V];for(;z--;)ee[V++]=arguments[++I];return Ft(oe,_?u:this,ee)}return P}function up(n){return function(o,u,y){return y&&typeof y!="number"&&Ot(o,u,y)&&(u=y=r),o=zr(o),u===r?(u=o,o=0):u=zr(u),y=y===r?o<u?1:-1:zr(y),b1(o,u,y,n)}}function _s(n){return function(o,u){return typeof o=="string"&&typeof u=="string"||(o=tr(o),u=tr(u)),n(o,u)}}function lp(n,o,u,y,_,T,P,I,z,V){var Y=o&E,ee=Y?P:r,oe=Y?r:P,le=Y?T:r,he=Y?r:T;o|=Y?O:k,o&=~(Y?k:O),o&S||(o&=-4);var Se=[n,o,_,le,ee,he,oe,I,z,V],ge=u.apply(r,Se);return Yu(n)&&xp(ge,Se),ge.placeholder=y,Sp(ge,n,o)}function Hu(n){var o=ot[n];return function(u,y){if(u=tr(u),y=y==null?0:bt(xe(y),292),y&&Sd(u)){var _=(ke(u)+"e").split("e"),T=o(_[0]+"e"+(+_[1]+y));return _=(ke(T)+"e").split("e"),+(_[0]+"e"+(+_[1]-y))}return o(u)}}var M1=ti&&1/Qo(new ti([,-0]))[1]==X?function(n){return new ti(n)}:dl;function cp(n){return function(o){var u=wt(o);return u==ut?wu(o):u==yt?Jb(o):Hb(o,n(o))}}function Fr(n,o,u,y,_,T,P,I){var z=o&h;if(!z&&typeof n!="function")throw new Xt(l);var V=y?y.length:0;if(V||(o&=-97,y=_=r),P=P===r?P:st(xe(P),0),I=I===r?I:xe(I),V-=_?_.length:0,o&k){var Y=y,ee=_;y=_=r}var oe=z?r:Gu(n),le=[n,o,u,y,_,Y,ee,T,P,I];if(oe&&X1(le,oe),n=le[0],o=le[1],u=le[2],y=le[3],_=le[4],I=le[9]=le[9]===r?z?0:n.length:st(le[9]-V,0),!I&&o&(E|R)&&(o&=-25),!o||o==w)var he=$1(n,o,u);else o==E||o==R?he=I1(n,o,I):(o==O||o==(w|O))&&!_.length?he=L1(n,o,u,y):he=xs.apply(r,le);var Se=oe?Hd:xp;return Sp(Se(he,le),n,o)}function fp(n,o,u,y){return n===r||lr(n,ei[u])&&!Fe.call(y,u)?o:n}function dp(n,o,u,y,_,T){return Ge(n)&&Ge(o)&&(T.set(o,n),ms(n,o,r,dp,T),T.delete(o)),n}function F1(n){return Wi(n)?r:n}function pp(n,o,u,y,_,T){var P=u&x,I=n.length,z=o.length;if(I!=z&&!(P&&z>I))return!1;var V=T.get(n),Y=T.get(o);if(V&&Y)return V==o&&Y==n;var ee=-1,oe=!0,le=u&d?new _n:r;for(T.set(n,o),T.set(o,n);++ee<I;){var he=n[ee],Se=o[ee];if(y)var ge=P?y(Se,he,ee,o,n,T):y(he,Se,ee,n,o,T);if(ge!==r){if(ge)continue;oe=!1;break}if(le){if(!hu(o,function(Oe,Re){if(!Ti(le,Re)&&(he===Oe||_(he,Oe,u,y,T)))return le.push(Re)})){oe=!1;break}}else if(!(he===Se||_(he,Se,u,y,T))){oe=!1;break}}return T.delete(n),T.delete(o),oe}function D1(n,o,u,y,_,T,P){switch(u){case $r:if(n.byteLength!=o.byteLength||n.byteOffset!=o.byteOffset)return!1;n=n.buffer,o=o.buffer;case Xr:return!(n.byteLength!=o.byteLength||!T(new os(n),new os(o)));case ve:case Ee:case vr:return lr(+n,+o);case Ze:return n.name==o.name&&n.message==o.message;case Mt:case Kr:return n==o+"";case ut:var I=wu;case yt:var z=y&x;if(I||(I=Qo),n.size!=o.size&&!z)return!1;var V=P.get(n);if(V)return V==o;y|=d,P.set(n,o);var Y=pp(I(n),I(o),y,_,T,P);return P.delete(n),Y;case wn:if($i)return $i.call(n)==$i.call(o)}return!1}function N1(n,o,u,y,_,T){var P=u&x,I=qu(n),z=I.length,V=qu(o),Y=V.length;if(z!=Y&&!P)return!1;for(var ee=z;ee--;){var oe=I[ee];if(!(P?oe in o:Fe.call(o,oe)))return!1}var le=T.get(n),he=T.get(o);if(le&&he)return le==o&&he==n;var Se=!0;T.set(n,o),T.set(o,n);for(var ge=P;++ee<z;){oe=I[ee];var Oe=n[oe],Re=o[oe];if(y)var zt=P?y(Re,Oe,oe,o,n,T):y(Oe,Re,oe,n,o,T);if(!(zt===r?Oe===Re||_(Oe,Re,u,y,T):zt)){Se=!1;break}ge||(ge=oe=="constructor")}if(Se&&!ge){var At=n.constructor,Wt=o.constructor;At!=Wt&&"constructor"in n&&"constructor"in o&&!(typeof At=="function"&&At instanceof At&&typeof Wt=="function"&&Wt instanceof Wt)&&(Se=!1)}return T.delete(n),T.delete(o),Se}function Dr(n){return Qu(bp(n,r,Rp),n+"")}function qu(n){return Id(n,lt,Vu)}function Zu(n){return Id(n,kt,hp)}var Gu=fs?function(n){return fs.get(n)}:dl;function Os(n){for(var o=n.name+"",u=ri[o],y=Fe.call(ri,o)?u.length:0;y--;){var _=u[y],T=_.func;if(T==null||T==n)return _.name}return o}function si(n){var o=Fe.call(A,"placeholder")?A:n;return o.placeholder}function pe(){var n=A.iteratee||cl;return n=n===cl?Fd:n,arguments.length?n(arguments[0],arguments[1]):n}function As(n,o){var u=n.__data__;return Z1(o)?u[typeof o=="string"?"string":"hash"]:u.map}function Ku(n){for(var o=lt(n),u=o.length;u--;){var y=o[u],_=n[y];o[u]=[y,_,mp(_)]}return o}function Tn(n,o){var u=Vb(n,o);return Md(u)?u:r}function j1(n){var o=Fe.call(n,Sn),u=n[Sn];try{n[Sn]=r;var y=!0}catch{}var _=ns.call(n);return y&&(o?n[Sn]=u:delete n[Sn]),_}var Vu=Su?function(n){return n==null?[]:(n=Ne(n),Yr(Su(n),function(o){return wd.call(n,o)}))}:pl,hp=Su?function(n){for(var o=[];n;)Jr(o,Vu(n)),n=ss(n);return o}:pl,wt=_t;(Eu&&wt(new Eu(new ArrayBuffer(1)))!=$r||Pi&&wt(new Pi)!=ut||_u&&wt(_u.resolve())!=Zo||ti&&wt(new ti)!=yt||Ci&&wt(new Ci)!=Vr)&&(wt=function(n){var o=_t(n),u=o==Gt?n.constructor:r,y=u?Rn(u):"";if(y)switch(y){case xw:return $r;case Sw:return ut;case Ew:return Zo;case _w:return yt;case Ow:return Vr}return o});function z1(n,o,u){for(var y=-1,_=u.length;++y<_;){var T=u[y],P=T.size;switch(T.type){case"drop":n+=P;break;case"dropRight":o-=P;break;case"take":o=bt(o,n+P);break;case"takeRight":n=st(n,o-P);break}}return{start:n,end:o}}function W1(n){var o=n.match(G0);return o?o[1].split(K0):[]}function gp(n,o,u){o=nn(o,n);for(var y=-1,_=o.length,T=!1;++y<_;){var P=br(o[y]);if(!(T=n!=null&&u(n,P)))break;n=n[P]}return T||++y!=_?T:(_=n==null?0:n.length,!!_&&Is(_)&&Nr(P,_)&&(we(n)||Pn(n)))}function B1(n){var o=n.length,u=new n.constructor(o);return o&&typeof n[0]=="string"&&Fe.call(n,"index")&&(u.index=n.index,u.input=n.input),u}function vp(n){return typeof n.constructor=="function"&&!ji(n)?ni(ss(n)):{}}function U1(n,o,u){var y=n.constructor;switch(o){case Xr:return Bu(n);case ve:case Ee:return new y(+n);case $r:return A1(n,u);case Ka:case Va:case Xa:case Ya:case Ja:case Qa:case eu:case tu:case ru:return Jd(n,u);case ut:return new y;case vr:case Kr:return new y(n);case Mt:return T1(n);case yt:return new y;case wn:return R1(n)}}function H1(n,o){var u=o.length;if(!u)return n;var y=u-1;return o[y]=(u>1?"& ":"")+o[y],o=o.join(u>2?", ":" "),n.replace(Z0,`{
182
+ */var f$=xo.exports,xm;function d$(){return xm||(xm=1,(function(e,t){(function(){var r,i="4.17.21",s=200,a="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",u="Expected a function",c="Invalid `variable` option passed into `_.template`",f="__lodash_hash_undefined__",g=500,h="__lodash_placeholder__",v=1,p=2,y=4,x=1,d=2,b=1,m=2,S=4,E=8,R=16,O=32,k=64,W=128,M=256,F=512,G=30,j="...",L=800,H=16,q=1,C=2,J=3,Y=1/0,te=9007199254740991,de=17976931348623157e292,Z=NaN,Q=4294967295,se=Q-1,ue=Q>>>1,ne=[["ary",W],["bind",b],["bindKey",m],["curry",E],["curryRight",R],["flip",F],["partial",O],["partialRight",k],["rearg",M]],ce="[object Arguments]",fe="[object Array]",ye="[object AsyncFunction]",me="[object Boolean]",Ee="[object Date]",Te="[object DOMException]",Ve="[object Error]",ie="[object Function]",wt="[object GeneratorFunction]",ft="[object Map]",wr="[object Number]",Yo="[object Null]",Vt="[object Object]",Xo="[object Promise]",ru="[object Proxy]",Ft="[object RegExp]",bt="[object Set]",Jr="[object String]",_n="[object Symbol]",$i="[object Undefined]",Qr="[object WeakMap]",Jo="[object WeakSet]",en="[object ArrayBuffer]",Mr="[object DataView]",nu="[object Float32Array]",iu="[object Float64Array]",ou="[object Int8Array]",su="[object Int16Array]",au="[object Int32Array]",uu="[object Uint8Array]",lu="[object Uint8ClampedArray]",cu="[object Uint16Array]",fu="[object Uint32Array]",J0=/\b__p \+= '';/g,Q0=/\b(__p \+=) '' \+/g,ew=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Wf=/&(?:amp|lt|gt|quot|#39);/g,Hf=/[&<>"']/g,tw=RegExp(Wf.source),rw=RegExp(Hf.source),nw=/<%-([\s\S]+?)%>/g,iw=/<%([\s\S]+?)%>/g,Uf=/<%=([\s\S]+?)%>/g,ow=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,sw=/^\w*$/,aw=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,du=/[\\^$.*+?()[\]{}|]/g,uw=RegExp(du.source),pu=/^\s+/,lw=/\s/,cw=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,fw=/\{\n\/\* \[wrapped with (.+)\] \*/,dw=/,? & /,pw=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,hw=/[()=,{}\[\]\/\s]/,gw=/\\(\\)?/g,mw=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,qf=/\w*$/,vw=/^[-+]0x[0-9a-f]+$/i,yw=/^0b[01]+$/i,ww=/^\[object .+?Constructor\]$/,bw=/^0o[0-7]+$/i,xw=/^(?:0|[1-9]\d*)$/,Sw=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Qo=/($^)/,Ew=/['\n\r\u2028\u2029\\]/g,es="\\ud800-\\udfff",_w="\\u0300-\\u036f",Ow="\\ufe20-\\ufe2f",Tw="\\u20d0-\\u20ff",Zf=_w+Ow+Tw,Gf="\\u2700-\\u27bf",Kf="a-z\\xdf-\\xf6\\xf8-\\xff",Aw="\\xac\\xb1\\xd7\\xf7",Rw="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Pw="\\u2000-\\u206f",Cw=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Vf="A-Z\\xc0-\\xd6\\xd8-\\xde",Yf="\\ufe0e\\ufe0f",Xf=Aw+Rw+Pw+Cw,hu="['’]",kw="["+es+"]",Jf="["+Xf+"]",ts="["+Zf+"]",Qf="\\d+",$w="["+Gf+"]",ed="["+Kf+"]",td="[^"+es+Xf+Qf+Gf+Kf+Vf+"]",gu="\\ud83c[\\udffb-\\udfff]",Iw="(?:"+ts+"|"+gu+")",rd="[^"+es+"]",mu="(?:\\ud83c[\\udde6-\\uddff]){2}",vu="[\\ud800-\\udbff][\\udc00-\\udfff]",ei="["+Vf+"]",nd="\\u200d",id="(?:"+ed+"|"+td+")",Lw="(?:"+ei+"|"+td+")",od="(?:"+hu+"(?:d|ll|m|re|s|t|ve))?",sd="(?:"+hu+"(?:D|LL|M|RE|S|T|VE))?",ad=Iw+"?",ud="["+Yf+"]?",Mw="(?:"+nd+"(?:"+[rd,mu,vu].join("|")+")"+ud+ad+")*",Dw="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Fw="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",ld=ud+ad+Mw,Nw="(?:"+[$w,mu,vu].join("|")+")"+ld,jw="(?:"+[rd+ts+"?",ts,mu,vu,kw].join("|")+")",zw=RegExp(hu,"g"),Bw=RegExp(ts,"g"),yu=RegExp(gu+"(?="+gu+")|"+jw+ld,"g"),Ww=RegExp([ei+"?"+ed+"+"+od+"(?="+[Jf,ei,"$"].join("|")+")",Lw+"+"+sd+"(?="+[Jf,ei+id,"$"].join("|")+")",ei+"?"+id+"+"+od,ei+"+"+sd,Fw,Dw,Qf,Nw].join("|"),"g"),Hw=RegExp("["+nd+es+Zf+Yf+"]"),Uw=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,qw=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Zw=-1,Ue={};Ue[nu]=Ue[iu]=Ue[ou]=Ue[su]=Ue[au]=Ue[uu]=Ue[lu]=Ue[cu]=Ue[fu]=!0,Ue[ce]=Ue[fe]=Ue[en]=Ue[me]=Ue[Mr]=Ue[Ee]=Ue[Ve]=Ue[ie]=Ue[ft]=Ue[wr]=Ue[Vt]=Ue[Ft]=Ue[bt]=Ue[Jr]=Ue[Qr]=!1;var We={};We[ce]=We[fe]=We[en]=We[Mr]=We[me]=We[Ee]=We[nu]=We[iu]=We[ou]=We[su]=We[au]=We[ft]=We[wr]=We[Vt]=We[Ft]=We[bt]=We[Jr]=We[_n]=We[uu]=We[lu]=We[cu]=We[fu]=!0,We[Ve]=We[ie]=We[Qr]=!1;var Gw={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Kw={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Vw={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Yw={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Xw=parseFloat,Jw=parseInt,cd=typeof Ws=="object"&&Ws&&Ws.Object===Object&&Ws,Qw=typeof self=="object"&&self&&self.Object===Object&&self,ht=cd||Qw||Function("return this")(),wu=t&&!t.nodeType&&t,On=wu&&!0&&e&&!e.nodeType&&e,fd=On&&On.exports===wu,bu=fd&&cd.process,Yt=(function(){try{var N=On&&On.require&&On.require("util").types;return N||bu&&bu.binding&&bu.binding("util")}catch{}})(),dd=Yt&&Yt.isArrayBuffer,pd=Yt&&Yt.isDate,hd=Yt&&Yt.isMap,gd=Yt&&Yt.isRegExp,md=Yt&&Yt.isSet,vd=Yt&&Yt.isTypedArray;function Nt(N,K,U){switch(U.length){case 0:return N.call(K);case 1:return N.call(K,U[0]);case 2:return N.call(K,U[0],U[1]);case 3:return N.call(K,U[0],U[1],U[2])}return N.apply(K,U)}function eb(N,K,U,ae){for(var we=-1,Pe=N==null?0:N.length;++we<Pe;){var ut=N[we];K(ae,ut,U(ut),N)}return ae}function Xt(N,K){for(var U=-1,ae=N==null?0:N.length;++U<ae&&K(N[U],U,N)!==!1;);return N}function tb(N,K){for(var U=N==null?0:N.length;U--&&K(N[U],U,N)!==!1;);return N}function yd(N,K){for(var U=-1,ae=N==null?0:N.length;++U<ae;)if(!K(N[U],U,N))return!1;return!0}function tn(N,K){for(var U=-1,ae=N==null?0:N.length,we=0,Pe=[];++U<ae;){var ut=N[U];K(ut,U,N)&&(Pe[we++]=ut)}return Pe}function rs(N,K){var U=N==null?0:N.length;return!!U&&ti(N,K,0)>-1}function xu(N,K,U){for(var ae=-1,we=N==null?0:N.length;++ae<we;)if(U(K,N[ae]))return!0;return!1}function Ze(N,K){for(var U=-1,ae=N==null?0:N.length,we=Array(ae);++U<ae;)we[U]=K(N[U],U,N);return we}function rn(N,K){for(var U=-1,ae=K.length,we=N.length;++U<ae;)N[we+U]=K[U];return N}function Su(N,K,U,ae){var we=-1,Pe=N==null?0:N.length;for(ae&&Pe&&(U=N[++we]);++we<Pe;)U=K(U,N[we],we,N);return U}function rb(N,K,U,ae){var we=N==null?0:N.length;for(ae&&we&&(U=N[--we]);we--;)U=K(U,N[we],we,N);return U}function Eu(N,K){for(var U=-1,ae=N==null?0:N.length;++U<ae;)if(K(N[U],U,N))return!0;return!1}var nb=_u("length");function ib(N){return N.split("")}function ob(N){return N.match(pw)||[]}function wd(N,K,U){var ae;return U(N,function(we,Pe,ut){if(K(we,Pe,ut))return ae=Pe,!1}),ae}function ns(N,K,U,ae){for(var we=N.length,Pe=U+(ae?1:-1);ae?Pe--:++Pe<we;)if(K(N[Pe],Pe,N))return Pe;return-1}function ti(N,K,U){return K===K?vb(N,K,U):ns(N,bd,U)}function sb(N,K,U,ae){for(var we=U-1,Pe=N.length;++we<Pe;)if(ae(N[we],K))return we;return-1}function bd(N){return N!==N}function xd(N,K){var U=N==null?0:N.length;return U?Tu(N,K)/U:Z}function _u(N){return function(K){return K==null?r:K[N]}}function Ou(N){return function(K){return N==null?r:N[K]}}function Sd(N,K,U,ae,we){return we(N,function(Pe,ut,Be){U=ae?(ae=!1,Pe):K(U,Pe,ut,Be)}),U}function ab(N,K){var U=N.length;for(N.sort(K);U--;)N[U]=N[U].value;return N}function Tu(N,K){for(var U,ae=-1,we=N.length;++ae<we;){var Pe=K(N[ae]);Pe!==r&&(U=U===r?Pe:U+Pe)}return U}function Au(N,K){for(var U=-1,ae=Array(N);++U<N;)ae[U]=K(U);return ae}function ub(N,K){return Ze(K,function(U){return[U,N[U]]})}function Ed(N){return N&&N.slice(0,Ad(N)+1).replace(pu,"")}function jt(N){return function(K){return N(K)}}function Ru(N,K){return Ze(K,function(U){return N[U]})}function Ii(N,K){return N.has(K)}function _d(N,K){for(var U=-1,ae=N.length;++U<ae&&ti(K,N[U],0)>-1;);return U}function Od(N,K){for(var U=N.length;U--&&ti(K,N[U],0)>-1;);return U}function lb(N,K){for(var U=N.length,ae=0;U--;)N[U]===K&&++ae;return ae}var cb=Ou(Gw),fb=Ou(Kw);function db(N){return"\\"+Yw[N]}function pb(N,K){return N==null?r:N[K]}function ri(N){return Hw.test(N)}function hb(N){return Uw.test(N)}function gb(N){for(var K,U=[];!(K=N.next()).done;)U.push(K.value);return U}function Pu(N){var K=-1,U=Array(N.size);return N.forEach(function(ae,we){U[++K]=[we,ae]}),U}function Td(N,K){return function(U){return N(K(U))}}function nn(N,K){for(var U=-1,ae=N.length,we=0,Pe=[];++U<ae;){var ut=N[U];(ut===K||ut===h)&&(N[U]=h,Pe[we++]=U)}return Pe}function is(N){var K=-1,U=Array(N.size);return N.forEach(function(ae){U[++K]=ae}),U}function mb(N){var K=-1,U=Array(N.size);return N.forEach(function(ae){U[++K]=[ae,ae]}),U}function vb(N,K,U){for(var ae=U-1,we=N.length;++ae<we;)if(N[ae]===K)return ae;return-1}function yb(N,K,U){for(var ae=U+1;ae--;)if(N[ae]===K)return ae;return ae}function ni(N){return ri(N)?bb(N):nb(N)}function cr(N){return ri(N)?xb(N):ib(N)}function Ad(N){for(var K=N.length;K--&&lw.test(N.charAt(K)););return K}var wb=Ou(Vw);function bb(N){for(var K=yu.lastIndex=0;yu.test(N);)++K;return K}function xb(N){return N.match(yu)||[]}function Sb(N){return N.match(Ww)||[]}var Eb=(function N(K){K=K==null?ht:ii.defaults(ht.Object(),K,ii.pick(ht,qw));var U=K.Array,ae=K.Date,we=K.Error,Pe=K.Function,ut=K.Math,Be=K.Object,Cu=K.RegExp,_b=K.String,Jt=K.TypeError,os=U.prototype,Ob=Pe.prototype,oi=Be.prototype,ss=K["__core-js_shared__"],as=Ob.toString,Fe=oi.hasOwnProperty,Tb=0,Rd=(function(){var n=/[^.]+$/.exec(ss&&ss.keys&&ss.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""})(),us=oi.toString,Ab=as.call(Be),Rb=ht._,Pb=Cu("^"+as.call(Fe).replace(du,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ls=fd?K.Buffer:r,on=K.Symbol,cs=K.Uint8Array,Pd=ls?ls.allocUnsafe:r,fs=Td(Be.getPrototypeOf,Be),Cd=Be.create,kd=oi.propertyIsEnumerable,ds=os.splice,$d=on?on.isConcatSpreadable:r,Li=on?on.iterator:r,Tn=on?on.toStringTag:r,ps=(function(){try{var n=kn(Be,"defineProperty");return n({},"",{}),n}catch{}})(),Cb=K.clearTimeout!==ht.clearTimeout&&K.clearTimeout,kb=ae&&ae.now!==ht.Date.now&&ae.now,$b=K.setTimeout!==ht.setTimeout&&K.setTimeout,hs=ut.ceil,gs=ut.floor,ku=Be.getOwnPropertySymbols,Ib=ls?ls.isBuffer:r,Id=K.isFinite,Lb=os.join,Mb=Td(Be.keys,Be),lt=ut.max,xt=ut.min,Db=ae.now,Fb=K.parseInt,Ld=ut.random,Nb=os.reverse,$u=kn(K,"DataView"),Mi=kn(K,"Map"),Iu=kn(K,"Promise"),si=kn(K,"Set"),Di=kn(K,"WeakMap"),Fi=kn(Be,"create"),ms=Di&&new Di,ai={},jb=$n($u),zb=$n(Mi),Bb=$n(Iu),Wb=$n(si),Hb=$n(Di),vs=on?on.prototype:r,Ni=vs?vs.valueOf:r,Md=vs?vs.toString:r;function T(n){if(et(n)&&!be(n)&&!(n instanceof Ae)){if(n instanceof Qt)return n;if(Fe.call(n,"__wrapped__"))return Dp(n)}return new Qt(n)}var ui=(function(){function n(){}return function(o){if(!Ye(o))return{};if(Cd)return Cd(o);n.prototype=o;var l=new n;return n.prototype=r,l}})();function ys(){}function Qt(n,o){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!o,this.__index__=0,this.__values__=r}T.templateSettings={escape:nw,evaluate:iw,interpolate:Uf,variable:"",imports:{_:T}},T.prototype=ys.prototype,T.prototype.constructor=T,Qt.prototype=ui(ys.prototype),Qt.prototype.constructor=Qt;function Ae(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Q,this.__views__=[]}function Ub(){var n=new Ae(this.__wrapped__);return n.__actions__=kt(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=kt(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=kt(this.__views__),n}function qb(){if(this.__filtered__){var n=new Ae(this);n.__dir__=-1,n.__filtered__=!0}else n=this.clone(),n.__dir__*=-1;return n}function Zb(){var n=this.__wrapped__.value(),o=this.__dir__,l=be(n),w=o<0,_=l?n.length:0,A=ix(0,_,this.__views__),P=A.start,I=A.end,z=I-P,V=w?I:P-1,X=this.__iteratees__,ee=X.length,oe=0,le=xt(z,this.__takeCount__);if(!l||!w&&_==z&&le==z)return op(n,this.__actions__);var he=[];e:for(;z--&&oe<le;){V+=o;for(var Se=-1,ge=n[V];++Se<ee;){var Oe=X[Se],Re=Oe.iteratee,Wt=Oe.type,Rt=Re(ge);if(Wt==C)ge=Rt;else if(!Rt){if(Wt==q)continue e;break e}}he[oe++]=ge}return he}Ae.prototype=ui(ys.prototype),Ae.prototype.constructor=Ae;function An(n){var o=-1,l=n==null?0:n.length;for(this.clear();++o<l;){var w=n[o];this.set(w[0],w[1])}}function Gb(){this.__data__=Fi?Fi(null):{},this.size=0}function Kb(n){var o=this.has(n)&&delete this.__data__[n];return this.size-=o?1:0,o}function Vb(n){var o=this.__data__;if(Fi){var l=o[n];return l===f?r:l}return Fe.call(o,n)?o[n]:r}function Yb(n){var o=this.__data__;return Fi?o[n]!==r:Fe.call(o,n)}function Xb(n,o){var l=this.__data__;return this.size+=this.has(n)?0:1,l[n]=Fi&&o===r?f:o,this}An.prototype.clear=Gb,An.prototype.delete=Kb,An.prototype.get=Vb,An.prototype.has=Yb,An.prototype.set=Xb;function Dr(n){var o=-1,l=n==null?0:n.length;for(this.clear();++o<l;){var w=n[o];this.set(w[0],w[1])}}function Jb(){this.__data__=[],this.size=0}function Qb(n){var o=this.__data__,l=ws(o,n);if(l<0)return!1;var w=o.length-1;return l==w?o.pop():ds.call(o,l,1),--this.size,!0}function e1(n){var o=this.__data__,l=ws(o,n);return l<0?r:o[l][1]}function t1(n){return ws(this.__data__,n)>-1}function r1(n,o){var l=this.__data__,w=ws(l,n);return w<0?(++this.size,l.push([n,o])):l[w][1]=o,this}Dr.prototype.clear=Jb,Dr.prototype.delete=Qb,Dr.prototype.get=e1,Dr.prototype.has=t1,Dr.prototype.set=r1;function Fr(n){var o=-1,l=n==null?0:n.length;for(this.clear();++o<l;){var w=n[o];this.set(w[0],w[1])}}function n1(){this.size=0,this.__data__={hash:new An,map:new(Mi||Dr),string:new An}}function i1(n){var o=ks(this,n).delete(n);return this.size-=o?1:0,o}function o1(n){return ks(this,n).get(n)}function s1(n){return ks(this,n).has(n)}function a1(n,o){var l=ks(this,n),w=l.size;return l.set(n,o),this.size+=l.size==w?0:1,this}Fr.prototype.clear=n1,Fr.prototype.delete=i1,Fr.prototype.get=o1,Fr.prototype.has=s1,Fr.prototype.set=a1;function Rn(n){var o=-1,l=n==null?0:n.length;for(this.__data__=new Fr;++o<l;)this.add(n[o])}function u1(n){return this.__data__.set(n,f),this}function l1(n){return this.__data__.has(n)}Rn.prototype.add=Rn.prototype.push=u1,Rn.prototype.has=l1;function fr(n){var o=this.__data__=new Dr(n);this.size=o.size}function c1(){this.__data__=new Dr,this.size=0}function f1(n){var o=this.__data__,l=o.delete(n);return this.size=o.size,l}function d1(n){return this.__data__.get(n)}function p1(n){return this.__data__.has(n)}function h1(n,o){var l=this.__data__;if(l instanceof Dr){var w=l.__data__;if(!Mi||w.length<s-1)return w.push([n,o]),this.size=++l.size,this;l=this.__data__=new Fr(w)}return l.set(n,o),this.size=l.size,this}fr.prototype.clear=c1,fr.prototype.delete=f1,fr.prototype.get=d1,fr.prototype.has=p1,fr.prototype.set=h1;function Dd(n,o){var l=be(n),w=!l&&In(n),_=!l&&!w&&cn(n),A=!l&&!w&&!_&&di(n),P=l||w||_||A,I=P?Au(n.length,_b):[],z=I.length;for(var V in n)(o||Fe.call(n,V))&&!(P&&(V=="length"||_&&(V=="offset"||V=="parent")||A&&(V=="buffer"||V=="byteLength"||V=="byteOffset")||Br(V,z)))&&I.push(V);return I}function Fd(n){var o=n.length;return o?n[Uu(0,o-1)]:r}function g1(n,o){return $s(kt(n),Pn(o,0,n.length))}function m1(n){return $s(kt(n))}function Lu(n,o,l){(l!==r&&!dr(n[o],l)||l===r&&!(o in n))&&Nr(n,o,l)}function ji(n,o,l){var w=n[o];(!(Fe.call(n,o)&&dr(w,l))||l===r&&!(o in n))&&Nr(n,o,l)}function ws(n,o){for(var l=n.length;l--;)if(dr(n[l][0],o))return l;return-1}function v1(n,o,l,w){return sn(n,function(_,A,P){o(w,_,l(_),P)}),w}function Nd(n,o){return n&&xr(o,dt(o),n)}function y1(n,o){return n&&xr(o,It(o),n)}function Nr(n,o,l){o=="__proto__"&&ps?ps(n,o,{configurable:!0,enumerable:!0,value:l,writable:!0}):n[o]=l}function Mu(n,o){for(var l=-1,w=o.length,_=U(w),A=n==null;++l<w;)_[l]=A?r:gl(n,o[l]);return _}function Pn(n,o,l){return n===n&&(l!==r&&(n=n<=l?n:l),o!==r&&(n=n>=o?n:o)),n}function er(n,o,l,w,_,A){var P,I=o&v,z=o&p,V=o&y;if(l&&(P=_?l(n,w,_,A):l(n)),P!==r)return P;if(!Ye(n))return n;var X=be(n);if(X){if(P=sx(n),!I)return kt(n,P)}else{var ee=St(n),oe=ee==ie||ee==wt;if(cn(n))return up(n,I);if(ee==Vt||ee==ce||oe&&!_){if(P=z||oe?{}:Ap(n),!I)return z?V1(n,y1(P,n)):K1(n,Nd(P,n))}else{if(!We[ee])return _?n:{};P=ax(n,ee,I)}}A||(A=new fr);var le=A.get(n);if(le)return le;A.set(n,P),rh(n)?n.forEach(function(ge){P.add(er(ge,o,l,ge,n,A))}):eh(n)&&n.forEach(function(ge,Oe){P.set(Oe,er(ge,o,l,Oe,n,A))});var he=V?z?tl:el:z?It:dt,Se=X?r:he(n);return Xt(Se||n,function(ge,Oe){Se&&(Oe=ge,ge=n[Oe]),ji(P,Oe,er(ge,o,l,Oe,n,A))}),P}function w1(n){var o=dt(n);return function(l){return jd(l,n,o)}}function jd(n,o,l){var w=l.length;if(n==null)return!w;for(n=Be(n);w--;){var _=l[w],A=o[_],P=n[_];if(P===r&&!(_ in n)||!A(P))return!1}return!0}function zd(n,o,l){if(typeof n!="function")throw new Jt(u);return Zi(function(){n.apply(r,l)},o)}function zi(n,o,l,w){var _=-1,A=rs,P=!0,I=n.length,z=[],V=o.length;if(!I)return z;l&&(o=Ze(o,jt(l))),w?(A=xu,P=!1):o.length>=s&&(A=Ii,P=!1,o=new Rn(o));e:for(;++_<I;){var X=n[_],ee=l==null?X:l(X);if(X=w||X!==0?X:0,P&&ee===ee){for(var oe=V;oe--;)if(o[oe]===ee)continue e;z.push(X)}else A(o,ee,w)||z.push(X)}return z}var sn=pp(br),Bd=pp(Fu,!0);function b1(n,o){var l=!0;return sn(n,function(w,_,A){return l=!!o(w,_,A),l}),l}function bs(n,o,l){for(var w=-1,_=n.length;++w<_;){var A=n[w],P=o(A);if(P!=null&&(I===r?P===P&&!Bt(P):l(P,I)))var I=P,z=A}return z}function x1(n,o,l,w){var _=n.length;for(l=xe(l),l<0&&(l=-l>_?0:_+l),w=w===r||w>_?_:xe(w),w<0&&(w+=_),w=l>w?0:ih(w);l<w;)n[l++]=o;return n}function Wd(n,o){var l=[];return sn(n,function(w,_,A){o(w,_,A)&&l.push(w)}),l}function gt(n,o,l,w,_){var A=-1,P=n.length;for(l||(l=lx),_||(_=[]);++A<P;){var I=n[A];o>0&&l(I)?o>1?gt(I,o-1,l,w,_):rn(_,I):w||(_[_.length]=I)}return _}var Du=hp(),Hd=hp(!0);function br(n,o){return n&&Du(n,o,dt)}function Fu(n,o){return n&&Hd(n,o,dt)}function xs(n,o){return tn(o,function(l){return Wr(n[l])})}function Cn(n,o){o=un(o,n);for(var l=0,w=o.length;n!=null&&l<w;)n=n[Sr(o[l++])];return l&&l==w?n:r}function Ud(n,o,l){var w=o(n);return be(n)?w:rn(w,l(n))}function Tt(n){return n==null?n===r?$i:Yo:Tn&&Tn in Be(n)?nx(n):mx(n)}function Nu(n,o){return n>o}function S1(n,o){return n!=null&&Fe.call(n,o)}function E1(n,o){return n!=null&&o in Be(n)}function _1(n,o,l){return n>=xt(o,l)&&n<lt(o,l)}function ju(n,o,l){for(var w=l?xu:rs,_=n[0].length,A=n.length,P=A,I=U(A),z=1/0,V=[];P--;){var X=n[P];P&&o&&(X=Ze(X,jt(o))),z=xt(X.length,z),I[P]=!l&&(o||_>=120&&X.length>=120)?new Rn(P&&X):r}X=n[0];var ee=-1,oe=I[0];e:for(;++ee<_&&V.length<z;){var le=X[ee],he=o?o(le):le;if(le=l||le!==0?le:0,!(oe?Ii(oe,he):w(V,he,l))){for(P=A;--P;){var Se=I[P];if(!(Se?Ii(Se,he):w(n[P],he,l)))continue e}oe&&oe.push(he),V.push(le)}}return V}function O1(n,o,l,w){return br(n,function(_,A,P){o(w,l(_),A,P)}),w}function Bi(n,o,l){o=un(o,n),n=kp(n,o);var w=n==null?n:n[Sr(rr(o))];return w==null?r:Nt(w,n,l)}function qd(n){return et(n)&&Tt(n)==ce}function T1(n){return et(n)&&Tt(n)==en}function A1(n){return et(n)&&Tt(n)==Ee}function Wi(n,o,l,w,_){return n===o?!0:n==null||o==null||!et(n)&&!et(o)?n!==n&&o!==o:R1(n,o,l,w,Wi,_)}function R1(n,o,l,w,_,A){var P=be(n),I=be(o),z=P?fe:St(n),V=I?fe:St(o);z=z==ce?Vt:z,V=V==ce?Vt:V;var X=z==Vt,ee=V==Vt,oe=z==V;if(oe&&cn(n)){if(!cn(o))return!1;P=!0,X=!1}if(oe&&!X)return A||(A=new fr),P||di(n)?_p(n,o,l,w,_,A):tx(n,o,z,l,w,_,A);if(!(l&x)){var le=X&&Fe.call(n,"__wrapped__"),he=ee&&Fe.call(o,"__wrapped__");if(le||he){var Se=le?n.value():n,ge=he?o.value():o;return A||(A=new fr),_(Se,ge,l,w,A)}}return oe?(A||(A=new fr),rx(n,o,l,w,_,A)):!1}function P1(n){return et(n)&&St(n)==ft}function zu(n,o,l,w){var _=l.length,A=_,P=!w;if(n==null)return!A;for(n=Be(n);_--;){var I=l[_];if(P&&I[2]?I[1]!==n[I[0]]:!(I[0]in n))return!1}for(;++_<A;){I=l[_];var z=I[0],V=n[z],X=I[1];if(P&&I[2]){if(V===r&&!(z in n))return!1}else{var ee=new fr;if(w)var oe=w(V,X,z,n,o,ee);if(!(oe===r?Wi(X,V,x|d,w,ee):oe))return!1}}return!0}function Zd(n){if(!Ye(n)||fx(n))return!1;var o=Wr(n)?Pb:ww;return o.test($n(n))}function C1(n){return et(n)&&Tt(n)==Ft}function k1(n){return et(n)&&St(n)==bt}function $1(n){return et(n)&&Ns(n.length)&&!!Ue[Tt(n)]}function Gd(n){return typeof n=="function"?n:n==null?Lt:typeof n=="object"?be(n)?Yd(n[0],n[1]):Vd(n):gh(n)}function Bu(n){if(!qi(n))return Mb(n);var o=[];for(var l in Be(n))Fe.call(n,l)&&l!="constructor"&&o.push(l);return o}function I1(n){if(!Ye(n))return gx(n);var o=qi(n),l=[];for(var w in n)w=="constructor"&&(o||!Fe.call(n,w))||l.push(w);return l}function Wu(n,o){return n<o}function Kd(n,o){var l=-1,w=$t(n)?U(n.length):[];return sn(n,function(_,A,P){w[++l]=o(_,A,P)}),w}function Vd(n){var o=nl(n);return o.length==1&&o[0][2]?Pp(o[0][0],o[0][1]):function(l){return l===n||zu(l,n,o)}}function Yd(n,o){return ol(n)&&Rp(o)?Pp(Sr(n),o):function(l){var w=gl(l,n);return w===r&&w===o?ml(l,n):Wi(o,w,x|d)}}function Ss(n,o,l,w,_){n!==o&&Du(o,function(A,P){if(_||(_=new fr),Ye(A))L1(n,o,P,l,Ss,w,_);else{var I=w?w(al(n,P),A,P+"",n,o,_):r;I===r&&(I=A),Lu(n,P,I)}},It)}function L1(n,o,l,w,_,A,P){var I=al(n,l),z=al(o,l),V=P.get(z);if(V){Lu(n,l,V);return}var X=A?A(I,z,l+"",n,o,P):r,ee=X===r;if(ee){var oe=be(z),le=!oe&&cn(z),he=!oe&&!le&&di(z);X=z,oe||le||he?be(I)?X=I:rt(I)?X=kt(I):le?(ee=!1,X=up(z,!0)):he?(ee=!1,X=lp(z,!0)):X=[]:Gi(z)||In(z)?(X=I,In(I)?X=oh(I):(!Ye(I)||Wr(I))&&(X=Ap(z))):ee=!1}ee&&(P.set(z,X),_(X,z,w,A,P),P.delete(z)),Lu(n,l,X)}function Xd(n,o){var l=n.length;if(l)return o+=o<0?l:0,Br(o,l)?n[o]:r}function Jd(n,o,l){o.length?o=Ze(o,function(A){return be(A)?function(P){return Cn(P,A.length===1?A[0]:A)}:A}):o=[Lt];var w=-1;o=Ze(o,jt(pe()));var _=Kd(n,function(A,P,I){var z=Ze(o,function(V){return V(A)});return{criteria:z,index:++w,value:A}});return ab(_,function(A,P){return G1(A,P,l)})}function M1(n,o){return Qd(n,o,function(l,w){return ml(n,w)})}function Qd(n,o,l){for(var w=-1,_=o.length,A={};++w<_;){var P=o[w],I=Cn(n,P);l(I,P)&&Hi(A,un(P,n),I)}return A}function D1(n){return function(o){return Cn(o,n)}}function Hu(n,o,l,w){var _=w?sb:ti,A=-1,P=o.length,I=n;for(n===o&&(o=kt(o)),l&&(I=Ze(n,jt(l)));++A<P;)for(var z=0,V=o[A],X=l?l(V):V;(z=_(I,X,z,w))>-1;)I!==n&&ds.call(I,z,1),ds.call(n,z,1);return n}function ep(n,o){for(var l=n?o.length:0,w=l-1;l--;){var _=o[l];if(l==w||_!==A){var A=_;Br(_)?ds.call(n,_,1):Gu(n,_)}}return n}function Uu(n,o){return n+gs(Ld()*(o-n+1))}function F1(n,o,l,w){for(var _=-1,A=lt(hs((o-n)/(l||1)),0),P=U(A);A--;)P[w?A:++_]=n,n+=l;return P}function qu(n,o){var l="";if(!n||o<1||o>te)return l;do o%2&&(l+=n),o=gs(o/2),o&&(n+=n);while(o);return l}function _e(n,o){return ul(Cp(n,o,Lt),n+"")}function N1(n){return Fd(pi(n))}function j1(n,o){var l=pi(n);return $s(l,Pn(o,0,l.length))}function Hi(n,o,l,w){if(!Ye(n))return n;o=un(o,n);for(var _=-1,A=o.length,P=A-1,I=n;I!=null&&++_<A;){var z=Sr(o[_]),V=l;if(z==="__proto__"||z==="constructor"||z==="prototype")return n;if(_!=P){var X=I[z];V=w?w(X,z,I):r,V===r&&(V=Ye(X)?X:Br(o[_+1])?[]:{})}ji(I,z,V),I=I[z]}return n}var tp=ms?function(n,o){return ms.set(n,o),n}:Lt,z1=ps?function(n,o){return ps(n,"toString",{configurable:!0,enumerable:!1,value:yl(o),writable:!0})}:Lt;function B1(n){return $s(pi(n))}function tr(n,o,l){var w=-1,_=n.length;o<0&&(o=-o>_?0:_+o),l=l>_?_:l,l<0&&(l+=_),_=o>l?0:l-o>>>0,o>>>=0;for(var A=U(_);++w<_;)A[w]=n[w+o];return A}function W1(n,o){var l;return sn(n,function(w,_,A){return l=o(w,_,A),!l}),!!l}function Es(n,o,l){var w=0,_=n==null?w:n.length;if(typeof o=="number"&&o===o&&_<=ue){for(;w<_;){var A=w+_>>>1,P=n[A];P!==null&&!Bt(P)&&(l?P<=o:P<o)?w=A+1:_=A}return _}return Zu(n,o,Lt,l)}function Zu(n,o,l,w){var _=0,A=n==null?0:n.length;if(A===0)return 0;o=l(o);for(var P=o!==o,I=o===null,z=Bt(o),V=o===r;_<A;){var X=gs((_+A)/2),ee=l(n[X]),oe=ee!==r,le=ee===null,he=ee===ee,Se=Bt(ee);if(P)var ge=w||he;else V?ge=he&&(w||oe):I?ge=he&&oe&&(w||!le):z?ge=he&&oe&&!le&&(w||!Se):le||Se?ge=!1:ge=w?ee<=o:ee<o;ge?_=X+1:A=X}return xt(A,se)}function rp(n,o){for(var l=-1,w=n.length,_=0,A=[];++l<w;){var P=n[l],I=o?o(P):P;if(!l||!dr(I,z)){var z=I;A[_++]=P===0?0:P}}return A}function np(n){return typeof n=="number"?n:Bt(n)?Z:+n}function zt(n){if(typeof n=="string")return n;if(be(n))return Ze(n,zt)+"";if(Bt(n))return Md?Md.call(n):"";var o=n+"";return o=="0"&&1/n==-Y?"-0":o}function an(n,o,l){var w=-1,_=rs,A=n.length,P=!0,I=[],z=I;if(l)P=!1,_=xu;else if(A>=s){var V=o?null:Q1(n);if(V)return is(V);P=!1,_=Ii,z=new Rn}else z=o?[]:I;e:for(;++w<A;){var X=n[w],ee=o?o(X):X;if(X=l||X!==0?X:0,P&&ee===ee){for(var oe=z.length;oe--;)if(z[oe]===ee)continue e;o&&z.push(ee),I.push(X)}else _(z,ee,l)||(z!==I&&z.push(ee),I.push(X))}return I}function Gu(n,o){return o=un(o,n),n=kp(n,o),n==null||delete n[Sr(rr(o))]}function ip(n,o,l,w){return Hi(n,o,l(Cn(n,o)),w)}function _s(n,o,l,w){for(var _=n.length,A=w?_:-1;(w?A--:++A<_)&&o(n[A],A,n););return l?tr(n,w?0:A,w?A+1:_):tr(n,w?A+1:0,w?_:A)}function op(n,o){var l=n;return l instanceof Ae&&(l=l.value()),Su(o,function(w,_){return _.func.apply(_.thisArg,rn([w],_.args))},l)}function Ku(n,o,l){var w=n.length;if(w<2)return w?an(n[0]):[];for(var _=-1,A=U(w);++_<w;)for(var P=n[_],I=-1;++I<w;)I!=_&&(A[_]=zi(A[_]||P,n[I],o,l));return an(gt(A,1),o,l)}function sp(n,o,l){for(var w=-1,_=n.length,A=o.length,P={};++w<_;){var I=w<A?o[w]:r;l(P,n[w],I)}return P}function Vu(n){return rt(n)?n:[]}function Yu(n){return typeof n=="function"?n:Lt}function un(n,o){return be(n)?n:ol(n,o)?[n]:Mp(ke(n))}var H1=_e;function ln(n,o,l){var w=n.length;return l=l===r?w:l,!o&&l>=w?n:tr(n,o,l)}var ap=Cb||function(n){return ht.clearTimeout(n)};function up(n,o){if(o)return n.slice();var l=n.length,w=Pd?Pd(l):new n.constructor(l);return n.copy(w),w}function Xu(n){var o=new n.constructor(n.byteLength);return new cs(o).set(new cs(n)),o}function U1(n,o){var l=o?Xu(n.buffer):n.buffer;return new n.constructor(l,n.byteOffset,n.byteLength)}function q1(n){var o=new n.constructor(n.source,qf.exec(n));return o.lastIndex=n.lastIndex,o}function Z1(n){return Ni?Be(Ni.call(n)):{}}function lp(n,o){var l=o?Xu(n.buffer):n.buffer;return new n.constructor(l,n.byteOffset,n.length)}function cp(n,o){if(n!==o){var l=n!==r,w=n===null,_=n===n,A=Bt(n),P=o!==r,I=o===null,z=o===o,V=Bt(o);if(!I&&!V&&!A&&n>o||A&&P&&z&&!I&&!V||w&&P&&z||!l&&z||!_)return 1;if(!w&&!A&&!V&&n<o||V&&l&&_&&!w&&!A||I&&l&&_||!P&&_||!z)return-1}return 0}function G1(n,o,l){for(var w=-1,_=n.criteria,A=o.criteria,P=_.length,I=l.length;++w<P;){var z=cp(_[w],A[w]);if(z){if(w>=I)return z;var V=l[w];return z*(V=="desc"?-1:1)}}return n.index-o.index}function fp(n,o,l,w){for(var _=-1,A=n.length,P=l.length,I=-1,z=o.length,V=lt(A-P,0),X=U(z+V),ee=!w;++I<z;)X[I]=o[I];for(;++_<P;)(ee||_<A)&&(X[l[_]]=n[_]);for(;V--;)X[I++]=n[_++];return X}function dp(n,o,l,w){for(var _=-1,A=n.length,P=-1,I=l.length,z=-1,V=o.length,X=lt(A-I,0),ee=U(X+V),oe=!w;++_<X;)ee[_]=n[_];for(var le=_;++z<V;)ee[le+z]=o[z];for(;++P<I;)(oe||_<A)&&(ee[le+l[P]]=n[_++]);return ee}function kt(n,o){var l=-1,w=n.length;for(o||(o=U(w));++l<w;)o[l]=n[l];return o}function xr(n,o,l,w){var _=!l;l||(l={});for(var A=-1,P=o.length;++A<P;){var I=o[A],z=w?w(l[I],n[I],I,l,n):r;z===r&&(z=n[I]),_?Nr(l,I,z):ji(l,I,z)}return l}function K1(n,o){return xr(n,il(n),o)}function V1(n,o){return xr(n,Op(n),o)}function Os(n,o){return function(l,w){var _=be(l)?eb:v1,A=o?o():{};return _(l,n,pe(w,2),A)}}function li(n){return _e(function(o,l){var w=-1,_=l.length,A=_>1?l[_-1]:r,P=_>2?l[2]:r;for(A=n.length>3&&typeof A=="function"?(_--,A):r,P&&At(l[0],l[1],P)&&(A=_<3?r:A,_=1),o=Be(o);++w<_;){var I=l[w];I&&n(o,I,w,A)}return o})}function pp(n,o){return function(l,w){if(l==null)return l;if(!$t(l))return n(l,w);for(var _=l.length,A=o?_:-1,P=Be(l);(o?A--:++A<_)&&w(P[A],A,P)!==!1;);return l}}function hp(n){return function(o,l,w){for(var _=-1,A=Be(o),P=w(o),I=P.length;I--;){var z=P[n?I:++_];if(l(A[z],z,A)===!1)break}return o}}function Y1(n,o,l){var w=o&b,_=Ui(n);function A(){var P=this&&this!==ht&&this instanceof A?_:n;return P.apply(w?l:this,arguments)}return A}function gp(n){return function(o){o=ke(o);var l=ri(o)?cr(o):r,w=l?l[0]:o.charAt(0),_=l?ln(l,1).join(""):o.slice(1);return w[n]()+_}}function ci(n){return function(o){return Su(ph(dh(o).replace(zw,"")),n,"")}}function Ui(n){return function(){var o=arguments;switch(o.length){case 0:return new n;case 1:return new n(o[0]);case 2:return new n(o[0],o[1]);case 3:return new n(o[0],o[1],o[2]);case 4:return new n(o[0],o[1],o[2],o[3]);case 5:return new n(o[0],o[1],o[2],o[3],o[4]);case 6:return new n(o[0],o[1],o[2],o[3],o[4],o[5]);case 7:return new n(o[0],o[1],o[2],o[3],o[4],o[5],o[6])}var l=ui(n.prototype),w=n.apply(l,o);return Ye(w)?w:l}}function X1(n,o,l){var w=Ui(n);function _(){for(var A=arguments.length,P=U(A),I=A,z=fi(_);I--;)P[I]=arguments[I];var V=A<3&&P[0]!==z&&P[A-1]!==z?[]:nn(P,z);if(A-=V.length,A<l)return bp(n,o,Ts,_.placeholder,r,P,V,r,r,l-A);var X=this&&this!==ht&&this instanceof _?w:n;return Nt(X,this,P)}return _}function mp(n){return function(o,l,w){var _=Be(o);if(!$t(o)){var A=pe(l,3);o=dt(o),l=function(I){return A(_[I],I,_)}}var P=n(o,l,w);return P>-1?_[A?o[P]:P]:r}}function vp(n){return zr(function(o){var l=o.length,w=l,_=Qt.prototype.thru;for(n&&o.reverse();w--;){var A=o[w];if(typeof A!="function")throw new Jt(u);if(_&&!P&&Cs(A)=="wrapper")var P=new Qt([],!0)}for(w=P?w:l;++w<l;){A=o[w];var I=Cs(A),z=I=="wrapper"?rl(A):r;z&&sl(z[0])&&z[1]==(W|E|O|M)&&!z[4].length&&z[9]==1?P=P[Cs(z[0])].apply(P,z[3]):P=A.length==1&&sl(A)?P[I]():P.thru(A)}return function(){var V=arguments,X=V[0];if(P&&V.length==1&&be(X))return P.plant(X).value();for(var ee=0,oe=l?o[ee].apply(this,V):X;++ee<l;)oe=o[ee].call(this,oe);return oe}})}function Ts(n,o,l,w,_,A,P,I,z,V){var X=o&W,ee=o&b,oe=o&m,le=o&(E|R),he=o&F,Se=oe?r:Ui(n);function ge(){for(var Oe=arguments.length,Re=U(Oe),Wt=Oe;Wt--;)Re[Wt]=arguments[Wt];if(le)var Rt=fi(ge),Ht=lb(Re,Rt);if(w&&(Re=fp(Re,w,_,le)),A&&(Re=dp(Re,A,P,le)),Oe-=Ht,le&&Oe<V){var nt=nn(Re,Rt);return bp(n,o,Ts,ge.placeholder,l,Re,nt,I,z,V-Oe)}var pr=ee?l:this,Ur=oe?pr[n]:n;return Oe=Re.length,I?Re=vx(Re,I):he&&Oe>1&&Re.reverse(),X&&z<Oe&&(Re.length=z),this&&this!==ht&&this instanceof ge&&(Ur=Se||Ui(Ur)),Ur.apply(pr,Re)}return ge}function yp(n,o){return function(l,w){return O1(l,n,o(w),{})}}function As(n,o){return function(l,w){var _;if(l===r&&w===r)return o;if(l!==r&&(_=l),w!==r){if(_===r)return w;typeof l=="string"||typeof w=="string"?(l=zt(l),w=zt(w)):(l=np(l),w=np(w)),_=n(l,w)}return _}}function Ju(n){return zr(function(o){return o=Ze(o,jt(pe())),_e(function(l){var w=this;return n(o,function(_){return Nt(_,w,l)})})})}function Rs(n,o){o=o===r?" ":zt(o);var l=o.length;if(l<2)return l?qu(o,n):o;var w=qu(o,hs(n/ni(o)));return ri(o)?ln(cr(w),0,n).join(""):w.slice(0,n)}function J1(n,o,l,w){var _=o&b,A=Ui(n);function P(){for(var I=-1,z=arguments.length,V=-1,X=w.length,ee=U(X+z),oe=this&&this!==ht&&this instanceof P?A:n;++V<X;)ee[V]=w[V];for(;z--;)ee[V++]=arguments[++I];return Nt(oe,_?l:this,ee)}return P}function wp(n){return function(o,l,w){return w&&typeof w!="number"&&At(o,l,w)&&(l=w=r),o=Hr(o),l===r?(l=o,o=0):l=Hr(l),w=w===r?o<l?1:-1:Hr(w),F1(o,l,w,n)}}function Ps(n){return function(o,l){return typeof o=="string"&&typeof l=="string"||(o=nr(o),l=nr(l)),n(o,l)}}function bp(n,o,l,w,_,A,P,I,z,V){var X=o&E,ee=X?P:r,oe=X?r:P,le=X?A:r,he=X?r:A;o|=X?O:k,o&=~(X?k:O),o&S||(o&=-4);var Se=[n,o,_,le,ee,he,oe,I,z,V],ge=l.apply(r,Se);return sl(n)&&$p(ge,Se),ge.placeholder=w,Ip(ge,n,o)}function Qu(n){var o=ut[n];return function(l,w){if(l=nr(l),w=w==null?0:xt(xe(w),292),w&&Id(l)){var _=(ke(l)+"e").split("e"),A=o(_[0]+"e"+(+_[1]+w));return _=(ke(A)+"e").split("e"),+(_[0]+"e"+(+_[1]-w))}return o(l)}}var Q1=si&&1/is(new si([,-0]))[1]==Y?function(n){return new si(n)}:xl;function xp(n){return function(o){var l=St(o);return l==ft?Pu(o):l==bt?mb(o):ub(o,n(o))}}function jr(n,o,l,w,_,A,P,I){var z=o&m;if(!z&&typeof n!="function")throw new Jt(u);var V=w?w.length:0;if(V||(o&=-97,w=_=r),P=P===r?P:lt(xe(P),0),I=I===r?I:xe(I),V-=_?_.length:0,o&k){var X=w,ee=_;w=_=r}var oe=z?r:rl(n),le=[n,o,l,w,_,X,ee,A,P,I];if(oe&&hx(le,oe),n=le[0],o=le[1],l=le[2],w=le[3],_=le[4],I=le[9]=le[9]===r?z?0:n.length:lt(le[9]-V,0),!I&&o&(E|R)&&(o&=-25),!o||o==b)var he=Y1(n,o,l);else o==E||o==R?he=X1(n,o,I):(o==O||o==(b|O))&&!_.length?he=J1(n,o,l,w):he=Ts.apply(r,le);var Se=oe?tp:$p;return Ip(Se(he,le),n,o)}function Sp(n,o,l,w){return n===r||dr(n,oi[l])&&!Fe.call(w,l)?o:n}function Ep(n,o,l,w,_,A){return Ye(n)&&Ye(o)&&(A.set(o,n),Ss(n,o,r,Ep,A),A.delete(o)),n}function ex(n){return Gi(n)?r:n}function _p(n,o,l,w,_,A){var P=l&x,I=n.length,z=o.length;if(I!=z&&!(P&&z>I))return!1;var V=A.get(n),X=A.get(o);if(V&&X)return V==o&&X==n;var ee=-1,oe=!0,le=l&d?new Rn:r;for(A.set(n,o),A.set(o,n);++ee<I;){var he=n[ee],Se=o[ee];if(w)var ge=P?w(Se,he,ee,o,n,A):w(he,Se,ee,n,o,A);if(ge!==r){if(ge)continue;oe=!1;break}if(le){if(!Eu(o,function(Oe,Re){if(!Ii(le,Re)&&(he===Oe||_(he,Oe,l,w,A)))return le.push(Re)})){oe=!1;break}}else if(!(he===Se||_(he,Se,l,w,A))){oe=!1;break}}return A.delete(n),A.delete(o),oe}function tx(n,o,l,w,_,A,P){switch(l){case Mr:if(n.byteLength!=o.byteLength||n.byteOffset!=o.byteOffset)return!1;n=n.buffer,o=o.buffer;case en:return!(n.byteLength!=o.byteLength||!A(new cs(n),new cs(o)));case me:case Ee:case wr:return dr(+n,+o);case Ve:return n.name==o.name&&n.message==o.message;case Ft:case Jr:return n==o+"";case ft:var I=Pu;case bt:var z=w&x;if(I||(I=is),n.size!=o.size&&!z)return!1;var V=P.get(n);if(V)return V==o;w|=d,P.set(n,o);var X=_p(I(n),I(o),w,_,A,P);return P.delete(n),X;case _n:if(Ni)return Ni.call(n)==Ni.call(o)}return!1}function rx(n,o,l,w,_,A){var P=l&x,I=el(n),z=I.length,V=el(o),X=V.length;if(z!=X&&!P)return!1;for(var ee=z;ee--;){var oe=I[ee];if(!(P?oe in o:Fe.call(o,oe)))return!1}var le=A.get(n),he=A.get(o);if(le&&he)return le==o&&he==n;var Se=!0;A.set(n,o),A.set(o,n);for(var ge=P;++ee<z;){oe=I[ee];var Oe=n[oe],Re=o[oe];if(w)var Wt=P?w(Re,Oe,oe,o,n,A):w(Oe,Re,oe,n,o,A);if(!(Wt===r?Oe===Re||_(Oe,Re,l,w,A):Wt)){Se=!1;break}ge||(ge=oe=="constructor")}if(Se&&!ge){var Rt=n.constructor,Ht=o.constructor;Rt!=Ht&&"constructor"in n&&"constructor"in o&&!(typeof Rt=="function"&&Rt instanceof Rt&&typeof Ht=="function"&&Ht instanceof Ht)&&(Se=!1)}return A.delete(n),A.delete(o),Se}function zr(n){return ul(Cp(n,r,jp),n+"")}function el(n){return Ud(n,dt,il)}function tl(n){return Ud(n,It,Op)}var rl=ms?function(n){return ms.get(n)}:xl;function Cs(n){for(var o=n.name+"",l=ai[o],w=Fe.call(ai,o)?l.length:0;w--;){var _=l[w],A=_.func;if(A==null||A==n)return _.name}return o}function fi(n){var o=Fe.call(T,"placeholder")?T:n;return o.placeholder}function pe(){var n=T.iteratee||wl;return n=n===wl?Gd:n,arguments.length?n(arguments[0],arguments[1]):n}function ks(n,o){var l=n.__data__;return cx(o)?l[typeof o=="string"?"string":"hash"]:l.map}function nl(n){for(var o=dt(n),l=o.length;l--;){var w=o[l],_=n[w];o[l]=[w,_,Rp(_)]}return o}function kn(n,o){var l=pb(n,o);return Zd(l)?l:r}function nx(n){var o=Fe.call(n,Tn),l=n[Tn];try{n[Tn]=r;var w=!0}catch{}var _=us.call(n);return w&&(o?n[Tn]=l:delete n[Tn]),_}var il=ku?function(n){return n==null?[]:(n=Be(n),tn(ku(n),function(o){return kd.call(n,o)}))}:Sl,Op=ku?function(n){for(var o=[];n;)rn(o,il(n)),n=fs(n);return o}:Sl,St=Tt;($u&&St(new $u(new ArrayBuffer(1)))!=Mr||Mi&&St(new Mi)!=ft||Iu&&St(Iu.resolve())!=Xo||si&&St(new si)!=bt||Di&&St(new Di)!=Qr)&&(St=function(n){var o=Tt(n),l=o==Vt?n.constructor:r,w=l?$n(l):"";if(w)switch(w){case jb:return Mr;case zb:return ft;case Bb:return Xo;case Wb:return bt;case Hb:return Qr}return o});function ix(n,o,l){for(var w=-1,_=l.length;++w<_;){var A=l[w],P=A.size;switch(A.type){case"drop":n+=P;break;case"dropRight":o-=P;break;case"take":o=xt(o,n+P);break;case"takeRight":n=lt(n,o-P);break}}return{start:n,end:o}}function ox(n){var o=n.match(fw);return o?o[1].split(dw):[]}function Tp(n,o,l){o=un(o,n);for(var w=-1,_=o.length,A=!1;++w<_;){var P=Sr(o[w]);if(!(A=n!=null&&l(n,P)))break;n=n[P]}return A||++w!=_?A:(_=n==null?0:n.length,!!_&&Ns(_)&&Br(P,_)&&(be(n)||In(n)))}function sx(n){var o=n.length,l=new n.constructor(o);return o&&typeof n[0]=="string"&&Fe.call(n,"index")&&(l.index=n.index,l.input=n.input),l}function Ap(n){return typeof n.constructor=="function"&&!qi(n)?ui(fs(n)):{}}function ax(n,o,l){var w=n.constructor;switch(o){case en:return Xu(n);case me:case Ee:return new w(+n);case Mr:return U1(n,l);case nu:case iu:case ou:case su:case au:case uu:case lu:case cu:case fu:return lp(n,l);case ft:return new w;case wr:case Jr:return new w(n);case Ft:return q1(n);case bt:return new w;case _n:return Z1(n)}}function ux(n,o){var l=o.length;if(!l)return n;var w=l-1;return o[w]=(l>1?"& ":"")+o[w],o=o.join(l>2?", ":" "),n.replace(cw,`{
183
183
  /* [wrapped with `+o+`] */
184
- `)}function q1(n){return we(n)||Pn(n)||!!(xd&&n&&n[xd])}function Nr(n,o){var u=typeof n;return o=o??te,!!o&&(u=="number"||u!="symbol"&&nb.test(n))&&n>-1&&n%1==0&&n<o}function Ot(n,o,u){if(!Ge(u))return!1;var y=typeof o;return(y=="number"?Ct(u)&&Nr(o,u.length):y=="string"&&o in u)?lr(u[o],n):!1}function Xu(n,o){if(we(n))return!1;var u=typeof n;return u=="number"||u=="symbol"||u=="boolean"||n==null||jt(n)?!0:B0.test(n)||!W0.test(n)||o!=null&&n in Ne(o)}function Z1(n){var o=typeof n;return o=="string"||o=="number"||o=="symbol"||o=="boolean"?n!=="__proto__":n===null}function Yu(n){var o=Os(n),u=A[o];if(typeof u!="function"||!(o in Te.prototype))return!1;if(n===u)return!0;var y=Gu(u);return!!y&&n===y[0]}function G1(n){return!!md&&md in n}var K1=ts?jr:hl;function ji(n){var o=n&&n.constructor,u=typeof o=="function"&&o.prototype||ei;return n===u}function mp(n){return n===n&&!Ge(n)}function yp(n,o){return function(u){return u==null?!1:u[n]===o&&(o!==r||n in Ne(u))}}function V1(n){var o=ks(n,function(y){return u.size===m&&u.clear(),y}),u=o.cache;return o}function X1(n,o){var u=n[1],y=o[1],_=u|y,T=_<(w|h|B),P=y==B&&u==E||y==B&&u==M&&n[7].length<=o[8]||y==(B|M)&&o[7].length<=o[8]&&u==E;if(!(T||P))return n;y&w&&(n[2]=o[2],_|=u&w?0:S);var I=o[3];if(I){var z=n[3];n[3]=z?ep(z,I,o[4]):I,n[4]=z?Qr(n[3],v):o[4]}return I=o[5],I&&(z=n[5],n[5]=z?tp(z,I,o[6]):I,n[6]=z?Qr(n[5],v):o[6]),I=o[7],I&&(n[7]=I),y&B&&(n[8]=n[8]==null?o[8]:bt(n[8],o[8])),n[9]==null&&(n[9]=o[9]),n[0]=o[0],n[1]=_,n}function Y1(n){var o=[];if(n!=null)for(var u in Ne(n))o.push(u);return o}function J1(n){return ns.call(n)}function bp(n,o,u){return o=st(o===r?n.length-1:o,0),function(){for(var y=arguments,_=-1,T=st(y.length-o,0),P=H(T);++_<T;)P[_]=y[o+_];_=-1;for(var I=H(o+1);++_<o;)I[_]=y[_];return I[o]=u(P),Ft(n,this,I)}}function wp(n,o){return o.length<2?n:An(n,Qt(o,0,-1))}function Q1(n,o){for(var u=n.length,y=bt(o.length,u),_=Pt(n);y--;){var T=o[y];n[y]=Nr(T,u)?_[T]:r}return n}function Ju(n,o){if(!(o==="constructor"&&typeof n[o]=="function")&&o!="__proto__")return n[o]}var xp=Ep(Hd),zi=hw||function(n,o){return dt.setTimeout(n,o)},Qu=Ep(S1);function Sp(n,o,u){var y=o+"";return Qu(n,H1(y,ex(W1(y),u)))}function Ep(n){var o=0,u=0;return function(){var y=yw(),_=U-(y-u);if(u=y,_>0){if(++o>=L)return arguments[0]}else o=0;return n.apply(r,arguments)}}function Ts(n,o){var u=-1,y=n.length,_=y-1;for(o=o===r?y:o;++u<o;){var T=Mu(u,_),P=n[T];n[T]=n[u],n[u]=P}return n.length=o,n}var _p=V1(function(n){var o=[];return n.charCodeAt(0)===46&&o.push(""),n.replace(U0,function(u,y,_,T){o.push(_?T.replace(Y0,"$1"):y||u)}),o});function br(n){if(typeof n=="string"||jt(n))return n;var o=n+"";return o=="0"&&1/n==-X?"-0":o}function Rn(n){if(n!=null){try{return rs.call(n)}catch{}try{return n+""}catch{}}return""}function ex(n,o){return Vt(ne,function(u){var y="_."+u[0];o&u[1]&&!Yo(n,y)&&n.push(y)}),n.sort()}function Op(n){if(n instanceof Te)return n.clone();var o=new Yt(n.__wrapped__,n.__chain__);return o.__actions__=Pt(n.__actions__),o.__index__=n.__index__,o.__values__=n.__values__,o}function tx(n,o,u){(u?Ot(n,o,u):o===r)?o=1:o=st(xe(o),0);var y=n==null?0:n.length;if(!y||o<1)return[];for(var _=0,T=0,P=H(ls(y/o));_<y;)P[T++]=Qt(n,_,_+=o);return P}function rx(n){for(var o=-1,u=n==null?0:n.length,y=0,_=[];++o<u;){var T=n[o];T&&(_[y++]=T)}return _}function nx(){var n=arguments.length;if(!n)return[];for(var o=H(n-1),u=arguments[0],y=n;y--;)o[y-1]=arguments[y];return Jr(we(u)?Pt(u):[u],pt(o,1))}var ix=_e(function(n,o){return Je(n)?Li(n,pt(o,1,Je,!0)):[]}),ox=_e(function(n,o){var u=er(o);return Je(u)&&(u=r),Je(n)?Li(n,pt(o,1,Je,!0),pe(u,2)):[]}),sx=_e(function(n,o){var u=er(o);return Je(u)&&(u=r),Je(n)?Li(n,pt(o,1,Je,!0),r,u):[]});function ax(n,o,u){var y=n==null?0:n.length;return y?(o=u||o===r?1:xe(o),Qt(n,o<0?0:o,y)):[]}function ux(n,o,u){var y=n==null?0:n.length;return y?(o=u||o===r?1:xe(o),o=y-o,Qt(n,0,o<0?0:o)):[]}function lx(n,o){return n&&n.length?bs(n,pe(o,3),!0,!0):[]}function cx(n,o){return n&&n.length?bs(n,pe(o,3),!0):[]}function fx(n,o,u,y){var _=n==null?0:n.length;return _?(u&&typeof u!="number"&&Ot(n,o,u)&&(u=0,y=_),n1(n,o,u,y)):[]}function Ap(n,o,u){var y=n==null?0:n.length;if(!y)return-1;var _=u==null?0:xe(u);return _<0&&(_=st(y+_,0)),Jo(n,pe(o,3),_)}function Tp(n,o,u){var y=n==null?0:n.length;if(!y)return-1;var _=y-1;return u!==r&&(_=xe(u),_=u<0?st(y+_,0):bt(_,y-1)),Jo(n,pe(o,3),_,!0)}function Rp(n){var o=n==null?0:n.length;return o?pt(n,1):[]}function dx(n){var o=n==null?0:n.length;return o?pt(n,X):[]}function px(n,o){var u=n==null?0:n.length;return u?(o=o===r?1:xe(o),pt(n,o)):[]}function hx(n){for(var o=-1,u=n==null?0:n.length,y={};++o<u;){var _=n[o];y[_[0]]=_[1]}return y}function Pp(n){return n&&n.length?n[0]:r}function gx(n,o,u){var y=n==null?0:n.length;if(!y)return-1;var _=u==null?0:xe(u);return _<0&&(_=st(y+_,0)),Xn(n,o,_)}function vx(n){var o=n==null?0:n.length;return o?Qt(n,0,-1):[]}var mx=_e(function(n){var o=Ue(n,zu);return o.length&&o[0]===n[0]?Cu(o):[]}),yx=_e(function(n){var o=er(n),u=Ue(n,zu);return o===er(u)?o=r:u.pop(),u.length&&u[0]===n[0]?Cu(u,pe(o,2)):[]}),bx=_e(function(n){var o=er(n),u=Ue(n,zu);return o=typeof o=="function"?o:r,o&&u.pop(),u.length&&u[0]===n[0]?Cu(u,r,o):[]});function wx(n,o){return n==null?"":vw.call(n,o)}function er(n){var o=n==null?0:n.length;return o?n[o-1]:r}function xx(n,o,u){var y=n==null?0:n.length;if(!y)return-1;var _=y;return u!==r&&(_=xe(u),_=_<0?st(y+_,0):bt(_,y-1)),o===o?ew(n,o,_):Jo(n,ld,_,!0)}function Sx(n,o){return n&&n.length?zd(n,xe(o)):r}var Ex=_e(Cp);function Cp(n,o){return n&&n.length&&o&&o.length?Lu(n,o):n}function _x(n,o,u){return n&&n.length&&o&&o.length?Lu(n,o,pe(u,2)):n}function Ox(n,o,u){return n&&n.length&&o&&o.length?Lu(n,o,r,u):n}var Ax=Dr(function(n,o){var u=n==null?0:n.length,y=Au(n,o);return Ud(n,Ue(o,function(_){return Nr(_,u)?+_:_}).sort(Qd)),y});function Tx(n,o){var u=[];if(!(n&&n.length))return u;var y=-1,_=[],T=n.length;for(o=pe(o,3);++y<T;){var P=n[y];o(P,y,n)&&(u.push(P),_.push(y))}return Ud(n,_),u}function el(n){return n==null?n:ww.call(n)}function Rx(n,o,u){var y=n==null?0:n.length;return y?(u&&typeof u!="number"&&Ot(n,o,u)?(o=0,u=y):(o=o==null?0:xe(o),u=u===r?y:xe(u)),Qt(n,o,u)):[]}function Px(n,o){return ys(n,o)}function Cx(n,o,u){return Du(n,o,pe(u,2))}function kx(n,o){var u=n==null?0:n.length;if(u){var y=ys(n,o);if(y<u&&lr(n[y],o))return y}return-1}function $x(n,o){return ys(n,o,!0)}function Ix(n,o,u){return Du(n,o,pe(u,2),!0)}function Lx(n,o){var u=n==null?0:n.length;if(u){var y=ys(n,o,!0)-1;if(lr(n[y],o))return y}return-1}function Mx(n){return n&&n.length?qd(n):[]}function Fx(n,o){return n&&n.length?qd(n,pe(o,2)):[]}function Dx(n){var o=n==null?0:n.length;return o?Qt(n,1,o):[]}function Nx(n,o,u){return n&&n.length?(o=u||o===r?1:xe(o),Qt(n,0,o<0?0:o)):[]}function jx(n,o,u){var y=n==null?0:n.length;return y?(o=u||o===r?1:xe(o),o=y-o,Qt(n,o<0?0:o,y)):[]}function zx(n,o){return n&&n.length?bs(n,pe(o,3),!1,!0):[]}function Wx(n,o){return n&&n.length?bs(n,pe(o,3)):[]}var Bx=_e(function(n){return rn(pt(n,1,Je,!0))}),Ux=_e(function(n){var o=er(n);return Je(o)&&(o=r),rn(pt(n,1,Je,!0),pe(o,2))}),Hx=_e(function(n){var o=er(n);return o=typeof o=="function"?o:r,rn(pt(n,1,Je,!0),r,o)});function qx(n){return n&&n.length?rn(n):[]}function Zx(n,o){return n&&n.length?rn(n,pe(o,2)):[]}function Gx(n,o){return o=typeof o=="function"?o:r,n&&n.length?rn(n,r,o):[]}function tl(n){if(!(n&&n.length))return[];var o=0;return n=Yr(n,function(u){if(Je(u))return o=st(u.length,o),!0}),yu(o,function(u){return Ue(n,gu(u))})}function kp(n,o){if(!(n&&n.length))return[];var u=tl(n);return o==null?u:Ue(u,function(y){return Ft(o,r,y)})}var Kx=_e(function(n,o){return Je(n)?Li(n,o):[]}),Vx=_e(function(n){return ju(Yr(n,Je))}),Xx=_e(function(n){var o=er(n);return Je(o)&&(o=r),ju(Yr(n,Je),pe(o,2))}),Yx=_e(function(n){var o=er(n);return o=typeof o=="function"?o:r,ju(Yr(n,Je),r,o)}),Jx=_e(tl);function Qx(n,o){return Vd(n||[],o||[],Ii)}function eS(n,o){return Vd(n||[],o||[],Di)}var tS=_e(function(n){var o=n.length,u=o>1?n[o-1]:r;return u=typeof u=="function"?(n.pop(),u):r,kp(n,u)});function $p(n){var o=A(n);return o.__chain__=!0,o}function rS(n,o){return o(n),n}function Rs(n,o){return o(n)}var nS=Dr(function(n){var o=n.length,u=o?n[0]:0,y=this.__wrapped__,_=function(T){return Au(T,n)};return o>1||this.__actions__.length||!(y instanceof Te)||!Nr(u)?this.thru(_):(y=y.slice(u,+u+(o?1:0)),y.__actions__.push({func:Rs,args:[_],thisArg:r}),new Yt(y,this.__chain__).thru(function(T){return o&&!T.length&&T.push(r),T}))});function iS(){return $p(this)}function oS(){return new Yt(this.value(),this.__chain__)}function sS(){this.__values__===r&&(this.__values__=Zp(this.value()));var n=this.__index__>=this.__values__.length,o=n?r:this.__values__[this.__index__++];return{done:n,value:o}}function aS(){return this}function uS(n){for(var o,u=this;u instanceof ps;){var y=Op(u);y.__index__=0,y.__values__=r,o?_.__wrapped__=y:o=y;var _=y;u=u.__wrapped__}return _.__wrapped__=n,o}function lS(){var n=this.__wrapped__;if(n instanceof Te){var o=n;return this.__actions__.length&&(o=new Te(this)),o=o.reverse(),o.__actions__.push({func:Rs,args:[el],thisArg:r}),new Yt(o,this.__chain__)}return this.thru(el)}function cS(){return Kd(this.__wrapped__,this.__actions__)}var fS=ws(function(n,o,u){Fe.call(n,u)?++n[u]:Mr(n,u,1)});function dS(n,o,u){var y=we(n)?ad:r1;return u&&Ot(n,o,u)&&(o=r),y(n,pe(o,3))}function pS(n,o){var u=we(n)?Yr:kd;return u(n,pe(o,3))}var hS=op(Ap),gS=op(Tp);function vS(n,o){return pt(Ps(n,o),1)}function mS(n,o){return pt(Ps(n,o),X)}function yS(n,o,u){return u=u===r?1:xe(u),pt(Ps(n,o),u)}function Ip(n,o){var u=we(n)?Vt:tn;return u(n,pe(o,3))}function Lp(n,o){var u=we(n)?Db:Cd;return u(n,pe(o,3))}var bS=ws(function(n,o,u){Fe.call(n,u)?n[u].push(o):Mr(n,u,[o])});function wS(n,o,u,y){n=Ct(n)?n:ui(n),u=u&&!y?xe(u):0;var _=n.length;return u<0&&(u=st(_+u,0)),Ls(n)?u<=_&&n.indexOf(o,u)>-1:!!_&&Xn(n,o,u)>-1}var xS=_e(function(n,o,u){var y=-1,_=typeof o=="function",T=Ct(n)?H(n.length):[];return tn(n,function(P){T[++y]=_?Ft(o,P,u):Mi(P,o,u)}),T}),SS=ws(function(n,o,u){Mr(n,u,o)});function Ps(n,o){var u=we(n)?Ue:Dd;return u(n,pe(o,3))}function ES(n,o,u,y){return n==null?[]:(we(o)||(o=o==null?[]:[o]),u=y?r:u,we(u)||(u=u==null?[]:[u]),Wd(n,o,u))}var _S=ws(function(n,o,u){n[u?0:1].push(o)},function(){return[[],[]]});function OS(n,o,u){var y=we(n)?pu:fd,_=arguments.length<3;return y(n,pe(o,4),u,_,tn)}function AS(n,o,u){var y=we(n)?Nb:fd,_=arguments.length<3;return y(n,pe(o,4),u,_,Cd)}function TS(n,o){var u=we(n)?Yr:kd;return u(n,$s(pe(o,3)))}function RS(n){var o=we(n)?Ad:w1;return o(n)}function PS(n,o,u){(u?Ot(n,o,u):o===r)?o=1:o=xe(o);var y=we(n)?Yw:x1;return y(n,o)}function CS(n){var o=we(n)?Jw:E1;return o(n)}function kS(n){if(n==null)return 0;if(Ct(n))return Ls(n)?Jn(n):n.length;var o=wt(n);return o==ut||o==yt?n.size:$u(n).length}function $S(n,o,u){var y=we(n)?hu:_1;return u&&Ot(n,o,u)&&(o=r),y(n,pe(o,3))}var IS=_e(function(n,o){if(n==null)return[];var u=o.length;return u>1&&Ot(n,o[0],o[1])?o=[]:u>2&&Ot(o[0],o[1],o[2])&&(o=[o[0]]),Wd(n,pt(o,1),[])}),Cs=pw||function(){return dt.Date.now()};function LS(n,o){if(typeof o!="function")throw new Xt(l);return n=xe(n),function(){if(--n<1)return o.apply(this,arguments)}}function Mp(n,o,u){return o=u?r:o,o=n&&o==null?n.length:o,Fr(n,B,r,r,r,r,o)}function Fp(n,o){var u;if(typeof o!="function")throw new Xt(l);return n=xe(n),function(){return--n>0&&(u=o.apply(this,arguments)),n<=1&&(o=r),u}}var rl=_e(function(n,o,u){var y=w;if(u.length){var _=Qr(u,si(rl));y|=O}return Fr(n,y,o,u,_)}),Dp=_e(function(n,o,u){var y=w|h;if(u.length){var _=Qr(u,si(Dp));y|=O}return Fr(o,y,n,u,_)});function Np(n,o,u){o=u?r:o;var y=Fr(n,E,r,r,r,r,r,o);return y.placeholder=Np.placeholder,y}function jp(n,o,u){o=u?r:o;var y=Fr(n,R,r,r,r,r,r,o);return y.placeholder=jp.placeholder,y}function zp(n,o,u){var y,_,T,P,I,z,V=0,Y=!1,ee=!1,oe=!0;if(typeof n!="function")throw new Xt(l);o=tr(o)||0,Ge(u)&&(Y=!!u.leading,ee="maxWait"in u,T=ee?st(tr(u.maxWait)||0,o):T,oe="trailing"in u?!!u.trailing:oe);function le(Qe){var cr=y,Wr=_;return y=_=r,V=Qe,P=n.apply(Wr,cr),P}function he(Qe){return V=Qe,I=zi(Oe,o),Y?le(Qe):P}function Se(Qe){var cr=Qe-z,Wr=Qe-V,oh=o-cr;return ee?bt(oh,T-Wr):oh}function ge(Qe){var cr=Qe-z,Wr=Qe-V;return z===r||cr>=o||cr<0||ee&&Wr>=T}function Oe(){var Qe=Cs();if(ge(Qe))return Re(Qe);I=zi(Oe,Se(Qe))}function Re(Qe){return I=r,oe&&y?le(Qe):(y=_=r,P)}function zt(){I!==r&&Xd(I),V=0,y=z=_=I=r}function At(){return I===r?P:Re(Cs())}function Wt(){var Qe=Cs(),cr=ge(Qe);if(y=arguments,_=this,z=Qe,cr){if(I===r)return he(z);if(ee)return Xd(I),I=zi(Oe,o),le(z)}return I===r&&(I=zi(Oe,o)),P}return Wt.cancel=zt,Wt.flush=At,Wt}var MS=_e(function(n,o){return Pd(n,1,o)}),FS=_e(function(n,o,u){return Pd(n,tr(o)||0,u)});function DS(n){return Fr(n,F)}function ks(n,o){if(typeof n!="function"||o!=null&&typeof o!="function")throw new Xt(l);var u=function(){var y=arguments,_=o?o.apply(this,y):y[0],T=u.cache;if(T.has(_))return T.get(_);var P=n.apply(this,y);return u.cache=T.set(_,P)||T,P};return u.cache=new(ks.Cache||Lr),u}ks.Cache=Lr;function $s(n){if(typeof n!="function")throw new Xt(l);return function(){var o=arguments;switch(o.length){case 0:return!n.call(this);case 1:return!n.call(this,o[0]);case 2:return!n.call(this,o[0],o[1]);case 3:return!n.call(this,o[0],o[1],o[2])}return!n.apply(this,o)}}function NS(n){return Fp(2,n)}var jS=O1(function(n,o){o=o.length==1&&we(o[0])?Ue(o[0],Dt(pe())):Ue(pt(o,1),Dt(pe()));var u=o.length;return _e(function(y){for(var _=-1,T=bt(y.length,u);++_<T;)y[_]=o[_].call(this,y[_]);return Ft(n,this,y)})}),nl=_e(function(n,o){var u=Qr(o,si(nl));return Fr(n,O,r,o,u)}),Wp=_e(function(n,o){var u=Qr(o,si(Wp));return Fr(n,k,r,o,u)}),zS=Dr(function(n,o){return Fr(n,M,r,r,r,o)});function WS(n,o){if(typeof n!="function")throw new Xt(l);return o=o===r?o:xe(o),_e(n,o)}function BS(n,o){if(typeof n!="function")throw new Xt(l);return o=o==null?0:st(xe(o),0),_e(function(u){var y=u[o],_=on(u,0,o);return y&&Jr(_,y),Ft(n,this,_)})}function US(n,o,u){var y=!0,_=!0;if(typeof n!="function")throw new Xt(l);return Ge(u)&&(y="leading"in u?!!u.leading:y,_="trailing"in u?!!u.trailing:_),zp(n,o,{leading:y,maxWait:o,trailing:_})}function HS(n){return Mp(n,1)}function qS(n,o){return nl(Wu(o),n)}function ZS(){if(!arguments.length)return[];var n=arguments[0];return we(n)?n:[n]}function GS(n){return Jt(n,b)}function KS(n,o){return o=typeof o=="function"?o:r,Jt(n,b,o)}function VS(n){return Jt(n,g|b)}function XS(n,o){return o=typeof o=="function"?o:r,Jt(n,g|b,o)}function YS(n,o){return o==null||Rd(n,o,lt(o))}function lr(n,o){return n===o||n!==n&&o!==o}var JS=_s(Pu),QS=_s(function(n,o){return n>=o}),Pn=Ld((function(){return arguments})())?Ld:function(n){return Xe(n)&&Fe.call(n,"callee")&&!wd.call(n,"callee")},we=H.isArray,eE=td?Dt(td):u1;function Ct(n){return n!=null&&Is(n.length)&&!jr(n)}function Je(n){return Xe(n)&&Ct(n)}function tE(n){return n===!0||n===!1||Xe(n)&&_t(n)==ve}var sn=gw||hl,rE=rd?Dt(rd):l1;function nE(n){return Xe(n)&&n.nodeType===1&&!Wi(n)}function iE(n){if(n==null)return!0;if(Ct(n)&&(we(n)||typeof n=="string"||typeof n.splice=="function"||sn(n)||ai(n)||Pn(n)))return!n.length;var o=wt(n);if(o==ut||o==yt)return!n.size;if(ji(n))return!$u(n).length;for(var u in n)if(Fe.call(n,u))return!1;return!0}function oE(n,o){return Fi(n,o)}function sE(n,o,u){u=typeof u=="function"?u:r;var y=u?u(n,o):r;return y===r?Fi(n,o,r,u):!!y}function il(n){if(!Xe(n))return!1;var o=_t(n);return o==Ze||o==Ae||typeof n.message=="string"&&typeof n.name=="string"&&!Wi(n)}function aE(n){return typeof n=="number"&&Sd(n)}function jr(n){if(!Ge(n))return!1;var o=_t(n);return o==ie||o==mt||o==ye||o==Ga}function Bp(n){return typeof n=="number"&&n==xe(n)}function Is(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=te}function Ge(n){var o=typeof n;return n!=null&&(o=="object"||o=="function")}function Xe(n){return n!=null&&typeof n=="object"}var Up=nd?Dt(nd):f1;function uE(n,o){return n===o||ku(n,o,Ku(o))}function lE(n,o,u){return u=typeof u=="function"?u:r,ku(n,o,Ku(o),u)}function cE(n){return Hp(n)&&n!=+n}function fE(n){if(K1(n))throw new be(a);return Md(n)}function dE(n){return n===null}function pE(n){return n==null}function Hp(n){return typeof n=="number"||Xe(n)&&_t(n)==vr}function Wi(n){if(!Xe(n)||_t(n)!=Gt)return!1;var o=ss(n);if(o===null)return!0;var u=Fe.call(o,"constructor")&&o.constructor;return typeof u=="function"&&u instanceof u&&rs.call(u)==lw}var ol=id?Dt(id):d1;function hE(n){return Bp(n)&&n>=-te&&n<=te}var qp=od?Dt(od):p1;function Ls(n){return typeof n=="string"||!we(n)&&Xe(n)&&_t(n)==Kr}function jt(n){return typeof n=="symbol"||Xe(n)&&_t(n)==wn}var ai=sd?Dt(sd):h1;function gE(n){return n===r}function vE(n){return Xe(n)&&wt(n)==Vr}function mE(n){return Xe(n)&&_t(n)==Go}var yE=_s(Iu),bE=_s(function(n,o){return n<=o});function Zp(n){if(!n)return[];if(Ct(n))return Ls(n)?ar(n):Pt(n);if(Ri&&n[Ri])return Yb(n[Ri]());var o=wt(n),u=o==ut?wu:o==yt?Qo:ui;return u(n)}function zr(n){if(!n)return n===0?n:0;if(n=tr(n),n===X||n===-X){var o=n<0?-1:1;return o*de}return n===n?n:0}function xe(n){var o=zr(n),u=o%1;return o===o?u?o-u:o:0}function Gp(n){return n?On(xe(n),0,Q):0}function tr(n){if(typeof n=="number")return n;if(jt(n))return Z;if(Ge(n)){var o=typeof n.valueOf=="function"?n.valueOf():n;n=Ge(o)?o+"":o}if(typeof n!="string")return n===0?n:+n;n=dd(n);var u=eb.test(n);return u||rb.test(n)?Lb(n.slice(2),u?2:8):Q0.test(n)?Z:+n}function Kp(n){return yr(n,kt(n))}function wE(n){return n?On(xe(n),-te,te):n===0?n:0}function ke(n){return n==null?"":Nt(n)}var xE=ii(function(n,o){if(ji(o)||Ct(o)){yr(o,lt(o),n);return}for(var u in o)Fe.call(o,u)&&Ii(n,u,o[u])}),Vp=ii(function(n,o){yr(o,kt(o),n)}),Ms=ii(function(n,o,u,y){yr(o,kt(o),n,y)}),SE=ii(function(n,o,u,y){yr(o,lt(o),n,y)}),EE=Dr(Au);function _E(n,o){var u=ni(n);return o==null?u:Td(u,o)}var OE=_e(function(n,o){n=Ne(n);var u=-1,y=o.length,_=y>2?o[2]:r;for(_&&Ot(o[0],o[1],_)&&(y=1);++u<y;)for(var T=o[u],P=kt(T),I=-1,z=P.length;++I<z;){var V=P[I],Y=n[V];(Y===r||lr(Y,ei[V])&&!Fe.call(n,V))&&(n[V]=T[V])}return n}),AE=_e(function(n){return n.push(r,dp),Ft(Xp,r,n)});function TE(n,o){return ud(n,pe(o,3),mr)}function RE(n,o){return ud(n,pe(o,3),Ru)}function PE(n,o){return n==null?n:Tu(n,pe(o,3),kt)}function CE(n,o){return n==null?n:$d(n,pe(o,3),kt)}function kE(n,o){return n&&mr(n,pe(o,3))}function $E(n,o){return n&&Ru(n,pe(o,3))}function IE(n){return n==null?[]:vs(n,lt(n))}function LE(n){return n==null?[]:vs(n,kt(n))}function sl(n,o,u){var y=n==null?r:An(n,o);return y===r?u:y}function ME(n,o){return n!=null&&gp(n,o,i1)}function al(n,o){return n!=null&&gp(n,o,o1)}var FE=ap(function(n,o,u){o!=null&&typeof o.toString!="function"&&(o=ns.call(o)),n[o]=u},ll($t)),DE=ap(function(n,o,u){o!=null&&typeof o.toString!="function"&&(o=ns.call(o)),Fe.call(n,o)?n[o].push(u):n[o]=[u]},pe),NE=_e(Mi);function lt(n){return Ct(n)?Od(n):$u(n)}function kt(n){return Ct(n)?Od(n,!0):g1(n)}function jE(n,o){var u={};return o=pe(o,3),mr(n,function(y,_,T){Mr(u,o(y,_,T),y)}),u}function zE(n,o){var u={};return o=pe(o,3),mr(n,function(y,_,T){Mr(u,_,o(y,_,T))}),u}var WE=ii(function(n,o,u){ms(n,o,u)}),Xp=ii(function(n,o,u,y){ms(n,o,u,y)}),BE=Dr(function(n,o){var u={};if(n==null)return u;var y=!1;o=Ue(o,function(T){return T=nn(T,n),y||(y=T.length>1),T}),yr(n,Zu(n),u),y&&(u=Jt(u,g|p|b,F1));for(var _=o.length;_--;)Nu(u,o[_]);return u});function UE(n,o){return Yp(n,$s(pe(o)))}var HE=Dr(function(n,o){return n==null?{}:m1(n,o)});function Yp(n,o){if(n==null)return{};var u=Ue(Zu(n),function(y){return[y]});return o=pe(o),Bd(n,u,function(y,_){return o(y,_[0])})}function qE(n,o,u){o=nn(o,n);var y=-1,_=o.length;for(_||(_=1,n=r);++y<_;){var T=n==null?r:n[br(o[y])];T===r&&(y=_,T=u),n=jr(T)?T.call(n):T}return n}function ZE(n,o,u){return n==null?n:Di(n,o,u)}function GE(n,o,u,y){return y=typeof y=="function"?y:r,n==null?n:Di(n,o,u,y)}var Jp=cp(lt),Qp=cp(kt);function KE(n,o,u){var y=we(n),_=y||sn(n)||ai(n);if(o=pe(o,4),u==null){var T=n&&n.constructor;_?u=y?new T:[]:Ge(n)?u=jr(T)?ni(ss(n)):{}:u={}}return(_?Vt:mr)(n,function(P,I,z){return o(u,P,I,z)}),u}function VE(n,o){return n==null?!0:Nu(n,o)}function XE(n,o,u){return n==null?n:Gd(n,o,Wu(u))}function YE(n,o,u,y){return y=typeof y=="function"?y:r,n==null?n:Gd(n,o,Wu(u),y)}function ui(n){return n==null?[]:bu(n,lt(n))}function JE(n){return n==null?[]:bu(n,kt(n))}function QE(n,o,u){return u===r&&(u=o,o=r),u!==r&&(u=tr(u),u=u===u?u:0),o!==r&&(o=tr(o),o=o===o?o:0),On(tr(n),o,u)}function e_(n,o,u){return o=zr(o),u===r?(u=o,o=0):u=zr(u),n=tr(n),s1(n,o,u)}function t_(n,o,u){if(u&&typeof u!="boolean"&&Ot(n,o,u)&&(o=u=r),u===r&&(typeof o=="boolean"?(u=o,o=r):typeof n=="boolean"&&(u=n,n=r)),n===r&&o===r?(n=0,o=1):(n=zr(n),o===r?(o=n,n=0):o=zr(o)),n>o){var y=n;n=o,o=y}if(u||n%1||o%1){var _=Ed();return bt(n+_*(o-n+Ib("1e-"+((_+"").length-1))),o)}return Mu(n,o)}var r_=oi(function(n,o,u){return o=o.toLowerCase(),n+(u?eh(o):o)});function eh(n){return ul(ke(n).toLowerCase())}function th(n){return n=ke(n),n&&n.replace(ib,Zb).replace(Eb,"")}function n_(n,o,u){n=ke(n),o=Nt(o);var y=n.length;u=u===r?y:On(xe(u),0,y);var _=u;return u-=o.length,u>=0&&n.slice(u,_)==o}function i_(n){return n=ke(n),n&&N0.test(n)?n.replace($f,Gb):n}function o_(n){return n=ke(n),n&&H0.test(n)?n.replace(nu,"\\$&"):n}var s_=oi(function(n,o,u){return n+(u?"-":"")+o.toLowerCase()}),a_=oi(function(n,o,u){return n+(u?" ":"")+o.toLowerCase()}),u_=ip("toLowerCase");function l_(n,o,u){n=ke(n),o=xe(o);var y=o?Jn(n):0;if(!o||y>=o)return n;var _=(o-y)/2;return Es(cs(_),u)+n+Es(ls(_),u)}function c_(n,o,u){n=ke(n),o=xe(o);var y=o?Jn(n):0;return o&&y<o?n+Es(o-y,u):n}function f_(n,o,u){n=ke(n),o=xe(o);var y=o?Jn(n):0;return o&&y<o?Es(o-y,u)+n:n}function d_(n,o,u){return u||o==null?o=0:o&&(o=+o),bw(ke(n).replace(iu,""),o||0)}function p_(n,o,u){return(u?Ot(n,o,u):o===r)?o=1:o=xe(o),Fu(ke(n),o)}function h_(){var n=arguments,o=ke(n[0]);return n.length<3?o:o.replace(n[1],n[2])}var g_=oi(function(n,o,u){return n+(u?"_":"")+o.toLowerCase()});function v_(n,o,u){return u&&typeof u!="number"&&Ot(n,o,u)&&(o=u=r),u=u===r?Q:u>>>0,u?(n=ke(n),n&&(typeof o=="string"||o!=null&&!ol(o))&&(o=Nt(o),!o&&Yn(n))?on(ar(n),0,u):n.split(o,u)):[]}var m_=oi(function(n,o,u){return n+(u?" ":"")+ul(o)});function y_(n,o,u){return n=ke(n),u=u==null?0:On(xe(u),0,n.length),o=Nt(o),n.slice(u,u+o.length)==o}function b_(n,o,u){var y=A.templateSettings;u&&Ot(n,o,u)&&(o=r),n=ke(n),o=Ms({},o,y,fp);var _=Ms({},o.imports,y.imports,fp),T=lt(_),P=bu(_,T),I,z,V=0,Y=o.interpolate||Ko,ee="__p += '",oe=xu((o.escape||Ko).source+"|"+Y.source+"|"+(Y===If?J0:Ko).source+"|"+(o.evaluate||Ko).source+"|$","g"),le="//# sourceURL="+(Fe.call(o,"sourceURL")?(o.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Rb+"]")+`
185
- `;n.replace(oe,function(ge,Oe,Re,zt,At,Wt){return Re||(Re=zt),ee+=n.slice(V,Wt).replace(ob,Kb),Oe&&(I=!0,ee+=`' +
184
+ `)}function lx(n){return be(n)||In(n)||!!($d&&n&&n[$d])}function Br(n,o){var l=typeof n;return o=o??te,!!o&&(l=="number"||l!="symbol"&&xw.test(n))&&n>-1&&n%1==0&&n<o}function At(n,o,l){if(!Ye(l))return!1;var w=typeof o;return(w=="number"?$t(l)&&Br(o,l.length):w=="string"&&o in l)?dr(l[o],n):!1}function ol(n,o){if(be(n))return!1;var l=typeof n;return l=="number"||l=="symbol"||l=="boolean"||n==null||Bt(n)?!0:sw.test(n)||!ow.test(n)||o!=null&&n in Be(o)}function cx(n){var o=typeof n;return o=="string"||o=="number"||o=="symbol"||o=="boolean"?n!=="__proto__":n===null}function sl(n){var o=Cs(n),l=T[o];if(typeof l!="function"||!(o in Ae.prototype))return!1;if(n===l)return!0;var w=rl(l);return!!w&&n===w[0]}function fx(n){return!!Rd&&Rd in n}var dx=ss?Wr:El;function qi(n){var o=n&&n.constructor,l=typeof o=="function"&&o.prototype||oi;return n===l}function Rp(n){return n===n&&!Ye(n)}function Pp(n,o){return function(l){return l==null?!1:l[n]===o&&(o!==r||n in Be(l))}}function px(n){var o=Ds(n,function(w){return l.size===g&&l.clear(),w}),l=o.cache;return o}function hx(n,o){var l=n[1],w=o[1],_=l|w,A=_<(b|m|W),P=w==W&&l==E||w==W&&l==M&&n[7].length<=o[8]||w==(W|M)&&o[7].length<=o[8]&&l==E;if(!(A||P))return n;w&b&&(n[2]=o[2],_|=l&b?0:S);var I=o[3];if(I){var z=n[3];n[3]=z?fp(z,I,o[4]):I,n[4]=z?nn(n[3],h):o[4]}return I=o[5],I&&(z=n[5],n[5]=z?dp(z,I,o[6]):I,n[6]=z?nn(n[5],h):o[6]),I=o[7],I&&(n[7]=I),w&W&&(n[8]=n[8]==null?o[8]:xt(n[8],o[8])),n[9]==null&&(n[9]=o[9]),n[0]=o[0],n[1]=_,n}function gx(n){var o=[];if(n!=null)for(var l in Be(n))o.push(l);return o}function mx(n){return us.call(n)}function Cp(n,o,l){return o=lt(o===r?n.length-1:o,0),function(){for(var w=arguments,_=-1,A=lt(w.length-o,0),P=U(A);++_<A;)P[_]=w[o+_];_=-1;for(var I=U(o+1);++_<o;)I[_]=w[_];return I[o]=l(P),Nt(n,this,I)}}function kp(n,o){return o.length<2?n:Cn(n,tr(o,0,-1))}function vx(n,o){for(var l=n.length,w=xt(o.length,l),_=kt(n);w--;){var A=o[w];n[w]=Br(A,l)?_[A]:r}return n}function al(n,o){if(!(o==="constructor"&&typeof n[o]=="function")&&o!="__proto__")return n[o]}var $p=Lp(tp),Zi=$b||function(n,o){return ht.setTimeout(n,o)},ul=Lp(z1);function Ip(n,o,l){var w=o+"";return ul(n,ux(w,yx(ox(w),l)))}function Lp(n){var o=0,l=0;return function(){var w=Db(),_=H-(w-l);if(l=w,_>0){if(++o>=L)return arguments[0]}else o=0;return n.apply(r,arguments)}}function $s(n,o){var l=-1,w=n.length,_=w-1;for(o=o===r?w:o;++l<o;){var A=Uu(l,_),P=n[A];n[A]=n[l],n[l]=P}return n.length=o,n}var Mp=px(function(n){var o=[];return n.charCodeAt(0)===46&&o.push(""),n.replace(aw,function(l,w,_,A){o.push(_?A.replace(gw,"$1"):w||l)}),o});function Sr(n){if(typeof n=="string"||Bt(n))return n;var o=n+"";return o=="0"&&1/n==-Y?"-0":o}function $n(n){if(n!=null){try{return as.call(n)}catch{}try{return n+""}catch{}}return""}function yx(n,o){return Xt(ne,function(l){var w="_."+l[0];o&l[1]&&!rs(n,w)&&n.push(w)}),n.sort()}function Dp(n){if(n instanceof Ae)return n.clone();var o=new Qt(n.__wrapped__,n.__chain__);return o.__actions__=kt(n.__actions__),o.__index__=n.__index__,o.__values__=n.__values__,o}function wx(n,o,l){(l?At(n,o,l):o===r)?o=1:o=lt(xe(o),0);var w=n==null?0:n.length;if(!w||o<1)return[];for(var _=0,A=0,P=U(hs(w/o));_<w;)P[A++]=tr(n,_,_+=o);return P}function bx(n){for(var o=-1,l=n==null?0:n.length,w=0,_=[];++o<l;){var A=n[o];A&&(_[w++]=A)}return _}function xx(){var n=arguments.length;if(!n)return[];for(var o=U(n-1),l=arguments[0],w=n;w--;)o[w-1]=arguments[w];return rn(be(l)?kt(l):[l],gt(o,1))}var Sx=_e(function(n,o){return rt(n)?zi(n,gt(o,1,rt,!0)):[]}),Ex=_e(function(n,o){var l=rr(o);return rt(l)&&(l=r),rt(n)?zi(n,gt(o,1,rt,!0),pe(l,2)):[]}),_x=_e(function(n,o){var l=rr(o);return rt(l)&&(l=r),rt(n)?zi(n,gt(o,1,rt,!0),r,l):[]});function Ox(n,o,l){var w=n==null?0:n.length;return w?(o=l||o===r?1:xe(o),tr(n,o<0?0:o,w)):[]}function Tx(n,o,l){var w=n==null?0:n.length;return w?(o=l||o===r?1:xe(o),o=w-o,tr(n,0,o<0?0:o)):[]}function Ax(n,o){return n&&n.length?_s(n,pe(o,3),!0,!0):[]}function Rx(n,o){return n&&n.length?_s(n,pe(o,3),!0):[]}function Px(n,o,l,w){var _=n==null?0:n.length;return _?(l&&typeof l!="number"&&At(n,o,l)&&(l=0,w=_),x1(n,o,l,w)):[]}function Fp(n,o,l){var w=n==null?0:n.length;if(!w)return-1;var _=l==null?0:xe(l);return _<0&&(_=lt(w+_,0)),ns(n,pe(o,3),_)}function Np(n,o,l){var w=n==null?0:n.length;if(!w)return-1;var _=w-1;return l!==r&&(_=xe(l),_=l<0?lt(w+_,0):xt(_,w-1)),ns(n,pe(o,3),_,!0)}function jp(n){var o=n==null?0:n.length;return o?gt(n,1):[]}function Cx(n){var o=n==null?0:n.length;return o?gt(n,Y):[]}function kx(n,o){var l=n==null?0:n.length;return l?(o=o===r?1:xe(o),gt(n,o)):[]}function $x(n){for(var o=-1,l=n==null?0:n.length,w={};++o<l;){var _=n[o];w[_[0]]=_[1]}return w}function zp(n){return n&&n.length?n[0]:r}function Ix(n,o,l){var w=n==null?0:n.length;if(!w)return-1;var _=l==null?0:xe(l);return _<0&&(_=lt(w+_,0)),ti(n,o,_)}function Lx(n){var o=n==null?0:n.length;return o?tr(n,0,-1):[]}var Mx=_e(function(n){var o=Ze(n,Vu);return o.length&&o[0]===n[0]?ju(o):[]}),Dx=_e(function(n){var o=rr(n),l=Ze(n,Vu);return o===rr(l)?o=r:l.pop(),l.length&&l[0]===n[0]?ju(l,pe(o,2)):[]}),Fx=_e(function(n){var o=rr(n),l=Ze(n,Vu);return o=typeof o=="function"?o:r,o&&l.pop(),l.length&&l[0]===n[0]?ju(l,r,o):[]});function Nx(n,o){return n==null?"":Lb.call(n,o)}function rr(n){var o=n==null?0:n.length;return o?n[o-1]:r}function jx(n,o,l){var w=n==null?0:n.length;if(!w)return-1;var _=w;return l!==r&&(_=xe(l),_=_<0?lt(w+_,0):xt(_,w-1)),o===o?yb(n,o,_):ns(n,bd,_,!0)}function zx(n,o){return n&&n.length?Xd(n,xe(o)):r}var Bx=_e(Bp);function Bp(n,o){return n&&n.length&&o&&o.length?Hu(n,o):n}function Wx(n,o,l){return n&&n.length&&o&&o.length?Hu(n,o,pe(l,2)):n}function Hx(n,o,l){return n&&n.length&&o&&o.length?Hu(n,o,r,l):n}var Ux=zr(function(n,o){var l=n==null?0:n.length,w=Mu(n,o);return ep(n,Ze(o,function(_){return Br(_,l)?+_:_}).sort(cp)),w});function qx(n,o){var l=[];if(!(n&&n.length))return l;var w=-1,_=[],A=n.length;for(o=pe(o,3);++w<A;){var P=n[w];o(P,w,n)&&(l.push(P),_.push(w))}return ep(n,_),l}function ll(n){return n==null?n:Nb.call(n)}function Zx(n,o,l){var w=n==null?0:n.length;return w?(l&&typeof l!="number"&&At(n,o,l)?(o=0,l=w):(o=o==null?0:xe(o),l=l===r?w:xe(l)),tr(n,o,l)):[]}function Gx(n,o){return Es(n,o)}function Kx(n,o,l){return Zu(n,o,pe(l,2))}function Vx(n,o){var l=n==null?0:n.length;if(l){var w=Es(n,o);if(w<l&&dr(n[w],o))return w}return-1}function Yx(n,o){return Es(n,o,!0)}function Xx(n,o,l){return Zu(n,o,pe(l,2),!0)}function Jx(n,o){var l=n==null?0:n.length;if(l){var w=Es(n,o,!0)-1;if(dr(n[w],o))return w}return-1}function Qx(n){return n&&n.length?rp(n):[]}function eS(n,o){return n&&n.length?rp(n,pe(o,2)):[]}function tS(n){var o=n==null?0:n.length;return o?tr(n,1,o):[]}function rS(n,o,l){return n&&n.length?(o=l||o===r?1:xe(o),tr(n,0,o<0?0:o)):[]}function nS(n,o,l){var w=n==null?0:n.length;return w?(o=l||o===r?1:xe(o),o=w-o,tr(n,o<0?0:o,w)):[]}function iS(n,o){return n&&n.length?_s(n,pe(o,3),!1,!0):[]}function oS(n,o){return n&&n.length?_s(n,pe(o,3)):[]}var sS=_e(function(n){return an(gt(n,1,rt,!0))}),aS=_e(function(n){var o=rr(n);return rt(o)&&(o=r),an(gt(n,1,rt,!0),pe(o,2))}),uS=_e(function(n){var o=rr(n);return o=typeof o=="function"?o:r,an(gt(n,1,rt,!0),r,o)});function lS(n){return n&&n.length?an(n):[]}function cS(n,o){return n&&n.length?an(n,pe(o,2)):[]}function fS(n,o){return o=typeof o=="function"?o:r,n&&n.length?an(n,r,o):[]}function cl(n){if(!(n&&n.length))return[];var o=0;return n=tn(n,function(l){if(rt(l))return o=lt(l.length,o),!0}),Au(o,function(l){return Ze(n,_u(l))})}function Wp(n,o){if(!(n&&n.length))return[];var l=cl(n);return o==null?l:Ze(l,function(w){return Nt(o,r,w)})}var dS=_e(function(n,o){return rt(n)?zi(n,o):[]}),pS=_e(function(n){return Ku(tn(n,rt))}),hS=_e(function(n){var o=rr(n);return rt(o)&&(o=r),Ku(tn(n,rt),pe(o,2))}),gS=_e(function(n){var o=rr(n);return o=typeof o=="function"?o:r,Ku(tn(n,rt),r,o)}),mS=_e(cl);function vS(n,o){return sp(n||[],o||[],ji)}function yS(n,o){return sp(n||[],o||[],Hi)}var wS=_e(function(n){var o=n.length,l=o>1?n[o-1]:r;return l=typeof l=="function"?(n.pop(),l):r,Wp(n,l)});function Hp(n){var o=T(n);return o.__chain__=!0,o}function bS(n,o){return o(n),n}function Is(n,o){return o(n)}var xS=zr(function(n){var o=n.length,l=o?n[0]:0,w=this.__wrapped__,_=function(A){return Mu(A,n)};return o>1||this.__actions__.length||!(w instanceof Ae)||!Br(l)?this.thru(_):(w=w.slice(l,+l+(o?1:0)),w.__actions__.push({func:Is,args:[_],thisArg:r}),new Qt(w,this.__chain__).thru(function(A){return o&&!A.length&&A.push(r),A}))});function SS(){return Hp(this)}function ES(){return new Qt(this.value(),this.__chain__)}function _S(){this.__values__===r&&(this.__values__=nh(this.value()));var n=this.__index__>=this.__values__.length,o=n?r:this.__values__[this.__index__++];return{done:n,value:o}}function OS(){return this}function TS(n){for(var o,l=this;l instanceof ys;){var w=Dp(l);w.__index__=0,w.__values__=r,o?_.__wrapped__=w:o=w;var _=w;l=l.__wrapped__}return _.__wrapped__=n,o}function AS(){var n=this.__wrapped__;if(n instanceof Ae){var o=n;return this.__actions__.length&&(o=new Ae(this)),o=o.reverse(),o.__actions__.push({func:Is,args:[ll],thisArg:r}),new Qt(o,this.__chain__)}return this.thru(ll)}function RS(){return op(this.__wrapped__,this.__actions__)}var PS=Os(function(n,o,l){Fe.call(n,l)?++n[l]:Nr(n,l,1)});function CS(n,o,l){var w=be(n)?yd:b1;return l&&At(n,o,l)&&(o=r),w(n,pe(o,3))}function kS(n,o){var l=be(n)?tn:Wd;return l(n,pe(o,3))}var $S=mp(Fp),IS=mp(Np);function LS(n,o){return gt(Ls(n,o),1)}function MS(n,o){return gt(Ls(n,o),Y)}function DS(n,o,l){return l=l===r?1:xe(l),gt(Ls(n,o),l)}function Up(n,o){var l=be(n)?Xt:sn;return l(n,pe(o,3))}function qp(n,o){var l=be(n)?tb:Bd;return l(n,pe(o,3))}var FS=Os(function(n,o,l){Fe.call(n,l)?n[l].push(o):Nr(n,l,[o])});function NS(n,o,l,w){n=$t(n)?n:pi(n),l=l&&!w?xe(l):0;var _=n.length;return l<0&&(l=lt(_+l,0)),js(n)?l<=_&&n.indexOf(o,l)>-1:!!_&&ti(n,o,l)>-1}var jS=_e(function(n,o,l){var w=-1,_=typeof o=="function",A=$t(n)?U(n.length):[];return sn(n,function(P){A[++w]=_?Nt(o,P,l):Bi(P,o,l)}),A}),zS=Os(function(n,o,l){Nr(n,l,o)});function Ls(n,o){var l=be(n)?Ze:Kd;return l(n,pe(o,3))}function BS(n,o,l,w){return n==null?[]:(be(o)||(o=o==null?[]:[o]),l=w?r:l,be(l)||(l=l==null?[]:[l]),Jd(n,o,l))}var WS=Os(function(n,o,l){n[l?0:1].push(o)},function(){return[[],[]]});function HS(n,o,l){var w=be(n)?Su:Sd,_=arguments.length<3;return w(n,pe(o,4),l,_,sn)}function US(n,o,l){var w=be(n)?rb:Sd,_=arguments.length<3;return w(n,pe(o,4),l,_,Bd)}function qS(n,o){var l=be(n)?tn:Wd;return l(n,Fs(pe(o,3)))}function ZS(n){var o=be(n)?Fd:N1;return o(n)}function GS(n,o,l){(l?At(n,o,l):o===r)?o=1:o=xe(o);var w=be(n)?g1:j1;return w(n,o)}function KS(n){var o=be(n)?m1:B1;return o(n)}function VS(n){if(n==null)return 0;if($t(n))return js(n)?ni(n):n.length;var o=St(n);return o==ft||o==bt?n.size:Bu(n).length}function YS(n,o,l){var w=be(n)?Eu:W1;return l&&At(n,o,l)&&(o=r),w(n,pe(o,3))}var XS=_e(function(n,o){if(n==null)return[];var l=o.length;return l>1&&At(n,o[0],o[1])?o=[]:l>2&&At(o[0],o[1],o[2])&&(o=[o[0]]),Jd(n,gt(o,1),[])}),Ms=kb||function(){return ht.Date.now()};function JS(n,o){if(typeof o!="function")throw new Jt(u);return n=xe(n),function(){if(--n<1)return o.apply(this,arguments)}}function Zp(n,o,l){return o=l?r:o,o=n&&o==null?n.length:o,jr(n,W,r,r,r,r,o)}function Gp(n,o){var l;if(typeof o!="function")throw new Jt(u);return n=xe(n),function(){return--n>0&&(l=o.apply(this,arguments)),n<=1&&(o=r),l}}var fl=_e(function(n,o,l){var w=b;if(l.length){var _=nn(l,fi(fl));w|=O}return jr(n,w,o,l,_)}),Kp=_e(function(n,o,l){var w=b|m;if(l.length){var _=nn(l,fi(Kp));w|=O}return jr(o,w,n,l,_)});function Vp(n,o,l){o=l?r:o;var w=jr(n,E,r,r,r,r,r,o);return w.placeholder=Vp.placeholder,w}function Yp(n,o,l){o=l?r:o;var w=jr(n,R,r,r,r,r,r,o);return w.placeholder=Yp.placeholder,w}function Xp(n,o,l){var w,_,A,P,I,z,V=0,X=!1,ee=!1,oe=!0;if(typeof n!="function")throw new Jt(u);o=nr(o)||0,Ye(l)&&(X=!!l.leading,ee="maxWait"in l,A=ee?lt(nr(l.maxWait)||0,o):A,oe="trailing"in l?!!l.trailing:oe);function le(nt){var pr=w,Ur=_;return w=_=r,V=nt,P=n.apply(Ur,pr),P}function he(nt){return V=nt,I=Zi(Oe,o),X?le(nt):P}function Se(nt){var pr=nt-z,Ur=nt-V,mh=o-pr;return ee?xt(mh,A-Ur):mh}function ge(nt){var pr=nt-z,Ur=nt-V;return z===r||pr>=o||pr<0||ee&&Ur>=A}function Oe(){var nt=Ms();if(ge(nt))return Re(nt);I=Zi(Oe,Se(nt))}function Re(nt){return I=r,oe&&w?le(nt):(w=_=r,P)}function Wt(){I!==r&&ap(I),V=0,w=z=_=I=r}function Rt(){return I===r?P:Re(Ms())}function Ht(){var nt=Ms(),pr=ge(nt);if(w=arguments,_=this,z=nt,pr){if(I===r)return he(z);if(ee)return ap(I),I=Zi(Oe,o),le(z)}return I===r&&(I=Zi(Oe,o)),P}return Ht.cancel=Wt,Ht.flush=Rt,Ht}var QS=_e(function(n,o){return zd(n,1,o)}),eE=_e(function(n,o,l){return zd(n,nr(o)||0,l)});function tE(n){return jr(n,F)}function Ds(n,o){if(typeof n!="function"||o!=null&&typeof o!="function")throw new Jt(u);var l=function(){var w=arguments,_=o?o.apply(this,w):w[0],A=l.cache;if(A.has(_))return A.get(_);var P=n.apply(this,w);return l.cache=A.set(_,P)||A,P};return l.cache=new(Ds.Cache||Fr),l}Ds.Cache=Fr;function Fs(n){if(typeof n!="function")throw new Jt(u);return function(){var o=arguments;switch(o.length){case 0:return!n.call(this);case 1:return!n.call(this,o[0]);case 2:return!n.call(this,o[0],o[1]);case 3:return!n.call(this,o[0],o[1],o[2])}return!n.apply(this,o)}}function rE(n){return Gp(2,n)}var nE=H1(function(n,o){o=o.length==1&&be(o[0])?Ze(o[0],jt(pe())):Ze(gt(o,1),jt(pe()));var l=o.length;return _e(function(w){for(var _=-1,A=xt(w.length,l);++_<A;)w[_]=o[_].call(this,w[_]);return Nt(n,this,w)})}),dl=_e(function(n,o){var l=nn(o,fi(dl));return jr(n,O,r,o,l)}),Jp=_e(function(n,o){var l=nn(o,fi(Jp));return jr(n,k,r,o,l)}),iE=zr(function(n,o){return jr(n,M,r,r,r,o)});function oE(n,o){if(typeof n!="function")throw new Jt(u);return o=o===r?o:xe(o),_e(n,o)}function sE(n,o){if(typeof n!="function")throw new Jt(u);return o=o==null?0:lt(xe(o),0),_e(function(l){var w=l[o],_=ln(l,0,o);return w&&rn(_,w),Nt(n,this,_)})}function aE(n,o,l){var w=!0,_=!0;if(typeof n!="function")throw new Jt(u);return Ye(l)&&(w="leading"in l?!!l.leading:w,_="trailing"in l?!!l.trailing:_),Xp(n,o,{leading:w,maxWait:o,trailing:_})}function uE(n){return Zp(n,1)}function lE(n,o){return dl(Yu(o),n)}function cE(){if(!arguments.length)return[];var n=arguments[0];return be(n)?n:[n]}function fE(n){return er(n,y)}function dE(n,o){return o=typeof o=="function"?o:r,er(n,y,o)}function pE(n){return er(n,v|y)}function hE(n,o){return o=typeof o=="function"?o:r,er(n,v|y,o)}function gE(n,o){return o==null||jd(n,o,dt(o))}function dr(n,o){return n===o||n!==n&&o!==o}var mE=Ps(Nu),vE=Ps(function(n,o){return n>=o}),In=qd((function(){return arguments})())?qd:function(n){return et(n)&&Fe.call(n,"callee")&&!kd.call(n,"callee")},be=U.isArray,yE=dd?jt(dd):T1;function $t(n){return n!=null&&Ns(n.length)&&!Wr(n)}function rt(n){return et(n)&&$t(n)}function wE(n){return n===!0||n===!1||et(n)&&Tt(n)==me}var cn=Ib||El,bE=pd?jt(pd):A1;function xE(n){return et(n)&&n.nodeType===1&&!Gi(n)}function SE(n){if(n==null)return!0;if($t(n)&&(be(n)||typeof n=="string"||typeof n.splice=="function"||cn(n)||di(n)||In(n)))return!n.length;var o=St(n);if(o==ft||o==bt)return!n.size;if(qi(n))return!Bu(n).length;for(var l in n)if(Fe.call(n,l))return!1;return!0}function EE(n,o){return Wi(n,o)}function _E(n,o,l){l=typeof l=="function"?l:r;var w=l?l(n,o):r;return w===r?Wi(n,o,r,l):!!w}function pl(n){if(!et(n))return!1;var o=Tt(n);return o==Ve||o==Te||typeof n.message=="string"&&typeof n.name=="string"&&!Gi(n)}function OE(n){return typeof n=="number"&&Id(n)}function Wr(n){if(!Ye(n))return!1;var o=Tt(n);return o==ie||o==wt||o==ye||o==ru}function Qp(n){return typeof n=="number"&&n==xe(n)}function Ns(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=te}function Ye(n){var o=typeof n;return n!=null&&(o=="object"||o=="function")}function et(n){return n!=null&&typeof n=="object"}var eh=hd?jt(hd):P1;function TE(n,o){return n===o||zu(n,o,nl(o))}function AE(n,o,l){return l=typeof l=="function"?l:r,zu(n,o,nl(o),l)}function RE(n){return th(n)&&n!=+n}function PE(n){if(dx(n))throw new we(a);return Zd(n)}function CE(n){return n===null}function kE(n){return n==null}function th(n){return typeof n=="number"||et(n)&&Tt(n)==wr}function Gi(n){if(!et(n)||Tt(n)!=Vt)return!1;var o=fs(n);if(o===null)return!0;var l=Fe.call(o,"constructor")&&o.constructor;return typeof l=="function"&&l instanceof l&&as.call(l)==Ab}var hl=gd?jt(gd):C1;function $E(n){return Qp(n)&&n>=-te&&n<=te}var rh=md?jt(md):k1;function js(n){return typeof n=="string"||!be(n)&&et(n)&&Tt(n)==Jr}function Bt(n){return typeof n=="symbol"||et(n)&&Tt(n)==_n}var di=vd?jt(vd):$1;function IE(n){return n===r}function LE(n){return et(n)&&St(n)==Qr}function ME(n){return et(n)&&Tt(n)==Jo}var DE=Ps(Wu),FE=Ps(function(n,o){return n<=o});function nh(n){if(!n)return[];if($t(n))return js(n)?cr(n):kt(n);if(Li&&n[Li])return gb(n[Li]());var o=St(n),l=o==ft?Pu:o==bt?is:pi;return l(n)}function Hr(n){if(!n)return n===0?n:0;if(n=nr(n),n===Y||n===-Y){var o=n<0?-1:1;return o*de}return n===n?n:0}function xe(n){var o=Hr(n),l=o%1;return o===o?l?o-l:o:0}function ih(n){return n?Pn(xe(n),0,Q):0}function nr(n){if(typeof n=="number")return n;if(Bt(n))return Z;if(Ye(n)){var o=typeof n.valueOf=="function"?n.valueOf():n;n=Ye(o)?o+"":o}if(typeof n!="string")return n===0?n:+n;n=Ed(n);var l=yw.test(n);return l||bw.test(n)?Jw(n.slice(2),l?2:8):vw.test(n)?Z:+n}function oh(n){return xr(n,It(n))}function NE(n){return n?Pn(xe(n),-te,te):n===0?n:0}function ke(n){return n==null?"":zt(n)}var jE=li(function(n,o){if(qi(o)||$t(o)){xr(o,dt(o),n);return}for(var l in o)Fe.call(o,l)&&ji(n,l,o[l])}),sh=li(function(n,o){xr(o,It(o),n)}),zs=li(function(n,o,l,w){xr(o,It(o),n,w)}),zE=li(function(n,o,l,w){xr(o,dt(o),n,w)}),BE=zr(Mu);function WE(n,o){var l=ui(n);return o==null?l:Nd(l,o)}var HE=_e(function(n,o){n=Be(n);var l=-1,w=o.length,_=w>2?o[2]:r;for(_&&At(o[0],o[1],_)&&(w=1);++l<w;)for(var A=o[l],P=It(A),I=-1,z=P.length;++I<z;){var V=P[I],X=n[V];(X===r||dr(X,oi[V])&&!Fe.call(n,V))&&(n[V]=A[V])}return n}),UE=_e(function(n){return n.push(r,Ep),Nt(ah,r,n)});function qE(n,o){return wd(n,pe(o,3),br)}function ZE(n,o){return wd(n,pe(o,3),Fu)}function GE(n,o){return n==null?n:Du(n,pe(o,3),It)}function KE(n,o){return n==null?n:Hd(n,pe(o,3),It)}function VE(n,o){return n&&br(n,pe(o,3))}function YE(n,o){return n&&Fu(n,pe(o,3))}function XE(n){return n==null?[]:xs(n,dt(n))}function JE(n){return n==null?[]:xs(n,It(n))}function gl(n,o,l){var w=n==null?r:Cn(n,o);return w===r?l:w}function QE(n,o){return n!=null&&Tp(n,o,S1)}function ml(n,o){return n!=null&&Tp(n,o,E1)}var e_=yp(function(n,o,l){o!=null&&typeof o.toString!="function"&&(o=us.call(o)),n[o]=l},yl(Lt)),t_=yp(function(n,o,l){o!=null&&typeof o.toString!="function"&&(o=us.call(o)),Fe.call(n,o)?n[o].push(l):n[o]=[l]},pe),r_=_e(Bi);function dt(n){return $t(n)?Dd(n):Bu(n)}function It(n){return $t(n)?Dd(n,!0):I1(n)}function n_(n,o){var l={};return o=pe(o,3),br(n,function(w,_,A){Nr(l,o(w,_,A),w)}),l}function i_(n,o){var l={};return o=pe(o,3),br(n,function(w,_,A){Nr(l,_,o(w,_,A))}),l}var o_=li(function(n,o,l){Ss(n,o,l)}),ah=li(function(n,o,l,w){Ss(n,o,l,w)}),s_=zr(function(n,o){var l={};if(n==null)return l;var w=!1;o=Ze(o,function(A){return A=un(A,n),w||(w=A.length>1),A}),xr(n,tl(n),l),w&&(l=er(l,v|p|y,ex));for(var _=o.length;_--;)Gu(l,o[_]);return l});function a_(n,o){return uh(n,Fs(pe(o)))}var u_=zr(function(n,o){return n==null?{}:M1(n,o)});function uh(n,o){if(n==null)return{};var l=Ze(tl(n),function(w){return[w]});return o=pe(o),Qd(n,l,function(w,_){return o(w,_[0])})}function l_(n,o,l){o=un(o,n);var w=-1,_=o.length;for(_||(_=1,n=r);++w<_;){var A=n==null?r:n[Sr(o[w])];A===r&&(w=_,A=l),n=Wr(A)?A.call(n):A}return n}function c_(n,o,l){return n==null?n:Hi(n,o,l)}function f_(n,o,l,w){return w=typeof w=="function"?w:r,n==null?n:Hi(n,o,l,w)}var lh=xp(dt),ch=xp(It);function d_(n,o,l){var w=be(n),_=w||cn(n)||di(n);if(o=pe(o,4),l==null){var A=n&&n.constructor;_?l=w?new A:[]:Ye(n)?l=Wr(A)?ui(fs(n)):{}:l={}}return(_?Xt:br)(n,function(P,I,z){return o(l,P,I,z)}),l}function p_(n,o){return n==null?!0:Gu(n,o)}function h_(n,o,l){return n==null?n:ip(n,o,Yu(l))}function g_(n,o,l,w){return w=typeof w=="function"?w:r,n==null?n:ip(n,o,Yu(l),w)}function pi(n){return n==null?[]:Ru(n,dt(n))}function m_(n){return n==null?[]:Ru(n,It(n))}function v_(n,o,l){return l===r&&(l=o,o=r),l!==r&&(l=nr(l),l=l===l?l:0),o!==r&&(o=nr(o),o=o===o?o:0),Pn(nr(n),o,l)}function y_(n,o,l){return o=Hr(o),l===r?(l=o,o=0):l=Hr(l),n=nr(n),_1(n,o,l)}function w_(n,o,l){if(l&&typeof l!="boolean"&&At(n,o,l)&&(o=l=r),l===r&&(typeof o=="boolean"?(l=o,o=r):typeof n=="boolean"&&(l=n,n=r)),n===r&&o===r?(n=0,o=1):(n=Hr(n),o===r?(o=n,n=0):o=Hr(o)),n>o){var w=n;n=o,o=w}if(l||n%1||o%1){var _=Ld();return xt(n+_*(o-n+Xw("1e-"+((_+"").length-1))),o)}return Uu(n,o)}var b_=ci(function(n,o,l){return o=o.toLowerCase(),n+(l?fh(o):o)});function fh(n){return vl(ke(n).toLowerCase())}function dh(n){return n=ke(n),n&&n.replace(Sw,cb).replace(Bw,"")}function x_(n,o,l){n=ke(n),o=zt(o);var w=n.length;l=l===r?w:Pn(xe(l),0,w);var _=l;return l-=o.length,l>=0&&n.slice(l,_)==o}function S_(n){return n=ke(n),n&&rw.test(n)?n.replace(Hf,fb):n}function E_(n){return n=ke(n),n&&uw.test(n)?n.replace(du,"\\$&"):n}var __=ci(function(n,o,l){return n+(l?"-":"")+o.toLowerCase()}),O_=ci(function(n,o,l){return n+(l?" ":"")+o.toLowerCase()}),T_=gp("toLowerCase");function A_(n,o,l){n=ke(n),o=xe(o);var w=o?ni(n):0;if(!o||w>=o)return n;var _=(o-w)/2;return Rs(gs(_),l)+n+Rs(hs(_),l)}function R_(n,o,l){n=ke(n),o=xe(o);var w=o?ni(n):0;return o&&w<o?n+Rs(o-w,l):n}function P_(n,o,l){n=ke(n),o=xe(o);var w=o?ni(n):0;return o&&w<o?Rs(o-w,l)+n:n}function C_(n,o,l){return l||o==null?o=0:o&&(o=+o),Fb(ke(n).replace(pu,""),o||0)}function k_(n,o,l){return(l?At(n,o,l):o===r)?o=1:o=xe(o),qu(ke(n),o)}function $_(){var n=arguments,o=ke(n[0]);return n.length<3?o:o.replace(n[1],n[2])}var I_=ci(function(n,o,l){return n+(l?"_":"")+o.toLowerCase()});function L_(n,o,l){return l&&typeof l!="number"&&At(n,o,l)&&(o=l=r),l=l===r?Q:l>>>0,l?(n=ke(n),n&&(typeof o=="string"||o!=null&&!hl(o))&&(o=zt(o),!o&&ri(n))?ln(cr(n),0,l):n.split(o,l)):[]}var M_=ci(function(n,o,l){return n+(l?" ":"")+vl(o)});function D_(n,o,l){return n=ke(n),l=l==null?0:Pn(xe(l),0,n.length),o=zt(o),n.slice(l,l+o.length)==o}function F_(n,o,l){var w=T.templateSettings;l&&At(n,o,l)&&(o=r),n=ke(n),o=zs({},o,w,Sp);var _=zs({},o.imports,w.imports,Sp),A=dt(_),P=Ru(_,A),I,z,V=0,X=o.interpolate||Qo,ee="__p += '",oe=Cu((o.escape||Qo).source+"|"+X.source+"|"+(X===Uf?mw:Qo).source+"|"+(o.evaluate||Qo).source+"|$","g"),le="//# sourceURL="+(Fe.call(o,"sourceURL")?(o.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Zw+"]")+`
185
+ `;n.replace(oe,function(ge,Oe,Re,Wt,Rt,Ht){return Re||(Re=Wt),ee+=n.slice(V,Ht).replace(Ew,db),Oe&&(I=!0,ee+=`' +
186
186
  __e(`+Oe+`) +
187
- '`),At&&(z=!0,ee+=`';
188
- `+At+`;
187
+ '`),Rt&&(z=!0,ee+=`';
188
+ `+Rt+`;
189
189
  __p += '`),Re&&(ee+=`' +
190
190
  ((__t = (`+Re+`)) == null ? '' : __t) +
191
- '`),V=Wt+ge.length,ge}),ee+=`';
191
+ '`),V=Ht+ge.length,ge}),ee+=`';
192
192
  `;var he=Fe.call(o,"variable")&&o.variable;if(!he)ee=`with (obj) {
193
193
  `+ee+`
194
194
  }
195
- `;else if(X0.test(he))throw new be(c);ee=(z?ee.replace(L0,""):ee).replace(M0,"$1").replace(F0,"$1;"),ee="function("+(he||"obj")+`) {
195
+ `;else if(hw.test(he))throw new we(c);ee=(z?ee.replace(J0,""):ee).replace(Q0,"$1").replace(ew,"$1;"),ee="function("+(he||"obj")+`) {
196
196
  `+(he?"":`obj || (obj = {});
197
197
  `)+"var __t, __p = ''"+(I?", __e = _.escape":"")+(z?`, __j = Array.prototype.join;
198
198
  function print() { __p += __j.call(arguments, '') }
199
199
  `:`;
200
200
  `)+ee+`return __p
201
- }`;var Se=nh(function(){return Pe(T,le+"return "+ee).apply(r,P)});if(Se.source=ee,il(Se))throw Se;return Se}function w_(n){return ke(n).toLowerCase()}function x_(n){return ke(n).toUpperCase()}function S_(n,o,u){if(n=ke(n),n&&(u||o===r))return dd(n);if(!n||!(o=Nt(o)))return n;var y=ar(n),_=ar(o),T=pd(y,_),P=hd(y,_)+1;return on(y,T,P).join("")}function E_(n,o,u){if(n=ke(n),n&&(u||o===r))return n.slice(0,vd(n)+1);if(!n||!(o=Nt(o)))return n;var y=ar(n),_=hd(y,ar(o))+1;return on(y,0,_).join("")}function __(n,o,u){if(n=ke(n),n&&(u||o===r))return n.replace(iu,"");if(!n||!(o=Nt(o)))return n;var y=ar(n),_=pd(y,ar(o));return on(y,_).join("")}function O_(n,o){var u=G,y=j;if(Ge(o)){var _="separator"in o?o.separator:_;u="length"in o?xe(o.length):u,y="omission"in o?Nt(o.omission):y}n=ke(n);var T=n.length;if(Yn(n)){var P=ar(n);T=P.length}if(u>=T)return n;var I=u-Jn(y);if(I<1)return y;var z=P?on(P,0,I).join(""):n.slice(0,I);if(_===r)return z+y;if(P&&(I+=z.length-I),ol(_)){if(n.slice(I).search(_)){var V,Y=z;for(_.global||(_=xu(_.source,ke(Lf.exec(_))+"g")),_.lastIndex=0;V=_.exec(Y);)var ee=V.index;z=z.slice(0,ee===r?I:ee)}}else if(n.indexOf(Nt(_),I)!=I){var oe=z.lastIndexOf(_);oe>-1&&(z=z.slice(0,oe))}return z+y}function A_(n){return n=ke(n),n&&D0.test(n)?n.replace(kf,tw):n}var T_=oi(function(n,o,u){return n+(u?" ":"")+o.toUpperCase()}),ul=ip("toUpperCase");function rh(n,o,u){return n=ke(n),o=u?r:o,o===r?Xb(n)?iw(n):Wb(n):n.match(o)||[]}var nh=_e(function(n,o){try{return Ft(n,r,o)}catch(u){return il(u)?u:new be(u)}}),R_=Dr(function(n,o){return Vt(o,function(u){u=br(u),Mr(n,u,rl(n[u],n))}),n});function P_(n){var o=n==null?0:n.length,u=pe();return n=o?Ue(n,function(y){if(typeof y[1]!="function")throw new Xt(l);return[u(y[0]),y[1]]}):[],_e(function(y){for(var _=-1;++_<o;){var T=n[_];if(Ft(T[0],this,y))return Ft(T[1],this,y)}})}function C_(n){return t1(Jt(n,g))}function ll(n){return function(){return n}}function k_(n,o){return n==null||n!==n?o:n}var $_=sp(),I_=sp(!0);function $t(n){return n}function cl(n){return Fd(typeof n=="function"?n:Jt(n,g))}function L_(n){return Nd(Jt(n,g))}function M_(n,o){return jd(n,Jt(o,g))}var F_=_e(function(n,o){return function(u){return Mi(u,n,o)}}),D_=_e(function(n,o){return function(u){return Mi(n,u,o)}});function fl(n,o,u){var y=lt(o),_=vs(o,y);u==null&&!(Ge(o)&&(_.length||!y.length))&&(u=o,o=n,n=this,_=vs(o,lt(o)));var T=!(Ge(u)&&"chain"in u)||!!u.chain,P=jr(n);return Vt(_,function(I){var z=o[I];n[I]=z,P&&(n.prototype[I]=function(){var V=this.__chain__;if(T||V){var Y=n(this.__wrapped__),ee=Y.__actions__=Pt(this.__actions__);return ee.push({func:z,args:arguments,thisArg:n}),Y.__chain__=V,Y}return z.apply(n,Jr([this.value()],arguments))})}),n}function N_(){return dt._===this&&(dt._=cw),this}function dl(){}function j_(n){return n=xe(n),_e(function(o){return zd(o,n)})}var z_=Uu(Ue),W_=Uu(ad),B_=Uu(hu);function ih(n){return Xu(n)?gu(br(n)):y1(n)}function U_(n){return function(o){return n==null?r:An(n,o)}}var H_=up(),q_=up(!0);function pl(){return[]}function hl(){return!1}function Z_(){return{}}function G_(){return""}function K_(){return!0}function V_(n,o){if(n=xe(n),n<1||n>te)return[];var u=Q,y=bt(n,Q);o=pe(o),n-=Q;for(var _=yu(y,o);++u<n;)o(u);return _}function X_(n){return we(n)?Ue(n,br):jt(n)?[n]:Pt(_p(ke(n)))}function Y_(n){var o=++uw;return ke(n)+o}var J_=Ss(function(n,o){return n+o},0),Q_=Hu("ceil"),eO=Ss(function(n,o){return n/o},1),tO=Hu("floor");function rO(n){return n&&n.length?gs(n,$t,Pu):r}function nO(n,o){return n&&n.length?gs(n,pe(o,2),Pu):r}function iO(n){return cd(n,$t)}function oO(n,o){return cd(n,pe(o,2))}function sO(n){return n&&n.length?gs(n,$t,Iu):r}function aO(n,o){return n&&n.length?gs(n,pe(o,2),Iu):r}var uO=Ss(function(n,o){return n*o},1),lO=Hu("round"),cO=Ss(function(n,o){return n-o},0);function fO(n){return n&&n.length?mu(n,$t):0}function dO(n,o){return n&&n.length?mu(n,pe(o,2)):0}return A.after=LS,A.ary=Mp,A.assign=xE,A.assignIn=Vp,A.assignInWith=Ms,A.assignWith=SE,A.at=EE,A.before=Fp,A.bind=rl,A.bindAll=R_,A.bindKey=Dp,A.castArray=ZS,A.chain=$p,A.chunk=tx,A.compact=rx,A.concat=nx,A.cond=P_,A.conforms=C_,A.constant=ll,A.countBy=fS,A.create=_E,A.curry=Np,A.curryRight=jp,A.debounce=zp,A.defaults=OE,A.defaultsDeep=AE,A.defer=MS,A.delay=FS,A.difference=ix,A.differenceBy=ox,A.differenceWith=sx,A.drop=ax,A.dropRight=ux,A.dropRightWhile=lx,A.dropWhile=cx,A.fill=fx,A.filter=pS,A.flatMap=vS,A.flatMapDeep=mS,A.flatMapDepth=yS,A.flatten=Rp,A.flattenDeep=dx,A.flattenDepth=px,A.flip=DS,A.flow=$_,A.flowRight=I_,A.fromPairs=hx,A.functions=IE,A.functionsIn=LE,A.groupBy=bS,A.initial=vx,A.intersection=mx,A.intersectionBy=yx,A.intersectionWith=bx,A.invert=FE,A.invertBy=DE,A.invokeMap=xS,A.iteratee=cl,A.keyBy=SS,A.keys=lt,A.keysIn=kt,A.map=Ps,A.mapKeys=jE,A.mapValues=zE,A.matches=L_,A.matchesProperty=M_,A.memoize=ks,A.merge=WE,A.mergeWith=Xp,A.method=F_,A.methodOf=D_,A.mixin=fl,A.negate=$s,A.nthArg=j_,A.omit=BE,A.omitBy=UE,A.once=NS,A.orderBy=ES,A.over=z_,A.overArgs=jS,A.overEvery=W_,A.overSome=B_,A.partial=nl,A.partialRight=Wp,A.partition=_S,A.pick=HE,A.pickBy=Yp,A.property=ih,A.propertyOf=U_,A.pull=Ex,A.pullAll=Cp,A.pullAllBy=_x,A.pullAllWith=Ox,A.pullAt=Ax,A.range=H_,A.rangeRight=q_,A.rearg=zS,A.reject=TS,A.remove=Tx,A.rest=WS,A.reverse=el,A.sampleSize=PS,A.set=ZE,A.setWith=GE,A.shuffle=CS,A.slice=Rx,A.sortBy=IS,A.sortedUniq=Mx,A.sortedUniqBy=Fx,A.split=v_,A.spread=BS,A.tail=Dx,A.take=Nx,A.takeRight=jx,A.takeRightWhile=zx,A.takeWhile=Wx,A.tap=rS,A.throttle=US,A.thru=Rs,A.toArray=Zp,A.toPairs=Jp,A.toPairsIn=Qp,A.toPath=X_,A.toPlainObject=Kp,A.transform=KE,A.unary=HS,A.union=Bx,A.unionBy=Ux,A.unionWith=Hx,A.uniq=qx,A.uniqBy=Zx,A.uniqWith=Gx,A.unset=VE,A.unzip=tl,A.unzipWith=kp,A.update=XE,A.updateWith=YE,A.values=ui,A.valuesIn=JE,A.without=Kx,A.words=rh,A.wrap=qS,A.xor=Vx,A.xorBy=Xx,A.xorWith=Yx,A.zip=Jx,A.zipObject=Qx,A.zipObjectDeep=eS,A.zipWith=tS,A.entries=Jp,A.entriesIn=Qp,A.extend=Vp,A.extendWith=Ms,fl(A,A),A.add=J_,A.attempt=nh,A.camelCase=r_,A.capitalize=eh,A.ceil=Q_,A.clamp=QE,A.clone=GS,A.cloneDeep=VS,A.cloneDeepWith=XS,A.cloneWith=KS,A.conformsTo=YS,A.deburr=th,A.defaultTo=k_,A.divide=eO,A.endsWith=n_,A.eq=lr,A.escape=i_,A.escapeRegExp=o_,A.every=dS,A.find=hS,A.findIndex=Ap,A.findKey=TE,A.findLast=gS,A.findLastIndex=Tp,A.findLastKey=RE,A.floor=tO,A.forEach=Ip,A.forEachRight=Lp,A.forIn=PE,A.forInRight=CE,A.forOwn=kE,A.forOwnRight=$E,A.get=sl,A.gt=JS,A.gte=QS,A.has=ME,A.hasIn=al,A.head=Pp,A.identity=$t,A.includes=wS,A.indexOf=gx,A.inRange=e_,A.invoke=NE,A.isArguments=Pn,A.isArray=we,A.isArrayBuffer=eE,A.isArrayLike=Ct,A.isArrayLikeObject=Je,A.isBoolean=tE,A.isBuffer=sn,A.isDate=rE,A.isElement=nE,A.isEmpty=iE,A.isEqual=oE,A.isEqualWith=sE,A.isError=il,A.isFinite=aE,A.isFunction=jr,A.isInteger=Bp,A.isLength=Is,A.isMap=Up,A.isMatch=uE,A.isMatchWith=lE,A.isNaN=cE,A.isNative=fE,A.isNil=pE,A.isNull=dE,A.isNumber=Hp,A.isObject=Ge,A.isObjectLike=Xe,A.isPlainObject=Wi,A.isRegExp=ol,A.isSafeInteger=hE,A.isSet=qp,A.isString=Ls,A.isSymbol=jt,A.isTypedArray=ai,A.isUndefined=gE,A.isWeakMap=vE,A.isWeakSet=mE,A.join=wx,A.kebabCase=s_,A.last=er,A.lastIndexOf=xx,A.lowerCase=a_,A.lowerFirst=u_,A.lt=yE,A.lte=bE,A.max=rO,A.maxBy=nO,A.mean=iO,A.meanBy=oO,A.min=sO,A.minBy=aO,A.stubArray=pl,A.stubFalse=hl,A.stubObject=Z_,A.stubString=G_,A.stubTrue=K_,A.multiply=uO,A.nth=Sx,A.noConflict=N_,A.noop=dl,A.now=Cs,A.pad=l_,A.padEnd=c_,A.padStart=f_,A.parseInt=d_,A.random=t_,A.reduce=OS,A.reduceRight=AS,A.repeat=p_,A.replace=h_,A.result=qE,A.round=lO,A.runInContext=N,A.sample=RS,A.size=kS,A.snakeCase=g_,A.some=$S,A.sortedIndex=Px,A.sortedIndexBy=Cx,A.sortedIndexOf=kx,A.sortedLastIndex=$x,A.sortedLastIndexBy=Ix,A.sortedLastIndexOf=Lx,A.startCase=m_,A.startsWith=y_,A.subtract=cO,A.sum=fO,A.sumBy=dO,A.template=b_,A.times=V_,A.toFinite=zr,A.toInteger=xe,A.toLength=Gp,A.toLower=w_,A.toNumber=tr,A.toSafeInteger=wE,A.toString=ke,A.toUpper=x_,A.trim=S_,A.trimEnd=E_,A.trimStart=__,A.truncate=O_,A.unescape=A_,A.uniqueId=Y_,A.upperCase=T_,A.upperFirst=ul,A.each=Ip,A.eachRight=Lp,A.first=Pp,fl(A,(function(){var n={};return mr(A,function(o,u){Fe.call(A.prototype,u)||(n[u]=o)}),n})(),{chain:!1}),A.VERSION=i,Vt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(n){A[n].placeholder=A}),Vt(["drop","take"],function(n,o){Te.prototype[n]=function(u){u=u===r?1:st(xe(u),0);var y=this.__filtered__&&!o?new Te(this):this.clone();return y.__filtered__?y.__takeCount__=bt(u,y.__takeCount__):y.__views__.push({size:bt(u,Q),type:n+(y.__dir__<0?"Right":"")}),y},Te.prototype[n+"Right"]=function(u){return this.reverse()[n](u).reverse()}}),Vt(["filter","map","takeWhile"],function(n,o){var u=o+1,y=u==q||u==J;Te.prototype[n]=function(_){var T=this.clone();return T.__iteratees__.push({iteratee:pe(_,3),type:u}),T.__filtered__=T.__filtered__||y,T}}),Vt(["head","last"],function(n,o){var u="take"+(o?"Right":"");Te.prototype[n]=function(){return this[u](1).value()[0]}}),Vt(["initial","tail"],function(n,o){var u="drop"+(o?"":"Right");Te.prototype[n]=function(){return this.__filtered__?new Te(this):this[u](1)}}),Te.prototype.compact=function(){return this.filter($t)},Te.prototype.find=function(n){return this.filter(n).head()},Te.prototype.findLast=function(n){return this.reverse().find(n)},Te.prototype.invokeMap=_e(function(n,o){return typeof n=="function"?new Te(this):this.map(function(u){return Mi(u,n,o)})}),Te.prototype.reject=function(n){return this.filter($s(pe(n)))},Te.prototype.slice=function(n,o){n=xe(n);var u=this;return u.__filtered__&&(n>0||o<0)?new Te(u):(n<0?u=u.takeRight(-n):n&&(u=u.drop(n)),o!==r&&(o=xe(o),u=o<0?u.dropRight(-o):u.take(o-n)),u)},Te.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},Te.prototype.toArray=function(){return this.take(Q)},mr(Te.prototype,function(n,o){var u=/^(?:filter|find|map|reject)|While$/.test(o),y=/^(?:head|last)$/.test(o),_=A[y?"take"+(o=="last"?"Right":""):o],T=y||/^find/.test(o);_&&(A.prototype[o]=function(){var P=this.__wrapped__,I=y?[1]:arguments,z=P instanceof Te,V=I[0],Y=z||we(P),ee=function(Oe){var Re=_.apply(A,Jr([Oe],I));return y&&oe?Re[0]:Re};Y&&u&&typeof V=="function"&&V.length!=1&&(z=Y=!1);var oe=this.__chain__,le=!!this.__actions__.length,he=T&&!oe,Se=z&&!le;if(!T&&Y){P=Se?P:new Te(this);var ge=n.apply(P,I);return ge.__actions__.push({func:Rs,args:[ee],thisArg:r}),new Yt(ge,oe)}return he&&Se?n.apply(this,I):(ge=this.thru(ee),he?y?ge.value()[0]:ge.value():ge)})}),Vt(["pop","push","shift","sort","splice","unshift"],function(n){var o=es[n],u=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",y=/^(?:pop|shift)$/.test(n);A.prototype[n]=function(){var _=arguments;if(y&&!this.__chain__){var T=this.value();return o.apply(we(T)?T:[],_)}return this[u](function(P){return o.apply(we(P)?P:[],_)})}}),mr(Te.prototype,function(n,o){var u=A[o];if(u){var y=u.name+"";Fe.call(ri,y)||(ri[y]=[]),ri[y].push({name:o,func:u})}}),ri[xs(r,h).name]=[{name:"wrapper",func:r}],Te.prototype.clone=Aw,Te.prototype.reverse=Tw,Te.prototype.value=Rw,A.prototype.at=nS,A.prototype.chain=iS,A.prototype.commit=oS,A.prototype.next=sS,A.prototype.plant=uS,A.prototype.reverse=lS,A.prototype.toJSON=A.prototype.valueOf=A.prototype.value=cS,A.prototype.first=A.prototype.head,Ri&&(A.prototype[Ri]=aS),A}),Qn=ow();xn?((xn.exports=Qn)._=Qn,cu._=Qn):dt._=Qn}).call(Gk)})(go,go.exports)),go.exports}var rt=Kk();const Sc={FdSave:tt.FdSave,FdWarningDanger:tt.FdWarningDanger,FdInfoCircle:tt.FdInfoCircle,FdInfoBold:tt.FdInfoBold};var df=(e=>(e.ALERT="alert",e.CONFIRM="confirm",e))(df||{}),zn=(e=>(e.PRIMARY="primary",e.WARNING="warning",e.DANGER="danger",e))(zn||{}),pi=(e=>(e.CONFIRMED="confirmed",e.CANCELED="canceled",e))(pi||{});const Ay={[zn.PRIMARY]:{icon:"blue-500",button:"primary-dark"},[zn.DANGER]:{icon:"red-500",button:"primary-dark"},[zn.WARNING]:{icon:"yellow-400",button:"primary-dark"}},Gl=({color:e=zn.PRIMARY,variant:t="solid",children:r,autoFocus:i,...s})=>{const a=Ay[e].button,l=t==="outlined"?`bg-transparent text-white border border-white hover:border-white hover:bg-white hover:text-${a}`:`text-white bg-${a} border border-${a} hover:border-white hover:bg-primary-hover hover:text-white`;return D.jsx("button",{autoFocus:i,className:We("w-16 rounded px-2 py-1 text-xs font-medium hover:font-bold focus:outline-none",l),...s,children:r})},Vk=({name:e,color:t=zn.PRIMARY,className:r="w-8 h-8"})=>{const i=Sc[e]||Sc.FdInfoCircle,s=`text-${Ay[t].icon}`;return D.jsx(i,{className:We(r,s)})},Xk=({id:e,title:t,message:r,icon:i,type:s,color:a,zIndex:l=3e3,views:c,width:f=520,hasOverlay:m=!0,container:v,onClose:g,onEdit:p})=>{const b=w=>{g({id:e,reason:w})};W.useEffect(()=>{function w(h){h.key==="Escape"&&b(pi.CANCELED)}return window.addEventListener("keyup",w),()=>{window.removeEventListener("keyup",w)}},[]);const x=rt.merge(rt.values(c==null?void 0:c.toggles).flatMap(w=>w.value?w.warnings||[]:[]),c==null?void 0:c.tips),d=(w,h)=>{var E;if(!(c!=null&&c.toggles))return;const S=rt.cloneDeep(c);(E=S.toggles)!=null&&E[w]&&(S.toggles[w].value=h),p({id:e,views:S})};return Fo.createPortal(D.jsx(ba,{appear:!0,show:!0,as:W.Fragment,children:D.jsx("div",{className:We("absolute inset-0 flex h-full w-full items-center justify-center overflow-y-auto",{"bg-black bg-opacity-80":m}),style:{zIndex:l},onClick:()=>b(pi.CANCELED),children:D.jsx(ba.Child,{as:W.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:D.jsx("div",{"data-cy":"confirmation-modal-cy",className:"relative rounded-md border border-grey-50 bg-grey-900",style:{width:f},onClick:w=>w.stopPropagation(),children:D.jsxs("div",{className:"flex flex-col items-center gap-3 p-6 px-12",children:[i?D.jsx("div",{className:"flex items-center justify-center",children:D.jsx(Vk,{name:i,color:a,className:"w-6 h-6"})}):null,D.jsx(Yk,{condition:t,children:D.jsx("h4",{className:"w-full text-wrap text-lg font-bold leading-6 text-white text-center",children:t})}),D.jsx("p",{className:"w-full text-wrap text-center text-sm font-medium text-white",children:r}),D.jsx("div",{className:"text-xs text-white",children:rt.values(c==null?void 0:c.toggles).map(w=>D.jsx("div",{children:D.jsxs("label",{htmlFor:w.key,className:"flex items-center",children:[D.jsx(fy,{size:"xs",value:w.value,onChange:h=>d(w.key,h)}),D.jsx("span",{className:"ml-1",children:w.title})]})},w.key))}),D.jsx(Jk,{warnings:x}),D.jsx("div",{className:"flex items-center gap-4",children:s===df.CONFIRM?D.jsxs(D.Fragment,{children:[D.jsx(Gl,{autoFocus:!0,color:a,onClick:()=>b(pi.CONFIRMED),children:"Confirm"}),D.jsx(Gl,{color:a,variant:"outlined",onClick:()=>b(pi.CANCELED),children:"Cancel"})]}):D.jsx(Gl,{autoFocus:!0,onClick:()=>b(),children:"OK"})})]})})})})}),v||document.body)},Yk=e=>e.condition?D.jsx(D.Fragment,{children:e.children}):null,Jk=e=>e.warnings?D.jsx(ba,{appear:!0,show:!!e.warnings.length,as:W.Fragment,children:D.jsx("div",{className:"flex flex-col gap-1 rounded-sm bg-grey-600 p-2 text-xs text-white",children:e.warnings.map((t,r)=>D.jsx(ba.Child,{as:W.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:D.jsxs("div",{className:"flex flex-1 items-center gap-1 rounded-sm px-2 py-1",children:[D.jsx(tt.FdWarningDanger,{className:We({"h-3 w-3":!0,"text-yellow-500":t.type==="warning","text-red-400":t.type==="error","text-primary-dark":t.type==="info"},"mr-3")}),D.jsx("div",{className:"flex-1",children:t.message})]})},`modal-warnings-${r}`))})}):null;var Ty=(e=>(e[e.MIN=.5]="MIN",e[e.MAX=10]="MAX",e[e.STEP=.5]="STEP",e[e.INIT=1]="INIT",e[e.TRANSITION=200]="TRANSITION",e))(Ty||{});const Qk=({zoom:e,minZoom:t=.5,maxZoom:r=10,handleZoomIn:i,handleZoomOut:s})=>D.jsxs("div",{className:"flex items-center rounded bg-grey-300 p-1",children:[D.jsx(tt.FdMinusNaked,{onClick:s,className:We("h-5 w-5 p-1",{"text-grey-200":e<=t,"cursor-pointer rounded hover:bg-purple-800":e>t})}),D.jsxs("span",{className:"mx-1 w-10 select-none text-center text-xs",children:[(e*100).toFixed(0),"%"]}),D.jsx(tt.FdPlusNaked,{onClick:i,className:We("h-5 w-5 p-1",{"text-grey-200":e>=r,"cursor-pointer rounded hover:bg-purple-800":e<r})})]}),e$=$.forwardRef(((e,t)=>$.createElement(yn.span,Ve({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}})))),t$=e$;function fv(e){const t=$.useRef({value:e,previous:e});return $.useMemo((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}const[Ry]=Zc("Tooltip",[Fa]),pf=Fa(),r$=700,[oM,n$]=Ry("TooltipProvider",{isOpenDelayed:!0,delayDuration:r$,onOpen:()=>{},onClose:()=>{}}),[i$,Ba]=Ry("Tooltip"),o$=e=>{const{__scopeTooltip:t,children:r,open:i,defaultOpen:s=!1,onOpenChange:a,delayDuration:l}=e,c=n$("Tooltip",t),f=pf(t),[m,v]=$.useState(null),g=Rm(),p=$.useRef(0),b=l??c.delayDuration,x=$.useRef(!1),{onOpen:d,onClose:w}=c,[h=!1,S]=zm({prop:i,defaultProp:s,onChange:k=>{k&&(document.dispatchEvent(new CustomEvent("tooltip.open")),d()),a==null||a(k)}}),E=$.useMemo((()=>h?x.current?"delayed-open":"instant-open":"closed"),[h]),R=$.useCallback((()=>{window.clearTimeout(p.current),x.current=!1,S(!0)}),[S]),O=$.useCallback((()=>{window.clearTimeout(p.current),p.current=window.setTimeout((()=>{x.current=!0,S(!0)}),b)}),[b,S]);return $.useEffect((()=>()=>window.clearTimeout(p.current)),[]),$.createElement(Dm,f,$.createElement(i$,{scope:t,contentId:g,open:h,stateAttribute:E,trigger:m,onTriggerChange:v,onTriggerEnter:$.useCallback((()=>{c.isOpenDelayed?O():R()}),[c.isOpenDelayed,O,R]),onOpen:$.useCallback(R,[R]),onClose:$.useCallback((()=>{window.clearTimeout(p.current),S(!1),w()}),[S,w])},r))},s$=$.forwardRef(((e,t)=>{const{__scopeTooltip:r,...i}=e,s=Ba("TooltipTrigger",r),a=pf(r),l=mn(t,s.onTriggerChange),c=$.useRef(!1),f=$.useCallback((()=>c.current=!1),[]);return $.useEffect((()=>()=>document.removeEventListener("mouseup",f)),[f]),$.createElement(Nm,Ve({asChild:!0},a),$.createElement(yn.button,Ve({"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute},i,{ref:l,onMouseEnter:Ut(e.onMouseEnter,s.onTriggerEnter),onMouseLeave:Ut(e.onMouseLeave,s.onClose),onMouseDown:Ut(e.onMouseDown,(()=>{s.onClose(),c.current=!0,document.addEventListener("mouseup",f,{once:!0})})),onFocus:Ut(e.onFocus,(()=>{c.current||s.onOpen()})),onBlur:Ut(e.onBlur,s.onClose),onClick:Ut(e.onClick,(m=>{m.detail===0&&s.onClose()}))})))})),a$=$.forwardRef(((e,t)=>{const{forceMount:r,...i}=e,s=Ba("TooltipContent",e.__scopeTooltip);return $.createElement(Hc,{present:r||s.open},$.createElement(u$,Ve({ref:t},i)))})),u$=$.forwardRef(((e,t)=>{const{__scopeTooltip:r,children:i,"aria-label":s,portalled:a=!0,...l}=e,c=Ba("TooltipContent",r),f=pf(r),m=a?qc:$.Fragment,{onClose:v}=c;return $m((()=>v())),$.useEffect((()=>(document.addEventListener("tooltip.open",v),()=>document.removeEventListener("tooltip.open",v))),[v]),$.createElement(m,null,$.createElement(l$,{__scopeTooltip:r}),$.createElement(jm,Ve({"data-state":c.stateAttribute},f,l,{ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)"}}),$.createElement(km,null,i),$.createElement(t$,{id:c.contentId,role:"tooltip"},s||i)))}));function l$(e){const{__scopeTooltip:t}=e,r=Ba("CheckTriggerMoved",t),i=Lm(r.trigger),s=i==null?void 0:i.left,a=fv(s),l=i==null?void 0:i.top,c=fv(l),f=r.onClose;return $.useEffect((()=>{(a!==void 0&&a!==s||c!==void 0&&c!==l)&&f()}),[f,a,c,s,l]),null}const c$=o$,f$=s$,d$=a$;function p$(e){return D.jsxs(c$,{delayDuration:e.delayDuration,open:e.open,children:[D.jsx(f$,{tabIndex:-1,asChild:!0,children:D.jsx("span",{children:e.children})}),D.jsxs(d$,{side:e.side,sideOffset:e.sideOffset,alignOffset:e.alignOffset,children:[typeof e.message=="string"&&D.jsx("p",{className:"max-w-[240px] rounded-md bg-primary-light px-1 py-2 text-s font-semibold text-primary-dark",children:e.message}),typeof e.message!="string"&&e.message]})]})}const In=30,fa=500,h$=()=>D.jsx("div",{className:"h-2 w-full bg-opacity-40 hover:bg-primary-hover"}),g$=e=>{const[t,r]=W.useState(In),i=W.useRef(),s=t>In,a=W.useRef(null);return W.useEffect(()=>{e.isOpen&&!s&&r(fa),!e.isOpen&&s&&r(In)},[e.isOpen]),D.jsxs("div",{className:"relative w-full select-none isolate",style:{zIndex:49},children:[D.jsx(gO.Resizable,{enable:{top:!0,right:!1,bottom:!1,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},className:"w-full select-none border-t border-grey-900 bg-grey-800",size:{height:t,width:"100%"},maxHeight:700,minHeight:In,onResizeStart:()=>{i.current&&Date.now()-i.current<200?r(s?In:fa):i.current=Date.now()},onResize:(l,c,f)=>{a.current&&cancelAnimationFrame(a.current),a.current=requestAnimationFrame(()=>{var m;(m=e.onResize)==null||m.call(e),a.current=null})},onResizeStop:(l,c,f,m)=>{r(t+m.height)},handleComponent:{top:D.jsx(h$,{})}}),D.jsxs("div",{"data-cy":"contextualPanel",className:"absolute inset-0 flex flex-col overflow-hidden",id:`__cp-${rt.kebabCase(e.path)}`,children:[D.jsxs("div",{className:We("flex justify-between items-center px-3 py-0.5",{"flex-1":!s}),children:[D.jsxs("div",{className:"group flex items-center justify-start",children:[D.jsx("span",{className:"mr-2 text-sm text-fd-gray-lighter",children:"Contextual panel"}),D.jsx("span",{}),e.tipKey?D.jsx(Qm,{tipKey:e.tipKey,alwaysOn:!0,asButton:!0}):null,D.jsx("button",{className:"rounded p-1 text-white hover:bg-primary-hover focus:outline-none",onClick:()=>{s?(r(In),e.onClose()):(r(fa),e.onOpen())},children:s?D.jsx(tt.FdDoubleArrowDown,{className:"h-4 w-4 text-white"}):D.jsx(tt.FdDoubleArrowUp,{className:"h-4 w-4 text-white"})})]}),e.headerRightSide]}),D.jsxs(aa,{of:s,children:[D.jsx(aa,{of:e.render,children:e.render}),D.jsx(aa,{of:!e.render,children:e.children})]})]})]})};function Py({children:e,viewBox:t="0 0 24 24",...r}){return D.jsx("svg",{viewBox:t,width:"1em",height:"1em",fill:"none",className:"base-icon",...r,children:e})}function Cy(e){const t=e.isIndeterminate?"M2 12h20":"M4 11.5L9 17L20 6";return D.jsx(Py,{viewBox:"0 0 24 24",...e,children:D.jsx("path",{fill:"none",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round",d:t})})}function v$({isChecked:e,isIndeterminate:t,isInvalid:r,icon:i,label:s,className:a="",style:l,...c}){const f=W.useRef(null),m=i||D.jsx(Cy,{}),v=c.checked??e;W.useEffect(()=>{f.current&&(f.current.indeterminate=!!t)},[t]);const g=v||t,p=["base-checkbox-container",a].join(" ");return D.jsxs("label",{className:p,style:l,"data-invalid":r,children:[D.jsx("input",{ref:f,type:"checkbox",className:"base-checkbox-input",checked:v,...c,"aria-invalid":r||void 0}),D.jsx("span",{className:"base-checkbox-control",children:g&&m&&W.cloneElement(m,{isChecked:v,isIndeterminate:t,className:"base-checkbox-icon"})}),s&&D.jsx("span",{className:"base-checkbox-label",children:s})]})}function m$(e,t){const r=W.useRef(!1);W.useEffect(()=>{if(r.current)return e();r.current=!0},t)}const Kl=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function Vl(e,t,r,i){e.addEventListener?e.addEventListener(t,r,i):e.attachEvent&&e.attachEvent("on".concat(t),r)}function fo(e,t,r,i){e.removeEventListener?e.removeEventListener(t,r,i):e.detachEvent&&e.detachEvent("on".concat(t),r)}function ky(e,t){const r=t.slice(0,t.length-1);for(let i=0;i<r.length;i++)r[i]=e[r[i].toLowerCase()];return r}function $y(e){typeof e!="string"&&(e=""),e=e.replace(/\s/g,"");const t=e.split(",");let r=t.lastIndexOf("");for(;r>=0;)t[r-1]+=",",t.splice(r,1),r=t.lastIndexOf("");return t}function y$(e,t){const r=e.length>=t.length?e:t,i=e.length>=t.length?t:e;let s=!0;for(let a=0;a<r.length;a++)i.indexOf(r[a])===-1&&(s=!1);return s}const Ro={backspace:8,"⌫":8,tab:9,clear:12,enter:13,"↩":13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,arrowup:38,arrowdown:40,arrowleft:37,arrowright:39,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":Kl?173:189,"=":Kl?61:187,";":Kl?59:186,"'":222,"{":219,"}":221,"[":219,"]":221,"\\":220},gr={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,meta:91,command:91},vo={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},gt={16:!1,18:!1,17:!1,91:!1},Ke={};for(let e=1;e<20;e++)Ro["f".concat(e)]=111+e;let qe=[],_o=null,Iy="all";const Ur=new Map,_i=e=>Ro[e.toLowerCase()]||gr[e.toLowerCase()]||e.toUpperCase().charCodeAt(0),b$=e=>Object.keys(Ro).find(t=>Ro[t]===e),w$=e=>Object.keys(gr).find(t=>gr[t]===e);function Ly(e){Iy=e||"all"}function Po(){return Iy||"all"}function x$(){return qe.slice(0)}function S$(){return qe.map(e=>b$(e)||w$(e)||String.fromCharCode(e))}function E$(){const e=[];return Object.keys(Ke).forEach(t=>{Ke[t].forEach(r=>{let{key:i,scope:s,mods:a,shortcut:l}=r;e.push({scope:s,shortcut:l,mods:a,keys:i.split("+").map(c=>_i(c))})})}),e}function _$(e){const t=e.target||e.srcElement,{tagName:r}=t;let i=!0;const s=r==="INPUT"&&!["checkbox","radio","range","button","file","reset","submit","color"].includes(t.type);return(t.isContentEditable||(s||r==="TEXTAREA"||r==="SELECT")&&!t.readOnly)&&(i=!1),i}function O$(e){return typeof e=="string"&&(e=_i(e)),qe.indexOf(e)!==-1}function A$(e,t){let r,i;e||(e=Po());for(const s in Ke)if(Object.prototype.hasOwnProperty.call(Ke,s))for(r=Ke[s],i=0;i<r.length;)r[i].scope===e?r.splice(i,1).forEach(l=>{let{element:c}=l;return hf(c)}):i++;Po()===e&&Ly(t||"all")}function T$(e){let t=e.keyCode||e.which||e.charCode;e.key&&e.key.toLowerCase()==="capslock"&&(t=_i(e.key));const r=qe.indexOf(t);if(r>=0&&qe.splice(r,1),e.key&&e.key.toLowerCase()==="meta"&&qe.splice(0,qe.length),(t===93||t===224)&&(t=91),t in gt){gt[t]=!1;for(const i in gr)gr[i]===t&&(hr[i]=!1)}}function My(e){if(typeof e>"u")Object.keys(Ke).forEach(s=>{Array.isArray(Ke[s])&&Ke[s].forEach(a=>Qs(a)),delete Ke[s]}),hf(null);else if(Array.isArray(e))e.forEach(s=>{s.key&&Qs(s)});else if(typeof e=="object")e.key&&Qs(e);else if(typeof e=="string"){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];let[s,a]=r;typeof s=="function"&&(a=s,s=""),Qs({key:e,scope:s,method:a,splitKey:"+"})}}const Qs=e=>{let{key:t,scope:r,method:i,splitKey:s="+"}=e;$y(t).forEach(l=>{const c=l.split(s),f=c.length,m=c[f-1],v=m==="*"?"*":_i(m);if(!Ke[v])return;r||(r=Po());const g=f>1?ky(gr,c):[],p=[];Ke[v]=Ke[v].filter(b=>{const d=(i?b.method===i:!0)&&b.scope===r&&y$(b.mods,g);return d&&p.push(b.element),!d}),p.forEach(b=>hf(b))})};function dv(e,t,r,i){if(t.element!==i)return;let s;if(t.scope===r||t.scope==="all"){s=t.mods.length>0;for(const a in gt)Object.prototype.hasOwnProperty.call(gt,a)&&(!gt[a]&&t.mods.indexOf(+a)>-1||gt[a]&&t.mods.indexOf(+a)===-1)&&(s=!1);(t.mods.length===0&&!gt[16]&&!gt[18]&&!gt[17]&&!gt[91]||s||t.shortcut==="*")&&(t.keys=[],t.keys=t.keys.concat(qe),t.method(e,t)===!1&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0)))}}function pv(e,t){const r=Ke["*"];let i=e.keyCode||e.which||e.charCode;if(e.key&&e.key.toLowerCase()==="capslock"||!hr.filter.call(this,e))return;if((i===93||i===224)&&(i=91),qe.indexOf(i)===-1&&i!==229&&qe.push(i),["metaKey","ctrlKey","altKey","shiftKey"].forEach(c=>{const f=vo[c];e[c]&&qe.indexOf(f)===-1?qe.push(f):!e[c]&&qe.indexOf(f)>-1?qe.splice(qe.indexOf(f),1):c==="metaKey"&&e[c]&&(qe=qe.filter(m=>m in vo||m===i))}),i in gt){gt[i]=!0;for(const c in gr)if(Object.prototype.hasOwnProperty.call(gr,c)){const f=vo[gr[c]];hr[c]=e[f]}if(!r)return}for(const c in gt)Object.prototype.hasOwnProperty.call(gt,c)&&(gt[c]=e[vo[c]]);e.getModifierState&&!(e.altKey&&!e.ctrlKey)&&e.getModifierState("AltGraph")&&(qe.indexOf(17)===-1&&qe.push(17),qe.indexOf(18)===-1&&qe.push(18),gt[17]=!0,gt[18]=!0);const s=Po();if(r)for(let c=0;c<r.length;c++)r[c].scope===s&&(e.type==="keydown"&&r[c].keydown||e.type==="keyup"&&r[c].keyup)&&dv(e,r[c],s,t);if(!(i in Ke))return;const a=Ke[i],l=a.length;for(let c=0;c<l;c++)if((e.type==="keydown"&&a[c].keydown||e.type==="keyup"&&a[c].keyup)&&a[c].key){const f=a[c],{splitKey:m}=f,v=f.key.split(m),g=[];for(let p=0;p<v.length;p++)g.push(_i(v[p]));g.sort().join("")===qe.sort().join("")&&dv(e,f,s,t)}}function hr(e,t,r){qe=[];const i=$y(e);let s=[],a="all",l=document,c=0,f=!1,m=!0,v="+",g=!1,p=!1;for(r===void 0&&typeof t=="function"&&(r=t),Object.prototype.toString.call(t)==="[object Object]"&&(t.scope&&(a=t.scope),t.element&&(l=t.element),t.keyup&&(f=t.keyup),t.keydown!==void 0&&(m=t.keydown),t.capture!==void 0&&(g=t.capture),typeof t.splitKey=="string"&&(v=t.splitKey),t.single===!0&&(p=!0)),typeof t=="string"&&(a=t),p&&My(e,a);c<i.length;c++)e=i[c].split(v),s=[],e.length>1&&(s=ky(gr,e)),e=e[e.length-1],e=e==="*"?"*":_i(e),e in Ke||(Ke[e]=[]),Ke[e].push({keyup:f,keydown:m,scope:a,mods:s,shortcut:i[c],method:r,key:i[c],splitKey:v,element:l});if(typeof l<"u"&&window){if(!Ur.has(l)){const b=function(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event;return pv(d,l)},x=function(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event;pv(d,l),T$(d)};Ur.set(l,{keydownListener:b,keyupListenr:x,capture:g}),Vl(l,"keydown",b,g),Vl(l,"keyup",x,g)}if(!_o){const b=()=>{qe=[]};_o={listener:b,capture:g},Vl(window,"focus",b,g)}}}function R$(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"all";Object.keys(Ke).forEach(r=>{Ke[r].filter(s=>s.scope===t&&s.shortcut===e).forEach(s=>{s&&s.method&&s.method()})})}function hf(e){const t=Object.values(Ke).flat();if(t.findIndex(i=>{let{element:s}=i;return s===e})<0){const{keydownListener:i,keyupListenr:s,capture:a}=Ur.get(e)||{};i&&s&&(fo(e,"keyup",s,a),fo(e,"keydown",i,a),Ur.delete(e))}if((t.length<=0||Ur.size<=0)&&(Object.keys(Ur).forEach(s=>{const{keydownListener:a,keyupListenr:l,capture:c}=Ur.get(s)||{};a&&l&&(fo(s,"keyup",l,c),fo(s,"keydown",a,c),Ur.delete(s))}),Ur.clear(),Object.keys(Ke).forEach(s=>delete Ke[s]),_o)){const{listener:s,capture:a}=_o;fo(window,"focus",s,a),_o=null}}const Xl={getPressedKeyString:S$,setScope:Ly,getScope:Po,deleteScope:A$,getPressedKeyCodes:x$,getAllKeyCodes:E$,isPressed:O$,filter:_$,trigger:R$,unbind:My,keyMap:Ro,modifier:gr,modifierMap:vo};for(const e in Xl)Object.prototype.hasOwnProperty.call(Xl,e)&&(hr[e]=Xl[e]);if(typeof window<"u"){const e=window.hotkeys;hr.noConflict=t=>(t&&window.hotkeys===hr&&(window.hotkeys=e),hr),window.hotkeys=hr}hr.filter=()=>!0;function P$(e,t,r,i){r instanceof Array&&(i=r,r=void 0),i=i||[],r=r||{};const{preventDefault:s=!0}=r,a=W.useCallback((c,f)=>{s&&c.preventDefault(),setTimeout(()=>t(c,f))},i),l=()=>{hr.unbind(e,a)};W.useEffect(()=>(hr(e,r,a),l),[e,r,a])}const C$=e=>{const t=W.useRef(null);return W.useEffect(()=>{const r=i=>{t.current&&!t.current.contains(i.target)&&e(i)};return document.addEventListener("click",r,!0),()=>{document.removeEventListener("click",r,!0)}},[e]),t};function k$(e){const t=W.useRef();return W.useEffect(()=>{t.current=e},[e]),t.current}function $$(e){const t=W.useRef(e);return W.useEffect(()=>{t.current=e},[e]),t}function I$(e){const t=W.useRef(null);return W.useEffect(()=>{e&&(typeof e=="function"?e(t.current):e.current=t.current)}),t}function L$(e){const[t,r]=W.useState(e),i=(a,l)=>{r(c=>({...c,features:{...c.features,[a]:{enabled:l}}}))},s=W.useCallback((...a)=>a.every(l=>{var c;return(c=t.features[l])==null?void 0:c.enabled}),[t.features]);return{setFeature:i,isFeatureEnabled:s}}const Fy=W.createContext(""),M$=e=>D.jsx(Fy.Provider,{value:e.value,children:e.children}),F$=()=>{const e=W.useContext(Fy);if(typeof e!="string")throw new Error("Error while calling useIdentity! Context has incorrect type (expected string)");return e};function D$(e){const[t,r]=W.useState(e),i=W.useMemo(()=>N$(t,r),[]);return{state:t,actions:{...i,set:s=>{r(typeof s=="function"?s:a=>({...a,...s}))}}}}function N$(e,t=()=>{}){return Object.keys(e).reduce((i,s)=>({...i,[`set${rt.upperFirst(s)}`]:a=>t(l=>({...l,[s]:a}))}),{})}const j$=(e,t,r={})=>{r={timeout:200,...r};const i=W.useRef(),s=()=>{i.current&&(clearTimeout(i.current),i.current=null)};return W.useCallback((a,...l)=>{s(),t&&a.detail===1&&(i.current=setTimeout(()=>{t(a,...l)},r.timeout)),a.detail%2===0&&e(a,...l)},[t,e,r.timeout])};function vt(e){for(var t=arguments.length,r=Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];if(process.env.NODE_ENV!=="production"){var s=Z$[e],a=s?typeof s=="function"?s.apply(null,r):s:"unknown error nr: "+e;throw Error("[Immer] "+a)}throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map((function(l){return"'"+l+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Si(e){return!!e&&!!e[qt]}function Hn(e){var t;return!!e&&((function(r){if(!r||typeof r!="object")return!1;var i=Object.getPrototypeOf(r);if(i===null)return!0;var s=Object.hasOwnProperty.call(i,"constructor")&&i.constructor;return s===Object||typeof s=="function"&&Function.toString.call(s)===G$})(e)||Array.isArray(e)||!!e[xv]||!!(!((t=e.constructor)===null||t===void 0)&&t[xv])||gf(e)||vf(e))}function Co(e,t,r){r===void 0&&(r=!1),Oi(e)===0?(r?Object.keys:wf)(e).forEach((function(i){r&&typeof i=="symbol"||t(i,e[i],e)})):e.forEach((function(i,s){return t(s,i,e)}))}function Oi(e){var t=e[qt];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:gf(e)?2:vf(e)?3:0}function Ec(e,t){return Oi(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function z$(e,t){return Oi(e)===2?e.get(t):e[t]}function Dy(e,t,r){var i=Oi(e);i===2?e.set(t,r):i===3?e.add(r):e[t]=r}function W$(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function gf(e){return H$&&e instanceof Map}function vf(e){return q$&&e instanceof Set}function Ln(e){return e.o||e.t}function mf(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=K$(e);delete t[qt];for(var r=wf(t),i=0;i<r.length;i++){var s=r[i],a=t[s];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(t[s]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[s]})}return Object.create(Object.getPrototypeOf(e),t)}function ko(e,t){return t===void 0&&(t=!1),yf(e)||Si(e)||!Hn(e)||(Oi(e)>1&&(e.set=e.add=e.clear=e.delete=B$),Object.freeze(e),t&&Co(e,(function(r,i){return ko(i,!0)}),!0)),e}function B$(){vt(2)}function yf(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Rr(e){var t=V$[e];return t||vt(18,e),t}function hv(){return process.env.NODE_ENV==="production"||Ei||vt(0),Ei}function Yl(e,t){t&&(Rr("Patches"),e.u=[],e.s=[],e.v=t)}function Ea(e){_c(e),e.p.forEach(U$),e.p=null}function _c(e){e===Ei&&(Ei=e.l)}function gv(e){return Ei={p:[],l:Ei,h:e,m:!0,_:0}}function U$(e){var t=e[qt];t.i===0||t.i===1?t.j():t.g=!0}function Jl(e,t){t._=t.p.length;var r=t.p[0],i=e!==void 0&&e!==r;return t.h.O||Rr("ES5").S(t,e,i),i?(r[qt].P&&(Ea(t),vt(4)),Hn(e)&&(e=_a(t,e),t.l||Oa(t,e)),t.u&&Rr("Patches").M(r[qt].t,e,t.u,t.s)):e=_a(t,r,[]),Ea(t),t.u&&t.v(t.u,t.s),e!==jy?e:void 0}function _a(e,t,r){if(yf(t))return t;var i=t[qt];if(!i)return Co(t,(function(c,f){return vv(e,i,t,c,f,r)}),!0),t;if(i.A!==e)return t;if(!i.P)return Oa(e,i.t,!0),i.t;if(!i.I){i.I=!0,i.A._--;var s=i.i===4||i.i===5?i.o=mf(i.k):i.o,a=s,l=!1;i.i===3&&(a=new Set(s),s.clear(),l=!0),Co(a,(function(c,f){return vv(e,i,s,c,f,r,l)})),Oa(e,s,!1),r&&e.u&&Rr("Patches").N(i,r,e.u,e.s)}return i.o}function vv(e,t,r,i,s,a,l){if(process.env.NODE_ENV!=="production"&&s===r&&vt(5),Si(s)){var c=_a(e,s,a&&t&&t.i!==3&&!Ec(t.R,i)?a.concat(i):void 0);if(Dy(r,i,c),!Si(c))return;e.m=!1}else l&&r.add(s);if(Hn(s)&&!yf(s)){if(!e.h.D&&e._<1)return;_a(e,s),t&&t.A.l||Oa(e,s)}}function Oa(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&ko(t,r)}function Ql(e,t){var r=e[qt];return(r?Ln(r):e)[t]}function mv(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var i=Object.getOwnPropertyDescriptor(r,t);if(i)return i;r=Object.getPrototypeOf(r)}}function Oc(e){e.P||(e.P=!0,e.l&&Oc(e.l))}function ec(e){e.o||(e.o=mf(e.t))}function Ac(e,t,r){var i=gf(t)?Rr("MapSet").F(t,r):vf(t)?Rr("MapSet").T(t,r):e.O?(function(s,a){var l=Array.isArray(s),c={i:l?1:0,A:a?a.A:hv(),P:!1,I:!1,R:{},l:a,t:s,k:null,o:null,j:null,C:!1},f=c,m=Tc;l&&(f=[c],m=mo);var v=Proxy.revocable(f,m),g=v.revoke,p=v.proxy;return c.k=p,c.j=g,p})(t,r):Rr("ES5").J(t,r);return(r?r.A:hv()).p.push(i),i}function Ny(e){return Si(e)||vt(22,e),(function t(r){if(!Hn(r))return r;var i,s=r[qt],a=Oi(r);if(s){if(!s.P&&(s.i<4||!Rr("ES5").K(s)))return s.t;s.I=!0,i=yv(r,a),s.I=!1}else i=yv(r,a);return Co(i,(function(l,c){s&&z$(s.t,l)===c||Dy(i,l,t(c))})),a===3?new Set(i):i})(e)}function yv(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return mf(e)}var bv,Ei,bf=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",H$=typeof Map<"u",q$=typeof Set<"u",wv=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",jy=bf?Symbol.for("immer-nothing"):((bv={})["immer-nothing"]=!0,bv),xv=bf?Symbol.for("immer-draftable"):"__$immer_draftable",qt=bf?Symbol.for("immer-state"):"__$immer_state",Z$={0:"Illegal state",1:"Immer drafts cannot have computed properties",2:"This object has been frozen and should not be mutated",3:function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},4:"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.",5:"Immer forbids circular references",6:"The first or second argument to `produce` must be a function",7:"The third argument to `produce` must be a function or undefined",8:"First argument to `createDraft` must be a plain object, an array, or an immerable object",9:"First argument to `finishDraft` must be a draft returned by `createDraft`",10:"The given draft is already finalized",11:"Object.defineProperty() cannot be used on an Immer draft",12:"Object.setPrototypeOf() cannot be used on an Immer draft",13:"Immer only supports deleting array indices",14:"Immer only supports setting array indices and the 'length' property",15:function(e){return"Cannot apply patch, path doesn't resolve: "+e},16:'Sets cannot have "replace" patches.',17:function(e){return"Unsupported patch operation: "+e},18:function(e){return"The plugin for '"+e+"' has not been loaded into Immer. To enable the plugin, import and call `enable"+e+"()` when initializing your application."},20:"Cannot use proxies if Proxy, Proxy.revocable or Reflect are not available",21:function(e){return"produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '"+e+"'"},22:function(e){return"'current' expects a draft, got: "+e},23:function(e){return"'original' expects a draft, got: "+e},24:"Patching reserved attributes like __proto__, prototype and constructor is not allowed"},G$=""+Object.prototype.constructor,wf=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,K$=Object.getOwnPropertyDescriptors||function(e){var t={};return wf(e).forEach((function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)})),t},V$={},Tc={get:function(e,t){if(t===qt)return e;var r=Ln(e);if(!Ec(r,t))return(function(s,a,l){var c,f=mv(a,l);return f?"value"in f?f.value:(c=f.get)===null||c===void 0?void 0:c.call(s.k):void 0})(e,r,t);var i=r[t];return e.I||!Hn(i)?i:i===Ql(e.t,t)?(ec(e),e.o[t]=Ac(e.A.h,i,e)):i},has:function(e,t){return t in Ln(e)},ownKeys:function(e){return Reflect.ownKeys(Ln(e))},set:function(e,t,r){var i=mv(Ln(e),t);if(i!=null&&i.set)return i.set.call(e.k,r),!0;if(!e.P){var s=Ql(Ln(e),t),a=s==null?void 0:s[qt];if(a&&a.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(W$(r,s)&&(r!==void 0||Ec(e.t,t)))return!0;ec(e),Oc(e)}return e.o[t]===r&&(r!==void 0||t in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[t])||(e.o[t]=r,e.R[t]=!0),!0},deleteProperty:function(e,t){return Ql(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,ec(e),Oc(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=Ln(e),i=Reflect.getOwnPropertyDescriptor(r,t);return i&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:i.enumerable,value:r[t]}},defineProperty:function(){vt(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){vt(12)}},mo={};Co(Tc,(function(e,t){mo[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),mo.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&vt(13),mo.set.call(this,e,t,void 0)},mo.set=function(e,t,r){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&vt(14),Tc.set.call(this,e[0],t,r,e[0])};var X$=(function(){function e(r){var i=this;this.O=wv,this.D=!0,this.produce=function(s,a,l){if(typeof s=="function"&&typeof a!="function"){var c=a;a=s;var f=i;return function(d){var w=this;d===void 0&&(d=c);for(var h=arguments.length,S=Array(h>1?h-1:0),E=1;E<h;E++)S[E-1]=arguments[E];return f.produce(d,(function(R){var O;return(O=a).call.apply(O,[w,R].concat(S))}))}}var m;if(typeof a!="function"&&vt(6),l!==void 0&&typeof l!="function"&&vt(7),Hn(s)){var v=gv(i),g=Ac(i,s,void 0),p=!0;try{m=a(g),p=!1}finally{p?Ea(v):_c(v)}return typeof Promise<"u"&&m instanceof Promise?m.then((function(d){return Yl(v,l),Jl(d,v)}),(function(d){throw Ea(v),d})):(Yl(v,l),Jl(m,v))}if(!s||typeof s!="object"){if((m=a(s))===void 0&&(m=s),m===jy&&(m=void 0),i.D&&ko(m,!0),l){var b=[],x=[];Rr("Patches").M(s,m,b,x),l(b,x)}return m}vt(21,s)},this.produceWithPatches=function(s,a){if(typeof s=="function")return function(m){for(var v=arguments.length,g=Array(v>1?v-1:0),p=1;p<v;p++)g[p-1]=arguments[p];return i.produceWithPatches(m,(function(b){return s.apply(void 0,[b].concat(g))}))};var l,c,f=i.produce(s,a,(function(m,v){l=m,c=v}));return typeof Promise<"u"&&f instanceof Promise?f.then((function(m){return[m,l,c]})):[f,l,c]},typeof(r==null?void 0:r.useProxies)=="boolean"&&this.setUseProxies(r.useProxies),typeof(r==null?void 0:r.autoFreeze)=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var t=e.prototype;return t.createDraft=function(r){Hn(r)||vt(8),Si(r)&&(r=Ny(r));var i=gv(this),s=Ac(this,r,void 0);return s[qt].C=!0,_c(i),s},t.finishDraft=function(r,i){var s=r&&r[qt];process.env.NODE_ENV!=="production"&&(s&&s.C||vt(9),s.I&&vt(10));var a=s.A;return Yl(a,i),Jl(void 0,a)},t.setAutoFreeze=function(r){this.D=r},t.setUseProxies=function(r){r&&!wv&&vt(20),this.O=r},t.applyPatches=function(r,i){var s;for(s=i.length-1;s>=0;s--){var a=i[s];if(a.path.length===0&&a.op==="replace"){r=a.value;break}}s>-1&&(i=i.slice(s+1));var l=Rr("Patches").$;return Si(r)?l(r,i):this.produce(r,(function(c){return l(c,i)}))},e})(),Zt=new X$,Y$=Zt.produce;Zt.produceWithPatches.bind(Zt);Zt.setAutoFreeze.bind(Zt);Zt.setUseProxies.bind(Zt);Zt.applyPatches.bind(Zt);Zt.createDraft.bind(Zt);Zt.finishDraft.bind(Zt);function J$(e){var t=W.useState(function(){return ko(typeof e=="function"?e():e,!0)}),r=t[1];return[t[0],W.useCallback(function(i){r(typeof i=="function"?Y$(i):ko(i))},[])]}const Q$=process.env.NODE_ENV==="development",tc=Q$&&typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:null,eI=(e,t,r)=>{const[i,s]=J$(e),a=W.useRef(null);W.useEffect(()=>{var f;return r&&(a.current=tc==null?void 0:tc.connect({name:r,trace:!0}),(f=a.current)==null||f.init(e)),()=>{var m,v;(v=(m=a.current)==null?void 0:m.disconnect)==null||v.call(m)}},[]);const l=t&&typeof t=="object"?t:{},c=W.useMemo(()=>Object.keys(l).reduce((f,m)=>({...f,[m]:v=>(s(g=>{var p;l[m](g,v),(p=a.current)==null||p.send({type:l[m].name},Ny(g))}),c)}),{}),[s]);return{state:i,dispatch:c}};function Zr(e){return typeof e=="function"}function zy(e){var t=function(i){Error.call(i),i.stack=new Error().stack},r=e(t);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var rc=zy(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription:
201
+ }`;var Se=hh(function(){return Pe(A,le+"return "+ee).apply(r,P)});if(Se.source=ee,pl(Se))throw Se;return Se}function N_(n){return ke(n).toLowerCase()}function j_(n){return ke(n).toUpperCase()}function z_(n,o,l){if(n=ke(n),n&&(l||o===r))return Ed(n);if(!n||!(o=zt(o)))return n;var w=cr(n),_=cr(o),A=_d(w,_),P=Od(w,_)+1;return ln(w,A,P).join("")}function B_(n,o,l){if(n=ke(n),n&&(l||o===r))return n.slice(0,Ad(n)+1);if(!n||!(o=zt(o)))return n;var w=cr(n),_=Od(w,cr(o))+1;return ln(w,0,_).join("")}function W_(n,o,l){if(n=ke(n),n&&(l||o===r))return n.replace(pu,"");if(!n||!(o=zt(o)))return n;var w=cr(n),_=_d(w,cr(o));return ln(w,_).join("")}function H_(n,o){var l=G,w=j;if(Ye(o)){var _="separator"in o?o.separator:_;l="length"in o?xe(o.length):l,w="omission"in o?zt(o.omission):w}n=ke(n);var A=n.length;if(ri(n)){var P=cr(n);A=P.length}if(l>=A)return n;var I=l-ni(w);if(I<1)return w;var z=P?ln(P,0,I).join(""):n.slice(0,I);if(_===r)return z+w;if(P&&(I+=z.length-I),hl(_)){if(n.slice(I).search(_)){var V,X=z;for(_.global||(_=Cu(_.source,ke(qf.exec(_))+"g")),_.lastIndex=0;V=_.exec(X);)var ee=V.index;z=z.slice(0,ee===r?I:ee)}}else if(n.indexOf(zt(_),I)!=I){var oe=z.lastIndexOf(_);oe>-1&&(z=z.slice(0,oe))}return z+w}function U_(n){return n=ke(n),n&&tw.test(n)?n.replace(Wf,wb):n}var q_=ci(function(n,o,l){return n+(l?" ":"")+o.toUpperCase()}),vl=gp("toUpperCase");function ph(n,o,l){return n=ke(n),o=l?r:o,o===r?hb(n)?Sb(n):ob(n):n.match(o)||[]}var hh=_e(function(n,o){try{return Nt(n,r,o)}catch(l){return pl(l)?l:new we(l)}}),Z_=zr(function(n,o){return Xt(o,function(l){l=Sr(l),Nr(n,l,fl(n[l],n))}),n});function G_(n){var o=n==null?0:n.length,l=pe();return n=o?Ze(n,function(w){if(typeof w[1]!="function")throw new Jt(u);return[l(w[0]),w[1]]}):[],_e(function(w){for(var _=-1;++_<o;){var A=n[_];if(Nt(A[0],this,w))return Nt(A[1],this,w)}})}function K_(n){return w1(er(n,v))}function yl(n){return function(){return n}}function V_(n,o){return n==null||n!==n?o:n}var Y_=vp(),X_=vp(!0);function Lt(n){return n}function wl(n){return Gd(typeof n=="function"?n:er(n,v))}function J_(n){return Vd(er(n,v))}function Q_(n,o){return Yd(n,er(o,v))}var eO=_e(function(n,o){return function(l){return Bi(l,n,o)}}),tO=_e(function(n,o){return function(l){return Bi(n,l,o)}});function bl(n,o,l){var w=dt(o),_=xs(o,w);l==null&&!(Ye(o)&&(_.length||!w.length))&&(l=o,o=n,n=this,_=xs(o,dt(o)));var A=!(Ye(l)&&"chain"in l)||!!l.chain,P=Wr(n);return Xt(_,function(I){var z=o[I];n[I]=z,P&&(n.prototype[I]=function(){var V=this.__chain__;if(A||V){var X=n(this.__wrapped__),ee=X.__actions__=kt(this.__actions__);return ee.push({func:z,args:arguments,thisArg:n}),X.__chain__=V,X}return z.apply(n,rn([this.value()],arguments))})}),n}function rO(){return ht._===this&&(ht._=Rb),this}function xl(){}function nO(n){return n=xe(n),_e(function(o){return Xd(o,n)})}var iO=Ju(Ze),oO=Ju(yd),sO=Ju(Eu);function gh(n){return ol(n)?_u(Sr(n)):D1(n)}function aO(n){return function(o){return n==null?r:Cn(n,o)}}var uO=wp(),lO=wp(!0);function Sl(){return[]}function El(){return!1}function cO(){return{}}function fO(){return""}function dO(){return!0}function pO(n,o){if(n=xe(n),n<1||n>te)return[];var l=Q,w=xt(n,Q);o=pe(o),n-=Q;for(var _=Au(w,o);++l<n;)o(l);return _}function hO(n){return be(n)?Ze(n,Sr):Bt(n)?[n]:kt(Mp(ke(n)))}function gO(n){var o=++Tb;return ke(n)+o}var mO=As(function(n,o){return n+o},0),vO=Qu("ceil"),yO=As(function(n,o){return n/o},1),wO=Qu("floor");function bO(n){return n&&n.length?bs(n,Lt,Nu):r}function xO(n,o){return n&&n.length?bs(n,pe(o,2),Nu):r}function SO(n){return xd(n,Lt)}function EO(n,o){return xd(n,pe(o,2))}function _O(n){return n&&n.length?bs(n,Lt,Wu):r}function OO(n,o){return n&&n.length?bs(n,pe(o,2),Wu):r}var TO=As(function(n,o){return n*o},1),AO=Qu("round"),RO=As(function(n,o){return n-o},0);function PO(n){return n&&n.length?Tu(n,Lt):0}function CO(n,o){return n&&n.length?Tu(n,pe(o,2)):0}return T.after=JS,T.ary=Zp,T.assign=jE,T.assignIn=sh,T.assignInWith=zs,T.assignWith=zE,T.at=BE,T.before=Gp,T.bind=fl,T.bindAll=Z_,T.bindKey=Kp,T.castArray=cE,T.chain=Hp,T.chunk=wx,T.compact=bx,T.concat=xx,T.cond=G_,T.conforms=K_,T.constant=yl,T.countBy=PS,T.create=WE,T.curry=Vp,T.curryRight=Yp,T.debounce=Xp,T.defaults=HE,T.defaultsDeep=UE,T.defer=QS,T.delay=eE,T.difference=Sx,T.differenceBy=Ex,T.differenceWith=_x,T.drop=Ox,T.dropRight=Tx,T.dropRightWhile=Ax,T.dropWhile=Rx,T.fill=Px,T.filter=kS,T.flatMap=LS,T.flatMapDeep=MS,T.flatMapDepth=DS,T.flatten=jp,T.flattenDeep=Cx,T.flattenDepth=kx,T.flip=tE,T.flow=Y_,T.flowRight=X_,T.fromPairs=$x,T.functions=XE,T.functionsIn=JE,T.groupBy=FS,T.initial=Lx,T.intersection=Mx,T.intersectionBy=Dx,T.intersectionWith=Fx,T.invert=e_,T.invertBy=t_,T.invokeMap=jS,T.iteratee=wl,T.keyBy=zS,T.keys=dt,T.keysIn=It,T.map=Ls,T.mapKeys=n_,T.mapValues=i_,T.matches=J_,T.matchesProperty=Q_,T.memoize=Ds,T.merge=o_,T.mergeWith=ah,T.method=eO,T.methodOf=tO,T.mixin=bl,T.negate=Fs,T.nthArg=nO,T.omit=s_,T.omitBy=a_,T.once=rE,T.orderBy=BS,T.over=iO,T.overArgs=nE,T.overEvery=oO,T.overSome=sO,T.partial=dl,T.partialRight=Jp,T.partition=WS,T.pick=u_,T.pickBy=uh,T.property=gh,T.propertyOf=aO,T.pull=Bx,T.pullAll=Bp,T.pullAllBy=Wx,T.pullAllWith=Hx,T.pullAt=Ux,T.range=uO,T.rangeRight=lO,T.rearg=iE,T.reject=qS,T.remove=qx,T.rest=oE,T.reverse=ll,T.sampleSize=GS,T.set=c_,T.setWith=f_,T.shuffle=KS,T.slice=Zx,T.sortBy=XS,T.sortedUniq=Qx,T.sortedUniqBy=eS,T.split=L_,T.spread=sE,T.tail=tS,T.take=rS,T.takeRight=nS,T.takeRightWhile=iS,T.takeWhile=oS,T.tap=bS,T.throttle=aE,T.thru=Is,T.toArray=nh,T.toPairs=lh,T.toPairsIn=ch,T.toPath=hO,T.toPlainObject=oh,T.transform=d_,T.unary=uE,T.union=sS,T.unionBy=aS,T.unionWith=uS,T.uniq=lS,T.uniqBy=cS,T.uniqWith=fS,T.unset=p_,T.unzip=cl,T.unzipWith=Wp,T.update=h_,T.updateWith=g_,T.values=pi,T.valuesIn=m_,T.without=dS,T.words=ph,T.wrap=lE,T.xor=pS,T.xorBy=hS,T.xorWith=gS,T.zip=mS,T.zipObject=vS,T.zipObjectDeep=yS,T.zipWith=wS,T.entries=lh,T.entriesIn=ch,T.extend=sh,T.extendWith=zs,bl(T,T),T.add=mO,T.attempt=hh,T.camelCase=b_,T.capitalize=fh,T.ceil=vO,T.clamp=v_,T.clone=fE,T.cloneDeep=pE,T.cloneDeepWith=hE,T.cloneWith=dE,T.conformsTo=gE,T.deburr=dh,T.defaultTo=V_,T.divide=yO,T.endsWith=x_,T.eq=dr,T.escape=S_,T.escapeRegExp=E_,T.every=CS,T.find=$S,T.findIndex=Fp,T.findKey=qE,T.findLast=IS,T.findLastIndex=Np,T.findLastKey=ZE,T.floor=wO,T.forEach=Up,T.forEachRight=qp,T.forIn=GE,T.forInRight=KE,T.forOwn=VE,T.forOwnRight=YE,T.get=gl,T.gt=mE,T.gte=vE,T.has=QE,T.hasIn=ml,T.head=zp,T.identity=Lt,T.includes=NS,T.indexOf=Ix,T.inRange=y_,T.invoke=r_,T.isArguments=In,T.isArray=be,T.isArrayBuffer=yE,T.isArrayLike=$t,T.isArrayLikeObject=rt,T.isBoolean=wE,T.isBuffer=cn,T.isDate=bE,T.isElement=xE,T.isEmpty=SE,T.isEqual=EE,T.isEqualWith=_E,T.isError=pl,T.isFinite=OE,T.isFunction=Wr,T.isInteger=Qp,T.isLength=Ns,T.isMap=eh,T.isMatch=TE,T.isMatchWith=AE,T.isNaN=RE,T.isNative=PE,T.isNil=kE,T.isNull=CE,T.isNumber=th,T.isObject=Ye,T.isObjectLike=et,T.isPlainObject=Gi,T.isRegExp=hl,T.isSafeInteger=$E,T.isSet=rh,T.isString=js,T.isSymbol=Bt,T.isTypedArray=di,T.isUndefined=IE,T.isWeakMap=LE,T.isWeakSet=ME,T.join=Nx,T.kebabCase=__,T.last=rr,T.lastIndexOf=jx,T.lowerCase=O_,T.lowerFirst=T_,T.lt=DE,T.lte=FE,T.max=bO,T.maxBy=xO,T.mean=SO,T.meanBy=EO,T.min=_O,T.minBy=OO,T.stubArray=Sl,T.stubFalse=El,T.stubObject=cO,T.stubString=fO,T.stubTrue=dO,T.multiply=TO,T.nth=zx,T.noConflict=rO,T.noop=xl,T.now=Ms,T.pad=A_,T.padEnd=R_,T.padStart=P_,T.parseInt=C_,T.random=w_,T.reduce=HS,T.reduceRight=US,T.repeat=k_,T.replace=$_,T.result=l_,T.round=AO,T.runInContext=N,T.sample=ZS,T.size=VS,T.snakeCase=I_,T.some=YS,T.sortedIndex=Gx,T.sortedIndexBy=Kx,T.sortedIndexOf=Vx,T.sortedLastIndex=Yx,T.sortedLastIndexBy=Xx,T.sortedLastIndexOf=Jx,T.startCase=M_,T.startsWith=D_,T.subtract=RO,T.sum=PO,T.sumBy=CO,T.template=F_,T.times=pO,T.toFinite=Hr,T.toInteger=xe,T.toLength=ih,T.toLower=N_,T.toNumber=nr,T.toSafeInteger=NE,T.toString=ke,T.toUpper=j_,T.trim=z_,T.trimEnd=B_,T.trimStart=W_,T.truncate=H_,T.unescape=U_,T.uniqueId=gO,T.upperCase=q_,T.upperFirst=vl,T.each=Up,T.eachRight=qp,T.first=zp,bl(T,(function(){var n={};return br(T,function(o,l){Fe.call(T.prototype,l)||(n[l]=o)}),n})(),{chain:!1}),T.VERSION=i,Xt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(n){T[n].placeholder=T}),Xt(["drop","take"],function(n,o){Ae.prototype[n]=function(l){l=l===r?1:lt(xe(l),0);var w=this.__filtered__&&!o?new Ae(this):this.clone();return w.__filtered__?w.__takeCount__=xt(l,w.__takeCount__):w.__views__.push({size:xt(l,Q),type:n+(w.__dir__<0?"Right":"")}),w},Ae.prototype[n+"Right"]=function(l){return this.reverse()[n](l).reverse()}}),Xt(["filter","map","takeWhile"],function(n,o){var l=o+1,w=l==q||l==J;Ae.prototype[n]=function(_){var A=this.clone();return A.__iteratees__.push({iteratee:pe(_,3),type:l}),A.__filtered__=A.__filtered__||w,A}}),Xt(["head","last"],function(n,o){var l="take"+(o?"Right":"");Ae.prototype[n]=function(){return this[l](1).value()[0]}}),Xt(["initial","tail"],function(n,o){var l="drop"+(o?"":"Right");Ae.prototype[n]=function(){return this.__filtered__?new Ae(this):this[l](1)}}),Ae.prototype.compact=function(){return this.filter(Lt)},Ae.prototype.find=function(n){return this.filter(n).head()},Ae.prototype.findLast=function(n){return this.reverse().find(n)},Ae.prototype.invokeMap=_e(function(n,o){return typeof n=="function"?new Ae(this):this.map(function(l){return Bi(l,n,o)})}),Ae.prototype.reject=function(n){return this.filter(Fs(pe(n)))},Ae.prototype.slice=function(n,o){n=xe(n);var l=this;return l.__filtered__&&(n>0||o<0)?new Ae(l):(n<0?l=l.takeRight(-n):n&&(l=l.drop(n)),o!==r&&(o=xe(o),l=o<0?l.dropRight(-o):l.take(o-n)),l)},Ae.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},Ae.prototype.toArray=function(){return this.take(Q)},br(Ae.prototype,function(n,o){var l=/^(?:filter|find|map|reject)|While$/.test(o),w=/^(?:head|last)$/.test(o),_=T[w?"take"+(o=="last"?"Right":""):o],A=w||/^find/.test(o);_&&(T.prototype[o]=function(){var P=this.__wrapped__,I=w?[1]:arguments,z=P instanceof Ae,V=I[0],X=z||be(P),ee=function(Oe){var Re=_.apply(T,rn([Oe],I));return w&&oe?Re[0]:Re};X&&l&&typeof V=="function"&&V.length!=1&&(z=X=!1);var oe=this.__chain__,le=!!this.__actions__.length,he=A&&!oe,Se=z&&!le;if(!A&&X){P=Se?P:new Ae(this);var ge=n.apply(P,I);return ge.__actions__.push({func:Is,args:[ee],thisArg:r}),new Qt(ge,oe)}return he&&Se?n.apply(this,I):(ge=this.thru(ee),he?w?ge.value()[0]:ge.value():ge)})}),Xt(["pop","push","shift","sort","splice","unshift"],function(n){var o=os[n],l=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",w=/^(?:pop|shift)$/.test(n);T.prototype[n]=function(){var _=arguments;if(w&&!this.__chain__){var A=this.value();return o.apply(be(A)?A:[],_)}return this[l](function(P){return o.apply(be(P)?P:[],_)})}}),br(Ae.prototype,function(n,o){var l=T[o];if(l){var w=l.name+"";Fe.call(ai,w)||(ai[w]=[]),ai[w].push({name:o,func:l})}}),ai[Ts(r,m).name]=[{name:"wrapper",func:r}],Ae.prototype.clone=Ub,Ae.prototype.reverse=qb,Ae.prototype.value=Zb,T.prototype.at=xS,T.prototype.chain=SS,T.prototype.commit=ES,T.prototype.next=_S,T.prototype.plant=TS,T.prototype.reverse=AS,T.prototype.toJSON=T.prototype.valueOf=T.prototype.value=RS,T.prototype.first=T.prototype.head,Li&&(T.prototype[Li]=OS),T}),ii=Eb();On?((On.exports=ii)._=ii,wu._=ii):ht._=ii}).call(f$)})(xo,xo.exports)),xo.exports}var Ne=d$();const kc={FdSave:ot.FdSave,FdWarningDanger:ot.FdWarningDanger,FdInfoCircle:ot.FdInfoCircle,FdInfoBold:ot.FdInfoBold};var xf=(e=>(e.ALERT="alert",e.CONFIRM="confirm",e))(xf||{}),Un=(e=>(e.PRIMARY="primary",e.WARNING="warning",e.DANGER="danger",e))(Un||{}),yi=(e=>(e.CONFIRMED="confirmed",e.CANCELED="canceled",e))(yi||{});const jy={[Un.PRIMARY]:{icon:"blue-500",button:"primary-dark"},[Un.DANGER]:{icon:"red-500",button:"primary-dark"},[Un.WARNING]:{icon:"yellow-400",button:"primary-dark"}},rc=({color:e=Un.PRIMARY,variant:t="solid",children:r,autoFocus:i,...s})=>{const a=jy[e].button,u=t==="outlined"?`bg-transparent text-white border border-white hover:border-white hover:bg-white hover:text-${a}`:`text-white bg-${a} border border-${a} hover:border-white hover:bg-primary-hover hover:text-white`;return D.jsx("button",{autoFocus:i,className:je("w-16 rounded px-2 py-1 text-xs font-medium hover:font-bold focus:outline-none",u),...s,children:r})},p$=({name:e,color:t=Un.PRIMARY,className:r="w-8 h-8"})=>{const i=kc[e]||kc.FdInfoCircle,s=`text-${jy[t].icon}`;return D.jsx(i,{className:je(r,s)})},h$=({id:e,title:t,message:r,icon:i,type:s,color:a,zIndex:u=3e3,views:c,width:f=520,hasOverlay:g=!0,container:h,onClose:v,onEdit:p})=>{const y=b=>{v({id:e,reason:b})};B.useEffect(()=>{function b(m){m.key==="Escape"&&y(yi.CANCELED)}return window.addEventListener("keyup",b),()=>{window.removeEventListener("keyup",b)}},[]);const x=Ne.merge(Ne.values(c==null?void 0:c.toggles).flatMap(b=>b.value?b.warnings||[]:[]),c==null?void 0:c.tips),d=(b,m)=>{var E;if(!(c!=null&&c.toggles))return;const S=Ne.cloneDeep(c);(E=S.toggles)!=null&&E[b]&&(S.toggles[b].value=m),p({id:e,views:S})};return Pi.createPortal(D.jsx(_a,{appear:!0,show:!0,as:B.Fragment,children:D.jsx("div",{className:je("absolute inset-0 flex h-full w-full items-center justify-center overflow-y-auto",{"bg-black bg-opacity-80":g}),style:{zIndex:u},onClick:()=>y(yi.CANCELED),children:D.jsx(_a.Child,{as:B.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:D.jsx("div",{"data-cy":"confirmation-modal-cy",className:"relative rounded-md border border-grey-50 bg-grey-900",style:{width:f},onClick:b=>b.stopPropagation(),children:D.jsxs("div",{className:"flex flex-col items-center gap-3 p-6 px-12",children:[i?D.jsx("div",{className:"flex items-center justify-center",children:D.jsx(p$,{name:i,color:a,className:"w-6 h-6"})}):null,D.jsx(g$,{condition:t,children:D.jsx("h4",{className:"w-full text-wrap text-lg font-bold leading-6 text-white text-center",children:t})}),D.jsx("p",{className:"w-full text-wrap text-center text-sm font-medium text-white",children:r}),D.jsx("div",{className:"text-xs text-white",children:Ne.values(c==null?void 0:c.toggles).map(b=>D.jsx("div",{children:D.jsxs("label",{htmlFor:b.key,className:"flex items-center",children:[D.jsx(Ey,{size:"xs",value:b.value,onChange:m=>d(b.key,m)}),D.jsx("span",{className:"ml-1",children:b.title})]})},b.key))}),D.jsx(m$,{warnings:x}),D.jsx("div",{className:"flex items-center gap-4",children:s===xf.CONFIRM?D.jsxs(D.Fragment,{children:[D.jsx(rc,{autoFocus:!0,color:a,onClick:()=>y(yi.CONFIRMED),children:"Confirm"}),D.jsx(rc,{color:a,variant:"outlined",onClick:()=>y(yi.CANCELED),children:"Cancel"})]}):D.jsx(rc,{autoFocus:!0,onClick:()=>y(),children:"OK"})})]})})})})}),h||document.body)},g$=e=>e.condition?D.jsx(D.Fragment,{children:e.children}):null,m$=e=>e.warnings?D.jsx(_a,{appear:!0,show:!!e.warnings.length,as:B.Fragment,children:D.jsx("div",{className:"flex flex-col gap-1 rounded-sm bg-grey-600 p-2 text-xs text-white",children:e.warnings.map((t,r)=>D.jsx(_a.Child,{as:B.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:D.jsxs("div",{className:"flex flex-1 items-center gap-1 rounded-sm px-2 py-1",children:[D.jsx(ot.FdWarningDanger,{className:je({"h-3 w-3":!0,"text-yellow-500":t.type==="warning","text-red-400":t.type==="error","text-primary-dark":t.type==="info"},"mr-3")}),D.jsx("div",{className:"flex-1",children:t.message})]})},`modal-warnings-${r}`))})}):null;var zy=(e=>(e[e.MIN=.5]="MIN",e[e.MAX=10]="MAX",e[e.STEP=.5]="STEP",e[e.INIT=1]="INIT",e[e.TRANSITION=200]="TRANSITION",e))(zy||{});const v$=({zoom:e,minZoom:t=.5,maxZoom:r=10,handleZoomIn:i,handleZoomOut:s})=>D.jsxs("div",{className:"flex items-center rounded bg-grey-300 p-1",children:[D.jsx(ot.FdMinusNaked,{onClick:s,className:je("h-5 w-5 p-1",{"text-grey-200":e<=t,"cursor-pointer rounded hover:bg-purple-800":e>t})}),D.jsxs("span",{className:"mx-1 w-10 select-none text-center text-xs",children:[(e*100).toFixed(0),"%"]}),D.jsx(ot.FdPlusNaked,{onClick:i,className:je("h-5 w-5 p-1",{"text-grey-200":e>=r,"cursor-pointer rounded hover:bg-purple-800":e<r})})]}),y$=$.forwardRef(((e,t)=>$.createElement(Sn.span,Qe({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}})))),w$=y$;function Sm(e){const t=$.useRef({value:e,previous:e});return $.useMemo((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}const[By]=tf("Tooltip",[Ha]),Sf=Ha(),b$=700,[Z2,x$]=By("TooltipProvider",{isOpenDelayed:!0,delayDuration:b$,onOpen:()=>{},onClose:()=>{}}),[S$,Va]=By("Tooltip"),E$=e=>{const{__scopeTooltip:t,children:r,open:i,defaultOpen:s=!1,onOpenChange:a,delayDuration:u}=e,c=x$("Tooltip",t),f=Sf(t),[g,h]=$.useState(null),v=zv(),p=$.useRef(0),y=u??c.delayDuration,x=$.useRef(!1),{onOpen:d,onClose:b}=c,[m=!1,S]=Jv({prop:i,defaultProp:s,onChange:k=>{k&&(document.dispatchEvent(new CustomEvent("tooltip.open")),d()),a==null||a(k)}}),E=$.useMemo((()=>m?x.current?"delayed-open":"instant-open":"closed"),[m]),R=$.useCallback((()=>{window.clearTimeout(p.current),x.current=!1,S(!0)}),[S]),O=$.useCallback((()=>{window.clearTimeout(p.current),p.current=window.setTimeout((()=>{x.current=!0,S(!0)}),y)}),[y,S]);return $.useEffect((()=>()=>window.clearTimeout(p.current)),[]),$.createElement(Vv,f,$.createElement(S$,{scope:t,contentId:v,open:m,stateAttribute:E,trigger:g,onTriggerChange:h,onTriggerEnter:$.useCallback((()=>{c.isOpenDelayed?O():R()}),[c.isOpenDelayed,O,R]),onOpen:$.useCallback(R,[R]),onClose:$.useCallback((()=>{window.clearTimeout(p.current),S(!1),b()}),[S,b])},r))},_$=$.forwardRef(((e,t)=>{const{__scopeTooltip:r,...i}=e,s=Va("TooltipTrigger",r),a=Sf(r),u=xn(t,s.onTriggerChange),c=$.useRef(!1),f=$.useCallback((()=>c.current=!1),[]);return $.useEffect((()=>()=>document.removeEventListener("mouseup",f)),[f]),$.createElement(Yv,Qe({asChild:!0},a),$.createElement(Sn.button,Qe({"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute},i,{ref:u,onMouseEnter:qt(e.onMouseEnter,s.onTriggerEnter),onMouseLeave:qt(e.onMouseLeave,s.onClose),onMouseDown:qt(e.onMouseDown,(()=>{s.onClose(),c.current=!0,document.addEventListener("mouseup",f,{once:!0})})),onFocus:qt(e.onFocus,(()=>{c.current||s.onOpen()})),onBlur:qt(e.onBlur,s.onClose),onClick:qt(e.onClick,(g=>{g.detail===0&&s.onClose()}))})))})),O$=$.forwardRef(((e,t)=>{const{forceMount:r,...i}=e,s=Va("TooltipContent",e.__scopeTooltip);return $.createElement(Qc,{present:r||s.open},$.createElement(T$,Qe({ref:t},i)))})),T$=$.forwardRef(((e,t)=>{const{__scopeTooltip:r,children:i,"aria-label":s,portalled:a=!0,...u}=e,c=Va("TooltipContent",r),f=Sf(r),g=a?ef:$.Fragment,{onClose:h}=c;return Uv((()=>h())),$.useEffect((()=>(document.addEventListener("tooltip.open",h),()=>document.removeEventListener("tooltip.open",h))),[h]),$.createElement(g,null,$.createElement(A$,{__scopeTooltip:r}),$.createElement(Xv,Qe({"data-state":c.stateAttribute},f,u,{ref:t,style:{...u.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)"}}),$.createElement(Hv,null,i),$.createElement(w$,{id:c.contentId,role:"tooltip"},s||i)))}));function A$(e){const{__scopeTooltip:t}=e,r=Va("CheckTriggerMoved",t),i=Zv(r.trigger),s=i==null?void 0:i.left,a=Sm(s),u=i==null?void 0:i.top,c=Sm(u),f=r.onClose;return $.useEffect((()=>{(a!==void 0&&a!==s||c!==void 0&&c!==u)&&f()}),[f,a,c,s,u]),null}const R$=E$,P$=_$,C$=O$;function k$(e){return D.jsxs(R$,{delayDuration:e.delayDuration,open:e.open,children:[D.jsx(P$,{tabIndex:-1,asChild:!0,children:D.jsx("span",{children:e.children})}),D.jsxs(C$,{side:e.side,sideOffset:e.sideOffset,alignOffset:e.alignOffset,children:[typeof e.message=="string"&&D.jsx("p",{className:"max-w-[240px] rounded-md bg-primary-light px-1 py-2 text-s font-semibold text-primary-dark",children:e.message}),typeof e.message!="string"&&e.message]})]})}const Fn=30,ma=500,$$=()=>D.jsx("div",{className:"h-2 w-full bg-opacity-40 hover:bg-primary-hover"}),I$=e=>{const[t,r]=B.useState(Fn),i=B.useRef(),s=t>Fn,a=B.useRef(null);return B.useEffect(()=>{e.isOpen&&!s&&r(ma),!e.isOpen&&s&&r(Fn)},[e.isOpen]),D.jsxs("div",{className:"relative w-full select-none isolate",style:{zIndex:49},children:[D.jsx(IO.Resizable,{enable:{top:!0,right:!1,bottom:!1,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},className:"w-full select-none border-t border-grey-900 bg-grey-800",size:{height:t,width:"100%"},maxHeight:700,minHeight:Fn,onResizeStart:()=>{i.current&&Date.now()-i.current<200?r(s?Fn:ma):i.current=Date.now()},onResize:(u,c,f)=>{a.current&&cancelAnimationFrame(a.current),a.current=requestAnimationFrame(()=>{var g;(g=e.onResize)==null||g.call(e),a.current=null})},onResizeStop:(u,c,f,g)=>{r(t+g.height)},handleComponent:{top:D.jsx($$,{})}}),D.jsxs("div",{"data-cy":"contextualPanel",className:"absolute inset-0 flex flex-col overflow-hidden",id:`__cp-${Ne.kebabCase(e.path)}`,children:[D.jsxs("div",{className:je("flex justify-between items-center px-3 py-0.5",{"flex-1":!s}),children:[D.jsxs("div",{className:"group flex items-center justify-start",children:[D.jsx("span",{className:"mr-2 text-sm text-fd-gray-lighter",children:"Contextual panel"}),D.jsx("span",{}),e.tipKey?D.jsx(fy,{tipKey:e.tipKey,alwaysOn:!0,asButton:!0}):null,D.jsx("button",{className:"rounded p-1 text-white hover:bg-primary-hover focus:outline-none",onClick:()=>{s?(r(Fn),e.onClose()):(r(ma),e.onOpen())},children:s?D.jsx(ot.FdDoubleArrowDown,{className:"h-4 w-4 text-white"}):D.jsx(ot.FdDoubleArrowUp,{className:"h-4 w-4 text-white"})})]}),e.headerRightSide]}),D.jsxs(da,{of:s,children:[D.jsx(da,{of:e.render,children:e.render}),D.jsx(da,{of:!e.render,children:e.children})]})]})]})};function Wy({children:e,viewBox:t="0 0 24 24",...r}){return D.jsx("svg",{viewBox:t,width:"1em",height:"1em",fill:"none",className:"base-icon",...Ne.omit(r,"isIndeterminate","isChecked"),children:e})}function Hy(e){const t=e.isIndeterminate?"M2 12h20":"M4 11.5L9 17L20 6";return D.jsx(Wy,{viewBox:"0 0 24 24",...e,children:D.jsx("path",{fill:"none",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round",d:t})})}function L$({isChecked:e,isIndeterminate:t,isInvalid:r,icon:i,label:s,className:a="",style:u,...c}){const f=B.useRef(null),g=i||D.jsx(Hy,{}),h=c.checked??e;B.useEffect(()=>{f.current&&(f.current.indeterminate=!!t)},[t]);const v=h||t,p=["base-checkbox-container",a].join(" ");return D.jsxs("label",{className:p,style:u,"data-invalid":r,children:[D.jsx("input",{ref:f,type:"checkbox",className:"base-checkbox-input",checked:h,...c,"aria-invalid":r||void 0}),D.jsx("span",{className:"base-checkbox-control",children:v&&g&&B.cloneElement(g,{isChecked:h,isIndeterminate:t,className:"base-checkbox-icon"})}),s&&D.jsx("span",{className:"base-checkbox-label",children:s})]})}const M$=B.forwardRef(({label:e,Icon:t,as:r="button",className:i="",disableHover:s=!1,iconClassname:a,...u},c)=>{const[f,g]=B.useState(null),[h,v]=B.useState(!1);return B.useImperativeHandle(c,()=>f,[f]),D.jsxs(D.Fragment,{children:[D.jsx(r,{ref:g,className:je("rounded p-1 text-white focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",{"hover:bg-primary-hover":!s},i),onMouseEnter:()=>v(!0),onMouseLeave:()=>v(!1),onMouseDown:()=>v(!1),...u,children:D.jsx(t,{className:je("h-4 w-4",a)})}),h&&Pi.createPortal(D.jsx(Fy,{label:e,referenceElement:f}),document.body)]})});function D$(e,t){const r=B.useRef(!1);B.useEffect(()=>{if(r.current)return e();r.current=!0},t)}const nc=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function ic(e,t,r,i){e.addEventListener?e.addEventListener(t,r,i):e.attachEvent&&e.attachEvent("on".concat(t),r)}function yo(e,t,r,i){e.removeEventListener?e.removeEventListener(t,r,i):e.detachEvent&&e.detachEvent("on".concat(t),r)}function Uy(e,t){const r=t.slice(0,t.length-1);for(let i=0;i<r.length;i++)r[i]=e[r[i].toLowerCase()];return r}function qy(e){typeof e!="string"&&(e=""),e=e.replace(/\s/g,"");const t=e.split(",");let r=t.lastIndexOf("");for(;r>=0;)t[r-1]+=",",t.splice(r,1),r=t.lastIndexOf("");return t}function F$(e,t){const r=e.length>=t.length?e:t,i=e.length>=t.length?t:e;let s=!0;for(let a=0;a<r.length;a++)i.indexOf(r[a])===-1&&(s=!1);return s}const Lo={backspace:8,"⌫":8,tab:9,clear:12,enter:13,"↩":13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,arrowup:38,arrowdown:40,arrowleft:37,arrowright:39,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":nc?173:189,"=":nc?61:187,";":nc?59:186,"'":222,"{":219,"}":221,"[":219,"]":221,"\\":220},yr={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,meta:91,command:91},So={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},vt={16:!1,18:!1,17:!1,91:!1},Je={};for(let e=1;e<20;e++)Lo["f".concat(e)]=111+e;let Ke=[],Co=null,Zy="all";const Zr=new Map,Ci=e=>Lo[e.toLowerCase()]||yr[e.toLowerCase()]||e.toUpperCase().charCodeAt(0),N$=e=>Object.keys(Lo).find(t=>Lo[t]===e),j$=e=>Object.keys(yr).find(t=>yr[t]===e);function Gy(e){Zy=e||"all"}function Mo(){return Zy||"all"}function z$(){return Ke.slice(0)}function B$(){return Ke.map(e=>N$(e)||j$(e)||String.fromCharCode(e))}function W$(){const e=[];return Object.keys(Je).forEach(t=>{Je[t].forEach(r=>{let{key:i,scope:s,mods:a,shortcut:u}=r;e.push({scope:s,shortcut:u,mods:a,keys:i.split("+").map(c=>Ci(c))})})}),e}function H$(e){const t=e.target||e.srcElement,{tagName:r}=t;let i=!0;const s=r==="INPUT"&&!["checkbox","radio","range","button","file","reset","submit","color"].includes(t.type);return(t.isContentEditable||(s||r==="TEXTAREA"||r==="SELECT")&&!t.readOnly)&&(i=!1),i}function U$(e){return typeof e=="string"&&(e=Ci(e)),Ke.indexOf(e)!==-1}function q$(e,t){let r,i;e||(e=Mo());for(const s in Je)if(Object.prototype.hasOwnProperty.call(Je,s))for(r=Je[s],i=0;i<r.length;)r[i].scope===e?r.splice(i,1).forEach(u=>{let{element:c}=u;return Ef(c)}):i++;Mo()===e&&Gy(t||"all")}function Z$(e){let t=e.keyCode||e.which||e.charCode;e.key&&e.key.toLowerCase()==="capslock"&&(t=Ci(e.key));const r=Ke.indexOf(t);if(r>=0&&Ke.splice(r,1),e.key&&e.key.toLowerCase()==="meta"&&Ke.splice(0,Ke.length),(t===93||t===224)&&(t=91),t in vt){vt[t]=!1;for(const i in yr)yr[i]===t&&(vr[i]=!1)}}function Ky(e){if(typeof e>"u")Object.keys(Je).forEach(s=>{Array.isArray(Je[s])&&Je[s].forEach(a=>ia(a)),delete Je[s]}),Ef(null);else if(Array.isArray(e))e.forEach(s=>{s.key&&ia(s)});else if(typeof e=="object")e.key&&ia(e);else if(typeof e=="string"){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];let[s,a]=r;typeof s=="function"&&(a=s,s=""),ia({key:e,scope:s,method:a,splitKey:"+"})}}const ia=e=>{let{key:t,scope:r,method:i,splitKey:s="+"}=e;qy(t).forEach(u=>{const c=u.split(s),f=c.length,g=c[f-1],h=g==="*"?"*":Ci(g);if(!Je[h])return;r||(r=Mo());const v=f>1?Uy(yr,c):[],p=[];Je[h]=Je[h].filter(y=>{const d=(i?y.method===i:!0)&&y.scope===r&&F$(y.mods,v);return d&&p.push(y.element),!d}),p.forEach(y=>Ef(y))})};function Em(e,t,r,i){if(t.element!==i)return;let s;if(t.scope===r||t.scope==="all"){s=t.mods.length>0;for(const a in vt)Object.prototype.hasOwnProperty.call(vt,a)&&(!vt[a]&&t.mods.indexOf(+a)>-1||vt[a]&&t.mods.indexOf(+a)===-1)&&(s=!1);(t.mods.length===0&&!vt[16]&&!vt[18]&&!vt[17]&&!vt[91]||s||t.shortcut==="*")&&(t.keys=[],t.keys=t.keys.concat(Ke),t.method(e,t)===!1&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0)))}}function _m(e,t){const r=Je["*"];let i=e.keyCode||e.which||e.charCode;if(e.key&&e.key.toLowerCase()==="capslock"||!vr.filter.call(this,e))return;if((i===93||i===224)&&(i=91),Ke.indexOf(i)===-1&&i!==229&&Ke.push(i),["metaKey","ctrlKey","altKey","shiftKey"].forEach(c=>{const f=So[c];e[c]&&Ke.indexOf(f)===-1?Ke.push(f):!e[c]&&Ke.indexOf(f)>-1?Ke.splice(Ke.indexOf(f),1):c==="metaKey"&&e[c]&&(Ke=Ke.filter(g=>g in So||g===i))}),i in vt){vt[i]=!0;for(const c in yr)if(Object.prototype.hasOwnProperty.call(yr,c)){const f=So[yr[c]];vr[c]=e[f]}if(!r)return}for(const c in vt)Object.prototype.hasOwnProperty.call(vt,c)&&(vt[c]=e[So[c]]);e.getModifierState&&!(e.altKey&&!e.ctrlKey)&&e.getModifierState("AltGraph")&&(Ke.indexOf(17)===-1&&Ke.push(17),Ke.indexOf(18)===-1&&Ke.push(18),vt[17]=!0,vt[18]=!0);const s=Mo();if(r)for(let c=0;c<r.length;c++)r[c].scope===s&&(e.type==="keydown"&&r[c].keydown||e.type==="keyup"&&r[c].keyup)&&Em(e,r[c],s,t);if(!(i in Je))return;const a=Je[i],u=a.length;for(let c=0;c<u;c++)if((e.type==="keydown"&&a[c].keydown||e.type==="keyup"&&a[c].keyup)&&a[c].key){const f=a[c],{splitKey:g}=f,h=f.key.split(g),v=[];for(let p=0;p<h.length;p++)v.push(Ci(h[p]));v.sort().join("")===Ke.sort().join("")&&Em(e,f,s,t)}}function vr(e,t,r){Ke=[];const i=qy(e);let s=[],a="all",u=document,c=0,f=!1,g=!0,h="+",v=!1,p=!1;for(r===void 0&&typeof t=="function"&&(r=t),Object.prototype.toString.call(t)==="[object Object]"&&(t.scope&&(a=t.scope),t.element&&(u=t.element),t.keyup&&(f=t.keyup),t.keydown!==void 0&&(g=t.keydown),t.capture!==void 0&&(v=t.capture),typeof t.splitKey=="string"&&(h=t.splitKey),t.single===!0&&(p=!0)),typeof t=="string"&&(a=t),p&&Ky(e,a);c<i.length;c++)e=i[c].split(h),s=[],e.length>1&&(s=Uy(yr,e)),e=e[e.length-1],e=e==="*"?"*":Ci(e),e in Je||(Je[e]=[]),Je[e].push({keyup:f,keydown:g,scope:a,mods:s,shortcut:i[c],method:r,key:i[c],splitKey:h,element:u});if(typeof u<"u"&&window){if(!Zr.has(u)){const y=function(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event;return _m(d,u)},x=function(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event;_m(d,u),Z$(d)};Zr.set(u,{keydownListener:y,keyupListenr:x,capture:v}),ic(u,"keydown",y,v),ic(u,"keyup",x,v)}if(!Co){const y=()=>{Ke=[]};Co={listener:y,capture:v},ic(window,"focus",y,v)}}}function G$(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"all";Object.keys(Je).forEach(r=>{Je[r].filter(s=>s.scope===t&&s.shortcut===e).forEach(s=>{s&&s.method&&s.method()})})}function Ef(e){const t=Object.values(Je).flat();if(t.findIndex(i=>{let{element:s}=i;return s===e})<0){const{keydownListener:i,keyupListenr:s,capture:a}=Zr.get(e)||{};i&&s&&(yo(e,"keyup",s,a),yo(e,"keydown",i,a),Zr.delete(e))}if((t.length<=0||Zr.size<=0)&&(Object.keys(Zr).forEach(s=>{const{keydownListener:a,keyupListenr:u,capture:c}=Zr.get(s)||{};a&&u&&(yo(s,"keyup",u,c),yo(s,"keydown",a,c),Zr.delete(s))}),Zr.clear(),Object.keys(Je).forEach(s=>delete Je[s]),Co)){const{listener:s,capture:a}=Co;yo(window,"focus",s,a),Co=null}}const oc={getPressedKeyString:B$,setScope:Gy,getScope:Mo,deleteScope:q$,getPressedKeyCodes:z$,getAllKeyCodes:W$,isPressed:U$,filter:H$,trigger:G$,unbind:Ky,keyMap:Lo,modifier:yr,modifierMap:So};for(const e in oc)Object.prototype.hasOwnProperty.call(oc,e)&&(vr[e]=oc[e]);if(typeof window<"u"){const e=window.hotkeys;vr.noConflict=t=>(t&&window.hotkeys===vr&&(window.hotkeys=e),vr),window.hotkeys=vr}vr.filter=()=>!0;function K$(e,t,r,i){r instanceof Array&&(i=r,r=void 0),i=i||[],r=r||{};const{preventDefault:s=!0}=r,a=B.useCallback((c,f)=>{s&&c.preventDefault(),setTimeout(()=>t(c,f))},i),u=()=>{vr.unbind(e,a)};B.useEffect(()=>(vr(e,r,a),u),[e,r,a])}const V$=e=>{const t=B.useRef(null);return B.useEffect(()=>{const r=i=>{t.current&&!t.current.contains(i.target)&&e(i)};return document.addEventListener("click",r,!0),()=>{document.removeEventListener("click",r,!0)}},[e]),t};function Y$(e){const t=B.useRef();return B.useEffect(()=>{t.current=e},[e]),t.current}function X$(e){const t=B.useRef(e);return B.useEffect(()=>{t.current=e},[e]),t}function J$(e){const t=B.useRef(null);return B.useEffect(()=>{e&&(typeof e=="function"?e(t.current):e.current=t.current)}),t}function Q$(e){const[t,r]=B.useState(e),i=(a,u)=>{r(c=>({...c,features:{...c.features,[a]:{enabled:u}}}))},s=B.useCallback((...a)=>a.every(u=>{var c;return(c=t.features[u])==null?void 0:c.enabled}),[t.features]);return{setFeature:i,isFeatureEnabled:s}}const Vy=B.createContext(""),eI=e=>D.jsx(Vy.Provider,{value:e.value,children:e.children}),tI=()=>{const e=B.useContext(Vy);if(typeof e!="string")throw new Error("Error while calling useIdentity! Context has incorrect type (expected string)");return e};function rI(e){const[t,r]=B.useState(e),i=B.useMemo(()=>nI(t,r),[]);return{state:t,actions:{...i,set:s=>{r(typeof s=="function"?s:a=>({...a,...s}))}}}}function nI(e,t=()=>{}){return Object.keys(e).reduce((i,s)=>({...i,[`set${Ne.upperFirst(s)}`]:a=>t(u=>({...u,[s]:a}))}),{})}const iI=(e,t,r={})=>{r={timeout:200,...r};const i=B.useRef(),s=()=>{i.current&&(clearTimeout(i.current),i.current=null)};return B.useCallback((a,...u)=>{s(),t&&a.detail===1&&(i.current=setTimeout(()=>{t(a,...u)},r.timeout)),a.detail%2===0&&e(a,...u)},[t,e,r.timeout])};function yt(e){for(var t=arguments.length,r=Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];if(process.env.NODE_ENV!=="production"){var s=fI[e],a=s?typeof s=="function"?s.apply(null,r):s:"unknown error nr: "+e;throw Error("[Immer] "+a)}throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map((function(u){return"'"+u+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Ai(e){return!!e&&!!e[Gt]}function Vn(e){var t;return!!e&&((function(r){if(!r||typeof r!="object")return!1;var i=Object.getPrototypeOf(r);if(i===null)return!0;var s=Object.hasOwnProperty.call(i,"constructor")&&i.constructor;return s===Object||typeof s=="function"&&Function.toString.call(s)===dI})(e)||Array.isArray(e)||!!e[$m]||!!(!((t=e.constructor)===null||t===void 0)&&t[$m])||_f(e)||Of(e))}function Do(e,t,r){r===void 0&&(r=!1),ki(e)===0?(r?Object.keys:Pf)(e).forEach((function(i){r&&typeof i=="symbol"||t(i,e[i],e)})):e.forEach((function(i,s){return t(s,i,e)}))}function ki(e){var t=e[Gt];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:_f(e)?2:Of(e)?3:0}function $c(e,t){return ki(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function oI(e,t){return ki(e)===2?e.get(t):e[t]}function Yy(e,t,r){var i=ki(e);i===2?e.set(t,r):i===3?e.add(r):e[t]=r}function sI(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function _f(e){return lI&&e instanceof Map}function Of(e){return cI&&e instanceof Set}function Nn(e){return e.o||e.t}function Tf(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=pI(e);delete t[Gt];for(var r=Pf(t),i=0;i<r.length;i++){var s=r[i],a=t[s];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(t[s]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[s]})}return Object.create(Object.getPrototypeOf(e),t)}function Fo(e,t){return t===void 0&&(t=!1),Af(e)||Ai(e)||!Vn(e)||(ki(e)>1&&(e.set=e.add=e.clear=e.delete=aI),Object.freeze(e),t&&Do(e,(function(r,i){return Fo(i,!0)}),!0)),e}function aI(){yt(2)}function Af(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function kr(e){var t=hI[e];return t||yt(18,e),t}function Om(){return process.env.NODE_ENV==="production"||Ri||yt(0),Ri}function sc(e,t){t&&(kr("Patches"),e.u=[],e.s=[],e.v=t)}function Ra(e){Ic(e),e.p.forEach(uI),e.p=null}function Ic(e){e===Ri&&(Ri=e.l)}function Tm(e){return Ri={p:[],l:Ri,h:e,m:!0,_:0}}function uI(e){var t=e[Gt];t.i===0||t.i===1?t.j():t.g=!0}function ac(e,t){t._=t.p.length;var r=t.p[0],i=e!==void 0&&e!==r;return t.h.O||kr("ES5").S(t,e,i),i?(r[Gt].P&&(Ra(t),yt(4)),Vn(e)&&(e=Pa(t,e),t.l||Ca(t,e)),t.u&&kr("Patches").M(r[Gt].t,e,t.u,t.s)):e=Pa(t,r,[]),Ra(t),t.u&&t.v(t.u,t.s),e!==Jy?e:void 0}function Pa(e,t,r){if(Af(t))return t;var i=t[Gt];if(!i)return Do(t,(function(c,f){return Am(e,i,t,c,f,r)}),!0),t;if(i.A!==e)return t;if(!i.P)return Ca(e,i.t,!0),i.t;if(!i.I){i.I=!0,i.A._--;var s=i.i===4||i.i===5?i.o=Tf(i.k):i.o,a=s,u=!1;i.i===3&&(a=new Set(s),s.clear(),u=!0),Do(a,(function(c,f){return Am(e,i,s,c,f,r,u)})),Ca(e,s,!1),r&&e.u&&kr("Patches").N(i,r,e.u,e.s)}return i.o}function Am(e,t,r,i,s,a,u){if(process.env.NODE_ENV!=="production"&&s===r&&yt(5),Ai(s)){var c=Pa(e,s,a&&t&&t.i!==3&&!$c(t.R,i)?a.concat(i):void 0);if(Yy(r,i,c),!Ai(c))return;e.m=!1}else u&&r.add(s);if(Vn(s)&&!Af(s)){if(!e.h.D&&e._<1)return;Pa(e,s),t&&t.A.l||Ca(e,s)}}function Ca(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&Fo(t,r)}function uc(e,t){var r=e[Gt];return(r?Nn(r):e)[t]}function Rm(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var i=Object.getOwnPropertyDescriptor(r,t);if(i)return i;r=Object.getPrototypeOf(r)}}function Lc(e){e.P||(e.P=!0,e.l&&Lc(e.l))}function lc(e){e.o||(e.o=Tf(e.t))}function Mc(e,t,r){var i=_f(t)?kr("MapSet").F(t,r):Of(t)?kr("MapSet").T(t,r):e.O?(function(s,a){var u=Array.isArray(s),c={i:u?1:0,A:a?a.A:Om(),P:!1,I:!1,R:{},l:a,t:s,k:null,o:null,j:null,C:!1},f=c,g=Dc;u&&(f=[c],g=Eo);var h=Proxy.revocable(f,g),v=h.revoke,p=h.proxy;return c.k=p,c.j=v,p})(t,r):kr("ES5").J(t,r);return(r?r.A:Om()).p.push(i),i}function Xy(e){return Ai(e)||yt(22,e),(function t(r){if(!Vn(r))return r;var i,s=r[Gt],a=ki(r);if(s){if(!s.P&&(s.i<4||!kr("ES5").K(s)))return s.t;s.I=!0,i=Pm(r,a),s.I=!1}else i=Pm(r,a);return Do(i,(function(u,c){s&&oI(s.t,u)===c||Yy(i,u,t(c))})),a===3?new Set(i):i})(e)}function Pm(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Tf(e)}var Cm,Ri,Rf=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",lI=typeof Map<"u",cI=typeof Set<"u",km=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Jy=Rf?Symbol.for("immer-nothing"):((Cm={})["immer-nothing"]=!0,Cm),$m=Rf?Symbol.for("immer-draftable"):"__$immer_draftable",Gt=Rf?Symbol.for("immer-state"):"__$immer_state",fI={0:"Illegal state",1:"Immer drafts cannot have computed properties",2:"This object has been frozen and should not be mutated",3:function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},4:"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.",5:"Immer forbids circular references",6:"The first or second argument to `produce` must be a function",7:"The third argument to `produce` must be a function or undefined",8:"First argument to `createDraft` must be a plain object, an array, or an immerable object",9:"First argument to `finishDraft` must be a draft returned by `createDraft`",10:"The given draft is already finalized",11:"Object.defineProperty() cannot be used on an Immer draft",12:"Object.setPrototypeOf() cannot be used on an Immer draft",13:"Immer only supports deleting array indices",14:"Immer only supports setting array indices and the 'length' property",15:function(e){return"Cannot apply patch, path doesn't resolve: "+e},16:'Sets cannot have "replace" patches.',17:function(e){return"Unsupported patch operation: "+e},18:function(e){return"The plugin for '"+e+"' has not been loaded into Immer. To enable the plugin, import and call `enable"+e+"()` when initializing your application."},20:"Cannot use proxies if Proxy, Proxy.revocable or Reflect are not available",21:function(e){return"produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '"+e+"'"},22:function(e){return"'current' expects a draft, got: "+e},23:function(e){return"'original' expects a draft, got: "+e},24:"Patching reserved attributes like __proto__, prototype and constructor is not allowed"},dI=""+Object.prototype.constructor,Pf=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,pI=Object.getOwnPropertyDescriptors||function(e){var t={};return Pf(e).forEach((function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)})),t},hI={},Dc={get:function(e,t){if(t===Gt)return e;var r=Nn(e);if(!$c(r,t))return(function(s,a,u){var c,f=Rm(a,u);return f?"value"in f?f.value:(c=f.get)===null||c===void 0?void 0:c.call(s.k):void 0})(e,r,t);var i=r[t];return e.I||!Vn(i)?i:i===uc(e.t,t)?(lc(e),e.o[t]=Mc(e.A.h,i,e)):i},has:function(e,t){return t in Nn(e)},ownKeys:function(e){return Reflect.ownKeys(Nn(e))},set:function(e,t,r){var i=Rm(Nn(e),t);if(i!=null&&i.set)return i.set.call(e.k,r),!0;if(!e.P){var s=uc(Nn(e),t),a=s==null?void 0:s[Gt];if(a&&a.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(sI(r,s)&&(r!==void 0||$c(e.t,t)))return!0;lc(e),Lc(e)}return e.o[t]===r&&(r!==void 0||t in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[t])||(e.o[t]=r,e.R[t]=!0),!0},deleteProperty:function(e,t){return uc(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,lc(e),Lc(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=Nn(e),i=Reflect.getOwnPropertyDescriptor(r,t);return i&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:i.enumerable,value:r[t]}},defineProperty:function(){yt(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){yt(12)}},Eo={};Do(Dc,(function(e,t){Eo[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Eo.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&yt(13),Eo.set.call(this,e,t,void 0)},Eo.set=function(e,t,r){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&yt(14),Dc.set.call(this,e[0],t,r,e[0])};var gI=(function(){function e(r){var i=this;this.O=km,this.D=!0,this.produce=function(s,a,u){if(typeof s=="function"&&typeof a!="function"){var c=a;a=s;var f=i;return function(d){var b=this;d===void 0&&(d=c);for(var m=arguments.length,S=Array(m>1?m-1:0),E=1;E<m;E++)S[E-1]=arguments[E];return f.produce(d,(function(R){var O;return(O=a).call.apply(O,[b,R].concat(S))}))}}var g;if(typeof a!="function"&&yt(6),u!==void 0&&typeof u!="function"&&yt(7),Vn(s)){var h=Tm(i),v=Mc(i,s,void 0),p=!0;try{g=a(v),p=!1}finally{p?Ra(h):Ic(h)}return typeof Promise<"u"&&g instanceof Promise?g.then((function(d){return sc(h,u),ac(d,h)}),(function(d){throw Ra(h),d})):(sc(h,u),ac(g,h))}if(!s||typeof s!="object"){if((g=a(s))===void 0&&(g=s),g===Jy&&(g=void 0),i.D&&Fo(g,!0),u){var y=[],x=[];kr("Patches").M(s,g,y,x),u(y,x)}return g}yt(21,s)},this.produceWithPatches=function(s,a){if(typeof s=="function")return function(g){for(var h=arguments.length,v=Array(h>1?h-1:0),p=1;p<h;p++)v[p-1]=arguments[p];return i.produceWithPatches(g,(function(y){return s.apply(void 0,[y].concat(v))}))};var u,c,f=i.produce(s,a,(function(g,h){u=g,c=h}));return typeof Promise<"u"&&f instanceof Promise?f.then((function(g){return[g,u,c]})):[f,u,c]},typeof(r==null?void 0:r.useProxies)=="boolean"&&this.setUseProxies(r.useProxies),typeof(r==null?void 0:r.autoFreeze)=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var t=e.prototype;return t.createDraft=function(r){Vn(r)||yt(8),Ai(r)&&(r=Xy(r));var i=Tm(this),s=Mc(this,r,void 0);return s[Gt].C=!0,Ic(i),s},t.finishDraft=function(r,i){var s=r&&r[Gt];process.env.NODE_ENV!=="production"&&(s&&s.C||yt(9),s.I&&yt(10));var a=s.A;return sc(a,i),ac(void 0,a)},t.setAutoFreeze=function(r){this.D=r},t.setUseProxies=function(r){r&&!km&&yt(20),this.O=r},t.applyPatches=function(r,i){var s;for(s=i.length-1;s>=0;s--){var a=i[s];if(a.path.length===0&&a.op==="replace"){r=a.value;break}}s>-1&&(i=i.slice(s+1));var u=kr("Patches").$;return Ai(r)?u(r,i):this.produce(r,(function(c){return u(c,i)}))},e})(),Kt=new gI,mI=Kt.produce;Kt.produceWithPatches.bind(Kt);Kt.setAutoFreeze.bind(Kt);Kt.setUseProxies.bind(Kt);Kt.applyPatches.bind(Kt);Kt.createDraft.bind(Kt);Kt.finishDraft.bind(Kt);function vI(e){var t=B.useState(function(){return Fo(typeof e=="function"?e():e,!0)}),r=t[1];return[t[0],B.useCallback(function(i){r(typeof i=="function"?mI(i):Fo(i))},[])]}const yI=process.env.NODE_ENV==="development",cc=yI&&typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:null,wI=(e,t,r)=>{const[i,s]=vI(e),a=B.useRef(null);B.useEffect(()=>{var f;return r&&(a.current=cc==null?void 0:cc.connect({name:r,trace:!0}),(f=a.current)==null||f.init(e)),()=>{var g,h;(h=(g=a.current)==null?void 0:g.disconnect)==null||h.call(g)}},[]);const u=t&&typeof t=="object"?t:{},c=B.useMemo(()=>Object.keys(u).reduce((f,g)=>({...f,[g]:h=>(s(v=>{var p;u[g](v,h),(p=a.current)==null||p.send({type:u[g].name},Xy(v))}),c)}),{}),[s]);return{state:i,dispatch:c}};function Vr(e){return typeof e=="function"}function Qy(e){var t=function(i){Error.call(i),i.stack=new Error().stack},r=e(t);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var fc=Qy(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription:
202
202
  `+r.map(function(i,s){return s+1+") "+i.toString()}).join(`
203
- `):"",this.name="UnsubscriptionError",this.errors=r}});function Rc(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var Ua=(function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,r,i,s,a;if(!this.closed){this.closed=!0;var l=this._parentage;if(l)if(this._parentage=null,Array.isArray(l))try{for(var c=cc(l),f=c.next();!f.done;f=c.next()){var m=f.value;m.remove(this)}}catch(d){t={error:d}}finally{try{f&&!f.done&&(r=c.return)&&r.call(c)}finally{if(t)throw t.error}}else l.remove(this);var v=this.initialTeardown;if(Zr(v))try{v()}catch(d){a=d instanceof rc?d.errors:[d]}var g=this._finalizers;if(g){this._finalizers=null;try{for(var p=cc(g),b=p.next();!b.done;b=p.next()){var x=b.value;try{Sv(x)}catch(d){a=a??[],d instanceof rc?a=ma(ma([],fc(a)),fc(d.errors)):a.push(d)}}}catch(d){i={error:d}}finally{try{b&&!b.done&&(s=p.return)&&s.call(p)}finally{if(i)throw i.error}}}if(a)throw new rc(a)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)Sv(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(t)}},e.prototype._hasParent=function(t){var r=this._parentage;return r===t||Array.isArray(r)&&r.includes(t)},e.prototype._addParent=function(t){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(t),r):r?[r,t]:t},e.prototype._removeParent=function(t){var r=this._parentage;r===t?this._parentage=null:Array.isArray(r)&&Rc(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&Rc(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e})(),Wy=Ua.EMPTY;function By(e){return e instanceof Ua||e&&"closed"in e&&Zr(e.remove)&&Zr(e.add)&&Zr(e.unsubscribe)}function Sv(e){Zr(e)?e():e.unsubscribe()}var tI={Promise:void 0},rI={setTimeout:function(e,t){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];return setTimeout.apply(void 0,ma([e,t],fc(r)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function nI(e){rI.setTimeout(function(){throw e})}function Ev(){}function da(e){e()}var Uy=(function(e){La(t,e);function t(r){var i=e.call(this)||this;return i.isStopped=!1,r?(i.destination=r,By(r)&&r.add(i)):i.destination=sI,i}return t.create=function(r,i,s){return new Pc(r,i,s)},t.prototype.next=function(r){this.isStopped||this._next(r)},t.prototype.error=function(r){this.isStopped||(this.isStopped=!0,this._error(r))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(r){this.destination.next(r)},t.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t})(Ua),iI=(function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var r=this.partialObserver;if(r.next)try{r.next(t)}catch(i){ea(i)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(i){ea(i)}else ea(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){ea(r)}},e})(),Pc=(function(e){La(t,e);function t(r,i,s){var a=e.call(this)||this,l;return Zr(r)||!r?l={next:r??void 0,error:i??void 0,complete:s??void 0}:l=r,a.destination=new iI(l),a}return t})(Uy);function ea(e){nI(e)}function oI(e){throw e}var sI={closed:!0,next:Ev,error:oI,complete:Ev},aI=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function uI(e){return e}function lI(e){return e.length===0?uI:e.length===1?e[0]:function(r){return e.reduce(function(i,s){return s(i)},r)}}var _v=(function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(t,r,i){var s=this,a=fI(t)?t:new Pc(t,r,i);return da(function(){var l=s,c=l.operator,f=l.source;a.add(c?c.call(a,f):f?s._subscribe(a):s._trySubscribe(a))}),a},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(r){t.error(r)}},e.prototype.forEach=function(t,r){var i=this;return r=Ov(r),new r(function(s,a){var l=new Pc({next:function(c){try{t(c)}catch(f){a(f),l.unsubscribe()}},error:a,complete:s});i.subscribe(l)})},e.prototype._subscribe=function(t){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(t)},e.prototype[aI]=function(){return this},e.prototype.pipe=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return lI(t)(this)},e.prototype.toPromise=function(t){var r=this;return t=Ov(t),new t(function(i,s){var a;r.subscribe(function(l){return a=l},function(l){return s(l)},function(){return i(a)})})},e.create=function(t){return new e(t)},e})();function Ov(e){var t;return(t=e??tI.Promise)!==null&&t!==void 0?t:Promise}function cI(e){return e&&Zr(e.next)&&Zr(e.error)&&Zr(e.complete)}function fI(e){return e&&e instanceof Uy||cI(e)&&By(e)}var dI=zy(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),kr=(function(e){La(t,e);function t(){var r=e.call(this)||this;return r.closed=!1,r.currentObservers=null,r.observers=[],r.isStopped=!1,r.hasError=!1,r.thrownError=null,r}return t.prototype.lift=function(r){var i=new Av(this,this);return i.operator=r,i},t.prototype._throwIfClosed=function(){if(this.closed)throw new dI},t.prototype.next=function(r){var i=this;da(function(){var s,a;if(i._throwIfClosed(),!i.isStopped){i.currentObservers||(i.currentObservers=Array.from(i.observers));try{for(var l=cc(i.currentObservers),c=l.next();!c.done;c=l.next()){var f=c.value;f.next(r)}}catch(m){s={error:m}}finally{try{c&&!c.done&&(a=l.return)&&a.call(l)}finally{if(s)throw s.error}}}})},t.prototype.error=function(r){var i=this;da(function(){if(i._throwIfClosed(),!i.isStopped){i.hasError=i.isStopped=!0,i.thrownError=r;for(var s=i.observers;s.length;)s.shift().error(r)}})},t.prototype.complete=function(){var r=this;da(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=!0;for(var i=r.observers;i.length;)i.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(r){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,r)},t.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},t.prototype._innerSubscribe=function(r){var i=this,s=this,a=s.hasError,l=s.isStopped,c=s.observers;return a||l?Wy:(this.currentObservers=null,c.push(r),new Ua(function(){i.currentObservers=null,Rc(c,r)}))},t.prototype._checkFinalizedStatuses=function(r){var i=this,s=i.hasError,a=i.thrownError,l=i.isStopped;s?r.error(a):l&&r.complete()},t.prototype.asObservable=function(){var r=new _v;return r.source=this,r},t.create=function(r,i){return new Av(r,i)},t})(_v),Av=(function(e){La(t,e);function t(r,i){var s=e.call(this)||this;return s.destination=r,s.source=i,s}return t.prototype.next=function(r){var i,s;(s=(i=this.destination)===null||i===void 0?void 0:i.next)===null||s===void 0||s.call(i,r)},t.prototype.error=function(r){var i,s;(s=(i=this.destination)===null||i===void 0?void 0:i.error)===null||s===void 0||s.call(i,r)},t.prototype.complete=function(){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||i===void 0||i.call(r)},t.prototype._subscribe=function(r){var i,s;return(s=(i=this.source)===null||i===void 0?void 0:i.subscribe(r))!==null&&s!==void 0?s:Wy},t})(kr),Hy=(e=>(e.RELOAD="reload",e.RECOMPUTE="recompute",e))(Hy||{}),qy=(e=>(e.RENAME="rename",e.TYPE_CHANGE="type-change",e))(qy||{});const pI=new kr,hI=new kr,Zy=new kr;var Gy=(e=>(e.SAVE_ALL="save-all",e))(Gy||{});const gI=new kr;var Ky=(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.DIAGNOSTIC_REFRESH="diagnostic-refresh",e))(Ky||{});const vI=new kr;var Vy=(e=>(e.RESEND_BREAKPOINTS="resend-breakpoints",e))(Vy||{});const mI=new kr,yI=new kr;var $o=(e=>(e.EVENT_STARTED="event-started",e.EVENT_ENDED="event-ended",e.EVENT_EMITED="event-emited",e.REQUEST_SENT="request-sent",e))($o||{});const Aa=new kr,bI=new kr,xf=31;var Sf=(e=>(e.EMPTY="Please enter a valid name",e.LENGTH_EXCEEDED=`The name is too long, it should not exceed ${xf} characters`,e.SHOULD_START_WITH_LETTER="The name can only start with a letter or a Japanese character",e.INVALID="Invalid name",e))(Sf||{});function Xy(e){if(e==="")throw new Error("Please enter a valid name");if(e.length>xf)throw new Error(Sf.LENGTH_EXCEEDED);if(!/^[a-zA-Z\u3040-\u30FF\u3400-\u4DBF\u4E00-\u9FAF]/.test(e))throw new Error("The name can only start with a letter or a Japanese character");if(!/^[\w\u3040-\u30FF\u3400-\u4DBF\u4E00-\u9FAF-]+$/i.test(e))throw new Error("Invalid name");return!0}function wI(e){if(!e)return null;if(typeof e=="string")try{Xy(e)}catch(t){return t.message}}function xI(e,t){let r="";if(["array","object"].includes(t))try{const i=JSON.parse(e);t==="array"&&(!Array.isArray(i)||!rt.isObject(i))&&(r=`Invalid value for type ${t}`),t==="object"&&(!rt.isObject(i)||Array.isArray(i))&&(r=`Invalid value for type ${t}`)}catch{r=`Invalid value for type ${t}`}return t==="date"&&(new RegExp(/^(0?[1-9]|[12][0-9]|3[01])[/-](0?[1-9]|1[012])[/-]\d{4}$/).test(e)||(r=`Invalid value for type ${t}`)),t==="number"&&isNaN(+e)&&(r=`Invalid value for type ${t}`),["boolean","bool"].includes(t)&&typeof e!="boolean"&&!["true","false"].includes(e)&&(r=`Invalid value for type ${t}`),r}function SI(){return{PLACEHOLDER_PREFIX:`@!MASK_${Date.now().toString(36)+Math.random().toString(36).substring(2,8)}_`,counter:0}}function Ha(e){const{PLACEHOLDER_PREFIX:t,counter:r}=SI();let i=r;const s=[],a="@!",l=v=>(s.push(v),`${t}${i++}${a}`);let c=e.replace(/("(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/g,l);c=c.replace(/([\{\s]\s*\w+\s*)(:\s*\d+)/g,(v,g,p)=>g+l(p)),c=c.replace(/:\d{2}:\d{2}/g,l);const f=new RegExp(":(?!4D\\.\\w+)[CPK]?\\d+","g");let m=c.replace(f,"");for(let v=0;v<s.length;v++){const p=`${t}${v}${a}`.replace(/([.*+?^${}()|[\]\\])/g,"\\$1"),b=new RegExp(p,"g");m=m.replace(b,s[v])}return m}var Ef=(e=>(e.METHODS="method",e.WEBFORMS="webform",e.CLASSES="class",e.WELCOME="welcome",e.SETTINGS="settings",e.ROOT="root",e.REPORTS="report",e))(Ef||{});const hn={CLASSES:"Classes",METHODS:"Methods",SHARED:"Shared",WEBFORMS:"WebForms",CLASSES_FOLDER:"ClassesFolder",REPORTS:"Reports",DEBUGGER:"Debugger"};var ft=(e=>(e.FOLDER="folder",e.WEBFORM="webform",e.REPORT="report",e.METHOD="method",e.CLASS="class",e.CLASS_FOLDER="classfolder",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.HTTP_HANDLERS="http-handlers",e.LOCALIZATION="localization",e.MODEL="model",e.DATA_EXPLORER="dataexplorer",e.MOBILE="mobile",e.MOBILEFORM="mform",e.FILE="file",e.TEXT="text",e))(ft||{}),bn=(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))(bn||{}),_f=(e=>(e[e.DISABLED=0]="DISABLED",e[e.ENABLED=1]="ENABLED",e))(_f||{});const Yy="roles.json",Jy="qodlyApp.json",EI="model.4DModel",Qy="HTTPHandlers.json",e0="Shared/i18n.json";function _I(e){const t=Of(e);switch(t){case ft.SETTINGS:return{filename:"Settings",type:t};case ft.HTTP_HANDLERS:return{filename:"HTTP Handlers",type:t};case ft.ROLES:return{filename:"Roles & Privileges",type:t};case ft.LOCALIZATION:return{filename:"Localization",type:t};case ft.MODEL:return{filename:"Model",type:t};default:{const r=e.split("/"),[i]=r[1].split(".");return{filename:i,type:t}}}}function Of(e){const t=e.split("."),r=t.pop(),i=t.join(".").split("/")[0];switch(!0){case r==="4DModel":return ft.MODEL;case r==="WebForm":return ft.WEBFORM;case(["4dm","4qs","4qm"].includes(r)&&i===hn.METHODS):return ft.METHOD;case(["4dm","4qs","4qm"].includes(r)&&i===hn.CLASSES):return ft.CLASS;case e===Yy:return ft.ROLES;case e===Qy:return ft.HTTP_HANDLERS;case e===Jy:return ft.SETTINGS;case e===e0:return ft.LOCALIZATION;default:return ft.TEXT}}function OI(e,t=!1){switch(e){case hn.REPORTS:case"report":return"QoDoc";case hn.WEBFORMS:case"webform":return"WebForm";case"Mobile":case"mform":return"MForm";case"class":case"method":case hn.CLASSES:case hn.METHODS:return t?"4qs":"4dm";default:return""}}function AI(e,t=""){const r=new RegExp("(?<=\\/)(\\w+)(?=\\.)").exec(e);return r?r[1]:t}class t0{constructor(){this.current=Promise.resolve()}lock(){let t;const r=new Promise(s=>{t=s}),i=this.current.then(()=>t);return this.current=r,i}}function Af(){const e=new t0;return async t=>{const r=await e.lock();try{const i=await t();return r(),i}catch(i){console.error(i),r();return}}}const r0=rt.curry((e,t,r)=>e&&rt.get(r,e)===t),TI=rt.curry((e,t,r)=>rt.get(r,e)!==t),RI=rt.curry((e,t)=>rt.get(t,"id")!==e),PI=rt.curry((e,t)=>rt.get(t,"id")===e),CI=rt.curry((e,t)=>rt.get(t,"path")===e);function kI(e="id",t,r){return r.findIndex(r0(e,t))!==-1}function $I(e){if(!e)return"";const{id:t,namespace:r}=e;return r&&t?`${r}:${t}`:t}function n0(e){return["bool","word","string","text","uuid","short","long","number","long64","duration","object","date","image","blob"].includes(e.type||"")}function II(e){return e.type==="object"}function i0(e){var t;return e.kind==="relatedEntities"||((t=e.type)==null?void 0:t.includes("Selection"))||e.behavior==="relatedEntities"}function o0(e){return e.kind==="relatedEntity"||e.behavior==="relatedEntity"||!n0(e)}function LI(e){return i0(e)||o0(e)}function MI(e){return e.applyTo==="dataStore"}function FI(e){return e.applyTo==="dataClass"}function DI(e){return e.applyTo==="entity"}function NI(e){return e.applyTo==="entityCollection"}function jI(e){return e.type==="entity"}function zI(e){return e.type==="entitysel"}function s0(e){return e.dataType==="array"}function a0(e){return e.dataType==="object"}function u0(e){return e.type==="scalar"}function WI(e){return s0(e)||a0(e)||u0(e)}const BI=e=>e!=null&&e.type==="entity",UI=e=>e.type==="entitysel",HI=e=>e.type==="array"||e.type==="scalar"&&e.dataType==="array",qI=e=>e.type==="object"||e.type==="scalar"&&e.dataType==="object",ZI=e=>e.type==="scalar"&&e.dataType==="date";function GI(){return new Promise((e,t)=>{window.addEventListener("bundle:ready",r=>r.data?e():t(r.caughtErr))})}function KI(){return new Promise(e=>{window.addEventListener("i18n:ready",()=>e())})}var Io=(e=>(e.capable="capable",e.incapable="incapable",e.indifferent="indifferent",e))(Io||{}),l0=(e=>(e.soap="soap",e.web="web",e.sql="sql",e.rest="rest",e))(l0||{}),Tf=(e=>(e.table="table",e.catalog="catalog",e.currentRecord="currentRecord",e.currentSelection="currentSelection",e))(Tf||{});const VI={publishedSoap:"soap",publishedWeb:"web",publishedSql:"sql",publishedRest:"rest"};function XI(e){var a;let t={};try{const l=((a=e.match(/\/\/%attributes = (.*)/))==null?void 0:a[1])||"";t=JSON.parse(l)}catch{}const{published4DMobile:r,...i}=t;return{...{invisible:!1,shared:!1,executedOnServer:!1,preemptive:Io.indifferent,publishedSoap:!1,publishedWsdl:!1,publishedWeb:!1,publishedSql:!1,publishedRest:!!r,publishedRestOptions:r||{table:"",scope:Tf.table}},...i}}function c0(e){const t={};return e.invisible&&(t.invisible=!0),e.shared&&(t.shared=!0),e.executedOnServer&&(t.executedOnServer=!0),e.preemptive&&[Io.capable,Io.incapable].includes(e.preemptive)&&(t.preemptive=e.preemptive),e.publishedSoap&&(t.publishedSoap=!0,e.publishedWsdl&&(t.publishedWsdl=!0)),e.publishedWeb&&(t.publishedWeb=!0),e.publishedSql&&(t.publishedSql=!0),e.publishedRest&&e.publishedRestOptions&&(t.published4DMobile=e.publishedRestOptions),JSON.stringify(t).replace(/"(true|false)"/g,"$1")}function YI(e,t,r=!1){const i=rt.isString(t)?t:c0(t);if(!r&&f0(e))return e;const s=d0(e);return`//%attributes = ${i}\r
204
- ${s}`}function f0(e){return/^\/\/%attributes.*(?:\r\n|\n)?/g.test(e)}function d0(e){return e.replace(/^\/\/%attributes.*(?:\r\n|\n)?/g,"")}const JI=()=>Bc.uuid().replaceAll("-","").toUpperCase(),QI=e=>e.toLowerCase().replace(/[^a-z0-9]/g,"_").replace(/_{2,}/g,"_").replace(/^_|_$/g,""),it="/rest/$designer",Uo="/rest/$designer-ext";function e2(...e){return t=>{if(e.length===0)return t;const r={...t};return e.forEach(i=>{typeof r[i]=="string"&&(r[i]=new Date(r[i]))}),r}}class Cc extends Error{constructor(t,r,i){super(),this.url=t,this.response=r,this.data=i}log(){console.error("Error while sending the request",this)}}async function Me(e,t){var s;Aa.next({action:$o.REQUEST_SENT});const r=await window.fetch(e,t);if(/401/.test(r.status.toString())&&(window.location.href="/login.html?redirect=studio"),/^[45]/.test(r.status.toString())){let a;try{const l=await r.json();((s=l==null?void 0:l.__ERROR)==null?void 0:s.some(f=>f.errCode===1651))&&Aa.next({action:$o.EVENT_EMITED,payload:{eventName:"onsessionexpired"}}),a=new Cc(e,r,l)}catch{a=new Cc(e,r)}throw a.log(),a}return await r.json()}function t2(e){return Aa.next({action:$o.REQUEST_SENT}),e}var xr={},ht={},Tv;function Fn(){if(Tv)return ht;Tv=1;var e=ht.ValidationError=function(d,w,h,S,E,R){if(Array.isArray(S)?(this.path=S,this.property=S.reduce(function(k,B){return k+c(B)},"instance")):S!==void 0&&(this.property=S),d&&(this.message=d),h){var O=h.$id||h.id;this.schema=O||h}w!==void 0&&(this.instance=w),this.name=E,this.argument=R,this.stack=this.toString()};e.prototype.toString=function(){return this.property+" "+this.message};var t=ht.ValidatorResult=function(d,w,h,S){this.instance=d,this.schema=w,this.options=h,this.path=S.path,this.propertyPath=S.propertyPath,this.errors=[],this.throwError=h&&h.throwError,this.throwFirst=h&&h.throwFirst,this.throwAll=h&&h.throwAll,this.disableFormat=h&&h.disableFormat===!0};t.prototype.addError=function(d){var w;if(typeof d=="string")w=new e(d,this.instance,this.schema,this.path);else{if(!d)throw new Error("Missing error detail");if(!d.message)throw new Error("Missing error message");if(!d.name)throw new Error("Missing validator type");w=new e(d.message,this.instance,this.schema,this.path,d.name,d.argument)}if(this.errors.push(w),this.throwFirst)throw new i(this);if(this.throwError)throw w;return w},t.prototype.importErrors=function(d){typeof d=="string"||d&&d.validatorType?this.addError(d):d&&d.errors&&(this.errors=this.errors.concat(d.errors))};function r(x,d){return d+": "+x.toString()+`
205
- `}t.prototype.toString=function(d){return this.errors.map(r).join("")},Object.defineProperty(t.prototype,"valid",{get:function(){return!this.errors.length}}),ht.ValidatorResultError=i;function i(x){typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,i),this.instance=x.instance,this.schema=x.schema,this.options=x.options,this.errors=x.errors}i.prototype=new Error,i.prototype.constructor=i,i.prototype.name="Validation Error";var s=ht.SchemaError=function x(d,w){this.message=d,this.schema=w,Error.call(this,d),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,x)};s.prototype=Object.create(Error.prototype,{constructor:{value:s,enumerable:!1},name:{value:"SchemaError",enumerable:!1}});var a=ht.SchemaContext=function(d,w,h,S,E){this.schema=d,this.options=w,Array.isArray(h)?(this.path=h,this.propertyPath=h.reduce(function(R,O){return R+c(O)},"instance")):this.propertyPath=h,this.base=S,this.schemas=E};a.prototype.resolve=function(d){return b(this.base,d)},a.prototype.makeChild=function(d,w){var h=w===void 0?this.path:this.path.concat([w]),S=d.$id||d.id;let E=b(this.base,S||"");var R=new a(d,this.options,h,E,Object.create(this.schemas));return S&&!R.schemas[E]&&(R.schemas[E]=d),R};var l=ht.FORMAT_REGEXPS={"date-time":/^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-(3[01]|0[1-9]|[12][0-9])[tT ](2[0-4]|[01][0-9]):([0-5][0-9]):(60|[0-5][0-9])(\.\d+)?([zZ]|[+-]([0-5][0-9]):(60|[0-5][0-9]))$/,date:/^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-(3[01]|0[1-9]|[12][0-9])$/,time:/^(2[0-4]|[01][0-9]):([0-5][0-9]):(60|[0-5][0-9])$/,duration:/P(T\d+(H(\d+M(\d+S)?)?|M(\d+S)?|S)|\d+(D|M(\d+D)?|Y(\d+M(\d+D)?)?)(T\d+(H(\d+M(\d+S)?)?|M(\d+S)?|S))?|\d+W)/i,email:/^(?:[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+\.)*[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+@(?:(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!\.)){0,61}[a-zA-Z0-9]?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!$)){0,61}[a-zA-Z0-9]?)|(?:\[(?:(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\]))$/,"idn-email":/^("(?:[!#-\[\]-\u{10FFFF}]|\\[\t -\u{10FFFF}])*"|[!#-'*+\-/-9=?A-Z\^-\u{10FFFF}](?:\.?[!#-'*+\-/-9=?A-Z\^-\u{10FFFF}])*)@([!#-'*+\-/-9=?A-Z\^-\u{10FFFF}](?:\.?[!#-'*+\-/-9=?A-Z\^-\u{10FFFF}])*|\[[!-Z\^-\u{10FFFF}]*\])$/u,"ip-address":/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,ipv6:/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,uri:/^[a-zA-Z][a-zA-Z0-9+.-]*:[^\s]*$/,"uri-reference":/^(((([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|([A-Za-z][+\-.0-9A-Za-z]*:?)?)|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|(\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?)?))#(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|(([A-Za-z][+\-.0-9A-Za-z]*)?%[0-9A-Fa-f]{2}|[!$&-.0-9;=@_~]|[A-Za-z][+\-.0-9A-Za-z]*[!$&-*,;=@_~])(%[0-9A-Fa-f]{2}|[!$&-.0-9;=@-Z_a-z~])*((([/?](%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*)?#|[/?])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*)?|([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+(:\d*)?|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?:\d*|\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)?|[A-Za-z][+\-.0-9A-Za-z]*:?)?$/,iri:/^[a-zA-Z][a-zA-Z0-9+.-]*:[^\s]*$/,"iri-reference":/^(((([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~-\u{10FFFF}]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|([A-Za-z][+\-.0-9A-Za-z]*:?)?)|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~-\u{10FFFF}])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|(\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?)?))#(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|(([A-Za-z][+\-.0-9A-Za-z]*)?%[0-9A-Fa-f]{2}|[!$&-.0-9;=@_~-\u{10FFFF}]|[A-Za-z][+\-.0-9A-Za-z]*[!$&-*,;=@_~-\u{10FFFF}])(%[0-9A-Fa-f]{2}|[!$&-.0-9;=@-Z_a-z~-\u{10FFFF}])*((([/?](%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*)?#|[/?])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*)?|([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~-\u{10FFFF}]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~-\u{10FFFF}])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+(:\d*)?|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?:\d*|\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)?|[A-Za-z][+\-.0-9A-Za-z]*:?)?$/u,uuid:/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i,"uri-template":/(%[0-9a-f]{2}|[!#$&(-;=?@\[\]_a-z~]|\{[!#&+,./;=?@|]?(%[0-9a-f]{2}|[0-9_a-z])(\.?(%[0-9a-f]{2}|[0-9_a-z]))*(:[1-9]\d{0,3}|\*)?(,(%[0-9a-f]{2}|[0-9_a-z])(\.?(%[0-9a-f]{2}|[0-9_a-z]))*(:[1-9]\d{0,3}|\*)?)*\})*/iu,"json-pointer":/^(\/([\x00-\x2e0-@\[-}\x7f]|~[01])*)*$/iu,"relative-json-pointer":/^\d+(#|(\/([\x00-\x2e0-@\[-}\x7f]|~[01])*)*)$/iu,hostname:/^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/,"host-name":/^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/,"utc-millisec":function(x){return typeof x=="string"&&parseFloat(x)===parseInt(x,10)&&!isNaN(x)},regex:function(x){var d=!0;try{new RegExp(x)}catch{d=!1}return d},style:/[\r\n\t ]*[^\r\n\t ][^:]*:[\r\n\t ]*[^\r\n\t ;]*[\r\n\t ]*;?/,color:/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/,phone:/^\+(?:[0-9] ?){6,14}[0-9]$/,alpha:/^[a-zA-Z]+$/,alphanumeric:/^[a-zA-Z0-9]+$/};l.regexp=l.regex,l.pattern=l.regex,l.ipv4=l["ip-address"],ht.isFormat=function(d,w,h){if(typeof d=="string"&&l[w]!==void 0){if(l[w]instanceof RegExp)return l[w].test(d);if(typeof l[w]=="function")return l[w](d)}else if(h&&h.customFormats&&typeof h.customFormats[w]=="function")return h.customFormats[w](d);return!0};var c=ht.makeSuffix=function(d){return d=d.toString(),!d.match(/[.\s\[\]]/)&&!d.match(/^[\d]/)?"."+d:d.match(/^\d+$/)?"["+d+"]":"["+JSON.stringify(d)+"]"};ht.deepCompareStrict=function x(d,w){if(typeof d!=typeof w)return!1;if(Array.isArray(d))return!Array.isArray(w)||d.length!==w.length?!1:d.every(function(E,R){return x(d[R],w[R])});if(typeof d=="object"){if(!d||!w)return d===w;var h=Object.keys(d),S=Object.keys(w);return h.length!==S.length?!1:h.every(function(E){return x(d[E],w[E])})}return d===w};function f(x,d,w,h){typeof w=="object"?d[h]=g(x[h],w):x.indexOf(w)===-1&&d.push(w)}function m(x,d,w){d[w]=x[w]}function v(x,d,w,h){typeof d[h]!="object"||!d[h]?w[h]=d[h]:x[h]?w[h]=g(x[h],d[h]):w[h]=d[h]}function g(x,d){var w=Array.isArray(d),h=w&&[]||{};return w?(x=x||[],h=h.concat(x),d.forEach(f.bind(null,x,h))):(x&&typeof x=="object"&&Object.keys(x).forEach(m.bind(null,x,h)),Object.keys(d).forEach(v.bind(null,x,d,h))),h}ht.deepMerge=g,ht.objectGetPath=function(d,w){for(var h=w.split("/").slice(1),S;typeof(S=h.shift())=="string";){var E=decodeURIComponent(S.replace(/~0/,"~").replace(/~1/g,"/"));if(!(E in d))return;d=d[E]}return d};function p(x){return"/"+encodeURIComponent(x).replace(/~/g,"%7E")}ht.encodePath=function(d){return d.map(p).join("")},ht.getDecimalPlaces=function(d){var w=0;if(isNaN(d))return w;typeof d!="number"&&(d=Number(d));var h=d.toString().split("e");if(h.length===2){if(h[1][0]!=="-")return w;w=Number(h[1].slice(1))}var S=h[0].split(".");return S.length===2&&(w+=S[1].length),w},ht.isSchema=function(d){return typeof d=="object"&&d||typeof d=="boolean"};var b=ht.resolveUrl=function(d,w){const h=new URL(w,new URL(d,"resolve://"));if(h.protocol==="resolve:"){const{pathname:S,search:E,hash:R}=h;return S+E+R}return h.toString()};return ht}var nc,Rv;function r2(){if(Rv)return nc;Rv=1;var e=Fn(),t=e.ValidatorResult,r=e.SchemaError,i={};i.ignoreProperties={id:!0,default:!0,description:!0,title:!0,additionalItems:!0,then:!0,else:!0,$schema:!0,$ref:!0,extends:!0};var s=i.validators={};s.type=function(g,p,b,x){if(g===void 0)return null;var d=new t(g,p,b,x),w=Array.isArray(p.type)?p.type:[p.type];if(!w.some(this.testType.bind(this,g,p,b,x))){var h=w.map(function(S){if(S){var E=S.$id||S.id;return E?"<"+E+">":S+""}});d.addError({name:"type",argument:h,message:"is not of a type(s) "+h})}return d};function a(v,g,p,b,x){var d=g.throwError,w=g.throwAll;g.throwError=!1,g.throwAll=!1;var h=this.validateSchema(v,x,g,p);return g.throwError=d,g.throwAll=w,!h.valid&&b instanceof Function&&b(h),h.valid}s.anyOf=function(g,p,b,x){if(g===void 0)return null;var d=new t(g,p,b,x),w=new t(g,p,b,x);if(!Array.isArray(p.anyOf))throw new r("anyOf must be an array");if(!p.anyOf.some(a.bind(this,g,b,x,function(S){w.importErrors(S)}))){var h=p.anyOf.map(function(S,E){var R=S.$id||S.id;return R?"<"+R+">":S.title&&JSON.stringify(S.title)||S.$ref&&"<"+S.$ref+">"||"[subschema "+E+"]"});b.nestedErrors&&d.importErrors(w),d.addError({name:"anyOf",argument:h,message:"is not any of "+h.join(",")})}return d},s.allOf=function(g,p,b,x){if(g===void 0)return null;if(!Array.isArray(p.allOf))throw new r("allOf must be an array");var d=new t(g,p,b,x),w=this;return p.allOf.forEach(function(h,S){var E=w.validateSchema(g,h,b,x);if(!E.valid){var R=h.$id||h.id,O=R||h.title&&JSON.stringify(h.title)||h.$ref&&"<"+h.$ref+">"||"[subschema "+S+"]";d.addError({name:"allOf",argument:{id:O,length:E.errors.length,valid:E},message:"does not match allOf schema "+O+" with "+E.errors.length+" error[s]:"}),d.importErrors(E)}}),d},s.oneOf=function(g,p,b,x){if(g===void 0)return null;if(!Array.isArray(p.oneOf))throw new r("oneOf must be an array");var d=new t(g,p,b,x),w=new t(g,p,b,x),h=p.oneOf.filter(a.bind(this,g,b,x,function(E){w.importErrors(E)})).length,S=p.oneOf.map(function(E,R){var O=E.$id||E.id;return O||E.title&&JSON.stringify(E.title)||E.$ref&&"<"+E.$ref+">"||"[subschema "+R+"]"});return h!==1&&(b.nestedErrors&&d.importErrors(w),d.addError({name:"oneOf",argument:S,message:"is not exactly one from "+S.join(",")})),d},s.if=function(g,p,b,x){if(g===void 0)return null;if(!e.isSchema(p.if))throw new Error('Expected "if" keyword to be a schema');var d=a.call(this,g,b,x,null,p.if),w=new t(g,p,b,x),h;if(d){if(p.then===void 0)return;if(!e.isSchema(p.then))throw new Error('Expected "then" keyword to be a schema');h=this.validateSchema(g,p.then,b,x.makeChild(p.then)),w.importErrors(h)}else{if(p.else===void 0)return;if(!e.isSchema(p.else))throw new Error('Expected "else" keyword to be a schema');h=this.validateSchema(g,p.else,b,x.makeChild(p.else)),w.importErrors(h)}return w};function l(v,g){if(Object.hasOwnProperty.call(v,g))return v[g];if(g in v){for(;v=Object.getPrototypeOf(v);)if(Object.propertyIsEnumerable.call(v,g))return v[g]}}s.propertyNames=function(g,p,b,x){if(this.types.object(g)){var d=new t(g,p,b,x),w=p.propertyNames!==void 0?p.propertyNames:{};if(!e.isSchema(w))throw new r('Expected "propertyNames" to be a schema (object or boolean)');for(var h in g)if(l(g,h)!==void 0){var S=this.validateSchema(h,w,b,x.makeChild(w));d.importErrors(S)}return d}},s.properties=function(g,p,b,x){if(this.types.object(g)){var d=new t(g,p,b,x),w=p.properties||{};for(var h in w){var S=w[h];if(S!==void 0){if(S===null)throw new r('Unexpected null, expected schema in "properties"');typeof b.preValidateProperty=="function"&&b.preValidateProperty(g,h,S,b,x);var E=l(g,h),R=this.validateSchema(E,S,b,x.makeChild(S,h));R.instance!==d.instance[h]&&(d.instance[h]=R.instance),d.importErrors(R)}}return d}};function c(v,g,p,b,x,d){if(this.types.object(v)&&!(g.properties&&g.properties[x]!==void 0))if(g.additionalProperties===!1)d.addError({name:"additionalProperties",argument:x,message:"is not allowed to have the additional property "+JSON.stringify(x)});else{var w=g.additionalProperties||{};typeof p.preValidateProperty=="function"&&p.preValidateProperty(v,x,w,p,b);var h=this.validateSchema(v[x],w,p,b.makeChild(w,x));h.instance!==d.instance[x]&&(d.instance[x]=h.instance),d.importErrors(h)}}s.patternProperties=function(g,p,b,x){if(this.types.object(g)){var d=new t(g,p,b,x),w=p.patternProperties||{};for(var h in g){var S=!0;for(var E in w){var R=w[E];if(R!==void 0){if(R===null)throw new r('Unexpected null, expected schema in "patternProperties"');try{var O=new RegExp(E,"u")}catch{O=new RegExp(E)}if(O.test(h)){S=!1,typeof b.preValidateProperty=="function"&&b.preValidateProperty(g,h,R,b,x);var k=this.validateSchema(g[h],R,b,x.makeChild(R,h));k.instance!==d.instance[h]&&(d.instance[h]=k.instance),d.importErrors(k)}}}S&&c.call(this,g,p,b,x,h,d)}return d}},s.additionalProperties=function(g,p,b,x){if(this.types.object(g)){if(p.patternProperties)return null;var d=new t(g,p,b,x);for(var w in g)c.call(this,g,p,b,x,w,d);return d}},s.minProperties=function(g,p,b,x){if(this.types.object(g)){var d=new t(g,p,b,x),w=Object.keys(g);return w.length>=p.minProperties||d.addError({name:"minProperties",argument:p.minProperties,message:"does not meet minimum property length of "+p.minProperties}),d}},s.maxProperties=function(g,p,b,x){if(this.types.object(g)){var d=new t(g,p,b,x),w=Object.keys(g);return w.length<=p.maxProperties||d.addError({name:"maxProperties",argument:p.maxProperties,message:"does not meet maximum property length of "+p.maxProperties}),d}},s.items=function(g,p,b,x){var d=this;if(this.types.array(g)&&p.items!==void 0){var w=new t(g,p,b,x);return g.every(function(h,S){if(Array.isArray(p.items))var E=p.items[S]===void 0?p.additionalItems:p.items[S];else var E=p.items;if(E===void 0)return!0;if(E===!1)return w.addError({name:"items",message:"additionalItems not permitted"}),!1;var R=d.validateSchema(h,E,b,x.makeChild(E,S));return R.instance!==w.instance[S]&&(w.instance[S]=R.instance),w.importErrors(R),!0}),w}},s.contains=function(g,p,b,x){var d=this;if(this.types.array(g)&&p.contains!==void 0){if(!e.isSchema(p.contains))throw new Error('Expected "contains" keyword to be a schema');var w=new t(g,p,b,x),h=g.some(function(S,E){var R=d.validateSchema(S,p.contains,b,x.makeChild(p.contains,E));return R.errors.length===0});return h===!1&&w.addError({name:"contains",argument:p.contains,message:"must contain an item matching given schema"}),w}},s.minimum=function(g,p,b,x){if(this.types.number(g)){var d=new t(g,p,b,x);return p.exclusiveMinimum&&p.exclusiveMinimum===!0?g>p.minimum||d.addError({name:"minimum",argument:p.minimum,message:"must be greater than "+p.minimum}):g>=p.minimum||d.addError({name:"minimum",argument:p.minimum,message:"must be greater than or equal to "+p.minimum}),d}},s.maximum=function(g,p,b,x){if(this.types.number(g)){var d=new t(g,p,b,x);return p.exclusiveMaximum&&p.exclusiveMaximum===!0?g<p.maximum||d.addError({name:"maximum",argument:p.maximum,message:"must be less than "+p.maximum}):g<=p.maximum||d.addError({name:"maximum",argument:p.maximum,message:"must be less than or equal to "+p.maximum}),d}},s.exclusiveMinimum=function(g,p,b,x){if(typeof p.exclusiveMinimum!="boolean"&&this.types.number(g)){var d=new t(g,p,b,x),w=g>p.exclusiveMinimum;return w||d.addError({name:"exclusiveMinimum",argument:p.exclusiveMinimum,message:"must be strictly greater than "+p.exclusiveMinimum}),d}},s.exclusiveMaximum=function(g,p,b,x){if(typeof p.exclusiveMaximum!="boolean"&&this.types.number(g)){var d=new t(g,p,b,x),w=g<p.exclusiveMaximum;return w||d.addError({name:"exclusiveMaximum",argument:p.exclusiveMaximum,message:"must be strictly less than "+p.exclusiveMaximum}),d}};var f=function(g,p,b,x,d,w){if(this.types.number(g)){var h=p[d];if(h==0)throw new r(d+" cannot be zero");var S=new t(g,p,b,x),E=e.getDecimalPlaces(g),R=e.getDecimalPlaces(h),O=Math.max(E,R),k=Math.pow(10,O);return Math.round(g*k)%Math.round(h*k)!==0&&S.addError({name:d,argument:h,message:w+JSON.stringify(h)}),S}};s.multipleOf=function(g,p,b,x){return f.call(this,g,p,b,x,"multipleOf","is not a multiple of (divisible by) ")},s.divisibleBy=function(g,p,b,x){return f.call(this,g,p,b,x,"divisibleBy","is not divisible by (multiple of) ")},s.required=function(g,p,b,x){var d=new t(g,p,b,x);return g===void 0&&p.required===!0?d.addError({name:"required",message:"is required"}):this.types.object(g)&&Array.isArray(p.required)&&p.required.forEach(function(w){l(g,w)===void 0&&d.addError({name:"required",argument:w,message:"requires property "+JSON.stringify(w)})}),d},s.pattern=function(g,p,b,x){if(this.types.string(g)){var d=new t(g,p,b,x),w=p.pattern;try{var h=new RegExp(w,"u")}catch{h=new RegExp(w)}return g.match(h)||d.addError({name:"pattern",argument:p.pattern,message:"does not match pattern "+JSON.stringify(p.pattern.toString())}),d}},s.format=function(g,p,b,x){if(g!==void 0){var d=new t(g,p,b,x);return!d.disableFormat&&!e.isFormat(g,p.format,this)&&d.addError({name:"format",argument:p.format,message:"does not conform to the "+JSON.stringify(p.format)+" format"}),d}},s.minLength=function(g,p,b,x){if(this.types.string(g)){var d=new t(g,p,b,x),w=g.match(/[\uDC00-\uDFFF]/g),h=g.length-(w?w.length:0);return h>=p.minLength||d.addError({name:"minLength",argument:p.minLength,message:"does not meet minimum length of "+p.minLength}),d}},s.maxLength=function(g,p,b,x){if(this.types.string(g)){var d=new t(g,p,b,x),w=g.match(/[\uDC00-\uDFFF]/g),h=g.length-(w?w.length:0);return h<=p.maxLength||d.addError({name:"maxLength",argument:p.maxLength,message:"does not meet maximum length of "+p.maxLength}),d}},s.minItems=function(g,p,b,x){if(this.types.array(g)){var d=new t(g,p,b,x);return g.length>=p.minItems||d.addError({name:"minItems",argument:p.minItems,message:"does not meet minimum length of "+p.minItems}),d}},s.maxItems=function(g,p,b,x){if(this.types.array(g)){var d=new t(g,p,b,x);return g.length<=p.maxItems||d.addError({name:"maxItems",argument:p.maxItems,message:"does not meet maximum length of "+p.maxItems}),d}};function m(v,g,p){var b,x=p.length;for(b=g+1,x;b<x;b++)if(e.deepCompareStrict(v,p[b]))return!1;return!0}return s.uniqueItems=function(g,p,b,x){if(p.uniqueItems===!0&&this.types.array(g)){var d=new t(g,p,b,x);return g.every(m)||d.addError({name:"uniqueItems",message:"contains duplicate item"}),d}},s.dependencies=function(g,p,b,x){if(this.types.object(g)){var d=new t(g,p,b,x);for(var w in p.dependencies)if(g[w]!==void 0){var h=p.dependencies[w],S=x.makeChild(h,w);if(typeof h=="string"&&(h=[h]),Array.isArray(h))h.forEach(function(R){g[R]===void 0&&d.addError({name:"dependencies",argument:S.propertyPath,message:"property "+R+" not found, required by "+S.propertyPath})});else{var E=this.validateSchema(g,h,b,S);d.instance!==E.instance&&(d.instance=E.instance),E&&E.errors.length&&(d.addError({name:"dependencies",argument:S.propertyPath,message:"does not meet dependency required by "+S.propertyPath}),d.importErrors(E))}}return d}},s.enum=function(g,p,b,x){if(g===void 0)return null;if(!Array.isArray(p.enum))throw new r("enum expects an array",p);var d=new t(g,p,b,x);return p.enum.some(e.deepCompareStrict.bind(null,g))||d.addError({name:"enum",argument:p.enum,message:"is not one of enum values: "+p.enum.map(String).join(",")}),d},s.const=function(g,p,b,x){if(g===void 0)return null;var d=new t(g,p,b,x);return e.deepCompareStrict(p.const,g)||d.addError({name:"const",argument:p.const,message:"does not exactly match expected constant: "+p.const}),d},s.not=s.disallow=function(g,p,b,x){var d=this;if(g===void 0)return null;var w=new t(g,p,b,x),h=p.not||p.disallow;return h?(Array.isArray(h)||(h=[h]),h.forEach(function(S){if(d.testType(g,p,b,x,S)){var E=S&&(S.$id||S.id),R=E||S;w.addError({name:"not",argument:R,message:"is of prohibited type "+R})}}),w):null},nc=i,nc}var ta={},Pv;function kc(){if(Pv)return ta;Pv=1;var e=Fn();ta.SchemaScanResult=t;function t(r,i){this.id=r,this.ref=i}return ta.scan=function(i,s){function a(v,g){if(!g||typeof g!="object")return;if(g.$ref){let d=e.resolveUrl(v,g.$ref);m[d]=m[d]?m[d]+1:0;return}var p=g.$id||g.id;let b=e.resolveUrl(v,p);var x=p?b:v;if(x){if(x.indexOf("#")<0&&(x+="#"),f[x]){if(!e.deepCompareStrict(f[x],g))throw new Error("Schema <"+x+"> already exists with different definition");return f[x]}f[x]=g,x[x.length-1]=="#"&&(f[x.substring(0,x.length-1)]=g)}l(x+"/items",Array.isArray(g.items)?g.items:[g.items]),l(x+"/extends",Array.isArray(g.extends)?g.extends:[g.extends]),a(x+"/additionalItems",g.additionalItems),c(x+"/properties",g.properties),a(x+"/additionalProperties",g.additionalProperties),c(x+"/definitions",g.definitions),c(x+"/patternProperties",g.patternProperties),c(x+"/dependencies",g.dependencies),l(x+"/disallow",g.disallow),l(x+"/allOf",g.allOf),l(x+"/anyOf",g.anyOf),l(x+"/oneOf",g.oneOf),a(x+"/not",g.not)}function l(v,g){if(Array.isArray(g))for(var p=0;p<g.length;p++)a(v+"/"+p,g[p])}function c(v,g){if(!(!g||typeof g!="object"))for(var p in g)a(v+"/"+p,g[p])}var f={},m={};return a(i,s),new t(f,m)},ta}var ic,Cv;function n2(){if(Cv)return ic;Cv=1;var e=r2(),t=Fn(),r=kc().scan,i=t.ValidatorResult,s=t.ValidatorResultError,a=t.SchemaError,l=t.SchemaContext,c="/",f=function g(){this.customFormats=Object.create(g.prototype.customFormats),this.schemas={},this.unresolvedRefs=[],this.types=Object.create(v),this.attributes=Object.create(e.validators)};f.prototype.customFormats={},f.prototype.schemas=null,f.prototype.types=null,f.prototype.attributes=null,f.prototype.unresolvedRefs=null,f.prototype.addSchema=function(p,b){var x=this;if(!p)return null;var d=r(b||c,p),w=b||p.$id||p.id;for(var h in d.id)this.schemas[h]=d.id[h];for(var h in d.ref)this.unresolvedRefs.push(h);return this.unresolvedRefs=this.unresolvedRefs.filter(function(S){return typeof x.schemas[S]>"u"}),this.schemas[w]},f.prototype.addSubSchemaArray=function(p,b){if(Array.isArray(b))for(var x=0;x<b.length;x++)this.addSubSchema(p,b[x])},f.prototype.addSubSchemaObject=function(p,b){if(!(!b||typeof b!="object"))for(var x in b)this.addSubSchema(p,b[x])},f.prototype.setSchemas=function(p){this.schemas=p},f.prototype.getSchema=function(p){return this.schemas[p]},f.prototype.validate=function(p,b,x,d){if(typeof b!="boolean"&&typeof b!="object"||b===null)throw new a("Expected `schema` to be an object or boolean");x||(x={});var w=b.$id||b.id;let h=t.resolveUrl(x.base,w||"");if(!d){d=new l(b,x,[],h,Object.create(this.schemas)),d.schemas[h]||(d.schemas[h]=b);var S=r(h,b);for(var E in S.id){var R=S.id[E];d.schemas[E]=R}}if(x.required&&p===void 0){var O=new i(p,b,x,d);return O.addError("is required, but is undefined"),O}var O=this.validateSchema(p,b,x,d);if(O){if(x.throwAll&&O.errors.length)throw new s(O)}else throw new Error("Result undefined");return O};function m(g){var p=typeof g=="string"?g:g.$ref;return typeof p=="string"?p:!1}f.prototype.validateSchema=function(p,b,x,d){var w=new i(p,b,x,d);if(typeof b=="boolean")b===!0?b={}:b===!1&&(b={type:[]});else if(!b)throw new Error("schema is undefined");if(b.extends)if(Array.isArray(b.extends)){var h={schema:b,ctx:d};b.extends.forEach(this.schemaTraverser.bind(this,h)),b=h.schema,h.schema=null,h.ctx=null,h=null}else b=t.deepMerge(b,this.superResolve(b.extends,d));var S=m(b);if(S){var E=this.resolve(b,S,d),R=new l(E.subschema,x,d.path,E.switchSchema,d.schemas);return this.validateSchema(p,E.subschema,x,R)}var O=x&&x.skipAttributes||[];for(var k in b)if(!e.ignoreProperties[k]&&O.indexOf(k)<0){var B=null,M=this.attributes[k];if(M)B=M.call(this,p,b,x,d);else if(x.allowUnknownAttributes===!1)throw new a("Unsupported attribute: "+k,b);B&&w.importErrors(B)}if(typeof x.rewrite=="function"){var F=x.rewrite.call(this,p,b,x,d);w.instance=F}return w},f.prototype.schemaTraverser=function(p,b){p.schema=t.deepMerge(p.schema,this.superResolve(b,p.ctx))},f.prototype.superResolve=function(p,b){var x=m(p);return x?this.resolve(p,x,b).subschema:p},f.prototype.resolve=function(p,b,x){if(b=x.resolve(b),x.schemas[b])return{subschema:x.schemas[b],switchSchema:b};let w=new URL(b,"thismessage::/").hash;var h=w&&w.length&&b.substr(0,b.length-w.length);if(!h||!x.schemas[h])throw new a("no such schema <"+b+">",p);var S=t.objectGetPath(x.schemas[h],w.substr(1));if(S===void 0)throw new a("no such schema "+w+" located in <"+h+">",p);return{subschema:S,switchSchema:b}},f.prototype.testType=function(p,b,x,d,w){if(w!==void 0){if(w===null)throw new a('Unexpected null in "type" keyword');if(typeof this.types[w]=="function")return this.types[w].call(this,p);if(w&&typeof w=="object"){var h=this.validateSchema(p,w,x,d);return h===void 0||!(h&&h.errors.length)}return!0}};var v=f.prototype.types={};return v.string=function(p){return typeof p=="string"},v.number=function(p){return typeof p=="number"&&isFinite(p)},v.integer=function(p){return typeof p=="number"&&p%1===0},v.boolean=function(p){return typeof p=="boolean"},v.array=function(p){return Array.isArray(p)},v.null=function(p){return p===null},v.date=function(p){return p instanceof Date},v.any=function(p){return!0},v.object=function(p){return p&&typeof p=="object"&&!Array.isArray(p)&&!(p instanceof Date)},ic=f,ic}var kv;function i2(){if(kv)return xr;kv=1;var e=xr.Validator=n2();return xr.ValidatorResult=Fn().ValidatorResult,xr.ValidatorResultError=Fn().ValidatorResultError,xr.ValidationError=Fn().ValidationError,xr.SchemaError=Fn().SchemaError,xr.SchemaScanResult=kc().SchemaScanResult,xr.scan=kc().scan,xr.validate=function(t,r,i){var s=new e;return s.validate(t,r,i)},xr}var o2=i2();const p0=(e,t,r)=>{const i=e instanceof RegExp?$v(e,r):e,s=t instanceof RegExp?$v(t,r):t,a=i!==null&&s!=null&&s2(i,s,r);return a&&{start:a[0],end:a[1],pre:r.slice(0,a[0]),body:r.slice(a[0]+i.length,a[1]),post:r.slice(a[1]+s.length)}},$v=(e,t)=>{const r=t.match(e);return r?r[0]:null},s2=(e,t,r)=>{let i,s,a,l,c,f=r.indexOf(e),m=r.indexOf(t,f+1),v=f;if(f>=0&&m>0){if(e===t)return[f,m];for(i=[],a=r.length;v>=0&&!c;){if(v===f)i.push(v),f=r.indexOf(e,v+1);else if(i.length===1){const g=i.pop();g!==void 0&&(c=[g,m])}else s=i.pop(),s!==void 0&&s<a&&(a=s,l=m),m=r.indexOf(t,v+1);v=f<m&&f>=0?f:m}i.length&&l!==void 0&&(c=[a,l])}return c},h0="\0SLASH"+Math.random()+"\0",g0="\0OPEN"+Math.random()+"\0",Rf="\0CLOSE"+Math.random()+"\0",v0="\0COMMA"+Math.random()+"\0",m0="\0PERIOD"+Math.random()+"\0",a2=new RegExp(h0,"g"),u2=new RegExp(g0,"g"),l2=new RegExp(Rf,"g"),c2=new RegExp(v0,"g"),f2=new RegExp(m0,"g"),d2=/\\\\/g,p2=/\\{/g,h2=/\\}/g,g2=/\\,/g,v2=/\\./g;function oc(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function m2(e){return e.replace(d2,h0).replace(p2,g0).replace(h2,Rf).replace(g2,v0).replace(v2,m0)}function y2(e){return e.replace(a2,"\\").replace(u2,"{").replace(l2,"}").replace(c2,",").replace(f2,".")}function y0(e){if(!e)return[""];const t=[],r=p0("{","}",e);if(!r)return e.split(",");const{pre:i,body:s,post:a}=r,l=i.split(",");l[l.length-1]+="{"+s+"}";const c=y0(a);return a.length&&(l[l.length-1]+=c.shift(),l.push.apply(l,c)),t.push.apply(t,l),t}function b2(e){return e?(e.slice(0,2)==="{}"&&(e="\\{\\}"+e.slice(2)),yo(m2(e),!0).map(y2)):[]}function w2(e){return"{"+e+"}"}function x2(e){return/^-?0\d/.test(e)}function S2(e,t){return e<=t}function E2(e,t){return e>=t}function yo(e,t){const r=[],i=p0("{","}",e);if(!i)return[e];const s=i.pre,a=i.post.length?yo(i.post,!1):[""];if(/\$$/.test(i.pre))for(let l=0;l<a.length;l++){const c=s+"{"+i.body+"}"+a[l];r.push(c)}else{const l=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),c=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),f=l||c,m=i.body.indexOf(",")>=0;if(!f&&!m)return i.post.match(/,(?!,).*\}/)?(e=i.pre+"{"+i.body+Rf+i.post,yo(e)):[e];let v;if(f)v=i.body.split(/\.\./);else if(v=y0(i.body),v.length===1&&v[0]!==void 0&&(v=yo(v[0],!1).map(w2),v.length===1))return a.map(p=>i.pre+v[0]+p);let g;if(f&&v[0]!==void 0&&v[1]!==void 0){const p=oc(v[0]),b=oc(v[1]),x=Math.max(v[0].length,v[1].length);let d=v.length===3&&v[2]!==void 0?Math.abs(oc(v[2])):1,w=S2;b<p&&(d*=-1,w=E2);const S=v.some(x2);g=[];for(let E=p;w(E,b);E+=d){let R;if(c)R=String.fromCharCode(E),R==="\\"&&(R="");else if(R=String(E),S){const O=x-R.length;if(O>0){const k=new Array(O+1).join("0");E<0?R="-"+k+R.slice(1):R=k+R}}g.push(R)}}else{g=[];for(let p=0;p<v.length;p++)g.push.apply(g,yo(v[p],!1))}for(let p=0;p<g.length;p++)for(let b=0;b<a.length;b++){const x=s+g[p]+a[b];(!t||f||x)&&r.push(x)}}return r}const _2=1024*64,Ta=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>_2)throw new TypeError("pattern is too long")},O2={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},po=e=>e.replace(/[[\]\\-]/g,"\\$&"),A2=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Iv=e=>e.join(""),T2=(e,t)=>{const r=t;if(e.charAt(r)!=="[")throw new Error("not in a brace expression");const i=[],s=[];let a=r+1,l=!1,c=!1,f=!1,m=!1,v=r,g="";e:for(;a<e.length;){const d=e.charAt(a);if((d==="!"||d==="^")&&a===r+1){m=!0,a++;continue}if(d==="]"&&l&&!f){v=a+1;break}if(l=!0,d==="\\"&&!f){f=!0,a++;continue}if(d==="["&&!f){for(const[w,[h,S,E]]of Object.entries(O2))if(e.startsWith(w,a)){if(g)return["$.",!1,e.length-r,!0];a+=w.length,E?s.push(h):i.push(h),c=c||S;continue e}}if(f=!1,g){d>g?i.push(po(g)+"-"+po(d)):d===g&&i.push(po(d)),g="",a++;continue}if(e.startsWith("-]",a+1)){i.push(po(d+"-")),a+=2;continue}if(e.startsWith("-",a+1)){g=d,a+=2;continue}i.push(po(d)),a++}if(v<a)return["",!1,0,!1];if(!i.length&&!s.length)return["$.",!1,e.length-r,!0];if(s.length===0&&i.length===1&&/^\\?.$/.test(i[0])&&!m){const d=i[0].length===2?i[0].slice(-1):i[0];return[A2(d),!1,v-r,!1]}const p="["+(m?"^":"")+Iv(i)+"]",b="["+(m?"":"^")+Iv(s)+"]";return[i.length&&s.length?"("+p+"|"+b+")":i.length?p:b,c,v-r,!0]},bo=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"),R2=new Set(["!","?","+","*","@"]),Lv=e=>R2.has(e),P2="(?!(?:^|/)\\.\\.?(?:$|/))",ra="(?!\\.)",C2=new Set(["[","."]),k2=new Set(["..","."]),$2=new Set("().*{}+?[]^$\\!"),I2=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Pf="[^/]",Mv=Pf+"*?",Fv=Pf+"+?";var at,ct,qr,He,nt,fn,Dn,dn,Er,Nn,Mo,qn,b0,gn,pa,$c,w0;const Tt=class Tt{constructor(t,r,i={}){xt(this,qn);me(this,"type");xt(this,at);xt(this,ct);xt(this,qr,!1);xt(this,He,[]);xt(this,nt);xt(this,fn);xt(this,Dn);xt(this,dn,!1);xt(this,Er);xt(this,Nn);xt(this,Mo,!1);this.type=t,t&&Ye(this,ct,!0),Ye(this,nt,r),Ye(this,at,re(this,nt)?re(re(this,nt),at):this),Ye(this,Er,re(this,at)===this?i:re(re(this,at),Er)),Ye(this,Dn,re(this,at)===this?[]:re(re(this,at),Dn)),t==="!"&&!re(re(this,at),dn)&&re(this,Dn).push(this),Ye(this,fn,re(this,nt)?re(re(this,nt),He).length:0)}get hasMagic(){if(re(this,ct)!==void 0)return re(this,ct);for(const t of re(this,He))if(typeof t!="string"&&(t.type||t.hasMagic))return Ye(this,ct,!0);return re(this,ct)}toString(){return re(this,Nn)!==void 0?re(this,Nn):this.type?Ye(this,Nn,this.type+"("+re(this,He).map(t=>String(t)).join("|")+")"):Ye(this,Nn,re(this,He).map(t=>String(t)).join(""))}push(...t){for(const r of t)if(r!==""){if(typeof r!="string"&&!(r instanceof Tt&&re(r,nt)===this))throw new Error("invalid part: "+r);re(this,He).push(r)}}toJSON(){var r;const t=this.type===null?re(this,He).slice().map(i=>typeof i=="string"?i:i.toJSON()):[this.type,...re(this,He).map(i=>i.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===re(this,at)||re(re(this,at),dn)&&((r=re(this,nt))==null?void 0:r.type)==="!")&&t.push({}),t}isStart(){var r;if(re(this,at)===this)return!0;if(!((r=re(this,nt))!=null&&r.isStart()))return!1;if(re(this,fn)===0)return!0;const t=re(this,nt);for(let i=0;i<re(this,fn);i++){const s=re(t,He)[i];if(!(s instanceof Tt&&s.type==="!"))return!1}return!0}isEnd(){var r,i,s;if(re(this,at)===this||((r=re(this,nt))==null?void 0:r.type)==="!")return!0;if(!((i=re(this,nt))!=null&&i.isEnd()))return!1;if(!this.type)return(s=re(this,nt))==null?void 0:s.isEnd();const t=re(this,nt)?re(re(this,nt),He).length:0;return re(this,fn)===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){const r=new Tt(this.type,t);for(const i of re(this,He))r.copyIn(i);return r}static fromGlob(t,r={}){var s;const i=new Tt(null,void 0,r);return $e(s=Tt,gn,pa).call(s,t,i,0,r),i}toMMPattern(){if(this!==re(this,at))return re(this,at).toMMPattern();const t=this.toString(),[r,i,s,a]=this.toRegExpSource();if(!(s||re(this,ct)||re(this,Er).nocase&&!re(this,Er).nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return i;const c=(re(this,Er).nocase?"i":"")+(a?"u":"");return Object.assign(new RegExp(`^${r}$`,c),{_src:r,_glob:t})}get options(){return re(this,Er)}toRegExpSource(t){var f;const r=t??!!re(this,Er).dot;if(re(this,at)===this&&$e(this,qn,b0).call(this),!this.type){const m=this.isStart()&&this.isEnd(),v=re(this,He).map(x=>{var E;const[d,w,h,S]=typeof x=="string"?$e(E=Tt,gn,w0).call(E,x,re(this,ct),m):x.toRegExpSource(t);return Ye(this,ct,re(this,ct)||h),Ye(this,qr,re(this,qr)||S),d}).join("");let g="";if(this.isStart()&&typeof re(this,He)[0]=="string"&&!(re(this,He).length===1&&k2.has(re(this,He)[0]))){const d=C2,w=r&&d.has(v.charAt(0))||v.startsWith("\\.")&&d.has(v.charAt(2))||v.startsWith("\\.\\.")&&d.has(v.charAt(4)),h=!r&&!t&&d.has(v.charAt(0));g=w?P2:h?ra:""}let p="";return this.isEnd()&&re(re(this,at),dn)&&((f=re(this,nt))==null?void 0:f.type)==="!"&&(p="(?:$|\\/)"),[g+v+p,bo(v),Ye(this,ct,!!re(this,ct)),re(this,qr)]}const i=this.type==="*"||this.type==="+",s=this.type==="!"?"(?:(?!(?:":"(?:";let a=$e(this,qn,$c).call(this,r);if(this.isStart()&&this.isEnd()&&!a&&this.type!=="!"){const m=this.toString();return Ye(this,He,[m]),this.type=null,Ye(this,ct,void 0),[m,bo(this.toString()),!1,!1]}let l=!i||t||r||!ra?"":$e(this,qn,$c).call(this,!0);l===a&&(l=""),l&&(a=`(?:${a})(?:${l})*?`);let c="";if(this.type==="!"&&re(this,Mo))c=(this.isStart()&&!r?ra:"")+Fv;else{const m=this.type==="!"?"))"+(this.isStart()&&!r&&!t?ra:"")+Mv+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&l?")":this.type==="*"&&l?")?":`)${this.type}`;c=s+a+m}return[c,bo(a),Ye(this,ct,!!re(this,ct)),re(this,qr)]}};at=new WeakMap,ct=new WeakMap,qr=new WeakMap,He=new WeakMap,nt=new WeakMap,fn=new WeakMap,Dn=new WeakMap,dn=new WeakMap,Er=new WeakMap,Nn=new WeakMap,Mo=new WeakMap,qn=new WeakSet,b0=function(){if(this!==re(this,at))throw new Error("should only call on root");if(re(this,dn))return this;this.toString(),Ye(this,dn,!0);let t;for(;t=re(this,Dn).pop();){if(t.type!=="!")continue;let r=t,i=re(r,nt);for(;i;){for(let s=re(r,fn)+1;!i.type&&s<re(i,He).length;s++)for(const a of re(t,He)){if(typeof a=="string")throw new Error("string part in extglob AST??");a.copyIn(re(i,He)[s])}r=i,i=re(r,nt)}}return this},gn=new WeakSet,pa=function(t,r,i,s){var b,x;let a=!1,l=!1,c=-1,f=!1;if(r.type===null){let d=i,w="";for(;d<t.length;){const h=t.charAt(d++);if(a||h==="\\"){a=!a,w+=h;continue}if(l){d===c+1?(h==="^"||h==="!")&&(f=!0):h==="]"&&!(d===c+2&&f)&&(l=!1),w+=h;continue}else if(h==="["){l=!0,c=d,f=!1,w+=h;continue}if(!s.noext&&Lv(h)&&t.charAt(d)==="("){r.push(w),w="";const S=new Tt(h,r);d=$e(b=Tt,gn,pa).call(b,t,S,d,s),r.push(S);continue}w+=h}return r.push(w),d}let m=i+1,v=new Tt(null,r);const g=[];let p="";for(;m<t.length;){const d=t.charAt(m++);if(a||d==="\\"){a=!a,p+=d;continue}if(l){m===c+1?(d==="^"||d==="!")&&(f=!0):d==="]"&&!(m===c+2&&f)&&(l=!1),p+=d;continue}else if(d==="["){l=!0,c=m,f=!1,p+=d;continue}if(Lv(d)&&t.charAt(m)==="("){v.push(p),p="";const w=new Tt(d,v);v.push(w),m=$e(x=Tt,gn,pa).call(x,t,w,m,s);continue}if(d==="|"){v.push(p),p="",g.push(v),v=new Tt(null,r);continue}if(d===")")return p===""&&re(r,He).length===0&&Ye(r,Mo,!0),v.push(p),p="",r.push(...g,v),m;p+=d}return r.type=null,Ye(r,ct,void 0),Ye(r,He,[t.substring(i-1)]),m},$c=function(t){return re(this,He).map(r=>{if(typeof r=="string")throw new Error("string type in extglob ast??");const[i,s,a,l]=r.toRegExpSource(t);return Ye(this,qr,re(this,qr)||l),i}).filter(r=>!(this.isStart()&&this.isEnd())||!!r).join("|")},w0=function(t,r,i=!1){let s=!1,a="",l=!1;for(let c=0;c<t.length;c++){const f=t.charAt(c);if(s){s=!1,a+=($2.has(f)?"\\":"")+f;continue}if(f==="\\"){c===t.length-1?a+="\\\\":s=!0;continue}if(f==="["){const[m,v,g,p]=T2(t,c);if(g){a+=m,l=l||v,c+=g-1,r=r||p;continue}}if(f==="*"){i&&t==="*"?a+=Fv:a+=Mv,r=!0;continue}if(f==="?"){a+=Pf,r=!0;continue}a+=I2(f)}return[a,bo(t),!!r,l]},xt(Tt,gn);let Ra=Tt;const L2=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&"),Et=(e,t,r={})=>(Ta(t),!r.nocomment&&t.charAt(0)==="#"?!1:new qa(t,r).match(e)),M2=/^\*+([^+@!?\*\[\(]*)$/,F2=e=>t=>!t.startsWith(".")&&t.endsWith(e),D2=e=>t=>t.endsWith(e),N2=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),j2=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),z2=/^\*+\.\*+$/,W2=e=>!e.startsWith(".")&&e.includes("."),B2=e=>e!=="."&&e!==".."&&e.includes("."),U2=/^\.\*+$/,H2=e=>e!=="."&&e!==".."&&e.startsWith("."),q2=/^\*+$/,Z2=e=>e.length!==0&&!e.startsWith("."),G2=e=>e.length!==0&&e!=="."&&e!=="..",K2=/^\?+([^+@!?\*\[\(]*)?$/,V2=([e,t=""])=>{const r=x0([e]);return t?(t=t.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(t)):r},X2=([e,t=""])=>{const r=S0([e]);return t?(t=t.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(t)):r},Y2=([e,t=""])=>{const r=S0([e]);return t?i=>r(i)&&i.endsWith(t):r},J2=([e,t=""])=>{const r=x0([e]);return t?i=>r(i)&&i.endsWith(t):r},x0=([e])=>{const t=e.length;return r=>r.length===t&&!r.startsWith(".")},S0=([e])=>{const t=e.length;return r=>r.length===t&&r!=="."&&r!==".."},E0=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",Dv={win32:{sep:"\\"},posix:{sep:"/"}},Q2=E0==="win32"?Dv.win32.sep:Dv.posix.sep;Et.sep=Q2;const nr=Symbol("globstar **");Et.GLOBSTAR=nr;const eL="[^/]",tL=eL+"*?",rL="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",nL="(?:(?!(?:\\/|^)\\.).)*?",iL=(e,t={})=>r=>Et(r,e,t);Et.filter=iL;const rr=(e,t={})=>Object.assign({},e,t),oL=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return Et;const t=Et;return Object.assign((i,s,a={})=>t(i,s,rr(e,a)),{Minimatch:class extends t.Minimatch{constructor(s,a={}){super(s,rr(e,a))}static defaults(s){return t.defaults(rr(e,s)).Minimatch}},AST:class extends t.AST{constructor(s,a,l={}){super(s,a,rr(e,l))}static fromGlob(s,a={}){return t.AST.fromGlob(s,rr(e,a))}},unescape:(i,s={})=>t.unescape(i,rr(e,s)),escape:(i,s={})=>t.escape(i,rr(e,s)),filter:(i,s={})=>t.filter(i,rr(e,s)),defaults:i=>t.defaults(rr(e,i)),makeRe:(i,s={})=>t.makeRe(i,rr(e,s)),braceExpand:(i,s={})=>t.braceExpand(i,rr(e,s)),match:(i,s,a={})=>t.match(i,s,rr(e,a)),sep:t.sep,GLOBSTAR:nr})};Et.defaults=oL;const _0=(e,t={})=>(Ta(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:b2(e));Et.braceExpand=_0;const sL=(e,t={})=>new qa(e,t).makeRe();Et.makeRe=sL;const aL=(e,t,r={})=>{const i=new qa(t,r);return e=e.filter(s=>i.match(s)),i.options.nonull&&!e.length&&e.push(t),e};Et.match=aL;const Nv=/[?*]|[+@!]\(.*?\)|\[|\]/,uL=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");class qa{constructor(t,r={}){me(this,"options");me(this,"set");me(this,"pattern");me(this,"windowsPathsNoEscape");me(this,"nonegate");me(this,"negate");me(this,"comment");me(this,"empty");me(this,"preserveMultipleSlashes");me(this,"partial");me(this,"globSet");me(this,"globParts");me(this,"nocase");me(this,"isWindows");me(this,"platform");me(this,"windowsNoMagicRoot");me(this,"regexp");Ta(t),r=r||{},this.options=r,this.pattern=t,this.platform=r.platform||E0,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!r.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!r.nonegate,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=r.windowsNoMagicRoot!==void 0?r.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const t of this.set)for(const r of t)if(typeof r!="string")return!0;return!1}debug(...t){}make(){const t=this.pattern,r=this.options;if(!r.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],r.debug&&(this.debug=(...a)=>console.error(...a)),this.debug(this.pattern,this.globSet);const i=this.globSet.map(a=>this.slashSplit(a));this.globParts=this.preprocess(i),this.debug(this.pattern,this.globParts);let s=this.globParts.map((a,l,c)=>{if(this.isWindows&&this.windowsNoMagicRoot){const f=a[0]===""&&a[1]===""&&(a[2]==="?"||!Nv.test(a[2]))&&!Nv.test(a[3]),m=/^[a-z]:/i.test(a[0]);if(f)return[...a.slice(0,4),...a.slice(4).map(v=>this.parse(v))];if(m)return[a[0],...a.slice(1).map(v=>this.parse(v))]}return a.map(f=>this.parse(f))});if(this.debug(this.pattern,s),this.set=s.filter(a=>a.indexOf(!1)===-1),this.isWindows)for(let a=0;a<this.set.length;a++){const l=this.set[a];l[0]===""&&l[1]===""&&this.globParts[a][2]==="?"&&typeof l[3]=="string"&&/^[a-z]:$/i.test(l[3])&&(l[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let i=0;i<t.length;i++)for(let s=0;s<t[i].length;s++)t[i][s]==="**"&&(t[i][s]="*");const{optimizationLevel:r=1}=this.options;return r>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):r>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(r=>{let i=-1;for(;(i=r.indexOf("**",i+1))!==-1;){let s=i;for(;r[s+1]==="**";)s++;s!==i&&r.splice(i,s-i)}return r})}levelOneOptimize(t){return t.map(r=>(r=r.reduce((i,s)=>{const a=i[i.length-1];return s==="**"&&a==="**"?i:s===".."&&a&&a!==".."&&a!=="."&&a!=="**"?(i.pop(),i):(i.push(s),i)},[]),r.length===0?[""]:r))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let s=1;s<t.length-1;s++){const a=t[s];s===1&&a===""&&t[0]===""||(a==="."||a==="")&&(r=!0,t.splice(s,1),s--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(r=!0,t.pop())}let i=0;for(;(i=t.indexOf("..",i+1))!==-1;){const s=t[i-1];s&&s!=="."&&s!==".."&&s!=="**"&&(r=!0,t.splice(i-1,2),i-=2)}}while(r);return t.length===0?[""]:t}firstPhasePreProcess(t){let r=!1;do{r=!1;for(let i of t){let s=-1;for(;(s=i.indexOf("**",s+1))!==-1;){let l=s;for(;i[l+1]==="**";)l++;l>s&&i.splice(s+1,l-s);let c=i[s+1];const f=i[s+2],m=i[s+3];if(c!==".."||!f||f==="."||f===".."||!m||m==="."||m==="..")continue;r=!0,i.splice(s,1);const v=i.slice(0);v[s]="**",t.push(v),s--}if(!this.preserveMultipleSlashes){for(let l=1;l<i.length-1;l++){const c=i[l];l===1&&c===""&&i[0]===""||(c==="."||c==="")&&(r=!0,i.splice(l,1),l--)}i[0]==="."&&i.length===2&&(i[1]==="."||i[1]==="")&&(r=!0,i.pop())}let a=0;for(;(a=i.indexOf("..",a+1))!==-1;){const l=i[a-1];if(l&&l!=="."&&l!==".."&&l!=="**"){r=!0;const f=a===1&&i[a+1]==="**"?["."]:[];i.splice(a-1,2,...f),i.length===0&&i.push(""),a-=2}}}}while(r);return t}secondPhasePreProcess(t){for(let r=0;r<t.length-1;r++)for(let i=r+1;i<t.length;i++){const s=this.partsMatch(t[r],t[i],!this.preserveMultipleSlashes);if(s){t[r]=[],t[i]=s;break}}return t.filter(r=>r.length)}partsMatch(t,r,i=!1){let s=0,a=0,l=[],c="";for(;s<t.length&&a<r.length;)if(t[s]===r[a])l.push(c==="b"?r[a]:t[s]),s++,a++;else if(i&&t[s]==="**"&&r[a]===t[s+1])l.push(t[s]),s++;else if(i&&r[a]==="**"&&t[s]===r[a+1])l.push(r[a]),a++;else if(t[s]==="*"&&r[a]&&(this.options.dot||!r[a].startsWith("."))&&r[a]!=="**"){if(c==="b")return!1;c="a",l.push(t[s]),s++,a++}else if(r[a]==="*"&&t[s]&&(this.options.dot||!t[s].startsWith("."))&&t[s]!=="**"){if(c==="a")return!1;c="b",l.push(r[a]),s++,a++}else return!1;return t.length===r.length&&l}parseNegate(){if(this.nonegate)return;const t=this.pattern;let r=!1,i=0;for(let s=0;s<t.length&&t.charAt(s)==="!";s++)r=!r,i++;i&&(this.pattern=t.slice(i)),this.negate=r}matchOne(t,r,i=!1){const s=this.options;if(this.isWindows){const d=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),w=!d&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),h=typeof r[0]=="string"&&/^[a-z]:$/i.test(r[0]),S=!h&&r[0]===""&&r[1]===""&&r[2]==="?"&&typeof r[3]=="string"&&/^[a-z]:$/i.test(r[3]),E=w?3:d?0:void 0,R=S?3:h?0:void 0;if(typeof E=="number"&&typeof R=="number"){const[O,k]=[t[E],r[R]];O.toLowerCase()===k.toLowerCase()&&(r[R]=O,R>E?r=r.slice(R):E>R&&(t=t.slice(E)))}}const{optimizationLevel:a=1}=this.options;a>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:r}),this.debug("matchOne",t.length,r.length);for(var l=0,c=0,f=t.length,m=r.length;l<f&&c<m;l++,c++){this.debug("matchOne loop");var v=r[c],g=t[l];if(this.debug(r,v,g),v===!1)return!1;if(v===nr){this.debug("GLOBSTAR",[r,v,g]);var p=l,b=c+1;if(b===m){for(this.debug("** at the end");l<f;l++)if(t[l]==="."||t[l]===".."||!s.dot&&t[l].charAt(0)===".")return!1;return!0}for(;p<f;){var x=t[p];if(this.debug(`
206
- globstar while`,t,p,r,b,x),this.matchOne(t.slice(p),r.slice(b),i))return this.debug("globstar found match!",p,f,x),!0;if(x==="."||x===".."||!s.dot&&x.charAt(0)==="."){this.debug("dot detected!",t,p,r,b);break}this.debug("globstar swallow a segment, and continue"),p++}return!!(i&&(this.debug(`
207
- >>> no match, partial?`,t,p,r,b),p===f))}let d;if(typeof v=="string"?(d=g===v,this.debug("string match",v,g,d)):(d=v.test(g),this.debug("pattern match",v,g,d)),!d)return!1}if(l===f&&c===m)return!0;if(l===f)return i;if(c===m)return l===f-1&&t[l]==="";throw new Error("wtf?")}braceExpand(){return _0(this.pattern,this.options)}parse(t){Ta(t);const r=this.options;if(t==="**")return nr;if(t==="")return"";let i,s=null;(i=t.match(q2))?s=r.dot?G2:Z2:(i=t.match(M2))?s=(r.nocase?r.dot?j2:N2:r.dot?D2:F2)(i[1]):(i=t.match(K2))?s=(r.nocase?r.dot?X2:V2:r.dot?Y2:J2)(i):(i=t.match(z2))?s=r.dot?B2:W2:(i=t.match(U2))&&(s=H2);const a=Ra.fromGlob(t,this.options).toMMPattern();return s&&typeof a=="object"&&Reflect.defineProperty(a,"test",{value:s}),a}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;const t=this.set;if(!t.length)return this.regexp=!1,this.regexp;const r=this.options,i=r.noglobstar?tL:r.dot?rL:nL,s=new Set(r.nocase?["i"]:[]);let a=t.map(f=>{const m=f.map(v=>{if(v instanceof RegExp)for(const g of v.flags.split(""))s.add(g);return typeof v=="string"?uL(v):v===nr?nr:v._src});return m.forEach((v,g)=>{const p=m[g+1],b=m[g-1];v!==nr||b===nr||(b===void 0?p!==void 0&&p!==nr?m[g+1]="(?:\\/|"+i+"\\/)?"+p:m[g]=i:p===void 0?m[g-1]=b+"(?:\\/|"+i+")?":p!==nr&&(m[g-1]=b+"(?:\\/|\\/"+i+"\\/)"+p,m[g+1]=nr))}),m.filter(v=>v!==nr).join("/")}).join("|");const[l,c]=t.length>1?["(?:",")"]:["",""];a="^"+l+a+c+"$",this.negate&&(a="^(?!"+a+").+$");try{this.regexp=new RegExp(a,[...s].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,r=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&r)return!0;const i=this.options;this.isWindows&&(t=t.split("\\").join("/"));const s=this.slashSplit(t);this.debug(this.pattern,"split",s);const a=this.set;this.debug(this.pattern,"set",a);let l=s[s.length-1];if(!l)for(let c=s.length-2;!l&&c>=0;c--)l=s[c];for(let c=0;c<a.length;c++){const f=a[c];let m=s;if(i.matchBase&&f.length===1&&(m=[l]),this.matchOne(m,f,r))return i.flipNegate?!0:!this.negate}return i.flipNegate?!1:this.negate}static defaults(t){return Et.defaults(t).Minimatch}}Et.AST=Ra;Et.Minimatch=qa;Et.escape=L2;Et.unescape=bo;const Lo="/$shared",lL={"**/saved_conditions.json":{parser:"json",content:{conditions:[]},schema:{type:"object",properties:{conditions:{type:"array",items:{type:"object"}}},required:["conditions"]}},"**/shared_datasources.json":{parser:"json",content:{},schema:{type:"object",additionalProperties:!0,patternProperties:{"^.*$":{type:"array"}}}},"**/shared_css.json":{parser:"json",content:{classes:[]},schema:{type:"object",properties:{classes:{type:"array",items:{type:"object"}}},required:["classes"]}},"**/shared_app_events.json":{parser:"json",content:[]},"**/CustomComponents/manifest.json":{parser:"json",content:[],schema:{type:"array",items:{type:"object"}}},"**/crafted_components.json":{parser:"json",content:[],schema:{type:"array"}},"**/HTTPHandlers.json":{parser:"json",content:[],schema:{type:"array"}},"**/i18n.json":{parser:"json",content:{keys:{},userLang:{primary:"",supported:[]}},schema:{type:"object",properties:{keys:{type:"object"},userLang:{type:"object",properties:{primary:{type:"string"},supported:{type:"array",items:{type:"string"}}},required:["primary","supported"]}},required:["keys","userLang"]}},"**/*.json":{parser:"json",content:{}}};function O0(e){const t=Object.entries(lL).find(([r])=>Et(e,r));return t==null?void 0:t[1]}function Za(e){var i;const t=(i=O0(e))==null?void 0:i.content;if(!t)return;const r=e.replace(`${Lo}/`,"Shared/");Cf({name:r,content:t,asText:typeof t=="string"})}async function cL(){const e=["CustomComponents/manifest.json","shared_app_events.json","shared_css.json","saved_conditions.json","i18n.json"];for(const t of e)try{await Me(`${Lo}/${t}?t=${Date.now()}`,{method:"GET",headers:new Headers({"Content-Type":"application/json"})})}catch(r){A0(r)&&Za(`${Lo}/${t}`)}}function Ho({path:e,createIfNotExists:t=!1}){const r=`${Lo}/${e}`;return Me(`${r}?t=${Date.now()}`,{method:"GET",headers:new Headers({"Content-Type":"application/json"})}).then(i=>{const s=O0(e);let a=i;if(!s)return a;if(typeof a=="string")try{switch(s.parser){case"json":a=JSON.parse(a);break;default:break}}catch{throw new Error("Cannot parse")}if(s.schema&&!new o2.Validator().validate(a,s.schema).valid)throw new Error("Invalid Schema");return a}).catch(i=>{if(A0(i)&&t){const s=fL(i,e);Zy.next({message:s,kind:"warning"}),Za(r)}throw i})}function A0(e){var t;return((t=e==null?void 0:e.response)==null?void 0:t.status)===404||(e==null?void 0:e.message)==="Invalid Schema"||(e==null?void 0:e.message)==="Cannot parse"||(e==null?void 0:e.name)==="SyntaxError"}function fL(e,t){var r;switch(!0){case((e==null?void 0:e.message)==="Cannot parse "||(e==null?void 0:e.name)==="SyntaxError"):return`Cannot parse file '${t}', resetting...`;case(e==null?void 0:e.message)==="Invalid Schema":return`File '${t}' is corrupt, resetting...`;case((r=e==null?void 0:e.response)==null?void 0:r.status)===404:return`File '${t}' not found, creating...`;default:return e==null?void 0:e.message}}function dL(e){return Me(Uo,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function pL(e){return Me(Uo,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}const T0=()=>{const{host:e,protocol:t}=window.location,r=t==="https:";return{projectOpened:!1,remoteDebuggerMode:_f.DISABLED,baseUrl:"",qodly:!0,urls:{renderer:"/$lib/renderer/",debugger:`ws${r?"s":""}://${e}/remoteDebugger`,lsp:`ws${r?"s":""}://${e}/LSP`},isRestActive:!0}};async function hL(){const{hostname:e,host:t,protocol:r}=window.location,i=r==="https:";try{const s=await Me(it,{method:"POST",body:JSON.stringify({verb:bn.GET_APP_SETTINGS}),headers:new Headers({"Content-Type":"application/json"})}),a=(()=>{if(s.rendererPath)return s.rendererPath;const l=`http://${e}:${s.webServerHTTPPort}`,c=`https://${e}:${s.webServerHTTPSPort}`;return s.webServerHTTPPort&&s.webServerHTTPSPort?i?c:l:s.webServerHTTPPort?l:c})();return{projectOpened:s.webServerHTTPSPort>0||s.webServerHTTPPort>0,remoteDebuggerMode:s.remoteDebuggerMode,baseUrl:a,qodly:typeof s.qodly>"u"?!0:s.qodly,urls:{renderer:s.rendererPath||`${a}/$lib/renderer/`,debugger:`ws${i?"s":""}://${t}/remoteDebugger`,lsp:`ws${i?"s":""}://${t}/LSP`},isRestActive:s.isRESTActive}}catch(s){return console.error(s),T0()}}async function R0(e){return await Me(it,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}async function gL(...e){return(await Promise.all(e.map(i=>R0({root:i,verb:bn.GET_FOLDER})))).map(({children:i})=>i.map(({name:s,date:a,type:l})=>({name:s,type:l,date:a,path:`${l}/${s}`}))).flat()}function vL(e,t={}){const{sanitize:r=!0}=t;return Me(`/rest/$getWebForm/${e}`,{method:"GET"}).then(i=>{if(!(i!=null&&i.components)||!r)return i;const s=new Map;return{...i,components:rt.entries(i.components).map(([a,l])=>{const c=a,{resolvedName:f}=l.type;if(f==="WebformLoader"){const m=Bc.generate();s.set(a,m),a=m}return[a,l,c]}).reduce((a,[l,c,f])=>{var m;return c.nodes&&(c.nodes=c.nodes.map(v=>s.get(v)||v)),c.linkedNodes&&(c.linkedNodes=rt.entries(c.linkedNodes).reduce((v,[g,p])=>({...v,[g]:s.get(p)||p}),{})),(m=c.props)!=null&&m.events&&(c.props.events=c.props.events.map(v=>(v.type==="navigation"&&v.loader&&(v.loader=s.get(v.loader)||v.loader),v))),{...a,[l]:{...c,props:{...c.props,__originalID:f}}}},{})}})}function mL(e){return Me(it,{method:"POST",headers:new Headers({"Content-Type":"application/json"}),body:JSON.stringify(e)}).then(t=>({...t,content:[ft.METHOD,ft.CLASS].includes(t.type)?Ha(t.content):t.content}))}function yL(e){return e.type==="folder"?Me(Uo,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})}):Me(it,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}async function bL(e){return e.type==="folder"?(await Me(Uo,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})).deleted:(await Me(it,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})).deleted}function wL(e){return Me(it,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function xL(e){return Me(it,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}async function SL(e){return(await Me(it,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})).deleted}async function EL(...e){return await Me(it,{method:"POST",body:JSON.stringify({verb:bn.GET_FILES_INFO,files:e}),headers:new Headers({"Content-Type":"application/json"})})}async function _L(e){const t=await Me("/api/login",{method:"POST",body:JSON.stringify({accessKey:e}),headers:new Headers({"Content-Type":"application/json"})});return t.isLogged&&t.success}async function OL(){return await Me("/rest/$catalog/$all?$metadata=full",{method:"GET",headers:new Headers({"Content-Type":"application/json"})})}async function AL(e){try{const t=process.env.NODE_ENV==="development"?"/i18n/languages.json":`/$lib/${e?"studio":"renderer"}/i18n/languages.json`,i=await(await fetch(t)).text(),{supported:s}=JSON.parse(i);return s}catch{return[]}}async function TL({name:e,path:t="",root:r="root",asText:i=!1}){return Me(it,{method:"POST",body:JSON.stringify({verb:"getFileContent",root:r,path:t,name:e,asText:i}),headers:new Headers({"Content-Type":"application/json"})})}async function RL(e={}){try{return await Ho({path:"shared_datasources.json",...e})}catch{return{}}}async function PL(e={}){try{return await Ho({path:"shared_app_events.json",...e})}catch{return[]}}async function CL(e={}){try{return await Ho({path:"shared_css.json",...e})}catch{return{classes:[]}}}async function kL(e={}){try{return await Ho({path:"saved_conditions.json",...e})}catch{return{conditions:[]}}}async function $L(){try{return await Me("/rest/$info/privileges",{method:"GET",headers:new Headers({"Content-Type":"application/json"})})}catch{return{privileges:[]}}}async function IL(){try{return await(await fetch(`monaco_theme.json?t=${Date.now()}`)).json()}catch{return null}}const LL=Af(),ML=async e=>{const t={verb:bn.SET_FILE_CONTENT,asText:!1,name:"shared_datasources.json",path:"",root:"shared",content:e};return LL(async()=>(await Me(it,{method:"POST",body:JSON.stringify(t),headers:new Headers({"Content-Type":"application/json"})}),e))},FL=Af(),DL=async e=>{const t={verb:bn.SET_FILE_CONTENT,asText:!1,name:"shared_app_events.json",path:"",root:"shared",content:e};return FL(async()=>(await Me(it,{method:"POST",body:JSON.stringify(t),headers:new Headers({"Content-Type":"application/json"})}),e))},Cf=async e=>{const t=await Me(it,{method:"POST",body:JSON.stringify({...e,verb:bn.SET_FILE_CONTENT,root:Ef.ROOT}),headers:new Headers({"Content-Type":"application/json"})}),r=Of(`${e.path||"Sources"}/${e.name}`);return{...t,type:r,size:0}},NL=async e=>await Cf({name:"crafted_components.json",path:hn.WEBFORMS,content:e});function jL(e){return Me(it,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function zL(e){return Me(it,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function WL(e){return Me(it,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function BL(e){return Me(it,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})}).then(t=>Array.isArray(t)?t:{...t,content:["4dm","4qm","4qs"].includes(t.ext)?Ha(t.content):t.content}).catch(t=>{var r,i;throw((i=(r=t.data)==null?void 0:r.__ERROR[0])==null?void 0:i.errCode)===1839&&Za(e.path),t})}function UL(e){return Me(it,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function HL(e){const t=new RegExp(/^\((.+)(?=\))/gi).exec(e);return t!==null?t[1]:""}function qL(e){const t=new RegExp(/(->)(.*)/gi).exec(e);if(t!==null)return t[0].replace("->","");const r=/:([^)]*)$/.exec(e);return r!==null?`result : ${r[1].trim()}`:""}function ZL(e){const t=HL(e).split(/[;,]/g).filter(Boolean).map(s=>{const a=s.split(":")[0].trim(),l=s.split(":")[1].trim();return{name:a,type:l}}),r=qL(e),i=r?{name:r.split(":")[0].trim(),type:r.split(":")[1].trim()}:{name:"result",type:"Variable"};return{params:t,result:i}}async function GL(e,t){const i=e.split(".").pop();try{const s=await Me(it,{method:"POST",body:JSON.stringify({verb:"getFunctionContent",className:t,functionName:i}),headers:new Headers({"Content-Type":"application/json"})});s.content=Ha(s.content);const{params:a,result:l}=ZL(s.parameters);return{...s,params:a,returns:l}}catch(s){return console.error(s),{className:t,functionName:i,filePath:e,content:"",params:[]}}}var P0=(e=>(e.STUDIO_LOADED="UA-1-0",e.WELCOME_TOUR_INIT="UA-1-3",e.WELCOME_TOUR_END="UA-1-4",e))(P0||{});function KL(e,t){fetch("/api/v1/activity",{body:JSON.stringify({AID:e,...t}),headers:{"Content-Type":"application/json"},method:"POST"}).catch(r=>{})}function VL(e){window.pagesense=window.pagesense||[],window.pagesense.push(["trackEvent",e])}var C0=(e=>(e.LOCAL="local",e.SHARED="shared",e.THEME="theme",e))(C0||{}),k0=(e=>(e[e.METHOD=1]="METHOD",e[e.CLASS=10]="CLASS",e))(k0||{}),$0=(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))($0||{}),I0=(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))(I0||{});const XL={transparent:{backgroundColor:"transparent"},black:{backgroundColor:"#4a4a4a",color:"white",padding:"3px 5px",borderRadius:5},grey:{backgroundColor:"#e8e8e8",color:"#262626",padding:"3px 5px",borderRadius:5}},YL={Code:{key:"editors:code",config:{language:"4d",theme:"fd-dark"}},WebForm:{key:"editors:webforms"}};exports.API_PREFIX=it;exports.AppLoader=Zk;exports.BaseCheckboxIcon=Py;exports.Checkbox=v$;exports.ControlledSwitch=fy;exports.DATASOURCE_THEMES=XL;exports.DatasourcesActions=qy;exports.DebuggerActions=Vy;exports.DefaultCheckboxIcon=Cy;exports.DesignerRequestVerb=bn;exports.Dialog=TA;exports.DialogBody=em;exports.EActivity=P0;exports.EDITOR=YL;exports.EIDENTIFIERS=$0;exports.ERROR_CODES=I0;exports.EWebFormStyleClassScope=C0;exports.EXT_API_PREFIX=Uo;exports.FileFolderType=ft;exports.FloatingTooltip=p$;exports.FolderRootPath=hn;exports.FolderRootType=Ef;exports.HTTPError=Cc;exports.HTTP_HANDLERS_TAB_PATH=Qy;exports.IPreemptive=Io;exports.IPublished=l0;exports.IPublishedRestScope=Tf;exports.IdentityProvider=M$;exports.Incase=aa;exports.IndentLines=hm;exports.LOCALIZATION_TAB_PATH=e0;exports.LogoSVG=Oy;exports.LspActions=Ky;exports.MAX_FILE_NAME_LENGTH=xf;exports.MODEL_TAB_PATH=EI;exports.Modal=Xk;exports.ModalCloseReason=pi;exports.ModalColor=zn;exports.ModalIcons=Sc;exports.ModalType=df;exports.Mutex=t0;exports.NameError=Sf;exports.Overlay=Qv;exports.PANEL_EXPANDED_HEIGHT=fa;exports.PANEL_INITIAL_HEIGHT=In;exports.Panel=g$;exports.Portal=Wv;exports.PublishOptions=VI;exports.ROLES_TAB_PATH=Yy;exports.RemoteDebuggerMode=_f;exports.SETTINGS_TAB_PATH=Jy;exports.SHARED_API_PREFIX=Lo;exports.SourceCodeDescriptor=k0;exports.Switcher=gm;exports.TabEventsActions=Gy;exports.Tip=Qm;exports.TipsProvider=eC;exports.Toast=LT;exports.Tooltip=Hk;exports.Tree=JT;exports.TreeIcon=cm;exports.TreeNode=Uc;exports.WebformActions=Hy;exports.WebformEventsActions=$o;exports.ZoomComponent=Qk;exports.ZoomLevel=Ty;exports._isArrayDatasource=HI;exports._isObjectDatasource=qI;exports.addAttributesToContent=YI;exports.addFolder=wL;exports.by=r0;exports.byId=PI;exports.byPath=CI;exports.callServerSideParser=t2;exports.checkUpdates=dL;exports.createFolder=jL;exports.datasourcesSubject=pI;exports.debuggerSubject=mI;exports.dropFile=bL;exports.dropFolder=SL;exports.exists=kI;exports.extractWebformName=AI;exports.generateUUID=JI;exports.getAppSettings=hL;exports.getCatalog=OL;exports.getDatasourceId=$I;exports.getDefaultAppSettings=T0;exports.getFile=mL;exports.getFileContent=TL;exports.getFileExtentionFromType=OI;exports.getFilenameAndTypeFromPath=_I;exports.getFilesInfo=EL;exports.getFolder=R0;exports.getFolders=gL;exports.getFunctionContent=GL;exports.getMonacoTheme=IL;exports.getNodeInfo=BL;exports.getSavedConditions=kL;exports.getSharedAppEvents=PL;exports.getSharedCSS=CL;exports.getSharedDatasources=RL;exports.getSharedResource=Ho;exports.getSupportedLanguages=AL;exports.getTypeFromExtension=Of;exports.getUserPrivileges=$L;exports.getWebForm=vL;exports.hasAttributesString=f0;exports.http=Me;exports.i18nSubject=bI;exports.initializeDefaultProjectFiles=cL;exports.installUpdates=pL;exports.isArrayDatasource=s0;exports.isDataClassMethod=FI;exports.isDataStoreMethod=MI;exports.isDateDatasource=ZI;exports.isEntity=BI;exports.isEntityDatasource=jI;exports.isEntityMethod=DI;exports.isEntitySelection=UI;exports.isEntitySelectionDatasource=zI;exports.isEntitySelectionMethod=NI;exports.isObjectAttribute=II;exports.isObjectDatasource=a0;exports.isRelatedAttribute=LI;exports.isRelatedEntitiesAttribute=i0;exports.isRelatedEntityAttribute=o0;exports.isScalarDatasource=u0;exports.isSimpleAttribute=n0;exports.isSimpleDatasource=WI;exports.loadDS=GI;exports.loadI18n=KI;exports.log=KL;exports.login=_L;exports.lspSubject=vI;exports.moveItem=WL;exports.outBy=TI;exports.outById=RI;exports.parseAttributes=XI;exports.queue=Af;exports.removeAttributesString=d0;exports.removeItem=zL;exports.renameFile=yL;exports.renameFolder=xL;exports.sanitizeContent=Ha;exports.sanitizeNameCY=QI;exports.saveContent=UL;exports.setCraftedComponents=NL;exports.setFileContent=Cf;exports.setSharedAppEvents=DL;exports.setSharedSources=ML;exports.stringifyAttributes=c0;exports.tabEventsSubject=gI;exports.tasksManagerSubject=yI;exports.toastSubject=Zy;exports.trackEvent=VL;exports.transformDates=e2;exports.tryCreateSharedResource=Za;exports.useDidMountEffect=m$;exports.useDoubleClick=j$;exports.useEnhancedState=eI;exports.useFeatureFlags=L$;exports.useForwardedRef=I$;exports.useHotkeys=P$;exports.useIdentity=F$;exports.useOutsideClick=C$;exports.usePrevious=k$;exports.useStateObject=D$;exports.useStateRef=$$;exports.useTip=Jm;exports.validateName=Xy;exports.validateServerSide=wI;exports.validateValue=xI;exports.webformEventsSubject=Aa;exports.webformSubject=hI;
203
+ `):"",this.name="UnsubscriptionError",this.errors=r}});function Fc(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var Ya=(function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,r,i,s,a;if(!this.closed){this.closed=!0;var u=this._parentage;if(u)if(this._parentage=null,Array.isArray(u))try{for(var c=wc(u),f=c.next();!f.done;f=c.next()){var g=f.value;g.remove(this)}}catch(d){t={error:d}}finally{try{f&&!f.done&&(r=c.return)&&r.call(c)}finally{if(t)throw t.error}}else u.remove(this);var h=this.initialTeardown;if(Vr(h))try{h()}catch(d){a=d instanceof fc?d.errors:[d]}var v=this._finalizers;if(v){this._finalizers=null;try{for(var p=wc(v),y=p.next();!y.done;y=p.next()){var x=y.value;try{Im(x)}catch(d){a=a??[],d instanceof fc?a=Sa(Sa([],bc(a)),bc(d.errors)):a.push(d)}}}catch(d){i={error:d}}finally{try{y&&!y.done&&(s=p.return)&&s.call(p)}finally{if(i)throw i.error}}}if(a)throw new fc(a)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)Im(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(t)}},e.prototype._hasParent=function(t){var r=this._parentage;return r===t||Array.isArray(r)&&r.includes(t)},e.prototype._addParent=function(t){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(t),r):r?[r,t]:t},e.prototype._removeParent=function(t){var r=this._parentage;r===t?this._parentage=null:Array.isArray(r)&&Fc(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&Fc(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e})(),e0=Ya.EMPTY;function t0(e){return e instanceof Ya||e&&"closed"in e&&Vr(e.remove)&&Vr(e.add)&&Vr(e.unsubscribe)}function Im(e){Vr(e)?e():e.unsubscribe()}var bI={Promise:void 0},xI={setTimeout:function(e,t){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];return setTimeout.apply(void 0,Sa([e,t],bc(r)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function SI(e){xI.setTimeout(function(){throw e})}function Lm(){}function va(e){e()}var r0=(function(e){Ba(t,e);function t(r){var i=e.call(this)||this;return i.isStopped=!1,r?(i.destination=r,t0(r)&&r.add(i)):i.destination=OI,i}return t.create=function(r,i,s){return new Nc(r,i,s)},t.prototype.next=function(r){this.isStopped||this._next(r)},t.prototype.error=function(r){this.isStopped||(this.isStopped=!0,this._error(r))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(r){this.destination.next(r)},t.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t})(Ya),EI=(function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var r=this.partialObserver;if(r.next)try{r.next(t)}catch(i){oa(i)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(i){oa(i)}else oa(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){oa(r)}},e})(),Nc=(function(e){Ba(t,e);function t(r,i,s){var a=e.call(this)||this,u;return Vr(r)||!r?u={next:r??void 0,error:i??void 0,complete:s??void 0}:u=r,a.destination=new EI(u),a}return t})(r0);function oa(e){SI(e)}function _I(e){throw e}var OI={closed:!0,next:Lm,error:_I,complete:Lm},TI=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function AI(e){return e}function RI(e){return e.length===0?AI:e.length===1?e[0]:function(r){return e.reduce(function(i,s){return s(i)},r)}}var Mm=(function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(t,r,i){var s=this,a=CI(t)?t:new Nc(t,r,i);return va(function(){var u=s,c=u.operator,f=u.source;a.add(c?c.call(a,f):f?s._subscribe(a):s._trySubscribe(a))}),a},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(r){t.error(r)}},e.prototype.forEach=function(t,r){var i=this;return r=Dm(r),new r(function(s,a){var u=new Nc({next:function(c){try{t(c)}catch(f){a(f),u.unsubscribe()}},error:a,complete:s});i.subscribe(u)})},e.prototype._subscribe=function(t){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(t)},e.prototype[TI]=function(){return this},e.prototype.pipe=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return RI(t)(this)},e.prototype.toPromise=function(t){var r=this;return t=Dm(t),new t(function(i,s){var a;r.subscribe(function(u){return a=u},function(u){return s(u)},function(){return i(a)})})},e.create=function(t){return new e(t)},e})();function Dm(e){var t;return(t=e??bI.Promise)!==null&&t!==void 0?t:Promise}function PI(e){return e&&Vr(e.next)&&Vr(e.error)&&Vr(e.complete)}function CI(e){return e&&e instanceof r0||PI(e)&&t0(e)}var kI=Qy(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Lr=(function(e){Ba(t,e);function t(){var r=e.call(this)||this;return r.closed=!1,r.currentObservers=null,r.observers=[],r.isStopped=!1,r.hasError=!1,r.thrownError=null,r}return t.prototype.lift=function(r){var i=new Fm(this,this);return i.operator=r,i},t.prototype._throwIfClosed=function(){if(this.closed)throw new kI},t.prototype.next=function(r){var i=this;va(function(){var s,a;if(i._throwIfClosed(),!i.isStopped){i.currentObservers||(i.currentObservers=Array.from(i.observers));try{for(var u=wc(i.currentObservers),c=u.next();!c.done;c=u.next()){var f=c.value;f.next(r)}}catch(g){s={error:g}}finally{try{c&&!c.done&&(a=u.return)&&a.call(u)}finally{if(s)throw s.error}}}})},t.prototype.error=function(r){var i=this;va(function(){if(i._throwIfClosed(),!i.isStopped){i.hasError=i.isStopped=!0,i.thrownError=r;for(var s=i.observers;s.length;)s.shift().error(r)}})},t.prototype.complete=function(){var r=this;va(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=!0;for(var i=r.observers;i.length;)i.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(r){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,r)},t.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},t.prototype._innerSubscribe=function(r){var i=this,s=this,a=s.hasError,u=s.isStopped,c=s.observers;return a||u?e0:(this.currentObservers=null,c.push(r),new Ya(function(){i.currentObservers=null,Fc(c,r)}))},t.prototype._checkFinalizedStatuses=function(r){var i=this,s=i.hasError,a=i.thrownError,u=i.isStopped;s?r.error(a):u&&r.complete()},t.prototype.asObservable=function(){var r=new Mm;return r.source=this,r},t.create=function(r,i){return new Fm(r,i)},t})(Mm),Fm=(function(e){Ba(t,e);function t(r,i){var s=e.call(this)||this;return s.destination=r,s.source=i,s}return t.prototype.next=function(r){var i,s;(s=(i=this.destination)===null||i===void 0?void 0:i.next)===null||s===void 0||s.call(i,r)},t.prototype.error=function(r){var i,s;(s=(i=this.destination)===null||i===void 0?void 0:i.error)===null||s===void 0||s.call(i,r)},t.prototype.complete=function(){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||i===void 0||i.call(r)},t.prototype._subscribe=function(r){var i,s;return(s=(i=this.source)===null||i===void 0?void 0:i.subscribe(r))!==null&&s!==void 0?s:e0},t})(Lr),n0=(e=>(e.RELOAD="reload",e.RECOMPUTE="recompute",e))(n0||{}),i0=(e=>(e.RENAME="rename",e.TYPE_CHANGE="type-change",e))(i0||{});const $I=new Lr,II=new Lr,o0=new Lr;var s0=(e=>(e.SAVE_ALL="save-all",e))(s0||{});const LI=new Lr;var a0=(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.DIAGNOSTIC_REFRESH="diagnostic-refresh",e))(a0||{});const MI=new Lr;var u0=(e=>(e.RESEND_BREAKPOINTS="resend-breakpoints",e))(u0||{});const DI=new Lr,FI=new Lr;var No=(e=>(e.EVENT_STARTED="event-started",e.EVENT_ENDED="event-ended",e.EVENT_EMITED="event-emited",e.REQUEST_SENT="request-sent",e))(No||{});const ka=new Lr,NI=new Lr,Cf=255;var kf=(e=>(e.EMPTY="Please enter a valid name",e.LENGTH_EXCEEDED=`The name is too long, it should not exceed ${Cf} characters (including extension)`,e.SHOULD_START_WITH_LETTER="The name can only start with a letter or a Japanese character",e.INVALID="Invalid name",e))(kf||{});function Xa(e,t){const r=t?e.replace(/\.[^.]+$/,""):e;if(e==="")throw new Error("Please enter a valid name");if(e.length>Cf)throw new Error(kf.LENGTH_EXCEEDED);if(!/^[a-zA-Z\u3040-\u30FF\u3400-\u4DBF\u4E00-\u9FAF]/.test(r))throw new Error("The name can only start with a letter or a Japanese character");if(!/^[\w\u3040-\u30FF\u3400-\u4DBF\u4E00-\u9FAF-]+$/i.test(r))throw new Error("Invalid name");return!0}function jI(e){if(!e)return null;if(typeof e=="string")try{Xa(e)}catch(t){return t.message}}function zI(e,t){let r="";if(["array","object"].includes(t))try{const i=JSON.parse(e);t==="array"&&(!Array.isArray(i)||!Ne.isObject(i))&&(r=`Invalid value for type ${t}`),t==="object"&&(!Ne.isObject(i)||Array.isArray(i))&&(r=`Invalid value for type ${t}`)}catch{r=`Invalid value for type ${t}`}return t==="date"&&(new RegExp(/^(0?[1-9]|[12][0-9]|3[01])[/-](0?[1-9]|1[012])[/-]\d{4}$/).test(e)||(r=`Invalid value for type ${t}`)),t==="number"&&isNaN(+e)&&(r=`Invalid value for type ${t}`),["boolean","bool"].includes(t)&&typeof e!="boolean"&&!["true","false"].includes(e)&&(r=`Invalid value for type ${t}`),r}function BI(){return{PLACEHOLDER_PREFIX:`@!MASK_${Date.now().toString(36)+Math.random().toString(36).substring(2,8)}_`,counter:0}}function Ja(e){const{PLACEHOLDER_PREFIX:t,counter:r}=BI();let i=r;const s=[],a="@!",u=h=>(s.push(h),`${t}${i++}${a}`);let c=e.replace(/("(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/g,u);c=c.replace(/([\{\s]\s*\w+\s*)(:\s*\d+)/g,(h,v,p)=>v+u(p)),c=c.replace(/:\d{2}:\d{2}/g,u);const f=new RegExp(":(?!4D\\.\\w+)[CPK]?\\d+","g");let g=c.replace(f,"");for(let h=0;h<s.length;h++){const p=`${t}${h}${a}`.replace(/([.*+?^${}()|[\]\\])/g,"\\$1"),y=new RegExp(p,"g");g=g.replace(y,s[h])}return g}var $f=(e=>(e.METHODS="method",e.WEBFORMS="webform",e.CLASSES="class",e.WELCOME="welcome",e.SETTINGS="settings",e.ROOT="root",e.REPORTS="report",e))($f||{});const yn={CLASSES:"Classes",METHODS:"Methods",SHARED:"Shared",WEBFORMS:"WebForms",CLASSES_FOLDER:"ClassesFolder",REPORTS:"Reports",DEBUGGER:"Debugger"};var Xe=(e=>(e.FOLDER="folder",e.WEBFORM="webform",e.REPORT="report",e.METHOD="method",e.CLASS="class",e.CLASS_FOLDER="classfolder",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.HTTP_HANDLERS="http-handlers",e.LOCALIZATION="localization",e.MODEL="model",e.DATA_EXPLORER="dataexplorer",e.MOBILE="mobile",e.MOBILEFORM="mform",e.FILE="file",e.TEXT="text",e))(Xe||{}),En=(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))(En||{}),If=(e=>(e[e.DISABLED=0]="DISABLED",e[e.ENABLED=1]="ENABLED",e))(If||{});const l0="roles.json",c0="qodlyApp.json",WI="model.4DModel",f0="HTTPHandlers.json",d0="Shared/i18n.json";function HI(e){const t=Lf(e);switch(t){case Xe.SETTINGS:return{filename:"Settings",type:t};case Xe.HTTP_HANDLERS:return{filename:"HTTP Handlers",type:t};case Xe.ROLES:return{filename:"Roles & Privileges",type:t};case Xe.LOCALIZATION:return{filename:"Localization",type:t};case Xe.MODEL:return{filename:"Model",type:t};default:{const r=e.split("/"),[i]=r[1].split(".");return{filename:i,type:t}}}}function Lf(e){const t=e.split("."),r=t.pop(),i=t.join(".").split("/")[0];switch(!0){case r==="4DModel":return Xe.MODEL;case r==="WebForm":return Xe.WEBFORM;case(["4dm","4qs","4qm"].includes(r)&&i===yn.METHODS):return Xe.METHOD;case(["4dm","4qs","4qm"].includes(r)&&i===yn.CLASSES):return Xe.CLASS;case e===l0:return Xe.ROLES;case e===f0:return Xe.HTTP_HANDLERS;case e===c0:return Xe.SETTINGS;case e===d0:return Xe.LOCALIZATION;default:return Xe.TEXT}}function UI(e,t=!1){switch(e){case yn.REPORTS:case"report":return"QoDoc";case yn.WEBFORMS:case"webform":return"WebForm";case"Mobile":case"mform":return"MForm";case"class":case"method":case yn.CLASSES:case yn.METHODS:return t?"4qs":"4dm";default:return""}}function qI(e,t=""){const r=new RegExp("(?<=\\/)(\\w+)(?=\\.)").exec(e);return r?r[1]:t}function ZI(e,t,r){switch(t){case Xe.MOBILEFORM:return`${e}.MForm`;case Xe.WEBFORM:return`${e}.WebForm`;case Xe.REPORT:return`${e}.QoDoc`;case Xe.METHOD:case Xe.CLASS:return`${e}.${r?"4qs":"4dm"}`;default:return e}}class p0{constructor(){this.current=Promise.resolve()}lock(){let t;const r=new Promise(s=>{t=s}),i=this.current.then(()=>t);return this.current=r,i}}function Mf(){const e=new p0;return async t=>{const r=await e.lock();try{const i=await t();return r(),i}catch(i){console.error(i),r();return}}}const h0=Ne.curry((e,t,r)=>e&&Ne.get(r,e)===t),GI=Ne.curry((e,t,r)=>Ne.get(r,e)!==t),KI=Ne.curry((e,t)=>Ne.get(t,"id")!==e),VI=Ne.curry((e,t)=>Ne.get(t,"id")===e),YI=Ne.curry((e,t)=>Ne.get(t,"path")===e);function XI(e="id",t,r){return r.findIndex(h0(e,t))!==-1}function JI(e,t){return e.localeCompare(t,void 0,{numeric:!0})}function QI(e){if(!e)return"";const{id:t,namespace:r}=e;return r&&t?`${r}:${t}`:t}function g0(e){return["bool","word","string","text","uuid","short","long","number","long64","duration","object","date","image","blob"].includes(e.type||"")}function eL(e){return e.type==="object"}function m0(e){var t;return e.kind==="relatedEntities"||((t=e.type)==null?void 0:t.includes("Selection"))||e.behavior==="relatedEntities"}function v0(e){return e.kind==="relatedEntity"||e.behavior==="relatedEntity"||!g0(e)}function tL(e){return m0(e)||v0(e)}function rL(e){return e.applyTo==="dataStore"}function nL(e){return e.applyTo==="dataClass"}function iL(e){return e.applyTo==="entity"}function oL(e){return e.applyTo==="entityCollection"}function sL(e){return e.type==="entity"}function aL(e){return e.type==="entitysel"}function y0(e){return e.dataType==="array"}function w0(e){return e.dataType==="object"}function b0(e){return e.type==="scalar"}function uL(e){return y0(e)||w0(e)||b0(e)}const lL=e=>e!=null&&e.type==="entity",cL=e=>e.type==="entitysel",fL=e=>e.type==="array"||e.type==="scalar"&&e.dataType==="array",dL=e=>e.type==="object"||e.type==="scalar"&&e.dataType==="object",pL=e=>e.type==="scalar"&&e.dataType==="date";function hL(){return new Promise((e,t)=>{window.addEventListener("bundle:ready",r=>r.data?e():t(r.caughtErr))})}function gL(){return new Promise(e=>{window.addEventListener("i18n:ready",()=>e())})}var jo=(e=>(e.capable="capable",e.incapable="incapable",e.indifferent="indifferent",e))(jo||{}),x0=(e=>(e.soap="soap",e.web="web",e.sql="sql",e.rest="rest",e))(x0||{}),Df=(e=>(e.table="table",e.catalog="catalog",e.currentRecord="currentRecord",e.currentSelection="currentSelection",e))(Df||{});const mL={publishedSoap:"soap",publishedWeb:"web",publishedSql:"sql",publishedRest:"rest"};function vL(e){var a;let t={};try{const u=((a=e.match(/\/\/%attributes = (.*)/))==null?void 0:a[1])||"";t=JSON.parse(u)}catch{}const{published4DMobile:r,...i}=t;return{...{invisible:!1,shared:!1,executedOnServer:!1,preemptive:jo.indifferent,publishedSoap:!1,publishedWsdl:!1,publishedWeb:!1,publishedSql:!1,publishedRest:!!r,publishedRestOptions:r||{table:"",scope:Df.table}},...i}}function S0(e){const t={};return e.invisible&&(t.invisible=!0),e.shared&&(t.shared=!0),e.executedOnServer&&(t.executedOnServer=!0),e.preemptive&&[jo.capable,jo.incapable].includes(e.preemptive)&&(t.preemptive=e.preemptive),e.publishedSoap&&(t.publishedSoap=!0,e.publishedWsdl&&(t.publishedWsdl=!0)),e.publishedWeb&&(t.publishedWeb=!0),e.publishedSql&&(t.publishedSql=!0),e.publishedRest&&e.publishedRestOptions&&(t.published4DMobile=e.publishedRestOptions),JSON.stringify(t).replace(/"(true|false)"/g,"$1")}function yL(e,t,r=!1){const i=Ne.isString(t)?t:S0(t);if(!r&&E0(e))return e;const s=_0(e);return`//%attributes = ${i}\r
204
+ ${s}`}function E0(e){return/^\/\/%attributes.*(?:\r\n|\n)?/g.test(e)}function _0(e){return e.replace(/^\/\/%attributes.*(?:\r\n|\n)?/g,"")}const wL=()=>Zn.uuid().replaceAll("-","").toUpperCase(),bL=e=>e.toLowerCase().replace(/[^a-z0-9]/g,"_").replace(/_{2,}/g,"_").replace(/^_|_$/g,"");var Me=(e=>(e.DATACLASS="dataclass",e.METHOD="method",e.ATTRIBUTE="attribute",e.DATASTORE="datastore",e.SINGLETON="singleton",e.SINGLETON_METHOD="singletonMethod",e))(Me||{}),qe=(e=>(e.DS_METHOD="dsMethod",e.DATACLASS_METHOD="dataclassMethod",e.ENTITY_METHOD="entityMethod",e.ENTITY_SEL_METHOD="entityselMethod",e))(qe||{});const xL=[Me.DATASTORE,Me.DATACLASS,Me.ATTRIBUTE,Me.SINGLETON_METHOD,Me.SINGLETON,Me.METHOD,qe.DS_METHOD,qe.DATACLASS_METHOD,qe.ENTITY_METHOD,qe.ENTITY_SEL_METHOD],Nm=e=>[qe.DS_METHOD,qe.ENTITY_METHOD,qe.DATACLASS_METHOD].includes(e)?Me.METHOD:e,$a="guest",Ff=[{key:"read",label:"Read",canApplyTo:[Me.DATASTORE,Me.DATACLASS,Me.ATTRIBUTE]},{key:"create",label:"Create",canApplyTo:[Me.DATASTORE,Me.DATACLASS,Me.ATTRIBUTE]},{key:"update",label:"Update",canApplyTo:[Me.DATASTORE,Me.DATACLASS,Me.ATTRIBUTE]},{key:"drop",label:"Delete",canApplyTo:[Me.DATASTORE,Me.DATACLASS,Me.ATTRIBUTE]},{key:"execute",label:"Execute",canApplyTo:[Me.DATASTORE,Me.DATACLASS,Me.METHOD,qe.DS_METHOD,qe.DATACLASS_METHOD,qe.ENTITY_METHOD,qe.ENTITY_SEL_METHOD,Me.SINGLETON,Me.SINGLETON_METHOD]},{key:"promote",label:"Promote",canApplyTo:[Me.METHOD,qe.DS_METHOD,qe.DATACLASS_METHOD,qe.ENTITY_METHOD,qe.ENTITY_SEL_METHOD,Me.SINGLETON_METHOD]}];function lr(e,...t){return Array.from(new Set([...e,...t]))}function O0(e){const t={},r=new Map;e.forEach(f=>{const g=f.id||Zn.generate();t[g]={...f,id:g,parents:[],includes:lr(f.includes||[]),resources:[]},r.set(f.privilege,g)}),Object.entries(t).forEach(([f,g])=>{const h=g.includes.map(v=>{const p=r.get(v);return p?(t[p].parents=lr(t[p].parents,p),p):""}).filter(Boolean);t[f]={...g,includes:h}});const i=T0(t),s=new Set;function a(f){s.add(f.id),f.includes=f.includes.filter(g=>!s.has(g))}if(i.forEach(a),i.forEach(f=>f.parents=[]),i.forEach(f=>{f.includes.forEach(g=>t[g].parents.push(f.id))}),Object.values(t).find(({privilege:f})=>f===$a))return t;const c=Zn.generate();return{[c]:{id:c,privilege:$a,includes:[],parents:[],resources:[]},...t}}function T0(e){return Object.values(e).sort((t,r)=>t.parents.length-r.parents.length)}function Qa(e,t){const r=t[e];let i=[];return r&&r.parents.forEach(s=>{i=lr(i,...Qa(s,t),s)}),i}function Ia(e,t){const r=t[e];let i=[];return r&&r.includes.forEach(s=>{i=lr(i,...Ia(s,t),s)}),i}function SL(e,t){const r=t[e];if(!r)return[];const i=[e,...Qa(e,t),...r.includes];return Object.keys(t).filter(s=>!i.includes(s))}function EL(e,t){return t[e]?Object.keys(t).reduce((i,s)=>s===e?i:{...i,[s]:{...t[s],parents:t[s].parents.filter(a=>a!==e),includes:t[s].includes.filter(a=>a!==e)}},{}):t}function _L(e,t,r){const i=r[e],s=r[t];return!i||!s?r:{...r,[e]:{...r[e],includes:lr(i.includes,t)},[t]:{...r[t],parents:lr(s.parents,e)}}}function OL(e,t,r){const i=r[e],s=r[t];return!i||!s?r:{...r,[e]:{...r[e],includes:r[e].includes.filter(a=>a!==t)},[t]:{...r[t],parents:r[t].parents.filter(a=>a!==e)}}}function TL(e,t){Xa(e),Object.entries(t).forEach(([,{privilege:i}])=>{if(e.toLowerCase()===i.toLowerCase())throw new Error(`There's already a Privilege with the name ${e}`)});const r=Zn.generate();return{[r]:{id:r,privilege:e,includes:[],parents:[],resources:[]},...t}}function AL(e,t,r){if(!e)throw new Error("Please enter a name");if(!r[t])throw new Error("Invalid privilege");return Object.entries(r).forEach(([,{privilege:i,id:s}])=>{if(e.toLowerCase()===i.toLowerCase()&&t!==s)throw new Error(`There's already a Privilege with the name ${e}`)}),{...r,[t]:{...r[t],privilege:e}}}function RL(e,t){return e.map(r=>Xr(r,t))}function Xr(e,t){return t[e]?t[e]:null}function A0({applyTo:e,type:t,...r}){return Object.entries(r).reduce((i,[s,a])=>{const u=Ne.find(Ff,["key",s]);return!u||!u.canApplyTo.includes(t)||(typeof a=="string"?a.split(","):a).forEach(f=>{i[f]=lr(i[f]||[],s)}),i},{})}const jm=(e,t=!1)=>["read","create","update","delete"].includes(e.toLowerCase())?`All ${t?"dataclasses and ":""}attributes have the '${e.toLowerCase()}' permission`:e.toLowerCase()==="execute"?`All functions defined ${t?"through the model (DataStore, Dataclasses, Entity selections, Entities) have the execute permission":"on this Dataclass, Entity selection class, Entity class have the execute permission"}`:`All ${t?"dataclasses, ":""}attributes and functions have the '${e.toLowerCase()}' permission`;function Nf(e){return{permissions:Ff.filter(({canApplyTo:t})=>t.includes(e.type)).map(({key:t,label:r})=>{const i={name:t,from:[]};switch(e.type){case Me.DATASTORE:return{...i,info:jm(r,!0)};case Me.DATACLASS:return{...i,info:jm(r)};default:return i}}),resource:e.applyTo,type:e.type}}function R0(e,t){const r=P0(t),i={};return e.filter(({type:s})=>xL.includes(s)).forEach(s=>{const a=A0(s);Object.entries(a).forEach(([u,c])=>{var h;const f=(h=r[u])==null?void 0:h.id;if(!f)return;i[f]=i[f]||{...t[f]};let g=Ne.find(i[f].resources,{resource:s.applyTo,type:s.type});g||(g=Nf(s),i[f].resources.push(g)),g.permissions=g.permissions.map(v=>({...v,checked:v.checked||c.includes(v.name)}))})}),{...t,...i}}function P0(e){return Object.values(e).reduce((t,r)=>({...t,[r.privilege]:r}),{})}function PL(e){var r;if(!e)throw new Error("Invalid roles data");const t=O0(e.privileges||[]);return{forceLogin:(e==null?void 0:e.forceLogin)||!1,restrictedByDefault:(e==null?void 0:e.restrictedByDefault)||!1,privileges:R0(((r=e==null?void 0:e.permissions)==null?void 0:r.allowed)||[],t),roles:((e==null?void 0:e.roles)||[]).map(({id:i=Zn.generate(),role:s,privileges:a=[]})=>({id:i,role:s,privileges:lr(a).map(u=>{var c;return(c=Object.values(t).find(({privilege:f})=>f===u))==null?void 0:c.id}).filter(Boolean)})).reduce((i,s)=>({...i,[s.id]:{...s}}),{})}}function CL(e){const t=Object.values(e.privileges).filter(({includes:i})=>i.length===0).map(({id:i})=>i),r=[...t,...t.map(i=>Qa(i,e.privileges).reverse())].flat().filter((i,s,a)=>a.indexOf(i)===s).map(i=>e.privileges[i]);return{forceLogin:e.forceLogin||!1,restrictedByDefault:e.restrictedByDefault||!1,permissions:{allowed:Object.values(e.privileges).reduce((i,s)=>(s.resources.forEach(({permissions:a,resource:u,type:c})=>{let f=Ne.find(i,{applyTo:u,type:Nm(c)});f||(f={applyTo:u,type:Nm(c)},i.push(f)),a.forEach(({name:g,checked:h})=>{h&&f&&(f[g]=f[g]||[],f[g].push(s.privilege))})}),i),[])},privileges:r.filter(({privilege:i})=>i!==$a).map(({id:i,includes:s,privilege:a})=>({id:i,privilege:a,includes:s.map(u=>e.privileges[u].privilege)})),roles:Object.values(e.roles).map(i=>({...i,privileges:i.privileges.map(s=>{var a;return(a=e.privileges[s])==null?void 0:a.privilege}).filter(Boolean)}))}}function kL(e,t){const r=t[e],i={children:[],links:[],parents:[],selected:e};if(!r)return i;function s(c,f,g=[]){const h=c.reduce((v,p)=>[...v,...t[p][f]],[]);return h.length===0?g:(g.push(h),s(h,f,g))}function a(c){const f=[],g=[];for(let h=c.length-1;h>=0;h-=1){const v=c[h].filter(p=>f.includes(p)?!1:(f.push(p),!0));v.length>0&&g.unshift(lr(v))}return g}function u(c,f){const g=[];return c.reduce((h,v)=>(v.forEach(p=>{t[p][f==="parents"?"includes":"parents"].forEach(x=>{g.includes(x)&&h.push(f==="parents"?{source:p,target:x}:{source:x,target:p})}),g.push(p)}),h),[])}return i.children=s([e],"includes"),i.children=a(i.children),i.parents=s([e],"parents"),i.parents=a(i.parents),i.links=[...u([[e],...i.parents],"parents"),...u([[e],...i.children],"includes")],i}function $L(e,t,r){const i=Xr(e,r);if(!i||Ne.find(i.resources,{resource:t.applyTo,type:t.type}))return r;const s={...i,resources:[...i.resources,Nf(t)]};return{...r,[e]:s}}function IL(e,t,r){const i=Xr(e,r);if(!i)return r;const s={...i,resources:i.resources.filter(({resource:a,type:u})=>a!==t.applyTo||u!==t.type)};return{...r,[e]:s}}function LL(e,t){const r=Object.entries(e).map(([i,s])=>{const a=Xr(i,t);if(!a)return{[i]:t[i]};const u={...a,resources:a.resources.filter(({resource:c,type:f})=>!s.some(g=>g.applyTo===c&&g.type===f))};return{[i]:u}}).reduce((i,s)=>({...i,...s}),{});return{...t,...r}}function ML(e,t){const r=Xr(e,t);if(!r)return t;const i={...r,resources:r.resources.filter(s=>s.permissions.some(a=>a.from.length)).map(s=>({...s,permissions:s.permissions.map(a=>({...a,checked:!1}))}))};return{...t,[e]:i}}function DL(e,t,r,i){const s=Xr(e,i);if(!s)return i;const u=Ne.find(s.resources,{type:t.type,resource:t.resource})?{...s,resources:s.resources.map(c=>c.type===t.type&&c.resource===t.resource?{...c,permissions:t.permissions.map(f=>f.name===r.name?{...f,checked:!f.checked,from:[]}:f)}:c)}:{...s,resources:[...s.resources,{...t,permissions:t.permissions.map(c=>({...c,checked:r.name===c.name,from:[]}))}]};return{...i,[e]:u}}function FL(e,t){var f;const r=C0(e,t)||[],i=((f=Xr(e,t))==null?void 0:f.resources)||[],u=([...r,...i].filter(({type:g})=>[qe.DS_METHOD,qe.DATACLASS_METHOD,qe.ENTITY_METHOD,qe.ENTITY_SEL_METHOD].includes(g))||[]).map(({resource:g})=>g);return Object.entries(t).reduce((g,[h,{resources:v}])=>(v.filter(({resource:p,type:y})=>[qe.DS_METHOD,qe.DATACLASS_METHOD,qe.ENTITY_METHOD,qe.ENTITY_SEL_METHOD].includes(y)&&u.includes(p)).forEach(({permissions:p,resource:y})=>{var d;((d=p.find(({name:b})=>b==="promote"))==null?void 0:d.checked)&&(g[y]=lr(g[y]||[],h))}),g),{})}function C0(e,t){var u;const r=Xr(e,t);if(!r)return[];const i=(u=Object.values(t).find(c=>c.privilege===$a))==null?void 0:u.id;return(i&&i!==e?lr(Ia(e,t),i):Ia(e,t)).reduce((c,f)=>(t[f].resources.forEach(h=>{if(h.permissions.filter(({checked:y,name:x})=>y&&x!=="promote").length===0)return;const p=Ne.find(c,{type:h.type,resource:h.resource});if(!p){c.push({...h,permissions:h.permissions.map(y=>({...y,from:y.checked?[f]:[],checked:!1}))});return}p.permissions=p.permissions.map((y,x)=>{let{from:d=[]}=y;return h.permissions[x].checked&&!d.includes(f)&&(d=[...d,f]),{...y,from:d,checked:y.checked}})}),c),Ne.clone(r.resources.map(c=>({...c,permissions:c.permissions.map(({checked:f,...g})=>({...g,checked:!!f}))}))))}const NL=(e,t,r)=>{const i={id:e,role:t,privileges:[]};return{...r,[i.id]:i}},jL=(e,t)=>t[e]?Object.values(t).reduce((r,i)=>e===i.id||i.role===""?r:{...r,[i.id]:i},{}):t,zL=(e,t)=>{if(Xa(e.role),Object.values(t).find(i=>i.role===e.role))throw new Error(`a role with the name ${e.role} already exists`);return Object.values(t).reduce((i,s)=>e.id===s.id?{...i,[e.id]:e}:{...i,[s.id]:s},{})},at="/rest/$designer",Ko="/rest/$designer-ext";function BL(...e){return t=>{if(e.length===0)return t;const r={...t};return e.forEach(i=>{typeof r[i]=="string"&&(r[i]=new Date(r[i]))}),r}}class jc extends Error{constructor(t,r,i){super(),this.url=t,this.response=r,this.data=i}log(){console.error("Error while sending the request",this)}}async function De(e,t){var s;ka.next({action:No.REQUEST_SENT});const r=await window.fetch(e,t);if(/401/.test(r.status.toString())&&(window.location.href="/login.html?redirect=studio"),/^[45]/.test(r.status.toString())){let a;try{const u=await r.json();((s=u==null?void 0:u.__ERROR)==null?void 0:s.some(f=>f.errCode===1651))&&ka.next({action:No.EVENT_EMITED,payload:{eventName:"onsessionexpired"}}),a=new jc(e,r,u)}catch{a=new jc(e,r)}throw a.log(),a}return await r.json()}function WL(e){return ka.next({action:No.REQUEST_SENT}),e}var _r={},mt={},zm;function zn(){if(zm)return mt;zm=1;var e=mt.ValidationError=function(d,b,m,S,E,R){if(Array.isArray(S)?(this.path=S,this.property=S.reduce(function(k,W){return k+c(W)},"instance")):S!==void 0&&(this.property=S),d&&(this.message=d),m){var O=m.$id||m.id;this.schema=O||m}b!==void 0&&(this.instance=b),this.name=E,this.argument=R,this.stack=this.toString()};e.prototype.toString=function(){return this.property+" "+this.message};var t=mt.ValidatorResult=function(d,b,m,S){this.instance=d,this.schema=b,this.options=m,this.path=S.path,this.propertyPath=S.propertyPath,this.errors=[],this.throwError=m&&m.throwError,this.throwFirst=m&&m.throwFirst,this.throwAll=m&&m.throwAll,this.disableFormat=m&&m.disableFormat===!0};t.prototype.addError=function(d){var b;if(typeof d=="string")b=new e(d,this.instance,this.schema,this.path);else{if(!d)throw new Error("Missing error detail");if(!d.message)throw new Error("Missing error message");if(!d.name)throw new Error("Missing validator type");b=new e(d.message,this.instance,this.schema,this.path,d.name,d.argument)}if(this.errors.push(b),this.throwFirst)throw new i(this);if(this.throwError)throw b;return b},t.prototype.importErrors=function(d){typeof d=="string"||d&&d.validatorType?this.addError(d):d&&d.errors&&(this.errors=this.errors.concat(d.errors))};function r(x,d){return d+": "+x.toString()+`
205
+ `}t.prototype.toString=function(d){return this.errors.map(r).join("")},Object.defineProperty(t.prototype,"valid",{get:function(){return!this.errors.length}}),mt.ValidatorResultError=i;function i(x){typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,i),this.instance=x.instance,this.schema=x.schema,this.options=x.options,this.errors=x.errors}i.prototype=new Error,i.prototype.constructor=i,i.prototype.name="Validation Error";var s=mt.SchemaError=function x(d,b){this.message=d,this.schema=b,Error.call(this,d),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,x)};s.prototype=Object.create(Error.prototype,{constructor:{value:s,enumerable:!1},name:{value:"SchemaError",enumerable:!1}});var a=mt.SchemaContext=function(d,b,m,S,E){this.schema=d,this.options=b,Array.isArray(m)?(this.path=m,this.propertyPath=m.reduce(function(R,O){return R+c(O)},"instance")):this.propertyPath=m,this.base=S,this.schemas=E};a.prototype.resolve=function(d){return y(this.base,d)},a.prototype.makeChild=function(d,b){var m=b===void 0?this.path:this.path.concat([b]),S=d.$id||d.id;let E=y(this.base,S||"");var R=new a(d,this.options,m,E,Object.create(this.schemas));return S&&!R.schemas[E]&&(R.schemas[E]=d),R};var u=mt.FORMAT_REGEXPS={"date-time":/^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-(3[01]|0[1-9]|[12][0-9])[tT ](2[0-4]|[01][0-9]):([0-5][0-9]):(60|[0-5][0-9])(\.\d+)?([zZ]|[+-]([0-5][0-9]):(60|[0-5][0-9]))$/,date:/^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-(3[01]|0[1-9]|[12][0-9])$/,time:/^(2[0-4]|[01][0-9]):([0-5][0-9]):(60|[0-5][0-9])$/,duration:/P(T\d+(H(\d+M(\d+S)?)?|M(\d+S)?|S)|\d+(D|M(\d+D)?|Y(\d+M(\d+D)?)?)(T\d+(H(\d+M(\d+S)?)?|M(\d+S)?|S))?|\d+W)/i,email:/^(?:[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+\.)*[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+@(?:(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!\.)){0,61}[a-zA-Z0-9]?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!$)){0,61}[a-zA-Z0-9]?)|(?:\[(?:(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\]))$/,"idn-email":/^("(?:[!#-\[\]-\u{10FFFF}]|\\[\t -\u{10FFFF}])*"|[!#-'*+\-/-9=?A-Z\^-\u{10FFFF}](?:\.?[!#-'*+\-/-9=?A-Z\^-\u{10FFFF}])*)@([!#-'*+\-/-9=?A-Z\^-\u{10FFFF}](?:\.?[!#-'*+\-/-9=?A-Z\^-\u{10FFFF}])*|\[[!-Z\^-\u{10FFFF}]*\])$/u,"ip-address":/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,ipv6:/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,uri:/^[a-zA-Z][a-zA-Z0-9+.-]*:[^\s]*$/,"uri-reference":/^(((([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|([A-Za-z][+\-.0-9A-Za-z]*:?)?)|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|(\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?)?))#(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|(([A-Za-z][+\-.0-9A-Za-z]*)?%[0-9A-Fa-f]{2}|[!$&-.0-9;=@_~]|[A-Za-z][+\-.0-9A-Za-z]*[!$&-*,;=@_~])(%[0-9A-Fa-f]{2}|[!$&-.0-9;=@-Z_a-z~])*((([/?](%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*)?#|[/?])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*)?|([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+(:\d*)?|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?:\d*|\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)?|[A-Za-z][+\-.0-9A-Za-z]*:?)?$/,iri:/^[a-zA-Z][a-zA-Z0-9+.-]*:[^\s]*$/,"iri-reference":/^(((([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~-\u{10FFFF}]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|([A-Za-z][+\-.0-9A-Za-z]*:?)?)|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~-\u{10FFFF}])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|(\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?)?))#(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|(([A-Za-z][+\-.0-9A-Za-z]*)?%[0-9A-Fa-f]{2}|[!$&-.0-9;=@_~-\u{10FFFF}]|[A-Za-z][+\-.0-9A-Za-z]*[!$&-*,;=@_~-\u{10FFFF}])(%[0-9A-Fa-f]{2}|[!$&-.0-9;=@-Z_a-z~-\u{10FFFF}])*((([/?](%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*)?#|[/?])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*)?|([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~-\u{10FFFF}]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~-\u{10FFFF}])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+(:\d*)?|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?:\d*|\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)?|[A-Za-z][+\-.0-9A-Za-z]*:?)?$/u,uuid:/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i,"uri-template":/(%[0-9a-f]{2}|[!#$&(-;=?@\[\]_a-z~]|\{[!#&+,./;=?@|]?(%[0-9a-f]{2}|[0-9_a-z])(\.?(%[0-9a-f]{2}|[0-9_a-z]))*(:[1-9]\d{0,3}|\*)?(,(%[0-9a-f]{2}|[0-9_a-z])(\.?(%[0-9a-f]{2}|[0-9_a-z]))*(:[1-9]\d{0,3}|\*)?)*\})*/iu,"json-pointer":/^(\/([\x00-\x2e0-@\[-}\x7f]|~[01])*)*$/iu,"relative-json-pointer":/^\d+(#|(\/([\x00-\x2e0-@\[-}\x7f]|~[01])*)*)$/iu,hostname:/^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/,"host-name":/^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/,"utc-millisec":function(x){return typeof x=="string"&&parseFloat(x)===parseInt(x,10)&&!isNaN(x)},regex:function(x){var d=!0;try{new RegExp(x)}catch{d=!1}return d},style:/[\r\n\t ]*[^\r\n\t ][^:]*:[\r\n\t ]*[^\r\n\t ;]*[\r\n\t ]*;?/,color:/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/,phone:/^\+(?:[0-9] ?){6,14}[0-9]$/,alpha:/^[a-zA-Z]+$/,alphanumeric:/^[a-zA-Z0-9]+$/};u.regexp=u.regex,u.pattern=u.regex,u.ipv4=u["ip-address"],mt.isFormat=function(d,b,m){if(typeof d=="string"&&u[b]!==void 0){if(u[b]instanceof RegExp)return u[b].test(d);if(typeof u[b]=="function")return u[b](d)}else if(m&&m.customFormats&&typeof m.customFormats[b]=="function")return m.customFormats[b](d);return!0};var c=mt.makeSuffix=function(d){return d=d.toString(),!d.match(/[.\s\[\]]/)&&!d.match(/^[\d]/)?"."+d:d.match(/^\d+$/)?"["+d+"]":"["+JSON.stringify(d)+"]"};mt.deepCompareStrict=function x(d,b){if(typeof d!=typeof b)return!1;if(Array.isArray(d))return!Array.isArray(b)||d.length!==b.length?!1:d.every(function(E,R){return x(d[R],b[R])});if(typeof d=="object"){if(!d||!b)return d===b;var m=Object.keys(d),S=Object.keys(b);return m.length!==S.length?!1:m.every(function(E){return x(d[E],b[E])})}return d===b};function f(x,d,b,m){typeof b=="object"?d[m]=v(x[m],b):x.indexOf(b)===-1&&d.push(b)}function g(x,d,b){d[b]=x[b]}function h(x,d,b,m){typeof d[m]!="object"||!d[m]?b[m]=d[m]:x[m]?b[m]=v(x[m],d[m]):b[m]=d[m]}function v(x,d){var b=Array.isArray(d),m=b&&[]||{};return b?(x=x||[],m=m.concat(x),d.forEach(f.bind(null,x,m))):(x&&typeof x=="object"&&Object.keys(x).forEach(g.bind(null,x,m)),Object.keys(d).forEach(h.bind(null,x,d,m))),m}mt.deepMerge=v,mt.objectGetPath=function(d,b){for(var m=b.split("/").slice(1),S;typeof(S=m.shift())=="string";){var E=decodeURIComponent(S.replace(/~0/,"~").replace(/~1/g,"/"));if(!(E in d))return;d=d[E]}return d};function p(x){return"/"+encodeURIComponent(x).replace(/~/g,"%7E")}mt.encodePath=function(d){return d.map(p).join("")},mt.getDecimalPlaces=function(d){var b=0;if(isNaN(d))return b;typeof d!="number"&&(d=Number(d));var m=d.toString().split("e");if(m.length===2){if(m[1][0]!=="-")return b;b=Number(m[1].slice(1))}var S=m[0].split(".");return S.length===2&&(b+=S[1].length),b},mt.isSchema=function(d){return typeof d=="object"&&d||typeof d=="boolean"};var y=mt.resolveUrl=function(d,b){const m=new URL(b,new URL(d,"resolve://"));if(m.protocol==="resolve:"){const{pathname:S,search:E,hash:R}=m;return S+E+R}return m.toString()};return mt}var dc,Bm;function HL(){if(Bm)return dc;Bm=1;var e=zn(),t=e.ValidatorResult,r=e.SchemaError,i={};i.ignoreProperties={id:!0,default:!0,description:!0,title:!0,additionalItems:!0,then:!0,else:!0,$schema:!0,$ref:!0,extends:!0};var s=i.validators={};s.type=function(v,p,y,x){if(v===void 0)return null;var d=new t(v,p,y,x),b=Array.isArray(p.type)?p.type:[p.type];if(!b.some(this.testType.bind(this,v,p,y,x))){var m=b.map(function(S){if(S){var E=S.$id||S.id;return E?"<"+E+">":S+""}});d.addError({name:"type",argument:m,message:"is not of a type(s) "+m})}return d};function a(h,v,p,y,x){var d=v.throwError,b=v.throwAll;v.throwError=!1,v.throwAll=!1;var m=this.validateSchema(h,x,v,p);return v.throwError=d,v.throwAll=b,!m.valid&&y instanceof Function&&y(m),m.valid}s.anyOf=function(v,p,y,x){if(v===void 0)return null;var d=new t(v,p,y,x),b=new t(v,p,y,x);if(!Array.isArray(p.anyOf))throw new r("anyOf must be an array");if(!p.anyOf.some(a.bind(this,v,y,x,function(S){b.importErrors(S)}))){var m=p.anyOf.map(function(S,E){var R=S.$id||S.id;return R?"<"+R+">":S.title&&JSON.stringify(S.title)||S.$ref&&"<"+S.$ref+">"||"[subschema "+E+"]"});y.nestedErrors&&d.importErrors(b),d.addError({name:"anyOf",argument:m,message:"is not any of "+m.join(",")})}return d},s.allOf=function(v,p,y,x){if(v===void 0)return null;if(!Array.isArray(p.allOf))throw new r("allOf must be an array");var d=new t(v,p,y,x),b=this;return p.allOf.forEach(function(m,S){var E=b.validateSchema(v,m,y,x);if(!E.valid){var R=m.$id||m.id,O=R||m.title&&JSON.stringify(m.title)||m.$ref&&"<"+m.$ref+">"||"[subschema "+S+"]";d.addError({name:"allOf",argument:{id:O,length:E.errors.length,valid:E},message:"does not match allOf schema "+O+" with "+E.errors.length+" error[s]:"}),d.importErrors(E)}}),d},s.oneOf=function(v,p,y,x){if(v===void 0)return null;if(!Array.isArray(p.oneOf))throw new r("oneOf must be an array");var d=new t(v,p,y,x),b=new t(v,p,y,x),m=p.oneOf.filter(a.bind(this,v,y,x,function(E){b.importErrors(E)})).length,S=p.oneOf.map(function(E,R){var O=E.$id||E.id;return O||E.title&&JSON.stringify(E.title)||E.$ref&&"<"+E.$ref+">"||"[subschema "+R+"]"});return m!==1&&(y.nestedErrors&&d.importErrors(b),d.addError({name:"oneOf",argument:S,message:"is not exactly one from "+S.join(",")})),d},s.if=function(v,p,y,x){if(v===void 0)return null;if(!e.isSchema(p.if))throw new Error('Expected "if" keyword to be a schema');var d=a.call(this,v,y,x,null,p.if),b=new t(v,p,y,x),m;if(d){if(p.then===void 0)return;if(!e.isSchema(p.then))throw new Error('Expected "then" keyword to be a schema');m=this.validateSchema(v,p.then,y,x.makeChild(p.then)),b.importErrors(m)}else{if(p.else===void 0)return;if(!e.isSchema(p.else))throw new Error('Expected "else" keyword to be a schema');m=this.validateSchema(v,p.else,y,x.makeChild(p.else)),b.importErrors(m)}return b};function u(h,v){if(Object.hasOwnProperty.call(h,v))return h[v];if(v in h){for(;h=Object.getPrototypeOf(h);)if(Object.propertyIsEnumerable.call(h,v))return h[v]}}s.propertyNames=function(v,p,y,x){if(this.types.object(v)){var d=new t(v,p,y,x),b=p.propertyNames!==void 0?p.propertyNames:{};if(!e.isSchema(b))throw new r('Expected "propertyNames" to be a schema (object or boolean)');for(var m in v)if(u(v,m)!==void 0){var S=this.validateSchema(m,b,y,x.makeChild(b));d.importErrors(S)}return d}},s.properties=function(v,p,y,x){if(this.types.object(v)){var d=new t(v,p,y,x),b=p.properties||{};for(var m in b){var S=b[m];if(S!==void 0){if(S===null)throw new r('Unexpected null, expected schema in "properties"');typeof y.preValidateProperty=="function"&&y.preValidateProperty(v,m,S,y,x);var E=u(v,m),R=this.validateSchema(E,S,y,x.makeChild(S,m));R.instance!==d.instance[m]&&(d.instance[m]=R.instance),d.importErrors(R)}}return d}};function c(h,v,p,y,x,d){if(this.types.object(h)&&!(v.properties&&v.properties[x]!==void 0))if(v.additionalProperties===!1)d.addError({name:"additionalProperties",argument:x,message:"is not allowed to have the additional property "+JSON.stringify(x)});else{var b=v.additionalProperties||{};typeof p.preValidateProperty=="function"&&p.preValidateProperty(h,x,b,p,y);var m=this.validateSchema(h[x],b,p,y.makeChild(b,x));m.instance!==d.instance[x]&&(d.instance[x]=m.instance),d.importErrors(m)}}s.patternProperties=function(v,p,y,x){if(this.types.object(v)){var d=new t(v,p,y,x),b=p.patternProperties||{};for(var m in v){var S=!0;for(var E in b){var R=b[E];if(R!==void 0){if(R===null)throw new r('Unexpected null, expected schema in "patternProperties"');try{var O=new RegExp(E,"u")}catch{O=new RegExp(E)}if(O.test(m)){S=!1,typeof y.preValidateProperty=="function"&&y.preValidateProperty(v,m,R,y,x);var k=this.validateSchema(v[m],R,y,x.makeChild(R,m));k.instance!==d.instance[m]&&(d.instance[m]=k.instance),d.importErrors(k)}}}S&&c.call(this,v,p,y,x,m,d)}return d}},s.additionalProperties=function(v,p,y,x){if(this.types.object(v)){if(p.patternProperties)return null;var d=new t(v,p,y,x);for(var b in v)c.call(this,v,p,y,x,b,d);return d}},s.minProperties=function(v,p,y,x){if(this.types.object(v)){var d=new t(v,p,y,x),b=Object.keys(v);return b.length>=p.minProperties||d.addError({name:"minProperties",argument:p.minProperties,message:"does not meet minimum property length of "+p.minProperties}),d}},s.maxProperties=function(v,p,y,x){if(this.types.object(v)){var d=new t(v,p,y,x),b=Object.keys(v);return b.length<=p.maxProperties||d.addError({name:"maxProperties",argument:p.maxProperties,message:"does not meet maximum property length of "+p.maxProperties}),d}},s.items=function(v,p,y,x){var d=this;if(this.types.array(v)&&p.items!==void 0){var b=new t(v,p,y,x);return v.every(function(m,S){if(Array.isArray(p.items))var E=p.items[S]===void 0?p.additionalItems:p.items[S];else var E=p.items;if(E===void 0)return!0;if(E===!1)return b.addError({name:"items",message:"additionalItems not permitted"}),!1;var R=d.validateSchema(m,E,y,x.makeChild(E,S));return R.instance!==b.instance[S]&&(b.instance[S]=R.instance),b.importErrors(R),!0}),b}},s.contains=function(v,p,y,x){var d=this;if(this.types.array(v)&&p.contains!==void 0){if(!e.isSchema(p.contains))throw new Error('Expected "contains" keyword to be a schema');var b=new t(v,p,y,x),m=v.some(function(S,E){var R=d.validateSchema(S,p.contains,y,x.makeChild(p.contains,E));return R.errors.length===0});return m===!1&&b.addError({name:"contains",argument:p.contains,message:"must contain an item matching given schema"}),b}},s.minimum=function(v,p,y,x){if(this.types.number(v)){var d=new t(v,p,y,x);return p.exclusiveMinimum&&p.exclusiveMinimum===!0?v>p.minimum||d.addError({name:"minimum",argument:p.minimum,message:"must be greater than "+p.minimum}):v>=p.minimum||d.addError({name:"minimum",argument:p.minimum,message:"must be greater than or equal to "+p.minimum}),d}},s.maximum=function(v,p,y,x){if(this.types.number(v)){var d=new t(v,p,y,x);return p.exclusiveMaximum&&p.exclusiveMaximum===!0?v<p.maximum||d.addError({name:"maximum",argument:p.maximum,message:"must be less than "+p.maximum}):v<=p.maximum||d.addError({name:"maximum",argument:p.maximum,message:"must be less than or equal to "+p.maximum}),d}},s.exclusiveMinimum=function(v,p,y,x){if(typeof p.exclusiveMinimum!="boolean"&&this.types.number(v)){var d=new t(v,p,y,x),b=v>p.exclusiveMinimum;return b||d.addError({name:"exclusiveMinimum",argument:p.exclusiveMinimum,message:"must be strictly greater than "+p.exclusiveMinimum}),d}},s.exclusiveMaximum=function(v,p,y,x){if(typeof p.exclusiveMaximum!="boolean"&&this.types.number(v)){var d=new t(v,p,y,x),b=v<p.exclusiveMaximum;return b||d.addError({name:"exclusiveMaximum",argument:p.exclusiveMaximum,message:"must be strictly less than "+p.exclusiveMaximum}),d}};var f=function(v,p,y,x,d,b){if(this.types.number(v)){var m=p[d];if(m==0)throw new r(d+" cannot be zero");var S=new t(v,p,y,x),E=e.getDecimalPlaces(v),R=e.getDecimalPlaces(m),O=Math.max(E,R),k=Math.pow(10,O);return Math.round(v*k)%Math.round(m*k)!==0&&S.addError({name:d,argument:m,message:b+JSON.stringify(m)}),S}};s.multipleOf=function(v,p,y,x){return f.call(this,v,p,y,x,"multipleOf","is not a multiple of (divisible by) ")},s.divisibleBy=function(v,p,y,x){return f.call(this,v,p,y,x,"divisibleBy","is not divisible by (multiple of) ")},s.required=function(v,p,y,x){var d=new t(v,p,y,x);return v===void 0&&p.required===!0?d.addError({name:"required",message:"is required"}):this.types.object(v)&&Array.isArray(p.required)&&p.required.forEach(function(b){u(v,b)===void 0&&d.addError({name:"required",argument:b,message:"requires property "+JSON.stringify(b)})}),d},s.pattern=function(v,p,y,x){if(this.types.string(v)){var d=new t(v,p,y,x),b=p.pattern;try{var m=new RegExp(b,"u")}catch{m=new RegExp(b)}return v.match(m)||d.addError({name:"pattern",argument:p.pattern,message:"does not match pattern "+JSON.stringify(p.pattern.toString())}),d}},s.format=function(v,p,y,x){if(v!==void 0){var d=new t(v,p,y,x);return!d.disableFormat&&!e.isFormat(v,p.format,this)&&d.addError({name:"format",argument:p.format,message:"does not conform to the "+JSON.stringify(p.format)+" format"}),d}},s.minLength=function(v,p,y,x){if(this.types.string(v)){var d=new t(v,p,y,x),b=v.match(/[\uDC00-\uDFFF]/g),m=v.length-(b?b.length:0);return m>=p.minLength||d.addError({name:"minLength",argument:p.minLength,message:"does not meet minimum length of "+p.minLength}),d}},s.maxLength=function(v,p,y,x){if(this.types.string(v)){var d=new t(v,p,y,x),b=v.match(/[\uDC00-\uDFFF]/g),m=v.length-(b?b.length:0);return m<=p.maxLength||d.addError({name:"maxLength",argument:p.maxLength,message:"does not meet maximum length of "+p.maxLength}),d}},s.minItems=function(v,p,y,x){if(this.types.array(v)){var d=new t(v,p,y,x);return v.length>=p.minItems||d.addError({name:"minItems",argument:p.minItems,message:"does not meet minimum length of "+p.minItems}),d}},s.maxItems=function(v,p,y,x){if(this.types.array(v)){var d=new t(v,p,y,x);return v.length<=p.maxItems||d.addError({name:"maxItems",argument:p.maxItems,message:"does not meet maximum length of "+p.maxItems}),d}};function g(h,v,p){var y,x=p.length;for(y=v+1,x;y<x;y++)if(e.deepCompareStrict(h,p[y]))return!1;return!0}return s.uniqueItems=function(v,p,y,x){if(p.uniqueItems===!0&&this.types.array(v)){var d=new t(v,p,y,x);return v.every(g)||d.addError({name:"uniqueItems",message:"contains duplicate item"}),d}},s.dependencies=function(v,p,y,x){if(this.types.object(v)){var d=new t(v,p,y,x);for(var b in p.dependencies)if(v[b]!==void 0){var m=p.dependencies[b],S=x.makeChild(m,b);if(typeof m=="string"&&(m=[m]),Array.isArray(m))m.forEach(function(R){v[R]===void 0&&d.addError({name:"dependencies",argument:S.propertyPath,message:"property "+R+" not found, required by "+S.propertyPath})});else{var E=this.validateSchema(v,m,y,S);d.instance!==E.instance&&(d.instance=E.instance),E&&E.errors.length&&(d.addError({name:"dependencies",argument:S.propertyPath,message:"does not meet dependency required by "+S.propertyPath}),d.importErrors(E))}}return d}},s.enum=function(v,p,y,x){if(v===void 0)return null;if(!Array.isArray(p.enum))throw new r("enum expects an array",p);var d=new t(v,p,y,x);return p.enum.some(e.deepCompareStrict.bind(null,v))||d.addError({name:"enum",argument:p.enum,message:"is not one of enum values: "+p.enum.map(String).join(",")}),d},s.const=function(v,p,y,x){if(v===void 0)return null;var d=new t(v,p,y,x);return e.deepCompareStrict(p.const,v)||d.addError({name:"const",argument:p.const,message:"does not exactly match expected constant: "+p.const}),d},s.not=s.disallow=function(v,p,y,x){var d=this;if(v===void 0)return null;var b=new t(v,p,y,x),m=p.not||p.disallow;return m?(Array.isArray(m)||(m=[m]),m.forEach(function(S){if(d.testType(v,p,y,x,S)){var E=S&&(S.$id||S.id),R=E||S;b.addError({name:"not",argument:R,message:"is of prohibited type "+R})}}),b):null},dc=i,dc}var sa={},Wm;function zc(){if(Wm)return sa;Wm=1;var e=zn();sa.SchemaScanResult=t;function t(r,i){this.id=r,this.ref=i}return sa.scan=function(i,s){function a(h,v){if(!v||typeof v!="object")return;if(v.$ref){let d=e.resolveUrl(h,v.$ref);g[d]=g[d]?g[d]+1:0;return}var p=v.$id||v.id;let y=e.resolveUrl(h,p);var x=p?y:h;if(x){if(x.indexOf("#")<0&&(x+="#"),f[x]){if(!e.deepCompareStrict(f[x],v))throw new Error("Schema <"+x+"> already exists with different definition");return f[x]}f[x]=v,x[x.length-1]=="#"&&(f[x.substring(0,x.length-1)]=v)}u(x+"/items",Array.isArray(v.items)?v.items:[v.items]),u(x+"/extends",Array.isArray(v.extends)?v.extends:[v.extends]),a(x+"/additionalItems",v.additionalItems),c(x+"/properties",v.properties),a(x+"/additionalProperties",v.additionalProperties),c(x+"/definitions",v.definitions),c(x+"/patternProperties",v.patternProperties),c(x+"/dependencies",v.dependencies),u(x+"/disallow",v.disallow),u(x+"/allOf",v.allOf),u(x+"/anyOf",v.anyOf),u(x+"/oneOf",v.oneOf),a(x+"/not",v.not)}function u(h,v){if(Array.isArray(v))for(var p=0;p<v.length;p++)a(h+"/"+p,v[p])}function c(h,v){if(!(!v||typeof v!="object"))for(var p in v)a(h+"/"+p,v[p])}var f={},g={};return a(i,s),new t(f,g)},sa}var pc,Hm;function UL(){if(Hm)return pc;Hm=1;var e=HL(),t=zn(),r=zc().scan,i=t.ValidatorResult,s=t.ValidatorResultError,a=t.SchemaError,u=t.SchemaContext,c="/",f=function v(){this.customFormats=Object.create(v.prototype.customFormats),this.schemas={},this.unresolvedRefs=[],this.types=Object.create(h),this.attributes=Object.create(e.validators)};f.prototype.customFormats={},f.prototype.schemas=null,f.prototype.types=null,f.prototype.attributes=null,f.prototype.unresolvedRefs=null,f.prototype.addSchema=function(p,y){var x=this;if(!p)return null;var d=r(y||c,p),b=y||p.$id||p.id;for(var m in d.id)this.schemas[m]=d.id[m];for(var m in d.ref)this.unresolvedRefs.push(m);return this.unresolvedRefs=this.unresolvedRefs.filter(function(S){return typeof x.schemas[S]>"u"}),this.schemas[b]},f.prototype.addSubSchemaArray=function(p,y){if(Array.isArray(y))for(var x=0;x<y.length;x++)this.addSubSchema(p,y[x])},f.prototype.addSubSchemaObject=function(p,y){if(!(!y||typeof y!="object"))for(var x in y)this.addSubSchema(p,y[x])},f.prototype.setSchemas=function(p){this.schemas=p},f.prototype.getSchema=function(p){return this.schemas[p]},f.prototype.validate=function(p,y,x,d){if(typeof y!="boolean"&&typeof y!="object"||y===null)throw new a("Expected `schema` to be an object or boolean");x||(x={});var b=y.$id||y.id;let m=t.resolveUrl(x.base,b||"");if(!d){d=new u(y,x,[],m,Object.create(this.schemas)),d.schemas[m]||(d.schemas[m]=y);var S=r(m,y);for(var E in S.id){var R=S.id[E];d.schemas[E]=R}}if(x.required&&p===void 0){var O=new i(p,y,x,d);return O.addError("is required, but is undefined"),O}var O=this.validateSchema(p,y,x,d);if(O){if(x.throwAll&&O.errors.length)throw new s(O)}else throw new Error("Result undefined");return O};function g(v){var p=typeof v=="string"?v:v.$ref;return typeof p=="string"?p:!1}f.prototype.validateSchema=function(p,y,x,d){var b=new i(p,y,x,d);if(typeof y=="boolean")y===!0?y={}:y===!1&&(y={type:[]});else if(!y)throw new Error("schema is undefined");if(y.extends)if(Array.isArray(y.extends)){var m={schema:y,ctx:d};y.extends.forEach(this.schemaTraverser.bind(this,m)),y=m.schema,m.schema=null,m.ctx=null,m=null}else y=t.deepMerge(y,this.superResolve(y.extends,d));var S=g(y);if(S){var E=this.resolve(y,S,d),R=new u(E.subschema,x,d.path,E.switchSchema,d.schemas);return this.validateSchema(p,E.subschema,x,R)}var O=x&&x.skipAttributes||[];for(var k in y)if(!e.ignoreProperties[k]&&O.indexOf(k)<0){var W=null,M=this.attributes[k];if(M)W=M.call(this,p,y,x,d);else if(x.allowUnknownAttributes===!1)throw new a("Unsupported attribute: "+k,y);W&&b.importErrors(W)}if(typeof x.rewrite=="function"){var F=x.rewrite.call(this,p,y,x,d);b.instance=F}return b},f.prototype.schemaTraverser=function(p,y){p.schema=t.deepMerge(p.schema,this.superResolve(y,p.ctx))},f.prototype.superResolve=function(p,y){var x=g(p);return x?this.resolve(p,x,y).subschema:p},f.prototype.resolve=function(p,y,x){if(y=x.resolve(y),x.schemas[y])return{subschema:x.schemas[y],switchSchema:y};let b=new URL(y,"thismessage::/").hash;var m=b&&b.length&&y.substr(0,y.length-b.length);if(!m||!x.schemas[m])throw new a("no such schema <"+y+">",p);var S=t.objectGetPath(x.schemas[m],b.substr(1));if(S===void 0)throw new a("no such schema "+b+" located in <"+m+">",p);return{subschema:S,switchSchema:y}},f.prototype.testType=function(p,y,x,d,b){if(b!==void 0){if(b===null)throw new a('Unexpected null in "type" keyword');if(typeof this.types[b]=="function")return this.types[b].call(this,p);if(b&&typeof b=="object"){var m=this.validateSchema(p,b,x,d);return m===void 0||!(m&&m.errors.length)}return!0}};var h=f.prototype.types={};return h.string=function(p){return typeof p=="string"},h.number=function(p){return typeof p=="number"&&isFinite(p)},h.integer=function(p){return typeof p=="number"&&p%1===0},h.boolean=function(p){return typeof p=="boolean"},h.array=function(p){return Array.isArray(p)},h.null=function(p){return p===null},h.date=function(p){return p instanceof Date},h.any=function(p){return!0},h.object=function(p){return p&&typeof p=="object"&&!Array.isArray(p)&&!(p instanceof Date)},pc=f,pc}var Um;function qL(){if(Um)return _r;Um=1;var e=_r.Validator=UL();return _r.ValidatorResult=zn().ValidatorResult,_r.ValidatorResultError=zn().ValidatorResultError,_r.ValidationError=zn().ValidationError,_r.SchemaError=zn().SchemaError,_r.SchemaScanResult=zc().SchemaScanResult,_r.scan=zc().scan,_r.validate=function(t,r,i){var s=new e;return s.validate(t,r,i)},_r}var ZL=qL();const k0=(e,t,r)=>{const i=e instanceof RegExp?qm(e,r):e,s=t instanceof RegExp?qm(t,r):t,a=i!==null&&s!=null&&GL(i,s,r);return a&&{start:a[0],end:a[1],pre:r.slice(0,a[0]),body:r.slice(a[0]+i.length,a[1]),post:r.slice(a[1]+s.length)}},qm=(e,t)=>{const r=t.match(e);return r?r[0]:null},GL=(e,t,r)=>{let i,s,a,u,c,f=r.indexOf(e),g=r.indexOf(t,f+1),h=f;if(f>=0&&g>0){if(e===t)return[f,g];for(i=[],a=r.length;h>=0&&!c;){if(h===f)i.push(h),f=r.indexOf(e,h+1);else if(i.length===1){const v=i.pop();v!==void 0&&(c=[v,g])}else s=i.pop(),s!==void 0&&s<a&&(a=s,u=g),g=r.indexOf(t,h+1);h=f<g&&f>=0?f:g}i.length&&u!==void 0&&(c=[a,u])}return c},$0="\0SLASH"+Math.random()+"\0",I0="\0OPEN"+Math.random()+"\0",jf="\0CLOSE"+Math.random()+"\0",L0="\0COMMA"+Math.random()+"\0",M0="\0PERIOD"+Math.random()+"\0",KL=new RegExp($0,"g"),VL=new RegExp(I0,"g"),YL=new RegExp(jf,"g"),XL=new RegExp(L0,"g"),JL=new RegExp(M0,"g"),QL=/\\\\/g,eM=/\\{/g,tM=/\\}/g,rM=/\\,/g,nM=/\\./g;function hc(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function iM(e){return e.replace(QL,$0).replace(eM,I0).replace(tM,jf).replace(rM,L0).replace(nM,M0)}function oM(e){return e.replace(KL,"\\").replace(VL,"{").replace(YL,"}").replace(XL,",").replace(JL,".")}function D0(e){if(!e)return[""];const t=[],r=k0("{","}",e);if(!r)return e.split(",");const{pre:i,body:s,post:a}=r,u=i.split(",");u[u.length-1]+="{"+s+"}";const c=D0(a);return a.length&&(u[u.length-1]+=c.shift(),u.push.apply(u,c)),t.push.apply(t,u),t}function sM(e){return e?(e.slice(0,2)==="{}"&&(e="\\{\\}"+e.slice(2)),_o(iM(e),!0).map(oM)):[]}function aM(e){return"{"+e+"}"}function uM(e){return/^-?0\d/.test(e)}function lM(e,t){return e<=t}function cM(e,t){return e>=t}function _o(e,t){const r=[],i=k0("{","}",e);if(!i)return[e];const s=i.pre,a=i.post.length?_o(i.post,!1):[""];if(/\$$/.test(i.pre))for(let u=0;u<a.length;u++){const c=s+"{"+i.body+"}"+a[u];r.push(c)}else{const u=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),c=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),f=u||c,g=i.body.indexOf(",")>=0;if(!f&&!g)return i.post.match(/,(?!,).*\}/)?(e=i.pre+"{"+i.body+jf+i.post,_o(e)):[e];let h;if(f)h=i.body.split(/\.\./);else if(h=D0(i.body),h.length===1&&h[0]!==void 0&&(h=_o(h[0],!1).map(aM),h.length===1))return a.map(p=>i.pre+h[0]+p);let v;if(f&&h[0]!==void 0&&h[1]!==void 0){const p=hc(h[0]),y=hc(h[1]),x=Math.max(h[0].length,h[1].length);let d=h.length===3&&h[2]!==void 0?Math.abs(hc(h[2])):1,b=lM;y<p&&(d*=-1,b=cM);const S=h.some(uM);v=[];for(let E=p;b(E,y);E+=d){let R;if(c)R=String.fromCharCode(E),R==="\\"&&(R="");else if(R=String(E),S){const O=x-R.length;if(O>0){const k=new Array(O+1).join("0");E<0?R="-"+k+R.slice(1):R=k+R}}v.push(R)}}else{v=[];for(let p=0;p<h.length;p++)v.push.apply(v,_o(h[p],!1))}for(let p=0;p<v.length;p++)for(let y=0;y<a.length;y++){const x=s+v[p]+a[y];(!t||f||x)&&r.push(x)}}return r}const fM=1024*64,La=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>fM)throw new TypeError("pattern is too long")},dM={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},wo=e=>e.replace(/[[\]\\-]/g,"\\$&"),pM=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Zm=e=>e.join(""),hM=(e,t)=>{const r=t;if(e.charAt(r)!=="[")throw new Error("not in a brace expression");const i=[],s=[];let a=r+1,u=!1,c=!1,f=!1,g=!1,h=r,v="";e:for(;a<e.length;){const d=e.charAt(a);if((d==="!"||d==="^")&&a===r+1){g=!0,a++;continue}if(d==="]"&&u&&!f){h=a+1;break}if(u=!0,d==="\\"&&!f){f=!0,a++;continue}if(d==="["&&!f){for(const[b,[m,S,E]]of Object.entries(dM))if(e.startsWith(b,a)){if(v)return["$.",!1,e.length-r,!0];a+=b.length,E?s.push(m):i.push(m),c=c||S;continue e}}if(f=!1,v){d>v?i.push(wo(v)+"-"+wo(d)):d===v&&i.push(wo(d)),v="",a++;continue}if(e.startsWith("-]",a+1)){i.push(wo(d+"-")),a+=2;continue}if(e.startsWith("-",a+1)){v=d,a+=2;continue}i.push(wo(d)),a++}if(h<a)return["",!1,0,!1];if(!i.length&&!s.length)return["$.",!1,e.length-r,!0];if(s.length===0&&i.length===1&&/^\\?.$/.test(i[0])&&!g){const d=i[0].length===2?i[0].slice(-1):i[0];return[pM(d),!1,h-r,!1]}const p="["+(g?"^":"")+Zm(i)+"]",y="["+(g?"":"^")+Zm(s)+"]";return[i.length&&s.length?"("+p+"|"+y+")":i.length?p:y,c,h-r,!0]},Oo=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"),gM=new Set(["!","?","+","*","@"]),Gm=e=>gM.has(e),mM="(?!(?:^|/)\\.\\.?(?:$|/))",aa="(?!\\.)",vM=new Set(["[","."]),yM=new Set(["..","."]),wM=new Set("().*{}+?[]^$\\!"),bM=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),zf="[^/]",Km=zf+"*?",Vm=zf+"+?";var ct,pt,Kr,Ge,st,gn,Bn,mn,Tr,Wn,Bo,Yn,F0,wn,ya,Bc,N0;const Pt=class Pt{constructor(t,r,i={}){Et(this,Yn);ve(this,"type");Et(this,ct);Et(this,pt);Et(this,Kr,!1);Et(this,Ge,[]);Et(this,st);Et(this,gn);Et(this,Bn);Et(this,mn,!1);Et(this,Tr);Et(this,Wn);Et(this,Bo,!1);this.type=t,t&&tt(this,pt,!0),tt(this,st,r),tt(this,ct,re(this,st)?re(re(this,st),ct):this),tt(this,Tr,re(this,ct)===this?i:re(re(this,ct),Tr)),tt(this,Bn,re(this,ct)===this?[]:re(re(this,ct),Bn)),t==="!"&&!re(re(this,ct),mn)&&re(this,Bn).push(this),tt(this,gn,re(this,st)?re(re(this,st),Ge).length:0)}get hasMagic(){if(re(this,pt)!==void 0)return re(this,pt);for(const t of re(this,Ge))if(typeof t!="string"&&(t.type||t.hasMagic))return tt(this,pt,!0);return re(this,pt)}toString(){return re(this,Wn)!==void 0?re(this,Wn):this.type?tt(this,Wn,this.type+"("+re(this,Ge).map(t=>String(t)).join("|")+")"):tt(this,Wn,re(this,Ge).map(t=>String(t)).join(""))}push(...t){for(const r of t)if(r!==""){if(typeof r!="string"&&!(r instanceof Pt&&re(r,st)===this))throw new Error("invalid part: "+r);re(this,Ge).push(r)}}toJSON(){var r;const t=this.type===null?re(this,Ge).slice().map(i=>typeof i=="string"?i:i.toJSON()):[this.type,...re(this,Ge).map(i=>i.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===re(this,ct)||re(re(this,ct),mn)&&((r=re(this,st))==null?void 0:r.type)==="!")&&t.push({}),t}isStart(){var r;if(re(this,ct)===this)return!0;if(!((r=re(this,st))!=null&&r.isStart()))return!1;if(re(this,gn)===0)return!0;const t=re(this,st);for(let i=0;i<re(this,gn);i++){const s=re(t,Ge)[i];if(!(s instanceof Pt&&s.type==="!"))return!1}return!0}isEnd(){var r,i,s;if(re(this,ct)===this||((r=re(this,st))==null?void 0:r.type)==="!")return!0;if(!((i=re(this,st))!=null&&i.isEnd()))return!1;if(!this.type)return(s=re(this,st))==null?void 0:s.isEnd();const t=re(this,st)?re(re(this,st),Ge).length:0;return re(this,gn)===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){const r=new Pt(this.type,t);for(const i of re(this,Ge))r.copyIn(i);return r}static fromGlob(t,r={}){var s;const i=new Pt(null,void 0,r);return $e(s=Pt,wn,ya).call(s,t,i,0,r),i}toMMPattern(){if(this!==re(this,ct))return re(this,ct).toMMPattern();const t=this.toString(),[r,i,s,a]=this.toRegExpSource();if(!(s||re(this,pt)||re(this,Tr).nocase&&!re(this,Tr).nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return i;const c=(re(this,Tr).nocase?"i":"")+(a?"u":"");return Object.assign(new RegExp(`^${r}$`,c),{_src:r,_glob:t})}get options(){return re(this,Tr)}toRegExpSource(t){var f;const r=t??!!re(this,Tr).dot;if(re(this,ct)===this&&$e(this,Yn,F0).call(this),!this.type){const g=this.isStart()&&this.isEnd(),h=re(this,Ge).map(x=>{var E;const[d,b,m,S]=typeof x=="string"?$e(E=Pt,wn,N0).call(E,x,re(this,pt),g):x.toRegExpSource(t);return tt(this,pt,re(this,pt)||m),tt(this,Kr,re(this,Kr)||S),d}).join("");let v="";if(this.isStart()&&typeof re(this,Ge)[0]=="string"&&!(re(this,Ge).length===1&&yM.has(re(this,Ge)[0]))){const d=vM,b=r&&d.has(h.charAt(0))||h.startsWith("\\.")&&d.has(h.charAt(2))||h.startsWith("\\.\\.")&&d.has(h.charAt(4)),m=!r&&!t&&d.has(h.charAt(0));v=b?mM:m?aa:""}let p="";return this.isEnd()&&re(re(this,ct),mn)&&((f=re(this,st))==null?void 0:f.type)==="!"&&(p="(?:$|\\/)"),[v+h+p,Oo(h),tt(this,pt,!!re(this,pt)),re(this,Kr)]}const i=this.type==="*"||this.type==="+",s=this.type==="!"?"(?:(?!(?:":"(?:";let a=$e(this,Yn,Bc).call(this,r);if(this.isStart()&&this.isEnd()&&!a&&this.type!=="!"){const g=this.toString();return tt(this,Ge,[g]),this.type=null,tt(this,pt,void 0),[g,Oo(this.toString()),!1,!1]}let u=!i||t||r||!aa?"":$e(this,Yn,Bc).call(this,!0);u===a&&(u=""),u&&(a=`(?:${a})(?:${u})*?`);let c="";if(this.type==="!"&&re(this,Bo))c=(this.isStart()&&!r?aa:"")+Vm;else{const g=this.type==="!"?"))"+(this.isStart()&&!r&&!t?aa:"")+Km+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&u?")":this.type==="*"&&u?")?":`)${this.type}`;c=s+a+g}return[c,Oo(a),tt(this,pt,!!re(this,pt)),re(this,Kr)]}};ct=new WeakMap,pt=new WeakMap,Kr=new WeakMap,Ge=new WeakMap,st=new WeakMap,gn=new WeakMap,Bn=new WeakMap,mn=new WeakMap,Tr=new WeakMap,Wn=new WeakMap,Bo=new WeakMap,Yn=new WeakSet,F0=function(){if(this!==re(this,ct))throw new Error("should only call on root");if(re(this,mn))return this;this.toString(),tt(this,mn,!0);let t;for(;t=re(this,Bn).pop();){if(t.type!=="!")continue;let r=t,i=re(r,st);for(;i;){for(let s=re(r,gn)+1;!i.type&&s<re(i,Ge).length;s++)for(const a of re(t,Ge)){if(typeof a=="string")throw new Error("string part in extglob AST??");a.copyIn(re(i,Ge)[s])}r=i,i=re(r,st)}}return this},wn=new WeakSet,ya=function(t,r,i,s){var y,x;let a=!1,u=!1,c=-1,f=!1;if(r.type===null){let d=i,b="";for(;d<t.length;){const m=t.charAt(d++);if(a||m==="\\"){a=!a,b+=m;continue}if(u){d===c+1?(m==="^"||m==="!")&&(f=!0):m==="]"&&!(d===c+2&&f)&&(u=!1),b+=m;continue}else if(m==="["){u=!0,c=d,f=!1,b+=m;continue}if(!s.noext&&Gm(m)&&t.charAt(d)==="("){r.push(b),b="";const S=new Pt(m,r);d=$e(y=Pt,wn,ya).call(y,t,S,d,s),r.push(S);continue}b+=m}return r.push(b),d}let g=i+1,h=new Pt(null,r);const v=[];let p="";for(;g<t.length;){const d=t.charAt(g++);if(a||d==="\\"){a=!a,p+=d;continue}if(u){g===c+1?(d==="^"||d==="!")&&(f=!0):d==="]"&&!(g===c+2&&f)&&(u=!1),p+=d;continue}else if(d==="["){u=!0,c=g,f=!1,p+=d;continue}if(Gm(d)&&t.charAt(g)==="("){h.push(p),p="";const b=new Pt(d,h);h.push(b),g=$e(x=Pt,wn,ya).call(x,t,b,g,s);continue}if(d==="|"){h.push(p),p="",v.push(h),h=new Pt(null,r);continue}if(d===")")return p===""&&re(r,Ge).length===0&&tt(r,Bo,!0),h.push(p),p="",r.push(...v,h),g;p+=d}return r.type=null,tt(r,pt,void 0),tt(r,Ge,[t.substring(i-1)]),g},Bc=function(t){return re(this,Ge).map(r=>{if(typeof r=="string")throw new Error("string type in extglob ast??");const[i,s,a,u]=r.toRegExpSource(t);return tt(this,Kr,re(this,Kr)||u),i}).filter(r=>!(this.isStart()&&this.isEnd())||!!r).join("|")},N0=function(t,r,i=!1){let s=!1,a="",u=!1;for(let c=0;c<t.length;c++){const f=t.charAt(c);if(s){s=!1,a+=(wM.has(f)?"\\":"")+f;continue}if(f==="\\"){c===t.length-1?a+="\\\\":s=!0;continue}if(f==="["){const[g,h,v,p]=hM(t,c);if(v){a+=g,u=u||h,c+=v-1,r=r||p;continue}}if(f==="*"){i&&t==="*"?a+=Vm:a+=Km,r=!0;continue}if(f==="?"){a+=zf,r=!0;continue}a+=bM(f)}return[a,Oo(t),!!r,u]},Et(Pt,wn);let Ma=Pt;const xM=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&"),Ot=(e,t,r={})=>(La(t),!r.nocomment&&t.charAt(0)==="#"?!1:new eu(t,r).match(e)),SM=/^\*+([^+@!?\*\[\(]*)$/,EM=e=>t=>!t.startsWith(".")&&t.endsWith(e),_M=e=>t=>t.endsWith(e),OM=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),TM=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),AM=/^\*+\.\*+$/,RM=e=>!e.startsWith(".")&&e.includes("."),PM=e=>e!=="."&&e!==".."&&e.includes("."),CM=/^\.\*+$/,kM=e=>e!=="."&&e!==".."&&e.startsWith("."),$M=/^\*+$/,IM=e=>e.length!==0&&!e.startsWith("."),LM=e=>e.length!==0&&e!=="."&&e!=="..",MM=/^\?+([^+@!?\*\[\(]*)?$/,DM=([e,t=""])=>{const r=j0([e]);return t?(t=t.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(t)):r},FM=([e,t=""])=>{const r=z0([e]);return t?(t=t.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(t)):r},NM=([e,t=""])=>{const r=z0([e]);return t?i=>r(i)&&i.endsWith(t):r},jM=([e,t=""])=>{const r=j0([e]);return t?i=>r(i)&&i.endsWith(t):r},j0=([e])=>{const t=e.length;return r=>r.length===t&&!r.startsWith(".")},z0=([e])=>{const t=e.length;return r=>r.length===t&&r!=="."&&r!==".."},B0=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",Ym={win32:{sep:"\\"},posix:{sep:"/"}},zM=B0==="win32"?Ym.win32.sep:Ym.posix.sep;Ot.sep=zM;const or=Symbol("globstar **");Ot.GLOBSTAR=or;const BM="[^/]",WM=BM+"*?",HM="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",UM="(?:(?!(?:\\/|^)\\.).)*?",qM=(e,t={})=>r=>Ot(r,e,t);Ot.filter=qM;const ir=(e,t={})=>Object.assign({},e,t),ZM=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return Ot;const t=Ot;return Object.assign((i,s,a={})=>t(i,s,ir(e,a)),{Minimatch:class extends t.Minimatch{constructor(s,a={}){super(s,ir(e,a))}static defaults(s){return t.defaults(ir(e,s)).Minimatch}},AST:class extends t.AST{constructor(s,a,u={}){super(s,a,ir(e,u))}static fromGlob(s,a={}){return t.AST.fromGlob(s,ir(e,a))}},unescape:(i,s={})=>t.unescape(i,ir(e,s)),escape:(i,s={})=>t.escape(i,ir(e,s)),filter:(i,s={})=>t.filter(i,ir(e,s)),defaults:i=>t.defaults(ir(e,i)),makeRe:(i,s={})=>t.makeRe(i,ir(e,s)),braceExpand:(i,s={})=>t.braceExpand(i,ir(e,s)),match:(i,s,a={})=>t.match(i,s,ir(e,a)),sep:t.sep,GLOBSTAR:or})};Ot.defaults=ZM;const W0=(e,t={})=>(La(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:sM(e));Ot.braceExpand=W0;const GM=(e,t={})=>new eu(e,t).makeRe();Ot.makeRe=GM;const KM=(e,t,r={})=>{const i=new eu(t,r);return e=e.filter(s=>i.match(s)),i.options.nonull&&!e.length&&e.push(t),e};Ot.match=KM;const Xm=/[?*]|[+@!]\(.*?\)|\[|\]/,VM=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");class eu{constructor(t,r={}){ve(this,"options");ve(this,"set");ve(this,"pattern");ve(this,"windowsPathsNoEscape");ve(this,"nonegate");ve(this,"negate");ve(this,"comment");ve(this,"empty");ve(this,"preserveMultipleSlashes");ve(this,"partial");ve(this,"globSet");ve(this,"globParts");ve(this,"nocase");ve(this,"isWindows");ve(this,"platform");ve(this,"windowsNoMagicRoot");ve(this,"regexp");La(t),r=r||{},this.options=r,this.pattern=t,this.platform=r.platform||B0,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!r.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!r.nonegate,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=r.windowsNoMagicRoot!==void 0?r.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const t of this.set)for(const r of t)if(typeof r!="string")return!0;return!1}debug(...t){}make(){const t=this.pattern,r=this.options;if(!r.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],r.debug&&(this.debug=(...a)=>console.error(...a)),this.debug(this.pattern,this.globSet);const i=this.globSet.map(a=>this.slashSplit(a));this.globParts=this.preprocess(i),this.debug(this.pattern,this.globParts);let s=this.globParts.map((a,u,c)=>{if(this.isWindows&&this.windowsNoMagicRoot){const f=a[0]===""&&a[1]===""&&(a[2]==="?"||!Xm.test(a[2]))&&!Xm.test(a[3]),g=/^[a-z]:/i.test(a[0]);if(f)return[...a.slice(0,4),...a.slice(4).map(h=>this.parse(h))];if(g)return[a[0],...a.slice(1).map(h=>this.parse(h))]}return a.map(f=>this.parse(f))});if(this.debug(this.pattern,s),this.set=s.filter(a=>a.indexOf(!1)===-1),this.isWindows)for(let a=0;a<this.set.length;a++){const u=this.set[a];u[0]===""&&u[1]===""&&this.globParts[a][2]==="?"&&typeof u[3]=="string"&&/^[a-z]:$/i.test(u[3])&&(u[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let i=0;i<t.length;i++)for(let s=0;s<t[i].length;s++)t[i][s]==="**"&&(t[i][s]="*");const{optimizationLevel:r=1}=this.options;return r>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):r>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(r=>{let i=-1;for(;(i=r.indexOf("**",i+1))!==-1;){let s=i;for(;r[s+1]==="**";)s++;s!==i&&r.splice(i,s-i)}return r})}levelOneOptimize(t){return t.map(r=>(r=r.reduce((i,s)=>{const a=i[i.length-1];return s==="**"&&a==="**"?i:s===".."&&a&&a!==".."&&a!=="."&&a!=="**"?(i.pop(),i):(i.push(s),i)},[]),r.length===0?[""]:r))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let s=1;s<t.length-1;s++){const a=t[s];s===1&&a===""&&t[0]===""||(a==="."||a==="")&&(r=!0,t.splice(s,1),s--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(r=!0,t.pop())}let i=0;for(;(i=t.indexOf("..",i+1))!==-1;){const s=t[i-1];s&&s!=="."&&s!==".."&&s!=="**"&&(r=!0,t.splice(i-1,2),i-=2)}}while(r);return t.length===0?[""]:t}firstPhasePreProcess(t){let r=!1;do{r=!1;for(let i of t){let s=-1;for(;(s=i.indexOf("**",s+1))!==-1;){let u=s;for(;i[u+1]==="**";)u++;u>s&&i.splice(s+1,u-s);let c=i[s+1];const f=i[s+2],g=i[s+3];if(c!==".."||!f||f==="."||f===".."||!g||g==="."||g==="..")continue;r=!0,i.splice(s,1);const h=i.slice(0);h[s]="**",t.push(h),s--}if(!this.preserveMultipleSlashes){for(let u=1;u<i.length-1;u++){const c=i[u];u===1&&c===""&&i[0]===""||(c==="."||c==="")&&(r=!0,i.splice(u,1),u--)}i[0]==="."&&i.length===2&&(i[1]==="."||i[1]==="")&&(r=!0,i.pop())}let a=0;for(;(a=i.indexOf("..",a+1))!==-1;){const u=i[a-1];if(u&&u!=="."&&u!==".."&&u!=="**"){r=!0;const f=a===1&&i[a+1]==="**"?["."]:[];i.splice(a-1,2,...f),i.length===0&&i.push(""),a-=2}}}}while(r);return t}secondPhasePreProcess(t){for(let r=0;r<t.length-1;r++)for(let i=r+1;i<t.length;i++){const s=this.partsMatch(t[r],t[i],!this.preserveMultipleSlashes);if(s){t[r]=[],t[i]=s;break}}return t.filter(r=>r.length)}partsMatch(t,r,i=!1){let s=0,a=0,u=[],c="";for(;s<t.length&&a<r.length;)if(t[s]===r[a])u.push(c==="b"?r[a]:t[s]),s++,a++;else if(i&&t[s]==="**"&&r[a]===t[s+1])u.push(t[s]),s++;else if(i&&r[a]==="**"&&t[s]===r[a+1])u.push(r[a]),a++;else if(t[s]==="*"&&r[a]&&(this.options.dot||!r[a].startsWith("."))&&r[a]!=="**"){if(c==="b")return!1;c="a",u.push(t[s]),s++,a++}else if(r[a]==="*"&&t[s]&&(this.options.dot||!t[s].startsWith("."))&&t[s]!=="**"){if(c==="a")return!1;c="b",u.push(r[a]),s++,a++}else return!1;return t.length===r.length&&u}parseNegate(){if(this.nonegate)return;const t=this.pattern;let r=!1,i=0;for(let s=0;s<t.length&&t.charAt(s)==="!";s++)r=!r,i++;i&&(this.pattern=t.slice(i)),this.negate=r}matchOne(t,r,i=!1){const s=this.options;if(this.isWindows){const d=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),b=!d&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),m=typeof r[0]=="string"&&/^[a-z]:$/i.test(r[0]),S=!m&&r[0]===""&&r[1]===""&&r[2]==="?"&&typeof r[3]=="string"&&/^[a-z]:$/i.test(r[3]),E=b?3:d?0:void 0,R=S?3:m?0:void 0;if(typeof E=="number"&&typeof R=="number"){const[O,k]=[t[E],r[R]];O.toLowerCase()===k.toLowerCase()&&(r[R]=O,R>E?r=r.slice(R):E>R&&(t=t.slice(E)))}}const{optimizationLevel:a=1}=this.options;a>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:r}),this.debug("matchOne",t.length,r.length);for(var u=0,c=0,f=t.length,g=r.length;u<f&&c<g;u++,c++){this.debug("matchOne loop");var h=r[c],v=t[u];if(this.debug(r,h,v),h===!1)return!1;if(h===or){this.debug("GLOBSTAR",[r,h,v]);var p=u,y=c+1;if(y===g){for(this.debug("** at the end");u<f;u++)if(t[u]==="."||t[u]===".."||!s.dot&&t[u].charAt(0)===".")return!1;return!0}for(;p<f;){var x=t[p];if(this.debug(`
206
+ globstar while`,t,p,r,y,x),this.matchOne(t.slice(p),r.slice(y),i))return this.debug("globstar found match!",p,f,x),!0;if(x==="."||x===".."||!s.dot&&x.charAt(0)==="."){this.debug("dot detected!",t,p,r,y);break}this.debug("globstar swallow a segment, and continue"),p++}return!!(i&&(this.debug(`
207
+ >>> no match, partial?`,t,p,r,y),p===f))}let d;if(typeof h=="string"?(d=v===h,this.debug("string match",h,v,d)):(d=h.test(v),this.debug("pattern match",h,v,d)),!d)return!1}if(u===f&&c===g)return!0;if(u===f)return i;if(c===g)return u===f-1&&t[u]==="";throw new Error("wtf?")}braceExpand(){return W0(this.pattern,this.options)}parse(t){La(t);const r=this.options;if(t==="**")return or;if(t==="")return"";let i,s=null;(i=t.match($M))?s=r.dot?LM:IM:(i=t.match(SM))?s=(r.nocase?r.dot?TM:OM:r.dot?_M:EM)(i[1]):(i=t.match(MM))?s=(r.nocase?r.dot?FM:DM:r.dot?NM:jM)(i):(i=t.match(AM))?s=r.dot?PM:RM:(i=t.match(CM))&&(s=kM);const a=Ma.fromGlob(t,this.options).toMMPattern();return s&&typeof a=="object"&&Reflect.defineProperty(a,"test",{value:s}),a}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;const t=this.set;if(!t.length)return this.regexp=!1,this.regexp;const r=this.options,i=r.noglobstar?WM:r.dot?HM:UM,s=new Set(r.nocase?["i"]:[]);let a=t.map(f=>{const g=f.map(h=>{if(h instanceof RegExp)for(const v of h.flags.split(""))s.add(v);return typeof h=="string"?VM(h):h===or?or:h._src});return g.forEach((h,v)=>{const p=g[v+1],y=g[v-1];h!==or||y===or||(y===void 0?p!==void 0&&p!==or?g[v+1]="(?:\\/|"+i+"\\/)?"+p:g[v]=i:p===void 0?g[v-1]=y+"(?:\\/|"+i+")?":p!==or&&(g[v-1]=y+"(?:\\/|\\/"+i+"\\/)"+p,g[v+1]=or))}),g.filter(h=>h!==or).join("/")}).join("|");const[u,c]=t.length>1?["(?:",")"]:["",""];a="^"+u+a+c+"$",this.negate&&(a="^(?!"+a+").+$");try{this.regexp=new RegExp(a,[...s].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,r=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&r)return!0;const i=this.options;this.isWindows&&(t=t.split("\\").join("/"));const s=this.slashSplit(t);this.debug(this.pattern,"split",s);const a=this.set;this.debug(this.pattern,"set",a);let u=s[s.length-1];if(!u)for(let c=s.length-2;!u&&c>=0;c--)u=s[c];for(let c=0;c<a.length;c++){const f=a[c];let g=s;if(i.matchBase&&f.length===1&&(g=[u]),this.matchOne(g,f,r))return i.flipNegate?!0:!this.negate}return i.flipNegate?!1:this.negate}static defaults(t){return Ot.defaults(t).Minimatch}}Ot.AST=Ma;Ot.Minimatch=eu;Ot.escape=xM;Ot.unescape=Oo;const zo="/$shared",YM={"**/saved_conditions.json":{parser:"json",content:{conditions:[]},schema:{type:"object",properties:{conditions:{type:"array",items:{type:"object"}}},required:["conditions"]}},"**/shared_datasources.json":{parser:"json",content:{},schema:{type:"object",additionalProperties:!0,patternProperties:{"^.*$":{type:"array"}}}},"**/shared_css.json":{parser:"json",content:{classes:[]},schema:{type:"object",properties:{classes:{type:"array",items:{type:"object"}}},required:["classes"]}},"**/shared_app_events.json":{parser:"json",content:[]},"**/CustomComponents/manifest.json":{parser:"json",content:[],schema:{type:"array",items:{type:"object"}}},"**/crafted_components.json":{parser:"json",content:[],schema:{type:"array"}},"**/HTTPHandlers.json":{parser:"json",content:[],schema:{type:"array"}},"**/i18n.json":{parser:"json",content:{keys:{},userLang:{primary:"",supported:[]}},schema:{type:"object",properties:{keys:{type:"object"},userLang:{type:"object",properties:{primary:{type:"string"},supported:{type:"array",items:{type:"string"}}},required:["primary","supported"]}},required:["keys","userLang"]}},"**/*.json":{parser:"json",content:{}}};function H0(e){const t=Object.entries(YM).find(([r])=>Ot(e,r));return t==null?void 0:t[1]}function tu(e){var i;const t=(i=H0(e))==null?void 0:i.content;if(!t)return;const r=e.replace(`${zo}/`,"Shared/");Bf({name:r,content:t,asText:typeof t=="string"})}async function XM(){const e=["CustomComponents/manifest.json","shared_app_events.json","shared_css.json","saved_conditions.json","i18n.json"];for(const t of e)try{await De(`${zo}/${t}?t=${Date.now()}`,{method:"GET",headers:new Headers({"Content-Type":"application/json"})})}catch(r){U0(r)&&tu(`${zo}/${t}`)}}function Vo({path:e,createIfNotExists:t=!1}){const r=`${zo}/${e}`;return De(`${r}?t=${Date.now()}`,{method:"GET",headers:new Headers({"Content-Type":"application/json"})}).then(i=>{const s=H0(e);let a=i;if(!s)return a;if(typeof a=="string")try{switch(s.parser){case"json":a=JSON.parse(a);break;default:break}}catch{throw new Error("Cannot parse")}if(s.schema&&!new ZL.Validator().validate(a,s.schema).valid)throw new Error("Invalid Schema");return a}).catch(i=>{if(U0(i)&&t){const s=JM(i,e);o0.next({message:s,kind:"warning"}),tu(r)}throw i})}function U0(e){var t;return((t=e==null?void 0:e.response)==null?void 0:t.status)===404||(e==null?void 0:e.message)==="Invalid Schema"||(e==null?void 0:e.message)==="Cannot parse"||(e==null?void 0:e.name)==="SyntaxError"}function JM(e,t){var r;switch(!0){case((e==null?void 0:e.message)==="Cannot parse "||(e==null?void 0:e.name)==="SyntaxError"):return`Cannot parse file '${t}', resetting...`;case(e==null?void 0:e.message)==="Invalid Schema":return`File '${t}' is corrupt, resetting...`;case((r=e==null?void 0:e.response)==null?void 0:r.status)===404:return`File '${t}' not found, creating...`;default:return e==null?void 0:e.message}}function QM(e){return De(Ko,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function e2(e){return De(Ko,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}const q0=()=>{const{host:e,protocol:t}=window.location,r=t==="https:";return{projectOpened:!1,remoteDebuggerMode:If.DISABLED,baseUrl:"",qodly:!0,urls:{renderer:"/$lib/renderer/",debugger:`ws${r?"s":""}://${e}/remoteDebugger`,lsp:`ws${r?"s":""}://${e}/LSP`},isRestActive:!0}};async function t2(){const{hostname:e,host:t,protocol:r}=window.location,i=r==="https:";try{const s=await De(at,{method:"POST",body:JSON.stringify({verb:En.GET_APP_SETTINGS}),headers:new Headers({"Content-Type":"application/json"})}),a=(()=>{if(s.rendererPath)return s.rendererPath;const u=`http://${e}:${s.webServerHTTPPort}`,c=`https://${e}:${s.webServerHTTPSPort}`;return s.webServerHTTPPort&&s.webServerHTTPSPort?i?c:u:s.webServerHTTPPort?u:c})();return{projectOpened:s.webServerHTTPSPort>0||s.webServerHTTPPort>0,remoteDebuggerMode:s.remoteDebuggerMode,baseUrl:a,qodly:typeof s.qodly>"u"?!0:s.qodly,urls:{renderer:s.rendererPath||`${a}/$lib/renderer/`,debugger:`ws${i?"s":""}://${t}/remoteDebugger`,lsp:`ws${i?"s":""}://${t}/LSP`},isRestActive:s.isRESTActive}}catch(s){return console.error(s),q0()}}async function Z0(e){return await De(at,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}async function r2(...e){return(await Promise.all(e.map(i=>Z0({root:i,verb:En.GET_FOLDER})))).map(({children:i})=>i.map(({name:s,date:a,type:u})=>({name:s,type:u,date:a,path:`${u}/${s}`}))).flat()}function n2(e,t={}){const{sanitize:r=!0}=t;return De(`/rest/$getWebForm/${e}`,{method:"GET"}).then(i=>{if(!(i!=null&&i.components)||!r)return i;const s=new Map;return{...i,components:Ne.entries(i.components).map(([a,u])=>{const c=a,{resolvedName:f}=u.type;if(f==="WebformLoader"){const g=Zn.generate();s.set(a,g),a=g}return[a,u,c]}).reduce((a,[u,c,f])=>{var g;return c.nodes&&(c.nodes=c.nodes.map(h=>s.get(h)||h)),c.linkedNodes&&(c.linkedNodes=Ne.entries(c.linkedNodes).reduce((h,[v,p])=>({...h,[v]:s.get(p)||p}),{})),(g=c.props)!=null&&g.events&&(c.props.events=c.props.events.map(h=>(h.type==="navigation"&&h.loader&&(h.loader=s.get(h.loader)||h.loader),h))),{...a,[u]:{...c,props:{...c.props,__originalID:f}}}},{})}})}function i2(e){return De(at,{method:"POST",headers:new Headers({"Content-Type":"application/json"}),body:JSON.stringify(e)}).then(t=>({...t,content:[Xe.METHOD,Xe.CLASS].includes(t.type)?Ja(t.content):t.content}))}function o2(e){return e.type==="folder"?De(Ko,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})}):De(at,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}async function s2(e){return e.type==="folder"?(await De(Ko,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})).deleted:(await De(at,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})).deleted}function a2(e){return De(at,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function u2(e){return De(at,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}async function l2(e){return(await De(at,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})).deleted}async function c2(...e){return await De(at,{method:"POST",body:JSON.stringify({verb:En.GET_FILES_INFO,files:e}),headers:new Headers({"Content-Type":"application/json"})})}async function f2(e){const t=await De("/api/login",{method:"POST",body:JSON.stringify({accessKey:e}),headers:new Headers({"Content-Type":"application/json"})});return t.isLogged&&t.success}async function d2(){return await De("/rest/$catalog/$all?$metadata=full",{method:"GET",headers:new Headers({"Content-Type":"application/json"})})}async function p2(e){try{const t=process.env.NODE_ENV==="development"?"/i18n/languages.json":`/$lib/${e?"studio":"renderer"}/i18n/languages.json`,i=await(await fetch(t)).text(),{supported:s}=JSON.parse(i);return s}catch{return[]}}async function h2({name:e,path:t="",root:r="root",asText:i=!1}){return De(at,{method:"POST",body:JSON.stringify({verb:"getFileContent",root:r,path:t,name:e,asText:i}),headers:new Headers({"Content-Type":"application/json"})})}async function g2(e={}){try{return await Vo({path:"shared_datasources.json",...e})}catch{return{}}}async function m2(e={}){try{return await Vo({path:"shared_app_events.json",...e})}catch{return[]}}async function v2(e={}){try{return await Vo({path:"shared_css.json",...e})}catch{return{classes:[]}}}async function y2(e={}){try{return await Vo({path:"saved_conditions.json",...e})}catch{return{conditions:[]}}}async function w2(){try{return await De("/rest/$info/privileges",{method:"GET",headers:new Headers({"Content-Type":"application/json"})})}catch{return{privileges:[]}}}async function b2(){try{return await(await fetch(`monaco_theme.json?t=${Date.now()}`)).json()}catch{return null}}const x2=Mf(),S2=async e=>{const t={verb:En.SET_FILE_CONTENT,asText:!1,name:"shared_datasources.json",path:"",root:"shared",content:e};return x2(async()=>(await De(at,{method:"POST",body:JSON.stringify(t),headers:new Headers({"Content-Type":"application/json"})}),e))},E2=Mf(),_2=async e=>{const t={verb:En.SET_FILE_CONTENT,asText:!1,name:"shared_app_events.json",path:"",root:"shared",content:e};return E2(async()=>(await De(at,{method:"POST",body:JSON.stringify(t),headers:new Headers({"Content-Type":"application/json"})}),e))},Bf=async e=>{const t=await De(at,{method:"POST",body:JSON.stringify({...e,verb:En.SET_FILE_CONTENT,root:$f.ROOT}),headers:new Headers({"Content-Type":"application/json"})}),r=Lf(`${e.path||"Sources"}/${e.name}`);return{...t,type:r,size:0}},O2=async e=>await Bf({name:"crafted_components.json",path:yn.WEBFORMS,content:e});function T2(e){return De(at,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function A2(e){return De(at,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function R2(e){return De(at,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function P2(e){return De(at,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})}).then(t=>Array.isArray(t)?t:{...t,content:["4dm","4qm","4qs"].includes(t.ext)?Ja(t.content):t.content}).catch(t=>{var r,i;throw((i=(r=t.data)==null?void 0:r.__ERROR[0])==null?void 0:i.errCode)===1839&&tu(e.path),t})}function C2(e){return De(at,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function k2(e){const t=new RegExp(/^\((.+)(?=\))/gi).exec(e);return t!==null?t[1]:""}function $2(e){const t=new RegExp(/(->)(.*)/gi).exec(e);if(t!==null)return t[0].replace("->","");const r=/:([^)]*)$/.exec(e);return r!==null?`result : ${r[1].trim()}`:""}function I2(e){const t=k2(e).split(/[;,]/g).filter(Boolean).map(s=>{const a=s.split(":")[0].trim(),u=s.split(":")[1].trim();return{name:a,type:u}}),r=$2(e),i=r?{name:r.split(":")[0].trim(),type:r.split(":")[1].trim()}:{name:"result",type:"Variable"};return{params:t,result:i}}async function L2(e,t){const i=e.split(".").pop();try{const s=await De(at,{method:"POST",body:JSON.stringify({verb:"getFunctionContent",className:t,functionName:i}),headers:new Headers({"Content-Type":"application/json"})});s.content=Ja(s.content);const{params:a,result:u}=I2(s.parameters);return{...s,params:a,returns:u}}catch(s){return console.error(s),{className:t,functionName:i,filePath:e,content:"",params:[]}}}var G0=(e=>(e.STUDIO_LOADED="UA-1-0",e.WELCOME_TOUR_INIT="UA-1-3",e.WELCOME_TOUR_END="UA-1-4",e))(G0||{});function M2(e,t){fetch("/api/v1/activity",{body:JSON.stringify({AID:e,...t}),headers:{"Content-Type":"application/json"},method:"POST"}).catch(r=>{})}function D2(e){window.pagesense=window.pagesense||[],window.pagesense.push(["trackEvent",e])}var K0=(e=>(e.LOCAL="local",e.SHARED="shared",e.THEME="theme",e))(K0||{}),V0=(e=>(e[e.METHOD=1]="METHOD",e[e.CLASS=10]="CLASS",e))(V0||{}),Y0=(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))(Y0||{}),X0=(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))(X0||{});const F2={transparent:{backgroundColor:"transparent"},black:{backgroundColor:"#4a4a4a",color:"white",padding:"3px 5px",borderRadius:5},grey:{backgroundColor:"#e8e8e8",color:"#262626",padding:"3px 5px",borderRadius:5}},N2={Code:{key:"editors:code",config:{language:"4d",theme:"fd-dark"}},WebForm:{key:"editors:webforms"}};exports.API_PREFIX=at;exports.AppLoader=c$;exports.BaseCheckboxIcon=Wy;exports.Checkbox=L$;exports.ControlledSwitch=Ey;exports.DATASOURCE_THEMES=F2;exports.DatasourcesActions=i0;exports.DebuggerActions=u0;exports.DefaultCheckboxIcon=Hy;exports.DesignerRequestVerb=En;exports.Dialog=qT;exports.DialogBody=dv;exports.EActivity=G0;exports.EDITOR=N2;exports.EIDENTIFIERS=Y0;exports.EPermissionType=Me;exports.ERROR_CODES=X0;exports.ESubPermissionType=qe;exports.EWebFormStyleClassScope=K0;exports.EXT_API_PREFIX=Ko;exports.FileFolderType=Xe;exports.FloatingTooltip=k$;exports.FolderRootPath=yn;exports.FolderRootType=$f;exports.HTTPError=jc;exports.HTTP_HANDLERS_TAB_PATH=f0;exports.IPreemptive=jo;exports.IPublished=x0;exports.IPublishedRestScope=Df;exports.IdentityProvider=eI;exports.Incase=da;exports.IndentLines=Tv;exports.LOCALIZATION_TAB_PATH=d0;exports.LogoSVG=Ny;exports.LspActions=a0;exports.MAX_FILE_NAME_LENGTH=Cf;exports.MODEL_TAB_PATH=WI;exports.Modal=h$;exports.ModalCloseReason=yi;exports.ModalColor=Un;exports.ModalIcons=kc;exports.ModalType=xf;exports.Mutex=p0;exports.NameError=kf;exports.Overlay=fv;exports.PANEL_EXPANDED_HEIGHT=ma;exports.PANEL_INITIAL_HEIGHT=Fn;exports.PERMISSIONS=Ff;exports.Panel=I$;exports.PopperTooltip=Fy;exports.Portal=ev;exports.PublishOptions=mL;exports.ROLES_TAB_PATH=l0;exports.RemoteDebuggerMode=If;exports.SETTINGS_TAB_PATH=c0;exports.SHARED_API_PREFIX=zo;exports.SourceCodeDescriptor=V0;exports.Switcher=Av;exports.TabEventsActions=s0;exports.Tip=fy;exports.TipsProvider=yC;exports.Toast=JA;exports.ToolbarIcon=M$;exports.Tooltip=u$;exports.Tree=mR;exports.TreeIcon=Sv;exports.TreeNode=Jc;exports.WebformActions=n0;exports.WebformEventsActions=No;exports.ZoomComponent=v$;exports.ZoomLevel=zy;exports._isArrayDatasource=fL;exports._isObjectDatasource=dL;exports.actionsToPrivs=A0;exports.addAttributesToContent=yL;exports.addFolder=a2;exports.addPermission=$L;exports.addPrivilegeIn=_L;exports.allowed=SL;exports.by=h0;exports.byId=VI;exports.byPath=YI;exports.callServerSideParser=WL;exports.checkUpdates=QM;exports.children=Ia;exports.createFolder=T2;exports.createPrivilege=TL;exports.createRole=NL;exports.datasourcesSubject=$I;exports.debuggerSubject=DI;exports.dropFile=s2;exports.dropFolder=l2;exports.exists=XI;exports.extractWebformName=qI;exports.generateUUID=wL;exports.getAppSettings=t2;exports.getCatalog=d2;exports.getDatasourceId=QI;exports.getDefaultAppSettings=q0;exports.getDictByName=P0;exports.getFile=i2;exports.getFileContent=h2;exports.getFileExtentionFromType=UI;exports.getFilenameAndTypeFromPath=HI;exports.getFilenameFromType=ZI;exports.getFilesInfo=c2;exports.getFolder=Z0;exports.getFolders=r2;exports.getFunctionContent=L2;exports.getGraphData=kL;exports.getInheritedResources=C0;exports.getMonacoTheme=b2;exports.getNodeInfo=P2;exports.getPrivilegeById=Xr;exports.getPromotions=FL;exports.getResourceFromType=Nf;exports.getSavedConditions=y2;exports.getSharedAppEvents=m2;exports.getSharedCSS=v2;exports.getSharedDatasources=g2;exports.getSharedResource=Vo;exports.getSupportedLanguages=p2;exports.getTypeFromExtension=Lf;exports.getUserPrivileges=w2;exports.getWebForm=n2;exports.hasAttributesString=E0;exports.http=De;exports.i18nSubject=NI;exports.initializeDefaultProjectFiles=XM;exports.installUpdates=e2;exports.isArrayDatasource=y0;exports.isDataClassMethod=nL;exports.isDataStoreMethod=rL;exports.isDateDatasource=pL;exports.isEntity=lL;exports.isEntityDatasource=sL;exports.isEntityMethod=iL;exports.isEntitySelection=cL;exports.isEntitySelectionDatasource=aL;exports.isEntitySelectionMethod=oL;exports.isObjectAttribute=eL;exports.isObjectDatasource=w0;exports.isRelatedAttribute=tL;exports.isRelatedEntitiesAttribute=m0;exports.isRelatedEntityAttribute=v0;exports.isScalarDatasource=b0;exports.isSimpleAttribute=g0;exports.isSimpleDatasource=uL;exports.loadDS=hL;exports.loadI18n=gL;exports.localeCompare=JI;exports.log=M2;exports.login=f2;exports.lspSubject=MI;exports.moveItem=R2;exports.outBy=GI;exports.outById=KI;exports.parents=Qa;exports.parseAttributes=vL;exports.populateShallow=RL;exports.queue=Mf;exports.removeAttributesString=_0;exports.removeItem=A2;exports.removeMultiplePermissions=LL;exports.removePermission=IL;exports.removePrivilege=EL;exports.removePrivilegeFrom=OL;exports.removeRole=jL;exports.renameFile=o2;exports.renameFolder=u2;exports.renamePrivilege=AL;exports.resetResources=ML;exports.rolesToAPI=CL;exports.sanitizeContent=Ja;exports.sanitizeNameCY=bL;exports.sanitizePermissions=R0;exports.sanitizePrivileges=O0;exports.sanitizeRoles=PL;exports.saveContent=C2;exports.saveRole=zL;exports.setCraftedComponents=O2;exports.setFileContent=Bf;exports.setSharedAppEvents=_2;exports.setSharedSources=S2;exports.sortPrivileges=T0;exports.stringifyAttributes=S0;exports.tabEventsSubject=LI;exports.tasksManagerSubject=FI;exports.toastSubject=o0;exports.togglePermission=DL;exports.trackEvent=D2;exports.transformDates=BL;exports.tryCreateSharedResource=tu;exports.uniquePush=lr;exports.useDidMountEffect=D$;exports.useDoubleClick=iI;exports.useEnhancedState=wI;exports.useFeatureFlags=Q$;exports.useForwardedRef=J$;exports.useHotkeys=K$;exports.useIdentity=tI;exports.useOutsideClick=V$;exports.usePrevious=Y$;exports.useStateObject=rI;exports.useStateRef=X$;exports.useTip=cy;exports.validateName=Xa;exports.validateServerSide=jI;exports.validateValue=zI;exports.webformEventsSubject=ka;exports.webformSubject=II;
208
208
  //# sourceMappingURL=index.cjs.js.map