@ostack.tech/ui-kform-scaffolder 0.16.2 → 0.16.4

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.
@@ -10,7 +10,7 @@ Error generating stack: `+e.message+`
10
10
  To pick up a draggable item, press the space bar.
11
11
  While dragging, use the arrow keys to move the item.
12
12
  Press space again to drop the item in its new position, or press escape to cancel.
13
- `},_e={onDragStart(e){let{active:t}=e;return`Picked up draggable item `+t.id+`.`},onDragOver(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was moved over droppable area `+n.id+`.`:`Draggable item `+t.id+` is no longer over a droppable area.`},onDragEnd(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was dropped over droppable area `+n.id:`Draggable item `+t.id+` was dropped.`},onDragCancel(e){let{active:t}=e;return`Dragging was cancelled. Draggable item `+t.id+` was dropped.`}};function ve(e){let{announcements:t=_e,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=ge}=e,{announce:a,announcement:o}=fe(),s=z(`DndLiveRegion`),[c,l]=(0,C.useState)(!1);if((0,C.useEffect)(()=>{l(!0)},[]),me((0,C.useMemo)(()=>({onDragStart(e){let{active:n}=e;a(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&a(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;a(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;a(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;a(t.onDragCancel({active:n,over:r}))}}),[a,t])),!c)return null;let u=C.createElement(C.Fragment,null,C.createElement(ue,{id:r,value:i.draggable}),C.createElement(de,{id:s,announcement:o}));return n?(0,x.createPortal)(u,n):u}var ye;(function(e){e.DragStart=`dragStart`,e.DragMove=`dragMove`,e.DragEnd=`dragEnd`,e.DragCancel=`dragCancel`,e.DragOver=`dragOver`,e.RegisterDroppable=`registerDroppable`,e.SetDroppableDisabled=`setDroppableDisabled`,e.UnregisterDroppable=`unregisterDroppable`})(ye||={});function be(){}function xe(e,t){return(0,C.useMemo)(()=>({sensor:e,options:t??{}}),[e,t])}function Se(){var e=[...arguments];return(0,C.useMemo)(()=>[...e].filter(e=>e!=null),[...e])}var Ce=Object.freeze({x:0,y:0});function we(e,t){return Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2)}function Te(e,t){let n=ae(e);if(!n)return`0 0`;let r={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return r.x+`% `+r.y+`%`}function Ee(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function De(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function Oe(e,t){if(!e||e.length===0)return null;let[n]=e;return t?n[t]:n}function ke(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}var Ae=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=ke(t,t.left,t.top),a=[];for(let e of r){let{id:t}=e,r=n.get(t);if(r){let n=we(ke(r),i);a.push({id:t,data:{droppableContainer:e,value:n}})}}return a.sort(Ee)};function je(e,t){let n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),o=i-r,s=a-n;if(r<i&&n<a){let n=t.width*t.height,r=e.width*e.height,i=o*s,a=i/(n+r-i);return Number(a.toFixed(4))}return 0}var Me=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=[];for(let e of r){let{id:r}=e,a=n.get(r);if(a){let n=je(a,t);n>0&&i.push({id:r,data:{droppableContainer:e,value:n}})}}return i.sort(De)};function Ne(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function Pe(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Ce}function Fe(e){return function(t){return[...arguments].slice(1).reduce((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x}),{...t})}}var Ie=Fe(1);function Le(e){if(e.startsWith(`matrix3d(`)){let t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith(`matrix(`)){let t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function Re(e,t,n){let r=Le(t);if(!r)return e;let{scaleX:i,scaleY:a,x:o,y:s}=r,c=e.left-o-(1-i)*parseFloat(n),l=e.top-s-(1-a)*parseFloat(n.slice(n.indexOf(` `)+1)),u=i?e.width/i:e.width,d=a?e.height/a:e.height;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c}}var ze={ignoreTransform:!1};function Be(e,t){t===void 0&&(t=ze);let n=e.getBoundingClientRect();if(t.ignoreTransform){let{transform:t,transformOrigin:r}=D(e).getComputedStyle(e);t&&(n=Re(n,t,r))}let{top:r,left:i,width:a,height:o,bottom:s,right:c}=n;return{top:r,left:i,width:a,height:o,bottom:s,right:c}}function Ve(e){return Be(e,{ignoreTransform:!0})}function He(e){let t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function Ue(e,t){return t===void 0&&(t=D(e).getComputedStyle(e)),t.position===`fixed`}function We(e,t){t===void 0&&(t=D(e).getComputedStyle(e));let n=/(auto|scroll|overlay)/;return[`overflow`,`overflowX`,`overflowY`].some(e=>{let r=t[e];return typeof r==`string`&&n.test(r)})}function Ge(e,t){let n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(O(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!k(i)||A(i)||n.includes(i))return n;let a=D(e).getComputedStyle(i);return i!==e&&We(i,a)&&n.push(i),Ue(i,a)?n:r(i.parentNode)}return e?r(e):n}function Ke(e){let[t]=Ge(e,1);return t??null}function qe(e){return!w||!e?null:T(e)?e:E(e)?O(e)||e===j(e).scrollingElement?window:k(e)?e:null:null}function Je(e){return T(e)?e.scrollX:e.scrollLeft}function Ye(e){return T(e)?e.scrollY:e.scrollTop}function Xe(e){return{x:Je(e),y:Ye(e)}}var Ze;(function(e){e[e.Forward=1]=`Forward`,e[e.Backward=-1]=`Backward`})(Ze||={});function Qe(e){return!w||!e?!1:e===document.scrollingElement}function $e(e){let t={x:0,y:0},n=Qe(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}var et={x:.2,y:.2};function tt(e,t,n,r,i){let{top:a,left:o,right:s,bottom:c}=n;r===void 0&&(r=10),i===void 0&&(i=et);let{isTop:l,isBottom:u,isLeft:d,isRight:f}=$e(e),p={x:0,y:0},m={x:0,y:0},h={height:t.height*i.y,width:t.width*i.x};return!l&&a<=t.top+h.height?(p.y=Ze.Backward,m.y=r*Math.abs((t.top+h.height-a)/h.height)):!u&&c>=t.bottom-h.height&&(p.y=Ze.Forward,m.y=r*Math.abs((t.bottom-h.height-c)/h.height)),!f&&s>=t.right-h.width?(p.x=Ze.Forward,m.x=r*Math.abs((t.right-h.width-s)/h.width)):!d&&o<=t.left+h.width&&(p.x=Ze.Backward,m.x=r*Math.abs((t.left+h.width-o)/h.width)),{direction:p,speed:m}}function nt(e){if(e===document.scrollingElement){let{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}let{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function rt(e){return e.reduce((e,t)=>B(e,Xe(t)),Ce)}function it(e){return e.reduce((e,t)=>e+Je(t),0)}function at(e){return e.reduce((e,t)=>e+Ye(t),0)}function ot(e,t){if(t===void 0&&(t=Be),!e)return;let{top:n,left:r,bottom:i,right:a}=t(e);Ke(e)&&(i<=0||a<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:`center`,inline:`center`})}var st=[[`x`,[`left`,`right`],it],[`y`,[`top`,`bottom`],at]],ct=class{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;let n=Ge(t),r=rt(n);this.rect={...e},this.width=e.width,this.height=e.height;for(let[e,t,i]of st)for(let a of t)Object.defineProperty(this,a,{get:()=>{let t=i(n),o=r[e]-t;return this.rect[a]+o},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}},lt=class{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>this.target?.removeEventListener(...e))},this.target=e}add(e,t,n){var r;(r=this.target)==null||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}};function ut(e){let{EventTarget:t}=D(e);return e instanceof t?e:j(e)}function dt(e,t){let n=Math.abs(e.x),r=Math.abs(e.y);return typeof t==`number`?Math.sqrt(n**2+r**2)>t:`x`in t&&`y`in t?n>t.x&&r>t.y:`x`in t?n>t.x:`y`in t&&r>t.y}var ft;(function(e){e.Click=`click`,e.DragStart=`dragstart`,e.Keydown=`keydown`,e.ContextMenu=`contextmenu`,e.Resize=`resize`,e.SelectionChange=`selectionchange`,e.VisibilityChange=`visibilitychange`})(ft||={});function pt(e){e.preventDefault()}function mt(e){e.stopPropagation()}var H;(function(e){e.Space=`Space`,e.Down=`ArrowDown`,e.Right=`ArrowRight`,e.Left=`ArrowLeft`,e.Up=`ArrowUp`,e.Esc=`Escape`,e.Enter=`Enter`,e.Tab=`Tab`})(H||={});var ht={start:[H.Space,H.Enter],cancel:[H.Esc],end:[H.Space,H.Enter,H.Tab]},gt=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case H.Right:return{...n,x:n.x+25};case H.Left:return{...n,x:n.x-25};case H.Down:return{...n,y:n.y+25};case H.Up:return{...n,y:n.y-25}}},_t=class{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;let{event:{target:t}}=e;this.props=e,this.listeners=new lt(j(t)),this.windowListeners=new lt(D(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(ft.Resize,this.handleCancel),this.windowListeners.add(ft.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(ft.Keydown,this.handleKeyDown))}handleStart(){let{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&ot(n),t(Ce)}handleKeyDown(e){if(re(e)){let{active:t,context:n,options:r}=this.props,{keyboardCodes:i=ht,coordinateGetter:a=gt,scrollBehavior:o=`smooth`}=r,{code:s}=e;if(i.end.includes(s)){this.handleEnd(e);return}if(i.cancel.includes(s)){this.handleCancel(e);return}let{collisionRect:c}=n.current,l=c?{x:c.left,y:c.top}:Ce;this.referenceCoordinates||=l;let u=a(e,{active:t,context:n.current,currentCoordinates:l});if(u){let t=V(u,l),r={x:0,y:0},{scrollableAncestors:i}=n.current;for(let n of i){let i=e.code,{isTop:a,isRight:s,isLeft:c,isBottom:l,maxScroll:d,minScroll:f}=$e(n),p=nt(n),m={x:Math.min(i===H.Right?p.right-p.width/2:p.right,Math.max(i===H.Right?p.left:p.left+p.width/2,u.x)),y:Math.min(i===H.Down?p.bottom-p.height/2:p.bottom,Math.max(i===H.Down?p.top:p.top+p.height/2,u.y))},h=i===H.Right&&!s||i===H.Left&&!c,g=i===H.Down&&!l||i===H.Up&&!a;if(h&&m.x!==u.x){let e=n.scrollLeft+t.x,a=i===H.Right&&e<=d.x||i===H.Left&&e>=f.x;if(a&&!t.y){n.scrollTo({left:e,behavior:o});return}r.x=a?n.scrollLeft-e:i===H.Right?n.scrollLeft-d.x:n.scrollLeft-f.x,r.x&&n.scrollBy({left:-r.x,behavior:o});break}if(g&&m.y!==u.y){let e=n.scrollTop+t.y,a=i===H.Down&&e<=d.y||i===H.Up&&e>=f.y;if(a&&!t.x){n.scrollTo({top:e,behavior:o});return}r.y=a?n.scrollTop-e:i===H.Down?n.scrollTop-d.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:o});break}}this.handleMove(e,B(V(u,this.referenceCoordinates),r))}}}handleMove(e,t){let{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){let{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){let{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}};_t.activators=[{eventName:`onKeyDown`,handler:(e,t,n)=>{let{keyboardCodes:r=ht,onActivation:i}=t,{active:a}=n,{code:o}=e.nativeEvent;if(r.start.includes(o)){let t=a.activatorNode.current;return t&&e.target!==t?!1:(e.preventDefault(),i?.({event:e.nativeEvent}),!0)}return!1}}];function vt(e){return!!(e&&`distance`in e)}function yt(e){return!!(e&&`delay`in e)}var bt=class{constructor(e,t,n){n===void 0&&(n=ut(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;let{event:r}=e,{target:i}=r;this.props=e,this.events=t,this.document=j(i),this.documentListeners=new lt(this.document),this.listeners=new lt(n),this.windowListeners=new lt(D(i)),this.initialCoordinates=ae(r)??Ce,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){let{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(ft.Resize,this.handleCancel),this.windowListeners.add(ft.DragStart,pt),this.windowListeners.add(ft.VisibilityChange,this.handleCancel),this.windowListeners.add(ft.ContextMenu,pt),this.documentListeners.add(ft.Keydown,this.handleKeydown),t){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(yt(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(vt(t)){this.handlePending(t);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){let{active:n,onPending:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){let{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(ft.Click,mt,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(ft.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){let{activated:t,initialCoordinates:n,props:r}=this,{onMove:i,options:{activationConstraint:a}}=r;if(!n)return;let o=ae(e)??Ce,s=V(n,o);if(!t&&a){if(vt(a)){if(a.tolerance!=null&&dt(s,a.tolerance))return this.handleCancel();if(dt(s,a.distance))return this.handleStart()}if(yt(a)&&dt(s,a.tolerance))return this.handleCancel();this.handlePending(a,s);return}e.cancelable&&e.preventDefault(),i(o)}handleEnd(){let{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){let{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===H.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}},xt={cancel:{name:`pointercancel`},move:{name:`pointermove`},end:{name:`pointerup`}},St=class extends bt{constructor(e){let{event:t}=e,n=j(t.target);super(e,xt,n)}};St.activators=[{eventName:`onPointerDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];var Ct={move:{name:`mousemove`},end:{name:`mouseup`}},wt;(function(e){e[e.RightClick=2]=`RightClick`})(wt||={});var Tt=class extends bt{constructor(e){super(e,Ct,j(e.event.target))}};Tt.activators=[{eventName:`onMouseDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==wt.RightClick&&(r?.({event:n}),!0)}}];var Et={cancel:{name:`touchcancel`},move:{name:`touchmove`},end:{name:`touchend`}},Dt=class extends bt{constructor(e){super(e,Et)}static setup(){return window.addEventListener(Et.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(Et.move.name,e)};function e(){}}};Dt.activators=[{eventName:`onTouchStart`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t,{touches:i}=n;return i.length>1?!1:(r?.({event:n}),!0)}}];var Ot;(function(e){e[e.Pointer=0]=`Pointer`,e[e.DraggableRect=1]=`DraggableRect`})(Ot||={});var kt;(function(e){e[e.TreeOrder=0]=`TreeOrder`,e[e.ReversedTreeOrder=1]=`ReversedTreeOrder`})(kt||={});function At(e){let{acceleration:t,activator:n=Ot.Pointer,canScroll:r,draggingRect:i,enabled:a,interval:o=5,order:s=kt.TreeOrder,pointerCoordinates:c,scrollableAncestors:l,scrollableAncestorRects:u,delta:d,threshold:f}=e,p=Mt({delta:d,disabled:!a}),[m,h]=ee(),g=(0,C.useRef)({x:0,y:0}),_=(0,C.useRef)({x:0,y:0}),v=(0,C.useMemo)(()=>{switch(n){case Ot.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case Ot.DraggableRect:return i}},[n,i,c]),y=(0,C.useRef)(null),b=(0,C.useCallback)(()=>{let e=y.current;if(!e)return;let t=g.current.x*_.current.x,n=g.current.y*_.current.y;e.scrollBy(t,n)},[]),x=(0,C.useMemo)(()=>s===kt.TreeOrder?[...l].reverse():l,[s,l]);(0,C.useEffect)(()=>{if(!a||!l.length||!v){h();return}for(let e of x){if(r?.(e)===!1)continue;let n=l.indexOf(e),i=u[n];if(!i)continue;let{direction:a,speed:s}=tt(e,i,v,t,f);for(let e of[`x`,`y`])p[e][a[e]]||(s[e]=0,a[e]=0);if(s.x>0||s.y>0){h(),y.current=e,m(b,o),g.current=s,_.current=a;return}}g.current={x:0,y:0},_.current={x:0,y:0},h()},[t,b,r,h,a,o,JSON.stringify(v),JSON.stringify(p),m,l,x,u,JSON.stringify(f)])}var jt={x:{[Ze.Backward]:!1,[Ze.Forward]:!1},y:{[Ze.Backward]:!1,[Ze.Forward]:!1}};function Mt(e){let{delta:t,disabled:n}=e,r=L(t);return F(e=>{if(n||!r||!e)return jt;let i={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[Ze.Backward]:e.x[Ze.Backward]||i.x===-1,[Ze.Forward]:e.x[Ze.Forward]||i.x===1},y:{[Ze.Backward]:e.y[Ze.Backward]||i.y===-1,[Ze.Forward]:e.y[Ze.Forward]||i.y===1}}},[n,t,r])}function Nt(e,t){let n=t==null?void 0:e.get(t),r=n?n.node.current:null;return F(e=>t==null?null:r??e??null,[r,t])}function Pt(e,t){return(0,C.useMemo)(()=>e.reduce((e,n)=>{let{sensor:r}=n,i=r.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,n)}));return[...e,...i]},[]),[e,t])}var Ft;(function(e){e[e.Always=0]=`Always`,e[e.BeforeDragging=1]=`BeforeDragging`,e[e.WhileDragging=2]=`WhileDragging`})(Ft||={});var It;(function(e){e.Optimized=`optimized`})(It||={});var Lt=new Map;function Rt(e,t){let{dragging:n,dependencies:r,config:i}=t,[a,o]=(0,C.useState)(null),{frequency:s,measure:c,strategy:l}=i,u=(0,C.useRef)(e),d=g(),f=P(d),p=(0,C.useCallback)(function(e){e===void 0&&(e=[]),!f.current&&o(t=>t===null?e:t.concat(e.filter(e=>!t.includes(e))))},[f]),m=(0,C.useRef)(null),h=F(t=>{if(d&&!n)return Lt;if(!t||t===Lt||u.current!==e||a!=null){let t=new Map;for(let n of e){if(!n)continue;if(a&&a.length>0&&!a.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}let e=n.node.current,r=e?new ct(c(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t},[e,a,n,d,c]);return(0,C.useEffect)(()=>{u.current=e},[e]),(0,C.useEffect)(()=>{d||p()},[n,d]),(0,C.useEffect)(()=>{a&&a.length>0&&o(null)},[JSON.stringify(a)]),(0,C.useEffect)(()=>{d||typeof s!=`number`||m.current!==null||(m.current=setTimeout(()=>{p(),m.current=null},s))},[s,d,p,...r]),{droppableRects:h,measureDroppableContainers:p,measuringScheduled:a!=null};function g(){switch(l){case Ft.Always:return!1;case Ft.BeforeDragging:return n;default:return!n}}}function zt(e,t){return F(n=>e?n||(typeof t==`function`?t(e):e):null,[t,e])}function Bt(e,t){return zt(e,t)}function Vt(e){let{callback:t,disabled:n}=e,r=N(t),i=(0,C.useMemo)(()=>{if(n||typeof window>`u`||window.MutationObserver===void 0)return;let{MutationObserver:e}=window;return new e(r)},[r,n]);return(0,C.useEffect)(()=>()=>i?.disconnect(),[i]),i}function Ht(e){let{callback:t,disabled:n}=e,r=N(t),i=(0,C.useMemo)(()=>{if(n||typeof window>`u`||window.ResizeObserver===void 0)return;let{ResizeObserver:e}=window;return new e(r)},[n]);return(0,C.useEffect)(()=>()=>i?.disconnect(),[i]),i}function Ut(e){return new ct(Be(e),e)}function Wt(e,t,n){t===void 0&&(t=Ut);let[r,i]=(0,C.useState)(null);function a(){i(r=>{if(!e)return null;if(e.isConnected===!1)return r??n??null;let i=t(e);return JSON.stringify(r)===JSON.stringify(i)?r:i})}let o=Vt({callback(t){if(e)for(let n of t){let{type:t,target:r}=n;if(t===`childList`&&r instanceof HTMLElement&&r.contains(e)){a();break}}}}),s=Ht({callback:a});return M(()=>{a(),e?(s?.observe(e),o?.observe(document.body,{childList:!0,subtree:!0})):(s?.disconnect(),o?.disconnect())},[e]),r}function Gt(e){return Pe(e,zt(e))}var Kt=[];function qt(e){let t=(0,C.useRef)(e),n=F(n=>e?n&&n!==Kt&&e&&t.current&&e.parentNode===t.current.parentNode?n:Ge(e):Kt,[e]);return(0,C.useEffect)(()=>{t.current=e},[e]),n}function Jt(e){let[t,n]=(0,C.useState)(null),r=(0,C.useRef)(e),i=(0,C.useCallback)(e=>{let t=qe(e.target);t&&n(e=>e?(e.set(t,Xe(t)),new Map(e)):null)},[]);return(0,C.useEffect)(()=>{let t=r.current;if(e!==t){a(t);let o=e.map(e=>{let t=qe(e);return t?(t.addEventListener(`scroll`,i,{passive:!0}),[t,Xe(t)]):null}).filter(e=>e!=null);n(o.length?new Map(o):null),r.current=e}return()=>{a(e),a(t)};function a(e){e.forEach(e=>{qe(e)?.removeEventListener(`scroll`,i)})}},[i,e]),(0,C.useMemo)(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>B(e,t),Ce):rt(e):Ce,[e,t])}function Yt(e,t){t===void 0&&(t=[]);let n=(0,C.useRef)(null);return(0,C.useEffect)(()=>{n.current=null},t),(0,C.useEffect)(()=>{let t=e!==Ce;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?V(e,n.current):Ce}function Xt(e){(0,C.useEffect)(()=>{if(!w)return;let t=e.map(e=>{let{sensor:t}=e;return t.setup==null?void 0:t.setup()});return()=>{for(let e of t)e?.()}},e.map(e=>{let{sensor:t}=e;return t}))}function Zt(e,t){return(0,C.useMemo)(()=>e.reduce((e,n)=>{let{eventName:r,handler:i}=n;return e[r]=e=>{i(e,t)},e},{}),[e,t])}function Qt(e){return(0,C.useMemo)(()=>e?He(e):null,[e])}var $t=[];function en(e,t){t===void 0&&(t=Be);let[n]=e,r=Qt(n?D(n):null),[i,a]=(0,C.useState)($t);function o(){a(()=>e.length?e.map(e=>Qe(e)?r:new ct(t(e),e)):$t)}let s=Ht({callback:o});return M(()=>{s?.disconnect(),o(),e.forEach(e=>s?.observe(e))},[e]),i}function tn(e){if(!e)return null;if(e.children.length>1)return e;let t=e.children[0];return k(t)?t:e}function nn(e){let{measure:t}=e,[n,r]=(0,C.useState)(null),i=Ht({callback:(0,C.useCallback)(e=>{for(let{target:n}of e)if(k(n)){r(e=>{let r=t(n);return e?{...e,width:r.width,height:r.height}:r});break}},[t])}),[a,o]=I((0,C.useCallback)(e=>{let n=tn(e);i?.disconnect(),n&&i?.observe(n),r(n?t(n):null)},[t,i]));return(0,C.useMemo)(()=>({nodeRef:a,rect:n,setRef:o}),[n,a,o])}var rn=[{sensor:St,options:{}},{sensor:_t,options:{}}],an={current:{}},on={draggable:{measure:Ve},droppable:{measure:Ve,strategy:Ft.WhileDragging,frequency:It.Optimized},dragOverlay:{measure:Be}},sn=class extends Map{get(e){return e==null?void 0:super.get(e)??void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){return this.get(e)?.node.current??void 0}},cn={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new sn,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:be},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:on,measureDroppableContainers:be,windowRect:null,measuringScheduled:!1},ln={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:``},dispatch:be,draggableNodes:new Map,over:null,measureDroppableContainers:be},un=(0,C.createContext)(ln),dn=(0,C.createContext)(cn);function fn(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new sn}}}function pn(e,t){switch(t.type){case ye.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case ye.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case ye.DragEnd:case ye.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case ye.RegisterDroppable:{let{element:n}=t,{id:r}=n,i=new sn(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case ye.SetDroppableDisabled:{let{id:n,key:r,disabled:i}=t,a=e.droppable.containers.get(n);if(!a||r!==a.key)return e;let o=new sn(e.droppable.containers);return o.set(n,{...a,disabled:i}),{...e,droppable:{...e.droppable,containers:o}}}case ye.UnregisterDroppable:{let{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;let a=new sn(e.droppable.containers);return a.delete(n),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function mn(e){let{disabled:t}=e,{active:n,activatorEvent:r,draggableNodes:i}=(0,C.useContext)(un),a=L(r),o=L(n?.id);return(0,C.useEffect)(()=>{if(!t&&!r&&a&&o!=null){if(!re(a)||document.activeElement===a.target)return;let e=i.get(o);if(!e)return;let{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame(()=>{for(let e of[t.current,n.current]){if(!e)continue;let t=ce(e);if(t){t.focus();break}}})}},[r,t,i,o,a]),null}function hn(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((e,t)=>t({transform:e,...r}),n):n}function gn(e){return(0,C.useMemo)(()=>({draggable:{...on.draggable,...e?.draggable},droppable:{...on.droppable,...e?.droppable},dragOverlay:{...on.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function _n(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e,a=(0,C.useRef)(!1),{x:o,y:s}=typeof i==`boolean`?{x:i,y:i}:i;M(()=>{if(!o&&!s||!t){a.current=!1;return}if(a.current||!r)return;let e=t?.node.current;if(!e||e.isConnected===!1)return;let i=Pe(n(e),r);if(o||(i.x=0),s||(i.y=0),a.current=!0,Math.abs(i.x)>0||Math.abs(i.y)>0){let t=Ke(e);t&&t.scrollBy({top:i.y,left:i.x})}},[t,o,s,r,n])}var vn=(0,C.createContext)({...Ce,scaleX:1,scaleY:1}),yn;(function(e){e[e.Uninitialized=0]=`Uninitialized`,e[e.Initializing=1]=`Initializing`,e[e.Initialized=2]=`Initialized`})(yn||={});var bn=(0,C.memo)(function(e){let{id:t,accessibility:n,autoScroll:r=!0,children:i,sensors:a=rn,collisionDetection:o=Me,measuring:s,modifiers:c,...l}=e,[u,d]=(0,C.useReducer)(pn,void 0,fn),[f,p]=he(),[m,h]=(0,C.useState)(yn.Uninitialized),g=m===yn.Initialized,{draggable:{active:_,nodes:v,translate:y},droppable:{containers:b}}=u,S=_==null?null:v.get(_),w=(0,C.useRef)({initial:null,translated:null}),T=(0,C.useMemo)(()=>_==null?null:{id:_,data:S?.data??an,rect:w},[_,S]),E=(0,C.useRef)(null),[O,k]=(0,C.useState)(null),[A,j]=(0,C.useState)(null),N=P(l,Object.values(l)),ee=z(`DndDescribedBy`,t),F=(0,C.useMemo)(()=>b.getEnabled(),[b]),I=gn(s),{droppableRects:L,measureDroppableContainers:R,measuringScheduled:te}=Rt(F,{dragging:g,dependencies:[y.x,y.y],config:I.droppable}),V=Nt(v,_),ne=(0,C.useMemo)(()=>A?ae(A):null,[A]),re=Ue(),ie=Bt(V,I.draggable.measure);_n({activeNode:_==null?null:v.get(_),config:re.layoutShiftCompensation,initialRect:ie,measure:I.draggable.measure});let oe=Wt(V,I.draggable.measure,ie),se=Wt(V?V.parentElement:null),ce=(0,C.useRef)({activatorEvent:null,active:null,activeNode:V,collisionRect:null,collisions:null,droppableRects:L,draggableNodes:v,draggingNode:null,draggingNodeRect:null,droppableContainers:b,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),le=b.getNodeFor(ce.current.over?.id),ue=nn({measure:I.dragOverlay.measure}),de=ue.nodeRef.current??V,fe=g?ue.rect??oe:null,me=!!(ue.nodeRef.current&&ue.rect),ge=Gt(me?null:oe),_e=Qt(de?D(de):null),be=qt(g?le??V:null),xe=en(be),Se=hn(c,{transform:{x:y.x-ge.x,y:y.y-ge.y,scaleX:1,scaleY:1},activatorEvent:A,active:T,activeNodeRect:oe,containerNodeRect:se,draggingNodeRect:fe,over:ce.current.over,overlayNodeRect:ue.rect,scrollableAncestors:be,scrollableAncestorRects:xe,windowRect:_e}),Ce=ne?B(ne,y):null,we=Jt(be),Te=Yt(we),Ee=Yt(we,[oe]),De=B(Se,Te),ke=fe?Ie(fe,Se):null,Ae=T&&ke?o({active:T,collisionRect:ke,droppableRects:L,droppableContainers:F,pointerCoordinates:Ce}):null,je=Oe(Ae,`id`),[Pe,Fe]=(0,C.useState)(null),Le=Ne(me?Se:B(Se,Ee),Pe?.rect??null,oe),Re=(0,C.useRef)(null),ze=(0,C.useCallback)((e,t)=>{let{sensor:n,options:r}=t;if(E.current==null)return;let i=v.get(E.current);if(!i)return;let a=e.nativeEvent,o=new n({active:E.current,activeNode:i,event:a,options:r,context:ce,onAbort(e){if(!v.get(e))return;let{onDragAbort:t}=N.current,n={id:e};t?.(n),f({type:`onDragAbort`,event:n})},onPending(e,t,n,r){if(!v.get(e))return;let{onDragPending:i}=N.current,a={id:e,constraint:t,initialCoordinates:n,offset:r};i?.(a),f({type:`onDragPending`,event:a})},onStart(e){let t=E.current;if(t==null)return;let n=v.get(t);if(!n)return;let{onDragStart:r}=N.current,i={activatorEvent:a,active:{id:t,data:n.data,rect:w}};(0,x.unstable_batchedUpdates)(()=>{r?.(i),h(yn.Initializing),d({type:ye.DragStart,initialCoordinates:e,active:t}),f({type:`onDragStart`,event:i}),k(Re.current),j(a)})},onMove(e){d({type:ye.DragMove,coordinates:e})},onEnd:s(ye.DragEnd),onCancel:s(ye.DragCancel)});Re.current=o;function s(e){return async function(){let{active:t,collisions:n,over:r,scrollAdjustedTranslate:i}=ce.current,o=null;if(t&&i){let{cancelDrop:s}=N.current;o={activatorEvent:a,active:t,collisions:n,delta:i,over:r},e===ye.DragEnd&&typeof s==`function`&&await Promise.resolve(s(o))&&(e=ye.DragCancel)}E.current=null,(0,x.unstable_batchedUpdates)(()=>{d({type:e}),h(yn.Uninitialized),Fe(null),k(null),j(null),Re.current=null;let t=e===ye.DragEnd?`onDragEnd`:`onDragCancel`;if(o){let e=N.current[t];e?.(o),f({type:t,event:o})}})}}},[v]),Be=Pt(a,(0,C.useCallback)((e,t)=>(n,r)=>{let i=n.nativeEvent,a=v.get(r);if(E.current!==null||!a||i.dndKit||i.defaultPrevented)return;let o={active:a};e(n,t.options,o)===!0&&(i.dndKit={capturedBy:t.sensor},E.current=r,ze(n,t))},[v,ze]));Xt(a),M(()=>{oe&&m===yn.Initializing&&h(yn.Initialized)},[oe,m]),(0,C.useEffect)(()=>{let{onDragMove:e}=N.current,{active:t,activatorEvent:n,collisions:r,over:i}=ce.current;if(!t||!n)return;let a={active:t,activatorEvent:n,collisions:r,delta:{x:De.x,y:De.y},over:i};(0,x.unstable_batchedUpdates)(()=>{e?.(a),f({type:`onDragMove`,event:a})})},[De.x,De.y]),(0,C.useEffect)(()=>{let{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:i}=ce.current;if(!e||E.current==null||!t||!i)return;let{onDragOver:a}=N.current,o=r.get(je),s=o&&o.rect.current?{id:o.id,rect:o.rect.current,data:o.data,disabled:o.disabled}:null,c={active:e,activatorEvent:t,collisions:n,delta:{x:i.x,y:i.y},over:s};(0,x.unstable_batchedUpdates)(()=>{Fe(s),a?.(c),f({type:`onDragOver`,event:c})})},[je]),M(()=>{ce.current={activatorEvent:A,active:T,activeNode:V,collisionRect:ke,collisions:Ae,droppableRects:L,draggableNodes:v,draggingNode:de,draggingNodeRect:fe,droppableContainers:b,over:Pe,scrollableAncestors:be,scrollAdjustedTranslate:De},w.current={initial:fe,translated:ke}},[T,V,Ae,ke,v,de,fe,L,b,Pe,be,De]),At({...re,delta:y,draggingRect:ke,pointerCoordinates:Ce,scrollableAncestors:be,scrollableAncestorRects:xe});let Ve=(0,C.useMemo)(()=>({active:T,activeNode:V,activeNodeRect:oe,activatorEvent:A,collisions:Ae,containerNodeRect:se,dragOverlay:ue,draggableNodes:v,droppableContainers:b,droppableRects:L,over:Pe,measureDroppableContainers:R,scrollableAncestors:be,scrollableAncestorRects:xe,measuringConfiguration:I,measuringScheduled:te,windowRect:_e}),[T,V,oe,A,Ae,se,ue,v,b,L,Pe,R,be,xe,I,te,_e]),He=(0,C.useMemo)(()=>({activatorEvent:A,activators:Be,active:T,activeNodeRect:oe,ariaDescribedById:{draggable:ee},dispatch:d,draggableNodes:v,over:Pe,measureDroppableContainers:R}),[A,Be,T,oe,d,ee,v,Pe,R]);return C.createElement(pe.Provider,{value:p},C.createElement(un.Provider,{value:He},C.createElement(dn.Provider,{value:Ve},C.createElement(vn.Provider,{value:Le},i)),C.createElement(mn,{disabled:n?.restoreFocus===!1})),C.createElement(ve,{...n,hiddenTextDescribedById:ee}));function Ue(){let e=O?.autoScrollEnabled===!1,t=typeof r==`object`?r.enabled===!1:r===!1,n=g&&!e&&!t;return typeof r==`object`?{...r,enabled:n}:{enabled:n}}}),xn=(0,C.createContext)(null),Sn=`button`,Cn=`Draggable`;function wn(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e,a=z(Cn),{activators:o,activatorEvent:s,active:c,activeNodeRect:l,ariaDescribedById:u,draggableNodes:d,over:f}=(0,C.useContext)(un),{role:p=Sn,roleDescription:m=`draggable`,tabIndex:h=0}=i??{},g=c?.id===t,_=(0,C.useContext)(g?vn:xn),[v,y]=I(),[b,x]=I(),S=Zt(o,t),w=P(n);return M(()=>(d.set(t,{id:t,key:a,node:v,activatorNode:b,data:w}),()=>{let e=d.get(t);e&&e.key===a&&d.delete(t)}),[d,t]),{active:c,activatorEvent:s,activeNodeRect:l,attributes:(0,C.useMemo)(()=>({role:p,tabIndex:h,"aria-disabled":r,"aria-pressed":g&&p===Sn?!0:void 0,"aria-roledescription":m,"aria-describedby":u.draggable}),[r,p,h,g,m,u.draggable]),isDragging:g,listeners:r?void 0:S,node:v,over:f,setNodeRef:y,setActivatorNodeRef:x,transform:_}}function Tn(){return(0,C.useContext)(dn)}var En=`Droppable`,Dn={timeout:25};function On(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e,a=z(En),{active:o,dispatch:s,over:c,measureDroppableContainers:l}=(0,C.useContext)(un),u=(0,C.useRef)({disabled:n}),d=(0,C.useRef)(!1),f=(0,C.useRef)(null),p=(0,C.useRef)(null),{disabled:m,updateMeasurementsFor:h,timeout:g}={...Dn,...i},_=P(h??r),v=Ht({callback:(0,C.useCallback)(()=>{if(!d.current){d.current=!0;return}p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{l(Array.isArray(_.current)?_.current:[_.current]),p.current=null},g)},[g]),disabled:m||!o}),[y,b]=I((0,C.useCallback)((e,t)=>{v&&(t&&(v.unobserve(t),d.current=!1),e&&v.observe(e))},[v])),x=P(t);return(0,C.useEffect)(()=>{!v||!y.current||(v.disconnect(),d.current=!1,v.observe(y.current))},[y,v]),(0,C.useEffect)(()=>(s({type:ye.RegisterDroppable,element:{id:r,key:a,disabled:n,node:y,rect:f,data:x}}),()=>s({type:ye.UnregisterDroppable,key:a,id:r})),[r]),(0,C.useEffect)(()=>{n!==u.current.disabled&&(s({type:ye.SetDroppableDisabled,id:r,key:a,disabled:n}),u.current.disabled=n)},[r,a,n,s]),{active:o,rect:f,isOver:c?.id===r,node:y,over:c,setNodeRef:b}}function kn(e){let{animation:t,children:n}=e,[r,i]=(0,C.useState)(null),[a,o]=(0,C.useState)(null),s=L(n);return!n&&!r&&s&&i(s),M(()=>{if(!a)return;let e=r?.key,n=r?.props.id;if(e==null||n==null){i(null);return}Promise.resolve(t(n,a)).then(()=>{i(null)})},[t,r,a]),C.createElement(C.Fragment,null,n,r?(0,C.cloneElement)(r,{ref:o}):null)}var An={x:0,y:0,scaleX:1,scaleY:1};function jn(e){let{children:t}=e;return C.createElement(un.Provider,{value:ln},C.createElement(vn.Provider,{value:An},t))}var Mn={position:`fixed`,touchAction:`none`},Nn=e=>re(e)?`transform 250ms ease`:void 0,Pn=(0,C.forwardRef)((e,t)=>{let{as:n,activatorEvent:r,adjustScale:i,children:a,className:o,rect:s,style:c,transform:l,transition:u=Nn}=e;if(!s)return null;let d=i?l:{...l,scaleX:1,scaleY:1},f={...Mn,width:s.width,height:s.height,top:s.top,left:s.left,transform:oe.Transform.toString(d),transformOrigin:i&&r?Te(r,s):void 0,transition:typeof u==`function`?u(r):u,...c};return C.createElement(n,{className:o,style:f,ref:t},a)}),Fn={duration:250,easing:`ease`,keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:oe.Transform.toString(t)},{transform:oe.Transform.toString(n)}]},sideEffects:(e=>t=>{let{active:n,dragOverlay:r}=t,i={},{styles:a,className:o}=e;if(a!=null&&a.active)for(let[e,t]of Object.entries(a.active))t!==void 0&&(i[e]=n.node.style.getPropertyValue(e),n.node.style.setProperty(e,t));if(a!=null&&a.dragOverlay)for(let[e,t]of Object.entries(a.dragOverlay))t!==void 0&&r.node.style.setProperty(e,t);return o!=null&&o.active&&n.node.classList.add(o.active),o!=null&&o.dragOverlay&&r.node.classList.add(o.dragOverlay),function(){for(let[e,t]of Object.entries(i))n.node.style.setProperty(e,t);o!=null&&o.active&&n.node.classList.remove(o.active)}})({styles:{active:{opacity:`0`}}})};function In(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:i}=e;return N((e,a)=>{if(t===null)return;let o=n.get(e);if(!o)return;let s=o.node.current;if(!s)return;let c=tn(a);if(!c)return;let{transform:l}=D(a).getComputedStyle(a),u=Le(l);if(!u)return;let d=typeof t==`function`?t:Ln(t);return ot(s,i.draggable.measure),d({active:{id:e,data:o.data,node:s,rect:i.draggable.measure(s)},draggableNodes:n,dragOverlay:{node:a,rect:i.dragOverlay.measure(c)},droppableContainers:r,measuringConfiguration:i,transform:u})})}function Ln(e){let{duration:t,easing:n,sideEffects:r,keyframes:i}={...Fn,...e};return e=>{let{active:a,dragOverlay:o,transform:s,...c}=e;if(!t)return;let l={x:o.rect.left-a.rect.left,y:o.rect.top-a.rect.top},u={scaleX:s.scaleX===1?1:a.rect.width*s.scaleX/o.rect.width,scaleY:s.scaleY===1?1:a.rect.height*s.scaleY/o.rect.height},d={x:s.x-l.x,y:s.y-l.y,...u},f=i({...c,active:a,dragOverlay:o,transform:{initial:s,final:d}}),[p]=f,m=f[f.length-1];if(JSON.stringify(p)===JSON.stringify(m))return;let h=r?.({active:a,dragOverlay:o,...c}),g=o.node.animate(f,{duration:t,easing:n,fill:`forwards`});return new Promise(e=>{g.onfinish=()=>{h?.(),e()}})}}var Rn=0;function zn(e){return(0,C.useMemo)(()=>{if(e!=null)return Rn++,Rn},[e])}var Bn=C.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:r,style:i,transition:a,modifiers:o,wrapperElement:s=`div`,className:c,zIndex:l=999}=e,{activatorEvent:u,active:d,activeNodeRect:f,containerNodeRect:p,draggableNodes:m,droppableContainers:h,dragOverlay:g,over:_,measuringConfiguration:v,scrollableAncestors:y,scrollableAncestorRects:b,windowRect:x}=Tn(),S=(0,C.useContext)(vn),w=zn(d?.id),T=hn(o,{activatorEvent:u,active:d,activeNodeRect:f,containerNodeRect:p,draggingNodeRect:g.rect,over:_,overlayNodeRect:g.rect,scrollableAncestors:y,scrollableAncestorRects:b,transform:S,windowRect:x}),E=zt(f),D=In({config:r,draggableNodes:m,droppableContainers:h,measuringConfiguration:v}),O=E?g.setRef:void 0;return C.createElement(jn,null,C.createElement(kn,{animation:D},d&&w?C.createElement(Pn,{key:w,id:d.id,ref:O,as:s,activatorEvent:u,adjustScale:t,className:c,transition:a,rect:E,style:{zIndex:l,...i},transform:T},n):null))}),Vn=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},Hn=(e=>e?Vn(e):Vn),Un=e=>e;function Wn(e,t=Un){let n=C.useSyncExternalStore(e.subscribe,C.useCallback(()=>t(e.getState()),[e,t]),C.useCallback(()=>t(e.getInitialState()),[e,t]));return C.useDebugValue(n),n}var Gn=e=>{let t=Hn(e),n=e=>Wn(t,e);return Object.assign(n,t),n},Kn=(e=>e?Gn(e):Gn);function qn(e,t){let n;try{n=e()}catch{return}return{getItem:e=>{let r=e=>e===null?null:JSON.parse(e,t?.reviver),i=n.getItem(e)??null;return i instanceof Promise?i.then(r):r(i)},setItem:(e,r)=>n.setItem(e,JSON.stringify(r,t?.replacer)),removeItem:e=>n.removeItem(e)}}var Jn=e=>t=>{try{let n=e(t);return n instanceof Promise?n:{then(e){return Jn(e)(n)},catch(e){return this}}}catch(e){return{then(e){return this},catch(t){return Jn(t)(e)}}}},Yn=(e,t)=>(n,r,i)=>{let a={storage:qn(()=>window.localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},o=!1,s=0,c=new Set,l=new Set,u=a.storage;if(!u)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...e)},r,i);let d=()=>{let e=a.partialize({...r()});return u.setItem(a.name,{state:e,version:a.version})},f=i.setState;i.setState=(e,t)=>(f(e,t),d());let p=e((...e)=>(n(...e),d()),r,i);i.getInitialState=()=>p;let m,h=()=>{if(!u)return;let e=++s;o=!1,c.forEach(e=>e(r()??p));let t=a.onRehydrateStorage?.call(a,r()??p)||void 0;return Jn(u.getItem.bind(u))(a.name).then(e=>{if(e)if(typeof e.version==`number`&&e.version!==a.version){if(a.migrate){let t=a.migrate(e.state,e.version);return t instanceof Promise?t.then(e=>[!0,e]):[!0,t]}console.error(`State loaded from storage couldn't be migrated since no migrate function was provided`)}else return[!1,e.state];return[!1,void 0]}).then(t=>{if(e!==s)return;let[i,o]=t;if(m=a.merge(o,r()??p),n(m,!0),i)return d()}).then(()=>{e===s&&(t?.(r(),void 0),m=r(),o=!0,l.forEach(e=>e(m)))}).catch(n=>{e===s&&t?.(void 0,n)})};return i.persist={setOptions:e=>{a={...a,...e},e.storage&&(u=e.storage)},clearStorage:()=>{u?.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>h(),hasHydrated:()=>o,onHydrate:e=>(c.add(e),()=>{c.delete(e)}),onFinishHydration:e=>(l.add(e),()=>{l.delete(e)})},a.skipHydration||h(),m||p},Xn=(()=>{if(typeof self>`u`)return!1;if(`top`in self&&self!==top)try{top.window.document._=0}catch{return!1}return`showOpenFilePicker`in self})(),Zn=Xn?Promise.resolve().then(function(){return nr}):Promise.resolve().then(function(){return sr});async function Qn(...e){return(await Zn).default(...e)}Xn?Promise.resolve().then(function(){return ar}):Promise.resolve().then(function(){return cr});var $n=Xn?Promise.resolve().then(function(){return or}):Promise.resolve().then(function(){return lr});async function er(...e){return(await $n).default(...e)}var tr=async e=>{let t=await e.getFile();return t.handle=e,t},nr={__proto__:null,default:async(e=[{}])=>{Array.isArray(e)||(e=[e]);let t=[];e.forEach((e,n)=>{t[n]={description:e.description||`Files`,accept:{}},e.mimeTypes?e.mimeTypes.map(r=>{t[n].accept[r]=e.extensions||[]}):t[n].accept[`*/*`]=e.extensions||[]});let n=await window.showOpenFilePicker({id:e[0].id,startIn:e[0].startIn,types:t,multiple:e[0].multiple||!1,excludeAcceptAllOption:e[0].excludeAcceptAllOption||!1}),r=await Promise.all(n.map(tr));return e[0].multiple?r:r[0]}};function rr(e){function t(e){if(Object(e)!==e)return Promise.reject(TypeError(e+` is not an object.`));var t=e.done;return Promise.resolve(e.value).then(function(e){return{value:e,done:t}})}return rr=function(e){this.s=e,this.n=e.next},rr.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return n===void 0?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return n===void 0?Promise.reject(e):t(n.apply(this.s,arguments))}},new rr(e)}var ir=async(e,t,n=e.name,r)=>{let i=[],a=[];var o,s=!1,c=!1;try{for(var l,u=function(e){var t,n,r,i=2;for(typeof Symbol<`u`&&(n=Symbol.asyncIterator,r=Symbol.iterator);i--;){if(n&&(t=e[n])!=null)return t.call(e);if(r&&(t=e[r])!=null)return new rr(t.call(e));n=`@@asyncIterator`,r=`@@iterator`}throw TypeError(`Object is not async iterable`)}(e.values());s=!(l=await u.next()).done;s=!1){let o=l.value,s=`${n}/${o.name}`;o.kind===`file`?a.push(o.getFile().then(t=>(t.directoryHandle=e,t.handle=o,Object.defineProperty(t,"webkitRelativePath",{configurable:!0,enumerable:!0,get:()=>s})))):o.kind!==`directory`||!t||r&&r(o)||i.push(ir(o,t,s,r))}}catch(e){c=!0,o=e}finally{try{s&&u.return!=null&&await u.return()}finally{if(c)throw o}}return[...(await Promise.all(i)).flat(),...await Promise.all(a)]},ar={__proto__:null,default:async(e={})=>{e.recursive=e.recursive||!1,e.mode=e.mode||`read`;let t=await window.showDirectoryPicker({id:e.id,startIn:e.startIn,mode:e.mode});return(await(await t.values()).next()).done?[t]:ir(t,e.recursive,void 0,e.skipDirectory)}},or={__proto__:null,default:async(e,t=[{}],n=null,r=!1,i=null)=>{Array.isArray(t)||(t=[t]),t[0].fileName=t[0].fileName||`Untitled`;let a=[],o=null;if(e instanceof Blob&&e.type?o=e.type:e.headers&&e.headers.get(`content-type`)&&(o=e.headers.get(`content-type`)),t.forEach((e,t)=>{a[t]={description:e.description||`Files`,accept:{}},e.mimeTypes?(t===0&&o&&e.mimeTypes.push(o),e.mimeTypes.map(n=>{a[t].accept[n]=e.extensions||[]})):o?a[t].accept[o]=e.extensions||[]:a[t].accept[`*/*`]=e.extensions||[]}),n)try{await n.getFile()}catch(e){if(n=null,r)throw e}let s=n||await window.showSaveFilePicker({suggestedName:t[0].fileName,id:t[0].id,startIn:t[0].startIn,types:a,excludeAcceptAllOption:t[0].excludeAcceptAllOption||!1});!n&&i&&i(s);let c=await s.createWritable();return`stream`in e?(await e.stream().pipeTo(c),s):`body`in e?(await e.body.pipeTo(c),s):(await c.write(await e),await c.close(),s)}},sr={__proto__:null,default:async(e=[{}])=>(Array.isArray(e)||(e=[e]),new Promise((t,n)=>{let r=document.createElement(`input`);r.type=`file`;let i=[...e.map(e=>e.mimeTypes||[]),...e.map(e=>e.extensions||[])].join();r.multiple=e[0].multiple||!1,r.accept=i||``,r.style.display=`none`,document.body.append(r),r.addEventListener(`cancel`,()=>{r.remove(),n(new DOMException(`The user aborted a request.`,`AbortError`))}),r.addEventListener(`change`,()=>{r.remove(),t(r.multiple?Array.from(r.files):r.files[0])}),`showPicker`in HTMLInputElement.prototype?r.showPicker():r.click()}))},cr={__proto__:null,default:async(e=[{}])=>(Array.isArray(e)||(e=[e]),e[0].recursive=e[0].recursive||!1,new Promise((t,n)=>{let r=document.createElement(`input`);r.type=`file`,r.webkitdirectory=!0,r.style.display=`none`,document.body.append(r),r.addEventListener(`cancel`,()=>{r.remove(),n(new DOMException(`The user aborted a request.`,`AbortError`))}),r.addEventListener(`change`,()=>{r.remove();let n=Array.from(r.files);e[0].recursive?e[0].recursive&&e[0].skipDirectory&&(n=n.filter(t=>t.webkitRelativePath.split(`/`).every(t=>!e[0].skipDirectory({name:t,kind:`directory`})))):n=n.filter(e=>e.webkitRelativePath.split(`/`).length===2),t(n)}),`showPicker`in HTMLInputElement.prototype?r.showPicker():r.click()}))},lr={__proto__:null,default:async(e,t={})=>{Array.isArray(t)&&(t=t[0]);let n=document.createElement(`a`),r=e;`body`in e&&(r=await async function(e,t){let n=e.getReader(),r=new ReadableStream({start:e=>async function t(){return n.read().then(({done:n,value:r})=>{if(!n)return e.enqueue(r),t();e.close()})}()}),i=await new Response(r).blob();return n.releaseLock(),new Blob([i],{type:t})}(e.body,e.headers.get(`content-type`))),n.download=t.fileName||`Untitled`,n.href=URL.createObjectURL(await r);let i=()=>{typeof a==`function`&&a()},a=t.legacySetup&&t.legacySetup(i,()=>a(),n);return n.addEventListener(`click`,()=>{setTimeout(()=>URL.revokeObjectURL(n.href),3e4),i()}),n.click(),null}},ur=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),dr=s(((e,t)=>{t.exports=ur()})),fr=s(((e,t)=>{(function(n){typeof e==`object`&&t!==void 0?t.exports=n():typeof define==`function`&&define.amd?define([],n):(typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:this).JSZip=n()})(function(){return function e(t,n,r){function i(o,s){if(!n[o]){if(!t[o]){var c=typeof f==`function`&&f;if(!s&&c)return c(o,!0);if(a)return a(o,!0);var l=Error(`Cannot find module '`+o+`'`);throw l.code=`MODULE_NOT_FOUND`,l}var u=n[o]={exports:{}};t[o][0].call(u.exports,function(e){var n=t[o][1][e];return i(n||e)},u,u.exports,e,t,n,r)}return n[o].exports}for(var a=typeof f==`function`&&f,o=0;o<r.length;o++)i(r[o]);return i}({1:[function(e,t,n){var r=e(`./utils`),i=e(`./support`),a=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=`;n.encode=function(e){for(var t,n,i,o,s,c,l,u=[],d=0,f=e.length,p=f,m=r.getTypeOf(e)!==`string`;d<e.length;)p=f-d,i=m?(t=e[d++],n=d<f?e[d++]:0,d<f?e[d++]:0):(t=e.charCodeAt(d++),n=d<f?e.charCodeAt(d++):0,d<f?e.charCodeAt(d++):0),o=t>>2,s=(3&t)<<4|n>>4,c=1<p?(15&n)<<2|i>>6:64,l=2<p?63&i:64,u.push(a.charAt(o)+a.charAt(s)+a.charAt(c)+a.charAt(l));return u.join(``)},n.decode=function(e){var t,n,r,o,s,c,l=0,u=0,d=`data:`;if(e.substr(0,d.length)===d)throw Error(`Invalid base64 input, it looks like a data url.`);var f,p=3*(e=e.replace(/[^A-Za-z0-9+/=]/g,``)).length/4;if(e.charAt(e.length-1)===a.charAt(64)&&p--,e.charAt(e.length-2)===a.charAt(64)&&p--,p%1!=0)throw Error(`Invalid base64 input, bad content length.`);for(f=i.uint8array?new Uint8Array(0|p):Array(0|p);l<e.length;)t=a.indexOf(e.charAt(l++))<<2|(o=a.indexOf(e.charAt(l++)))>>4,n=(15&o)<<4|(s=a.indexOf(e.charAt(l++)))>>2,r=(3&s)<<6|(c=a.indexOf(e.charAt(l++))),f[u++]=t,s!==64&&(f[u++]=n),c!==64&&(f[u++]=r);return f}},{"./support":30,"./utils":32}],2:[function(e,t,n){var r=e(`./external`),i=e(`./stream/DataWorker`),a=e(`./stream/Crc32Probe`),o=e(`./stream/DataLengthProbe`);function s(e,t,n,r,i){this.compressedSize=e,this.uncompressedSize=t,this.crc32=n,this.compression=r,this.compressedContent=i}s.prototype={getContentWorker:function(){var e=new i(r.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new o(`data_length`)),t=this;return e.on(`end`,function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw Error(`Bug : uncompressed data size mismatch`)}),e},getCompressedWorker:function(){return new i(r.Promise.resolve(this.compressedContent)).withStreamInfo(`compressedSize`,this.compressedSize).withStreamInfo(`uncompressedSize`,this.uncompressedSize).withStreamInfo(`crc32`,this.crc32).withStreamInfo(`compression`,this.compression)}},s.createWorkerFrom=function(e,t,n){return e.pipe(new a).pipe(new o(`uncompressedSize`)).pipe(t.compressWorker(n)).pipe(new o(`compressedSize`)).withStreamInfo(`compression`,t)},t.exports=s},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,n){var r=e(`./stream/GenericWorker`);n.STORE={magic:`\0\0`,compressWorker:function(){return new r(`STORE compression`)},uncompressWorker:function(){return new r(`STORE decompression`)}},n.DEFLATE=e(`./flate`)},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,t,n){var r=e(`./utils`),i=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t){return e!==void 0&&e.length?r.getTypeOf(e)===`string`?function(e,t,n,r){var a=i,o=r+n;e^=-1;for(var s=r;s<o;s++)e=e>>>8^a[255&(e^t.charCodeAt(s))];return-1^e}(0|t,e,e.length,0):function(e,t,n,r){var a=i,o=r+n;e^=-1;for(var s=r;s<o;s++)e=e>>>8^a[255&(e^t[s])];return-1^e}(0|t,e,e.length,0):0}},{"./utils":32}],5:[function(e,t,n){n.base64=!1,n.binary=!1,n.dir=!1,n.createFolders=!0,n.date=null,n.compression=null,n.compressionOptions=null,n.comment=null,n.unixPermissions=null,n.dosPermissions=null},{}],6:[function(e,t,n){var r=null;r=typeof Promise<`u`?Promise:e(`lie`),t.exports={Promise:r}},{lie:37}],7:[function(e,t,n){var r=typeof Uint8Array<`u`&&typeof Uint16Array<`u`&&typeof Uint32Array<`u`,i=e(`pako`),a=e(`./utils`),o=e(`./stream/GenericWorker`),s=r?`uint8array`:`array`;function c(e,t){o.call(this,`FlateWorker/`+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}n.magic=`\b\0`,a.inherits(c,o),c.prototype.processChunk=function(e){this.meta=e.meta,this._pako===null&&this._createPako(),this._pako.push(a.transformTo(s,e.data),!1)},c.prototype.flush=function(){o.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},c.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this._pako=null},c.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}},n.compressWorker=function(e){return new c(`Deflate`,e)},n.uncompressWorker=function(){return new c(`Inflate`,{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t,n){function r(e,t){var n,r=``;for(n=0;n<t;n++)r+=String.fromCharCode(255&e),e>>>=8;return r}function i(e,t,n,i,o,u){var d,f,p=e.file,m=e.compression,h=u!==s.utf8encode,g=a.transformTo(`string`,u(p.name)),_=a.transformTo(`string`,s.utf8encode(p.name)),v=p.comment,y=a.transformTo(`string`,u(v)),b=a.transformTo(`string`,s.utf8encode(v)),x=_.length!==p.name.length,S=b.length!==v.length,C=``,w=``,T=``,E=p.dir,D=p.date,O={crc32:0,compressedSize:0,uncompressedSize:0};t&&!n||(O.crc32=e.crc32,O.compressedSize=e.compressedSize,O.uncompressedSize=e.uncompressedSize);var k=0;t&&(k|=8),h||!x&&!S||(k|=2048);var A=0,j=0;E&&(A|=16),o===`UNIX`?(j=798,A|=function(e,t){var n=e;return e||(n=t?16893:33204),(65535&n)<<16}(p.unixPermissions,E)):(j=20,A|=function(e){return 63&(e||0)}(p.dosPermissions)),d=D.getUTCHours(),d<<=6,d|=D.getUTCMinutes(),d<<=5,d|=D.getUTCSeconds()/2,f=D.getUTCFullYear()-1980,f<<=4,f|=D.getUTCMonth()+1,f<<=5,f|=D.getUTCDate(),x&&(w=r(1,1)+r(c(g),4)+_,C+=`up`+r(w.length,2)+w),S&&(T=r(1,1)+r(c(y),4)+b,C+=`uc`+r(T.length,2)+T);var M=``;return M+=`
13
+ `},_e={onDragStart(e){let{active:t}=e;return`Picked up draggable item `+t.id+`.`},onDragOver(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was moved over droppable area `+n.id+`.`:`Draggable item `+t.id+` is no longer over a droppable area.`},onDragEnd(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was dropped over droppable area `+n.id:`Draggable item `+t.id+` was dropped.`},onDragCancel(e){let{active:t}=e;return`Dragging was cancelled. Draggable item `+t.id+` was dropped.`}};function ve(e){let{announcements:t=_e,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=ge}=e,{announce:a,announcement:o}=fe(),s=z(`DndLiveRegion`),[c,l]=(0,C.useState)(!1);if((0,C.useEffect)(()=>{l(!0)},[]),me((0,C.useMemo)(()=>({onDragStart(e){let{active:n}=e;a(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&a(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;a(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;a(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;a(t.onDragCancel({active:n,over:r}))}}),[a,t])),!c)return null;let u=C.createElement(C.Fragment,null,C.createElement(ue,{id:r,value:i.draggable}),C.createElement(de,{id:s,announcement:o}));return n?(0,x.createPortal)(u,n):u}var ye;(function(e){e.DragStart=`dragStart`,e.DragMove=`dragMove`,e.DragEnd=`dragEnd`,e.DragCancel=`dragCancel`,e.DragOver=`dragOver`,e.RegisterDroppable=`registerDroppable`,e.SetDroppableDisabled=`setDroppableDisabled`,e.UnregisterDroppable=`unregisterDroppable`})(ye||={});function be(){}function xe(e,t){return(0,C.useMemo)(()=>({sensor:e,options:t??{}}),[e,t])}function Se(){var e=[...arguments];return(0,C.useMemo)(()=>[...e].filter(e=>e!=null),[...e])}var Ce=Object.freeze({x:0,y:0});function we(e,t){return Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2)}function Te(e,t){let n=ae(e);if(!n)return`0 0`;let r={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return r.x+`% `+r.y+`%`}function Ee(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function De(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function Oe(e,t){if(!e||e.length===0)return null;let[n]=e;return t?n[t]:n}function ke(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}var Ae=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=ke(t,t.left,t.top),a=[];for(let e of r){let{id:t}=e,r=n.get(t);if(r){let n=we(ke(r),i);a.push({id:t,data:{droppableContainer:e,value:n}})}}return a.sort(Ee)};function je(e,t){let n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),o=i-r,s=a-n;if(r<i&&n<a){let n=t.width*t.height,r=e.width*e.height,i=o*s,a=i/(n+r-i);return Number(a.toFixed(4))}return 0}var Me=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=[];for(let e of r){let{id:r}=e,a=n.get(r);if(a){let n=je(a,t);n>0&&i.push({id:r,data:{droppableContainer:e,value:n}})}}return i.sort(De)};function Ne(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function Pe(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Ce}function Fe(e){return function(t){return[...arguments].slice(1).reduce((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x}),{...t})}}var Ie=Fe(1);function Le(e){if(e.startsWith(`matrix3d(`)){let t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith(`matrix(`)){let t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function Re(e,t,n){let r=Le(t);if(!r)return e;let{scaleX:i,scaleY:a,x:o,y:s}=r,c=e.left-o-(1-i)*parseFloat(n),l=e.top-s-(1-a)*parseFloat(n.slice(n.indexOf(` `)+1)),u=i?e.width/i:e.width,d=a?e.height/a:e.height;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c}}var ze={ignoreTransform:!1};function Be(e,t){t===void 0&&(t=ze);let n=e.getBoundingClientRect();if(t.ignoreTransform){let{transform:t,transformOrigin:r}=D(e).getComputedStyle(e);t&&(n=Re(n,t,r))}let{top:r,left:i,width:a,height:o,bottom:s,right:c}=n;return{top:r,left:i,width:a,height:o,bottom:s,right:c}}function Ve(e){return Be(e,{ignoreTransform:!0})}function He(e){let t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function Ue(e,t){return t===void 0&&(t=D(e).getComputedStyle(e)),t.position===`fixed`}function We(e,t){t===void 0&&(t=D(e).getComputedStyle(e));let n=/(auto|scroll|overlay)/;return[`overflow`,`overflowX`,`overflowY`].some(e=>{let r=t[e];return typeof r==`string`&&n.test(r)})}function Ge(e,t){let n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(O(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!k(i)||A(i)||n.includes(i))return n;let a=D(e).getComputedStyle(i);return i!==e&&We(i,a)&&n.push(i),Ue(i,a)?n:r(i.parentNode)}return e?r(e):n}function Ke(e){let[t]=Ge(e,1);return t??null}function qe(e){return!w||!e?null:T(e)?e:E(e)?O(e)||e===j(e).scrollingElement?window:k(e)?e:null:null}function Je(e){return T(e)?e.scrollX:e.scrollLeft}function Ye(e){return T(e)?e.scrollY:e.scrollTop}function Xe(e){return{x:Je(e),y:Ye(e)}}var Ze;(function(e){e[e.Forward=1]=`Forward`,e[e.Backward=-1]=`Backward`})(Ze||={});function Qe(e){return!w||!e?!1:e===document.scrollingElement}function $e(e){let t={x:0,y:0},n=Qe(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}var et={x:.2,y:.2};function tt(e,t,n,r,i){let{top:a,left:o,right:s,bottom:c}=n;r===void 0&&(r=10),i===void 0&&(i=et);let{isTop:l,isBottom:u,isLeft:d,isRight:f}=$e(e),p={x:0,y:0},m={x:0,y:0},h={height:t.height*i.y,width:t.width*i.x};return!l&&a<=t.top+h.height?(p.y=Ze.Backward,m.y=r*Math.abs((t.top+h.height-a)/h.height)):!u&&c>=t.bottom-h.height&&(p.y=Ze.Forward,m.y=r*Math.abs((t.bottom-h.height-c)/h.height)),!f&&s>=t.right-h.width?(p.x=Ze.Forward,m.x=r*Math.abs((t.right-h.width-s)/h.width)):!d&&o<=t.left+h.width&&(p.x=Ze.Backward,m.x=r*Math.abs((t.left+h.width-o)/h.width)),{direction:p,speed:m}}function nt(e){if(e===document.scrollingElement){let{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}let{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function rt(e){return e.reduce((e,t)=>B(e,Xe(t)),Ce)}function it(e){return e.reduce((e,t)=>e+Je(t),0)}function at(e){return e.reduce((e,t)=>e+Ye(t),0)}function ot(e,t){if(t===void 0&&(t=Be),!e)return;let{top:n,left:r,bottom:i,right:a}=t(e);Ke(e)&&(i<=0||a<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:`center`,inline:`center`})}var st=[[`x`,[`left`,`right`],it],[`y`,[`top`,`bottom`],at]],ct=class{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;let n=Ge(t),r=rt(n);this.rect={...e},this.width=e.width,this.height=e.height;for(let[e,t,i]of st)for(let a of t)Object.defineProperty(this,a,{get:()=>{let t=i(n),o=r[e]-t;return this.rect[a]+o},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}},lt=class{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>this.target?.removeEventListener(...e))},this.target=e}add(e,t,n){var r;(r=this.target)==null||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}};function ut(e){let{EventTarget:t}=D(e);return e instanceof t?e:j(e)}function dt(e,t){let n=Math.abs(e.x),r=Math.abs(e.y);return typeof t==`number`?Math.sqrt(n**2+r**2)>t:`x`in t&&`y`in t?n>t.x&&r>t.y:`x`in t?n>t.x:`y`in t&&r>t.y}var ft;(function(e){e.Click=`click`,e.DragStart=`dragstart`,e.Keydown=`keydown`,e.ContextMenu=`contextmenu`,e.Resize=`resize`,e.SelectionChange=`selectionchange`,e.VisibilityChange=`visibilitychange`})(ft||={});function pt(e){e.preventDefault()}function mt(e){e.stopPropagation()}var H;(function(e){e.Space=`Space`,e.Down=`ArrowDown`,e.Right=`ArrowRight`,e.Left=`ArrowLeft`,e.Up=`ArrowUp`,e.Esc=`Escape`,e.Enter=`Enter`,e.Tab=`Tab`})(H||={});var ht={start:[H.Space,H.Enter],cancel:[H.Esc],end:[H.Space,H.Enter,H.Tab]},gt=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case H.Right:return{...n,x:n.x+25};case H.Left:return{...n,x:n.x-25};case H.Down:return{...n,y:n.y+25};case H.Up:return{...n,y:n.y-25}}},_t=class{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;let{event:{target:t}}=e;this.props=e,this.listeners=new lt(j(t)),this.windowListeners=new lt(D(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(ft.Resize,this.handleCancel),this.windowListeners.add(ft.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(ft.Keydown,this.handleKeyDown))}handleStart(){let{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&ot(n),t(Ce)}handleKeyDown(e){if(re(e)){let{active:t,context:n,options:r}=this.props,{keyboardCodes:i=ht,coordinateGetter:a=gt,scrollBehavior:o=`smooth`}=r,{code:s}=e;if(i.end.includes(s)){this.handleEnd(e);return}if(i.cancel.includes(s)){this.handleCancel(e);return}let{collisionRect:c}=n.current,l=c?{x:c.left,y:c.top}:Ce;this.referenceCoordinates||=l;let u=a(e,{active:t,context:n.current,currentCoordinates:l});if(u){let t=V(u,l),r={x:0,y:0},{scrollableAncestors:i}=n.current;for(let n of i){let i=e.code,{isTop:a,isRight:s,isLeft:c,isBottom:l,maxScroll:d,minScroll:f}=$e(n),p=nt(n),m={x:Math.min(i===H.Right?p.right-p.width/2:p.right,Math.max(i===H.Right?p.left:p.left+p.width/2,u.x)),y:Math.min(i===H.Down?p.bottom-p.height/2:p.bottom,Math.max(i===H.Down?p.top:p.top+p.height/2,u.y))},h=i===H.Right&&!s||i===H.Left&&!c,g=i===H.Down&&!l||i===H.Up&&!a;if(h&&m.x!==u.x){let e=n.scrollLeft+t.x,a=i===H.Right&&e<=d.x||i===H.Left&&e>=f.x;if(a&&!t.y){n.scrollTo({left:e,behavior:o});return}r.x=a?n.scrollLeft-e:i===H.Right?n.scrollLeft-d.x:n.scrollLeft-f.x,r.x&&n.scrollBy({left:-r.x,behavior:o});break}if(g&&m.y!==u.y){let e=n.scrollTop+t.y,a=i===H.Down&&e<=d.y||i===H.Up&&e>=f.y;if(a&&!t.x){n.scrollTo({top:e,behavior:o});return}r.y=a?n.scrollTop-e:i===H.Down?n.scrollTop-d.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:o});break}}this.handleMove(e,B(V(u,this.referenceCoordinates),r))}}}handleMove(e,t){let{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){let{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){let{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}};_t.activators=[{eventName:`onKeyDown`,handler:(e,t,n)=>{let{keyboardCodes:r=ht,onActivation:i}=t,{active:a}=n,{code:o}=e.nativeEvent;if(r.start.includes(o)){let t=a.activatorNode.current;return t&&e.target!==t?!1:(e.preventDefault(),i?.({event:e.nativeEvent}),!0)}return!1}}];function vt(e){return!!(e&&`distance`in e)}function yt(e){return!!(e&&`delay`in e)}var bt=class{constructor(e,t,n){n===void 0&&(n=ut(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;let{event:r}=e,{target:i}=r;this.props=e,this.events=t,this.document=j(i),this.documentListeners=new lt(this.document),this.listeners=new lt(n),this.windowListeners=new lt(D(i)),this.initialCoordinates=ae(r)??Ce,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){let{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(ft.Resize,this.handleCancel),this.windowListeners.add(ft.DragStart,pt),this.windowListeners.add(ft.VisibilityChange,this.handleCancel),this.windowListeners.add(ft.ContextMenu,pt),this.documentListeners.add(ft.Keydown,this.handleKeydown),t){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(yt(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(vt(t)){this.handlePending(t);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){let{active:n,onPending:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){let{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(ft.Click,mt,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(ft.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){let{activated:t,initialCoordinates:n,props:r}=this,{onMove:i,options:{activationConstraint:a}}=r;if(!n)return;let o=ae(e)??Ce,s=V(n,o);if(!t&&a){if(vt(a)){if(a.tolerance!=null&&dt(s,a.tolerance))return this.handleCancel();if(dt(s,a.distance))return this.handleStart()}if(yt(a)&&dt(s,a.tolerance))return this.handleCancel();this.handlePending(a,s);return}e.cancelable&&e.preventDefault(),i(o)}handleEnd(){let{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){let{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===H.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}},xt={cancel:{name:`pointercancel`},move:{name:`pointermove`},end:{name:`pointerup`}},St=class extends bt{constructor(e){let{event:t}=e,n=j(t.target);super(e,xt,n)}};St.activators=[{eventName:`onPointerDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];var Ct={move:{name:`mousemove`},end:{name:`mouseup`}},wt;(function(e){e[e.RightClick=2]=`RightClick`})(wt||={});var Tt=class extends bt{constructor(e){super(e,Ct,j(e.event.target))}};Tt.activators=[{eventName:`onMouseDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==wt.RightClick&&(r?.({event:n}),!0)}}];var Et={cancel:{name:`touchcancel`},move:{name:`touchmove`},end:{name:`touchend`}},Dt=class extends bt{constructor(e){super(e,Et)}static setup(){return window.addEventListener(Et.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(Et.move.name,e)};function e(){}}};Dt.activators=[{eventName:`onTouchStart`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t,{touches:i}=n;return i.length>1?!1:(r?.({event:n}),!0)}}];var Ot;(function(e){e[e.Pointer=0]=`Pointer`,e[e.DraggableRect=1]=`DraggableRect`})(Ot||={});var kt;(function(e){e[e.TreeOrder=0]=`TreeOrder`,e[e.ReversedTreeOrder=1]=`ReversedTreeOrder`})(kt||={});function At(e){let{acceleration:t,activator:n=Ot.Pointer,canScroll:r,draggingRect:i,enabled:a,interval:o=5,order:s=kt.TreeOrder,pointerCoordinates:c,scrollableAncestors:l,scrollableAncestorRects:u,delta:d,threshold:f}=e,p=Mt({delta:d,disabled:!a}),[m,h]=ee(),g=(0,C.useRef)({x:0,y:0}),_=(0,C.useRef)({x:0,y:0}),v=(0,C.useMemo)(()=>{switch(n){case Ot.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case Ot.DraggableRect:return i}},[n,i,c]),y=(0,C.useRef)(null),b=(0,C.useCallback)(()=>{let e=y.current;if(!e)return;let t=g.current.x*_.current.x,n=g.current.y*_.current.y;e.scrollBy(t,n)},[]),x=(0,C.useMemo)(()=>s===kt.TreeOrder?[...l].reverse():l,[s,l]);(0,C.useEffect)(()=>{if(!a||!l.length||!v){h();return}for(let e of x){if(r?.(e)===!1)continue;let n=l.indexOf(e),i=u[n];if(!i)continue;let{direction:a,speed:s}=tt(e,i,v,t,f);for(let e of[`x`,`y`])p[e][a[e]]||(s[e]=0,a[e]=0);if(s.x>0||s.y>0){h(),y.current=e,m(b,o),g.current=s,_.current=a;return}}g.current={x:0,y:0},_.current={x:0,y:0},h()},[t,b,r,h,a,o,JSON.stringify(v),JSON.stringify(p),m,l,x,u,JSON.stringify(f)])}var jt={x:{[Ze.Backward]:!1,[Ze.Forward]:!1},y:{[Ze.Backward]:!1,[Ze.Forward]:!1}};function Mt(e){let{delta:t,disabled:n}=e,r=L(t);return F(e=>{if(n||!r||!e)return jt;let i={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[Ze.Backward]:e.x[Ze.Backward]||i.x===-1,[Ze.Forward]:e.x[Ze.Forward]||i.x===1},y:{[Ze.Backward]:e.y[Ze.Backward]||i.y===-1,[Ze.Forward]:e.y[Ze.Forward]||i.y===1}}},[n,t,r])}function Nt(e,t){let n=t==null?void 0:e.get(t),r=n?n.node.current:null;return F(e=>t==null?null:r??e??null,[r,t])}function Pt(e,t){return(0,C.useMemo)(()=>e.reduce((e,n)=>{let{sensor:r}=n,i=r.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,n)}));return[...e,...i]},[]),[e,t])}var Ft;(function(e){e[e.Always=0]=`Always`,e[e.BeforeDragging=1]=`BeforeDragging`,e[e.WhileDragging=2]=`WhileDragging`})(Ft||={});var It;(function(e){e.Optimized=`optimized`})(It||={});var Lt=new Map;function Rt(e,t){let{dragging:n,dependencies:r,config:i}=t,[a,o]=(0,C.useState)(null),{frequency:s,measure:c,strategy:l}=i,u=(0,C.useRef)(e),d=g(),f=P(d),p=(0,C.useCallback)(function(e){e===void 0&&(e=[]),!f.current&&o(t=>t===null?e:t.concat(e.filter(e=>!t.includes(e))))},[f]),m=(0,C.useRef)(null),h=F(t=>{if(d&&!n)return Lt;if(!t||t===Lt||u.current!==e||a!=null){let t=new Map;for(let n of e){if(!n)continue;if(a&&a.length>0&&!a.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}let e=n.node.current,r=e?new ct(c(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t},[e,a,n,d,c]);return(0,C.useEffect)(()=>{u.current=e},[e]),(0,C.useEffect)(()=>{d||p()},[n,d]),(0,C.useEffect)(()=>{a&&a.length>0&&o(null)},[JSON.stringify(a)]),(0,C.useEffect)(()=>{d||typeof s!=`number`||m.current!==null||(m.current=setTimeout(()=>{p(),m.current=null},s))},[s,d,p,...r]),{droppableRects:h,measureDroppableContainers:p,measuringScheduled:a!=null};function g(){switch(l){case Ft.Always:return!1;case Ft.BeforeDragging:return n;default:return!n}}}function zt(e,t){return F(n=>e?n||(typeof t==`function`?t(e):e):null,[t,e])}function Bt(e,t){return zt(e,t)}function Vt(e){let{callback:t,disabled:n}=e,r=N(t),i=(0,C.useMemo)(()=>{if(n||typeof window>`u`||window.MutationObserver===void 0)return;let{MutationObserver:e}=window;return new e(r)},[r,n]);return(0,C.useEffect)(()=>()=>i?.disconnect(),[i]),i}function Ht(e){let{callback:t,disabled:n}=e,r=N(t),i=(0,C.useMemo)(()=>{if(n||typeof window>`u`||window.ResizeObserver===void 0)return;let{ResizeObserver:e}=window;return new e(r)},[n]);return(0,C.useEffect)(()=>()=>i?.disconnect(),[i]),i}function Ut(e){return new ct(Be(e),e)}function Wt(e,t,n){t===void 0&&(t=Ut);let[r,i]=(0,C.useState)(null);function a(){i(r=>{if(!e)return null;if(e.isConnected===!1)return r??n??null;let i=t(e);return JSON.stringify(r)===JSON.stringify(i)?r:i})}let o=Vt({callback(t){if(e)for(let n of t){let{type:t,target:r}=n;if(t===`childList`&&r instanceof HTMLElement&&r.contains(e)){a();break}}}}),s=Ht({callback:a});return M(()=>{a(),e?(s?.observe(e),o?.observe(document.body,{childList:!0,subtree:!0})):(s?.disconnect(),o?.disconnect())},[e]),r}function Gt(e){return Pe(e,zt(e))}var Kt=[];function qt(e){let t=(0,C.useRef)(e),n=F(n=>e?n&&n!==Kt&&e&&t.current&&e.parentNode===t.current.parentNode?n:Ge(e):Kt,[e]);return(0,C.useEffect)(()=>{t.current=e},[e]),n}function Jt(e){let[t,n]=(0,C.useState)(null),r=(0,C.useRef)(e),i=(0,C.useCallback)(e=>{let t=qe(e.target);t&&n(e=>e?(e.set(t,Xe(t)),new Map(e)):null)},[]);return(0,C.useEffect)(()=>{let t=r.current;if(e!==t){a(t);let o=e.map(e=>{let t=qe(e);return t?(t.addEventListener(`scroll`,i,{passive:!0}),[t,Xe(t)]):null}).filter(e=>e!=null);n(o.length?new Map(o):null),r.current=e}return()=>{a(e),a(t)};function a(e){e.forEach(e=>{qe(e)?.removeEventListener(`scroll`,i)})}},[i,e]),(0,C.useMemo)(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>B(e,t),Ce):rt(e):Ce,[e,t])}function Yt(e,t){t===void 0&&(t=[]);let n=(0,C.useRef)(null);return(0,C.useEffect)(()=>{n.current=null},t),(0,C.useEffect)(()=>{let t=e!==Ce;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?V(e,n.current):Ce}function Xt(e){(0,C.useEffect)(()=>{if(!w)return;let t=e.map(e=>{let{sensor:t}=e;return t.setup==null?void 0:t.setup()});return()=>{for(let e of t)e?.()}},e.map(e=>{let{sensor:t}=e;return t}))}function Zt(e,t){return(0,C.useMemo)(()=>e.reduce((e,n)=>{let{eventName:r,handler:i}=n;return e[r]=e=>{i(e,t)},e},{}),[e,t])}function Qt(e){return(0,C.useMemo)(()=>e?He(e):null,[e])}var $t=[];function en(e,t){t===void 0&&(t=Be);let[n]=e,r=Qt(n?D(n):null),[i,a]=(0,C.useState)($t);function o(){a(()=>e.length?e.map(e=>Qe(e)?r:new ct(t(e),e)):$t)}let s=Ht({callback:o});return M(()=>{s?.disconnect(),o(),e.forEach(e=>s?.observe(e))},[e]),i}function tn(e){if(!e)return null;if(e.children.length>1)return e;let t=e.children[0];return k(t)?t:e}function nn(e){let{measure:t}=e,[n,r]=(0,C.useState)(null),i=Ht({callback:(0,C.useCallback)(e=>{for(let{target:n}of e)if(k(n)){r(e=>{let r=t(n);return e?{...e,width:r.width,height:r.height}:r});break}},[t])}),[a,o]=I((0,C.useCallback)(e=>{let n=tn(e);i?.disconnect(),n&&i?.observe(n),r(n?t(n):null)},[t,i]));return(0,C.useMemo)(()=>({nodeRef:a,rect:n,setRef:o}),[n,a,o])}var rn=[{sensor:St,options:{}},{sensor:_t,options:{}}],an={current:{}},on={draggable:{measure:Ve},droppable:{measure:Ve,strategy:Ft.WhileDragging,frequency:It.Optimized},dragOverlay:{measure:Be}},sn=class extends Map{get(e){return e==null?void 0:super.get(e)??void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){return this.get(e)?.node.current??void 0}},cn={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new sn,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:be},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:on,measureDroppableContainers:be,windowRect:null,measuringScheduled:!1},ln={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:``},dispatch:be,draggableNodes:new Map,over:null,measureDroppableContainers:be},un=(0,C.createContext)(ln),dn=(0,C.createContext)(cn);function fn(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new sn}}}function pn(e,t){switch(t.type){case ye.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case ye.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case ye.DragEnd:case ye.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case ye.RegisterDroppable:{let{element:n}=t,{id:r}=n,i=new sn(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case ye.SetDroppableDisabled:{let{id:n,key:r,disabled:i}=t,a=e.droppable.containers.get(n);if(!a||r!==a.key)return e;let o=new sn(e.droppable.containers);return o.set(n,{...a,disabled:i}),{...e,droppable:{...e.droppable,containers:o}}}case ye.UnregisterDroppable:{let{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;let a=new sn(e.droppable.containers);return a.delete(n),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function mn(e){let{disabled:t}=e,{active:n,activatorEvent:r,draggableNodes:i}=(0,C.useContext)(un),a=L(r),o=L(n?.id);return(0,C.useEffect)(()=>{if(!t&&!r&&a&&o!=null){if(!re(a)||document.activeElement===a.target)return;let e=i.get(o);if(!e)return;let{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame(()=>{for(let e of[t.current,n.current]){if(!e)continue;let t=ce(e);if(t){t.focus();break}}})}},[r,t,i,o,a]),null}function hn(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((e,t)=>t({transform:e,...r}),n):n}function gn(e){return(0,C.useMemo)(()=>({draggable:{...on.draggable,...e?.draggable},droppable:{...on.droppable,...e?.droppable},dragOverlay:{...on.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function _n(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e,a=(0,C.useRef)(!1),{x:o,y:s}=typeof i==`boolean`?{x:i,y:i}:i;M(()=>{if(!o&&!s||!t){a.current=!1;return}if(a.current||!r)return;let e=t?.node.current;if(!e||e.isConnected===!1)return;let i=Pe(n(e),r);if(o||(i.x=0),s||(i.y=0),a.current=!0,Math.abs(i.x)>0||Math.abs(i.y)>0){let t=Ke(e);t&&t.scrollBy({top:i.y,left:i.x})}},[t,o,s,r,n])}var vn=(0,C.createContext)({...Ce,scaleX:1,scaleY:1}),yn;(function(e){e[e.Uninitialized=0]=`Uninitialized`,e[e.Initializing=1]=`Initializing`,e[e.Initialized=2]=`Initialized`})(yn||={});var bn=(0,C.memo)(function(e){let{id:t,accessibility:n,autoScroll:r=!0,children:i,sensors:a=rn,collisionDetection:o=Me,measuring:s,modifiers:c,...l}=e,[u,d]=(0,C.useReducer)(pn,void 0,fn),[f,p]=he(),[m,h]=(0,C.useState)(yn.Uninitialized),g=m===yn.Initialized,{draggable:{active:_,nodes:v,translate:y},droppable:{containers:b}}=u,S=_==null?null:v.get(_),w=(0,C.useRef)({initial:null,translated:null}),T=(0,C.useMemo)(()=>_==null?null:{id:_,data:S?.data??an,rect:w},[_,S]),E=(0,C.useRef)(null),[O,k]=(0,C.useState)(null),[A,j]=(0,C.useState)(null),N=P(l,Object.values(l)),ee=z(`DndDescribedBy`,t),F=(0,C.useMemo)(()=>b.getEnabled(),[b]),I=gn(s),{droppableRects:L,measureDroppableContainers:R,measuringScheduled:te}=Rt(F,{dragging:g,dependencies:[y.x,y.y],config:I.droppable}),V=Nt(v,_),ne=(0,C.useMemo)(()=>A?ae(A):null,[A]),re=Ue(),ie=Bt(V,I.draggable.measure);_n({activeNode:_==null?null:v.get(_),config:re.layoutShiftCompensation,initialRect:ie,measure:I.draggable.measure});let oe=Wt(V,I.draggable.measure,ie),se=Wt(V?V.parentElement:null),ce=(0,C.useRef)({activatorEvent:null,active:null,activeNode:V,collisionRect:null,collisions:null,droppableRects:L,draggableNodes:v,draggingNode:null,draggingNodeRect:null,droppableContainers:b,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),le=b.getNodeFor(ce.current.over?.id),ue=nn({measure:I.dragOverlay.measure}),de=ue.nodeRef.current??V,fe=g?ue.rect??oe:null,me=!!(ue.nodeRef.current&&ue.rect),ge=Gt(me?null:oe),_e=Qt(de?D(de):null),be=qt(g?le??V:null),xe=en(be),Se=hn(c,{transform:{x:y.x-ge.x,y:y.y-ge.y,scaleX:1,scaleY:1},activatorEvent:A,active:T,activeNodeRect:oe,containerNodeRect:se,draggingNodeRect:fe,over:ce.current.over,overlayNodeRect:ue.rect,scrollableAncestors:be,scrollableAncestorRects:xe,windowRect:_e}),Ce=ne?B(ne,y):null,we=Jt(be),Te=Yt(we),Ee=Yt(we,[oe]),De=B(Se,Te),ke=fe?Ie(fe,Se):null,Ae=T&&ke?o({active:T,collisionRect:ke,droppableRects:L,droppableContainers:F,pointerCoordinates:Ce}):null,je=Oe(Ae,`id`),[Pe,Fe]=(0,C.useState)(null),Le=Ne(me?Se:B(Se,Ee),Pe?.rect??null,oe),Re=(0,C.useRef)(null),ze=(0,C.useCallback)((e,t)=>{let{sensor:n,options:r}=t;if(E.current==null)return;let i=v.get(E.current);if(!i)return;let a=e.nativeEvent,o=new n({active:E.current,activeNode:i,event:a,options:r,context:ce,onAbort(e){if(!v.get(e))return;let{onDragAbort:t}=N.current,n={id:e};t?.(n),f({type:`onDragAbort`,event:n})},onPending(e,t,n,r){if(!v.get(e))return;let{onDragPending:i}=N.current,a={id:e,constraint:t,initialCoordinates:n,offset:r};i?.(a),f({type:`onDragPending`,event:a})},onStart(e){let t=E.current;if(t==null)return;let n=v.get(t);if(!n)return;let{onDragStart:r}=N.current,i={activatorEvent:a,active:{id:t,data:n.data,rect:w}};(0,x.unstable_batchedUpdates)(()=>{r?.(i),h(yn.Initializing),d({type:ye.DragStart,initialCoordinates:e,active:t}),f({type:`onDragStart`,event:i}),k(Re.current),j(a)})},onMove(e){d({type:ye.DragMove,coordinates:e})},onEnd:s(ye.DragEnd),onCancel:s(ye.DragCancel)});Re.current=o;function s(e){return async function(){let{active:t,collisions:n,over:r,scrollAdjustedTranslate:i}=ce.current,o=null;if(t&&i){let{cancelDrop:s}=N.current;o={activatorEvent:a,active:t,collisions:n,delta:i,over:r},e===ye.DragEnd&&typeof s==`function`&&await Promise.resolve(s(o))&&(e=ye.DragCancel)}E.current=null,(0,x.unstable_batchedUpdates)(()=>{d({type:e}),h(yn.Uninitialized),Fe(null),k(null),j(null),Re.current=null;let t=e===ye.DragEnd?`onDragEnd`:`onDragCancel`;if(o){let e=N.current[t];e?.(o),f({type:t,event:o})}})}}},[v]),Be=Pt(a,(0,C.useCallback)((e,t)=>(n,r)=>{let i=n.nativeEvent,a=v.get(r);if(E.current!==null||!a||i.dndKit||i.defaultPrevented)return;let o={active:a};e(n,t.options,o)===!0&&(i.dndKit={capturedBy:t.sensor},E.current=r,ze(n,t))},[v,ze]));Xt(a),M(()=>{oe&&m===yn.Initializing&&h(yn.Initialized)},[oe,m]),(0,C.useEffect)(()=>{let{onDragMove:e}=N.current,{active:t,activatorEvent:n,collisions:r,over:i}=ce.current;if(!t||!n)return;let a={active:t,activatorEvent:n,collisions:r,delta:{x:De.x,y:De.y},over:i};(0,x.unstable_batchedUpdates)(()=>{e?.(a),f({type:`onDragMove`,event:a})})},[De.x,De.y]),(0,C.useEffect)(()=>{let{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:i}=ce.current;if(!e||E.current==null||!t||!i)return;let{onDragOver:a}=N.current,o=r.get(je),s=o&&o.rect.current?{id:o.id,rect:o.rect.current,data:o.data,disabled:o.disabled}:null,c={active:e,activatorEvent:t,collisions:n,delta:{x:i.x,y:i.y},over:s};(0,x.unstable_batchedUpdates)(()=>{Fe(s),a?.(c),f({type:`onDragOver`,event:c})})},[je]),M(()=>{ce.current={activatorEvent:A,active:T,activeNode:V,collisionRect:ke,collisions:Ae,droppableRects:L,draggableNodes:v,draggingNode:de,draggingNodeRect:fe,droppableContainers:b,over:Pe,scrollableAncestors:be,scrollAdjustedTranslate:De},w.current={initial:fe,translated:ke}},[T,V,Ae,ke,v,de,fe,L,b,Pe,be,De]),At({...re,delta:y,draggingRect:ke,pointerCoordinates:Ce,scrollableAncestors:be,scrollableAncestorRects:xe});let Ve=(0,C.useMemo)(()=>({active:T,activeNode:V,activeNodeRect:oe,activatorEvent:A,collisions:Ae,containerNodeRect:se,dragOverlay:ue,draggableNodes:v,droppableContainers:b,droppableRects:L,over:Pe,measureDroppableContainers:R,scrollableAncestors:be,scrollableAncestorRects:xe,measuringConfiguration:I,measuringScheduled:te,windowRect:_e}),[T,V,oe,A,Ae,se,ue,v,b,L,Pe,R,be,xe,I,te,_e]),He=(0,C.useMemo)(()=>({activatorEvent:A,activators:Be,active:T,activeNodeRect:oe,ariaDescribedById:{draggable:ee},dispatch:d,draggableNodes:v,over:Pe,measureDroppableContainers:R}),[A,Be,T,oe,d,ee,v,Pe,R]);return C.createElement(pe.Provider,{value:p},C.createElement(un.Provider,{value:He},C.createElement(dn.Provider,{value:Ve},C.createElement(vn.Provider,{value:Le},i)),C.createElement(mn,{disabled:n?.restoreFocus===!1})),C.createElement(ve,{...n,hiddenTextDescribedById:ee}));function Ue(){let e=O?.autoScrollEnabled===!1,t=typeof r==`object`?r.enabled===!1:r===!1,n=g&&!e&&!t;return typeof r==`object`?{...r,enabled:n}:{enabled:n}}}),xn=(0,C.createContext)(null),Sn=`button`,Cn=`Draggable`;function wn(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e,a=z(Cn),{activators:o,activatorEvent:s,active:c,activeNodeRect:l,ariaDescribedById:u,draggableNodes:d,over:f}=(0,C.useContext)(un),{role:p=Sn,roleDescription:m=`draggable`,tabIndex:h=0}=i??{},g=c?.id===t,_=(0,C.useContext)(g?vn:xn),[v,y]=I(),[b,x]=I(),S=Zt(o,t),w=P(n);return M(()=>(d.set(t,{id:t,key:a,node:v,activatorNode:b,data:w}),()=>{let e=d.get(t);e&&e.key===a&&d.delete(t)}),[d,t]),{active:c,activatorEvent:s,activeNodeRect:l,attributes:(0,C.useMemo)(()=>({role:p,tabIndex:h,"aria-disabled":r,"aria-pressed":g&&p===Sn?!0:void 0,"aria-roledescription":m,"aria-describedby":u.draggable}),[r,p,h,g,m,u.draggable]),isDragging:g,listeners:r?void 0:S,node:v,over:f,setNodeRef:y,setActivatorNodeRef:x,transform:_}}function Tn(){return(0,C.useContext)(dn)}var En=`Droppable`,Dn={timeout:25};function On(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e,a=z(En),{active:o,dispatch:s,over:c,measureDroppableContainers:l}=(0,C.useContext)(un),u=(0,C.useRef)({disabled:n}),d=(0,C.useRef)(!1),f=(0,C.useRef)(null),p=(0,C.useRef)(null),{disabled:m,updateMeasurementsFor:h,timeout:g}={...Dn,...i},_=P(h??r),v=Ht({callback:(0,C.useCallback)(()=>{if(!d.current){d.current=!0;return}p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{l(Array.isArray(_.current)?_.current:[_.current]),p.current=null},g)},[g]),disabled:m||!o}),[y,b]=I((0,C.useCallback)((e,t)=>{v&&(t&&(v.unobserve(t),d.current=!1),e&&v.observe(e))},[v])),x=P(t);return(0,C.useEffect)(()=>{!v||!y.current||(v.disconnect(),d.current=!1,v.observe(y.current))},[y,v]),(0,C.useEffect)(()=>(s({type:ye.RegisterDroppable,element:{id:r,key:a,disabled:n,node:y,rect:f,data:x}}),()=>s({type:ye.UnregisterDroppable,key:a,id:r})),[r]),(0,C.useEffect)(()=>{n!==u.current.disabled&&(s({type:ye.SetDroppableDisabled,id:r,key:a,disabled:n}),u.current.disabled=n)},[r,a,n,s]),{active:o,rect:f,isOver:c?.id===r,node:y,over:c,setNodeRef:b}}function kn(e){let{animation:t,children:n}=e,[r,i]=(0,C.useState)(null),[a,o]=(0,C.useState)(null),s=L(n);return!n&&!r&&s&&i(s),M(()=>{if(!a)return;let e=r?.key,n=r?.props.id;if(e==null||n==null){i(null);return}Promise.resolve(t(n,a)).then(()=>{i(null)})},[t,r,a]),C.createElement(C.Fragment,null,n,r?(0,C.cloneElement)(r,{ref:o}):null)}var An={x:0,y:0,scaleX:1,scaleY:1};function jn(e){let{children:t}=e;return C.createElement(un.Provider,{value:ln},C.createElement(vn.Provider,{value:An},t))}var Mn={position:`fixed`,touchAction:`none`},Nn=e=>re(e)?`transform 250ms ease`:void 0,Pn=(0,C.forwardRef)((e,t)=>{let{as:n,activatorEvent:r,adjustScale:i,children:a,className:o,rect:s,style:c,transform:l,transition:u=Nn}=e;if(!s)return null;let d=i?l:{...l,scaleX:1,scaleY:1},f={...Mn,width:s.width,height:s.height,top:s.top,left:s.left,transform:oe.Transform.toString(d),transformOrigin:i&&r?Te(r,s):void 0,transition:typeof u==`function`?u(r):u,...c};return C.createElement(n,{className:o,style:f,ref:t},a)}),Fn={duration:250,easing:`ease`,keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:oe.Transform.toString(t)},{transform:oe.Transform.toString(n)}]},sideEffects:(e=>t=>{let{active:n,dragOverlay:r}=t,i={},{styles:a,className:o}=e;if(a!=null&&a.active)for(let[e,t]of Object.entries(a.active))t!==void 0&&(i[e]=n.node.style.getPropertyValue(e),n.node.style.setProperty(e,t));if(a!=null&&a.dragOverlay)for(let[e,t]of Object.entries(a.dragOverlay))t!==void 0&&r.node.style.setProperty(e,t);return o!=null&&o.active&&n.node.classList.add(o.active),o!=null&&o.dragOverlay&&r.node.classList.add(o.dragOverlay),function(){for(let[e,t]of Object.entries(i))n.node.style.setProperty(e,t);o!=null&&o.active&&n.node.classList.remove(o.active)}})({styles:{active:{opacity:`0`}}})};function In(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:i}=e;return N((e,a)=>{if(t===null)return;let o=n.get(e);if(!o)return;let s=o.node.current;if(!s)return;let c=tn(a);if(!c)return;let{transform:l}=D(a).getComputedStyle(a),u=Le(l);if(!u)return;let d=typeof t==`function`?t:Ln(t);return ot(s,i.draggable.measure),d({active:{id:e,data:o.data,node:s,rect:i.draggable.measure(s)},draggableNodes:n,dragOverlay:{node:a,rect:i.dragOverlay.measure(c)},droppableContainers:r,measuringConfiguration:i,transform:u})})}function Ln(e){let{duration:t,easing:n,sideEffects:r,keyframes:i}={...Fn,...e};return e=>{let{active:a,dragOverlay:o,transform:s,...c}=e;if(!t)return;let l={x:o.rect.left-a.rect.left,y:o.rect.top-a.rect.top},u={scaleX:s.scaleX===1?1:a.rect.width*s.scaleX/o.rect.width,scaleY:s.scaleY===1?1:a.rect.height*s.scaleY/o.rect.height},d={x:s.x-l.x,y:s.y-l.y,...u},f=i({...c,active:a,dragOverlay:o,transform:{initial:s,final:d}}),[p]=f,m=f[f.length-1];if(JSON.stringify(p)===JSON.stringify(m))return;let h=r?.({active:a,dragOverlay:o,...c}),g=o.node.animate(f,{duration:t,easing:n,fill:`forwards`});return new Promise(e=>{g.onfinish=()=>{h?.(),e()}})}}var Rn=0;function zn(e){return(0,C.useMemo)(()=>{if(e!=null)return Rn++,Rn},[e])}var Bn=C.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:r,style:i,transition:a,modifiers:o,wrapperElement:s=`div`,className:c,zIndex:l=999}=e,{activatorEvent:u,active:d,activeNodeRect:f,containerNodeRect:p,draggableNodes:m,droppableContainers:h,dragOverlay:g,over:_,measuringConfiguration:v,scrollableAncestors:y,scrollableAncestorRects:b,windowRect:x}=Tn(),S=(0,C.useContext)(vn),w=zn(d?.id),T=hn(o,{activatorEvent:u,active:d,activeNodeRect:f,containerNodeRect:p,draggingNodeRect:g.rect,over:_,overlayNodeRect:g.rect,scrollableAncestors:y,scrollableAncestorRects:b,transform:S,windowRect:x}),E=zt(f),D=In({config:r,draggableNodes:m,droppableContainers:h,measuringConfiguration:v}),O=E?g.setRef:void 0;return C.createElement(jn,null,C.createElement(kn,{animation:D},d&&w?C.createElement(Pn,{key:w,id:d.id,ref:O,as:s,activatorEvent:u,adjustScale:t,className:c,transition:a,rect:E,style:{zIndex:l,...i},transform:T},n):null))}),Vn=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},Hn=(e=>e?Vn(e):Vn),Un=e=>e;function Wn(e,t=Un){let n=C.useSyncExternalStore(e.subscribe,C.useCallback(()=>t(e.getState()),[e,t]),C.useCallback(()=>t(e.getInitialState()),[e,t]));return C.useDebugValue(n),n}var Gn=e=>{let t=Hn(e),n=e=>Wn(t,e);return Object.assign(n,t),n},Kn=(e=>e?Gn(e):Gn);function qn(e,t){let n;try{n=e()}catch{return}return{getItem:e=>{let r=e=>e===null?null:JSON.parse(e,t?.reviver),i=n.getItem(e)??null;return i instanceof Promise?i.then(r):r(i)},setItem:(e,r)=>n.setItem(e,JSON.stringify(r,t?.replacer)),removeItem:e=>n.removeItem(e)}}var Jn=e=>t=>{try{let n=e(t);return n instanceof Promise?n:{then(e){return Jn(e)(n)},catch(e){return this}}}catch(e){return{then(e){return this},catch(t){return Jn(t)(e)}}}},Yn=(e,t)=>(n,r,i)=>{let a={storage:qn(()=>window.localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},o=!1,s=0,c=new Set,l=new Set,u=a.storage;if(!u)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...e)},r,i);let d=()=>{let e=a.partialize({...r()});return u.setItem(a.name,{state:e,version:a.version})},f=i.setState;i.setState=(e,t)=>(f(e,t),d());let p=e((...e)=>(n(...e),d()),r,i);i.getInitialState=()=>p;let m,h=()=>{if(!u)return;let e=++s;o=!1,c.forEach(e=>e(r()??p));let t=a.onRehydrateStorage?.call(a,r()??p)||void 0;return Jn(u.getItem.bind(u))(a.name).then(e=>{if(e)if(typeof e.version==`number`&&e.version!==a.version){if(a.migrate){let t=a.migrate(e.state,e.version);return t instanceof Promise?t.then(e=>[!0,e]):[!0,t]}console.error(`State loaded from storage couldn't be migrated since no migrate function was provided`)}else return[!1,e.state];return[!1,void 0]}).then(t=>{if(e!==s)return;let[i,o]=t;if(m=a.merge(o,r()??p),n(m,!0),i)return d()}).then(()=>{e===s&&(t?.(r(),void 0),m=r(),o=!0,l.forEach(e=>e(m)))}).catch(n=>{e===s&&t?.(void 0,n)})};return i.persist={setOptions:e=>{a={...a,...e},e.storage&&(u=e.storage)},clearStorage:()=>{++s,u?.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>h(),hasHydrated:()=>o,onHydrate:e=>(c.add(e),()=>{c.delete(e)}),onFinishHydration:e=>(l.add(e),()=>{l.delete(e)})},a.skipHydration||h(),m||p},Xn=(()=>{if(typeof self>`u`)return!1;if(`top`in self&&self!==top)try{top.window.document._=0}catch{return!1}return`showOpenFilePicker`in self})(),Zn=Xn?Promise.resolve().then(function(){return nr}):Promise.resolve().then(function(){return sr});async function Qn(...e){return(await Zn).default(...e)}Xn?Promise.resolve().then(function(){return ar}):Promise.resolve().then(function(){return cr});var $n=Xn?Promise.resolve().then(function(){return or}):Promise.resolve().then(function(){return lr});async function er(...e){return(await $n).default(...e)}var tr=async e=>{let t=await e.getFile();return t.handle=e,t},nr={__proto__:null,default:async(e=[{}])=>{Array.isArray(e)||(e=[e]);let t=[];e.forEach((e,n)=>{t[n]={description:e.description||`Files`,accept:{}},e.mimeTypes?e.mimeTypes.map(r=>{t[n].accept[r]=e.extensions||[]}):t[n].accept[`*/*`]=e.extensions||[]});let n=await window.showOpenFilePicker({id:e[0].id,startIn:e[0].startIn,types:t,multiple:e[0].multiple||!1,excludeAcceptAllOption:e[0].excludeAcceptAllOption||!1}),r=await Promise.all(n.map(tr));return e[0].multiple?r:r[0]}};function rr(e){function t(e){if(Object(e)!==e)return Promise.reject(TypeError(e+` is not an object.`));var t=e.done;return Promise.resolve(e.value).then(function(e){return{value:e,done:t}})}return rr=function(e){this.s=e,this.n=e.next},rr.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return n===void 0?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return n===void 0?Promise.reject(e):t(n.apply(this.s,arguments))}},new rr(e)}var ir=async(e,t,n=e.name,r)=>{let i=[],a=[];var o,s=!1,c=!1;try{for(var l,u=function(e){var t,n,r,i=2;for(typeof Symbol<`u`&&(n=Symbol.asyncIterator,r=Symbol.iterator);i--;){if(n&&(t=e[n])!=null)return t.call(e);if(r&&(t=e[r])!=null)return new rr(t.call(e));n=`@@asyncIterator`,r=`@@iterator`}throw TypeError(`Object is not async iterable`)}(e.values());s=!(l=await u.next()).done;s=!1){let o=l.value,s=`${n}/${o.name}`;o.kind===`file`?a.push(o.getFile().then(t=>(t.directoryHandle=e,t.handle=o,Object.defineProperty(t,"webkitRelativePath",{configurable:!0,enumerable:!0,get:()=>s})))):o.kind!==`directory`||!t||r&&r(o)||i.push(ir(o,t,s,r))}}catch(e){c=!0,o=e}finally{try{s&&u.return!=null&&await u.return()}finally{if(c)throw o}}return[...(await Promise.all(i)).flat(),...await Promise.all(a)]},ar={__proto__:null,default:async(e={})=>{e.recursive=e.recursive||!1,e.mode=e.mode||`read`;let t=await window.showDirectoryPicker({id:e.id,startIn:e.startIn,mode:e.mode});return(await(await t.values()).next()).done?[t]:ir(t,e.recursive,void 0,e.skipDirectory)}},or={__proto__:null,default:async(e,t=[{}],n=null,r=!1,i=null)=>{Array.isArray(t)||(t=[t]),t[0].fileName=t[0].fileName||`Untitled`;let a=[],o=null;if(e instanceof Blob&&e.type?o=e.type:e.headers&&e.headers.get(`content-type`)&&(o=e.headers.get(`content-type`)),t.forEach((e,t)=>{a[t]={description:e.description||`Files`,accept:{}},e.mimeTypes?(t===0&&o&&e.mimeTypes.push(o),e.mimeTypes.map(n=>{a[t].accept[n]=e.extensions||[]})):o?a[t].accept[o]=e.extensions||[]:a[t].accept[`*/*`]=e.extensions||[]}),n)try{await n.getFile()}catch(e){if(n=null,r)throw e}let s=n||await window.showSaveFilePicker({suggestedName:t[0].fileName,id:t[0].id,startIn:t[0].startIn,types:a,excludeAcceptAllOption:t[0].excludeAcceptAllOption||!1});!n&&i&&i(s);let c=await s.createWritable();return`stream`in e?(await e.stream().pipeTo(c),s):`body`in e?(await e.body.pipeTo(c),s):(await c.write(await e),await c.close(),s)}},sr={__proto__:null,default:async(e=[{}])=>(Array.isArray(e)||(e=[e]),new Promise((t,n)=>{let r=document.createElement(`input`);r.type=`file`;let i=[...e.map(e=>e.mimeTypes||[]),...e.map(e=>e.extensions||[])].join();r.multiple=e[0].multiple||!1,r.accept=i||``,r.style.display=`none`,document.body.append(r),r.addEventListener(`cancel`,()=>{r.remove(),n(new DOMException(`The user aborted a request.`,`AbortError`))}),r.addEventListener(`change`,()=>{r.remove(),t(r.multiple?Array.from(r.files):r.files[0])}),`showPicker`in HTMLInputElement.prototype?r.showPicker():r.click()}))},cr={__proto__:null,default:async(e=[{}])=>(Array.isArray(e)||(e=[e]),e[0].recursive=e[0].recursive||!1,new Promise((t,n)=>{let r=document.createElement(`input`);r.type=`file`,r.webkitdirectory=!0,r.style.display=`none`,document.body.append(r),r.addEventListener(`cancel`,()=>{r.remove(),n(new DOMException(`The user aborted a request.`,`AbortError`))}),r.addEventListener(`change`,()=>{r.remove();let n=Array.from(r.files);e[0].recursive?e[0].recursive&&e[0].skipDirectory&&(n=n.filter(t=>t.webkitRelativePath.split(`/`).every(t=>!e[0].skipDirectory({name:t,kind:`directory`})))):n=n.filter(e=>e.webkitRelativePath.split(`/`).length===2),t(n)}),`showPicker`in HTMLInputElement.prototype?r.showPicker():r.click()}))},lr={__proto__:null,default:async(e,t={})=>{Array.isArray(t)&&(t=t[0]);let n=document.createElement(`a`),r=e;`body`in e&&(r=await async function(e,t){let n=e.getReader(),r=new ReadableStream({start:e=>async function t(){return n.read().then(({done:n,value:r})=>{if(!n)return e.enqueue(r),t();e.close()})}()}),i=await new Response(r).blob();return n.releaseLock(),new Blob([i],{type:t})}(e.body,e.headers.get(`content-type`))),n.download=t.fileName||`Untitled`,n.href=URL.createObjectURL(await r);let i=()=>{typeof a==`function`&&a()},a=t.legacySetup&&t.legacySetup(i,()=>a(),n);return n.addEventListener(`click`,()=>{setTimeout(()=>URL.revokeObjectURL(n.href),3e4),i()}),n.click(),null}},ur=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),dr=s(((e,t)=>{t.exports=ur()})),fr=s(((e,t)=>{(function(n){typeof e==`object`&&t!==void 0?t.exports=n():typeof define==`function`&&define.amd?define([],n):(typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:this).JSZip=n()})(function(){return function e(t,n,r){function i(o,s){if(!n[o]){if(!t[o]){var c=typeof f==`function`&&f;if(!s&&c)return c(o,!0);if(a)return a(o,!0);var l=Error(`Cannot find module '`+o+`'`);throw l.code=`MODULE_NOT_FOUND`,l}var u=n[o]={exports:{}};t[o][0].call(u.exports,function(e){var n=t[o][1][e];return i(n||e)},u,u.exports,e,t,n,r)}return n[o].exports}for(var a=typeof f==`function`&&f,o=0;o<r.length;o++)i(r[o]);return i}({1:[function(e,t,n){var r=e(`./utils`),i=e(`./support`),a=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=`;n.encode=function(e){for(var t,n,i,o,s,c,l,u=[],d=0,f=e.length,p=f,m=r.getTypeOf(e)!==`string`;d<e.length;)p=f-d,i=m?(t=e[d++],n=d<f?e[d++]:0,d<f?e[d++]:0):(t=e.charCodeAt(d++),n=d<f?e.charCodeAt(d++):0,d<f?e.charCodeAt(d++):0),o=t>>2,s=(3&t)<<4|n>>4,c=1<p?(15&n)<<2|i>>6:64,l=2<p?63&i:64,u.push(a.charAt(o)+a.charAt(s)+a.charAt(c)+a.charAt(l));return u.join(``)},n.decode=function(e){var t,n,r,o,s,c,l=0,u=0,d=`data:`;if(e.substr(0,d.length)===d)throw Error(`Invalid base64 input, it looks like a data url.`);var f,p=3*(e=e.replace(/[^A-Za-z0-9+/=]/g,``)).length/4;if(e.charAt(e.length-1)===a.charAt(64)&&p--,e.charAt(e.length-2)===a.charAt(64)&&p--,p%1!=0)throw Error(`Invalid base64 input, bad content length.`);for(f=i.uint8array?new Uint8Array(0|p):Array(0|p);l<e.length;)t=a.indexOf(e.charAt(l++))<<2|(o=a.indexOf(e.charAt(l++)))>>4,n=(15&o)<<4|(s=a.indexOf(e.charAt(l++)))>>2,r=(3&s)<<6|(c=a.indexOf(e.charAt(l++))),f[u++]=t,s!==64&&(f[u++]=n),c!==64&&(f[u++]=r);return f}},{"./support":30,"./utils":32}],2:[function(e,t,n){var r=e(`./external`),i=e(`./stream/DataWorker`),a=e(`./stream/Crc32Probe`),o=e(`./stream/DataLengthProbe`);function s(e,t,n,r,i){this.compressedSize=e,this.uncompressedSize=t,this.crc32=n,this.compression=r,this.compressedContent=i}s.prototype={getContentWorker:function(){var e=new i(r.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new o(`data_length`)),t=this;return e.on(`end`,function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw Error(`Bug : uncompressed data size mismatch`)}),e},getCompressedWorker:function(){return new i(r.Promise.resolve(this.compressedContent)).withStreamInfo(`compressedSize`,this.compressedSize).withStreamInfo(`uncompressedSize`,this.uncompressedSize).withStreamInfo(`crc32`,this.crc32).withStreamInfo(`compression`,this.compression)}},s.createWorkerFrom=function(e,t,n){return e.pipe(new a).pipe(new o(`uncompressedSize`)).pipe(t.compressWorker(n)).pipe(new o(`compressedSize`)).withStreamInfo(`compression`,t)},t.exports=s},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,n){var r=e(`./stream/GenericWorker`);n.STORE={magic:`\0\0`,compressWorker:function(){return new r(`STORE compression`)},uncompressWorker:function(){return new r(`STORE decompression`)}},n.DEFLATE=e(`./flate`)},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,t,n){var r=e(`./utils`),i=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t){return e!==void 0&&e.length?r.getTypeOf(e)===`string`?function(e,t,n,r){var a=i,o=r+n;e^=-1;for(var s=r;s<o;s++)e=e>>>8^a[255&(e^t.charCodeAt(s))];return-1^e}(0|t,e,e.length,0):function(e,t,n,r){var a=i,o=r+n;e^=-1;for(var s=r;s<o;s++)e=e>>>8^a[255&(e^t[s])];return-1^e}(0|t,e,e.length,0):0}},{"./utils":32}],5:[function(e,t,n){n.base64=!1,n.binary=!1,n.dir=!1,n.createFolders=!0,n.date=null,n.compression=null,n.compressionOptions=null,n.comment=null,n.unixPermissions=null,n.dosPermissions=null},{}],6:[function(e,t,n){var r=null;r=typeof Promise<`u`?Promise:e(`lie`),t.exports={Promise:r}},{lie:37}],7:[function(e,t,n){var r=typeof Uint8Array<`u`&&typeof Uint16Array<`u`&&typeof Uint32Array<`u`,i=e(`pako`),a=e(`./utils`),o=e(`./stream/GenericWorker`),s=r?`uint8array`:`array`;function c(e,t){o.call(this,`FlateWorker/`+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}n.magic=`\b\0`,a.inherits(c,o),c.prototype.processChunk=function(e){this.meta=e.meta,this._pako===null&&this._createPako(),this._pako.push(a.transformTo(s,e.data),!1)},c.prototype.flush=function(){o.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},c.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this._pako=null},c.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}},n.compressWorker=function(e){return new c(`Deflate`,e)},n.uncompressWorker=function(){return new c(`Inflate`,{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t,n){function r(e,t){var n,r=``;for(n=0;n<t;n++)r+=String.fromCharCode(255&e),e>>>=8;return r}function i(e,t,n,i,o,u){var d,f,p=e.file,m=e.compression,h=u!==s.utf8encode,g=a.transformTo(`string`,u(p.name)),_=a.transformTo(`string`,s.utf8encode(p.name)),v=p.comment,y=a.transformTo(`string`,u(v)),b=a.transformTo(`string`,s.utf8encode(v)),x=_.length!==p.name.length,S=b.length!==v.length,C=``,w=``,T=``,E=p.dir,D=p.date,O={crc32:0,compressedSize:0,uncompressedSize:0};t&&!n||(O.crc32=e.crc32,O.compressedSize=e.compressedSize,O.uncompressedSize=e.uncompressedSize);var k=0;t&&(k|=8),h||!x&&!S||(k|=2048);var A=0,j=0;E&&(A|=16),o===`UNIX`?(j=798,A|=function(e,t){var n=e;return e||(n=t?16893:33204),(65535&n)<<16}(p.unixPermissions,E)):(j=20,A|=function(e){return 63&(e||0)}(p.dosPermissions)),d=D.getUTCHours(),d<<=6,d|=D.getUTCMinutes(),d<<=5,d|=D.getUTCSeconds()/2,f=D.getUTCFullYear()-1980,f<<=4,f|=D.getUTCMonth()+1,f<<=5,f|=D.getUTCDate(),x&&(w=r(1,1)+r(c(g),4)+_,C+=`up`+r(w.length,2)+w),S&&(T=r(1,1)+r(c(y),4)+b,C+=`uc`+r(T.length,2)+T);var M=``;return M+=`
14
14
  \0`,M+=r(k,2),M+=m.magic,M+=r(d,2),M+=r(f,2),M+=r(O.crc32,4),M+=r(O.compressedSize,4),M+=r(O.uncompressedSize,4),M+=r(g.length,2),M+=r(C.length,2),{fileRecord:l.LOCAL_FILE_HEADER+M+g+C,dirRecord:l.CENTRAL_FILE_HEADER+r(j,2)+M+r(y.length,2)+`\0\0\0\0`+r(A,4)+r(i,4)+g+C+y}}var a=e(`../utils`),o=e(`../stream/GenericWorker`),s=e(`../utf8`),c=e(`../crc32`),l=e(`../signature`);function u(e,t,n,r){o.call(this,`ZipFileWorker`),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=n,this.encodeFileName=r,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(u,o),u.prototype.push=function(e){var t=e.meta.percent||0,n=this.entriesCount,r=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,o.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:n?(t+100*(n-r-1))/n:100}}))},u.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var n=i(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},u.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,n=i(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),t)this.push({data:function(e){return l.DATA_DESCRIPTOR+r(e.crc32,4)+r(e.compressedSize,4)+r(e.uncompressedSize,4)}(e),meta:{percent:100}});else for(this.push({data:n.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},u.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t<this.dirRecords.length;t++)this.push({data:this.dirRecords[t],meta:{percent:100}});var n=this.bytesWritten-e,i=function(e,t,n,i,o){var s=a.transformTo(`string`,o(i));return l.CENTRAL_DIRECTORY_END+`\0\0\0\0`+r(e,2)+r(e,2)+r(t,4)+r(n,4)+r(s.length,2)+s}(this.dirRecords.length,n,e,this.zipComment,this.encodeFileName);this.push({data:i,meta:{percent:100}})},u.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},u.prototype.registerPrevious=function(e){this._sources.push(e);var t=this;return e.on(`data`,function(e){t.processChunk(e)}),e.on(`end`,function(){t.closedSource(t.previous.streamInfo),t._sources.length?t.prepareNextSource():t.end()}),e.on(`error`,function(e){t.error(e)}),this},u.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},u.prototype.error=function(e){var t=this._sources;if(!o.prototype.error.call(this,e))return!1;for(var n=0;n<t.length;n++)try{t[n].error(e)}catch{}return!0},u.prototype.lock=function(){o.prototype.lock.call(this);for(var e=this._sources,t=0;t<e.length;t++)e[t].lock()},t.exports=u},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(e,t,n){var r=e(`../compressions`),i=e(`./ZipFileWorker`);n.generateWorker=function(e,t,n){var a=new i(t.streamFiles,n,t.platform,t.encodeFileName),o=0;try{e.forEach(function(e,n){o++;var i=function(e,t){var n=e||t,i=r[n];if(!i)throw Error(n+` is not a valid compression method !`);return i}(n.options.compression,t.compression),s=n.options.compressionOptions||t.compressionOptions||{},c=n.dir,l=n.date;n._compressWorker(i,s).withStreamInfo(`file`,{name:e,dir:c,date:l,comment:n.comment||``,unixPermissions:n.unixPermissions,dosPermissions:n.dosPermissions}).pipe(a)}),a.entriesCount=o}catch(e){a.error(e)}return a}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(e,t,n){function r(){if(!(this instanceof r))return new r;if(arguments.length)throw Error(`The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.`);this.files=Object.create(null),this.comment=null,this.root=``,this.clone=function(){var e=new r;for(var t in this)typeof this[t]!=`function`&&(e[t]=this[t]);return e}}(r.prototype=e(`./object`)).loadAsync=e(`./load`),r.support=e(`./support`),r.defaults=e(`./defaults`),r.version=`3.10.1`,r.loadAsync=function(e,t){return new r().loadAsync(e,t)},r.external=e(`./external`),t.exports=r},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(e,t,n){var r=e(`./utils`),i=e(`./external`),a=e(`./utf8`),o=e(`./zipEntries`),s=e(`./stream/Crc32Probe`),c=e(`./nodejsUtils`);function l(e){return new i.Promise(function(t,n){var r=e.decompressed.getContentWorker().pipe(new s);r.on(`error`,function(e){n(e)}).on(`end`,function(){r.streamInfo.crc32===e.decompressed.crc32?t():n(Error(`Corrupted zip : CRC32 mismatch`))}).resume()})}t.exports=function(e,t){var n=this;return t=r.extend(t||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:a.utf8decode}),c.isNode&&c.isStream(e)?i.Promise.reject(Error(`JSZip can't accept a stream when loading a zip file.`)):r.prepareContent(`the loaded zip file`,e,!0,t.optimizedBinaryString,t.base64).then(function(e){var n=new o(t);return n.load(e),n}).then(function(e){var n=[i.Promise.resolve(e)],r=e.files;if(t.checkCRC32)for(var a=0;a<r.length;a++)n.push(l(r[a]));return i.Promise.all(n)}).then(function(e){for(var i=e.shift(),a=i.files,o=0;o<a.length;o++){var s=a[o],c=s.fileNameStr,l=r.resolve(s.fileNameStr);n.file(l,s.decompressed,{binary:!0,optimizedBinaryString:!0,date:s.date,dir:s.dir,comment:s.fileCommentStr.length?s.fileCommentStr:null,unixPermissions:s.unixPermissions,dosPermissions:s.dosPermissions,createFolders:t.createFolders}),s.dir||(n.file(l).unsafeOriginalName=c)}return i.zipComment.length&&(n.comment=i.zipComment),n})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(e,t,n){var r=e(`../utils`),i=e(`../stream/GenericWorker`);function a(e,t){i.call(this,`Nodejs stream input adapter for `+e),this._upstreamEnded=!1,this._bindStream(t)}r.inherits(a,i),a.prototype._bindStream=function(e){var t=this;(this._stream=e).pause(),e.on(`data`,function(e){t.push({data:e,meta:{percent:0}})}).on(`error`,function(e){t.isPaused?this.generatedError=e:t.error(e)}).on(`end`,function(){t.isPaused?t._upstreamEnded=!0:t.end()})},a.prototype.pause=function(){return!!i.prototype.pause.call(this)&&(this._stream.pause(),!0)},a.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},t.exports=a},{"../stream/GenericWorker":28,"../utils":32}],13:[function(e,t,n){var r=e(`readable-stream`).Readable;function i(e,t,n){r.call(this,t),this._helper=e;var i=this;e.on(`data`,function(e,t){i.push(e)||i._helper.pause(),n&&n(t)}).on(`error`,function(e){i.emit(`error`,e)}).on(`end`,function(){i.push(null)})}e(`../utils`).inherits(i,r),i.prototype._read=function(){this._helper.resume()},t.exports=i},{"../utils":32,"readable-stream":16}],14:[function(e,t,n){t.exports={isNode:typeof Buffer<`u`,newBufferFrom:function(e,t){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(e,t);if(typeof e==`number`)throw Error(`The "data" argument must not be a number`);return new Buffer(e,t)},allocBuffer:function(e){if(Buffer.alloc)return Buffer.alloc(e);var t=new Buffer(e);return t.fill(0),t},isBuffer:function(e){return Buffer.isBuffer(e)},isStream:function(e){return e&&typeof e.on==`function`&&typeof e.pause==`function`&&typeof e.resume==`function`}}},{}],15:[function(e,t,n){function r(e,t,n){var r,i=a.getTypeOf(t),s=a.extend(n||{},c);s.date=s.date||new Date,s.compression!==null&&(s.compression=s.compression.toUpperCase()),typeof s.unixPermissions==`string`&&(s.unixPermissions=parseInt(s.unixPermissions,8)),s.unixPermissions&&16384&s.unixPermissions&&(s.dir=!0),s.dosPermissions&&16&s.dosPermissions&&(s.dir=!0),s.dir&&(e=h(e)),s.createFolders&&(r=m(e))&&g.call(this,r,!0);var d=i===`string`&&!1===s.binary&&!1===s.base64;n&&n.binary!==void 0||(s.binary=!d),(t instanceof l&&t.uncompressedSize===0||s.dir||!t||t.length===0)&&(s.base64=!1,s.binary=!0,t=``,s.compression=`STORE`,i=`string`);var _=null;_=t instanceof l||t instanceof o?t:f.isNode&&f.isStream(t)?new p(e,t):a.prepareContent(e,t,s.binary,s.optimizedBinaryString,s.base64);var v=new u(e,_,s);this.files[e]=v}var i=e(`./utf8`),a=e(`./utils`),o=e(`./stream/GenericWorker`),s=e(`./stream/StreamHelper`),c=e(`./defaults`),l=e(`./compressedObject`),u=e(`./zipObject`),d=e(`./generate`),f=e(`./nodejsUtils`),p=e(`./nodejs/NodejsStreamInputAdapter`),m=function(e){e.slice(-1)===`/`&&(e=e.substring(0,e.length-1));var t=e.lastIndexOf(`/`);return 0<t?e.substring(0,t):``},h=function(e){return e.slice(-1)!==`/`&&(e+=`/`),e},g=function(e,t){return t=t===void 0?c.createFolders:t,e=h(e),this.files[e]||r.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]};function _(e){return Object.prototype.toString.call(e)===`[object RegExp]`}t.exports={load:function(){throw Error(`This method has been removed in JSZip 3.0, please check the upgrade guide.`)},forEach:function(e){var t,n,r;for(t in this.files)r=this.files[t],(n=t.slice(this.root.length,t.length))&&t.slice(0,this.root.length)===this.root&&e(n,r)},filter:function(e){var t=[];return this.forEach(function(n,r){e(n,r)&&t.push(r)}),t},file:function(e,t,n){if(arguments.length!==1)return e=this.root+e,r.call(this,e,t,n),this;if(_(e)){var i=e;return this.filter(function(e,t){return!t.dir&&i.test(e)})}var a=this.files[this.root+e];return a&&!a.dir?a:null},folder:function(e){if(!e)return this;if(_(e))return this.filter(function(t,n){return n.dir&&e.test(t)});var t=this.root+e,n=g.call(this,t),r=this.clone();return r.root=n.name,r},remove:function(e){e=this.root+e;var t=this.files[e];if(t||=(e.slice(-1)!==`/`&&(e+=`/`),this.files[e]),t&&!t.dir)delete this.files[e];else for(var n=this.filter(function(t,n){return n.name.slice(0,e.length)===e}),r=0;r<n.length;r++)delete this.files[n[r].name];return this},generate:function(){throw Error(`This method has been removed in JSZip 3.0, please check the upgrade guide.`)},generateInternalStream:function(e){var t,n={};try{if((n=a.extend(e||{},{streamFiles:!1,compression:`STORE`,compressionOptions:null,type:``,platform:`DOS`,comment:null,mimeType:`application/zip`,encodeFileName:i.utf8encode})).type=n.type.toLowerCase(),n.compression=n.compression.toUpperCase(),n.type===`binarystring`&&(n.type=`string`),!n.type)throw Error(`No output type specified.`);a.checkSupport(n.type),n.platform!==`darwin`&&n.platform!==`freebsd`&&n.platform!==`linux`&&n.platform!==`sunos`||(n.platform=`UNIX`),n.platform===`win32`&&(n.platform=`DOS`);var r=n.comment||this.comment||``;t=d.generateWorker(this,n,r)}catch(e){(t=new o(`error`)).error(e)}return new s(t,n.type||`string`,n.mimeType)},generateAsync:function(e,t){return this.generateInternalStream(e).accumulate(t)},generateNodeStream:function(e,t){return(e||={}).type||(e.type=`nodebuffer`),this.generateInternalStream(e).toNodejsStream(t)}}},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(e,t,n){t.exports=e(`stream`)},{stream:void 0}],17:[function(e,t,n){var r=e(`./DataReader`);function i(e){r.call(this,e);for(var t=0;t<this.data.length;t++)e[t]=255&e[t]}e(`../utils`).inherits(i,r),i.prototype.byteAt=function(e){return this.data[this.zero+e]},i.prototype.lastIndexOfSignature=function(e){for(var t=e.charCodeAt(0),n=e.charCodeAt(1),r=e.charCodeAt(2),i=e.charCodeAt(3),a=this.length-4;0<=a;--a)if(this.data[a]===t&&this.data[a+1]===n&&this.data[a+2]===r&&this.data[a+3]===i)return a-this.zero;return-1},i.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),n=e.charCodeAt(1),r=e.charCodeAt(2),i=e.charCodeAt(3),a=this.readData(4);return t===a[0]&&n===a[1]&&r===a[2]&&i===a[3]},i.prototype.readData=function(e){if(this.checkOffset(e),e===0)return[];var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./DataReader":18}],18:[function(e,t,n){var r=e(`../utils`);function i(e){this.data=e,this.length=e.length,this.index=0,this.zero=0}i.prototype={checkOffset:function(e){this.checkIndex(this.index+e)},checkIndex:function(e){if(this.length<this.zero+e||e<0)throw Error(`End of data reached (data length = `+this.length+`, asked index = `+e+`). Corrupted zip ?`)},setIndex:function(e){this.checkIndex(e),this.index=e},skip:function(e){this.setIndex(this.index+e)},byteAt:function(){},readInt:function(e){var t,n=0;for(this.checkOffset(e),t=this.index+e-1;t>=this.index;t--)n=(n<<8)+this.byteAt(t);return this.index+=e,n},readString:function(e){return r.transformTo(`string`,this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},t.exports=i},{"../utils":32}],19:[function(e,t,n){var r=e(`./Uint8ArrayReader`);function i(e){r.call(this,e)}e(`../utils`).inherits(i,r),i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,t,n){var r=e(`./DataReader`);function i(e){r.call(this,e)}e(`../utils`).inherits(i,r),i.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},i.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},i.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./DataReader":18}],21:[function(e,t,n){var r=e(`./ArrayReader`);function i(e){r.call(this,e)}e(`../utils`).inherits(i,r),i.prototype.readData=function(e){if(this.checkOffset(e),e===0)return new Uint8Array;var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(e,t,n){var r=e(`../utils`),i=e(`../support`),a=e(`./ArrayReader`),o=e(`./StringReader`),s=e(`./NodeBufferReader`),c=e(`./Uint8ArrayReader`);t.exports=function(e){var t=r.getTypeOf(e);return r.checkSupport(t),t!==`string`||i.uint8array?t===`nodebuffer`?new s(e):i.uint8array?new c(r.transformTo(`uint8array`,e)):new a(r.transformTo(`array`,e)):new o(e)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,n){n.LOCAL_FILE_HEADER=`PK`,n.CENTRAL_FILE_HEADER=`PK`,n.CENTRAL_DIRECTORY_END=`PK`,n.ZIP64_CENTRAL_DIRECTORY_LOCATOR=`PK\x07`,n.ZIP64_CENTRAL_DIRECTORY_END=`PK`,n.DATA_DESCRIPTOR=`PK\x07\b`},{}],24:[function(e,t,n){var r=e(`./GenericWorker`),i=e(`../utils`);function a(e){r.call(this,`ConvertWorker to `+e),this.destType=e}i.inherits(a,r),a.prototype.processChunk=function(e){this.push({data:i.transformTo(this.destType,e.data),meta:e.meta})},t.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(e,t,n){var r=e(`./GenericWorker`),i=e(`../crc32`);function a(){r.call(this,`Crc32Probe`),this.withStreamInfo(`crc32`,0)}e(`../utils`).inherits(a,r),a.prototype.processChunk=function(e){this.streamInfo.crc32=i(e.data,this.streamInfo.crc32||0),this.push(e)},t.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,t,n){var r=e(`../utils`),i=e(`./GenericWorker`);function a(e){i.call(this,`DataLengthProbe for `+e),this.propName=e,this.withStreamInfo(e,0)}r.inherits(a,i),a.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}i.prototype.processChunk.call(this,e)},t.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(e,t,n){var r=e(`../utils`),i=e(`./GenericWorker`);function a(e){i.call(this,`DataWorker`);var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type=``,this._tickScheduled=!1,e.then(function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=r.getTypeOf(e),t.isPaused||t._tickAndRepeat()},function(e){t.error(e)})}r.inherits(a,i),a.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,r.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(r.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case`string`:e=this.data.substring(this.index,t);break;case`uint8array`:e=this.data.subarray(this.index,t);break;case`array`:case`nodebuffer`:e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(e,t,n){function r(e){this.name=e||`default`,this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}r.prototype={push:function(e){this.emit(`data`,e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit(`end`),this.cleanUp(),this.isFinished=!0}catch(e){this.emit(`error`,e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit(`error`,e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var n=0;n<this._listeners[e].length;n++)this._listeners[e][n].call(this,t)},pipe:function(e){return e.registerPrevious(this)},registerPrevious:function(e){if(this.isLocked)throw Error(`The stream '`+this+`' has already been used.`);this.streamInfo=e.streamInfo,this.mergeStreamInfo(),this.previous=e;var t=this;return e.on(`data`,function(e){t.processChunk(e)}),e.on(`end`,function(){t.end()}),e.on(`error`,function(e){t.error(e)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var e=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),e=!0),this.previous&&this.previous.resume(),!e},flush:function(){},processChunk:function(e){this.push(e)},withStreamInfo:function(e,t){return this.extraStreamInfo[e]=t,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var e in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,e)&&(this.streamInfo[e]=this.extraStreamInfo[e])},lock:function(){if(this.isLocked)throw Error(`The stream '`+this+`' has already been used.`);this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var e=`Worker `+this.name;return this.previous?this.previous+` -> `+e:e}},t.exports=r},{}],29:[function(e,t,n){var r=e(`../utils`),i=e(`./ConvertWorker`),a=e(`./GenericWorker`),o=e(`../base64`),s=e(`../support`),c=e(`../external`),l=null;if(s.nodestream)try{l=e(`../nodejs/NodejsStreamOutputAdapter`)}catch{}function u(e,t){return new c.Promise(function(n,i){var a=[],s=e._internalType,c=e._outputType,l=e._mimeType;e.on(`data`,function(e,n){a.push(e),t&&t(n)}).on(`error`,function(e){a=[],i(e)}).on(`end`,function(){try{n(function(e,t,n){switch(e){case`blob`:return r.newBlob(r.transformTo(`arraybuffer`,t),n);case`base64`:return o.encode(t);default:return r.transformTo(e,t)}}(c,function(e,t){var n,r=0,i=null,a=0;for(n=0;n<t.length;n++)a+=t[n].length;switch(e){case`string`:return t.join(``);case`array`:return Array.prototype.concat.apply([],t);case`uint8array`:for(i=new Uint8Array(a),n=0;n<t.length;n++)i.set(t[n],r),r+=t[n].length;return i;case`nodebuffer`:return Buffer.concat(t);default:throw Error(`concat : unsupported type '`+e+`'`)}}(s,a),l))}catch(e){i(e)}a=[]}).resume()})}function d(e,t,n){var o=t;switch(t){case`blob`:case`arraybuffer`:o=`uint8array`;break;case`base64`:o=`string`}try{this._internalType=o,this._outputType=t,this._mimeType=n,r.checkSupport(o),this._worker=e.pipe(new i(o)),e.lock()}catch(e){this._worker=new a(`error`),this._worker.error(e)}}d.prototype={accumulate:function(e){return u(this,e)},on:function(e,t){var n=this;return e===`data`?this._worker.on(e,function(e){t.call(n,e.data,e.meta)}):this._worker.on(e,function(){r.delay(t,arguments,n)}),this},resume:function(){return r.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(e){if(r.checkSupport(`nodestream`),this._outputType!==`nodebuffer`)throw Error(this._outputType+` is not supported by this method`);return new l(this,{objectMode:this._outputType!==`nodebuffer`},e)}},t.exports=d},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(e,t,n){if(n.base64=!0,n.array=!0,n.string=!0,n.arraybuffer=typeof ArrayBuffer<`u`&&typeof Uint8Array<`u`,n.nodebuffer=typeof Buffer<`u`,n.uint8array=typeof Uint8Array<`u`,typeof ArrayBuffer>`u`)n.blob=!1;else{var r=new ArrayBuffer(0);try{n.blob=new Blob([r],{type:`application/zip`}).size===0}catch{try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);i.append(r),n.blob=i.getBlob(`application/zip`).size===0}catch{n.blob=!1}}}try{n.nodestream=!!e(`readable-stream`).Readable}catch{n.nodestream=!1}},{"readable-stream":16}],31:[function(e,t,n){for(var r=e(`./utils`),i=e(`./support`),a=e(`./nodejsUtils`),o=e(`./stream/GenericWorker`),s=Array(256),c=0;c<256;c++)s[c]=252<=c?6:248<=c?5:240<=c?4:224<=c?3:192<=c?2:1;s[254]=s[254]=1;function l(){o.call(this,`utf-8 decode`),this.leftOver=null}function u(){o.call(this,`utf-8 encode`)}n.utf8encode=function(e){return i.nodebuffer?a.newBufferFrom(e,`utf-8`):function(e){var t,n,r,a,o,s=e.length,c=0;for(a=0;a<s;a++)(64512&(n=e.charCodeAt(a)))==55296&&a+1<s&&(64512&(r=e.charCodeAt(a+1)))==56320&&(n=65536+(n-55296<<10)+(r-56320),a++),c+=n<128?1:n<2048?2:n<65536?3:4;for(t=i.uint8array?new Uint8Array(c):Array(c),a=o=0;o<c;a++)(64512&(n=e.charCodeAt(a)))==55296&&a+1<s&&(64512&(r=e.charCodeAt(a+1)))==56320&&(n=65536+(n-55296<<10)+(r-56320),a++),n<128?t[o++]=n:(n<2048?t[o++]=192|n>>>6:(n<65536?t[o++]=224|n>>>12:(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63),t[o++]=128|n>>>6&63),t[o++]=128|63&n);return t}(e)},n.utf8decode=function(e){return i.nodebuffer?r.transformTo(`nodebuffer`,e).toString(`utf-8`):function(e){var t,n,i,a,o=e.length,c=Array(2*o);for(t=n=0;t<o;)if((i=e[t++])<128)c[n++]=i;else if(4<(a=s[i]))c[n++]=65533,t+=a-1;else{for(i&=a===2?31:a===3?15:7;1<a&&t<o;)i=i<<6|63&e[t++],a--;1<a?c[n++]=65533:i<65536?c[n++]=i:(i-=65536,c[n++]=55296|i>>10&1023,c[n++]=56320|1023&i)}return c.length!==n&&(c.subarray?c=c.subarray(0,n):c.length=n),r.applyFromCharCode(c)}(e=r.transformTo(i.uint8array?`uint8array`:`array`,e))},r.inherits(l,o),l.prototype.processChunk=function(e){var t=r.transformTo(i.uint8array?`uint8array`:`array`,e.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var a=t;(t=new Uint8Array(a.length+this.leftOver.length)).set(this.leftOver,0),t.set(a,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var o=function(e,t){var n;for((t||=e.length)>e.length&&(t=e.length),n=t-1;0<=n&&(192&e[n])==128;)n--;return n<0||n===0?t:n+s[e[n]]>t?n:t}(t),c=t;o!==t.length&&(i.uint8array?(c=t.subarray(0,o),this.leftOver=t.subarray(o,t.length)):(c=t.slice(0,o),this.leftOver=t.slice(o,t.length))),this.push({data:n.utf8decode(c),meta:e.meta})},l.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=l,r.inherits(u,o),u.prototype.processChunk=function(e){this.push({data:n.utf8encode(e.data),meta:e.meta})},n.Utf8EncodeWorker=u},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,n){var r=e(`./support`),i=e(`./base64`),a=e(`./nodejsUtils`),o=e(`./external`);function s(e){return e}function c(e,t){for(var n=0;n<e.length;++n)t[n]=255&e.charCodeAt(n);return t}e(`setimmediate`),n.newBlob=function(e,t){n.checkSupport(`blob`);try{return new Blob([e],{type:t})}catch{try{var r=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return r.append(e),r.getBlob(t)}catch{throw Error(`Bug : can't construct the Blob.`)}}};var l={stringifyByChunk:function(e,t,n){var r=[],i=0,a=e.length;if(a<=n)return String.fromCharCode.apply(null,e);for(;i<a;)t===`array`||t===`nodebuffer`?r.push(String.fromCharCode.apply(null,e.slice(i,Math.min(i+n,a)))):r.push(String.fromCharCode.apply(null,e.subarray(i,Math.min(i+n,a)))),i+=n;return r.join(``)},stringifyByChar:function(e){for(var t=``,n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t},applyCanBeUsed:{uint8array:function(){try{return r.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}}(),nodebuffer:function(){try{return r.nodebuffer&&String.fromCharCode.apply(null,a.allocBuffer(1)).length===1}catch{return!1}}()}};function u(e){var t=65536,r=n.getTypeOf(e),i=!0;if(r===`uint8array`?i=l.applyCanBeUsed.uint8array:r===`nodebuffer`&&(i=l.applyCanBeUsed.nodebuffer),i)for(;1<t;)try{return l.stringifyByChunk(e,r,t)}catch{t=Math.floor(t/2)}return l.stringifyByChar(e)}function d(e,t){for(var n=0;n<e.length;n++)t[n]=e[n];return t}n.applyFromCharCode=u;var f={};f.string={string:s,array:function(e){return c(e,Array(e.length))},arraybuffer:function(e){return f.string.uint8array(e).buffer},uint8array:function(e){return c(e,new Uint8Array(e.length))},nodebuffer:function(e){return c(e,a.allocBuffer(e.length))}},f.array={string:u,array:s,arraybuffer:function(e){return new Uint8Array(e).buffer},uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return a.newBufferFrom(e)}},f.arraybuffer={string:function(e){return u(new Uint8Array(e))},array:function(e){return d(new Uint8Array(e),Array(e.byteLength))},arraybuffer:s,uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return a.newBufferFrom(new Uint8Array(e))}},f.uint8array={string:u,array:function(e){return d(e,Array(e.length))},arraybuffer:function(e){return e.buffer},uint8array:s,nodebuffer:function(e){return a.newBufferFrom(e)}},f.nodebuffer={string:u,array:function(e){return d(e,Array(e.length))},arraybuffer:function(e){return f.nodebuffer.uint8array(e).buffer},uint8array:function(e){return d(e,new Uint8Array(e.length))},nodebuffer:s},n.transformTo=function(e,t){return t||=``,e?(n.checkSupport(e),f[n.getTypeOf(t)][e](t)):t},n.resolve=function(e){for(var t=e.split(`/`),n=[],r=0;r<t.length;r++){var i=t[r];i===`.`||i===``&&r!==0&&r!==t.length-1||(i===`..`?n.pop():n.push(i))}return n.join(`/`)},n.getTypeOf=function(e){return typeof e==`string`?`string`:Object.prototype.toString.call(e)===`[object Array]`?`array`:r.nodebuffer&&a.isBuffer(e)?`nodebuffer`:r.uint8array&&e instanceof Uint8Array?`uint8array`:r.arraybuffer&&e instanceof ArrayBuffer?`arraybuffer`:void 0},n.checkSupport=function(e){if(!r[e.toLowerCase()])throw Error(e+` is not supported by this platform`)},n.MAX_VALUE_16BITS=65535,n.MAX_VALUE_32BITS=-1,n.pretty=function(e){var t,n,r=``;for(n=0;n<(e||``).length;n++)r+=`\\x`+((t=e.charCodeAt(n))<16?`0`:``)+t.toString(16).toUpperCase();return r},n.delay=function(e,t,n){setImmediate(function(){e.apply(n||null,t||[])})},n.inherits=function(e,t){function n(){}n.prototype=t.prototype,e.prototype=new n},n.extend=function(){var e,t,n={};for(e=0;e<arguments.length;e++)for(t in arguments[e])Object.prototype.hasOwnProperty.call(arguments[e],t)&&n[t]===void 0&&(n[t]=arguments[e][t]);return n},n.prepareContent=function(e,t,a,s,l){return o.Promise.resolve(t).then(function(e){return r.blob&&(e instanceof Blob||[`[object File]`,`[object Blob]`].indexOf(Object.prototype.toString.call(e))!==-1)&&typeof FileReader<`u`?new o.Promise(function(t,n){var r=new FileReader;r.onload=function(e){t(e.target.result)},r.onerror=function(e){n(e.target.error)},r.readAsArrayBuffer(e)}):e}).then(function(t){var u=n.getTypeOf(t);return u?(u===`arraybuffer`?t=n.transformTo(`uint8array`,t):u===`string`&&(l?t=i.decode(t):a&&!0!==s&&(t=function(e){return c(e,r.uint8array?new Uint8Array(e.length):Array(e.length))}(t))),t):o.Promise.reject(Error(`Can't read the data of '`+e+`'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?`))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(e,t,n){var r=e(`./reader/readerFor`),i=e(`./utils`),a=e(`./signature`),o=e(`./zipEntry`),s=e(`./support`);function c(e){this.files=[],this.loadOptions=e}c.prototype={checkSignature:function(e){if(!this.reader.readAndCheckSignature(e)){this.reader.index-=4;var t=this.reader.readString(4);throw Error(`Corrupted zip or bug: unexpected signature (`+i.pretty(t)+`, expected `+i.pretty(e)+`)`)}},isSignature:function(e,t){var n=this.reader.index;this.reader.setIndex(e);var r=this.reader.readString(4)===t;return this.reader.setIndex(n),r},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var e=this.reader.readData(this.zipCommentLength),t=s.uint8array?`uint8array`:`array`,n=i.transformTo(t,e);this.zipComment=this.loadOptions.decodeFileName(n)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var e,t,n,r=this.zip64EndOfCentralSize-44;0<r;)e=this.reader.readInt(2),t=this.reader.readInt(4),n=this.reader.readData(t),this.zip64ExtensibleData[e]={id:e,length:t,value:n}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw Error(`Multi-volumes zip are not supported`)},readLocalFiles:function(){var e,t;for(e=0;e<this.files.length;e++)t=this.files[e],this.reader.setIndex(t.localHeaderOffset),this.checkSignature(a.LOCAL_FILE_HEADER),t.readLocalPart(this.reader),t.handleUTF8(),t.processAttributes()},readCentralDir:function(){var e;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(a.CENTRAL_FILE_HEADER);)(e=new o({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(e);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw Error(`Corrupted zip or bug: expected `+this.centralDirRecords+` records in central dir, got `+this.files.length)},readEndOfCentral:function(){var e=this.reader.lastIndexOfSignature(a.CENTRAL_DIRECTORY_END);if(e<0)throw this.isSignature(0,a.LOCAL_FILE_HEADER)?Error(`Corrupted zip: can't find end of central directory`):Error(`Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html`);this.reader.setIndex(e);var t=e;if(this.checkSignature(a.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===i.MAX_VALUE_16BITS||this.diskWithCentralDirStart===i.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===i.MAX_VALUE_16BITS||this.centralDirRecords===i.MAX_VALUE_16BITS||this.centralDirSize===i.MAX_VALUE_32BITS||this.centralDirOffset===i.MAX_VALUE_32BITS){if(this.zip64=!0,(e=this.reader.lastIndexOfSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw Error(`Corrupted zip: can't find the ZIP64 end of central directory locator`);if(this.reader.setIndex(e),this.checkSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,a.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(a.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw Error(`Corrupted zip: can't find the ZIP64 end of central directory`);this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(a.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var n=this.centralDirOffset+this.centralDirSize;this.zip64&&(n+=20,n+=12+this.zip64EndOfCentralSize);var r=t-n;if(0<r)this.isSignature(t,a.CENTRAL_FILE_HEADER)||(this.reader.zero=r);else if(r<0)throw Error(`Corrupted zip: missing `+Math.abs(r)+` bytes.`)},prepareReader:function(e){this.reader=r(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},t.exports=c},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(e,t,n){var r=e(`./reader/readerFor`),i=e(`./utils`),a=e(`./compressedObject`),o=e(`./crc32`),s=e(`./utf8`),c=e(`./compressions`),l=e(`./support`);function u(e,t){this.options=e,this.loadOptions=t}u.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(e){var t,n;if(e.skip(22),this.fileNameLength=e.readInt(2),n=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(n),this.compressedSize===-1||this.uncompressedSize===-1)throw Error(`Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)`);if((t=function(e){for(var t in c)if(Object.prototype.hasOwnProperty.call(c,t)&&c[t].magic===e)return c[t];return null}(this.compressionMethod))===null)throw Error(`Corrupted zip : compression `+i.pretty(this.compressionMethod)+` unknown (inner file : `+i.transformTo(`string`,this.fileName)+`)`);this.decompressed=new a(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize))},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw Error(`Encrypted zip are not supported`);e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),e==0&&(this.dosPermissions=63&this.externalFileAttributes),e==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!==`/`||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=r(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var t,n,r,i=e.index+this.extraFieldsLength;for(this.extraFields||={};e.index+4<i;)t=e.readInt(2),n=e.readInt(2),r=e.readData(n),this.extraFields[t]={id:t,length:n,value:r};e.setIndex(i)},handleUTF8:function(){var e=l.uint8array?`uint8array`:`array`;if(this.useUTF8())this.fileNameStr=s.utf8decode(this.fileName),this.fileCommentStr=s.utf8decode(this.fileComment);else{var t=this.findExtraFieldUnicodePath();if(t!==null)this.fileNameStr=t;else{var n=i.transformTo(e,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(n)}var r=this.findExtraFieldUnicodeComment();if(r!==null)this.fileCommentStr=r;else{var a=i.transformTo(e,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(a)}}},findExtraFieldUnicodePath:function(){var e=this.extraFields[28789];if(e){var t=r(e.value);return t.readInt(1)===1&&o(this.fileName)===t.readInt(4)?s.utf8decode(t.readData(e.length-5)):null}return null},findExtraFieldUnicodeComment:function(){var e=this.extraFields[25461];if(e){var t=r(e.value);return t.readInt(1)===1&&o(this.fileComment)===t.readInt(4)?s.utf8decode(t.readData(e.length-5)):null}return null}},t.exports=u},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(e,t,n){function r(e,t,n){this.name=e,this.dir=n.dir,this.date=n.date,this.comment=n.comment,this.unixPermissions=n.unixPermissions,this.dosPermissions=n.dosPermissions,this._data=t,this._dataBinary=n.binary,this.options={compression:n.compression,compressionOptions:n.compressionOptions}}var i=e(`./stream/StreamHelper`),a=e(`./stream/DataWorker`),o=e(`./utf8`),s=e(`./compressedObject`),c=e(`./stream/GenericWorker`);r.prototype={internalStream:function(e){var t=null,n=`string`;try{if(!e)throw Error(`No output type specified.`);var r=(n=e.toLowerCase())===`string`||n===`text`;n!==`binarystring`&&n!==`text`||(n=`string`),t=this._decompressWorker();var a=!this._dataBinary;a&&!r&&(t=t.pipe(new o.Utf8EncodeWorker)),!a&&r&&(t=t.pipe(new o.Utf8DecodeWorker))}catch(e){(t=new c(`error`)).error(e)}return new i(t,n,``)},async:function(e,t){return this.internalStream(e).accumulate(t)},nodeStream:function(e,t){return this.internalStream(e||`nodebuffer`).toNodejsStream(t)},_compressWorker:function(e,t){if(this._data instanceof s&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var n=this._decompressWorker();return this._dataBinary||(n=n.pipe(new o.Utf8EncodeWorker)),s.createWorkerFrom(n,e,t)},_decompressWorker:function(){return this._data instanceof s?this._data.getContentWorker():this._data instanceof c?this._data:new a(this._data)}};for(var l=[`asText`,`asBinary`,`asNodeBuffer`,`asUint8Array`,`asArrayBuffer`],u=function(){throw Error(`This method has been removed in JSZip 3.0, please check the upgrade guide.`)},d=0;d<l.length;d++)r.prototype[l[d]]=u;t.exports=r},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(e,t,n){(function(e){var n,r,i=e.MutationObserver||e.WebKitMutationObserver;if(i){var a=0,o=new i(u),s=e.document.createTextNode(``);o.observe(s,{characterData:!0}),n=function(){s.data=a=++a%2}}else if(e.setImmediate||e.MessageChannel===void 0)n=`document`in e&&`onreadystatechange`in e.document.createElement(`script`)?function(){var t=e.document.createElement(`script`);t.onreadystatechange=function(){u(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(u,0)};else{var c=new e.MessageChannel;c.port1.onmessage=u,n=function(){c.port2.postMessage(0)}}var l=[];function u(){var e,t;r=!0;for(var n=l.length;n;){for(t=l,l=[],e=-1;++e<n;)t[e]();n=l.length}r=!1}t.exports=function(e){l.push(e)!==1||r||n()}}).call(this,typeof global<`u`?global:typeof self<`u`?self:typeof window<`u`?window:{})},{}],37:[function(e,t,n){var r=e(`immediate`);function i(){}var a={},o=[`REJECTED`],s=[`FULFILLED`],c=[`PENDING`];function l(e){if(typeof e!=`function`)throw TypeError(`resolver must be a function`);this.state=c,this.queue=[],this.outcome=void 0,e!==i&&p(this,e)}function u(e,t,n){this.promise=e,typeof t==`function`&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),typeof n==`function`&&(this.onRejected=n,this.callRejected=this.otherCallRejected)}function d(e,t,n){r(function(){var r;try{r=t(n)}catch(t){return a.reject(e,t)}r===e?a.reject(e,TypeError(`Cannot resolve promise with itself`)):a.resolve(e,r)})}function f(e){var t=e&&e.then;if(e&&(typeof e==`object`||typeof e==`function`)&&typeof t==`function`)return function(){t.apply(e,arguments)}}function p(e,t){var n=!1;function r(t){n||(n=!0,a.reject(e,t))}function i(t){n||(n=!0,a.resolve(e,t))}var o=m(function(){t(i,r)});o.status===`error`&&r(o.value)}function m(e,t){var n={};try{n.value=e(t),n.status=`success`}catch(e){n.status=`error`,n.value=e}return n}(t.exports=l).prototype.finally=function(e){if(typeof e!=`function`)return this;var t=this.constructor;return this.then(function(n){return t.resolve(e()).then(function(){return n})},function(n){return t.resolve(e()).then(function(){throw n})})},l.prototype.catch=function(e){return this.then(null,e)},l.prototype.then=function(e,t){if(typeof e!=`function`&&this.state===s||typeof t!=`function`&&this.state===o)return this;var n=new this.constructor(i);return this.state===c?this.queue.push(new u(n,e,t)):d(n,this.state===s?e:t,this.outcome),n},u.prototype.callFulfilled=function(e){a.resolve(this.promise,e)},u.prototype.otherCallFulfilled=function(e){d(this.promise,this.onFulfilled,e)},u.prototype.callRejected=function(e){a.reject(this.promise,e)},u.prototype.otherCallRejected=function(e){d(this.promise,this.onRejected,e)},a.resolve=function(e,t){var n=m(f,t);if(n.status===`error`)return a.reject(e,n.value);var r=n.value;if(r)p(e,r);else{e.state=s,e.outcome=t;for(var i=-1,o=e.queue.length;++i<o;)e.queue[i].callFulfilled(t)}return e},a.reject=function(e,t){e.state=o,e.outcome=t;for(var n=-1,r=e.queue.length;++n<r;)e.queue[n].callRejected(t);return e},l.resolve=function(e){return e instanceof this?e:a.resolve(new this(i),e)},l.reject=function(e){var t=new this(i);return a.reject(t,e)},l.all=function(e){var t=this;if(Object.prototype.toString.call(e)!==`[object Array]`)return this.reject(TypeError(`must be an array`));var n=e.length,r=!1;if(!n)return this.resolve([]);for(var o=Array(n),s=0,c=-1,l=new this(i);++c<n;)u(e[c],c);return l;function u(e,i){t.resolve(e).then(function(e){o[i]=e,++s!==n||r||(r=!0,a.resolve(l,o))},function(e){r||(r=!0,a.reject(l,e))})}},l.race=function(e){var t=this;if(Object.prototype.toString.call(e)!==`[object Array]`)return this.reject(TypeError(`must be an array`));var n=e.length,r=!1;if(!n)return this.resolve([]);for(var o=-1,s=new this(i);++o<n;)c=e[o],t.resolve(c).then(function(e){r||(r=!0,a.resolve(s,e))},function(e){r||(r=!0,a.reject(s,e))});var c;return s}},{immediate:36}],38:[function(e,t,n){var r={};(0,e(`./lib/utils/common`).assign)(r,e(`./lib/deflate`),e(`./lib/inflate`),e(`./lib/zlib/constants`)),t.exports=r},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(e,t,n){var r=e(`./zlib/deflate`),i=e(`./utils/common`),a=e(`./utils/strings`),o=e(`./zlib/messages`),s=e(`./zlib/zstream`),c=Object.prototype.toString,l=0,u=-1,d=0,f=8;function p(e){if(!(this instanceof p))return new p(e);this.options=i.assign({level:u,method:f,chunkSize:16384,windowBits:15,memLevel:8,strategy:d,to:``},e||{});var t=this.options;t.raw&&0<t.windowBits?t.windowBits=-t.windowBits:t.gzip&&0<t.windowBits&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg=``,this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;var n=r.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==l)throw Error(o[n]);if(t.header&&r.deflateSetHeader(this.strm,t.header),t.dictionary){var m;if(m=typeof t.dictionary==`string`?a.string2buf(t.dictionary):c.call(t.dictionary)===`[object ArrayBuffer]`?new Uint8Array(t.dictionary):t.dictionary,(n=r.deflateSetDictionary(this.strm,m))!==l)throw Error(o[n]);this._dict_set=!0}}function m(e,t){var n=new p(t);if(n.push(e,!0),n.err)throw n.msg||o[n.err];return n.result}p.prototype.push=function(e,t){var n,o,s=this.strm,u=this.options.chunkSize;if(this.ended)return!1;o=t===~~t?t:!0===t?4:0,s.input=typeof e==`string`?a.string2buf(e):c.call(e)===`[object ArrayBuffer]`?new Uint8Array(e):e,s.next_in=0,s.avail_in=s.input.length;do{if(s.avail_out===0&&(s.output=new i.Buf8(u),s.next_out=0,s.avail_out=u),(n=r.deflate(s,o))!==1&&n!==l)return this.onEnd(n),!(this.ended=!0);s.avail_out!==0&&(s.avail_in!==0||o!==4&&o!==2)||(this.options.to===`string`?this.onData(a.buf2binstring(i.shrinkBuf(s.output,s.next_out))):this.onData(i.shrinkBuf(s.output,s.next_out)))}while((0<s.avail_in||s.avail_out===0)&&n!==1);return o===4?(n=r.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===l):o!==2||(this.onEnd(l),!(s.avail_out=0))},p.prototype.onData=function(e){this.chunks.push(e)},p.prototype.onEnd=function(e){e===l&&(this.result=this.options.to===`string`?this.chunks.join(``):i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},n.Deflate=p,n.deflate=m,n.deflateRaw=function(e,t){return(t||={}).raw=!0,m(e,t)},n.gzip=function(e,t){return(t||={}).gzip=!0,m(e,t)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(e,t,n){var r=e(`./zlib/inflate`),i=e(`./utils/common`),a=e(`./utils/strings`),o=e(`./zlib/constants`),s=e(`./zlib/messages`),c=e(`./zlib/zstream`),l=e(`./zlib/gzheader`),u=Object.prototype.toString;function d(e){if(!(this instanceof d))return new d(e);this.options=i.assign({chunkSize:16384,windowBits:0,to:``},e||{});var t=this.options;t.raw&&0<=t.windowBits&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),!(0<=t.windowBits&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),15<t.windowBits&&t.windowBits<48&&!(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg=``,this.ended=!1,this.chunks=[],this.strm=new c,this.strm.avail_out=0;var n=r.inflateInit2(this.strm,t.windowBits);if(n!==o.Z_OK)throw Error(s[n]);this.header=new l,r.inflateGetHeader(this.strm,this.header)}function f(e,t){var n=new d(t);if(n.push(e,!0),n.err)throw n.msg||s[n.err];return n.result}d.prototype.push=function(e,t){var n,s,c,l,d,f,p=this.strm,m=this.options.chunkSize,h=this.options.dictionary,g=!1;if(this.ended)return!1;s=t===~~t?t:!0===t?o.Z_FINISH:o.Z_NO_FLUSH,p.input=typeof e==`string`?a.binstring2buf(e):u.call(e)===`[object ArrayBuffer]`?new Uint8Array(e):e,p.next_in=0,p.avail_in=p.input.length;do{if(p.avail_out===0&&(p.output=new i.Buf8(m),p.next_out=0,p.avail_out=m),(n=r.inflate(p,o.Z_NO_FLUSH))===o.Z_NEED_DICT&&h&&(f=typeof h==`string`?a.string2buf(h):u.call(h)===`[object ArrayBuffer]`?new Uint8Array(h):h,n=r.inflateSetDictionary(this.strm,f)),n===o.Z_BUF_ERROR&&!0===g&&(n=o.Z_OK,g=!1),n!==o.Z_STREAM_END&&n!==o.Z_OK)return this.onEnd(n),!(this.ended=!0);p.next_out&&(p.avail_out!==0&&n!==o.Z_STREAM_END&&(p.avail_in!==0||s!==o.Z_FINISH&&s!==o.Z_SYNC_FLUSH)||(this.options.to===`string`?(c=a.utf8border(p.output,p.next_out),l=p.next_out-c,d=a.buf2string(p.output,c),p.next_out=l,p.avail_out=m-l,l&&i.arraySet(p.output,p.output,c,l,0),this.onData(d)):this.onData(i.shrinkBuf(p.output,p.next_out)))),p.avail_in===0&&p.avail_out===0&&(g=!0)}while((0<p.avail_in||p.avail_out===0)&&n!==o.Z_STREAM_END);return n===o.Z_STREAM_END&&(s=o.Z_FINISH),s===o.Z_FINISH?(n=r.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===o.Z_OK):s!==o.Z_SYNC_FLUSH||(this.onEnd(o.Z_OK),!(p.avail_out=0))},d.prototype.onData=function(e){this.chunks.push(e)},d.prototype.onEnd=function(e){e===o.Z_OK&&(this.result=this.options.to===`string`?this.chunks.join(``):i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},n.Inflate=d,n.inflate=f,n.inflateRaw=function(e,t){return(t||={}).raw=!0,f(e,t)},n.ungzip=f},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(e,t,n){var r=typeof Uint8Array<`u`&&typeof Uint16Array<`u`&&typeof Int32Array<`u`;n.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if(typeof n!=`object`)throw TypeError(n+`must be non-object`);for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}}return e},n.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var i={arraySet:function(e,t,n,r,i){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+r),i);else for(var a=0;a<r;a++)e[i+a]=t[n+a]},flattenChunks:function(e){var t,n,r,i,a,o;for(t=r=0,n=e.length;t<n;t++)r+=e[t].length;for(o=new Uint8Array(r),t=i=0,n=e.length;t<n;t++)a=e[t],o.set(a,i),i+=a.length;return o}},a={arraySet:function(e,t,n,r,i){for(var a=0;a<r;a++)e[i+a]=t[n+a]},flattenChunks:function(e){return[].concat.apply([],e)}};n.setTyped=function(e){e?(n.Buf8=Uint8Array,n.Buf16=Uint16Array,n.Buf32=Int32Array,n.assign(n,i)):(n.Buf8=Array,n.Buf16=Array,n.Buf32=Array,n.assign(n,a))},n.setTyped(r)},{}],42:[function(e,t,n){var r=e(`./common`),i=!0,a=!0;try{String.fromCharCode.apply(null,[0])}catch{i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{a=!1}for(var o=new r.Buf8(256),s=0;s<256;s++)o[s]=252<=s?6:248<=s?5:240<=s?4:224<=s?3:192<=s?2:1;function c(e,t){if(t<65537&&(e.subarray&&a||!e.subarray&&i))return String.fromCharCode.apply(null,r.shrinkBuf(e,t));for(var n=``,o=0;o<t;o++)n+=String.fromCharCode(e[o]);return n}o[254]=o[254]=1,n.string2buf=function(e){var t,n,i,a,o,s=e.length,c=0;for(a=0;a<s;a++)(64512&(n=e.charCodeAt(a)))==55296&&a+1<s&&(64512&(i=e.charCodeAt(a+1)))==56320&&(n=65536+(n-55296<<10)+(i-56320),a++),c+=n<128?1:n<2048?2:n<65536?3:4;for(t=new r.Buf8(c),a=o=0;o<c;a++)(64512&(n=e.charCodeAt(a)))==55296&&a+1<s&&(64512&(i=e.charCodeAt(a+1)))==56320&&(n=65536+(n-55296<<10)+(i-56320),a++),n<128?t[o++]=n:(n<2048?t[o++]=192|n>>>6:(n<65536?t[o++]=224|n>>>12:(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63),t[o++]=128|n>>>6&63),t[o++]=128|63&n);return t},n.buf2binstring=function(e){return c(e,e.length)},n.binstring2buf=function(e){for(var t=new r.Buf8(e.length),n=0,i=t.length;n<i;n++)t[n]=e.charCodeAt(n);return t},n.buf2string=function(e,t){var n,r,i,a,s=t||e.length,l=Array(2*s);for(n=r=0;n<s;)if((i=e[n++])<128)l[r++]=i;else if(4<(a=o[i]))l[r++]=65533,n+=a-1;else{for(i&=a===2?31:a===3?15:7;1<a&&n<s;)i=i<<6|63&e[n++],a--;1<a?l[r++]=65533:i<65536?l[r++]=i:(i-=65536,l[r++]=55296|i>>10&1023,l[r++]=56320|1023&i)}return c(l,r)},n.utf8border=function(e,t){var n;for((t||=e.length)>e.length&&(t=e.length),n=t-1;0<=n&&(192&e[n])==128;)n--;return n<0||n===0?t:n+o[e[n]]>t?n:t}},{"./common":41}],43:[function(e,t,n){t.exports=function(e,t,n,r){for(var i=65535&e|0,a=e>>>16&65535|0,o=0;n!==0;){for(n-=o=2e3<n?2e3:n;a=a+(i=i+t[r++]|0)|0,--o;);i%=65521,a%=65521}return i|a<<16|0}},{}],44:[function(e,t,n){t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(e,t,n){var r=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t,n,i){var a=r,o=i+n;e^=-1;for(var s=i;s<o;s++)e=e>>>8^a[255&(e^t[s])];return-1^e}},{}],46:[function(e,t,n){var r,i=e(`../utils/common`),a=e(`./trees`),o=e(`./adler32`),s=e(`./crc32`),c=e(`./messages`),l=0,u=4,d=0,f=-2,p=-1,m=4,h=2,g=8,_=9,v=286,y=30,b=19,x=2*v+1,S=15,C=3,w=258,T=w+C+1,E=42,D=113,O=1,k=2,A=3,j=4;function M(e,t){return e.msg=c[t],t}function N(e){return(e<<1)-(4<e?9:0)}function ee(e){for(var t=e.length;0<=--t;)e[t]=0}function P(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&(i.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))}function F(e,t){a._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,P(e.strm)}function I(e,t){e.pending_buf[e.pending++]=t}function L(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function R(e,t){var n,r,i=e.max_chain_length,a=e.strstart,o=e.prev_length,s=e.nice_match,c=e.strstart>e.w_size-T?e.strstart-(e.w_size-T):0,l=e.window,u=e.w_mask,d=e.prev,f=e.strstart+w,p=l[a+o-1],m=l[a+o];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do if(l[(n=t)+o]===m&&l[n+o-1]===p&&l[n]===l[a]&&l[++n]===l[a+1]){a+=2,n++;do;while(l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&a<f);if(r=w-(f-a),a=f-w,o<r){if(e.match_start=t,s<=(o=r))break;p=l[a+o-1],m=l[a+o]}}while((t=d[t&u])>c&&--i!=0);return o<=e.lookahead?o:e.lookahead}function z(e){var t,n,r,a,c,l,u,d,f,p,m=e.w_size;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=m+(m-T)){for(i.arraySet(e.window,e.window,m,m,0),e.match_start-=m,e.strstart-=m,e.block_start-=m,t=n=e.hash_size;r=e.head[--t],e.head[t]=m<=r?r-m:0,--n;);for(t=n=m;r=e.prev[--t],e.prev[t]=m<=r?r-m:0,--n;);a+=m}if(e.strm.avail_in===0)break;if(l=e.strm,u=e.window,d=e.strstart+e.lookahead,f=a,p=void 0,p=l.avail_in,f<p&&(p=f),n=p===0?0:(l.avail_in-=p,i.arraySet(u,l.input,l.next_in,p,d),l.state.wrap===1?l.adler=o(l.adler,u,p,d):l.state.wrap===2&&(l.adler=s(l.adler,u,p,d)),l.next_in+=p,l.total_in+=p,p),e.lookahead+=n,e.lookahead+e.insert>=C)for(c=e.strstart-e.insert,e.ins_h=e.window[c],e.ins_h=(e.ins_h<<e.hash_shift^e.window[c+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[c+C-1])&e.hash_mask,e.prev[c&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=c,c++,e.insert--,!(e.lookahead+e.insert<C)););}while(e.lookahead<T&&e.strm.avail_in!==0)}function te(e,t){for(var n,r;;){if(e.lookahead<T){if(z(e),e.lookahead<T&&t===l)return O;if(e.lookahead===0)break}if(n=0,e.lookahead>=C&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+C-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),n!==0&&e.strstart-n<=e.w_size-T&&(e.match_length=R(e,n)),e.match_length>=C)if(r=a._tr_tally(e,e.strstart-e.match_start,e.match_length-C),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=C){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+C-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart,--e.match_length!=0;);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else r=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(F(e,!1),e.strm.avail_out===0))return O}return e.insert=e.strstart<C-1?e.strstart:C-1,t===u?(F(e,!0),e.strm.avail_out===0?A:j):e.last_lit&&(F(e,!1),e.strm.avail_out===0)?O:k}function B(e,t){for(var n,r,i;;){if(e.lookahead<T){if(z(e),e.lookahead<T&&t===l)return O;if(e.lookahead===0)break}if(n=0,e.lookahead>=C&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+C-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=C-1,n!==0&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-T&&(e.match_length=R(e,n),e.match_length<=5&&(e.strategy===1||e.match_length===C&&4096<e.strstart-e.match_start)&&(e.match_length=C-1)),e.prev_length>=C&&e.match_length<=e.prev_length){for(i=e.strstart+e.lookahead-C,r=a._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-C),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+C-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),--e.prev_length!=0;);if(e.match_available=0,e.match_length=C-1,e.strstart++,r&&(F(e,!1),e.strm.avail_out===0))return O}else if(e.match_available){if((r=a._tr_tally(e,0,e.window[e.strstart-1]))&&F(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return O}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&=(r=a._tr_tally(e,0,e.window[e.strstart-1]),0),e.insert=e.strstart<C-1?e.strstart:C-1,t===u?(F(e,!0),e.strm.avail_out===0?A:j):e.last_lit&&(F(e,!1),e.strm.avail_out===0)?O:k}function V(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}function ne(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=g,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new i.Buf16(2*x),this.dyn_dtree=new i.Buf16(2*(2*y+1)),this.bl_tree=new i.Buf16(2*(2*b+1)),ee(this.dyn_ltree),ee(this.dyn_dtree),ee(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(S+1),this.heap=new i.Buf16(2*v+1),ee(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(2*v+1),ee(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function re(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=h,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?E:D,e.adler=t.wrap===2?0:1,t.last_flush=l,a._tr_init(t),d):M(e,f)}function ie(e){var t=re(e);return t===d&&function(e){e.window_size=2*e.w_size,ee(e.head),e.max_lazy_match=r[e.level].max_lazy,e.good_match=r[e.level].good_length,e.nice_match=r[e.level].nice_length,e.max_chain_length=r[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=C-1,e.match_available=0,e.ins_h=0}(e.state),t}function ae(e,t,n,r,a,o){if(!e)return f;var s=1;if(t===p&&(t=6),r<0?(s=0,r=-r):15<r&&(s=2,r-=16),a<1||_<a||n!==g||r<8||15<r||t<0||9<t||o<0||m<o)return M(e,f);r===8&&(r=9);var c=new ne;return(e.state=c).strm=e,c.wrap=s,c.gzhead=null,c.w_bits=r,c.w_size=1<<c.w_bits,c.w_mask=c.w_size-1,c.hash_bits=a+7,c.hash_size=1<<c.hash_bits,c.hash_mask=c.hash_size-1,c.hash_shift=~~((c.hash_bits+C-1)/C),c.window=new i.Buf8(2*c.w_size),c.head=new i.Buf16(c.hash_size),c.prev=new i.Buf16(c.w_size),c.lit_bufsize=1<<a+6,c.pending_buf_size=4*c.lit_bufsize,c.pending_buf=new i.Buf8(c.pending_buf_size),c.d_buf=1*c.lit_bufsize,c.l_buf=3*c.lit_bufsize,c.level=t,c.strategy=o,c.method=n,ie(e)}r=[new V(0,0,0,0,function(e,t){var n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(z(e),e.lookahead===0&&t===l)return O;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((e.strstart===0||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,F(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-T&&(F(e,!1),e.strm.avail_out===0))return O}return e.insert=0,t===u?(F(e,!0),e.strm.avail_out===0?A:j):(e.strstart>e.block_start&&(F(e,!1),e.strm.avail_out),O)}),new V(4,4,8,4,te),new V(4,5,16,8,te),new V(4,6,32,32,te),new V(4,4,16,16,B),new V(8,16,32,32,B),new V(8,16,128,128,B),new V(8,32,128,256,B),new V(32,128,258,1024,B),new V(32,258,258,4096,B)],n.deflateInit=function(e,t){return ae(e,t,g,15,8,0)},n.deflateInit2=ae,n.deflateReset=ie,n.deflateResetKeep=re,n.deflateSetHeader=function(e,t){return e&&e.state&&e.state.wrap===2?(e.state.gzhead=t,d):f},n.deflate=function(e,t){var n,i,o,c;if(!e||!e.state||5<t||t<0)return e?M(e,f):f;if(i=e.state,!e.output||!e.input&&e.avail_in!==0||i.status===666&&t!==u)return M(e,e.avail_out===0?-5:f);if(i.strm=e,n=i.last_flush,i.last_flush=t,i.status===E)if(i.wrap===2)e.adler=0,I(i,31),I(i,139),I(i,8),i.gzhead?(I(i,+!!i.gzhead.text+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),I(i,255&i.gzhead.time),I(i,i.gzhead.time>>8&255),I(i,i.gzhead.time>>16&255),I(i,i.gzhead.time>>24&255),I(i,i.level===9?2:2<=i.strategy||i.level<2?4:0),I(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(I(i,255&i.gzhead.extra.length),I(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=s(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(I(i,0),I(i,0),I(i,0),I(i,0),I(i,0),I(i,i.level===9?2:2<=i.strategy||i.level<2?4:0),I(i,3),i.status=D);else{var p=g+(i.w_bits-8<<4)<<8;p|=(2<=i.strategy||i.level<2?0:i.level<6?1:i.level===6?2:3)<<6,i.strstart!==0&&(p|=32),p+=31-p%31,i.status=D,L(i,p),i.strstart!==0&&(L(i,e.adler>>>16),L(i,65535&e.adler)),e.adler=1}if(i.status===69)if(i.gzhead.extra){for(o=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),P(e),o=i.pending,i.pending!==i.pending_buf_size));)I(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(i.status===73)if(i.gzhead.name){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),P(e),o=i.pending,i.pending===i.pending_buf_size)){c=1;break}c=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,I(i,c)}while(c!==0);i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),c===0&&(i.gzindex=0,i.status=91)}else i.status=91;if(i.status===91)if(i.gzhead.comment){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),P(e),o=i.pending,i.pending===i.pending_buf_size)){c=1;break}c=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,I(i,c)}while(c!==0);i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),c===0&&(i.status=103)}else i.status=103;if(i.status===103&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&P(e),i.pending+2<=i.pending_buf_size&&(I(i,255&e.adler),I(i,e.adler>>8&255),e.adler=0,i.status=D)):i.status=D),i.pending!==0){if(P(e),e.avail_out===0)return i.last_flush=-1,d}else if(e.avail_in===0&&N(t)<=N(n)&&t!==u)return M(e,-5);if(i.status===666&&e.avail_in!==0)return M(e,-5);if(e.avail_in!==0||i.lookahead!==0||t!==l&&i.status!==666){var m=i.strategy===2?function(e,t){for(var n;;){if(e.lookahead===0&&(z(e),e.lookahead===0)){if(t===l)return O;break}if(e.match_length=0,n=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(F(e,!1),e.strm.avail_out===0))return O}return e.insert=0,t===u?(F(e,!0),e.strm.avail_out===0?A:j):e.last_lit&&(F(e,!1),e.strm.avail_out===0)?O:k}(i,t):i.strategy===3?function(e,t){for(var n,r,i,o,s=e.window;;){if(e.lookahead<=w){if(z(e),e.lookahead<=w&&t===l)return O;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=C&&0<e.strstart&&(r=s[i=e.strstart-1])===s[++i]&&r===s[++i]&&r===s[++i]){o=e.strstart+w;do;while(r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&i<o);e.match_length=w-(o-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=C?(n=a._tr_tally(e,1,e.match_length-C),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(F(e,!1),e.strm.avail_out===0))return O}return e.insert=0,t===u?(F(e,!0),e.strm.avail_out===0?A:j):e.last_lit&&(F(e,!1),e.strm.avail_out===0)?O:k}(i,t):r[i.level].func(i,t);if(m!==A&&m!==j||(i.status=666),m===O||m===A)return e.avail_out===0&&(i.last_flush=-1),d;if(m===k&&(t===1?a._tr_align(i):t!==5&&(a._tr_stored_block(i,0,0,!1),t===3&&(ee(i.head),i.lookahead===0&&(i.strstart=0,i.block_start=0,i.insert=0))),P(e),e.avail_out===0))return i.last_flush=-1,d}return t===u?i.wrap<=0?1:(i.wrap===2?(I(i,255&e.adler),I(i,e.adler>>8&255),I(i,e.adler>>16&255),I(i,e.adler>>24&255),I(i,255&e.total_in),I(i,e.total_in>>8&255),I(i,e.total_in>>16&255),I(i,e.total_in>>24&255)):(L(i,e.adler>>>16),L(i,65535&e.adler)),P(e),0<i.wrap&&(i.wrap=-i.wrap),i.pending===0?1:d):d},n.deflateEnd=function(e){var t;return e&&e.state?(t=e.state.status)!==E&&t!==69&&t!==73&&t!==91&&t!==103&&t!==D&&t!==666?M(e,f):(e.state=null,t===D?M(e,-3):d):f},n.deflateSetDictionary=function(e,t){var n,r,a,s,c,l,u,p,m=t.length;if(!e||!e.state||(s=(n=e.state).wrap)===2||s===1&&n.status!==E||n.lookahead)return f;for(s===1&&(e.adler=o(e.adler,t,m,0)),n.wrap=0,m>=n.w_size&&(s===0&&(ee(n.head),n.strstart=0,n.block_start=0,n.insert=0),p=new i.Buf8(n.w_size),i.arraySet(p,t,m-n.w_size,n.w_size,0),t=p,m=n.w_size),c=e.avail_in,l=e.next_in,u=e.input,e.avail_in=m,e.next_in=0,e.input=t,z(n);n.lookahead>=C;){for(r=n.strstart,a=n.lookahead-(C-1);n.ins_h=(n.ins_h<<n.hash_shift^n.window[r+C-1])&n.hash_mask,n.prev[r&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=r,r++,--a;);n.strstart=r,n.lookahead=C-1,z(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=C-1,n.match_available=0,e.next_in=l,e.input=u,e.avail_in=c,n.wrap=s,d},n.deflateInfo=`pako deflate (from Nodeca project)`},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(e,t,n){t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name=``,this.comment=``,this.hcrc=0,this.done=!1}},{}],48:[function(e,t,n){t.exports=function(e,t){var n=e.state,r=e.next_in,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T=e.input,E;i=r+(e.avail_in-5),a=e.next_out,E=e.output,o=a-(t-e.avail_out),s=a+(e.avail_out-257),c=n.dmax,l=n.wsize,u=n.whave,d=n.wnext,f=n.window,p=n.hold,m=n.bits,h=n.lencode,g=n.distcode,_=(1<<n.lenbits)-1,v=(1<<n.distbits)-1;e:do{m<15&&(p+=T[r++]<<m,m+=8,p+=T[r++]<<m,m+=8),y=h[p&_];t:for(;;){if(p>>>=b=y>>>24,m-=b,(b=y>>>16&255)==0)E[a++]=65535&y;else{if(!(16&b)){if(!(64&b)){y=h[(65535&y)+(p&(1<<b)-1)];continue t}if(32&b){n.mode=12;break e}e.msg=`invalid literal/length code`,n.mode=30;break e}x=65535&y,(b&=15)&&(m<b&&(p+=T[r++]<<m,m+=8),x+=p&(1<<b)-1,p>>>=b,m-=b),m<15&&(p+=T[r++]<<m,m+=8,p+=T[r++]<<m,m+=8),y=g[p&v];r:for(;;){if(p>>>=b=y>>>24,m-=b,!(16&(b=y>>>16&255))){if(!(64&b)){y=g[(65535&y)+(p&(1<<b)-1)];continue r}e.msg=`invalid distance code`,n.mode=30;break e}if(S=65535&y,m<(b&=15)&&(p+=T[r++]<<m,(m+=8)<b&&(p+=T[r++]<<m,m+=8)),c<(S+=p&(1<<b)-1)){e.msg=`invalid distance too far back`,n.mode=30;break e}if(p>>>=b,m-=b,(b=a-o)<S){if(u<(b=S-b)&&n.sane){e.msg=`invalid distance too far back`,n.mode=30;break e}if(w=f,(C=0)===d){if(C+=l-b,b<x){for(x-=b;E[a++]=f[C++],--b;);C=a-S,w=E}}else if(d<b){if(C+=l+d-b,(b-=d)<x){for(x-=b;E[a++]=f[C++],--b;);if(C=0,d<x){for(x-=b=d;E[a++]=f[C++],--b;);C=a-S,w=E}}}else if(C+=d-b,b<x){for(x-=b;E[a++]=f[C++],--b;);C=a-S,w=E}for(;2<x;)E[a++]=w[C++],E[a++]=w[C++],E[a++]=w[C++],x-=3;x&&(E[a++]=w[C++],1<x&&(E[a++]=w[C++]))}else{for(C=a-S;E[a++]=E[C++],E[a++]=E[C++],E[a++]=E[C++],2<(x-=3););x&&(E[a++]=E[C++],1<x&&(E[a++]=E[C++]))}break}}break}}while(r<i&&a<s);r-=x=m>>3,p&=(1<<(m-=x<<3))-1,e.next_in=r,e.next_out=a,e.avail_in=r<i?i-r+5:5-(r-i),e.avail_out=a<s?s-a+257:257-(a-s),n.hold=p,n.bits=m}},{}],49:[function(e,t,n){var r=e(`../utils/common`),i=e(`./adler32`),a=e(`./crc32`),o=e(`./inffast`),s=e(`./inftrees`),c=1,l=2,u=0,d=-2,f=1,p=852,m=592;function h(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function g(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function _(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg=``,t.wrap&&(e.adler=1&t.wrap),t.mode=f,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new r.Buf32(p),t.distcode=t.distdyn=new r.Buf32(m),t.sane=1,t.back=-1,u):d}function v(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,_(e)):d}function y(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15<t)?d:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,v(e))):d}function b(e,t){var n,r;return e?(r=new g,(e.state=r).window=null,(n=y(e,t))!==u&&(e.state=null),n):d}var x,S,C=!0;function w(e){if(C){var t;for(x=new r.Buf32(512),S=new r.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(s(c,e.lens,0,288,x,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;s(l,e.lens,0,32,S,0,e.work,{bits:5}),C=!1}e.lencode=x,e.lenbits=9,e.distcode=S,e.distbits=5}function T(e,t,n,i){var a,o=e.state;return o.window===null&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new r.Buf8(o.wsize)),i>=o.wsize?(r.arraySet(o.window,t,n-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(i<(a=o.wsize-o.wnext)&&(a=i),r.arraySet(o.window,t,n-i,a,o.wnext),(i-=a)?(r.arraySet(o.window,t,n-i,i,0),o.wnext=i,o.whave=o.wsize):(o.wnext+=a,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=a))),0}n.inflateReset=v,n.inflateReset2=y,n.inflateResetKeep=_,n.inflateInit=function(e){return b(e,15)},n.inflateInit2=b,n.inflate=function(e,t){var n,p,m,g,_,v,y,b,x,S,C,E,D,O,k,A,j,M,N,ee,P,F,I,L,R=0,z=new r.Buf8(4),te=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&e.avail_in!==0)return d;(n=e.state).mode===12&&(n.mode=13),_=e.next_out,m=e.output,y=e.avail_out,g=e.next_in,p=e.input,v=e.avail_in,b=n.hold,x=n.bits,S=v,C=y,F=u;e:for(;;)switch(n.mode){case f:if(n.wrap===0){n.mode=13;break}for(;x<16;){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}if(2&n.wrap&&b===35615){z[n.check=0]=255&b,z[1]=b>>>8&255,n.check=a(n.check,z,2,0),x=b=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&b)<<8)+(b>>8))%31){e.msg=`incorrect header check`,n.mode=30;break}if((15&b)!=8){e.msg=`unknown compression method`,n.mode=30;break}if(x-=4,P=8+(15&(b>>>=4)),n.wbits===0)n.wbits=P;else if(P>n.wbits){e.msg=`invalid window size`,n.mode=30;break}n.dmax=1<<P,e.adler=n.check=1,n.mode=512&b?10:12,x=b=0;break;case 2:for(;x<16;){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}if(n.flags=b,(255&n.flags)!=8){e.msg=`unknown compression method`,n.mode=30;break}if(57344&n.flags){e.msg=`unknown header flags set`,n.mode=30;break}n.head&&(n.head.text=b>>8&1),512&n.flags&&(z[0]=255&b,z[1]=b>>>8&255,n.check=a(n.check,z,2,0)),x=b=0,n.mode=3;case 3:for(;x<32;){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}n.head&&(n.head.time=b),512&n.flags&&(z[0]=255&b,z[1]=b>>>8&255,z[2]=b>>>16&255,z[3]=b>>>24&255,n.check=a(n.check,z,4,0)),x=b=0,n.mode=4;case 4:for(;x<16;){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}n.head&&(n.head.xflags=255&b,n.head.os=b>>8),512&n.flags&&(z[0]=255&b,z[1]=b>>>8&255,n.check=a(n.check,z,2,0)),x=b=0,n.mode=5;case 5:if(1024&n.flags){for(;x<16;){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}n.length=b,n.head&&(n.head.extra_len=b),512&n.flags&&(z[0]=255&b,z[1]=b>>>8&255,n.check=a(n.check,z,2,0)),x=b=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&(v<(E=n.length)&&(E=v),E&&(n.head&&(P=n.head.extra_len-n.length,n.head.extra||(n.head.extra=Array(n.head.extra_len)),r.arraySet(n.head.extra,p,g,E,P)),512&n.flags&&(n.check=a(n.check,p,E,g)),v-=E,g+=E,n.length-=E),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(v===0)break e;for(E=0;P=p[g+E++],n.head&&P&&n.length<65536&&(n.head.name+=String.fromCharCode(P)),P&&E<v;);if(512&n.flags&&(n.check=a(n.check,p,E,g)),v-=E,g+=E,P)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=8;case 8:if(4096&n.flags){if(v===0)break e;for(E=0;P=p[g+E++],n.head&&P&&n.length<65536&&(n.head.comment+=String.fromCharCode(P)),P&&E<v;);if(512&n.flags&&(n.check=a(n.check,p,E,g)),v-=E,g+=E,P)break e}else n.head&&(n.head.comment=null);n.mode=9;case 9:if(512&n.flags){for(;x<16;){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}if(b!==(65535&n.check)){e.msg=`header crc mismatch`,n.mode=30;break}x=b=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;x<32;){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}e.adler=n.check=h(b),x=b=0,n.mode=11;case 11:if(n.havedict===0)return e.next_out=_,e.avail_out=y,e.next_in=g,e.avail_in=v,n.hold=b,n.bits=x,2;e.adler=n.check=1,n.mode=12;case 12:if(t===5||t===6)break e;case 13:if(n.last){b>>>=7&x,x-=7&x,n.mode=27;break}for(;x<3;){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}switch(n.last=1&b,--x,3&(b>>>=1)){case 0:n.mode=14;break;case 1:if(w(n),n.mode=20,t!==6)break;b>>>=2,x-=2;break e;case 2:n.mode=17;break;case 3:e.msg=`invalid block type`,n.mode=30}b>>>=2,x-=2;break;case 14:for(b>>>=7&x,x-=7&x;x<32;){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}if((65535&b)!=(b>>>16^65535)){e.msg=`invalid stored block lengths`,n.mode=30;break}if(n.length=65535&b,x=b=0,n.mode=15,t===6)break e;case 15:n.mode=16;case 16:if(E=n.length){if(v<E&&(E=v),y<E&&(E=y),E===0)break e;r.arraySet(m,p,g,E,_),v-=E,g+=E,y-=E,_+=E,n.length-=E;break}n.mode=12;break;case 17:for(;x<14;){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}if(n.nlen=257+(31&b),b>>>=5,x-=5,n.ndist=1+(31&b),b>>>=5,x-=5,n.ncode=4+(15&b),b>>>=4,x-=4,286<n.nlen||30<n.ndist){e.msg=`too many length or distance symbols`,n.mode=30;break}n.have=0,n.mode=18;case 18:for(;n.have<n.ncode;){for(;x<3;){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}n.lens[te[n.have++]]=7&b,b>>>=3,x-=3}for(;n.have<19;)n.lens[te[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,I={bits:n.lenbits},F=s(0,n.lens,0,19,n.lencode,0,n.work,I),n.lenbits=I.bits,F){e.msg=`invalid code lengths set`,n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have<n.nlen+n.ndist;){for(;A=(R=n.lencode[b&(1<<n.lenbits)-1])>>>16&255,j=65535&R,!((k=R>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}if(j<16)b>>>=k,x-=k,n.lens[n.have++]=j;else{if(j===16){for(L=k+2;x<L;){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}if(b>>>=k,x-=k,n.have===0){e.msg=`invalid bit length repeat`,n.mode=30;break}P=n.lens[n.have-1],E=3+(3&b),b>>>=2,x-=2}else if(j===17){for(L=k+3;x<L;){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}x-=k,P=0,E=3+(7&(b>>>=k)),b>>>=3,x-=3}else{for(L=k+7;x<L;){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}x-=k,P=0,E=11+(127&(b>>>=k)),b>>>=7,x-=7}if(n.have+E>n.nlen+n.ndist){e.msg=`invalid bit length repeat`,n.mode=30;break}for(;E--;)n.lens[n.have++]=P}}if(n.mode===30)break;if(n.lens[256]===0){e.msg=`invalid code -- missing end-of-block`,n.mode=30;break}if(n.lenbits=9,I={bits:n.lenbits},F=s(c,n.lens,0,n.nlen,n.lencode,0,n.work,I),n.lenbits=I.bits,F){e.msg=`invalid literal/lengths set`,n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,I={bits:n.distbits},F=s(l,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,I),n.distbits=I.bits,F){e.msg=`invalid distances set`,n.mode=30;break}if(n.mode=20,t===6)break e;case 20:n.mode=21;case 21:if(6<=v&&258<=y){e.next_out=_,e.avail_out=y,e.next_in=g,e.avail_in=v,n.hold=b,n.bits=x,o(e,C),_=e.next_out,m=e.output,y=e.avail_out,g=e.next_in,p=e.input,v=e.avail_in,b=n.hold,x=n.bits,n.mode===12&&(n.back=-1);break}for(n.back=0;A=(R=n.lencode[b&(1<<n.lenbits)-1])>>>16&255,j=65535&R,!((k=R>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}if(A&&!(240&A)){for(M=k,N=A,ee=j;A=(R=n.lencode[ee+((b&(1<<M+N)-1)>>M)])>>>16&255,j=65535&R,!(M+(k=R>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}b>>>=M,x-=M,n.back+=M}if(b>>>=k,x-=k,n.back+=k,n.length=j,A===0){n.mode=26;break}if(32&A){n.back=-1,n.mode=12;break}if(64&A){e.msg=`invalid literal/length code`,n.mode=30;break}n.extra=15&A,n.mode=22;case 22:if(n.extra){for(L=n.extra;x<L;){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}n.length+=b&(1<<n.extra)-1,b>>>=n.extra,x-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;A=(R=n.distcode[b&(1<<n.distbits)-1])>>>16&255,j=65535&R,!((k=R>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}if(!(240&A)){for(M=k,N=A,ee=j;A=(R=n.distcode[ee+((b&(1<<M+N)-1)>>M)])>>>16&255,j=65535&R,!(M+(k=R>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}b>>>=M,x-=M,n.back+=M}if(b>>>=k,x-=k,n.back+=k,64&A){e.msg=`invalid distance code`,n.mode=30;break}n.offset=j,n.extra=15&A,n.mode=24;case 24:if(n.extra){for(L=n.extra;x<L;){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}n.offset+=b&(1<<n.extra)-1,b>>>=n.extra,x-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg=`invalid distance too far back`,n.mode=30;break}n.mode=25;case 25:if(y===0)break e;if(E=C-y,n.offset>E){if((E=n.offset-E)>n.whave&&n.sane){e.msg=`invalid distance too far back`,n.mode=30;break}D=E>n.wnext?(E-=n.wnext,n.wsize-E):n.wnext-E,E>n.length&&(E=n.length),O=n.window}else O=m,D=_-n.offset,E=n.length;for(y<E&&(E=y),y-=E,n.length-=E;m[_++]=O[D++],--E;);n.length===0&&(n.mode=21);break;case 26:if(y===0)break e;m[_++]=n.length,y--,n.mode=21;break;case 27:if(n.wrap){for(;x<32;){if(v===0)break e;v--,b|=p[g++]<<x,x+=8}if(C-=y,e.total_out+=C,n.total+=C,C&&(e.adler=n.check=n.flags?a(n.check,m,C,_-C):i(n.check,m,C,_-C)),C=y,(n.flags?b:h(b))!==n.check){e.msg=`incorrect data check`,n.mode=30;break}x=b=0}n.mode=28;case 28:if(n.wrap&&n.flags){for(;x<32;){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}if(b!==(4294967295&n.total)){e.msg=`incorrect length check`,n.mode=30;break}x=b=0}n.mode=29;case 29:F=1;break e;case 30:F=-3;break e;case 31:return-4;case 32:default:return d}return e.next_out=_,e.avail_out=y,e.next_in=g,e.avail_in=v,n.hold=b,n.bits=x,(n.wsize||C!==e.avail_out&&n.mode<30&&(n.mode<27||t!==4))&&T(e,e.output,e.next_out,C-e.avail_out)?(n.mode=31,-4):(S-=e.avail_in,C-=e.avail_out,e.total_in+=S,e.total_out+=C,n.total+=C,n.wrap&&C&&(e.adler=n.check=n.flags?a(n.check,m,C,e.next_out-C):i(n.check,m,C,e.next_out-C)),e.data_type=n.bits+(n.last?64:0)+(n.mode===12?128:0)+(n.mode===20||n.mode===15?256:0),(S==0&&C===0||t===4)&&F===u&&(F=-5),F)},n.inflateEnd=function(e){if(!e||!e.state)return d;var t=e.state;return t.window&&=null,e.state=null,u},n.inflateGetHeader=function(e,t){var n;return e&&e.state&&2&(n=e.state).wrap?((n.head=t).done=!1,u):d},n.inflateSetDictionary=function(e,t){var n,r=t.length;return e&&e.state?(n=e.state).wrap!==0&&n.mode!==11?d:n.mode===11&&i(1,t,r,0)!==n.check?-3:T(e,t,r,r)?(n.mode=31,-4):(n.havedict=1,u):d},n.inflateInfo=`pako inflate (from Nodeca project)`},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(e,t,n){var r=e(`../utils/common`),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],a=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],o=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],s=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,n,c,l,u,d,f){var p,m,h,g,_,v,y,b,x,S=f.bits,C=0,w=0,T=0,E=0,D=0,O=0,k=0,A=0,j=0,M=0,N=null,ee=0,P=new r.Buf16(16),F=new r.Buf16(16),I=null,L=0;for(C=0;C<=15;C++)P[C]=0;for(w=0;w<c;w++)P[t[n+w]]++;for(D=S,E=15;1<=E&&P[E]===0;E--);if(E<D&&(D=E),E===0)return l[u++]=20971520,l[u++]=20971520,f.bits=1,0;for(T=1;T<E&&P[T]===0;T++);for(D<T&&(D=T),C=A=1;C<=15;C++)if(A<<=1,(A-=P[C])<0)return-1;if(0<A&&(e===0||E!==1))return-1;for(F[1]=0,C=1;C<15;C++)F[C+1]=F[C]+P[C];for(w=0;w<c;w++)t[n+w]!==0&&(d[F[t[n+w]]++]=w);if(v=e===0?(N=I=d,19):e===1?(N=i,ee-=257,I=a,L-=257,256):(N=o,I=s,-1),C=T,_=u,k=w=M=0,h=-1,g=(j=1<<(O=D))-1,e===1&&852<j||e===2&&592<j)return 1;for(;;){for(y=C-k,x=d[w]<v?(b=0,d[w]):d[w]>v?(b=I[L+d[w]],N[ee+d[w]]):(b=96,0),p=1<<C-k,T=m=1<<O;l[_+(M>>k)+(m-=p)]=y<<24|b<<16|x|0,m!==0;);for(p=1<<C-1;M&p;)p>>=1;if(p===0?M=0:(M&=p-1,M+=p),w++,--P[C]==0){if(C===E)break;C=t[n+d[w]]}if(D<C&&(M&g)!==h){for(k===0&&(k=D),_+=T,A=1<<(O=C-k);O+k<E&&!((A-=P[O+k])<=0);)O++,A<<=1;if(j+=1<<O,e===1&&852<j||e===2&&592<j)return 1;l[h=M&g]=D<<24|O<<16|_-u|0}}return M!==0&&(l[_+M]=C-k<<24|4194304),f.bits=D,0}},{"../utils/common":41}],51:[function(e,t,n){t.exports={2:`need dictionary`,1:`stream end`,0:``,"-1":`file error`,"-2":`stream error`,"-3":`data error`,"-4":`insufficient memory`,"-5":`buffer error`,"-6":`incompatible version`}},{}],52:[function(e,t,n){var r=e(`../utils/common`),i=0,a=1;function o(e){for(var t=e.length;0<=--t;)e[t]=0}var s=0,c=29,l=256,u=l+1+c,d=30,f=19,p=2*u+1,m=15,h=16,g=7,_=256,v=16,y=17,b=18,x=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],S=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],C=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],w=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],T=Array(2*(u+2));o(T);var E=Array(2*d);o(E);var D=Array(512);o(D);var O=Array(256);o(O);var k=Array(c);o(k);var A,j,M,N=Array(d);function ee(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}function P(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function F(e){return e<256?D[e]:D[256+(e>>>7)]}function I(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function L(e,t,n){e.bi_valid>h-n?(e.bi_buf|=t<<e.bi_valid&65535,I(e,e.bi_buf),e.bi_buf=t>>h-e.bi_valid,e.bi_valid+=n-h):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)}function R(e,t,n){L(e,n[2*t],n[2*t+1])}function z(e,t){for(var n=0;n|=1&e,e>>>=1,n<<=1,0<--t;);return n>>>1}function te(e,t,n){var r,i,a=Array(m+1),o=0;for(r=1;r<=m;r++)a[r]=o=o+n[r-1]<<1;for(i=0;i<=t;i++){var s=e[2*i+1];s!==0&&(e[2*i]=z(a[s]++,s))}}function B(e){var t;for(t=0;t<u;t++)e.dyn_ltree[2*t]=0;for(t=0;t<d;t++)e.dyn_dtree[2*t]=0;for(t=0;t<f;t++)e.bl_tree[2*t]=0;e.dyn_ltree[2*_]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function V(e){8<e.bi_valid?I(e,e.bi_buf):0<e.bi_valid&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function ne(e,t,n,r){var i=2*t,a=2*n;return e[i]<e[a]||e[i]===e[a]&&r[t]<=r[n]}function re(e,t,n){for(var r=e.heap[n],i=n<<1;i<=e.heap_len&&(i<e.heap_len&&ne(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!ne(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r}function ie(e,t,n){var r,i,a,o,s=0;if(e.last_lit!==0)for(;r=e.pending_buf[e.d_buf+2*s]<<8|e.pending_buf[e.d_buf+2*s+1],i=e.pending_buf[e.l_buf+s],s++,r===0?R(e,i,t):(R(e,(a=O[i])+l+1,t),(o=x[a])!==0&&L(e,i-=k[a],o),R(e,a=F(--r),n),(o=S[a])!==0&&L(e,r-=N[a],o)),s<e.last_lit;);R(e,_,t)}function ae(e,t){var n,r,i,a=t.dyn_tree,o=t.stat_desc.static_tree,s=t.stat_desc.has_stree,c=t.stat_desc.elems,l=-1;for(e.heap_len=0,e.heap_max=p,n=0;n<c;n++)a[2*n]===0?a[2*n+1]=0:(e.heap[++e.heap_len]=l=n,e.depth[n]=0);for(;e.heap_len<2;)a[2*(i=e.heap[++e.heap_len]=l<2?++l:0)]=1,e.depth[i]=0,e.opt_len--,s&&(e.static_len-=o[2*i+1]);for(t.max_code=l,n=e.heap_len>>1;1<=n;n--)re(e,a,n);for(i=c;n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],re(e,a,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,a[2*i]=a[2*n]+a[2*r],e.depth[i]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,a[2*n+1]=a[2*r+1]=i,e.heap[1]=i++,re(e,a,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,i,a,o,s,c=t.dyn_tree,l=t.max_code,u=t.stat_desc.static_tree,d=t.stat_desc.has_stree,f=t.stat_desc.extra_bits,h=t.stat_desc.extra_base,g=t.stat_desc.max_length,_=0;for(a=0;a<=m;a++)e.bl_count[a]=0;for(c[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n<p;n++)g<(a=c[2*c[2*(r=e.heap[n])+1]+1]+1)&&(a=g,_++),c[2*r+1]=a,l<r||(e.bl_count[a]++,o=0,h<=r&&(o=f[r-h]),s=c[2*r],e.opt_len+=s*(a+o),d&&(e.static_len+=s*(u[2*r+1]+o)));if(_!==0){do{for(a=g-1;e.bl_count[a]===0;)a--;e.bl_count[a]--,e.bl_count[a+1]+=2,e.bl_count[g]--,_-=2}while(0<_);for(a=g;a!==0;a--)for(r=e.bl_count[a];r!==0;)l<(i=e.heap[--n])||(c[2*i+1]!==a&&(e.opt_len+=(a-c[2*i+1])*c[2*i],c[2*i+1]=a),r--)}}(e,t),te(a,l,e.bl_count)}function oe(e,t,n){var r,i,a=-1,o=t[1],s=0,c=7,l=4;for(o===0&&(c=138,l=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)i=o,o=t[2*(r+1)+1],++s<c&&i===o||(s<l?e.bl_tree[2*i]+=s:i===0?s<=10?e.bl_tree[2*y]++:e.bl_tree[2*b]++:(i!==a&&e.bl_tree[2*i]++,e.bl_tree[2*v]++),a=i,l=(s=0)===o?(c=138,3):i===o?(c=6,3):(c=7,4))}function se(e,t,n){var r,i,a=-1,o=t[1],s=0,c=7,l=4;for(o===0&&(c=138,l=3),r=0;r<=n;r++)if(i=o,o=t[2*(r+1)+1],!(++s<c&&i===o)){if(s<l)for(;R(e,i,e.bl_tree),--s!=0;);else i===0?s<=10?(R(e,y,e.bl_tree),L(e,s-3,3)):(R(e,b,e.bl_tree),L(e,s-11,7)):(i!==a&&(R(e,i,e.bl_tree),s--),R(e,v,e.bl_tree),L(e,s-3,2));a=i,l=(s=0)===o?(c=138,3):i===o?(c=6,3):(c=7,4)}}o(N);var ce=!1;function le(e,t,n,i){L(e,(s<<1)+ +!!i,3),function(e,t,n,i){V(e),i&&(I(e,n),I(e,~n)),r.arraySet(e.pending_buf,e.window,t,n,e.pending),e.pending+=n}(e,t,n,!0)}n._tr_init=function(e){ce||=(function(){var e,t,n,r,i,a=Array(m+1);for(r=n=0;r<c-1;r++)for(k[r]=n,e=0;e<1<<x[r];e++)O[n++]=r;for(O[n-1]=r,r=i=0;r<16;r++)for(N[r]=i,e=0;e<1<<S[r];e++)D[i++]=r;for(i>>=7;r<d;r++)for(N[r]=i<<7,e=0;e<1<<S[r]-7;e++)D[256+i++]=r;for(t=0;t<=m;t++)a[t]=0;for(e=0;e<=143;)T[2*e+1]=8,e++,a[8]++;for(;e<=255;)T[2*e+1]=9,e++,a[9]++;for(;e<=279;)T[2*e+1]=7,e++,a[7]++;for(;e<=287;)T[2*e+1]=8,e++,a[8]++;for(te(T,u+1,a),e=0;e<d;e++)E[2*e+1]=5,E[2*e]=z(e,5);A=new ee(T,x,l+1,u,m),j=new ee(E,S,0,d,m),M=new ee([],C,0,f,g)}(),!0),e.l_desc=new P(e.dyn_ltree,A),e.d_desc=new P(e.dyn_dtree,j),e.bl_desc=new P(e.bl_tree,M),e.bi_buf=0,e.bi_valid=0,B(e)},n._tr_stored_block=le,n._tr_flush_block=function(e,t,n,r){var o,s,c=0;0<e.level?(e.strm.data_type===2&&(e.strm.data_type=function(e){var t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&e.dyn_ltree[2*t]!==0)return i;if(e.dyn_ltree[18]!==0||e.dyn_ltree[20]!==0||e.dyn_ltree[26]!==0)return a;for(t=32;t<l;t++)if(e.dyn_ltree[2*t]!==0)return a;return i}(e)),ae(e,e.l_desc),ae(e,e.d_desc),c=function(e){var t;for(oe(e,e.dyn_ltree,e.l_desc.max_code),oe(e,e.dyn_dtree,e.d_desc.max_code),ae(e,e.bl_desc),t=f-1;3<=t&&e.bl_tree[2*w[t]+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),o=e.opt_len+3+7>>>3,(s=e.static_len+3+7>>>3)<=o&&(o=s)):o=s=n+5,n+4<=o&&t!==-1?le(e,t,n,r):e.strategy===4||s===o?(L(e,2+ +!!r,3),ie(e,T,E)):(L(e,4+ +!!r,3),function(e,t,n,r){var i;for(L(e,t-257,5),L(e,n-1,5),L(e,r-4,4),i=0;i<r;i++)L(e,e.bl_tree[2*w[i]+1],3);se(e,e.dyn_ltree,t-1),se(e,e.dyn_dtree,n-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,c+1),ie(e,e.dyn_ltree,e.dyn_dtree)),B(e),r&&V(e)},n._tr_tally=function(e,t,n){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,t===0?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(O[n]+l+1)]++,e.dyn_dtree[2*F(t)]++),e.last_lit===e.lit_bufsize-1},n._tr_align=function(e){L(e,2,3),R(e,_,T),function(e){e.bi_valid===16?(I(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},{"../utils/common":41}],53:[function(e,t,n){t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg=``,this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(e,t,n){(function(e){(function(e,t){if(!e.setImmediate){var n,r,i,a,o=1,s={},c=!1,l=e.document,u=Object.getPrototypeOf&&Object.getPrototypeOf(e);u=u&&u.setTimeout?u:e,n={}.toString.call(e.process)===`[object process]`?function(e){process.nextTick(function(){f(e)})}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage(``,`*`),e.onmessage=n,t}}()?(a=`setImmediate$`+Math.random()+`$`,e.addEventListener?e.addEventListener(`message`,p,!1):e.attachEvent(`onmessage`,p),function(t){e.postMessage(a+t,`*`)}):e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){f(e.data)},function(e){i.port2.postMessage(e)}):l&&`onreadystatechange`in l.createElement(`script`)?(r=l.documentElement,function(e){var t=l.createElement(`script`);t.onreadystatechange=function(){f(e),t.onreadystatechange=null,r.removeChild(t),t=null},r.appendChild(t)}):function(e){setTimeout(f,0,e)},u.setImmediate=function(e){typeof e!=`function`&&(e=Function(``+e));for(var t=Array(arguments.length-1),r=0;r<t.length;r++)t[r]=arguments[r+1];return s[o]={callback:e,args:t},n(o),o++},u.clearImmediate=d}function d(e){delete s[e]}function f(e){if(c)setTimeout(f,0,e);else{var n=s[e];if(n){c=!0;try{(function(e){var n=e.callback,r=e.args;switch(r.length){case 0:n();break;case 1:n(r[0]);break;case 2:n(r[0],r[1]);break;case 3:n(r[0],r[1],r[2]);break;default:n.apply(t,r)}})(n)}finally{d(e),c=!1}}}}function p(t){t.source===e&&typeof t.data==`string`&&t.data.indexOf(a)===0&&f(+t.data.slice(a.length))}})(typeof self>`u`?e===void 0?this:e:self)}).call(this,typeof global<`u`?global:typeof self<`u`?self:typeof window<`u`?window:{})},{}]},{},[10])(10)})})),pr=s(((e,t)=>{t.exports={}})),mr=s((e=>{var t=/[|\\{}()[\]^$+*?.]/g,n=Object.prototype.hasOwnProperty,r=function(e,t){return n.apply(e,[t])};e.escapeRegExpChars=function(e){return e?String(e).replace(t,`\\$&`):``};var i={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&#34;`,"'":`&#39;`},a=/[&<>'"]/g;function o(e){return i[e]||e}var s=`var _ENCODE_HTML_RULES = {
15
15
  "&": "&amp;"
16
16
  , "<": "&lt;"
@@ -174,94 +174,7 @@ suspend fun assert<%= formClass %>NotContainsWarning(
174
174
  `),...this.declarations].filter(e=>e).join(`
175
175
 
176
176
  `)+`
177
- `}function Ja(e){let t=new Map;for(let n of e){let e=t.get(n.moduleName);e||t.set(n.moduleName,e={moduleName:n.moduleName}),n.isDefault?e.defaultImport=n.name:n.isNamespace?e.namespaceImport=n.name:n.isType?(e.typedImports??=new Set).add(n.name):n.name&&(e.namedImports??=new Set).add(n.name)}return Array.from(t.values())}function Ya(e){let t=[...new Set([...e.namedImports??[],...e.typedImports??[]])].sort((e,t)=>e.localeCompare(t)),n=t.every(t=>!e.namedImports?.has(t)),r=t.length>0?n?`type { ${t.join(`, `)} }`:`{ ${t.map(t=>e.namedImports?.has(t)?t:`type ${t}`).join(`, `)} }`:null,i=[e.defaultImport||null,e.namespaceImport?`* as ${e.namespaceImport}`:null,r].filter(e=>e).join(`, `),a=JSON.stringify(e.moduleName);return i?`import ${i} from ${a};`:`import ${a};`}var Xa=`en-US`,Za=JSON.parse(`["en-GB","en-US","fr-FR","pt-PT"]`);function Qa({defaultValue:e=Xa,disabled:t}){let[n,r]=Zr(`defaultLocale`,e);return(0,U.jsxs)(`div`,{className:`builder-config-field`,children:[(0,U.jsx)(`label`,{children:`Default locale`}),(0,U.jsx)(`select`,{value:n,onChange:e=>{r(e.target.value)},disabled:t,children:Za.map(e=>(0,U.jsx)(`option`,{value:e,children:e},e))})]})}var $a=`json`;function eo({defaultValue:e=$a,disabled:t}){let[n,r]=Zr(`useTableValuesSerializer`,!1),i=(0,C.useRef)(n),[a,o]=Zr(`serializationFormat`,e);return(0,U.jsxs)(`div`,{className:`builder-config-field`,children:[(0,U.jsx)(`label`,{children:`Serialization format`}),(0,U.jsxs)(`select`,{value:a,onChange:e=>{o(e.target.value),e.target.value===`xml`?(i.current=n,r(!0)):r(i.current)},disabled:t,children:[(0,U.jsx)(`option`,{value:`json`,children:`JSON`}),(0,U.jsx)(`option`,{value:`xml`,children:`XML`})]})]})}function to({disabled:e}){let[t]=Zr(`serializationFormat`,$a);return(0,U.jsx)($r,{disabled:e||t===`xml`})}var no=/([\p{Ll}\d])(\p{Lu})/gu,ro=/(\p{Lu})([\p{Lu}][\p{Ll}])/gu,io=/(\d)\p{Ll}|(\p{L})\d/u,ao=/[^\p{L}\d]+/giu,oo=`$1\0$2`,K=``;function q(e){let t=e.trim();t=t.replace(no,oo).replace(ro,oo),t=t.replace(ao,`\0`);let n=0,r=t.length;for(;t.charAt(n)===`\0`;)n++;if(n===r)return[];for(;t.charAt(r-1)===`\0`;)r--;return t.slice(n,r).split(/\0/g)}function so(e){let t=q(e);for(let e=0;e<t.length;e++){let n=t[e],r=io.exec(n);if(r){let i=r.index+(r[1]??r[2]).length;t.splice(e,1,n.slice(0,i),n.slice(i))}}return t}function co(e,t){let[n,r,i]=bo(e,t);return n+r.map(go(t?.locale)).join(t?.delimiter??` `)+i}function lo(e,t){let[n,r,i]=bo(e,t),a=go(t?.locale),o=_o(t?.locale),s=t?.mergeAmbiguousCharacters?vo(a,o):yo(a,o);return n+r.map((e,t)=>t===0?a(e):s(e,t)).join(t?.delimiter??``)+i}function uo(e,t){let[n,r,i]=bo(e,t),a=go(t?.locale),o=_o(t?.locale),s=t?.mergeAmbiguousCharacters?vo(a,o):yo(a,o);return n+r.map(s).join(t?.delimiter??``)+i}function fo(e,t){let[n,r,i]=bo(e,t),a=go(t?.locale),o=_o(t?.locale);return n+r.map(vo(a,o)).join(t?.delimiter??` `)+i}function po(e,t){let[n,r,i]=bo(e,t);return n+r.map(_o(t?.locale)).join(t?.delimiter??`_`)+i}function mo(e,t){return co(e,{delimiter:`-`,...t})}function ho(e,t){let[n,r,i]=bo(e,t),a=go(t?.locale),o=vo(a,_o(t?.locale));return n+r.map((e,t)=>t===0?o(e):a(e)).join(t?.delimiter??` `)+i}function go(e){return e===!1?e=>e.toLowerCase():t=>t.toLocaleLowerCase(e)}function _o(e){return e===!1?e=>e.toUpperCase():t=>t.toLocaleUpperCase(e)}function vo(e,t){return n=>`${t(n[0])}${e(n.slice(1))}`}function yo(e,t){return(n,r)=>{let i=n[0];return(r>0&&i>=`0`&&i<=`9`?`_`+i:t(i))+e(n.slice(1))}}function bo(e,t={}){let n=t.split??(t.separateNumbers?so:q),r=t.prefixCharacters??K,i=t.suffixCharacters??K,a=0,o=e.length;for(;a<e.length;){let t=e.charAt(a);if(!r.includes(t))break;a++}for(;o>a;){let t=o-1,n=e.charAt(t);if(!i.includes(n))break;o=t}return[e.slice(0,a),n(e.slice(a,o)),e.slice(o)]}var xo=`import { LoadAction } from "@ostack.tech/ui-kform";
178
- import { decode<%= formClass %>FromString, <%= formClass %>FormMode } from "<%= kmpModuleName %>";
179
- import { use<%= formClass %>Context } from "../<%= formClass %>Context.ts";
180
-
181
- export function Load() {
182
- const { externalContexts } = use<%= formClass %>Context();
183
-
184
- return (
185
- externalContexts.mode !== <%= formClass %>FormMode.READ && (
186
- <LoadAction
187
- decode={async (file) => decode<%= formClass %>FromString(await file.text())}
188
- mimeTypes={["<%= serializationMimeType %>"]}
189
- extensions={[".<%= serializationFormat %>"]}
190
- />
191
- )
192
- );
193
- }
194
- `,So=`import { SaveAction } from "@ostack.tech/ui-kform";
195
- import { type <%= formClass %>, encode<%= formClass %>ToString, <%= formClass %>FormMode } from "<%= kmpModuleName %>";
196
- import { use<%= formClass %>Context } from "../<%= formClass %>Context.ts";
197
-
198
- export function Save() {
199
- const { externalContexts } = use<%= formClass %>Context();
200
-
201
- return (
202
- <SaveAction
203
- encode={(<%= formVar %>: <%= formClass %>) => encode<%= formClass %>ToString(<%= formVar %>, true)}
204
- disableOverwrite={externalContexts.mode === <%= formClass %>FormMode.READ}
205
- mimeTypes={["<%= serializationMimeType %>"]}
206
- extensions={[".<%= serializationFormat %>"]}
207
- />
208
- );
209
- }
210
- `,Co=`import { LocatedValidationWarning } from "@ostack.tech/kform";
211
- import { SubmitAction } from "@ostack.tech/ui-kform";
212
- import {
213
- type <%= formClass %>,
214
- <%= formClass %>FormMode,
215
- <%= formClass %>SubmitSuccess,
216
- <%= formClass %>SubmitValidationError,
217
- <%= formClass %>SubmitError,
218
- } from "<%= kmpModuleName %>";
219
- import { use<%= formClass %>Context } from "../<%= formClass %>Context.ts";
220
- import { submit } from "../api/submit.ts";
221
-
222
- export function Submit() {
223
- const { externalContexts } = use<%= formClass %>Context();
224
-
225
- const handleSubmit = async (
226
- <%= formVar %>: <%= formClass %>,
227
- acceptedWarnings?: LocatedValidationWarning[],
228
- ) => {
229
- const response = await submit(<%= formVar %>, acceptedWarnings);
230
- if (response instanceof <%= formClass %>SubmitSuccess) {
231
- return response.redirectTo;
232
- } else if (response instanceof <%= formClass %>SubmitValidationError) {
233
- return response.issues;
234
- } else {
235
- throw response as <%= formClass %>SubmitError;
236
- }
237
- };
238
-
239
- const handleSuccessfulSubmit = (redirectTo: string) => {
240
- window.location.href = redirectTo;
241
- };
242
-
243
- return (
244
- externalContexts.mode !== <%= formClass %>FormMode.READ && (
245
- <SubmitAction
246
- onSubmit={handleSubmit}
247
- onSuccessfulSubmit={handleSuccessfulSubmit}
248
- <%_ if (useTableValuesSerializer) { -%>
249
- convertExternalIssuesTableRowIndicesToIds
250
- <%_ } -%>
251
- />
252
- )
253
- );
254
- }
255
- `,wo=`import { ValidateAction } from "@ostack.tech/ui-kform";
256
- import { <%= formClass %>FormMode } from "<%= kmpModuleName %>";
257
- import { use<%= formClass %>Context } from "../<%= formClass %>Context.ts";
258
-
259
- export function Validate() {
260
- const { externalContexts } = use<%= formClass %>Context();
261
-
262
- return externalContexts.mode !== <%= formClass %>FormMode.READ && <ValidateAction />;
263
- }
264
- `;function To(e,t){let n={kmpModuleName:t.kmpModuleName??`${mo(e.name)}-shared`,serializationFormat:t.serializationFormat??`json`,serializationMimeType:`application/${t.serializationFormat}`,formVar:lo(e.name),formClass:e.name,useTableValuesSerializer:t.useTableValuesSerializer};Na(t,`actions/Load.tsx`,xo,n),Na(t,`actions/Save.tsx`,So,n),Na(t,`actions/Submit.tsx`,Co,n),Na(t,`actions/Validate.tsx`,wo,n)}var Eo=`const API_BASE_URL = new URL("<%= apiBasePath %>", window.location.origin);
177
+ `}function Ja(e){let t=new Map;for(let n of e){let e=t.get(n.moduleName);e||t.set(n.moduleName,e={moduleName:n.moduleName}),n.isDefault?e.defaultImport=n.name:n.isNamespace?e.namespaceImport=n.name:n.isType?(e.typedImports??=new Set).add(n.name):n.name&&(e.namedImports??=new Set).add(n.name)}return Array.from(t.values())}function Ya(e){let t=[...new Set([...e.namedImports??[],...e.typedImports??[]])].sort((e,t)=>e.localeCompare(t)),n=t.every(t=>!e.namedImports?.has(t)),r=t.length>0?n?`type { ${t.join(`, `)} }`:`{ ${t.map(t=>e.namedImports?.has(t)?t:`type ${t}`).join(`, `)} }`:null,i=[e.defaultImport||null,e.namespaceImport?`* as ${e.namespaceImport}`:null,r].filter(e=>e).join(`, `),a=JSON.stringify(e.moduleName);return i?`import ${i} from ${a};`:`import ${a};`}var Xa=`en-US`,Za=JSON.parse(`["en-GB","en-US","fr-FR","pt-PT"]`);function Qa({defaultValue:e=Xa,disabled:t}){let[n,r]=Zr(`defaultLocale`,e);return(0,U.jsxs)(`div`,{className:`builder-config-field`,children:[(0,U.jsx)(`label`,{children:`Default locale`}),(0,U.jsx)(`select`,{value:n,onChange:e=>{r(e.target.value)},disabled:t,children:Za.map(e=>(0,U.jsx)(`option`,{value:e,children:e},e))})]})}var $a=`json`;function eo({defaultValue:e=$a,disabled:t}){let[n,r]=Zr(`useTableValuesSerializer`,!1),i=(0,C.useRef)(n),[a,o]=Zr(`serializationFormat`,e);return(0,U.jsxs)(`div`,{className:`builder-config-field`,children:[(0,U.jsx)(`label`,{children:`Serialization format`}),(0,U.jsxs)(`select`,{value:a,onChange:e=>{o(e.target.value),e.target.value===`xml`?(i.current=n,r(!0)):r(i.current)},disabled:t,children:[(0,U.jsx)(`option`,{value:`json`,children:`JSON`}),(0,U.jsx)(`option`,{value:`xml`,children:`XML`})]})]})}function to({disabled:e}){let[t]=Zr(`serializationFormat`,$a);return(0,U.jsx)($r,{disabled:e||t===`xml`})}var no=/([\p{Ll}\d])(\p{Lu})/gu,ro=/(\p{Lu})([\p{Lu}][\p{Ll}])/gu,io=/(\d)\p{Ll}|(\p{L})\d/u,ao=/[^\p{L}\d]+/giu,oo=`$1\0$2`,K=``;function q(e){let t=e.trim();t=t.replace(no,oo).replace(ro,oo),t=t.replace(ao,`\0`);let n=0,r=t.length;for(;t.charAt(n)===`\0`;)n++;if(n===r)return[];for(;t.charAt(r-1)===`\0`;)r--;return t.slice(n,r).split(/\0/g)}function so(e){let t=q(e);for(let e=0;e<t.length;e++){let n=t[e],r=io.exec(n);if(r){let i=r.index+(r[1]??r[2]).length;t.splice(e,1,n.slice(0,i),n.slice(i))}}return t}function co(e,t){let[n,r,i]=bo(e,t);return n+r.map(go(t?.locale)).join(t?.delimiter??` `)+i}function lo(e,t){let[n,r,i]=bo(e,t),a=go(t?.locale),o=_o(t?.locale),s=t?.mergeAmbiguousCharacters?vo(a,o):yo(a,o);return n+r.map((e,t)=>t===0?a(e):s(e,t)).join(t?.delimiter??``)+i}function uo(e,t){let[n,r,i]=bo(e,t),a=go(t?.locale),o=_o(t?.locale),s=t?.mergeAmbiguousCharacters?vo(a,o):yo(a,o);return n+r.map(s).join(t?.delimiter??``)+i}function fo(e,t){let[n,r,i]=bo(e,t),a=go(t?.locale),o=_o(t?.locale);return n+r.map(vo(a,o)).join(t?.delimiter??` `)+i}function po(e,t){let[n,r,i]=bo(e,t);return n+r.map(_o(t?.locale)).join(t?.delimiter??`_`)+i}function mo(e,t){return co(e,{delimiter:`-`,...t})}function ho(e,t){let[n,r,i]=bo(e,t),a=go(t?.locale),o=vo(a,_o(t?.locale));return n+r.map((e,t)=>t===0?o(e):a(e)).join(t?.delimiter??` `)+i}function go(e){return e===!1?e=>e.toLowerCase():t=>t.toLocaleLowerCase(e)}function _o(e){return e===!1?e=>e.toUpperCase():t=>t.toLocaleUpperCase(e)}function vo(e,t){return n=>`${t(n[0])}${e(n.slice(1))}`}function yo(e,t){return(n,r)=>{let i=n[0];return(r>0&&i>=`0`&&i<=`9`?`_`+i:t(i))+e(n.slice(1))}}function bo(e,t={}){let n=t.split??(t.separateNumbers?so:q),r=t.prefixCharacters??K,i=t.suffixCharacters??K,a=0,o=e.length;for(;a<e.length;){let t=e.charAt(a);if(!r.includes(t))break;a++}for(;o>a;){let t=o-1,n=e.charAt(t);if(!i.includes(n))break;o=t}return[e.slice(0,a),n(e.slice(a,o)),e.slice(o)]}var xo=`const API_BASE_URL = new URL("<%= apiBasePath %>", window.location.origin);
265
178
 
266
179
  /**
267
180
  * Wrapper around \`fetch\` for accessing the API.
@@ -271,7 +184,7 @@ export function Validate() {
271
184
  export function apiFetch(url: string | URL, init?: RequestInit) {
272
185
  return fetch(new URL(url, API_BASE_URL), init);
273
186
  }
274
- `,Do=`import type { ErrorReport } from "@ostack.tech/ui";
187
+ `,So=`import type { ErrorReport } from "@ostack.tech/ui";
275
188
  import { apiFetch } from "./apiFetch.ts";
276
189
 
277
190
  const REPORT_ERROR_API_ENDPOINT = "<%= reportErrorApiEndpoint %>";
@@ -283,7 +196,7 @@ export async function reportError(error: ErrorReport) {
283
196
  body: JSON.stringify(error, null, import.meta.env.DEV ? 2 : 0),
284
197
  });
285
198
  }
286
- `,Oo=`import { LocatedValidationWarning } from "@ostack.tech/kform";
199
+ `,Co=`import { LocatedValidationWarning } from "@ostack.tech/kform";
287
200
  import {
288
201
  decode<%= formClass %>SubmitResponseFromString,
289
202
  encode<%= formClass %>ToString,
@@ -310,15 +223,15 @@ export async function submit(
310
223
  });
311
224
  return decode<%= formClass %>SubmitResponseFromString(await response.text());
312
225
  }
313
- `;function ko(e,t){let n={kmpModuleName:t.kmpModuleName??`${mo(e.name)}-shared`,serializationFormat:t.serializationFormat??`json`,serializationMimeType:`application/${t.serializationFormat}`,formVar:lo(e.name),formClass:e.name,apiBasePath:t.apiBasePath??`/api/`,reportErrorApiEndpoint:t.reportErrorApiEndpoint??`report-error`,submitApiEndpoint:t.submitApiEndpoint??`submit`};Na(t,`api/apiFetch.ts`,Eo,n),Na(t,`api/reportError.ts`,Do,n),Na(t,`api/submit.ts`,Oo,n)}var Ao=!0;function jo(e,t){if(!Mo(t))return;let n=W(t.currentDir,`${e.name}IssueMessages.tsx`),r=t.files.get(n);r||t.files.set(n,r=Ka()),No(e,{kmpModuleName:`${mo(t.rootSchematic.name)}-shared`,...t,currentFile:r})}function Mo(e){return e.scaffoldIssueMessages??Ao}function No(e,t){t.currentFile.imports.push({moduleName:`@ostack.tech/ui-kform`,name:`IssueMessagesByCode`,isType:!0}),t.currentFile.declarations.push(ea`
226
+ `;function wo(e,t){let n={kmpModuleName:t.kmpModuleName??`${mo(e.name)}-shared`,serializationFormat:t.serializationFormat??`json`,serializationMimeType:`application/${t.serializationFormat}`,formVar:lo(e.name),formClass:e.name,apiBasePath:t.apiBasePath??`/api/`,reportErrorApiEndpoint:t.reportErrorApiEndpoint??`report-error`,submitApiEndpoint:t.submitApiEndpoint??`submit`};Na(t,`api/apiFetch.ts`,xo,n),Na(t,`api/reportError.ts`,So,n),Na(t,`api/submit.ts`,Co,n)}var To=!0;function Eo(e,t){if(!Do(t))return;let n=W(t.currentDir,`${e.name}IssueMessages.tsx`),r=t.files.get(n);r||t.files.set(n,r=Ka()),Oo(e,{kmpModuleName:`${mo(t.rootSchematic.name)}-shared`,...t,currentFile:r})}function Do(e){return e.scaffoldIssueMessages??To}function Oo(e,t){t.currentFile.imports.push({moduleName:`@ostack.tech/ui-kform`,name:`IssueMessagesByCode`,isType:!0}),t.currentFile.declarations.push(ea`
314
227
  export const ${po(e.name)}_ISSUE_MESSAGES: Record<string, IssueMessagesByCode> = {};
315
- `)}function Po(e,t){let n=ds(e,{kmpModuleName:`${mo(e.name)}-shared`,...t});for(let e of n)for(let t of e.formPages)Fo(t.schematic,t.data),t.data.currentPath!==`/`&&jo(t.schematic,t.data)}function Fo(e,t){let n=W(t.currentDir,`${e.name}.tsx`),r=t.files.get(n);r||t.files.set(n,r=Ka()),Io(e,{kmpModuleName:`${mo(t.rootSchematic.name)}-shared`,...t,currentFile:r})}function Io(e,t){t.currentFile.imports.push({moduleName:`@ostack.tech/ui`,name:`Grid`}),t.currentFile.declarations.push(ea`
228
+ `)}function ko(e,t){let n=os(e,{kmpModuleName:`${mo(e.name)}-shared`,...t});for(let e of n)for(let t of e.formPages)Ao(t.schematic,t.data),t.data.currentPath!==`/`&&Eo(t.schematic,t.data)}function Ao(e,t){let n=W(t.currentDir,`${e.name}.tsx`),r=t.files.get(n);r||t.files.set(n,r=Ka()),jo(e,{kmpModuleName:`${mo(t.rootSchematic.name)}-shared`,...t,currentFile:r})}function jo(e,t){t.currentFile.imports.push({moduleName:`@ostack.tech/ui`,name:`Grid`}),t.currentFile.declarations.push(ea`
316
229
  export function ${e.name}() {
317
230
  return (
318
231
  <Grid container>
319
232
  ${e.children.map(e=>ea`
320
233
  <Grid xs={12}>
321
- ${Lo(e,{...t,currentPath:e.childName})}
234
+ ${Mo(e,{...t,currentPath:e.childName})}
322
235
  </Grid>
323
236
  `).join(`
324
237
 
@@ -326,12 +239,12 @@ export async function submit(
326
239
  </Grid>
327
240
  );
328
241
  }
329
- `)}function Lo(e,t){let n=t.schematicKinds.get(e.kind);if(!n)throw Error(`Unknown schematic kind ${e.kind}`);if(n.scaffoldField)return n.scaffoldField?.(e,t);t.currentFile.imports.push({moduleName:`@ostack.tech/ui-kform`,name:`ControlField`});let r,i;if(n.control){let e=n.control.lastIndexOf(`.`);r=n.control.slice(0,e),i=n.control.slice(e+1),t.currentFile.imports.push({moduleName:r,name:i})}let a=n.scaffoldControl?.(e,t);return a||=(t.omitLabel||t.currentFile.imports.push({moduleName:`@ostack.tech/ui`,name:`Label`}),[t.omitLabel?null:`<Label>${ho(e.childName)}</Label>`,`<${i} />`].filter(e=>e).join(`
330
- `)),ea`
331
- <ControlField path="${t.currentPath}">
332
- ${a}
333
- </ControlField>
334
- `}var Ro=`package <%= filePackage %>
242
+ `)}function Mo(e,t){let n=t.schematicKinds.get(e.kind);if(!n)throw Error(`Unknown schematic kind ${e.kind}`);let r,i;if(n.control){let e=n.control.lastIndexOf(`.`);r=n.control.slice(0,e),i=n.control.slice(e+1),t.currentFile.imports.push({moduleName:r,name:i})}let a=n.scaffoldControl?.(e,t);if(a||=`<${i} path="${t.currentPath}" />`,t.omitField)return a;if(n.scaffoldField)return n.scaffoldField?.(e,t);t.currentFile.imports.push({moduleName:`@ostack.tech/ui`,name:`Field`});let o;return n.omitFieldLabel||(t.currentFile.imports.push({moduleName:`@ostack.tech/ui`,name:`Label`}),o=`<Label>${ho(e.childName)}</Label>`),ea`
243
+ <Field>
244
+ ${[o,a].filter(e=>e).join(`
245
+ `)}
246
+ </Field>
247
+ `}var No=`package <%= filePackage %>
335
248
 
336
249
  import kotlin.js.JsExport
337
250
  import kotlin.jvm.JvmOverloads
@@ -377,7 +290,7 @@ fun encode<%= formClass %>SubmitResponseToString(response: <%= formClass %>Submi
377
290
  @JsExport
378
291
  fun decode<%= formClass %>SubmitResponseFromString(json: String): <%= formClass %>SubmitResponse =
379
292
  jsonConfig().decodeFromString(json)
380
- `,zo=`package <%= filePackage %>
293
+ `,Po=`package <%= filePackage %>
381
294
 
382
295
  import kotlin.js.JsExport
383
296
  import kotlin.jvm.JvmOverloads
@@ -462,7 +375,7 @@ fun encode<%= formClass %>SubmitResponseToString(response: <%= formClass %>Submi
462
375
  @JsExport
463
376
  fun decode<%= formClass %>SubmitResponseFromString(xml: String): <%= formClass %>SubmitResponse =
464
377
  xmlConfig().decodeFromString(xml)
465
- `;function Bo(e,t){let n={filePackage:t.currentPackage,formVar:lo(e.name),formClass:e.name,formConstant:po(e.name),includeSerializationFormatVersion:t.includeSerializationFormatVersion??!0};Na(t,`${e.name}Serializer.kt`,t.serializationFormat===`xml`?zo:Ro,n)}function Vo(e){return e==null?[]:Array.isArray(e)?e:[e]}var Ho={...oa},Uo={...sa,control:`@ostack.tech/ui-kform.NumericControl`},Wo={...ca,control:`@ostack.tech/ui-kform.NumericControl`},Go={...la,control:`@ostack.tech/ui-kform.CheckboxControl`,scaffoldControl:(e,t)=>t.omitLabel?`<CheckboxControl />`:`<CheckboxControl>${ho(e.childName)}</CheckboxControl>`},Ko={...ua,control:`@ostack.tech/ui-kform.NumericControl`},qo={...fa,defaultPackageSuffix:e=>`annexes.${e.toLowerCase()}`,kind:`Class (Annex)`},Jo={...fa,kind:`Class (FormPage)`,nullable:!1},Yo={...fa,nullable:!1,scaffoldModel:(e,t)=>{let n=fa.scaffoldModel(e,t);if(t.currentPath!==`/`)return n;let r=[],i=null;if(t.serializationFormat===`xml`){t.currentFile.imports.add(`nl.adaptivity.xmlutil.serialization.XmlSerialName`);let n=t.xmlNamespace??`http://${t.currentPackage.split(`.`).reverse().join(`.`)}/schema/${new Date().getFullYear()}`;r.push(`@XmlSerialName("${e.name}", "${n}")`)}if(t.includeSerializationFormatVersion??!0){t.currentFile.imports.add(`kotlinx.serialization.EncodeDefault`).add(`kotlinx.serialization.ExperimentalSerializationApi`);let n=[`@EncodeDefault`,`@OptIn(ExperimentalSerializationApi::class)`];t.serializationFormat===`xml`?(t.currentFile.imports.add(`nl.adaptivity.xmlutil.serialization.XmlElement`),n.push(`@XmlElement(false)`)):(t.currentFile.imports.add(`kotlinx.serialization.SerialName`),n.push(`@SerialName($$"$version")`)),i=si(n,`internal var version = ${po(e.name)}_SERIALIZATION_VERSION`)}return si(r,n)+(i?` ${ea`
378
+ `;function Fo(e,t){let n={filePackage:t.currentPackage,formVar:lo(e.name),formClass:e.name,formConstant:po(e.name),includeSerializationFormatVersion:t.includeSerializationFormatVersion??!0};Na(t,`${e.name}Serializer.kt`,t.serializationFormat===`xml`?Po:No,n)}function Io(e){return e==null?[]:Array.isArray(e)?e:[e]}var Lo={...oa},Ro={...sa,control:`@ostack.tech/ui-kform.NumericControl`},zo={...ca,control:`@ostack.tech/ui-kform.NumericControl`},Bo={...la,control:`@ostack.tech/ui-kform.CheckboxControl`,omitFieldLabel:!0,scaffoldControl:(e,t)=>t.omitField?`<CheckboxControl path="${t.currentPath}" />`:`<CheckboxControl path="${t.currentPath}">${ho(e.childName)}</CheckboxControl>`},Vo={...ua,control:`@ostack.tech/ui-kform.NumericControl`},Ho={...fa,defaultPackageSuffix:e=>`annexes.${e.toLowerCase()}`,kind:`Class (Annex)`},Uo={...fa,kind:`Class (FormPage)`,nullable:!1},Wo={...fa,nullable:!1,scaffoldModel:(e,t)=>{let n=fa.scaffoldModel(e,t);if(t.currentPath!==`/`)return n;let r=[],i=null;if(t.serializationFormat===`xml`){t.currentFile.imports.add(`nl.adaptivity.xmlutil.serialization.XmlSerialName`);let n=t.xmlNamespace??`http://${t.currentPackage.split(`.`).reverse().join(`.`)}/schema/${new Date().getFullYear()}`;r.push(`@XmlSerialName("${e.name}", "${n}")`)}if(t.includeSerializationFormatVersion??!0){t.currentFile.imports.add(`kotlinx.serialization.EncodeDefault`).add(`kotlinx.serialization.ExperimentalSerializationApi`);let n=[`@EncodeDefault`,`@OptIn(ExperimentalSerializationApi::class)`];t.serializationFormat===`xml`?(t.currentFile.imports.add(`nl.adaptivity.xmlutil.serialization.XmlElement`),n.push(`@XmlElement(false)`)):(t.currentFile.imports.add(`kotlinx.serialization.SerialName`),n.push(`@SerialName($$"$version")`)),i=si(n,`internal var version = ${po(e.name)}_SERIALIZATION_VERSION`)}return si(r,n)+(i?` ${ea`
466
379
  {
467
380
  ${i}
468
381
  }
@@ -476,7 +389,7 @@ fun decode<%= formClass %>SubmitResponseFromString(xml: String): <%= formClass %
476
389
  <Grid container>
477
390
  ${e.children.map(e=>ea`
478
391
  <Grid xs={12}>
479
- ${Lo(e,{...t,currentPath:W(t.currentPath,e.childName)})}
392
+ ${Mo(e,{...t,currentPath:W(t.currentPath,e.childName)})}
480
393
  </Grid>
481
394
  `).join(`
482
395
 
@@ -484,59 +397,43 @@ fun decode<%= formClass %>SubmitResponseFromString(xml: String): <%= formClass %
484
397
  </Grid>
485
398
  </FieldGroupBody>
486
399
  </FieldGroup>
487
- `)},Xo={...pa,control:`@ostack.tech/ui-kform.NumericControl`},Zo={...ma,kind:`Enum`,internal:!0,nullable:!1},Qo={...ma,kind:`Enum (Select)`,control:`@ostack.tech/ui-kform.SelectControl`,scaffoldControl:(e,t)=>(t.omitLabel||t.currentFile.imports.push({moduleName:`@ostack.tech/ui`,name:`Label`}),t.currentFile.imports.push({moduleName:t.kmpModuleName,name:e.name}),[t.omitLabel?null:`<Label>${ho(e.childName)}</Label>`,ea`
488
- <SelectControl
489
- options={[
490
- ${e.children.map(t=>`{ value: ${e.name}.${t.childName}, text: ${JSON.stringify(ho(t.childName))} }`).join(`,
400
+ `)},Go={...pa,control:`@ostack.tech/ui-kform.NumericControl`},Ko={...ma,kind:`Enum`,internal:!0,nullable:!1},qo={...ma,kind:`Enum (Select)`,control:`@ostack.tech/ui-kform.SelectControl`,scaffoldControl:(e,t)=>(t.currentFile.imports.push({moduleName:t.kmpModuleName,name:e.name}),e.children.length>0&&t.currentFile.imports.push({moduleName:`@ostack.tech/ui-kform`,name:`SelectControlItem`}),ea`
401
+ <SelectControl path="${t.currentPath}">
402
+ ${e.children.map(t=>`<SelectControlItem value={${e.name}.${t.childName}}>${ho(t.childName)}</SelectControlItem>`).join(`
491
403
  `)}
492
- ]}
493
- />
494
- `].filter(e=>e).join(`
495
- `))},$o={...ma,kind:`Enum (RadioGroup)`,control:`@ostack.tech/ui-kform.RadioGroupControl`,scaffoldControl:(e,t)=>(t.omitLabel||t.currentFile.imports.push({moduleName:`@ostack.tech/ui`,name:`Label`}),t.currentFile.imports.push({moduleName:t.kmpModuleName,name:e.name}),[t.omitLabel?null:`<Label>${ho(e.childName)}</Label>`,ea`
496
- <RadioGroupControl
497
- options={[
498
- ${e.children.map(t=>`{ value: ${e.name}.${t.childName}, text: ${JSON.stringify(ho(t.childName))} }`).join(`,
404
+ </SelectControl>
405
+ `)},Jo={...ma,kind:`Enum (RadioGroup)`,control:`@ostack.tech/ui-kform.RadioGroupControl`,scaffoldControl:(e,t)=>(t.currentFile.imports.push({moduleName:t.kmpModuleName,name:e.name}),e.children.length>0&&t.currentFile.imports.push({moduleName:`@ostack.tech/ui-kform`,name:`RadioGroupControlItem`}),ea`
406
+ <RadioGroupControl path="${t.currentPath}">
407
+ ${e.children.map(t=>`<RadioGroupControlItem value={${e.name}.${t.childName}}>${ho(t.childName)}</RadioGroupControlItem>`).join(`
499
408
  `)}
500
- ]}
501
- />
502
- `].filter(e=>e).join(`
503
- `))},es={...ha,nullable:!0,control:`@ostack.tech/ui-kform.FileControl`},ts={...ga,control:`@ostack.tech/ui-kform.NumericControl`},ns={...va,control:`@ostack.tech/ui-kform.NumericControl`},rs={...ya,kind:`List<Enum> (CheckboxGroup)`,nullable:!1,initChildren:e=>[Lr({kind:`Enum`,name:uo(e),nullable:!1,children:[]})],builder:Ji,control:`@ostack.tech/ui-kform.CheckboxGroupControl`,scaffoldControl:(e,t)=>{let n=e.children[0];if(n.kind!==`Enum`)throw Error(`Invalid child kind.`);return t.omitLabel||t.currentFile.imports.push({moduleName:`@ostack.tech/ui`,name:`Label`}),t.currentFile.imports.push({moduleName:t.kmpModuleName,name:n.name}),[t.omitLabel?null:`<Label>${ho(e.childName)}</Label>`,ea`
504
- <CheckboxGroupControl
505
- options={[
506
- ${n.children.map(e=>`{ value: ${n.name}.${e.childName}, text: ${JSON.stringify(ho(e.childName))} }`).join(`,
409
+ </RadioGroupControl>
410
+ `)},Yo={...ha,nullable:!0,control:`@ostack.tech/ui-kform.FileControl`},Xo={...ga,control:`@ostack.tech/ui-kform.NumericControl`},Zo={...va,control:`@ostack.tech/ui-kform.NumericControl`},Qo={...ya,kind:`List<Enum> (CheckboxGroup)`,nullable:!1,initChildren:e=>[Lr({kind:`Enum`,name:uo(e),nullable:!1,children:[]})],builder:Ji,control:`@ostack.tech/ui-kform.CheckboxGroupControl`,scaffoldControl:(e,t)=>{let n=e.children[0];if(n.kind!==`Enum`)throw Error(`Invalid child kind.`);return t.currentFile.imports.push({moduleName:t.kmpModuleName,name:n.name}),n.children.length>0&&t.currentFile.imports.push({moduleName:`@ostack.tech/ui-kform`,name:`CheckboxGroupControlItem`}),ea`
411
+ <CheckboxGroupControl path="${t.currentPath}">
412
+ ${n.children.map(e=>`<CheckboxGroupControlItem value={${n.name}.${e.childName}}>${ho(e.childName)}</CheckboxGroupControlItem>`).join(`
507
413
  `)}
508
- ]}
509
- />
510
- `].filter(e=>e).join(`
511
- `)}},is={...ya,kind:`List<Enum> (SelectMultiple)`,nullable:!1,initChildren:e=>[Lr({kind:`Enum`,name:uo(e),nullable:!1,children:[]})],builder:Ji,control:`@ostack.tech/ui-kform.SelectMultipleControl`,scaffoldControl:(e,t)=>{let n=e.children[0];if(n.kind!==`Enum`)throw Error(`Invalid child kind.`);return t.omitLabel||t.currentFile.imports.push({moduleName:`@ostack.tech/ui`,name:`Label`}),t.currentFile.imports.push({moduleName:t.kmpModuleName,name:n.name}),[t.omitLabel?null:`<Label>${ho(e.childName)}</Label>`,ea`
512
- <SelectMultipleControl
513
- options={[
514
- ${n.children.map(e=>`{ value: ${n.name}.${e.childName}, text: ${JSON.stringify(ho(e.childName))} }`).join(`,
414
+ </CheckboxGroupControl>
415
+ `}},$o={...ya,kind:`List<Enum> (SelectMultiple)`,nullable:!1,initChildren:e=>[Lr({kind:`Enum`,name:uo(e),nullable:!1,children:[]})],builder:Ji,control:`@ostack.tech/ui-kform.SelectMultipleControl`,scaffoldControl:(e,t)=>{let n=e.children[0];if(n.kind!==`Enum`)throw Error(`Invalid child kind.`);return t.currentFile.imports.push({moduleName:t.kmpModuleName,name:n.name}),n.children.length>0&&t.currentFile.imports.push({moduleName:`@ostack.tech/ui-kform`,name:`SelectMultipleControlItem`}),ea`
416
+ <SelectMultipleControl path="${t.currentPath}">
417
+ ${n.children.map(e=>`<SelectMultipleControlItem value={${n.name}.${e.childName}}>${ho(e.childName)}</SelectMultipleControlItem>`).join(`
515
418
  `)}
516
- ]}
517
- />
518
- `].filter(e=>e).join(`
519
- `)}},as={...ba,nullable:!0,control:`@ostack.tech/ui-kform.DateControl`},os={...Sa,control:`@ostack.tech/ui-kform.NumericControl`},ss={...Ca,control:`@ostack.tech/ui-kform.NumericControl`},cs={...wa,control:`@ostack.tech/ui-kform.TextControl`},ls={...Ta,kind:`Table (Annexes)`,nullable:!1,builder:Ji,initChildren:e=>[Lr({kind:`Class (Annex)`,packageSuffix:`annexes.${e.toLowerCase()}`,name:uo(e),nullable:!1,children:[]})],propertyAnnotations:(e,t)=>{let n=Vo(typeof Ta.propertyAnnotations==`function`?Ta.propertyAnnotations?.(e,t):Ta.propertyAnnotations);return t.serializationFormat===`xml`&&(t.currentFile.imports.add(`nl.adaptivity.xmlutil.serialization.XmlChildrenName`),n.push(`@XmlChildrenName("${lo(e.children[0].name)}")`)),n}},us=[Ho,Uo,Wo,Go,Ko,Yo,qo,Jo,Xo,Zo,Qo,$o,es,ts,ns,rs,is,as,os,ss,cs,ls,{...Ta,nullable:!1,builder:Ji,initChildren:e=>[Lr({kind:`Class`,name:`${uo(e)}Row`,nullable:!1,children:[]})],propertyAnnotations:ls.propertyAnnotations,control:`@ostack.tech/ui-kform.TableControl`,scaffoldControl:(e,t)=>{let n=e.children[0];if(n.kind!==`Class`)throw Error(`Table child schematic is not of Class kind.`);return t.currentFile.imports.push({moduleName:`@ostack.tech/ui`,name:`Label`},{moduleName:`@ostack.tech/ui-kform`,name:`tableControlIndexColumn`},{moduleName:`@ostack.tech/ui-kform`,name:`tableControlActionsColumn`},{moduleName:`@ostack.tech/ui-kform`,name:`TableControlAddRowTrigger`},{moduleName:`@ostack.tech/ui-kform`,name:`TableControlContent`}),ea`
520
- <TableControl
521
- columns={[
522
- tableControlIndexColumn(),
419
+ </SelectMultipleControl>
420
+ `}},es={...ba,nullable:!0,control:`@ostack.tech/ui-kform.DateControl`},ts={...Sa,control:`@ostack.tech/ui-kform.NumericControl`},ns={...Ca,control:`@ostack.tech/ui-kform.NumericControl`},rs={...wa,control:`@ostack.tech/ui-kform.TextControl`},is={...Ta,kind:`Table (Annexes)`,nullable:!1,builder:Ji,initChildren:e=>[Lr({kind:`Class (Annex)`,packageSuffix:`annexes.${e.toLowerCase()}`,name:uo(e),nullable:!1,children:[]})],propertyAnnotations:(e,t)=>{let n=Io(typeof Ta.propertyAnnotations==`function`?Ta.propertyAnnotations?.(e,t):Ta.propertyAnnotations);return t.serializationFormat===`xml`&&(t.currentFile.imports.add(`nl.adaptivity.xmlutil.serialization.XmlChildrenName`),n.push(`@XmlChildrenName("${lo(e.children[0].name)}")`)),n}},as=[Lo,Ro,zo,Bo,Vo,Wo,Ho,Uo,Go,Ko,qo,Jo,Yo,Xo,Zo,Qo,$o,es,ts,ns,rs,is,{...Ta,nullable:!1,builder:Ji,initChildren:e=>[Lr({kind:`Class`,name:`${uo(e)}Row`,nullable:!1,children:[]})],propertyAnnotations:is.propertyAnnotations,control:`@ostack.tech/ui-kform.TableControl`,omitFieldLabel:!0,scaffoldControl:(e,t)=>{let n=e.children[0];if(n.kind!==`Class`)throw Error(`Table child schematic is not of Class kind.`);return t.currentFile.imports.push({moduleName:`@ostack.tech/ui`,name:`Label`},{moduleName:`@ostack.tech/ui-kform`,name:`TableControlColumns`},{moduleName:`@ostack.tech/ui-kform`,name:`TableControlIndexColumn`},{moduleName:`@ostack.tech/ui-kform`,name:`TableControlActionsColumn`},{moduleName:`@ostack.tech/ui-kform`,name:`TableControlAddRowTrigger`},{moduleName:`@ostack.tech/ui-kform`,name:`TableControlContent`}),n.children.length>0&&t.currentFile.imports.push({moduleName:`@ostack.tech/ui-kform`,name:`TableControlColumn`}),ea`
421
+ <TableControl path="${t.currentPath}">
422
+ <TableControlColumns>
423
+ <TableControlIndexColumn />
523
424
  ${n.children.map(e=>ea`
524
- {
525
- label: ${JSON.stringify(ho(e.childName))},
526
- render: () => (
527
- ${Lo(e,{...t,omitLabel:!0,currentPath:e.childName})}
528
- )
529
- }
530
- `).join(`,
425
+ <TableControlColumn label=${JSON.stringify(ho(e.childName))}>
426
+ ${Mo(e,{...t,omitField:!0,currentPath:e.childName})}
427
+ </TableControlColumn>
428
+ `).join(`
531
429
  `)},
532
- tableControlActionsColumn()
533
- ]}
534
- >
430
+ <TableControlActionsColumn />
431
+ </TableControlColumns>
535
432
  <Label>${ho(e.childName)}</Label>
536
433
  <TableControlAddRowTrigger />
537
434
  <TableControlContent />
538
435
  </TableControl>
539
- `}}];function ds(e,t){let n=[];if(e.children?.every(e=>e.kind===qo.kind||e.kind===ls.kind))for(let r of e.children)r.kind===qo.kind?n.push(ps(r,{...t,currentPath:W(t.currentPath,r.childName),currentDir:W(t.currentDir,r.packageSuffix?.replaceAll(`.`,`/`))})):n.push(fs(r,{...t,currentPath:W(t.currentPath,r.childName)}));else if(e.children?.every(e=>e.kind===Jo.kind))n.push(ps(e,t));else if(e.children?.some(e=>e.kind===qo.kind||e.kind===ls.kind||e.kind===Jo.kind))throw Error(`Annexes/form pages cannot be mixed with other kinds of fields.`);else n.push(ps(e,t));return n}function fs(e,t){let n=e.children[0];return ps(n,{...t,currentPath:W(t.currentPath,`*`),currentDir:W(t.currentDir,n.packageSuffix?.replaceAll(`.`,`/`))})}function ps(e,t){if(e.children?.some(e=>e.kind===qo.kind||e.kind===ls.kind))throw Error(`Annexes must only appear at the top level of the schematic.`);let n;if(e.children?.every(e=>e.kind===Jo.kind))n=e.children?.map(e=>({schematic:e,data:{...t,currentPath:W(t.currentPath,lo(e.childName)),currentDir:W(t.currentDir,e.packageSuffix?.replaceAll(`.`,`/`))}}));else if(e.children?.some(e=>e.kind===Jo.kind))throw Error(`Form pages cannot be mixed with other kinds of fields.`);else n=[{schematic:e,data:t}];return{schematic:e,data:t,formPages:n}}function ms(e,t){let n=W(t.currentDir,`${e.name}App.tsx`),r=t.files.get(n);r||t.files.set(n,r=Ka()),hs(e,{kmpModuleName:`${mo(e.name)}-shared`,...t,currentFile:r}),jo(e,t)}function hs(e,t){let n=(t.defaultLocale??`en-US`).replaceAll(`-`,``),r=t.activePathSearchParam??`page`;t.currentFile.imports.push({moduleName:`@ostack.tech/kform`,name:`ktMapToObject`},{moduleName:`@ostack.tech/ui`,name:`useSearchParam`},{moduleName:`@ostack.tech/ui-kform`,name:`FormApp`},{moduleName:`@ostack.tech/ui-kform`,name:n},{moduleName:`@ostack.tech/ui-kform`,name:`IssuesPanel`},{moduleName:`react`,name:`useMemo`},{moduleName:t.kmpModuleName,name:`${e.name}FormMode`},{moduleName:t.kmpModuleName,name:`${e.name}Schema`},{moduleName:`./api/reportError.ts`,name:`reportError`},{moduleName:`./${e.name}Context.ts`,name:`use${e.name}Context`});let i=``;Mo(t)&&(t.currentFile.imports.push({moduleName:`./${e.name}IssueMessages.tsx`,name:`${po(e.name)}_ISSUE_MESSAGES`}),i=`\nissueMessages={${po(e.name)}_ISSUE_MESSAGES}`),t.currentFile.declarations.push(ea`
436
+ `}}];function os(e,t){let n=[];if(e.children?.every(e=>e.kind===Ho.kind||e.kind===is.kind))for(let r of e.children)r.kind===Ho.kind?n.push(cs(r,{...t,currentPath:W(t.currentPath,r.childName),currentDir:W(t.currentDir,r.packageSuffix?.replaceAll(`.`,`/`))})):n.push(ss(r,{...t,currentPath:W(t.currentPath,r.childName)}));else if(e.children?.every(e=>e.kind===Uo.kind))n.push(cs(e,t));else if(e.children?.some(e=>e.kind===Ho.kind||e.kind===is.kind||e.kind===Uo.kind))throw Error(`Annexes/form pages cannot be mixed with other kinds of fields.`);else n.push(cs(e,t));return n}function ss(e,t){let n=e.children[0];return cs(n,{...t,currentPath:W(t.currentPath,`*`),currentDir:W(t.currentDir,n.packageSuffix?.replaceAll(`.`,`/`))})}function cs(e,t){if(e.children?.some(e=>e.kind===Ho.kind||e.kind===is.kind))throw Error(`Annexes must only appear at the top level of the schematic.`);let n;if(e.children?.every(e=>e.kind===Uo.kind))n=e.children?.map(e=>({schematic:e,data:{...t,currentPath:W(t.currentPath,lo(e.childName)),currentDir:W(t.currentDir,e.packageSuffix?.replaceAll(`.`,`/`))}}));else if(e.children?.some(e=>e.kind===Uo.kind))throw Error(`Form pages cannot be mixed with other kinds of fields.`);else n=[{schematic:e,data:t}];return{schematic:e,data:t,formPages:n}}function ls(e,t){let n=W(t.currentDir,`${e.name}App.tsx`),r=t.files.get(n);r||t.files.set(n,r=Ka()),us(e,{kmpModuleName:`${mo(e.name)}-shared`,...t,currentFile:r}),Eo(e,t)}function us(e,t){let n=(t.defaultLocale??`en-US`).replaceAll(`-`,``),r=t.activePathSearchParam??`page`;t.currentFile.imports.push({moduleName:`@ostack.tech/kform`,name:`ktMapToObject`},{moduleName:`@ostack.tech/ui`,name:`useSearchParam`},{moduleName:`@ostack.tech/ui-kform`,name:`FormApp`},{moduleName:`@ostack.tech/ui-kform`,name:n},{moduleName:`@ostack.tech/ui-kform`,name:`IssuesPanel`},{moduleName:`react`,name:`useMemo`},{moduleName:t.kmpModuleName,name:`${e.name}FormMode`},{moduleName:t.kmpModuleName,name:`${e.name}Schema`},{moduleName:`./api/reportError.ts`,name:`reportError`},{moduleName:`./${e.name}Context.ts`,name:`use${e.name}Context`});let i=``;Do(t)&&(t.currentFile.imports.push({moduleName:`./${e.name}IssueMessages.tsx`,name:`${po(e.name)}_ISSUE_MESSAGES`}),i=`\nissueMessages={${po(e.name)}_ISSUE_MESSAGES}`),t.currentFile.declarations.push(ea`
540
437
  export function ${e.name}App() {
541
438
  const { externalContexts } = use${e.name}Context();
542
439
  const [activePath, setActivePath] = useSearchParam("${r}");
@@ -554,61 +451,85 @@ fun decode<%= formClass %>SubmitResponseFromString(xml: String): <%= formClass %
554
451
  [externalContexts],
555
452
  )}
556
453
  readOnly={externalContexts.mode === ${e.name}FormMode.READ}
557
- validationMode={
558
- externalContexts.mode === ${e.name}FormMode.READ
559
- ? "manual"
560
- : "auto"
561
- }
562
454
  formTitle="${fo(e.name)}"
563
455
  activePath={activePath}
564
456
  onActivePathChange={setActivePath}${i}
565
457
  defaultLocale={${n}}
566
458
  reportError={reportError}
459
+ debug={import.meta.env.DEV}
567
460
  >
568
- ${gs(e,t)}
461
+ ${ds(e,t)}
569
462
 
570
463
  <IssuesPanel />
571
464
  </FormApp>
572
465
  );
573
466
  }
574
- `)}function gs(e,t,n=_s){let r=ds(e,t);return r.length===1&&r[0].data.currentPath===`/`?ea`
575
- ${n(t)}
467
+ `)}function ds(e,t,n=fs){let r=os(e,t);return r.length===1&&r[0].data.currentPath===`/`?ea`
468
+ ${n(e,t)}
576
469
 
577
- ${ys(t,r[0])}
470
+ ${hs(t,r[0])}
578
471
  `:(t.currentFile.imports.push({moduleName:`@ostack.tech/ui-kform`,name:`Annexes`},{moduleName:`@ostack.tech/ui-kform`,name:`AnnexesManager`}),ea`
579
472
  <Annexes>
580
- ${n(t,`<AnnexesManager />`)}
473
+ ${n(e,t,`<AnnexesManager />`)}
581
474
 
582
- ${r.map(e=>vs(t,e)).join(`
475
+ ${r.map(e=>ms(t,e)).join(`
583
476
 
584
477
  `)}
585
478
  </Annexes>
586
- `)}function _s(e,t){return e.currentFile.imports.push({moduleName:`@ostack.tech/ui-kform`,name:`TopBar`},{moduleName:`@ostack.tech/ui-kform`,name:`TopBarActions`},{moduleName:`./actions/Load.tsx`,name:`Load`},{moduleName:`./actions/Save.tsx`,name:`Save`},{moduleName:`./actions/Validate.tsx`,name:`Validate`},{moduleName:`./actions/Submit.tsx`,name:`Submit`}),ea`
587
- <TopBar>${t?`\n ${t}\n`:``}
479
+ `)}function fs(e,t,n){return t.currentFile.imports.push({moduleName:`@ostack.tech/ui-kform`,name:`TopBar`},{moduleName:`@ostack.tech/ui-kform`,name:`TopBarActions`}),ea`
480
+ <TopBar>${n?`\n ${n}\n`:``}
588
481
  <TopBarActions>
589
- <Load />
590
- <Save />
591
- <Validate />
592
- <Submit />
482
+ ${ps(e,t)}
593
483
  </TopBarActions>
594
- </TopBar>
595
- `}function vs(e,t){return e.currentFile.imports.push({moduleName:`@ostack.tech/ui-kform`,name:`Annex`}),ea`
484
+ </TopBar>;
485
+ `}function ps(e,t){let n=e.name,r=lo(n),i=t.serializationFormat??`json`,a=`application/${t.serializationFormat}`;return t.currentFile.imports.push({moduleName:`@ostack.tech/kform`,name:`LocatedValidationWarning`},{moduleName:`@ostack.tech/ui-kform`,name:`LoadAction`},{moduleName:`@ostack.tech/ui-kform`,name:`SaveAction`},{moduleName:`@ostack.tech/ui-kform`,name:`ValidateAction`},{moduleName:`@ostack.tech/ui-kform`,name:`SubmitAction`},{moduleName:t.kmpModuleName,name:n,isType:!0},{moduleName:t.kmpModuleName,name:`decode${n}FromString`},{moduleName:t.kmpModuleName,name:`encode${n}ToString`},{moduleName:t.kmpModuleName,name:`${n}SubmitSuccess`},{moduleName:t.kmpModuleName,name:`${n}SubmitValidationError`},{moduleName:t.kmpModuleName,name:`${n}SubmitError`},{moduleName:`./api/submit.ts`,name:`submit`}),ea`
486
+ <LoadAction
487
+ decode={async (file) => decode${n}FromString(await file.text())}
488
+ mimeTypes={["${a}"]}
489
+ extensions={[".${i}"]}
490
+ />
491
+ <SaveAction
492
+ encode={(${r}: ${n}) => encode${n}ToString(${r}, true)}
493
+ mimeTypes={["${a}"]}
494
+ extensions={[".${i}"]}
495
+ />
496
+ <ValidateAction />
497
+ <SubmitAction
498
+ onSubmit={async (
499
+ ${r}: ${n},
500
+ acceptedWarnings?: LocatedValidationWarning[],
501
+ ) => {
502
+ const response = await submit(${r}, acceptedWarnings);
503
+ if (response instanceof ${n}SubmitSuccess) {
504
+ return response.redirectTo;
505
+ } else if (response instanceof ${n}SubmitValidationError) {
506
+ return response.issues;
507
+ } else {
508
+ throw response as ${n}SubmitError;
509
+ }
510
+ }}
511
+ onSuccessfulSubmit={(redirectTo: string) => {
512
+ window.location.href = redirectTo;
513
+ }}${t.useTableValuesSerializer?`
514
+ convertExternalIssuesTableRowIndicesToIds`:``}
515
+ />
516
+ `}function ms(e,t){return e.currentFile.imports.push({moduleName:`@ostack.tech/ui-kform`,name:`Annex`}),ea`
596
517
  <Annex path="${t.data.currentPath}" title="${ho(t.schematic.name)}"${t.formPages.length===1&&t.schematic===t.formPages[0].schematic?` documentTitle={null}`:``}>
597
- ${ys(e,t)}
518
+ ${hs(e,t)}
598
519
  </Annex>
599
- `}function ys(e,t){e.currentFile.imports.push({moduleName:`@ostack.tech/ui-kform`,name:`FormPages`});let n=``;return t.formPages.length>1&&(e.currentFile.imports.push({moduleName:`@ostack.tech/ui-kform`,name:`FormPagesNavigation`}),n=`
520
+ `}function hs(e,t){e.currentFile.imports.push({moduleName:`@ostack.tech/ui-kform`,name:`FormPages`});let n=``;return t.formPages.length>1&&(e.currentFile.imports.push({moduleName:`@ostack.tech/ui-kform`,name:`FormPagesNavigation`}),n=`
600
521
  <FormPagesNavigation />
601
522
  `),ea`
602
523
  <FormPages>${n}
603
- ${t.formPages.map(n=>bs(e,t,n)).join(`
524
+ ${t.formPages.map(n=>gs(e,t,n)).join(`
604
525
 
605
526
  `)}
606
527
  </FormPages>
607
- `}function bs(e,t,n){e.currentFile.imports.push({moduleName:`@ostack.tech/ui-kform`,name:`FormPage`},{moduleName:`./${W(n.data.currentDir.slice(e.currentDir.length+ +!e.currentDir.endsWith(`/`)),n.schematic.name)}.tsx`,name:n.schematic.name});let r=``;Mo(e)&&n.data.currentPath!==`/`&&(e.currentFile.imports.push({moduleName:`./${W(n.data.currentDir.slice(e.currentDir.length+ +!e.currentDir.endsWith(`/`)),n.schematic.name)}IssueMessages.tsx`,name:`${po(n.schematic.name)}_ISSUE_MESSAGES`}),r=` issueMessages={${po(n.schematic.name)}_ISSUE_MESSAGES}`);let i=t.schematic===n.schematic?``:` path="${n.data.currentPath.slice(t.data.currentPath.length+ +!t.data.currentPath.endsWith(`/`))}"`,a=n.data.currentPath===`/`?` documentTitle={null}`:``;return ea`
528
+ `}function gs(e,t,n){e.currentFile.imports.push({moduleName:`@ostack.tech/ui-kform`,name:`FormPage`},{moduleName:`./${W(n.data.currentDir.slice(e.currentDir.length+ +!e.currentDir.endsWith(`/`)),n.schematic.name)}.tsx`,name:n.schematic.name});let r=``;Do(e)&&n.data.currentPath!==`/`&&(e.currentFile.imports.push({moduleName:`./${W(n.data.currentDir.slice(e.currentDir.length+ +!e.currentDir.endsWith(`/`)),n.schematic.name)}IssueMessages.tsx`,name:`${po(n.schematic.name)}_ISSUE_MESSAGES`}),r=` issueMessages={${po(n.schematic.name)}_ISSUE_MESSAGES}`);let i=t.schematic===n.schematic?``:` path="${n.data.currentPath.slice(t.data.currentPath.length+ +!t.data.currentPath.endsWith(`/`))}"`,a=n.data.currentPath===`/`?` documentTitle={null}`:``;return ea`
608
529
  <FormPage${i} title="${ho(n.schematic.name)}" code="${n.schematic.name?.[0].toUpperCase()}"${a}${r}>
609
530
  <${n.schematic.name} />
610
531
  </FormPage>
611
- `}var xs=`import { createContext, useContext } from "react";
532
+ `}var _s=`import { createContext, useContext } from "react";
612
533
  import { <%= formClass %>ExternalContexts } from "<%= kmpModuleName %>";
613
534
 
614
535
  export interface <%= formClass %>ContextValue {
@@ -620,7 +541,7 @@ export const <%= formClass %>Context = createContext<<%= formClass %>ContextValu
620
541
  export function use<%= formClass %>Context(): <%= formClass %>ContextValue {
621
542
  return useContext(<%= formClass %>Context);
622
543
  }
623
- `;function Ss(e,t){let n={kmpModuleName:t.kmpModuleName??`${mo(e.name)}-shared`,formClass:e.name};Na(t,`${e.name}Context.ts`,xs,n)}var Cs=`package <%= filePackage %>
544
+ `;function vs(e,t){let n={kmpModuleName:t.kmpModuleName??`${mo(e.name)}-shared`,formClass:e.name};Na(t,`${e.name}Context.ts`,_s,n)}var ys=`package <%= filePackage %>
624
545
 
625
546
  import kotlin.js.JsExport
626
547
  import kotlin.jvm.JvmOverloads
@@ -645,15 +566,15 @@ data class <%= formClass %>ExternalContexts @JvmOverloads constructor(
645
566
  ) {
646
567
  fun toMap(): Map<String, Any?> = mapOf("mode" to mode, "initialValue" to initialValue)
647
568
  }
648
- `;function ws(e,t){let n={filePackage:t.currentPackage,formClass:e.name};Na(t,`${e.name}ExternalContexts.kt`,Cs,n)}var Ts=`allprojects {
569
+ `;function bs(e,t){let n={filePackage:t.currentPackage,formClass:e.name};Na(t,`${e.name}ExternalContexts.kt`,ys,n)}var xs=`allprojects {
649
570
  repositories { mavenCentral() }
650
571
  }
651
- `,Es=`group=<%= gradlePropertiesGroup %>
572
+ `,Ss=`group=<%= gradlePropertiesGroup %>
652
573
  version=0.0.1
653
574
 
654
575
  org.gradle.caching=true
655
576
  org.gradle.configuration-cache=true
656
- `,Ds=`[versions]
577
+ `,Cs=`[versions]
657
578
  # Plugins
658
579
  kotlin = "2.4.0"
659
580
  nodeGradle = "7.1.0"
@@ -704,7 +625,7 @@ xmlutil-serialization = { module = "io.github.pdvrieze.xmlutil:serialization", v
704
625
  kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
705
626
  kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
706
627
  nodeGradle = { id = "com.github.node-gradle.node", version.ref = "nodeGradle" }
707
- `,Os=`import com.github.gradle.node.npm.task.NpmTask
628
+ `,ws=`import com.github.gradle.node.npm.task.NpmTask
708
629
 
709
630
  plugins {
710
631
  alias(libs.plugins.nodeGradle)
@@ -787,14 +708,14 @@ val npmRunLint by tasks.registering(NpmTask::class) {
787
708
  tasks.assemble {
788
709
  dependsOn(npmRunBuild)
789
710
  }
790
- `,ks=`plugins {
711
+ `,Ts=`plugins {
791
712
  id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0"
792
713
  }
793
714
 
794
715
  rootProject.name = "<%= formId %>"
795
716
 
796
717
  include("shared", "react-app")
797
- `,As=`import com.github.gradle.node.npm.task.NpmTask
718
+ `,Es=`import com.github.gradle.node.npm.task.NpmTask
798
719
 
799
720
  plugins {
800
721
  alias(libs.plugins.kotlin.multiplatform)
@@ -871,7 +792,7 @@ val packJsPackage by tasks.registering(NpmTask::class) {
871
792
  inputs.dir(libraryDir)
872
793
  outputs.file("build/<%= formId %>-shared-$version.tgz")
873
794
  }
874
- `,js=`package <%= filePackage %>
795
+ `,Ds=`package <%= filePackage %>
875
796
 
876
797
  // See: https://github.com/Kotlin/kotlinx-datetime?tab=readme-ov-file#note-about-time-zones-in-js
877
798
  @JsModule("@js-joda/timezone")
@@ -880,7 +801,7 @@ external object JsJodaTimeZoneModule
880
801
 
881
802
  @JsExport
882
803
  val jsJodaTz = JsJodaTimeZoneModule
883
- `;function Ms(e,t){let n={gradlePropertiesGroup:t.gradlePropertiesGroup??t.currentPackage,filePackage:t.currentPackage,formId:mo(e.name),formTitle:fo(e.name),kFormVersion:`1.0.0-rc.1`,serializationFormat:t.serializationFormat??`json`,includeKotlinxDatetime:t.includeKotlinxDatetime??Ns(e,t),includeKtMath:t.includeKtMath??Ps(e),jvmToolchainVersion:t.jvmToolchainVersion??`21`,nodejsVersion:t.nodejsVersion??`24.16.0`};Na(t,`gradle.properties`,Es,n),Na(t,`settings.gradle.kts`,ks,n),Na(t,`gradle/libs.versions.toml`,Ds,n),Ga(t,`build.gradle.kts`,Ts),Na(t,`shared/build.gradle.kts`,As,n),n.includeKotlinxDatetime&&Na(t,`shared/src/jsMain/kotlin/JsJodaTimeZone.kt`,js,n),Na(t,`react-app/build.gradle.kts`,Os,n)}function Ns(e,t){return t.schematicKinds.get(e.kind)?.package===`kotlinx.datetime`||e.children?.some(e=>Ns(e,t))===!0}function Ps(e){return[`BigInteger`,`BigDecimal`].includes(e.kind)||e.children?.some(e=>Ps(e))===!0}var Fs=`/assets/gradle-wrapper-BvbY_R1M.jar`,Is=`distributionBase=GRADLE_USER_HOME
804
+ `;function Os(e,t){let n={gradlePropertiesGroup:t.gradlePropertiesGroup??t.currentPackage,filePackage:t.currentPackage,formId:mo(e.name),formTitle:fo(e.name),kFormVersion:`1.0.0-rc.1`,serializationFormat:t.serializationFormat??`json`,includeKotlinxDatetime:t.includeKotlinxDatetime??ks(e,t),includeKtMath:t.includeKtMath??As(e),jvmToolchainVersion:t.jvmToolchainVersion??`21`,nodejsVersion:t.nodejsVersion??`24.16.0`};Na(t,`gradle.properties`,Ss,n),Na(t,`settings.gradle.kts`,Ts,n),Na(t,`gradle/libs.versions.toml`,Cs,n),Ga(t,`build.gradle.kts`,xs),Na(t,`shared/build.gradle.kts`,Es,n),n.includeKotlinxDatetime&&Na(t,`shared/src/jsMain/kotlin/JsJodaTimeZone.kt`,Ds,n),Na(t,`react-app/build.gradle.kts`,ws,n)}function ks(e,t){return t.schematicKinds.get(e.kind)?.package===`kotlinx.datetime`||e.children?.some(e=>ks(e,t))===!0}function As(e){return[`BigInteger`,`BigDecimal`].includes(e.kind)||e.children?.some(e=>As(e))===!0}var js=`/assets/gradle-wrapper-BvbY_R1M.jar`,Ms=`distributionBase=GRADLE_USER_HOME
884
805
  distributionPath=wrapper/dists
885
806
  distributionUrl=https\\://services.gradle.org/distributions/gradle-9.5.0-bin.zip
886
807
  networkTimeout=10000
@@ -889,7 +810,7 @@ retryBackOffMs=500
889
810
  validateDistributionUrl=true
890
811
  zipStoreBase=GRADLE_USER_HOME
891
812
  zipStorePath=wrapper/dists
892
- `,Ls=`@rem\r
813
+ `,Ns=`@rem\r
893
814
  @rem Copyright 2015 the original author or authors.\r
894
815
  @rem\r
895
816
  @rem Licensed under the Apache License, Version 2.0 (the "License");\r
@@ -971,7 +892,7 @@ endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.grad
971
892
  :exitWithErrorLevel\r
972
893
  @rem Use "%COMSPEC%" /c exit to allow operators to work properly in scripts\r
973
894
  "%COMSPEC%" /c exit %ERRORLEVEL%\r
974
- `,Rs=`#!/bin/sh
895
+ `,Ps=`#!/bin/sh
975
896
 
976
897
  #
977
898
  # Copyright © 2015 the original authors.
@@ -1219,7 +1140,7 @@ eval "set -- $(
1219
1140
  )" '"$@"'
1220
1141
 
1221
1142
  exec "$JAVACMD" "$@"
1222
- `;function zs(e,t){Ga(t,`gradlew`,Rs,{executable:!0}),Ga(t,`gradlew.bat`,Ls),Ga(t,`gradle/wrapper/gradle-wrapper.jar`,fetch(Fs).then(e=>e.arrayBuffer())),Ga(t,`gradle/wrapper/gradle-wrapper.properties`,Is)}function Bs(e,t){let n=W(t.currentDir,`main.tsx`),r=t.files.get(n);r||t.files.set(n,r=Ka()),Vs(e,{kmpModuleName:`${mo(e.name)}-shared`,...t,currentFile:r})}function Vs(e,t){t.currentFile.imports.push({moduleName:`./index.scss`},{moduleName:`react`,name:`StrictMode`},{moduleName:`react-dom/client`,name:`createRoot`},{moduleName:t.kmpModuleName,name:`decode${e.name}ExternalContextsFromString`},{moduleName:`./${e.name}Context.ts`,name:`${e.name}Context`},{moduleName:`./${e.name}App.tsx`,name:`${e.name}App`}),t.currentFile.declarations.push(ea`
1143
+ `;function Fs(e,t){Ga(t,`gradlew`,Ps,{executable:!0}),Ga(t,`gradlew.bat`,Ns),Ga(t,`gradle/wrapper/gradle-wrapper.jar`,fetch(js).then(e=>e.arrayBuffer())),Ga(t,`gradle/wrapper/gradle-wrapper.properties`,Ms)}function Is(e,t){let n=W(t.currentDir,`main.tsx`),r=t.files.get(n);r||t.files.set(n,r=Ka()),Ls(e,{kmpModuleName:`${mo(e.name)}-shared`,...t,currentFile:r})}function Ls(e,t){t.currentFile.imports.push({moduleName:`./index.scss`},{moduleName:`react`,name:`StrictMode`},{moduleName:`react-dom/client`,name:`createRoot`},{moduleName:t.kmpModuleName,name:`decode${e.name}ExternalContextsFromString`},{moduleName:`./${e.name}Context.ts`,name:`${e.name}Context`},{moduleName:`./${e.name}App.tsx`,name:`${e.name}App`}),t.currentFile.declarations.push(ea`
1223
1144
  export function renderRoot(encodedExternalContexts: string) {
1224
1145
  createRoot(document.getElementById("${mo(e.name)}-app-root")!).render(
1225
1146
  <StrictMode>
@@ -1235,7 +1156,7 @@ exec "$JAVACMD" "$@"
1235
1156
  </StrictMode>,
1236
1157
  );
1237
1158
  }
1238
- `)}var Hs=`# http://editorconfig.org
1159
+ `)}var Rs=`# http://editorconfig.org
1239
1160
  root = true
1240
1161
 
1241
1162
  [*]
@@ -1253,9 +1174,9 @@ end_of_line = crlf
1253
1174
  [{*.kt,*.kts,*.md}]
1254
1175
  indent_size = 4
1255
1176
  max_line_length = 100
1256
- `,Us=`* text=auto eol=lf
1177
+ `,zs=`* text=auto eol=lf
1257
1178
  *.bat text eol=crlf
1258
- `,Ws=`# Gradle
1179
+ `,Bs=`# Gradle
1259
1180
  .gradle/
1260
1181
  build/
1261
1182
  !**/src/**/build/
@@ -1292,7 +1213,7 @@ out/
1292
1213
  # Misc
1293
1214
  .DS_Store
1294
1215
  *.pem
1295
- `;function Gs(e,t){Ga(t,`.gitignore`,Ws),Ga(t,`.gitattributes`,Us),Ga(t,`.editorconfig`,Hs)}var Ks=`package <%= filePackage %>
1216
+ `;function Vs(e,t){Ga(t,`.gitignore`,Bs),Ga(t,`.gitattributes`,zs),Ga(t,`.editorconfig`,Rs)}var Hs=`package <%= filePackage %>
1296
1217
 
1297
1218
  import kotlin.js.JsExport
1298
1219
  import kotlin.jvm.JvmOverloads
@@ -1320,9 +1241,9 @@ class <%= formClass %>SubmitError @JvmOverloads constructor(override val message
1320
1241
  @SerialName("validationError")
1321
1242
  class <%= formClass %>SubmitValidationError(val issues: List<LocatedValidationIssue>) :
1322
1243
  <%= formClass %>SubmitResponse
1323
- `;function qs(e,t){let n={filePackage:t.currentPackage,formClass:e.name};Na(t,`${e.name}Responses.kt`,Ks,n)}var Js=`@use "@ostack.tech/ui/scss" as o-ui;
1244
+ `;function Us(e,t){let n={filePackage:t.currentPackage,formClass:e.name};Na(t,`${e.name}Responses.kt`,Hs,n)}var Ws=`@use "@ostack.tech/ui/scss" as o-ui;
1324
1245
  @use "@ostack.tech/ui-kform/scss" as o-ui-kform;
1325
- `;function Ys(e,t){Ga(t,`index.scss`,Js)}var Xs=`import js from "@eslint/js";
1246
+ `;function Gs(e,t){Ga(t,`index.scss`,Ws)}var Ks=`import js from "@eslint/js";
1326
1247
  import { defineConfig, globalIgnores } from "eslint/config";
1327
1248
  import reactHooks from "eslint-plugin-react-hooks";
1328
1249
  import reactRefresh from "eslint-plugin-react-refresh";
@@ -1344,7 +1265,7 @@ export default defineConfig([
1344
1265
  },
1345
1266
  },
1346
1267
  ]);
1347
- `,Zs=`<!doctype html>
1268
+ `,qs=`<!doctype html>
1348
1269
  <html lang="en">
1349
1270
  <head>
1350
1271
  <meta charset="UTF-8" />
@@ -1366,7 +1287,7 @@ export default defineConfig([
1366
1287
  <\/script>
1367
1288
  </body>
1368
1289
  </html>
1369
- `,Qs=`{
1290
+ `,Js=`{
1370
1291
  "name": "<%= formId %>-react-app",
1371
1292
  "private": true,
1372
1293
  "version": "0.0.0",
@@ -1406,7 +1327,7 @@ export default defineConfig([
1406
1327
  "vite": "<%= dependencyVersions.vite %>"
1407
1328
  }
1408
1329
  }
1409
- `,$s=`<svg xmlns="http://www.w3.org/2000/svg" width="48" height="46" fill="none" viewBox="0 0 48 46"><path fill="#863bff" d="M25.946 44.938c-.664.845-2.021.375-2.021-.698V33.937a2.26 2.26 0 0 0-2.262-2.262H10.287c-.92 0-1.456-1.04-.92-1.788l7.48-10.471c1.07-1.497 0-3.578-1.842-3.578H1.237c-.92 0-1.456-1.04-.92-1.788L10.013.474c.214-.297.556-.474.92-.474h28.894c.92 0 1.456 1.04.92 1.788l-7.48 10.471c-1.07 1.498 0 3.579 1.842 3.579h11.377c.943 0 1.473 1.088.89 1.83L25.947 44.94z" style="fill:#863bff;fill:color(display-p3 .5252 .23 1);fill-opacity:1"/><mask id="a" width="48" height="46" x="0" y="0" maskUnits="userSpaceOnUse" style="mask-type:alpha"><path fill="#000" d="M25.842 44.938c-.664.844-2.021.375-2.021-.698V33.937a2.26 2.26 0 0 0-2.262-2.262H10.183c-.92 0-1.456-1.04-.92-1.788l7.48-10.471c1.07-1.498 0-3.579-1.842-3.579H1.133c-.92 0-1.456-1.04-.92-1.787L9.91.473c.214-.297.556-.474.92-.474h28.894c.92 0 1.456 1.04.92 1.788l-7.48 10.471c-1.07 1.498 0 3.578 1.842 3.578h11.377c.943 0 1.473 1.088.89 1.832L25.843 44.94z" style="fill:#000;fill-opacity:1"/></mask><g mask="url(#a)"><g filter="url(#b)"><ellipse cx="5.508" cy="14.704" fill="#ede6ff" rx="5.508" ry="14.704" style="fill:#ede6ff;fill:color(display-p3 .9275 .9033 1);fill-opacity:1" transform="matrix(.00324 1 1 -.00324 -4.47 31.516)"/></g><g filter="url(#c)"><ellipse cx="10.399" cy="29.851" fill="#ede6ff" rx="10.399" ry="29.851" style="fill:#ede6ff;fill:color(display-p3 .9275 .9033 1);fill-opacity:1" transform="matrix(.00324 1 1 -.00324 -39.328 7.883)"/></g><g filter="url(#d)"><ellipse cx="5.508" cy="30.487" fill="#7e14ff" rx="5.508" ry="30.487" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(89.814 -25.913 -14.639)scale(1 -1)"/></g><g filter="url(#e)"><ellipse cx="5.508" cy="30.599" fill="#7e14ff" rx="5.508" ry="30.599" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(89.814 -32.644 -3.334)scale(1 -1)"/></g><g filter="url(#f)"><ellipse cx="5.508" cy="30.599" fill="#7e14ff" rx="5.508" ry="30.599" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="matrix(.00324 1 1 -.00324 -34.34 30.47)"/></g><g filter="url(#g)"><ellipse cx="14.072" cy="22.078" fill="#ede6ff" rx="14.072" ry="22.078" style="fill:#ede6ff;fill:color(display-p3 .9275 .9033 1);fill-opacity:1" transform="rotate(93.35 24.506 48.493)scale(-1 1)"/></g><g filter="url(#h)"><ellipse cx="3.47" cy="21.501" fill="#7e14ff" rx="3.47" ry="21.501" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(89.009 28.708 47.59)scale(-1 1)"/></g><g filter="url(#i)"><ellipse cx="3.47" cy="21.501" fill="#7e14ff" rx="3.47" ry="21.501" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(89.009 28.708 47.59)scale(-1 1)"/></g><g filter="url(#j)"><ellipse cx=".387" cy="8.972" fill="#7e14ff" rx="4.407" ry="29.108" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(39.51 .387 8.972)"/></g><g filter="url(#k)"><ellipse cx="47.523" cy="-6.092" fill="#7e14ff" rx="4.407" ry="29.108" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(37.892 47.523 -6.092)"/></g><g filter="url(#l)"><ellipse cx="41.412" cy="6.333" fill="#47bfff" rx="5.971" ry="9.665" style="fill:#47bfff;fill:color(display-p3 .2799 .748 1);fill-opacity:1" transform="rotate(37.892 41.412 6.333)"/></g><g filter="url(#m)"><ellipse cx="-1.879" cy="38.332" fill="#7e14ff" rx="4.407" ry="29.108" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(37.892 -1.88 38.332)"/></g><g filter="url(#n)"><ellipse cx="-1.879" cy="38.332" fill="#7e14ff" rx="4.407" ry="29.108" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(37.892 -1.88 38.332)"/></g><g filter="url(#o)"><ellipse cx="35.651" cy="29.907" fill="#7e14ff" rx="4.407" ry="29.108" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(37.892 35.651 29.907)"/></g><g filter="url(#p)"><ellipse cx="38.418" cy="32.4" fill="#47bfff" rx="5.971" ry="15.297" style="fill:#47bfff;fill:color(display-p3 .2799 .748 1);fill-opacity:1" transform="rotate(37.892 38.418 32.4)"/></g></g><defs><filter id="b" width="60.045" height="41.654" x="-19.77" y="16.149" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="7.659"/></filter><filter id="c" width="90.34" height="51.437" x="-54.613" y="-7.533" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="7.659"/></filter><filter id="d" width="79.355" height="29.4" x="-49.64" y="2.03" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="e" width="79.579" height="29.4" x="-45.045" y="20.029" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="f" width="79.579" height="29.4" x="-43.513" y="21.178" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="g" width="74.749" height="58.852" x="15.756" y="-17.901" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="7.659"/></filter><filter id="h" width="61.377" height="25.362" x="23.548" y="2.284" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="i" width="61.377" height="25.362" x="23.548" y="2.284" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="j" width="56.045" height="63.649" x="-27.636" y="-22.853" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="k" width="54.814" height="64.646" x="20.116" y="-38.415" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="l" width="33.541" height="35.313" x="24.641" y="-11.323" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="m" width="54.814" height="64.646" x="-29.286" y="6.009" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="n" width="54.814" height="64.646" x="-29.286" y="6.009" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="o" width="54.814" height="64.646" x="8.244" y="-2.416" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="p" width="39.409" height="43.623" x="18.713" y="10.588" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter></defs></svg>`,ec=`{
1330
+ `,Ys=`<svg xmlns="http://www.w3.org/2000/svg" width="48" height="46" fill="none" viewBox="0 0 48 46"><path fill="#863bff" d="M25.946 44.938c-.664.845-2.021.375-2.021-.698V33.937a2.26 2.26 0 0 0-2.262-2.262H10.287c-.92 0-1.456-1.04-.92-1.788l7.48-10.471c1.07-1.497 0-3.578-1.842-3.578H1.237c-.92 0-1.456-1.04-.92-1.788L10.013.474c.214-.297.556-.474.92-.474h28.894c.92 0 1.456 1.04.92 1.788l-7.48 10.471c-1.07 1.498 0 3.579 1.842 3.579h11.377c.943 0 1.473 1.088.89 1.83L25.947 44.94z" style="fill:#863bff;fill:color(display-p3 .5252 .23 1);fill-opacity:1"/><mask id="a" width="48" height="46" x="0" y="0" maskUnits="userSpaceOnUse" style="mask-type:alpha"><path fill="#000" d="M25.842 44.938c-.664.844-2.021.375-2.021-.698V33.937a2.26 2.26 0 0 0-2.262-2.262H10.183c-.92 0-1.456-1.04-.92-1.788l7.48-10.471c1.07-1.498 0-3.579-1.842-3.579H1.133c-.92 0-1.456-1.04-.92-1.787L9.91.473c.214-.297.556-.474.92-.474h28.894c.92 0 1.456 1.04.92 1.788l-7.48 10.471c-1.07 1.498 0 3.578 1.842 3.578h11.377c.943 0 1.473 1.088.89 1.832L25.843 44.94z" style="fill:#000;fill-opacity:1"/></mask><g mask="url(#a)"><g filter="url(#b)"><ellipse cx="5.508" cy="14.704" fill="#ede6ff" rx="5.508" ry="14.704" style="fill:#ede6ff;fill:color(display-p3 .9275 .9033 1);fill-opacity:1" transform="matrix(.00324 1 1 -.00324 -4.47 31.516)"/></g><g filter="url(#c)"><ellipse cx="10.399" cy="29.851" fill="#ede6ff" rx="10.399" ry="29.851" style="fill:#ede6ff;fill:color(display-p3 .9275 .9033 1);fill-opacity:1" transform="matrix(.00324 1 1 -.00324 -39.328 7.883)"/></g><g filter="url(#d)"><ellipse cx="5.508" cy="30.487" fill="#7e14ff" rx="5.508" ry="30.487" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(89.814 -25.913 -14.639)scale(1 -1)"/></g><g filter="url(#e)"><ellipse cx="5.508" cy="30.599" fill="#7e14ff" rx="5.508" ry="30.599" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(89.814 -32.644 -3.334)scale(1 -1)"/></g><g filter="url(#f)"><ellipse cx="5.508" cy="30.599" fill="#7e14ff" rx="5.508" ry="30.599" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="matrix(.00324 1 1 -.00324 -34.34 30.47)"/></g><g filter="url(#g)"><ellipse cx="14.072" cy="22.078" fill="#ede6ff" rx="14.072" ry="22.078" style="fill:#ede6ff;fill:color(display-p3 .9275 .9033 1);fill-opacity:1" transform="rotate(93.35 24.506 48.493)scale(-1 1)"/></g><g filter="url(#h)"><ellipse cx="3.47" cy="21.501" fill="#7e14ff" rx="3.47" ry="21.501" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(89.009 28.708 47.59)scale(-1 1)"/></g><g filter="url(#i)"><ellipse cx="3.47" cy="21.501" fill="#7e14ff" rx="3.47" ry="21.501" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(89.009 28.708 47.59)scale(-1 1)"/></g><g filter="url(#j)"><ellipse cx=".387" cy="8.972" fill="#7e14ff" rx="4.407" ry="29.108" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(39.51 .387 8.972)"/></g><g filter="url(#k)"><ellipse cx="47.523" cy="-6.092" fill="#7e14ff" rx="4.407" ry="29.108" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(37.892 47.523 -6.092)"/></g><g filter="url(#l)"><ellipse cx="41.412" cy="6.333" fill="#47bfff" rx="5.971" ry="9.665" style="fill:#47bfff;fill:color(display-p3 .2799 .748 1);fill-opacity:1" transform="rotate(37.892 41.412 6.333)"/></g><g filter="url(#m)"><ellipse cx="-1.879" cy="38.332" fill="#7e14ff" rx="4.407" ry="29.108" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(37.892 -1.88 38.332)"/></g><g filter="url(#n)"><ellipse cx="-1.879" cy="38.332" fill="#7e14ff" rx="4.407" ry="29.108" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(37.892 -1.88 38.332)"/></g><g filter="url(#o)"><ellipse cx="35.651" cy="29.907" fill="#7e14ff" rx="4.407" ry="29.108" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(37.892 35.651 29.907)"/></g><g filter="url(#p)"><ellipse cx="38.418" cy="32.4" fill="#47bfff" rx="5.971" ry="15.297" style="fill:#47bfff;fill:color(display-p3 .2799 .748 1);fill-opacity:1" transform="rotate(37.892 38.418 32.4)"/></g></g><defs><filter id="b" width="60.045" height="41.654" x="-19.77" y="16.149" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="7.659"/></filter><filter id="c" width="90.34" height="51.437" x="-54.613" y="-7.533" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="7.659"/></filter><filter id="d" width="79.355" height="29.4" x="-49.64" y="2.03" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="e" width="79.579" height="29.4" x="-45.045" y="20.029" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="f" width="79.579" height="29.4" x="-43.513" y="21.178" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="g" width="74.749" height="58.852" x="15.756" y="-17.901" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="7.659"/></filter><filter id="h" width="61.377" height="25.362" x="23.548" y="2.284" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="i" width="61.377" height="25.362" x="23.548" y="2.284" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="j" width="56.045" height="63.649" x="-27.636" y="-22.853" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="k" width="54.814" height="64.646" x="20.116" y="-38.415" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="l" width="33.541" height="35.313" x="24.641" y="-11.323" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="m" width="54.814" height="64.646" x="-29.286" y="6.009" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="n" width="54.814" height="64.646" x="-29.286" y="6.009" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="o" width="54.814" height="64.646" x="8.244" y="-2.416" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="p" width="39.409" height="43.623" x="18.713" y="10.588" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter></defs></svg>`,Xs=`{
1410
1331
  "compilerOptions": {
1411
1332
  "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
1412
1333
  "target": "es2023",
@@ -1432,14 +1353,14 @@ export default defineConfig([
1432
1353
  },
1433
1354
  "include": ["src"]
1434
1355
  }
1435
- `,tc=`{
1356
+ `,Zs=`{
1436
1357
  "files": [],
1437
1358
  "references": [
1438
1359
  { "path": "./tsconfig.app.json" },
1439
1360
  { "path": "./tsconfig.node.json" }
1440
1361
  ]
1441
1362
  }
1442
- `,nc=`{
1363
+ `,Qs=`{
1443
1364
  "compilerOptions": {
1444
1365
  "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
1445
1366
  "target": "es2023",
@@ -1462,7 +1383,7 @@ export default defineConfig([
1462
1383
  },
1463
1384
  "include": ["vite.config.ts"]
1464
1385
  }
1465
- `,rc=`import { resolve } from "node:path";
1386
+ `,$s=`import { resolve } from "node:path";
1466
1387
 
1467
1388
  import react from "@vitejs/plugin-react";
1468
1389
  import { defineConfig } from "vite";
@@ -1504,4 +1425,4 @@ export default defineConfig({
1504
1425
  proxy: { "<%= apiBasePath %>": "<%= viteConfigProxyTarget %>" },
1505
1426
  },
1506
1427
  });
1507
- `;function ic(e,t){let n={formId:mo(e.name),formClass:e.name,formTitle:fo(e.name),ostackUiVersion:`0.16.2`,kFormVersion:`1.0.0-rc.1`,dependencyVersions:JSON.parse(`{"@eslint/js":"^10.0.1","@fortawesome/fontawesome-svg-core":"^7.3.1","@fortawesome/free-brands-svg-icons":"^7.3.1","@fortawesome/free-regular-svg-icons":"^7.3.1","@fortawesome/free-solid-svg-icons":"^7.3.1","@ostack.tech/kform":"~1.0.0-rc.1","@ostack.tech/kform-react":"~1.0.0-rc.1","@ostack.tech/kform-scaffolder":"~1.0.0-rc.1","@storybook/addon-a11y":"^10.5.7","@storybook/addon-docs":"^10.5.7","@storybook/addon-links":"^10.5.7","@storybook/react-vite":"^10.5.7","@types/node":"^24.13.3","@types/react":"^19.2.18","@types/react-dom":"^19.2.4","@vitejs/plugin-react":"^6.0.5","change-case":"^5.4.4","cpy-cli":"^7.0.0","date-fns":"^4.4.0","eslint":"^10.8.1","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.6","eslint-plugin-react-hooks":"^7.1.1","eslint-plugin-react-refresh":"^0.5.4","eslint-plugin-simple-import-sort":"^14.0.0","eslint-plugin-storybook":"^10.5.7","globals":"^17.10.0","happy-dom":"^20.11.2","lint-staged":"^17.2.0","prettier":"^3.9.6","prettier-plugin-jsdoc":"^1.8.1","react":"^19.2.8","react-dom":"^19.2.8","refractor":"^5.0.0","rimraf":"^6.1.3","sass-embedded":"^1.100.0","simple-git-hooks":"^2.13.1","storybook":"^10.5.7","terser":"^5.50.0","tslib":"^2.8.1","typescript":"~6.0.3","typescript-eslint":"^8.67.0","vite":"^8.2.1","vitest":"^4.1.10","write-excel-file":"^4.1.1","zod":"^4.4.3","zustand":"^5.0.14"}`),encodedExternalContexts:JSON.stringify(t.serializationFormat===`json`?`{}`:`<${e.name}ExternalContexts />`),apiBasePath:t.apiBasePath??`/api/`,viteConfigOutDir:t.viteConfigOutDir??`build/dist/`,viteConfigProxyTarget:t.viteConfigProxyTarget??`http://127.0.0.1:8080/`};Na(t,`react-app/package.json`,Qs,n),Na(t,`react-app/vite.config.ts`,rc,n),Ga(t,`react-app/tsconfig.json`,tc),Ga(t,`react-app/tsconfig.app.json`,ec),Ga(t,`react-app/tsconfig.node.json`,nc),Ga(t,`react-app/eslint.config.js`,Xs),Na(t,`react-app/index.html`,Zs,n),Ga(t,`react-app/public/favicon.svg`,$s)}var ac={currentDir:`shared/src/commonMain/kotlin`},oc={currentDir:`shared/src/commonTest/kotlin`},sc={currentDir:`react-app/src`};function cc({name:e=`ostack-ui-kform`,schematicKinds:t=us,scaffolders:n=[Gs,zs,Ms,ic,Gr(Da,ac),Gr(ui,ac),Gr(qs,ac),Gr(ws,ac),Gr(Bo,ac),Gr(Ia,oc),Gr(Bs,sc),Gr(Ys,sc),Gr(ms,sc),Gr(Ss,sc),Gr(To,sc),Gr(ko,sc),Gr(Po,sc)],scaffoldingData:r=e=>({useFileBase64Serializer:!0,...e.config}),configs:i=(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Qa,{}),(0,U.jsx)(eo,{}),(0,U.jsx)(to,{})]}),version:a=`0.16.2`,...o}){return(0,U.jsx)(Ha,{name:e,schematicKinds:t,scaffolders:n,scaffoldingData:r,configs:i,version:a,...o})}(0,S.createRoot)(document.getElementById(`root`)).render((0,U.jsx)(C.StrictMode,{children:(0,U.jsx)(cc,{})}));
1428
+ `;function ec(e,t){let n={formId:mo(e.name),formClass:e.name,formTitle:fo(e.name),ostackUiVersion:`0.16.4`,kFormVersion:`1.0.0-rc.1`,dependencyVersions:JSON.parse(`{"@eslint/js":"^10.0.1","@fortawesome/fontawesome-svg-core":"^7.3.1","@fortawesome/free-brands-svg-icons":"^7.3.1","@fortawesome/free-regular-svg-icons":"^7.3.1","@fortawesome/free-solid-svg-icons":"^7.3.1","@ostack.tech/kform":"~1.0.0-rc.1","@ostack.tech/kform-react":"~1.0.0-rc.1","@ostack.tech/kform-scaffolder":"~1.0.0-rc.1","@storybook/addon-a11y":"^10.5.8","@storybook/addon-docs":"^10.5.8","@storybook/addon-links":"^10.5.8","@storybook/react-vite":"^10.5.8","@types/node":"^24.13.3","@types/react":"^19.2.18","@types/react-dom":"^19.2.4","@vitejs/plugin-react":"^6.0.5","change-case":"^5.4.4","cpy-cli":"^7.0.0","date-fns":"^4.4.0","eslint":"^10.8.1","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.6","eslint-plugin-react-hooks":"^7.1.1","eslint-plugin-react-refresh":"^0.5.4","eslint-plugin-simple-import-sort":"^14.0.0","eslint-plugin-storybook":"^10.5.8","globals":"^17.11.0","happy-dom":"^20.11.2","lint-staged":"^17.3.0","prettier":"^3.9.6","prettier-plugin-jsdoc":"^1.8.1","react":"^19.2.8","react-dom":"^19.2.8","refractor":"^5.0.0","rimraf":"^6.1.3","sass-embedded":"^1.102.0","simple-git-hooks":"^2.13.1","storybook":"^10.5.8","terser":"^5.50.0","tslib":"^2.8.1","typescript":"~6.0.3","typescript-eslint":"^8.67.0","vite":"^8.2.1","vitest":"^4.1.10","write-excel-file":"^4.1.1","zod":"^4.4.3","zustand":"^5.0.15"}`),encodedExternalContexts:JSON.stringify(t.serializationFormat===`json`?`{}`:`<${e.name}ExternalContexts />`),apiBasePath:t.apiBasePath??`/api/`,viteConfigOutDir:t.viteConfigOutDir??`build/dist/`,viteConfigProxyTarget:t.viteConfigProxyTarget??`http://127.0.0.1:8080/`};Na(t,`react-app/package.json`,Js,n),Na(t,`react-app/vite.config.ts`,$s,n),Ga(t,`react-app/tsconfig.json`,Zs),Ga(t,`react-app/tsconfig.app.json`,Xs),Ga(t,`react-app/tsconfig.node.json`,Qs),Ga(t,`react-app/eslint.config.js`,Ks),Na(t,`react-app/index.html`,qs,n),Ga(t,`react-app/public/favicon.svg`,Ys)}var tc={currentDir:`shared/src/commonMain/kotlin`},nc={currentDir:`shared/src/commonTest/kotlin`},rc={currentDir:`react-app/src`};function ic({name:e=`ostack-ui-kform`,schematicKinds:t=as,scaffolders:n=[Vs,Fs,Os,ec,Gr(Da,tc),Gr(ui,tc),Gr(Us,tc),Gr(bs,tc),Gr(Fo,tc),Gr(Ia,nc),Gr(Is,rc),Gr(Gs,rc),Gr(ls,rc),Gr(vs,rc),Gr(wo,rc),Gr(ko,rc)],scaffoldingData:r=e=>({useFileBase64Serializer:!0,...e.config}),configs:i=(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Qa,{}),(0,U.jsx)(eo,{}),(0,U.jsx)(to,{})]}),version:a=`0.16.4`,...o}){return(0,U.jsx)(Ha,{name:e,schematicKinds:t,scaffolders:n,scaffoldingData:r,configs:i,version:a,...o})}(0,S.createRoot)(document.getElementById(`root`)).render((0,U.jsx)(C.StrictMode,{children:(0,U.jsx)(ic,{})}));