@shumai-one/shumai 0.3.7 → 0.3.8
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-9nyhmtp9.js → chunk-0mmw31pj.js} +2 -2
- package/bin/{chunk-gjn3w26y.js → chunk-0pm8c9bq.js} +2 -2
- package/bin/{chunk-50keqtz9.js → chunk-0qpz48vc.js} +1 -1
- package/bin/{chunk-zjj9qj6y.js → chunk-0zbwpfsk.js} +2 -2
- package/bin/chunk-15jsnygy.js +5 -0
- package/bin/chunk-16s5kfy8.css +1 -0
- package/bin/{chunk-hqkmdp31.js → chunk-21rp4vzr.js} +2 -2
- package/bin/chunk-24ke0th1.css +1 -0
- package/bin/{chunk-260wywfb.js → chunk-28n8xqhm.js} +1 -1
- package/bin/{chunk-7hnw6y6d.js → chunk-2dxd0bar.js} +2 -2
- package/bin/{chunk-3dx0p1ge.js → chunk-2ejky9qv.js} +1 -1
- package/bin/{chunk-dej1gq35.js → chunk-2em77vjv.js} +1 -1
- package/bin/{chunk-zg60j9x2.js → chunk-2q26gz0p.js} +1 -1
- package/bin/{chunk-9s02m95j.js → chunk-2t0asg3w.js} +2 -2
- package/bin/{chunk-rfyaphas.js → chunk-2xaq1y16.js} +2 -2
- package/bin/{chunk-qmpph1gt.js → chunk-33r4w0yv.js} +2 -2
- package/bin/{chunk-1xzc6z02.js → chunk-3bm3be9d.js} +1 -1
- package/bin/{chunk-1sqz0va1.js → chunk-3mx22sn7.js} +2 -2
- package/bin/chunk-4cmw4qmt.js +1 -0
- package/bin/chunk-4d3wm83a.js +2 -0
- package/bin/{chunk-0jkqmbcx.js → chunk-4g4g02e0.js} +1 -1
- package/bin/{chunk-tpp9qf5m.js → chunk-5386brz2.js} +2 -2
- package/bin/{chunk-98j2z6he.js → chunk-5f9fk8x0.js} +3 -3
- package/bin/chunk-5fj5w0gg.js +2 -0
- package/bin/chunk-61bxmjd9.js +2 -0
- package/bin/{chunk-ptw49k86.js → chunk-6pcs8810.js} +1 -1
- package/bin/{chunk-x3ynjbt5.js → chunk-6pmsknnk.js} +2 -2
- package/bin/{chunk-9xhnmnnb.js → chunk-6vwqg1ra.js} +2 -2
- package/bin/{chunk-2mqqghrz.js → chunk-75segwsp.js} +2 -2
- package/bin/{chunk-ftc48rbb.js → chunk-7c85cyn0.js} +3 -3
- package/bin/chunk-7eyg2kgv.js +1 -0
- package/bin/chunk-7r22vcjy.js +2 -0
- package/bin/{chunk-0ycwr0kb.js → chunk-80g5kcm0.js} +1 -1
- package/bin/{chunk-5gtew41y.js → chunk-8bhsdk1v.js} +1 -1
- package/bin/{chunk-1khzycf9.js → chunk-8fsrs7mh.js} +1 -1
- package/bin/chunk-8jfm1j41.js +1 -0
- package/bin/chunk-8n6segk5.js +1 -0
- package/bin/chunk-99f9r6xm.js +2 -0
- package/bin/{chunk-2086rsb2.js → chunk-9acfydwy.js} +1 -1
- package/bin/{chunk-vxpnp4xg.js → chunk-9ntwrvhz.js} +2 -2
- package/bin/{chunk-s0hgykza.js → chunk-agdza65r.js} +2 -2
- package/bin/{chunk-6zs49mef.js → chunk-antsxrw9.js} +1 -1
- package/bin/chunk-bapy3qv8.js +1 -0
- package/bin/chunk-bc2bf144.js +2 -0
- package/bin/{chunk-v8w2nxew.js → chunk-bznz6h19.js} +1 -1
- package/bin/{chunk-qcqw7wnv.js → chunk-c24an5j3.js} +1 -1
- package/bin/chunk-cm74nd4n.js +1 -0
- package/bin/{chunk-87wqbn4g.js → chunk-cynjx7ha.js} +2 -2
- package/bin/chunk-cyq3m4qz.js +1 -0
- package/bin/chunk-ddff7vm3.js +2 -0
- package/bin/{chunk-br5xkaf7.js → chunk-djqs6m7w.js} +3 -3
- package/bin/{chunk-60hpa5kf.js → chunk-dn8k5ef5.js} +1 -1
- package/bin/chunk-dqdqs0d9.js +1 -0
- package/bin/chunk-drjaw6a5.js +14 -0
- package/bin/chunk-drvwchyn.js +2 -0
- package/bin/{chunk-esrtafz0.js → chunk-e4se9q6n.js} +1 -1
- package/bin/chunk-eb551xw7.js +1 -0
- package/bin/{chunk-nvjp2rnh.js → chunk-en96pr5c.js} +2 -2
- package/bin/{chunk-r5dv0rfv.js → chunk-ep138kb3.js} +2 -2
- package/bin/{chunk-jszpvg8e.js → chunk-eqf7k7ax.js} +2 -2
- package/bin/{chunk-f2j2cqd1.js → chunk-f3rqamey.js} +2 -2
- package/bin/{chunk-3kqdgddm.js → chunk-fvwz4mgw.js} +2 -2
- package/bin/chunk-g3p6h6sw.js +68 -0
- package/bin/{chunk-81tb4v5v.js → chunk-h9f55mjv.js} +2 -2
- package/bin/{chunk-n4gghgrj.js → chunk-jfjjh86p.js} +2 -2
- package/bin/{chunk-83k0wa5k.js → chunk-jg31cnqc.js} +2 -2
- package/bin/chunk-jk87gxbb.js +2 -0
- package/bin/{chunk-4bn9eb9h.js → chunk-jqzvazsf.js} +1 -1
- package/bin/chunk-jyk483r4.js +1 -0
- package/bin/{chunk-48nzw50r.js → chunk-k0ysbh3h.js} +1 -1
- package/bin/{chunk-fcs4v6jq.js → chunk-k5yxntns.js} +2 -2
- package/bin/chunk-khjybf4y.js +1 -0
- package/bin/{chunk-38g3s1f3.js → chunk-kmt9fj1z.js} +2 -2
- package/bin/{chunk-503qq6sa.js → chunk-m49ar48r.js} +2 -2
- package/bin/{chunk-a0k1b4sq.js → chunk-m7d52gfe.js} +1 -1
- package/bin/{chunk-x6532q76.js → chunk-mjxay7yv.js} +1 -1
- package/bin/{chunk-zqg4f56h.js → chunk-mp5etccz.js} +1 -1
- package/bin/{chunk-9gzy30zm.js → chunk-n8pas7tj.js} +2 -2
- package/bin/{chunk-b8v7jvkb.js → chunk-nc632fxz.js} +2 -2
- package/bin/{chunk-6fv38qdc.js → chunk-nffrjwb7.js} +2 -2
- package/bin/{chunk-7k3ccca6.js → chunk-p1rrkrn4.js} +1 -1
- package/bin/chunk-p6ep6grv.js +1 -0
- package/bin/{chunk-p4c4z0f2.js → chunk-ph43tgr6.js} +1 -1
- package/bin/{chunk-3xzgddev.js → chunk-pqtwzb3s.js} +1 -1
- package/bin/chunk-q0xv46wa.js +2 -0
- package/bin/{chunk-qh9rz2ee.js → chunk-qhxznkjk.js} +5 -5
- package/bin/chunk-qmja7bsr.js +2 -0
- package/bin/{chunk-v98e3gex.js → chunk-qyegjbzd.js} +1 -1
- package/bin/{chunk-gjdmnfms.js → chunk-r5rf62aa.js} +1 -1
- package/bin/{chunk-2xmsrq7f.js → chunk-rjkj0dr9.js} +2 -2
- package/bin/chunk-rjr8c8be.js +3 -0
- package/bin/{chunk-af6wbhkv.js → chunk-rq4h4p2g.js} +2 -2
- package/bin/{chunk-zwgf211t.js → chunk-scmhhrte.js} +2 -2
- package/bin/chunk-sjr6mvgm.js +78 -0
- package/bin/{chunk-t9t9evan.js → chunk-ssz62jfs.js} +2 -2
- package/bin/{chunk-g60v3jc1.js → chunk-ta02azkp.js} +1 -1
- package/bin/{chunk-tzt4c1dm.js → chunk-tfnh9sk9.js} +2 -2
- package/bin/{chunk-cqq8e3hc.js → chunk-thqahbva.js} +2 -2
- package/bin/chunk-tvzfm7g8.js +2 -0
- package/bin/{chunk-k48y9e5s.js → chunk-twm329fs.js} +1 -1
- package/bin/{chunk-0t8q76ac.js → chunk-ve826t5r.js} +1 -1
- package/bin/chunk-vpfj3q7r.js +1 -0
- package/bin/chunk-vqakgjsf.js +1 -0
- package/bin/chunk-wgjghs54.js +7 -0
- package/bin/chunk-wy1ytxw7.js +41 -0
- package/bin/{chunk-t3tp9trj.js → chunk-x788nk6z.js} +2 -2
- package/bin/{chunk-b3jh3hf1.js → chunk-x8ksced7.js} +2 -2
- package/bin/{chunk-qdycy714.js → chunk-xexxh1zq.js} +1 -1
- package/bin/{chunk-6v39c8eg.js → chunk-xktnqktj.js} +2 -2
- package/bin/{chunk-7872prvg.js → chunk-xpce3j7g.js} +1 -1
- package/bin/{chunk-karn564z.js → chunk-xyzsmjtk.js} +2 -2
- package/bin/chunk-y03s8bkz.js +1 -0
- package/bin/{chunk-kpn9d97x.js → chunk-y5g2ge6f.js} +1 -1
- package/bin/{chunk-qy93r7tm.js → chunk-ygcmv04c.js} +2 -2
- package/bin/{chunk-ytzk81tr.js → chunk-ykarhcph.js} +1 -1
- package/bin/{chunk-bancgvrc.js → chunk-yr8a8nzv.js} +2 -2
- package/bin/chunk-yxtb7xn8.js +2 -0
- package/bin/{chunk-n76r6s9k.js → chunk-zaft3sfe.js} +2 -2
- package/bin/shumai-app.html +1 -1
- package/bin/shumai-app.js +237 -215
- package/package.json +7 -7
- package/prisma/migrations/20260814090300_add_asset_agentmd/migration.sql +2 -0
- package/prisma/migrations/20260814125921_create_asset_agentmd_table/migration.sql +21 -0
- package/prisma/schema.prisma +12 -0
- package/bin/chunk-0xern7e4.js +0 -1
- package/bin/chunk-0yngn45x.js +0 -2
- package/bin/chunk-4egayx81.js +0 -2
- package/bin/chunk-4rbzswqs.js +0 -71
- package/bin/chunk-69tt1pvr.js +0 -2
- package/bin/chunk-815ezj20.js +0 -1
- package/bin/chunk-85eg9xqx.js +0 -1
- package/bin/chunk-86aagej8.js +0 -1
- package/bin/chunk-8y1v9dm9.js +0 -2
- package/bin/chunk-9gq9782d.js +0 -1
- package/bin/chunk-bv88se28.css +0 -1
- package/bin/chunk-dv1zpd2p.js +0 -15
- package/bin/chunk-eetrc0j1.js +0 -3
- package/bin/chunk-eztggp8r.js +0 -1
- package/bin/chunk-gf5ds9r9.js +0 -2
- package/bin/chunk-h9emz0zb.js +0 -2
- package/bin/chunk-h9k2atte.js +0 -1
- package/bin/chunk-kkq4wvnc.js +0 -1
- package/bin/chunk-ksx113sp.js +0 -1
- package/bin/chunk-m6a4rzdt.js +0 -62
- package/bin/chunk-mw8f8ngt.js +0 -7
- package/bin/chunk-rvspnthy.js +0 -1
- package/bin/chunk-sjjndwt4.js +0 -2
- package/bin/chunk-tvg9gvqs.js +0 -1
- package/bin/chunk-xp4dcyk3.js +0 -1
- package/bin/chunk-y8aehqr8.js +0 -2
- package/bin/chunk-yvxt48r4.js +0 -1
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import{Fh as z$,Hh as z0,Ih as j$,Vh as L5,ci as g9,ei as u9,fi as m9}from"./chunk-sjr6mvgm.js";import{em as B9}from"./chunk-2em77vjv.js";var p5=g9()(m9((J)=>({fileViewLeftSidebarCollapsed:!0,setFileViewLeftSidebarCollapsed:(Q)=>J({fileViewLeftSidebarCollapsed:Q}),fileViewRightSidebarCollapsed:!1,setFileViewRightSidebarCollapsed:(Q)=>J({fileViewRightSidebarCollapsed:Q}),fileListLeftSidebarCollapsed:!1,setFileListLeftSidebarCollapsed:(Q)=>J({fileListLeftSidebarCollapsed:Q}),fileListRightSidebarCollapsed:!0,setFileListRightSidebarCollapsed:(Q)=>J({fileListRightSidebarCollapsed:Q}),shareConfigLeftSidebarCollapsed:!1,setShareConfigLeftSidebarCollapsed:(Q)=>J({shareConfigLeftSidebarCollapsed:Q}),shareConfigRightSidebarCollapsed:!1,setShareConfigRightSidebarCollapsed:(Q)=>J({shareConfigRightSidebarCollapsed:Q}),viewModes:{},setViewMode:(Q,Z)=>J(($)=>({viewModes:{...$.viewModes,[Q]:Z}})),videoTimeDisplayMode:"standard",setVideoTimeDisplayMode:(Q)=>J({videoTimeDisplayMode:Q})}),{name:"ui-storage",storage:u9(()=>localStorage)}));var Qq=Symbol.for("preact-signals");function PZ(){if(!(TJ>1)){var J,Q=!1;(function(){var q=OZ;OZ=void 0;while(q!==void 0){if(q.S.v===q.v)q.S.i=q.i;q=q.o}})();while(dQ!==void 0){var Z=dQ;dQ=void 0,DZ++;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(DZ=0,TJ--,Q)throw J}else TJ--}function JJ(J){if(TJ>0)return J();E0=++Zq,TJ++;try{return J()}finally{PZ()}}var k=void 0;function O(J){var Q=k;k=void 0;try{return J()}finally{k=Q}}var p9,dQ=void 0,TJ=0,DZ=0,Zq=0,E0=0,OZ=void 0,TZ=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=Qq;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 O(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)O(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 O(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(DZ>100)throw Error("Cycle detected");(function(Z){if(TJ!==0&&DZ===0){if(Z.l!==E0)Z.l=E0,OZ={S:Z,v:Z.v,i:Z.i,o:OZ}}})(this),this.v=J,this.i++,TZ++,TJ++;try{for(var Q=this.t;Q!==void 0;Q=Q.x)Q.t.N()}finally{PZ()}}}});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 lJ(J,Q){r.call(this,void 0),this.x=J,this.s=void 0,this.g=TZ-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}lJ.prototype=new r;lJ.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===TZ)return!0;if(this.g=TZ,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};lJ.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)};lJ.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)}}};lJ.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(lJ.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 S0(J,Q){return new lJ(J,Q)}function s9(J){var Q=J.m;if(J.m=void 0,typeof Q=="function"){TJ++;var Z=k;k=void 0;try{Q()}catch($){throw J.f&=-2,J.f|=8,k0(J),$}finally{k=Z,PZ()}}}function k0(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 $q(J){if(k!==this)throw Error("Out-of-order effect");if(l9(this),k=J,this.f&=-2,8&this.f)k0(this);PZ()}function GQ(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)}GQ.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()}};GQ.prototype.S=function(){if(1&this.f)throw Error("Cycle detected");this.f|=1,this.f&=-9,s9(this),c9(this),TJ++;var J=k;return k=this,$q.bind(this,J)};GQ.prototype.N=function(){if(!(2&this.f))this.f|=2,this.u=dQ,dQ=this};GQ.prototype.d=function(){if(this.f|=8,!(1&this.f))k0(this)};GQ.prototype.dispose=function(){this.d()};function o(J,Q){var Z=new GQ(J,Q);try{Z.c()}catch(q){throw Z.d(),q}var $=Z.d.bind(Z);return $[Symbol.dispose]=$,$}var{create:qq,defineProperty:d0,defineProperties:Yq,getOwnPropertyDescriptor:Xq,getOwnPropertyDescriptors:Kq,getOwnPropertySymbols:o9}=Object,Hq=Object.prototype.hasOwnProperty,Wq=Object.prototype.propertyIsEnumerable,n9=(J,Q)=>(Q=Symbol[J])?Q:Symbol.for("Symbol."+J),MQ=(J)=>{throw TypeError(J)},v0=(J,Q,Z)=>(Q in J)?d0(J,Q,{enumerable:!0,configurable:!0,writable:!0,value:Z}):J[Q]=Z,Uq=(J,Q)=>{for(var Z in Q||(Q={}))if(Hq.call(Q,Z))v0(J,Z,Q[Z]);if(o9){for(var Z of o9(Q))if(Wq.call(Q,Z))v0(J,Z,Q[Z])}return J},Bq=(J,Q)=>Yq(J,Kq(Q)),i9=(J,Q)=>d0(J,"name",{value:Q,configurable:!0}),Nq=(J)=>{var Q;return[,,,qq((Q=J==null?void 0:J[n9("metadata")])!=null?Q:null)]},a9=["class","method","getter","setter","accessor","field","value","get","set"],_Q=(J)=>J!==void 0&&typeof J!=="function"?MQ("Function expected"):J,Lq=(J,Q,Z,$,q)=>({kind:a9[J],name:Q,metadata:$,addInitializer:(Y)=>Z._?MQ("Already initialized"):q.push(_Q(Y||null))}),r9=(J,Q)=>v0(Q,n9("metadata"),J[3]),sJ=(J,Q,Z,$)=>{for(var q=0,Y=J[Q>>1],K=Y&&Y.length;q<K;q++)Q&1?Y[q].call(Z):$=Y[q].call(Z,$);return $},FQ=(J,Q,Z,$,q,Y)=>{var K,X,W,U,B,H=Q&7,V=!!(Q&8),L=!!(Q&16),M=H>3?J.length+1:H?V?1:2:0,F=a9[H+5],A=H>3&&(J[M-1]=[]),I=J[M]||(J[M]=[]),N=H&&(!L&&!V&&(q=q.prototype),H<5&&(H>3||!L)&&Xq(H<4?q:{get[Z](){return LJ(this,Y)},set[Z](G){return fJ(this,Y,G)}},Z));H?L&&H<4&&i9(Y,(H>2?"set ":H>1?"get ":"")+Z):i9(q,Z);for(var z=$.length-1;z>=0;z--){if(U=Lq(H,Z,W={},J[3],I),H){if(U.static=V,U.private=L,B=U.access={has:L?(G)=>Vq(q,G):(G)=>(Z in G)},H^3)B.get=L?(G)=>(H^1?LJ:Gq)(G,q,H^4?Y:N.get):(G)=>G[Z];if(H>2)B.set=L?(G,w)=>fJ(G,q,w,H^4?Y:N.set):(G,w)=>G[Z]=w}if(X=(0,$[z])(H?H<4?L?Y:N[F]:H>4?void 0:{get:N.get,set:N.set}:q,U),W._=1,H^4||X===void 0)_Q(X)&&(H>4?A.unshift(X):H?L?Y=X:N[F]=X:q=X);else if(typeof X!=="object"||X===null)MQ("Object expected");else _Q(K=X.get)&&(N.get=K),_Q(K=X.set)&&(N.set=K),_Q(K=X.init)&&A.unshift(K)}return H||r9(J,q),N&&d0(q,Z,N),L?H^4?Y:N:q},_0=(J,Q,Z)=>Q.has(J)||MQ("Cannot "+Z),Vq=(J,Q)=>Object(Q)!==Q?MQ('Cannot use the "in" operator on this value'):J.has(Q),LJ=(J,Q,Z)=>(_0(J,Q,"read from private field"),Z?Z.call(J):Q.get(J)),cQ=(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),fJ=(J,Q,Z,$)=>(_0(J,Q,"write to private field"),$?$.call(J,Z):Q.set(J,Z),Z),Gq=(J,Q,Z)=>(_0(J,Q,"access private method"),Z);function zQ(J,Q){if(Q){let Z;return S0(()=>{let $=J();if($&&Z&&Q(Z,$))return Z;return Z=$,$})}return S0(J)}function PJ(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)=>!PJ($,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)=>!PJ(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(!$)$=zQ(J.bind(this)),Z.set(this,$);return $.value}}function x0(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,Bq(Uq({},q),{enumerable:J}))})}}function iJ(...J){let Q=J.map((Z)=>o(Z));return()=>Q.forEach((Z)=>Z())}var t9,e9,J8,Q8,Z8,$8,QJ,c0,h0,b0,g0,t,l0,y0,q8,u0,s0,f0,m0,p0;$8=[T],Z8=[T],Q8=[T],J8=[x0()],e9=[x0()],t9=[x0()];var jJ=class{constructor(J,Q=Object.is){this.defaultValue=J,this.equals=Q,sJ(QJ,5,this),cQ(this,t),cQ(this,c0,sJ(QJ,8,this)),sJ(QJ,11,this),cQ(this,l0,sJ(QJ,12,this)),sJ(QJ,15,this),cQ(this,s0,sJ(QJ,16,this)),sJ(QJ,19,this),this.reset=this.reset.bind(this),this.reset()}get current(){return LJ(this,t,m0)}get initial(){return LJ(this,t,b0)}get previous(){return LJ(this,t,q8)}set current(J){let Q=O(()=>LJ(this,t,m0));if(J&&Q&&this.equals(Q,J))return;JJ(()=>{if(!LJ(this,t,b0))fJ(this,t,J,g0);fJ(this,t,Q,u0),fJ(this,t,J,p0)})}reset(J=this.defaultValue){JJ(()=>{fJ(this,t,void 0,u0),fJ(this,t,J,g0),fJ(this,t,J,p0)})}};QJ=Nq(null);c0=new WeakMap;t=new WeakSet;l0=new WeakMap;s0=new WeakMap;h0=FQ(QJ,20,"#initial",$8,t,c0),b0=h0.get,g0=h0.set;y0=FQ(QJ,20,"#previous",Z8,t,l0),q8=y0.get,u0=y0.set;f0=FQ(QJ,20,"#current",Q8,t,s0),m0=f0.get,p0=f0.set;FQ(QJ,2,"current",J8,jJ);FQ(QJ,2,"initial",e9,jJ);FQ(QJ,2,"previous",t9,jJ);r9(QJ,jJ);function EZ(J){return O(()=>{let Q={};for(let Z in J)Q[Z]=J[Z];return Q})}var oJ,a5=class{constructor(){cQ(this,oJ,new WeakMap)}get(J,Q){var Z;return J?(Z=LJ(this,oJ).get(J))==null?void 0:Z.get(Q):void 0}set(J,Q,Z){var $;if(!J)return;if(!LJ(this,oJ).has(J))LJ(this,oJ).set(J,new Map);return($=LJ(this,oJ).get(J))==null?void 0:$.set(Q,Z)}clear(J){var Q;return J?(Q=LJ(this,oJ).get(J))==null?void 0:Q.clear():void 0}};oJ=new WeakMap;var{create:Mq,defineProperty:r0,getOwnPropertyDescriptor:Fq,getOwnPropertySymbols:Y8}=Object,zq=Object.prototype.hasOwnProperty,wq=Object.prototype.propertyIsEnumerable,H8=(J,Q)=>(Q=Symbol[J])?Q:Symbol.for("Symbol."+J),wQ=(J)=>{throw TypeError(J)},X8=Math.pow,o0=(J,Q,Z)=>(Q in J)?r0(J,Q,{enumerable:!0,configurable:!0,writable:!0,value:Z}):J[Q]=Z,Aq=(J,Q)=>{for(var Z in Q||(Q={}))if(zq.call(Q,Z))o0(J,Z,Q[Z]);if(Y8){for(var Z of Y8(Q))if(wq.call(Q,Z))o0(J,Z,Q[Z])}return J},K8=(J,Q)=>r0(J,"name",{value:Q,configurable:!0}),Iq=(J)=>{var Q;return[,,,Mq((Q=J==null?void 0:J[H8("metadata")])!=null?Q:null)]},W8=["class","method","getter","setter","accessor","field","value","get","set"],lQ=(J)=>J!==void 0&&typeof J!=="function"?wQ("Function expected"):J,jq=(J,Q,Z,$,q)=>({kind:W8[J],name:Q,metadata:$,addInitializer:(Y)=>Z._?wQ("Already initialized"):q.push(lQ(Y||null))}),U8=(J,Q)=>o0(Q,H8("metadata"),J[3]),Cq=(J,Q,Z,$)=>{for(var q=0,Y=J[Q>>1],K=Y&&Y.length;q<K;q++)Q&1?Y[q].call(Z):$=Y[q].call(Z,$);return $},B8=(J,Q,Z,$,q,Y)=>{var K,X,W,U,B,H=Q&7,V=!!(Q&8),L=!!(Q&16),M=H>3?J.length+1:H?V?1:2:0,F=W8[H+5],A=H>3&&(J[M-1]=[]),I=J[M]||(J[M]=[]),N=H&&(!L&&!V&&(q=q.prototype),H<5&&(H>3||!L)&&Fq(H<4?q:{get[Z](){return i0(this,Y)},set[Z](G){return n0(this,Y,G)}},Z));H?L&&H<4&&K8(Y,(H>2?"set ":H>1?"get ":"")+Z):K8(q,Z);for(var z=$.length-1;z>=0;z--){if(U=jq(H,Z,W={},J[3],I),H){if(U.static=V,U.private=L,B=U.access={has:L?(G)=>Rq(q,G):(G)=>(Z in G)},H^3)B.get=L?(G)=>(H^1?i0:Oq)(G,q,H^4?Y:N.get):(G)=>G[Z];if(H>2)B.set=L?(G,w)=>n0(G,q,w,H^4?Y:N.set):(G,w)=>G[Z]=w}if(X=(0,$[z])(H?H<4?L?Y:N[F]:H>4?void 0:{get:N.get,set:N.set}:q,U),W._=1,H^4||X===void 0)lQ(X)&&(H>4?A.unshift(X):H?L?Y=X:N[F]=X:q=X);else if(typeof X!=="object"||X===null)wQ("Object expected");else lQ(K=X.get)&&(N.get=K),lQ(K=X.set)&&(N.set=K),lQ(K=X.init)&&A.unshift(K)}return H||U8(J,q),N&&r0(q,Z,N),L?H^4?Y:N:q},t0=(J,Q,Z)=>Q.has(J)||wQ("Cannot "+Z),Rq=(J,Q)=>Object(Q)!==Q?wQ('Cannot use the "in" operator on this value'):J.has(Q),i0=(J,Q,Z)=>(t0(J,Q,"read from private field"),Z?Z.call(J):Q.get(J)),Dq=(J,Q,Z)=>Q.has(J)?wQ("Cannot add the same private member more than once"):Q instanceof WeakSet?Q.add(J):Q.set(J,Z),n0=(J,Q,Z,$)=>(t0(J,Q,"write to private field"),$?$.call(J,Z):Q.set(J,Z),Z),Oq=(J,Q,Z)=>(t0(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)}},HJ=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:K,scale:X}=this,W=new J(q+Q,$+Z,Y,K);return W.scale=Aq({},X),W}get boundingRectangle(){let{width:Q,height:Z,left:$,top:q,right:Y,bottom:K}=this;return{width:Q,height:Z,left:$,top:q,right:Y,bottom:K}}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 Tq(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,K)=>{let X=$[K],W=K==="x"?Y.left:Y.top,U=K==="x"?Y.width:Y.height;if(X=="start")return W;if(X=="end")return W+U;return W+U/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 Tq(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),K=q-$,X=Y-Z;if($<q&&Z<Y)return K*X;return 0}var N8,L8,a0,SZ,sQ,oQ=class extends(a0=jJ,L8=[h],N8=[h],a0){constructor(J){let Q=e.from(J);super(Q,(Z,$)=>e.equals(Z,$));Cq(sQ,5,this),Dq(this,SZ,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-i0(this,SZ),K=(X)=>Math.round(X/Y*100);JJ(()=>{n0(this,SZ,q),this.velocity={x:K($.x),y:K($.y)},super.current=Z})}reset(J=this.defaultValue){super.reset(e.from(J)),this.velocity={x:0,y:0}}};sQ=Iq(a0);SZ=new WeakMap;B8(sQ,2,"delta",L8,oQ);B8(sQ,2,"direction",N8,oQ);U8(sQ,oQ);function kZ({x:J,y:Q},Z){let $=Math.abs(J),q=Math.abs(Q);if(typeof Z==="number")return Math.sqrt(X8($,2)+X8(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 V8=((J)=>{return J.Horizontal="x",J.Vertical="y",J})(V8||{}),e0=Object.values(V8);var{create:Pq,defineProperty:q1,defineProperties:Eq,getOwnPropertyDescriptor:Sq,getOwnPropertyDescriptors:kq,getOwnPropertySymbols:gZ}=Object,z8=Object.prototype.hasOwnProperty,w8=Object.prototype.propertyIsEnumerable,A8=(J,Q)=>(Q=Symbol[J])?Q:Symbol.for("Symbol."+J),DQ=(J)=>{throw TypeError(J)},Q1=(J,Q,Z)=>(Q in J)?q1(J,Q,{enumerable:!0,configurable:!0,writable:!0,value:Z}):J[Q]=Z,Y1=(J,Q)=>{for(var Z in Q||(Q={}))if(z8.call(Q,Z))Q1(J,Z,Q[Z]);if(gZ){for(var Z of gZ(Q))if(w8.call(Q,Z))Q1(J,Z,Q[Z])}return J},X1=(J,Q)=>Eq(J,kq(Q)),G8=(J,Q)=>q1(J,"name",{value:Q,configurable:!0}),I8=(J,Q)=>{var Z={};for(var $ in J)if(z8.call(J,$)&&Q.indexOf($)<0)Z[$]=J[$];if(J!=null&&gZ){for(var $ of gZ(J))if(Q.indexOf($)<0&&w8.call(J,$))Z[$]=J[$]}return Z},OQ=(J)=>{var Q;return[,,,Pq((Q=J==null?void 0:J[A8("metadata")])!=null?Q:null)]},j8=["class","method","getter","setter","accessor","field","value","get","set"],iQ=(J)=>J!==void 0&&typeof J!=="function"?DQ("Function expected"):J,xq=(J,Q,Z,$,q)=>({kind:j8[J],name:Q,metadata:$,addInitializer:(Y)=>Z._?DQ("Already initialized"):q.push(iQ(Y||null))}),aJ=(J,Q)=>Q1(Q,A8("metadata"),J[3]),C=(J,Q,Z,$)=>{for(var q=0,Y=J[Q>>1],K=Y&&Y.length;q<K;q++)Q&1?Y[q].call(Z):$=Y[q].call(Z,$);return $},P=(J,Q,Z,$,q,Y)=>{var K,X,W,U,B,H=Q&7,V=!!(Q&8),L=!!(Q&16),M=H>3?J.length+1:H?V?1:2:0,F=j8[H+5],A=H>3&&(J[M-1]=[]),I=J[M]||(J[M]=[]),N=H&&(!L&&!V&&(q=q.prototype),H<5&&(H>3||!L)&&Sq(H<4?q:{get[Z](){return u(this,Y)},set[Z](G){return WJ(this,Y,G)}},Z));H?L&&H<4&&G8(Y,(H>2?"set ":H>1?"get ":"")+Z):G8(q,Z);for(var z=$.length-1;z>=0;z--){if(U=xq(H,Z,W={},J[3],I),H){if(U.static=V,U.private=L,B=U.access={has:L?(G)=>hq(q,G):(G)=>(Z in G)},H^3)B.get=L?(G)=>(H^1?u:C8)(G,q,H^4?Y:N.get):(G)=>G[Z];if(H>2)B.set=L?(G,w)=>WJ(G,q,w,H^4?Y:N.set):(G,w)=>G[Z]=w}if(X=(0,$[z])(H?H<4?L?Y:N[F]:H>4?void 0:{get:N.get,set:N.set}:q,U),W._=1,H^4||X===void 0)iQ(X)&&(H>4?A.unshift(X):H?L?Y=X:N[F]=X:q=X);else if(typeof X!=="object"||X===null)DQ("Object expected");else iQ(K=X.get)&&(N.get=K),iQ(K=X.set)&&(N.set=K),iQ(K=X.init)&&A.unshift(K)}return H||aJ(J,q),N&&q1(q,Z,N),L?H^4?Y:N:q},K1=(J,Q,Z)=>Q.has(J)||DQ("Cannot "+Z),hq=(J,Q)=>Object(Q)!==Q?DQ('Cannot use the "in" operator on this value'):J.has(Q),u=(J,Q,Z)=>(K1(J,Q,"read from private field"),Z?Z.call(J):Q.get(J)),E=(J,Q,Z)=>Q.has(J)?DQ("Cannot add the same private member more than once"):Q instanceof WeakSet?Q.add(J):Q.set(J,Z),WJ=(J,Q,Z,$)=>(K1(J,Q,"write to private field"),$?$.call(J,Z):Q.set(J,Z),Z),C8=(J,Q,Z)=>(K1(J,Q,"access private method"),Z);function R8(J,Q){return{plugin:J,options:Q}}function TQ(J){return(Q)=>{return R8(J,Q)}}function RQ(J){if(typeof J==="function")return{plugin:J,options:void 0};return J}var D8,rQ,H1,hZ;D8=[T];var $J=class{constructor(J,Q){this.manager=J,this.options=Q,E(this,H1,C(rQ,8,this,!1)),C(rQ,11,this),E(this,hZ,new Set)}enable(){this.disabled=!1}disable(){this.disabled=!0}isDisabled(){return O(()=>{return this.disabled})}configure(J){this.options=J}registerEffect(J){let Q=o(J.bind(this));return u(this,hZ).add(Q),Q}destroy(){u(this,hZ).forEach((J)=>J())}static configure(J){return R8(this,J)}};rQ=OQ(null);H1=new WeakMap;hZ=new WeakMap;P(rQ,4,"disabled",D8,$J,H1);aJ(rQ,$J);var PQ=class extends $J{},yZ,J1=class{constructor(J){this.manager=J,this.instances=new Map,E(this,yZ,[])}get values(){return Array.from(this.instances.values())}set values(J){let Q=J.map(RQ).reduce(($,q)=>{let Y=$.find(({plugin:K})=>K===q.plugin);if(Y)return Y.options=q.options,$;return[...$,q]},[]),Z=Q.map(({plugin:$})=>$);for(let $ of u(this,yZ))if(!Z.includes($)){if($.prototype instanceof PQ)continue;this.unregister($)}for(let{plugin:$,options:q}of Q)this.register($,q);WJ(this,yZ,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()}};yZ=new WeakMap;function yq(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 xZ=[],AQ,IQ,fq=class extends $J{constructor(J){super(J);E(this,AQ),E(this,IQ),this.computeCollisions=this.computeCollisions.bind(this),WJ(this,IQ,IJ(xZ)),this.destroy=iJ(()=>{let Q=this.computeCollisions(),Z=O(()=>this.manager.dragOperation.position.current);if(Q!==xZ){let $=u(this,AQ);if(WJ(this,AQ,Z),$&&Z.x==$.x&&Z.y==$.y)return}else WJ(this,AQ,void 0);u(this,IQ).value=Q},()=>{let{dragOperation:Q}=this.manager;if(Q.status.initialized)this.forceUpdate()})}forceUpdate(J=!0){O(()=>{if(J)u(this,IQ).value=this.computeCollisions();else WJ(this,AQ,void 0)})}computeCollisions(J,Q){let{registry:Z,dragOperation:$}=this.manager,{source:q,shape:Y,status:K}=$;if(!K.initialized||!Y)return xZ;let X=[],W=[];for(let U of J!=null?J:Z.droppables){if(U.disabled)continue;if(q&&!U.accepts(q))continue;let B=Q!=null?Q:U.collisionDetector;if(!B)continue;W.push(U),U.shape;let H=O(()=>B({droppable:U,dragOperation:$}));if(H){if(U.collisionPriority!=null)H.priority=U.collisionPriority;X.push(H)}}if(W.length===0)return xZ;return X.sort(yq),X}get collisions(){return u(this,IQ).value}};AQ=new WeakMap;IQ=new WeakMap;var O8,T8,P8,W1,E8,FJ,U1,CQ,B1,N1;P8=[T],T8=[T],O8=[T];var EJ=class J{constructor(Q,Z){E(this,U1,C(FJ,8,this)),C(FJ,11,this),E(this,CQ),E(this,B1,C(FJ,12,this)),C(FJ,15,this),E(this,N1,C(FJ,16,this)),C(FJ,19,this);let{effects:$,id:q,data:Y={},disabled:K=!1,register:X=!0}=Q,W=q;if(WJ(this,CQ,IJ(q)),this.manager=Z,this.data=Y,this.disabled=K,this.effects=()=>{var U;return[()=>{let{id:B,manager:H}=this;if(B===W)return;return W=B,H==null||H.registry.register(this),()=>H==null?void 0:H.registry.unregister(this)},...(U=$==null?void 0:$())!=null?U:[]]},this.register=this.register.bind(this),this.unregister=this.unregister.bind(this),this.destroy=this.destroy.bind(this),Z&&X)queueMicrotask(this.register)}get id(){var Q,Z;let $=u(this,CQ).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,CQ).peek();if(Q===q)return;if(!J.pendingIdChanges)J.pendingIdChanges=new Map,queueMicrotask(()=>{var Y;return C8(Y=J,W1,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)}};FJ=OQ(null);W1=new WeakSet;E8=function(){let J=EJ.pendingIdChanges;if(EJ.pendingIdChanges=null,J)JJ(()=>{for(let[Q,Z]of J)u(Q,CQ).value=Z})};U1=new WeakMap;CQ=new WeakMap;B1=new WeakMap;N1=new WeakMap;P(FJ,4,"manager",P8,EJ,U1);P(FJ,4,"data",T8,EJ,B1);P(FJ,4,"disabled",O8,EJ,N1);E(EJ,W1);aJ(FJ,EJ);EJ.pendingIdChanges=null;var uZ=EJ,M8=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 X=this.cleanupFunctions.get($);X==null||X(),this.cleanupFunctions.delete($)}}let Y=new Map(Z);for(let[X,W]of Z)if(W===Q&&X!==J){Y.delete(X);break}Y.set(J,Q),this.map.value=Y;let K=iJ(...Q.effects());return this.cleanupFunctions.set(Q,K),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,Z1,ZJ,L1,V1,G1,zJ=class extends(Z1=uZ,f8=[T],y8=[T],h8=[T],x8=[h],k8=[h],S8=[h],Z1){constructor(J,Q){var Z=J,{modifiers:$,type:q,sensors:Y,plugins:K,effects:X}=Z,W=I8(Z,["modifiers","type","sensors","plugins","effects"]);super(X1(Y1({},W),{effects:()=>{var U;return[...(U=X==null?void 0:X())!=null?U:[],()=>{let{manager:B,plugins:H}=this;if(!B||!H)return;for(let V of H){let{plugin:L}=RQ(V);B.registry.plugins.register(L)}}]}}),Q);C(ZJ,5,this),E(this,L1,C(ZJ,8,this)),C(ZJ,11,this),E(this,V1,C(ZJ,12,this)),C(ZJ,15,this),E(this,G1,C(ZJ,16,this,this.isDragSource?"dragging":"idle")),C(ZJ,19,this),this.type=q,this.sensors=Y,this.modifiers=$,this.alignment=W.alignment,this.plugins=K}pluginConfig(J){if(!this.plugins)return;for(let Q of this.plugins){let Z=RQ(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=OQ(Z1);L1=new WeakMap;V1=new WeakMap;G1=new WeakMap;P(ZJ,4,"type",f8,zJ,L1);P(ZJ,4,"modifiers",y8,zJ,V1);P(ZJ,4,"status",h8,zJ,G1);P(ZJ,2,"isDropping",x8,zJ);P(ZJ,2,"isDragging",k8,zJ);P(ZJ,2,"isDragSource",S8,zJ);aJ(ZJ,zJ);var v8,b8,g8,u8,m8,p8,$1,c,M1,F1,z1,w1,A1,wJ=class extends($1=uZ,p8=[T],m8=[T],u8=[T],g8=[T],b8=[T],v8=[h],$1){constructor(J,Q){var Z=J,{accept:$,collisionDetector:q,collisionPriority:Y,type:K}=Z,X=I8(Z,["accept","collisionDetector","collisionPriority","type"]);super(X,Q);C(c,5,this),E(this,M1,C(c,8,this)),C(c,11,this),E(this,F1,C(c,12,this)),C(c,15,this),E(this,z1,C(c,16,this)),C(c,19,this),E(this,w1,C(c,20,this)),C(c,23,this),E(this,A1,C(c,24,this)),C(c,27,this),this.accept=$,this.collisionDetector=q,this.collisionPriority=Y,this.type=K}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=OQ($1);M1=new WeakMap;F1=new WeakMap;z1=new WeakMap;w1=new WeakMap;A1=new WeakMap;P(c,4,"accept",p8,wJ,M1);P(c,4,"type",m8,wJ,F1);P(c,4,"collisionDetector",u8,wJ,z1);P(c,4,"collisionPriority",g8,wJ,w1);P(c,4,"shape",b8,wJ,A1);P(c,2,"isDropTarget",v8,wJ);aJ(c,wJ);var vq=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)}},bq=class extends vq{constructor(J){super();this.manager=J}dispatch(J,Q){let Z=[Q,this.manager];super.dispatch(J,...Z)}};function fZ(J,Q=!0){let Z=!1;return X1(Y1({},J),{cancelable:Q,get defaultPrevented(){return Z},preventDefault(){if(!Q)return;Z=!0}})}var gq=class extends PQ{constructor(J){super(J);let Q=($,q)=>$.map(({id:Y})=>Y).join("")===q.map(({id:Y})=>Y).join(""),Z=[];this.destroy=iJ(()=>{let{dragOperation:$,collisionObserver:q}=J;if($.status.initializing)Z=[],q.enable()},()=>{let{collisionObserver:$,monitor:q}=J,{collisions:Y}=$;if($.isDisabled())return;if(uZ.pendingIdChanges)return;let K=fZ({collisions:Y});if(q.dispatch("collision",K),K.defaultPrevented)return;if(Q(Y,Z))return;else Z=Y;let[X]=Y;O(()=>{var W;if((X==null?void 0:X.id)!==((W=J.dragOperation.target)==null?void 0:W.id))$.disable(),J.actions.setDropTarget(X==null?void 0:X.id).then(()=>{$.enable()})})})}},CJ=((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})(CJ||{}),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,VJ,I1;i8=[T],o8=[h],s8=[h],l8=[h],c8=[h],_8=[h],d8=[h];var SJ=class{constructor(){C(VJ,5,this),E(this,I1,C(VJ,8,this,"idle")),C(VJ,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}};VJ=OQ(null);I1=new WeakMap;P(VJ,4,"value",i8,SJ,I1);P(VJ,2,"current",o8,SJ);P(VJ,2,"idle",s8,SJ);P(VJ,2,"initializing",l8,SJ);P(VJ,2,"initialized",c8,SJ);P(VJ,2,"dragging",_8,SJ);P(VJ,2,"dropped",d8,SJ);aJ(VJ,SJ);var uq=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 O(()=>{let{dragOperation:Q}=this.manager,Z=J!=null?J:null;if(Q.targetIdentifier===Z)return Promise.resolve(!1);Q.targetIdentifier=Z;let $=fZ({operation:Q.snapshot()});if(Q.status.dragging)this.manager.monitor.dispatch("dragover",$);return this.manager.renderer.rendering.then(()=>$.defaultPrevented)})}start(J){return O(()=>{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 K=fZ({operation:Q.snapshot()});if(this.manager.monitor.dispatch("beforedragstart",K),K.defaultPrevented)return Q.reset(),$.abort(),$;return Q.status.set("initializing"),Q.controller=$,this.manager.renderer.rendering.then(()=>{if($.signal.aborted)return;let{status:X}=Q;if(X.current!=="initializing")return;JJ(()=>{Q.status.set("dragging"),this.manager.monitor.dispatch("dragstart",{nativeEvent:q,operation:Q.snapshot(),cancelable:!1})})}),$})}move(J){return O(()=>{var Q,Z;let{dragOperation:$}=this.manager,{status:q,controller:Y}=$;if(!q.dragging||!Y||Y.signal.aborted)return;let K=fZ({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",K);queueMicrotask(()=>{var X,W,U,B,H;if(K.defaultPrevented)return;let V=(H=J.to)!=null?H:{x:$.position.current.x+((W=(X=J.by)==null?void 0:X.x)!=null?W:0),y:$.position.current.y+((B=(U=J.by)==null?void 0:U.y)!=null?B:0)};$.position.current=V})})}stop(J={}){return O(()=>{var Q,Z;let{dragOperation:$}=this.manager,{controller:q}=$;if(!q||q.signal.aborted)return;let Y,K=()=>{let W={resume:()=>{},abort:()=>{}};return Y=new Promise((U,B)=>{W.resume=U,W.abort=B}),W};q.abort();let X=()=>{this.manager.renderer.rendering.then(()=>{$.status.set("dropped");let W=O(()=>{var B;return((B=$.source)==null?void 0:B.status)==="dropping"}),U=()=>{if($.controller===q)$.controller=void 0;$.reset()};if(W){let{source:B}=$,H=o(()=>{if((B==null?void 0:B.status)==="idle")H(),U()})}else this.manager.renderer.rendering.then(U)})};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:K}),Y)Y.then(X).catch(()=>$.reset());else X()})}},nJ=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)}},vZ,j1=class{constructor(J){this.options=J,E(this,vZ)}set controller(J){WJ(this,vZ,J),J.signal.addEventListener("abort",()=>this.abort())}activate(J){var Q;(Q=u(this,vZ))==null||Q.activate(J)}};vZ=new WeakMap;var F8=class extends $J{constructor(J,Q){super(J,Q);this.manager=J,this.options=Q}apply(J){return J.transform}},mq=class{constructor(J){this.draggables=new M8,this.droppables=new M8,this.plugins=new J1(J),this.sensors=new J1(J),this.modifiers=new J1(J)}register(J,Q){if(J instanceof zJ)return this.draggables.register(J.id,J);if(J instanceof wJ)return this.droppables.register(J.id,J);if(J.prototype instanceof F8)return this.modifiers.register(J,Q);if(J.prototype instanceof nJ)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 uZ){if(J instanceof zJ)return this.draggables.unregister(J.id,J);if(J instanceof wJ)return this.droppables.unregister(J.id,J);return()=>{}}if(J.prototype instanceof F8)return this.modifiers.unregister(J);if(J.prototype instanceof nJ)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,nQ,bZ,jQ,g,C1,R1,D1,O1,T1,aQ;q2=[h],$2=[T],Z2=[T],Q2=[T],J2=[T],e8=[T],t8=[h],r8=[h],a8=[h];var AJ=class{constructor(J){C(g,5,this),E(this,nQ),E(this,bZ),E(this,jQ,new jJ(void 0,(Q,Z)=>Q&&Z?Q.equals(Z):Q===Z)),this.status=new SJ,E(this,C1,C(g,8,this,!1)),C(g,11,this),E(this,R1,C(g,12,this,null)),C(g,15,this),E(this,D1,C(g,16,this,null)),C(g,19,this),E(this,O1,C(g,20,this,null)),C(g,23,this),E(this,T1,C(g,24,this,[])),C(g,27,this),this.position=new oQ({x:0,y:0}),E(this,aQ,{x:0,y:0}),WJ(this,nQ,J)}get shape(){let{current:J,initial:Q,previous:Z}=u(this,jQ);if(!J||!Q)return null;return{current:J,initial:Q,previous:Z}}set shape(J){if(!J)u(this,jQ).reset();else u(this,jQ).current=J}get source(){var J;let Q=this.sourceIdentifier;if(Q==null)return null;let Z=u(this,nQ).registry.draggables.get(Q);if(Z)WJ(this,bZ,Z);return(J=Z!=null?Z:u(this,bZ))!=null?J:null}get target(){var J;let Q=this.targetIdentifier;return Q!=null?(J=u(this,nQ).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(X1(Y1({},this.snapshot()),{transform:Z}));return WJ(this,aQ,Z),Z}snapshot(){return O(()=>({source:this.source,target:this.target,activatorEvent:this.activatorEvent,transform:u(this,aQ),shape:this.shape?EZ(this.shape):null,position:EZ(this.position),status:EZ(this.status),canceled:this.canceled}))}reset(){JJ(()=>{this.status.set("idle"),this.sourceIdentifier=null,this.targetIdentifier=null,u(this,jQ).reset(),this.position.reset({x:0,y:0}),WJ(this,aQ,{x:0,y:0}),this.modifiers=[]})}};g=OQ(null);nQ=new WeakMap;bZ=new WeakMap;jQ=new WeakMap;C1=new WeakMap;R1=new WeakMap;D1=new WeakMap;O1=new WeakMap;T1=new WeakMap;aQ=new WeakMap;P(g,2,"shape",q2,AJ);P(g,4,"canceled",$2,AJ,C1);P(g,4,"activatorEvent",Z2,AJ,R1);P(g,4,"sourceIdentifier",Q2,AJ,D1);P(g,4,"targetIdentifier",J2,AJ,O1);P(g,4,"modifiers",e8,AJ,T1);P(g,2,"source",t8,AJ);P(g,2,"target",r8,AJ);P(g,2,"transform",a8,AJ);aJ(g,AJ);var pq={get rendering(){return Promise.resolve()}};function GJ(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((H)=>H.destroy()),this.registry.destroy(),this.collisionObserver.destroy()};var Q;let Z=J!=null?J:{},$=GJ(Z.plugins,[]),q=GJ(Z.sensors,[]),Y=GJ(Z.modifiers,[]),K=(Q=Z.renderer)!=null?Q:pq,X=new bq(this),W=new mq(this);this.registry=W,this.monitor=X,this.renderer=K,this.actions=new uq(this),this.dragOperation=new AJ(this),this.collisionObserver=new fq(this),this.plugins=[gq,...$],this.modifiers=Y,this.sensors=q;let{destroy:U}=this,B=iJ(()=>{var H,V,L;let M=O(()=>this.dragOperation.modifiers),F=this.modifiers;for(let A of M)if(!F.includes(A))A.destroy();this.dragOperation.modifiers=(L=(V=(H=this.dragOperation.source)==null?void 0:H.modifiers)==null?void 0:V.map((A)=>{let{plugin:I,options:N}=RQ(A);return new I(this,N)}))!=null?L:F});this.destroy=()=>{B(),U()}}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 N2=(J)=>{throw TypeError(J)},S1=(J,Q,Z)=>Q.has(J)||N2("Cannot "+Z),R=(J,Q,Z)=>(S1(J,Q,"read from private field"),Q.get(J)),YJ=(J,Q,Z)=>Q.has(J)?N2("Cannot add the same private member more than once"):Q instanceof WeakSet?Q.add(J):Q.set(J,Z),UJ=(J,Q,Z,$)=>(S1(J,Q,"write to private field"),Q.set(J,Z),Z),L2=(J,Q,Z)=>(S1(J,Q,"access private method"),Z);function nZ(J){if(!J)return!1;if(J instanceof KeyframeEffect)return!0;return"getKeyframes"in J&&typeof J.getKeyframes==="function"}function k1(J,Q){let Z=J.getAnimations(),$=null;for(let q of Z){if(q.playState!=="running")continue;let{effect:Y}=q,X=(nZ(Y)?Y.getKeyframes():[]).filter(Q);if(X.length>0)$=[X[X.length-1],q]}return $}function aZ(J){let{width:Q,height:Z,top:$,left:q,bottom:Y,right:K}=J.getBoundingClientRect();return{width:Q,height:Z,top:$,left:q,bottom:Y,right:K}}function x1(J){let Q=Object.prototype.toString.call(J);return Q==="[object Window]"||Q==="[object global]"}function qZ(J){return"nodeType"in J}function BJ(J){var Q,Z,$;if(!J)return window;if(x1(J))return J;if(!qZ(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 rZ(J){let{Document:Q}=BJ(J);return J instanceof Q||"nodeType"in J&&J.nodeType===Node.DOCUMENT_NODE}function kJ(J){if(!J||x1(J))return!1;return J instanceof BJ(J).HTMLElement||"namespaceURI"in J&&typeof J.namespaceURI==="string"&&J.namespaceURI.endsWith("html")}function V2(J){return J instanceof BJ(J).SVGElement||"namespaceURI"in J&&typeof J.namespaceURI==="string"&&J.namespaceURI.endsWith("svg")}function JQ(J){if(!J)return document;if(x1(J))return J.document;if(!qZ(J))return document;if(rZ(J))return J;if(kJ(J)||V2(J))return J.ownerDocument;return document}function dq(J){var Q,Z,$,q;let{documentElement:Y}=JQ(J),K=BJ(J).visualViewport,X=(Q=K==null?void 0:K.width)!=null?Q:Y.clientWidth,W=(Z=K==null?void 0:K.height)!=null?Z:Y.clientHeight,U=($=K==null?void 0:K.offsetTop)!=null?$:0,B=(q=K==null?void 0:K.offsetLeft)!=null?q:0;return{top:U,left:B,right:B+X,bottom:U+W,width:X,height:W}}function _q(J,Q){if(cq(J)&&J.open===!1)return!1;let{overflow:Z,overflowX:$,overflowY:q}=getComputedStyle(J);return Z==="visible"&&$==="visible"&&q==="visible"}function cq(J){return J.tagName==="DETAILS"}function cZ(J,Q=J.getBoundingClientRect(),Z=0){var $,q,Y,K,X;let W=Q,{ownerDocument:U}=J,B=($=U.defaultView)!=null?$:window,H=J.parentElement;while(H&&H!==U.documentElement){if(!_q(H)){let z=H.getBoundingClientRect(),G=Z*(z.bottom-z.top),w=Z*(z.right-z.left),f=Z*(z.bottom-z.top),j=Z*(z.right-z.left);W={top:Math.max(W.top,z.top-G),right:Math.min(W.right,z.right+w),bottom:Math.min(W.bottom,z.bottom+f),left:Math.max(W.left,z.left-j),width:0,height:0},W.width=W.right-W.left,W.height=W.bottom-W.top}H=H.parentElement}let V=B.visualViewport,L=(q=V==null?void 0:V.offsetTop)!=null?q:0,M=(Y=V==null?void 0:V.offsetLeft)!=null?Y:0,F=(K=V==null?void 0:V.width)!=null?K:B.innerWidth,A=(X=V==null?void 0:V.height)!=null?X:B.innerHeight,I=Z*A,N=Z*F;if(W={top:Math.max(W.top,L-I),right:Math.min(W.right,M+F+N),bottom:Math.min(W.bottom,L+A+I),left:Math.max(W.left,M-N),width:0,height:0},W.width=W.right-W.left,W.height=W.bottom-W.top,W.width<0)W.width=0;if(W.height<0)W.height=0;return W}function QQ(J){return{x:J.clientX,y:J.clientY}}var G2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function lZ(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(...lZ(q,Q))}catch(q){}try{let $=J.defaultView;if($&&$!==window.top){let q=$.parent;if(q&&q.document&&q.document!==J)Z.push(...lZ(q.document,Q))}}catch($){}return Z}function tZ(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function h1(){var J,Q;let Z=tZ()?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 eZ(J){if(!J||!qZ(J))return!1;return J instanceof BJ(J).ShadowRoot}function YZ(J){if(J&&qZ(J)){let Q=J.getRootNode();if(eZ(Q))return Q;else if(Q instanceof Document)return Q}return JQ(J)}function y1(J){return J.matchMedia("(prefers-reduced-motion: reduce)").matches}function M2(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,K)=>{let X=$[K];if(X2(Y)&&X2(X)){if(Y.type!=="file")Y.value=X.value;if(Y.type==="radio"&&Y.name)Y.name=`Cloned__${Y.name}`}if(K2(Y)&&K2(X)&&X.width>0&&X.height>0){let W=Y.getContext("2d");W==null||W.drawImage(X,0,0)}}),Z}function X2(J){return"value"in J}function K2(J){return J.tagName==="CANVAS"}function f1(J,{x:Q,y:Z}){let $=J.elementFromPoint(Q,Z);if(lq($)){let{contentDocument:q}=$;if(q){let{left:Y,top:K}=$.getBoundingClientRect();return f1(q,{x:Q-Y,y:Z-K})}}return $}function lq(J){return(J==null?void 0:J.tagName)==="IFRAME"}var v1=new WeakMap;function F2(J){return Boolean(J.closest(`
|
|
2
|
+
input:not([disabled]),
|
|
3
|
+
select:not([disabled]),
|
|
4
|
+
textarea:not([disabled]),
|
|
5
|
+
button:not([disabled]),
|
|
6
|
+
a[href],
|
|
7
|
+
[contenteditable]:not([contenteditable="false"])
|
|
8
|
+
`))}var b1=class{constructor(){this.entries=new Set,this.clear=()=>{for(let J of this.entries){let[Q,{type:Z,listener:$,options:q}]=J;Q.removeEventListener(Z,$,q)}this.entries.clear()}}bind(J,Q){let Z=Array.isArray(J)?J:[J],$=Array.isArray(Q)?Q:[Q],q=[];for(let K of Z)for(let X of $){let{type:W,listener:U,options:B}=X,H=[K,X];K.addEventListener(W,U,B),this.entries.add(H),q.push(H)}let Y=this.entries;return function(){for(let X of q){let[W,{type:U,listener:B,options:H}]=X;W.removeEventListener(U,B,H),Y.delete(X)}}}};function eJ(J){let Q=J==null?void 0:J.ownerDocument.defaultView;if(Q&&Q.self!==Q.parent)return Q.frameElement}function sq(J){let Q=new Set,Z=eJ(J);while(Z)Q.add(Z),Z=eJ(Z);return Q}function oq(J,Q){let Z=setTimeout(J,Q);return()=>clearTimeout(Z)}function z2(J,Q){let Z=()=>performance.now(),$,q;return function(...Y){let K=this;if(!q)J.apply(K,Y),q=Z();else $==null||$(),$=oq(()=>{J.apply(K,Y),q=Z()},Q-(Z()-q))}}function iq(J,Q){if(J===Q)return!0;if(!J||!Q)return!1;return J.top==Q.top&&J.left==Q.left&&J.right==Q.right&&J.bottom==Q.bottom}function nq(J,Q=J.getBoundingClientRect()){let{width:Z,height:$}=cZ(J,Q);return Z>0&&$>0}var aq=G2?ResizeObserver:class{observe(){}unobserve(){}disconnect(){}},dZ,rq=class extends aq{constructor(J){super((Q)=>{if(!R(this,dZ)){UJ(this,dZ,!0);return}J(Q,this)});YJ(this,dZ,!1)}};dZ=new WeakMap;var H2=Array.from({length:100},(J,Q)=>Q/100),w2=75,rJ,sZ,vJ,tJ,tQ,i,ZZ,eQ,oZ,A2,I2,j2=class{constructor(J,Q,Z={debug:!1,skipInitial:!1}){this.element=J,this.callback=Q,YJ(this,oZ),this.disconnect=()=>{var Y,K,X;UJ(this,ZZ,!0),(Y=R(this,vJ))==null||Y.disconnect(),(K=R(this,tJ))==null||K.disconnect(),R(this,tQ).disconnect(),(X=R(this,i))==null||X.remove()},YJ(this,rJ,!0),YJ(this,sZ),YJ(this,vJ),YJ(this,tJ),YJ(this,tQ),YJ(this,i),YJ(this,ZZ,!1),YJ(this,eQ,z2(()=>{var Y,K,X;let{element:W}=this;if((Y=R(this,tJ))==null||Y.disconnect(),R(this,ZZ)||!R(this,rJ)||!W.isConnected)return;let U=(K=W.ownerDocument)!=null?K:document,{innerHeight:B,innerWidth:H}=(X=U.defaultView)!=null?X:window,V=W.getBoundingClientRect(),L=cZ(W,V),{top:M,left:F,bottom:A,right:I}=L,N=-Math.floor(M),z=-Math.floor(F),G=-Math.floor(H-I),w=-Math.floor(B-A),f=`${N}px ${G}px ${w}px ${z}px`;this.boundingClientRect=V,UJ(this,tJ,new IntersectionObserver((j)=>{let[p]=j,{intersectionRect:b}=p;if((p.intersectionRatio!==1?p.intersectionRatio:HJ.intersectionRatio(b,cZ(W)))!==1)R(this,eQ).call(this)},{threshold:H2,rootMargin:f,root:U})),R(this,tJ).observe(W),L2(this,oZ,A2).call(this)},w2)),this.boundingClientRect=J.getBoundingClientRect(),UJ(this,rJ,nq(J,this.boundingClientRect));let $=!0;this.callback=(Y)=>{if($){if($=!1,Z.skipInitial)return}Q(Y)};let q=J.ownerDocument;if(Z==null?void 0:Z.debug)UJ(this,i,document.createElement("div")),R(this,i).style.background="rgba(0,0,0,0.15)",R(this,i).style.position="fixed",R(this,i).style.pointerEvents="none",q.body.appendChild(R(this,i));if(UJ(this,tQ,new IntersectionObserver((Y)=>{var K,X;let W=Y[Y.length-1],{boundingClientRect:U,isIntersecting:B}=W,{width:H,height:V}=U,L=R(this,rJ);if(UJ(this,rJ,B),!H&&!V)return;if(L&&!B){if((K=R(this,tJ))==null||K.disconnect(),this.callback(null),(X=R(this,vJ))==null||X.disconnect(),UJ(this,vJ,void 0),R(this,i))R(this,i).style.visibility="hidden"}else R(this,eQ).call(this);if(B&&!R(this,vJ))UJ(this,vJ,new rq(R(this,eQ))),R(this,vJ).observe(J)},{threshold:H2,root:q})),R(this,rJ)&&!Z.skipInitial)this.callback(this.boundingClientRect);R(this,tQ).observe(J)}};rJ=new WeakMap;sZ=new WeakMap;vJ=new WeakMap;tJ=new WeakMap;tQ=new WeakMap;i=new WeakMap;ZZ=new WeakMap;eQ=new WeakMap;oZ=new WeakSet;A2=function(){if(R(this,ZZ))return;if(L2(this,oZ,I2).call(this),iq(this.boundingClientRect,R(this,sZ)))return;this.callback(this.boundingClientRect),UJ(this,sZ,this.boundingClientRect)};I2=function(){if(R(this,i)){let{top:J,left:Q,width:Z,height:$}=cZ(this.element);R(this,i).style.overflow="hidden",R(this,i).style.visibility="visible",R(this,i).style.top=`${Math.floor(J)}px`,R(this,i).style.left=`${Math.floor(Q)}px`,R(this,i).style.width=`${Math.floor(Z)}px`,R(this,i).style.height=`${Math.floor($)}px`}};var mZ=new WeakMap,pZ=new WeakMap;function tq(J,Q){let Z=mZ.get(J);if(!Z)Z={disconnect:new j2(J,(q)=>{let Y=mZ.get(J);if(!Y)return;Y.callbacks.forEach((K)=>K(q))},{skipInitial:!0}).disconnect,callbacks:new Set};return Z.callbacks.add(Q),mZ.set(J,Z),()=>{if(Z.callbacks.delete(Q),Z.callbacks.size===0)mZ.delete(J),Z.disconnect()}}function eq(J,Q){let Z=new Set;for(let $ of J){let q=tq($,Q);Z.add(q)}return()=>Z.forEach(($)=>$())}function JY(J,Q){var Z;let $=J.ownerDocument;if(!pZ.has($)){let K=new AbortController,X=new Set;document.addEventListener("scroll",(W)=>X.forEach((U)=>U(W)),{capture:!0,passive:!0,signal:K.signal}),pZ.set($,{disconnect:()=>K.abort(),listeners:X})}let{listeners:q,disconnect:Y}=(Z=pZ.get($))!=null?Z:{};if(!q||!Y)return()=>{};return q.add(Q),()=>{if(q.delete(Q),q.size===0)Y(),pZ.delete($)}}var JZ,QZ,_Z,E1,C2=class{constructor(J,Q,Z){this.callback=Q,YJ(this,JZ),YJ(this,QZ,!1),YJ(this,_Z),YJ(this,E1,z2((K)=>{if(R(this,QZ))return;if(!K.target)return;if("contains"in K.target&&typeof K.target.contains==="function"){for(let X of R(this,_Z))if(K.target.contains(X)){this.callback(R(this,JZ).boundingClientRect);break}}},w2));let $=sq(J),q=eq($,Q),Y=JY(J,R(this,E1));UJ(this,_Z,$),UJ(this,JZ,new j2(J,Q,Z)),this.disconnect=()=>{if(R(this,QZ))return;UJ(this,QZ,!0),q(),Y(),R(this,JZ).disconnect()}}};JZ=new WeakMap;QZ=new WeakMap;_Z=new WeakMap;E1=new WeakMap;function J0(J){return"showPopover"in J&&"hidePopover"in J&&typeof J.showPopover==="function"&&typeof J.hidePopover==="function"}function ZQ(J){try{if(J0(J)&&J.isConnected&&J.hasAttribute("popover")&&!J.matches(":popover-open"))J.showPopover()}catch(Q){}}function W2(J){if(!G2||!J)return!1;return J===JQ(J).scrollingElement}function R2(J){var Q,Z;let $=BJ(J),q=W2(J)?dq(J):aZ(J),Y=$.visualViewport,K=W2(J)?{height:(Q=Y==null?void 0:Y.height)!=null?Q:$.innerHeight,width:(Z=Y==null?void 0:Y.width)!=null?Z:$.innerWidth}:{height:J.clientHeight,width:J.clientWidth},X={current:{x:J.scrollLeft,y:J.scrollTop},max:{x:J.scrollWidth-K.width,y:J.scrollHeight-K.height}},W=X.current.y<=0,U=X.current.x<=0,B=X.current.y>=X.max.y,H=X.current.x>=X.max.x;return{rect:q,position:X,isTop:W,isLeft:U,isBottom:B,isRight:H}}function D2(J,Q){let{isTop:Z,isBottom:$,isLeft:q,isRight:Y,position:K}=R2(J),{x:X,y:W}=Q!=null?Q:{x:0,y:0},U=!Z&&K.current.y+W>0,B=!$&&K.current.y+W<K.max.y,H=!q&&K.current.x+X>0,V=!Y&&K.current.x+X<K.max.x;return{top:U,bottom:B,left:H,right:V,x:H||V,y:U||B}}var g1=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))}},XZ=new g1((J)=>{if(typeof requestAnimationFrame==="function")requestAnimationFrame(J);else J()}),QY=new g1((J)=>setTimeout(J,50)),iZ=new Map,ZY=iZ.clear.bind(iZ);function DJ(J,Q=!1){if(!Q)return U2(J);let Z=iZ.get(J);if(Z)return Z;return Z=U2(J),iZ.set(J,Z),QY.schedule(ZY),Z}function U2(J){return BJ(J).getComputedStyle(J)}function $Y(J,Q=DJ(J,!0)){return Q.position==="fixed"||Q.position==="sticky"}function qY(J,Q=DJ(J,!0)){let Z=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some((q)=>{let Y=Q[q];return typeof Y==="string"?Z.test(Y):!1})}var YY={excludeElement:!0,escapeShadowDOM:!0};function Q0(J,Q=YY){let{limit:Z,excludeElement:$,escapeShadowDOM:q}=Q,Y=new Set;function K(X){if(Z!=null&&Y.size>=Z)return Y;if(!X)return Y;if(rZ(X)&&X.scrollingElement!=null&&!Y.has(X.scrollingElement))return Y.add(X.scrollingElement),Y;if(q&&eZ(X))return K(X.host);if(!kJ(X)){if(V2(X))return K(X.parentElement);return Y}if(Y.has(X))return Y;let W=DJ(X,!0);if($&&X===J);else if(qY(X,W))Y.add(X);if($Y(X,W)){let{scrollingElement:U}=X.ownerDocument;if(U)Y.add(U);return Y}return K(X.parentNode)}if(!J)return Y;return K(J)}function $Q(J,Q=window.frameElement){let Z={x:0,y:0,scaleX:1,scaleY:1};if(!J)return Z;let $=eJ(J);while($){if($===Q)return Z;let q=aZ($),{x:Y,y:K}=XY($,q);Z.x=Z.x+q.left,Z.y=Z.y+q.top,Z.scaleX=Z.scaleX*Y,Z.scaleY=Z.scaleY*K,$=eJ($)}return Z}function XY(J,Q=aZ(J)){let Z=Math.round(Q.width),$=Math.round(Q.height);if(kJ(J))return{x:Z/J.offsetWidth,y:$/J.offsetHeight};let q=DJ(J,!0);return{x:(parseFloat(q.width)||Z)/Z,y:(parseFloat(q.height)||$)/$}}function KY(J){if(J==="none")return null;let Q=J.split(" "),Z=parseFloat(Q[0]),$=parseFloat(Q[1]);if(isNaN(Z)&&isNaN($))return null;return{x:isNaN(Z)?$:Z,y:isNaN($)?Z:$}}function SQ(J){if(J==="none")return null;let[Q,Z,$="0"]=J.split(" "),q={x:parseFloat(Q),y:parseFloat(Z),z:parseInt($,10)};if(isNaN(q.x)&&isNaN(q.y))return null;return{x:isNaN(q.x)?0:q.x,y:isNaN(q.y)?0:q.y,z:isNaN(q.z)?0:q.z}}function KZ(J){var Q,Z,$,q,Y,K,X,W,U;let{scale:B,transform:H,translate:V}=J,L=KY(B),M=SQ(V),F=HY(H);if(!F&&!L&&!M)return null;let A={x:(Q=L==null?void 0:L.x)!=null?Q:1,y:(Z=L==null?void 0:L.y)!=null?Z:1},I={x:($=M==null?void 0:M.x)!=null?$:0,y:(q=M==null?void 0:M.y)!=null?q:0},N={x:(Y=F==null?void 0:F.x)!=null?Y:0,y:(K=F==null?void 0:F.y)!=null?K:0,scaleX:(X=F==null?void 0:F.scaleX)!=null?X:1,scaleY:(W=F==null?void 0:F.scaleY)!=null?W:1};return{x:I.x+N.x,y:I.y+N.y,z:(U=M==null?void 0:M.z)!=null?U:0,scaleX:A.x*N.scaleX,scaleY:A.y*N.scaleY}}function HY(J){if(J.startsWith("matrix3d(")){let Q=J.slice(9,-1).split(/, /);return{x:+Q[12],y:+Q[13],scaleX:+Q[0],scaleY:+Q[5]}}else if(J.startsWith("matrix(")){let Q=J.slice(7,-1).split(/, /);return{x:+Q[4],y:+Q[5],scaleX:+Q[0],scaleY:+Q[3]}}return null}var NJ=((J)=>{return J[J.Idle=0]="Idle",J[J.Forward=1]="Forward",J[J.Reverse=-1]="Reverse",J})(NJ||{}),WY={x:0.2,y:0.2},UY={x:10,y:10};function O2(J,Q,Z,$=25,q=WY,Y=UY){let{x:K,y:X}=Q,{rect:W,isTop:U,isBottom:B,isLeft:H,isRight:V}=R2(J),L=$Q(J),M=DJ(J,!0),F=KZ(M),A=F!==null?(F==null?void 0:F.scaleX)<0:!1,I=F!==null?(F==null?void 0:F.scaleY)<0:!1,N=new HJ(W.left*L.scaleX+L.x,W.top*L.scaleY+L.y,W.width*L.scaleX,W.height*L.scaleY),z={x:0,y:0},G={x:0,y:0},w={height:N.height*q.y,width:N.width*q.x};if(w.height>0&&(!U||I&&!B)&&X<=N.top+w.height&&(Z==null?void 0:Z.y)!==1&&K>=N.left-Y.x&&K<=N.right+Y.x)z.y=I?1:-1,G.y=$*Math.abs((N.top+w.height-X)/w.height);else if(w.height>0&&(!B||I&&!U)&&X>=N.bottom-w.height&&(Z==null?void 0:Z.y)!==-1&&K>=N.left-Y.x&&K<=N.right+Y.x)z.y=I?-1:1,G.y=$*Math.abs((N.bottom-w.height-X)/w.height);if(w.width>0&&(!V||A&&!H)&&K>=N.right-w.width&&(Z==null?void 0:Z.x)!==-1&&X>=N.top-Y.y&&X<=N.bottom+Y.y)z.x=A?-1:1,G.x=$*Math.abs((N.right-w.width-K)/w.width);else if(w.width>0&&(!H||A&&!V)&&K<=N.left+w.width&&(Z==null?void 0:Z.x)!==1&&X>=N.top-Y.y&&X<=N.bottom+Y.y)z.x=A?1:-1,G.x=$*Math.abs((N.left+w.width-K)/w.width);return{direction:z,speed:G}}function T2(J,{block:Q="nearest",inline:Z="nearest"}={}){if(!kJ(J))return;let $=Q0(J),q=[];for(let Y of $){if(!kJ(Y))continue;let{top:K,left:X}=BY(J,Y),W=K,U=X;for(let B of q)W-=B.scrollTop,U-=B.scrollLeft;if(Q!=="none"){let B=W<Y.scrollTop,H=W+J.offsetHeight>Y.scrollTop+Y.clientHeight;if(B!==H)if(Q==="center")Y.scrollTop=W-Y.clientHeight/2+J.offsetHeight/2;else if(B)Y.scrollTop=W;else Y.scrollTop=W+J.offsetHeight-Y.clientHeight}if(Z!=="none"){let B=U<Y.scrollLeft,H=U+J.offsetWidth>Y.scrollLeft+Y.clientWidth;if(B!==H)if(Z==="center")Y.scrollLeft=U-Y.clientWidth/2+J.offsetWidth/2;else if(B)Y.scrollLeft=U;else Y.scrollLeft=U+J.offsetWidth-Y.clientWidth}q.push(Y)}}function B2(J){let Q=0,Z=0,$=J;while($){Q+=$.offsetTop,Z+=$.offsetLeft;let q=$.offsetParent;if(!kJ(q))break;Q+=q.clientTop,Z+=q.clientLeft,$=q}return{top:Q,left:Z}}function BY(J,Q){let Z=B2(J),$=B2(Q);return{top:Z.top-$.top-Q.clientTop,left:Z.left-$.left-Q.clientLeft}}function NY(J,Q,Z){let{scaleX:$,scaleY:q,x:Y,y:K}=Q,X=J.left+Y+(1-$)*parseFloat(Z),W=J.top+K+(1-q)*parseFloat(Z.slice(Z.indexOf(" ")+1)),U=$?J.width*$:J.width,B=q?J.height*q:J.height;return{width:U,height:B,top:W,right:X+U,bottom:W+B,left:X}}function LY(J,Q,Z){let{scaleX:$,scaleY:q,x:Y,y:K}=Q,X=J.left-Y-(1-$)*parseFloat(Z),W=J.top-K-(1-q)*parseFloat(Z.slice(Z.indexOf(" ")+1)),U=$?J.width/$:J.width,B=q?J.height/q:J.height;return{width:U,height:B,top:W,right:X+U,bottom:W+B,left:X}}function P2({element:J,keyframes:Q,options:Z}){return J.animate(Q,Z).finished}function OX(J,Q=DJ(J).translate,Z=!0){if(Z){let $=k1(J,(q)=>("translate"in q));if($){let{translate:q=""}=$[0];if(typeof q==="string"){let Y=SQ(q);if(Y)return Y}}}if(Q){let $=SQ(Q);if($)return $}return{x:0,y:0,z:0}}var VY=new g1((J)=>setTimeout(J,0)),$Z=new Map,GY=$Z.clear.bind($Z);function MY(J){let Q=J.ownerDocument,Z=$Z.get(Q);if(Z)return Z;Z=Q.getAnimations(),$Z.set(Q,Z),VY.schedule(GY);let $=Z.filter((q)=>nZ(q.effect)&&q.effect.target===J);return $Z.set(J,$),Z}function FY(J,Q){let Z=MY(J).filter(($)=>{var q,Y;if(nZ($.effect)){let{target:K}=$.effect;if((Y=K&&((q=Q.isValidTarget)==null?void 0:q.call(Q,K)))!=null?Y:!0)return $.effect.getKeyframes().some((W)=>{for(let U of Q.properties)if(W[U])return!0})}}).map(($)=>{let{effect:q,currentTime:Y}=$,K=q==null?void 0:q.getComputedTiming().duration;if($.pending||$.playState==="finished")return;if(typeof K=="number"&&typeof Y=="number"&&Y<K)return $.currentTime=K,()=>{$.currentTime=Y}});if(Z.length>0)return()=>Z.forEach(($)=>$==null?void 0:$())}var xJ=class extends HJ{constructor(J,Q={}){var Z,$,q,Y;let{frameTransform:K=$Q(J),ignoreTransforms:X,getBoundingClientRect:W=aZ}=Q,U=FY(J,{properties:["transform","translate","scale","width","height"],isValidTarget:(w)=>(w!==J||tZ())&&w.contains(J)}),B=W(J),{top:H,left:V,width:L,height:M}=B,F,A=DJ(J),I=KZ(A),N={x:(Z=I==null?void 0:I.scaleX)!=null?Z:1,y:($=I==null?void 0:I.scaleY)!=null?$:1},z=zY(J,A);if(U==null||U(),I){if(F=LY(B,I,A.transformOrigin),X||z)H=F.top,V=F.left,L=F.width,M=F.height}let G={width:(q=F==null?void 0:F.width)!=null?q:L,height:(Y=F==null?void 0:F.height)!=null?Y:M};if(z&&!X&&F){let w=NY(F,z,A.transformOrigin);H=w.top,V=w.left,L=w.width,M=w.height,N.x=z.scaleX,N.y=z.scaleY}if(K){if(!X)V*=K.scaleX,L*=K.scaleX,H*=K.scaleY,M*=K.scaleY;V+=K.x,H+=K.y}super(V,H,L,M);this.scale=N,this.intrinsicWidth=G.width,this.intrinsicHeight=G.height}};function zY(J,Q){let Z=J.getAnimations();if(!Z.length)return null;let $,q,Y,K=!1;for(let X of Z){if(X.playState!=="running")continue;let W=nZ(X.effect)?X.effect.getKeyframes():[],U=W[W.length-1];if(!U)continue;let{transform:B,translate:H,scale:V}=U;if(typeof B==="string"&&B)$=B,K=!0;if(typeof H==="string"&&H)q=H,K=!0;if(typeof V==="string"&&V)Y=V,K=!0}if(!K)return null;return KZ({transform:$!=null?$:Q.transform,translate:q!=null?q:Q.translate,scale:Y!=null?Y:Q.scale})}function EQ(J){return"style"in J&&typeof J.style==="object"&&J.style!==null&&"setProperty"in J.style&&"removeProperty"in J.style&&typeof J.style.setProperty==="function"&&typeof J.style.removeProperty==="function"}var E2=class{constructor(J){this.element=J,this.initial=new Map}set(J,Q=""){let{element:Z}=this;if(!EQ(Z))return;for(let[$,q]of Object.entries(J)){let Y=`${Q}${$}`;if(!this.initial.has(Y))this.initial.set(Y,Z.style.getPropertyValue(Y));Z.style.setProperty(Y,typeof q==="string"?q:`${q}px`)}}remove(J,Q=""){let{element:Z}=this;if(!EQ(Z))return;for(let $ of J){let q=`${Q}${$}`;Z.style.removeProperty(q)}}reset(){let{element:J}=this;if(!EQ(J))return;for(let[Q,Z]of this.initial)J.style.setProperty(Q,Z);if(J.getAttribute("style")==="")J.removeAttribute("style")}};function bJ(J){if(!J)return!1;return J instanceof BJ(J).Element||qZ(J)&&J.nodeType===Node.ELEMENT_NODE}function Z0(J){if(!J)return!1;let{KeyboardEvent:Q}=BJ(J.target);return J instanceof Q}function S2(J){if(!J)return!1;let{PointerEvent:Q}=BJ(J.target);return J instanceof Q}function k2(J){if(!bJ(J))return!1;let{tagName:Q}=J;return Q==="INPUT"||Q==="TEXTAREA"||wY(J)}function wY(J){return J.hasAttribute("contenteditable")&&J.getAttribute("contenteditable")!=="false"}var P1={};function $0(J){let Q=P1[J]==null?0:P1[J]+1;return P1[J]=Q,`${J}-${Q}`}var AY=({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=e.distance(Q.shape.center,Z);return{id:$,value:1/q,type:RJ.PointerIntersection,priority:CJ.High}}return null},IY=({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=e.distance(Q.shape.center,q.current),X=$/(Z.current.area+Q.shape.area-$)/Y;return{id:Q.id,value:X,type:RJ.ShapeIntersection,priority:CJ.Normal}}return null},x2=(J)=>{var Q;return(Q=AY(J))!=null?Q:IY(J)},pX=(J)=>{let{dragOperation:Q,droppable:Z}=J,{shape:$,position:q}=Q;if(!Z.shape)return null;let Y=$?HJ.from($.current.boundingRectangle).corners:void 0,X=HJ.from(Z.shape.boundingRectangle).corners.reduce((W,U,B)=>{var H;return W+e.distance(e.from(U),(H=Y==null?void 0:Y[B])!=null?H:q.current)},0)/4;return{id:Z.id,value:1/X,type:RJ.Collision,priority:CJ.Normal}};var{create:jY,defineProperty:t1,defineProperties:CY,getOwnPropertyDescriptor:RY,getOwnPropertyDescriptors:DY,getOwnPropertySymbols:X0}=Object,p2=Object.prototype.hasOwnProperty,d2=Object.prototype.propertyIsEnumerable,_2=(J,Q)=>(Q=Symbol[J])?Q:Symbol.for("Symbol."+J),gQ=(J)=>{throw TypeError(J)},p1=(J,Q,Z)=>(Q in J)?t1(J,Q,{enumerable:!0,configurable:!0,writable:!0,value:Z}):J[Q]=Z,VZ=(J,Q)=>{for(var Z in Q||(Q={}))if(p2.call(Q,Z))p1(J,Z,Q[Z]);if(X0){for(var Z of X0(Q))if(d2.call(Q,Z))p1(J,Z,Q[Z])}return J},e1=(J,Q)=>CY(J,DY(Q)),h2=(J,Q)=>t1(J,"name",{value:Q,configurable:!0}),c2=(J,Q)=>{var Z={};for(var $ in J)if(p2.call(J,$)&&Q.indexOf($)<0)Z[$]=J[$];if(J!=null&&X0){for(var $ of X0(J))if(Q.indexOf($)<0&&d2.call(J,$))Z[$]=J[$]}return Z},uQ=(J)=>{var Q;return[,,,jY((Q=J==null?void 0:J[_2("metadata")])!=null?Q:null)]},l2=["class","method","getter","setter","accessor","field","value","get","set"],WZ=(J)=>J!==void 0&&typeof J!=="function"?gQ("Function expected"):J,OY=(J,Q,Z,$,q)=>({kind:l2[J],name:Q,metadata:$,addInitializer:(Y)=>Z._?gQ("Already initialized"):q.push(WZ(Y||null))}),HQ=(J,Q)=>p1(Q,_2("metadata"),J[3]),l=(J,Q,Z,$)=>{for(var q=0,Y=J[Q>>1],K=Y&&Y.length;q<K;q++)Q&1?Y[q].call(Z):$=Y[q].call(Z,$);return $},MJ=(J,Q,Z,$,q,Y)=>{var K,X,W,U,B,H=Q&7,V=!!(Q&8),L=!!(Q&16),M=H>3?J.length+1:H?V?1:2:0,F=l2[H+5],A=H>3&&(J[M-1]=[]),I=J[M]||(J[M]=[]),N=H&&(!L&&!V&&(q=q.prototype),H<5&&(H>3||!L)&&RY(H<4?q:{get[Z](){return x(this,Y)},set[Z](G){return qJ(this,Y,G)}},Z));H?L&&H<4&&h2(Y,(H>2?"set ":H>1?"get ":"")+Z):h2(q,Z);for(var z=$.length-1;z>=0;z--){if(U=OY(H,Z,W={},J[3],I),H){if(U.static=V,U.private=L,B=U.access={has:L?(G)=>TY(q,G):(G)=>(Z in G)},H^3)B.get=L?(G)=>(H^1?x:KQ)(G,q,H^4?Y:N.get):(G)=>G[Z];if(H>2)B.set=L?(G,w)=>qJ(G,q,w,H^4?Y:N.set):(G,w)=>G[Z]=w}if(X=(0,$[z])(H?H<4?L?Y:N[F]:H>4?void 0:{get:N.get,set:N.set}:q,U),W._=1,H^4||X===void 0)WZ(X)&&(H>4?A.unshift(X):H?L?Y=X:N[F]=X:q=X);else if(typeof X!=="object"||X===null)gQ("Object expected");else WZ(K=X.get)&&(N.get=K),WZ(K=X.set)&&(N.set=K),WZ(K=X.init)&&A.unshift(K)}return H||HQ(J,q),N&&t1(q,Z,N),L?H^4?Y:N:q},J9=(J,Q,Z)=>Q.has(J)||gQ("Cannot "+Z),TY=(J,Q)=>Object(Q)!==Q?gQ('Cannot use the "in" operator on this value'):J.has(Q),x=(J,Q,Z)=>(J9(J,Q,"read from private field"),Z?Z.call(J):Q.get(J)),m=(J,Q,Z)=>Q.has(J)?gQ("Cannot add the same private member more than once"):Q instanceof WeakSet?Q.add(J):Q.set(J,Z),qJ=(J,Q,Z,$)=>(J9(J,Q,"write to private field"),$?$.call(J,Z):Q.set(J,Z),Z),KQ=(J,Q,Z)=>(J9(J,Q,"access private method"),Z),y2={role:"button",roleDescription:"draggable"},PY="dnd-kit-description",EY="dnd-kit-announcement",SY={draggable:"To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item in a given direction. Press space again to drop the item in its new position, or press escape to cancel."},kY={dragstart({operation:{source:J}}){if(!J)return;return`Picked up draggable item ${J.id}.`},dragover({operation:{source:J,target:Q}}){if(!J||J.id===(Q==null?void 0:Q.id))return;if(Q)return`Draggable item ${J.id} was moved over droppable target ${Q.id}.`;return`Draggable item ${J.id} is no longer over a droppable target.`},dragend({operation:{source:J,target:Q},canceled:Z}){if(!J)return;if(Z)return`Dragging was cancelled. Draggable item ${J.id} was dropped.`;if(Q)return`Draggable item ${J.id} was dropped over droppable target ${Q.id}`;return`Draggable item ${J.id} was dropped.`}};function xY(J){let Q=J.tagName.toLowerCase();return["input","select","textarea","a","button"].includes(Q)}function hY(J,Q){let Z=document.createElement("div");return Z.id=J,Z.style.setProperty("display","none"),Z.textContent=Q,Z}function yY(J){let Q=document.createElement("div");return Q.id=J,Q.setAttribute("role","status"),Q.setAttribute("aria-live","polite"),Q.setAttribute("aria-atomic","true"),Q.style.setProperty("position","fixed"),Q.style.setProperty("width","1px"),Q.style.setProperty("height","1px"),Q.style.setProperty("margin","-1px"),Q.style.setProperty("border","0"),Q.style.setProperty("padding","0"),Q.style.setProperty("overflow","hidden"),Q.style.setProperty("clip","rect(0 0 0 0)"),Q.style.setProperty("clip-path","inset(100%)"),Q.style.setProperty("white-space","nowrap"),Q}var fY=["dragover","dragmove"],vY=class extends $J{constructor(J,Q){super(J);let{id:Z,idPrefix:{description:$=PY,announcement:q=EY}={},announcements:Y=kY,screenReaderInstructions:K=SY,debounce:X=500}=Q!=null?Q:{},W=Z?`${$}-${Z}`:$0($),U=Z?`${q}-${Z}`:$0(q),B,H,V,L,M=(w=L)=>{if(!V||!w)return;if((V==null?void 0:V.nodeValue)!==w)V.nodeValue=w},F=()=>XZ.schedule(M),A=bY(F,X),I=Object.entries(Y).map(([w,f])=>{return this.manager.monitor.addEventListener(w,(j,p)=>{let b=V;if(!b)return;let y=f==null?void 0:f(j,p);if(y&&b.nodeValue!==y)if(L=y,fY.includes(w))A();else F(),A.cancel()})}),N=()=>{let w=[];if(!(B==null?void 0:B.isConnected))B=hY(W,K.draggable),w.push(B);if(!(H==null?void 0:H.isConnected))H=yY(U),V=document.createTextNode(""),H.appendChild(V),w.push(H);if(w.length>0)document.body.append(...w)},z=new Set;function G(){for(let w of z)w()}this.registerEffect(()=>{var w;z.clear();for(let f of this.manager.registry.draggables.value){let j=(w=f.handle)!=null?w:f.element;if(j){if(!B||!H)z.add(N);if((!xY(j)||tZ())&&!j.hasAttribute("tabindex"))z.add(()=>j.setAttribute("tabindex","0"));if(!j.hasAttribute("role")&&j.tagName.toLowerCase()!=="button")z.add(()=>j.setAttribute("role",y2.role));if(!j.hasAttribute("aria-roledescription"))z.add(()=>j.setAttribute("aria-roledescription",y2.roleDescription));if(!j.hasAttribute("aria-describedby"))z.add(()=>j.setAttribute("aria-describedby",W));for(let b of["aria-pressed","aria-grabbed"]){let y=String(f.isDragging);if(j.getAttribute(b)!==y)z.add(()=>j.setAttribute(b,y))}let p=String(f.disabled);if(j.getAttribute("aria-disabled")!==p)z.add(()=>j.setAttribute("aria-disabled",p))}}if(z.size>0)XZ.schedule(G)}),this.destroy=()=>{super.destroy(),B==null||B.remove(),H==null||H.remove(),I.forEach((w)=>w())}}};function bY(J,Q){let Z,$=()=>{clearTimeout(Z),Z=setTimeout(J,Q)};return $.cancel=()=>clearTimeout(Z),$}var K0=new Map,s2,o2,i2,n2,d1,NZ,hJ,Q9,vQ,a2,r2,t2,e2,dJ=class extends(d1=PQ,n2=[T],i2=[h],o2=[h],s2=[h],d1){constructor(Q,Z){super(Q,Z);l(hJ,5,this),m(this,vQ),m(this,NZ,new Set),m(this,Q9,l(hJ,8,this,new Set)),l(hJ,11,this),this.registerEffect(KQ(this,vQ,a2))}register(Q){return x(this,NZ).add(Q),()=>{x(this,NZ).delete(Q)}}addRoot(Q){return O(()=>{let Z=new Set(this.additionalRoots);Z.add(Q),this.additionalRoots=Z}),()=>{O(()=>{let Z=new Set(this.additionalRoots);Z.delete(Q),this.additionalRoots=Z})}}get sourceRoot(){var Q;let{source:Z}=this.manager.dragOperation;return YZ((Q=Z==null?void 0:Z.element)!=null?Q:null)}get targetRoot(){var Q;let{target:Z}=this.manager.dragOperation;return YZ((Q=Z==null?void 0:Z.element)!=null?Q:null)}get roots(){let{status:Q}=this.manager.dragOperation;if(Q.initializing||Q.initialized){let Z=[this.sourceRoot,this.targetRoot].filter(($)=>$!=null);return new Set([...Z,...this.additionalRoots])}return new Set}};hJ=uQ(d1);NZ=new WeakMap;Q9=new WeakMap;vQ=new WeakSet;a2=function(){let{roots:J}=this,Q=[];for(let Z of J)for(let $ of x(this,NZ))Q.push(KQ(this,vQ,r2).call(this,Z,$));return()=>{for(let Z of Q)Z()}};r2=function(J,Q){let Z=K0.get(J);if(!Z)Z=new Map,K0.set(J,Z);let $=Z.get(Q);if(!$){let Y=rZ(J)?KQ(this,vQ,t2).call(this,J,Z,Q):KQ(this,vQ,e2).call(this,J,Z,Q);if(!Y)return()=>{};$=Y,Z.set(Q,$)}$.refCount++;let q=!1;return()=>{if(q)return;if(q=!0,$.refCount--,$.refCount===0)$.cleanup()}};t2=function(J,Q,Z){var $;let q=J.createElement("style"),{nonce:Y}=($=this.options)!=null?$:{};if(Y)q.setAttribute("nonce",Y);q.textContent=Z,J.head.prepend(q);let K=new MutationObserver((X)=>{for(let W of X)for(let U of Array.from(W.removedNodes))if(U===q){J.head.prepend(q);return}});return K.observe(J.head,{childList:!0}),{refCount:0,cleanup:()=>{if(K.disconnect(),q.remove(),Q.delete(Z),Q.size===0)K0.delete(J)}}};e2=function(J,Q,Z){"adoptedStyleSheets"in J&&Array.isArray(J.adoptedStyleSheets);let $=J.ownerDocument.defaultView,{CSSStyleSheet:q}=$!=null?$:{};if(!q)return null;let Y=new q;return Y.replaceSync(Z),J.adoptedStyleSheets.push(Y),{refCount:0,cleanup:()=>{var K;if(eZ(J)&&((K=J.host)==null?void 0:K.isConnected)){let X=J.adoptedStyleSheets.indexOf(Y);if(X!==-1)J.adoptedStyleSheets.splice(X,1)}if(Q.delete(Z),Q.size===0)K0.delete(J)}}};MJ(hJ,4,"additionalRoots",n2,dJ,Q9);MJ(hJ,2,"sourceRoot",i2,dJ);MJ(hJ,2,"targetRoot",o2,dJ);MJ(hJ,2,"roots",s2,dJ);HQ(hJ,dJ);dJ.configure=TQ(dJ);var B0=dJ,gY=class extends $J{constructor(J,Q){super(J,Q);this.manager=J;let{cursor:Z="grabbing"}=Q!=null?Q:{},$=J.registry.plugins.get(B0),q=$==null?void 0:$.register(`* { cursor: ${Z} !important; }`);if(q){let Y=this.destroy.bind(this);this.destroy=()=>{q(),Y()}}}},zZ="data-dnd-",_1=`${zZ}dropping`,n="--dnd-",OJ=`${zZ}dragging`,H0=`${zZ}placeholder`,uY=[OJ,H0,"popover","aria-pressed","aria-grabbing"],mY=["view-transition-name"],pY=`
|
|
9
|
+
:is(:root,:host) [${OJ}] {
|
|
10
|
+
position: fixed !important;
|
|
11
|
+
pointer-events: none !important;
|
|
12
|
+
touch-action: none;
|
|
13
|
+
z-index: calc(infinity);
|
|
14
|
+
will-change: translate;
|
|
15
|
+
top: var(${n}top, 0px) !important;
|
|
16
|
+
left: var(${n}left, 0px) !important;
|
|
17
|
+
right: unset !important;
|
|
18
|
+
bottom: unset !important;
|
|
19
|
+
width: var(${n}width, auto);
|
|
20
|
+
max-width: var(${n}width, auto);
|
|
21
|
+
height: var(${n}height, auto);
|
|
22
|
+
max-height: var(${n}height, auto);
|
|
23
|
+
transform: var(${n}transform, none) !important;
|
|
24
|
+
transition: var(${n}transition) !important;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
:is(:root,:host) [${H0}] {
|
|
28
|
+
transition: none;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
:is(:root,:host) [${H0}='hidden'] {
|
|
32
|
+
visibility: hidden;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
[${OJ}] * {
|
|
36
|
+
pointer-events: none !important;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
[${OJ}]:not([${_1}]) {
|
|
40
|
+
translate: var(${n}translate) !important;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
[${OJ}][style*='${n}scale'] {
|
|
44
|
+
scale: var(${n}scale) !important;
|
|
45
|
+
transform-origin: var(${n}transform-origin) !important;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@layer dnd-kit {
|
|
49
|
+
:where([${OJ}][popover]) {
|
|
50
|
+
overflow: visible;
|
|
51
|
+
background: unset;
|
|
52
|
+
border: unset;
|
|
53
|
+
margin: unset;
|
|
54
|
+
padding: unset;
|
|
55
|
+
color: inherit;
|
|
56
|
+
|
|
57
|
+
&:is(input, button) {
|
|
58
|
+
border: revert;
|
|
59
|
+
background: revert;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
[${OJ}]::backdrop, [${zZ}overlay]:not([${OJ}]) {
|
|
64
|
+
display: none;
|
|
65
|
+
visibility: hidden;
|
|
66
|
+
}
|
|
67
|
+
`.replace(/\n+/g," ").replace(/\s+/g," ").trim();function dY(J,Q="hidden"){return O(()=>{let{element:Z,manager:$}=J;if(!Z||!$)return;let q=_Y(Z,$.registry.droppables),Y=[],K=M2(Z),{remove:X}=K;return cY(q,K,Y),lY(K,Q),K.remove=()=>{Y.forEach((W)=>W()),X.call(K)},K})}function _Y(J,Q){let Z=new Map;for(let $ of Q){if(!$.element)continue;if(J===$.element||J.contains($.element)){let q=`${zZ}${$0("dom-id")}`;$.element.setAttribute(q,""),Z.set($,q)}}return Z}function cY(J,Q,Z){for(let[$,q]of J){if(!$.element)continue;let Y=`[${q}]`,K=Q.matches(Y)?Q:Q.querySelector(Y);if($.element.removeAttribute(q),!K)continue;let X=$.element;$.proxy=K,K.removeAttribute(q),v1.set(X,K),Z.push(()=>{v1.delete(X),$.proxy=void 0})}}function lY(J,Q="hidden"){J.setAttribute("inert","true"),J.setAttribute("tab-index","-1"),J.setAttribute("aria-hidden","true"),J.setAttribute(H0,Q)}function J$(J,Q){if(J===Q)return!0;return eJ(J)===eJ(Q)}function f2(J){let{target:Q}=J;if("newState"in J&&J.newState==="closed"&&bJ(Q)&&Q.hasAttribute("popover"))requestAnimationFrame(()=>ZQ(Q))}function c1(J){return J.tagName==="TR"}function sY(J,Q,Z){let $=new MutationObserver((q)=>{let Y=!1;for(let K of q){if(K.target!==J){Y=!0;continue}if(K.type!=="attributes")continue;let X=K.attributeName;if(X.startsWith("aria-")||uY.includes(X))continue;let W=J.getAttribute(X);if(X==="style"){if(EQ(J)&&EQ(Q)){let U=J.style;for(let B of Array.from(Q.style))if(U.getPropertyValue(B)==="")Q.style.removeProperty(B);for(let B of Array.from(U)){if(mY.includes(B)||B.startsWith(n))continue;let H=U.getPropertyValue(B);Q.style.setProperty(B,H)}}}else if(W!==null)Q.setAttribute(X,W);else Q.removeAttribute(X)}if(Y&&Z)Q.replaceChildren(...J.cloneNode(!0).childNodes)});return $.observe(J,{attributes:!0,subtree:!0,childList:!0}),$}function oY(J,Q,Z){let $=new MutationObserver((q)=>{for(let Y of q){if(Y.addedNodes.length===0)continue;for(let K of Array.from(Y.addedNodes)){if(K.contains(J)&&J.nextElementSibling!==Q){J.insertAdjacentElement("afterend",Q),ZQ(Z);return}if(K.contains(Q)&&Q.previousElementSibling!==J){Q.insertAdjacentElement("beforebegin",J),ZQ(Z);return}}}if(J.isConnected&&Q.isConnected&&J.nextElementSibling!==Q)J.insertAdjacentElement("afterend",Q),ZQ(Z)});return $.observe(J.ownerDocument.body,{childList:!0,subtree:!0}),$}function iY(J){return new ResizeObserver(()=>{var Q,Z,$;let q=new xJ(J.placeholder,{frameTransform:J.frameTransform,ignoreTransforms:!0}),Y=(Q=J.transformOrigin)!=null?Q:{x:1,y:1},K=(J.width-q.width)*Y.x+J.delta.x,X=(J.height-q.height)*Y.y+J.delta.y,W=h1();if(J.styles.set({width:q.width-J.widthOffset,height:q.height-J.heightOffset,top:J.top+X+W.y,left:J.left+K+W.x},n),(Z=J.getElementMutationObserver())==null||Z.takeRecords(),c1(J.element)&&c1(J.placeholder)){let F=Array.from(J.element.cells),A=Array.from(J.placeholder.cells);if(!J.getSavedCellWidths())J.setSavedCellWidths(F.map((I)=>I.style.width));for(let[I,N]of F.entries()){let z=A[I];N.style.width=`${z.getBoundingClientRect().width}px`}}let U=($=J.getTranslate())!=null?$:{x:0,y:0},B=J.left+K+W.x+U.x,H=J.top+X+W.y+U.y,V=q.width-J.widthOffset,L=q.height-J.heightOffset,M=J.frameTransform;J.dragOperation.shape=new HJ(B*M.scaleX+M.x,H*M.scaleY+M.y,V*M.scaleX,L*M.scaleY)})}var nY=250,aY="ease";function rY(J){var Q,Z,$,q;let{animation:Y}=J;if(typeof Y==="function"){let N=Y({source:J.source,element:J.element,feedbackElement:J.feedbackElement,placeholder:J.placeholder,translate:J.translate,moved:J.moved});Promise.resolve(N).then(()=>{J.cleanup(),requestAnimationFrame(J.restoreFocus)});return}let{duration:K=nY,easing:X=aY}=Y!=null?Y:{};ZQ(J.feedbackElement);let[,W]=(Q=k1(J.feedbackElement,(N)=>("translate"in N)))!=null?Q:[];W==null||W.pause();let U=(Z=J.placeholder)!=null?Z:J.element,B={frameTransform:J$(J.feedbackElement,U)?null:void 0},H=new xJ(J.feedbackElement,B),V=($=SQ(DJ(J.feedbackElement).translate))!=null?$:J.translate,L=new xJ(U,B),M=HJ.delta(H,L,J.alignment),F={x:V.x-M.x,y:V.y-M.y},A=Math.round(H.intrinsicHeight)!==Math.round(L.intrinsicHeight)?{minHeight:[`${H.intrinsicHeight}px`,`${L.intrinsicHeight}px`],maxHeight:[`${H.intrinsicHeight}px`,`${L.intrinsicHeight}px`]}:{},I=Math.round(H.intrinsicWidth)!==Math.round(L.intrinsicWidth)?{minWidth:[`${H.intrinsicWidth}px`,`${L.intrinsicWidth}px`],maxWidth:[`${H.intrinsicWidth}px`,`${L.intrinsicWidth}px`]}:{};J.styles.set({transition:J.transition},n),J.feedbackElement.setAttribute(_1,""),(q=J.getElementMutationObserver())==null||q.takeRecords(),P2({element:J.feedbackElement,keyframes:e1(VZ(VZ({},A),I),{translate:[`${V.x}px ${V.y}px 0`,`${F.x}px ${F.y}px 0`]}),options:{duration:y1(BJ(J.feedbackElement))?0:J.moved||J.feedbackElement!==J.element?K:0,easing:X}}).then(()=>{J.feedbackElement.removeAttribute(_1),W==null||W.finish(),J.cleanup(),requestAnimationFrame(J.restoreFocus)})}var Q$,l1,GZ,Z9,Y0,Z$,$$,bQ=class extends(l1=$J,Q$=[T],l1){constructor(Q,Z){super(Q,Z);m(this,Y0),m(this,Z9,l(GZ,8,this)),l(GZ,11,this),this.state={initial:{},current:{}};let $=Q.registry.plugins.get(B0),q=$==null?void 0:$.register(pY);if(q){let Y=this.destroy.bind(this);this.destroy=()=>{q(),Y()}}this.registerEffect(KQ(this,Y0,Z$).bind(this,$)),this.registerEffect(KQ(this,Y0,$$))}};GZ=uQ(l1);Z9=new WeakMap;Y0=new WeakSet;Z$=function(J){let{overlay:Q}=this;if(!Q||!J)return;let Z=YZ(Q);if(!Z)return;return J.addRoot(Z)};$$=function(){var J,Q,Z,$,q,Y,K;let{state:X,manager:W,options:U}=this,{dragOperation:B}=W,{position:H,source:V,status:L}=B;if(L.idle){X.current={},X.initial={};return}if(!V)return;let{element:M}=V,F=V.pluginConfig(bQ),A=(Q=(J=F==null?void 0:F.feedback)!=null?J:U==null?void 0:U.feedback)!=null?Q:"default",I=typeof A==="function"?A(V,W):A;if(!M||I==="none"||!L.initialized||L.initializing)return;let{initial:N}=X,z=(Z=this.overlay)!=null?Z:M,G=$Q(z),w=$Q(M),f=!J$(M,z),j=new xJ(M,{frameTransform:f?w:null,ignoreTransforms:!f}),p={x:w.scaleX/G.scaleX,y:w.scaleY/G.scaleY},{width:b,height:y,top:LQ,left:s}=j;if(f)b=b/p.x,y=y/p.y;let v=new E2(z),I0=DJ(M),{transition:F9,translate:z9,boxSizing:g$,paddingBlockStart:u$,paddingBlockEnd:m$,paddingInlineStart:p$,paddingInlineEnd:d$,borderInlineStartWidth:_$,borderInlineEndWidth:c$,borderBlockStartWidth:l$,borderBlockEndWidth:s$}=I0,IZ=F9.split(",").filter((S)=>!/^\s*(transform|translate|scale)\b/.test(S)).join(","),_J=KZ(I0),o$=I0.transform,w9=I==="clone",A9=g$==="content-box",I9=A9?parseInt(p$)+parseInt(d$)+parseInt(_$)+parseInt(c$):0,j9=A9?parseInt(u$)+parseInt(m$)+parseInt(l$)+parseInt(s$):0,XJ=I!=="move"&&!this.overlay?dY(V,w9?"clone":"hidden"):null,j0=O(()=>Z0(W.dragOperation.activatorEvent));if(!N.translate){if(this.overlay&&_J)N.translate={x:_J.x,y:_J.y};else if(z9!=="none"){let S=SQ(z9);if(S)N.translate=S}}if(!N.transformOrigin){let S=O(()=>H.current),_=s+(($=_J==null?void 0:_J.x)!=null?$:0),KJ=LQ+((q=_J==null?void 0:_J.y)!=null?q:0);N.transformOrigin={x:(S.x-_*G.scaleX-G.x)/(b*G.scaleX),y:(S.y-KJ*G.scaleY-G.y)/(y*G.scaleY)}}let{transformOrigin:VQ}=N,C9=LQ*G.scaleY+G.y,R9=s*G.scaleX+G.x;if(!N.coordinates){if(N.coordinates={x:R9,y:C9},p.x!==1||p.y!==1){let{scaleX:S,scaleY:_}=w,{x:KJ,y:yJ}=VQ;N.coordinates.x+=(b*S-b)*KJ,N.coordinates.y+=(y*_-y)*yJ}}if(!N.dimensions)N.dimensions={width:b,height:y};if(!N.frameTransform)N.frameTransform=G;let D9={x:N.coordinates.x-R9,y:N.coordinates.y-C9},O9={width:(N.dimensions.width*N.frameTransform.scaleX-b*G.scaleX)*VQ.x,height:(N.dimensions.height*N.frameTransform.scaleY-y*G.scaleY)*VQ.y},C0={x:D9.x/G.scaleX+O9.width,y:D9.y/G.scaleY+O9.height},T9={left:s+C0.x,top:LQ+C0.y};z.setAttribute(OJ,"true");let P9=O(()=>B.transform),E9=(Y=N.translate)!=null?Y:{x:0,y:0},i$=P9.x*G.scaleX+E9.x,n$=P9.y*G.scaleY+E9.y,S9=h1();if(v.set({width:b-I9,height:y-j9,top:T9.top+S9.y,left:T9.left+S9.x,translate:`${i$}px ${n$}px 0`,transform:this.overlay?"none":o$,transition:IZ?`${IZ}, translate 0ms linear`:"translate 0ms linear",scale:f?`${p.x} ${p.y}`:"","transform-origin":`${VQ.x*100}% ${VQ.y*100}%`},n),XJ){if(M.insertAdjacentElement("afterend",XJ),U==null?void 0:U.rootElement)(typeof U.rootElement==="function"?U.rootElement(V):U.rootElement).appendChild(M)}if(J0(z)){if(!z.hasAttribute("popover"))z.setAttribute("popover","manual");ZQ(z),z.addEventListener("beforetoggle",f2)}let cJ,R0,jZ,k9=iY({placeholder:XJ,element:M,feedbackElement:z,frameTransform:G,transformOrigin:VQ,width:b,height:y,top:LQ,left:s,widthOffset:I9,heightOffset:j9,delta:C0,styles:v,dragOperation:B,getTranslate:()=>X.current.translate,getElementMutationObserver:()=>cJ,getSavedCellWidths:()=>jZ,setSavedCellWidths:(S)=>{jZ=S}}),x9=new xJ(z);O(()=>B.shape=x9);let D0=BJ(z),h9=(S)=>{this.manager.actions.stop({event:S})},a$=y1(D0);if(j0)D0.addEventListener("resize",h9);if(O(()=>V.status)==="idle")requestAnimationFrame(()=>V.status="dragging");if(XJ)k9.observe(XJ),cJ=sY(M,XJ,w9),R0=oY(M,XJ,z);let y9=(K=W.dragOperation.source)==null?void 0:K.id,r$=()=>{var S;if(!j0||y9==null)return;let _=W.registry.draggables.get(y9),KJ=(S=_==null?void 0:_.handle)!=null?S:_==null?void 0:_.element;if(kJ(KJ))KJ.focus()},O0=()=>{var S;if(cJ==null||cJ.disconnect(),R0==null||R0.disconnect(),k9.disconnect(),D0.removeEventListener("resize",h9),J0(z))z.removeEventListener("beforetoggle",f2),z.removeAttribute("popover");if(z.removeAttribute(OJ),v.reset(),jZ&&c1(M)){let yJ=Array.from(M.cells);for(let[T0,CZ]of yJ.entries())CZ.style.width=(S=jZ[T0])!=null?S:""}V.status="idle";let _=X.current.translate!=null,KJ=B.status.dragging;if(XJ&&(!KJ&&_||XJ.parentElement!==z.parentElement)&&z.isConnected)XJ.replaceWith(z);XJ==null||XJ.remove()},t$=U==null?void 0:U.dropAnimation,f9=this,e$=iJ(()=>{var S,_,KJ;let{transform:yJ,status:T0}=B;if(!yJ.x&&!yJ.y&&!X.current.translate)return;if(T0.dragging){let CZ=(S=N.translate)!=null?S:{x:0,y:0},RZ={x:yJ.x/G.scaleX+CZ.x,y:yJ.y/G.scaleY+CZ.y},v9=X.current.translate,Jq=O(()=>B.modifiers),P0=O(()=>{var pQ;return(pQ=B.shape)==null?void 0:pQ.current}),mQ=U==null?void 0:U.keyboardTransition,b9=j0&&!a$&&mQ!==null?`${(_=mQ==null?void 0:mQ.duration)!=null?_:250}ms ${(KJ=mQ==null?void 0:mQ.easing)!=null?KJ:"cubic-bezier(0.25, 1, 0.5, 1)"}`:"0ms linear";if(v.set({transition:IZ?`${IZ}, translate ${b9}`:`translate ${b9}`,translate:`${RZ.x}px ${RZ.y}px 0`},n),cJ==null||cJ.takeRecords(),P0&&P0!==x9&&v9&&!Jq.length){let pQ=e.delta(RZ,v9);B.shape=HJ.from(P0.boundingRectangle).translate(pQ.x*G.scaleX,pQ.y*G.scaleY)}else B.shape=new xJ(z);X.current.translate=RZ}},function(){if(B.status.dropped){this.dispose(),V.status="dropping";let S=(F==null?void 0:F.dropAnimation)!==void 0?F.dropAnimation:f9.dropAnimation!==void 0?f9.dropAnimation:t$,_=X.current.translate,KJ=_!=null;if(!_&&M!==z)_={x:0,y:0};if(!_||S===null){O0();return}W.renderer.rendering.then(()=>{rY({source:V,element:M,feedbackElement:z,placeholder:XJ,translate:_,moved:KJ,transition:F9,alignment:V.alignment,styles:v,animation:S!=null?S:void 0,getElementMutationObserver:()=>cJ,cleanup:O0,restoreFocus:r$})})}});return()=>{O0(),e$()}};MJ(GZ,4,"overlay",Q$,bQ,Z9);HQ(GZ,bQ);bQ.configure=TQ(bQ);var N0=bQ,HZ=!0,tY=!1,q$,Y$,X$,K$,uJ,$9,q9;K$=(X$=[T],NJ.Forward),Y$=(q$=[T],NJ.Reverse);var MZ=class{constructor(){m(this,$9,l(uJ,8,this,HZ)),l(uJ,11,this),m(this,q9,l(uJ,12,this,HZ)),l(uJ,15,this)}isLocked(J){if(J===NJ.Idle)return!1;if(J==null)return this[NJ.Forward]===HZ&&this[NJ.Reverse]===HZ;return this[J]===HZ}unlock(J){if(J===NJ.Idle)return;this[J]=tY}};uJ=uQ(null);$9=new WeakMap;q9=new WeakMap;MJ(uJ,4,K$,X$,MZ,$9);MJ(uJ,4,Y$,q$,MZ,q9);HQ(uJ,MZ);var eY=[NJ.Forward,NJ.Reverse],v2=class{constructor(){this.x=new MZ,this.y=new MZ}isLocked(){return this.x.isLocked()&&this.y.isLocked()}},J5=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)},K=Q.peek();JJ(()=>{for(let X of e0)for(let W of eY)if(Y[X]===W)K[X].unlock(W);Q.value=K})}Z=q})}get current(){return this.signal.peek()}};function b2(J,Q){return Math.sign(J-Q)}var H$,s1,FZ,Y9,gJ,o1,L0=class extends(s1=PQ,H$=[T],s1){constructor(J){super(J);m(this,Y9,l(FZ,8,this,!1)),l(FZ,11,this),m(this,gJ),m(this,o1,()=>{if(!x(this,gJ))return;let{element:Y,by:K}=x(this,gJ);if(K.y)Y.scrollTop+=K.y;if(K.x)Y.scrollLeft+=K.x}),this.scroll=(Y,K)=>{var X;if(this.disabled)return!1;let W=this.getScrollableElements();if(!W)return qJ(this,gJ,void 0),!1;let{position:U}=this.manager.dragOperation,B=U==null?void 0:U.current;if(B){let{by:H}=Y!=null?Y:{},V=H?{x:g2(H.x),y:g2(H.y)}:void 0,L=V?void 0:this.scrollIntentTracker.current;if(L==null?void 0:L.isLocked())return!1;for(let M of W){let F=D2(M,H);if(F.x||F.y){let{speed:A,direction:I}=O2(M,B,V,K==null?void 0:K.acceleration,K==null?void 0:K.threshold);if(L){for(let N of e0)if(L[N].isLocked(I[N]))A[N]=0,I[N]=0}if(I.x||I.y){let{x:N,y:z}=H!=null?H:I,G=N*A.x,w=z*A.y;if(G||w){let f=(X=x(this,gJ))==null?void 0:X.by;if(this.autoScrolling&&f){if(f.x&&!G||f.y&&!w)continue}return qJ(this,gJ,{element:M,by:{x:G,y:w}}),XZ.schedule(x(this,o1)),!0}}}}}return qJ(this,gJ,void 0),!1};let Q=null,Z=null,$=zQ(()=>{let{position:Y,source:K}=J.dragOperation;if(!Y)return null;let X=f1(YZ(K==null?void 0:K.element),Y.current);if(X)Q=X;return X!=null?X:Q}),q=zQ(()=>{let Y=$.value,{documentElement:K}=JQ(Y);if(!Y||Y===K){let{target:X}=J.dragOperation,W=X==null?void 0:X.element;if(W){let U=Q0(W,{excludeElement:!1});return Z=U,U}}if(Y){let X=Q0(Y,{excludeElement:!1});if(this.autoScrolling&&Z&&X.size<(Z==null?void 0:Z.size))return Z;return Z=X,X}return Z=null,null},PJ);this.getScrollableElements=()=>{return q.value},this.scrollIntentTracker=new J5(J),this.destroy=J.monitor.addEventListener("dragmove",(Y)=>{if(this.disabled||Y.defaultPrevented||!Z0(J.dragOperation.activatorEvent)||!Y.by)return;if(this.scroll({by:Y.by}))Y.preventDefault()})}};FZ=uQ(s1);Y9=new WeakMap;gJ=new WeakMap;o1=new WeakMap;MJ(FZ,4,"autoScrolling",H$,L0,Y9);HQ(FZ,L0);function g2(J){if(J>0)return NJ.Forward;if(J<0)return NJ.Reverse;return NJ.Idle}var Q5=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))}},Z5=new Q5((J)=>{if(typeof requestAnimationFrame==="function")requestAnimationFrame(J);else J()}),$5=10,i1=class extends $J{constructor(Q,Z){super(Q,Z);let $=Q.registry.plugins.get(L0);if(!$)throw Error("AutoScroller plugin depends on Scroller plugin");this.destroy=o(()=>{var q,Y,K;if(this.disabled)return;let{position:X,status:W}=Q.dragOperation;if(W.dragging){let U={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}:(K=this.options)==null?void 0:K.threshold};if($.scroll(void 0,U)){$.autoScrolling=!0;let H=setInterval(()=>Z5.schedule(()=>$.scroll(void 0,U)),$5);return()=>{clearInterval(H)}}else $.autoScrolling=!1}})}};i1.configure=TQ(i1);var W$=i1,u2={capture:!0,passive:!0},UZ,q5=class extends PQ{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 K=(q=($=(Z=Q.source)==null?void 0:Z.element)==null?void 0:$.ownerDocument)!=null?q:document;return K.addEventListener("scroll",this.handleScroll,u2),()=>{K.removeEventListener("scroll",this.handleScroll,u2)}}})}};UZ=new WeakMap;var Y5="* { user-select: none !important; -webkit-user-select: none !important; }",X5=class extends $J{constructor(J){super(J);this.manager=J;let Q=J.registry.plugins.get(B0),Z=Q==null?void 0:Q.register(Y5);if(this.destroy=o(()=>{let{dragOperation:$}=this.manager;if($.status.initialized)return u1(),document.addEventListener("selectionchange",u1,{capture:!0}),()=>{document.removeEventListener("selectionchange",u1,{capture:!0})}}),Z){let $=this.destroy.bind(this);this.destroy=()=>{Z(),$()}}}};function u1(){var J;(J=document.getSelection())==null||J.removeAllRanges()}var BZ=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!==$}}),xQ,W0=class extends nJ{constructor(Q,Z){super(Q);this.manager=Q,this.options=Z,m(this,xQ,[]),this.listeners=new b1,this.handleSourceKeyDown=($,q,Y)=>{if(this.disabled||$.defaultPrevented)return;if(!bJ($.target))return;if(q.disabled)return;let{keyboardCodes:K=BZ.keyboardCodes,preventActivation:X=BZ.preventActivation}=Y!=null?Y:{};if(!K.start.includes($.code))return;if(!this.manager.dragOperation.status.idle)return;if(X==null?void 0:X($,q))return;this.handleStart($,q,Y)}}bind(Q,Z=this.options){return o(()=>{var q;let Y=(q=Q.handle)!=null?q:Q.element,K=(X)=>{if(Z0(X))this.handleSourceKeyDown(X,Q,Z)};if(Y)return Y.addEventListener("keydown",K),()=>{Y.removeEventListener("keydown",K)}})}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 xJ(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 X=JQ(q),W=[this.listeners.bind(X,[{type:"keydown",listener:(U)=>this.handleKeyDown(U,Z,$),options:{capture:!0}}])];x(this,xQ).push(...W)}handleKeyDown(Q,Z,$){let{keyboardCodes:q=BZ.keyboardCodes}=$!=null?$:{};if(kQ(Q,[...q.end,...q.cancel])){Q.preventDefault();let Y=kQ(Q,q.cancel);this.handleEnd(Q,Y);return}if(kQ(Q,q.up))this.handleMove("up",Q);else if(kQ(Q,q.down))this.handleMove("down",Q);if(kQ(Q,q.left))this.handleMove("left",Q);else if(kQ(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,K=Z.shiftKey?5:1,X={x:0,y:0},W=(q=($=this.options)==null?void 0:$.offset)!=null?q:BZ.offset;if(typeof W==="number")W={x:W,y:W};if(!Y)return;switch(Q){case"up":X={x:0,y:-W.y*K};break;case"down":X={x:0,y:W.y*K};break;case"left":X={x:-W.x*K,y:0};break;case"right":X={x:W.x*K,y:0};break}if(X.x||X.y)Z.preventDefault(),this.manager.actions.move({event:Z,by:X})}sideEffects(){let Q=this.manager.registry.plugins.get(W$);if((Q==null?void 0:Q.disabled)===!1)Q.disable(),x(this,xQ).push(()=>{Q.enable()})}cleanup(){x(this,xQ).forEach((Q)=>Q()),qJ(this,xQ,[])}destroy(){this.cleanup(),this.listeners.clear()}};xQ=new WeakMap;W0.configure=TQ(W0);W0.defaults=BZ;var U$=W0;function kQ(J,Q){return Q.includes(J.code)}var qQ,K5=class extends j1{constructor(){super(...arguments);m(this,qQ)}onEvent(J){switch(J.type){case"pointerdown":qJ(this,qQ,QQ(J));break;case"pointermove":if(!x(this,qQ))return;let{x:Q,y:Z}=QQ(J),$={x:Q-x(this,qQ).x,y:Z-x(this,qQ).y},{tolerance:q}=this.options;if(q&&kZ($,q)){this.abort();return}if(kZ($,this.options.value))this.activate(J);break;case"pointerup":this.abort();break}}abort(){qJ(this,qQ,void 0)}};qQ=new WeakMap;var hQ,YQ,H5=class extends j1{constructor(){super(...arguments);m(this,hQ),m(this,YQ)}onEvent(J){switch(J.type){case"pointerdown":qJ(this,YQ,QQ(J)),qJ(this,hQ,setTimeout(()=>this.activate(J),this.options.value));break;case"pointermove":if(!x(this,YQ))return;let{x:Q,y:Z}=QQ(J),$={x:Q-x(this,YQ).x,y:Z-x(this,YQ).y};if(kZ($,this.options.tolerance))this.abort();break;case"pointerup":this.abort();break}}abort(){if(x(this,hQ))clearTimeout(x(this,hQ)),qJ(this,YQ,void 0),qJ(this,hQ,void 0)}};hQ=new WeakMap;YQ=new WeakMap;var fQ=class{};fQ.Delay=H5;fQ.Distance=K5;var n1=Object.freeze({activationConstraints(J,Q){var Z;let{pointerType:$,target:q}=J;if($==="mouse"&&bJ(q)&&(Q.handle===q||((Z=Q.handle)==null?void 0:Z.contains(q))))return;if($==="touch")return[new fQ.Delay({value:250,tolerance:5})];if(k2(q)&&!J.defaultPrevented)return[new fQ.Delay({value:200,tolerance:0})];return[new fQ.Delay({value:200,tolerance:10}),new fQ.Distance({value:5})]},preventActivation(J,Q){var Z;let{target:$}=J;if($===Q.element)return!1;if($===Q.handle)return!1;if(!bJ($))return!1;if((Z=Q.handle)==null?void 0:Z.contains($))return!1;return F2($)}}),yQ,U0=class extends nJ{constructor(Q,Z){super(Q);this.manager=Q,this.options=Z,m(this,yQ,new Set),this.listeners=new b1,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=n1.activationConstraints}=$!=null?$:{};return typeof q==="function"?q(Q,Z):q}bind(Q,Z=this.options){return o(()=>{var q;let Y=new AbortController,{signal:K}=Y,X=(U)=>{if(S2(U))this.handlePointerDown(U,Q,Z)},W=[(q=Q.handle)!=null?q:Q.element];if(Z==null?void 0:Z.activatorElements)if(Array.isArray(Z.activatorElements))W=Z.activatorElements;else W=Z.activatorElements(Q);for(let U of W){if(!U)continue;B5(U.ownerDocument.defaultView),U.addEventListener("pointerdown",X,{signal:K})}return()=>Y.abort()})}handlePointerDown(Q,Z,$){if(this.disabled||!Q.isPrimary||Q.button!==0||!bJ(Q.target)||Z.disabled||W5(Q)||!this.manager.dragOperation.status.idle)return;let{preventActivation:q=n1.preventActivation}=$!=null?$:{};if(q==null?void 0:q(Q,Z))return;let{target:Y}=Q,K=kJ(Y)&&Y.draggable&&Y.getAttribute("draggable")==="true",X=$Q(Z.element),{x:W,y:U}=QQ(Q);this.initialCoordinates={x:W*X.scaleX+X.x,y:U*X.scaleY+X.y};let B=this.activationConstraints(Q,Z,$);Q.sensor=this;let H=new n8(B,(F)=>this.handleStart(Z,F));H.signal.onabort=()=>this.handleCancel(Q),H.onEvent(Q),this.controller=H;let V=lZ(),L=this.listeners.bind(V,[{type:"pointermove",listener:(F)=>this.handlePointerMove(F,Z)},{type:"pointerup",listener:this.handlePointerUp,options:{capture:!0}},{type:"pointercancel",listener:this.handleCancel},{type:"dragstart",listener:K?this.handleCancel:q0,options:{capture:!0}}]),M=()=>{L(),this.initialCoordinates=void 0};x(this,yQ).add(M)}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=QQ(Q),K=$Q(Z.element);Y.x=Y.x*K.scaleX+K.x,Y.y=Y.y*K.scaleY+K.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 X=JQ(Z.target).body;try{X.setPointerCapture(Z.pointerId)}catch(B){this.handleCancel(Z);return}let W=bJ(Z.target)?[Z.target,X]:X,U=this.listeners.bind(W,[{type:"touchmove",listener:q0,options:{passive:!1}},{type:"click",listener:q0},{type:"contextmenu",listener:q0},{type:"keydown",listener:this.handleKeyDown}]);x(this,yQ).add(U)}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,yQ).forEach((Z)=>Z()),x(this,yQ).clear()}destroy(){this.cleanup(),this.listeners.clear()}};yQ=new WeakMap;U0.configure=TQ(U0);U0.defaults=n1;var B$=U0;function W5(J){return"sensor"in J}function q0(J){J.preventDefault()}function U5(){}var m2=new WeakSet;function B5(J){if(!J||m2.has(J))return;J.addEventListener("touchmove",U5,{capture:!1,passive:!1}),m2.add(J)}var XQ={modifiers:[],plugins:[vY,W$,gY,N0,X5],sensors:[B$,U$]},X9=class extends Y2{constructor(J={}){let Q=GJ(J.plugins,XQ.plugins),Z=GJ(J.sensors,XQ.sensors),$=GJ(J.modifiers,XQ.modifiers);super(e1(VZ({},J),{plugins:[q5,L0,B0,...Q],sensors:Z,modifiers:$}))}},N$,L$,a1,mJ,K9,H9,wZ=class extends(a1=zJ,L$=[T],N$=[T],a1){constructor(J,Q){var Z=J,{element:$,effects:q=()=>[],handle:Y}=Z,K=c2(Z,["element","effects","handle"]);super(VZ({effects:()=>[...q(),()=>{var X,W;let{manager:U}=this;if(!U)return;let H=((W=(X=this.sensors)==null?void 0:X.map(RQ))!=null?W:[...U.sensors]).map((V)=>{let L=V instanceof nJ?V:U.registry.register(V.plugin),M=V instanceof nJ?void 0:V.options;return L.bind(this,M)});return function(){H.forEach((L)=>L())}}]},K),Q);m(this,K9,l(mJ,8,this)),l(mJ,11,this),m(this,H9,l(mJ,12,this)),l(mJ,15,this),this.element=$,this.handle=Y}};mJ=uQ(a1);K9=new WeakMap;H9=new WeakMap;MJ(mJ,4,"handle",L$,wZ,K9);MJ(mJ,4,"element",N$,wZ,H9);HQ(mJ,wZ);var V$,G$,r1,pJ,W9,m1,M$,F$,LZ,U9,V0=class extends(r1=wJ,G$=[T],V$=[T],r1){constructor(J,Q){var Z=J,{element:$,effects:q=()=>[]}=Z,Y=c2(Z,["element","effects"]);let{collisionDetector:K=x2}=Y,X=(U)=>{let{manager:B,element:H}=this;if(!H||U===null){this.shape=void 0;return}if(!B)return;let V=new xJ(H),L=O(()=>this.shape);if(V&&(L==null?void 0:L.equals(V)))return L;return this.shape=V,V},W=IJ(!1);super(e1(VZ({},Y),{collisionDetector:K,effects:()=>[...q(),()=>{let{element:U,manager:B}=this;if(!B)return;let{dragOperation:H}=B,{source:V}=H;W.value=Boolean(V&&H.status.initialized&&U&&!this.disabled&&this.accepts(V))},()=>{let{element:U}=this;if(W.value&&U){let B=new C2(U,X);return()=>{B.disconnect(),this.shape=void 0}}},()=>{var U;if((U=this.manager)==null?void 0:U.dragOperation.status.initialized)return()=>{this.shape=void 0}}]}),Q);m(this,LZ),m(this,W9,l(pJ,8,this)),l(pJ,11,this),m(this,U9,l(pJ,12,this)),l(pJ,15,this),this.element=$,this.refreshShape=()=>X()}set element(J){qJ(this,LZ,J,F$)}get element(){var J;return(J=this.proxy)!=null?J:x(this,LZ,M$)}};pJ=uQ(r1);W9=new WeakMap;LZ=new WeakSet;U9=new WeakMap;m1=MJ(pJ,20,"#element",G$,LZ,W9),M$=m1.get,F$=m1.set;MJ(pJ,4,"proxy",V$,V0,U9);HQ(pJ,V0);var D=B9(z$(),1);var d=B9(z$(),1);var N9=B9(L5(),1);function N5(J){return J!=null&&typeof J==="object"&&"current"in J}function WQ(J){var Q;if(J==null)return;if(N5(J))return(Q=J.current)!=null?Q:void 0;return J}var V5=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",UQ=V5?d.useLayoutEffect:d.useEffect;function w$(){let J=d.useState(0)[1];return d.useCallback(()=>{J((Q)=>Q+1)},[J])}function G5(J,Q=!1){let Z=d.useRef(J.peek()),$=d.useRef(!1),q=w$();return UQ(()=>o(()=>{let Y=Z.current,K=J.value;if(Y!==K){if(Z.current=K,!$.current)return;if(Q)N9.flushSync(q);else q()}}),[J,Q,q]),{get value(){return $.current=!0,J.peek()}}}function A$(J,Q=[],Z=!1){let $=d.useRef(J);return $.current=J,G5(d.useMemo(()=>zQ(()=>$.current()),Q),Z)}function G0(J,Q){let Z=d.useRef(new Map),$=w$();return UQ(()=>{if(!J){Z.current.clear();return}return o(()=>{var q;let Y=!1,K=!1;for(let X of Z.current){let[W]=X,U=O(()=>X[1]),B=J[W];if(U!==B)Y=!0,Z.current.set(W,B),K=(q=Q==null?void 0:Q(W,U,B))!=null?q:!1}if(Y)if(K)queueMicrotask(()=>N9.flushSync($));else $()})},[J]),d.useMemo(()=>J?new Proxy(J,{get(q,Y){let K=q[Y];return Z.current.set(Y,K),K}}):J,[J])}function VK(J,Q){J()}function BQ(J){let Q=d.useRef(J);return UQ(()=>{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 M0(J,Q){let Z=d.useRef(WQ(J));UQ(()=>{let $=WQ(J);if($!==Z.current)Z.current=$,Q($)})}var{defineProperty:M5,defineProperties:F5,getOwnPropertyDescriptors:z5,getOwnPropertySymbols:w0}=Object,C$=Object.prototype.hasOwnProperty,R$=Object.prototype.propertyIsEnumerable,I$=(J,Q,Z)=>(Q in J)?M5(J,Q,{enumerable:!0,configurable:!0,writable:!0,value:Z}):J[Q]=Z,D$=(J,Q)=>{for(var Z in Q||(Q={}))if(C$.call(Q,Z))I$(J,Z,Q[Z]);if(w0){for(var Z of w0(Q))if(R$.call(Q,Z))I$(J,Z,Q[Z])}return J},O$=(J,Q)=>F5(J,z5(Q)),w5=(J,Q)=>{var Z={};for(var $ in J)if(C$.call(J,$)&&Q.indexOf($)<0)Z[$]=J[$];if(J!=null&&w0){for(var $ of w0(J))if(Q.indexOf($)<0&&R$.call(J,$))Z[$]=J[$]}return Z},A5=new X9,G9=D.createContext(A5),I5=D.memo(D.forwardRef(({children:J},Q)=>{let[Z,$]=D.useState(0),q=D.useRef(null),Y=D.useRef(null),K=D.useMemo(()=>({renderer:{get rendering(){var X;return(X=q.current)!=null?X:Promise.resolve()}},trackRendering(X){if(!q.current)q.current=new Promise((W)=>{Y.current=W});D.startTransition(()=>{X(),$((W)=>W+1)})}}),[]);return UQ(()=>{var X;(X=Y.current)==null||X.call(Y),q.current=null},[J,Z]),D.useImperativeHandle(Q,()=>K),null})),L9=[void 0,PJ];function jK(J){var Q=J,{children:Z,onCollision:$,onBeforeDragStart:q,onDragStart:Y,onDragMove:K,onDragOver:X,onDragEnd:W}=Q,U=w5(Q,["children","onCollision","onBeforeDragStart","onDragStart","onDragMove","onDragOver","onDragEnd"]);let B=D.useRef(null),{plugins:H,modifiers:V,sensors:L}=U,M=GJ(H,XQ.plugins),F=GJ(L,XQ.sensors),A=GJ(V,XQ.modifiers),I=BQ(q),N=BQ(Y),z=BQ(X),G=BQ(K),w=BQ(W),f=BQ($),j=j5(()=>{var p;return(p=U.manager)!=null?p:new X9(U)});return D.useEffect(()=>{if(!B.current)throw Error("Renderer not found");let{renderer:p,trackRendering:b}=B.current,{monitor:y}=j;j.renderer=p;let LQ=[y.addEventListener("beforedragstart",(s)=>{let v=I.current;if(v)b(()=>v(s,j))}),y.addEventListener("dragstart",(s)=>{var v;return(v=N.current)==null?void 0:v.call(N,s,j)}),y.addEventListener("dragover",(s)=>{let v=z.current;if(v)b(()=>v(s,j))}),y.addEventListener("dragmove",(s)=>{let v=G.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()=>LQ.forEach((s)=>s())},[j]),a(M,()=>j&&(j.plugins=M),...L9),a(F,()=>j&&(j.sensors=F),...L9),a(A,()=>j&&(j.modifiers=A),...L9),j$(G9.Provider,{value:j,children:[z0(I5,{ref:B,children:Z}),Z]})}function j5(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 T$(){return D.useContext(G9)}function P$(J){var Q;let Z=(Q=T$())!=null?Q:void 0,[$]=D.useState(()=>J(Z));if($.manager!==Z)$.manager=Z;return UQ($.register,[Z,$]),$}function CK(J){let{disabled:Q,data:Z,element:$,handle:q,id:Y,modifiers:K,sensors:X,plugins:W}=J,U=P$((H)=>new wZ(O$(D$({},J),{register:!1,handle:WQ(q),element:WQ($)}),H)),B=G0(U,C5);return a(Y,()=>U.id=Y),M0(q,(H)=>U.handle=H),M0($,(H)=>U.element=H),a(Z,()=>Z&&(U.data=Z)),a(Q,()=>U.disabled=Q===!0),a(X,()=>U.sensors=X),a(K,()=>U.modifiers=K,void 0,PJ),a(W,()=>U.plugins=W,void 0,PJ),a(J.alignment,()=>U.alignment=J.alignment),{draggable:B,get isDragging(){return B.isDragging},get isDropping(){return B.isDropping},get isDragSource(){return B.isDragSource},handleRef:D.useCallback((H)=>{U.handle=H!=null?H:void 0},[U]),ref:D.useCallback((H)=>{var V,L;if(!H&&((V=U.element)==null?void 0:V.isConnected)&&!((L=U.manager)==null?void 0:L.dragOperation.status.idle))return;U.element=H!=null?H:void 0},[U])}}function C5(J,Q,Z){if(J==="isDragSource"&&!Z&&Q)return!0;return!1}function RK({children:J,className:Q,dropAnimation:Z,style:$,tag:q,disabled:Y}){var K;let X=D.useRef(null),W=T$(),U=(K=A$(()=>W==null?void 0:W.dragOperation.source,[W]).value)!=null?K:null,B=typeof Y==="function"?Y(U):Y;D.useEffect(()=>{if(!X.current||!W||B)return;let L=W.plugins.find((M)=>M instanceof N0);if(!L)return;return L.overlay=X.current,()=>{L.overlay=void 0}},[W,B]),D.useEffect(()=>{if(!W)return;let L=W.plugins.find((M)=>M instanceof N0);if(!L)return;return L.dropAnimation=Z,()=>{L.dropAnimation=void 0}},[W,Z]);let H=D.useMemo(()=>{if(!W)return null;let L=new Proxy(W.registry,{get(M,F){if(F==="register"||F==="unregister")return R5;return M[F]}});return new Proxy(W,{get(M,F){if(F==="registry")return L;return M[F]}})},[W]);return z0(G9.Provider,{value:H,children:D.createElement(q||"div",{ref:X,className:Q,style:$,"data-dnd-overlay":!0},V())});function V(){if(!U||B)return null;if(typeof J==="function")return z0(D5,{source:U,children:J});return J}}function R5(){return()=>{}}function D5({children:J,source:Q}){return J(G0(Q))}var{create:O5,defineProperty:E$,getOwnPropertyDescriptor:T5}=Object,S$=(J,Q)=>(Q=Symbol[J])?Q:Symbol.for("Symbol."+J),A0=(J)=>{throw TypeError(J)},P5=(J,Q,Z)=>(Q in J)?E$(J,Q,{enumerable:!0,configurable:!0,writable:!0,value:Z}):J[Q]=Z,E5=(J)=>{var Q;return[,,,O5((Q=J==null?void 0:J[S$("metadata")])!=null?Q:null)]},k$=["class","method","getter","setter","accessor","field","value","get","set"],x$=(J)=>J!==void 0&&typeof J!=="function"?A0("Function expected"):J,S5=(J,Q,Z,$,q)=>({kind:k$[J],name:Q,metadata:$,addInitializer:(Y)=>Z._?A0("Already initialized"):q.push(x$(Y||null))}),k5=(J,Q)=>P5(Q,S$("metadata"),J[3]),x5=(J,Q,Z,$)=>{for(var q=0,Y=J[Q>>1],K=Y&&Y.length;q<K;q++)Y[q].call(Z);return $},h$=(J,Q,Z,$,q,Y)=>{var K,X,W,U,B=Q&7,H=!1,V=!1,L=2,M=k$[B+5],F=J[L]||(J[L]=[]),A=(q=q.prototype,T5(q,Z));for(var I=$.length-1;I>=0;I--)W=S5(B,Z,X={},J[3],F),W.static=H,W.private=V,U=W.access={has:(N)=>(Z in N)},U.get=(N)=>N[Z],K=(0,$[I])(A[M],W),X._=1,x$(K)&&(A[M]=K);return A&&E$(q,Z,A),q},y$=(J,Q,Z)=>Q.has(J)||A0("Cannot "+Z),h5=(J,Q,Z)=>(y$(J,Q,"read from private field"),Q.get(J)),y5=(J,Q,Z)=>Q.has(J)?A0("Cannot add the same private member more than once"):Q instanceof WeakSet?Q.add(J):Q.set(J,Z),f5=(J,Q,Z,$)=>(y$(J,Q,"write to private field"),Q.set(J,Z),Z),NQ=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)}},f$,v$,V9,F0,AZ,M9=class extends(V9=jJ,v$=[h],f$=[h],V9){constructor(J){let Q=NQ.from(J);super(Q,(Z,$)=>NQ.equals(Z,$));x5(AZ,5,this),y5(this,F0,0),this.velocity={x:0,y:0}}get delta(){return NQ.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=NQ.from(J),$={x:Z.x-Q.x,y:Z.y-Q.y},q=Date.now(),Y=q-h5(this,F0),K=(X)=>Math.round(X/Y*100);JJ(()=>{f5(this,F0,q),this.velocity={x:K($.x),y:K($.y)},super.current=Z})}reset(J=this.defaultValue){super.reset(NQ.from(J)),this.velocity={x:0,y:0}}};AZ=E5(V9);F0=new WeakMap;h$(AZ,2,"delta",v$,M9);h$(AZ,2,"direction",f$,M9);k5(AZ,M9);var b$=((J)=>{return J.Horizontal="x",J.Vertical="y",J})(b$||{});Object.values(b$);var v5=({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=NQ.distance(Q.shape.center,Z);return{id:$,value:1/q,type:RJ.PointerIntersection,priority:CJ.High}}return null},b5=({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=NQ.distance(Q.shape.center,q.current),X=$/(Z.current.area+Q.shape.area-$)/Y;return{id:Q.id,value:X,type:RJ.ShapeIntersection,priority:CJ.Normal}}return null},g5=(J)=>{var Q;return(Q=v5(J))!=null?Q:b5(J)};function DK(J){let{collisionDetector:Q,data:Z,disabled:$,element:q,id:Y,accept:K,type:X}=J,W=P$((B)=>new V0(O$(D$({},J),{register:!1,element:WQ(q)}),B)),U=G0(W);return a(Y,()=>W.id=Y),M0(q,(B)=>W.element=B),a(K,()=>W.accept=K,void 0,PJ),a(Q,()=>W.collisionDetector=Q!=null?Q:g5),a(Z,()=>Z&&(W.data=Z)),a($,()=>W.disabled=$===!0),a(X,()=>W.type=X),{droppable:U,get isDropTarget(){return U.isDropTarget},ref:D.useCallback((B)=>{var H,V;if(!B&&((H=W.element)==null?void 0:H.isConnected)&&!((V=W.manager)==null?void 0:V.dragOperation.status.idle))return;W.element=B!=null?B:void 0},[W])}}
|
|
68
|
+
export{JJ as Uf,O as Vf,o as Wf,PJ as Xf,T as Yf,a5 as Zf,HJ as _f,TQ as $f,$J as ag,F8 as bg,GJ as cg,BJ as dg,cZ as eg,y1 as fg,v1 as gg,DJ as hg,T2 as ig,P2 as jg,OX as kg,xJ as lg,Z0 as mg,x2 as ng,pX as og,N0 as pg,L0 as qg,U$ as rg,fQ as sg,B$ as tg,wZ as ug,V0 as vg,WQ as wg,UQ as xg,G0 as yg,VK as zg,a as Ag,M0 as Bg,jK as Cg,P$ as Dg,CK as Eg,RK as Fg,DK as Gg,p5 as Hg};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Jl as w,Kl as T}from"./chunk-a0k1b4sq.js";function S(B,Q){return{role:"assistant",content:[],api:B.api,provider:B.provider,model:B.id,usage:{input:0,output:0,cacheRead:0,cacheWrite:0,totalTokens:0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},stopReason:"error",errorMessage:Q instanceof Error?Q.message:String(Q),timestamp:Date.now()}}function f(B){return typeof B.result==="function"}async function L(B,Q){for await(let Y of Q)B.push(Y);B.end(f(Q)?await Q.result():void 0)}function H(B,Q){let Y=new w;return Q().then((Z)=>L(Y,Z)).catch((Z)=>{let $=S(B,Z);Y.push({type:"error",reason:"error",error:$}),Y.end($)}),Y}function g(B){return{stream:(Q,Y,Z)=>H(Q,async()=>(await B()).stream(Q,Y,Z)),streamSimple:(Q,Y,Z)=>H(Q,async()=>(await B()).streamSimple(Q,Y,Z))}}var b=function(B,Q){if(typeof B==="string"&&/^\.\.?\//.test(B))return B.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(Y,Z,$,F,J){return Z?Q?".jsx":".js":$&&(!F||!J)?Y:$+F+"."+J.toLowerCase()+"js"});return B},A=(B)=>import(b(B));function N(){return globalThis.process?.env}function C(){return{async env(B){let Q=N()?.[B];return typeof Q==="string"&&Q.trim().length>0?Q:void 0},async fileExists(B){try{let Q=await A("node:fs/promises"),Y=B;if(Y.startsWith("~"))Y=(await A("node:os")).homedir()+Y.slice(1);return await Q.access(Y),!0}catch{return!1}}}}class D{credentials=new Map;chains=new Map;enqueue(B,Q){let Y=this.chains.get(B)??Promise.resolve(),Z=(async()=>{return await Y.catch(()=>{}),Q()})();return this.chains.set(B,Z.catch(()=>{})),Z}async read(B){return this.credentials.get(B)}async list(){return[...this.credentials].map(([B,Q])=>({providerId:B,type:Q.type}))}modify(B,Q){return this.enqueue(B,async()=>{let Y=this.credentials.get(B),Z=await Q(Y);if(Z!==void 0)this.credentials.set(B,Z);return Z??Y})}delete(B){return this.enqueue(B,async()=>{this.credentials.delete(B)})}}class G extends Error{code;constructor(B,Q,Y){super(y(Q,Y?.cause),Y);this.name="ModelsError",this.code=B}}function y(B,Q){if(Q===void 0||Q===null)return B;let Y=T(Q).trim();if(!Y||B.includes(Y))return B;return`${B}: ${Y}`}async function _(B,Q,Y,Z){let $=Z?.env?E(Y,Z.env):Y;if(Z?.apiKey!==void 0&&B.auth.apiKey)return q($,B.auth.apiKey,B.id,{type:"api_key",key:Z.apiKey,env:Z.env});let F=await x(Q,B.id);if(F){if(F.type==="oauth"&&B.auth.oauth)return M(Q,B.id,B.auth.oauth,F);if(F.type==="api_key"&&B.auth.apiKey){let J=Z?.env?{...F,env:{...F.env,...Z.env}}:F;return q($,B.auth.apiKey,B.id,J)}return}return B.auth.apiKey?q($,B.auth.apiKey,B.id,void 0):void 0}function E(B,Q){return{env:async(Y)=>Q[Y]||await B.env(Y),fileExists:(Y)=>B.fileExists(Y)}}async function M(B,Q,Y,Z){let $=Z;if(Date.now()>=$.expires){let F;try{F=await B.modify(Q,async(J)=>{if(J?.type!=="oauth")return;if(Date.now()<J.expires)return;try{return await Y.refresh(J)}catch(W){throw new G("oauth",`OAuth refresh failed for ${Q}`,{cause:W})}})}catch(J){if(J instanceof G)throw J;throw new G("auth",`Credential store modify failed for ${Q}`,{cause:J})}if(F?.type!=="oauth")return;$=F}try{return{auth:await Y.toAuth($),source:"OAuth"}}catch(F){throw new G("oauth",`OAuth auth derivation failed for ${Q}`,{cause:F})}}async function q(B,Q,Y,Z){try{return await Q.resolve({ctx:B,credential:Z})}catch($){throw new G("auth",`API key auth failed for provider ${Y}`,{cause:$})}}async function x(B,Q){try{return await B.read(Q)}catch(Y){throw new G("auth",`Credential store read failed for ${Q}`,{cause:Y})}}class j{entries=new Map;async read(B){let Q=this.entries.get(B);return Q?structuredClone(Q):void 0}async write(B,Q){this.entries.set(B,structuredClone(Q))}async delete(B){this.entries.delete(B)}}function K(B,Q){if(!B&&!Q)return;let Y={...B};for(let[Z,$]of Object.entries(Q??{})){let F=Z.toLowerCase();for(let J of Object.keys(Y))if(J.toLowerCase()===F)delete Y[J];Y[Z]=$}return Y}class O{providers=new Map;credentials;modelsStore;authContext;constructor(B){this.credentials=B?.credentials??new D,this.modelsStore=B?.modelsStore??new j,this.authContext=B?.authContext??C()}setProvider(B){this.providers.set(B.id,B)}deleteProvider(B){this.providers.delete(B)}clearProviders(){this.providers.clear()}getProviders(){return Array.from(this.providers.values())}getProvider(B){return this.providers.get(B)}getModels(B){if(B!==void 0){let Y=this.providers.get(B);if(!Y)return[];try{return Y.getModels()}catch{return[]}}let Q=[];for(let Y of this.providers.values())try{Q.push(...Y.getModels())}catch{}return Q}getModel(B,Q){return this.getModels(B).find((Y)=>Y.id===Q)}async refresh(B={}){let Q=B.allowNetwork??!0,Y=new Map,Z=Array.from(this.providers.values()).filter(($)=>$.refreshModels!==void 0);return await Promise.all(Z.map(async($)=>{if(B.signal?.aborted)return;let F={read:()=>this.modelsStore.read($.id),write:(W)=>this.modelsStore.write($.id,W),delete:()=>this.modelsStore.delete($.id)},J;try{J=await this.readCredential($.id);let W=await this.resolveRefreshCredential($,J,Q,B.signal);if(!W)return;await $.refreshModels({credential:W,store:F,allowNetwork:Q,force:B.force,signal:B.signal})}catch(W){if(!B.signal?.aborted)Y.set($.id,W instanceof Error?W:new G("model_source",`Model refresh failed for ${$.id}`,{cause:W}));try{await $.refreshModels({credential:J,store:F,allowNetwork:!1,signal:B.signal})}catch{}}})),{aborted:B.signal?.aborted??!1,errors:Y}}async resolveRefreshCredential(B,Q,Y,Z){if(Q?.type==="oauth"){let W=B.auth.oauth;if(!W)return;if(!Y||Date.now()<Q.expires)return Q;if(Z?.aborted)return;let k=await this.credentials.modify(B.id,async(z)=>{if(z?.type!=="oauth"||Date.now()<z.expires)return;return W.refresh(z,Z)});return k?.type==="oauth"?k:void 0}let $=B.auth.apiKey;if(!$)return;let F=Q?.type==="api_key"?Q:void 0,J=await $.resolve({ctx:this.authContext,credential:F});if(!J)return;return{type:"api_key",key:J.auth.apiKey,env:J.env}}async readCredential(B){try{return await this.credentials.read(B)}catch(Q){throw new G("auth",`Credential store read failed for ${B}`,{cause:Q})}}async checkProviderAuth(B,Q){if(Q?.type==="oauth")return B.auth.oauth?{source:"OAuth",type:"oauth"}:void 0;let Y=B.auth.apiKey;if(!Y)return;if(Y.check)try{return await Y.check({ctx:this.authContext,credential:Q?.type==="api_key"?Q:void 0})}catch($){throw new G("auth",`API key auth check failed for provider ${B.id}`,{cause:$})}let Z=await _(B,this.credentials,this.authContext);return Z?{source:Z.source,type:"api_key"}:void 0}async checkAuth(B){let Q=this.providers.get(B);if(!Q)return;return this.checkProviderAuth(Q,await this.readCredential(B))}async getAvailable(B){let Q=B?[this.providers.get(B)].filter((Z)=>Z!==void 0):this.getProviders();return(await Promise.all(Q.map(async(Z)=>{let $=await this.readCredential(Z.id);return{provider:Z,credential:$,auth:await this.checkProviderAuth(Z,$)}}))).flatMap(({provider:Z,credential:$,auth:F})=>{if(!F)return[];let J=Z.getModels();return Z.filterModels?.(J,$)??J})}async getAuth(B,Q){let Y=typeof B==="string"?B:B.provider,Z=this.providers.get(Y);if(!Z)return;let $=await _(Z,this.credentials,this.authContext,Q);if(!$||typeof B==="string"||!B.headers)return $;return{...$,auth:{...$.auth,headers:K($.auth.headers,B.headers)}}}async login(B,Q,Y){let Z=this.providers.get(B);if(!Z)throw new G("provider",`Unknown provider: ${B}`);let $=Q==="oauth"?Z.auth.oauth:Z.auth.apiKey;if(!$?.login)throw new G("auth",`${Z.name} does not support ${Q} login`);let F=await $.login(Y);try{await this.credentials.modify(B,async()=>F)}catch(J){throw new G("auth",`Credential store modify failed for ${B}`,{cause:J})}return F}async logout(B){try{await this.credentials.delete(B)}catch(Q){throw new G("auth",`Credential store delete failed for ${B}`,{cause:Q})}}requireProvider(B){let Q=this.providers.get(B.provider);if(!Q)throw new G("provider",`Unknown provider: ${B.provider}`);return Q}async applyAuth(B,Q){this.requireProvider(B);let Y=await this.getAuth(B,{apiKey:Q?.apiKey,env:Q?.env});if(!Y)throw new G("auth",`Provider is not configured: ${B.provider}`);let Z=Y.auth,$=Q?.apiKey??Z.apiKey,F=K(Z.headers,Q?.headers);if(Q?.transformHeaders)F=await Q.transformHeaders(F??{});let J=Y.env||Q?.env?{...Y.env??{},...Q?.env??{}}:void 0,W=Z.baseUrl?{...B,baseUrl:Z.baseUrl}:B,{transformHeaders:k,...z}=Q??{},P={...z,apiKey:$,headers:F,env:J};return{requestModel:W,requestOptions:P}}stream(B,Q,Y){return H(B,async()=>{let Z=this.requireProvider(B),{requestModel:$,requestOptions:F}=await this.applyAuth(B,Y);return Z.stream($,Q,F)})}async complete(B,Q,Y){return this.stream(B,Q,Y).result()}streamSimple(B,Q,Y){return H(B,async()=>{let Z=this.requireProvider(B),{requestModel:$,requestOptions:F}=await this.applyAuth(B,Y);return Z.streamSimple($,Q,F)})}async completeSimple(B,Q,Y){return this.streamSimple(B,Q,Y).result()}}function d(B){return new O(B)}function o(B){let Q=B.models,Y=[],Z,$=B.fetchModels,F=()=>{let P=[...Q];for(let U of Y){let X=P.findIndex((V)=>V.id===U.id);if(X>=0)P[X]=U;else P.push(U)}return P},J=typeof B.api.stream==="function"?B.api:void 0,W=J?void 0:B.api,k=(P)=>J??W?.[P.api],z=(P,U)=>{let X=k(P);if(!X)return H(P,async()=>{throw new G("stream",`Provider ${B.id} has no API implementation for "${P.api}"`)});return U(X)};return{id:B.id,name:B.name??B.id,baseUrl:B.baseUrl,headers:B.headers,auth:B.auth,getModels:F,refreshModels:$?(P)=>{return Z??=(async()=>{try{let U=await P.store.read();if(U)Y=U.models.filter((V)=>V.provider===B.id).map((V)=>V);if(!P.allowNetwork||P.signal?.aborted)return;let X=await $(P);if(P.signal?.aborted)return;Y=X,await P.store.write({models:X,checkedAt:Date.now()})}finally{Z=void 0}})(),Z}:void 0,filterModels:B.filterModels,stream:(P,U,X)=>z(P,(V)=>V.stream(P,U,X)),streamSimple:(P,U,X)=>z(P,(V)=>V.streamSimple(P,U,X))}}function r(B,Q){let Y=Q.input+Q.cacheRead+Q.cacheWrite,Z=B.cost,$=-1;for(let W of B.cost.tiers??[])if(Y>W.inputTokensAbove&&W.inputTokensAbove>$)Z=W,$=W.inputTokensAbove;let F=Q.cacheWrite1h??0,J=Q.cacheWrite-F;return Q.cost.input=Z.input/1e6*Q.input,Q.cost.output=Z.output/1e6*Q.output,Q.cost.cacheRead=Z.cacheRead/1e6*Q.cacheRead,Q.cost.cacheWrite=(Z.cacheWrite*J+Z.input*2*F)/1e6,Q.cost.total=Q.cost.input+Q.cost.output+Q.cost.cacheRead+Q.cost.cacheWrite,Q.cost}var R=["off","minimal","low","medium","high","xhigh","max"];function h(B){if(!B.reasoning)return["off"];return R.filter((Q)=>{let Y=B.thinkingLevelMap?.[Q];if(Y===null)return!1;if(Q==="xhigh"||Q==="max")return Y!==void 0;return!0})}function e(B,Q){let Y=h(B);if(Y.includes(Q))return Q;let Z=R.indexOf(Q);if(Z===-1)return Y[0]??"off";for(let $=Z;$<R.length;$++){let F=R[$];if(Y.includes(F))return F}for(let $=Z-1;$>=0;$--){let F=R[$];if(Y.includes(F))return F}return Y[0]??"off"}
|
|
3
|
-
export{g as
|
|
2
|
+
import{am as w,bm as T}from"./chunk-m7d52gfe.js";function S(B,Q){return{role:"assistant",content:[],api:B.api,provider:B.provider,model:B.id,usage:{input:0,output:0,cacheRead:0,cacheWrite:0,totalTokens:0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},stopReason:"error",errorMessage:Q instanceof Error?Q.message:String(Q),timestamp:Date.now()}}function f(B){return typeof B.result==="function"}async function L(B,Q){for await(let Y of Q)B.push(Y);B.end(f(Q)?await Q.result():void 0)}function H(B,Q){let Y=new w;return Q().then((Z)=>L(Y,Z)).catch((Z)=>{let $=S(B,Z);Y.push({type:"error",reason:"error",error:$}),Y.end($)}),Y}function g(B){return{stream:(Q,Y,Z)=>H(Q,async()=>(await B()).stream(Q,Y,Z)),streamSimple:(Q,Y,Z)=>H(Q,async()=>(await B()).streamSimple(Q,Y,Z))}}var b=function(B,Q){if(typeof B==="string"&&/^\.\.?\//.test(B))return B.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(Y,Z,$,F,J){return Z?Q?".jsx":".js":$&&(!F||!J)?Y:$+F+"."+J.toLowerCase()+"js"});return B},A=(B)=>import(b(B));function N(){return globalThis.process?.env}function C(){return{async env(B){let Q=N()?.[B];return typeof Q==="string"&&Q.trim().length>0?Q:void 0},async fileExists(B){try{let Q=await A("node:fs/promises"),Y=B;if(Y.startsWith("~"))Y=(await A("node:os")).homedir()+Y.slice(1);return await Q.access(Y),!0}catch{return!1}}}}class D{credentials=new Map;chains=new Map;enqueue(B,Q){let Y=this.chains.get(B)??Promise.resolve(),Z=(async()=>{return await Y.catch(()=>{}),Q()})();return this.chains.set(B,Z.catch(()=>{})),Z}async read(B){return this.credentials.get(B)}async list(){return[...this.credentials].map(([B,Q])=>({providerId:B,type:Q.type}))}modify(B,Q){return this.enqueue(B,async()=>{let Y=this.credentials.get(B),Z=await Q(Y);if(Z!==void 0)this.credentials.set(B,Z);return Z??Y})}delete(B){return this.enqueue(B,async()=>{this.credentials.delete(B)})}}class G extends Error{code;constructor(B,Q,Y){super(y(Q,Y?.cause),Y);this.name="ModelsError",this.code=B}}function y(B,Q){if(Q===void 0||Q===null)return B;let Y=T(Q).trim();if(!Y||B.includes(Y))return B;return`${B}: ${Y}`}async function _(B,Q,Y,Z){let $=Z?.env?E(Y,Z.env):Y;if(Z?.apiKey!==void 0&&B.auth.apiKey)return q($,B.auth.apiKey,B.id,{type:"api_key",key:Z.apiKey,env:Z.env});let F=await x(Q,B.id);if(F){if(F.type==="oauth"&&B.auth.oauth)return M(Q,B.id,B.auth.oauth,F);if(F.type==="api_key"&&B.auth.apiKey){let J=Z?.env?{...F,env:{...F.env,...Z.env}}:F;return q($,B.auth.apiKey,B.id,J)}return}return B.auth.apiKey?q($,B.auth.apiKey,B.id,void 0):void 0}function E(B,Q){return{env:async(Y)=>Q[Y]||await B.env(Y),fileExists:(Y)=>B.fileExists(Y)}}async function M(B,Q,Y,Z){let $=Z;if(Date.now()>=$.expires){let F;try{F=await B.modify(Q,async(J)=>{if(J?.type!=="oauth")return;if(Date.now()<J.expires)return;try{return await Y.refresh(J)}catch(W){throw new G("oauth",`OAuth refresh failed for ${Q}`,{cause:W})}})}catch(J){if(J instanceof G)throw J;throw new G("auth",`Credential store modify failed for ${Q}`,{cause:J})}if(F?.type!=="oauth")return;$=F}try{return{auth:await Y.toAuth($),source:"OAuth"}}catch(F){throw new G("oauth",`OAuth auth derivation failed for ${Q}`,{cause:F})}}async function q(B,Q,Y,Z){try{return await Q.resolve({ctx:B,credential:Z})}catch($){throw new G("auth",`API key auth failed for provider ${Y}`,{cause:$})}}async function x(B,Q){try{return await B.read(Q)}catch(Y){throw new G("auth",`Credential store read failed for ${Q}`,{cause:Y})}}class j{entries=new Map;async read(B){let Q=this.entries.get(B);return Q?structuredClone(Q):void 0}async write(B,Q){this.entries.set(B,structuredClone(Q))}async delete(B){this.entries.delete(B)}}function K(B,Q){if(!B&&!Q)return;let Y={...B};for(let[Z,$]of Object.entries(Q??{})){let F=Z.toLowerCase();for(let J of Object.keys(Y))if(J.toLowerCase()===F)delete Y[J];Y[Z]=$}return Y}class O{providers=new Map;credentials;modelsStore;authContext;constructor(B){this.credentials=B?.credentials??new D,this.modelsStore=B?.modelsStore??new j,this.authContext=B?.authContext??C()}setProvider(B){this.providers.set(B.id,B)}deleteProvider(B){this.providers.delete(B)}clearProviders(){this.providers.clear()}getProviders(){return Array.from(this.providers.values())}getProvider(B){return this.providers.get(B)}getModels(B){if(B!==void 0){let Y=this.providers.get(B);if(!Y)return[];try{return Y.getModels()}catch{return[]}}let Q=[];for(let Y of this.providers.values())try{Q.push(...Y.getModels())}catch{}return Q}getModel(B,Q){return this.getModels(B).find((Y)=>Y.id===Q)}async refresh(B={}){let Q=B.allowNetwork??!0,Y=new Map,Z=Array.from(this.providers.values()).filter(($)=>$.refreshModels!==void 0);return await Promise.all(Z.map(async($)=>{if(B.signal?.aborted)return;let F={read:()=>this.modelsStore.read($.id),write:(W)=>this.modelsStore.write($.id,W),delete:()=>this.modelsStore.delete($.id)},J;try{J=await this.readCredential($.id);let W=await this.resolveRefreshCredential($,J,Q,B.signal);if(!W)return;await $.refreshModels({credential:W,store:F,allowNetwork:Q,force:B.force,signal:B.signal})}catch(W){if(!B.signal?.aborted)Y.set($.id,W instanceof Error?W:new G("model_source",`Model refresh failed for ${$.id}`,{cause:W}));try{await $.refreshModels({credential:J,store:F,allowNetwork:!1,signal:B.signal})}catch{}}})),{aborted:B.signal?.aborted??!1,errors:Y}}async resolveRefreshCredential(B,Q,Y,Z){if(Q?.type==="oauth"){let W=B.auth.oauth;if(!W)return;if(!Y||Date.now()<Q.expires)return Q;if(Z?.aborted)return;let k=await this.credentials.modify(B.id,async(z)=>{if(z?.type!=="oauth"||Date.now()<z.expires)return;return W.refresh(z,Z)});return k?.type==="oauth"?k:void 0}let $=B.auth.apiKey;if(!$)return;let F=Q?.type==="api_key"?Q:void 0,J=await $.resolve({ctx:this.authContext,credential:F});if(!J)return;return{type:"api_key",key:J.auth.apiKey,env:J.env}}async readCredential(B){try{return await this.credentials.read(B)}catch(Q){throw new G("auth",`Credential store read failed for ${B}`,{cause:Q})}}async checkProviderAuth(B,Q){if(Q?.type==="oauth")return B.auth.oauth?{source:"OAuth",type:"oauth"}:void 0;let Y=B.auth.apiKey;if(!Y)return;if(Y.check)try{return await Y.check({ctx:this.authContext,credential:Q?.type==="api_key"?Q:void 0})}catch($){throw new G("auth",`API key auth check failed for provider ${B.id}`,{cause:$})}let Z=await _(B,this.credentials,this.authContext);return Z?{source:Z.source,type:"api_key"}:void 0}async checkAuth(B){let Q=this.providers.get(B);if(!Q)return;return this.checkProviderAuth(Q,await this.readCredential(B))}async getAvailable(B){let Q=B?[this.providers.get(B)].filter((Z)=>Z!==void 0):this.getProviders();return(await Promise.all(Q.map(async(Z)=>{let $=await this.readCredential(Z.id);return{provider:Z,credential:$,auth:await this.checkProviderAuth(Z,$)}}))).flatMap(({provider:Z,credential:$,auth:F})=>{if(!F)return[];let J=Z.getModels();return Z.filterModels?.(J,$)??J})}async getAuth(B,Q){let Y=typeof B==="string"?B:B.provider,Z=this.providers.get(Y);if(!Z)return;let $=await _(Z,this.credentials,this.authContext,Q);if(!$||typeof B==="string"||!B.headers)return $;return{...$,auth:{...$.auth,headers:K($.auth.headers,B.headers)}}}async login(B,Q,Y){let Z=this.providers.get(B);if(!Z)throw new G("provider",`Unknown provider: ${B}`);let $=Q==="oauth"?Z.auth.oauth:Z.auth.apiKey;if(!$?.login)throw new G("auth",`${Z.name} does not support ${Q} login`);let F=await $.login(Y);try{await this.credentials.modify(B,async()=>F)}catch(J){throw new G("auth",`Credential store modify failed for ${B}`,{cause:J})}return F}async logout(B){try{await this.credentials.delete(B)}catch(Q){throw new G("auth",`Credential store delete failed for ${B}`,{cause:Q})}}requireProvider(B){let Q=this.providers.get(B.provider);if(!Q)throw new G("provider",`Unknown provider: ${B.provider}`);return Q}async applyAuth(B,Q){this.requireProvider(B);let Y=await this.getAuth(B,{apiKey:Q?.apiKey,env:Q?.env});if(!Y)throw new G("auth",`Provider is not configured: ${B.provider}`);let Z=Y.auth,$=Q?.apiKey??Z.apiKey,F=K(Z.headers,Q?.headers);if(Q?.transformHeaders)F=await Q.transformHeaders(F??{});let J=Y.env||Q?.env?{...Y.env??{},...Q?.env??{}}:void 0,W=Z.baseUrl?{...B,baseUrl:Z.baseUrl}:B,{transformHeaders:k,...z}=Q??{},P={...z,apiKey:$,headers:F,env:J};return{requestModel:W,requestOptions:P}}stream(B,Q,Y){return H(B,async()=>{let Z=this.requireProvider(B),{requestModel:$,requestOptions:F}=await this.applyAuth(B,Y);return Z.stream($,Q,F)})}async complete(B,Q,Y){return this.stream(B,Q,Y).result()}streamSimple(B,Q,Y){return H(B,async()=>{let Z=this.requireProvider(B),{requestModel:$,requestOptions:F}=await this.applyAuth(B,Y);return Z.streamSimple($,Q,F)})}async completeSimple(B,Q,Y){return this.streamSimple(B,Q,Y).result()}}function d(B){return new O(B)}function o(B){let Q=B.models,Y=[],Z,$=B.fetchModels,F=()=>{let P=[...Q];for(let U of Y){let X=P.findIndex((V)=>V.id===U.id);if(X>=0)P[X]=U;else P.push(U)}return P},J=typeof B.api.stream==="function"?B.api:void 0,W=J?void 0:B.api,k=(P)=>J??W?.[P.api],z=(P,U)=>{let X=k(P);if(!X)return H(P,async()=>{throw new G("stream",`Provider ${B.id} has no API implementation for "${P.api}"`)});return U(X)};return{id:B.id,name:B.name??B.id,baseUrl:B.baseUrl,headers:B.headers,auth:B.auth,getModels:F,refreshModels:$?(P)=>{return Z??=(async()=>{try{let U=await P.store.read();if(U)Y=U.models.filter((V)=>V.provider===B.id).map((V)=>V);if(!P.allowNetwork||P.signal?.aborted)return;let X=await $(P);if(P.signal?.aborted)return;Y=X,await P.store.write({models:X,checkedAt:Date.now()})}finally{Z=void 0}})(),Z}:void 0,filterModels:B.filterModels,stream:(P,U,X)=>z(P,(V)=>V.stream(P,U,X)),streamSimple:(P,U,X)=>z(P,(V)=>V.streamSimple(P,U,X))}}function r(B,Q){let Y=Q.input+Q.cacheRead+Q.cacheWrite,Z=B.cost,$=-1;for(let W of B.cost.tiers??[])if(Y>W.inputTokensAbove&&W.inputTokensAbove>$)Z=W,$=W.inputTokensAbove;let F=Q.cacheWrite1h??0,J=Q.cacheWrite-F;return Q.cost.input=Z.input/1e6*Q.input,Q.cost.output=Z.output/1e6*Q.output,Q.cost.cacheRead=Z.cacheRead/1e6*Q.cacheRead,Q.cost.cacheWrite=(Z.cacheWrite*J+Z.input*2*F)/1e6,Q.cost.total=Q.cost.input+Q.cost.output+Q.cost.cacheRead+Q.cost.cacheWrite,Q.cost}var R=["off","minimal","low","medium","high","xhigh","max"];function h(B){if(!B.reasoning)return["off"];return R.filter((Q)=>{let Y=B.thinkingLevelMap?.[Q];if(Y===null)return!1;if(Q==="xhigh"||Q==="max")return Y!==void 0;return!0})}function e(B,Q){let Y=h(B);if(Y.includes(Q))return Q;let Z=R.indexOf(Q);if(Z===-1)return Y[0]??"off";for(let $=Z;$<R.length;$++){let F=R[$];if(Y.includes(F))return F}for(let $=Z-1;$>=0;$--){let F=R[$];if(Y.includes(F))return F}return Y[0]??"off"}
|
|
3
|
+
export{g as Wl,D as Xl,d as Yl,o as Zl,r as _l,e as $l};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{x as
|
|
1
|
+
import{Fh as D,Hh as n,Ih as u,Kk as r,Mh as w,Vi as m,Wk as d,Zi as c,ci as l,ei as f,fi as g,ji as p}from"./chunk-sjr6mvgm.js";import{em as P}from"./chunk-2em77vjv.js";function x({...t}){return n(r.Root,{"data-slot":"dropdown-menu",...t})}function T({...t}){return n(r.Portal,{"data-slot":"dropdown-menu-portal",...t})}function I({...t}){return n(r.Trigger,{"data-slot":"dropdown-menu-trigger",...t})}function z({className:t,sideOffset:o=4,...e}){return n(r.Portal,{children:n(r.Content,{"data-slot":"dropdown-menu-content",sideOffset:o,className:d("z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",t),...e})})}function S({className:t,inset:o,variant:e="default",...a}){return n(r.Item,{"data-slot":"dropdown-menu-item","data-inset":o,"data-variant":e,className:d("relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!",t),...a})}function N({...t}){return n(r.RadioGroup,{"data-slot":"dropdown-menu-radio-group",...t})}function _({className:t,children:o,...e}){return u(r.RadioItem,{"data-slot":"dropdown-menu-radio-item",className:d("relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...e,children:[n("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:n(r.ItemIndicator,{children:n(c,{className:"size-2 fill-current"})})}),o]})}function k({className:t,inset:o,...e}){return n(r.Label,{"data-slot":"dropdown-menu-label","data-inset":o,className:d("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t),...e})}function G({className:t,...o}){return n(r.Separator,{"data-slot":"dropdown-menu-separator",className:d("-mx-1 my-1 h-px bg-border",t),...o})}function F({...t}){return n(r.Sub,{"data-slot":"dropdown-menu-sub",...t})}function L({className:t,inset:o,children:e,...a}){return u(r.SubTrigger,{"data-slot":"dropdown-menu-sub-trigger","data-inset":o,className:d("flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[inset]:pl-8 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",t),...a,children:[e,n(m,{className:"ml-auto size-4"})]})}function O({className:t,...o}){return n(r.SubContent,{"data-slot":"dropdown-menu-sub-content",className:d("z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",t),...o})}var v=l()(g((t,o)=>({teamId:null,projectTeamMap:{},setTeamId:(e)=>t({teamId:e}),ensureTeamIdForProject:async(e)=>{let a=o();if(a.projectTeamMap[e]){let i=a.projectTeamMap[e];if(a.teamId!==i)t({teamId:i});return i}try{let i=await p.api.projects[":projectId"].team.$get({param:{projectId:e}});if(!i.ok)throw Error("failed to fetch project team");let s=await i.json();if(s&&s.teamId)return t((M)=>({teamId:s.teamId,projectTeamMap:{...M.projectTeamMap,[e]:s.teamId}})),s.teamId}catch(i){console.error("Failed to fetch team ID for project",e,i)}return null}}),{name:"team-context-storage",storage:f(()=>localStorage)}));var b=P(D(),1);function Y(t){let o=v((a)=>a.teamId),{data:e}=w({queryKey:t?["projects",t,"me"]:["teams",o,"me"],queryFn:async()=>{if(t){let a=await p.api.projects[":projectId"].me.$get({param:{projectId:t}});if(!a.ok)throw Error("Failed to fetch project me");return await a.json()}else{if(!o)return null;let a=await p.api.teams[":teamId"].me.$get({param:{teamId:o}});if(!a.ok)throw Error("Failed to fetch team me");return await a.json()}},enabled:t?!!t:!!o});return b.useMemo(()=>({role:e?.role,canEdit:e?.role==="owner"||e?.role==="editor",canAdmin:e?.role==="owner"}),[e?.role])}
|
|
2
|
+
export{x as ph,T as qh,I as rh,z as sh,S as th,N as uh,_ as vh,k as wh,G as xh,F as yh,L as zh,O as Ah,v as Bh,Y as Ch};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{m as
|
|
1
|
+
import{Hh as t,Mk as e,Wk as r}from"./chunk-sjr6mvgm.js";function m({...o}){return t(e.Root,{"data-slot":"popover",...o})}function s({...o}){return t(e.Trigger,{"data-slot":"popover-trigger",...o})}function v({className:o,align:n="center",sideOffset:a=4,...i}){return t(e.Portal,{children:t(e.Content,{"data-slot":"popover-content",align:n,sideOffset:a,className:r("z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",o),...i})})}
|
|
2
|
+
export{m as X,s as Y,v as Z};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Af as l0,Bf as c0,Cf as u0,Df as x0,Ef as j0,Hf as r0}from"./chunk-33r4w0yv.js";import{Lf as E0,Mf as P0}from"./chunk-q0xv46wa.js";import{Nf as I0}from"./chunk-2t0asg3w.js";import{Sf as i0,Tf as n0}from"./chunk-rjr8c8be.js";import{Cg as S0,Hg as o0,rg as F0,sg as C0,tg as f0}from"./chunk-g3p6h6sw.js";import{Ig as q0}from"./chunk-2xaq1y16.js";import{Mg as g0,Ng as D0,Og as p0,Pg as m0}from"./chunk-rjkj0dr9.js";import{gh as H0,jh as K0}from"./chunk-75segwsp.js";import{Ah as L0,Ch as a0,ph as d,qh as n,rh as t,sh as i,th as O,wh as v0,xh as u,yh as s,zh as e}from"./chunk-jfjjh86p.js";import{$k as X,Dj as b0,Fh as N0,Gh as w,Hh as L,Ih as J,Jh as W0,Mh as X0,Ni as y0,Oh as o,Si as M0,Ti as k0,Uh as T0,Wh as O0,Wk as l,Yk as $0,al as G0,cl as Q0,dl as R0,fl as B0,hi as I,hj as a,ji as M,nj as Z0,ok as _0,ri as A0,si as Y0,sj as V0,xj as w0}from"./chunk-sjr6mvgm.js";import{em as J0}from"./chunk-2em77vjv.js";var d0=J0(N0(),1);var c=J0(N0(),1);function U1(N){if(!N)return null;try{let U=K0(N);if(isNaN(U.getTime()))return null;return H0(U,"MMM d, yyyy")}catch{return null}}function z1({version:N,displayVersionNumber:U,index:K,canEdit:S,onRemove:$}){let[F,G]=c.useState(!1),{ref:Q,handleRef:C}=P0({id:N.id,index:K,disabled:!S}),R=U1(N.createdAt);return J("div",{ref:Q,className:"group flex items-center gap-3 p-2.5 rounded-lg border border-border bg-card hover:bg-accent/40 transition-colors",children:[J("div",{className:"flex-shrink-0 flex items-center justify-center bg-muted text-muted-foreground rounded-full px-2.5 py-0.5 text-xs font-semibold select-none min-w-[2.25rem]",children:["v",U]}),S?L("div",{ref:C,className:"cursor-grab active:cursor-grabbing text-muted-foreground hover:text-foreground p-1 -m-1 rounded touch-none flex items-center justify-center",children:L(Z0,{className:"h-4 w-4"})}):L("div",{className:"w-4"}),L("div",{className:"h-12 w-20 flex-shrink-0 overflow-hidden rounded-md border border-border bg-muted flex items-center justify-center",children:N.previewUrl?L("img",{src:N.previewUrl,alt:N.name||"",className:"h-full w-full object-cover"}):L(a,{className:"h-5 w-5 text-muted-foreground"})}),J("div",{className:"flex flex-col flex-1 min-w-0 text-left",children:[L("span",{className:"truncate text-sm font-medium text-foreground",title:N.name||"",children:N.name||"Untitled"}),J("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground truncate",children:[L("span",{children:N.creator?.name||X.unknown()}),R&&J(w,{children:[L("span",{children:"•"}),L("span",{children:R})]})]})]}),S&&J(d,{modal:!1,open:F,onOpenChange:G,children:[L(t,{asChild:!0,children:L($0,{variant:"ghost",size:"icon","aria-label":"More options",className:l("h-8 w-8 text-muted-foreground hover:text-foreground transition-opacity flex-shrink-0",F?"opacity-100":"opacity-0 group-hover:opacity-100 focus:opacity-100"),children:L(Y0,{className:"h-4 w-4"})})}),L(i,{align:"end",children:J(O,{onClick:()=>$(N.id),className:"text-destructive focus:text-destructive cursor-pointer",children:[L(_0,{className:"h-4 w-4 mr-2"}),L("span",{children:X.remove_from_stack()})]})})]})]})}function h0({open:N,onOpenChange:U,stackId:K,canEdit:S=!0,onVersionRemoved:$,onStackDissolved:F}){let G=W0(),[Q,C]=c.useState([]),{data:R,isLoading:V}=X0({queryKey:["version_stacks",K,"versions"],queryFn:async()=>{let W=await M.api.version_stacks[":stackId"].versions.$get({param:{stackId:K}});if(!W.ok)throw Error("Failed to fetch versions");return await W.json()},enabled:N&&!!K});c.useEffect(()=>{if(R)C(R)},[R]);let{mutate:k}=o({mutationFn:async({fileId:W,beforeId:Z})=>{if(!(await M.api.version_stacks[":stackId"].order.$post({param:{stackId:K},json:{fileId:W,beforeId:Z}})).ok)throw Error("Failed to reorder versions")},onSuccess:()=>{G.invalidateQueries({queryKey:["version_stacks"]}),G.invalidateQueries({queryKey:["files"]}),G.invalidateQueries({queryKey:["projects"]}),I.success(X.version_reordered_successfully())},onError:()=>{if(I.error(X.failed_to_reorder_versions()),R)C(R)}}),{mutate:D,isPending:A}=o({mutationFn:async(W)=>{if(!(await M.api.version_stacks[":stackId"].versions[":versionId"].$delete({param:{stackId:K,versionId:W}})).ok)throw Error("Failed to remove version from stack");return W},onSuccess:(W)=>{I.success(X.version_removed_successfully());let Z=Q.filter((q)=>q.id!==W);if(C(Z),G.invalidateQueries({queryKey:["version_stacks"]}),G.invalidateQueries({queryKey:["files"]}),G.invalidateQueries({queryKey:["projects"]}),Z.length<=1){let q=Z[0];if(U(!1),q)F?.(q.id)}else $?.(W,Z)},onError:()=>{I.error(X.failed_to_remove_version())}}),B=(W)=>{if(W.canceled)return;let{source:Z}=W.operation;if(!E0(Z))return;let{initialIndex:q,index:_}=Z;if(q===_)return;let f=[...Q],[b]=f.splice(q,1);f.splice(_,0,b),C(f);let E=_===f.length-1?"-1":f[_+1].id;k({fileId:b.id,beforeId:E})},h=(W)=>{if(A)return;D(W)};return L(G0,{open:N,onOpenChange:U,children:J(Q0,{className:"max-w-lg p-0 gap-0 overflow-hidden",children:[L(R0,{className:"p-4 pb-3 border-b border-border",children:L(B0,{className:"text-base font-semibold",children:X.manage_versions_title()})}),L(q0,{className:"max-h-[60vh] p-4",children:V?L("div",{className:"py-8 text-center text-sm text-muted-foreground",children:X.loading?.()||"Loading..."}):Q.length===0?L("div",{className:"py-8 text-center text-sm text-muted-foreground",children:X.no_versions_found()}):L("div",{className:"space-y-2",children:L(S0,{sensors:[f0.configure({activationConstraints:[new C0.Distance({value:6})]}),F0],onDragEnd:B,children:Q.map((W,Z)=>L(z1,{version:W,displayVersionNumber:Q.length-Z,index:Z,canEdit:S,onRemove:h},W.id))})})})]})})}function t0({teamId:N,projectId:U,projectName:K,ancestorFolders:S,currentAsset:$,isRootFolder:F,customTerminalBreadcrumb:G,displayStyle:Q,onDisplayStyleChange:C,isLeftSidebarCollapsed:R,onLeftSidebarToggle:V,isRightSidebarCollapsed:k,onRightSidebarToggle:D,isChatbotOpen:A=!1,onChatbotToggle:B,isPublic:h=!1,onFolderClick:W,onRename:Z,onDelete:q,fileId:_,shareId:f,allowDownload:b=!0,downloadInfo:E,versions:H,compareMode:x=!1,canCompareVersions:y=!1,onCompareVersions:j}){let g=T0(),{canEdit:p}=a0(U),[r,m]=d0.useState(!1),U0=!1,z0=(z)=>{if(!_)return;if(h&&f){g({to:"/share/$shareId/files/$fileId",params:{shareId:f,fileId:_},search:(Y)=>({...Y,version:z})});return}if(!U)return;g({to:"/projects/$projectId/files/$fileId",params:{projectId:U,fileId:_},search:(Y)=>({...Y,version:z})})},v=async(z)=>{if(!_)return;try{let Y=f?await M.api.shares[":shareId"].files[":fileId"]["download-url"].$post({param:{shareId:f,fileId:_},json:{key:z}}):await M.api.files["download-url"].$post({json:{key:z,assetId:_}});if(!Y.ok)return;let{url:P}=await Y.json(),T=document.createElement("a");T.href=P,T.download="",document.body.appendChild(T),T.click(),document.body.removeChild(T)}catch{}},s0=$.proxyType!=="audio"&&(E?.videoTranscodes?.length??0)>0,e0=h?[{name:K,id:"root"},...S.slice().reverse().map((z)=>({name:z.name||"",id:z.id}))]:[{name:X.all_projects(),path:`/teams/${N}`,isMuted:!0},{name:K,path:`/projects/${U}`},...S.slice().reverse().map((z)=>({name:z.name||"",path:`/projects/${U}/folders/${z.id}`}))];return J("div",{className:"flex h-14 flex-wrap items-center justify-between gap-2 border-b border-border bg-card px-4 py-2",children:[J("div",{className:"flex min-w-0 flex-shrink items-center gap-1",children:[e0.map((z,Y)=>J("div",{className:"flex items-center gap-1",children:[Y>0&&L("span",{className:"text-muted-foreground",children:"/"}),z.path?L(O0,{to:z.path,className:l("truncate rounded px-2 py-1 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground",z.isMuted?"text-muted-foreground":"text-foreground"),children:z.name}):L("button",{onClick:()=>z.id&&W?.(z.id),className:"truncate rounded px-2 py-1 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground text-foreground",children:z.name})]},Y)),G?J("div",{className:"flex items-center gap-1",children:[L("span",{className:"text-muted-foreground",children:"/"}),L("span",{className:"truncate rounded px-2 py-1 text-sm font-medium text-foreground",children:G})]}):!F&&!x?J("div",{className:"flex items-center gap-1",children:[L("span",{className:"text-muted-foreground",children:"/"}),$.type==="folder"?L("span",{className:"truncate rounded px-2 py-1 text-sm font-medium text-foreground",children:$.name}):J(d,{modal:!1,children:[J(t,{className:"flex items-center gap-1 truncate rounded px-2 py-1 text-sm font-medium text-foreground transition-colors hover:bg-accent hover:text-accent-foreground",children:[L("span",{children:$.name}),$.version!==void 0&&J(I0,{variant:"outline",className:"px-1 py-0 text-xs",children:["v",$.version]}),L(k0,{className:"h-4 w-4"})]}),J(i,{className:"w-56",children:[b&&(s0?J(s,{children:[L(e,{className:"flex items-center gap-2",children:L("span",{children:X.download()})}),L(n,{children:J(L0,{className:"w-48",children:[L(v0,{children:X.download()}),E?.videoTranscodes?.map((z)=>{let Y=Math.max(z.width,z.height),P=`${z.height}p`;if(Y>=3840)P="2160p";else if(Y>=1920)P="1080p";else if(Y>=1280)P="720p";else if(Y>=960)P="540p";else if(Y>=640)P="360p";else if(Y>=320)P="180p";return J(O,{onClick:()=>v(z.key),className:"flex items-center justify-between",children:[L("span",{children:P}),L("span",{className:"text-xs text-muted-foreground",children:"MP4"})]},P)}),E?.originalKey&&J(w,{children:[L(u,{}),J(O,{onClick:()=>v(E.originalKey),className:"flex items-center justify-between",children:[L("span",{children:"Original"}),L("span",{className:"text-xs text-muted-foreground",children:$.name?.split(".").pop()?.toUpperCase()||"RAW"})]})]})]})})]}):L(O,{onClick:()=>E?.originalKey&&v(E.originalKey),disabled:!E?.originalKey,children:X.download()})),p&&Z&&L(O,{onClick:Z,children:X.rename()}),p&&q&&L(O,{onClick:q,className:"text-destructive focus:text-destructive",children:X.delete()}),y&&j&&J(w,{children:[L(u,{}),J(O,{onClick:()=>j(),children:[L(A0,{className:"h-4 w-4"}),L("span",{children:X.compare_versions()})]})]}),H&&H.length>0&&J(w,{children:[L(u,{}),J(s,{children:[J(e,{className:"flex items-center gap-2",children:[L(V0,{className:"h-4 w-4"}),L("span",{children:"Versions"})]}),L(n,{children:J(L0,{className:"w-80 p-1",children:[L("div",{className:"flex flex-col gap-1 max-h-96 overflow-y-auto",children:H.map((z)=>{let Y=$.version===z.version;return J(O,{onClick:()=>z0(z.id),className:"flex items-center gap-3 py-2 px-3 rounded-md cursor-pointer focus:bg-accent focus:text-accent-foreground",children:[J("div",{className:"flex-shrink-0 flex items-center justify-center bg-muted dark:bg-muted-foreground/20 text-muted-foreground dark:text-muted-foreground rounded-full px-2 py-0.5 text-xs font-semibold select-none min-w-[2rem]",children:["v",z.version]}),L("div",{className:"h-10 w-16 flex-shrink-0 overflow-hidden rounded-md border border-border bg-muted flex items-center justify-center",children:z.previewUrl?L("img",{src:z.previewUrl,alt:z.name||void 0,className:"h-full w-full object-cover"}):L(a,{className:"h-4 w-4 text-muted-foreground"})}),J("div",{className:"flex flex-col flex-1 min-w-0 text-left",children:[L("span",{className:"truncate text-sm font-semibold text-foreground",children:z.name}),L("span",{className:"truncate text-xs text-muted-foreground",children:z.creator?.name||"Unknown"})]}),Y&&L(M0,{className:"h-4 w-4 text-primary ml-auto flex-shrink-0"})]},z.id)})}),L(u,{}),L("div",{className:"p-1",children:L("button",{className:"w-full text-center text-xs font-medium py-2 px-3 rounded-md bg-muted/80 hover:bg-muted text-foreground transition-colors cursor-pointer",onClick:()=>m(!0),children:X.manage_versions()})})]})})]})]})]})]})]}):null,_&&H&&H.length>0&&L(h0,{open:r,onOpenChange:m,stackId:_,canEdit:p,onStackDissolved:(z)=>{m(!1),g({to:"/projects/$projectId/files/$fileId",params:{projectId:U,fileId:z}})},onVersionRemoved:(z,Y)=>{if(($.version?H.find((T)=>T.version===$.version)?.id:void 0)===z){let T=Y[0];if(T)g({to:"/projects/$projectId/files/$fileId",params:{projectId:U,fileId:_},search:(L1)=>({...L1,version:T.id})})}}})]}),J("div",{className:"flex items-center gap-2",children:[J("div",{className:"flex flex-shrink-0 items-center gap-1 rounded-md border border-border bg-background p-1",children:[!_&&!h&&V&&L("button",{onClick:V,className:"rounded p-1.5 text-muted-foreground transition-colors hover:bg-accent/50 hover:text-foreground",title:R?"Show Left Sidebar":"Hide Left Sidebar",children:R?L(l0,{className:"h-4 w-4"}):L(u0,{className:"h-4 w-4 fill-primary stroke-0"})}),!_&&!h&&Q&&C&&J(w,{children:[L("button",{onClick:()=>C("card"),className:`rounded p-1.5 transition-colors ${Q==="card"?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"}`,title:"Card View",children:L(w0,{className:"h-4 w-4"})}),L("button",{onClick:()=>C("list"),className:`rounded p-1.5 transition-colors ${Q==="list"?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"}`,title:"List View",children:L(b0,{className:"h-4 w-4"})})]}),L("button",{onClick:D,className:`rounded p-1.5 transition-colors ${!k&&!A?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"}`,title:k?"Show Right Sidebar":"Hide Right Sidebar",children:!k&&!A?L(x0,{className:"h-4 w-4 fill-primary stroke-0"}):L(c0,{className:"h-4 w-4"})})]}),!h&&B&&L(g0,{children:J(D0,{children:[L(p0,{asChild:!0,children:L("span",{children:L("button",{disabled:!1,onClick:B,className:l("h-9 w-9 flex items-center justify-center rounded-full border border-border bg-background transition-colors",A?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-accent hover:text-foreground",!1),children:A?L(j0,{className:"h-6 w-6 text-primary transition-colors"}):L(y0,{className:"h-6 w-6 text-muted-foreground transition-colors"})})})}),L(m0,{children:L("p",{children:A?X.hide_chatbot():X.show_chatbot()})})]})})]})]})}function I1(){let{projectState:N}=i0(),U=o0(),{isChatbotOpen:K,setIsChatbotOpen:S}=n0();if(!N)return L(J1,{});let{teamId:$,projectId:F,projectName:G,ancestorFolders:Q,currentAsset:C,isRootFolder:R,customTerminalBreadcrumb:V,fileId:k,downloadInfo:D,versions:A,isPublic:B,shareId:h,allowDownload:W,onFolderClick:Z,onRename:q,onDelete:_,compareMode:f,canCompareVersions:b,onCompareVersions:E}=N,H=!!k,x=!!V,y=!!h&&!H,j=H?U.fileViewLeftSidebarCollapsed:y?U.shareConfigLeftSidebarCollapsed:U.fileListLeftSidebarCollapsed,g=B?void 0:()=>H?U.setFileViewLeftSidebarCollapsed(!U.fileViewLeftSidebarCollapsed):y?U.setShareConfigLeftSidebarCollapsed(!U.shareConfigLeftSidebarCollapsed):U.setFileListLeftSidebarCollapsed(!U.fileListLeftSidebarCollapsed),p=B&&N.isRightSidebarCollapsed!==void 0?N.isRightSidebarCollapsed:H?U.fileViewRightSidebarCollapsed:y?U.shareConfigRightSidebarCollapsed:U.fileListRightSidebarCollapsed,r=B&&N.onRightSidebarToggle?N.onRightSidebarToggle:()=>{if(!B&&K)if(S(!1),H)U.setFileViewRightSidebarCollapsed(!1);else if(y)U.setShareConfigRightSidebarCollapsed(!1);else U.setFileListRightSidebarCollapsed(!1);else if(H)U.setFileViewRightSidebarCollapsed(!U.fileViewRightSidebarCollapsed);else if(y)U.setShareConfigRightSidebarCollapsed(!U.shareConfigRightSidebarCollapsed);else U.setFileListRightSidebarCollapsed(!U.fileListRightSidebarCollapsed)},m=B?void 0:()=>{S(!K)},U0=F?U.viewModes[F]??"card":"card";return L(t0,{teamId:$,projectId:F,projectName:G,ancestorFolders:Q,currentAsset:C,isRootFolder:R,customTerminalBreadcrumb:V,displayStyle:H||y||x?void 0:U0,onDisplayStyleChange:H||y||x?void 0:B?void 0:(v)=>{if(F)U.setViewMode(F,v)},isLeftSidebarCollapsed:j,onLeftSidebarToggle:g,isRightSidebarCollapsed:p,onRightSidebarToggle:r,isChatbotOpen:!B&&K,onChatbotToggle:m,isPublic:B,shareId:h,allowDownload:W,fileId:k,downloadInfo:D,versions:A,onFolderClick:Z,onRename:q,onDelete:_,compareMode:f,canCompareVersions:b,onCompareVersions:E})}function J1(){return L("div",{className:"flex h-14 flex-wrap items-center justify-center gap-2 border-b border-border bg-card px-4 py-2 flex-shrink-0",children:L(r0,{className:"w-10 h-10 text-orange-600"})})}
|
|
2
|
+
export{I1 as Xe};
|