@shumai-one/shumai 0.3.2 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/{chunk-dwswqq3g.js → chunk-0a0sdyta.js} +1 -1
- package/bin/{chunk-qmtvy2j4.js → chunk-0dcv6kpk.js} +2 -2
- package/bin/chunk-1cjgpspz.js +2 -0
- package/bin/chunk-1pgtq4rc.js +2 -0
- package/bin/chunk-1rsp4hc5.js +1 -0
- package/bin/{chunk-7eycsyk6.js → chunk-2475z7vk.js} +1 -1
- package/bin/chunk-25qj10ny.js +1 -0
- package/bin/{chunk-gn8snrnk.js → chunk-2fc5hk8r.js} +1 -1
- package/bin/{chunk-qc6dmzn0.js → chunk-2jvqhps9.js} +2 -2
- package/bin/{chunk-ve7v8wtv.js → chunk-3823qzr0.js} +2 -2
- package/bin/{chunk-zxpef55w.js → chunk-3g9g2c7h.js} +3 -3
- package/bin/chunk-3gcnj1eq.js +2 -0
- package/bin/chunk-41m51y08.js +2 -0
- package/bin/chunk-4g7h9qhr.js +8 -0
- package/bin/chunk-4v5ykazp.js +1 -0
- package/bin/{chunk-k20bhxed.js → chunk-525eypdk.js} +1 -1
- package/bin/{chunk-h2wsm7h3.js → chunk-57kgmgfs.js} +2 -2
- package/bin/{chunk-gvn079hy.js → chunk-5cm4vge8.js} +2 -2
- package/bin/{chunk-31mjcykb.js → chunk-5vwkfxy7.js} +2 -2
- package/bin/chunk-5x3vzer8.js +1 -0
- package/bin/chunk-67rr836p.js +3 -0
- package/bin/chunk-6jgq154r.js +2 -0
- package/bin/chunk-7436fyrg.js +2 -0
- package/bin/{chunk-s05f0v9t.js → chunk-749c09cw.js} +1 -1
- package/bin/{chunk-9p2d0mk1.js → chunk-7anqxx1z.js} +1 -1
- package/bin/{chunk-s7qpj715.js → chunk-7pjes19z.js} +2 -2
- package/bin/{chunk-f8cn9m28.js → chunk-7x7jtkh8.js} +1 -1
- package/bin/chunk-804ndet8.js +2 -0
- package/bin/chunk-8a75zqbz.js +2 -0
- package/bin/{chunk-tsncwscz.js → chunk-9a7a1p1j.js} +2 -2
- package/bin/chunk-9e99n265.js +12 -0
- package/bin/chunk-9g6vy76b.js +2 -0
- package/bin/{chunk-wap08p4j.js → chunk-9sdhdhv4.js} +2 -2
- package/bin/{chunk-g2dk56e7.js → chunk-9vgjhemh.js} +1 -1
- package/bin/{chunk-1dawjfk8.js → chunk-9zvteyz0.js} +2 -2
- package/bin/chunk-a8daqpfh.js +7 -0
- package/bin/{chunk-na2nympm.js → chunk-am1m29pv.js} +1 -1
- package/bin/{chunk-xawwxdq9.js → chunk-bd6x5ns9.js} +2 -2
- package/bin/{chunk-wr5byz6r.js → chunk-bn4ewsy8.js} +1 -1
- package/bin/{chunk-ss45w8ks.js → chunk-bw6wyw7k.js} +2 -2
- package/bin/{chunk-8e5zvy88.js → chunk-c0c88nje.js} +48 -48
- package/bin/chunk-c7rj0f5r.js +3 -0
- package/bin/chunk-cdqvg03f.js +3 -0
- package/bin/{chunk-zs9b0f3z.js → chunk-d3kpqay2.js} +2 -2
- package/bin/chunk-d6v81kjj.js +1 -0
- package/bin/chunk-dfcrtdk2.js +1 -0
- package/bin/chunk-eczsk2xd.js +62 -0
- package/bin/{chunk-yahb7wan.js → chunk-ey7vty63.js} +2 -2
- package/bin/{chunk-nzy3pjjm.js → chunk-fwqpq2sy.js} +2 -2
- package/bin/{chunk-vnfmh5ke.js → chunk-g097058z.js} +2 -2
- package/bin/{chunk-a76c5r3c.js → chunk-g224r7mc.js} +2 -2
- package/bin/chunk-g5e93f59.js +2 -0
- package/bin/chunk-g5xkj9p3.js +2 -0
- package/bin/chunk-gaemak59.js +4 -0
- package/bin/{chunk-hrzm70wg.js → chunk-gh4w2bdg.js} +1 -1
- package/bin/chunk-gpeyctxd.js +2 -0
- package/bin/{chunk-v2kfr8fx.js → chunk-gpmaaca1.js} +2 -2
- package/bin/{chunk-1d22tysv.js → chunk-h4a3ms2b.js} +2 -2
- package/bin/chunk-h73653yp.js +1 -0
- package/bin/chunk-hp139z0j.js +2 -0
- package/bin/chunk-hz6s7by4.js +11 -0
- package/bin/chunk-j4y8c864.js +1 -0
- package/bin/chunk-jkh04dka.js +8 -0
- package/bin/chunk-m268vcdm.js +2 -0
- package/bin/{chunk-vy24ncn2.js → chunk-m6sssvg3.js} +1 -1
- package/bin/chunk-mggfc9ya.js +2 -0
- package/bin/chunk-mhwp74hh.js +3 -0
- package/bin/{chunk-vgb8bzcg.js → chunk-mm810jv7.js} +2 -2
- package/bin/chunk-p1bcbtmg.js +3 -0
- package/bin/chunk-p86w1eaw.js +45 -0
- package/bin/{chunk-1nh6xgek.js → chunk-p8enen2a.js} +1 -1
- package/bin/chunk-pbb1tdwt.js +1 -0
- package/bin/chunk-pbfkw90e.js +1 -0
- package/bin/chunk-pdajhyqm.js +2 -0
- package/bin/{chunk-ph3e1bpp.js → chunk-pqxh0cg7.js} +2 -2
- package/bin/chunk-q8me9zev.js +1 -0
- package/bin/chunk-qshm5vcn.js +2 -0
- package/bin/chunk-qx2mzv89.js +2 -0
- package/bin/{chunk-amsb41z5.js → chunk-r5jmnsqj.js} +1 -1
- package/bin/{chunk-arpna31w.js → chunk-rt0pvhdf.js} +1 -1
- package/bin/{chunk-kgb16ggd.css → chunk-s10v4b01.css} +1 -1
- package/bin/{chunk-rrxjvewm.js → chunk-s1b5kf34.js} +2 -2
- package/bin/{chunk-ws07a9kv.js → chunk-t15a1vp6.js} +1 -1
- package/bin/{chunk-3rcc5s99.js → chunk-tc7q988r.js} +2 -2
- package/bin/chunk-ts9f4zqh.js +5 -0
- package/bin/chunk-tzmzqmcg.js +7 -0
- package/bin/chunk-v0xbr5e6.js +2 -0
- package/bin/{chunk-08mxv0sm.js → chunk-v0yhkcj5.js} +2 -2
- package/bin/{chunk-3t7mjvdv.js → chunk-v75fanse.js} +2 -2
- package/bin/chunk-va6hxm7n.js +3 -0
- package/bin/chunk-vf3bg920.js +3 -0
- package/bin/{chunk-ejfmxjw6.js → chunk-vg6mkdj1.js} +2 -2
- package/bin/{chunk-j0p1peav.js → chunk-wkth5xwr.js} +2 -2
- package/bin/chunk-wpntb95k.js +2 -0
- package/bin/{chunk-mahxw48e.js → chunk-wtzkfwmx.js} +2 -2
- package/bin/{chunk-hfp4hpca.js → chunk-x0r8dcq0.js} +2 -2
- package/bin/{chunk-etces6ff.js → chunk-xcbb21j9.js} +2 -2
- package/bin/{chunk-mcxsk75h.js → chunk-xgb533n0.js} +3 -3
- package/bin/{chunk-7jjc175m.js → chunk-xn9cpax1.js} +3 -3
- package/bin/{chunk-5vqan9c4.js → chunk-xsw3pb5p.js} +2 -2
- package/bin/chunk-yedr4r8a.js +2 -0
- package/bin/chunk-yfjn4qn2.js +1 -0
- package/bin/chunk-yfkcv10v.js +2 -0
- package/bin/{chunk-20y3wte3.js → chunk-yj6tmjsc.js} +2 -2
- package/bin/chunk-z9560a6e.js +1 -0
- package/bin/chunk-zgsy3k3h.js +3 -0
- package/bin/shumai-app.html +1 -1
- package/bin/shumai-app.js +375 -338
- package/package.json +7 -7
- package/prisma/migrations/20260801065040_add_audit_log/migration.sql +33 -0
- package/prisma/migrations/20260805021613_add_asset_autofill_context/migration.sql +2 -0
- package/prisma/schema.prisma +25 -0
- package/bin/chunk-08dr94gp.js +0 -2
- package/bin/chunk-0t4z17qr.js +0 -2
- package/bin/chunk-2ynx0den.js +0 -8
- package/bin/chunk-31a3k77j.js +0 -2
- package/bin/chunk-3jdef7n4.js +0 -6
- package/bin/chunk-4ahve1nf.js +0 -2
- package/bin/chunk-4hdnrwh1.js +0 -1
- package/bin/chunk-4hdx2tv0.js +0 -2
- package/bin/chunk-4htdb0xp.js +0 -1
- package/bin/chunk-4p7xpfey.js +0 -2
- package/bin/chunk-5f81c951.js +0 -1
- package/bin/chunk-5zntjzxw.js +0 -3
- package/bin/chunk-6a2eb3b5.js +0 -3
- package/bin/chunk-6t3gdd7e.js +0 -2
- package/bin/chunk-7d5kep8c.js +0 -2
- package/bin/chunk-7kzqkp5z.js +0 -1
- package/bin/chunk-7sh6409h.js +0 -1
- package/bin/chunk-7y8dng8t.js +0 -2
- package/bin/chunk-8m6zg15c.js +0 -4
- package/bin/chunk-8qyke29r.js +0 -7
- package/bin/chunk-90et6bwm.js +0 -3
- package/bin/chunk-9c7fxjej.js +0 -2
- package/bin/chunk-a10tf0d8.js +0 -3
- package/bin/chunk-b10meywb.js +0 -2
- package/bin/chunk-b1e3tec3.js +0 -62
- package/bin/chunk-bdjhb77e.js +0 -2
- package/bin/chunk-beay9amy.js +0 -1
- package/bin/chunk-c3fvs0bv.js +0 -4
- package/bin/chunk-c5my1b3k.js +0 -7
- package/bin/chunk-d3s00sn0.js +0 -2
- package/bin/chunk-dhekxndw.js +0 -3
- package/bin/chunk-dwaj1yn4.js +0 -2
- package/bin/chunk-er1rb6yj.js +0 -1
- package/bin/chunk-etqpzc9e.js +0 -3
- package/bin/chunk-fdpjw17x.js +0 -7
- package/bin/chunk-gqh4ttjh.js +0 -3
- package/bin/chunk-hz31j0hk.js +0 -4
- package/bin/chunk-jm6bxtzt.js +0 -41
- package/bin/chunk-jstc7pka.js +0 -2
- package/bin/chunk-k0a35mg9.js +0 -2
- package/bin/chunk-k9w6mk9d.js +0 -3
- package/bin/chunk-m4py21f3.js +0 -2
- package/bin/chunk-mm1j72a8.js +0 -7
- package/bin/chunk-nr89225z.js +0 -2
- package/bin/chunk-nrf5r23d.js +0 -1
- package/bin/chunk-nt9tfjx6.js +0 -12
- package/bin/chunk-p396vw9h.js +0 -8
- package/bin/chunk-p9xfyqh1.js +0 -2
- package/bin/chunk-pj0fgb2x.js +0 -6
- package/bin/chunk-pp072ksj.js +0 -2
- package/bin/chunk-q5cdjzbv.js +0 -3
- package/bin/chunk-qn96vbke.js +0 -2
- package/bin/chunk-qvgc9e08.js +0 -3
- package/bin/chunk-s5rfya1p.js +0 -1
- package/bin/chunk-scsy69bp.js +0 -1
- package/bin/chunk-sf6fwvrs.js +0 -8
- package/bin/chunk-t2txvzkp.js +0 -3
- package/bin/chunk-td54rdfj.js +0 -8
- package/bin/chunk-vb9m47z9.js +0 -1
- package/bin/chunk-vf066xwh.js +0 -3
- package/bin/chunk-w3a50kz8.js +0 -3
- package/bin/chunk-w9w5301f.js +0 -4
- package/bin/chunk-wny0qagx.js +0 -3
- package/bin/chunk-wqhk76de.js +0 -14
- package/bin/chunk-wrz9e73c.js +0 -2
- package/bin/chunk-x5dcgk62.js +0 -6
- package/bin/chunk-xwmsxg5x.js +0 -1
- package/bin/chunk-y2nw8rbx.js +0 -4
- package/bin/chunk-y9ttm07y.js +0 -3
- package/bin/chunk-z0ej44ak.js +0 -3
- package/bin/chunk-zemgtnk0.js +0 -1
- package/bin/chunk-zg0vm233.js +0 -2
- package/bin/chunk-zhd2mkbr.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Ag as TJ,Bg as PZ,Og as N5,yg as x0}from"./chunk-eczsk2xd.js";import{Fk as TZ}from"./chunk-t15a1vp6.js";var FQ=TZ(x0(),1);var b5=({onResize:J,className:Q=""})=>{let[Z,$]=FQ.useState(!1),q=FQ.useRef(0);FQ.useEffect(()=>{if(!Z)return;let K=(B)=>{let N=B.clientX-q.current;q.current=B.clientX,J(N)},X=()=>{$(!1),document.body.style.cursor=""};return document.addEventListener("mousemove",K),document.addEventListener("mouseup",X),document.body.style.cursor="col-resize",()=>{document.removeEventListener("mousemove",K),document.removeEventListener("mouseup",X),document.body.style.cursor=""}},[Z,J]);let Y=(K)=>{K.preventDefault(),K.stopPropagation(),$(!0),q.current=K.clientX},H=()=>TJ("div",{className:"absolute inset-y-0 -left-4 -right-4 z-20 cursor-col-resize touch-none"});return PZ("div",{className:`group relative z-20 flex h-full w-[2px] cursor-col-resize items-center justify-center bg-border transition-all hover:bg-transparent ${Q}`,onMouseDown:Y,children:[TJ(H,{}),TJ("div",{className:`absolute inset-y-0 w-[2px] transition-all duration-300 ease-out
|
|
2
2
|
${Z?"bg-blue-600 shadow-[0_0_15px_rgba(37,99,235,0.6)] opacity-100":"bg-blue-400 opacity-0 group-hover:opacity-100 group-hover:shadow-[0_0_8px_rgba(96,165,250,0.5)]"}
|
|
3
3
|
`}),TJ("div",{className:`absolute top-1/2 left-1/2 h-10 w-1.5 -translate-x-1/2 -translate-y-1/2 rounded-full bg-blue-600 transition-all duration-300 ease-out
|
|
4
4
|
${Z?"opacity-100 scale-100 shadow-[0_0_10px_rgba(37,99,235,0.5)]":"opacity-0 scale-75 group-hover:opacity-100 group-hover:scale-100"}`})]})};var e$=Symbol.for("preact-signals");function xZ(){if(!(PJ>1)){var J,Q=!1;(function(){var q=SZ;SZ=void 0;while(q!==void 0){if(q.S.v===q.v)q.S.i=q.i;q=q.o}})();while(cQ!==void 0){var Z=cQ;cQ=void 0,EZ++;while(Z!==void 0){var $=Z.u;if(Z.u=void 0,Z.f&=-3,!(8&Z.f)&&_9(Z))try{Z.c()}catch(q){if(!Q)J=q,Q=!0}Z=$}}if(EZ=0,PJ--,Q)throw J}else PJ--}function JJ(J){if(PJ>0)return J();h0=++Jq,PJ++;try{return J()}finally{xZ()}}var k=void 0;function C(J){var Q=k;k=void 0;try{return J()}finally{k=Q}}var p9,cQ=void 0,PJ=0,EZ=0,Jq=0,h0=0,SZ=void 0,kZ=0;function d9(J){if(k!==void 0){var Q=J.n;if(Q===void 0||Q.t!==k){if(Q={i:0,S:J,p:k.s,n:void 0,t:k,e:void 0,x:void 0,r:Q},k.s!==void 0)k.s.n=Q;if(k.s=Q,J.n=Q,32&k.f)J.S(Q);return Q}else if(Q.i===-1){if(Q.i=0,Q.n!==void 0){if(Q.n.p=Q.p,Q.p!==void 0)Q.p.n=Q.n;Q.p=k.s,Q.n=void 0,k.s.n=Q,k.s=Q}return Q}}}function r(J,Q){this.v=J,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=Q==null?void 0:Q.watched,this.Z=Q==null?void 0:Q.unwatched,this.name=Q==null?void 0:Q.name}r.prototype.brand=e$;r.prototype.h=function(){return!0};r.prototype.S=function(J){var Q=this,Z=this.t;if(Z!==J&&J.e===void 0)if(J.x=Z,this.t=J,Z!==void 0)Z.e=J;else C(function(){var $;($=Q.W)==null||$.call(Q)})};r.prototype.U=function(J){var Q=this;if(this.t!==void 0){var{e:Z,x:$}=J;if(Z!==void 0)Z.x=$,J.e=void 0;if($!==void 0)$.e=Z,J.x=void 0;if(J===this.t){if(this.t=$,$===void 0)C(function(){var q;(q=Q.Z)==null||q.call(Q)})}}};r.prototype.subscribe=function(J){var Q=this;return o(function(){var Z=Q.value,$=k;k=void 0;try{J(Z)}finally{k=$}},{name:"sub"})};r.prototype.valueOf=function(){return this.value};r.prototype.toString=function(){return this.value+""};r.prototype.toJSON=function(){return this.value};r.prototype.peek=function(){var J=this;return C(function(){return J.value})};Object.defineProperty(r.prototype,"value",{get:function(){var J=d9(this);if(J!==void 0)J.i=this.i;return this.v},set:function(J){if(J!==this.v){if(EZ>100)throw Error("Cycle detected");(function(Z){if(PJ!==0&&EZ===0){if(Z.l!==h0)Z.l=h0,SZ={S:Z,v:Z.v,i:Z.i,o:SZ}}})(this),this.v=J,this.i++,kZ++,PJ++;try{for(var Q=this.t;Q!==void 0;Q=Q.x)Q.t.N()}finally{xZ()}}}});function IJ(J,Q){return new r(J,Q)}function _9(J){for(var Q=J.s;Q!==void 0;Q=Q.n)if(Q.S.i!==Q.i||!Q.S.h()||Q.S.i!==Q.i)return!0;return!1}function c9(J){for(var Q=J.s;Q!==void 0;Q=Q.n){var Z=Q.S.n;if(Z!==void 0)Q.r=Z;if(Q.S.n=Q,Q.i=-1,Q.n===void 0){J.s=Q;break}}}function l9(J){var Q=J.s,Z=void 0;while(Q!==void 0){var $=Q.p;if(Q.i===-1){if(Q.S.U(Q),$!==void 0)$.n=Q.n;if(Q.n!==void 0)Q.n.p=$}else Z=Q;if(Q.S.n=Q.r,Q.r!==void 0)Q.r=void 0;Q=$}J.s=Z}function sJ(J,Q){r.call(this,void 0),this.x=J,this.s=void 0,this.g=kZ-1,this.f=4,this.W=Q==null?void 0:Q.watched,this.Z=Q==null?void 0:Q.unwatched,this.name=Q==null?void 0:Q.name}sJ.prototype=new r;sJ.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32)return!0;if(this.f&=-5,this.g===kZ)return!0;if(this.g=kZ,this.f|=1,this.i>0&&!_9(this))return this.f&=-2,!0;var J=k;try{c9(this),k=this;var Q=this.x();if(16&this.f||this.v!==Q||this.i===0)this.v=Q,this.f&=-17,this.i++}catch(Z){this.v=Z,this.f|=16,this.i++}return k=J,l9(this),this.f&=-2,!0};sJ.prototype.S=function(J){if(this.t===void 0){this.f|=36;for(var Q=this.s;Q!==void 0;Q=Q.n)Q.S.S(Q)}r.prototype.S.call(this,J)};sJ.prototype.U=function(J){if(this.t!==void 0){if(r.prototype.U.call(this,J),this.t===void 0){this.f&=-33;for(var Q=this.s;Q!==void 0;Q=Q.n)Q.S.U(Q)}}};sJ.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var J=this.t;J!==void 0;J=J.x)J.t.N()}};Object.defineProperty(sJ.prototype,"value",{get:function(){if(1&this.f)throw Error("Cycle detected");var J=d9(this);if(this.h(),J!==void 0)J.i=this.i;if(16&this.f)throw this.v;return this.v}});function y0(J,Q){return new sJ(J,Q)}function s9(J){var Q=J.m;if(J.m=void 0,typeof Q=="function"){PJ++;var Z=k;k=void 0;try{Q()}catch($){throw J.f&=-2,J.f|=8,f0(J),$}finally{k=Z,xZ()}}}function f0(J){for(var Q=J.s;Q!==void 0;Q=Q.n)Q.S.U(Q);J.x=void 0,J.s=void 0,s9(J)}function Qq(J){if(k!==this)throw Error("Out-of-order effect");if(l9(this),k=J,this.f&=-2,8&this.f)f0(this);xZ()}function zQ(J,Q){if(this.x=J,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=Q==null?void 0:Q.name,p9)p9.push(this)}zQ.prototype.c=function(){var J=this.S();try{if(8&this.f)return;if(this.x===void 0)return;var Q=this.x();if(typeof Q=="function")this.m=Q}finally{J()}};zQ.prototype.S=function(){if(1&this.f)throw Error("Cycle detected");this.f|=1,this.f&=-9,s9(this),c9(this),PJ++;var J=k;return k=this,Qq.bind(this,J)};zQ.prototype.N=function(){if(!(2&this.f))this.f|=2,this.u=cQ,cQ=this};zQ.prototype.d=function(){if(this.f|=8,!(1&this.f))f0(this)};zQ.prototype.dispose=function(){this.d()};function o(J,Q){var Z=new zQ(J,Q);try{Z.c()}catch(q){throw Z.d(),q}var $=Z.d.bind(Z);return $[Symbol.dispose]=$,$}var{create:Zq,defineProperty:s0,defineProperties:$q,getOwnPropertyDescriptor:qq,getOwnPropertyDescriptors:Yq,getOwnPropertySymbols:o9}=Object,Kq=Object.prototype.hasOwnProperty,Hq=Object.prototype.propertyIsEnumerable,n9=(J,Q)=>(Q=Symbol[J])?Q:Symbol.for("Symbol."+J),MQ=(J)=>{throw TypeError(J)},m0=(J,Q,Z)=>(Q in J)?s0(J,Q,{enumerable:!0,configurable:!0,writable:!0,value:Z}):J[Q]=Z,Xq=(J,Q)=>{for(var Z in Q||(Q={}))if(Kq.call(Q,Z))m0(J,Z,Q[Z]);if(o9){for(var Z of o9(Q))if(Hq.call(Q,Z))m0(J,Z,Q[Z])}return J},Wq=(J,Q)=>$q(J,Yq(Q)),i9=(J,Q)=>s0(J,"name",{value:Q,configurable:!0}),Bq=(J)=>{var Q;return[,,,Zq((Q=J==null?void 0:J[n9("metadata")])!=null?Q:null)]},a9=["class","method","getter","setter","accessor","field","value","get","set"],lQ=(J)=>J!==void 0&&typeof J!=="function"?MQ("Function expected"):J,Nq=(J,Q,Z,$,q)=>({kind:a9[J],name:Q,metadata:$,addInitializer:(Y)=>Z._?MQ("Already initialized"):q.push(lQ(Y||null))}),r9=(J,Q)=>m0(Q,n9("metadata"),J[3]),oJ=(J,Q,Z,$)=>{for(var q=0,Y=J[Q>>1],H=Y&&Y.length;q<H;q++)Q&1?Y[q].call(Z):$=Y[q].call(Z,$);return $},wQ=(J,Q,Z,$,q,Y)=>{var H,K,X,B,N,W=Q&7,G=!!(Q&8),L=!!(Q&16),F=W>3?J.length+1:W?G?1:2:0,z=a9[W+5],A=W>3&&(J[F-1]=[]),I=J[F]||(J[F]=[]),U=W&&(!L&&!G&&(q=q.prototype),W<5&&(W>3||!L)&&qq(W<4?q:{get[Z](){return LJ(this,Y)},set[Z](V){return vJ(this,Y,V)}},Z));W?L&&W<4&&i9(Y,(W>2?"set ":W>1?"get ":"")+Z):i9(q,Z);for(var M=$.length-1;M>=0;M--){if(B=Nq(W,Z,X={},J[3],I),W){if(B.static=G,B.private=L,N=B.access={has:L?(V)=>Uq(q,V):(V)=>(Z in V)},W^3)N.get=L?(V)=>(W^1?LJ:Lq)(V,q,W^4?Y:U.get):(V)=>V[Z];if(W>2)N.set=L?(V,w)=>vJ(V,q,w,W^4?Y:U.set):(V,w)=>V[Z]=w}if(K=(0,$[M])(W?W<4?L?Y:U[z]:W>4?void 0:{get:U.get,set:U.set}:q,B),X._=1,W^4||K===void 0)lQ(K)&&(W>4?A.unshift(K):W?L?Y=K:U[z]=K:q=K);else if(typeof K!=="object"||K===null)MQ("Object expected");else lQ(H=K.get)&&(U.get=H),lQ(H=K.set)&&(U.set=H),lQ(H=K.init)&&A.unshift(H)}return W||r9(J,q),U&&s0(q,Z,U),L?W^4?Y:U:q},o0=(J,Q,Z)=>Q.has(J)||MQ("Cannot "+Z),Uq=(J,Q)=>Object(Q)!==Q?MQ('Cannot use the "in" operator on this value'):J.has(Q),LJ=(J,Q,Z)=>(o0(J,Q,"read from private field"),Z?Z.call(J):Q.get(J)),sQ=(J,Q,Z)=>Q.has(J)?MQ("Cannot add the same private member more than once"):Q instanceof WeakSet?Q.add(J):Q.set(J,Z),vJ=(J,Q,Z,$)=>(o0(J,Q,"write to private field"),$?$.call(J,Z):Q.set(J,Z),Z),Lq=(J,Q,Z)=>(o0(J,Q,"access private method"),Z);function AQ(J,Q){if(Q){let Z;return y0(()=>{let $=J();if($&&Z&&Q(Z,$))return Z;return Z=$,$})}return y0(J)}function EJ(J,Q){if(Object.is(J,Q))return!0;if(J===null||Q===null)return!1;if(typeof J==="function"&&typeof Q==="function")return J===Q;if(J instanceof Set&&Q instanceof Set){if(J.size!==Q.size)return!1;for(let Z of J)if(!Q.has(Z))return!1;return!0}if(Array.isArray(J)){if(!Array.isArray(Q)||J.length!==Q.length)return!1;return!J.some(($,q)=>!EJ($,Q[q]))}if(typeof J==="object"&&typeof Q==="object"){let Z=Object.keys(J),$=Object.keys(Q);if(Z.length!==$.length)return!1;return!Z.some((Y)=>!EJ(J[Y],Q[Y]))}return!1}function T({get:J},Q){return{init(Z){return IJ(Z)},get(){return J.call(this).value},set(Z){let $=J.call(this);if($.peek()===Z)return;$.value=Z}}}function h(J,Q){let Z=new WeakMap;return function(){let $=Z.get(this);if(!$)$=AQ(J.bind(this)),Z.set(this,$);return $.value}}function v0(J=!0){return function(Q,Z){Z.addInitializer(function(){let $=Z.kind==="field"?this:Z.static?this:Object.getPrototypeOf(this),q=Object.getOwnPropertyDescriptor($,Z.name);if(q)Object.defineProperty($,Z.name,Wq(Xq({},q),{enumerable:J}))})}}function nJ(...J){let Q=J.map((Z)=>o(Z));return()=>Q.forEach((Z)=>Z())}var t9,e9,J8,Q8,Z8,$8,QJ,i0,b0,p0,d0,t,n0,g0,q8,_0,a0,u0,c0,l0;$8=[T],Z8=[T],Q8=[T],J8=[v0()],e9=[v0()],t9=[v0()];var jJ=class{constructor(J,Q=Object.is){this.defaultValue=J,this.equals=Q,oJ(QJ,5,this),sQ(this,t),sQ(this,i0,oJ(QJ,8,this)),oJ(QJ,11,this),sQ(this,n0,oJ(QJ,12,this)),oJ(QJ,15,this),sQ(this,a0,oJ(QJ,16,this)),oJ(QJ,19,this),this.reset=this.reset.bind(this),this.reset()}get current(){return LJ(this,t,c0)}get initial(){return LJ(this,t,p0)}get previous(){return LJ(this,t,q8)}set current(J){let Q=C(()=>LJ(this,t,c0));if(J&&Q&&this.equals(Q,J))return;JJ(()=>{if(!LJ(this,t,p0))vJ(this,t,J,d0);vJ(this,t,Q,_0),vJ(this,t,J,l0)})}reset(J=this.defaultValue){JJ(()=>{vJ(this,t,void 0,_0),vJ(this,t,J,d0),vJ(this,t,J,l0)})}};QJ=Bq(null);i0=new WeakMap;t=new WeakSet;n0=new WeakMap;a0=new WeakMap;b0=wQ(QJ,20,"#initial",$8,t,i0),p0=b0.get,d0=b0.set;g0=wQ(QJ,20,"#previous",Z8,t,n0),q8=g0.get,_0=g0.set;u0=wQ(QJ,20,"#current",Q8,t,a0),c0=u0.get,l0=u0.set;wQ(QJ,2,"current",J8,jJ);wQ(QJ,2,"initial",e9,jJ);wQ(QJ,2,"previous",t9,jJ);r9(QJ,jJ);function hZ(J){return C(()=>{let Q={};for(let Z in J)Q[Z]=J[Z];return Q})}var iJ,o5=class{constructor(){sQ(this,iJ,new WeakMap)}get(J,Q){var Z;return J?(Z=LJ(this,iJ).get(J))==null?void 0:Z.get(Q):void 0}set(J,Q,Z){var $;if(!J)return;if(!LJ(this,iJ).has(J))LJ(this,iJ).set(J,new Map);return($=LJ(this,iJ).get(J))==null?void 0:$.set(Q,Z)}clear(J){var Q;return J?(Q=LJ(this,iJ).get(J))==null?void 0:Q.clear():void 0}};iJ=new WeakMap;var{create:Gq,defineProperty:Q1,getOwnPropertyDescriptor:Vq,getOwnPropertySymbols:Y8}=Object,Fq=Object.prototype.hasOwnProperty,zq=Object.prototype.propertyIsEnumerable,X8=(J,Q)=>(Q=Symbol[J])?Q:Symbol.for("Symbol."+J),IQ=(J)=>{throw TypeError(J)},K8=Math.pow,r0=(J,Q,Z)=>(Q in J)?Q1(J,Q,{enumerable:!0,configurable:!0,writable:!0,value:Z}):J[Q]=Z,Mq=(J,Q)=>{for(var Z in Q||(Q={}))if(Fq.call(Q,Z))r0(J,Z,Q[Z]);if(Y8){for(var Z of Y8(Q))if(zq.call(Q,Z))r0(J,Z,Q[Z])}return J},H8=(J,Q)=>Q1(J,"name",{value:Q,configurable:!0}),wq=(J)=>{var Q;return[,,,Gq((Q=J==null?void 0:J[X8("metadata")])!=null?Q:null)]},W8=["class","method","getter","setter","accessor","field","value","get","set"],oQ=(J)=>J!==void 0&&typeof J!=="function"?IQ("Function expected"):J,Aq=(J,Q,Z,$,q)=>({kind:W8[J],name:Q,metadata:$,addInitializer:(Y)=>Z._?IQ("Already initialized"):q.push(oQ(Y||null))}),B8=(J,Q)=>r0(Q,X8("metadata"),J[3]),Iq=(J,Q,Z,$)=>{for(var q=0,Y=J[Q>>1],H=Y&&Y.length;q<H;q++)Q&1?Y[q].call(Z):$=Y[q].call(Z,$);return $},N8=(J,Q,Z,$,q,Y)=>{var H,K,X,B,N,W=Q&7,G=!!(Q&8),L=!!(Q&16),F=W>3?J.length+1:W?G?1:2:0,z=W8[W+5],A=W>3&&(J[F-1]=[]),I=J[F]||(J[F]=[]),U=W&&(!L&&!G&&(q=q.prototype),W<5&&(W>3||!L)&&Vq(W<4?q:{get[Z](){return t0(this,Y)},set[Z](V){return e0(this,Y,V)}},Z));W?L&&W<4&&H8(Y,(W>2?"set ":W>1?"get ":"")+Z):H8(q,Z);for(var M=$.length-1;M>=0;M--){if(B=Aq(W,Z,X={},J[3],I),W){if(B.static=G,B.private=L,N=B.access={has:L?(V)=>jq(q,V):(V)=>(Z in V)},W^3)N.get=L?(V)=>(W^1?t0:Rq)(V,q,W^4?Y:U.get):(V)=>V[Z];if(W>2)N.set=L?(V,w)=>e0(V,q,w,W^4?Y:U.set):(V,w)=>V[Z]=w}if(K=(0,$[M])(W?W<4?L?Y:U[z]:W>4?void 0:{get:U.get,set:U.set}:q,B),X._=1,W^4||K===void 0)oQ(K)&&(W>4?A.unshift(K):W?L?Y=K:U[z]=K:q=K);else if(typeof K!=="object"||K===null)IQ("Object expected");else oQ(H=K.get)&&(U.get=H),oQ(H=K.set)&&(U.set=H),oQ(H=K.init)&&A.unshift(H)}return W||B8(J,q),U&&Q1(q,Z,U),L?W^4?Y:U:q},Z1=(J,Q,Z)=>Q.has(J)||IQ("Cannot "+Z),jq=(J,Q)=>Object(Q)!==Q?IQ('Cannot use the "in" operator on this value'):J.has(Q),t0=(J,Q,Z)=>(Z1(J,Q,"read from private field"),Z?Z.call(J):Q.get(J)),Oq=(J,Q,Z)=>Q.has(J)?IQ("Cannot add the same private member more than once"):Q instanceof WeakSet?Q.add(J):Q.set(J,Z),e0=(J,Q,Z,$)=>(Z1(J,Q,"write to private field"),$?$.call(J,Z):Q.set(J,Z),Z),Rq=(J,Q,Z)=>(Z1(J,Q,"access private method"),Z),e=class J{constructor(Q,Z){this.x=Q,this.y=Z}static delta(Q,Z){return new J(Q.x-Z.x,Q.y-Z.y)}static distance(Q,Z){return Math.hypot(Q.x-Z.x,Q.y-Z.y)}static equals(Q,Z){return Q.x===Z.x&&Q.y===Z.y}static from({x:Q,y:Z}){return new J(Q,Z)}},XJ=class J{constructor(Q,Z,$,q){this.left=Q,this.top=Z,this.width=$,this.height=q,this.scale={x:1,y:1}}get inverseScale(){return{x:1/this.scale.x,y:1/this.scale.y}}translate(Q,Z){let{top:$,left:q,width:Y,height:H,scale:K}=this,X=new J(q+Q,$+Z,Y,H);return X.scale=Mq({},K),X}get boundingRectangle(){let{width:Q,height:Z,left:$,top:q,right:Y,bottom:H}=this;return{width:Q,height:Z,left:$,top:q,right:Y,bottom:H}}get center(){let{left:Q,top:Z,right:$,bottom:q}=this;return new e((Q+$)/2,(Z+q)/2)}get area(){let{width:Q,height:Z}=this;return Q*Z}equals(Q){if(!(Q instanceof J))return!1;let{left:Z,top:$,width:q,height:Y}=this;return Z===Q.left&&$===Q.top&&q===Q.width&&Y===Q.height}containsPoint(Q){let{top:Z,left:$,bottom:q,right:Y}=this;return Z<=Q.y&&Q.y<=q&&$<=Q.x&&Q.x<=Y}intersectionArea(Q){if(Q instanceof J)return Dq(this,Q);return 0}intersectionRatio(Q){let{area:Z}=this,$=this.intersectionArea(Q);return $/(Q.area+Z-$)}get bottom(){let{top:Q,height:Z}=this;return Q+Z}get right(){let{left:Q,width:Z}=this;return Q+Z}get aspectRatio(){let{width:Q,height:Z}=this;return Q/Z}get corners(){return[{x:this.left,y:this.top},{x:this.right,y:this.top},{x:this.left,y:this.bottom},{x:this.right,y:this.bottom}]}static from({top:Q,left:Z,width:$,height:q}){return new J(Z,Q,$,q)}static delta(Q,Z,$={x:"center",y:"center"}){let q=(Y,H)=>{let K=$[H],X=H==="x"?Y.left:Y.top,B=H==="x"?Y.width:Y.height;if(K=="start")return X;if(K=="end")return X+B;return X+B/2};return e.delta({x:q(Q,"x"),y:q(Q,"y")},{x:q(Z,"x"),y:q(Z,"y")})}static intersectionRatio(Q,Z){return J.from(Q).intersectionRatio(J.from(Z))}};function Dq(J,Q){let Z=Math.max(Q.top,J.top),$=Math.max(Q.left,J.left),q=Math.min(Q.left+Q.width,J.left+J.width),Y=Math.min(Q.top+Q.height,J.top+J.height),H=q-$,K=Y-Z;if($<q&&Z<Y)return H*K;return 0}var U8,L8,J1,yZ,iQ,nQ=class extends(J1=jJ,L8=[h],U8=[h],J1){constructor(J){let Q=e.from(J);super(Q,(Z,$)=>e.equals(Z,$));Iq(iQ,5,this),Oq(this,yZ,0),this.velocity={x:0,y:0}}get delta(){return e.delta(this.current,this.initial)}get direction(){let{current:J,previous:Q}=this;if(!Q)return null;let Z={x:J.x-Q.x,y:J.y-Q.y};if(!Z.x&&!Z.y)return null;if(Math.abs(Z.x)>Math.abs(Z.y))return Z.x>0?"right":"left";return Z.y>0?"down":"up"}get current(){return super.current}set current(J){let{current:Q}=this,Z=e.from(J),$={x:Z.x-Q.x,y:Z.y-Q.y},q=Date.now(),Y=q-t0(this,yZ),H=(K)=>Math.round(K/Y*100);JJ(()=>{e0(this,yZ,q),this.velocity={x:H($.x),y:H($.y)},super.current=Z})}reset(J=this.defaultValue){super.reset(e.from(J)),this.velocity={x:0,y:0}}};iQ=wq(J1);yZ=new WeakMap;N8(iQ,2,"delta",L8,nQ);N8(iQ,2,"direction",U8,nQ);B8(iQ,nQ);function fZ({x:J,y:Q},Z){let $=Math.abs(J),q=Math.abs(Q);if(typeof Z==="number")return Math.sqrt(K8($,2)+K8(q,2))>Z;if("x"in Z&&"y"in Z)return $>Z.x&&q>Z.y;if("x"in Z)return $>Z.x;if("y"in Z)return q>Z.y;return!1}var G8=((J)=>{return J.Horizontal="x",J.Vertical="y",J})(G8||{}),$1=Object.values(G8);var{create:Cq,defineProperty:X1,defineProperties:Tq,getOwnPropertyDescriptor:Pq,getOwnPropertyDescriptors:Eq,getOwnPropertySymbols:dZ}=Object,M8=Object.prototype.hasOwnProperty,w8=Object.prototype.propertyIsEnumerable,A8=(J,Q)=>(Q=Symbol[J])?Q:Symbol.for("Symbol."+J),TQ=(J)=>{throw TypeError(J)},Y1=(J,Q,Z)=>(Q in J)?X1(J,Q,{enumerable:!0,configurable:!0,writable:!0,value:Z}):J[Q]=Z,W1=(J,Q)=>{for(var Z in Q||(Q={}))if(M8.call(Q,Z))Y1(J,Z,Q[Z]);if(dZ){for(var Z of dZ(Q))if(w8.call(Q,Z))Y1(J,Z,Q[Z])}return J},B1=(J,Q)=>Tq(J,Eq(Q)),V8=(J,Q)=>X1(J,"name",{value:Q,configurable:!0}),I8=(J,Q)=>{var Z={};for(var $ in J)if(M8.call(J,$)&&Q.indexOf($)<0)Z[$]=J[$];if(J!=null&&dZ){for(var $ of dZ(J))if(Q.indexOf($)<0&&w8.call(J,$))Z[$]=J[$]}return Z},PQ=(J)=>{var Q;return[,,,Cq((Q=J==null?void 0:J[A8("metadata")])!=null?Q:null)]},j8=["class","method","getter","setter","accessor","field","value","get","set"],aQ=(J)=>J!==void 0&&typeof J!=="function"?TQ("Function expected"):J,Sq=(J,Q,Z,$,q)=>({kind:j8[J],name:Q,metadata:$,addInitializer:(Y)=>Z._?TQ("Already initialized"):q.push(aQ(Y||null))}),rJ=(J,Q)=>Y1(Q,A8("metadata"),J[3]),O=(J,Q,Z,$)=>{for(var q=0,Y=J[Q>>1],H=Y&&Y.length;q<H;q++)Q&1?Y[q].call(Z):$=Y[q].call(Z,$);return $},P=(J,Q,Z,$,q,Y)=>{var H,K,X,B,N,W=Q&7,G=!!(Q&8),L=!!(Q&16),F=W>3?J.length+1:W?G?1:2:0,z=j8[W+5],A=W>3&&(J[F-1]=[]),I=J[F]||(J[F]=[]),U=W&&(!L&&!G&&(q=q.prototype),W<5&&(W>3||!L)&&Pq(W<4?q:{get[Z](){return u(this,Y)},set[Z](V){return WJ(this,Y,V)}},Z));W?L&&W<4&&V8(Y,(W>2?"set ":W>1?"get ":"")+Z):V8(q,Z);for(var M=$.length-1;M>=0;M--){if(B=Sq(W,Z,X={},J[3],I),W){if(B.static=G,B.private=L,N=B.access={has:L?(V)=>kq(q,V):(V)=>(Z in V)},W^3)N.get=L?(V)=>(W^1?u:O8)(V,q,W^4?Y:U.get):(V)=>V[Z];if(W>2)N.set=L?(V,w)=>WJ(V,q,w,W^4?Y:U.set):(V,w)=>V[Z]=w}if(K=(0,$[M])(W?W<4?L?Y:U[z]:W>4?void 0:{get:U.get,set:U.set}:q,B),X._=1,W^4||K===void 0)aQ(K)&&(W>4?A.unshift(K):W?L?Y=K:U[z]=K:q=K);else if(typeof K!=="object"||K===null)TQ("Object expected");else aQ(H=K.get)&&(U.get=H),aQ(H=K.set)&&(U.set=H),aQ(H=K.init)&&A.unshift(H)}return W||rJ(J,q),U&&X1(q,Z,U),L?W^4?Y:U:q},N1=(J,Q,Z)=>Q.has(J)||TQ("Cannot "+Z),kq=(J,Q)=>Object(Q)!==Q?TQ('Cannot use the "in" operator on this value'):J.has(Q),u=(J,Q,Z)=>(N1(J,Q,"read from private field"),Z?Z.call(J):Q.get(J)),E=(J,Q,Z)=>Q.has(J)?TQ("Cannot add the same private member more than once"):Q instanceof WeakSet?Q.add(J):Q.set(J,Z),WJ=(J,Q,Z,$)=>(N1(J,Q,"write to private field"),$?$.call(J,Z):Q.set(J,Z),Z),O8=(J,Q,Z)=>(N1(J,Q,"access private method"),Z);function R8(J,Q){return{plugin:J,options:Q}}function EQ(J){return(Q)=>{return R8(J,Q)}}function CQ(J){if(typeof J==="function")return{plugin:J,options:void 0};return J}var D8,eQ,U1,bZ;D8=[T];var $J=class{constructor(J,Q){this.manager=J,this.options=Q,E(this,U1,O(eQ,8,this,!1)),O(eQ,11,this),E(this,bZ,new Set)}enable(){this.disabled=!1}disable(){this.disabled=!0}isDisabled(){return C(()=>{return this.disabled})}configure(J){this.options=J}registerEffect(J){let Q=o(J.bind(this));return u(this,bZ).add(Q),Q}destroy(){u(this,bZ).forEach((J)=>J())}static configure(J){return R8(this,J)}};eQ=PQ(null);U1=new WeakMap;bZ=new WeakMap;P(eQ,4,"disabled",D8,$J,U1);rJ(eQ,$J);var SQ=class extends $J{},gZ,q1=class{constructor(J){this.manager=J,this.instances=new Map,E(this,gZ,[])}get values(){return Array.from(this.instances.values())}set values(J){let Q=J.map(CQ).reduce(($,q)=>{let Y=$.find(({plugin:H})=>H===q.plugin);if(Y)return Y.options=q.options,$;return[...$,q]},[]),Z=Q.map(({plugin:$})=>$);for(let $ of u(this,gZ))if(!Z.includes($)){if($.prototype instanceof SQ)continue;this.unregister($)}for(let{plugin:$,options:q}of Q)this.register($,q);WJ(this,gZ,Z)}get(J){return this.instances.get(J)}register(J,Q){let Z=this.instances.get(J);if(Z){if(Z.options!==Q)Z.options=Q;return Z}let $=new J(this.manager,Q);return this.instances.set(J,$),$}unregister(J){let Q=this.instances.get(J);if(Q)Q.destroy(),this.instances.delete(J)}destroy(){for(let J of this.instances.values())J.destroy();this.instances.clear()}};gZ=new WeakMap;function xq(J,Q){if(J.priority===Q.priority){if(J.type===Q.type)return Q.value-J.value;return Q.type-J.type}return Q.priority-J.priority}var vZ=[],jQ,OQ,hq=class extends $J{constructor(J){super(J);E(this,jQ),E(this,OQ),this.computeCollisions=this.computeCollisions.bind(this),WJ(this,OQ,IJ(vZ)),this.destroy=nJ(()=>{let Q=this.computeCollisions(),Z=C(()=>this.manager.dragOperation.position.current);if(Q!==vZ){let $=u(this,jQ);if(WJ(this,jQ,Z),$&&Z.x==$.x&&Z.y==$.y)return}else WJ(this,jQ,void 0);u(this,OQ).value=Q},()=>{let{dragOperation:Q}=this.manager;if(Q.status.initialized)this.forceUpdate()})}forceUpdate(J=!0){C(()=>{if(J)u(this,OQ).value=this.computeCollisions();else WJ(this,jQ,void 0)})}computeCollisions(J,Q){let{registry:Z,dragOperation:$}=this.manager,{source:q,shape:Y,status:H}=$;if(!H.initialized||!Y)return vZ;let K=[],X=[];for(let B of J!=null?J:Z.droppables){if(B.disabled)continue;if(q&&!B.accepts(q))continue;let N=Q!=null?Q:B.collisionDetector;if(!N)continue;X.push(B),B.shape;let W=C(()=>N({droppable:B,dragOperation:$}));if(W){if(B.collisionPriority!=null)W.priority=B.collisionPriority;K.push(W)}}if(X.length===0)return vZ;return K.sort(xq),K}get collisions(){return u(this,OQ).value}};jQ=new WeakMap;OQ=new WeakMap;var C8,T8,P8,L1,E8,zJ,G1,DQ,V1,F1;P8=[T],T8=[T],C8=[T];var SJ=class J{constructor(Q,Z){E(this,G1,O(zJ,8,this)),O(zJ,11,this),E(this,DQ),E(this,V1,O(zJ,12,this)),O(zJ,15,this),E(this,F1,O(zJ,16,this)),O(zJ,19,this);let{effects:$,id:q,data:Y={},disabled:H=!1,register:K=!0}=Q,X=q;if(WJ(this,DQ,IJ(q)),this.manager=Z,this.data=Y,this.disabled=H,this.effects=()=>{var B;return[()=>{let{id:N,manager:W}=this;if(N===X)return;return X=N,W==null||W.registry.register(this),()=>W==null?void 0:W.registry.unregister(this)},...(B=$==null?void 0:$())!=null?B:[]]},this.register=this.register.bind(this),this.unregister=this.unregister.bind(this),this.destroy=this.destroy.bind(this),Z&&K)queueMicrotask(this.register)}get id(){var Q,Z;let $=u(this,DQ).value;return(Z=(Q=J.pendingIdChanges)==null?void 0:Q.get(this))!=null?Z:$}set id(Q){var Z,$;let q=($=(Z=J.pendingIdChanges)==null?void 0:Z.get(this))!=null?$:u(this,DQ).peek();if(Q===q)return;if(!J.pendingIdChanges)J.pendingIdChanges=new Map,queueMicrotask(()=>{var Y;return O8(Y=J,L1,E8).call(Y)});J.pendingIdChanges.set(this,Q)}register(){var Q;return(Q=this.manager)==null?void 0:Q.registry.register(this)}unregister(){var Q;(Q=this.manager)==null||Q.registry.unregister(this)}destroy(){var Q;(Q=this.manager)==null||Q.registry.unregister(this)}};zJ=PQ(null);L1=new WeakSet;E8=function(){let J=SJ.pendingIdChanges;if(SJ.pendingIdChanges=null,J)JJ(()=>{for(let[Q,Z]of J)u(Q,DQ).value=Z})};G1=new WeakMap;DQ=new WeakMap;V1=new WeakMap;F1=new WeakMap;P(zJ,4,"manager",P8,SJ,G1);P(zJ,4,"data",T8,SJ,V1);P(zJ,4,"disabled",C8,SJ,F1);E(SJ,L1);rJ(zJ,SJ);SJ.pendingIdChanges=null;var _Z=SJ,F8=class{constructor(){this.map=IJ(new Map),this.cleanupFunctions=new WeakMap,this.register=(J,Q)=>{let Z=this.map.peek(),$=Z.get(J),q=()=>this.unregister(J,Q);if($===Q)return q;if($){if($.id===J){let K=this.cleanupFunctions.get($);K==null||K(),this.cleanupFunctions.delete($)}}let Y=new Map(Z);for(let[K,X]of Z)if(X===Q&&K!==J){Y.delete(K);break}Y.set(J,Q),this.map.value=Y;let H=nJ(...Q.effects());return this.cleanupFunctions.set(Q,H),q},this.unregister=(J,Q)=>{let Z=this.map.peek();if(Z.get(J)!==Q)return;let $=this.cleanupFunctions.get(Q);$==null||$(),this.cleanupFunctions.delete(Q);let q=new Map(Z);q.delete(J),this.map.value=q}}[Symbol.iterator](){return this.map.peek().values()}get value(){return this.map.value.values()}has(J){return this.map.value.has(J)}get(J){return this.map.value.get(J)}destroy(){for(let J of this){let Q=this.cleanupFunctions.get(J);Q==null||Q(),J.destroy()}this.map.value=new Map}},S8,k8,x8,h8,y8,f8,K1,ZJ,z1,M1,w1,MJ=class extends(K1=_Z,f8=[T],y8=[T],h8=[T],x8=[h],k8=[h],S8=[h],K1){constructor(J,Q){var Z=J,{modifiers:$,type:q,sensors:Y,plugins:H,effects:K}=Z,X=I8(Z,["modifiers","type","sensors","plugins","effects"]);super(B1(W1({},X),{effects:()=>{var B;return[...(B=K==null?void 0:K())!=null?B:[],()=>{let{manager:N,plugins:W}=this;if(!N||!W)return;for(let G of W){let{plugin:L}=CQ(G);N.registry.plugins.register(L)}}]}}),Q);O(ZJ,5,this),E(this,z1,O(ZJ,8,this)),O(ZJ,11,this),E(this,M1,O(ZJ,12,this)),O(ZJ,15,this),E(this,w1,O(ZJ,16,this,this.isDragSource?"dragging":"idle")),O(ZJ,19,this),this.type=q,this.sensors=Y,this.modifiers=$,this.alignment=X.alignment,this.plugins=H}pluginConfig(J){if(!this.plugins)return;for(let Q of this.plugins){let Z=CQ(Q);if(Z.plugin===J)return Z.options}return}get isDropping(){return this.status==="dropping"&&this.isDragSource}get isDragging(){return this.status==="dragging"&&this.isDragSource}get isDragSource(){var J,Q;return((Q=(J=this.manager)==null?void 0:J.dragOperation.source)==null?void 0:Q.id)===this.id}};ZJ=PQ(K1);z1=new WeakMap;M1=new WeakMap;w1=new WeakMap;P(ZJ,4,"type",f8,MJ,z1);P(ZJ,4,"modifiers",y8,MJ,M1);P(ZJ,4,"status",h8,MJ,w1);P(ZJ,2,"isDropping",x8,MJ);P(ZJ,2,"isDragging",k8,MJ);P(ZJ,2,"isDragSource",S8,MJ);rJ(ZJ,MJ);var v8,b8,g8,u8,m8,p8,H1,c,A1,I1,j1,O1,R1,wJ=class extends(H1=_Z,p8=[T],m8=[T],u8=[T],g8=[T],b8=[T],v8=[h],H1){constructor(J,Q){var Z=J,{accept:$,collisionDetector:q,collisionPriority:Y,type:H}=Z,K=I8(Z,["accept","collisionDetector","collisionPriority","type"]);super(K,Q);O(c,5,this),E(this,A1,O(c,8,this)),O(c,11,this),E(this,I1,O(c,12,this)),O(c,15,this),E(this,j1,O(c,16,this)),O(c,19,this),E(this,O1,O(c,20,this)),O(c,23,this),E(this,R1,O(c,24,this)),O(c,27,this),this.accept=$,this.collisionDetector=q,this.collisionPriority=Y,this.type=H}accepts(J){let{accept:Q}=this;if(!Q)return!0;if(typeof Q==="function")return Q(J);if(!J.type)return!1;if(Array.isArray(Q))return Q.includes(J.type);return J.type===Q}get isDropTarget(){var J,Q;return((Q=(J=this.manager)==null?void 0:J.dragOperation.target)==null?void 0:Q.id)===this.id}};c=PQ(H1);A1=new WeakMap;I1=new WeakMap;j1=new WeakMap;O1=new WeakMap;R1=new WeakMap;P(c,4,"accept",p8,wJ,A1);P(c,4,"type",m8,wJ,I1);P(c,4,"collisionDetector",u8,wJ,j1);P(c,4,"collisionPriority",g8,wJ,O1);P(c,4,"shape",b8,wJ,R1);P(c,2,"isDropTarget",v8,wJ);rJ(c,wJ);var yq=class{constructor(){this.registry=new Map}addEventListener(J,Q){let{registry:Z}=this,$=new Set(Z.get(J));return $.add(Q),Z.set(J,$),()=>this.removeEventListener(J,Q)}removeEventListener(J,Q){let{registry:Z}=this,$=new Set(Z.get(J));$.delete(Q),Z.set(J,$)}dispatch(J,...Q){let{registry:Z}=this,$=Z.get(J);if(!$)return;for(let q of $)q(...Q)}},fq=class extends yq{constructor(J){super();this.manager=J}dispatch(J,Q){let Z=[Q,this.manager];super.dispatch(J,...Z)}};function uZ(J,Q=!0){let Z=!1;return B1(W1({},J),{cancelable:Q,get defaultPrevented(){return Z},preventDefault(){if(!Q)return;Z=!0}})}var vq=class extends SQ{constructor(J){super(J);let Q=($,q)=>$.map(({id:Y})=>Y).join("")===q.map(({id:Y})=>Y).join(""),Z=[];this.destroy=nJ(()=>{let{dragOperation:$,collisionObserver:q}=J;if($.status.initializing)Z=[],q.enable()},()=>{let{collisionObserver:$,monitor:q}=J,{collisions:Y}=$;if($.isDisabled())return;if(_Z.pendingIdChanges)return;let H=uZ({collisions:Y});if(q.dispatch("collision",H),H.defaultPrevented)return;if(Q(Y,Z))return;else Z=Y;let[K]=Y;C(()=>{var X;if((K==null?void 0:K.id)!==((X=J.dragOperation.target)==null?void 0:X.id))$.disable(),J.actions.setDropTarget(K==null?void 0:K.id).then(()=>{$.enable()})})})}},OJ=((J)=>{return J[J.Lowest=0]="Lowest",J[J.Low=1]="Low",J[J.Normal=2]="Normal",J[J.High=3]="High",J[J.Highest=4]="Highest",J})(OJ||{}),RJ=((J)=>{return J[J.Collision=0]="Collision",J[J.ShapeIntersection=1]="ShapeIntersection",J[J.PointerIntersection=2]="PointerIntersection",J})(RJ||{}),d8,_8,c8,l8,s8,o8,i8,GJ,D1;i8=[T],o8=[h],s8=[h],l8=[h],c8=[h],_8=[h],d8=[h];var kJ=class{constructor(){O(GJ,5,this),E(this,D1,O(GJ,8,this,"idle")),O(GJ,11,this)}get current(){return this.value}get idle(){return this.value==="idle"}get initializing(){return this.value==="initializing"}get initialized(){let{value:J}=this;return J!=="idle"&&J!=="initialization-pending"}get dragging(){return this.value==="dragging"}get dropped(){return this.value==="dropped"}set(J){this.value=J}};GJ=PQ(null);D1=new WeakMap;P(GJ,4,"value",i8,kJ,D1);P(GJ,2,"current",o8,kJ);P(GJ,2,"idle",s8,kJ);P(GJ,2,"initializing",l8,kJ);P(GJ,2,"initialized",c8,kJ);P(GJ,2,"dragging",_8,kJ);P(GJ,2,"dropped",d8,kJ);rJ(GJ,kJ);var bq=class{constructor(J){this.manager=J}setDragSource(J){let{dragOperation:Q}=this.manager;Q.sourceIdentifier=typeof J==="string"||typeof J==="number"?J:J.id}setDropTarget(J){return C(()=>{let{dragOperation:Q}=this.manager,Z=J!=null?J:null;if(Q.targetIdentifier===Z)return Promise.resolve(!1);Q.targetIdentifier=Z;let $=uZ({operation:Q.snapshot()});if(Q.status.dragging)this.manager.monitor.dispatch("dragover",$);return this.manager.renderer.rendering.then(()=>$.defaultPrevented)})}start(J){return C(()=>{let{dragOperation:Q}=this.manager;if(J.source!=null)this.setDragSource(J.source);if(!Q.source)throw Error("Cannot start a drag operation without a drag source");if(!Q.status.idle)throw Error("Cannot start a drag operation while another is active");let $=new AbortController,{event:q,coordinates:Y}=J;JJ(()=>{Q.status.set("initialization-pending"),Q.shape=null,Q.canceled=!1,Q.activatorEvent=q!=null?q:null,Q.position.reset(Y)});let H=uZ({operation:Q.snapshot()});if(this.manager.monitor.dispatch("beforedragstart",H),H.defaultPrevented)return Q.reset(),$.abort(),$;return Q.status.set("initializing"),Q.controller=$,this.manager.renderer.rendering.then(()=>{if($.signal.aborted)return;let{status:K}=Q;if(K.current!=="initializing")return;JJ(()=>{Q.status.set("dragging"),this.manager.monitor.dispatch("dragstart",{nativeEvent:q,operation:Q.snapshot(),cancelable:!1})})}),$})}move(J){return C(()=>{var Q,Z;let{dragOperation:$}=this.manager,{status:q,controller:Y}=$;if(!q.dragging||!Y||Y.signal.aborted)return;let H=uZ({nativeEvent:J.event,operation:$.snapshot(),by:J.by,to:J.to},(Q=J.cancelable)!=null?Q:!0);if((Z=J.propagate)!=null?Z:!0)this.manager.monitor.dispatch("dragmove",H);queueMicrotask(()=>{var K,X,B,N,W;if(H.defaultPrevented)return;let G=(W=J.to)!=null?W:{x:$.position.current.x+((X=(K=J.by)==null?void 0:K.x)!=null?X:0),y:$.position.current.y+((N=(B=J.by)==null?void 0:B.y)!=null?N:0)};$.position.current=G})})}stop(J={}){return C(()=>{var Q,Z;let{dragOperation:$}=this.manager,{controller:q}=$;if(!q||q.signal.aborted)return;let Y,H=()=>{let X={resume:()=>{},abort:()=>{}};return Y=new Promise((B,N)=>{X.resume=B,X.abort=N}),X};q.abort();let K=()=>{this.manager.renderer.rendering.then(()=>{$.status.set("dropped");let X=C(()=>{var N;return((N=$.source)==null?void 0:N.status)==="dropping"}),B=()=>{if($.controller===q)$.controller=void 0;$.reset()};if(X){let{source:N}=$,W=o(()=>{if((N==null?void 0:N.status)==="idle")W(),B()})}else this.manager.renderer.rendering.then(B)})};if($.canceled=(Q=J.canceled)!=null?Q:!1,this.manager.monitor.dispatch("dragend",{nativeEvent:J.event,operation:$.snapshot(),canceled:(Z=J.canceled)!=null?Z:!1,suspend:H}),Y)Y.then(K).catch(()=>$.reset());else K()})}},aJ=class extends $J{constructor(J,Q){super(J,Q);this.manager=J,this.options=Q}},n8=class extends AbortController{constructor(J,Q){super();this.constraints=J,this.onActivate=Q,this.activated=!1;for(let Z of J!=null?J:[])Z.controller=this}onEvent(J){var Q;if(this.activated)return;if((Q=this.constraints)==null?void 0:Q.length)for(let Z of this.constraints)Z.onEvent(J);else this.activate(J)}activate(J){if(this.activated)return;this.activated=!0,this.onActivate(J)}abort(J){this.activated=!1,super.abort(J)}},mZ,C1=class{constructor(J){this.options=J,E(this,mZ)}set controller(J){WJ(this,mZ,J),J.signal.addEventListener("abort",()=>this.abort())}activate(J){var Q;(Q=u(this,mZ))==null||Q.activate(J)}};mZ=new WeakMap;var z8=class extends $J{constructor(J,Q){super(J,Q);this.manager=J,this.options=Q}apply(J){return J.transform}},gq=class{constructor(J){this.draggables=new F8,this.droppables=new F8,this.plugins=new q1(J),this.sensors=new q1(J),this.modifiers=new q1(J)}register(J,Q){if(J instanceof MJ)return this.draggables.register(J.id,J);if(J instanceof wJ)return this.droppables.register(J.id,J);if(J.prototype instanceof z8)return this.modifiers.register(J,Q);if(J.prototype instanceof aJ)return this.sensors.register(J,Q);if(J.prototype instanceof $J)return this.plugins.register(J,Q);throw Error("Invalid instance type")}unregister(J){if(J instanceof _Z){if(J instanceof MJ)return this.draggables.unregister(J.id,J);if(J instanceof wJ)return this.droppables.unregister(J.id,J);return()=>{}}if(J.prototype instanceof z8)return this.modifiers.unregister(J);if(J.prototype instanceof aJ)return this.sensors.unregister(J);if(J.prototype instanceof $J)return this.plugins.unregister(J);throw Error("Invalid instance type")}destroy(){this.draggables.destroy(),this.droppables.destroy(),this.plugins.destroy(),this.sensors.destroy(),this.modifiers.destroy()}},a8,r8,t8,e8,J2,Q2,Z2,$2,q2,rQ,pZ,RQ,g,T1,P1,E1,S1,k1,tQ;q2=[h],$2=[T],Z2=[T],Q2=[T],J2=[T],e8=[T],t8=[h],r8=[h],a8=[h];var AJ=class{constructor(J){O(g,5,this),E(this,rQ),E(this,pZ),E(this,RQ,new jJ(void 0,(Q,Z)=>Q&&Z?Q.equals(Z):Q===Z)),this.status=new kJ,E(this,T1,O(g,8,this,!1)),O(g,11,this),E(this,P1,O(g,12,this,null)),O(g,15,this),E(this,E1,O(g,16,this,null)),O(g,19,this),E(this,S1,O(g,20,this,null)),O(g,23,this),E(this,k1,O(g,24,this,[])),O(g,27,this),this.position=new nQ({x:0,y:0}),E(this,tQ,{x:0,y:0}),WJ(this,rQ,J)}get shape(){let{current:J,initial:Q,previous:Z}=u(this,RQ);if(!J||!Q)return null;return{current:J,initial:Q,previous:Z}}set shape(J){if(!J)u(this,RQ).reset();else u(this,RQ).current=J}get source(){var J;let Q=this.sourceIdentifier;if(Q==null)return null;let Z=u(this,rQ).registry.draggables.get(Q);if(Z)WJ(this,pZ,Z);return(J=Z!=null?Z:u(this,pZ))!=null?J:null}get target(){var J;let Q=this.targetIdentifier;return Q!=null?(J=u(this,rQ).registry.droppables.get(Q))!=null?J:null:null}get transform(){let{x:J,y:Q}=this.position.delta,Z={x:J,y:Q};for(let $ of this.modifiers)Z=$.apply(B1(W1({},this.snapshot()),{transform:Z}));return WJ(this,tQ,Z),Z}snapshot(){return C(()=>({source:this.source,target:this.target,activatorEvent:this.activatorEvent,transform:u(this,tQ),shape:this.shape?hZ(this.shape):null,position:hZ(this.position),status:hZ(this.status),canceled:this.canceled}))}reset(){JJ(()=>{this.status.set("idle"),this.sourceIdentifier=null,this.targetIdentifier=null,u(this,RQ).reset(),this.position.reset({x:0,y:0}),WJ(this,tQ,{x:0,y:0}),this.modifiers=[]})}};g=PQ(null);rQ=new WeakMap;pZ=new WeakMap;RQ=new WeakMap;T1=new WeakMap;P1=new WeakMap;E1=new WeakMap;S1=new WeakMap;k1=new WeakMap;tQ=new WeakMap;P(g,2,"shape",q2,AJ);P(g,4,"canceled",$2,AJ,T1);P(g,4,"activatorEvent",Z2,AJ,P1);P(g,4,"sourceIdentifier",Q2,AJ,E1);P(g,4,"targetIdentifier",J2,AJ,S1);P(g,4,"modifiers",e8,AJ,k1);P(g,2,"source",t8,AJ);P(g,2,"target",r8,AJ);P(g,2,"transform",a8,AJ);rJ(g,AJ);var uq={get rendering(){return Promise.resolve()}};function VJ(J,Q){if(typeof J==="function")return J(Q);return J!=null?J:Q}var Y2=class{constructor(J){this.destroy=()=>{if(!this.dragOperation.status.idle)this.actions.stop({canceled:!0});this.dragOperation.modifiers.forEach((W)=>W.destroy()),this.registry.destroy(),this.collisionObserver.destroy()};var Q;let Z=J!=null?J:{},$=VJ(Z.plugins,[]),q=VJ(Z.sensors,[]),Y=VJ(Z.modifiers,[]),H=(Q=Z.renderer)!=null?Q:uq,K=new fq(this),X=new gq(this);this.registry=X,this.monitor=K,this.renderer=H,this.actions=new bq(this),this.dragOperation=new AJ(this),this.collisionObserver=new hq(this),this.plugins=[vq,...$],this.modifiers=Y,this.sensors=q;let{destroy:B}=this,N=nJ(()=>{var W,G,L;let F=C(()=>this.dragOperation.modifiers),z=this.modifiers;for(let A of F)if(!z.includes(A))A.destroy();this.dragOperation.modifiers=(L=(G=(W=this.dragOperation.source)==null?void 0:W.modifiers)==null?void 0:G.map((A)=>{let{plugin:I,options:U}=CQ(A);return new I(this,U)}))!=null?L:z});this.destroy=()=>{N(),B()}}get plugins(){return this.registry.plugins.values}set plugins(J){this.registry.plugins.values=J}get modifiers(){return this.registry.modifiers.values}set modifiers(J){this.registry.modifiers.values=J}get sensors(){return this.registry.sensors.values}set sensors(J){this.registry.sensors.values=J}};var U2=(J)=>{throw TypeError(J)},y1=(J,Q,Z)=>Q.has(J)||U2("Cannot "+Z),R=(J,Q,Z)=>(y1(J,Q,"read from private field"),Q.get(J)),YJ=(J,Q,Z)=>Q.has(J)?U2("Cannot add the same private member more than once"):Q instanceof WeakSet?Q.add(J):Q.set(J,Z),BJ=(J,Q,Z,$)=>(y1(J,Q,"write to private field"),Q.set(J,Z),Z),L2=(J,Q,Z)=>(y1(J,Q,"access private method"),Z);function eZ(J){if(!J)return!1;if(J instanceof KeyframeEffect)return!0;return"getKeyframes"in J&&typeof J.getKeyframes==="function"}function f1(J,Q){let Z=J.getAnimations(),$=null;for(let q of Z){if(q.playState!=="running")continue;let{effect:Y}=q,K=(eZ(Y)?Y.getKeyframes():[]).filter(Q);if(K.length>0)$=[K[K.length-1],q]}return $}function J0(J){let{width:Q,height:Z,top:$,left:q,bottom:Y,right:H}=J.getBoundingClientRect();return{width:Q,height:Z,top:$,left:q,bottom:Y,right:H}}function v1(J){let Q=Object.prototype.toString.call(J);return Q==="[object Window]"||Q==="[object global]"}function KZ(J){return"nodeType"in J}function NJ(J){var Q,Z,$;if(!J)return window;if(v1(J))return J;if(!KZ(J))return window;if("defaultView"in J)return(Q=J.defaultView)!=null?Q:window;return($=(Z=J.ownerDocument)==null?void 0:Z.defaultView)!=null?$:window}function Q0(J){let{Document:Q}=NJ(J);return J instanceof Q||"nodeType"in J&&J.nodeType===Node.DOCUMENT_NODE}function xJ(J){if(!J||v1(J))return!1;return J instanceof NJ(J).HTMLElement||"namespaceURI"in J&&typeof J.namespaceURI==="string"&&J.namespaceURI.endsWith("html")}function G2(J){return J instanceof NJ(J).SVGElement||"namespaceURI"in J&&typeof J.namespaceURI==="string"&&J.namespaceURI.endsWith("svg")}function QQ(J){if(!J)return document;if(v1(J))return J.document;if(!KZ(J))return document;if(Q0(J))return J;if(xJ(J)||G2(J))return J.ownerDocument;return document}function mq(J){var Q,Z,$,q;let{documentElement:Y}=QQ(J),H=NJ(J).visualViewport,K=(Q=H==null?void 0:H.width)!=null?Q:Y.clientWidth,X=(Z=H==null?void 0:H.height)!=null?Z:Y.clientHeight,B=($=H==null?void 0:H.offsetTop)!=null?$:0,N=(q=H==null?void 0:H.offsetLeft)!=null?q:0;return{top:B,left:N,right:N+K,bottom:B+X,width:K,height:X}}function pq(J,Q){if(dq(J)&&J.open===!1)return!1;let{overflow:Z,overflowX:$,overflowY:q}=getComputedStyle(J);return Z==="visible"&&$==="visible"&&q==="visible"}function dq(J){return J.tagName==="DETAILS"}function iZ(J,Q=J.getBoundingClientRect(),Z=0){var $,q,Y,H,K;let X=Q,{ownerDocument:B}=J,N=($=B.defaultView)!=null?$:window,W=J.parentElement;while(W&&W!==B.documentElement){if(!pq(W)){let M=W.getBoundingClientRect(),V=Z*(M.bottom-M.top),w=Z*(M.right-M.left),f=Z*(M.bottom-M.top),j=Z*(M.right-M.left);X={top:Math.max(X.top,M.top-V),right:Math.min(X.right,M.right+w),bottom:Math.min(X.bottom,M.bottom+f),left:Math.max(X.left,M.left-j),width:0,height:0},X.width=X.right-X.left,X.height=X.bottom-X.top}W=W.parentElement}let G=N.visualViewport,L=(q=G==null?void 0:G.offsetTop)!=null?q:0,F=(Y=G==null?void 0:G.offsetLeft)!=null?Y:0,z=(H=G==null?void 0:G.width)!=null?H:N.innerWidth,A=(K=G==null?void 0:G.height)!=null?K:N.innerHeight,I=Z*A,U=Z*z;if(X={top:Math.max(X.top,L-I),right:Math.min(X.right,F+z+U),bottom:Math.min(X.bottom,L+A+I),left:Math.max(X.left,F-U),width:0,height:0},X.width=X.right-X.left,X.height=X.bottom-X.top,X.width<0)X.width=0;if(X.height<0)X.height=0;return X}function ZQ(J){return{x:J.clientX,y:J.clientY}}var V2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function nZ(J=document,Q=new Set){if(Q.has(J))return[];Q.add(J);let Z=[J];for(let $ of Array.from(J.querySelectorAll("iframe, frame")))try{let q=$.contentDocument;if(q&&!Q.has(q))Z.push(...nZ(q,Q))}catch(q){}try{let $=J.defaultView;if($&&$!==window.top){let q=$.parent;if(q&&q.document&&q.document!==J)Z.push(...nZ(q.document,Q))}}catch($){}return Z}function Z0(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function b1(){var J,Q;let Z=Z0()?window.visualViewport:null;return{x:(J=Z==null?void 0:Z.offsetLeft)!=null?J:0,y:(Q=Z==null?void 0:Z.offsetTop)!=null?Q:0}}function $0(J){if(!J||!KZ(J))return!1;return J instanceof NJ(J).ShadowRoot}function HZ(J){if(J&&KZ(J)){let Q=J.getRootNode();if($0(Q))return Q;else if(Q instanceof Document)return Q}return QQ(J)}function g1(J){return J.matchMedia("(prefers-reduced-motion: reduce)").matches}function F2(J){let Z=J.cloneNode(!0),$=Array.from(J.querySelectorAll("input, textarea, select, canvas, [contenteditable]"));return Array.from(Z.querySelectorAll("input, textarea, select, canvas, [contenteditable]")).forEach((Y,H)=>{let K=$[H];if(K2(Y)&&K2(K)){if(Y.type!=="file")Y.value=K.value;if(Y.type==="radio"&&Y.name)Y.name=`Cloned__${Y.name}`}if(H2(Y)&&H2(K)&&K.width>0&&K.height>0){let X=Y.getContext("2d");X==null||X.drawImage(K,0,0)}}),Z}function K2(J){return"value"in J}function H2(J){return J.tagName==="CANVAS"}function u1(J,{x:Q,y:Z}){let $=J.elementFromPoint(Q,Z);if(_q($)){let{contentDocument:q}=$;if(q){let{left:Y,top:H}=$.getBoundingClientRect();return u1(q,{x:Q-Y,y:Z-H})}}return $}function _q(J){return(J==null?void 0:J.tagName)==="IFRAME"}var m1=new WeakMap;function z2(J){return Boolean(J.closest(`
|
|
@@ -68,4 +68,4 @@ import{gh as x0,ih as TJ,jh as PZ,wh as N5}from"./chunk-b1e3tec3.js";import{Xk a
|
|
|
68
68
|
visibility: hidden;
|
|
69
69
|
}
|
|
70
70
|
`.replace(/\n+/g," ").replace(/\s+/g," ").trim();function mY(J,Q="hidden"){return C(()=>{let{element:Z,manager:$}=J;if(!Z||!$)return;let q=pY(Z,$.registry.droppables),Y=[],H=F2(Z),{remove:K}=H;return dY(q,H,Y),_Y(H,Q),H.remove=()=>{Y.forEach((X)=>X()),K.call(H)},H})}function pY(J,Q){let Z=new Map;for(let $ of Q){if(!$.element)continue;if(J===$.element||J.contains($.element)){let q=`${AZ}${H0("dom-id")}`;$.element.setAttribute(q,""),Z.set($,q)}}return Z}function dY(J,Q,Z){for(let[$,q]of J){if(!$.element)continue;let Y=`[${q}]`,H=Q.matches(Y)?Q:Q.querySelector(Y);if($.element.removeAttribute(q),!H)continue;let K=$.element;$.proxy=H,H.removeAttribute(q),m1.set(K,H),Z.push(()=>{m1.delete(K),$.proxy=void 0})}}function _Y(J,Q="hidden"){J.setAttribute("inert","true"),J.setAttribute("tab-index","-1"),J.setAttribute("aria-hidden","true"),J.setAttribute(U0,Q)}function J$(J,Q){if(J===Q)return!0;return JQ(J)===JQ(Q)}function f2(J){let{target:Q}=J;if("newState"in J&&J.newState==="closed"&&gJ(Q)&&Q.hasAttribute("popover"))requestAnimationFrame(()=>$Q(Q))}function i1(J){return J.tagName==="TR"}function cY(J,Q,Z){let $=new MutationObserver((q)=>{let Y=!1;for(let H of q){if(H.target!==J){Y=!0;continue}if(H.type!=="attributes")continue;let K=H.attributeName;if(K.startsWith("aria-")||bY.includes(K))continue;let X=J.getAttribute(K);if(K==="style"){if(kQ(J)&&kQ(Q)){let B=J.style;for(let N of Array.from(Q.style))if(B.getPropertyValue(N)==="")Q.style.removeProperty(N);for(let N of Array.from(B)){if(gY.includes(N)||N.startsWith(n))continue;let W=B.getPropertyValue(N);Q.style.setProperty(N,W)}}}else if(X!==null)Q.setAttribute(K,X);else Q.removeAttribute(K)}if(Y&&Z)Q.replaceChildren(...J.cloneNode(!0).childNodes)});return $.observe(J,{attributes:!0,subtree:!0,childList:!0}),$}function lY(J,Q,Z){let $=new MutationObserver((q)=>{for(let Y of q){if(Y.addedNodes.length===0)continue;for(let H of Array.from(Y.addedNodes)){if(H.contains(J)&&J.nextElementSibling!==Q){J.insertAdjacentElement("afterend",Q),$Q(Z);return}if(H.contains(Q)&&Q.previousElementSibling!==J){Q.insertAdjacentElement("beforebegin",J),$Q(Z);return}}}if(J.isConnected&&Q.isConnected&&J.nextElementSibling!==Q)J.insertAdjacentElement("afterend",Q),$Q(Z)});return $.observe(J.ownerDocument.body,{childList:!0,subtree:!0}),$}function sY(J){return new ResizeObserver(()=>{var Q,Z,$;let q=new hJ(J.placeholder,{frameTransform:J.frameTransform,ignoreTransforms:!0}),Y=(Q=J.transformOrigin)!=null?Q:{x:1,y:1},H=(J.width-q.width)*Y.x+J.delta.x,K=(J.height-q.height)*Y.y+J.delta.y,X=b1();if(J.styles.set({width:q.width-J.widthOffset,height:q.height-J.heightOffset,top:J.top+K+X.y,left:J.left+H+X.x},n),(Z=J.getElementMutationObserver())==null||Z.takeRecords(),i1(J.element)&&i1(J.placeholder)){let z=Array.from(J.element.cells),A=Array.from(J.placeholder.cells);if(!J.getSavedCellWidths())J.setSavedCellWidths(z.map((I)=>I.style.width));for(let[I,U]of z.entries()){let M=A[I];U.style.width=`${M.getBoundingClientRect().width}px`}}let B=($=J.getTranslate())!=null?$:{x:0,y:0},N=J.left+H+X.x+B.x,W=J.top+K+X.y+B.y,G=q.width-J.widthOffset,L=q.height-J.heightOffset,F=J.frameTransform;J.dragOperation.shape=new XJ(N*F.scaleX+F.x,W*F.scaleY+F.y,G*F.scaleX,L*F.scaleY)})}var oY=250,iY="ease";function nY(J){var Q,Z,$,q;let{animation:Y}=J;if(typeof Y==="function"){let U=Y({source:J.source,element:J.element,feedbackElement:J.feedbackElement,placeholder:J.placeholder,translate:J.translate,moved:J.moved});Promise.resolve(U).then(()=>{J.cleanup(),requestAnimationFrame(J.restoreFocus)});return}let{duration:H=oY,easing:K=iY}=Y!=null?Y:{};$Q(J.feedbackElement);let[,X]=(Q=f1(J.feedbackElement,(U)=>("translate"in U)))!=null?Q:[];X==null||X.pause();let B=(Z=J.placeholder)!=null?Z:J.element,N={frameTransform:J$(J.feedbackElement,B)?null:void 0},W=new hJ(J.feedbackElement,N),G=($=xQ(DJ(J.feedbackElement).translate))!=null?$:J.translate,L=new hJ(B,N),F=XJ.delta(W,L,J.alignment),z={x:G.x-F.x,y:G.y-F.y},A=Math.round(W.intrinsicHeight)!==Math.round(L.intrinsicHeight)?{minHeight:[`${W.intrinsicHeight}px`,`${L.intrinsicHeight}px`],maxHeight:[`${W.intrinsicHeight}px`,`${L.intrinsicHeight}px`]}:{},I=Math.round(W.intrinsicWidth)!==Math.round(L.intrinsicWidth)?{minWidth:[`${W.intrinsicWidth}px`,`${L.intrinsicWidth}px`],maxWidth:[`${W.intrinsicWidth}px`,`${L.intrinsicWidth}px`]}:{};J.styles.set({transition:J.transition},n),J.feedbackElement.setAttribute(o1,""),(q=J.getElementMutationObserver())==null||q.takeRecords(),P2({element:J.feedbackElement,keyframes:$9(FZ(FZ({},A),I),{translate:[`${G.x}px ${G.y}px 0`,`${z.x}px ${z.y}px 0`]}),options:{duration:g1(NJ(J.feedbackElement))?0:J.moved||J.feedbackElement!==J.element?H:0,easing:K}}).then(()=>{J.feedbackElement.removeAttribute(o1),X==null||X.finish(),J.cleanup(),requestAnimationFrame(J.restoreFocus)})}var Q$,n1,zZ,K9,W0,Z$,$$,uQ=class extends(n1=$J,Q$=[T],n1){constructor(Q,Z){super(Q,Z);m(this,W0),m(this,K9,l(zZ,8,this)),l(zZ,11,this),this.state={initial:{},current:{}};let $=Q.registry.plugins.get(V0),q=$==null?void 0:$.register(uY);if(q){let Y=this.destroy.bind(this);this.destroy=()=>{q(),Y()}}this.registerEffect(XQ(this,W0,Z$).bind(this,$)),this.registerEffect(XQ(this,W0,$$))}};zZ=pQ(n1);K9=new WeakMap;W0=new WeakSet;Z$=function(J){let{overlay:Q}=this;if(!Q||!J)return;let Z=HZ(Q);if(!Z)return;return J.addRoot(Z)};$$=function(){var J,Q,Z,$,q,Y,H;let{state:K,manager:X,options:B}=this,{dragOperation:N}=X,{position:W,source:G,status:L}=N;if(L.idle){K.current={},K.initial={};return}if(!G)return;let{element:F}=G,z=G.pluginConfig(uQ),A=(Q=(J=z==null?void 0:z.feedback)!=null?J:B==null?void 0:B.feedback)!=null?Q:"default",I=typeof A==="function"?A(G,X):A;if(!F||I==="none"||!L.initialized||L.initializing)return;let{initial:U}=K,M=(Z=this.overlay)!=null?Z:F,V=qQ(M),w=qQ(F),f=!J$(F,M),j=new hJ(F,{frameTransform:f?w:null,ignoreTransforms:!f}),p={x:w.scaleX/V.scaleX,y:w.scaleY/V.scaleY},{width:b,height:y,top:GQ,left:s}=j;if(f)b=b/p.x,y=y/p.y;let v=new E2(M),R0=DJ(F),{transition:A9,translate:I9,boxSizing:v$,paddingBlockStart:b$,paddingBlockEnd:g$,paddingInlineStart:u$,paddingInlineEnd:m$,borderInlineStartWidth:p$,borderInlineEndWidth:d$,borderBlockStartWidth:_$,borderBlockEndWidth:c$}=R0,OZ=A9.split(",").filter((S)=>!/^\s*(transform|translate|scale)\b/.test(S)).join(","),cJ=WZ(R0),l$=R0.transform,j9=I==="clone",O9=v$==="content-box",R9=O9?parseInt(u$)+parseInt(m$)+parseInt(p$)+parseInt(d$):0,D9=O9?parseInt(b$)+parseInt(g$)+parseInt(_$)+parseInt(c$):0,KJ=I!=="move"&&!this.overlay?mY(G,j9?"clone":"hidden"):null,D0=C(()=>K0(X.dragOperation.activatorEvent));if(!U.translate){if(this.overlay&&cJ)U.translate={x:cJ.x,y:cJ.y};else if(I9!=="none"){let S=xQ(I9);if(S)U.translate=S}}if(!U.transformOrigin){let S=C(()=>W.current),_=s+(($=cJ==null?void 0:cJ.x)!=null?$:0),HJ=GQ+((q=cJ==null?void 0:cJ.y)!=null?q:0);U.transformOrigin={x:(S.x-_*V.scaleX-V.x)/(b*V.scaleX),y:(S.y-HJ*V.scaleY-V.y)/(y*V.scaleY)}}let{transformOrigin:VQ}=U,C9=GQ*V.scaleY+V.y,T9=s*V.scaleX+V.x;if(!U.coordinates){if(U.coordinates={x:T9,y:C9},p.x!==1||p.y!==1){let{scaleX:S,scaleY:_}=w,{x:HJ,y:fJ}=VQ;U.coordinates.x+=(b*S-b)*HJ,U.coordinates.y+=(y*_-y)*fJ}}if(!U.dimensions)U.dimensions={width:b,height:y};if(!U.frameTransform)U.frameTransform=V;let P9={x:U.coordinates.x-T9,y:U.coordinates.y-C9},E9={width:(U.dimensions.width*U.frameTransform.scaleX-b*V.scaleX)*VQ.x,height:(U.dimensions.height*U.frameTransform.scaleY-y*V.scaleY)*VQ.y},C0={x:P9.x/V.scaleX+E9.width,y:P9.y/V.scaleY+E9.height},S9={left:s+C0.x,top:GQ+C0.y};M.setAttribute(CJ,"true");let k9=C(()=>N.transform),x9=(Y=U.translate)!=null?Y:{x:0,y:0},s$=k9.x*V.scaleX+x9.x,o$=k9.y*V.scaleY+x9.y,h9=b1();if(v.set({width:b-R9,height:y-D9,top:S9.top+h9.y,left:S9.left+h9.x,translate:`${s$}px ${o$}px 0`,transform:this.overlay?"none":l$,transition:OZ?`${OZ}, translate 0ms linear`:"translate 0ms linear",scale:f?`${p.x} ${p.y}`:"","transform-origin":`${VQ.x*100}% ${VQ.y*100}%`},n),KJ){if(F.insertAdjacentElement("afterend",KJ),B==null?void 0:B.rootElement)(typeof B.rootElement==="function"?B.rootElement(G):B.rootElement).appendChild(F)}if(q0(M)){if(!M.hasAttribute("popover"))M.setAttribute("popover","manual");$Q(M),M.addEventListener("beforetoggle",f2)}let lJ,T0,RZ,y9=sY({placeholder:KJ,element:F,feedbackElement:M,frameTransform:V,transformOrigin:VQ,width:b,height:y,top:GQ,left:s,widthOffset:R9,heightOffset:D9,delta:C0,styles:v,dragOperation:N,getTranslate:()=>K.current.translate,getElementMutationObserver:()=>lJ,getSavedCellWidths:()=>RZ,setSavedCellWidths:(S)=>{RZ=S}}),f9=new hJ(M);C(()=>N.shape=f9);let P0=NJ(M),v9=(S)=>{this.manager.actions.stop({event:S})},i$=g1(P0);if(D0)P0.addEventListener("resize",v9);if(C(()=>G.status)==="idle")requestAnimationFrame(()=>G.status="dragging");if(KJ)y9.observe(KJ),lJ=cY(F,KJ,j9),T0=lY(F,KJ,M);let b9=(H=X.dragOperation.source)==null?void 0:H.id,n$=()=>{var S;if(!D0||b9==null)return;let _=X.registry.draggables.get(b9),HJ=(S=_==null?void 0:_.handle)!=null?S:_==null?void 0:_.element;if(xJ(HJ))HJ.focus()},E0=()=>{var S;if(lJ==null||lJ.disconnect(),T0==null||T0.disconnect(),y9.disconnect(),P0.removeEventListener("resize",v9),q0(M))M.removeEventListener("beforetoggle",f2),M.removeAttribute("popover");if(M.removeAttribute(CJ),v.reset(),RZ&&i1(F)){let fJ=Array.from(F.cells);for(let[S0,DZ]of fJ.entries())DZ.style.width=(S=RZ[S0])!=null?S:""}G.status="idle";let _=K.current.translate!=null,HJ=N.status.dragging;if(KJ&&(!HJ&&_||KJ.parentElement!==M.parentElement)&&M.isConnected)KJ.replaceWith(M);KJ==null||KJ.remove()},a$=B==null?void 0:B.dropAnimation,g9=this,r$=nJ(()=>{var S,_,HJ;let{transform:fJ,status:S0}=N;if(!fJ.x&&!fJ.y&&!K.current.translate)return;if(S0.dragging){let DZ=(S=U.translate)!=null?S:{x:0,y:0},CZ={x:fJ.x/V.scaleX+DZ.x,y:fJ.y/V.scaleY+DZ.y},u9=K.current.translate,t$=C(()=>N.modifiers),k0=C(()=>{var _Q;return(_Q=N.shape)==null?void 0:_Q.current}),dQ=B==null?void 0:B.keyboardTransition,m9=D0&&!i$&&dQ!==null?`${(_=dQ==null?void 0:dQ.duration)!=null?_:250}ms ${(HJ=dQ==null?void 0:dQ.easing)!=null?HJ:"cubic-bezier(0.25, 1, 0.5, 1)"}`:"0ms linear";if(v.set({transition:OZ?`${OZ}, translate ${m9}`:`translate ${m9}`,translate:`${CZ.x}px ${CZ.y}px 0`},n),lJ==null||lJ.takeRecords(),k0&&k0!==f9&&u9&&!t$.length){let _Q=e.delta(CZ,u9);N.shape=XJ.from(k0.boundingRectangle).translate(_Q.x*V.scaleX,_Q.y*V.scaleY)}else N.shape=new hJ(M);K.current.translate=CZ}},function(){if(N.status.dropped){this.dispose(),G.status="dropping";let S=(z==null?void 0:z.dropAnimation)!==void 0?z.dropAnimation:g9.dropAnimation!==void 0?g9.dropAnimation:a$,_=K.current.translate,HJ=_!=null;if(!_&&F!==M)_={x:0,y:0};if(!_||S===null){E0();return}X.renderer.rendering.then(()=>{nY({source:G,element:F,feedbackElement:M,placeholder:KJ,translate:_,moved:HJ,transition:A9,alignment:G.alignment,styles:v,animation:S!=null?S:void 0,getElementMutationObserver:()=>lJ,cleanup:E0,restoreFocus:n$})})}});return()=>{E0(),r$()}};FJ(zZ,4,"overlay",Q$,uQ,K9);WQ(zZ,uQ);uQ.configure=EQ(uQ);var F0=uQ,BZ=!0,aY=!1,q$,Y$,K$,H$,mJ,H9,X9;H$=(K$=[T],UJ.Forward),Y$=(q$=[T],UJ.Reverse);var MZ=class{constructor(){m(this,H9,l(mJ,8,this,BZ)),l(mJ,11,this),m(this,X9,l(mJ,12,this,BZ)),l(mJ,15,this)}isLocked(J){if(J===UJ.Idle)return!1;if(J==null)return this[UJ.Forward]===BZ&&this[UJ.Reverse]===BZ;return this[J]===BZ}unlock(J){if(J===UJ.Idle)return;this[J]=aY}};mJ=pQ(null);H9=new WeakMap;X9=new WeakMap;FJ(mJ,4,H$,K$,MZ,H9);FJ(mJ,4,Y$,q$,MZ,X9);WQ(mJ,MZ);var rY=[UJ.Forward,UJ.Reverse],v2=class{constructor(){this.x=new MZ,this.y=new MZ}isLocked(){return this.x.isLocked()&&this.y.isLocked()}},tY=class extends $J{constructor(J){super(J);let Q=IJ(new v2),Z=null;this.signal=Q,o(()=>{let{status:$}=J.dragOperation;if(!$.initialized){Z=null,Q.value=new v2;return}let{delta:q}=J.dragOperation.position;if(Z){let Y={x:b2(q.x,Z.x),y:b2(q.y,Z.y)},H=Q.peek();JJ(()=>{for(let K of $1)for(let X of rY)if(Y[K]===X)H[K].unlock(X);Q.value=H})}Z=q})}get current(){return this.signal.peek()}};function b2(J,Q){return Math.sign(J-Q)}var X$,a1,wZ,W9,uJ,r1,z0=class extends(a1=SQ,X$=[T],a1){constructor(J){super(J);m(this,W9,l(wZ,8,this,!1)),l(wZ,11,this),m(this,uJ),m(this,r1,()=>{if(!x(this,uJ))return;let{element:Y,by:H}=x(this,uJ);if(H.y)Y.scrollTop+=H.y;if(H.x)Y.scrollLeft+=H.x}),this.scroll=(Y,H)=>{var K;if(this.disabled)return!1;let X=this.getScrollableElements();if(!X)return qJ(this,uJ,void 0),!1;let{position:B}=this.manager.dragOperation,N=B==null?void 0:B.current;if(N){let{by:W}=Y!=null?Y:{},G=W?{x:g2(W.x),y:g2(W.y)}:void 0,L=G?void 0:this.scrollIntentTracker.current;if(L==null?void 0:L.isLocked())return!1;for(let F of X){let z=D2(F,W);if(z.x||z.y){let{speed:A,direction:I}=C2(F,N,G,H==null?void 0:H.acceleration,H==null?void 0:H.threshold);if(L){for(let U of $1)if(L[U].isLocked(I[U]))A[U]=0,I[U]=0}if(I.x||I.y){let{x:U,y:M}=W!=null?W:I,V=U*A.x,w=M*A.y;if(V||w){let f=(K=x(this,uJ))==null?void 0:K.by;if(this.autoScrolling&&f){if(f.x&&!V||f.y&&!w)continue}return qJ(this,uJ,{element:F,by:{x:V,y:w}}),XZ.schedule(x(this,r1)),!0}}}}}return qJ(this,uJ,void 0),!1};let Q=null,Z=null,$=AQ(()=>{let{position:Y,source:H}=J.dragOperation;if(!Y)return null;let K=u1(HZ(H==null?void 0:H.element),Y.current);if(K)Q=K;return K!=null?K:Q}),q=AQ(()=>{let Y=$.value,{documentElement:H}=QQ(Y);if(!Y||Y===H){let{target:K}=J.dragOperation,X=K==null?void 0:K.element;if(X){let B=Y0(X,{excludeElement:!1});return Z=B,B}}if(Y){let K=Y0(Y,{excludeElement:!1});if(this.autoScrolling&&Z&&K.size<(Z==null?void 0:Z.size))return Z;return Z=K,K}return Z=null,null},EJ);this.getScrollableElements=()=>{return q.value},this.scrollIntentTracker=new tY(J),this.destroy=J.monitor.addEventListener("dragmove",(Y)=>{if(this.disabled||Y.defaultPrevented||!K0(J.dragOperation.activatorEvent)||!Y.by)return;if(this.scroll({by:Y.by}))Y.preventDefault()})}};wZ=pQ(a1);W9=new WeakMap;uJ=new WeakMap;r1=new WeakMap;FJ(wZ,4,"autoScrolling",X$,z0,W9);WQ(wZ,z0);function g2(J){if(J>0)return UJ.Forward;if(J<0)return UJ.Reverse;return UJ.Idle}var eY=class{constructor(J){this.scheduler=J,this.pending=!1,this.tasks=new Set,this.resolvers=new Set,this.flush=()=>{let{tasks:Q,resolvers:Z}=this;this.pending=!1,this.tasks=new Set,this.resolvers=new Set;for(let $ of Q)$();for(let $ of Z)$()}}schedule(J){if(this.tasks.add(J),!this.pending)this.pending=!0,this.scheduler(this.flush);return new Promise((Q)=>this.resolvers.add(Q))}},J5=new eY((J)=>{if(typeof requestAnimationFrame==="function")requestAnimationFrame(J);else J()}),Q5=10,t1=class extends $J{constructor(Q,Z){super(Q,Z);let $=Q.registry.plugins.get(z0);if(!$)throw Error("AutoScroller plugin depends on Scroller plugin");this.destroy=o(()=>{var q,Y,H;if(this.disabled)return;let{position:K,status:X}=Q.dragOperation;if(X.dragging){let B={acceleration:(q=this.options)==null?void 0:q.acceleration,threshold:typeof((Y=this.options)==null?void 0:Y.threshold)==="number"?{x:this.options.threshold,y:this.options.threshold}:(H=this.options)==null?void 0:H.threshold};if($.scroll(void 0,B)){$.autoScrolling=!0;let W=setInterval(()=>J5.schedule(()=>$.scroll(void 0,B)),Q5);return()=>{clearInterval(W)}}else $.autoScrolling=!1}})}};t1.configure=EQ(t1);var W$=t1,u2={capture:!0,passive:!0},UZ,Z5=class extends SQ{constructor(J){super(J);m(this,UZ),this.handleScroll=()=>{if(x(this,UZ)==null)qJ(this,UZ,setTimeout(()=>{this.manager.collisionObserver.forceUpdate(!1),qJ(this,UZ,void 0)},50))};let{dragOperation:Q}=this.manager;this.destroy=o(()=>{var Z,$,q;if(Q.status.dragging){let H=(q=($=(Z=Q.source)==null?void 0:Z.element)==null?void 0:$.ownerDocument)!=null?q:document;return H.addEventListener("scroll",this.handleScroll,u2),()=>{H.removeEventListener("scroll",this.handleScroll,u2)}}})}};UZ=new WeakMap;var $5="* { user-select: none !important; -webkit-user-select: none !important; }",q5=class extends $J{constructor(J){super(J);this.manager=J;let Q=J.registry.plugins.get(V0),Z=Q==null?void 0:Q.register($5);if(this.destroy=o(()=>{let{dragOperation:$}=this.manager;if($.status.initialized)return _1(),document.addEventListener("selectionchange",_1,{capture:!0}),()=>{document.removeEventListener("selectionchange",_1,{capture:!0})}}),Z){let $=this.destroy.bind(this);this.destroy=()=>{Z(),$()}}}};function _1(){var J;(J=document.getSelection())==null||J.removeAllRanges()}var LZ=Object.freeze({offset:10,keyboardCodes:{start:["Space","Enter"],cancel:["Escape"],end:["Space","Enter","Tab"],up:["ArrowUp"],down:["ArrowDown"],left:["ArrowLeft"],right:["ArrowRight"]},preventActivation(J,Q){var Z;let $=(Z=Q.handle)!=null?Z:Q.element;return J.target!==$}}),yQ,L0=class extends aJ{constructor(Q,Z){super(Q);this.manager=Q,this.options=Z,m(this,yQ,[]),this.listeners=new p1,this.handleSourceKeyDown=($,q,Y)=>{if(this.disabled||$.defaultPrevented)return;if(!gJ($.target))return;if(q.disabled)return;let{keyboardCodes:H=LZ.keyboardCodes,preventActivation:K=LZ.preventActivation}=Y!=null?Y:{};if(!H.start.includes($.code))return;if(!this.manager.dragOperation.status.idle)return;if(K==null?void 0:K($,q))return;this.handleStart($,q,Y)}}bind(Q,Z=this.options){return o(()=>{var q;let Y=(q=Q.handle)!=null?q:Q.element,H=(K)=>{if(K0(K))this.handleSourceKeyDown(K,Q,Z)};if(Y)return Y.addEventListener("keydown",H),()=>{Y.removeEventListener("keydown",H)}})}handleStart(Q,Z,$){let{element:q}=Z;if(!q)throw Error("Source draggable does not have an associated element");Q.preventDefault(),Q.stopImmediatePropagation(),T2(q);let{center:Y}=new hJ(q);if(this.manager.actions.start({event:Q,coordinates:{x:Y.x,y:Y.y},source:Z}).signal.aborted)return this.cleanup();this.sideEffects();let K=QQ(q),X=[this.listeners.bind(K,[{type:"keydown",listener:(B)=>this.handleKeyDown(B,Z,$),options:{capture:!0}}])];x(this,yQ).push(...X)}handleKeyDown(Q,Z,$){let{keyboardCodes:q=LZ.keyboardCodes}=$!=null?$:{};if(hQ(Q,[...q.end,...q.cancel])){Q.preventDefault();let Y=hQ(Q,q.cancel);this.handleEnd(Q,Y);return}if(hQ(Q,q.up))this.handleMove("up",Q);else if(hQ(Q,q.down))this.handleMove("down",Q);if(hQ(Q,q.left))this.handleMove("left",Q);else if(hQ(Q,q.right))this.handleMove("right",Q)}handleEnd(Q,Z){this.manager.actions.stop({event:Q,canceled:Z}),this.cleanup()}handleMove(Q,Z){var $,q;let{shape:Y}=this.manager.dragOperation,H=Z.shiftKey?5:1,K={x:0,y:0},X=(q=($=this.options)==null?void 0:$.offset)!=null?q:LZ.offset;if(typeof X==="number")X={x:X,y:X};if(!Y)return;switch(Q){case"up":K={x:0,y:-X.y*H};break;case"down":K={x:0,y:X.y*H};break;case"left":K={x:-X.x*H,y:0};break;case"right":K={x:X.x*H,y:0};break}if(K.x||K.y)Z.preventDefault(),this.manager.actions.move({event:Z,by:K})}sideEffects(){let Q=this.manager.registry.plugins.get(W$);if((Q==null?void 0:Q.disabled)===!1)Q.disable(),x(this,yQ).push(()=>{Q.enable()})}cleanup(){x(this,yQ).forEach((Q)=>Q()),qJ(this,yQ,[])}destroy(){this.cleanup(),this.listeners.clear()}};yQ=new WeakMap;L0.configure=EQ(L0);L0.defaults=LZ;var B$=L0;function hQ(J,Q){return Q.includes(J.code)}var YQ,Y5=class extends C1{constructor(){super(...arguments);m(this,YQ)}onEvent(J){switch(J.type){case"pointerdown":qJ(this,YQ,ZQ(J));break;case"pointermove":if(!x(this,YQ))return;let{x:Q,y:Z}=ZQ(J),$={x:Q-x(this,YQ).x,y:Z-x(this,YQ).y},{tolerance:q}=this.options;if(q&&fZ($,q)){this.abort();return}if(fZ($,this.options.value))this.activate(J);break;case"pointerup":this.abort();break}}abort(){qJ(this,YQ,void 0)}};YQ=new WeakMap;var fQ,KQ,K5=class extends C1{constructor(){super(...arguments);m(this,fQ),m(this,KQ)}onEvent(J){switch(J.type){case"pointerdown":qJ(this,KQ,ZQ(J)),qJ(this,fQ,setTimeout(()=>this.activate(J),this.options.value));break;case"pointermove":if(!x(this,KQ))return;let{x:Q,y:Z}=ZQ(J),$={x:Q-x(this,KQ).x,y:Z-x(this,KQ).y};if(fZ($,this.options.tolerance))this.abort();break;case"pointerup":this.abort();break}}abort(){if(x(this,fQ))clearTimeout(x(this,fQ)),qJ(this,KQ,void 0),qJ(this,fQ,void 0)}};fQ=new WeakMap;KQ=new WeakMap;var bQ=class{};bQ.Delay=K5;bQ.Distance=Y5;var e1=Object.freeze({activationConstraints(J,Q){var Z;let{pointerType:$,target:q}=J;if($==="mouse"&&gJ(q)&&(Q.handle===q||((Z=Q.handle)==null?void 0:Z.contains(q))))return;if($==="touch")return[new bQ.Delay({value:250,tolerance:5})];if(k2(q)&&!J.defaultPrevented)return[new bQ.Delay({value:200,tolerance:0})];return[new bQ.Delay({value:200,tolerance:10}),new bQ.Distance({value:5})]},preventActivation(J,Q){var Z;let{target:$}=J;if($===Q.element)return!1;if($===Q.handle)return!1;if(!gJ($))return!1;if((Z=Q.handle)==null?void 0:Z.contains($))return!1;return z2($)}}),vQ,G0=class extends aJ{constructor(Q,Z){super(Q);this.manager=Q,this.options=Z,m(this,vQ,new Set),this.listeners=new p1,this.latest={event:void 0,coordinates:void 0},this.handleMove=()=>{let{event:$,coordinates:q}=this.latest;if(!$||!q)return;this.manager.actions.move({event:$,to:q})},this.handleCancel=this.handleCancel.bind(this),this.handlePointerUp=this.handlePointerUp.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this)}activationConstraints(Q,Z,$=this.options){let{activationConstraints:q=e1.activationConstraints}=$!=null?$:{};return typeof q==="function"?q(Q,Z):q}bind(Q,Z=this.options){return o(()=>{var q;let Y=new AbortController,{signal:H}=Y,K=(B)=>{if(S2(B))this.handlePointerDown(B,Q,Z)},X=[(q=Q.handle)!=null?q:Q.element];if(Z==null?void 0:Z.activatorElements)if(Array.isArray(Z.activatorElements))X=Z.activatorElements;else X=Z.activatorElements(Q);for(let B of X){if(!B)continue;W5(B.ownerDocument.defaultView),B.addEventListener("pointerdown",K,{signal:H})}return()=>Y.abort()})}handlePointerDown(Q,Z,$){if(this.disabled||!Q.isPrimary||Q.button!==0||!gJ(Q.target)||Z.disabled||H5(Q)||!this.manager.dragOperation.status.idle)return;let{preventActivation:q=e1.preventActivation}=$!=null?$:{};if(q==null?void 0:q(Q,Z))return;let{target:Y}=Q,H=xJ(Y)&&Y.draggable&&Y.getAttribute("draggable")==="true",K=qQ(Z.element),{x:X,y:B}=ZQ(Q);this.initialCoordinates={x:X*K.scaleX+K.x,y:B*K.scaleY+K.y};let N=this.activationConstraints(Q,Z,$);Q.sensor=this;let W=new n8(N,(z)=>this.handleStart(Z,z));W.signal.onabort=()=>this.handleCancel(Q),W.onEvent(Q),this.controller=W;let G=nZ(),L=this.listeners.bind(G,[{type:"pointermove",listener:(z)=>this.handlePointerMove(z,Z)},{type:"pointerup",listener:this.handlePointerUp,options:{capture:!0}},{type:"pointercancel",listener:this.handleCancel},{type:"dragstart",listener:H?this.handleCancel:X0,options:{capture:!0}}]),F=()=>{L(),this.initialCoordinates=void 0};x(this,vQ).add(F)}handlePointerMove(Q,Z){var $,q;if((($=this.controller)==null?void 0:$.activated)===!1){(q=this.controller)==null||q.onEvent(Q);return}if(this.manager.dragOperation.status.dragging){let Y=ZQ(Q),H=qQ(Z.element);Y.x=Y.x*H.scaleX+H.x,Y.y=Y.y*H.scaleY+H.y,Q.preventDefault(),Q.stopPropagation(),this.latest.event=Q,this.latest.coordinates=Y,XZ.schedule(this.handleMove)}}handlePointerUp(Q){let{status:Z}=this.manager.dragOperation;if(!Z.idle){Q.preventDefault(),Q.stopPropagation();let $=!Z.initialized;this.manager.actions.stop({event:Q,canceled:$})}this.cleanup()}handleKeyDown(Q){if(Q.key==="Escape")Q.preventDefault(),this.handleCancel(Q)}handleStart(Q,Z){let{manager:$,initialCoordinates:q}=this;if(!q||!$.dragOperation.status.idle)return;if(Z.defaultPrevented)return;if($.actions.start({coordinates:q,event:Z,source:Q}).signal.aborted)return this.cleanup();Z.preventDefault();let K=QQ(Z.target).body;try{K.setPointerCapture(Z.pointerId)}catch(N){this.handleCancel(Z);return}let X=gJ(Z.target)?[Z.target,K]:K,B=this.listeners.bind(X,[{type:"touchmove",listener:X0,options:{passive:!1}},{type:"click",listener:X0},{type:"contextmenu",listener:X0},{type:"keydown",listener:this.handleKeyDown}]);x(this,vQ).add(B)}handleCancel(Q){let{dragOperation:Z}=this.manager;if(Z.status.initialized)this.manager.actions.stop({event:Q,canceled:!0});this.cleanup()}cleanup(){let{controller:Q}=this;if(this.controller=void 0,Q&&!Q.signal.aborted)Q.abort();this.latest={event:void 0,coordinates:void 0},x(this,vQ).forEach((Z)=>Z()),x(this,vQ).clear()}destroy(){this.cleanup(),this.listeners.clear()}};vQ=new WeakMap;G0.configure=EQ(G0);G0.defaults=e1;var N$=G0;function H5(J){return"sensor"in J}function X0(J){J.preventDefault()}function X5(){}var m2=new WeakSet;function W5(J){if(!J||m2.has(J))return;J.addEventListener("touchmove",X5,{capture:!1,passive:!1}),m2.add(J)}var HQ={modifiers:[],plugins:[yY,W$,vY,F0,q5],sensors:[N$,B$]},B9=class extends Y2{constructor(J={}){let Q=VJ(J.plugins,HQ.plugins),Z=VJ(J.sensors,HQ.sensors),$=VJ(J.modifiers,HQ.modifiers);super($9(FZ({},J),{plugins:[Z5,z0,V0,...Q],sensors:Z,modifiers:$}))}},U$,L$,J9,pJ,N9,U9,IZ=class extends(J9=MJ,L$=[T],U$=[T],J9){constructor(J,Q){var Z=J,{element:$,effects:q=()=>[],handle:Y}=Z,H=c2(Z,["element","effects","handle"]);super(FZ({effects:()=>[...q(),()=>{var K,X;let{manager:B}=this;if(!B)return;let W=((X=(K=this.sensors)==null?void 0:K.map(CQ))!=null?X:[...B.sensors]).map((G)=>{let L=G instanceof aJ?G:B.registry.register(G.plugin),F=G instanceof aJ?void 0:G.options;return L.bind(this,F)});return function(){W.forEach((L)=>L())}}]},H),Q);m(this,N9,l(pJ,8,this)),l(pJ,11,this),m(this,U9,l(pJ,12,this)),l(pJ,15,this),this.element=$,this.handle=Y}};pJ=pQ(J9);N9=new WeakMap;U9=new WeakMap;FJ(pJ,4,"handle",L$,IZ,N9);FJ(pJ,4,"element",U$,IZ,U9);WQ(pJ,IZ);var G$,V$,Q9,dJ,L9,c1,F$,z$,VZ,G9,M0=class extends(Q9=wJ,V$=[T],G$=[T],Q9){constructor(J,Q){var Z=J,{element:$,effects:q=()=>[]}=Z,Y=c2(Z,["element","effects"]);let{collisionDetector:H=x2}=Y,K=(B)=>{let{manager:N,element:W}=this;if(!W||B===null){this.shape=void 0;return}if(!N)return;let G=new hJ(W),L=C(()=>this.shape);if(G&&(L==null?void 0:L.equals(G)))return L;return this.shape=G,G},X=IJ(!1);super($9(FZ({},Y),{collisionDetector:H,effects:()=>[...q(),()=>{let{element:B,manager:N}=this;if(!N)return;let{dragOperation:W}=N,{source:G}=W;X.value=Boolean(G&&W.status.initialized&&B&&!this.disabled&&this.accepts(G))},()=>{let{element:B}=this;if(X.value&&B){let N=new O2(B,K);return()=>{N.disconnect(),this.shape=void 0}}},()=>{var B;if((B=this.manager)==null?void 0:B.dragOperation.status.initialized)return()=>{this.shape=void 0}}]}),Q);m(this,VZ),m(this,L9,l(dJ,8,this)),l(dJ,11,this),m(this,G9,l(dJ,12,this)),l(dJ,15,this),this.element=$,this.refreshShape=()=>K()}set element(J){qJ(this,VZ,J,z$)}get element(){var J;return(J=this.proxy)!=null?J:x(this,VZ,F$)}};dJ=pQ(Q9);L9=new WeakMap;VZ=new WeakSet;G9=new WeakMap;c1=FJ(dJ,20,"#element",V$,VZ,L9),F$=c1.get,z$=c1.set;FJ(dJ,4,"proxy",G$,M0,G9);WQ(dJ,M0);var D=TZ(x0(),1);var d=TZ(x0(),1);var V9=TZ(N5(),1);function B5(J){return J!=null&&typeof J==="object"&&"current"in J}function BQ(J){var Q;if(J==null)return;if(B5(J))return(Q=J.current)!=null?Q:void 0;return J}var U5=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",NQ=U5?d.useLayoutEffect:d.useEffect;function M$(){let J=d.useState(0)[1];return d.useCallback(()=>{J((Q)=>Q+1)},[J])}function L5(J,Q=!1){let Z=d.useRef(J.peek()),$=d.useRef(!1),q=M$();return NQ(()=>o(()=>{let Y=Z.current,H=J.value;if(Y!==H){if(Z.current=H,!$.current)return;if(Q)V9.flushSync(q);else q()}}),[J,Q,q]),{get value(){return $.current=!0,J.peek()}}}function w$(J,Q=[],Z=!1){let $=d.useRef(J);return $.current=J,L5(d.useMemo(()=>AQ(()=>$.current()),Q),Z)}function w0(J,Q){let Z=d.useRef(new Map),$=M$();return NQ(()=>{if(!J){Z.current.clear();return}return o(()=>{var q;let Y=!1,H=!1;for(let K of Z.current){let[X]=K,B=C(()=>K[1]),N=J[X];if(B!==N)Y=!0,Z.current.set(X,N),H=(q=Q==null?void 0:Q(X,B,N))!=null?q:!1}if(Y)if(H)queueMicrotask(()=>V9.flushSync($));else $()})},[J]),d.useMemo(()=>J?new Proxy(J,{get(q,Y){let H=q[Y];return Z.current.set(Y,H),H}}):J,[J])}function NH(J,Q){J()}function UQ(J){let Q=d.useRef(J);return NQ(()=>{Q.current=J},[J]),Q}function a(J,Q,Z=d.useEffect,$=Object.is){let q=d.useRef(J);Z(()=>{let Y=q.current;if(!$(J,Y))q.current=J,Q(J,Y)},[Q,J])}function A0(J,Q){let Z=d.useRef(BQ(J));NQ(()=>{let $=BQ(J);if($!==Z.current)Z.current=$,Q($)})}var{defineProperty:G5,defineProperties:V5,getOwnPropertyDescriptors:F5,getOwnPropertySymbols:j0}=Object,I$=Object.prototype.hasOwnProperty,j$=Object.prototype.propertyIsEnumerable,A$=(J,Q,Z)=>(Q in J)?G5(J,Q,{enumerable:!0,configurable:!0,writable:!0,value:Z}):J[Q]=Z,O$=(J,Q)=>{for(var Z in Q||(Q={}))if(I$.call(Q,Z))A$(J,Z,Q[Z]);if(j0){for(var Z of j0(Q))if(j$.call(Q,Z))A$(J,Z,Q[Z])}return J},R$=(J,Q)=>V5(J,F5(Q)),z5=(J,Q)=>{var Z={};for(var $ in J)if(I$.call(J,$)&&Q.indexOf($)<0)Z[$]=J[$];if(J!=null&&j0){for(var $ of j0(J))if(Q.indexOf($)<0&&j$.call(J,$))Z[$]=J[$]}return Z},M5=new B9,M9=D.createContext(M5),w5=D.memo(D.forwardRef(({children:J},Q)=>{let[Z,$]=D.useState(0),q=D.useRef(null),Y=D.useRef(null),H=D.useMemo(()=>({renderer:{get rendering(){var K;return(K=q.current)!=null?K:Promise.resolve()}},trackRendering(K){if(!q.current)q.current=new Promise((X)=>{Y.current=X});D.startTransition(()=>{K(),$((X)=>X+1)})}}),[]);return NQ(()=>{var K;(K=Y.current)==null||K.call(Y),q.current=null},[J,Z]),D.useImperativeHandle(Q,()=>H),null})),F9=[void 0,EJ];function wH(J){var Q=J,{children:Z,onCollision:$,onBeforeDragStart:q,onDragStart:Y,onDragMove:H,onDragOver:K,onDragEnd:X}=Q,B=z5(Q,["children","onCollision","onBeforeDragStart","onDragStart","onDragMove","onDragOver","onDragEnd"]);let N=D.useRef(null),{plugins:W,modifiers:G,sensors:L}=B,F=VJ(W,HQ.plugins),z=VJ(L,HQ.sensors),A=VJ(G,HQ.modifiers),I=UQ(q),U=UQ(Y),M=UQ(K),V=UQ(H),w=UQ(X),f=UQ($),j=A5(()=>{var p;return(p=B.manager)!=null?p:new B9(B)});return D.useEffect(()=>{if(!N.current)throw Error("Renderer not found");let{renderer:p,trackRendering:b}=N.current,{monitor:y}=j;j.renderer=p;let GQ=[y.addEventListener("beforedragstart",(s)=>{let v=I.current;if(v)b(()=>v(s,j))}),y.addEventListener("dragstart",(s)=>{var v;return(v=U.current)==null?void 0:v.call(U,s,j)}),y.addEventListener("dragover",(s)=>{let v=M.current;if(v)b(()=>v(s,j))}),y.addEventListener("dragmove",(s)=>{let v=V.current;if(v)b(()=>v(s,j))}),y.addEventListener("dragend",(s)=>{let v=w.current;if(v)b(()=>v(s,j))}),y.addEventListener("collision",(s)=>{var v;return(v=f.current)==null?void 0:v.call(f,s,j)})];return()=>GQ.forEach((s)=>s())},[j]),a(F,()=>j&&(j.plugins=F),...F9),a(z,()=>j&&(j.sensors=z),...F9),a(A,()=>j&&(j.modifiers=A),...F9),PZ(M9.Provider,{value:j,children:[TJ(w5,{ref:N,children:Z}),Z]})}function A5(J){let Q=D.useRef(null);if(!Q.current)Q.current=J();return D.useInsertionEffect(()=>{return()=>{var Z;return(Z=Q.current)==null?void 0:Z.destroy()}},[]),Q.current}function D$(){return D.useContext(M9)}function C$(J){var Q;let Z=(Q=D$())!=null?Q:void 0,[$]=D.useState(()=>J(Z));if($.manager!==Z)$.manager=Z;return NQ($.register,[Z,$]),$}function AH(J){let{disabled:Q,data:Z,element:$,handle:q,id:Y,modifiers:H,sensors:K,plugins:X}=J,B=C$((W)=>new IZ(R$(O$({},J),{register:!1,handle:BQ(q),element:BQ($)}),W)),N=w0(B,I5);return a(Y,()=>B.id=Y),A0(q,(W)=>B.handle=W),A0($,(W)=>B.element=W),a(Z,()=>Z&&(B.data=Z)),a(Q,()=>B.disabled=Q===!0),a(K,()=>B.sensors=K),a(H,()=>B.modifiers=H,void 0,EJ),a(X,()=>B.plugins=X,void 0,EJ),a(J.alignment,()=>B.alignment=J.alignment),{draggable:N,get isDragging(){return N.isDragging},get isDropping(){return N.isDropping},get isDragSource(){return N.isDragSource},handleRef:D.useCallback((W)=>{B.handle=W!=null?W:void 0},[B]),ref:D.useCallback((W)=>{var G,L;if(!W&&((G=B.element)==null?void 0:G.isConnected)&&!((L=B.manager)==null?void 0:L.dragOperation.status.idle))return;B.element=W!=null?W:void 0},[B])}}function I5(J,Q,Z){if(J==="isDragSource"&&!Z&&Q)return!0;return!1}function IH({children:J,className:Q,dropAnimation:Z,style:$,tag:q,disabled:Y}){var H;let K=D.useRef(null),X=D$(),B=(H=w$(()=>X==null?void 0:X.dragOperation.source,[X]).value)!=null?H:null,N=typeof Y==="function"?Y(B):Y;D.useEffect(()=>{if(!K.current||!X||N)return;let L=X.plugins.find((F)=>F instanceof F0);if(!L)return;return L.overlay=K.current,()=>{L.overlay=void 0}},[X,N]),D.useEffect(()=>{if(!X)return;let L=X.plugins.find((F)=>F instanceof F0);if(!L)return;return L.dropAnimation=Z,()=>{L.dropAnimation=void 0}},[X,Z]);let W=D.useMemo(()=>{if(!X)return null;let L=new Proxy(X.registry,{get(F,z){if(z==="register"||z==="unregister")return j5;return F[z]}});return new Proxy(X,{get(F,z){if(z==="registry")return L;return F[z]}})},[X]);return TJ(M9.Provider,{value:W,children:D.createElement(q||"div",{ref:K,className:Q,style:$,"data-dnd-overlay":!0},G())});function G(){if(!B||N)return null;if(typeof J==="function")return TJ(O5,{source:B,children:J});return J}}function j5(){return()=>{}}function O5({children:J,source:Q}){return J(w0(Q))}var{create:R5,defineProperty:T$,getOwnPropertyDescriptor:D5}=Object,P$=(J,Q)=>(Q=Symbol[J])?Q:Symbol.for("Symbol."+J),O0=(J)=>{throw TypeError(J)},C5=(J,Q,Z)=>(Q in J)?T$(J,Q,{enumerable:!0,configurable:!0,writable:!0,value:Z}):J[Q]=Z,T5=(J)=>{var Q;return[,,,R5((Q=J==null?void 0:J[P$("metadata")])!=null?Q:null)]},E$=["class","method","getter","setter","accessor","field","value","get","set"],S$=(J)=>J!==void 0&&typeof J!=="function"?O0("Function expected"):J,P5=(J,Q,Z,$,q)=>({kind:E$[J],name:Q,metadata:$,addInitializer:(Y)=>Z._?O0("Already initialized"):q.push(S$(Y||null))}),E5=(J,Q)=>C5(Q,P$("metadata"),J[3]),S5=(J,Q,Z,$)=>{for(var q=0,Y=J[Q>>1],H=Y&&Y.length;q<H;q++)Y[q].call(Z);return $},k$=(J,Q,Z,$,q,Y)=>{var H,K,X,B,N=Q&7,W=!1,G=!1,L=2,F=E$[N+5],z=J[L]||(J[L]=[]),A=(q=q.prototype,D5(q,Z));for(var I=$.length-1;I>=0;I--)X=P5(N,Z,K={},J[3],z),X.static=W,X.private=G,B=X.access={has:(U)=>(Z in U)},B.get=(U)=>U[Z],H=(0,$[I])(A[F],X),K._=1,S$(H)&&(A[F]=H);return A&&T$(q,Z,A),q},x$=(J,Q,Z)=>Q.has(J)||O0("Cannot "+Z),k5=(J,Q,Z)=>(x$(J,Q,"read from private field"),Q.get(J)),x5=(J,Q,Z)=>Q.has(J)?O0("Cannot add the same private member more than once"):Q instanceof WeakSet?Q.add(J):Q.set(J,Z),h5=(J,Q,Z,$)=>(x$(J,Q,"write to private field"),Q.set(J,Z),Z),LQ=class J{constructor(Q,Z){this.x=Q,this.y=Z}static delta(Q,Z){return new J(Q.x-Z.x,Q.y-Z.y)}static distance(Q,Z){return Math.hypot(Q.x-Z.x,Q.y-Z.y)}static equals(Q,Z){return Q.x===Z.x&&Q.y===Z.y}static from({x:Q,y:Z}){return new J(Q,Z)}},h$,y$,z9,I0,jZ,w9=class extends(z9=jJ,y$=[h],h$=[h],z9){constructor(J){let Q=LQ.from(J);super(Q,(Z,$)=>LQ.equals(Z,$));S5(jZ,5,this),x5(this,I0,0),this.velocity={x:0,y:0}}get delta(){return LQ.delta(this.current,this.initial)}get direction(){let{current:J,previous:Q}=this;if(!Q)return null;let Z={x:J.x-Q.x,y:J.y-Q.y};if(!Z.x&&!Z.y)return null;if(Math.abs(Z.x)>Math.abs(Z.y))return Z.x>0?"right":"left";return Z.y>0?"down":"up"}get current(){return super.current}set current(J){let{current:Q}=this,Z=LQ.from(J),$={x:Z.x-Q.x,y:Z.y-Q.y},q=Date.now(),Y=q-k5(this,I0),H=(K)=>Math.round(K/Y*100);JJ(()=>{h5(this,I0,q),this.velocity={x:H($.x),y:H($.y)},super.current=Z})}reset(J=this.defaultValue){super.reset(LQ.from(J)),this.velocity={x:0,y:0}}};jZ=T5(z9);I0=new WeakMap;k$(jZ,2,"delta",y$,w9);k$(jZ,2,"direction",h$,w9);E5(jZ,w9);var f$=((J)=>{return J.Horizontal="x",J.Vertical="y",J})(f$||{});Object.values(f$);var y5=({dragOperation:J,droppable:Q})=>{let Z=J.position.current;if(!Z)return null;let{id:$}=Q;if(!Q.shape)return null;if(Q.shape.containsPoint(Z)){let q=LQ.distance(Q.shape.center,Z);return{id:$,value:1/q,type:RJ.PointerIntersection,priority:OJ.High}}return null},f5=({dragOperation:J,droppable:Q})=>{let{shape:Z}=J;if(!Q.shape||!(Z==null?void 0:Z.current))return null;let $=Z.current.intersectionArea(Q.shape);if($){let{position:q}=J,Y=LQ.distance(Q.shape.center,q.current),K=$/(Z.current.area+Q.shape.area-$)/Y;return{id:Q.id,value:K,type:RJ.ShapeIntersection,priority:OJ.Normal}}return null},v5=(J)=>{var Q;return(Q=y5(J))!=null?Q:f5(J)};function jH(J){let{collisionDetector:Q,data:Z,disabled:$,element:q,id:Y,accept:H,type:K}=J,X=C$((N)=>new M0(R$(O$({},J),{register:!1,element:BQ(q)}),N)),B=w0(X);return a(Y,()=>X.id=Y),A0(q,(N)=>X.element=N),a(H,()=>X.accept=H,void 0,EJ),a(Q,()=>X.collisionDetector=Q!=null?Q:v5),a(Z,()=>Z&&(X.data=Z)),a($,()=>X.disabled=$===!0),a(K,()=>X.type=K),{droppable:B,get isDropTarget(){return B.isDropTarget},ref:D.useCallback((N)=>{var W,G;if(!N&&((W=X.element)==null?void 0:W.isConnected)&&!((G=X.manager)==null?void 0:G.dragOperation.status.idle))return;X.element=N!=null?N:void 0},[X])}}
|
|
71
|
-
export{JJ as
|
|
71
|
+
export{JJ as U,C as V,o as W,EJ as X,T as Y,o5 as Z,XJ as _,EQ as $,$J as aa,z8 as ba,VJ as ca,NJ as da,iZ as ea,g1 as fa,m1 as ga,DJ as ha,T2 as ia,P2 as ja,OK as ka,hJ as la,K0 as ma,x2 as na,gK as oa,F0 as pa,z0 as qa,B$ as ra,bQ as sa,N$ as ta,IZ as ua,M0 as va,BQ as wa,NQ as xa,w0 as ya,NH as za,a as Aa,A0 as Ba,wH as Ca,C$ as Da,AH as Ea,IH as Fa,jH as Ga,b5 as Ha};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as V}from"./chunk-41m51y08.js";import"./chunk-7436fyrg.js";import"./chunk-v0xbr5e6.js";import"./chunk-c0c88nje.js";import"./chunk-fwqpq2sy.js";import"./chunk-a8daqpfh.js";import"./chunk-804ndet8.js";import"./chunk-9g6vy76b.js";import"./chunk-wpntb95k.js";import"./chunk-pdajhyqm.js";import"./chunk-5vwkfxy7.js";import"./chunk-3gcnj1eq.js";import"./chunk-8a75zqbz.js";import"./chunk-1cjgpspz.js";import"./chunk-x0r8dcq0.js";import"./chunk-p8enen2a.js";import"./chunk-tc7q988r.js";import"./chunk-yj6tmjsc.js";import{Ae as U}from"./chunk-pqxh0cg7.js";import{Ne as N}from"./chunk-3823qzr0.js";import"./chunk-mggfc9ya.js";import"./chunk-v75fanse.js";import"./chunk-vf3bg920.js";import"./chunk-xcbb21j9.js";import"./chunk-ey7vty63.js";import"./chunk-gpeyctxd.js";import"./chunk-9sdhdhv4.js";import"./chunk-2jvqhps9.js";import"./chunk-57kgmgfs.js";import"./chunk-9a7a1p1j.js";import"./chunk-wtzkfwmx.js";import{ug as K}from"./chunk-m268vcdm.js";import{Ag as q,Fg as B,Gg as G,Sg as H,ch as J,yg as Z}from"./chunk-eczsk2xd.js";import{Fk as Y}from"./chunk-t15a1vp6.js";var W=Y(Z(),1);function _(){let{projectId:h}=$.useParams(),{teamId:v,ensureTeamIdForProject:w}=K();W.useEffect(()=>{w(h)},[h,w]);let{data:A}=G(U(h)),b=A?.rootFolder,{data:X}=B({queryKey:["folders",b],queryFn:()=>(async()=>{return await(await J.api.folders[":folderId"].$get({param:{folderId:b}})).json()})(),enabled:!!b});if(!v||!b||!X)return q(N,{});return q(V,{teamId:v,projectId:h,projectName:A.name??"",assetId:"recently-deleted",rootFolderId:b})}var $=H("/projects/$projectId/recently-deleted")({component:_});export{$ as Route};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
function N(k){if(!(k instanceof Error)||!("status"in k)||!("headers"in k))return!1;return(k.status===void 0||typeof k.status==="number")&&(k.headers===void 0||k.headers instanceof Headers)}function O(k){let w=k.headers?.get("x-should-retry");if(w==="true")return!0;if(w==="false")return!1;if(k.status===void 0)return!0;return k.status===408||k.status===409||k.status===429||typeof k.status==="number"&&k.status>=500}function J(k,w,C){let z=w??60000;if(z>0&&k>z)throw Error(`Server requested ${Math.ceil(k/1000)}s retry delay (max: ${Math.ceil(z/1000)}s). ${C}`);return k}function Q(k,w,C){let z=k.headers?.get("retry-after-ms");if(z){let F=Number.parseFloat(z);if(!Number.isNaN(F))return J(F,C,k.message)}let B=k.headers?.get("retry-after");if(B){let F=Number.parseFloat(B),K=Number.isNaN(F)?Date.parse(B)-Date.now():F*1000;return J(K,C,k.message)}return Math.min(0.5*2**w,8)*1000*(1-Math.random()*0.25)}function H(){let k=Error("Request aborted");return k.name="AbortError",k}function T(k,w){return new Promise((C,z)=>{if(w?.aborted){z(H());return}let B=()=>{clearTimeout(G),z(H())},G=setTimeout(()=>{w?.removeEventListener("abort",B),C()},Math.max(0,k));w?.addEventListener("abort",B,{once:!0})})}async function V(k,w={}){let C=w.maxRetries??0,z=C;for(;;)try{return await k()}catch(B){if(w.signal?.aborted)throw H();if(z<=0||!N(B)||!O(B))throw B;let G=C-z;z--,await T(Q(B,G,w.maxRetryDelayMs),w.signal)}}
|
|
3
|
+
export{V as Tj};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Jj as O}from"./chunk-749c09cw.js";import{Kj as C,Lj as E}from"./chunk-gh4w2bdg.js";import{Mj as y,Nj as K,Oj as P}from"./chunk-9e99n265.js";import{Pj as b}from"./chunk-bn4ewsy8.js";import"./chunk-m6sssvg3.js";import{Rj as M}from"./chunk-525eypdk.js";import{Tj as H}from"./chunk-67rr836p.js";import{Uj as k}from"./chunk-bw6wyw7k.js";import"./chunk-ts9f4zqh.js";import{hk as A,ik as N}from"./chunk-c7rj0f5r.js";import{nk as $,pk as S}from"./chunk-p1bcbtmg.js";import"./chunk-r5jmnsqj.js";import{tk as _}from"./chunk-2fc5hk8r.js";import{Ak as f}from"./chunk-va6hxm7n.js";import{Bk as U}from"./chunk-mhwp74hh.js";import"./chunk-t15a1vp6.js";var g=new Set(["openai","openai-codex","opencode"]),u=16;function V(j,D){if(!j)return!1;let w=D.toLowerCase();for(let[z,F]of Object.entries(j))if(z.toLowerCase()===w&&F!==null&&F.trim().length>0)return!0;return!1}function R(j,D,w){if(D)return D;if(V(w,"authorization")||V(w,"cf-aig-authorization"))return"unused";throw Error(`No API key for provider: ${j}`)}function c(j){return j.provider==="openrouter"||j.baseUrl.includes("openrouter.ai")?"openrouter":"openai"}function T(j,D){if(j)return j;if(k("PI_CACHE_RETENTION",D)==="long")return"long";return"short"}function q(j){return{supportsDeveloperRole:j.compat?.supportsDeveloperRole??!0,sessionAffinityFormat:j.compat?.sessionAffinityFormat??c(j),supportsLongCacheRetention:j.compat?.supportsLongCacheRetention??!0,supportsStrictMode:j.compat?.supportsStrictMode??!1,supportsOpenAIGrammarTools:j.compat?.supportsOpenAIGrammarTools??!1,supportsToolSearch:j.compat?.supportsToolSearch??!1,supportsExplicitPromptCacheMode:j.compat?.supportsExplicitPromptCacheMode??!1}}function r(j,D){return D==="long"&&j.supportsLongCacheRetention?"24h":void 0}function d(j){return N(A(j),"OpenAI API error")}var l=(j,D,w)=>{let z=new U;return(async()=>{let F={role:"assistant",content:[],api:j.api,provider:j.provider,model:j.id,usage:{input:0,output:0,cacheRead:0,cacheWrite:0,totalTokens:0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},stopReason:"stop",timestamp:Date.now()};try{let Q=R(j.provider,w?.apiKey,w?.headers),W=T(w?.cacheRetention,w?.env)==="none"?void 0:w?.sessionId,X=q(j),J=$(D.tools,X.supportsOpenAIGrammarTools),Y=a(j,D,Q,w?.headers,W),Z=m(j,D,w,X,J),B=await w?.onPayload?.(Z,j);if(B!==void 0)Z=B;let v={...w?.signal?{signal:w.signal}:{},...w?.timeoutMs!==void 0?{timeout:w.timeoutMs}:{},maxRetries:0},{data:I,response:L}=await H(()=>Y.responses.create(Z,v).withResponse(),{maxRetries:w?.maxRetries,maxRetryDelayMs:w?.maxRetryDelayMs,signal:w?.signal});if(await w?.onResponse?.({status:L.status,headers:_(L.headers)},j),z.push({type:"start",partial:F}),await P(I,F,z,j,{serviceTier:w?.serviceTier,grammarToolInputProperties:J,applyServiceTierPricing:(x,h)=>n(x,h,j)}),w?.signal?.aborted)throw Error("Request was aborted");if(F.stopReason==="aborted"||F.stopReason==="error")throw Error("An unknown error occurred");z.push({type:"done",reason:F.stopReason,message:F}),z.end()}catch(Q){for(let G of F.content)delete G.index,delete G.partialJson,delete G.customInput;F.stopReason=w?.signal?.aborted?"aborted":"error",F.errorMessage=d(Q),z.push({type:"error",reason:F.stopReason,error:F}),z.end()}})(),z},Wj=(j,D,w)=>{R(j.provider,w?.apiKey,w?.headers);let z=S(j,D,w,w?.apiKey),F=w?.reasoning?f(j,w.reasoning):void 0;return l(j,D,{...z,reasoningEffort:F==="off"?void 0:F})};function a(j,D,w,z,F){let Q=q(j),G={...j.headers};if(j.provider==="github-copilot"){let W=C(D.messages),X=E({messages:D.messages,hasImages:W});Object.assign(G,X)}if(F)if(Q.sessionAffinityFormat==="openrouter")G["x-session-id"]=F;else{if(Q.sessionAffinityFormat==="openai")G.session_id=F;G["x-client-request-id"]=F}if(z)Object.assign(G,z);return new M({apiKey:w,baseURL:j.baseUrl,dangerouslyAllowBrowser:!0,defaultHeaders:G})}function m(j,D,w,z=q(j),F=$(D.tools,z.supportsOpenAIGrammarTools)){let Q=O(D,z.supportsToolSearch),G=y(j,D,g,{grammarToolInputProperties:F,deferredTools:Q.deferred,toolOptions:{supportsStrictMode:z.supportsStrictMode,supportsOpenAIGrammarTools:z.supportsOpenAIGrammarTools}}),W=T(w?.cacheRetention,w?.env),X=W==="none"&&z.supportsExplicitPromptCacheMode,J={model:j.id,input:G,stream:!0,prompt_cache_key:W==="none"?void 0:b(w?.sessionId),prompt_cache_retention:r(z,W),prompt_cache_options:X?{mode:"explicit"}:void 0,store:!1};if(w?.maxTokens)J.max_output_tokens=Math.max(w.maxTokens,u);if(w?.temperature!==void 0)J.temperature=w?.temperature;if(w?.serviceTier!==void 0)J.service_tier=w.serviceTier;if(Q.immediate.length>0)J.tools=K(Q.immediate,{supportsStrictMode:z.supportsStrictMode,supportsOpenAIGrammarTools:z.supportsOpenAIGrammarTools});if(w?.toolChoice!==void 0)J.tool_choice=w.toolChoice;if(j.reasoning){if(w?.reasoningEffort||w?.reasoningSummary){let Y=w?.reasoningEffort?j.thinkingLevelMap?.[w.reasoningEffort]??w.reasoningEffort:"medium";J.reasoning={effort:Y,summary:w?.reasoningSummary||"auto"},J.include=["reasoning.encrypted_content"]}else if(j.provider!=="github-copilot"&&j.thinkingLevelMap?.off!==null)J.reasoning={effort:j.thinkingLevelMap?.off??"none"};if(j.provider==="xai")J.include=["reasoning.encrypted_content"]}return J}function i(j,D){switch(D){case"flex":return 0.5;case"priority":return j.id==="gpt-5.5"?2.5:2;default:return 1}}function n(j,D,w){let z=i(w,D);if(z===1)return;j.cost.input*=z,j.cost.output*=z,j.cost.cacheRead*=z,j.cost.cacheWrite*=z,j.cost.total=j.cost.input+j.cost.output+j.cost.cacheRead+j.cost.cacheWrite}export{Wj as streamSimple,l as stream};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{m as p}from"./chunk-fwqpq2sy.js";import{Ga as Uz}from"./chunk-5vwkfxy7.js";import{Pa as Yz,Qa as Zz,Ra as _z,Sa as $z,Ta as Kz}from"./chunk-8a75zqbz.js";import{ab as A}from"./chunk-x0r8dcq0.js";import{sf as v}from"./chunk-vf3bg920.js";import{Vf as Jz}from"./chunk-9sdhdhv4.js";import{ug as Xz}from"./chunk-m268vcdm.js";import{Ag as z,Bg as J,Bj as Y,Cg as a,Ci as zz,Dh as M,Eh as s,Fg as n,Jh as b,Qi as S,Zi as Gz,ch as r,ei as h,nh as o,tj as T,wh as t,yg as Bz,yh as e,zg as B}from"./chunk-eczsk2xd.js";import{Fk as Rz}from"./chunk-t15a1vp6.js";var _=Rz(Bz(),1);function uz({projectId:O,contextAssetId:R}){let{isHistoryMode:W,setIsHistoryMode:I,currentSessionId:Vz,chatAssets:u,removeAsset:Wz,messages:E,historySessions:g,isStreaming:D,fetchHistorySessions:m,loadSession:Lz,deleteSession:Nz,startNewSession:Qz,sendMessage:Pz,abortActiveSession:Oz,selectedAgentId:H,setSelectedAgentId:w,inputText:C,setInputText:l}=v(),{teamId:Z,ensureTeamIdForProject:j}=Xz();_.useEffect(()=>{if(O)j(O)},[O,j]);let{data:Dz=[]}=n({queryKey:["agents",Z],queryFn:async()=>{if(!Z)return[];let G=await r.api.teams[":teamId"].agents.$get({param:{teamId:Z}});if(!G.ok)throw Error("failed to fetch agents");return G.json()},enabled:!!Z}),F=Dz.filter((G)=>G.type==="chat"&&G.enabled);_.useEffect(()=>{if(F.length>0){if(!F.some((X)=>X.id===H))w(F[0].id)}},[F,H,w]);let d=_.useRef(null),y=_.useRef(null),k=_.useRef(!0),f=_.useRef(!0);_.useEffect(()=>{f.current=!0,k.current=!0},[O,R,W]),_.useEffect(()=>{let G=y.current?.querySelector('[data-slot="scroll-area-viewport"]');if(!G)return;let{scrollTop:X,isAtBottom:$}=v.getState(),V=setTimeout(()=>{if($)G.scrollTop=G.scrollHeight;else G.scrollTop=X;let Q=setTimeout(()=>{f.current=!1},50);return()=>clearTimeout(Q)},0);return()=>clearTimeout(V)},[O,R,W]),_.useEffect(()=>{let G=y.current?.querySelector('[data-slot="scroll-area-viewport"]');if(!G)return;let X=()=>{if(f.current)return;let $=G.scrollTop,V=G.scrollHeight-$-G.clientHeight<10;v.getState().setScrollState($,V)};return G.addEventListener("scroll",X),()=>{G.removeEventListener("scroll",X)}},[O,R,W]);let{ref:qz,isDropTarget:Ez}=Uz({id:"chatbot-sidebar",data:{type:"chatbot-sidebar"}});_.useEffect(()=>{if(!W){let{isAtBottom:G}=v.getState();if(G||D){let X=k.current?"auto":"smooth";d.current?.scrollIntoView({behavior:X})}k.current=!1}},[E,D,W]),_.useEffect(()=>{if(W&&Z)m(Z)},[W,m,Z]);let q=a(),Fz=_.useCallback(()=>{q.invalidateQueries({queryKey:["search"]}),q.invalidateQueries({queryKey:["folders"]}),q.invalidateQueries({queryKey:["files"]}),q.invalidateQueries({queryKey:["file"]}),q.invalidateQueries({queryKey:["version_stacks"]}),q.invalidateQueries({queryKey:["projects"]})},[q]),x=()=>{if(!C.trim()||D||!Z)return;Pz(Z,C,O,R,Fz),l("")},Hz=(G)=>{if(G.nativeEvent.isComposing)return;if(G.key==="Enter"&&!G.shiftKey)G.preventDefault(),x()},c=(G)=>{if(typeof G==="string")return G;if(Array.isArray(G))return G.map((X)=>{if(typeof X==="string")return X;if(X&&typeof X==="object"&&"type"in X&&X.type==="text"&&"text"in X)return String(X.text);return""}).join("");return""},i=(G)=>{return G.replace(/<@([a-zA-Z0-9_-]+)>/g,"@$1").replace(/^\[([^\]]+)\]:/gm,"\\[$1\\]:")},Cz=(G)=>{switch(G.role){case"user":return z("div",{className:"flex justify-end w-full",children:z("div",{className:"bg-primary text-primary-foreground rounded-lg px-3 py-2 max-w-[85%] text-sm whitespace-pre-wrap shadow-xs break-words",children:c(G.content)})},G.id);case"assistant":{let $=G.content;if(!$)return null;let V=[];if($.forEach((K,L)=>{if(!K||typeof K!=="object")return;let N=K;switch(N.type){case"text":{let U=N.text;if(typeof U!=="string"||!U.trim())return;V.push(z("div",{className:"text-sm leading-[1.8] prose prose-sm dark:prose-invert max-w-none break-words",children:z(p,{components:{pre:({node:P,...vz})=>z("pre",{className:"whitespace-pre-wrap break-all break-words bg-muted text-foreground p-4 rounded-md border border-border/50 font-mono text-sm",...vz})},children:i(U)})},`txt-${L}`));break}case"thinking":{let U=N.thinking;if(typeof U!=="string"||!U.trim())return;V.push(J("details",{className:"group border border-border/50 rounded-lg bg-muted/20 my-2 overflow-hidden",children:[J("summary",{className:"flex items-center gap-2 p-2.5 text-xs font-medium text-muted-foreground select-none cursor-pointer hover:bg-muted/40 transition-colors list-none [&::-webkit-details-marker]:hidden",children:[z(s,{className:"h-3.5 w-3.5 text-primary/70 animate-pulse"}),z("span",{children:Y.role_thinking()||"Thinking"}),z(b,{className:"h-3 w-3 ml-auto transition-transform group-open:rotate-180"})]}),z("div",{className:"p-3 pt-0 text-xs text-muted-foreground/90 border-t border-border/40 bg-muted/10 leading-relaxed prose prose-sm dark:prose-invert max-w-none whitespace-pre-wrap font-sans",children:z(p,{children:i(U)})})]},`think-${L}`));break}case"toolCall":{let U=String(N.name||N.toolName||Y.unknown()),P=N.arguments||N.args;V.push(J("details",{className:"group border border-border/50 rounded-lg bg-violet-500/5 my-2 overflow-hidden",children:[J("summary",{className:"flex items-center gap-2 p-2.5 text-xs font-semibold text-violet-600 dark:text-violet-400 select-none cursor-pointer hover:bg-violet-500/10 transition-colors list-none [&::-webkit-details-marker]:hidden",children:[z(Gz,{className:"h-3.5 w-3.5"}),z("span",{children:Y.calling_tool()}),z("span",{className:"font-mono bg-violet-500/10 px-1.5 py-0.5 rounded text-[11px] text-violet-700 dark:text-violet-300",children:U}),z(b,{className:"h-3 w-3 ml-auto transition-transform group-open:rotate-180"})]}),!!P&&J("div",{className:"p-3 pt-0 text-[10px] text-muted-foreground/90 border-t border-border/40 bg-violet-500/5 font-sans",children:[z("div",{className:"text-[9px] text-muted-foreground/60 uppercase font-bold tracking-wider mb-1.5",children:Y.tool_arguments()||"Arguments"}),z("pre",{className:"font-mono bg-muted/30 p-2 rounded border border-border/30 overflow-x-auto max-h-32",children:JSON.stringify(P,null,2)})]})]},`tool-${L}`));break}case"image":{let U=String(N.mimeType||"image/png"),P=String(N.data||"");V.push(z("div",{className:"my-2 max-w-full",children:P?z("img",{src:P.startsWith("data:")?P:`data:${U};base64,${P}`,alt:"Attached asset",className:"max-h-60 rounded border border-border/50 object-contain shadow-xs"}):z("div",{className:"text-xs text-muted-foreground italic flex items-center gap-1.5 py-1",children:Y.image_object()})},`img-${L}`));break}default:{let U=JSON.stringify(K,null,2);if(U==="{}")return;V.push(z("pre",{className:"text-xs text-foreground/80 font-mono whitespace-pre-wrap break-words bg-muted/20 p-2 rounded",children:U},`other-${L}`))}}}),V.length===0)return null;let Q=!1;if($.length>0){let K=$[$.length-1];if(typeof K==="string"&&K.trim().length>0)Q=!0;else if(K&&typeof K==="object"){let L=K;if(L.type==="text"&&typeof L.text==="string"&&L.text.trim().length>0)Q=!0}}return J("div",{className:"flex flex-col w-full space-y-1",children:[z("div",{className:"space-y-2 w-full",children:V}),Q&&z("div",{className:"text-[10px] text-muted-foreground self-start italic pt-1",children:Y.created_by_agent()})]},G.id)}case"toolResult":return z("div",{className:"flex items-center gap-2 text-xs text-muted-foreground bg-muted/40 p-2 rounded-md border border-border/50",children:z("span",{className:"font-semibold",children:Y.tool_result_with_name({name:G.toolName||"tool"})})},G.id);case"thinking_level_change":case"custom":{let X=G;if(X.customType==="context_display_info"){let Q=X.details?.assets||[];if(Q.length===0)return null;return J("div",{className:"text-xs text-muted-foreground bg-muted/40 p-2.5 rounded-lg border border-border/50 space-y-1 my-1",children:[z("div",{className:"font-semibold",children:Y.assets_added_to_context()}),z("ul",{className:"list-disc list-inside space-y-0.5",children:Q.map((K)=>J("li",{className:"truncate",children:[K.name," ",J("span",{className:"text-muted-foreground/70",children:["(",K.type,")"]})]},K.id))})]},G.id)}let $=X.content||"";return z("div",{className:"text-center text-xs text-muted-foreground italic bg-muted/20 py-1.5 rounded",children:c($)},G.id)}default:return null}};return J("div",{ref:qz,className:T("relative flex flex-col h-full bg-background transition-colors duration-200 min-h-0"),children:[Ez&&z("div",{className:"absolute inset-0 bg-accent/30 border-2 border-primary z-50 pointer-events-none flex items-center justify-center p-6 text-center animate-in fade-in duration-150",children:J("div",{className:"bg-background/95 text-foreground px-4 py-3 rounded-xl border border-border/80 flex flex-col items-center gap-2 shadow-lg max-w-[80%] animate-in zoom-in-95 duration-150",children:[z(M,{className:"h-6 w-6 text-primary animate-bounce"}),z("span",{className:"text-sm font-semibold text-foreground",children:Y.chatbot_drag_drop_hint()||"Drop assets here"})]})}),z("div",{className:"flex items-center justify-between p-4 pt-[0.7rem] flex-shrink-0",children:W?J(B,{children:[z("div",{className:"flex items-center gap-2 font-semibold",children:z("span",{children:Y.history()})}),z("button",{onClick:()=>I(!1),className:"p-1.5 hover:bg-accent rounded-md text-muted-foreground hover:text-foreground transition-colors",title:"Close History",children:z(t,{className:"h-4 w-4"})})]}):J(B,{children:[z("div",{className:"flex items-center gap-2 font-semibold",children:z("span",{children:Y.shumai_agent()})}),J("div",{className:"flex items-center gap-1",children:[z("button",{onClick:Qz,className:"p-1.5 hover:bg-accent rounded-md text-muted-foreground hover:text-foreground transition-colors",title:Y.new_chat(),children:z(zz,{className:"h-4 w-4"})}),z("button",{onClick:()=>I(!0),className:"p-1.5 hover:bg-accent rounded-md text-muted-foreground hover:text-foreground transition-colors",title:Y.history(),children:z(h,{className:"h-4 w-4"})})]})]})}),W?z(A,{className:"flex-1 p-4 min-h-0",children:g.length===0?J("div",{className:"flex flex-col items-center justify-center h-48 text-muted-foreground p-4 text-center",children:[z(h,{className:"h-8 w-8 mb-2 opacity-50 text-muted-foreground"}),z("p",{className:"text-sm",children:Y.no_history_sessions()})]}):z("div",{className:"space-y-2 pb-4",children:g.map((G)=>{let X=G.id===Vz;return J("div",{className:T("group relative flex items-center justify-between p-3 border rounded-lg transition-all cursor-pointer bg-card",X?"border-primary":"border-border hover:bg-accent/30"),children:[J("div",{onClick:()=>Z&&Lz(Z,G.id),className:"flex-1 min-w-0 pr-6",children:[z("div",{className:"text-sm font-semibold text-foreground truncate",children:G.name||Y.new_chat()}),z("div",{className:"text-xs text-muted-foreground mt-0.5",children:Jz(G.createdAt)})]}),z("button",{onClick:($)=>{if($.stopPropagation(),Z&&confirm(Y.delete_session_confirm()))Nz(Z,G.id)},className:"absolute right-3 opacity-0 group-hover:opacity-100 focus:opacity-100 transition-opacity text-muted-foreground hover:text-destructive p-1 rounded hover:bg-muted",title:"Delete Session",children:z(S,{className:"h-4 w-4"})})]},G.id)})})}):J(B,{children:[z(A,{ref:y,className:"flex-1 p-4 min-h-0 [&>div>div]:!block",children:E.length===0?J("div",{className:"flex flex-col items-center justify-center h-48 border-2 border-dashed border-border rounded-lg text-muted-foreground p-4 text-center",children:[z(M,{className:"h-8 w-8 mb-2 opacity-50 text-muted-foreground"}),z("p",{className:"text-sm",children:Y.chatbot_drag_drop_hint()})]}):J("div",{className:"space-y-4 pb-4",children:[E.map(Cz),D&&E.length>0&&E[E.length-1].role==="user"&&J("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground italic",children:[z(o,{className:"h-3 w-3 animate-spin text-primary"}),z("span",{children:"Thinking..."})]}),z("div",{ref:d})]})}),z("div",{className:"p-2 flex-shrink-0 bg-background",children:J("div",{className:"relative flex flex-col w-full border border-foreground/20 rounded-2xl shadow-xs transition-all duration-200 focus-within:ring-2 focus-within:ring-primary focus-within:border-transparent bg-background overflow-hidden",children:[u.length>0&&z("div",{className:"flex flex-col gap-1.5 min-h-0 max-h-[160px] overflow-y-auto border-b border-border bg-muted/5 p-3 divide-y divide-border/50",children:u.map((G)=>J("div",{className:"flex items-center justify-between py-1.5 text-xs group",children:[J("div",{className:"flex items-baseline gap-1.5 min-w-0 pr-2",children:[z("span",{className:"truncate font-medium text-foreground",children:G.name}),z("span",{className:"text-[9px] text-muted-foreground uppercase flex-shrink-0",children:G.type})]}),z("button",{onClick:()=>Wz(G.id),className:"text-muted-foreground hover:text-destructive transition-colors p-0.5",title:Y.remove_from_context(),children:z(S,{className:"h-3.5 w-3.5"})})]},G.id))}),z("textarea",{value:C,onChange:(G)=>l(G.target.value),onKeyDown:Hz,placeholder:"Type a message...",rows:2,className:"w-full bg-transparent border-none focus:ring-0 focus:outline-hidden resize-none min-h-[44px] max-h-[120px] px-3 py-2 text-sm focus-visible:outline-hidden focus:ring-transparent focus:border-transparent focus-visible:ring-0",disabled:D}),J("div",{className:"flex justify-between items-center px-3 pb-2 pt-1",children:[z("div",{className:"flex items-center gap-1.5 min-w-0 max-w-[70%]",children:F.length>0?J(Yz,{value:H||"",onValueChange:(G)=>w(G),disabled:D,children:[z(_z,{className:"h-8 border-none bg-transparent hover:bg-muted text-muted-foreground hover:text-foreground focus:ring-0 focus:ring-offset-0 px-2 py-0 gap-1.5 text-xs shrink-0 select-none shadow-none max-w-full",children:z(Zz,{placeholder:Y.select_agent()})}),z($z,{children:F.map((G)=>z(Kz,{value:G.id,children:J("div",{className:"flex items-center gap-2",children:[G.avatar?z("img",{src:G.avatar,alt:G.name,className:"w-4 h-4 rounded-full object-cover"}):z(M,{className:"w-4 h-4 text-muted-foreground"}),z("span",{className:"text-xs",children:G.name})]})},G.id))})]}):z("div",{className:"flex items-center gap-1.5 px-2 py-1 text-[11px] text-muted-foreground/60 italic select-none",children:z("span",{children:Y.no_chat_agents_warning()})})}),D?z("button",{onClick:()=>{if(Z)Oz(Z)},className:"p-2 rounded-full transition-all duration-200 flex items-center justify-center shrink-0 shadow-sm bg-destructive text-destructive-foreground hover:bg-destructive/90 transform hover:-translate-y-0.5",title:"Stop generation",children:z("div",{className:"h-4 w-4 flex items-center justify-center",children:z("div",{className:"h-3 w-3 bg-current rounded-[2px] bg-white"})})}):z("button",{onClick:x,disabled:!C.trim()||!H,className:T("p-2 rounded-full transition-all duration-200 flex items-center justify-center shrink-0 shadow-sm",C.trim()&&H?"bg-primary text-primary-foreground hover:bg-primary/95 transform hover:-translate-y-0.5":"bg-muted text-muted-foreground cursor-not-allowed opacity-50"),children:z(e,{className:"h-4 w-4"})})]})]})})]})]})}
|
|
2
|
+
export{uz as e};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
var I=(w)=>w;function J(w,H,A=I){let B=new Map;for(let h of w.tools??[])B.set(A(h.name),h);if(!H)return{immediate:[...B.values()],deferred:new Map};let C=new Set,D=new Set;for(let h of w.messages)if(h.role==="assistant"){for(let v of h.content)if(v.type==="toolCall")D.add(A(v.name))}else if(h.role==="toolResult")for(let v of h.addedToolNames??[]){let G=A(v);if(!D.has(G))C.add(G)}let E=[],F=new Map;for(let[h,v]of B)if(C.has(h))F.set(h,v);else E.push(v);return{immediate:E,deferred:F}}
|
|
3
|
-
export{J as
|
|
3
|
+
export{J as Jj};
|