Initial commit

This commit is contained in:
LZH-YS1998 committed 2026-07-01 17:56:31 +08:00
commit d78931979d
731 files changed
+311088

No files matched your search

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

@@ -0,0 +1 @@
.react-flow{direction:ltr;--xy-edge-stroke-default: #b1b1b7;--xy-edge-stroke-width-default: 1;--xy-edge-stroke-selected-default: #555;--xy-connectionline-stroke-default: #b1b1b7;--xy-connectionline-stroke-width-default: 1;--xy-attribution-background-color-default: rgba(255, 255, 255, .5);--xy-minimap-background-color-default: #fff;--xy-minimap-mask-background-color-default: rgba(240, 240, 240, .6);--xy-minimap-mask-stroke-color-default: transparent;--xy-minimap-mask-stroke-width-default: 1;--xy-minimap-node-background-color-default: #e2e2e2;--xy-minimap-node-stroke-color-default: transparent;--xy-minimap-node-stroke-width-default: 2;--xy-background-color-default: transparent;--xy-background-pattern-dots-color-default: #91919a;--xy-background-pattern-lines-color-default: #eee;--xy-background-pattern-cross-color-default: #e2e2e2;background-color:var(--xy-background-color, var(--xy-background-color-default));--xy-node-color-default: inherit;--xy-node-border-default: 1px solid #1a192b;--xy-node-background-color-default: #fff;--xy-node-group-background-color-default: rgba(240, 240, 240, .25);--xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(0, 0, 0, .08);--xy-node-boxshadow-selected-default: 0 0 0 .5px #1a192b;--xy-node-border-radius-default: 3px;--xy-handle-background-color-default: #1a192b;--xy-handle-border-color-default: #fff;--xy-selection-background-color-default: rgba(0, 89, 220, .08);--xy-selection-border-default: 1px dotted rgba(0, 89, 220, .8);--xy-controls-button-background-color-default: #fefefe;--xy-controls-button-background-color-hover-default: #f4f4f4;--xy-controls-button-color-default: inherit;--xy-controls-button-color-hover-default: inherit;--xy-controls-button-border-color-default: #eee;--xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, .08);--xy-edge-label-background-color-default: #ffffff;--xy-edge-label-color-default: inherit;--xy-resize-background-color-default: #3367d9}.react-flow.dark{--xy-edge-stroke-default: #3e3e3e;--xy-edge-stroke-width-default: 1;--xy-edge-stroke-selected-default: #727272;--xy-connectionline-stroke-default: #b1b1b7;--xy-connectionline-stroke-width-default: 1;--xy-attribution-background-color-default: rgba(150, 150, 150, .25);--xy-minimap-background-color-default: #141414;--xy-minimap-mask-background-color-default: rgba(60, 60, 60, .6);--xy-minimap-mask-stroke-color-default: transparent;--xy-minimap-mask-stroke-width-default: 1;--xy-minimap-node-background-color-default: #2b2b2b;--xy-minimap-node-stroke-color-default: transparent;--xy-minimap-node-stroke-width-default: 2;--xy-background-color-default: #141414;--xy-background-pattern-dots-color-default: #777;--xy-background-pattern-lines-color-default: #777;--xy-background-pattern-cross-color-default: #777;--xy-node-color-default: #f8f8f8;--xy-node-border-default: 1px solid #3c3c3c;--xy-node-background-color-default: #1e1e1e;--xy-node-group-background-color-default: rgba(240, 240, 240, .25);--xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(255, 255, 255, .08);--xy-node-boxshadow-selected-default: 0 0 0 .5px #999;--xy-handle-background-color-default: #bebebe;--xy-handle-border-color-default: #1e1e1e;--xy-selection-background-color-default: rgba(200, 200, 220, .08);--xy-selection-border-default: 1px dotted rgba(200, 200, 220, .8);--xy-controls-button-background-color-default: #2b2b2b;--xy-controls-button-background-color-hover-default: #3e3e3e;--xy-controls-button-color-default: #f8f8f8;--xy-controls-button-color-hover-default: #fff;--xy-controls-button-border-color-default: #5b5b5b;--xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, .08);--xy-edge-label-background-color-default: #141414;--xy-edge-label-color-default: #f8f8f8}.react-flow__background{background-color:var(--xy-background-color-props, var(--xy-background-color, var(--xy-background-color-default)));pointer-events:none;z-index:-1}.react-flow__container{position:absolute;width:100%;height:100%;top:0;left:0}.react-flow__pane{z-index:1}.react-flow__pane.draggable{cursor:grab}.react-flow__pane.dragging{cursor:grabbing}.react-flow__pane.selection{cursor:pointer}.react-flow__viewport{transform-origin:0 0;z-index:2;pointer-events:none}.react-flow__renderer{z-index:4}.react-flow__selection{z-index:6}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible{outline:none}.react-flow__edge-path{stroke:var(--xy-edge-stroke, var(--xy-edge-stroke-default));stroke-width:var(--xy-edge-stroke-width, var(--xy-edge-stroke-width-default));fill:none}.react-flow__connection-path{stroke:var(--xy-connectionline-stroke, var(--xy-connectionline-stroke-default));stroke-width:var(--xy-connectionline-stroke-width, var(--xy-connectionline-stroke-width-default));fill:none}.react-flow .react-flow__edges{position:absolute}.react-flow .react-flow__edges svg{overflow:visible;position:absolute;pointer-events:none}.react-flow__edge{pointer-events:visibleStroke}.react-flow__edge.selectable{cursor:pointer}.react-flow__edge.animated path{strokLine truncated
@@ -0,0 +1,155 @@
import{g as Zo,r as R3}from"./phaser-DFK5Ua9d.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var Gp={exports:{}},hc={};var sk;function A3(){if(sk)return hc;sk=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,o){var a=null;if(o!==void 0&&(a=""+o),i.key!==void 0&&(a=""+i.key),"key"in i){o={};for(var u in i)u!=="key"&&(o[u]=i[u])}else o=i;return i=o.ref,{$$typeof:e,type:r,key:a,ref:i!==void 0?i:null,props:o}}return hc.Fragment=t,hc.jsx=n,hc.jsxs=n,hc}var ok;function M3(){return ok||(ok=1,Gp.exports=A3()),Gp.exports}var c=M3(),qp={exports:{}},_t={};var ak;function D3(){if(ak)return _t;ak=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),a=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),g=Symbol.iterator;function y(U){return U===null||typeof U!="object"?null:(U=g&&U[g]||U["@@iterator"],typeof U=="function"?U:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,S={};function _(U,ee,P){this.props=U,this.context=ee,this.refs=S,this.updater=P||v}_.prototype.isReactComponent={},_.prototype.setState=function(U,ee){if(typeof U!="object"&&typeof U!="function"&&U!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,U,ee,"setState")},_.prototype.forceUpdate=function(U){this.updater.enqueueForceUpdate(this,U,"forceUpdate")};function k(){}k.prototype=_.prototype;function C(U,ee,P){this.props=U,this.context=ee,this.refs=S,this.updater=P||v}var N=C.prototype=new k;N.constructor=C,w(N,_.prototype),N.isPureReactComponent=!0;var L=Array.isArray;function I(){}var D={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function O(U,ee,P){var K=P.ref;return{$$typeof:e,type:U,key:ee,ref:K!==void 0?K:null,props:P}}function M(U,ee){return O(U.type,ee,U.props)}function A(U){return typeof U=="object"&&U!==null&&U.$$typeof===e}function $(U){var ee={"=":"=0",":":"=2"};return"$"+U.replace(/[=:]/g,function(P){return ee[P]})}var Y=/\/+/g;function B(U,ee){return typeof U=="object"&&U!==null&&U.key!=null?$(""+U.key):ee.toString(36)}function G(U){switch(U.status){case"fulfilled":return U.value;case"rejected":throw U.reason;default:switch(typeof U.status=="string"?U.then(I,I):(U.status="pending",U.then(function(ee){U.status==="pending"&&(U.status="fulfilled",U.value=ee)},function(ee){U.status==="pending"&&(U.status="rejected",U.reason=ee)})),U.status){case"fulfilled":return U.value;case"rejected":throw U.reason}}throw U}function H(U,ee,P,K,J){var te=typeof U;(te==="undefined"||te==="boolean")&&(U=null);var re=!1;if(U===null)re=!0;else switch(te){case"bigint":case"string":case"number":re=!0;break;case"object":switch(U.$$typeof){case e:case t:re=!0;break;case p:return re=U._init,H(re(U._payload),ee,P,K,J)}}if(re)return J=J(U),re=K===""?"."+B(U,0):K,L(J)?(P="",re!=null&&(P=re.replace(Y,"$&/")+"/"),H(J,ee,P,"",function(se){return se})):J!=null&&(A(J)&&(J=M(J,P+(J.key==null||U&&U.key===J.key?"":(""+J.key).replace(Y,"$&/")+"/")+re)),ee.push(J)),1;re=0;var oe=K===""?".":K+":";if(L(U))for(var fe=0;fe<U.length;fe++)K=U[fe],te=oe+B(K,fe),re+=H(K,ee,P,te,J);else if(fe=y(U),typeof fe=="function")for(U=fe.call(U),fe=0;!(K=U.next()).done;)K=K.value,te=oe+B(K,fe++),re+=H(K,ee,P,te,J);else if(te==="object"){if(typeof U.then=="function")return H(G(U),ee,P,K,J);throw ee=String(U),Error("Objects are not valid as a React child (found: "+(ee==="[object Object]"?"object with keys {"+Object.keys(U).join(", ")+"}":ee)+"). If you meant to render a collection of children, use an array instead.")}return re}function V(U,ee,P){if(U==null)return U;var K=[],J=0;return H(U,K,"","",function(te){return ee.call(P,te,J++)}),K}function W(U){if(U._status===-1){var ee=U._result;ee=ee(),ee.then(function(P){(U._status===0||U._status===-1)&&(U._status=1,U._result=P)},function(P){(U._status===0||U._status===-1)&&(U._status=2,U._result=P)}),U._status===-1&&(U._status=0,U._result=ee)}if(U._status=Line truncated
at`)?" (<anonymous>)":-1<f.stack.indexOf("@")?"@unknown:0:0":""}return`
`+Se+s+Ce}var We=!1;function Ye(s,l){if(!s||We)return"";We=!0;var f=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var x={DetermineComponentFrameRoot:function(){try{if(l){var Ie=function(){throw Error()};if(Object.defineProperty(Ie.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ie,[])}catch(ye){var xe=ye}Reflect.construct(s,[],Ie)}else{try{Ie.call()}catch(ye){xe=ye}s.call(Ie.prototype)}}else{try{throw Error()}catch(ye){xe=ye}(Ie=s())&&typeof Ie.catch=="function"&&Ie.catch(function(){})}}catch(ye){if(ye&&xe&&typeof ye.stack=="string")return[ye.stack,xe.stack]}return[null,null]}};x.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var b=Object.getOwnPropertyDescriptor(x.DetermineComponentFrameRoot,"name");b&&b.configurable&&Object.defineProperty(x.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var j=x.DetermineComponentFrameRoot(),F=j[0],X=j[1];if(F&&X){var ie=F.split(`
`),pe=X.split(`
`);for(b=x=0;x<ie.length&&!ie[x].includes("DetermineComponentFrameRoot");)x++;for(;b<pe.length&&!pe[b].includes("DetermineComponentFrameRoot");)b++;if(x===ie.length||b===pe.length)for(x=ie.length-1,b=pe.length-1;1<=x&&0<=b&&ie[x]!==pe[b];)b--;for(;1<=x&&0<=b;x--,b--)if(ie[x]!==pe[b]){if(x!==1||b!==1)do if(x--,b--,0>b||ie[x]!==pe[b]){var _e=`
`+ie[x].replace(" at new "," at ");return s.displayName&&_e.includes("<anonymous>")&&(_e=_e.replace("<anonymous>",s.displayName)),_e}while(1<=x&&0<=b);break}}}finally{We=!1,Error.prepareStackTrace=f}return(f=s?s.displayName||s.name:"")?He(f):""}function gt(s,l){switch(s.tag){case 26:case 27:case 5:return He(s.type);case 16:return He("Lazy");case 13:return s.child!==l&&l!==null?He("Suspense Fallback"):He("Suspense");case 19:return He("SuspenseList");case 0:case 15:return Ye(s.type,!1);case 11:return Ye(s.type.render,!1);case 1:return Ye(s.type,!0);case 31:return He("Activity");default:return""}}function Ut(s){try{var l="",f=null;do l+=gt(s,f),f=s,s=s.return;while(s);return l}catch(x){return`
Error generating stack: `+x.message+`
`+x.stack}}var bt=Object.prototype.hasOwnProperty,xt=e.unstable_scheduleCallback,me=e.unstable_cancelCallback,Oe=e.unstable_shouldYield,it=e.unstable_requestPaint,et=e.unstable_now,nt=e.unstable_getCurrentPriorityLevel,de=e.unstable_ImmediatePriority,ve=e.unstable_UserBlockingPriority,Ae=e.unstable_NormalPriority,Ue=e.unstable_LowPriority,Fe=e.unstable_IdlePriority,vt=e.log,Rt=e.unstable_setDisableYieldValue,ke=null,Re=null;function Ke(s){if(typeof vt=="function"&&Rt(s),Re&&typeof Re.setStrictMode=="function")try{Re.setStrictMode(ke,s)}catch{}}var Ge=Math.clz32?Math.clz32:xn,tt=Math.log,Qe=Math.LN2;function xn(s){return s>>>=0,s===0?32:31-(tt(s)/Qe|0)|0}var Qt=256,kn=262144,Nn=4194304;function sn(s){var l=s&42;if(l!==0)return l;switch(s&-s){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return s&261888;case 262144:case 524288:case 1048576:case 2097152:return s&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return s&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return s}}function tn(s,l,f){var x=s.pendingLanes;if(x===0)return 0;var b=0,j=s.suspendedLanes,F=s.pingedLanes;s=s.warmLanes;var X=x&134217727;return X!==0?(x=X&~j,x!==0?b=sn(x):(F&=X,F!==0?b=sn(F):f||(f=X&~s,f!==0&&(b=sn(f))))):(X=x&~j,X!==0?b=sn(X):F!==0?b=sn(F):f||(f=x&~s,f!==0&&(b=sn(f)))),b===0?0:l!==0&&l!==b&&(l&j)===0&&(j=b&-b,f=l&-l,j>=f||j===32&&(f&4194048)!==0)?l:b}function Nt(s,l){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&l)===0}function kt(s,l){switch(s){case 1:case 2:case 4:case 8:case 64:return l+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return l+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function qe(){var s=Nn;return Nn<<=1,(Nn&62914560)===0&&(Nn=4194304),s}function ze(s){for(var l=[],f=0;31>f;f++)l.push(s);return l}function pn(s,l){s.pendingLanes|=l,l!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function In(s,l,f,x,b,j){var F=s.pendingLanes;s.pendingLanes=f,s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0,s.expiredLanes&=f,s.entangledLanes&=f,s.errorRecoveryDisabledLanes&=f,s.shellSuspendCounter=0;var X=s.entanglements,ie=s.expirationTimes,pe=s.hiddenUpdates;for(f=F&~f;0<f;){var _e=31-Ge(f),Ie=1<<_e;X[_e]=0,ie[_e]=-1;var xe=pe[_e];if(xe!==null)for(pe[_e]=null,_e=0;_e<xe.length;_e++){var ye=xe[_e];ye!==null&&(ye.lane&=-536870913)}f&=~Ie}x!==0&&$t(s,x,0),j!==0&&b===0&&s.tag!==0&&(s.suspendedLanes|=j&~(F&~l))}function $t(s,l,f){s.pendingLanes|=l,s.suspendedLanes&=~l;var x=31-Ge(l);s.entangledLanes|=l,s.entanglements[x]=s.entanglements[x]|1073741824|f&261930}function Gt(s,l){var f=s.entangledLanes|=l;for(s=s.entanglements;f;){var x=31-Ge(f),b=1<<x;b&l|s[x]&l&&(s[x]|=l),f&=~b}}function Jt(s,l){var f=l&-l;return f=(f&42)!==0?1:tr(f),(f&(s.suspendedLanes|l))!==0?0:f}function tr(s){switch(s){case 2:s=1;break;case 8:s=4;break;case 32:s=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:s=128;break;case 268435456:s=134217728;break;default:s=0}return s}function Mn(s){return s&=-s,2<s?8<s?(s&134217727)!==0?32:268435456:8:2}function Ee(){var s=V.p;return s!==0?s:(s=window.event,s===void 0?32:Q_(s.type))}function Te(s,l){var f=V.p;try{return V.p=s,l()}finally{V.p=f}}var Xe=Math.random().toString(36).slice(2),$e="__reactFiber$"+Xe,It="__reactProps$"+Xe,yt="__reactContainer$"+Xe,Kn="__reactEvents$"+Xe,Me="__reactListeners$"+Xe,Mt="__reactHandles$"+Xe,Tn="__reactResources$"+Xe,or="__reactMarker$"+Xe;function Rn(s){delete s[$e],delete s[It],delete s[Kn],delete s[Me],delete s[Mt]}function Ve(s){var l=s[$e];if(l)return l;for(var f=s.parentNode;f;){if(l=f[yt]||f[$e]){if(f=l.alternate,l.child!==null||f!==null&&f.child!==null)for(s=L_(s);s!==null;){if(f=s[$e])return f;s=L_(s)}return l}s=f,f=s.parentNode}return null}function ar(s){if(s=s[$e]||s[yt]){var l=s.tag;if(l===5||l===6||l===13||l===31||l===26||l===27||l===3)return s}return null}function Zn(s){var l=s.tag;if(l===5||l===26||l===27||l===6)return s.stateNode;throw Error(r(33))}function An(s){var l=s[Tn];return l||(l=s[Tn]={hoistableStyles:new Map,hoistableScripts:new Map}),l}function Tt(s){s[or]=!0}var lr=new Set,Sn={};function dt(s,l){st(s,l),st(s+"Capture",l)}function st(s,l){for(Sn[s]=l,s=0;s<l.length;s++)lr.add(l[s])}var cr=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u2 Line truncated
`).replace(JA,"")}function j_(s,l){return l=C_(l),C_(s)===l}function un(s,l,f,x,b,j){switch(f){case"children":typeof x=="string"?l==="body"||l==="textarea"&&x===""||Ns(s,x):(typeof x=="number"||typeof x=="bigint")&&l!=="body"&&Ns(s,""+x);break;case"className":Dn(s,"class",x);break;case"tabIndex":Dn(s,"tabindex",x);break;case"dir":case"role":case"viewBox":case"width":case"height":Dn(s,f,x);break;case"style":Ru(s,x,j);break;case"data":if(l!=="object"){Dn(s,"data",x);break}case"src":case"href":if(x===""&&(l!=="a"||f!=="href")){s.removeAttribute(f);break}if(x==null||typeof x=="function"||typeof x=="symbol"||typeof x=="boolean"){s.removeAttribute(f);break}x=Qi(""+x),s.setAttribute(f,x);break;case"action":case"formAction":if(typeof x=="function"){s.setAttribute(f,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof j=="function"&&(f==="formAction"?(l!=="input"&&un(s,l,"name",b.name,b,null),un(s,l,"formEncType",b.formEncType,b,null),un(s,l,"formMethod",b.formMethod,b,null),un(s,l,"formTarget",b.formTarget,b,null)):(un(s,l,"encType",b.encType,b,null),un(s,l,"method",b.method,b,null),un(s,l,"target",b.target,b,null)));if(x==null||typeof x=="symbol"||typeof x=="boolean"){s.removeAttribute(f);break}x=Qi(""+x),s.setAttribute(f,x);break;case"onClick":x!=null&&(s.onclick=gi);break;case"onScroll":x!=null&&Ot("scroll",s);break;case"onScrollEnd":x!=null&&Ot("scrollend",s);break;case"dangerouslySetInnerHTML":if(x!=null){if(typeof x!="object"||!("__html"in x))throw Error(r(61));if(f=x.__html,f!=null){if(b.children!=null)throw Error(r(60));s.innerHTML=f}}break;case"multiple":s.multiple=x&&typeof x!="function"&&typeof x!="symbol";break;case"muted":s.muted=x&&typeof x!="function"&&typeof x!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(x==null||typeof x=="function"||typeof x=="boolean"||typeof x=="symbol"){s.removeAttribute("xlink:href");break}f=Qi(""+x),s.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",f);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":x!=null&&typeof x!="function"&&typeof x!="symbol"?s.setAttribute(f,""+x):s.removeAttribute(f);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":x&&typeof x!="function"&&typeof x!="symbol"?s.setAttribute(f,""):s.removeAttribute(f);break;case"capture":case"download":x===!0?s.setAttribute(f,""):x!==!1&&x!=null&&typeof x!="function"&&typeof x!="symbol"?s.setAttribute(f,x):s.removeAttribute(f);break;case"cols":case"rows":case"size":case"span":x!=null&&typeof x!="function"&&typeof x!="symbol"&&!isNaN(x)&&1<=x?s.setAttribute(f,x):s.removeAttribute(f);break;case"rowSpan":case"start":x==null||typeof x=="function"||typeof x=="symbol"||isNaN(x)?s.removeAttribute(f):s.setAttribute(f,x);break;case"popover":Ot("beforetoggle",s),Ot("toggle",s),yn(s,"popover",x);break;case"xlinkActuate":Sr(s,"http://www.w3.org/1999/xlink","xlink:actuate",x);break;case"xlinkArcrole":Sr(s,"http://www.w3.org/1999/xlink","xlink:arcrole",x);break;case"xlinkRole":Sr(s,"http://www.w3.org/1999/xlink","xlink:role",x);break;case"xlinkShow":Sr(s,"http://www.w3.org/1999/xlink","xlink:show",x);break;case"xlinkTitle":Sr(s,"http://www.w3.org/1999/xlink","xlink:title",x);break;case"xlinkType":Sr(s,"http://www.w3.org/1999/xlink","xlink:type",x);break;case"xmlBase":Sr(s,"http://www.w3.org/XML/1998/namespace","xml:base",x);break;case"xmlLang":Sr(s,"http://www.w3.org/XML/1998/namespace","xml:lang",x);break;case"xmlSpace":Sr(s,"http://www.w3.org/XML/1998/namespace","xml:space",x);break;case"is":yn(s,"is",x);break;case"innerText":case"textContent":break;default:(!(2<f.length)||f[0]!=="o"&&f[0]!=="O"||f[1]!=="n"&&f[1]!=="N")&&(f=Au.get(f)||f,yn(s,f,x))}}function Ep(s,l,f,x,b,j){switch(f){case"style":Ru(s,x,j);break;case"dangerouslySetInnerHTML":if(x!=null){if(typeof x!="object"||!("__html"in x))throw Error(r(61));if(f=x.__html,f!=null){if(b.children!=null)throw Error(r(60));s.innerHTML=f}}break;case"children":typeof x=="string"?Ns(s,x):(typeof x=="number"||typeof x=="bigint")&&Ns(s,""+x);break;case"onScroll":x!=null&&Ot("scroll",s);break;case"onScrollEnd":x!=null&&Ot("scrollend",s);break;case"onClick":x!=null&&(s.onclick=gi);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"inne Line truncated
`),oe=h.map(([fe,se])=>` [${fe}, ${se}],`).join(`
`);return`const MAP_STR: string[] = [
${re}
]
const SEATS: [number, number][] = [
${oe}
]`})(),ee=()=>I(te=>Math.min(te+.25,3)),P=()=>I(te=>Math.max(te-.25,.5)),K=m.flat().filter(te=>te===1).length,J=m.flat().filter(te=>te===0).length;return c.jsxs("div",{className:"collision-editor",children:[c.jsxs("div",{className:"ce-toolbar",children:[c.jsxs("div",{className:"ce-toolbar-group",children:[c.jsx("span",{className:"ce-title",children:"Map Editor"}),c.jsx("select",{className:"ce-office-select",value:a,onChange:te=>A(te.target.value),children:i.map(te=>c.jsx("option",{value:te.id,children:te.name},te.id))})]}),c.jsxs("div",{className:"ce-toolbar-group",children:[c.jsxs("button",{className:`ce-mode-btn ${y==="wall"?"active wall":""}`,onClick:()=>v("wall"),children:[c.jsx("span",{className:"ce-mode-dot wall"})," Wall"]}),c.jsxs("button",{className:`ce-mode-btn ${y==="floor"?"active floor":""}`,onClick:()=>v("floor"),children:[c.jsx("span",{className:"ce-mode-dot floor"})," Floor"]}),c.jsxs("button",{className:`ce-mode-btn ${y==="seat"?"active seat":""}`,onClick:()=>v("seat"),children:[c.jsx("span",{className:"ce-mode-dot seat"})," Seat"]})]}),c.jsxs("div",{className:"ce-toolbar-group",children:[c.jsx("button",{className:"ce-btn",onClick:P,children:"-"}),c.jsxs("span",{className:"ce-zoom-label",children:[Math.round(L*100),"%"]}),c.jsx("button",{className:"ce-btn",onClick:ee,children:"+"}),c.jsx("button",{className:`ce-btn${D?" active":""}`,onClick:()=>T(te=>!te),children:"Grid"})]}),c.jsxs("div",{className:"ce-toolbar-group",children:[c.jsx("button",{className:`ce-btn apply${C?" success":""}`,onClick:W,children:C?"Applied":"Apply"}),c.jsx("button",{className:`ce-btn${_?" active":""}`,onClick:Z,children:"Export"}),c.jsx("button",{className:"ce-btn danger",onClick:q,children:"Reset"})]}),c.jsxs("div",{className:"ce-toolbar-group ce-stats",children:[c.jsxs("span",{children:["Walls: ",K]}),c.jsxs("span",{children:["Floor: ",J]}),c.jsxs("span",{children:["Seats: ",h.length]})]})]}),c.jsxs("div",{className:"ce-body",children:[c.jsx("div",{className:"ce-canvas-wrap",style:{overflow:"auto"},children:c.jsx("canvas",{ref:t,style:{width:O*R*L,height:M*R*L,imageRendering:"pixelated",cursor:y==="seat"?"crosshair":"cell"},onMouseDown:G,onMouseMove:H,onMouseUp:V,onMouseLeave:V})}),_&&c.jsxs("div",{className:"ce-export-panel",children:[c.jsxs("div",{className:"ce-export-header",children:[c.jsx("span",{children:"Export — copy to source code"}),c.jsx("button",{className:"ce-btn",onClick:()=>navigator.clipboard.writeText(U),children:"Copy"})]}),c.jsx("textarea",{className:"ce-export-textarea",value:U,readOnly:!0,rows:20})]})]})]})}let GM=0;function er(e,t,n={}){return{event_id:`test-${++GM}`,type:e,agent_id:t,data:n,timestamp:Date.now()/1e3}}function Cn(e){return new Promise(t=>setTimeout(t,e))}async function qM(e){const t=[],n=e.getScene();if(!n)return t.push({name:"scene-ready",pass:!1,detail:"OfficeScene not initialized"}),t;console.log("%c[EventTest] Starting full event test suite (multi-office)...","color: #6366f1; font-weight: bold");for(const A of[...n.agents.keys()])n.removeAgent(A);await Cn(100);const r=Pn();t.push({name:"offices-loaded",pass:r.length>=3,detail:`${r.length} offices loaded: ${r.map(A=>A.name).join(", ")}`});const i=["agent-A","agent-B","agent-C","agent-D","agent-E","agent-F"];for(const A of i)e.pushEvent(er("agent_active",A));await Cn(300);const o=new Set;let a=!1;for(const A of i){const $=n.getAgent(A);$&&$.seatId&&(o.has($.seatId)&&(a=!0),o.add($.seatId))}t.push({name:"desk-assignment-unique",pass:!a&&o.size===i.length,detail:`Assigned ${o.size} unique seats to ${i.length} agents. IDs: [${[...o].join(", ")}]`});const u=i.every(A=>n.getAgent(A)?.officeId!=null);t.push({name:"agents-have-officeId",pass:u,detail:i.map(A=>`${A}=${n.getAgent(A)?.officeId}`).join(", ")}),e.pushEvent(er("tool_start","agent-A",{tool_name:"shell"})),await Cn(200);const d=n.getAgent("agent-A");t.push({name:"tool_start-state",pass:d.isActive===!0&&d.currentTool==="shell",detail:`isActive=${d.isActive}, currentTool=${d.currentTool}`}),e.pushEvent(er("tool_done","agent-A",{tool_name:"shell"})),await Cn(100),t.push({name:"tool_done-celebrate",pass:d.agentState==="celebrate",detail:`state=${d.agentState}`});for(let A=0;A<20&&d.agentState==="celebrate";A++)await Cn(500);t.push({name:"celebrate-to-idle",pass:d.agentState!=="celebrate",detail:`state=${d.agentState}`}),e.pushEvent(er("waiting","agent-B")),await Cn(200);const m=n.getAgent("agent-B");t.push({name:"waiting-state",pass:m.isActive===!1&&(m.agentState==="walk"||m.agentState==="idle"||m.agentState==="coffee"),detail:`isActive=${m.isActive}, state=${m.agentState}`}),e.pushEvent(er("reflect_start","agent-C")),await Cn(200);const p=n.getAgent("agent-C");t.push({name:"reflect_start-state",pass:p.currentTool==="Reflect"&&(p.agentState==="walk"||p.agentState==="reflect"),detail:`currentTool=${p.currentTool}, state=${p.agentState}`}),e.pushEvent(er("reflect_done","agent-C")),await Cn(100),t.push({name:"reflect_done-celebrate",pass:p.agentState==="celebrate",detail:`staLine truncated
font-size: .6rem;
font-weight: bold;
color: hsl(${Math.max(0,Math.min(120-120*S,120))}deg 100% 31%);`,n?.key)}return n?.onChange&&!(o&&n.skipInitialOnChange)&&n.onChange(i),o=!1,i}return a.updateDeps=u=>{r=u},a}function Ok(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const r4=(e,t)=>Math.abs(e-t)<1.01,i4=(e,t,n)=>{let r;return function(...i){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,i),n)}},Lk=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},s4=e=>e,o4=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let i=t;i<=n;i++)r.push(i);return r},a4=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;const i=a=>{const{width:u,height:d}=a;t({width:Math.round(u),height:Math.round(d)})};if(i(Lk(n)),!r.ResizeObserver)return()=>{};const o=new r.ResizeObserver(a=>{const u=()=>{const d=a[0];if(d?.borderBoxSize){const m=d.borderBoxSize[0];if(m){i({width:m.inlineSize,height:m.blockSize});return}}i(Lk(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(u):u()});return o.observe(n,{box:"border-box"}),()=>{o.unobserve(n)}},zk={passive:!0},Pk=typeof window>"u"?!0:"onscrollend"in window,l4=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;let i=0;const o=e.options.useScrollendEvent&&Pk?()=>{}:i4(r,()=>{t(i,!1)},e.options.isScrollingResetDelay),a=p=>()=>{const{horizontal:h,isRtl:g}=e.options;i=h?n.scrollLeft*(g&&-1||1):n.scrollTop,o(),t(i,p)},u=a(!0),d=a(!1);n.addEventListener("scroll",u,zk);const m=e.options.useScrollendEvent&&Pk;return m&&n.addEventListener("scrollend",d,zk),()=>{n.removeEventListener("scroll",u),m&&n.removeEventListener("scrollend",d)}},c4=(e,t,n)=>{if(t?.borderBoxSize){const r=t.borderBoxSize[0];if(r)return Math.round(r[n.options.horizontal?"inlineSize":"blockSize"])}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},u4=(e,{adjustments:t=0,behavior:n},r)=>{var i,o;const a=e+t;(o=(i=r.scrollElement)==null?void 0:i.scrollTo)==null||o.call(i,{[r.options.horizontal?"left":"top"]:a,behavior:n})};class d4{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.now=()=>{var n,r,i;return((i=(r=(n=this.targetWindow)==null?void 0:n.performance)==null?void 0:r.now)==null?void 0:i.call(r))??Date.now()},this.observer=(()=>{let n=null;const r=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(i=>{i.forEach(o=>{const a=()=>{const u=o.target,d=this.indexFromElement(u);if(!u.isConnected){this.observer.unobserve(u);return}this.shouldMeasureDuringScroll(d)&&this.resizeItem(d,this.options.measureElement(u,o,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()})}));return{disconnect:()=>{var i;(i=r())==null||i.disconnect(),n=null},observe:i=>{var o;return(o=r())==null?void 0:o.observe(i,{box:"border-box"})},unobserve:i=>{var o;return(o=r())==null?void 0:o.unobserve(i)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([r,i])=>{typeof i>"u"&&delete n[r]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:s4,rangeExtractor:o4,onChange:()=>{},measureElement:c4,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...n}},this.notify=n=>{var r,i;(i=(r=this.options).onChange)==null||i.call(r,this,n)},this.maybeNotify=Da(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.maybeNotify();return}this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(i=>{this.observer.observe(i)} Line truncated
The error may be correlated with this previous error:
${te.current.stack}
`),Se}Af(()=>{te.current=void 0,P.current=void 0,U.current=fe});const se=E.useMemo(()=>E.createElement(S,{...fe,ref:O}),[O,S,fe]);return E.useMemo(()=>v?E.createElement(A.Provider,{value:q},se):se,[A,se,q])}const I=E.memo(N);if(I.WrappedComponent=S,I.displayName=N.displayName=k,d){const T=E.forwardRef(function(M,A){return E.createElement(I,{...M,reactReduxForwardedRef:A})});return T.displayName=k,T.WrappedComponent=S,by(T,S)}return by(I,S)}}var Xj=X5;function K5(e){const{children:t,context:n,serverState:r,store:i}=e,o=E.useMemo(()=>{const d=qj(i);return{store:i,subscription:d,getServerState:r?()=>r:void 0}},[i,r]),a=E.useMemo(()=>i.getState(),[i]);Af(()=>{const{subscription:d}=o;return d.onStateChange=d.notifyNestedSubs,d.trySubscribe(),a!==i.getState()&&d.notifyNestedSubs(),()=>{d.tryUnsubscribe(),d.onStateChange=void 0}},[o,a]);const u=n||Yj;return E.createElement(u.Provider,{value:o},t)}var Z5=K5,Q5="Invariant failed";function J5(e,t){throw new Error(Q5)}var Ci=function(t){var n=t.top,r=t.right,i=t.bottom,o=t.left,a=r-o,u=i-n,d={top:n,right:r,bottom:i,left:o,width:a,height:u,x:o,y:n,center:{x:(r+o)/2,y:(i+n)/2}};return d},_0=function(t,n){return{top:t.top-n.top,left:t.left-n.left,bottom:t.bottom+n.bottom,right:t.right+n.right}},cS=function(t,n){return{top:t.top+n.top,left:t.left+n.left,bottom:t.bottom-n.bottom,right:t.right-n.right}},eD=function(t,n){return{top:t.top+n.y,left:t.left+n.x,bottom:t.bottom+n.y,right:t.right+n.x}},lg={top:0,right:0,bottom:0,left:0},k0=function(t){var n=t.borderBox,r=t.margin,i=r===void 0?lg:r,o=t.border,a=o===void 0?lg:o,u=t.padding,d=u===void 0?lg:u,m=Ci(_0(n,i)),p=Ci(cS(n,a)),h=Ci(cS(p,d));return{marginBox:m,borderBox:Ci(n),paddingBox:p,contentBox:h,margin:i,border:a,padding:d}},ci=function(t){var n=t.slice(0,-2),r=t.slice(-2);if(r!=="px")return 0;var i=Number(n);return isNaN(i)&&J5(),i},tD=function(){return{x:window.pageXOffset,y:window.pageYOffset}},Mf=function(t,n){var r=t.borderBox,i=t.border,o=t.margin,a=t.padding,u=eD(r,n);return k0({borderBox:u,border:i,margin:o,padding:a})},Df=function(t,n){return n===void 0&&(n=tD()),Mf(t,n)},Kj=function(t,n){var r={top:ci(n.marginTop),right:ci(n.marginRight),bottom:ci(n.marginBottom),left:ci(n.marginLeft)},i={top:ci(n.paddingTop),right:ci(n.paddingRight),bottom:ci(n.paddingBottom),left:ci(n.paddingLeft)},o={top:ci(n.borderTopWidth),right:ci(n.borderRightWidth),bottom:ci(n.borderBottomWidth),left:ci(n.borderLeftWidth)};return k0({borderBox:t,margin:r,padding:i,border:o})},Zj=function(t){var n=t.getBoundingClientRect(),r=window.getComputedStyle(t);return Kj(n,r)},Qc=function(t){var n=[],r=null,i=function(){for(var a=arguments.length,u=new Array(a),d=0;d<a;d++)u[d]=arguments[d];n=u,!r&&(r=requestAnimationFrame(function(){r=null,t.apply(void 0,n)}))};return i.cancel=function(){r&&(cancelAnimationFrame(r),r=null)},i};function Of(){return Of=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Of.apply(null,arguments)}function Qj(e,t){}Qj.bind(null,"warn");Qj.bind(null,"error");function io(){}function nD(e,t){return{...e,...t}}function mi(e,t,n){const r=t.map(i=>{const o=nD(n,i.options);return e.addEventListener(i.eventName,i.fn,o),function(){e.removeEventListener(i.eventName,i.fn,o)}});return function(){r.forEach(o=>{o()})}}const rD="Invariant failed";class Lf extends Error{}Lf.prototype.toString=function(){return this.message};function Le(e,t){throw new Lf(rD)}let iD=class extends Ct.Component{constructor(...t){super(...t),this.callbacks=null,this.unbind=io,this.onWindowError=n=>{const r=this.getCallbacks();r.isDragging()&&r.tryAbort(),n.error instanceof Lf&&n.preventDefault()},this.getCallbacks=()=>{if(!this.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return this.callbacks},this.setCallbacks=n=>{this.callbacks=n}}componentDidMount(){this.unbind=mi(window,[{eventName:"error",fn:this.onWindowError}])}componentDidCatch(t){if(t instanceof Lf){this.setState({});return}throw t}componentWillUnmount(){this.unbind()}render(){return this.props.children(this.setCallbacks)}};const sD=`
Press space bar to start a drag.
When dragging you can use the arrow keys to move the item around and escape to cancel.
Some screen readers may require you to be in focus mode or to use your pass through key
`,zf=e=>e+1,oD=e=>`
You have lifted an item in position ${zf(e.source.index)}
`,Jj=(e,t)=>{const n=e.droppableId===t.droppableId,r=zf(e.index),i=zf(t.index);return n?`
You have moved the item from position ${r}
to position ${i}
`:`
You have moved the item from position ${r}
in list ${e.droppableId}
to list ${t.droppableId}
in position ${i}
`},eE=(e,t,n)=>t.droppableId===n.droppableId?`
The item ${e}
has been combined with ${n.draggableId}`:`
The item ${e}
in list ${t.droppableId}
has been combined with ${n.draggableId}
in list ${n.droppableId}
`,aD=e=>{const t=e.destination;if(t)return Jj(e.source,t);const n=e.combine;return n?eE(e.draggableId,e.source,n):"You are over an area that cannot be dropped on"},uS=e=>`
The item has returned to its starting position
of ${zf(e.index)}
`,lD=e=>{if(e.reason==="CANCEL")return`
Movement cancelled.
${uS(e.source)}
`;const t=e.destination,n=e.combine;return t?`
You have dropped the item.
${Jj(e.source,t)}
`:n?`
You have dropped the item.
${eE(e.draggableId,e.source,n)}
`:`
The item has been dropped while not over a drop area.
${uS(e.source)}
`},gf={dragHandleUsageInstructions:sD,onDragStart:oD,onDragUpdate:aD,onDragEnd:lD};function cD(e,t){return!!(e===t||Number.isNaN(e)&&Number.isNaN(t))}function tE(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!cD(e[n],t[n]))return!1;return!0}function Ht(e,t){const n=E.useState(()=>({inputs:t,result:e()}))[0],r=E.useRef(!0),i=E.useRef(n),a=r.current||!!(t&&i.current.inputs&&tE(t,i.current.inputs))?i.current:{inputs:t,result:e()};return E.useEffect(()=>{r.current=!1,i.current=a},[a]),a.result}function ot(e,t){return Ht(()=>e,t)}const sr={x:0,y:0},hr=(e,t)=>({x:e.x+t.x,y:e.y+t.y}),Yr=(e,t)=>({x:e.x-t.x,y:e.y-t.y}),so=(e,t)=>e.x===t.x&&e.y===t.y,bl=e=>({x:e.x!==0?-e.x:0,y:e.y!==0?-e.y:0}),Fo=(e,t,n=0)=>e==="x"?{x:t,y:n}:{x:n,y:t},Jc=(e,t)=>Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2),dS=(e,t)=>Math.min(...t.map(n=>Jc(e,n))),nE=e=>t=>({x:e(t.x),y:e(t.y)});var uD=(e,t)=>{const n=Ci({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return n.width<=0||n.height<=0?null:n};const yu=(e,t)=>({top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}),fS=e=>[{x:e.left,y:e.top},{x:e.right,y:e.top},{x:e.left,y:e.bottom},{x:e.right,y:e.bottom}],dD={top:0,right:0,bottom:0,left:0},fD=(e,t)=>t?yu(e,t.scroll.diff.displacement):e,mD=(e,t,n)=>n&&n.increasedBy?{...e,[t.end]:e[t.end]+n.increasedBy[t.line]}:e,hD=(e,t)=>t&&t.shouldClipSubject?uD(t.pageMarginBox,e):Ci(e);var il=({page:e,withPlaceholder:t,axis:n,frame:r})=>{const i=fD(e.marginBox,r),o=mD(i,n,t),a=hD(o,r);return{page:e,withPlaceholder:t,active:a}},S0=(e,t)=>{e.frame||Le();const n=e.frame,r=Yr(t,n.scroll.initial),i=bl(r),o={...n,scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:i},max:n.scroll.max}},a=il({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:o});return{...e,frame:o,subject:a}};function ir(e,t=tE){let n=null;function r(...i){if(n&&n.lastThis===this&&t(i,n.lastArgs))return n.lastResult;const o=e.apply(this,i);return n={lastResult:o,lastArgs:i,lastThis:this},o}return r.clear=function(){n=null},r}const rE=ir(e=>e.reduce((t,n)=>(t[n.descriptor.id]=n,t),{})),iE=ir(e=>e.reduce((t,n)=>(t[n.descriptor.id]=n,t),{})),ym=ir(e=>Object.values(e)),pD=ir(e=>Object.values(e));var _l=ir((e,t)=>pD(t).filter(r=>e===r.descriptor.droppableId).sort((r,i)=>r.descriptor.index-i.descriptor.index));function w0(e){return e.at&&e.at.type==="REORDER"?e.at.destination:null}function vm(e){return e.at&&e.at.type==="COMBINE"?e.at.combine:null}var bm=ir((e,t)=>t.filter(n=>n.descriptor.id!==e.descriptor.id)),gD=({isMovingForward:e,draggable:t,destination:n,insideDestination:r,previousImpact:i})=>{if(!n.isCombineEnabled||!w0(i))return null;function a(y){const v={type:"COMBINE",combine:{draggableId:y,droppableId:n.descriptor.id}};return{...i,at:v}}const u=i.displaced.all,d=u.length?u[0]:null;if(e)return d?a(d):null;const m=bm(t,r);if(!d){if(!m.length)return null;const y=m[m.length-1];return a(y.descriptor.id)}const p=m.findIndex(y=>y.descriptor.id===d);p===-1&&Le();const h=p-1;if(h<0)return null;const g=m[h];return a(g.descriptor.id)},kl=(e,t)=>e.descriptor.droppableId===t.descriptor.id;const sE={point:sr,value:0},eu={invisible:{},visible:{},all:[]},xD={displaced:eu,displacedBy:sE,at:null};var hi=(e,t)=>n=>e<=n&&n<=t,oE=e=>{const t=hi(e.top,e.bottom),n=hi(e.left,e.right);return r=>{if(t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right))return!0;const o=t(r.top)||t(r.bottom),a=n(r.left)||n(r.right);if(o&&a)return!0;const d=r.top<e.top&&r.bottom>e.bottom,m=r.left<e.left&&r.right>e.right;return d&&m?!0:d&&a||m&&o}},yD=e=>{const t=hi(e.top,e.bottom),n=hi(e.left,e.right);return r=>t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right)};const C0={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},aE={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"};var vD=e=>t=>{const n=hi(t.top,t.bottom),r=hi(t.left,t.right);return i=>e===C0?n(i.top)&&n(i.bottom):r(i.left)&&r(i.right)};const bD=(e,t)=>{const n=t.frame?t.frame.scroll.diff.displacement:sr;return yu(e,n)},_D=(e,t,n)=>t.subject.active?n(t.subject.active)(e):!1,kD=(e,t,n)=>n(t)(e),j0=({target:e,destination:t,viewport:n,withDroppableDisplacement:r,isVisibleThroughFrameFn:i})=>{const o=r?bD(e,t):e;return _D(o,t,i)&&kD(o,n,i)},SD=e=>j0({...e,isVisibleThroughFrameFn:oE}),lE=e=>j0({...e,isVisibleThroughFrameFn:yD}),wD=e=>j0({...e,isVisibleThroughFrameFn:vD(e.destination.axis)}),CD=(e,t,n)=>{if(typeof n=="boolean")return n;if(!t)return!0;const{invisible:r,visible:i}=t;if(r[e])return!1;const o=i[e];return o?o.shouldAnimate:!0};function jD(e,t){const n=e.page.marginBox,r={top:t.point.y,right:0,bottom:0,left:t.point.x};return Ci(_0(n,r))}function tu({afterDragging:e,destination:t,displacedBy:n,viewport:r,forceShouldAnimate:i,la Line truncated
cursor: -webkit-grab;
cursor: grab;
`;return{selector:t(ol.contextId),styles:{always:`
-webkit-touch-callout: none;
-webkit-tap-highlight-color: rgba(0,0,0,0);
touch-action: manipulation;
`,resting:u,dragging:EL,dropAnimating:u}}})(),r=(()=>{const u=`
transition: ${Hc.outOfTheWay};
`;return{selector:t(Cy.contextId),styles:{dragging:u,dropAnimating:u,userCancel:u}}})(),i={selector:t(CL.contextId),styles:{always:"overflow-anchor: none;"}},a=[r,n,i,{selector:"body",styles:{dragging:`
cursor: grabbing;
cursor: -webkit-grabbing;
user-select: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
overflow-anchor: none;
`}}];return{always:vc(a,"always"),resting:vc(a,"resting"),dragging:vc(a,"dragging"),dropAnimating:vc(a,"dropAnimating"),userCancel:vc(a,"userCancel")}};const Kr=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?E.useLayoutEffect:E.useEffect,mg=()=>{const e=document.querySelector("head");return e||Le(),e},jS=e=>{const t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.type="text/css",t};function IL(e,t){const n=Ht(()=>NL(e),[e]),r=E.useRef(null),i=E.useRef(null),o=ot(ir(h=>{const g=i.current;g||Le(),g.textContent=h}),[]),a=ot(h=>{const g=r.current;g||Le(),g.textContent=h},[]);Kr(()=>{!r.current&&!i.current||Le();const h=jS(t),g=jS(t);return r.current=h,i.current=g,h.setAttribute(`${sl}-always`,e),g.setAttribute(`${sl}-dynamic`,e),mg().appendChild(h),mg().appendChild(g),a(n.always),o(n.resting),()=>{const y=v=>{const w=v.current;w||Le(),mg().removeChild(w),v.current=null};y(r),y(i)}},[t,a,o,n.always,n.resting,e]);const u=ot(()=>o(n.dragging),[o,n.dragging]),d=ot(h=>{if(h==="DROP"){o(n.dropAnimating);return}o(n.userCancel)},[o,n.dropAnimating,n.userCancel]),m=ot(()=>{i.current&&o(n.resting)},[o,n.resting]);return Ht(()=>({dragging:u,dropping:d,resting:m}),[u,d,m])}function OE(e,t){return Array.from(e.querySelectorAll(t))}var LE=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window;function km(e){return e instanceof LE(e).HTMLElement}function TL(e,t){const n=`[${ol.contextId}="${e}"]`,r=OE(document,n);if(!r.length)return null;const i=r.find(o=>o.getAttribute(ol.draggableId)===t);return!i||!km(i)?null:i}function RL(e){const t=E.useRef({}),n=E.useRef(null),r=E.useRef(null),i=E.useRef(!1),o=ot(function(g,y){const v={id:g,focus:y};return t.current[g]=v,function(){const S=t.current;S[g]!==v&&delete S[g]}},[]),a=ot(function(g){const y=TL(e,g);y&&y!==document.activeElement&&y.focus()},[e]),u=ot(function(g,y){n.current===g&&(n.current=y)},[]),d=ot(function(){r.current||i.current&&(r.current=requestAnimationFrame(()=>{r.current=null;const g=n.current;g&&a(g)}))},[a]),m=ot(function(g){n.current=null;const y=document.activeElement;y&&y.getAttribute(ol.draggableId)===g&&(n.current=g)},[]);return Kr(()=>(i.current=!0,function(){i.current=!1;const g=r.current;g&&cancelAnimationFrame(g)}),[]),Ht(()=>({register:o,tryRecordFocus:m,tryRestoreFocusRecorded:d,tryShiftRecord:u}),[o,m,d,u])}function AL(){const e={draggables:{},droppables:{}},t=[];function n(h){return t.push(h),function(){const y=t.indexOf(h);y!==-1&&t.splice(y,1)}}function r(h){t.length&&t.forEach(g=>g(h))}function i(h){return e.draggables[h]||null}function o(h){const g=i(h);return g||Le(),g}const a={register:h=>{e.draggables[h.descriptor.id]=h,r({type:"ADDITION",value:h})},update:(h,g)=>{const y=e.draggables[g.descriptor.id];y&&y.uniqueId===h.uniqueId&&(delete e.draggables[g.descriptor.id],e.draggables[h.descriptor.id]=h)},unregister:h=>{const g=h.descriptor.id,y=i(g);y&&h.uniqueId===y.uniqueId&&(delete e.draggables[g],e.droppables[h.descriptor.droppableId]&&r({type:"REMOVAL",value:h}))},getById:o,findById:i,exists:h=>!!i(h),getAllByType:h=>Object.values(e.draggables).filter(g=>g.descriptor.type===h)};function u(h){return e.droppables[h]||null}function d(h){const g=u(h);return g||Le(),g}const m={register:h=>{e.droppables[h.descriptor.id]=h},unregister:h=>{const g=u(h.descriptor.id);g&&h.uniqueId===g.uniqueId&&delete e.droppables[h.descriptor.id]},getById:d,findById:u,exists:h=>!!u(h),getAllByType:h=>Object.values(e.droppables).filter(g=>g.descriptor.type===h)};function p(){e.draggables={},e.droppables={},t.length=0}return{draggable:a,droppable:m,subscribe:n,clean:p}}function ML(){const e=Ht(AL,[]);return E.useEffect(()=>function(){e.clean()},[e]),e}var z0=Ct.createContext(null),Bf=()=>{const e=document.body;return e||Le(),e};const DL={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},OL=e=>`rfd-announcement-${e}`;function LL(e){const t=Ht(()=>OL(e),[e]),n=E.useRef(null);return E.useEffect(function(){const o=document.createElement("div");return n.current=o,o.id=t,o.setAttribute("aria-live","assertive"),o.setAttribute("aria-atomic","true"),Of(o.style,DL),Bf().appendChild(o),function(){setTimeout(function(){const d=Bf();d.contains(o)&&d.removeChild(o),o===n.current&&(n.current=null)})}},[t]),ot(i=>{const o=n.current;if(o){o.textContent=i;return}},[])}const zL={separator:"::"};function P0(e,t=zL){const n=Ct.useId();return Ht(()=>`${e}${t.separator}${n}`,[t.separator,e,n])}function PL({contextId:e,uniqueId:t}){return`rfd-hidden-text-${e}-${t}`}function BL({contextId:e,text:t}){const n=P0("hidden-text",{separator:"-"}),r=Ht(()=>PL({contextId:e,uniqueId:n}),[n,e]);return E.useEffect(function(){const o=document.createElement("div");return o.id=r,o.textContent=t,o.style.display="none",Bf().appendChild(o),function(){const u=Bf();u.contains(o)&&u.removeChild(o)}},[r,t]),r}var Sm=Ct.c Line truncated
`,m="/",p="*",h="",g="comment",y="declaration";function v(S,_){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];_=_||{};var k=1,C=1;function N(B){var G=B.match(t);G&&(k+=G.length);var H=B.lastIndexOf(d);C=~H?B.length-H:C+B.length}function L(){var B={line:k,column:C};return function(G){return G.position=new I(B),O(),G}}function I(B){this.start=B,this.end={line:k,column:C},this.source=_.source}I.prototype.content=S;function D(B){var G=new Error(_.source+":"+k+":"+C+": "+B);if(G.reason=B,G.filename=_.source,G.line=k,G.column=C,G.source=S,!_.silent)throw G}function T(B){var G=B.exec(S);if(G){var H=G[0];return N(H),S=S.slice(H.length),G}}function O(){T(n)}function M(B){var G;for(B=B||[];G=A();)G!==!1&&B.push(G);return B}function A(){var B=L();if(!(m!=S.charAt(0)||p!=S.charAt(1))){for(var G=2;h!=S.charAt(G)&&(p!=S.charAt(G)||m!=S.charAt(G+1));)++G;if(G+=2,h===S.charAt(G-1))return D("End of comment missing");var H=S.slice(2,G-2);return C+=2,N(H),S=S.slice(G),C+=2,B({type:g,comment:H})}}function $(){var B=L(),G=T(r);if(G){if(A(),!T(i))return D("property missing ':'");var H=T(o),V=B({type:y,property:w(G[0].replace(e,h)),value:H?w(H[0].replace(e,h)):h});return T(a),V}}function Y(){var B=[];M(B);for(var G;G=$();)G!==!1&&(B.push(G),M(B));return B}return O(),Y()}function w(S){return S?S.replace(u,h):h}return kg=v,kg}var US;function sz(){if(US)return za;US=1;var e=za&&za.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(za,"__esModule",{value:!0}),za.default=n;const t=e(iz());function n(r,i){let o=null;if(!r||typeof r!="string")return o;const a=(0,t.default)(r),u=typeof i=="function";return a.forEach(d=>{if(d.type!=="declaration")return;const{property:m,value:p}=d;u?i(m,p,d):p&&(o=o||{},o[m]=p)}),o}return za}var Sc={},GS;function oz(){if(GS)return Sc;GS=1,Object.defineProperty(Sc,"__esModule",{value:!0}),Sc.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,o=function(m){return!m||n.test(m)||e.test(m)},a=function(m,p){return p.toUpperCase()},u=function(m,p){return"".concat(p,"-")},d=function(m,p){return p===void 0&&(p={}),o(m)?m:(m=m.toLowerCase(),p.reactCompat?m=m.replace(i,u):m=m.replace(r,u),m.replace(t,a))};return Sc.camelCase=d,Sc}var wc,qS;function az(){if(qS)return wc;qS=1;var e=wc&&wc.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(sz()),n=oz();function r(i,o){var a={};return!i||typeof i!="string"||(0,t.default)(i,function(u,d){u&&d&&(a[(0,n.camelCase)(u,o)]=d)}),a}return r.default=r,wc=r,wc}var lz=az();const cz=Zo(lz),lN=cN("end"),U0=cN("start");function cN(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function uz(e){const t=U0(e),n=lN(e);if(t&&n)return{start:t,end:n}}function Fc(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?WS(e.position):"start"in e||"end"in e?WS(e):"line"in e||"column"in e?Ty(e):""}function Ty(e){return YS(e&&e.line)+":"+YS(e&&e.column)}function WS(e){return Ty(e&&e.start)+"-"+Ty(e&&e.end)}function YS(e){return e&&typeof e=="number"?e:1}class kr extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},a=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(a=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?o.ruleId=r:(o.source=r.slice(0,d),o.ruleId=r.slice(d+1))}if(!o.place&&o.ancestors&&o.ancestors){const d=o.ancestors[o.ancestors.length-1];d&&(o.place=d.position)}const u=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=u?u.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=u?u.line:void 0,this.name=Fc(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=a&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}kr.prototype.file="";kr.prototype.name="";kr.prototype.reason="";kr.prototype.message="";kr.prototype.stack="";kr.prototype.column=void 0;kr.prototype.line=void 0;kr.prototype.ancestors=void 0;kr.prototype.cause=void 0;kr.prototype.fatal=void 0;kr.prototype.place=void 0;kr.prototype.ruleId=void 0;kr.prototype.source=void 0;const G0={}.hasOwnProperty,dz=new Map,fz=/[A-Z]/g,mz=new Set(["table","tbody","thead","tfoot","tr"]),hz=new Set(["td","th"]),uN="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function pz(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.j Line truncated
`;break}case-3:{a=`\r
`;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&i)continue;a=" ";break}default:a=String.fromCharCode(o)}i=o===-2,r.push(a)}return r.join("")}function SB(e){const r={constructs:pN([vB,...(e||{}).extensions||[]]),content:i(Pz),defined:[],document:i($z),flow:i(iB),lazy:{},string:i(aB),text:i(lB)};return r;function i(o){return a;function a(u){return bB(r,o,u)}}}function wB(e){for(;!bN(e););return e}const iw=/[\0\t\n\r]/g;function CB(){let e=1,t="",n=!0,r;return i;function i(o,a,u){const d=[];let m,p,h,g,y;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(a||void 0).decode(o)),h=0,t="",n&&(o.charCodeAt(0)===65279&&h++,n=void 0);h<o.length;){if(iw.lastIndex=h,m=iw.exec(o),g=m&&m.index!==void 0?m.index:o.length,y=o.charCodeAt(g),!m){t=o.slice(h);break}if(y===10&&h===g&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),h<g&&(d.push(o.slice(h,g)),e+=g-h),y){case 0:{d.push(65533),e++;break}case 9:{for(p=Math.ceil(e/4)*4,d.push(-2);e++<p;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}h=g+1}return u&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const jB=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function EB(e){return e.replace(jB,NB)}function NB(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return gN(n.slice(o?2:1),o?16:10)}return X0(n)||e}const jN={}.hasOwnProperty;function IB(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),TB(n)(wB(SB(n).document().write(CB()(e,t,!0))))}function TB(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(bt),autolinkProtocol:O,autolinkEmail:O,atxHeading:o(We),blockQuote:o(se),characterEscape:O,characterReference:O,codeFenced:o(je),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:o(je,a),codeText:o(Se,a),codeTextData:O,data:O,codeFlowValue:O,definition:o(Ce),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:o(He),hardBreakEscape:o(Ye),hardBreakTrailing:o(Ye),htmlFlow:o(gt,a),htmlFlowData:O,htmlText:o(gt,a),htmlTextData:O,image:o(Ut),label:a,link:o(bt),listItem:o(me),listItemValue:g,listOrdered:o(xt,h),listUnordered:o(xt),paragraph:o(Oe),reference:P,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:o(We),strong:o(it),thematicBreak:o(nt)},exit:{atxHeading:d(),atxHeadingSequence:L,autolink:d(),autolinkEmail:fe,autolinkProtocol:oe,blockQuote:d(),characterEscapeValue:M,characterReferenceMarkerHexadecimal:J,characterReferenceMarkerNumeric:J,characterReferenceValue:te,characterReference:re,codeFenced:d(S),codeFencedFence:w,codeFencedFenceInfo:y,codeFencedFenceMeta:v,codeFlowValue:M,codeIndented:d(_),codeText:d(G),codeTextData:M,data:M,definition:d(),definitionDestinationString:N,definitionLabelString:k,definitionTitleString:C,emphasis:d(),hardBreakEscape:d($),hardBreakTrailing:d($),htmlFlow:d(Y),htmlFlowData:M,htmlText:d(B),htmlTextData:M,image:d(V),label:Z,labelText:W,lineEnding:A,link:d(H),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:K,resourceDestinationString:q,resourceTitleString:U,resource:ee,setextHeading:d(T),setextHeadingLineSequence:D,setextHeadingText:I,strong:d(),thematicBreak:d()}};EN(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(de){let ve={type:"root",children:[]};const Ae={stack:[ve],tokenStack:[],config:t,enter:u,exit:m,buffer:a,resume:p,data:n},Ue=[];let Fe=-1;for(;++Fe<de.length;)if(de[Fe][1].type==="listOrdered"||de[Fe][1].type==="listUnordered")if(de[Fe][0]==="enter")Ue.push(Fe);else{const vt=Ue.pop();Fe=i(de,vt,Fe)}for(Fe=-1;++Fe<de.length;){const vt=t[de[Fe][0]];jN.call(vt,de[Fe][1].type)&&vt[de[Fe][1].type].call(Object.assign({sliceSerialize:de[Fe][2].sliceSerialize},Ae),de[Fe][1])}if(Ae.tokenStack.length>0){const vt=Ae.tokenStack[Ae.tokenStack.length-1];(vt[1]||sw).call(Ae,void 0,vt[0])}for(ve.position={start:Qs(de.length>0?de[0][1].start:{line:1,column:1,offset:0}),end:Qs(de.length>0?de[de.length-2][1].end:{line:1,column:1,offset:0})},Fe=-1;++Fe<t.transforms.length;)ve=t.transforms[Fe](ve)||ve;return ve}function i(de,ve,Ae){let Ue=ve-1,Fe=-1,vt=!1,Rt,ke,Re,Ke;for(;++Ue<=Ae;){const Ge=de[Ue];switch(Ge[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ge[0]==="enter"?Fe++:Fe--,Ke=void 0;break}case"lineEndingBlank":{Ge[0]==="enter"&&(Rt&&!Ke&&!Fe&&!Re&&(Re=Ue),Ke=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ke=void 0}if(!Fe&&Ge[0]==="enter"&&Ge[1].type==="listItemPrefix"||Fe===-1&&Ge[0]==="exit"&&(Ge[1].type==="listUnordered"||Ge[1].type==="listOrdered")){if(Rt){let tt=Ue;for(ke=void 0;tt--;){const Qe=de[tt];if(Qe[1].type==="lineEnding"||Qe[1].type==="lineEndingBlank"){if(Qe[0]==="exit")continue;ke&&(de[ke][1].type="lineEndingBlank",vt=!0),Qe[1].type="lineEnding",ke=tt}else if(!(Qe[1].type==="linePrefix"||Qe[1].type==="blockQuotePrefix"||Qe[1].type==="blockQuotePrefixWhitespace"|Line truncated
`}]}function OB(e,t){const n=t.value?t.value+`
`:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function LB(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function zB(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function PB(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=wl(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let a,u=e.footnoteCounts.get(r);u===void 0?(u=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=o+1,u+=1,e.footnoteCounts.set(r,u);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(u>1?"-"+u:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,d);const m={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,m),e.applyData(t,m)}function BB(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function $B(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function NN(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&a.type==="text"?a.value+=r:i.push({type:"text",value:r}),i}function HB(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return NN(e,t);const i={src:wl(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function FB(e,t){const n={src:wl(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function VB(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function UB(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return NN(e,t);const i={href:wl(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function GB(e,t){const n={href:wl(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function qB(e,t,n){const r=e.all(t),i=n?WB(n):IN(t),o={},a=[];if(typeof t.checked=="boolean"){const p=r[0];let h;p&&p.type==="element"&&p.tagName==="p"?h=p:(h={type:"element",tagName:"p",properties:{},children:[]},r.unshift(h)),h.children.length>0&&h.children.unshift({type:"text",value:" "}),h.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let u=-1;for(;++u<r.length;){const p=r[u];(i||u!==0||p.type!=="element"||p.tagName!=="p")&&a.push({type:"text",value:`
`}),p.type==="element"&&p.tagName==="p"&&!i?a.push(...p.children):a.push(p)}const d=r[r.length-1];d&&(i||d.type!=="element"||d.tagName!=="p")&&a.push({type:"text",value:`
`});const m={type:"element",tagName:"li",properties:o,children:a};return e.patch(t,m),e.applyData(t,m)}function WB(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=IN(n[r])}return t}function IN(e){const t=e.spread;return t??e.children.length>1}function YB(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const a=r[i];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function XB(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function KB(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function ZB(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function QB(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],a),i.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},u=U0(t.children[1]),d=lN(t.children[t.children.length-1]);u&&d&&(a.position={start:u,end:d}),i.push(a)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function JB(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,u=a?a.length:t.children.length;let d=-1;const m=[];for(;++d<u;){const h=t.children[d],g={},y=a?a[d]:void 0;y&&(g.align=y);let v={type:"element",tagName:o,properties:g,children:[]};h&&(v.children=e.all(h),e.patch(h,v),v=e.applyData(h,v)),m.push(v)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(m,!0)};return e.patch(t,p),e.applyData(t,p)}function e9(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const ow=9,aw=32;function t9(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(lw(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(lw(t.slice(i),i>0,!1)),o.join("")}function lw(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===ow||o===aw;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===ow||o===aw;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function n9(e,t){const n={type:"text",value:t9(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function r9(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const i9={blockquote:MB,break:DB,code:OB,delete:LB,emphasis:zB,footnoteReference:PB,heading:BB,html:$B,imageReference:HB,image:FB,inlineCode:VB,linkReference:UB,link:GB,listItem:qB,list:YB,paragraph:XB,root:KB,strong:ZB,table:QB,tableCell:e9,tableRow:JB,text:n9,thematicBreak:r9,toml:Vd,yaml:Vd,definition:Vd,footnoteDefinition:Vd};function Vd(){}const TN=-1,Im=0,Uc=1,Gf=2,Z0=3,Q0=4,J0=5,ev=6,RN=7,AN=8,cw=typeof self=="object"?self:globalThis,s9=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,a]=t[i];switch(o){case Im:case TN:return n(a,i);case Uc:{const u=n([],i);for(const d of a)u.push(r(d));return u}case Gf:{const u=n({},i);for(const[d,m]of a)u[r(d)]=r(m);return u}case Z0:return n(new Date(a),i);case Q0:{const{source:u,flags:d}=a;return n(new RegExp(u,d),i)}case J0:{const u=n(new Map,i);for(const[d,m]of a)u.set(r(d),r(m));return u}case ev:{const u=n(new Set,i);for(const d of a)u.add(r(d));return u}case RN:{const{name:u,message:d}=a;return n(new cw[u](d),i)}case AN:return n(BigInt(a),i);case"BigInt":return n(Object(BigInt(a)),i);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:u}=new Uint8Array(a);return n(new DataView(u),a)}}return n(new cw[o](a),i)};return r},uw=e=>s9(new Map,e)(0),Pa="",{toString:o9}={},{keys:a9}=Object,jc=e=>{const t=typeof e;if(t!=="object"||!e)return[Im,t];const n=o9.call(e).slice(8,-1);switch(n){case"Array":return[Uc,Pa];case"Object":return[Gf,Pa];case"Date":return[Z0,Pa];case"RegExp":return[Q0,Pa];case"Map":return[J0,Pa];case"Set":return[ev,Pa];case"DataView":return[Uc,n]}return n.includes("Array")?[Uc,n]:n.includes("Error")?[RN,n]:[Gf,n]},Ud=([e,t])=>e===Im&&(t==="function"||t==="symbol"),l9=(e,t,n,r)=>{const i=(a,u)=>{const d=r.push(a)-1;return n.set(u,d),d},o=a=>{if(n.has(a))return n.get(a);let[u,d]=jc(a);switch(u){case Im:{let p=a;switch(d){case"bigint":u=AN,p=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);p=null;break;case"undefined":return i([TN],a)}return i([u,p],a)}case Uc:{if(d){let g=a;return d==="DataView"?g=new Uint8Array(a.buffer):d==="ArrayBuffer"&&(g=new Uint8Array( Line truncated
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(u,!0)},{type:"text",value:`
`}]}}const Tm=(function(e){if(e==null)return p9;if(typeof e=="function")return Rm(e);if(typeof e=="object")return Array.isArray(e)?f9(e):m9(e);if(typeof e=="string")return h9(e);throw new Error("Expected function, string, or object as test")});function f9(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Tm(e[n]);return Rm(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function m9(e){const t=e;return Rm(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function h9(e){return Rm(t);function t(n){return n&&n.type===e}}function Rm(e){return t;function t(n,r,i){return!!(g9(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function p9(){return!0}function g9(e){return e!==null&&typeof e=="object"&&"type"in e}const MN=[],x9=!0,My=!1,y9="skip";function DN(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const o=Tm(i),a=r?-1:1;u(e,void 0,[])();function u(d,m,p){const h=d&&typeof d=="object"?d:{};if(typeof h.type=="string"){const y=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;Object.defineProperty(g,"name",{value:"node ("+(d.type+(y?"<"+y+">":""))+")"})}return g;function g(){let y=MN,v,w,S;if((!t||o(d,m,p[p.length-1]||void 0))&&(y=v9(n(d,p)),y[0]===My))return y;if("children"in d&&d.children){const _=d;if(_.children&&y[0]!==y9)for(w=(r?_.children.length:-1)+a,S=p.concat(_);w>-1&&w<_.children.length;){const k=_.children[w];if(v=u(k,w,S)(),v[0]===My)return v;w=typeof v[1]=="number"?v[1]:w+a}}return y}}}function v9(e){return Array.isArray(e)?e:typeof e=="number"?[x9,e]:e==null?MN:[e]}function tv(e,t,n,r){let i,o,a;typeof t=="function"&&typeof n!="function"?(o=void 0,a=t,i=n):(o=t,a=n,i=r),DN(e,o,u,i);function u(d,m){const p=m[m.length-1],h=p?p.children.indexOf(d):void 0;return a(d,h,p)}}const Dy={}.hasOwnProperty,b9={};function _9(e,t){const n=t||b9,r=new Map,i=new Map,o=new Map,a={...i9,...n.handlers},u={all:m,applyData:S9,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:a,one:d,options:n,patch:k9,wrap:C9};return tv(e,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const h=p.type==="definition"?r:i,g=String(p.identifier).toUpperCase();h.has(g)||h.set(g,p)}}),u;function d(p,h){const g=p.type,y=u.handlers[g];if(Dy.call(u.handlers,g)&&y)return y(u,p,h);if(u.options.passThrough&&u.options.passThrough.includes(g)){if("children"in p){const{children:w,...S}=p,_=qf(S);return _.children=u.all(p),_}return qf(p)}return(u.options.unknownHandler||w9)(u,p,h)}function m(p){const h=[];if("children"in p){const g=p.children;let y=-1;for(;++y<g.length;){const v=u.one(g[y],p);if(v){if(y&&g[y-1].type==="break"&&(!Array.isArray(v)&&v.type==="text"&&(v.value=fw(v.value)),!Array.isArray(v)&&v.type==="element")){const w=v.children[0];w&&w.type==="text"&&(w.value=fw(w.value))}Array.isArray(v)?h.push(...v):h.push(v)}}}return h}}function k9(e,t){e.position&&(t.position=uz(e))}function S9(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const a="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:a}}n.type==="element"&&o&&Object.assign(n.properties,qf(o)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function w9(e,t){const n=t.data||{},r="value"in t&&!(Dy.call(n,"hProperties")||Dy.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function C9(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
`});++r<e.length;)r&&n.push({type:"text",value:`
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
`}),n}function fw(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function mw(e,t){const n=_9(e,t),r=n.one(e,void 0),i=d9(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
`},i),o}function j9(e,t){return e&&"run"in e?async function(n,r){const i=mw(n,{file:r,...t});await e.run(i,r)}:function(n,r){return mw(n,{file:r,...e||t})}}function hw(e){if(e)throw e}var jg,pw;function E9(){if(pw)return jg;pw=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(m){return typeof Array.isArray=="function"?Array.isArray(m):t.call(m)==="[object Array]"},o=function(m){if(!m||t.call(m)!=="[object Object]")return!1;var p=e.call(m,"constructor"),h=m.constructor&&m.constructor.prototype&&e.call(m.constructor.prototype,"isPrototypeOf");if(m.constructor&&!p&&!h)return!1;var g;for(g in m);return typeof g>"u"||e.call(m,g)},a=function(m,p){n&&p.name==="__proto__"?n(m,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):m[p.name]=p.newValue},u=function(m,p){if(p==="__proto__")if(e.call(m,p)){if(r)return r(m,p).value}else return;return m[p]};return jg=function d(){var m,p,h,g,y,v,w=arguments[0],S=1,_=arguments.length,k=!1;for(typeof w=="boolean"&&(k=w,w=arguments[1]||{},S=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});S<_;++S)if(m=arguments[S],m!=null)for(p in m)h=u(w,p),g=u(m,p),w!==g&&(k&&g&&(o(g)||(y=i(g)))?(y?(y=!1,v=h&&i(h)?h:[]):v=h&&o(h)?h:{},a(w,{name:p,newValue:d(k,v,g)})):typeof g<"u"&&a(w,{name:p,newValue:g}));return w},jg}var N9=E9();const Eg=Zo(N9);function Oy(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function I9(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);u(null,...i);function u(d,...m){const p=e[++o];let h=-1;if(d){a(d);return}for(;++h<i.length;)(m[h]===null||m[h]===void 0)&&(m[h]=i[h]);i=m,p?T9(p,u)(...m):a(null,...m)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function T9(e,t){let n;return r;function r(...a){const u=e.length>a.length;let d;u&&a.push(i);try{d=e.apply(this,a)}catch(m){const p=m;if(u&&n)throw p;return i(p)}u||(d&&d.then&&typeof d.then=="function"?d.then(o,i):d instanceof Error?i(d):o(d))}function i(a,...u){n||(n=!0,t(a,...u))}function o(a){i(null,a)}}const $i={basename:R9,dirname:A9,extname:M9,join:D9,sep:"/"};function R9(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');ku(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,u=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else a<0&&(o=!0,a=i+1),u>-1&&(e.codePointAt(i)===t.codePointAt(u--)?u<0&&(r=i):(u=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function A9(e){if(ku(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function M9(e){ku(e);let t=e.length,n=-1,r=0,i=-1,o=0,a;for(;t--;){const u=e.codePointAt(t);if(u===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),u===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function D9(...e){let t=-1,n;for(;++t<e.length;)ku(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":O9(n)}function O9(e){ku(e);const t=e.codePointAt(0)===47;let n=L9(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function L9(e,t){let n="",r=0,i=-1,o=0,a=-1,u,d;for(;++a<=e.length;){if(a<e.length)u=e.codePointAt(a);else{if(u===47)break;u=47}if(u===47){if(!(i===a-1||o===1))if(i!==a-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",r=0):(n=n.slice(0,d),r=n.length-1-n.lastIndexOf("/")),i=a,o=0;continue}}else if(n.length>0){n="",r=0,i=a,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),r=a-i-1;i=a,o=0}else u===46&&o>-1?o++:o=-1}return n}function ku(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const z9={cwd:P9};function P9(){return"/"}function Ly(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function B9(e){if(typeof e=="string")e=new URL(e);else if(!Ly(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return $9(e)}function $9(e){if(e.hostname!==""){consLine truncated
`:" ")+o.indentLines(o.containerFlow(r,u.current()),t?PN:T$))),m(),d}}function T$(e,t,n){return t===0?e:PN(e,t,n)}function PN(e,t,n){return(n?"":" ")+e}const R$=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];BN.peek=L$;function A$(){return{canContainEols:["delete"],enter:{strikethrough:D$},exit:{strikethrough:O$}}}function M$(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:R$}],handlers:{delete:BN}}}function D$(e){this.enter({type:"delete",children:[]},e)}function O$(e){this.exit(e)}function BN(e,t,n,r){const i=n.createTracker(r),o=n.enter("strikethrough");let a=i.move("~~");return a+=n.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),o(),a}function L$(){return"~"}function z$(e){return e.length}function P$(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||z$,o=[],a=[],u=[],d=[];let m=0,p=-1;for(;++p<e.length;){const w=[],S=[];let _=-1;for(e[p].length>m&&(m=e[p].length);++_<e[p].length;){const k=B$(e[p][_]);if(n.alignDelimiters!==!1){const C=i(k);S[_]=C,(d[_]===void 0||C>d[_])&&(d[_]=C)}w.push(k)}a[p]=w,u[p]=S}let h=-1;if(typeof r=="object"&&"length"in r)for(;++h<m;)o[h]=kw(r[h]);else{const w=kw(r);for(;++h<m;)o[h]=w}h=-1;const g=[],y=[];for(;++h<m;){const w=o[h];let S="",_="";w===99?(S=":",_=":"):w===108?S=":":w===114&&(_=":");let k=n.alignDelimiters===!1?1:Math.max(1,d[h]-S.length-_.length);const C=S+"-".repeat(k)+_;n.alignDelimiters!==!1&&(k=S.length+k+_.length,k>d[h]&&(d[h]=k),y[h]=k),g[h]=C}a.splice(1,0,g),u.splice(1,0,y),p=-1;const v=[];for(;++p<a.length;){const w=a[p],S=u[p];h=-1;const _=[];for(;++h<m;){const k=w[h]||"";let C="",N="";if(n.alignDelimiters!==!1){const L=d[h]-(S[h]||0),I=o[h];I===114?C=" ".repeat(L):I===99?L%2?(C=" ".repeat(L/2+.5),N=" ".repeat(L/2-.5)):(C=" ".repeat(L/2),N=C):N=" ".repeat(L)}n.delimiterStart!==!1&&!h&&_.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&k==="")&&(n.delimiterStart!==!1||h)&&_.push(" "),n.alignDelimiters!==!1&&_.push(C),_.push(k),n.alignDelimiters!==!1&&_.push(N),n.padding!==!1&&_.push(" "),(n.delimiterEnd!==!1||h!==m-1)&&_.push("|")}v.push(n.delimiterEnd===!1?_.join("").replace(/ +$/,""):_.join(""))}return v.join(`
`)}function B$(e){return e==null?"":String(e)}function kw(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function $$(e,t,n,r){const i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const a=n.indentLines(n.containerFlow(e,o.current()),H$);return i(),a}function H$(e,t,n){return">"+(n?"":" ")+e}function F$(e,t){return Sw(e,t.inConstruct,!0)&&!Sw(e,t.notInConstruct,!1)}function Sw(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function ww(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
`&&F$(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
`}function V$(e,t){const n=String(e);let r=n.indexOf(t),i=r,o=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>a&&(a=o):o=1,i=r+t.length,r=n.indexOf(t,i);return a}function U$(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function G$(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function q$(e,t,n,r){const i=G$(n),o=e.value||"",a=i==="`"?"GraveAccent":"Tilde";if(U$(e,n)){const h=n.enter("codeIndented"),g=n.indentLines(o,W$);return h(),g}const u=n.createTracker(r),d=i.repeat(Math.max(V$(o,i)+1,3)),m=n.enter("codeFenced");let p=u.move(d);if(e.lang){const h=n.enter(`codeFencedLang${a}`);p+=u.move(n.safe(e.lang,{before:p,after:" ",encode:["`"],...u.current()})),h()}if(e.lang&&e.meta){const h=n.enter(`codeFencedMeta${a}`);p+=u.move(" "),p+=u.move(n.safe(e.meta,{before:p,after:`
`,encode:["`"],...u.current()})),h()}return p+=u.move(`
`),o&&(p+=u.move(o+`
`)),p+=u.move(d),m(),p}function W$(e,t,n){return(n?"":" ")+e}function rv(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Y$(e,t,n,r){const i=rv(n),o=i==='"'?"Quote":"Apostrophe",a=n.enter("definition");let u=n.enter("label");const d=n.createTracker(r);let m=d.move("[");return m+=d.move(n.safe(n.associationId(e),{before:m,after:"]",...d.current()})),m+=d.move("]: "),u(),!e.url||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),m+=d.move("<"),m+=d.move(n.safe(e.url,{before:m,after:">",...d.current()})),m+=d.move(">")):(u=n.enter("destinationRaw"),m+=d.move(n.safe(e.url,{before:m,after:e.title?" ":`
`,...d.current()}))),u(),e.title&&(u=n.enter(`title${o}`),m+=d.move(" "+i),m+=d.move(n.safe(e.title,{before:m,after:i,...d.current()})),m+=d.move(i),u()),a(),m}function X$(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function au(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Wf(e,t,n){const r=cl(e),i=cl(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}$N.peek=K$;function $N(e,t,n,r){const i=X$(n),o=n.enter("emphasis"),a=n.createTracker(r),u=a.move(i);let d=a.move(n.containerPhrasing(e,{after:i,before:u,...a.current()}));const m=d.charCodeAt(0),p=Wf(r.before.charCodeAt(r.before.length-1),m,i);p.inside&&(d=au(m)+d.slice(1));const h=d.charCodeAt(d.length-1),g=Wf(r.after.charCodeAt(0),h,i);g.inside&&(d=d.slice(0,-1)+au(h));const y=a.move(i);return o(),n.attentionEncodeSurroundingInfo={after:g.outside,before:p.outside},u+d+y}function K$(e,t,n){return n.options.emphasis||"*"}function Z$(e,t){let n=!1;return tv(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,My}),!!((!e.depth||e.depth<3)&&Y0(e)&&(t.options.setext||n))}function Q$(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(Z$(e,n)){const p=n.enter("headingSetext"),h=n.enter("phrasing"),g=n.containerPhrasing(e,{...o.current(),before:`
`,after:`
`});return h(),p(),g+`
`+(i===1?"=":"-").repeat(g.length-(Math.max(g.lastIndexOf("\r"),g.lastIndexOf(`
`))+1))}const a="#".repeat(i),u=n.enter("headingAtx"),d=n.enter("phrasing");o.move(a+" ");let m=n.containerPhrasing(e,{before:"# ",after:`
`,...o.current()});return/^[\t ]/.test(m)&&(m=au(m.charCodeAt(0))+m.slice(1)),m=m?a+" "+m:a,n.options.closeAtx&&(m+=" "+a),d(),u(),m}HN.peek=J$;function HN(e){return e.value||""}function J$(){return"<"}FN.peek=e7;function FN(e,t,n,r){const i=rv(n),o=i==='"'?"Quote":"Apostrophe",a=n.enter("image");let u=n.enter("label");const d=n.createTracker(r);let m=d.move("![");return m+=d.move(n.safe(e.alt,{before:m,after:"]",...d.current()})),m+=d.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),m+=d.move("<"),m+=d.move(n.safe(e.url,{before:m,after:">",...d.current()})),m+=d.move(">")):(u=n.enter("destinationRaw"),m+=d.move(n.safe(e.url,{before:m,after:e.title?" ":")",...d.current()}))),u(),e.title&&(u=n.enter(`title${o}`),m+=d.move(" "+i),m+=d.move(n.safe(e.title,{before:m,after:i,...d.current()})),m+=d.move(i),u()),m+=d.move(")"),a(),m}function e7(){return"!"}VN.peek=t7;function VN(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let a=n.enter("label");const u=n.createTracker(r);let d=u.move("![");const m=n.safe(e.alt,{before:d,after:"]",...u.current()});d+=u.move(m+"]["),a();const p=n.stack;n.stack=[],a=n.enter("reference");const h=n.safe(n.associationId(e),{before:d,after:"]",...u.current()});return a(),n.stack=p,o(),i==="full"||!m||m!==h?d+=u.move(h+"]"):i==="shortcut"?d=d.slice(0,-1):d+=u.move("]"),d}function t7(){return"!"}UN.peek=n7;function UN(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const a=n.unsafe[o],u=n.compilePattern(a);let d;if(a.atBreak)for(;d=u.exec(r);){let m=d.index;r.charCodeAt(m)===10&&r.charCodeAt(m-1)===13&&m--,r=r.slice(0,m)+" "+r.slice(d.index+1)}}return i+r+i}function n7(){return"`"}function GN(e,t){const n=Y0(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}qN.peek=r7;function qN(e,t,n,r){const i=rv(n),o=i==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let u,d;if(GN(e,n)){const p=n.stack;n.stack=[],u=n.enter("autolink");let h=a.move("<");return h+=a.move(n.containerPhrasing(e,{before:h,after:">",...a.current()})),h+=a.move(">"),u(),n.stack=p,h}u=n.enter("link"),d=n.enter("label");let m=a.move("[");return m+=a.move(n.containerPhrasing(e,{before:m,after:"](",...a.current()})),m+=a.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),m+=a.move("<"),m+=a.move(n.safe(e.url,{before:m,after:">",...a.current()})),m+=a.move(">")):(d=n.enter("destinationRaw"),m+=a.move(n.safe(e.url,{before:m,after:e.title?" ":")",...a.current()}))),d(),e.title&&(d=n.enter(`title${o}`),m+=a.move(" "+i),m+=a.move(n.safe(e.title,{before:m,after:i,...a.current()})),m+=a.move(i),d()),m+=a.move(")"),u(),m}function r7(e,t,n){return GN(e,n)?"<":"["}WN.peek=i7;function WN(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let a=n.enter("label");const u=n.createTracker(r);let d=u.move("[");const m=n.containerPhrasing(e,{before:d,after:"]",...u.current()});d+=u.move(m+"]["),a();const p=n.stack;n.stack=[],a=n.enter("reference");const h=n.safe(n.associationId(e),{before:d,after:"]",...u.current()});return a(),n.stack=p,o(),i==="full"||!m||m!==h?d+=u.move(h+"]"):i==="shortcut"?d=d.slice(0,-1):d+=u.move("]"),d}function i7(){return"["}function iv(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function s7(e){const t=iv(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function o7(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function YN(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function a7(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let a=e.ordered?o7(n):iv(n);const u=e.ordered?a==="."?")":".":s7(n);let d=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const p=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&p&&(!p.children||!p.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(d=!0),YN(n)===a&&p){let h=-1;for(;++h<e.chilLine truncated
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:g,table:a,tableCell:d,tableRow:u}};function a(y,v,w,S){return m(p(y,w,S),y.align)}function u(y,v,w,S){const _=h(y,w,S),k=m([_]);return k.slice(0,k.indexOf(`
`))}function d(y,v,w,S){const _=w.enter("tableCell"),k=w.enter("phrasing"),C=w.containerPhrasing(y,{...S,before:o,after:o});return k(),_(),C}function m(y,v){return P$(y,{align:v,alignDelimiters:r,padding:n,stringLength:i})}function p(y,v,w){const S=y.children;let _=-1;const k=[],C=v.enter("table");for(;++_<S.length;)k[_]=h(S[_],v,w);return C(),k}function h(y,v,w){const S=y.children;let _=-1;const k=[],C=v.enter("tableRow");for(;++_<S.length;)k[_]=d(S[_],y,v,w);return C(),k}function g(y,v,w){let S=KN.inlineCode(y,v,w);return w.stack.includes("tableCell")&&(S=S.replace(/\|/g,"\\$&")),S}}function C7(){return{exit:{taskListCheckValueChecked:jw,taskListCheckValueUnchecked:jw,paragraph:E7}}}function j7(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:N7}}}function jw(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function E7(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let o=-1,a;for(;++o<i.length;){const u=i[o];if(u.type==="paragraph"){a=u;break}}a===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function N7(e,t,n,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",u=n.createTracker(r);o&&u.move(a);let d=KN.listItem(e,t,n,{...r,...u.current()});return o&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,m)),d;function m(p){return p+a}}function I7(){return[a$(),N$(),A$(),y7(),C7()]}function T7(e){return{extensions:[l$(),I$(e),M$(),w7(e),j7()]}}const R7={tokenize:z7,partial:!0},ZN={tokenize:P7,partial:!0},QN={tokenize:B7,partial:!0},JN={tokenize:$7,partial:!0},A7={tokenize:H7,partial:!0},eI={name:"wwwAutolink",tokenize:O7,previous:nI},tI={name:"protocolAutolink",tokenize:L7,previous:rI},Cs={name:"emailAutolink",tokenize:D7,previous:iI},Ki={};function M7(){return{text:Ki}}let Mo=48;for(;Mo<123;)Ki[Mo]=Cs,Mo++,Mo===58?Mo=65:Mo===91&&(Mo=97);Ki[43]=Cs;Ki[45]=Cs;Ki[46]=Cs;Ki[95]=Cs;Ki[72]=[Cs,tI];Ki[104]=[Cs,tI];Ki[87]=[Cs,eI];Ki[119]=[Cs,eI];function D7(e,t,n){const r=this;let i,o;return a;function a(h){return!zy(h)||!iI.call(r,r.previous)||sv(r.events)?n(h):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),u(h))}function u(h){return zy(h)?(e.consume(h),u):h===64?(e.consume(h),d):n(h)}function d(h){return h===46?e.check(A7,p,m)(h):h===45||h===95||_r(h)?(o=!0,e.consume(h),d):p(h)}function m(h){return e.consume(h),i=!0,d}function p(h){return o&&i&&Er(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(h)):n(h)}}function O7(e,t,n){const r=this;return i;function i(a){return a!==87&&a!==119||!nI.call(r,r.previous)||sv(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(R7,e.attempt(ZN,e.attempt(QN,o),n),n)(a))}function o(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function L7(e,t,n){const r=this;let i="",o=!1;return a;function a(h){return(h===72||h===104)&&rI.call(r,r.previous)&&!sv(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(h),e.consume(h),u):n(h)}function u(h){if(Er(h)&&i.length<5)return i+=String.fromCodePoint(h),e.consume(h),u;if(h===58){const g=i.toLowerCase();if(g==="http"||g==="https")return e.consume(h),d}return n(h)}function d(h){return h===47?(e.consume(h),o?m:(o=!0,d)):n(h)}function m(h){return h===null||Uf(h)||hn(h)||Uo(h)||Em(h)?n(h):e.attempt(ZN,e.attempt(QN,p),n)(h)}function p(h){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(h)}}function z7(e,t,n){let r=0;return i;function i(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),i):a===46&&r===3?(e.consume(a),o):n(a)}function o(a){return a===null?n(a):t(a)}}function P7(e,t,n){let r,i,o;return a;function a(m){return m===46||m===95?e.check(JN,d,u)(m):m===null||hn(m)||Uo(m)||m!==45&&Em(m)?d(m):(o=!0,e.consume(m),a)}function u(m){return m===95?r=!0:(i=r,r=void 0),e.consume(m),a}function d(m){return i||r||!o?n(m):t(m)}}function B7(e,t){let n=0,r=0;return i;function i(a){return a===40?(n++,e.consume(a),i):a===41&&r<n?o(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(JN,t,o)(a):a===null||hn(a)||Uo(a)?t(a):(e.consume(a),i)}function o(a){return a===41&&r++,e.consume(a),i}}function $7(e,t,n){return r;function r(u){return u===33||u===34||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===63||u===95||u===126?(e.consume(u),r):u===38?(e.consume(u),o):u===93?(e.consume(u),i):u===60||u===null||hn(u)||Uo(u)?t(u):n(u)}function i(u){return u===null||u===40||u===91||hn(u)||Uo(u)?t(u):r(u)}function o(u){return Er(u)?a(u):n(u)}function a(u){re Line truncated
`),m=d.length>dH,p=m?d.length-Pg*2:0,h=E.useCallback(()=>{navigator.clipboard.writeText(a),r(!0),setTimeout(()=>r(!1),1500)},[a]);return c.jsxs("div",{className:"code-block-wrap",children:[c.jsxs("div",{className:"code-block-header",children:[c.jsxs("span",{className:"code-block-lang",children:[u||"code",m?` (${d.length} lines)`:""]}),c.jsx("button",{className:"code-block-copy",onClick:h,children:n?c.jsxs(c.Fragment,{children:[c.jsx(vl,{})," ",c.jsx("span",{children:"Copied"})]}):c.jsxs(c.Fragment,{children:[c.jsx(hm,{})," ",c.jsx("span",{children:"Copy"})]})})]}),c.jsx("pre",{children:c.jsx("code",{className:e,children:m&&!i?c.jsxs(c.Fragment,{children:[d.slice(0,Pg).join(`
`)+`
`,c.jsxs("span",{className:"code-block-omitted",onClick:()=>o(!0),children:["... +",p," lines (click to expand)"]}),`
`+d.slice(-Pg).join(`
`)]}):a})}),m&&i&&c.jsxs("button",{className:"code-block-collapse-btn",onClick:()=>o(!1),children:["Collapse (",d.length," lines)"]})]})}const mH={code({className:e,children:t,...n}){return e?.startsWith("language-")?c.jsx(fH,{className:e,children:t}):c.jsx("code",{className:e,...n,children:t})}},hH=3e3,pH=60,Bg=800;function Nw(e){if(e.length>hH)return!0;let t=0;for(let n=0;n<e.length;n++)if(e[n]===`
`&&++t>=pH)return!0;return!1}function gH(e){const t=e.lastIndexOf(`
`,Bg);return e.slice(0,t>Bg/2?t:Bg)}const rr=Ct.memo(function({content:t,className:n="msg-content-agent",collapseMode:r="auto"}){const i=r!=="never"&&Nw(t),[o,a]=E.useState(i);E.useEffect(()=>{a(r!=="never"&&Nw(t))},[r,t]);const u=o?gH(t):t,d=t.split(`
`).length,m=t.length;return c.jsxs("div",{className:n,children:[c.jsx(Z9,{remarkPlugins:[uH],components:mH,children:u}),i&&o&&c.jsxs("button",{className:"msg-collapse-toggle",onClick:()=>a(!1),children:["Show more (",d," lines, ",(m/1e3).toFixed(1),"k chars)"]}),i&&!o&&c.jsx("button",{className:"msg-collapse-toggle",onClick:()=>a(!0),children:"Show less"})]})}),Iw={native:"OpenOPC Native",codex:"Codex",claude_code:"Claude Code",cursor:"Cursor",opencode:"OpenCode"},lu="codex",$g="native",xH=["codex","native","claude_code","cursor","opencode"],yH=["native","codex","claude_code","cursor","opencode"];function sI(e){if(!e)return{kind:"fallback"};if(e.kind==="employee"){const t=String(e.id??e.employee_id??"").trim();return t?{kind:"employee",id:t}:{kind:"fallback"}}if(e.kind==="template"){const t=String(e.id??e.template_id??"").trim();return t?{kind:"template",id:t}:{kind:"fallback"}}return{kind:"fallback"}}function oI(e){const t=sI(e);return t.kind==="fallback"?"fallback:":`${t.kind}:${t.id??""}`}function vH(e,t,n){const r=String(e.role_id??"").trim(),i=String(e.role_label??"").trim(),o=`${r} ${i} ${e.role_responsibility??""}`.toLowerCase(),a=new Set((e.same_role_employee_ids??[]).map(m=>String(m??"").trim()).filter(Boolean)),u=t.map(m=>{const p=String(m.employee_id??"").trim(),h=String(m.employee_name??p).trim()||p,g=String(m.role_id??"").trim(),y=String(m.category??"").trim(),v=[g,y].filter(Boolean).join(" · ")||p;return{kind:"employee",id:p,name:h,subtitle:v,category:y,searchText:`${p} ${h} ${g} ${y} ${(m.domains??[]).join(" ")} ${(m.tags??[]).join(" ")}`.toLowerCase(),rank:a.has(p)||g===r?0:2}}).filter(m=>m.id).sort((m,p)=>m.rank-p.rank||m.name.localeCompare(p.name)),d=n.map(m=>{const p=String(m.template_id??"").trim(),h=String(m.template_name??p).trim()||p,g=String(m.category??"").trim(),y=[g,p].filter(Boolean).join(" · ")||p,v=`${p} ${h} ${g} ${(m.domains??[]).join(" ")} ${(m.tags??[]).join(" ")}`.toLowerCase(),w=o.split(/[^a-z0-9]+/).filter(S=>S.length>=3).reduce((S,_)=>S+(v.includes(_)?1:0),0);return{kind:"template",id:p,name:h,subtitle:y,category:g,searchText:v,rank:w}}).filter(m=>m.id).sort((m,p)=>p.rank-m.rank||m.name.localeCompare(p.name));return[...u,...d,{kind:"fallback",id:"",name:"Fallback role-only",subtitle:"No employee override",category:"fallback",searchText:"fallback role only no employee override"}]}function bH(e,t){const n=oI(t);return e.find(r=>`${r.kind}:${r.id}`===n)??e[0]}function _H(e,t){const n=t.toLowerCase().split(/\s+/).filter(Boolean);return n.length===0?!0:n.every(r=>e.searchText.includes(r))}function kH(e){return e.map(t=>{const n=String(t.role_id??"").trim(),r=String(t.existing_employee?.employee_id??"").trim(),i=String(t.candidate?.template_id??"").trim(),o=r?{kind:"employee",id:r}:i?{kind:"template",id:i}:{kind:"fallback"};return{role_id:n,role_label:t.role_labels?.[0]??n,role_responsibility:"",default_selection:o,same_role_employee_ids:t.existing_employee_ids??[],fallback_available:!0,default_agent:t.default_agent??lu,selected_agent:t.selected_agent??t.default_agent??lu,default_source:"recruitment"}}).filter(t=>t.role_id)}function SH(e,t){return t.kind==="template"&&e?.candidate?.template_id===t.id?e.candidate.proposed_name||e.candidate.template_name||t.name:t.kind==="employee"&&e?.existing_employee?.employee_id===t.id&&e.existing_employee.employee_name||t.name}function Tw(e,t){const n={},r=e.staffing_selections??{};for(const i of t){const o=String(i.role_id??"").trim();o&&(n[o]=sI(r[o]??i.default_selection))}return n}function Rw(e,t){const n=e.recruitment_role_agents??{},r={};for(const i of t){const o=String(i.role_id??"").trim();o&&(r[o]=n[o]??i.selected_agent??i.default_agent??lu)}return r}function wH(e){return!!(String(e.checkpoint_response_message_id??"").trim()||String(e.checkpoint_responded_at??"").trim()||String(e.checkpoint_reply_kind??"").trim())}const aI=Ct.memo(function({meta:t,onReply:n,responded:r}){const i=t.proposals??[],o=E.useMemo(()=>{const O={};for(const M of i){const A=String(M.role_id??"").trim();A&&(O[A]=M)}return O},[i]),a=E.useMemo(()=>t.staffing_roles?.length?t.staffing_roles:kH(i),[t.staffing_roles,i]),u=t.staffing_pool?.employees??[],d=t.staffing_pool?.templates??[],m=t.recruitment_rationales??[],p=E.useMemo(()=>{const O={};for(const M of a){const A=String(M.role_id??"").trim();A&&(O[A]=vH(M,u,d))}return O},[u,a,d]),[h,g]=E.useState({}),[y,v]=E.useState(""),[w,S]=E.useState(()=>Tw(t,a)),[_,k]=E.useState(()=>Rw(t,a)),[C,N]=E.useState(t.recruitment_agent??$g),L=r;E.useEffect(()=>{!L||!wH(t)||(S(Tw(t,a)),k(Rw(t,a)),N(t.recruitment_agent??$g))},[L,t,a]),E.useEffect(()=>{N(t.recruitment_agent??$g)},[t.recruitment_agent]);const I=E.useCallback(O=>{const M=String(t.checkpoint_id??"").trim();if(!M)throw new Error("Recruitment checkpoint reply requires checkpoint_id metadata.");const A=String(t.checkpoint_type??"").trim();return{response_to_checkpoint_id:M,response_to_checkpoint_type:A||"company_recruitment_confirmation",checkpoint_reply_kind:O,staffin Line truncated
`).map(t=>t.trim()).find(Boolean)??e}function MH(e){switch(e){case"timeout":case"timed_out":case"expired":return"Expired";case"stale":case"invalid":return"Inactive";case"cancelled":case"canceled":return"Cancelled";case"resolved":return"Resolved";default:return"Responded"}}const Yf=Ct.memo(function({meta:t,onReply:n,responded:r}){const i=r,o=String(t.checkpoint_status??"").trim().toLowerCase(),a=MH(o),u=String(t.prompt??t.summary??""),d=E.useMemo(()=>u.split(`
`).map(k=>k.trim()).filter(Boolean),[u]),m=AH(u).replace(/^\[[^\]]+\]\s*/,"")||"Action Required",p=d.slice(1).join(`
`).trim(),h=String(t.summary??"").trim(),g=(t.options??[]).filter(k=>!!k?.id),y=E.useMemo(()=>(t.active_subagents??[]).filter(k=>!!k&&typeof k=="object"),[t.active_subagents]),v=E.useMemo(()=>(t.permission_requests??[]).filter(k=>!!k&&typeof k=="object"),[t.permission_requests]),w=String(t.worktree_path??"").trim(),S=y.length>0||v.length>0||!!w,_=E.useCallback(k=>{i||n(k.label||k.id)},[i,n]);return c.jsxs("div",{className:"ckpt-panel ckpt-escalation",children:[c.jsxs("div",{className:"ckpt-header",children:[c.jsx("div",{className:"ckpt-icon ckpt-icon-escalation",children:c.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("path",{d:"M8 1.5L14.5 13H1.5L8 1.5Z"}),c.jsx("path",{d:"M8 5.5V9"}),c.jsx("circle",{cx:"8",cy:"11.5",r:"0.75",fill:"currentColor",stroke:"none"})]})}),c.jsx("div",{className:"ckpt-title",children:m}),c.jsx("span",{className:"ckpt-badge ckpt-badge-scope",children:String(t.escalation_type??"decision_needed").replace(/_/g," ")}),i&&c.jsx("span",{className:"ckpt-badge ckpt-badge-responded",children:a})]}),h&&h!==m&&c.jsxs("div",{className:"ckpt-section",children:[c.jsx("div",{className:"ckpt-section-title",children:"Summary"}),c.jsx(rr,{content:h,className:"ckpt-markdown"})]}),p&&c.jsxs("div",{className:"ckpt-section",children:[c.jsx("div",{className:"ckpt-section-title",children:"Request"}),c.jsx(rr,{content:p,className:"ckpt-markdown"})]}),S&&c.jsxs("details",{className:"ckpt-runtime-details",children:[c.jsx("summary",{children:"Runtime State"}),c.jsxs("div",{className:"ckpt-runtime-body",children:[w&&c.jsxs("div",{children:["Worktree: ",c.jsx("code",{children:w})]}),y.length>0&&c.jsxs("div",{children:["Active subagents: ",y.length]}),v.length>0&&c.jsxs("div",{children:["Pending permission records: ",v.length]})]})]}),!i&&g.length>0&&c.jsx("div",{className:"ckpt-actions ckpt-escalation-actions",children:g.map(k=>c.jsx("button",{className:`ckpt-btn ${k.id.includes("deny")?"ckpt-btn-deny":"ckpt-btn-approve"}`,onClick:()=>_(k),children:k.label||k.id},k.id))}),!i&&t.default_action&&c.jsxs("div",{className:"ckpt-escalation-hint",children:["Default on timeout: ",c.jsx("code",{children:t.default_action})]})]})});function DH(e){return e.split(`
`).map(t=>t.trim()).find(Boolean)??e}function OH(e){switch(e){case"ignored":return"Ignored";case"timeout":case"timed_out":case"expired":return"Expired";case"stale":case"invalid":return"Inactive";case"superseded":return"Superseded";case"cancelled":case"canceled":return"Cancelled";case"resolved":return"Resolved";default:return"Responded"}}const fI=Ct.memo(function({meta:t,onReply:n,responded:r}){const i=r,[o,a]=E.useState(""),[u,d]=E.useState(null),m=String(t.checkpoint_status??"").trim().toLowerCase(),p=OH(m),h=String(t.prompt??t.summary??"").trim(),y=`${String(t.work_item_projection_title??DH(h)??"Human Review").trim()||"Human Review"} (for self-evolution)`,v=String(t.summary??"").trim(),w=E.useMemo(()=>(t.active_subagents??[]).filter(T=>!!T&&typeof T=="object"),[t.active_subagents]),S=E.useMemo(()=>(t.permission_requests??[]).filter(T=>!!T&&typeof T=="object"),[t.permission_requests]),_=String(t.worktree_path??"").trim(),k=w.length>0||S.length>0||!!_,C=i||u!==null,N=E.useCallback((T,O="")=>{const M=String(t.checkpoint_id??"").trim();if(!M)throw new Error("Delivery self-evolution reply requires checkpoint_id metadata.");const A={response_to_checkpoint_id:M,response_to_checkpoint_type:"company_delivery_feedback",checkpoint_reply_kind:T};return(T==="approve"||T==="feedback")&&(A.self_evolution_trigger=!0,A.human_feedback_text=O),A},[t.checkpoint_id]),L=E.useCallback(()=>{if(C)return;const T=N("approve");d("approve"),n("I fully agree with this delivery.",T)},[C,N,n]),I=E.useCallback(()=>{const T=o.trim();if(C||!T)return;const O=N("feedback",T);d("feedback"),n(T,O),a("")},[C,N,o,n]),D=E.useCallback(()=>{if(C)return;const T=N("ignore");d("ignore"),n("Ignore this self-evolution review.",T)},[C,N,n]);return c.jsxs("div",{className:"ckpt-panel ckpt-delivery-feedback",children:[c.jsxs("div",{className:"ckpt-header",children:[c.jsx("div",{className:"ckpt-icon ckpt-icon-user-input",children:c.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("path",{d:"M8 1.5L14 5v4.5c0 2.25-1.8 4.25-6 5-4.2-.75-6-2.75-6-5V5L8 1.5Z"}),c.jsx("path",{d:"M5.5 8.25L7.25 10l3.25-4"})]})}),c.jsx("div",{className:"ckpt-title",children:y}),c.jsx("span",{className:"ckpt-badge ckpt-badge-scope",children:String(t.feedback_scope??"final").replace(/_/g," ")}),i&&c.jsx("span",{className:"ckpt-badge ckpt-badge-responded",children:p})]}),v&&v!==y&&c.jsxs("div",{className:"ckpt-section",children:[c.jsx("div",{className:"ckpt-section-title",children:"Summary"}),c.jsx(rr,{content:v,className:"ckpt-markdown"})]}),h&&c.jsxs("div",{className:"ckpt-section",children:[c.jsx("div",{className:"ckpt-section-title",children:"Review Request"}),c.jsx(rr,{content:h,className:"ckpt-markdown"})]}),k&&c.jsxs("details",{className:"ckpt-runtime-details",children:[c.jsx("summary",{children:"Runtime State"}),c.jsxs("div",{className:"ckpt-runtime-body",children:[_&&c.jsxs("div",{children:["Worktree: ",c.jsx("code",{children:_})]}),w.length>0&&c.jsxs("div",{children:["Active subagents: ",w.length]}),S.length>0&&c.jsxs("div",{children:["Pending permission records: ",S.length]})]})]}),!i&&c.jsxs("div",{className:"ckpt-actions ckpt-actions-inline-feedback",children:[c.jsx("button",{className:"ckpt-btn ckpt-btn-approve",onClick:L,disabled:C,children:"Fully Agree"}),c.jsx("button",{className:"ckpt-btn ckpt-btn-cancel",onClick:D,disabled:C,children:"Ignore"}),c.jsx("textarea",{className:"ckpt-feedback-input ckpt-feedback-inline-input",placeholder:"Feedback for self-evolution...",value:o,onChange:T=>a(T.target.value),disabled:C,rows:2}),c.jsx("button",{className:"ckpt-btn ckpt-btn-feedback",onClick:I,disabled:C||!o.trim(),children:"Send Feedback"})]})]})}),Wd="__other__",LH=["A","B","C"];function Hi(e){return String(e??"").trim()}function zH(e,t){const n=Hi(e.question),r=Hi(e.header);if(!n&&!r)return null;const i=(e.options??[]).slice(0,3).map((o,a)=>({id:Hi(o.id)||String.fromCharCode(97+a),label:Hi(o.label),description:Hi(o.description)})).filter(o=>o.label);return{id:Hi(e.id)||`question_${t+1}`,header:r,question:n||r,options:i,allow_freeform:e.allow_freeform!==!1,required:e.required!==!1}}const mI=Ct.memo(function({meta:t,onReply:n,responded:r}){const[i,o]=E.useState(""),[a,u]=E.useState({}),d=r,m=String(t.work_item_projection_title??t.work_item_projection_id??"Input Needed").trim()||"Input Needed",p=String(t.summary??"").trim(),h=String(t.prompt??"").trim(),g=String(t.context_note??"").trim(),y=String(t.resume_hint??"").trim(),v=E.useMemo(()=>(t.questions??[]).map(V=>String(V).trim()).filter(Boolean),[t.questions]),w=E.useMemo(()=>(t.input_questions??[]).map((V,W)=>zH(V,W)).filter(V=>V!==null),[t.input_questions]),S=w.some(V=>(V.options??[]).length>0),_=E.useMemo(()=>(t.required_fields??[]).map(V=>String(V).trim()).filter(Boolean),[t.required_fields]),k=E.useMemo(()=>(t.active_subagents??[]).filter(V=>!!V&&typeof V=="object"),[t.active_subagents]),C=E.useMemo(( Line truncated
`),{user_input_answers:V})},[a,B,w,d,n]);return c.jsxs("div",{className:"ckpt-panel ckpt-user-input",children:[c.jsxs("div",{className:"ckpt-header",children:[c.jsx("div",{className:"ckpt-icon ckpt-icon-user-input",children:c.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("path",{d:"M3 3.5h10v6H6.5L3 13V3.5Z"}),c.jsx("path",{d:"M5.5 6h5"}),c.jsx("path",{d:"M5.5 8h3.5"})]})}),c.jsx("div",{className:"ckpt-title",children:m}),c.jsx("span",{className:"ckpt-badge ckpt-badge-scope",children:"awaiting input"}),d&&c.jsx("span",{className:"ckpt-badge ckpt-badge-responded",children:"Responded"})]}),p&&c.jsxs("div",{className:"ckpt-section",children:[c.jsx("div",{className:"ckpt-section-title",children:"Summary"}),c.jsx(rr,{content:p,className:"ckpt-markdown"})]}),h&&c.jsxs("div",{className:"ckpt-section",children:[c.jsx("div",{className:"ckpt-section-title",children:"Request"}),c.jsx(rr,{content:h,className:"ckpt-markdown"})]}),S?c.jsxs("div",{className:"ckpt-section",children:[c.jsx("div",{className:"ckpt-section-title",children:"Questions"}),c.jsx("div",{className:"ckpt-choice-list",children:w.map(V=>{const W=a[V.id]??{freeformText:""},Z=V.options??[],q=V.allow_freeform!==!1,U=q&&(Z.length===0||W.selectedOptionId===Wd);return c.jsxs("div",{className:"ckpt-choice-question",children:[V.header&&c.jsx("div",{className:"ckpt-question-header",children:V.header}),c.jsx(rr,{content:V.question,className:"ckpt-markdown"}),Z.length>0&&c.jsxs("div",{className:"ckpt-choice-grid",children:[Z.map((ee,P)=>{const K=W.selectedOptionId===ee.id;return c.jsxs("button",{className:`ckpt-choice-option${K?" is-selected":""}`,onClick:()=>A(V.id,ee.id),children:[c.jsx("span",{className:"ckpt-choice-letter",children:LH[P]??"?"}),c.jsxs("span",{className:"ckpt-choice-copy",children:[c.jsx("span",{className:"ckpt-choice-label",children:ee.label}),ee.description&&c.jsx("span",{className:"ckpt-choice-desc",children:ee.description})]})]},ee.id)}),q&&c.jsxs("button",{className:`ckpt-choice-option${W.selectedOptionId===Wd?" is-selected":""}`,onClick:()=>A(V.id,Wd),children:[c.jsx("span",{className:"ckpt-choice-letter",children:"D"}),c.jsxs("span",{className:"ckpt-choice-copy",children:[c.jsx("span",{className:"ckpt-choice-label",children:"Other"}),c.jsx("span",{className:"ckpt-choice-desc",children:"Enter a custom answer"})]})]})]}),U&&c.jsx("textarea",{className:"ckpt-feedback-input ckpt-other-field",placeholder:"Type your answer...",value:W.freeformText,onChange:ee=>$(V.id,ee.target.value),rows:3})]},V.id)})})]}):v.length>0&&c.jsxs("div",{className:"ckpt-section",children:[c.jsx("div",{className:"ckpt-section-title",children:"Questions"}),c.jsx("ul",{className:"ckpt-task-list",children:v.map(V=>c.jsx("li",{children:V},V))})]}),_.length>0&&c.jsxs("div",{className:"ckpt-section",children:[c.jsx("div",{className:"ckpt-section-title",children:"Required Fields"}),c.jsx("div",{className:"ckpt-task-tags",children:_.map(V=>c.jsx("span",{className:"ckpt-field-tag",children:V},V))})]}),g&&c.jsxs("div",{className:"ckpt-section",children:[c.jsx("div",{className:"ckpt-section-title",children:"Context"}),c.jsx(rr,{content:g,className:"ckpt-markdown ckpt-markdown-muted"})]}),y&&c.jsx("div",{className:"ckpt-escalation-hint",children:y}),M&&c.jsxs("details",{className:"ckpt-runtime-details",children:[c.jsx("summary",{children:"Runtime State"}),c.jsxs("div",{className:"ckpt-runtime-body",children:[L&&c.jsxs("div",{children:["Requester: ",c.jsx("code",{children:L})]}),D&&c.jsxs("div",{children:["Work item: ",c.jsx("code",{children:D})]}),I&&c.jsxs("div",{children:["Task: ",c.jsx("code",{children:I})]}),T&&c.jsxs("div",{children:["Seat: ",c.jsx("code",{children:T})]}),N&&c.jsxs("div",{children:["Worktree: ",c.jsx("code",{children:N})]}),k.length>0&&c.jsxs("div",{children:["Active subagents: ",k.length]}),C.length>0&&c.jsxs("div",{children:["Pending permission records: ",C.length]})]})]}),!d&&c.jsxs("div",{className:"ckpt-feedback-area",children:[S?null:c.jsx("textarea",{className:"ckpt-feedback-input",placeholder:"Reply with the missing input to continue...",value:i,onChange:V=>o(V.target.value),rows:3}),c.jsx("div",{className:"ckpt-feedback-btns",children:c.jsx("button",{className:"ckpt-btn ckpt-btn-approve",onClick:S?H:G,disabled:S?!B:!i.trim(),children:"Send Reply"})})]})]})}),By={todo:"To do",in_progress:"In progress",in_review:"In review",done:"Done"};function Fg(e,t){if(t&&t in By)return t;switch(e){case"active":return"in_progress";case"waiting":return"in_review";case"done":return"done";case"failed":return"done";case"pending":return"todo";default:return"todo"}}function Yd(e){return By[e]??By.todo}const Lw={active:0,waiting:1,failed:2,done:3,pending:4};function PH(e){if(e.length===0)return"pending";let t=e[0],n=Lw[t]??99;for(const r of e){const i=Lw[r]??99;i<n&&(t=r,n=i)}return t}const BH={native:"Native",codex:"Codex",claude_code:"Claude Cod Line truncated
`)[0].slice(0,140),tone:"danger"};const o=t.match(/^\[Company:([^\]]+)\]\s*(.+)$/);if(o){const d=o[1].split("::"),m=d[0]||"company",p=o[2].trim(),h=p.toLowerCase(),g=h.includes("completed")||h.includes("done")?"success":h.includes("blocked")||h.includes("failed")?"warning":"info";return{kind:"company_event",label:`${m.toUpperCase()} · ${d[1]??""}`.replace(/ · $/,""),summary:p,tone:g}}const a=t.match(/^(Review needed|Status digest|Blocked|Completion):\s*(.+)$/i);if(a){const d=a[1].replace(/\b\w/g,p=>p.toUpperCase()),m=Gc(a[2]);return{kind:"company_event",label:d,summary:m,tone:/^Blocked$/i.test(a[1])?"warning":"info"}}const u=t.match(/^NO_DELEGATION_JUSTIFICATION:\s*(.+)$/i);return u?{kind:"company_event",label:"Delegation check",summary:Gc(u[1]).slice(0,180),tone:"info"}:null}function pF(e,t){const{isCompanyRuntime:n,detailMode:r}=t;if(!n||r==="full"||Zc(e.metadata))return null;const i=pI(e.content);if(!i)return null;const o=e.sender==="system"||e.metadata?.type==="system",a=i.kind==="company_event"||e.content.startsWith("[Company:");return!o&&!a?null:{msg:e,classification:i}}function gF(e,t={}){const{isCompanyRuntime:n=!1,detailMode:r="summary"}=t,i=[];let o=[],a=0;const u=new Set,d=new Set,m=()=>{if(o.length===0)return;const p=o[0].msg,h=o[o.length-1].msg;i.push({kind:"ops-bundle",id:`ops:${p.id}:${o.length}:${h.id}`,timestamp:p.timestamp,events:o,sortOrder:a}),o=[]};return e.forEach((p,h)=>{const g=h*2+1,y=pF(p,{isCompanyRuntime:n,detailMode:r});if(y){o.length===0&&(a=g),o.push(y);return}const v=r==="summary"?hI(p.content):null;if(v){const w=[p.sender,Math.round(p.timestamp/1e3),v.kind,Gc(v.summary||v.acceptanceSummary||"").slice(0,500),v.verdict??"",v.deliverables.map(S=>`${S.name}:${S.path}`).join("|").slice(0,800)].join("");if(u.has(w))return;u.add(w)}if(r==="summary"){const w=Gc(iF(p.content)).slice(0,1200);if(w){const S=sF(p)?["result",w].join(""):[p.sender,Math.round(p.timestamp/1e3),w].join("");if(d.has(S))return;d.add(S)}}m(),i.push({kind:"message",id:p.id,timestamp:p.timestamp,msg:p,sortOrder:g})}),m(),i}const xF=Ct.memo(function({msg:t,showDate:n,dateStr:r,classification:i}){const[o,a]=E.useState(!1),u=t.content.trim()!==`[${i.label}] ${i.summary}`.trim()&&t.content.trim().length>i.summary.length+4;return c.jsxs("div",{children:[n&&c.jsx("div",{className:"msg-date-sep",children:c.jsx("span",{children:r})}),c.jsxs("div",{className:`msg-ops-row msg-ops-tone-${i.tone}${o?" expanded":""}`,onClick:u?()=>a(d=>!d):void 0,role:u?"button":void 0,tabIndex:u?0:-1,children:[c.jsx("span",{className:"msg-ops-dot","aria-hidden":"true"}),c.jsx("span",{className:"msg-ops-label",children:i.label}),i.summary&&c.jsx("span",{className:"msg-ops-summary",title:i.summary,children:i.summary}),c.jsx("span",{className:"msg-ops-time",title:Wi(t.timestamp),children:Ss(t.timestamp)}),u&&c.jsx("span",{className:`msg-ops-chevron${o?" open":""}`,"aria-hidden":"true",children:c.jsx(_s,{down:o})})]}),u&&o&&c.jsx("div",{className:"msg-ops-details",children:c.jsx("pre",{className:"msg-ops-details-pre",children:t.content})})]})}),yF=Ct.memo(function({events:t,showDate:n,dateStr:r}){const[i,o]=E.useState(!1);if(t.length===0)return null;const a=t[0].msg,u=t[t.length-1].msg,d=t.reduce((h,g)=>{const y=g.classification.kind==="company_event"?"company":g.classification.kind.startsWith("external")?"runtime":"delegation";return h[y]=(h[y]??0)+1,h},{}),m=Object.entries(d).map(([h,g])=>`${g} ${h}`).join(" · "),p=`${t.length} technical event${t.length===1?"":"s"} hidden`;return c.jsxs("div",{children:[n&&c.jsx("div",{className:"msg-date-sep",children:c.jsx("span",{children:r})}),c.jsxs("button",{type:"button",className:`msg-ops-bundle${i?" expanded":""}`,onClick:()=>o(h=>!h),title:`${Wi(a.timestamp)} - ${Wi(u.timestamp)}`,children:[c.jsx("span",{className:"msg-ops-bundle-dot"}),c.jsx("span",{className:"msg-ops-bundle-title",children:p}),c.jsx("span",{className:"msg-ops-bundle-summary",children:m}),c.jsx("span",{className:"msg-ops-bundle-time",children:Ss(a.timestamp)}),c.jsx("span",{className:"msg-ops-bundle-chevron",children:c.jsx(_s,{down:i})})]}),i&&c.jsx("div",{className:"msg-ops-bundle-details",children:t.map(({msg:h,classification:g})=>c.jsxs("div",{className:`msg-ops-bundle-event msg-ops-tone-${g.tone}`,children:[c.jsx("span",{className:"msg-ops-dot"}),c.jsx("span",{className:"msg-ops-label",children:g.label}),c.jsx("span",{className:"msg-ops-summary",children:g.summary}),c.jsx("span",{className:"msg-ops-time",title:Wi(h.timestamp),children:Ss(h.timestamp)})]},h.id))})]})});function vF(e){return e.kind==="review"?`Review · ${e.verdict?e.verdict.replace(/_/g," "):"review"}`:e.kind==="report"?"Report":"Update"}const bF=Ct.memo(function({msg:t,payload:n,showDate:r,dateStr:i,isCopied:o,onCopy:a}){const u=ov(t.sender==="system"?t.senderName||"OPC":t.sender),d=t.senderDeleted?"[Deleted]":t.senderName,m=vF(n),p=n.summary||n.acceptanceSummary||m;return c.jsxs("div",{children:[r&&c.jsx("div",{className:"msg-date-sep",children:c.jsx("spa Line truncated
Set up at least one role before running a task.
Go to Org tab now?`)&&n?.(),!1;if(a.length>1&&!u)return confirm(`Your organization has multiple top-level roles but no final decider selected.
Choose one final decider in the Org tab before running a task.
Go to Org tab now?`)&&n?.(),!1;const d=[],m=new Set(r.map(y=>y.role_id));o.runtimeTeams.filter(y=>y.member_role_ids.some(v=>m.has(v))||y.manager_role_id&&m.has(y.manager_role_id)).length===0&&d.push("No runtime teams defined — the system will auto-generate from your roles");const h=new Set(i.map(y=>y.role_id)),g=r.filter(y=>!h.has(y.role_id));if(g.length>0){const y=g.map(v=>v.name).join(", ");d.push(`${g.length} role(s) have no employees: ${y}`)}return d.length>0?confirm(`Before running this task:
`+d.map(y=>"• "+y).join(`
`)+`
Run anyway?`):!0}function eV(e){if(!e)return!1;const t=jm(e);return!!(t.projectRun?.run_id||t.runtimeTeams.length>0||t.runtimeSeats.length>0)}function Jw(e,t){const n=!!t?.childDetail;return e?n?"full":e.execMode==="company"||e.execMode==="org"||e.execMode==="custom"?"summary":"full":"summary"}function eC(e){return String(e?.originTaskId??e?.taskId??"").trim()||null}function tV({boardColor:e,title:t,onCommit:n}){const[r,i]=E.useState(!1),[o,a]=E.useState(t),u=E.useRef(null);E.useEffect(()=>{r||a(t)},[t,r]);const d=E.useCallback(()=>{const p=o.trim();p&&p!==t?n(p):a(t),i(!1)},[o,t,n]),m=E.useCallback(()=>{a(t),i(!0),setTimeout(()=>u.current?.select(),0)},[t]);return c.jsx("div",{className:"board-selector",children:c.jsx("div",{className:"board-tabs",children:c.jsxs("span",{className:"board-tab active board-tab-editable",style:{"--board-color":e},children:[c.jsx("span",{className:"board-tab-dot",style:{background:e}}),r?c.jsx("input",{ref:u,className:"board-tab-title-input",value:o,onChange:p=>a(p.target.value),onBlur:d,onKeyDown:p=>{p.key==="Enter"&&d(),p.key==="Escape"&&(a(t),i(!1))}}):c.jsx("span",{className:"board-tab-title",onClick:m,title:"Click to edit session title",children:t})]})})})}function nV({boardStore:e,agents:t,officeMap:n,execMode:r,companyProfile:i,taskPreferredAgent:o,chatStore:a,sessionStore:u,projectId:d,onRunTask:m,onCreateTask:p,onMoveTask:h,onCreateSession:g,onSessionSend:y,onSecretarySend:v,onDeleteSession:w,onTitleChange:S,onSessionConfigChange:_,onSessionTaskAgentChange:k,onContinueInNewChat:C,onSessionStop:N,onSessionResume:L,onSessionComplete:I,onLoadSessionDetail:D,onOpenExecutionPanel:T,onCollabSync:O,orgInfoData:M,onNavigateToOrg:A,recoveryStatus:$,onRecoveryResume:Y,onRecoveryCancel:B,commsState:G,commsMessage:H,onCommsRefresh:V,onCommsReadMessage:W,savedOrgsList:Z,activeSavedOrg:q,onSavedOrgsList:U,onSavedOrgLoad:ee}){const{sessions:P,activeSessionId:K,activeSession:J}=u,[te,re]=E.useState("collapsed"),{width:oe,isResizing:fe,handleMouseDown:se}=KF({initialWidth:380,minWidth:300,maxWidth:600,onCollapse:()=>re("collapsed")}),[je,Se]=E.useState("chat"),[Ce,He]=E.useState(null),[We,Ye]=E.useState({kind:"activity"}),[gt,Ut]=E.useState([]),[bt,xt]=E.useState(!1),[me,Oe]=E.useState({}),it=E.useRef(D),et=E.useRef({active:null,child:null}),nt=r==="company"||r==="org"||r==="custom",de=`secretary:${d}`,ve=`activity:${d}`,Ae=E.useMemo(()=>Ce?P.find(ue=>ue.taskId===Ce)??null:null,[P,Ce]),Ue=E.useMemo(()=>We.kind!=="task-detail"?null:e.tasks.find(ue=>ue.id===We.taskId)??null,[We,e.tasks]),Fe=E.useMemo(()=>{const ue=Cm(Ue);return ue?P.find(be=>be.taskId===ue||be.runtimeTaskId===ue||be.executionTurnId===ue)??null:null},[P,Ue]),vt=E.useMemo(()=>Fe?a.getChannelMessages(Fe.channelId):[],[a.messages,a.getChannelMessages,Fe]),Rt=E.useMemo(()=>pf(J,P),[P,J]),ke=E.useMemo(()=>If(J,P),[P,J]),Re=E.useMemo(()=>Tf(J,[...ke,...Rt]),[J,Rt,ke]);E.useEffect(()=>{it.current=D},[D]);const Ke=E.useCallback((ue,be,Be="summary")=>{const mt=it.current;!mt||!ue||(Oe(vn=>vn[ue]?vn:{...vn,[ue]:!0}),mt(ue,{limit:ZF,beforeCreatedAt:be?.timestamp,beforeMessageId:be?.id,detailLevel:Be}),window.setTimeout(()=>{Oe(vn=>vn[ue]?{...vn,[ue]:!1}:vn)},800))},[]),Ge=E.useCallback(ue=>!!me[ue],[me]);E.useEffect(()=>{et.current={active:null,child:null}},[d]),E.useEffect(()=>{Ce&&!Ae&&He(null)},[Ce,Ae]),E.useEffect(()=>{We.kind==="task-detail"&&!Ue&&Ye({kind:"activity"})},[We,Ue]);const tt=E.useRef(null);E.useEffect(()=>{if(!Fe){tt.current=null;return}tt.current!==Fe.taskId&&(tt.current=Fe.taskId,Ke(Fe.taskId,void 0,"full"))},[Fe,Ke]),E.useEffect(()=>{if(!Ce){et.current.child=null;return}et.current.child!==Ce&&(et.current.child=Ce,Ke(Ce,void 0,"full"))},[Ce,Ke]),E.useEffect(()=>{if(!K){et.current.active=null;return}const ue=Re.timelineSessions.length>0?Re.timelineSessions:P.find(Be=>Be.taskId===K)?[P.find(Be=>Be.taskId===K)]:[];if(ue.length===0){et.current.active=null;return}const be=ue.map(Be=>`${Be.taskId}:${Jw(Be,{childDetail:Be.mode==="child"})}`).join("|");if(et.current.active!==be){et.current.active=be;for(const Be of ue)Ke(Be.taskId,void 0,Jw(Be,{childDetail:Be.mode==="child"}))}},[Re.timelineSessions,K,Ke,P]);const Qe=E.useMemo(()=>Ce?{kind:"child-detail"}:We.kind==="task-detail"||We.kind==="secretary"?We:K?{kind:"session",taskId:K}:{kind:"activity"},[We,K,Ce]),xn=E.useMemo(()=>Qe.kind==="secretary"?de:Qe.kind==="child-detail"&&Ae?Ae.channelId:Qe.kind==="session"&&Re.displaySession?Re.displaySession.channelId:Qe.kind==="session"&&J?J.channelId:ve,[Qe,Re.displaySession,J,Ae,de,ve]),Qt=E.useMemo(()=>{if(Qe.kind==="activity")return[ve];if(Qe.kind==="secretary")return[de];if(Qe.kind==="child-detail"&&Ae)return[Ae.channelId];if(Qe.kind==="session"){const ue=Re.timelineSessions.map(be=>be.channelId).filter((be,Be,mt)=>!!be&&mt.indexOf(be)===Be);if(ue.length>0)return ue}return xn?[xn]:[]},[Qe.kind,Re.timelineSessions,Ae,ve,de,xn]),kn=E.useMemo(()=>{const ue=new Set;for(const be of P)be.status!=="cancelled"&&ue.add(be.channelId Line truncated
`).replace(/\r/g,`
`).split(`
`).map(i=>i.trimEnd()).join(`
`).replace(/\n{3,}/g,`
`).trim(),n=iV(t),r=n.split(/\n{2,}/).map(i=>i.trim()).filter(Boolean);return r.length>1&&/^Verification:\s/i.test(r[r.length-1])?r.slice(0,-1).join(`
`).trim():n}function iV(e){const t=String(e||"").trim(),n=t.match(/^\*\*(.{8,160}?)\*\*:\s+([\s\S]+)$/);if(n){const a=n[2].trim();if(a.length>=80)return a}const r=t.indexOf(": ");if(r<8||r>160)return t;const i=t.slice(0,r).replace(/\*/g,"").trim(),o=t.slice(r+2).trim();return o.length<80||!/[A-Za-z\u4e00-\u9fff]/.test(i)||/^(https?|file)$/i.test(i)?t:o}function qo(e){const t=Go(e),n=new Set,r=typeof t.checkpoint_type=="string"?t.checkpoint_type.trim():"",i=typeof t.checkpoint_id=="string"?t.checkpoint_id.trim():"";for(const o of[e.id,typeof t.ui_message_id=="string"?t.ui_message_id:"",r&&i?`checkpoint:${r}:${i}`:""]){const a=String(o??"").trim();a&&n.add(a)}return n}function sV(e){return e.startsWith("checkpoint:")}function Gi(e){return typeof e.timestamp=="number"?e.timestamp:0}function nC(e){const t=String(e.sender??"").trim().toLowerCase(),n=Go(e),r=typeof n.role=="string"?n.role.trim().toLowerCase():"";return t==="user"||r==="user"?"user":"assistant"}function rC(e){const t=Go(e),n=String(e.sender??"").trim().toLowerCase();let r=0;const i=vI(e);return i&&(r+=1e3+i),t.source==="engine"&&(r+=100),n&&n!=="system"&&(r+=20),n&&!["assistant","system","user"].includes(n)&&(r+=5),e.replyToId&&(r+=2),r+=Math.min(Object.keys(t).length,10),r}function iC(e){return String(Go(e).source??"").trim().toLowerCase()==="engine"}function vI(e){const t=Go(e),n=String(t.transcript_kind??"").trim();if(n)return tC[n]??0;const r=String(t.kind??"").trim();return tC[r]??0}function Kf(e){return vI(e)>0}function bI(e,t){if(e.channelId!==t.channelId)return!1;const n=qo(e),r=qo(t);for(const i of n)if(r.has(i))return!0;return!1}function Vy(e,t){if(bI(e,t))return!0;if(e.channelId!==t.channelId||nC(e)!==nC(t)||Xf(e.content)!==Xf(t.content))return!1;const n=Kf(e)&&Kf(t);if(!n&&String(e.replyToId??"")!==String(t.replyToId??"")||!(iC(e)||iC(t)))return!1;const r=Gi(e),i=Gi(t);return!(!n&&r&&i&&Math.abs(r-i)>cv)}function Uy(e,t,n=!1){let r=e,i=t;(n||rC(t)>rC(e))&&(r=t,i=e);const o=[];for(const h of[i.mentions,r.mentions])for(const g of h??[])o.includes(g)||o.push(g);const a=qo(e),u=qo(t);let d="";for(const h of a)if(u.has(h)&&!sV(h)){d=h;break}const m=Xf(r.content),p=m&&m===Xf(i.content)?m:r.content;return{...i,...r,...d?{id:d}:{},content:p,metadata:{...Go(i),...Go(r)},mentions:o,timestamp:Gi(r)||Gi(i)}}function Kg(e){const t=[],n=new Map;for(const r of[...e].sort((i,o)=>Gi(i)-Gi(o))){const i=qo(r);let o=-1,a=!1;for(const d of i){const m=n.get(d);if(m!==void 0){o=m,a=t[m].id===r.id;break}}if(o===-1){const d=Gi(r),m=Kf(r);for(let p=t.length-1;p>=0;p--){const h=Gi(t[p]);if(!m&&d>0&&h>0&&d-h>cv)break;if(Vy(t[p],r)){o=p;break}}}const u=o===-1?t.length:o;o===-1?t.push(r):t[o]=Uy(t[o],r,a);for(const d of qo(t[u]))n.has(d)||n.set(d,u)}return t}function oV(e,t){switch(t.type){case"SET":return t.channels;case"CLEAR":return[];case"ADD":return e.some(n=>n.id===t.channel.id)?e:[...e,t.channel];case"REMOVE":return e.filter(n=>n.id!==t.channelId);case"REMOVE_PARTICIPANT":return e.map(n=>({...n,participants:n.participants.filter(r=>r!==t.agentId)}));default:return e}}function aV(e,t){switch(t.type){case"SET":{const n=Kg(t.messages);if(e.length===0)return n;const r=e.filter(i=>typeof i.id=="string"&&i.id.startsWith("msg-")&&!n.some(o=>Vy(i,o)));return r.length===0?n:Kg([...n,...r])}case"CLEAR":return[];case"ADD":{const n=Gi(t.message);qo(t.message);let r=!1;for(let i=e.length-1;i>=0;i--){const o=Gi(e[i]);if(!r&&n>0&&o>0&&n-o>cv&&(r=!0),bI(e[i],t.message)){const a=[...e];return a[i]=Uy(e[i],t.message,e[i].id===t.message.id),a}if((Kf(t.message)||!r)&&Vy(e[i],t.message)){const a=[...e];return a[i]=Uy(e[i],t.message),a}}return[...e,t.message]}case"MERGE":return t.messages.length===0?e:Kg([...e,...t.messages]);case"MARK_SENDER_DELETED":return e.map(n=>n.sender===t.senderId?{...n,senderDeleted:!0,senderName:"[已删除的 Agent]"}:n);case"REMOVE_BY_CHANNEL":return e.filter(n=>n.channelId!==t.channelId);case"REMOVE_BY_TASK_ID":return e.filter(n=>n.channelId!==`session:${t.taskId}`&&n.metadata?.task_id!==t.taskId);default:return e}}function lV(){const[e,t]=E.useReducer(oV,[]),[n,r]=E.useReducer(aV,[]),[i,o]=E.useState({}),[a,u]=E.useState("default"),d=E.useMemo(()=>{const I={};for(const D of n)I[D.channelId]||(I[D.channelId]=[]),I[D.channelId].push(D);return I},[n]),m=E.useMemo(()=>{const I={};for(const D of n){if(D.sender==="user")continue;const T=i[D.channelId]??0;D.timestamp<=T||(I[D.channelId]=(I[D.channelId]??0)+1)}return I},[n,i]),p=E.useCallback(I=>{const D={id:`msg-${rV()}`,channelId:I.channelId,sender:I.sender,senderName:I.senderName,content:I.content,timestamp:Date.now(),replyToId:I.replyToId,mentions:[],metadata:I.metadata};return r({type:"ADD",message:D}),D},[]),h=E.useCallback(I=>d[I]??[],[d]),g=E.useCallback(I=>m[I]??0,[m]),y=E.useCallback(I=>{o(D=>({...D,[I]:Date.now()}))},[]),v=E.useCallback(I=>{r({type:"MARK_SENDER_DELETED",senderId:I})},[]),w=E.useCallback(I=>{t({type:"REMOVE_PARTICIPANT",agentId:I})},[]),S=E.useCallback(I=>{t({type:"REMOVE",channe Line truncated
${t}`:`${e}${t}`}function cV(e,t){return"Thinking"}function uV(e){return{timestamp:Number.isFinite(e.timestamp)?e.timestamp:Date.now(),type:e.type,summary:typeof e.summary=="string"?e.summary:"",detail:typeof e.detail=="string"&&e.detail?e.detail:void 0,turnId:typeof e.turnId=="string"&&e.turnId?e.turnId:void 0,itemId:typeof e.itemId=="string"&&e.itemId?e.itemId:void 0,streamId:typeof e.streamId=="string"&&e.streamId?e.streamId:void 0,toolCallId:typeof e.toolCallId=="string"&&e.toolCallId?e.toolCallId:void 0,permissionGroupKey:typeof e.permissionGroupKey=="string"&&e.permissionGroupKey?e.permissionGroupKey:void 0,seq:typeof e.seq=="number"&&Number.isFinite(e.seq)?e.seq:void 0,executionMode:typeof e.executionMode=="string"&&e.executionMode?e.executionMode:void 0}}function Zf(e){const t=e.itemId||e.streamId;return t?`${e.type}:${e.turnId??""}:${t}`:e.toolCallId&&(e.type==="tool_call"||e.type==="autonomy")?`${e.type}:${e.turnId??""}:${e.toolCallId}`:e.permissionGroupKey&&e.type==="autonomy"?`${e.type}:${e.turnId??""}:${e.permissionGroupKey}`:""}function dV(e,t){const n=Zf(e),r=Zf(t);return n&&r?n===r:t.timestamp-e.timestamp>Am||e.type!==t.type?!1:e.type==="thinking"?!0:e.type==="tool_call"?e.summary===t.summary:!1}function fV(e,t){return t.timestamp-e.timestamp<=Am&&e.type===t.type&&e.summary===t.summary&&(e.detail??"")===(t.detail??"")}function mV(e,t){if(e.type==="thinking"){const n=Gy(e.detail??e.summary,t.detail??t.summary,"thinking");return{timestamp:t.timestamp,type:"thinking",summary:cV(n,t.summary||e.summary),detail:n||void 0,turnId:t.turnId??e.turnId,itemId:t.itemId??e.itemId,streamId:t.streamId??e.streamId,toolCallId:t.toolCallId??e.toolCallId,permissionGroupKey:t.permissionGroupKey??e.permissionGroupKey,seq:t.seq??e.seq,executionMode:t.executionMode??e.executionMode}}if(e.type==="tool_call"){const n=Gy(e.detail??"",t.detail??"","tool_call");return{timestamp:t.timestamp,type:"tool_call",summary:t.summary||e.summary,detail:n||void 0,turnId:t.turnId??e.turnId,itemId:t.itemId??e.itemId,streamId:t.streamId??e.streamId,toolCallId:t.toolCallId??e.toolCallId,permissionGroupKey:t.permissionGroupKey??e.permissionGroupKey,seq:t.seq??e.seq,executionMode:t.executionMode??e.executionMode}}return t}function _I(e,t,n=100){const r=uV(t),i=Zf(r),o=i?[...e].reverse().findIndex(d=>Zf(d)===i):-1,a=o>=0?e.length-1-o:e.length-1,u=e[a];return u?i&&typeof u.seq=="number"&&typeof r.seq=="number"&&r.seq<=u.seq?e:fV(u,r)?Ja([...e.slice(0,a),{...u,timestamp:r.timestamp},...e.slice(a+1)],n):dV(u,r)?Ja([...e.slice(0,a),mV(u,r),...e.slice(a+1)],n):Ja([...e,r],n):[r]}function kI(e,t=100){return(Array.isArray(e)?e:[]).reduce((n,r)=>_I(n,r,t),[])}function hV(e){return{timestamp:Number.isFinite(e.timestamp)?e.timestamp:Date.now(),type:e.type,workItemProjectionId:typeof e.workItemProjectionId=="string"&&e.workItemProjectionId?e.workItemProjectionId:void 0,workItemTurnType:typeof e.workItemTurnType=="string"&&e.workItemTurnType?e.workItemTurnType:void 0,workItemProjectionTitle:typeof e.workItemProjectionTitle=="string"&&e.workItemProjectionTitle?e.workItemProjectionTitle:void 0,runtimeTaskId:typeof e.runtimeTaskId=="string"&&e.runtimeTaskId?e.runtimeTaskId:void 0,executionTurnId:typeof e.executionTurnId=="string"&&e.executionTurnId?e.executionTurnId:void 0,roleName:typeof e.roleName=="string"&&e.roleName?e.roleName:void 0,detail:typeof e.detail=="string"&&e.detail?e.detail:void 0}}function SI(e,t){return e.type===t.type&&(e.workItemProjectionId??"")===(t.workItemProjectionId??"")&&(e.workItemTurnType??"")===(t.workItemTurnType??"")&&(e.workItemProjectionTitle??"")===(t.workItemProjectionTitle??"")&&(e.executionTurnId??e.runtimeTaskId??"")===(t.executionTurnId??t.runtimeTaskId??"")&&(e.roleName??"")===(t.roleName??"")}function pV(e,t){return t.timestamp-e.timestamp<=Am&&SI(e,t)&&(e.type==="thinking"||e.type==="tool_call")}function gV(e,t){return SI(e,t)&&(e.detail??"")===(t.detail??"")&&t.timestamp-e.timestamp<=Am}function xV(e,t){const n=t.type==="tool_call"?"tool_call":"thinking";return{...e,...t,timestamp:t.timestamp,detail:Gy(e.detail??"",t.detail??"",n)||void 0}}function wI(e,t,n=100){const r=hV(t),i=e[e.length-1];return i?gV(i,r)?Ja([...e.slice(0,-1),{...i,timestamp:r.timestamp}],n):pV(i,r)?Ja([...e.slice(0,-1),xV(i,r)],n):Ja([...e,r],n):[r]}function CI(e,t=100){return(Array.isArray(e)?e:[]).reduce((n,r)=>wI(n,r,t),[])}function qy(e){const t=String(e??"").trim().toLowerCase();return t==="company"?"company":t==="org"||t==="custom"?"org":"task"}function yV(e){return String(e??"").trim().toLowerCase()==="custom"?"custom":"corporate"}function jI(e){const t=String(e.execMode??"").trim().toLowerCase(),n=String(e.companyProfile??"").trim().toLowerCase(),r=String(e.orgId??"").trim(),o=t.length>0?qy(t):n==="custom"||r?"org":qy(t);return o==="org"?{...e,execMode:"org",companyProfile:"custom",orgId:r||void 0}:o==="company"?{...e,execMode:"company",companyProfile:"corporate",orgId:void 0}:{...e,execMode:"task",companyProfile:void 0,orgId:void Line truncated
`)),[O,M]=E.useState(!1),A=E.useRef(e.role_id);E.useEffect(()=>{A.current!==e.role_id&&(A.current=e.role_id,d(e.name),p(e.responsibility),g(e.reports_to),v(e.icon??null),S(new Set(e.can_spawn)),k(new Set(e.tools)),N(e.runtime_policy?.execution_strategy??"auto"),I(e.preferred_external_agent??null),T((e.prompt_refs??[]).join(`
`)),M(!1))},[e]);const $=E.useRef({}),Y=E.useRef(null),B=E.useRef(e.role_id);E.useEffect(()=>{B.current=e.role_id},[e.role_id]);const G=E.useCallback(()=>{Y.current&&(clearTimeout(Y.current),Y.current=null);const se=$.current;$.current={},Object.keys(se).length!==0&&i(B.current,se)},[i]),H=E.useCallback(se=>{r||($.current={...$.current,...se},Y.current&&clearTimeout(Y.current),Y.current=setTimeout(G,500))},[G,r]);E.useEffect(()=>()=>{Y.current&&(clearTimeout(Y.current),Y.current=null);const se=$.current;Object.keys(se).length>0&&($.current={},i(B.current,se))},[i]);const V=se=>{d(se),H({name:se})},W=se=>{p(se),H({responsibility:se})},Z=se=>{g(se),H({reports_to:se})},q=se=>{v(se),H({icon:se})},U=se=>{N(se),H({execution_strategy:se})},ee=se=>{I(se),H({preferred_external_agent:se})},P=se=>{T(se);const je=se.split(`
`).map(Se=>Se.trim()).filter(Boolean);H({prompt_refs:je})},K=se=>{const je=new Set(w);je.has(se)?je.delete(se):je.add(se),S(je),H({can_spawn:Array.from(je)})},J=se=>{const je=new Set(_);je.has(se)?je.delete(se):je.add(se),k(je),H({tools:Array.from(je)})},te=E.useMemo(()=>t.filter(se=>se.role_id!==e.role_id),[t,e.role_id]),re=E.useMemo(()=>n.filter(se=>(se.role_ids?.length?se.role_ids:[se.role_id]).includes(e.role_id)).length,[n,e.role_id]),oe=E.useMemo(()=>D.split(`
`).filter(se=>se.trim()).length,[D]),fe=()=>{if(!O){M(!0);return}G(),o(e.role_id)};return c.jsxs("aside",{className:"ri-panel","aria-label":`Inspector for role ${e.name}`,children:[c.jsxs("header",{className:"ri-panel-header",children:[c.jsx("img",{src:Su(y),alt:"",className:"ri-panel-icon"}),c.jsxs("div",{className:"ri-panel-title-wrap",children:[c.jsx("h3",{className:"ri-panel-title",children:u||"(unnamed)"}),c.jsx("code",{className:"ri-panel-id",children:e.role_id})]}),c.jsx("button",{className:"btn btn-ghost btn-sm ri-panel-close",onClick:a,title:"Close (Esc)",children:"✕"})]}),c.jsxs("div",{className:"ri-panel-body",children:[c.jsxs(Ba,{title:"Identity",defaultExpanded:!0,children:[c.jsx(ui,{label:"Name",children:c.jsx("input",{className:"ri-text-input",value:u,onChange:se=>V(se.target.value),disabled:r})}),c.jsx(ui,{label:"Responsibility",children:c.jsx("textarea",{className:"ri-textarea",rows:3,value:m,onChange:se=>W(se.target.value),disabled:r})}),c.jsx(ui,{label:"Icon",children:c.jsx(UV,{value:y,onChange:q,readOnly:r})})]}),c.jsxs(Ba,{title:"Hierarchy",defaultExpanded:!0,children:[c.jsx(ui,{label:"Reports to",children:c.jsxs("select",{className:"ri-select",value:h,onChange:se=>Z(se.target.value),disabled:r,children:[c.jsx("option",{value:"owner",children:"You (Owner)"}),te.map(se=>c.jsx("option",{value:se.role_id,children:se.name},se.role_id))]})}),c.jsx(ui,{label:"Can delegate to",children:c.jsx(GV,{allIds:te.map(se=>se.role_id),labelFor:se=>te.find(je=>je.role_id===se)?.name??se,selected:w,onToggle:K,readOnly:r})}),c.jsx(ui,{label:"Employees assigned",children:c.jsx("span",{className:"ri-meta-value",children:re})})]}),c.jsx(Ba,{title:`Tools (${_.size})`,children:c.jsx(qV,{tools:_,onToggle:J,readOnly:r})}),c.jsx(Ba,{title:`Prompts (${oe})`,children:c.jsx(ui,{label:"Prompt refs / inline",children:c.jsx("textarea",{className:"ri-textarea ri-textarea-mono",rows:5,placeholder:"One prompt ref or inline instruction per line",value:D,onChange:se=>P(se.target.value),disabled:r})})}),c.jsxs(Ba,{title:"Runtime policy",children:[c.jsx(ui,{label:"Execution strategy",children:c.jsx("div",{className:"ri-radio-group",children:FV.map(se=>c.jsxs("label",{className:"ri-radio",title:se.hint,children:[c.jsx("input",{type:"radio",name:`exec-strategy-${e.role_id}`,value:se.value,checked:C===se.value,onChange:()=>U(se.value),disabled:r}),se.label]},se.value))})}),C==="external"&&c.jsx(ui,{label:"Preferred external agent",children:c.jsxs("select",{className:"ri-select",value:L??"",onChange:se=>ee(se.target.value||null),disabled:r,children:[c.jsx("option",{value:"",children:"(any)"}),HV.map(se=>c.jsx("option",{value:se,children:se},se))]})})]}),c.jsxs(Ba,{title:"Advanced",children:[c.jsx(ui,{label:"Role type",children:c.jsx("span",{className:"ri-meta-value",children:e.role_type??"worker"})}),c.jsx(ui,{label:"Skills",children:c.jsx("span",{className:"ri-meta-value",children:e.skill_refs&&e.skill_refs.length>0?e.skill_refs.join(", "):"(none)"})}),c.jsx(ui,{label:"Artifact contract",children:c.jsx("span",{className:"ri-meta-value",children:e.artifact_contract_ref??"(none)"})})]})]}),!r&&c.jsx("footer",{className:"ri-panel-footer",children:c.jsx("button",{className:`btn btn-sm ${O?"btn-danger":"btn-ghost"}`,onClick:fe,onBlur:()=>M(!1),children:O?"Confirm delete?":"Delete role"})})]})}function Ba({title:e,defaultExpanded:t=!1,children:n}){const[r,i]=E.useState(t);return c.jsxs("section",{className:`ri-group${r?" is-expanded":""}`,children:[c.jsxs("button",{className:"ri-group-header",onClick:()=>i(o=>!o),children:[c.jsx("span",{className:"ri-group-caret",children:r?"▾":"▸"}),c.jsx("span",{className:"ri-group-title",children:e})]}),r&&c.jsx("div",{className:"ri-group-body",children:n})]})}function ui({label:e,children:t}){return c.jsxs("div",{className:"ri-field",children:[c.jsx("label",{className:"ri-field-label",children:e}),c.jsx("div",{className:"ri-field-control",children:t})]})}function UV({value:e,onChange:t,readOnly:n}){const[r,i]=E.useState(!1);return c.jsxs("div",{className:"ri-icon-picker",children:[c.jsxs("button",{className:"ri-icon-picker-trigger",onClick:()=>!n&&i(o=>!o),disabled:n,children:[c.jsx("img",{src:Su(e),alt:"",className:"ri-icon-picker-current"}),c.jsx("span",{className:"ri-icon-picker-label",children:e??"generic"})]}),r&&c.jsxs("div",{className:"ri-icon-picker-popover",children:[c.jsx("button",{className:`ri-icon-option${e===null?" is-active":""}`,onClick:()=>{t(null),i(!1)},title:"Default icon",children:c.jsx("img",{src:qc.generic,alt:""})}),BV.filter(o=>o!=="generic").map(o=>c.jsx("button",{className:`ri-icon-option${e===o?" is-active":""}`,onClick:()=>{t(o),i(!1)},title:o,children:c.jsx("img",{src:qc[o],alt:o})},o))]})]})}function GV({allIds:e,labelFor:t,selected:n,onToggle:r,readOnly:i}){const[o,a]=E.useState(!1),u=e.filter(d=>!n.has(d));return c.jsxs("div",{className:"ri-multiselect",children:[c.jsxs("div",{className:"ri-chips",children:[Array.from(n).map(d=>c.jsxs("span",{className:"ri-ch Line truncated
font-size: .6rem;
font-weight: bold;
color: hsl(${Math.max(0,Math.min(120-120*g,120))}deg 100% 31%);`,n?.key)}return i}}function pt(e,t,n,r){return{debug:()=>{var i;return(i=e?.debugAll)!=null?i:e[t]},key:!1,onChange:r}}function XV(e,t,n,r){const i=()=>{var a;return(a=o.getValue())!=null?a:e.options.renderFallbackValue},o={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:i,getContext:ht(()=>[e,n,t,o],(a,u,d,m)=>({table:a,column:u,row:d,cell:m,getValue:m.getValue,renderValue:m.renderValue}),pt(e.options,"debugCells"))};return e._features.forEach(a=>{a.createCell==null||a.createCell(o,n,t,e)},{}),o}function KV(e,t,n,r){var i,o;const u={...e._getDefaultColumnDef(),...t},d=u.accessorKey;let m=(i=(o=u.id)!=null?o:d?typeof String.prototype.replaceAll=="function"?d.replaceAll(".","_"):d.replace(/\./g,"_"):void 0)!=null?i:typeof u.header=="string"?u.header:void 0,p;if(u.accessorFn?p=u.accessorFn:d&&(d.includes(".")?p=g=>{let y=g;for(const w of d.split(".")){var v;y=(v=y)==null?void 0:v[w]}return y}:p=g=>g[u.accessorKey]),!m)throw new Error;let h={id:`${String(m)}`,accessorFn:p,parent:r,depth:n,columnDef:u,columns:[],getFlatColumns:ht(()=>[!0],()=>{var g;return[h,...(g=h.columns)==null?void 0:g.flatMap(y=>y.getFlatColumns())]},pt(e.options,"debugColumns")),getLeafColumns:ht(()=>[e._getOrderColumnsFn()],g=>{var y;if((y=h.columns)!=null&&y.length){let v=h.columns.flatMap(w=>w.getLeafColumns());return g(v)}return[h]},pt(e.options,"debugColumns"))};for(const g of e._features)g.createColumn==null||g.createColumn(h,e);return h}const br="debugHeaders";function cC(e,t,n){var r;let o={id:(r=n.id)!=null?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const a=[],u=d=>{d.subHeaders&&d.subHeaders.length&&d.subHeaders.map(u),a.push(d)};return u(o),a},getContext:()=>({table:e,header:o,column:t})};return e._features.forEach(a=>{a.createHeader==null||a.createHeader(o,e)}),o}const ZV={createTable:e=>{e.getHeaderGroups=ht(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>{var o,a;const u=(o=r?.map(h=>n.find(g=>g.id===h)).filter(Boolean))!=null?o:[],d=(a=i?.map(h=>n.find(g=>g.id===h)).filter(Boolean))!=null?a:[],m=n.filter(h=>!(r!=null&&r.includes(h.id))&&!(i!=null&&i.includes(h.id)));return Qd(t,[...u,...m,...d],e)},pt(e.options,br)),e.getCenterHeaderGroups=ht(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>(n=n.filter(o=>!(r!=null&&r.includes(o.id))&&!(i!=null&&i.includes(o.id))),Qd(t,n,e,"center")),pt(e.options,br)),e.getLeftHeaderGroups=ht(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var i;const o=(i=r?.map(a=>n.find(u=>u.id===a)).filter(Boolean))!=null?i:[];return Qd(t,o,e,"left")},pt(e.options,br)),e.getRightHeaderGroups=ht(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var i;const o=(i=r?.map(a=>n.find(u=>u.id===a)).filter(Boolean))!=null?i:[];return Qd(t,o,e,"right")},pt(e.options,br)),e.getFooterGroups=ht(()=>[e.getHeaderGroups()],t=>[...t].reverse(),pt(e.options,br)),e.getLeftFooterGroups=ht(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),pt(e.options,br)),e.getCenterFooterGroups=ht(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),pt(e.options,br)),e.getRightFooterGroups=ht(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),pt(e.options,br)),e.getFlatHeaders=ht(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),pt(e.options,br)),e.getLeftFlatHeaders=ht(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),pt(e.options,br)),e.getCenterFlatHeaders=ht(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),pt(e.options,br)),e.getRightFlatHeaders=ht(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),pt(e.options,br)),e.getCenterLeafHeaders=ht(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),pt(e.options,br)),e.getLeftLeafHeaders=ht(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),pt(e.options,br)),e.getRightLeafHeaders=ht(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),pt(e.options,br)),e.getLeafHeaders=ht(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var i,o,a,u,d,m;return[...(i=(o=t[0])==null?void 0:o.headers)!=null?i:[],...(a=(u=n[0])==null?void 0:u.headers)!=null?a:[],...(d=(m=r[0])==null?void 0:m.headers)!=null?d:[]].map(p=>p.getLeafHeaders()).flat()},pt(e.options,br))}};function Qd(e,t,n,r){var i,o;let a=0;const u=function(g,y){y===void 0&&(y=1),a=Math.max(a,y),g.filter(v=>v.getIsVisible()).forEach(v=>{var w;(w=v.columns)!=null&&w.length&&u(v.columns,y+1)},0)};u(e);let d=[];const m=(g,y)=>{const v={depth:y,id:[r,`${y}`].filter(Boolean).jo Line truncated
`).replace(`
`,`
+`).split(`
`)),p=m.reduce((h,g)=>h.concat(...g),[]);return[m,p]}return[[],[]]},[e]);return E.useEffect(()=>{const d=t?.target??t2,m=t?.actInsideInputWithModifier??!0;if(e!==null){const p=y=>{if(i.current=y.ctrlKey||y.metaKey||y.shiftKey||y.altKey,(!i.current||i.current&&!m)&&wT(y))return!1;const w=r2(y.code,u);if(o.current.add(y[w]),n2(a,o.current,!1)){const S=y.composedPath?.()?.[0]||y.target,_=S?.nodeName==="BUTTON"||S?.nodeName==="A";t.preventDefault!==!1&&(i.current||!_)&&y.preventDefault(),r(!0)}},h=y=>{const v=r2(y.code,u);n2(a,o.current,!0)?(r(!1),o.current.clear()):o.current.delete(y[v]),y.key==="Meta"&&o.current.clear(),i.current=!1},g=()=>{o.current.clear(),r(!1)};return d?.addEventListener("keydown",p),d?.addEventListener("keyup",h),window.addEventListener("blur",g),window.addEventListener("contextmenu",g),()=>{d?.removeEventListener("keydown",p),d?.removeEventListener("keyup",h),window.removeEventListener("blur",g),window.removeEventListener("contextmenu",g)}}},[e,r]),n}function n2(e,t,n){return e.filter(r=>n||r.length===t.size).some(r=>r.every(i=>t.has(i)))}function r2(e,t){return t.includes(e)?"code":"key"}const YX=()=>{const e=En();return E.useMemo(()=>({zoomIn:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,t):Promise.resolve(!1)},zoomOut:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,t):Promise.resolve(!1)},zoomTo:(t,n)=>{const{panZoom:r}=e.getState();return r?r.scaleTo(t,n):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{const{transform:[r,i,o],panZoom:a}=e.getState();return a?(await a.setViewport({x:t.x??r,y:t.y??i,zoom:t.zoom??o},n),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[t,n,r]=e.getState().transform;return{x:t,y:n,zoom:r}},setCenter:async(t,n,r)=>e.getState().setCenter(t,n,r),fitBounds:async(t,n)=>{const{width:r,height:i,minZoom:o,maxZoom:a,panZoom:u}=e.getState(),d=kv(t,r,i,o,a,n?.padding??.1);return u?(await u.setViewport(d,{duration:n?.duration,ease:n?.ease,interpolate:n?.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,n={})=>{const{transform:r,snapGrid:i,snapToGrid:o,domNode:a}=e.getState();if(!a)return t;const{x:u,y:d}=a.getBoundingClientRect(),m={x:t.x-u,y:t.y-d},p=n.snapGrid??i,h=n.snapToGrid??o;return Iu(m,r,h,p)},flowToScreenPosition:t=>{const{transform:n,domNode:r}=e.getState();if(!r)return t;const{x:i,y:o}=r.getBoundingClientRect(),a=am(t,n);return{x:a.x+i,y:a.y+o}}}),[])};function qT(e,t){const n=[],r=new Map,i=[];for(const o of e)if(o.type==="add"){i.push(o);continue}else if(o.type==="remove"||o.type==="replace")r.set(o.id,[o]);else{const a=r.get(o.id);a?a.push(o):r.set(o.id,[o])}for(const o of t){const a=r.get(o.id);if(!a){n.push(o);continue}if(a[0].type==="remove")continue;if(a[0].type==="replace"){n.push({...a[0].item});continue}const u={...o};for(const d of a)XX(d,u);n.push(u)}return i.length&&i.forEach(o=>{o.index!==void 0?n.splice(o.index,0,{...o.item}):n.push({...o.item})}),n}function XX(e,t){switch(e.type){case"select":{t.selected=e.selected;break}case"position":{typeof e.position<"u"&&(t.position=e.position),typeof e.dragging<"u"&&(t.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(t.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(t.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function WT(e,t){return qT(e,t)}function KX(e,t){return qT(e,t)}function zo(e,t){return{id:e,type:"select",selected:t}}function Wa(e,t=new Set,n=!1){const r=[];for(const[i,o]of e){const a=t.has(i);!(o.selected===void 0&&!a)&&o.selected!==a&&(n&&(o.selected=a),r.push(zo(o.id,a)))}return r}function i2({items:e=[],lookup:t}){const n=[],r=new Map(e.map(i=>[i.id,i]));for(const[i,o]of e.entries()){const a=t.get(o.id),u=a?.internals?.userNode??a;u!==void 0&&u!==o&&n.push({id:o.id,item:o,type:"replace"}),u===void 0&&n.push({item:o,type:"add",index:i})}for(const[i]of t)r.get(i)===void 0&&n.push({id:i,type:"remove"});return n}function s2(e){return{id:e.id,type:"remove"}}const o2=e=>vY(e),ZX=e=>gT(e);function YT(e){return E.forwardRef(e)}function a2(e){const[t,n]=E.useState(BigInt(0)),[r]=E.useState(()=>QX(()=>n(i=>i+BigInt(1))));return d0(()=>{const i=r.get();i.length&&(e(i),r.reset())},[t]),r}function QX(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const XT=E.createContext(null);function JX({children:e}){const t=En(),n=E.useCallback(u=>{const{nodes:d=[],setNodes:m,hasDefaultNodes:p,onNodesChange:h,nodeLookup:g,fitViewQueued:y,onNodesChangeMiddlewareMap:v}=t.getState();let w=d;for(const _ of u)w=typeof _=="function"?_(w):_;let S=i2({items:w,lookup:g});for(const _ of v.values())S=_(S);p&&m(w),S.length>0?h?.(S):y&&window.requestAnimationFrame(()=>{const{fitViewQueued:_,nodes:k,setNodes:C}=t.getState();_&&C(k)})},[]),r=a2(n),i=E.useCallback(u=>{const{edges:d=[],setEdges:m,hasDefaul Line truncated
M${T.x},${T.y}h${T.width}v${T.height}h${-T.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}_R.displayName="MiniMap";const $Z=E.memo(_R),HZ=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,FZ={[gl.Line]:"right",[gl.Handle]:"bottom-right"};function VZ({nodeId:e,position:t,variant:n=gl.Handle,className:r,style:i=void 0,children:o,color:a,minWidth:u=10,minHeight:d=10,maxWidth:m=Number.MAX_VALUE,maxHeight:p=Number.MAX_VALUE,keepAspectRatio:h=!1,resizeDirection:g,autoScale:y=!0,shouldResize:v,onResizeStart:w,onResize:S,onResizeEnd:_}){const k=QT(),C=typeof e=="string"?e:k,N=En(),L=E.useRef(null),I=n===gl.Handle,D=Vt(E.useCallback(HZ(I&&y),[I,y]),jn),T=E.useRef(null),O=t??FZ[n];E.useEffect(()=>{if(!(!L.current||!C))return T.current||(T.current=xX({domNode:L.current,nodeId:C,getStoreItems:()=>{const{nodeLookup:A,transform:$,snapGrid:Y,snapToGrid:B,nodeOrigin:G,domNode:H}=N.getState();return{nodeLookup:A,transform:$,snapGrid:Y,snapToGrid:B,nodeOrigin:G,paneDomNode:H}},onChange:(A,$)=>{const{triggerNodeChanges:Y,nodeLookup:B,parentLookup:G,nodeOrigin:H}=N.getState(),V=[],W={x:A.x,y:A.y},Z=B.get(C);if(Z&&Z.expandParent&&Z.parentId){const q=Z.origin??H,U=A.width??Z.measured.width??0,ee=A.height??Z.measured.height??0,P={id:Z.id,parentId:Z.parentId,rect:{width:U,height:ee,...kT({x:A.x??Z.position.x,y:A.y??Z.position.y},{width:U,height:ee},Z.parentId,B,q)}},K=Nv([P],B,G,H);V.push(...K),W.x=A.x?Math.max(q[0]*U,A.x):void 0,W.y=A.y?Math.max(q[1]*ee,A.y):void 0}if(W.x!==void 0&&W.y!==void 0){const q={id:C,type:"position",position:{...W}};V.push(q)}if(A.width!==void 0&&A.height!==void 0){const U={id:C,type:"dimensions",resizing:!0,setAttributes:g?g==="horizontal"?"width":"height":!0,dimensions:{width:A.width,height:A.height}};V.push(U)}for(const q of $){const U={...q,type:"position"};V.push(U)}Y(V)},onEnd:({width:A,height:$})=>{const Y={id:C,type:"dimensions",resizing:!1,dimensions:{width:A,height:$}};N.getState().triggerNodeChanges([Y])}})),T.current.update({controlPosition:O,boundaries:{minWidth:u,minHeight:d,maxWidth:m,maxHeight:p},keepAspectRatio:h,resizeDirection:g,onResizeStart:w,onResize:S,onResizeEnd:_,shouldResize:v}),()=>{T.current?.destroy()}},[O,u,d,m,p,h,w,S,_,v]);const M=O.split("-");return c.jsx("div",{className:Xn(["react-flow__resize-control","nodrag",...M,n,r]),ref:L,style:{...i,scale:D,...a&&{[I?"backgroundColor":"borderColor"]:a}},children:o})}E.memo(VZ);const UZ=E.memo(function({data:t}){const n=["oc-canvas-node",t.isOwner&&"is-owner",t.isSelected&&"is-selected",t.isDropTarget&&"is-drop-target"].filter(Boolean).join(" "),r=Su(t.icon);return c.jsxs("div",{className:n,children:[c.jsx(xl,{type:"target",position:lt.Top,className:"oc-canvas-handle"}),c.jsxs("div",{className:"oc-canvas-node-row",children:[c.jsx("div",{className:"oc-canvas-node-chip",children:c.jsx("span",{className:"oc-canvas-node-chip-icon",style:{WebkitMaskImage:`url("${r}")`,maskImage:`url("${r}")`},"aria-hidden":!0})}),c.jsxs("div",{className:"oc-canvas-node-text",children:[c.jsx("span",{className:"oc-canvas-node-name",children:t.name}),c.jsxs("div",{className:"oc-canvas-node-meta",children:[t.employeeNames.length>0?c.jsxs("span",{className:"oc-canvas-node-person",title:t.employeeNames.join(", "),children:[t.employeeNames[0],t.employeeNames.length>1?` +${t.employeeNames.length-1}`:""]}):c.jsx("span",{className:"oc-canvas-node-id",children:t.roleId}),t.employeeCount>0&&c.jsx("span",{className:"oc-canvas-node-badge",children:t.employeeCount})]})]})]}),c.jsx(xl,{type:"source",position:lt.Bottom,className:"oc-canvas-handle"})]})});var yx,v2;function Rv(){if(v2)return yx;v2=1;var e="\0",t="\0",n="";class r{_isDirected=!0;_isMultigraph=!1;_isCompound=!1;_label;_defaultNodeLabelFn=()=>{};_defaultEdgeLabelFn=()=>{};_nodes={};_in={};_preds={};_out={};_sucs={};_edgeObjs={};_edgeLabels={};_nodeCount=0;_edgeCount=0;_parent;_children;constructor(p){p&&(this._isDirected=Object.hasOwn(p,"directed")?p.directed:!0,this._isMultigraph=Object.hasOwn(p,"multigraph")?p.multigraph:!1,this._isCompound=Object.hasOwn(p,"compound")?p.compound:!1),this._isCompound&&(this._parent={},this._children={},this._children[t]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(p){return this._label=p,this}graph(){return this._label}setDefaultNodeLabel(p){return this._defaultNodeLabelFn=p,typeof p!="function"&&(this._defaultNodeLabelFn=()=>p),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var p=this;return this.nodes().filter(h=>Object.keys(p._in[h]).length===0)}sinks(){var p=this;return this.nodes().filter(h=>Object.keys(p._out[h]).length===0)}setNodes(p,h){var g=arguments,y=this;return p.forEach(function(v){g.length>1?y.setNode(v,h):y.setNode(v)}),this}setNode(p,h){return Object.hasOwn(this._nodes,p)?(arguments.length>1&&(this._nodes[p]=h),this):(this._nodes[p]=arguments.length>1?h:this._defaultNodeLabelFn(p),this._isCompound&&(this._parent[p Line truncated
${r}`}),c.jsx(TV,{projects:ei.projects,activeId:ei.activeProjectId,onSelect:Q=>{const z=pi(Q);t.current?.switchProject(Q,z)},onCreate:Q=>{t.current?.createProject(Q)},onDelete:Q=>t.current?.deleteProject(Q)})]}),c.jsxs("div",{className:"topbar-center",children:[c.jsxs("div",{className:"page-nav",children:[c.jsxs("button",{className:`page-nav-btn${O==="workspace"?" active":""}`,onClick:()=>M("workspace"),children:["Workspace",(()=>{const Q=Qn.channels.reduce((z,ne)=>z+Qn.getUnreadCount(ne.id),0);return Q>0?c.jsx("span",{className:"nav-unread-badge",children:Q>99?"99+":Q}):null})()]}),c.jsx("button",{className:`page-nav-btn${O==="office"?" active":""}`,onClick:()=>M("office"),children:"Office"}),c.jsx("button",{className:`page-nav-btn${O==="org"?" active":""}`,onClick:()=>M("org"),children:"Org"})]}),c.jsxs("div",{className:"stat-chips",children:[c.jsxs("span",{className:"stat-chip",children:[c.jsx("b",{children:Au.totalAgents})," agents"]}),c.jsxs("span",{className:"stat-chip",children:[c.jsx("b",{children:Au.totalSkills})," skills"]}),c.jsxs("span",{className:"stat-chip",children:[c.jsx("b",{children:ln.getOpenTaskCount()})," tasks"]})]})]}),c.jsxs("div",{className:"topbar-right",children:[c.jsxs("select",{className:"theme-select",value:lr,title:"Outdoor lighting override",onChange:Q=>{const z=Q.target.value;Sn(z);try{z==="auto"?(localStorage.removeItem("opc_outdoor_override"),localStorage.removeItem("opc_outdoor_day"),localStorage.removeItem("opc_outdoor_night")):(localStorage.setItem("opc_outdoor_override",z),localStorage.removeItem("opc_outdoor_day"),localStorage.removeItem("opc_outdoor_night"))}catch{}e.current.syncOutdoorLighting()},children:[c.jsx("option",{value:"auto",children:"Outdoor auto"}),c.jsx("option",{value:"day",children:"Outdoor day"}),c.jsx("option",{value:"night",children:"Outdoor night"})]}),c.jsxs("select",{className:"theme-select",value:C,onChange:Q=>N(Q.target.value),children:[c.jsx("option",{value:"midnight",children:"Midnight"}),c.jsx("option",{value:"neon",children:"Neon"}),c.jsx("option",{value:"paper",children:"Paper"}),c.jsx("option",{value:"retro",children:"Retro"}),c.jsx("option",{value:"terminal",children:"Terminal"}),c.jsx("option",{value:"cozy",children:"Cozy"}),c.jsx("option",{value:"openopc",children:"OpenOPC"})]}),c.jsx("button",{className:`icon-btn ${Y?"active":""}`,onClick:()=>B(Q=>!Q),title:"Developer Tools",children:c.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[c.jsx("path",{d:"M5.5 2L2 5.5 5.5 9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),c.jsx("path",{d:"M10.5 7L14 10.5 10.5 14",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})})]})]}),O==="workspace"&&c.jsx(nV,{boardStore:ln,chatStore:Qn,sessionStore:St,agents:A,officeMap:gi,execMode:V,companyProfile:Z,taskPreferredAgent:U,projectId:ei.activeProjectId,orgInfoData:P,onNavigateToOrg:()=>M("org"),savedOrgsList:Ue,activeSavedOrg:vt,onSavedOrgsList:Cl,onSavedOrgLoad:jl,recoveryStatus:J,onRecoveryResume:Q=>t.current?.recoveryAction(st(),"resume",Q),onRecoveryCancel:Q=>t.current?.recoveryAction(st(),"cancel",Q),commsState:re,commsMessage:fe,onCommsRefresh:Q=>{const{project_id:z,...ne}=Q??{};t.current?.commsState(st(),ne)},onCommsReadMessage:Q=>t.current?.commsReadMessage(st(),Q),onRunTask:(Q,z,ne,le,ge)=>{t.current?.send({type:"run_task",project_id:st(),task_id:Q,title:z,description:ne,mode:le,profile:ge})},onCreateTask:(Q,z,ne,le)=>{t.current?.send({type:"kanban_create_task",project_id:st(),title:Q,board_id:z,column_id:ne,task_id:le})},onMoveTask:(Q,z)=>{t.current?.send({type:"kanban_move_task",project_id:st(),task_id:Q,column_id:z})},onCreateSession:()=>{if($t.current||Te.current)return;const Q=st();vn(Q),t.current?.createSession(Q,void 0,V,my(V),U,Do(V,vt))},onSessionSend:(Q,z,ne,le)=>t.current?.sessionSend(st(),Q,z,ne,le),onSecretarySend:Q=>t.current?.secretarySend(st(),Q),onDeleteSession:Q=>t.current?.deleteSession(st(),Q),onTitleChange:(Q,z)=>t.current?.sessionUpdateTitle(st(),Q,z),onSessionConfigChange:Du,onSessionTaskAgentChange:ta,onContinueInNewChat:na,onSessionStop:gr,onSessionResume:es,onSessionComplete:Q=>t.current?.sessionComplete(st(),Q),onLoadSessionDetail:(Q,z)=>t.current?.sessionDetail(st(),Q,{...z,include:z?.detailLevel==="full"?["messages","session_state","progress","work_items","runtime_context"]:["messages","session_state"],viewGeneration:Jt.current}),onOpenExecutionPanel:Q=>Tt(Q),onCollabSync:()=>t.current?.collabSync(st(),void 0,Jt.current)}),O==="org"&&c.jsx("div",{className:"org-page",children:c.jsx(JQ,{data:P,sessionRecruitmentByRole:fo,talents:je,employeeDetail:We,reorgProposals:gt,isCustomMode:yi,onRequestData:()=>t.current?.orgInfo(),onRequestTalents:()=>t.current?.talentList(),onRequestEmployeeDetail:Q=>t.current?.employeeDetail(Q),onHireTalent:(Q,z)=>{Kn(Q),t.current?.talentHire(Q,z,void 0,P?.organization_id||vt||void 0)},hiringTemplateId:yt,onImportEmployee:Q=>t.current?. Line truncated
Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

@@ -0,0 +1,68 @@
function Mt(dt){return dt&&dt.__esModule&&Object.prototype.hasOwnProperty.call(dt,"default")?dt.default:dt}var yt={exports:{}},Pt=yt.exports,Ct;function Rt(){return Ct||(Ct=1,(function(dt,At){(function(Tt,xt){dt.exports=xt()})(Pt,()=>(()=>{var St={50792:(p=>{var S=Object.prototype.hasOwnProperty,t="~";function d(){}Object.create&&(d.prototype=Object.create(null),new d().__proto__||(t=!1));function c(e,s,o){this.fn=e,this.context=s,this.once=o||!1}function h(e,s,o,i,a){if(typeof o!="function")throw new TypeError("The listener must be a function");var l=new c(o,i||e,a),f=t?t+s:s;return e._events[f]?e._events[f].fn?e._events[f]=[e._events[f],l]:e._events[f].push(l):(e._events[f]=l,e._eventsCount++),e}function r(e,s){--e._eventsCount===0?e._events=new d:delete e._events[s]}function n(){this._events=new d,this._eventsCount=0}n.prototype.eventNames=function(){var s=[],o,i;if(this._eventsCount===0)return s;for(i in o=this._events)S.call(o,i)&&s.push(t?i.slice(1):i);return Object.getOwnPropertySymbols?s.concat(Object.getOwnPropertySymbols(o)):s},n.prototype.listeners=function(s){var o=t?t+s:s,i=this._events[o];if(!i)return[];if(i.fn)return[i.fn];for(var a=0,l=i.length,f=new Array(l);a<l;a++)f[a]=i[a].fn;return f},n.prototype.listenerCount=function(s){var o=t?t+s:s,i=this._events[o];return i?i.fn?1:i.length:0},n.prototype.emit=function(s,o,i,a,l,f){var u=t?t+s:s;if(!this._events[u])return!1;var v=this._events[u],m=arguments.length,x,g;if(v.fn){switch(v.once&&this.removeListener(s,v.fn,void 0,!0),m){case 1:return v.fn.call(v.context),!0;case 2:return v.fn.call(v.context,o),!0;case 3:return v.fn.call(v.context,o,i),!0;case 4:return v.fn.call(v.context,o,i,a),!0;case 5:return v.fn.call(v.context,o,i,a,l),!0;case 6:return v.fn.call(v.context,o,i,a,l,f),!0}for(g=1,x=new Array(m-1);g<m;g++)x[g-1]=arguments[g];v.fn.apply(v.context,x)}else{var y=v.length,T;for(g=0;g<y;g++)switch(v[g].once&&this.removeListener(s,v[g].fn,void 0,!0),m){case 1:v[g].fn.call(v[g].context);break;case 2:v[g].fn.call(v[g].context,o);break;case 3:v[g].fn.call(v[g].context,o,i);break;case 4:v[g].fn.call(v[g].context,o,i,a);break;default:if(!x)for(T=1,x=new Array(m-1);T<m;T++)x[T-1]=arguments[T];v[g].fn.apply(v[g].context,x)}}return!0},n.prototype.on=function(s,o,i){return h(this,s,o,i,!1)},n.prototype.once=function(s,o,i){return h(this,s,o,i,!0)},n.prototype.removeListener=function(s,o,i,a){var l=t?t+s:s;if(!this._events[l])return this;if(!o)return r(this,l),this;var f=this._events[l];if(f.fn)f.fn===o&&(!a||f.once)&&(!i||f.context===i)&&r(this,l);else{for(var u=0,v=[],m=f.length;u<m;u++)(f[u].fn!==o||a&&!f[u].once||i&&f[u].context!==i)&&v.push(f[u]);v.length?this._events[l]=v.length===1?v[0]:v:r(this,l)}return this},n.prototype.removeAllListeners=function(s){var o;return s?(o=t?t+s:s,this._events[o]&&r(this,o)):(this._events=new d,this._eventsCount=0),this},n.prototype.off=n.prototype.removeListener,n.prototype.addListener=n.prototype.on,n.prefixed=t,n.EventEmitter=n,p.exports=n}),11517:((p,S,t)=>{var d=t(38829),c=function(h,r,n,e){for(var s=h[0],o=1;o<h.length;o++){var i=h[o];d(i,s,r,n,e),s=i}return h};p.exports=c}),80318:((p,S,t)=>{var d=t(66979),c=function(h,r,n,e,s){return d(h,"angle",r,n,e,s)};p.exports=c}),60757:(p=>{var S=function(t,d,c){for(var h=0;h<t.length;h++){var r=t[h];d.call(c,r)}return t};p.exports=S}),69927:(p=>{var S=function(t,d,c){c===void 0&&(c=0);for(var h=c;h<t.length;h++){var r=t[h],n=!0;for(var e in d)r[e]!==d[e]&&(n=!1);if(n)return r}return null};p.exports=S}),32265:(p=>{var S=function(t,d,c){c===void 0&&(c=0);for(var h=t.length-1;h>=c;h--){var r=t[h],n=!0;for(var e in d)r[e]!==d[e]&&(n=!1);if(n)return r}return null};p.exports=S}),94420:((p,S,t)=>{var d=t(11879),c=t(60461),h=t(95540),r=t(29747),n=t(41481),e=new n({sys:{queueDepthSort:r,events:{once:r}}},0,0,1,1).setOrigin(0,0),s=function(o,i){i===void 0&&(i={});var a=i.hasOwnProperty("width"),l=i.hasOwnProperty("height"),f=h(i,"width",-1),u=h(i,"height",-1),v=h(i,"cellWidth",1),m=h(i,"cellHeight",v),x=h(i,"position",c.TOP_LEFT),g=h(i,"x",0),y=h(i,"y",0),T=0,C=0,E=f*v,M=u*m;e.setPosition(g,y),e.setSize(v,m);for(var P=0;P<o.length;P++)if(d(o[P],e,x),a&&f===-1)e.x+=v;else if(l&&u===-1)e.y+=m;else if(l&&!a){if(C+=m,e.y+=m,C===M&&(C=0,T+=v,e.y=y,e.x+=v,T===E))break}else if(T+=v,e.x+=v,T===E&&(T=0,C+=m,e.x=g,e.y+=m,C===M))break;return o};p.exports=s}),41721:((p,S,t)=>{var d=t(66979),c=function(h,r,n,e,s){return d(h,"alpha",r,n,e,s)};p.exports=c}),67285:((p,S,t)=>{var d=t(66979),c=function(h,r,n,e,s){return d(h,"x",r,n,e,s)};p.exports=c}),9074:((p,S,t)=>{var d=t(66979),c=function(h,r,n,e,s,o,i){return n==null&&(n=r),d(h,"x",r,e,o,i),d(h,"y",n,s,o,i)};p.exports=c}),75222:((p,S,t)=>{var d=t(66979),c=function(h,r,n,e,s){return d(h,"y",r,n,e,s)};p.exports=c}),22983:(p=>{var S=function(t,d,c,h){c===void 0&&(c=0),h===void 0&&(h=6.28);for(var r=c,n=(h-c)/t.length,e=d.x,s=d.y,o=d.radius,i=0;i<t.length;i++)t[i].x=e+o*Math.cos(r),t[i].y=s+o*Math.sin(r),r+=n;return t};p.exports=S}),95253:(p=>Line truncated
`)),(!e||e==="")&&(e=["precision mediump float;","uniform mat4 uProjectionMatrix;","uniform mat4 uViewMatrix;","uniform vec2 uResolution;","attribute vec2 inPosition;","varying vec2 fragCoord;","varying vec2 outTexCoord;","void main () {"," gl_Position = uProjectionMatrix * uViewMatrix * vec4(inPosition, 1.0, 1.0);"," fragCoord = vec2(inPosition.x, uResolution.y - inPosition.y);"," outTexCoord = vec2(inPosition.x / uResolution.x, fragCoord.y / uResolution.y);","}"].join(`
`)),s===void 0&&(s=null),this.key=r,this.fragmentSrc=n,this.vertexSrc=e,this.uniforms=s}});p.exports=c}),40366:(p=>{var S=function(t,d){var c;if(d)typeof d=="string"?c=document.getElementById(d):typeof d=="object"&&d.nodeType===1&&(c=d);else if(t.parentElement||d===null)return t;return c||(c=document.body),c.appendChild(t),t};p.exports=S}),83719:((p,S,t)=>{var d=t(40366),c=function(h){var r=h.config;if(!(!r.parent||!r.domCreateContainer)){var n=document.createElement("div");n.style.cssText=["display: block;","width: "+h.scale.width+"px;","height: "+h.scale.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: "+r.domPointerEvents+";","transform: scale(1);","transform-origin: left top;"].join(" "),h.domContainer=n,d(n,r.parent)}};p.exports=c}),57264:((p,S,t)=>{var d=t(25892),c=function(h){if(document.readyState==="complete"||document.readyState==="interactive"){h();return}var r=function(){document.removeEventListener("deviceready",r,!0),document.removeEventListener("DOMContentLoaded",r,!0),window.removeEventListener("load",r,!0),h()};document.body?d.cordova?document.addEventListener("deviceready",r,!1):(document.addEventListener("DOMContentLoaded",r,!0),window.addEventListener("load",r,!0)):window.setTimeout(r,20)};p.exports=c}),57811:(p=>{var S=function(t){if(!t)return window.innerHeight;var d=Math.abs(window.orientation),c={w:0,h:0},h=document.createElement("div");return h.setAttribute("style","position: fixed; height: 100vh; width: 0; top: 0"),document.documentElement.appendChild(h),c.w=d===90?h.offsetHeight:window.innerWidth,c.h=d===90?window.innerWidth:h.offsetHeight,document.documentElement.removeChild(h),h=null,Math.abs(window.orientation)!==90?c.h:c.w};p.exports=S}),45818:((p,S,t)=>{var d=t(13560),c=function(h,r){var n=window.screen,e=n?n.orientation||n.mozOrientation||n.msOrientation:!1;if(e&&typeof e.type=="string")return e.type;if(typeof e=="string")return e;if(typeof window.orientation=="number")return window.orientation===0||window.orientation===180?d.ORIENTATION.PORTRAIT:d.ORIENTATION.LANDSCAPE;if(window.matchMedia){if(window.matchMedia("(orientation: portrait)").matches)return d.ORIENTATION.PORTRAIT;if(window.matchMedia("(orientation: landscape)").matches)return d.ORIENTATION.LANDSCAPE}else return r>h?d.ORIENTATION.PORTRAIT:d.ORIENTATION.LANDSCAPE};p.exports=c}),74403:(p=>{var S=function(t){var d;return t!==""&&(typeof t=="string"?d=document.getElementById(t):t&&t.nodeType===1&&(d=t)),d||(d=document.body),d};p.exports=S}),56836:(p=>{var S=function(t){var d="";try{if(window.DOMParser){var c=new DOMParser;d=c.parseFromString(t,"text/xml")}else d=new ActiveXObject("Microsoft.XMLDOM"),d.loadXML(t)}catch{d=null}return!d||!d.documentElement||d.getElementsByTagName("parsererror").length?null:d};p.exports=S}),35846:(p=>{var S=function(t){t.parentNode&&t.parentNode.removeChild(t)};p.exports=S}),43092:((p,S,t)=>{var d=t(83419),c=t(29747),h=new d({initialize:function(){this.isRunning=!1,this.callback=c,this.isSetTimeOut=!1,this.timeOutID=null,this.delay=0;var n=this;this.step=function e(s){n.callback(s),n.isRunning&&(n.timeOutID=window.requestAnimationFrame(e))},this.stepTimeout=function e(){n.isRunning&&(n.timeOutID=window.setTimeout(e,n.delay)),n.callback(window.performance.now())}},start:function(r,n,e){this.isRunning||(this.callback=r,this.isSetTimeOut=n,this.delay=e,this.isRunning=!0,this.timeOutID=n?window.setTimeout(this.stepTimeout,0):window.requestAnimationFrame(this.step))},stop:function(){this.isRunning=!1,this.isSetTimeOut?clearTimeout(this.timeOutID):window.cancelAnimationFrame(this.timeOutID)},destroy:function(){this.stop(),this.callback=c}});p.exports=h}),84902:((p,S,t)=>{var d={AddToDOM:t(40366),DOMContentLoaded:t(57264),GetInnerHeight:t(57811),GetScreenOrientation:t(45818),GetTarget:t(74403),ParseXML:t(56836),RemoveFromDOM:t(35846),RequestAnimationFrame:t(43092)};p.exports=d}),47565:((p,S,t)=>{var d=t(83419),c=t(50792),h=t(37277),r=new d({Extends:c,initialize:function(){c.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});h.register("EventEmitter",r,"events"),p.exports=r}),93055:((p,S,t)=>{p.exports={EventEmitter:t(47565)}}),20122:((p,S,t)=>{var d=t(83419),c=t(72898),h=t(14811),r=new d({Extends:c,initialize:function(e,s){s===void 0&&(s=1),c.call(this,h.BARREL,e),this.amount=s}});p.exports=r}),32251:((p,S,t)=>{var d=t(83419),c=t(72898),h=t(14811),r=new d({Extends:c,initialize:function(e,s,o,i,a,l,f){o===void 0&&(o=1),i===void 0&&(i=1),a===void 0&&(a=1),l===void 0&&(l=1),f===void 0&&(f=4),c.call(this,h.BLOOM,e),this.steps=f,this.offsetX=o,this.offsetY=i,this.blurStrength=a,this.strength=l,this.glcolor=[1,1,1],s!=null&&(this.color=s)},color:{get:function(){var n=this.glcolor;return(n[0]*255<<16)+(n[1]*255<<8)+(n[2]*255|0)},set:function(n){var e=this.glcolor;e[0]=(n>>16&255)/255,e[1]=(n>>8&255)/255,e[2]=(n&255)/255}}});p.exports=r}),9047:((p,S,t)=>{var d=t(83419),c=t(72898),h=t(14811),r=new d( Line truncated
`);var W=[];for(L=0;L<O.length;L++){var H=O[L],K="",b="",J="",$="";for(G=0;G<H.length;G++)if(y=H.charCodeAt(G),K+=H[G],y===s||G===H.length-1){$=J+K;var Z=Y($,t.fontData);Z<=e?J=$:(b=b.slice(0,-1),b+=(b?`
`:"")+J,J=K),K=""}b=b.slice(0,-1),b+=(b?`
`:"")+J,W.push(b)}r=W.join(`
`),h.wrappedText=r,n=r.length}var q=0;for(L=0;L<n;L++){if(y=r.charCodeAt(L),y===10){V!==null&&(X.push({word:V.word,i:V.i,x:V.x*A,y:V.y*R,w:V.w*A,h:V.h*R}),V=null),F=null,I[D]=B,B>N&&(N=B),B<U&&(U=B),D++,B=0,x=0,g=(u+m)*D;continue}if(T=f[y],!!T){if(E=x,M=g,F!==null){var _=T.kerning[w];E+=_!==void 0?_:0}o>E&&(o=E),i>M&&(i=M);var tt=E+T.xAdvance,Q=M+u;a<tt&&(a=tt),l<Q&&(l=Q);var j=T.xOffset+T.xAdvance+(_!==void 0?_:0);y===s?V!==null&&(X.push({word:V.word,i:V.i,x:V.x*A,y:V.y*R,w:V.w*A,h:V.h*R}),V=null):(V===null&&(V={word:"",i:q,x,y:g,w:0,h:u}),V.word=V.word.concat(r[L]),V.w+=j),z.push({i:q,idx:L,char:r[L],code:y,x:(T.xOffset+E)*P,y:(T.yOffset+g)*P,w:T.width*P,h:T.height*P,t:g*P,r:tt*P,b:u*P,line:D,glyph:T}),x+=T.xAdvance+v+(_!==void 0?_:0),F=T,w=y,B=tt*P,q++}}if(V!==null&&X.push({word:V.word,i:V.i,x:V.x*A,y:V.y*R,w:V.w*A,h:V.h*R}),I[D]=B,B>N&&(N=B),B<U&&(U=B),C>0)for(var k=0;k<z.length;k++){var et=z[k];if(C===1){var nt=(N-I[et.line])/2;et.x+=nt,et.r+=nt}else if(C===2){var at=N-I[et.line];et.x+=at,et.r+=at}}var it=h.local,st=h.global;return O=h.lines,it.x=o*P,it.y=i*P,it.width=a*P,it.height=l*P,st.x=t.x-t._displayOriginX+o*A,st.y=t.y-t._displayOriginY+i*R,st.width=a*A,st.height=l*R,O.shortest=U,O.longest=N,O.lengths=I,d&&(it.x=Math.ceil(it.x),it.y=Math.ceil(it.y),it.width=Math.ceil(it.width),it.height=Math.ceil(it.height),st.x=Math.ceil(st.x),st.y=Math.ceil(st.y),st.width=Math.ceil(st.width),st.height=Math.ceil(st.height),O.shortest=Math.ceil(U),O.longest=Math.ceil(N)),c&&(t._displayOriginX=t.originX*it.width,t._displayOriginY=t.originY*it.height,st.x=t.x-t._displayOriginX*t.scaleX,st.y=t.y-t._displayOriginY*t.scaleY,d&&(st.x=Math.ceil(st.x),st.y=Math.ceil(st.y))),h.words=X,h.characters=z,h.lines.height=u,h.scale=P,h.scaleX=t.scaleX,h.scaleY=t.scaleY,h};p.exports=S}),61327:((p,S,t)=>{var d=t(21859),c=function(h,r,n,e,s,o,i){var a=h.sys.textures.get(n),l=a.get(e),f=h.sys.cache.xml.get(s);if(l&&f){var u=d(f,l,o,i,a);return h.sys.cache.bitmapFont.add(r,{data:u,texture:n,frame:e,fromAtlas:!0}),!0}else return!1};p.exports=c}),6925:((p,S,t)=>{var d=t(35154),c=function(h,r){var n=r.width,e=r.height,s=Math.floor(n/2),o=Math.floor(e/2),i=d(r,"chars","");if(i!==""){var a=d(r,"image",""),l=h.sys.textures.getFrame(a),f=l.cutX,u=l.cutY,v=l.source.width,m=l.source.height,x=d(r,"offset.x",0),g=d(r,"offset.y",0),y=d(r,"spacing.x",0),T=d(r,"spacing.y",0),C=d(r,"lineSpacing",0),E=d(r,"charsPerRow",null);E===null&&(E=v/n,E>i.length&&(E=i.length));for(var M=x,P=g,A={retroFont:!0,font:a,size:n,lineHeight:e+C,chars:{}},R=0,F=0;F<i.length;F++){var w=i.charCodeAt(F),I=(f+M)/v,U=(u+P)/m,N=(f+M+n)/v,D=(u+P+e)/m;A.chars[w]={x:M,y:P,width:n,height:e,centerX:s,centerY:o,xOffset:0,yOffset:0,xAdvance:n,data:{},kerning:{},u0:I,v0:U,u1:N,v1:D},R++,R===E?(R=0,M=x,P+=e+T):M+=n+y}var B={data:A,frame:null,texture:a};return B}};p.exports=c}),21859:(p=>{function S(d,c){return parseInt(d.getAttribute(c),10)}var t=function(d,c,h,r,n){h===void 0&&(h=0),r===void 0&&(r=0);var e=c.cutX,s=c.cutY,o=c.source.width,i=c.source.height,a=c.sourceIndex,l={},f=d.getElementsByTagName("info")[0],u=d.getElementsByTagName("common")[0];l.font=f.getAttribute("face"),l.size=S(f,"size"),l.lineHeight=S(u,"lineHeight")+r,l.chars={};var v=d.getElementsByTagName("char"),m=c!==void 0&&c.trimmed;if(m)var x=c.height,g=c.width;for(var y=0;y<v.length;y++){var T=v[y],C=S(T,"id"),E=String.fromCharCode(C),M=S(T,"x"),P=S(T,"y"),A=S(T,"width"),R=S(T,"height");m&&(M<g&&(g=M),P<x&&(x=P)),m&&x!==0&&g!==0&&(M-=c.x,P-=c.y);var F=(e+M)/o,w=(s+P)/i,I=(e+M+A)/o,U=(s+P+R)/i;if(l.chars[C]={x:M,y:P,width:A,height:R,centerX:Math.floor(A/2),centerY:Math.floor(R/2),xOffset:S(T,"xoffset"),yOffset:S(T,"yoffset"),xAdvance:S(T,"xadvance")+h,data:{},kerning:{},u0:F,v0:w,u1:I,v1:U},n&&A!==0&&R!==0){var N=n.add(E,a,M,P,A,R);N&&N.setUVs(A,R,F,w,I,U)}}var D=d.getElementsByTagName("kerning");for(y=0;y<D.length;y++){var B=D[y],L=S(B,"first"),G=S(B,"second"),O=S(B,"amount");l.chars[G].kerning[L]=O}return l};p.exports=t}),196:((p,S,t)=>{var d=t(87662),c=t(79291),h={Parse:t(6925)};h=c(!1,h,d),p.exports=h}),87662:(p=>{var S={TEXT_SET1:" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",TEXT_SET2:` !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ`,TEXT_SET3:"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",TEXT_SET4:"ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789",TEXT_SET5:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789",TEXT_SET6:`ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789"(),-.' `,TEXT_SET7:`AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW")28FLRX-'39`,TEXT_SET8:"0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET9:`ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'"?!`,TEXT_SET10:"ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET11:`ABCDEFGHIJKLMNOPQRSTUVWXYZ.,"-+!?()':;0123456789`};p.exports=S}),2638:((p,S,t)=>{var d=t(22186),c=t(83419),h=t(12310),r=new c({Extends:d,Mixins:[h],initialize:function(e,s,o,i,a,l,f){d.call(this,e,s,o,i,a,l,f),this.type="DynamicBitmapText",this.scrollX=0,this.scrollY=0,this.cro Line truncated
`)),l!==this.text&&(this._text=l.toString(),this._dirty=!0,this.updateDisplayOrigin()),this},setDropShadow:function(l,f,u,v){return l===void 0&&(l=0),f===void 0&&(f=0),u===void 0&&(u=0),v===void 0&&(v=.5),this.dropShadowX=l,this.dropShadowY=f,this.dropShadowColor=u,this.dropShadowAlpha=v,this},setCharacterTint:function(l,f,u,v,m,x,g){l===void 0&&(l=0),f===void 0&&(f=1),u===void 0&&(u=!1),v===void 0&&(v=-1),m===void 0&&(m=v,x=v,g=v);var y=this.text.length;f===-1&&(f=y),l<0&&(l=y+l),l=c(l,0,y-1);for(var T=c(l+f,l,y),C=this.charColors,E=l;E<T;E++){var M=C[E];if(v===-1)C[E]=null;else{var P=u?1:0;M?(M.tintEffect=P,M.tintTL=v,M.tintTR=m,M.tintBL=x,M.tintBR=g):C[E]={tintEffect:P,tintTL:v,tintTR:m,tintBL:x,tintBR:g}}}return this},setWordTint:function(l,f,u,v,m,x,g){f===void 0&&(f=1);for(var y=this.getTextBounds(),T=y.words,C=typeof l=="number",E=0,M=0;M<T.length;M++){var P=T[M];if((C&&M===l||!C&&P.word===l)&&(this.setCharacterTint(P.i,P.word.length,u,v,m,x,g),E++,E===f))return this}return this},getTextBounds:function(l){var f=this._bounds;return(this._dirty||l||this.scaleX!==f.scaleX||this.scaleY!==f.scaleY)&&(n(this,l,!0,f),this._dirty=!1),f},getCharacterAt:function(l,f,u){for(var v=this.getLocalPoint(l,f,null,u),m=this.getTextBounds(),x=m.characters,g=new o,y=0;y<x.length;y++){var T=x[y];if(g.setTo(T.x,T.t,T.r-T.x,T.b),g.contains(v.x,v.y))return T}return null},updateDisplayOrigin:function(){return this._dirty=!0,this.getTextBounds(!1),this},setFont:function(l,f,u){f===void 0&&(f=this._fontSize),u===void 0&&(u=this._align);var v=this.scene.sys.cache.bitmapFont.get(l);return v&&(this.font=l,this.fontData=v.data,this._fontSize=f,this._align=u,this.fromAtlas=v.fromAtlas===!0,this.setTexture(v.texture,v.frame),n(this,!1,!0,this._bounds)),this},setMaxWidth:function(l,f){return this._maxWidth=l,this._dirty=!0,f!==void 0&&(this.wordWrapCharCode=f),this},setDisplaySize:function(l,f){this.setScale(1,1),this.getTextBounds(!1);var u=l/this.width,v=f/this.height;return this.setScale(u,v),this},align:{set:function(l){this._align=l,this._dirty=!0},get:function(){return this._align}},text:{set:function(l){this.setText(l)},get:function(){return this._text}},fontSize:{set:function(l){this._fontSize=l,this._dirty=!0},get:function(){return this._fontSize}},letterSpacing:{set:function(l){this._letterSpacing=l,this._dirty=!0},get:function(){return this._letterSpacing}},lineSpacing:{set:function(l){this._lineSpacing=l,this._dirty=!0},get:function(){return this._lineSpacing}},maxWidth:{set:function(l){this._maxWidth=l,this._dirty=!0},get:function(){return this._maxWidth}},width:{get:function(){return this.getTextBounds(!1),this._bounds.global.width}},height:{get:function(){return this.getTextBounds(!1),this._bounds.global.height}},displayWidth:{set:function(l){this.setScaleX(1),this.getTextBounds(!1);var f=l/this.width;this.setScaleX(f)},get:function(){return this.width}},displayHeight:{set:function(l){this.setScaleY(1),this.getTextBounds(!1);var f=l/this.height;this.setScaleY(f)},get:function(){return this.height}},toJSON:function(){var l=h.ToJSON(this),f={font:this.font,text:this.text,fontSize:this.fontSize,letterSpacing:this.letterSpacing,lineSpacing:this.lineSpacing,align:this.align};return l.data=f,l},preDestroy:function(){this.charColors.length=0,this._bounds=null,this.fontData=null}});a.ALIGN_LEFT=0,a.ALIGN_CENTER=1,a.ALIGN_RIGHT=2,a.ParseFromAtlas=e,a.ParseXMLBitmapFont=s,p.exports=a}),37289:((p,S,t)=>{var d=t(20926),c=function(h,r,n,e){var s=r._text,o=s.length,i=h.currentContext;if(!(o===0||!d(h,i,r,n,e))){n.addToRenderList(r);var a=r.fromAtlas?r.frame:r.texture.frames.__BASE,l=r.fontData.chars,f=r.fontData.lineHeight,u=r._letterSpacing,v=r._lineSpacing,m=0,x=0,g=0,y=null,T=0,C=0,E=0,M=0,P=0,A=0,R=null,F=0,w=a.source.image,I=a.cutX,U=a.cutY,N=r._fontSize/r.fontData.size,D=r._align,B=0,L=0,G=r.getTextBounds(!1);r.maxWidth>0&&(s=G.wrappedText,o=s.length);var O=r._bounds.lines;D===1?L=(O.longest-O.lengths[0])/2:D===2&&(L=O.longest-O.lengths[0]),i.translate(-r.displayOriginX,-r.displayOriginY);for(var X=n.roundPixels,z=0;z<o;z++){if(g=s.charCodeAt(z),g===10){B++,D===1?L=(O.longest-O.lengths[B])/2:D===2&&(L=O.longest-O.lengths[B]),m=0,x+=f+v,R=null;continue}if(y=l[g],!!y){if(T=I+y.x,C=U+y.y,E=y.width,M=y.height,P=y.xOffset+m,A=y.yOffset+x,R!==null){var V=y.kerning[F];P+=V!==void 0?V:0}P*=N,A*=N,P+=L,m+=y.xAdvance+u+(V!==void 0?V:0),R=y,F=g,!(E===0||M===0||g===32)&&(X&&(P=Math.round(P),A=Math.round(A)),i.save(),i.translate(P,A),i.scale(N,N),i.drawImage(w,T,C,E,M,0,0,E,M),i.restore())}}i.restore()}};p.exports=c}),57336:((p,S,t)=>{var d=t(22186),c=t(25305),h=t(44603),r=t(23568),n=t(35154);h.register("bitmapText",function(e,s){e===void 0&&(e={});var o=n(e,"font",""),i=r(e,"text",""),a=r(e,"size",!1),l=n(e,"align",0),f=new d(this.scene,0,0,o,i,a,l);return s!==void 0&&(e.add=s),c(this.scene,f,e),f})}),34914:((p,S,t)=>{var d=t(22186),c=t(39429);c.register("bitmapText",function(h,r,n,e,s,o){return this.displayList.add(new d(this.scene,h,r, Line truncated
`)),m}else return v.wordWrapWidth?v.wordWrapUseAdvanced?this.advancedWordWrap(u,this.context,this.style.wordWrapWidth):this.basicWordWrap(u,this.context,this.style.wordWrapWidth):u},advancedWordWrap:function(u,v,m){for(var x="",g=u.replace(/ +/gi," ").split(this.splitRegExp),y=g.length,T=0;T<y;T++){var C=g[T],E="";C=C.replace(/^ *|\s*$/gi,"");var M=C.length*this.letterSpacing,P=v.measureText(C).width+M;if(P<m){x+=C+`
`;continue}for(var A=m,R=C.split(" "),F=0;F<R.length;F++){var w=R[F],I=w+" ",U=I.length*this.letterSpacing,N=v.measureText(I).width+U;if(N>A){if(F===0){for(var D=I;D.length;){D=D.slice(0,-1);var B=D.length*this.letterSpacing;if(N=v.measureText(D).width+B,N<=A)break}if(!D.length)throw new Error("wordWrapWidth < a single character");var L=w.substr(D.length);R[F]=L,E+=D}var G=R[F].length?F:F+1,O=R.slice(G).join(" ").replace(/[ \n]*$/gi,"");g.splice(T+1,0,O),y=g.length;break}else E+=I,A-=N}x+=E.replace(/[ \n]*$/gi,"")+`
`}return x=x.replace(/[\s|\n]*$/gi,""),x},basicWordWrap:function(u,v,m){for(var x="",g=u.split(this.splitRegExp),y=g.length-1,T=v.measureText(" ").width,C=0;C<=y;C++){for(var E=m,M=g[C].split(" "),P=M.length-1,A=0;A<=P;A++){var R=M[A],F=R.length*this.letterSpacing,w=v.measureText(R).width+F,I=w;A<P&&(I+=T),I>E&&A>0&&(x+=`
`,E=m),x+=R,A<P?(x+=" ",E-=I):E-=w}C<y&&(x+=`
`)}return x},getWrappedText:function(u){u===void 0&&(u=this._text),this.style.syncFont(this.canvas,this.context);var v=this.runWordWrap(u);return v.split(this.splitRegExp)},setText:function(u){return!u&&u!==0&&(u=""),Array.isArray(u)&&(u=u.join(`
`)),u!==this._text&&(this._text=u.toString(),this.updateText()),this},appendText:function(u,v){v===void 0&&(v=!0),!u&&u!==0&&(u=""),Array.isArray(u)&&(u=u.join(`
`)),u=u.toString();var m=this._text.concat(v?`
`+u:u);return m!==this._text&&(this._text=m,this.updateText()),this},setStyle:function(u){return this.style.setStyle(u)},setFont:function(u){return this.style.setFont(u)},setFontFamily:function(u){return this.style.setFontFamily(u)},setFontSize:function(u){return this.style.setFontSize(u)},setFontStyle:function(u){return this.style.setFontStyle(u)},setFixedSize:function(u,v){return this.style.setFixedSize(u,v)},setBackgroundColor:function(u){return this.style.setBackgroundColor(u)},setFill:function(u){return this.style.setFill(u)},setColor:function(u){return this.style.setColor(u)},setStroke:function(u,v){return this.style.setStroke(u,v)},setShadow:function(u,v,m,x,g,y){return this.style.setShadow(u,v,m,x,g,y)},setShadowOffset:function(u,v){return this.style.setShadowOffset(u,v)},setShadowColor:function(u){return this.style.setShadowColor(u)},setShadowBlur:function(u){return this.style.setShadowBlur(u)},setShadowStroke:function(u){return this.style.setShadowStroke(u)},setShadowFill:function(u){return this.style.setShadowFill(u)},setWordWrapWidth:function(u,v){return this.style.setWordWrapWidth(u,v)},setWordWrapCallback:function(u,v){return this.style.setWordWrapCallback(u,v)},setAlign:function(u){return this.style.setAlign(u)},setResolution:function(u){return this.style.setResolution(u)},setLineSpacing:function(u){return this.lineSpacing=u,this.updateText()},setLetterSpacing:function(u){return this.letterSpacing=u,this.updateText()},setPadding:function(u,v,m,x){if(typeof u=="object"){var g=u,y=s(g,"x",null);y!==null?(u=y,m=y):(u=s(g,"left",0),m=s(g,"right",u));var T=s(g,"y",null);T!==null?(v=T,x=T):(v=s(g,"top",0),x=s(g,"bottom",v))}else u===void 0&&(u=0),v===void 0&&(v=u),m===void 0&&(m=u),x===void 0&&(x=v);return this.padding.left=u,this.padding.top=v,this.padding.right=m,this.padding.bottom=x,this.updateText()},setMaxLines:function(u){return this.style.setMaxLines(u)},setRTL:function(u){u===void 0&&(u=!0);var v=this.style;return v.rtl===u?this:(v.rtl=u,u?(this.canvas.dir="rtl",this.context.direction="rtl",this.canvas.style.display="none",d(this.canvas,this.scene.sys.canvas)):(this.canvas.dir="ltr",this.context.direction="ltr"),v.align==="left"?v.align="right":v.align==="right"&&(v.align="left"),this)},updateText:function(){var u=this.canvas,v=this.context,m=this.style,x=m.resolution,g=m.metrics;m.syncFont(u,v);var y=this._text;(m.wordWrapWidth||m.wordWrapCallback)&&(y=this.runWordWrap(this._text));var T=y.split(this.splitRegExp),C=e(this,g,T),E=this.padding,M;m.fixedWidth===0?(this.width=C.width+E.left+E.right,M=C.width):(this.width=m.fixedWidth,M=this.width-E.left-E.right,M<C.width&&(M=C.width)),m.fixedHeight===0?this.height=C.height+E.top+E.bottom:this.height=m.fixedHeight;var P=this.width,A=this.height;this.updateDisplayOrigin(),P*=x,A*=x,P=Math.max(P,1),A=Math.max(A,1),u.width!==P||u.height!==A?(u.width=P,u.height=A,this.frame.setSize(P,A),m.syncFont(u,v),m.rtl&&(v.direction="rtl")):v.clearRect(0,0,P,A),v.save(),v.scale(x,x),m.backgroundColor&&(v.fillStyle=m.backgroundColor,v.fillRect(0,0,P,A)),m.syncStyle(u,v),v.translate(E.left,E.top);for(var R,F,w=0;w<C.lines;w++){if(R=m.strokeThickness/2,F=m.strokeThickness/2+w*C.lineHeight+g.ascent,w>0&&(F+=C.lineSpacing*w),m.rtl)R=P-R-E.left-E.right;else if(m.align==="right")R+=M-C.lineWidths[w];else if(m.align==="center")R+=(M-C.lineWidths[w])/2;else if(m.align==="justify"){var I=.85;if(C.lineWidths[w]/C.width>=I){var U=C.width-C.lineWidths[w],N=v.measureText(" ").width,D=T[w].trim(),B=D.split(" ");U+=(T[w].length-D.length)*N;for(var L=Math.floor(U/N),G=0;L>0;)B[G]+=" ",G=(G+1)%(B.length-1||1),--L;T[w]=B.join(" ")}}this.autoRound&&(R=Math.round(R),F=Math.round(F));var O=this.letterSpacing;if(m.strokeThickness&&O===0&&(m.syncShadow(v,m.shadowStroke),v.strokeText(T[w],R,F)),m.color)if(m.syncShadow(v,m.shadowFill),O!==0)for(var X=0,z=T[w].split(""),V=0;V<z.length;V++)m.strokeThickness&&(m.syncShadow(v,m.shadowStroke),v.strokeText(z[V],R+X,F),m.syncShadow(v,m.shadowFill)),v.fillText(z[V],R+X,F),X+=v.measureText(z[V]).width+O;else v.fillText(T[w],R,F)}v.restore(),this.renderer&&this.renderer.gl&&(this.frame.source.glTexture=this.renderer.canvasToTexture(u,this.frame.source.glTexture,!0));var Y=this.input;return Y&&!Y.customHitArea&&(Y.hitArea.width=this.width,Y.hitArea.height=this.height),this},getTextMetrics:function(){return this.style.getTextMetrics()},text:{get:function(){return this._text},set:function(u){this.setText(u)}},toJSON:function(){var u=r.ToJSON(this),v={autoRound:this.autoRound,text:this._text,style:this.style.toJSON(),padding:{left:this.padding.left,right:this.padding.right,top:this.padding.top,bottom:this.padding.bottom}};return u.data=v,u},preDestroy:function(){o(this.canvas),c.remove(this.canvas);var u=this.texture;u&&u.destroy()}});p.exports=f}),79724:(p=>{var S=function(t,d,c,h){d.width===0||d.height===0||(c.addToRenderList(d),t.batchSprite(d,d.frame,c,h))};p.exports=S}),71259:((p,S,t)=>{var d=t(25305),c=t(44603),h=t(23568),r=t(50171);c.regis Line truncated
`),y=0;y<g.length;y++){var T=h(g[y]),C=T.replace(/\s\s+/g," ").trim().split(" ");switch(C[0].toLowerCase()){case"o":n(C,x);break;case"g":e(C);break;case"v":s(C,x);break;case"vt":o(C,x);break;case"vn":i(C,x);break;case"f":a(C,x);break;case"mtllib":l(C,x);break;case"usemtl":f(C);break}}return x};p.exports=u}),61485:((p,S,t)=>{var d=t(37589),c=function(h){for(var r={},n=h.split(`
`),e="",s=0;s<n.length;s++){var o=n[s].trim();if(!(o.indexOf("#")===0||o==="")){var i=o.replace(/\s\s+/g," ").trim().split(" ");switch(i[0].toLowerCase()){case"newmtl":{e=i[1];break}case"kd":{var a=Math.floor(i[1]*255),l=i.length>=2?Math.floor(i[2]*255):a,f=i.length>=3?Math.floor(i[3]*255):a;r[e]=d(a,l,f);break}}}}return r};p.exports=c}),92570:(p=>{var S=function(t,d,c,h){var r,n;if(c===void 0&&h===void 0){var e=t.getInCenter();r=e.x,n=e.y}var s=Math.cos(d),o=Math.sin(d),i=t.vertex1,a=t.vertex2,l=t.vertex3,f=i.x-r,u=i.y-n;i.set(f*s-u*o+r,f*o+u*s+n),f=a.x-r,u=a.y-n,a.set(f*s-u*o+r,f*o+u*s+n),f=l.x-r,u=l.y-n,l.set(f*s-u*o+r,f*o+u*s+n)};p.exports=S}),39318:((p,S,t)=>{var d=t(83419),c=t(70554),h=t(25836),r=new d({Extends:h,initialize:function(e,s,o,i,a,l,f,u,v,m){l===void 0&&(l=16777215),f===void 0&&(f=1),u===void 0&&(u=0),v===void 0&&(v=0),m===void 0&&(m=0),h.call(this,e,s,o),this.vx=0,this.vy=0,this.vz=0,this.nx=u,this.ny=v,this.nz=m,this.u=i,this.v=a,this.color=l,this.alpha=f,this.tx=0,this.ty=0,this.ta=0,this.tu=i,this.tv=a},setUVs:function(n,e){return this.u=n,this.v=e,this.tu=n,this.tv=e,this},scrollUV:function(n,e){return this.tu+=n,this.tv+=e,this},scaleUV:function(n,e){return this.tu=this.u*n,this.tv=this.v*e,this},transformCoordinatesLocal:function(n,e,s,o){var i=this.x,a=this.y,l=this.z,f=n.val,u=i*f[0]+a*f[4]+l*f[8]+f[12],v=i*f[1]+a*f[5]+l*f[9]+f[13],m=i*f[2]+a*f[6]+l*f[10]+f[14],x=i*f[3]+a*f[7]+l*f[11]+f[15];this.vx=u/x*e,this.vy=-(v/x)*s,o<=0?this.vz=m/x:this.vz=-(m/x)},resize:function(n,e,s,o,i,a){return this.x=n,this.y=e,this.vx=this.x*s,this.vy=-this.y*o,this.vz=0,i<.5?this.vx+=s*(.5-i):i>.5&&(this.vx-=s*(i-.5)),a<.5?this.vy+=o*(.5-a):a>.5&&(this.vy-=o*(a-.5)),this},update:function(n,e,s,o,i,a,l,f){var u=this.vx*n+this.vy*s+i,v=this.vx*e+this.vy*o+a;return l&&(u=Math.round(u),v=Math.round(v)),this.tx=u,this.ty=v,this.ta=this.alpha*f,this},load:function(n,e,s,o,i){return n[++s]=this.tx,n[++s]=this.ty,n[++s]=this.tu,n[++s]=this.tv,n[++s]=o,n[++s]=i,e[++s]=c.getTintAppendFloatAlpha(this.color,this.ta),s}});p.exports=r}),73090:((p,S,t)=>{var d={Face:t(83997),GenerateGridVerts:t(48803),GenerateObjVerts:t(34684),GenerateVerts:t(92515),ParseObj:t(85048),ParseObjMaterial:t(61485),RotateFace:t(92570),Vertex:t(39318)};p.exports=d}),96550:(p=>{var S=function(t){return t.setTo(Math.ceil(t.x),Math.ceil(t.y))};p.exports=S}),99706:((p,S,t)=>{var d=t(2141),c=function(h){return new d(h.x,h.y)};p.exports=c}),68010:(p=>{var S=function(t,d){return d.setTo(t.x,t.y)};p.exports=S}),27814:(p=>{var S=function(t,d){return t.x===d.x&&t.y===d.y};p.exports=S}),73565:(p=>{var S=function(t){return t.setTo(Math.floor(t.x),Math.floor(t.y))};p.exports=S}),87555:((p,S,t)=>{var d=t(2141),c=function(h,r){if(r===void 0&&(r=new d),!Array.isArray(h))throw new Error("GetCentroid points argument must be an array");var n=h.length;if(n<1)throw new Error("GetCentroid points array must not be empty");if(n===1)r.x=h[0].x,r.y=h[0].y;else{for(var e=0;e<n;e++)r.x+=h[e].x,r.y+=h[e].y;r.x/=n,r.y/=n}return r};p.exports=c}),28793:(p=>{var S=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)};p.exports=S}),44405:(p=>{var S=function(t){return t.x*t.x+t.y*t.y};p.exports=S}),20873:((p,S,t)=>{var d=t(87841),c=function(h,r){r===void 0&&(r=new d);for(var n=Number.NEGATIVE_INFINITY,e=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY,i=0;i<h.length;i++){var a=h[i];a.x>n&&(n=a.x),a.x<e&&(e=a.x),a.y>s&&(s=a.y),a.y<o&&(o=a.y)}return r.x=e,r.y=o,r.width=n-e,r.height=s-o,r};p.exports=c}),26152:((p,S,t)=>{var d=t(2141),c=function(h,r,n,e){return n===void 0&&(n=0),e===void 0&&(e=new d),e.x=h.x+(r.x-h.x)*n,e.y=h.y+(r.y-h.y)*n,e};p.exports=c}),55767:(p=>{var S=function(t){return t.setTo(t.y,t.x)};p.exports=S}),79432:((p,S,t)=>{var d=t(2141),c=function(h,r){return r===void 0&&(r=new d),r.setTo(-h.x,-h.y)};p.exports=c}),2141:((p,S,t)=>{var d=t(83419),c=t(23777),h=new d({initialize:function(n,e){n===void 0&&(n=0),e===void 0&&(e=n),this.type=c.POINT,this.x=n,this.y=e},setTo:function(r,n){return r===void 0&&(r=0),n===void 0&&(n=r),this.x=r,this.y=n,this}});p.exports=h}),72930:((p,S,t)=>{var d=t(2141),c=t(44405),h=function(r,n,e){e===void 0&&(e=new d);var s=r.x*n.x+r.y*n.y,o=s/c(n);return o!==0&&(e.x=o*n.x,e.y=o*n.y),e};p.exports=h}),62880:((p,S,t)=>{var d=t(2141),c=function(h,r,n){n===void 0&&(n=new d);var e=h.x*r.x+h.y*r.y;return e!==0&&(n.x=e*r.x,n.y=e*r.y),n};p.exports=c}),15093:((p,S,t)=>{var d=t(28793),c=function(h,r){if(h.x!==0||h.y!==0){var n=d(h);h.x/=n,h.y/=n}return h.x*=r,h.y*=r,h};p.exports=c}),43711:((p,S,t)=>{var d=t(2141);d.Ceil=t(96550),d.Clone=t(99706),d.CopyFrom=t(68010),d.Equals=t(27814),d.Floor=t(73565),d.GetCentroid=t(87555),d.GetMagnitude=t(28793),d.GetMagnitudeSq=t(44405),d.GetRectangleFromPoints=t(20873),d.Interpolate=t(26152),d.Invert=t(55767),d.Negative=t(79432),d.Project=t(72930),d.ProjectUnit=t(62880),d.SetMagnitude=t(15093),p.exports=d}),12306:((p,S,t)=>{var d=t(25717),c=function(h){return new d(h.points)};p.exports=c Line truncated
`),a=this.extractBlock(i,0);if(a)for(;a;){var l=this.getShaderName(a.header),f=this.getShaderType(a.header),u=this.getShaderUniforms(a.header),v=a.shader;if(this.cache.has(l)){var m=this.cache.get(l);f==="fragment"?m.fragmentSrc=v:m.vertexSrc=v,m.uniforms||(m.uniforms=u)}else f==="fragment"?this.cache.add(l,new s(l,v,"",u)):this.cache.add(l,new s(l,"",v,u));a=this.extractBlock(i,a.offset)}else this.config.shaderType==="fragment"?this.cache.add(this.key,new s(this.key,this.data)):this.cache.add(this.key,new s(this.key,"",this.data))},getShaderName:function(i){for(var a=0;a<i.length;a++){var l=i[a].trim();if(l.substring(0,5)==="name:")return l.substring(5).trim()}return this.key},getShaderType:function(i){for(var a=0;a<i.length;a++){var l=i[a].trim();if(l.substring(0,5)==="type:")return l.substring(5).trim()}return this.config.shaderType},getShaderUniforms:function(i){for(var a={},l=0;l<i.length;l++){var f=i[l].trim();if(f.substring(0,8)==="uniform."){var u=f.indexOf(":");if(u){var v=f.substring(8,u);try{a[v]=JSON.parse(f.substring(u+1))}catch{console.warn("Invalid uniform JSON: "+v)}}}}return a},extractBlock:function(i,a){for(var l=-1,f=-1,u=-1,v=!1,m=!1,x=[],g=[],y=a;y<i.length;y++){var T=i[y].trim();if(T==="---")if(l===-1)l=y,v=!0;else if(v)f=y,v=!1,m=!0;else{m=!1;break}else v?x.push(T):m&&(g.push(T),u=y)}return!v&&f!==-1?{header:x,shader:g.join(`
`),offset:u}:null}});r.register("glsl",function(i,a,l,f){if(Array.isArray(i))for(var u=0;u<i.length;u++)this.addFile(new o(this,i[u]));else this.addFile(new o(this,i,a,l,f));return this}),p.exports=o}),89749:((p,S,t)=>{var d=t(83419),c=t(54899),h=t(41299),r=t(95540),n=t(98356),e=t(41212),s=new d({Extends:h,initialize:function(i,a,l,f){if(e(a)){var u=a;a=r(u,"key"),f=r(u,"config",f)}var v={type:"audio",cache:i.cacheManager.audio,extension:l.type,key:a,url:l.url,config:f};h.call(this,i,v),this.locked="ontouchstart"in window,this.loaded=!1,this.filesLoaded=0,this.filesTotal=0},onLoad:function(){this.loaded||(this.loaded=!0,this.loader.nextFile(this,!0))},onError:function(){for(var o=0;o<this.data.length;o++){var i=this.data[o];i.oncanplaythrough=null,i.onerror=null}this.loader.nextFile(this,!1)},onProgress:function(o){var i=o.target;i.oncanplaythrough=null,i.onerror=null,this.filesLoaded++,this.percentComplete=Math.min(this.filesLoaded/this.filesTotal,1),this.loader.emit(c.FILE_PROGRESS,this,this.percentComplete),this.filesLoaded===this.filesTotal&&this.onLoad()},load:function(){this.data=[];var o=this.config&&this.config.instances||1;this.filesTotal=o,this.filesLoaded=0,this.percentComplete=0;for(var i=0;i<o;i++){var a=new Audio;a.dataset||(a.dataset={}),a.dataset.name=this.key+("0"+i).slice(-2),a.dataset.used="false",this.locked?a.dataset.locked="true":(a.dataset.locked="false",a.preload="auto",a.oncanplaythrough=this.onProgress.bind(this),a.onerror=this.onError.bind(this)),this.data.push(a)}for(i=0;i<this.data.length;i++)a=this.data[i],a.src=n(this,this.loader.baseURL),this.locked||a.load();this.locked&&setTimeout(this.onLoad.bind(this))}});p.exports=s}),88470:((p,S,t)=>{var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(41212),s=new d({Extends:h,initialize:function(i,a,l,f){var u="html";if(e(a)){var v=a;a=n(v,"key"),l=n(v,"url"),f=n(v,"xhrSettings"),u=n(v,"extension",u)}var m={type:"text",cache:i.cacheManager.html,extension:u,responseType:"text",key:a,url:l,xhrSettings:f};h.call(this,i,m)},onProcess:function(){this.state=c.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});r.register("html",function(o,i,a){if(Array.isArray(o))for(var l=0;l<o.length;l++)this.addFile(new s(this,o[l]));else this.addFile(new s(this,o,i,a));return this}),p.exports=s}),14643:((p,S,t)=>{var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(41212),s=new d({Extends:h,initialize:function(i,a,l,f,u,v){f===void 0&&(f=512),u===void 0&&(u=512);var m="html";if(e(a)){var x=a;a=n(x,"key"),l=n(x,"url"),v=n(x,"xhrSettings"),m=n(x,"extension",m),f=n(x,"width",f),u=n(x,"height",u)}var g={type:"html",cache:i.textureManager,extension:m,responseType:"text",key:a,url:l,xhrSettings:v,config:{width:f,height:u}};h.call(this,i,g)},onProcess:function(){this.state=c.FILE_PROCESSING;var o=this.config.width,i=this.config.height,a=[];a.push('<svg width="'+o+'px" height="'+i+'px" viewBox="0 0 '+o+" "+i+'" xmlns="http://www.w3.org/2000/svg">'),a.push('<foreignObject width="100%" height="100%">'),a.push('<body xmlns="http://www.w3.org/1999/xhtml">'),a.push(this.xhrLoader.responseText),a.push("</body>"),a.push("</foreignObject>"),a.push("</svg>");var l=[a.join(`
`)],f=this;try{var u=new window.Blob(l,{type:"image/svg+xml;charset=utf-8"})}catch{f.state=c.FILE_ERRORED,f.onProcessComplete();return}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){h.revokeObjectURL(f.data),f.onProcessComplete()},this.data.onerror=function(){h.revokeObjectURL(f.data),f.onProcessError()},h.createObjectURL(this.data,u,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});r.register("htmlTexture",function(o,i,a,l,f){if(Array.isArray(o))for(var u=0;u<o.length;u++)this.addFile(new s(this,o[u]));else this.addFile(new s(this,o,i,a,l,f));return this}),p.exports=s}),19550:((p,S,t)=>{var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(41212),s=t(98356),o=new d({Extends:h,initialize:function i(a,l,f,u,v){var m="png",x;if(e(l)){var g=l;l=n(g,"key"),f=n(g,"url"),x=n(g,"normalMap"),u=n(g,"xhrSettings"),m=n(g,"extension",m),v=n(g,"frameConfig")}Array.isArray(f)&&(x=f[1],f=f[0]);var y={type:"image",cache:a.textureManager,extension:m,responseType:"blob",key:l,url:f,xhrSettings:u,config:v};if(h.call(this,a,y),x){var T=new i(a,this.key,x,u,v);T.type="normalMap",this.setLink(T),a.addFile(T)}this.useImageElementLoad=a.imageLoadType==="HTMLImageElement"||this.base64,this.useImageElementLoad&&(this.load=this.loadImage,this.onProcess=this.onProcessImage)},onProcess:function(){this.state=c.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var i=this;this.data.onload=function(){h.revokeObjectURL(i.data),i.onProcessComplete()},this.data.onerror=function(){h.revokeObjectURL(i.data),i.onProcessError()},h.createObjectURL(this.data,this.xhrLoader.response,"image/png")},onProcessImage:function(){var i=this.state;this.state=c.FILE_PROCESSING,i===c.FILE_LOADED?this.onProcessComplete():this.onProcessError()},loadImage:function(){this.state=c.FILE_LOADING,this.src=s(this,this.loader.baseURL),this.data=new Image,this.data.crossOrigin=this.crossOrigin;var i=this;this.data.onload=function(){i.state=c.FILE_LOADED,i.loader.nextFile(i,!0)},this.data.onerror=function(){i.loader.nextFile(i,!1)},this.data.src=this.src},addToCache:function(){var i=this.linkFile;i?i.state>=c.FILE_COMPLETE&&(i.type==="spritesheet"?i.addToCache():this.type==="normalMap"?this.cache.addImage(this.key,i.data,this.data):this.cache.addImage(this.key,this.data,i.data)):this.cache.addImage(this.key,this.data)}});r.register("image",function(i,a,l){if(Array.isArray(i))for(var f=0;f<i.length;f++)this.addFile(new o(this,i[f]));else this.addFile(new o(this,i,a,l));return this}),p.exports=o}),518:((p,S,t)=>{var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(35154),s=t(41212),o=new d({Extends:h,initialize:function(a,l,f,u,v){var m="json";if(s(l)){var x=l;l=n(x,"key"),f=n(x,"url"),u=n(x,"xhrSettings"),m=n(x,"extension",m),v=n(x,"dataKey",v)}var g={type:"json",cache:a.cacheManager.json,extension:m,responseType:"text",key:l,url:f,xhrSettings:u,config:v};h.call(this,a,g),s(f)&&(v?this.data=e(f,v):this.data=f,this.state=c.FILE_POPULATED)},onProcess:function(){if(this.state!==c.FILE_POPULATED){this.state=c.FILE_PROCESSING;try{var i=JSON.parse(this.xhrLoader.responseText)}catch(l){throw this.onProcessError(),l}var a=this.config;typeof a=="string"?this.data=e(i,a,i):this.data=i}this.onProcessComplete()}});r.register("json",function(i,a,l,f){if(Array.isArray(i))for(var u=0;u<i.length;u++)this.addFile(new o(this,i[u]));else this.addFile(new o(this,i,a,f,l));return this}),p.exports=o}),59327:((p,S,t)=>{var d=t(83419),c=t(74099),h=t(95540),r=t(19550),n=t(41212),e=t(518),s=t(26430),o=new d({Extends:s,initialize:function(a,l,f,u,v,m,x){if(n(l)){var g=l;l=h(g,"key"),h(g,"url",!1)?f=h(g,"url"):f=h(g,"atlasURL"),m=h(g,"xhrSettings"),u=h(g,"path"),v=h(g,"baseURL"),x=h(g,"textureXhrSettings")}var y=new e(a,l,f,m);s.call(this,a,"multiatlas",l,[y]),this.config.path=u,this.config.baseURL=v,this.config.textureXhrSettings=x},onFileComplete:function(i){var a=this.files.indexOf(i);if(a!==-1&&(this.pending--,i.type==="json"&&i.data.hasOwnProperty("textures"))){var l=i.data.textures,f=this.config,u=this.loader,v=u.baseURL,m=u.path,x=u.prefix,g=h(f,"baseURL",this.baseURL),y=h(f,"path",this.path),T=h(f,"prefix",this.prefix),C=h(f,"textureXhrSettings");u.setBaseURL(g),u.setPath(y),u.setPrefix(T);for(var E=0;E<l.length;E++){var M=l[E].image,P="MA"+this.multiKeyIndex+"_"+M,A=new r(u,P,M,C);if(this.addToMultiFile(A),u.addFile(A),l[E].normalMap){var R=new r(u,P,l[E].normalMap,C);R.type="normalMap",A.setLink(R),this.addToMultiFile(R),u.addFile(R)}}u.setBaseURL(v),u.setPath(m),u.setPrefix(x)}},addToCache:function(){if(this.isReadyToProcess()){for(var i=this.files[0],a=[],l=[],f=[],u=1;u<this.files.length;u++){var v=this.files[u];if(v.type!=="normalMap")for(var m=v.key.indexOf("_"),x=v.key.substr(m+1),g=v.data,y=0;y<i.data.textures.length;y++){var T=i.data.textures[y];if(T.image===x){l.push(g),a.push(T),v.linkFile&&f.push(v.linkFile.data);break}}}f.length===0&&(f=void 0),this.loader.textur Line truncated
return new `+this.key+`();
}).call(this);`),i=eval;this.loader.sceneManager.add(this.key,i(o)),this.complete=!0}});r.register("sceneFile",function(o,i,a){if(Array.isArray(o))for(var l=0;l<o.length;l++)this.addFile(new s(this,o[l]));else this.addFile(new s(this,o,i,a));return this}),p.exports=s}),56812:((p,S,t)=>{var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(41212),s=new d({Extends:h,initialize:function(i,a,l,f,u,v){var m="js";if(e(a)){var x=a;a=n(x,"key"),l=n(x,"url"),v=n(x,"xhrSettings"),m=n(x,"extension",m),f=n(x,"systemKey"),u=n(x,"sceneKey")}var g={type:"scenePlugin",cache:!1,extension:m,responseType:"text",key:a,url:l,xhrSettings:v,config:{systemKey:f,sceneKey:u}};h.call(this,i,g),typeof l=="function"&&(this.data=l,this.state=c.FILE_POPULATED)},onProcess:function(){var o=this.loader.systems.plugins,i=this.config,a=this.key,l=n(i,"systemKey",a),f=n(i,"sceneKey",a);this.state===c.FILE_POPULATED?o.installScenePlugin(l,this.data,f,this.loader.scene,!0):(this.state=c.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data),o.installScenePlugin(l,window[this.key],f,this.loader.scene,!0)),this.onProcessComplete()}});r.register("scenePlugin",function(o,i,a,l,f){if(Array.isArray(o))for(var u=0;u<o.length;u++)this.addFile(new s(this,o[u]));else this.addFile(new s(this,o,i,a,l,f));return this}),p.exports=s}),34328:((p,S,t)=>{var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(41212),s=new d({Extends:h,initialize:function(i,a,l,f,u){var v="js";if(e(a)){var m=a;a=n(m,"key"),l=n(m,"url"),f=n(m,"type","script"),u=n(m,"xhrSettings"),v=n(m,"extension",v)}else f===void 0&&(f="script");var x={type:f,cache:!1,extension:v,responseType:"text",key:a,url:l,xhrSettings:u};h.call(this,i,x)},onProcess:function(){this.state=c.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});r.register("script",function(o,i,a,l){if(Array.isArray(o))for(var f=0;f<o.length;f++)this.addFile(new s(this,o[f]));else this.addFile(new s(this,o,i,a,l));return this}),p.exports=s}),85035:((p,S,t)=>{var d=t(83419),c=t(23906),h=t(74099),r=t(19550),n=new d({Extends:r,initialize:function(s,o,i,a,l){r.call(this,s,o,i,l,a),this.type="spritesheet"},addToCache:function(){var e=this.linkFile;e?e.state>=c.FILE_COMPLETE&&(this.type==="normalMap"?this.cache.addSpriteSheet(this.key,e.data,this.config,this.data):this.cache.addSpriteSheet(this.key,this.data,this.config,e.data)):this.cache.addSpriteSheet(this.key,this.data,this.config)}});h.register("spritesheet",function(e,s,o,i){if(Array.isArray(e))for(var a=0;a<e.length;a++)this.addFile(new n(this,e[a]));else this.addFile(new n(this,e,s,o,i));return this}),p.exports=n}),78776:((p,S,t)=>{var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(41212),s=new d({Extends:h,initialize:function(i,a,l,f){var u="text",v="txt",m=i.cacheManager.text;if(e(a)){var x=a;a=n(x,"key"),l=n(x,"url"),f=n(x,"xhrSettings"),v=n(x,"extension",v),u=n(x,"type",u),m=n(x,"cache",m)}var g={type:u,cache:m,extension:v,responseType:"text",key:a,url:l,xhrSettings:f};h.call(this,i,g)},onProcess:function(){this.state=c.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});r.register("text",function(o,i,a){if(Array.isArray(o))for(var l=0;l<o.length;l++)this.addFile(new s(this,o[l]));else this.addFile(new s(this,o,i,a));return this}),p.exports=s}),49477:((p,S,t)=>{var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(41212),s=t(80341),o=new d({Extends:h,initialize:function(a,l,f,u){var v="csv";if(e(l)){var m=l;l=n(m,"key"),f=n(m,"url"),u=n(m,"xhrSettings"),v=n(m,"extension",v)}var x={type:"tilemapCSV",cache:a.cacheManager.tilemap,extension:v,responseType:"text",key:l,url:f,xhrSettings:u};h.call(this,a,x),this.tilemapFormat=s.CSV},onProcess:function(){this.state=c.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var i={format:this.tilemapFormat,data:this.data};this.cache.add(this.key,i)}});r.register("tilemapCSV",function(i,a,l){if(Array.isArray(i))for(var f=0;f<i.length;f++)this.addFile(new o(this,i[f]));else this.addFile(new o(this,i,a,l));return this}),p.exports=o}),40807:((p,S,t)=>{var d=t(83419),c=t(74099),h=t(518),r=t(80341),n=new d({Extends:h,initialize:function(s,o,i,a){h.call(this,s,o,i,a),this.type="tilemapJSON",this.cache=s.cacheManager.tilemap},addToCache:function(){var e={format:r.WELTMEISTER,data:this.data};this.cache.add(this.key,e)}});c.register("tilemapImpact",function(e,s,o){if(Array.isArray(e))for(var i=0;i<e.length;i++)this.addFile(new n(this,e[i]));else this.addFile(new n(this,e,s,o));return this}),p.exports=n}),56775:((p,S,t)=>{var d=t(83419),c=t(74099),h=t(518),r=t(80341),n=new Line truncated
else `),c<t-1&&(d+="if (outTexId < "+c+".5)"),d+=`
{`,d+=`
texture = texture2D(uMainSampler[`+c+"], outTexCoord);",d+=`
}`;return S=S.replace(/%count%/gi,t.toString()),S.replace(/%forloop%/gi,d)},setGlowQuality:function(S,t,d,c){return d===void 0&&(d=t.config.glowFXQuality),c===void 0&&(c=t.config.glowFXDistance),S=S.replace(/__SIZE__/gi,(1/d/c).toFixed(7)),S=S.replace(/__DIST__/gi,c.toFixed(0)+".0"),S}}}),29100:((p,S,t)=>{var d=t(83419),c=t(62644),h=t(50792),r=t(77085),n=t(95540),e=t(37867),s=t(92503),o=t(32302),i=t(70554),a=t(38683),l=new d({Extends:h,initialize:function(u){h.call(this);var v=u.game,m=v.renderer,x=m.gl;this.name=n(u,"name","WebGLPipeline"),this.game=v,this.renderer=m,this.manager,this.gl=x,this.view=v.canvas,this.width=0,this.height=0,this.vertexCount=0,this.vertexCapacity=0,this.vertexData,this.vertexBuffer,this.activeBuffer,this.topology=n(u,"topology",x.TRIANGLES),this.bytes,this.vertexViewF32,this.vertexViewU32,this.active=!0,this.forceZero=n(u,"forceZero",!1),this.hasBooted=!1,this.isPostFX=!1,this.isPreFX=!1,this.renderTargets=[],this.currentRenderTarget,this.shaders=[],this.currentShader,this.projectionMatrix,this.projectionWidth=0,this.projectionHeight=0,this.config=u,this.glReset=!1,this.batch=[],this.currentBatch=null,this.currentTexture=null,this.currentUnit=0,this.activeTextures=[],this.resizeUniform=n(u,"resizeUniform","")},boot:function(){var f,u=this.gl,v=this.config,m=this.renderer;this.isPostFX||(this.projectionMatrix=new e().identity());var x=this.renderTargets,g=n(v,"renderTarget",!1);typeof g=="boolean"&&g&&(g=1);var y=m.width,T=m.height;if(typeof g=="number")for(f=0;f<g;f++)x.push(new o(m,y,T,1,0,!0));else if(Array.isArray(g))for(f=0;f<g.length;f++){var C=n(g[f],"scale",1),E=n(g[f],"minFilter",0),M=n(g[f],"autoClear",1),P=n(g[f],"autoResize",!1),A=n(g[f],"width",null),R=n(g[f],"height",A);A?x.push(new o(m,A,R,1,E,M,P)):x.push(new o(m,y,T,C,E,M,P))}x.length&&(this.currentRenderTarget=x[0]),this.setShadersFromConfig(v);var F=this.shaders,w=0;for(f=0;f<F.length;f++)F[f].vertexSize>w&&(w=F[f].vertexSize);var I=n(v,"batchSize",m.config.batchSize);this.vertexCapacity=I*6;var U=new ArrayBuffer(this.vertexCapacity*w);this.vertexData=U,this.bytes=new Uint8Array(U),this.vertexViewF32=new Float32Array(U),this.vertexViewU32=new Uint32Array(U);var N=n(v,"vertices",null);for(N?(this.vertexViewF32.set(N),this.vertexBuffer=m.createVertexBuffer(U,u.STATIC_DRAW)):this.vertexBuffer=m.createVertexBuffer(U.byteLength,u.DYNAMIC_DRAW),this.setVertexBuffer(),f=F.length-1;f>=0;f--)F[f].rebind();this.hasBooted=!0,m.on(s.RESIZE,this.resize,this),m.on(s.PRE_RENDER,this.onPreRender,this),m.on(s.RENDER,this.onRender,this),m.on(s.POST_RENDER,this.onPostRender,this),this.emit(r.BOOT,this),this.onBoot()},onBoot:function(){},onResize:function(){},setShader:function(f,u,v){var m=this.renderer;if(f!==this.currentShader||m.currentProgram!==this.currentShader.program){this.flush();var x=this.setVertexBuffer(v);x&&!u&&(u=!0),f.bind(u,!1),this.currentShader=f}return this},getShaderByName:function(f){for(var u=this.shaders,v=0;v<u.length;v++)if(u[v].name===f)return u[v]},setShadersFromConfig:function(f){var u,v=this.shaders,m=this.renderer;for(u=0;u<v.length;u++)v[u].destroy();var x="vertShader",g="fragShader",y="attributes",T=n(f,x,null),C=i.parseFragmentShaderMaxTextures(n(f,g,null),m.maxTextures),E=n(f,y,null),M=n(f,"shaders",[]),P=M.length;if(P===0)T&&C&&(this.shaders=[new a(this,"default",T,C,c(E))]);else{var A=[];for(u=0;u<P;u++){var R=M[u],F,w,I,U;if(typeof R=="string"?(F="default",w=T,I=i.parseFragmentShaderMaxTextures(R,m.maxTextures),U=E):(F=n(R,"name","default"),w=n(R,x,T),I=i.parseFragmentShaderMaxTextures(n(R,g,C),m.maxTextures),U=n(R,y,E)),F==="default"){var N=I.split(`
`),D=N[0].trim();D.indexOf("#define SHADER_NAME")>-1&&(F=D.substring(20))}w&&I&&A.push(new a(this,F,w,I,c(U)))}this.shaders=A}return this.shaders.length===0?console.warn("Pipeline: "+this.name+" - Invalid shader config"):this.currentShader=this.shaders[0],this},createBatch:function(f){return this.currentBatch={start:this.vertexCount,count:0,texture:[f],unit:0,maxUnit:0},this.currentUnit=0,this.currentTexture=f,this.batch.push(this.currentBatch),0},addTextureToBatch:function(f){var u=this.currentBatch;u&&(u.texture.push(f),u.unit++,u.maxUnit++)},pushBatch:function(f){if(!this.currentBatch||this.forceZero&&f!==this.currentTexture)return this.createBatch(f);if(f===this.currentTexture)return this.currentUnit;var u=this.currentBatch,v=u.texture.indexOf(f);return v===-1?u.texture.length===this.renderer.maxTextures?this.createBatch(f):(u.unit++,u.maxUnit++,u.texture.push(f),this.currentUnit=u.unit,this.currentTexture=f,u.unit):(this.currentUnit=v,this.currentTexture=f,v)},setGameObject:function(f,u){return u===void 0&&(u=f.frame),this.pushBatch(u.source.glTexture)},shouldFlush:function(f){return f===void 0&&(f=0),this.vertexCount+f>this.vertexCapacity},vertexAvailable:function(){return this.vertexCapacity-this.vertexCount},resize:function(f,u){(f!==this.width||u!==this.height)&&this.flush(),this.width=f,this.height=u;for(var v=this.renderTargets,m=0;m<v.length;m++)v[m].resize(f,u);return this.setProjectionMatrix(f,u),this.resizeUniform&&this.set2f(this.resizeUniform,f,u),this.emit(r.RESIZE,f,u,this),this.onResize(f,u),this},setProjectionMatrix:function(f,u){var v=this.projectionMatrix;if(!v)return this;this.projectionWidth=f,this.projectionHeight=u,v.ortho(0,f,u,0,-1e3,1e3);for(var m=this.shaders,x="uProjectionMatrix",g=0;g<m.length;g++){var y=m[g];y.hasUniform(x)&&(y.resetUniform(x),y.setMatrix4fv(x,!1,v.val,y))}return this},flipProjectionMatrix:function(f){f===void 0&&(f=!0);var u=this.projectionMatrix;if(!u)return this;var v=this.projectionWidth,m=this.projectionHeight;f?u.ortho(0,v,0,m,-1e3,1e3):u.ortho(0,v,m,0,-1e3,1e3),this.setMatrix4fv("uProjectionMatrix",!1,u.val)},updateProjectionMatrix:function(){if(this.projectionMatrix){var f=this.renderer.projectionWidth,u=this.renderer.projectionHeight;(this.projectionWidth!==f||this.projectionHeight!==u)&&this.setProjectionMatrix(f,u)}},bind:function(f){if(f===void 0&&(f=this.currentShader),this.glReset)return this.rebind(f);var u=!1,v=this.gl;return v.getParameter(v.ARRAY_BUFFER_BINDING)!==this.vertexBuffer&&(v.bindBuffer(v.ARRAY_BUFFER,this.vertexBuffer.webGLBuffer),this.activeBuffer=this.vertexBuffer,u=!0),f.bind(u),this.currentShader=f,this.activeTextures.length=0,this.emit(r.BIND,this,f),this.onActive(f),this},rebind:function(f){this.activeBuffer=null,this.setVertexBuffer();for(var u=this.shaders,v=u.length-1;v>=0;v--){var m=u[v].rebind();(!f||m===f)&&(this.currentShader=m)}return this.activeTextures.length=0,this.emit(r.REBIND,this.currentShader),this.onActive(this.currentShader),this.onRebind(),this.glReset=!1,this},restoreContext:function(){var f=this.shaders,u=!!this.vertexBuffer;this.activeBuffer=null,this.activeTextures.length=0,this.batch.length=0,this.currentBatch=null,this.currentTexture=null,this.currentUnit=0,u&&this.setVertexBuffer();for(var v=0;v<f.length;v++){var m=f[v];m.syncUniforms(),u&&m.rebind()}},setVertexBuffer:function(f){if(f===void 0&&(f=this.vertexBuffer),f!==this.activeBuffer){var u=this.gl;return this.gl.bindBuffer(u.ARRAY_BUFFER,f.webGLBuffer),this.activeBuffer=f,!0}return!1},preBatch:function(f){return this.currentRenderTarget&&this.currentRenderTarget.bind(),this.onPreBatch(f),this},postBatch:function(f){return this.onDraw(this.currentRenderTarget),this.onPostBatch(f),this},onDraw:function(){},unbind:function(){this.currentRenderTarget&&this.currentRenderTarget.unbind()},flush:function(f){if(f===void 0&&(f=!1),this.vertexCount>0){this.emit(r.BEFORE_FLUSH,this,f),this.onBeforeFlush(f);var u=this.gl,v=this.vertexCount,m=this.currentShader.vertexSize,x=this.topology;if(this.active){this.setVertexBuffer(),v===this.vertexCapacity?u.bufferData(u.ARRAY_BUFFER,this.vertexData,u.DYNAMIC_DRAW):u.bufferSubData(u.ARRAY_BUFFER,0,this.bytes.subarray(0,v*m));var g,y,T,C=this.batch,E=this.activeTextures;if(this.forceZero)for(E[0]||u.activeTexture(u.TEXTURE0),g=0;g<C.length;g++)y=C[g],T=y.texture[0],E[0]!==T&&(u.bindTexture(u.TEXTURE_2D,T.webGLTexture),E[0]=T),u.drawArrays(x,y.start,y.count);else for(g=0;g<C.length;g++){y=C[g];for(var M=0;M<=y.maxUnit;M++)T=y.texture[M],E[M]!==T&&(u.activeTexture(u.TEXTURE0+M),u.bindTexture(u.TEXTURE_2D,T.webGLTexture),E[M]=T);u.drawArrays(x,y.start,y.count)}}this.vertexCount=0,this.batch.length=0,this.currentBatch=null,this.currentTexture=null,this.currentUnit=0,this.emit(r.AFTER_FLUSH,this,f),this.onAfterFlush(f)}return this},onActive:function(){},onBind:function(){},onRebind:function(){},onBatch:function(){},onPreBatch:function(){},onPostBatch:function(){},onPreRender:function(){},onRender:function(){},onPostRe Line truncated
`)}),78908:(p=>{p.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_FS","precision mediump float;","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uMaskSampler;","uniform bool uInvertMaskAlpha;","void main ()","{"," vec2 uv = gl_FragCoord.xy / uResolution;"," vec4 mainColor = texture2D(uMainSampler, uv);"," vec4 maskColor = texture2D(uMaskSampler, uv);"," if (!uInvertMaskAlpha)"," {"," mainColor *= maskColor.a;"," }"," else"," {"," mainColor *= (1.0 - maskColor.a);"," }"," gl_FragColor = mainColor;","}"].join(`
`)}),85191:(p=>{p.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_VS","precision mediump float;","attribute vec2 inPosition;","void main ()","{"," gl_Position = vec4(inPosition, 0.0, 1.0);","}"].join(`
`)}),96293:(p=>{p.exports=["#define SHADER_NAME PHASER_COLORMATRIX_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform float uColorMatrix[20];","uniform float uAlpha;","varying vec2 outTexCoord;","void main ()","{"," vec4 c = texture2D(uMainSampler, outTexCoord);"," if (uAlpha == 0.0)"," {"," gl_FragColor = c;"," return;"," }"," if (c.a > 0.0)"," {"," c.rgb /= c.a;"," }"," vec4 result;"," result.r = (uColorMatrix[0] * c.r) + (uColorMatrix[1] * c.g) + (uColorMatrix[2] * c.b) + (uColorMatrix[3] * c.a) + uColorMatrix[4];"," result.g = (uColorMatrix[5] * c.r) + (uColorMatrix[6] * c.g) + (uColorMatrix[7] * c.b) + (uColorMatrix[8] * c.a) + uColorMatrix[9];"," result.b = (uColorMatrix[10] * c.r) + (uColorMatrix[11] * c.g) + (uColorMatrix[12] * c.b) + (uColorMatrix[13] * c.a) + uColorMatrix[14];"," result.a = (uColorMatrix[15] * c.r) + (uColorMatrix[16] * c.g) + (uColorMatrix[17] * c.b) + (uColorMatrix[18] * c.a) + uColorMatrix[19];"," vec3 rgb = mix(c.rgb, result.rgb, uAlpha);"," rgb *= result.a;"," gl_FragColor = vec4(rgb, result.a);","}"].join(`
`)}),36682:(p=>{p.exports=["#define SHADER_NAME PHASER_COPY_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform float uBrightness;","varying vec2 outTexCoord;","void main ()","{"," gl_FragColor = texture2D(uMainSampler, outTexCoord) * uBrightness;","}"].join(`
`)}),99155:(p=>{p.exports=["#define SHADER_NAME BARREL_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform float amount;","varying vec2 outTexCoord;","vec2 Distort(vec2 p)","{"," float theta = atan(p.y, p.x);"," float radius = length(p);"," radius = pow(radius, amount);"," p.x = radius * cos(theta);"," p.y = radius * sin(theta);"," return 0.5 * (p + 1.0);","}","void main()","{"," vec2 xy = 2.0 * outTexCoord - 1.0;"," vec2 texCoord = outTexCoord;"," if (length(xy) < 1.0)"," {"," texCoord = Distort(xy);"," }"," gl_FragColor = texture2D(uMainSampler, texCoord);","}"].join(`
`)}),24400:(p=>{p.exports=["#define SHADER_NAME BLOOM_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 offset;","uniform float strength;","uniform vec3 color;","varying vec2 outTexCoord;","void main ()","{"," vec4 sum = texture2D(uMainSampler, outTexCoord) * 0.204164 * strength;"," sum = sum + texture2D(uMainSampler, outTexCoord + offset * 1.407333) * 0.304005;"," sum = sum + texture2D(uMainSampler, outTexCoord - offset * 1.407333) * 0.304005;"," sum = sum + texture2D(uMainSampler, outTexCoord + offset * 3.294215) * 0.093913;"," gl_FragColor = (sum + texture2D(uMainSampler, outTexCoord - offset * 3.294215) * 0.093913) * vec4(color, 1);","}"].join(`
`)}),94328:(p=>{p.exports=["#define SHADER_NAME BLUR_HIGH_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform vec2 offset;","uniform float strength;","uniform vec3 color;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = outTexCoord;"," vec4 col = vec4(0.0);"," vec2 off1 = vec2(1.411764705882353) * offset * strength;"," vec2 off2 = vec2(3.2941176470588234) * offset * strength;"," vec2 off3 = vec2(5.176470588235294) * offset * strength;"," col += texture2D(uMainSampler, uv) * 0.1964825501511404;"," col += texture2D(uMainSampler, uv + (off1 / resolution)) * 0.2969069646728344;"," col += texture2D(uMainSampler, uv - (off1 / resolution)) * 0.2969069646728344;"," col += texture2D(uMainSampler, uv + (off2 / resolution)) * 0.09447039785044732;"," col += texture2D(uMainSampler, uv - (off2 / resolution)) * 0.09447039785044732;"," col += texture2D(uMainSampler, uv + (off3 / resolution)) * 0.010381362401148057;"," col += texture2D(uMainSampler, uv - (off3 / resolution)) * 0.010381362401148057;"," gl_FragColor = col * vec4(color, 1.0);","}"].join(`
`)}),41514:(p=>{p.exports=["#define SHADER_NAME BLUR_LOW_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform vec2 offset;","uniform float strength;","uniform vec3 color;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = outTexCoord;"," vec4 col = vec4(0.0);"," vec2 offset = vec2(1.333) * offset * strength;"," col += texture2D(uMainSampler, uv) * 0.29411764705882354;"," col += texture2D(uMainSampler, uv + (offset / resolution)) * 0.35294117647058826;"," col += texture2D(uMainSampler, uv - (offset / resolution)) * 0.35294117647058826;"," gl_FragColor = col * vec4(color, 1.0);","}"].join(`
`)}),51078:(p=>{p.exports=["#define SHADER_NAME BLUR_MED_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform vec2 offset;","uniform float strength;","uniform vec3 color;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = outTexCoord;"," vec4 col = vec4(0.0);"," vec2 off1 = vec2(1.3846153846) * offset * strength;"," vec2 off2 = vec2(3.2307692308) * offset * strength;"," col += texture2D(uMainSampler, uv) * 0.2270270270;"," col += texture2D(uMainSampler, uv + (off1 / resolution)) * 0.3162162162;"," col += texture2D(uMainSampler, uv - (off1 / resolution)) * 0.3162162162;"," col += texture2D(uMainSampler, uv + (off2 / resolution)) * 0.0702702703;"," col += texture2D(uMainSampler, uv - (off2 / resolution)) * 0.0702702703;"," gl_FragColor = col * vec4(color, 1.0);","}"].join(`
`)}),90610:(p=>{p.exports=["#define SHADER_NAME BOKEH_FS","precision mediump float;","#define ITERATIONS 100.0","#define ONEOVER_ITR 1.0 / ITERATIONS","#define PI 3.141596","#define GOLDEN_ANGLE 2.39996323","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform float radius;","uniform float amount;","uniform float contrast;","uniform bool isTiltShift;","uniform float strength;","uniform vec2 blur;","varying vec2 outTexCoord;","vec2 Sample (in float theta, inout float r)","{"," r += 1.0 / r;"," return (r - 1.0) * vec2(cos(theta), sin(theta)) * 0.06;","}","vec3 Bokeh (sampler2D tex, vec2 uv, float radius)","{"," vec3 acc = vec3(0.0);"," vec3 div = vec3(0.0);"," vec2 pixel = vec2(resolution.y / resolution.x, 1.0) * radius * .025;"," float r = 1.0;"," for (float j = 0.0; j < GOLDEN_ANGLE * ITERATIONS; j += GOLDEN_ANGLE)"," {"," vec3 col = texture2D(tex, uv + pixel * Sample(j, r)).xyz;"," col = contrast > 0.0 ? col * col * (1.0 + contrast) : col;"," vec3 bokeh = vec3(0.5) + pow(col, vec3(10.0)) * amount;"," acc += col * bokeh;"," div += bokeh;"," }"," return acc / div;","}","void main ()","{"," float shift = 1.0;"," if (isTiltShift)"," {"," vec2 uv = vec2(gl_FragCoord.xy / resolution + vec2(-0.5, -0.5)) * 2.0;"," float centerStrength = 1.0;"," shift = length(uv * blur * strength) * centerStrength;"," }"," gl_FragColor = vec4(Bokeh(uMainSampler, outTexCoord * vec2(1.0, 1.0), radius * shift), 0.0);","}"].join(`
`)}),91899:(p=>{p.exports=["#define SHADER_NAME CIRCLE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform vec3 color;","uniform vec4 backgroundColor;","uniform float thickness;","uniform float scale;","uniform float feather;","varying vec2 outTexCoord;","void main ()","{"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec2 position = (gl_FragCoord.xy / resolution.xy) * 2.0 - 1.0;"," float aspectRatio = resolution.x / resolution.y;"," position.x *= aspectRatio;"," float grad = length(position);"," float outer = aspectRatio;"," float inner = outer - (thickness * 2.0 / resolution.y);"," if (aspectRatio >= 1.0)"," {"," float f = 2.0 + (resolution.y / resolution.x);"," outer = 1.0;"," inner = 1.0 - (thickness * f / resolution.x);"," }"," outer *= scale;"," inner *= scale;"," float circle = smoothstep(outer, outer - 0.01, grad);"," float ring = circle - smoothstep(inner, inner - feather, grad);"," texture = mix(backgroundColor * backgroundColor.a, texture, texture.a);"," texture = (texture * (circle - ring));"," gl_FragColor = vec4(texture.rgb + (ring * color), texture.a);","}"].join(`
`)}),47838:(p=>{p.exports=["#define SHADER_NAME DISPLACEMENT_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform sampler2D uDisplacementSampler;","uniform vec2 amount;","varying vec2 outTexCoord;","void main ()","{"," vec2 disp = (-vec2(0.5, 0.5) + texture2D(uDisplacementSampler, outTexCoord).rr) * amount;"," gl_FragColor = texture2D(uMainSampler, outTexCoord + disp).rgba;","}"].join(`
`)}),98656:(p=>{p.exports=["#define SHADER_NAME GLOW_FS","precision mediump float;","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","uniform float outerStrength;","uniform float innerStrength;","uniform vec2 resolution;","uniform vec4 glowColor;","uniform bool knockout;","const float PI = 3.14159265358979323846264;","const float DIST = __DIST__;","const float SIZE = min(__SIZE__, PI * 2.0);","const float STEP = ceil(PI * 2.0 / SIZE);","const float MAX_ALPHA = STEP * DIST * (DIST + 1.0) / 2.0;","void main ()","{"," vec2 px = vec2(1.0 / resolution.x, 1.0 / resolution.y);"," float totalAlpha = 0.0;"," vec2 direction;"," vec2 displaced;"," vec4 color;"," for (float angle = 0.0; angle < PI * 2.0; angle += SIZE)"," {"," direction = vec2(cos(angle), sin(angle)) * px;"," for (float curDistance = 0.0; curDistance < DIST; curDistance++)"," {"," displaced = outTexCoord + direction * (curDistance + 1.0);"," color = texture2D(uMainSampler, displaced);"," totalAlpha += (DIST - curDistance) * color.a;"," }"," }"," color = texture2D(uMainSampler, outTexCoord);"," float alphaRatio = (totalAlpha / MAX_ALPHA);"," float innerGlowAlpha = (1.0 - alphaRatio) * innerStrength * color.a;"," float innerGlowStrength = min(1.0, innerGlowAlpha);"," vec4 innerColor = mix(color, glowColor, innerGlowStrength);"," float outerGlowAlpha = alphaRatio * outerStrength * (1.0 - color.a);"," float outerGlowStrength = min(1.0 - innerColor.a, outerGlowAlpha);"," vec4 outerGlowColor = outerGlowStrength * glowColor.rgba;"," if (knockout)"," {"," float resultAlpha = outerGlowAlpha + innerGlowAlpha;"," gl_FragColor = vec4(glowColor.rgb * resultAlpha, resultAlpha);"," }"," else"," {"," gl_FragColor = innerColor + outerGlowColor;"," }","}"].join(`
`)}),70463:(p=>{p.exports=["#define SHADER_NAME GRADIENT_FS","#define SRGB_TO_LINEAR(c) pow((c), vec3(2.2))","#define LINEAR_TO_SRGB(c) pow((c), vec3(1.0 / 2.2))","#define SRGB(r, g, b) SRGB_TO_LINEAR(vec3(float(r), float(g), float(b)) / 255.0)","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 positionFrom;","uniform vec2 positionTo;","uniform vec3 color1;","uniform vec3 color2;","uniform float alpha;","uniform int size;","varying vec2 outTexCoord;","float gradientNoise(in vec2 uv)","{"," const vec3 magic = vec3(0.06711056, 0.00583715, 52.9829189);"," return fract(magic.z * fract(dot(uv, magic.xy)));","}","float stepped (in float s, in float scale, in int steps)","{"," return steps > 0 ? floor( s / ((1.0 * scale) / float(steps))) * 1.0 / float(steps - 1) : s;","}","void main ()","{"," vec2 a = positionFrom;"," vec2 b = positionTo;"," vec2 ba = b - a;"," float d = dot(outTexCoord - a, ba) / dot(ba, ba);"," float t = size > 0 ? stepped(d, 1.0, size) : d;"," t = smoothstep(0.0, 1.0, clamp(t, 0.0, 1.0));"," vec3 color = mix(SRGB(color1.r, color1.g, color1.b), SRGB(color2.r, color2.g, color2.b), t);"," color = LINEAR_TO_SRGB(color);"," color += (1.0 / 255.0) * gradientNoise(outTexCoord) - (0.5 / 255.0);"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," gl_FragColor = vec4(mix(color.rgb, texture.rgb, alpha), 1.0) * texture.a;","}"].join(`
`)}),50831:(p=>{p.exports=["#define SHADER_NAME PIXELATE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform float amount;","varying vec2 outTexCoord;","void main ()","{"," float pixelSize = floor(2.0 + amount);"," vec2 center = pixelSize * floor(outTexCoord * resolution / pixelSize) + pixelSize * vec2(0.5, 0.5);"," vec2 corner1 = center + pixelSize * vec2(-0.5, -0.5);"," vec2 corner2 = center + pixelSize * vec2(+0.5, -0.5);"," vec2 corner3 = center + pixelSize * vec2(+0.5, +0.5);"," vec2 corner4 = center + pixelSize * vec2(-0.5, +0.5);"," vec4 pixel = 0.4 * texture2D(uMainSampler, center / resolution);"," pixel += 0.15 * texture2D(uMainSampler, corner1 / resolution);"," pixel += 0.15 * texture2D(uMainSampler, corner2 / resolution);"," pixel += 0.15 * texture2D(uMainSampler, corner3 / resolution);"," pixel += 0.15 * texture2D(uMainSampler, corner4 / resolution);"," gl_FragColor = pixel;","}"].join(`
`)}),92595:(p=>{p.exports=["#define SHADER_NAME SHADOW_FS","precision mediump float;","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","uniform vec2 lightPosition;","uniform vec4 color;","uniform float decay;","uniform float power;","uniform float intensity;","uniform int samples;","const int MAX = 12;","void main ()","{"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec2 pc = (lightPosition - outTexCoord) * intensity;"," float shadow = 0.0;"," float limit = max(float(MAX), float(samples));"," for (int i = 0; i < MAX; ++i)"," {"," if (i >= samples)"," {"," break;"," }"," shadow += texture2D(uMainSampler, outTexCoord + float(i) * decay / limit * pc).a * power;"," }"," float mask = 1.0 - texture.a;"," gl_FragColor = mix(texture, color, shadow * mask);","}"].join(`
`)}),72464:(p=>{p.exports=["#define SHADER_NAME SHINE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform bool reveal;","uniform float speed;","uniform float time;","uniform float lineWidth;","uniform float gradient;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = gl_FragCoord.xy / resolution.xy;"," vec4 tex = texture2D(uMainSampler, outTexCoord);"," vec4 col1 = vec4(0.3, 0.0, 0.0, 1.0);"," vec4 col2 = vec4(0.85, 0.85, 0.85, 1.0);"," uv.x = uv.x - mod(time * speed, 2.0) + 0.5;"," float y = uv.x * gradient;"," float s = smoothstep(y - lineWidth, y, uv.y) - smoothstep(y, y + lineWidth, uv.y);"," gl_FragColor = (((s * col1) + (s * col2)) * tex);"," if (!reveal)"," {"," gl_FragColor += tex;"," }","}"].join(`
`)}),39249:(p=>{p.exports=["#define SHADER_NAME VIGNETTE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform float radius;","uniform float strength;","uniform vec2 position;","varying vec2 outTexCoord;","void main ()","{"," vec4 col = vec4(1.0);"," float d = length(outTexCoord - position);"," if (d <= radius)"," {"," float g = d / radius;"," g = sin(g * 3.14 * strength);"," col = vec4(g * g * g);"," }"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," gl_FragColor = texture * (1.0 - col);","}"].join(`
`)}),2878:(p=>{p.exports=["#define SHADER_NAME WIPE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec4 config;","uniform bool reveal;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = outTexCoord;"," vec4 color0;"," vec4 color1;"," if (reveal)"," {"," color0 = vec4(0);"," color1 = texture2D(uMainSampler, uv);"," }"," else"," {"," color0 = texture2D(uMainSampler, uv);"," color1 = vec4(0);"," }"," float distance = config.x;"," float width = config.y;"," float direction = config.z;"," float axis = uv.x;"," if (config.w == 1.0)"," {"," axis = uv.y;"," }"," float adjust = mix(width, -width, distance);"," float value = smoothstep(distance - width, distance + width, abs(direction - axis) + adjust);"," gl_FragColor = mix(color1, color0, value);","}"].join(`
`)}),31063:(p=>{p.exports=["#define SHADER_NAME PHASER_LIGHT_FS","precision mediump float;","struct Light","{"," vec2 position;"," vec3 color;"," float intensity;"," float radius;","};","const int kMaxLights = %LIGHT_COUNT%;","uniform vec4 uCamera; /* x, y, rotation, zoom */","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uNormSampler;","uniform vec3 uAmbientLightColor;","uniform Light uLights[kMaxLights];","uniform mat3 uInverseRotationMatrix;","uniform int uLightCount;","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," vec3 finalColor = vec3(0.0, 0.0, 0.0);"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec4 color = texture * texel;"," if (outTintEffect == 1.0)"," {"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," color = texel;"," }"," vec3 normalMap = texture2D(uNormSampler, outTexCoord).rgb;"," vec3 normal = normalize(uInverseRotationMatrix * vec3(normalMap * 2.0 - 1.0));"," vec2 res = vec2(min(uResolution.x, uResolution.y)) * uCamera.w;"," for (int index = 0; index < kMaxLights; ++index)"," {"," if (index < uLightCount)"," {"," Light light = uLights[index];"," vec3 lightDir = vec3((light.position.xy / res) - (gl_FragCoord.xy / res), 0.1);"," vec3 lightNormal = normalize(lightDir);"," float distToSurf = length(lightDir) * uCamera.w;"," float diffuseFactor = max(dot(normal, lightNormal), 0.0);"," float radius = (light.radius / res.x * uCamera.w) * uCamera.w;"," float attenuation = clamp(1.0 - distToSurf * distToSurf / (radius * radius), 0.0, 1.0);"," vec3 diffuse = light.color * diffuseFactor;"," finalColor += (attenuation * diffuse) * light.intensity;"," }"," }"," vec4 colorOutput = vec4(uAmbientLightColor + finalColor, 1.0);"," gl_FragColor = color * vec4(colorOutput.rgb * colorOutput.a, colorOutput.a);","}"].join(`
`)}),48247:(p=>{p.exports=["#define SHADER_NAME PHASER_LINEAR_BLEND_FS","precision mediump float;","uniform sampler2D uMainSampler1;","uniform sampler2D uMainSampler2;","uniform float uStrength;","varying vec2 outTexCoord;","void main ()","{"," vec4 frame1 = texture2D(uMainSampler1, outTexCoord);"," vec4 frame2 = texture2D(uMainSampler2, outTexCoord);"," gl_FragColor = mix(frame1, frame2 * uStrength, 0.5);","}"].join(`
`)}),41214:(p=>{p.exports=["#define SHADER_NAME PHASER_MESH_FS","precision mediump float;","uniform vec3 uLightPosition;","uniform vec3 uLightAmbient;","uniform vec3 uLightDiffuse;","uniform vec3 uLightSpecular;","uniform vec3 uFogColor;","uniform float uFogNear;","uniform float uFogFar;","uniform vec3 uMaterialAmbient;","uniform vec3 uMaterialDiffuse;","uniform vec3 uMaterialSpecular;","uniform float uMaterialShine;","uniform vec3 uCameraPosition;","uniform sampler2D uTexture;","varying vec2 vTextureCoord;","varying vec3 vNormal;","varying vec3 vPosition;","void main (void)","{"," vec4 color = texture2D(uTexture, vTextureCoord);"," vec3 ambient = uLightAmbient * uMaterialAmbient;"," vec3 norm = normalize(vNormal);"," vec3 lightDir = normalize(uLightPosition - vPosition);"," float diff = max(dot(norm, lightDir), 0.0);"," vec3 diffuse = uLightDiffuse * (diff * uMaterialDiffuse);"," vec3 viewDir = normalize(uCameraPosition - vPosition);"," vec3 reflectDir = reflect(-lightDir, norm);"," float spec = pow(max(dot(viewDir, reflectDir), 0.0), uMaterialShine);"," vec3 specular = uLightSpecular * (spec * uMaterialSpecular);"," vec3 result = (ambient + diffuse + specular) * color.rgb;"," float depth = gl_FragCoord.z / gl_FragCoord.w;"," float fogFactor = smoothstep(uFogNear, uFogFar, depth);"," gl_FragColor.rgb = mix(result.rgb, uFogColor, fogFactor);"," gl_FragColor.a = color.a;","}"].join(`
`)}),39653:(p=>{p.exports=["#define SHADER_NAME PHASER_MESH_VS","precision mediump float;","attribute vec3 aVertexPosition;","attribute vec3 aVertexNormal;","attribute vec2 aTextureCoord;","uniform mat4 uViewProjectionMatrix;","uniform mat4 uModelMatrix;","uniform mat4 uNormalMatrix;","varying vec2 vTextureCoord;","varying vec3 vNormal;","varying vec3 vPosition;","void main ()","{"," vTextureCoord = aTextureCoord;"," vPosition = vec3(uModelMatrix * vec4(aVertexPosition, 1.0));"," vNormal = vec3(uNormalMatrix * vec4(aVertexNormal, 1.0));"," gl_Position = uViewProjectionMatrix * uModelMatrix * vec4(aVertexPosition, 1.0);","}"].join(`
`)}),62143:(p=>{p.exports=["#define SHADER_NAME PHASER_MOBILE_FS","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec4 color = texture * texel;"," if (outTintEffect == 1.0)"," {"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," color = texel;"," }"," gl_FragColor = color;","}"].join(`
`)}),47940:(p=>{p.exports=["#define SHADER_NAME PHASER_MOBILE_VS","precision mediump float;","uniform mat4 uProjectionMatrix;","uniform vec2 uResolution;","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexId;","attribute float inTintEffect;","attribute vec4 inTint;","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);"," outTexCoord = inTexCoord;"," outTint = inTint;"," outTintEffect = inTintEffect;","}"].join(`
`)}),98840:(p=>{p.exports=["#define SHADER_NAME PHASER_MULTI_FS","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","uniform sampler2D uMainSampler[%count%];","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," vec4 texture;"," %forloop%"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);"," vec4 color = texture * texel;"," if (outTintEffect == 1.0)"," {"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," color = texel;"," }"," gl_FragColor = color;","}"].join(`
`)}),44667:(p=>{p.exports=["#define SHADER_NAME PHASER_MULTI_VS","precision mediump float;","uniform mat4 uProjectionMatrix;","uniform vec2 uResolution;","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexId;","attribute float inTintEffect;","attribute vec4 inTint;","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);"," outTexCoord = inTexCoord;"," outTexId = inTexId;"," outTint = inTint;"," outTintEffect = inTintEffect;","}"].join(`
`)}),4127:(p=>{p.exports=["#define SHADER_NAME PHASER_POINTLIGHT_FS","precision mediump float;","uniform vec2 uResolution;","uniform float uCameraZoom;","varying vec4 lightPosition;","varying vec4 lightColor;","varying float lightRadius;","varying float lightAttenuation;","void main ()","{"," vec2 center = (lightPosition.xy + 1.0) * (uResolution.xy * 0.5);"," float distToSurf = length(center - gl_FragCoord.xy);"," float radius = 1.0 - distToSurf / (lightRadius * uCameraZoom);"," float intensity = smoothstep(0.0, 1.0, radius * lightAttenuation);"," vec4 color = vec4(intensity, intensity, intensity, 0.0) * lightColor;"," gl_FragColor = vec4(color.rgb * lightColor.a, color.a);","}"].join(`
`)}),89924:(p=>{p.exports=["#define SHADER_NAME PHASER_POINTLIGHT_VS","precision mediump float;","uniform mat4 uProjectionMatrix;","attribute vec2 inPosition;","attribute vec2 inLightPosition;","attribute vec4 inLightColor;","attribute float inLightRadius;","attribute float inLightAttenuation;","varying vec4 lightPosition;","varying vec4 lightColor;","varying float lightRadius;","varying float lightAttenuation;","void main ()","{"," lightColor = inLightColor;"," lightRadius = inLightRadius;"," lightAttenuation = inLightAttenuation;"," lightPosition = uProjectionMatrix * vec4(inLightPosition, 1.0, 1.0);"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);","}"].join(`
`)}),27681:(p=>{p.exports=["#define SHADER_NAME PHASER_POSTFX_FS","precision mediump float;","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","void main ()","{"," gl_FragColor = texture2D(uMainSampler, outTexCoord);","}"].join(`
`)}),49627:(p=>{p.exports=["#define SHADER_NAME PHASER_QUAD_VS","precision mediump float;","attribute vec2 inPosition;","attribute vec2 inTexCoord;","varying vec2 outFragCoord;","varying vec2 outTexCoord;","void main ()","{"," outFragCoord = inPosition.xy * 0.5 + 0.5;"," outTexCoord = inTexCoord;"," gl_Position = vec4(inPosition, 0, 1);","}"].join(`
`)}),45561:(p=>{p.exports=["#define SHADER_NAME PHASER_SINGLE_FS","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);"," vec4 color = texture * texel;"," if (outTintEffect == 1.0)"," {"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," color = texel;"," }"," gl_FragColor = color;","}"].join(`
`)}),60722:(p=>{p.exports=["#define SHADER_NAME PHASER_SINGLE_VS","precision mediump float;","uniform mat4 uProjectionMatrix;","uniform vec2 uResolution;","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexId;","attribute float inTintEffect;","attribute vec4 inTint;","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);"," outTexCoord = inTexCoord;"," outTint = inTint;"," outTintEffect = inTintEffect;","}"].join(`
`)}),89350:((p,S,t)=>{p.exports={AddBlendFrag:t(35407),BitmapMaskFrag:t(78908),BitmapMaskVert:t(85191),ColorMatrixFrag:t(96293),CopyFrag:t(36682),FXBarrelFrag:t(99155),FXBloomFrag:t(24400),FXBlurHighFrag:t(94328),FXBlurLowFrag:t(41514),FXBlurMedFrag:t(51078),FXBokehFrag:t(90610),FXCircleFrag:t(91899),FXDisplacementFrag:t(47838),FXGlowFrag:t(98656),FXGradientFrag:t(70463),FXPixelateFrag:t(50831),FXShadowFrag:t(92595),FXShineFrag:t(72464),FXVignetteFrag:t(39249),FXWipeFrag:t(2878),LightFrag:t(31063),LinearBlendFrag:t(48247),MeshFrag:t(41214),MeshVert:t(39653),MobileFrag:t(62143),MobileVert:t(47940),MultiFrag:t(98840),MultiVert:t(44667),PointLightFrag:t(4127),PointLightVert:t(89924),PostFXFrag:t(27681),QuadVert:t(49627),SingleFrag:t(45561),SingleVert:t(60722)}}),93567:((p,S,t)=>{var d=t(83419),c=new d({initialize:function(r,n,e){this.webGLAttribLocation=-1,this.gl=r,this.program=n,this.name=e,this.createResource()},createResource:function(){if(this.program.webGLProgram===null){this.webGLAttribLocation=-1;return}var h=this.gl;h.isContextLost()||(this.webGLAttribLocation=h.getAttribLocation(this.program.webGLProgram,this.name))},destroy:function(){this.gl=null,this.program=null,this.name=null,this.webGLAttribLocation=-1}});p.exports=c}),26128:((p,S,t)=>{var d=t(83419),c=new d({initialize:function(r,n,e,s){this.webGLBuffer=null,this.gl=r,this.initialDataOrSize=n,this.bufferType=e,this.bufferUsage=s,this.createResource()},createResource:function(){if(this.initialDataOrSize!==null){var h=this.gl;if(!h.isContextLost()){var r=this.bufferType,n=h.createBuffer();this.webGLBuffer=n,h.bindBuffer(r,this.webGLBuffer),h.bufferData(r,this.initialDataOrSize,this.bufferUsage),h.bindBuffer(r,null)}}},destroy:function(){var h=this.gl;h.isContextLost()||h.deleteBuffer(this.webGLBuffer),this.webGLBuffer=null,this.initialDataOrSize=null,this.gl=null}});p.exports=c}),84387:((p,S,t)=>{var d=t(83419),c={36054:"Incomplete Attachment",36055:"Missing Attachment",36057:"Incomplete Dimensions",36061:"Framebuffer Unsupported"},h=new d({initialize:function(n,e,s,o,i){this.webGLFramebuffer=null,this.gl=n,this.width=e,this.height=s,this.renderTexture=o,this.addDepthStencilBuffer=!!i,this.createResource()},createResource:function(){var r=this.gl;if(!r.isContextLost()){var n=this.renderTexture,e=0,s=r.createFramebuffer();if(this.webGLFramebuffer=s,r.bindFramebuffer(r.FRAMEBUFFER,s),n.isRenderTexture=!0,n.isAlphaPremultiplied=!1,r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,n.webGLTexture,0),e=r.checkFramebufferStatus(r.FRAMEBUFFER),e!==r.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer status: "+(c[e]||e));if(this.addDepthStencilBuffer){var o=r.createRenderbuffer();r.bindRenderbuffer(r.RENDERBUFFER,o),r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,this.width,this.height),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,o)}r.bindFramebuffer(r.FRAMEBUFFER,null)}},destroy:function(){if(this.webGLFramebuffer!==null){var r=this.gl;if(!r.isContextLost()){r.bindFramebuffer(r.FRAMEBUFFER,this.webGLFramebuffer);var n=r.getFramebufferAttachmentParameter(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME);n!==null&&(r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,null,0),r.deleteTexture(n));var e=r.getFramebufferAttachmentParameter(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME);e!==null&&r.deleteRenderbuffer(e),r.bindFramebuffer(r.FRAMEBUFFER,null),r.deleteFramebuffer(this.webGLFramebuffer)}this.renderTexture=null,this.webGLFramebuffer=null,this.gl=null}}});p.exports=h}),1482:((p,S,t)=>{var d=t(83419),c=new d({initialize:function(r,n,e){this.webGLProgram=null,this.gl=r,this.vertexSource=n,this.fragmentSource=e,this.createResource()},createResource:function(){var h=this.gl;if(!h.isContextLost()){var r=h.createProgram(),n=h.createShader(h.VERTEX_SHADER),e=h.createShader(h.FRAGMENT_SHADER);h.shaderSource(n,this.vertexSource),h.shaderSource(e,this.fragmentSource),h.compileShader(n),h.compileShader(e);var s=`Shader failed:
`;if(!h.getShaderParameter(n,h.COMPILE_STATUS))throw new Error("Vertex "+s+h.getShaderInfoLog(n));if(!h.getShaderParameter(e,h.COMPILE_STATUS))throw new Error("Fragment "+s+h.getShaderInfoLog(e));if(h.attachShader(r,n),h.attachShader(r,e),h.linkProgram(r),!h.getProgramParameter(r,h.LINK_STATUS))throw new Error("Link "+s+h.getProgramInfoLog(r));h.useProgram(r),this.webGLProgram=r}},destroy:function(){this.webGLProgram&&(this.gl.isContextLost()||this.gl.deleteProgram(this.webGLProgram),this.webGLProgram=null,this.gl=null)}});p.exports=c}),82751:((p,S,t)=>{var d=t(83419),c=t(50030),h=new d({initialize:function(n,e,s,o,i,a,l,f,u,v,m,x,g){this.webGLTexture=null,this.isRenderTexture=!1,this.gl=n,this.mipLevel=e,this.minFilter=s,this.magFilter=o,this.wrapT=i,this.wrapS=a,this.format=l,this.pixels=f,this.width=u,this.height=v,this.pma=m??!0,this.forceSize=!!x,this.flipY=!!g,this.__SPECTOR_Metadata={},this.createResource()},createResource:function(){var r=this.gl;if(!r.isContextLost()){if(this.pixels instanceof h){this.webGLTexture=this.pixels.webGLTexture;return}var n=r.createTexture();n.__SPECTOR_Metadata=this.__SPECTOR_Metadata,this.webGLTexture=n,this._processTexture()}},update:function(r,n,e,s,o,i,a,l,f){if(!(n===0||e===0)){this.pixels=r,this.width=n,this.height=e,this.flipY=s,this.wrapS=o,this.wrapT=i,this.minFilter=a,this.magFilter=l,this.format=f;var u=this.gl;u.isContextLost()||this._processTexture()}},_processTexture:function(){var r=this.gl;r.activeTexture(r.TEXTURE0);var n=r.getParameter(r.TEXTURE_BINDING_2D);r.bindTexture(r.TEXTURE_2D,this.webGLTexture),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,this.minFilter),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,this.magFilter),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,this.wrapS),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,this.wrapT),r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.pma),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,this.flipY);var e=this.pixels,s=this.mipLevel,o=this.width,i=this.height,a=this.format,l=!1;if(e==null)r.texImage2D(r.TEXTURE_2D,s,a,o,i,0,a,r.UNSIGNED_BYTE,null),l=c(o,i);else if(e.compressed){o=e.width,i=e.height,l=e.generateMipmap;for(var f=0;f<e.mipmaps.length;f++)r.compressedTexImage2D(r.TEXTURE_2D,f,e.internalFormat,e.mipmaps[f].width,e.mipmaps[f].height,0,e.mipmaps[f].data)}else e instanceof Uint8Array?(r.texImage2D(r.TEXTURE_2D,s,a,o,i,0,a,r.UNSIGNED_BYTE,e),l=c(o,i)):(this.forceSize||(o=e.width,i=e.height),r.texImage2D(r.TEXTURE_2D,s,a,a,r.UNSIGNED_BYTE,e),l=c(o,i));l&&r.generateMipmap(r.TEXTURE_2D),n?r.bindTexture(r.TEXTURE_2D,n):r.bindTexture(r.TEXTURE_2D,null)},spectorMetadata:{get:function(){return this.__SPECTOR_Metadata},set:function(r){this.__SPECTOR_Metadata=r,this.gl.isContextLost()||(this.webGLTexture.__SPECTOR_Metadata=r)}},destroy:function(){this.webGLTexture!==null&&(this.gl.isContextLost()||this.pixels instanceof h||this.gl.deleteTexture(this.webGLTexture),this.pixels=null,this.webGLTexture=null,this.gl=null)}});p.exports=h}),57183:((p,S,t)=>{var d=t(83419),c=new d({initialize:function(r,n,e){this.webGLUniformLocation=null,this.gl=r,this.program=n,this.name=e,this.createResource()},createResource:function(){if(this.program.webGLProgram===null){this.webGLUniformLocation=null;return}var h=this.gl;h.isContextLost()||(this.webGLUniformLocation=h.getUniformLocation(this.program.webGLProgram,this.name))},destroy:function(){this.gl=null,this.program=null,this.name=null,this.webGLUniformLocation=null}});p.exports=c}),9503:((p,S,t)=>{var d={WebGLAttribLocationWrapper:t(93567),WebGLBufferWrapper:t(26128),WebGLProgramWrapper:t(1482),WebGLTextureWrapper:t(82751),WebGLFramebufferWrapper:t(84387),WebGLUniformLocationWrapper:t(57183)};p.exports=d}),76531:((p,S,t)=>{var d=t(13560),c=t(83419),h=t(45319),r=t(50792),n=t(97480),e=t(8443),s=t(57811),o=t(74403),i=t(45818),a=t(29747),l=t(87841),f=t(86555),u=t(56583),v=t(26099),m=t(38058),x=new c({Extends:r,initialize:function(y){r.call(this),this.game=y,this.canvas,this.canvasBounds=new l,this.parent=null,this.parentIsWindow=!1,this.parentSize=new f,this.gameSize=new f,this.baseSize=new f,this.displaySize=new f,this.scaleMode=d.SCALE_MODE.NONE,this.zoom=1,this._resetZoom=!1,this.displayScale=new v(1,1),this.autoRound=!1,this.autoCenter=d.CENTER.NO_CENTER,this.orientation=d.ORIENTATION.LANDSCAPE,this.fullscreen,this.fullscreenTarget=null,this._createdFullscreenTarget=!1,this.dirty=!1,this.resizeInterval=500,this._lastCheck=0,this._checkOrientation=!1,this.domlisteners={orientationChange:a,windowResize:a,fullScreenChange:a,fullScreenError:a}},preBoot:function(){this.parseConfig(this.game.config),this.game.events.once(e.BOOT,this.boot,this)},boot:function(){var g=this.game;this.canvas=g.canvas,this.fullscreen=g.device.fullscreen;var y=this.scaleMode;y!==d.SCALE_MODE.RESIZE&&y!==d.SCALE_MODE.EXPAND&&this.displaySize.setAspectMode(y),y===d.SCALE_MODE.NONE?this.resize(this.width,this.height):(this.getParentBounds(),this.parentSize.width>0&&this.parentSize.height>0&&this.disp Line truncated
`))},destroy:function(){for(var l=0;l<this.scenes.length;l++){var f=this.scenes[l].sys;f.destroy()}this.systemScene.sys.destroy(),this.update=s,this.scenes=[],this._pending=[],this._start=[],this._queue=[],this.game=null,this.systemScene=null}});p.exports=a}),52209:((p,S,t)=>{var d=t(45319),c=t(83419),h=t(44594),r=t(95540),n=t(37277),e=new c({initialize:function(o){this.scene=o,this.systems=o.sys,this.settings=o.sys.settings,this.key=o.sys.settings.key,this.manager=o.sys.game.scene,this.transitionProgress=0,this._elapsed=0,this._target=null,this._duration=0,this._onUpdate,this._onUpdateScope,this._willSleep=!1,this._willRemove=!1,o.sys.events.once(h.BOOT,this.boot,this),o.sys.events.on(h.START,this.pluginStart,this)},boot:function(){this.systems.events.once(h.DESTROY,this.destroy,this)},pluginStart:function(){this._target=null,this.systems.events.once(h.SHUTDOWN,this.shutdown,this)},start:function(s,o){return s===void 0&&(s=this.key),this.manager.queueOp("stop",this.key),this.manager.queueOp("start",s,o),this},restart:function(s){var o=this.key;return this.manager.queueOp("stop",o),this.manager.queueOp("start",o,s),this},transition:function(s){s===void 0&&(s={});var o=r(s,"target",!1),i=this.manager.getScene(o);if(!o||!this.checkValidTransition(i))return!1;var a=r(s,"duration",1e3);this._elapsed=0,this._target=i,this._duration=a,this._willSleep=r(s,"sleep",!1),this._willRemove=r(s,"remove",!1);var l=r(s,"onUpdate",null);l&&(this._onUpdate=l,this._onUpdateScope=r(s,"onUpdateScope",this.scene));var f=r(s,"allowInput",!1);this.settings.transitionAllowInput=f;var u=i.sys.settings;u.isTransition=!0,u.transitionFrom=this.scene,u.transitionDuration=a,u.transitionAllowInput=f,r(s,"moveAbove",!1)?this.manager.moveAbove(this.key,o):r(s,"moveBelow",!1)&&this.manager.moveBelow(this.key,o),i.sys.isSleeping()?i.sys.wake(r(s,"data")):this.manager.start(o,r(s,"data"));var v=r(s,"onStart",null),m=r(s,"onStartScope",this.scene);return v&&v.call(m,this.scene,i,a),this.systems.events.emit(h.TRANSITION_OUT,i,a),!0},checkValidTransition:function(s){return!(!s||s.sys.isActive()||s.sys.isTransitioning()||s===this.scene||this.systems.isTransitioning())},step:function(s,o){this._elapsed+=o,this.transitionProgress=d(this._elapsed/this._duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.transitionProgress),this._elapsed>=this._duration&&this.transitionComplete()},transitionComplete:function(){var s=this._target.sys,o=this._target.sys.settings;s.events.emit(h.TRANSITION_COMPLETE,this.scene),o.isTransition=!1,o.transitionFrom=null,this._duration=0,this._target=null,this._onUpdate=null,this._onUpdateScope=null,this._willRemove?this.manager.remove(this.key):this._willSleep?this.systems.sleep():this.manager.stop(this.key)},add:function(s,o,i,a){return this.manager.add(s,o,i,a)},launch:function(s,o){return s&&s!==this.key&&this.manager.queueOp("start",s,o),this},run:function(s,o){return s&&s!==this.key&&this.manager.queueOp("run",s,o),this},pause:function(s,o){return s===void 0&&(s=this.key),this.manager.queueOp("pause",s,o),this},resume:function(s,o){return s===void 0&&(s=this.key),this.manager.queueOp("resume",s,o),this},sleep:function(s,o){return s===void 0&&(s=this.key),this.manager.queueOp("sleep",s,o),this},wake:function(s,o){return s===void 0&&(s=this.key),this.manager.queueOp("wake",s,o),this},switch:function(s,o){return s!==this.key&&this.manager.queueOp("switch",this.key,s,o),this},stop:function(s,o){return s===void 0&&(s=this.key),this.manager.queueOp("stop",s,o),this},setActive:function(s,o,i){o===void 0&&(o=this.key);var a=this.manager.getScene(o);return a&&a.sys.setActive(s,i),this},setVisible:function(s,o){o===void 0&&(o=this.key);var i=this.manager.getScene(o);return i&&i.sys.setVisible(s),this},isSleeping:function(s){return s===void 0&&(s=this.key),this.manager.isSleeping(s)},isActive:function(s){return s===void 0&&(s=this.key),this.manager.isActive(s)},isPaused:function(s){return s===void 0&&(s=this.key),this.manager.isPaused(s)},isVisible:function(s){return s===void 0&&(s=this.key),this.manager.isVisible(s)},swapPosition:function(s,o){return o===void 0&&(o=this.key),s!==o&&this.manager.swapPosition(s,o),this},moveAbove:function(s,o){return o===void 0&&(o=this.key),s!==o&&this.manager.moveAbove(s,o),this},moveBelow:function(s,o){return o===void 0&&(o=this.key),s!==o&&this.manager.moveBelow(s,o),this},remove:function(s){return s===void 0&&(s=this.key),this.manager.remove(s),this},moveUp:function(s){return s===void 0&&(s=this.key),this.manager.moveUp(s),this},moveDown:function(s){return s===void 0&&(s=this.key),this.manager.moveDown(s),this},bringToTop:function(s){return s===void 0&&(s=this.key),this.manager.bringToTop(s),this},sendToBack:function(s){return s===void 0&&(s=this.key),this.manager.sendToBack(s),this},get:function(s){return this.manager.getScene(s)},getStatus:function(s){var o=this.manager.getScene(s);if(o)return o.sys.getStatus()},getIndex:function(s){return s===void 0&&(s=this.key),thi Line truncated
`),s=/^[ ]*(- )*(\w+)+[: ]+(.*)/,o="",i="",a={x:0,y:0,width:0,height:0},l=0;l<e.length;l++){var f=e[l].match(s);if(f){var u=f[1]==="- ",v=f[2],m=f[3];if(u&&(i!==o&&(t(c,h,i,a),o=i),a={x:0,y:0,width:0,height:0}),v==="name"){i=m;continue}switch(v){case"x":case"y":case"width":case"height":a[v]=parseInt(m,10);break}}}return i!==o&&t(c,h,i,a),c};p.exports=d}),55222:((p,S,t)=>{var d=t(50030),c=function(o){for(var i=o.mipmaps,a=1;a<i.length;a++){var l=i[a].width,f=i[a].height;if(!d(l,f))return console.warn("Mip level "+a+" is not a power-of-two size: "+l+"x"+f),!1}var u=s[o.internalFormat];return u?u(o):(console.warn("No format checker found for internal format "+o.internalFormat+". Assuming valid."),!0)};function h(o){for(var i=o.mipmaps,a=0;a<i.length;a++){var l=i[a].width,f=i[a].height;if((l<<a)%4!==0||(f<<a)%4!==0)return console.warn("BPTC, RGTC, and S3TC dimensions must be a multiple of 4 pixels, and each successive mip level must be half the size of the previous level, rounded down. Mip level "+a+" is "+l+"x"+f),!1}return!0}function r(){return!0}function n(o){var i=o.mipmaps,a=i[0];return d(a.width,a.height)?!0:(console.warn("PVRTC base dimensions must be power of two. Base level is "+a.width+"x"+a.height),!1)}function e(o){var i=o.mipmaps,a=i[0];return a.width%4!==0||a.height%4!==0?(console.warn("S3TC SRGB base dimensions must be a multiple of 4 pixels. Base level is "+a.width+"x"+a.height+" pixels"),!1):!0}var s={37488:r,37489:r,37490:r,37491:r,37492:r,37493:r,37494:r,37495:r,37496:r,37497:r,36196:r,37808:r,37809:r,37810:r,37811:r,37812:r,37813:r,37814:r,37815:r,37816:r,37817:r,37818:r,37819:r,37820:r,37821:r,37840:r,37841:r,37842:r,37843:r,37844:r,37845:r,37846:r,37847:r,37848:r,37849:r,37850:r,37851:r,37852:r,37853:r,36492:h,36493:h,36494:h,36495:h,36283:h,36284:h,36285:h,36286:h,35840:n,35841:n,35842:n,35843:n,33776:h,33777:h,33778:h,33779:h,35916:e,35917:e,35918:e,35919:e};p.exports=c}),61309:((p,S,t)=>{p.exports={AtlasXML:t(89905),Canvas:t(72893),Image:t(4832),JSONArray:t(78566),JSONHash:t(39711),KTXParser:t(31403),PVRParser:t(82038),SpriteSheet:t(75549),SpriteSheetFromAtlas:t(47534),UnityYAML:t(86147)}}),80341:(p=>{p.exports={CSV:0,TILED_JSON:1,ARRAY_2D:2,WELTMEISTER:3}}),16536:((p,S,t)=>{var d=t(83419),c=new d({initialize:function(r,n,e,s,o,i,a){(e===void 0||e<=0)&&(e=32),(s===void 0||s<=0)&&(s=32),o===void 0&&(o=0),i===void 0&&(i=0),this.name=r,this.firstgid=n|0,this.imageWidth=e|0,this.imageHeight=s|0,this.imageMargin=o|0,this.imageSpacing=i|0,this.properties=a||{},this.images=[],this.total=0},containsImageIndex:function(h){return h>=this.firstgid&&h<this.firstgid+this.total},addImage:function(h,r,n,e){return this.images.push({gid:h,image:r,width:n,height:e}),this.total++,this}});p.exports=c}),27462:((p,S,t)=>{var d=t(83419),c=new d({initialize:function(r){if(this.gids=[],r!==void 0)for(var n=0;n<r.length;++n)for(var e=r[n],s=0;s<e.total;++s)this.gids[e.firstgid+s]=e;this._gids=this.gids},enabled:{get:function(){return!!this.gids},set:function(h){this.gids=h?this._gids:void 0}},getTypeIncludingTile:function(h){if(h.type!==void 0&&h.type!=="")return h.type;if(!(!this.gids||h.gid===void 0)){var r=this.gids[h.gid];if(r){var n=r.getTileData(h.gid);if(n)return n.type}}},setTextureAndFrame:function(h,r,n,e){if(r===null&&this.gids&&e.gid!==void 0){var s=this.gids[e.gid];s&&(r===null&&s.image!==void 0&&(r=s.image.key),n===null&&(n=e.gid-s.firstgid),h.scene.textures.getFrame(r,n)||(r=null,n=null))}h.setTexture(r,n)},setPropertiesFromTiledObject:function(h,r){if(this.gids!==void 0&&r.gid!==void 0){var n=this.gids[r.gid];n!==void 0&&this.setFromJSON(h,n.getTileProperties(r.gid))}this.setFromJSON(h,r.properties)},setFromJSON:function(h,r){if(r){if(Array.isArray(r)){for(var n=0;n<r.length;n++){var e=r[n];h[e.name]!==void 0?h[e.name]=e.value:h.setData(e.name,e.value)}return}for(var s in r)h[s]!==void 0?h[s]=r[s]:h.setData(s,r[s])}}});p.exports=c}),31989:((p,S,t)=>{var d=t(80341),c=t(87010),h=t(46177),r=t(49075),n=function(e,s,o,i,a,l,f,u){o===void 0&&(o=32),i===void 0&&(i=32),a===void 0&&(a=10),l===void 0&&(l=10),u===void 0&&(u=!1);var v=null;if(Array.isArray(f)){var m=s!==void 0?s:"map";v=h(m,d.ARRAY_2D,f,o,i,u)}else if(s!==void 0){var x=e.cache.tilemap.get(s);x?v=h(s,x.format,x.data,o,i,u):console.warn("No map data found for key "+s)}return v===null&&(v=new c({tileWidth:o,tileHeight:i,width:a,height:l})),new r(e,v)};p.exports=n}),23029:((p,S,t)=>{var d=t(83419),c=t(31401),h=t(91907),r=t(62644),n=t(93232),e=new d({Mixins:[c.AlphaSingle,c.Flip,c.Visible],initialize:function(o,i,a,l,f,u,v,m){this.layer=o,this.index=i,this.x=a,this.y=l,this.width=f,this.height=u,this.right,this.bottom,this.baseWidth=v!==void 0?v:f,this.baseHeight=m!==void 0?m:u,this.pixelX=0,this.pixelY=0,this.updatePixelXY(),this.properties={},this.rotation=0,this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceLeft=!1,this.faceRight=!1,this.faceTop=!1,this.faceBottom=!1,this.collisionCallback=void 0,this.coll Line truncated
`).map(function(l){return l.split(",")}),a=c(r,i,e,s,o);return a.format=d.CSV,a};p.exports=h}),6656:((p,S,t)=>{var d=t(14977),c=t(23029),h=function(r,n){for(var e=[],s=0;s<r.layer.length;s++){for(var o=r.layer[s],i=new d({name:o.name,width:o.width,height:o.height,tileWidth:o.tilesize,tileHeight:o.tilesize,visible:o.visible===1}),a=[],l=[],f=0;f<o.data.length;f++){for(var u=0;u<o.data[f].length;u++){var v=o.data[f][u]-1,m;v>-1?m=new c(i,v,u,f,o.tilesize,o.tilesize):m=n?null:new c(i,-1,u,f,o.tilesize,o.tilesize),a.push(m)}l.push(a),a=[]}i.data=l,e.push(i)}return e};p.exports=h}),96483:((p,S,t)=>{var d=t(33629),c=function(h){for(var r=[],n=[],e=0;e<h.layer.length;e++){var s=h.layer[e],o=s.tilesetName;o!==""&&n.indexOf(o)===-1&&(n.push(o),r.push(new d(o,0,s.tilesize,s.tilesize,0,0)))}return r};p.exports=c}),87021:((p,S,t)=>{var d=t(80341),c=t(87010),h=t(6656),r=t(96483),n=function(e,s,o){if(s.layer.length===0)return console.warn("No layers found in the Weltmeister map: "+e),null;for(var i=0,a=0,l=0;l<s.layer.length;l++)s.layer[l].width>i&&(i=s.layer[l].width),s.layer[l].height>a&&(a=s.layer[l].height);var f=new c({width:i,height:a,name:e,tileWidth:s.layer[0].tilesize,tileHeight:s.layer[0].tilesize,format:d.WELTMEISTER});return f.layers=h(s,o),f.tilesets=r(s),f};p.exports=n}),52833:((p,S,t)=>{p.exports={ParseTileLayers:t(6656),ParseTilesets:t(96483),ParseWeltmeister:t(87021)}}),57442:((p,S,t)=>{p.exports={FromOrientationString:t(6641),Parse:t(46177),Parse2DArray:t(2342),ParseCSV:t(82593),Impact:t(52833),Tiled:t(96761)}}),51233:((p,S,t)=>{var d=t(79291),c=function(h){for(var r,n,e,s,o,i=0;i<h.layers.length;i++){r=h.layers[i],s=null;for(var a=0;a<r.data.length;a++){o=r.data[a];for(var l=0;l<o.length;l++)n=o[l],!(n===null||n.index<0)&&(e=h.tiles[n.index][2],s=h.tilesets[e],n.width=s.tileWidth,n.height=s.tileHeight,s.tileProperties&&s.tileProperties[n.index-s.firstgid]&&(n.properties=d(n.properties,s.tileProperties[n.index-s.firstgid])))}}};p.exports=c}),41868:(p=>{var S=function(t){for(var d=window.atob(t),c=d.length,h=new Array(c/4),r=0;r<c;r+=4)h[r/4]=(d.charCodeAt(r)|d.charCodeAt(r+1)<<8|d.charCodeAt(r+2)<<16|d.charCodeAt(r+3)<<24)>>>0;return h};p.exports=S}),84101:((p,S,t)=>{var d=t(33629),c=function(h){var r,n,e=[];for(r=0;r<h.imageCollections.length;r++)for(var s=h.imageCollections[r],o=s.images,i=0;i<o.length;i++){var a=o[i],l={x:0,y:a.height-h.tileHeight};n=new d(a.image,a.gid,a.width,a.height,0,0,void 0,void 0,l),n.updateTileData(a.width,a.height),h.tilesets.push(n)}for(r=0;r<h.tilesets.length;r++){n=h.tilesets[r];for(var f=n.tileMargin,u=n.tileMargin,v=0,m=0,x=0,g=n.firstgid;g<n.firstgid+n.total&&(e[g]=[f,u,r],f+=n.tileWidth+n.tileSpacing,v++,!(v===n.total||(m++,m===n.columns&&(f=n.tileMargin,u+=n.tileHeight+n.tileSpacing,m=0,x++,x===n.rows))));g++);}return e};p.exports=c}),79677:((p,S,t)=>{var d=t(95540),c=function(h,r,n){if(!r)return{i:0,layers:h.layers,name:"",opacity:1,visible:!0,x:0,y:0};var e=r.x+d(r,"startx",0)*h.tilewidth+d(r,"offsetx",0),s=r.y+d(r,"starty",0)*h.tileheight+d(r,"offsety",0);return{i:0,layers:r.layers,name:n.name+r.name+"/",opacity:n.opacity*r.opacity,visible:n.visible&&r.visible,x:n.x+e,y:n.y+s}};p.exports=c}),29920:(p=>{var S=2147483648,t=1073741824,d=536870912,c=function(h){var r=!!(h&S),n=!!(h&t),e=!!(h&d);h=h&536870911;var s=0,o=!1;return r&&n&&e?(s=Math.PI/2,o=!0):r&&n&&!e?(s=Math.PI,o=!1):r&&!n&&e?(s=Math.PI/2,o=!1):r&&!n&&!e?(s=0,o=!0):!r&&n&&e?(s=3*Math.PI/2,o=!1):!r&&n&&!e?(s=Math.PI,o=!0):!r&&!n&&e?(s=3*Math.PI/2,o=!0):!r&&!n&&!e&&(s=0,o=!1),{gid:h,flippedHorizontal:r,flippedVertical:n,flippedAntiDiagonal:e,rotation:s,flipped:o}};p.exports=c}),12635:((p,S,t)=>{var d=t(95540),c=t(79677),h=function(r){for(var n=[],e=[],s=c(r);s.i<s.layers.length||e.length>0;){if(s.i>=s.layers.length){if(e.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}s=e.pop();continue}var o=s.layers[s.i];if(s.i++,o.type!=="imagelayer"){if(o.type==="group"){var i=c(r,o,s);e.push(s),s=i}continue}var a=d(o,"offsetx",0)+d(o,"startx",0),l=d(o,"offsety",0)+d(o,"starty",0);n.push({name:s.name+o.name,image:o.image,x:s.x+a+o.x,y:s.y+l+o.y,alpha:s.opacity*o.opacity,visible:s.visible&&o.visible,properties:d(o,"properties",{})})}return n};p.exports=h}),46594:((p,S,t)=>{var d=t(51233),c=t(84101),h=t(91907),r=t(62644),n=t(80341),e=t(6641),s=t(87010),o=t(12635),i=t(22611),a=t(28200),l=t(24619),f=function(u,v,m){var x=r(v),g=new s({width:x.width,height:x.height,name:u,tileWidth:x.tilewidth,tileHeight:x.tileheight,orientation:e(x.orientation),format:n.TILED_JSON,version:x.version,properties:x.properties,renderOrder:x.renderorder,infinite:x.infinite});if(g.orientation===h.HEXAGONAL)if(g.hexSideLength=x.hexsidelength,g.staggerAxis=x.staggeraxis,g.staggerIndex=x.staggerindex,g.staggerAxis==="y"){var y=(g.tileHeight-g.hexSideLength)/2;g.widthInPixels=g.tileWidth*(g.width+.5),g.heightInPixels=g.height*(g.hexSideLength+y)+y}else{var T=(g.tileWidth-g.hexSideLength)/2;g.widthInPixels Line truncated
`;for(var i=0;i<r[e].length;i++)n+="---",i<r[e].length-1&&(n+="+");n+=`
`}}return n};p.exports=h}),92598:(p=>{var S=function(t){return t.reverse()};p.exports=S}),21224:(p=>{var S=function(t){for(var d=0;d<t.length;d++)t[d].reverse();return t};p.exports=S}),98717:((p,S,t)=>{var d=t(37829),c=function(h){return d(h,180)};p.exports=c}),44657:((p,S,t)=>{var d=t(37829),c=function(h,r){r===void 0&&(r=1);for(var n=0;n<r;n++)h=d(h,90);return h};p.exports=c}),37829:((p,S,t)=>{var d=t(86922),c=t(2429),h=function(r,n){if(n===void 0&&(n=90),!d(r))return null;if(typeof n!="string"&&(n=(n%360+360)%360),n===90||n===-270||n==="rotateLeft")r=c(r),r.reverse();else if(n===-90||n===270||n==="rotateRight")r.reverse(),r=c(r);else if(Math.abs(n)===180||n==="rotate180"){for(var e=0;e<r.length;e++)r[e].reverse();r.reverse()}return r};p.exports=h}),92632:((p,S,t)=>{var d=t(37829),c=function(h,r){r===void 0&&(r=1);for(var n=0;n<r;n++)h=d(h,-90);return h};p.exports=c}),69512:((p,S,t)=>{var d=t(86003),c=t(49498),h=function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),e!==0&&(e<0?d(r,Math.abs(e)):c(r,e)),n!==0)for(var s=0;s<r.length;s++){var o=r[s];n<0?d(o,Math.abs(n)):c(o,n)}return r};p.exports=h}),2429:(p=>{var S=function(t){for(var d=t.length,c=t[0].length,h=new Array(c),r=0;r<c;r++){h[r]=new Array(d);for(var n=d-1;n>-1;n--)h[r][n]=t[n][r]}return h};p.exports=S}),54915:((p,S,t)=>{p.exports={CheckMatrix:t(86922),MatrixToString:t(63362),ReverseColumns:t(92598),ReverseRows:t(21224),Rotate180:t(98717),RotateLeft:t(44657),RotateMatrix:t(37829),RotateRight:t(92632),Translate:t(69512),TransposeMatrix:t(2429)}}),71334:(p=>{var S="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=function(d,c){for(var h=new Uint8Array(d),r=h.length,n=c?"data:"+c+";base64,":"",e=0;e<r;e+=3)n+=S[h[e]>>2],n+=S[(h[e]&3)<<4|h[e+1]>>4],n+=S[(h[e+1]&15)<<2|h[e+2]>>6],n+=S[h[e+2]&63];return r%3===2?n=n.substring(0,n.length-1)+"=":r%3===1&&(n=n.substring(0,n.length-2)+"=="),n};p.exports=t}),53134:(p=>{for(var S="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=new Uint8Array(256),d=0;d<S.length;d++)t[S.charCodeAt(d)]=d;var c=function(h){h=h.substr(h.indexOf(",")+1);var r=h.length,n=r*.75,e=0,s,o,i,a;h[r-1]==="="&&(n--,h[r-2]==="="&&n--);for(var l=new ArrayBuffer(n),f=new Uint8Array(l),u=0;u<r;u+=4)s=t[h.charCodeAt(u)],o=t[h.charCodeAt(u+1)],i=t[h.charCodeAt(u+2)],a=t[h.charCodeAt(u+3)],f[e++]=s<<2|o>>4,f[e++]=(o&15)<<4|i>>2,f[e++]=(i&3)<<6|a&63;return l};p.exports=c}),65839:((p,S,t)=>{p.exports={ArrayBufferToBase64:t(71334),Base64ToArrayBuffer:t(53134)}}),91799:((p,S,t)=>{p.exports={Array:t(37105),Base64:t(65839),Objects:t(1183),String:t(31749),NOOP:t(29747),NULL:t(20242)}}),41786:(p=>{var S=function(t){var d={};for(var c in t)Array.isArray(t[c])?d[c]=t[c].slice(0):d[c]=t[c];return d};p.exports=S}),62644:(p=>{var S=function(t){var d,c,h;if(typeof t!="object"||t===null)return t;d=Array.isArray(t)?[]:{};for(h in t)c=t[h],d[h]=S(c);return d};p.exports=S}),79291:((p,S,t)=>{var d=t(41212),c=function(){var h,r,n,e,s,o,i=arguments[0]||{},a=1,l=arguments.length,f=!1;for(typeof i=="boolean"&&(f=i,i=arguments[1]||{},a=2),l===a&&(i=this,--a);a<l;a++)if((h=arguments[a])!=null)for(r in h)n=i[r],e=h[r],i!==e&&(f&&e&&(d(e)||(s=Array.isArray(e)))?(s?(s=!1,o=n&&Array.isArray(n)?n:[]):o=n&&d(n)?n:{},i[r]=c(f,o,e)):e!==void 0&&(i[r]=e));return i};p.exports=c}),23568:((p,S,t)=>{var d=t(75508),c=t(35154),h=function(r,n,e){var s=c(r,n,null);if(s===null)return e;if(Array.isArray(s))return d.RND.pick(s);if(typeof s=="object"){if(s.hasOwnProperty("randInt"))return d.RND.integerInRange(s.randInt[0],s.randInt[1]);if(s.hasOwnProperty("randFloat"))return d.RND.realInRange(s.randFloat[0],s.randFloat[1])}else if(typeof s=="function")return s(n);return s};p.exports=h}),95540:(p=>{var S=function(t,d,c){var h=typeof t;return!t||h==="number"||h==="string"?c:t.hasOwnProperty(d)&&t[d]!==void 0?t[d]:c};p.exports=S}),82840:((p,S,t)=>{var d=t(35154),c=t(45319),h=function(r,n,e,s,o){o===void 0&&(o=e);var i=d(r,n,o);return c(i,e,s)};p.exports=h}),35154:(p=>{var S=function(t,d,c,h){if(!t&&!h||typeof t=="number")return c;if(t&&t.hasOwnProperty(d))return t[d];if(h&&h.hasOwnProperty(d))return h[d];if(d.indexOf(".")!==-1){for(var r=d.split("."),n=t,e=h,s=c,o=c,i=!0,a=!0,l=0;l<r.length;l++)n&&n.hasOwnProperty(r[l])?(s=n[r[l]],n=n[r[l]]):i=!1,e&&e.hasOwnProperty(r[l])?(o=e[r[l]],e=e[r[l]]):a=!1;return i?s:a?o:c}else return c};p.exports=S}),69036:(p=>{var S=function(t,d){for(var c=0;c<d.length;c++)if(!t.hasOwnProperty(d[c]))return!1;return!0};p.exports=S}),1985:(p=>{var S=function(t,d){for(var c=0;c<d.length;c++)if(t.hasOwnProperty(d[c]))return!0;return!1};p.exports=S}),97022:(p=>{var S=function(t,d){return t.hasOwnProperty(d)};p.exports=S}),41212:(p=>{var S=function(t){if(!t||typeof t!="object"||t.nodeType||t===t.window)return!1;try{if(t.constructor&&!{}.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch{return!1}return!0};p.exports=S}),46975:((p,S,t)=>{var d=t(41786),c=function(h,r){var n=d(h);for(var e in r)n.hasOwnPropert Line truncated
@@ -0,0 +1,16 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" href="data:," />
<title>OpenOPC Pixel Office</title>
<script type="module" crossorigin src="./assets/index-iXYjKKT7.js"></script>
<link rel="modulepreload" crossorigin href="./assets/phaser-DFK5Ua9d.js">
<link rel="stylesheet" crossorigin href="./assets/index-CyXk-Ux0.css">
</head>
<body>
<div id="root"></div>
</body>
</html>