cognova 0.2.8 → 0.2.10
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/.output/nitro.json +1 -1
- package/.output/public/_nuxt/{CH_jROT9.js → 0NJ3PaRM.js} +1 -1
- package/.output/public/_nuxt/{C075hYlX.js → 0yk-pS3R.js} +2 -2
- package/.output/public/_nuxt/{CVYcsqmL.js → 10_wwHSz.js} +1 -1
- package/.output/public/_nuxt/{BUC36BHp.js → 1zUTf4AP.js} +1 -1
- package/.output/public/_nuxt/{njnzCNrH.js → 2dNDtTiv.js} +3 -3
- package/.output/public/_nuxt/{B8TQvzYX.js → 2nOqGUPr.js} +1 -1
- package/.output/public/_nuxt/{ijmD2cEW.js → 3jQMk_5H.js} +1 -1
- package/.output/public/_nuxt/{D4X6ONPF.js → 4K03TkGA.js} +1 -1
- package/.output/public/_nuxt/{C3tximD1.js → 6boMs_nF.js} +1 -1
- package/.output/public/_nuxt/{Drxf7nJz.js → 7oCGSglN.js} +1 -1
- package/.output/public/_nuxt/{Dt5mOzXj.js → 8q5NepGW.js} +1 -1
- package/.output/public/_nuxt/{GYf-vnR6.js → B93pdGAW.js} +1 -1
- package/.output/public/_nuxt/{BZBNJD7U.js → BA_pRWwX.js} +1 -1
- package/.output/public/_nuxt/{eE8TtXgC.js → BDyn4ApB.js} +3 -3
- package/.output/public/_nuxt/{0dqQoCHY.js → BGgwYWjH.js} +1 -1
- package/.output/public/_nuxt/{BrOKokPO.js → BH0QDWEm.js} +1 -1
- package/.output/public/_nuxt/{B5SnZL2l.js → BHtY0l0l.js} +1 -1
- package/.output/public/_nuxt/{ImPsUDiH.js → BIXrSYwR.js} +1 -1
- package/.output/public/_nuxt/BK8S2ony.js +1 -0
- package/.output/public/_nuxt/{Bkc1Hpcf.js → BKXg-alD.js} +1 -1
- package/.output/public/_nuxt/{BahXyh-A.js → BLnYhy_t.js} +1 -1
- package/.output/public/_nuxt/{Bhhg7oSf.js → BR8bKz8h.js} +1 -1
- package/.output/public/_nuxt/{D2kQkOaG.js → BS2ZNXI1.js} +1 -1
- package/.output/public/_nuxt/{BLm0UviR.js → BUghTae1.js} +1 -1
- package/.output/public/_nuxt/{D4_89MZm.js → BXuWCWsJ.js} +1 -1
- package/.output/public/_nuxt/{LQNRVThr.js → BYHCP8x7.js} +1 -1
- package/.output/public/_nuxt/{BYtVdUIW.js → BZrSPX0S.js} +1 -1
- package/.output/public/_nuxt/{U3f6dy8i.js → B_wilgcd.js} +1 -1
- package/.output/public/_nuxt/BaZwjF8o.js +1 -0
- package/.output/public/_nuxt/{BefOhWHD.js → Bciqk4dX.js} +1 -1
- package/.output/public/_nuxt/{CewcVxDS.js → Beom-INj.js} +1 -1
- package/.output/public/_nuxt/{BlsIfvSf.js → BfcLZ_fC.js} +1 -1
- package/.output/public/_nuxt/{dB7G4iIC.js → Bk6JUtIo.js} +1 -1
- package/.output/public/_nuxt/BkfI94R8.js +1 -0
- package/.output/public/_nuxt/{DqzomZoo.js → BmOtR1wX.js} +1 -1
- package/.output/public/_nuxt/{4XnyUc7C.js → BmVLxnDU.js} +1 -1
- package/.output/public/_nuxt/{DtJnWtpL.js → BtHQ1T0f.js} +1 -1
- package/.output/public/_nuxt/{DcbbfwCe.js → ByYh0uRg.js} +1 -1
- package/.output/public/_nuxt/{CbvNJVrk.js → C27WoGNZ.js} +1 -1
- package/.output/public/_nuxt/{CY7f553E.js → C2FxZbO_.js} +1 -1
- package/.output/public/_nuxt/{zO9MgHj2.js → C2vq6Te8.js} +1 -1
- package/.output/public/_nuxt/{BXtZVbmx.js → C39dQ88F.js} +1 -1
- package/.output/public/_nuxt/{DmDPSvxi.js → C3NST0BU.js} +1 -1
- package/.output/public/_nuxt/{nHSiDk8N.js → C4mwL7SE.js} +1 -1
- package/.output/public/_nuxt/{BBDxhFYY.js → C5R5QaCA.js} +1 -1
- package/.output/public/_nuxt/{D79lbuWG.js → C6qKcgOY.js} +1 -1
- package/.output/public/_nuxt/{C-HCArYP.js → C71_a1IX.js} +1 -1
- package/.output/public/_nuxt/{CSjOaBKu.js → C9WIgRRL.js} +1 -1
- package/.output/public/_nuxt/{DmOS3vFH.js → CBTkrk2M.js} +1 -1
- package/.output/public/_nuxt/CEnSeCqn.js +1 -0
- package/.output/public/_nuxt/{CAfyXyeo.js → CKxSHyww.js} +1 -1
- package/.output/public/_nuxt/{D4Cizi4y.js → CLfF6dSn.js} +1 -1
- package/.output/public/_nuxt/{C7qhmmZh.js → CPutXj8l.js} +1 -1
- package/.output/public/_nuxt/{BCCYopTB.js → CQqCBrXj.js} +1 -1
- package/.output/public/_nuxt/{D-Ge96eV.js → CSKJ-Ahh.js} +1 -1
- package/.output/public/_nuxt/{B2Xfh7am.js → CTCcEJU3.js} +1 -1
- package/.output/public/_nuxt/{BnJ-6YDw.js → CVFwOzbl.js} +1 -1
- package/.output/public/_nuxt/{C21BjagS.js → CVdCqaby.js} +1 -1
- package/.output/public/_nuxt/{2QHXgMyi.js → CVqlefTY.js} +1 -1
- package/.output/public/_nuxt/CWyMCJQH.js +1 -0
- package/.output/public/_nuxt/{B6-U3KqJ.js → CY-QVcA5.js} +2 -2
- package/.output/public/_nuxt/{Cr0NfhPB.js → CY-cjAwJ.js} +1 -1
- package/.output/public/_nuxt/{Bwn-CRYH.js → CYPO5o_C.js} +1 -1
- package/.output/public/_nuxt/{B-AlyT2D.js → CZRnNmU8.js} +1 -1
- package/.output/public/_nuxt/{DwIYtFfA.js → CZVzFlpI.js} +1 -1
- package/.output/public/_nuxt/{BkO884Ds.js → CZoEPC_Q.js} +3 -3
- package/.output/public/_nuxt/{BJUff9Ku.js → Cc-2ziaZ.js} +1 -1
- package/.output/public/_nuxt/{BLwctszt.js → ChcO9s3o.js} +1 -1
- package/.output/public/_nuxt/{DX_9SfFb.js → Cl-LOSDV.js} +1 -1
- package/.output/public/_nuxt/{CSHcfejh.js → CobqYwkp.js} +1 -1
- package/.output/public/_nuxt/{B0xuHXvN.js → CqNwHCpo.js} +1 -1
- package/.output/public/_nuxt/{DMb_1D81.js → CuxrHsu-.js} +1 -1
- package/.output/public/_nuxt/{GGcn5KPW.js → CwPdIZ9J.js} +1 -1
- package/.output/public/_nuxt/{D7pKT3IW.js → D0ifH682.js} +1 -1
- package/.output/public/_nuxt/{KEeoKtq_.js → D3AZaldL.js} +1 -1
- package/.output/public/_nuxt/{BdxP21ep.js → D4UJwDQJ.js} +1 -1
- package/.output/public/_nuxt/{C-Ygk9x5.js → D5jZq8b3.js} +1 -1
- package/.output/public/_nuxt/{B6G3NLfW.js → D5q8SnqE.js} +1 -1
- package/.output/public/_nuxt/{CDkyQ1eQ.js → D8M722pn.js} +1 -1
- package/.output/public/_nuxt/{BjnQ1pI1.js → D8lwrAYS.js} +1 -1
- package/.output/public/_nuxt/{C13FKhqK.js → D9nmzBAw.js} +1 -1
- package/.output/public/_nuxt/{ClGn48iq.js → DC4idAGt.js} +1 -1
- package/.output/public/_nuxt/{vES4kgx7.js → DEd2xVbS.js} +1 -1
- package/.output/public/_nuxt/{CClsKJ9A.js → DH4YkDAi.js} +1 -1
- package/.output/public/_nuxt/{D-5A6cMB.js → DJTCT0bl.js} +1 -1
- package/.output/public/_nuxt/{D_O7SlHm.js → DNP5E1bC.js} +1 -1
- package/.output/public/_nuxt/{BF3tVKtX.js → DO9SFIh1.js} +1 -1
- package/.output/public/_nuxt/DPklr_tJ.js +2 -0
- package/.output/public/_nuxt/{mfAEx0Kz.js → DQM4eBdt.js} +1 -1
- package/.output/public/_nuxt/{cPPThz84.js → DQh6I9z9.js} +1 -1
- package/.output/public/_nuxt/{CXTrUfQ5.js → DS2wStH1.js} +1 -1
- package/.output/public/_nuxt/{CYQP4zpi.js → DTAStixR.js} +1 -1
- package/.output/public/_nuxt/{CEz288t8.js → DTGenhcA.js} +1 -1
- package/.output/public/_nuxt/{B9zgEO8N.js → DUAAXJ6Q.js} +1 -1
- package/.output/public/_nuxt/{CzAZpALW.js → DUVzIl3o.js} +1 -1
- package/.output/public/_nuxt/{DJt7Rogf.js → DXdwpJ-I.js} +1 -1
- package/.output/public/_nuxt/{MWUW1sIF.js → DY3uK7wM.js} +1 -1
- package/.output/public/_nuxt/{CfY_bsV0.js → DYbZBZet.js} +1 -1
- package/.output/public/_nuxt/{DZEuR9ms.js → D_4LPm1U.js} +1 -1
- package/.output/public/_nuxt/{CrmE-JGu.js → Db4KMnt8.js} +1 -1
- package/.output/public/_nuxt/{BwC62XRN.js → DcJbYLTp.js} +1 -1
- package/.output/public/_nuxt/{C6sX7TYf.js → DfF81NlA.js} +1 -1
- package/.output/public/_nuxt/{BHn8tRjg.js → DhI5cA_n.js} +1 -1
- package/.output/public/_nuxt/{CQ3tAemj.js → DhuOKJda.js} +1 -1
- package/.output/public/_nuxt/{D887s9k9.js → Di-Nc75e.js} +1 -1
- package/.output/public/_nuxt/{D_obX2Hj.js → Djs0Tlpa.js} +1 -1
- package/.output/public/_nuxt/DmmdPt_5.js +1 -0
- package/.output/public/_nuxt/{DKKY8zWm.js → Dn5a-guE.js} +1 -1
- package/.output/public/_nuxt/{BvstjGHC.js → DtjjnHnt.js} +1 -1
- package/.output/public/_nuxt/{Dbfwn2zk.js → DuvzM-P1.js} +1 -1
- package/.output/public/_nuxt/{BxShcW0K.js → DwY7rCd_.js} +1 -1
- package/.output/public/_nuxt/{BmaHzvZM.js → Dya5oK8u.js} +1 -1
- package/.output/public/_nuxt/{CO3hceDE.js → DzA58_Lm.js} +1 -1
- package/.output/public/_nuxt/{CF33v_m5.js → DzGy77Vr.js} +1 -1
- package/.output/public/_nuxt/{DmlZSBjF.js → E3rXPwU8.js} +1 -1
- package/.output/public/_nuxt/{CEDw8osP.js → EgKnQnf-.js} +1 -1
- package/.output/public/_nuxt/{it8syoZI.js → GtEM7xVU.js} +1 -1
- package/.output/public/_nuxt/{DLUvsixu.js → H6JbrRBU.js} +1 -1
- package/.output/public/_nuxt/{BE1CVWts.js → ILEvizzp.js} +1 -1
- package/.output/public/_nuxt/{BSA-U0so.js → JX1oqJI9.js} +1 -1
- package/.output/public/_nuxt/{yJ9vRvHj.js → JbHa4oXq.js} +1 -1
- package/.output/public/_nuxt/{zXvvpsZj.js → Kw0zy3FG.js} +1 -1
- package/.output/public/_nuxt/{C6FFW_cO.js → N5XtbYVD.js} +1 -1
- package/.output/public/_nuxt/{D04CyXmf.js → PP_4ebzl.js} +1 -1
- package/.output/public/_nuxt/{6QDVg5TO.js → SrncdpaW.js} +1 -1
- package/.output/public/_nuxt/{36ZHqDPo.js → U1MWjQMi.js} +1 -1
- package/.output/public/_nuxt/{mT7Mt2d7.js → Um1vPiAz.js} +1 -1
- package/.output/public/_nuxt/{CqFcWBkW.js → XCjS70z4.js} +1 -1
- package/.output/public/_nuxt/{C24so3m7.js → YX8avsvq.js} +2 -2
- package/.output/public/_nuxt/{DaBSQDif.js → _cy8R3nk.js} +1 -1
- package/.output/public/_nuxt/{D9aYkNhQ.js → apYB9dr5.js} +1 -1
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/def74b99-d70c-4f30-aa29-70248cbeac7d.json +1 -0
- package/.output/public/_nuxt/entry.NKPfH2kE.css +1 -0
- package/.output/public/_nuxt/{BqTdsCnW.js → fbyIeNkc.js} +1 -1
- package/.output/public/_nuxt/{-2AbaFNH.js → g5MjDvm5.js} +1 -1
- package/.output/public/_nuxt/{C1tCdK-M.js → gTrVszwd.js} +1 -1
- package/.output/public/_nuxt/{BVEFmI4I.js → ixlNW2So.js} +1 -1
- package/.output/public/_nuxt/{DtyyytRx.js → nnQqD5pb.js} +1 -1
- package/.output/public/_nuxt/{pHCJ6lhw.js → rfGRTJJW.js} +1 -1
- package/.output/public/_nuxt/{Buf1PAiO.js → t8aDAkZ5.js} +1 -1
- package/.output/public/_nuxt/{BmdlymIW.js → vIOxcXKR.js} +1 -1
- package/.output/public/_nuxt/{Cve4psva.js → vScW1Zgm.js} +1 -1
- package/.output/public/_nuxt/{SfaNtyKS.js → wO6z2ugJ.js} +1 -1
- package/.output/public/_nuxt/{BhYoxmLV.js → x6FRJ5ac.js} +1 -1
- package/.output/public/_nuxt/{Pn7VD6uQ.js → zq-a1TeT.js} +1 -1
- package/.output/server/chunks/build/{chat-CZMiB68R.mjs → chat-CR3JIVEq.mjs} +65 -11
- package/.output/server/chunks/build/chat-CR3JIVEq.mjs.map +1 -0
- package/.output/server/chunks/build/client.precomputed.mjs +1 -1
- package/.output/server/chunks/build/server.mjs +3 -3
- package/.output/server/chunks/build/{settings-ByUXa46k.mjs → settings-B2KXoGcz.mjs} +213 -26
- package/.output/server/chunks/build/settings-B2KXoGcz.mjs.map +1 -0
- package/.output/server/chunks/build/styles.mjs +2 -2
- package/.output/server/chunks/build/{usage-CSrBh4Or.mjs → usage-BHdQZbfI.mjs} +9 -5
- package/.output/server/chunks/build/{usage-CSrBh4Or.mjs.map → usage-BHdQZbfI.mjs.map} +1 -1
- package/.output/server/chunks/nitro/nitro.mjs +1161 -891
- package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
- package/.output/server/chunks/routes/_ws/chat.mjs +2 -1
- package/.output/server/chunks/routes/_ws/chat.mjs.map +1 -1
- package/.output/server/chunks/routes/api/conversations/_id_.delete.mjs +4 -1
- package/.output/server/chunks/routes/api/conversations/_id_.delete.mjs.map +1 -1
- package/.output/server/chunks/routes/api/index.get3.mjs +1 -1
- package/.output/server/chunks/routes/api/index.get3.mjs.map +1 -1
- package/.output/server/chunks/routes/api/usage/stats.get.mjs +2 -0
- package/.output/server/chunks/routes/api/usage/stats.get.mjs.map +1 -1
- package/.output/server/package.json +1 -1
- package/app/components/chat/ConversationList.vue +7 -1
- package/app/components/chat/MessageBubble.vue +45 -1
- package/app/components/usage/UsageRecordsTable.vue +4 -2
- package/app/components/usage/UsageSourceDonut.client.vue +4 -2
- package/app/components/usage/UsageTopConsumers.vue +4 -2
- package/app/composables/useChat.ts +3 -0
- package/app/pages/settings.vue +148 -9
- package/package.json +1 -1
- package/server/api/conversations/[id].delete.ts +9 -0
- package/server/api/conversations/index.get.ts +2 -1
- package/server/api/usage/stats.get.ts +2 -0
- package/server/bridge/adapters/telegram.ts +83 -8
- package/server/bridge/responder.ts +248 -0
- package/server/bridge/router.ts +6 -4
- package/server/db/schema.ts +3 -1
- package/server/drizzle/migrations/0015_great_mephistopheles.sql +2 -0
- package/server/drizzle/migrations/meta/0015_snapshot.json +1972 -0
- package/server/drizzle/migrations/meta/_journal.json +7 -0
- package/server/routes/_ws/chat.ts +2 -1
- package/server/utils/log-token-usage.ts +1 -1
- package/shared/types/index.ts +6 -0
- package/.output/public/_nuxt/BIo-9u_O.js +0 -1
- package/.output/public/_nuxt/BMs0mHEp.js +0 -1
- package/.output/public/_nuxt/BwyXWqBY.js +0 -1
- package/.output/public/_nuxt/CE9_ECxx.js +0 -1
- package/.output/public/_nuxt/DmcMCO8x.js +0 -1
- package/.output/public/_nuxt/JReYPlwF.js +0 -2
- package/.output/public/_nuxt/builds/meta/410e449d-9fe8-43a0-ae07-80797693b9b8.json +0 -1
- package/.output/public/_nuxt/entry._7ZkP07A.css +0 -1
- package/.output/public/_nuxt/iBaivqi8.js +0 -1
- package/.output/server/chunks/build/chat-CZMiB68R.mjs.map +0 -1
- package/.output/server/chunks/build/settings-ByUXa46k.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as Y,c as R,q as gt,a5 as wt,a as ae,aR as Ke,a4 as ce,a_ as ge,bN as Ze,Q as Je,R as ne,S as we,C as _,a3 as _e,G as de,V as Ee,s as yt,f as Ae,l as vt,aB as xt,bO as ee,bP as bt,bQ as At,y as Ct,T as et,aV as tt}from"./njnzCNrH.js";function Ot(e){const t=Y(),n=R(()=>t.value?.width??0),o=R(()=>t.value?.height??0);return gt(()=>{const i=wt(e);if(i){t.value={width:i.offsetWidth,height:i.offsetHeight};const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const l=s[0];let c,f;if("borderBoxSize"in l){const u=l.borderBoxSize,a=Array.isArray(u)?u[0]:u;c=a.inlineSize,f=a.blockSize}else c=i.offsetWidth,f=i.offsetHeight;t.value={width:c,height:f}});return r.observe(i,{box:"border-box"}),()=>r.unobserve(i)}else t.value=void 0}),{width:n,height:o}}const[nt,Pt]=Ke("PopperRoot");var St=ae({inheritAttrs:!1,__name:"PopperRoot",setup(e){const t=Y();return Pt({anchor:t,onAnchorChange:n=>t.value=n}),(n,o)=>ce(n.$slots,"default")}}),Yn=St,Rt=ae({__name:"PopperAnchor",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,{forwardRef:n,currentElement:o}=ge(),i=nt();return Ze(()=>{i.onAnchorChange(t.reference??o.value)}),(r,s)=>(ne(),Je(_(_e),{ref:_(n),as:r.as,"as-child":r.asChild},{default:we(()=>[ce(r.$slots,"default")]),_:3},8,["as","as-child"]))}}),jn=Rt;const _t={key:0,d:"M0 0L6 6L12 0"},Et={key:1,d:"M0 0L4.58579 4.58579C5.36683 5.36683 6.63316 5.36684 7.41421 4.58579L12 0"};var Lt=ae({__name:"Arrow",props:{width:{type:Number,required:!1,default:10},height:{type:Number,required:!1,default:5},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"svg"}},setup(e){const t=e;return ge(),(n,o)=>(ne(),Je(_(_e),Ee(t,{width:n.width,height:n.height,viewBox:n.asChild?void 0:"0 0 12 6",preserveAspectRatio:n.asChild?void 0:"none"}),{default:we(()=>[ce(n.$slots,"default",{},()=>[n.rounded?(ne(),de("path",Et)):(ne(),de("path",_t))])]),_:3},16,["width","height","viewBox","preserveAspectRatio"]))}}),Dt=Lt;function Bt(e){return e!==null}function Tt(e){return{name:"transformOrigin",options:e,fn(t){const{placement:n,rects:o,middlewareData:i}=t,s=i.arrow?.centerOffset!==0,l=s?0:e.arrowWidth,c=s?0:e.arrowHeight,[f,u]=Oe(n),a={start:"0%",center:"50%",end:"100%"}[u],h=(i.arrow?.x??0)+l/2,d=(i.arrow?.y??0)+c/2;let p="",m="";return f==="bottom"?(p=s?a:`${h}px`,m=`${-c}px`):f==="top"?(p=s?a:`${h}px`,m=`${o.floating.height+c}px`):f==="right"?(p=`${-c}px`,m=s?a:`${d}px`):f==="left"&&(p=`${o.floating.width+c}px`,m=s?a:`${d}px`),{data:{x:p,y:m}}}}}function Oe(e){const[t,n="center"]=e.split("-");return[t,n]}const ot=["top","right","bottom","left"],qe=["start","end"],We=ot.reduce((e,t)=>e.concat(t,t+"-"+qe[0],t+"-"+qe[1]),[]),V=Math.min,$=Math.max,pe=Math.round,ue=Math.floor,j=e=>({x:e,y:e}),$t={left:"right",right:"left",bottom:"top",top:"bottom"},kt={start:"end",end:"start"};function Pe(e,t,n){return $(e,V(t,n))}function z(e,t){return typeof e=="function"?e(t):e}function W(e){return e.split("-")[0]}function N(e){return e.split("-")[1]}function Le(e){return e==="x"?"y":"x"}function De(e){return e==="y"?"height":"width"}const Ft=new Set(["top","bottom"]);function H(e){return Ft.has(W(e))?"y":"x"}function Be(e){return Le(H(e))}function it(e,t,n){n===void 0&&(n=!1);const o=N(e),i=Be(e),r=De(i);let s=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[r]>t.floating[r]&&(s=me(s)),[s,me(s)]}function Mt(e){const t=me(e);return[he(e),t,he(t)]}function he(e){return e.replace(/start|end/g,t=>kt[t])}const He=["left","right"],Ne=["right","left"],qt=["top","bottom"],Wt=["bottom","top"];function Ht(e,t,n){switch(e){case"top":case"bottom":return n?t?Ne:He:t?He:Ne;case"left":case"right":return t?qt:Wt;default:return[]}}function Nt(e,t,n,o){const i=N(e);let r=Ht(W(e),n==="start",o);return i&&(r=r.map(s=>s+"-"+i),t&&(r=r.concat(r.map(he)))),r}function me(e){return e.replace(/left|right|bottom|top/g,t=>$t[t])}function Vt(e){return{top:0,right:0,bottom:0,left:0,...e}}function Te(e){return typeof e!="number"?Vt(e):{top:e,right:e,bottom:e,left:e}}function ie(e){const{x:t,y:n,width:o,height:i}=e;return{width:o,height:i,top:n,left:t,right:t+o,bottom:n+i,x:t,y:n}}function Ve(e,t,n){let{reference:o,floating:i}=e;const r=H(t),s=Be(t),l=De(s),c=W(t),f=r==="y",u=o.x+o.width/2-i.width/2,a=o.y+o.height/2-i.height/2,h=o[l]/2-i[l]/2;let d;switch(c){case"top":d={x:u,y:o.y-i.height};break;case"bottom":d={x:u,y:o.y+o.height};break;case"right":d={x:o.x+o.width,y:a};break;case"left":d={x:o.x-i.width,y:a};break;default:d={x:o.x,y:o.y}}switch(N(t)){case"start":d[s]-=h*(n&&f?-1:1);break;case"end":d[s]+=h*(n&&f?-1:1);break}return d}const zt=async(e,t,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:s}=n,l=r.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(t));let f=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:a}=Ve(f,o,c),h=o,d={},p=0;for(let m=0;m<l.length;m++){const{name:g,fn:w}=l[m],{x:y,y:v,data:A,reset:x}=await w({x:u,y:a,initialPlacement:o,placement:h,strategy:i,middlewareData:d,rects:f,platform:s,elements:{reference:e,floating:t}});u=y??u,a=v??a,d={...d,[g]:{...d[g],...A}},x&&p<=50&&(p++,typeof x=="object"&&(x.placement&&(h=x.placement),x.rects&&(f=x.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:a}=Ve(f,h,c)),m=-1)}return{x:u,y:a,placement:h,strategy:i,middlewareData:d}};async function re(e,t){var n;t===void 0&&(t={});const{x:o,y:i,platform:r,rects:s,elements:l,strategy:c}=e,{boundary:f="clippingAncestors",rootBoundary:u="viewport",elementContext:a="floating",altBoundary:h=!1,padding:d=0}=z(t,e),p=Te(d),g=l[h?a==="floating"?"reference":"floating":a],w=ie(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(g)))==null||n?g:g.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(l.floating)),boundary:f,rootBoundary:u,strategy:c})),y=a==="floating"?{x:o,y:i,width:s.floating.width,height:s.floating.height}:s.reference,v=await(r.getOffsetParent==null?void 0:r.getOffsetParent(l.floating)),A=await(r.isElement==null?void 0:r.isElement(v))?await(r.getScale==null?void 0:r.getScale(v))||{x:1,y:1}:{x:1,y:1},x=ie(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:y,offsetParent:v,strategy:c}):y);return{top:(w.top-x.top+p.top)/A.y,bottom:(x.bottom-w.bottom+p.bottom)/A.y,left:(w.left-x.left+p.left)/A.x,right:(x.right-w.right+p.right)/A.x}}const It=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:i,rects:r,platform:s,elements:l,middlewareData:c}=t,{element:f,padding:u=0}=z(e,t)||{};if(f==null)return{};const a=Te(u),h={x:n,y:o},d=Be(i),p=De(d),m=await s.getDimensions(f),g=d==="y",w=g?"top":"left",y=g?"bottom":"right",v=g?"clientHeight":"clientWidth",A=r.reference[p]+r.reference[d]-h[d]-r.floating[p],x=h[d]-r.reference[d],O=await(s.getOffsetParent==null?void 0:s.getOffsetParent(f));let b=O?O[v]:0;(!b||!await(s.isElement==null?void 0:s.isElement(O)))&&(b=l.floating[v]||r.floating[p]);const S=A/2-x/2,E=b/2-m[p]/2-1,C=V(a[w],E),L=V(a[y],E),P=C,B=b-m[p]-L,D=b/2-m[p]/2+S,M=Pe(P,D,B),F=!c.arrow&&N(i)!=null&&D!==M&&r.reference[p]/2-(D<P?C:L)-m[p]/2<0,k=F?D<P?D-P:D-B:0;return{[d]:h[d]+k,data:{[d]:M,centerOffset:D-M-k,...F&&{alignmentOffset:k}},reset:F}}});function Xt(e,t,n){return(e?[...n.filter(i=>N(i)===e),...n.filter(i=>N(i)!==e)]:n.filter(i=>W(i)===i)).filter(i=>e?N(i)===e||(t?he(i)!==i:!1):!0)}const Yt=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,o,i;const{rects:r,middlewareData:s,placement:l,platform:c,elements:f}=t,{crossAxis:u=!1,alignment:a,allowedPlacements:h=We,autoAlignment:d=!0,...p}=z(e,t),m=a!==void 0||h===We?Xt(a||null,d,h):h,g=await re(t,p),w=((n=s.autoPlacement)==null?void 0:n.index)||0,y=m[w];if(y==null)return{};const v=it(y,r,await(c.isRTL==null?void 0:c.isRTL(f.floating)));if(l!==y)return{reset:{placement:m[0]}};const A=[g[W(y)],g[v[0]],g[v[1]]],x=[...((o=s.autoPlacement)==null?void 0:o.overflows)||[],{placement:y,overflows:A}],O=m[w+1];if(O)return{data:{index:w+1,overflows:x},reset:{placement:O}};const b=x.map(C=>{const L=N(C.placement);return[C.placement,L&&u?C.overflows.slice(0,2).reduce((P,B)=>P+B,0):C.overflows[0],C.overflows]}).sort((C,L)=>C[1]-L[1]),E=((i=b.filter(C=>C[2].slice(0,N(C[0])?2:3).every(L=>L<=0))[0])==null?void 0:i[0])||b[0][0];return E!==l?{data:{index:w+1,overflows:x},reset:{placement:E}}:{}}}},jt=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:i,middlewareData:r,rects:s,initialPlacement:l,platform:c,elements:f}=t,{mainAxis:u=!0,crossAxis:a=!0,fallbackPlacements:h,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...g}=z(e,t);if((n=r.arrow)!=null&&n.alignmentOffset)return{};const w=W(i),y=H(l),v=W(l)===l,A=await(c.isRTL==null?void 0:c.isRTL(f.floating)),x=h||(v||!m?[me(l)]:Mt(l)),O=p!=="none";!h&&O&&x.push(...Nt(l,m,p,A));const b=[l,...x],S=await re(t,g),E=[];let C=((o=r.flip)==null?void 0:o.overflows)||[];if(u&&E.push(S[w]),a){const D=it(i,s,A);E.push(S[D[0]],S[D[1]])}if(C=[...C,{placement:i,overflows:E}],!E.every(D=>D<=0)){var L,P;const D=(((L=r.flip)==null?void 0:L.index)||0)+1,M=b[D];if(M&&(!(a==="alignment"?y!==H(M):!1)||C.every(T=>H(T.placement)===y?T.overflows[0]>0:!0)))return{data:{index:D,overflows:C},reset:{placement:M}};let F=(P=C.filter(k=>k.overflows[0]<=0).sort((k,T)=>k.overflows[1]-T.overflows[1])[0])==null?void 0:P.placement;if(!F)switch(d){case"bestFit":{var B;const k=(B=C.filter(T=>{if(O){const G=H(T.placement);return G===y||G==="y"}return!0}).map(T=>[T.placement,T.overflows.filter(G=>G>0).reduce((G,mt)=>G+mt,0)]).sort((T,G)=>T[1]-G[1])[0])==null?void 0:B[0];k&&(F=k);break}case"initialPlacement":F=l;break}if(i!==F)return{reset:{placement:F}}}return{}}}};function ze(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ie(e){return ot.some(t=>e[t]>=0)}const Ut=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...i}=z(e,t);switch(o){case"referenceHidden":{const r=await re(t,{...i,elementContext:"reference"}),s=ze(r,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Ie(s)}}}case"escaped":{const r=await re(t,{...i,altBoundary:!0}),s=ze(r,n.floating);return{data:{escapedOffsets:s,escaped:Ie(s)}}}default:return{}}}}};function rt(e){const t=V(...e.map(r=>r.left)),n=V(...e.map(r=>r.top)),o=$(...e.map(r=>r.right)),i=$(...e.map(r=>r.bottom));return{x:t,y:n,width:o-t,height:i-n}}function Qt(e){const t=e.slice().sort((i,r)=>i.y-r.y),n=[];let o=null;for(let i=0;i<t.length;i++){const r=t[i];!o||r.y-o.y>o.height/2?n.push([r]):n[n.length-1].push(r),o=r}return n.map(i=>ie(rt(i)))}const Gt=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){const{placement:n,elements:o,rects:i,platform:r,strategy:s}=t,{padding:l=2,x:c,y:f}=z(e,t),u=Array.from(await(r.getClientRects==null?void 0:r.getClientRects(o.reference))||[]),a=Qt(u),h=ie(rt(u)),d=Te(l);function p(){if(a.length===2&&a[0].left>a[1].right&&c!=null&&f!=null)return a.find(g=>c>g.left-d.left&&c<g.right+d.right&&f>g.top-d.top&&f<g.bottom+d.bottom)||h;if(a.length>=2){if(H(n)==="y"){const C=a[0],L=a[a.length-1],P=W(n)==="top",B=C.top,D=L.bottom,M=P?C.left:L.left,F=P?C.right:L.right,k=F-M,T=D-B;return{top:B,bottom:D,left:M,right:F,width:k,height:T,x:M,y:B}}const g=W(n)==="left",w=$(...a.map(C=>C.right)),y=V(...a.map(C=>C.left)),v=a.filter(C=>g?C.left===y:C.right===w),A=v[0].top,x=v[v.length-1].bottom,O=y,b=w,S=b-O,E=x-A;return{top:A,bottom:x,left:O,right:b,width:S,height:E,x:O,y:A}}return h}const m=await r.getElementRects({reference:{getBoundingClientRect:p},floating:o.floating,strategy:s});return i.reference.x!==m.reference.x||i.reference.y!==m.reference.y||i.reference.width!==m.reference.width||i.reference.height!==m.reference.height?{reset:{rects:m}}:{}}}},st=new Set(["left","top"]);async function Kt(e,t){const{placement:n,platform:o,elements:i}=e,r=await(o.isRTL==null?void 0:o.isRTL(i.floating)),s=W(n),l=N(n),c=H(n)==="y",f=st.has(s)?-1:1,u=r&&c?-1:1,a=z(t,e);let{mainAxis:h,crossAxis:d,alignmentAxis:p}=typeof a=="number"?{mainAxis:a,crossAxis:0,alignmentAxis:null}:{mainAxis:a.mainAxis||0,crossAxis:a.crossAxis||0,alignmentAxis:a.alignmentAxis};return l&&typeof p=="number"&&(d=l==="end"?p*-1:p),c?{x:d*u,y:h*f}:{x:h*f,y:d*u}}const Zt=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:i,y:r,placement:s,middlewareData:l}=t,c=await Kt(t,e);return s===((n=l.offset)==null?void 0:n.placement)&&(o=l.arrow)!=null&&o.alignmentOffset?{}:{x:i+c.x,y:r+c.y,data:{...c,placement:s}}}}},Jt=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:i}=t,{mainAxis:r=!0,crossAxis:s=!1,limiter:l={fn:g=>{let{x:w,y}=g;return{x:w,y}}},...c}=z(e,t),f={x:n,y:o},u=await re(t,c),a=H(W(i)),h=Le(a);let d=f[h],p=f[a];if(r){const g=h==="y"?"top":"left",w=h==="y"?"bottom":"right",y=d+u[g],v=d-u[w];d=Pe(y,d,v)}if(s){const g=a==="y"?"top":"left",w=a==="y"?"bottom":"right",y=p+u[g],v=p-u[w];p=Pe(y,p,v)}const m=l.fn({...t,[h]:d,[a]:p});return{...m,data:{x:m.x-n,y:m.y-o,enabled:{[h]:r,[a]:s}}}}}},en=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:i,rects:r,middlewareData:s}=t,{offset:l=0,mainAxis:c=!0,crossAxis:f=!0}=z(e,t),u={x:n,y:o},a=H(i),h=Le(a);let d=u[h],p=u[a];const m=z(l,t),g=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(c){const v=h==="y"?"height":"width",A=r.reference[h]-r.floating[v]+g.mainAxis,x=r.reference[h]+r.reference[v]-g.mainAxis;d<A?d=A:d>x&&(d=x)}if(f){var w,y;const v=h==="y"?"width":"height",A=st.has(W(i)),x=r.reference[a]-r.floating[v]+(A&&((w=s.offset)==null?void 0:w[a])||0)+(A?0:g.crossAxis),O=r.reference[a]+r.reference[v]+(A?0:((y=s.offset)==null?void 0:y[a])||0)-(A?g.crossAxis:0);p<x?p=x:p>O&&(p=O)}return{[h]:d,[a]:p}}}},tn=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:i,rects:r,platform:s,elements:l}=t,{apply:c=()=>{},...f}=z(e,t),u=await re(t,f),a=W(i),h=N(i),d=H(i)==="y",{width:p,height:m}=r.floating;let g,w;a==="top"||a==="bottom"?(g=a,w=h===(await(s.isRTL==null?void 0:s.isRTL(l.floating))?"start":"end")?"left":"right"):(w=a,g=h==="end"?"top":"bottom");const y=m-u.top-u.bottom,v=p-u.left-u.right,A=V(m-u[g],y),x=V(p-u[w],v),O=!t.middlewareData.shift;let b=A,S=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(S=v),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(b=y),O&&!h){const C=$(u.left,0),L=$(u.right,0),P=$(u.top,0),B=$(u.bottom,0);d?S=p-2*(C!==0||L!==0?C+L:$(u.left,u.right)):b=m-2*(P!==0||B!==0?P+B:$(u.top,u.bottom))}await c({...t,availableWidth:S,availableHeight:b});const E=await s.getDimensions(l.floating);return p!==E.width||m!==E.height?{reset:{rects:!0}}:{}}}};function ye(){return typeof window<"u"}function J(e){return $e(e)?(e.nodeName||"").toLowerCase():"#document"}function q(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Q(e){var t;return(t=($e(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function $e(e){return ye()?e instanceof Node||e instanceof q(e).Node:!1}function I(e){return ye()?e instanceof Element||e instanceof q(e).Element:!1}function U(e){return ye()?e instanceof HTMLElement||e instanceof q(e).HTMLElement:!1}function Xe(e){return!ye()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof q(e).ShadowRoot}const nn=new Set(["inline","contents"]);function fe(e){const{overflow:t,overflowX:n,overflowY:o,display:i}=X(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!nn.has(i)}const on=new Set(["table","td","th"]);function rn(e){return on.has(J(e))}const sn=[":popover-open",":modal"];function ve(e){return sn.some(t=>{try{return e.matches(t)}catch{return!1}})}const ln=["transform","translate","scale","rotate","perspective"],an=["transform","translate","scale","rotate","perspective","filter"],cn=["paint","layout","strict","content"];function ke(e){const t=Fe(),n=I(e)?X(e):e;return ln.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||an.some(o=>(n.willChange||"").includes(o))||cn.some(o=>(n.contain||"").includes(o))}function fn(e){let t=K(e);for(;U(t)&&!se(t);){if(ke(t))return t;if(ve(t))return null;t=K(t)}return null}function Fe(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const un=new Set(["html","body","#document"]);function se(e){return un.has(J(e))}function X(e){return q(e).getComputedStyle(e)}function xe(e){return I(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function K(e){if(J(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Xe(e)&&e.host||Q(e);return Xe(t)?t.host:t}function lt(e){const t=K(e);return se(t)?e.ownerDocument?e.ownerDocument.body:e.body:U(t)&&fe(t)?t:lt(t)}function le(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=lt(e),r=i===((o=e.ownerDocument)==null?void 0:o.body),s=q(i);if(r){const l=Se(s);return t.concat(s,s.visualViewport||[],fe(i)?i:[],l&&n?le(l):[])}return t.concat(i,le(i,[],n))}function Se(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function at(e){const t=X(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const i=U(e),r=i?e.offsetWidth:n,s=i?e.offsetHeight:o,l=pe(n)!==r||pe(o)!==s;return l&&(n=r,o=s),{width:n,height:o,$:l}}function Me(e){return I(e)?e:e.contextElement}function oe(e){const t=Me(e);if(!U(t))return j(1);const n=t.getBoundingClientRect(),{width:o,height:i,$:r}=at(t);let s=(r?pe(n.width):n.width)/o,l=(r?pe(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}const dn=j(0);function ct(e){const t=q(e);return!Fe()||!t.visualViewport?dn:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function pn(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==q(e)?!1:t}function Z(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),r=Me(e);let s=j(1);t&&(o?I(o)&&(s=oe(o)):s=oe(e));const l=pn(r,n,o)?ct(r):j(0);let c=(i.left+l.x)/s.x,f=(i.top+l.y)/s.y,u=i.width/s.x,a=i.height/s.y;if(r){const h=q(r),d=o&&I(o)?q(o):o;let p=h,m=Se(p);for(;m&&o&&d!==p;){const g=oe(m),w=m.getBoundingClientRect(),y=X(m),v=w.left+(m.clientLeft+parseFloat(y.paddingLeft))*g.x,A=w.top+(m.clientTop+parseFloat(y.paddingTop))*g.y;c*=g.x,f*=g.y,u*=g.x,a*=g.y,c+=v,f+=A,p=q(m),m=Se(p)}}return ie({width:u,height:a,x:c,y:f})}function be(e,t){const n=xe(e).scrollLeft;return t?t.left+n:Z(Q(e)).left+n}function ft(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-be(e,n),i=n.top+t.scrollTop;return{x:o,y:i}}function hn(e){let{elements:t,rect:n,offsetParent:o,strategy:i}=e;const r=i==="fixed",s=Q(o),l=t?ve(t.floating):!1;if(o===s||l&&r)return n;let c={scrollLeft:0,scrollTop:0},f=j(1);const u=j(0),a=U(o);if((a||!a&&!r)&&((J(o)!=="body"||fe(s))&&(c=xe(o)),U(o))){const d=Z(o);f=oe(o),u.x=d.x+o.clientLeft,u.y=d.y+o.clientTop}const h=s&&!a&&!r?ft(s,c):j(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-c.scrollLeft*f.x+u.x+h.x,y:n.y*f.y-c.scrollTop*f.y+u.y+h.y}}function mn(e){return Array.from(e.getClientRects())}function gn(e){const t=Q(e),n=xe(e),o=e.ownerDocument.body,i=$(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),r=$(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+be(e);const l=-n.scrollTop;return X(o).direction==="rtl"&&(s+=$(t.clientWidth,o.clientWidth)-i),{width:i,height:r,x:s,y:l}}const Ye=25;function wn(e,t){const n=q(e),o=Q(e),i=n.visualViewport;let r=o.clientWidth,s=o.clientHeight,l=0,c=0;if(i){r=i.width,s=i.height;const u=Fe();(!u||u&&t==="fixed")&&(l=i.offsetLeft,c=i.offsetTop)}const f=be(o);if(f<=0){const u=o.ownerDocument,a=u.body,h=getComputedStyle(a),d=u.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,p=Math.abs(o.clientWidth-a.clientWidth-d);p<=Ye&&(r-=p)}else f<=Ye&&(r+=f);return{width:r,height:s,x:l,y:c}}const yn=new Set(["absolute","fixed"]);function vn(e,t){const n=Z(e,!0,t==="fixed"),o=n.top+e.clientTop,i=n.left+e.clientLeft,r=U(e)?oe(e):j(1),s=e.clientWidth*r.x,l=e.clientHeight*r.y,c=i*r.x,f=o*r.y;return{width:s,height:l,x:c,y:f}}function je(e,t,n){let o;if(t==="viewport")o=wn(e,n);else if(t==="document")o=gn(Q(e));else if(I(t))o=vn(t,n);else{const i=ct(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return ie(o)}function ut(e,t){const n=K(e);return n===t||!I(n)||se(n)?!1:X(n).position==="fixed"||ut(n,t)}function xn(e,t){const n=t.get(e);if(n)return n;let o=le(e,[],!1).filter(l=>I(l)&&J(l)!=="body"),i=null;const r=X(e).position==="fixed";let s=r?K(e):e;for(;I(s)&&!se(s);){const l=X(s),c=ke(s);!c&&l.position==="fixed"&&(i=null),(r?!c&&!i:!c&&l.position==="static"&&!!i&&yn.has(i.position)||fe(s)&&!c&&ut(e,s))?o=o.filter(u=>u!==s):i=l,s=K(s)}return t.set(e,o),o}function bn(e){let{element:t,boundary:n,rootBoundary:o,strategy:i}=e;const s=[...n==="clippingAncestors"?ve(t)?[]:xn(t,this._c):[].concat(n),o],l=s[0],c=s.reduce((f,u)=>{const a=je(t,u,i);return f.top=$(a.top,f.top),f.right=V(a.right,f.right),f.bottom=V(a.bottom,f.bottom),f.left=$(a.left,f.left),f},je(t,l,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function An(e){const{width:t,height:n}=at(e);return{width:t,height:n}}function Cn(e,t,n){const o=U(t),i=Q(t),r=n==="fixed",s=Z(e,!0,r,t);let l={scrollLeft:0,scrollTop:0};const c=j(0);function f(){c.x=be(i)}if(o||!o&&!r)if((J(t)!=="body"||fe(i))&&(l=xe(t)),o){const d=Z(t,!0,r,t);c.x=d.x+t.clientLeft,c.y=d.y+t.clientTop}else i&&f();r&&!o&&i&&f();const u=i&&!o&&!r?ft(i,l):j(0),a=s.left+l.scrollLeft-c.x-u.x,h=s.top+l.scrollTop-c.y-u.y;return{x:a,y:h,width:s.width,height:s.height}}function Ce(e){return X(e).position==="static"}function Ue(e,t){if(!U(e)||X(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Q(e)===n&&(n=n.ownerDocument.body),n}function dt(e,t){const n=q(e);if(ve(e))return n;if(!U(e)){let i=K(e);for(;i&&!se(i);){if(I(i)&&!Ce(i))return i;i=K(i)}return n}let o=Ue(e,t);for(;o&&rn(o)&&Ce(o);)o=Ue(o,t);return o&&se(o)&&Ce(o)&&!ke(o)?n:o||fn(e)||n}const On=async function(e){const t=this.getOffsetParent||dt,n=this.getDimensions,o=await n(e.floating);return{reference:Cn(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Pn(e){return X(e).direction==="rtl"}const Sn={convertOffsetParentRelativeRectToViewportRelativeRect:hn,getDocumentElement:Q,getClippingRect:bn,getOffsetParent:dt,getElementRects:On,getClientRects:mn,getDimensions:An,getScale:oe,isElement:I,isRTL:Pn};function pt(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Rn(e,t){let n=null,o;const i=Q(e);function r(){var l;clearTimeout(o),(l=n)==null||l.disconnect(),n=null}function s(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),r();const f=e.getBoundingClientRect(),{left:u,top:a,width:h,height:d}=f;if(l||t(),!h||!d)return;const p=ue(a),m=ue(i.clientWidth-(u+h)),g=ue(i.clientHeight-(a+d)),w=ue(u),v={rootMargin:-p+"px "+-m+"px "+-g+"px "+-w+"px",threshold:$(0,V(1,c))||1};let A=!0;function x(O){const b=O[0].intersectionRatio;if(b!==c){if(!A)return s();b?s(!1,b):o=setTimeout(()=>{s(!1,1e-7)},1e3)}b===1&&!pt(f,e.getBoundingClientRect())&&s(),A=!1}try{n=new IntersectionObserver(x,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(x,v)}n.observe(e)}return s(!0),r}function _n(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=o,f=Me(e),u=i||r?[...f?le(f):[],...le(t)]:[];u.forEach(w=>{i&&w.addEventListener("scroll",n,{passive:!0}),r&&w.addEventListener("resize",n)});const a=f&&l?Rn(f,n):null;let h=-1,d=null;s&&(d=new ResizeObserver(w=>{let[y]=w;y&&y.target===f&&d&&(d.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var v;(v=d)==null||v.observe(t)})),n()}),f&&!c&&d.observe(f),d.observe(t));let p,m=c?Z(e):null;c&&g();function g(){const w=Z(e);m&&!pt(m,w)&&n(),m=w,p=requestAnimationFrame(g)}return n(),()=>{var w;u.forEach(y=>{i&&y.removeEventListener("scroll",n),r&&y.removeEventListener("resize",n)}),a?.(),(w=d)==null||w.disconnect(),d=null,c&&cancelAnimationFrame(p)}}const En=Zt,Un=Yt,Ln=Jt,Qe=jt,Dn=tn,Bn=Ut,Tn=It,Qn=Gt,$n=en,kn=(e,t,n)=>{const o=new Map,i={platform:Sn,...n},r={...i.platform,_c:o};return zt(e,t,{...i,platform:r})};function Fn(e){return e!=null&&typeof e=="object"&&"$el"in e}function Re(e){if(Fn(e)){const t=e.$el;return $e(t)&&J(t)==="#comment"?null:t}return e}function te(e){return typeof e=="function"?e():_(e)}function Mn(e){return{name:"arrow",options:e,fn(t){const n=Re(te(e.element));return n==null?{}:Tn({element:n,padding:e.padding}).fn(t)}}}function ht(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ge(e,t){const n=ht(e);return Math.round(t*n)/n}function qn(e,t,n){n===void 0&&(n={});const o=n.whileElementsMounted,i=R(()=>{var b;return(b=te(n.open))!=null?b:!0}),r=R(()=>te(n.middleware)),s=R(()=>{var b;return(b=te(n.placement))!=null?b:"bottom"}),l=R(()=>{var b;return(b=te(n.strategy))!=null?b:"absolute"}),c=R(()=>{var b;return(b=te(n.transform))!=null?b:!0}),f=R(()=>Re(e.value)),u=R(()=>Re(t.value)),a=Y(0),h=Y(0),d=Y(l.value),p=Y(s.value),m=yt({}),g=Y(!1),w=R(()=>{const b={position:d.value,left:"0",top:"0"};if(!u.value)return b;const S=Ge(u.value,a.value),E=Ge(u.value,h.value);return c.value?{...b,transform:"translate("+S+"px, "+E+"px)",...ht(u.value)>=1.5&&{willChange:"transform"}}:{position:d.value,left:S+"px",top:E+"px"}});let y;function v(){if(f.value==null||u.value==null)return;const b=i.value;kn(f.value,u.value,{middleware:r.value,placement:s.value,strategy:l.value}).then(S=>{a.value=S.x,h.value=S.y,d.value=S.strategy,p.value=S.placement,m.value=S.middlewareData,g.value=b!==!1})}function A(){typeof y=="function"&&(y(),y=void 0)}function x(){if(A(),o===void 0){v();return}if(f.value!=null&&u.value!=null){y=o(f.value,u.value,v);return}}function O(){i.value||(g.value=!1)}return Ae([r,s,l,i],v,{flush:"sync"}),Ae([f,u],x,{flush:"sync"}),Ae(i,O,{flush:"sync"}),vt()&&xt(A),{x:ee(a),y:ee(h),strategy:ee(d),placement:ee(p),middlewareData:ee(m),isPositioned:ee(g),floatingStyles:w,update:v}}const Wn={side:"bottom",sideOffset:0,sideFlip:!0,align:"center",alignOffset:0,alignFlip:!0,arrowPadding:0,avoidCollisions:!0,collisionBoundary:()=>[],collisionPadding:0,sticky:"partial",hideWhenDetached:!1,positionStrategy:"fixed",updatePositionStrategy:"optimized",prioritizePosition:!1},[Hn,Nn]=Ke("PopperContent");var Vn=ae({inheritAttrs:!1,__name:"PopperContent",props:bt({side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},{...Wn}),emits:["placed"],setup(e,{emit:t}){const n=e,o=t,i=nt(),{forwardRef:r,currentElement:s}=ge(),l=Y(),c=Y(),{width:f,height:u}=Ot(c),a=R(()=>n.side+(n.align!=="center"?`-${n.align}`:"")),h=R(()=>typeof n.collisionPadding=="number"?n.collisionPadding:{top:0,right:0,bottom:0,left:0,...n.collisionPadding}),d=R(()=>Array.isArray(n.collisionBoundary)?n.collisionBoundary:[n.collisionBoundary]),p=R(()=>({padding:h.value,boundary:d.value.filter(Bt),altBoundary:d.value.length>0})),m=R(()=>({mainAxis:n.sideFlip,crossAxis:n.alignFlip})),g=At(()=>[En({mainAxis:n.sideOffset+u.value,alignmentAxis:n.alignOffset}),n.prioritizePosition&&n.avoidCollisions&&Qe({...p.value,...m.value}),n.avoidCollisions&&Ln({mainAxis:!0,crossAxis:!!n.prioritizePosition,limiter:n.sticky==="partial"?$n():void 0,...p.value}),!n.prioritizePosition&&n.avoidCollisions&&Qe({...p.value,...m.value}),Dn({...p.value,apply:({elements:P,rects:B,availableWidth:D,availableHeight:M})=>{const{width:F,height:k}=B.reference,T=P.floating.style;T.setProperty("--reka-popper-available-width",`${D}px`),T.setProperty("--reka-popper-available-height",`${M}px`),T.setProperty("--reka-popper-anchor-width",`${F}px`),T.setProperty("--reka-popper-anchor-height",`${k}px`)}}),c.value&&Mn({element:c.value,padding:n.arrowPadding}),Tt({arrowWidth:f.value,arrowHeight:u.value}),n.hideWhenDetached&&Bn({strategy:"referenceHidden",...p.value})]),w=R(()=>n.reference??i.anchor.value),{floatingStyles:y,placement:v,isPositioned:A,middlewareData:x}=qn(w,l,{strategy:n.positionStrategy,placement:a,whileElementsMounted:(...P)=>_n(...P,{layoutShift:!n.disableUpdateOnLayoutShift,animationFrame:n.updatePositionStrategy==="always"}),middleware:g}),O=R(()=>Oe(v.value)[0]),b=R(()=>Oe(v.value)[1]);Ze(()=>{A.value&&o("placed")});const S=R(()=>x.value.arrow?.centerOffset!==0),E=Y("");Ct(()=>{s.value&&(E.value=window.getComputedStyle(s.value).zIndex)});const C=R(()=>x.value.arrow?.x??0),L=R(()=>x.value.arrow?.y??0);return Nn({placedSide:O,onArrowChange:P=>c.value=P,arrowX:C,arrowY:L,shouldHideArrow:S}),(P,B)=>(ne(),de("div",{ref_key:"floatingRef",ref:l,"data-reka-popper-content-wrapper":"",style:tt({..._(y),transform:_(A)?_(y).transform:"translate(0, -200%)",minWidth:"max-content",zIndex:E.value,"--reka-popper-transform-origin":[_(x).transformOrigin?.x,_(x).transformOrigin?.y].join(" "),..._(x).hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}})},[et(_(_e),Ee({ref:_(r)},P.$attrs,{"as-child":n.asChild,as:P.as,"data-side":O.value,"data-align":b.value,style:{animation:_(A)?void 0:"none"}}),{default:we(()=>[ce(P.$slots,"default")]),_:3},16,["as-child","as","data-side","data-align","style"])],4))}}),Gn=Vn;const zn={top:"bottom",right:"left",bottom:"top",left:"right"};var In=ae({inheritAttrs:!1,__name:"PopperArrow",props:{width:{type:Number,required:!1},height:{type:Number,required:!1},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"svg"}},setup(e){const{forwardRef:t}=ge(),n=Hn(),o=R(()=>zn[n.placedSide.value]);return(i,r)=>(ne(),de("span",{ref:s=>{_(n).onArrowChange(s)},style:tt({position:"absolute",left:_(n).arrowX?.value?`${_(n).arrowX?.value}px`:void 0,top:_(n).arrowY?.value?`${_(n).arrowY?.value}px`:void 0,[o.value]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[_(n).placedSide.value],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[_(n).placedSide.value],visibility:_(n).shouldHideArrow.value?"hidden":void 0})},[et(Dt,Ee(i.$attrs,{ref:_(t),style:{display:"block"},as:i.as,"as-child":i.asChild,rounded:i.rounded,width:i.width,height:i.height}),{default:we(()=>[ce(i.$slots,"default")]),_:3},16,["as","as-child","rounded","width","height"])],4))}}),Kn=In;export{Kn as P,Yn as a,Gn as b,jn as c,Tn as d,Dn as e,Qe as f,Un as g,Bn as h,Qn as i,kn as j,Wn as k,En as o,Ln as s};
|
|
1
|
+
import{e as Y,c as R,q as gt,a5 as wt,a as ae,aR as Ke,a4 as ce,a_ as ge,bN as Ze,Q as Je,R as ne,S as we,C as _,a3 as _e,G as de,V as Ee,s as yt,f as Ae,l as vt,aB as xt,bO as ee,bP as bt,bQ as At,y as Ct,T as et,aV as tt}from"./2dNDtTiv.js";function Ot(e){const t=Y(),n=R(()=>t.value?.width??0),o=R(()=>t.value?.height??0);return gt(()=>{const i=wt(e);if(i){t.value={width:i.offsetWidth,height:i.offsetHeight};const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const l=s[0];let c,f;if("borderBoxSize"in l){const u=l.borderBoxSize,a=Array.isArray(u)?u[0]:u;c=a.inlineSize,f=a.blockSize}else c=i.offsetWidth,f=i.offsetHeight;t.value={width:c,height:f}});return r.observe(i,{box:"border-box"}),()=>r.unobserve(i)}else t.value=void 0}),{width:n,height:o}}const[nt,Pt]=Ke("PopperRoot");var St=ae({inheritAttrs:!1,__name:"PopperRoot",setup(e){const t=Y();return Pt({anchor:t,onAnchorChange:n=>t.value=n}),(n,o)=>ce(n.$slots,"default")}}),Yn=St,Rt=ae({__name:"PopperAnchor",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,{forwardRef:n,currentElement:o}=ge(),i=nt();return Ze(()=>{i.onAnchorChange(t.reference??o.value)}),(r,s)=>(ne(),Je(_(_e),{ref:_(n),as:r.as,"as-child":r.asChild},{default:we(()=>[ce(r.$slots,"default")]),_:3},8,["as","as-child"]))}}),jn=Rt;const _t={key:0,d:"M0 0L6 6L12 0"},Et={key:1,d:"M0 0L4.58579 4.58579C5.36683 5.36683 6.63316 5.36684 7.41421 4.58579L12 0"};var Lt=ae({__name:"Arrow",props:{width:{type:Number,required:!1,default:10},height:{type:Number,required:!1,default:5},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"svg"}},setup(e){const t=e;return ge(),(n,o)=>(ne(),Je(_(_e),Ee(t,{width:n.width,height:n.height,viewBox:n.asChild?void 0:"0 0 12 6",preserveAspectRatio:n.asChild?void 0:"none"}),{default:we(()=>[ce(n.$slots,"default",{},()=>[n.rounded?(ne(),de("path",Et)):(ne(),de("path",_t))])]),_:3},16,["width","height","viewBox","preserveAspectRatio"]))}}),Dt=Lt;function Bt(e){return e!==null}function Tt(e){return{name:"transformOrigin",options:e,fn(t){const{placement:n,rects:o,middlewareData:i}=t,s=i.arrow?.centerOffset!==0,l=s?0:e.arrowWidth,c=s?0:e.arrowHeight,[f,u]=Oe(n),a={start:"0%",center:"50%",end:"100%"}[u],h=(i.arrow?.x??0)+l/2,d=(i.arrow?.y??0)+c/2;let p="",m="";return f==="bottom"?(p=s?a:`${h}px`,m=`${-c}px`):f==="top"?(p=s?a:`${h}px`,m=`${o.floating.height+c}px`):f==="right"?(p=`${-c}px`,m=s?a:`${d}px`):f==="left"&&(p=`${o.floating.width+c}px`,m=s?a:`${d}px`),{data:{x:p,y:m}}}}}function Oe(e){const[t,n="center"]=e.split("-");return[t,n]}const ot=["top","right","bottom","left"],qe=["start","end"],We=ot.reduce((e,t)=>e.concat(t,t+"-"+qe[0],t+"-"+qe[1]),[]),V=Math.min,$=Math.max,pe=Math.round,ue=Math.floor,j=e=>({x:e,y:e}),$t={left:"right",right:"left",bottom:"top",top:"bottom"},kt={start:"end",end:"start"};function Pe(e,t,n){return $(e,V(t,n))}function z(e,t){return typeof e=="function"?e(t):e}function W(e){return e.split("-")[0]}function N(e){return e.split("-")[1]}function Le(e){return e==="x"?"y":"x"}function De(e){return e==="y"?"height":"width"}const Ft=new Set(["top","bottom"]);function H(e){return Ft.has(W(e))?"y":"x"}function Be(e){return Le(H(e))}function it(e,t,n){n===void 0&&(n=!1);const o=N(e),i=Be(e),r=De(i);let s=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[r]>t.floating[r]&&(s=me(s)),[s,me(s)]}function Mt(e){const t=me(e);return[he(e),t,he(t)]}function he(e){return e.replace(/start|end/g,t=>kt[t])}const He=["left","right"],Ne=["right","left"],qt=["top","bottom"],Wt=["bottom","top"];function Ht(e,t,n){switch(e){case"top":case"bottom":return n?t?Ne:He:t?He:Ne;case"left":case"right":return t?qt:Wt;default:return[]}}function Nt(e,t,n,o){const i=N(e);let r=Ht(W(e),n==="start",o);return i&&(r=r.map(s=>s+"-"+i),t&&(r=r.concat(r.map(he)))),r}function me(e){return e.replace(/left|right|bottom|top/g,t=>$t[t])}function Vt(e){return{top:0,right:0,bottom:0,left:0,...e}}function Te(e){return typeof e!="number"?Vt(e):{top:e,right:e,bottom:e,left:e}}function ie(e){const{x:t,y:n,width:o,height:i}=e;return{width:o,height:i,top:n,left:t,right:t+o,bottom:n+i,x:t,y:n}}function Ve(e,t,n){let{reference:o,floating:i}=e;const r=H(t),s=Be(t),l=De(s),c=W(t),f=r==="y",u=o.x+o.width/2-i.width/2,a=o.y+o.height/2-i.height/2,h=o[l]/2-i[l]/2;let d;switch(c){case"top":d={x:u,y:o.y-i.height};break;case"bottom":d={x:u,y:o.y+o.height};break;case"right":d={x:o.x+o.width,y:a};break;case"left":d={x:o.x-i.width,y:a};break;default:d={x:o.x,y:o.y}}switch(N(t)){case"start":d[s]-=h*(n&&f?-1:1);break;case"end":d[s]+=h*(n&&f?-1:1);break}return d}const zt=async(e,t,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:s}=n,l=r.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(t));let f=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:a}=Ve(f,o,c),h=o,d={},p=0;for(let m=0;m<l.length;m++){const{name:g,fn:w}=l[m],{x:y,y:v,data:A,reset:x}=await w({x:u,y:a,initialPlacement:o,placement:h,strategy:i,middlewareData:d,rects:f,platform:s,elements:{reference:e,floating:t}});u=y??u,a=v??a,d={...d,[g]:{...d[g],...A}},x&&p<=50&&(p++,typeof x=="object"&&(x.placement&&(h=x.placement),x.rects&&(f=x.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:a}=Ve(f,h,c)),m=-1)}return{x:u,y:a,placement:h,strategy:i,middlewareData:d}};async function re(e,t){var n;t===void 0&&(t={});const{x:o,y:i,platform:r,rects:s,elements:l,strategy:c}=e,{boundary:f="clippingAncestors",rootBoundary:u="viewport",elementContext:a="floating",altBoundary:h=!1,padding:d=0}=z(t,e),p=Te(d),g=l[h?a==="floating"?"reference":"floating":a],w=ie(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(g)))==null||n?g:g.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(l.floating)),boundary:f,rootBoundary:u,strategy:c})),y=a==="floating"?{x:o,y:i,width:s.floating.width,height:s.floating.height}:s.reference,v=await(r.getOffsetParent==null?void 0:r.getOffsetParent(l.floating)),A=await(r.isElement==null?void 0:r.isElement(v))?await(r.getScale==null?void 0:r.getScale(v))||{x:1,y:1}:{x:1,y:1},x=ie(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:y,offsetParent:v,strategy:c}):y);return{top:(w.top-x.top+p.top)/A.y,bottom:(x.bottom-w.bottom+p.bottom)/A.y,left:(w.left-x.left+p.left)/A.x,right:(x.right-w.right+p.right)/A.x}}const It=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:i,rects:r,platform:s,elements:l,middlewareData:c}=t,{element:f,padding:u=0}=z(e,t)||{};if(f==null)return{};const a=Te(u),h={x:n,y:o},d=Be(i),p=De(d),m=await s.getDimensions(f),g=d==="y",w=g?"top":"left",y=g?"bottom":"right",v=g?"clientHeight":"clientWidth",A=r.reference[p]+r.reference[d]-h[d]-r.floating[p],x=h[d]-r.reference[d],O=await(s.getOffsetParent==null?void 0:s.getOffsetParent(f));let b=O?O[v]:0;(!b||!await(s.isElement==null?void 0:s.isElement(O)))&&(b=l.floating[v]||r.floating[p]);const S=A/2-x/2,E=b/2-m[p]/2-1,C=V(a[w],E),L=V(a[y],E),P=C,B=b-m[p]-L,D=b/2-m[p]/2+S,M=Pe(P,D,B),F=!c.arrow&&N(i)!=null&&D!==M&&r.reference[p]/2-(D<P?C:L)-m[p]/2<0,k=F?D<P?D-P:D-B:0;return{[d]:h[d]+k,data:{[d]:M,centerOffset:D-M-k,...F&&{alignmentOffset:k}},reset:F}}});function Xt(e,t,n){return(e?[...n.filter(i=>N(i)===e),...n.filter(i=>N(i)!==e)]:n.filter(i=>W(i)===i)).filter(i=>e?N(i)===e||(t?he(i)!==i:!1):!0)}const Yt=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,o,i;const{rects:r,middlewareData:s,placement:l,platform:c,elements:f}=t,{crossAxis:u=!1,alignment:a,allowedPlacements:h=We,autoAlignment:d=!0,...p}=z(e,t),m=a!==void 0||h===We?Xt(a||null,d,h):h,g=await re(t,p),w=((n=s.autoPlacement)==null?void 0:n.index)||0,y=m[w];if(y==null)return{};const v=it(y,r,await(c.isRTL==null?void 0:c.isRTL(f.floating)));if(l!==y)return{reset:{placement:m[0]}};const A=[g[W(y)],g[v[0]],g[v[1]]],x=[...((o=s.autoPlacement)==null?void 0:o.overflows)||[],{placement:y,overflows:A}],O=m[w+1];if(O)return{data:{index:w+1,overflows:x},reset:{placement:O}};const b=x.map(C=>{const L=N(C.placement);return[C.placement,L&&u?C.overflows.slice(0,2).reduce((P,B)=>P+B,0):C.overflows[0],C.overflows]}).sort((C,L)=>C[1]-L[1]),E=((i=b.filter(C=>C[2].slice(0,N(C[0])?2:3).every(L=>L<=0))[0])==null?void 0:i[0])||b[0][0];return E!==l?{data:{index:w+1,overflows:x},reset:{placement:E}}:{}}}},jt=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:i,middlewareData:r,rects:s,initialPlacement:l,platform:c,elements:f}=t,{mainAxis:u=!0,crossAxis:a=!0,fallbackPlacements:h,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...g}=z(e,t);if((n=r.arrow)!=null&&n.alignmentOffset)return{};const w=W(i),y=H(l),v=W(l)===l,A=await(c.isRTL==null?void 0:c.isRTL(f.floating)),x=h||(v||!m?[me(l)]:Mt(l)),O=p!=="none";!h&&O&&x.push(...Nt(l,m,p,A));const b=[l,...x],S=await re(t,g),E=[];let C=((o=r.flip)==null?void 0:o.overflows)||[];if(u&&E.push(S[w]),a){const D=it(i,s,A);E.push(S[D[0]],S[D[1]])}if(C=[...C,{placement:i,overflows:E}],!E.every(D=>D<=0)){var L,P;const D=(((L=r.flip)==null?void 0:L.index)||0)+1,M=b[D];if(M&&(!(a==="alignment"?y!==H(M):!1)||C.every(T=>H(T.placement)===y?T.overflows[0]>0:!0)))return{data:{index:D,overflows:C},reset:{placement:M}};let F=(P=C.filter(k=>k.overflows[0]<=0).sort((k,T)=>k.overflows[1]-T.overflows[1])[0])==null?void 0:P.placement;if(!F)switch(d){case"bestFit":{var B;const k=(B=C.filter(T=>{if(O){const G=H(T.placement);return G===y||G==="y"}return!0}).map(T=>[T.placement,T.overflows.filter(G=>G>0).reduce((G,mt)=>G+mt,0)]).sort((T,G)=>T[1]-G[1])[0])==null?void 0:B[0];k&&(F=k);break}case"initialPlacement":F=l;break}if(i!==F)return{reset:{placement:F}}}return{}}}};function ze(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ie(e){return ot.some(t=>e[t]>=0)}const Ut=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...i}=z(e,t);switch(o){case"referenceHidden":{const r=await re(t,{...i,elementContext:"reference"}),s=ze(r,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Ie(s)}}}case"escaped":{const r=await re(t,{...i,altBoundary:!0}),s=ze(r,n.floating);return{data:{escapedOffsets:s,escaped:Ie(s)}}}default:return{}}}}};function rt(e){const t=V(...e.map(r=>r.left)),n=V(...e.map(r=>r.top)),o=$(...e.map(r=>r.right)),i=$(...e.map(r=>r.bottom));return{x:t,y:n,width:o-t,height:i-n}}function Qt(e){const t=e.slice().sort((i,r)=>i.y-r.y),n=[];let o=null;for(let i=0;i<t.length;i++){const r=t[i];!o||r.y-o.y>o.height/2?n.push([r]):n[n.length-1].push(r),o=r}return n.map(i=>ie(rt(i)))}const Gt=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){const{placement:n,elements:o,rects:i,platform:r,strategy:s}=t,{padding:l=2,x:c,y:f}=z(e,t),u=Array.from(await(r.getClientRects==null?void 0:r.getClientRects(o.reference))||[]),a=Qt(u),h=ie(rt(u)),d=Te(l);function p(){if(a.length===2&&a[0].left>a[1].right&&c!=null&&f!=null)return a.find(g=>c>g.left-d.left&&c<g.right+d.right&&f>g.top-d.top&&f<g.bottom+d.bottom)||h;if(a.length>=2){if(H(n)==="y"){const C=a[0],L=a[a.length-1],P=W(n)==="top",B=C.top,D=L.bottom,M=P?C.left:L.left,F=P?C.right:L.right,k=F-M,T=D-B;return{top:B,bottom:D,left:M,right:F,width:k,height:T,x:M,y:B}}const g=W(n)==="left",w=$(...a.map(C=>C.right)),y=V(...a.map(C=>C.left)),v=a.filter(C=>g?C.left===y:C.right===w),A=v[0].top,x=v[v.length-1].bottom,O=y,b=w,S=b-O,E=x-A;return{top:A,bottom:x,left:O,right:b,width:S,height:E,x:O,y:A}}return h}const m=await r.getElementRects({reference:{getBoundingClientRect:p},floating:o.floating,strategy:s});return i.reference.x!==m.reference.x||i.reference.y!==m.reference.y||i.reference.width!==m.reference.width||i.reference.height!==m.reference.height?{reset:{rects:m}}:{}}}},st=new Set(["left","top"]);async function Kt(e,t){const{placement:n,platform:o,elements:i}=e,r=await(o.isRTL==null?void 0:o.isRTL(i.floating)),s=W(n),l=N(n),c=H(n)==="y",f=st.has(s)?-1:1,u=r&&c?-1:1,a=z(t,e);let{mainAxis:h,crossAxis:d,alignmentAxis:p}=typeof a=="number"?{mainAxis:a,crossAxis:0,alignmentAxis:null}:{mainAxis:a.mainAxis||0,crossAxis:a.crossAxis||0,alignmentAxis:a.alignmentAxis};return l&&typeof p=="number"&&(d=l==="end"?p*-1:p),c?{x:d*u,y:h*f}:{x:h*f,y:d*u}}const Zt=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:i,y:r,placement:s,middlewareData:l}=t,c=await Kt(t,e);return s===((n=l.offset)==null?void 0:n.placement)&&(o=l.arrow)!=null&&o.alignmentOffset?{}:{x:i+c.x,y:r+c.y,data:{...c,placement:s}}}}},Jt=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:i}=t,{mainAxis:r=!0,crossAxis:s=!1,limiter:l={fn:g=>{let{x:w,y}=g;return{x:w,y}}},...c}=z(e,t),f={x:n,y:o},u=await re(t,c),a=H(W(i)),h=Le(a);let d=f[h],p=f[a];if(r){const g=h==="y"?"top":"left",w=h==="y"?"bottom":"right",y=d+u[g],v=d-u[w];d=Pe(y,d,v)}if(s){const g=a==="y"?"top":"left",w=a==="y"?"bottom":"right",y=p+u[g],v=p-u[w];p=Pe(y,p,v)}const m=l.fn({...t,[h]:d,[a]:p});return{...m,data:{x:m.x-n,y:m.y-o,enabled:{[h]:r,[a]:s}}}}}},en=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:i,rects:r,middlewareData:s}=t,{offset:l=0,mainAxis:c=!0,crossAxis:f=!0}=z(e,t),u={x:n,y:o},a=H(i),h=Le(a);let d=u[h],p=u[a];const m=z(l,t),g=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(c){const v=h==="y"?"height":"width",A=r.reference[h]-r.floating[v]+g.mainAxis,x=r.reference[h]+r.reference[v]-g.mainAxis;d<A?d=A:d>x&&(d=x)}if(f){var w,y;const v=h==="y"?"width":"height",A=st.has(W(i)),x=r.reference[a]-r.floating[v]+(A&&((w=s.offset)==null?void 0:w[a])||0)+(A?0:g.crossAxis),O=r.reference[a]+r.reference[v]+(A?0:((y=s.offset)==null?void 0:y[a])||0)-(A?g.crossAxis:0);p<x?p=x:p>O&&(p=O)}return{[h]:d,[a]:p}}}},tn=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:i,rects:r,platform:s,elements:l}=t,{apply:c=()=>{},...f}=z(e,t),u=await re(t,f),a=W(i),h=N(i),d=H(i)==="y",{width:p,height:m}=r.floating;let g,w;a==="top"||a==="bottom"?(g=a,w=h===(await(s.isRTL==null?void 0:s.isRTL(l.floating))?"start":"end")?"left":"right"):(w=a,g=h==="end"?"top":"bottom");const y=m-u.top-u.bottom,v=p-u.left-u.right,A=V(m-u[g],y),x=V(p-u[w],v),O=!t.middlewareData.shift;let b=A,S=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(S=v),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(b=y),O&&!h){const C=$(u.left,0),L=$(u.right,0),P=$(u.top,0),B=$(u.bottom,0);d?S=p-2*(C!==0||L!==0?C+L:$(u.left,u.right)):b=m-2*(P!==0||B!==0?P+B:$(u.top,u.bottom))}await c({...t,availableWidth:S,availableHeight:b});const E=await s.getDimensions(l.floating);return p!==E.width||m!==E.height?{reset:{rects:!0}}:{}}}};function ye(){return typeof window<"u"}function J(e){return $e(e)?(e.nodeName||"").toLowerCase():"#document"}function q(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Q(e){var t;return(t=($e(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function $e(e){return ye()?e instanceof Node||e instanceof q(e).Node:!1}function I(e){return ye()?e instanceof Element||e instanceof q(e).Element:!1}function U(e){return ye()?e instanceof HTMLElement||e instanceof q(e).HTMLElement:!1}function Xe(e){return!ye()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof q(e).ShadowRoot}const nn=new Set(["inline","contents"]);function fe(e){const{overflow:t,overflowX:n,overflowY:o,display:i}=X(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!nn.has(i)}const on=new Set(["table","td","th"]);function rn(e){return on.has(J(e))}const sn=[":popover-open",":modal"];function ve(e){return sn.some(t=>{try{return e.matches(t)}catch{return!1}})}const ln=["transform","translate","scale","rotate","perspective"],an=["transform","translate","scale","rotate","perspective","filter"],cn=["paint","layout","strict","content"];function ke(e){const t=Fe(),n=I(e)?X(e):e;return ln.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||an.some(o=>(n.willChange||"").includes(o))||cn.some(o=>(n.contain||"").includes(o))}function fn(e){let t=K(e);for(;U(t)&&!se(t);){if(ke(t))return t;if(ve(t))return null;t=K(t)}return null}function Fe(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const un=new Set(["html","body","#document"]);function se(e){return un.has(J(e))}function X(e){return q(e).getComputedStyle(e)}function xe(e){return I(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function K(e){if(J(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Xe(e)&&e.host||Q(e);return Xe(t)?t.host:t}function lt(e){const t=K(e);return se(t)?e.ownerDocument?e.ownerDocument.body:e.body:U(t)&&fe(t)?t:lt(t)}function le(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=lt(e),r=i===((o=e.ownerDocument)==null?void 0:o.body),s=q(i);if(r){const l=Se(s);return t.concat(s,s.visualViewport||[],fe(i)?i:[],l&&n?le(l):[])}return t.concat(i,le(i,[],n))}function Se(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function at(e){const t=X(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const i=U(e),r=i?e.offsetWidth:n,s=i?e.offsetHeight:o,l=pe(n)!==r||pe(o)!==s;return l&&(n=r,o=s),{width:n,height:o,$:l}}function Me(e){return I(e)?e:e.contextElement}function oe(e){const t=Me(e);if(!U(t))return j(1);const n=t.getBoundingClientRect(),{width:o,height:i,$:r}=at(t);let s=(r?pe(n.width):n.width)/o,l=(r?pe(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}const dn=j(0);function ct(e){const t=q(e);return!Fe()||!t.visualViewport?dn:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function pn(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==q(e)?!1:t}function Z(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),r=Me(e);let s=j(1);t&&(o?I(o)&&(s=oe(o)):s=oe(e));const l=pn(r,n,o)?ct(r):j(0);let c=(i.left+l.x)/s.x,f=(i.top+l.y)/s.y,u=i.width/s.x,a=i.height/s.y;if(r){const h=q(r),d=o&&I(o)?q(o):o;let p=h,m=Se(p);for(;m&&o&&d!==p;){const g=oe(m),w=m.getBoundingClientRect(),y=X(m),v=w.left+(m.clientLeft+parseFloat(y.paddingLeft))*g.x,A=w.top+(m.clientTop+parseFloat(y.paddingTop))*g.y;c*=g.x,f*=g.y,u*=g.x,a*=g.y,c+=v,f+=A,p=q(m),m=Se(p)}}return ie({width:u,height:a,x:c,y:f})}function be(e,t){const n=xe(e).scrollLeft;return t?t.left+n:Z(Q(e)).left+n}function ft(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-be(e,n),i=n.top+t.scrollTop;return{x:o,y:i}}function hn(e){let{elements:t,rect:n,offsetParent:o,strategy:i}=e;const r=i==="fixed",s=Q(o),l=t?ve(t.floating):!1;if(o===s||l&&r)return n;let c={scrollLeft:0,scrollTop:0},f=j(1);const u=j(0),a=U(o);if((a||!a&&!r)&&((J(o)!=="body"||fe(s))&&(c=xe(o)),U(o))){const d=Z(o);f=oe(o),u.x=d.x+o.clientLeft,u.y=d.y+o.clientTop}const h=s&&!a&&!r?ft(s,c):j(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-c.scrollLeft*f.x+u.x+h.x,y:n.y*f.y-c.scrollTop*f.y+u.y+h.y}}function mn(e){return Array.from(e.getClientRects())}function gn(e){const t=Q(e),n=xe(e),o=e.ownerDocument.body,i=$(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),r=$(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+be(e);const l=-n.scrollTop;return X(o).direction==="rtl"&&(s+=$(t.clientWidth,o.clientWidth)-i),{width:i,height:r,x:s,y:l}}const Ye=25;function wn(e,t){const n=q(e),o=Q(e),i=n.visualViewport;let r=o.clientWidth,s=o.clientHeight,l=0,c=0;if(i){r=i.width,s=i.height;const u=Fe();(!u||u&&t==="fixed")&&(l=i.offsetLeft,c=i.offsetTop)}const f=be(o);if(f<=0){const u=o.ownerDocument,a=u.body,h=getComputedStyle(a),d=u.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,p=Math.abs(o.clientWidth-a.clientWidth-d);p<=Ye&&(r-=p)}else f<=Ye&&(r+=f);return{width:r,height:s,x:l,y:c}}const yn=new Set(["absolute","fixed"]);function vn(e,t){const n=Z(e,!0,t==="fixed"),o=n.top+e.clientTop,i=n.left+e.clientLeft,r=U(e)?oe(e):j(1),s=e.clientWidth*r.x,l=e.clientHeight*r.y,c=i*r.x,f=o*r.y;return{width:s,height:l,x:c,y:f}}function je(e,t,n){let o;if(t==="viewport")o=wn(e,n);else if(t==="document")o=gn(Q(e));else if(I(t))o=vn(t,n);else{const i=ct(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return ie(o)}function ut(e,t){const n=K(e);return n===t||!I(n)||se(n)?!1:X(n).position==="fixed"||ut(n,t)}function xn(e,t){const n=t.get(e);if(n)return n;let o=le(e,[],!1).filter(l=>I(l)&&J(l)!=="body"),i=null;const r=X(e).position==="fixed";let s=r?K(e):e;for(;I(s)&&!se(s);){const l=X(s),c=ke(s);!c&&l.position==="fixed"&&(i=null),(r?!c&&!i:!c&&l.position==="static"&&!!i&&yn.has(i.position)||fe(s)&&!c&&ut(e,s))?o=o.filter(u=>u!==s):i=l,s=K(s)}return t.set(e,o),o}function bn(e){let{element:t,boundary:n,rootBoundary:o,strategy:i}=e;const s=[...n==="clippingAncestors"?ve(t)?[]:xn(t,this._c):[].concat(n),o],l=s[0],c=s.reduce((f,u)=>{const a=je(t,u,i);return f.top=$(a.top,f.top),f.right=V(a.right,f.right),f.bottom=V(a.bottom,f.bottom),f.left=$(a.left,f.left),f},je(t,l,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function An(e){const{width:t,height:n}=at(e);return{width:t,height:n}}function Cn(e,t,n){const o=U(t),i=Q(t),r=n==="fixed",s=Z(e,!0,r,t);let l={scrollLeft:0,scrollTop:0};const c=j(0);function f(){c.x=be(i)}if(o||!o&&!r)if((J(t)!=="body"||fe(i))&&(l=xe(t)),o){const d=Z(t,!0,r,t);c.x=d.x+t.clientLeft,c.y=d.y+t.clientTop}else i&&f();r&&!o&&i&&f();const u=i&&!o&&!r?ft(i,l):j(0),a=s.left+l.scrollLeft-c.x-u.x,h=s.top+l.scrollTop-c.y-u.y;return{x:a,y:h,width:s.width,height:s.height}}function Ce(e){return X(e).position==="static"}function Ue(e,t){if(!U(e)||X(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Q(e)===n&&(n=n.ownerDocument.body),n}function dt(e,t){const n=q(e);if(ve(e))return n;if(!U(e)){let i=K(e);for(;i&&!se(i);){if(I(i)&&!Ce(i))return i;i=K(i)}return n}let o=Ue(e,t);for(;o&&rn(o)&&Ce(o);)o=Ue(o,t);return o&&se(o)&&Ce(o)&&!ke(o)?n:o||fn(e)||n}const On=async function(e){const t=this.getOffsetParent||dt,n=this.getDimensions,o=await n(e.floating);return{reference:Cn(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Pn(e){return X(e).direction==="rtl"}const Sn={convertOffsetParentRelativeRectToViewportRelativeRect:hn,getDocumentElement:Q,getClippingRect:bn,getOffsetParent:dt,getElementRects:On,getClientRects:mn,getDimensions:An,getScale:oe,isElement:I,isRTL:Pn};function pt(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Rn(e,t){let n=null,o;const i=Q(e);function r(){var l;clearTimeout(o),(l=n)==null||l.disconnect(),n=null}function s(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),r();const f=e.getBoundingClientRect(),{left:u,top:a,width:h,height:d}=f;if(l||t(),!h||!d)return;const p=ue(a),m=ue(i.clientWidth-(u+h)),g=ue(i.clientHeight-(a+d)),w=ue(u),v={rootMargin:-p+"px "+-m+"px "+-g+"px "+-w+"px",threshold:$(0,V(1,c))||1};let A=!0;function x(O){const b=O[0].intersectionRatio;if(b!==c){if(!A)return s();b?s(!1,b):o=setTimeout(()=>{s(!1,1e-7)},1e3)}b===1&&!pt(f,e.getBoundingClientRect())&&s(),A=!1}try{n=new IntersectionObserver(x,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(x,v)}n.observe(e)}return s(!0),r}function _n(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=o,f=Me(e),u=i||r?[...f?le(f):[],...le(t)]:[];u.forEach(w=>{i&&w.addEventListener("scroll",n,{passive:!0}),r&&w.addEventListener("resize",n)});const a=f&&l?Rn(f,n):null;let h=-1,d=null;s&&(d=new ResizeObserver(w=>{let[y]=w;y&&y.target===f&&d&&(d.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var v;(v=d)==null||v.observe(t)})),n()}),f&&!c&&d.observe(f),d.observe(t));let p,m=c?Z(e):null;c&&g();function g(){const w=Z(e);m&&!pt(m,w)&&n(),m=w,p=requestAnimationFrame(g)}return n(),()=>{var w;u.forEach(y=>{i&&y.removeEventListener("scroll",n),r&&y.removeEventListener("resize",n)}),a?.(),(w=d)==null||w.disconnect(),d=null,c&&cancelAnimationFrame(p)}}const En=Zt,Un=Yt,Ln=Jt,Qe=jt,Dn=tn,Bn=Ut,Tn=It,Qn=Gt,$n=en,kn=(e,t,n)=>{const o=new Map,i={platform:Sn,...n},r={...i.platform,_c:o};return zt(e,t,{...i,platform:r})};function Fn(e){return e!=null&&typeof e=="object"&&"$el"in e}function Re(e){if(Fn(e)){const t=e.$el;return $e(t)&&J(t)==="#comment"?null:t}return e}function te(e){return typeof e=="function"?e():_(e)}function Mn(e){return{name:"arrow",options:e,fn(t){const n=Re(te(e.element));return n==null?{}:Tn({element:n,padding:e.padding}).fn(t)}}}function ht(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ge(e,t){const n=ht(e);return Math.round(t*n)/n}function qn(e,t,n){n===void 0&&(n={});const o=n.whileElementsMounted,i=R(()=>{var b;return(b=te(n.open))!=null?b:!0}),r=R(()=>te(n.middleware)),s=R(()=>{var b;return(b=te(n.placement))!=null?b:"bottom"}),l=R(()=>{var b;return(b=te(n.strategy))!=null?b:"absolute"}),c=R(()=>{var b;return(b=te(n.transform))!=null?b:!0}),f=R(()=>Re(e.value)),u=R(()=>Re(t.value)),a=Y(0),h=Y(0),d=Y(l.value),p=Y(s.value),m=yt({}),g=Y(!1),w=R(()=>{const b={position:d.value,left:"0",top:"0"};if(!u.value)return b;const S=Ge(u.value,a.value),E=Ge(u.value,h.value);return c.value?{...b,transform:"translate("+S+"px, "+E+"px)",...ht(u.value)>=1.5&&{willChange:"transform"}}:{position:d.value,left:S+"px",top:E+"px"}});let y;function v(){if(f.value==null||u.value==null)return;const b=i.value;kn(f.value,u.value,{middleware:r.value,placement:s.value,strategy:l.value}).then(S=>{a.value=S.x,h.value=S.y,d.value=S.strategy,p.value=S.placement,m.value=S.middlewareData,g.value=b!==!1})}function A(){typeof y=="function"&&(y(),y=void 0)}function x(){if(A(),o===void 0){v();return}if(f.value!=null&&u.value!=null){y=o(f.value,u.value,v);return}}function O(){i.value||(g.value=!1)}return Ae([r,s,l,i],v,{flush:"sync"}),Ae([f,u],x,{flush:"sync"}),Ae(i,O,{flush:"sync"}),vt()&&xt(A),{x:ee(a),y:ee(h),strategy:ee(d),placement:ee(p),middlewareData:ee(m),isPositioned:ee(g),floatingStyles:w,update:v}}const Wn={side:"bottom",sideOffset:0,sideFlip:!0,align:"center",alignOffset:0,alignFlip:!0,arrowPadding:0,avoidCollisions:!0,collisionBoundary:()=>[],collisionPadding:0,sticky:"partial",hideWhenDetached:!1,positionStrategy:"fixed",updatePositionStrategy:"optimized",prioritizePosition:!1},[Hn,Nn]=Ke("PopperContent");var Vn=ae({inheritAttrs:!1,__name:"PopperContent",props:bt({side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},{...Wn}),emits:["placed"],setup(e,{emit:t}){const n=e,o=t,i=nt(),{forwardRef:r,currentElement:s}=ge(),l=Y(),c=Y(),{width:f,height:u}=Ot(c),a=R(()=>n.side+(n.align!=="center"?`-${n.align}`:"")),h=R(()=>typeof n.collisionPadding=="number"?n.collisionPadding:{top:0,right:0,bottom:0,left:0,...n.collisionPadding}),d=R(()=>Array.isArray(n.collisionBoundary)?n.collisionBoundary:[n.collisionBoundary]),p=R(()=>({padding:h.value,boundary:d.value.filter(Bt),altBoundary:d.value.length>0})),m=R(()=>({mainAxis:n.sideFlip,crossAxis:n.alignFlip})),g=At(()=>[En({mainAxis:n.sideOffset+u.value,alignmentAxis:n.alignOffset}),n.prioritizePosition&&n.avoidCollisions&&Qe({...p.value,...m.value}),n.avoidCollisions&&Ln({mainAxis:!0,crossAxis:!!n.prioritizePosition,limiter:n.sticky==="partial"?$n():void 0,...p.value}),!n.prioritizePosition&&n.avoidCollisions&&Qe({...p.value,...m.value}),Dn({...p.value,apply:({elements:P,rects:B,availableWidth:D,availableHeight:M})=>{const{width:F,height:k}=B.reference,T=P.floating.style;T.setProperty("--reka-popper-available-width",`${D}px`),T.setProperty("--reka-popper-available-height",`${M}px`),T.setProperty("--reka-popper-anchor-width",`${F}px`),T.setProperty("--reka-popper-anchor-height",`${k}px`)}}),c.value&&Mn({element:c.value,padding:n.arrowPadding}),Tt({arrowWidth:f.value,arrowHeight:u.value}),n.hideWhenDetached&&Bn({strategy:"referenceHidden",...p.value})]),w=R(()=>n.reference??i.anchor.value),{floatingStyles:y,placement:v,isPositioned:A,middlewareData:x}=qn(w,l,{strategy:n.positionStrategy,placement:a,whileElementsMounted:(...P)=>_n(...P,{layoutShift:!n.disableUpdateOnLayoutShift,animationFrame:n.updatePositionStrategy==="always"}),middleware:g}),O=R(()=>Oe(v.value)[0]),b=R(()=>Oe(v.value)[1]);Ze(()=>{A.value&&o("placed")});const S=R(()=>x.value.arrow?.centerOffset!==0),E=Y("");Ct(()=>{s.value&&(E.value=window.getComputedStyle(s.value).zIndex)});const C=R(()=>x.value.arrow?.x??0),L=R(()=>x.value.arrow?.y??0);return Nn({placedSide:O,onArrowChange:P=>c.value=P,arrowX:C,arrowY:L,shouldHideArrow:S}),(P,B)=>(ne(),de("div",{ref_key:"floatingRef",ref:l,"data-reka-popper-content-wrapper":"",style:tt({..._(y),transform:_(A)?_(y).transform:"translate(0, -200%)",minWidth:"max-content",zIndex:E.value,"--reka-popper-transform-origin":[_(x).transformOrigin?.x,_(x).transformOrigin?.y].join(" "),..._(x).hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}})},[et(_(_e),Ee({ref:_(r)},P.$attrs,{"as-child":n.asChild,as:P.as,"data-side":O.value,"data-align":b.value,style:{animation:_(A)?void 0:"none"}}),{default:we(()=>[ce(P.$slots,"default")]),_:3},16,["as-child","as","data-side","data-align","style"])],4))}}),Gn=Vn;const zn={top:"bottom",right:"left",bottom:"top",left:"right"};var In=ae({inheritAttrs:!1,__name:"PopperArrow",props:{width:{type:Number,required:!1},height:{type:Number,required:!1},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"svg"}},setup(e){const{forwardRef:t}=ge(),n=Hn(),o=R(()=>zn[n.placedSide.value]);return(i,r)=>(ne(),de("span",{ref:s=>{_(n).onArrowChange(s)},style:tt({position:"absolute",left:_(n).arrowX?.value?`${_(n).arrowX?.value}px`:void 0,top:_(n).arrowY?.value?`${_(n).arrowY?.value}px`:void 0,[o.value]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[_(n).placedSide.value],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[_(n).placedSide.value],visibility:_(n).shouldHideArrow.value?"hidden":void 0})},[et(Dt,Ee(i.$attrs,{ref:_(t),style:{display:"block"},as:i.as,"as-child":i.asChild,rounded:i.rounded,width:i.width,height:i.height}),{default:we(()=>[ce(i.$slots,"default")]),_:3},16,["as","as-child","rounded","width","height"])],4))}}),Kn=In;export{Kn as P,Yn as a,Gn as b,jn as c,Tn as d,Dn as e,Qe as f,Un as g,Bn as h,Qn as i,kn as j,Wn as k,En as o,Ln as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"
|
|
1
|
+
{"id":"def74b99-d70c-4f30-aa29-70248cbeac7d","timestamp":1771737065743}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"id":"def74b99-d70c-4f30-aa29-70248cbeac7d","timestamp":1771737065743,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
|