@miravo/cli-linux-x64 0.8.1 → 0.10.0
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/console-dist/assets/AnimatePresence-BZCmb1bq.js +9 -0
- package/console-dist/assets/{activity-Cy_niK56.js → activity-Cn48I9qe.js} +1 -1
- package/console-dist/assets/api-DybIIqOe.js +1 -0
- package/console-dist/assets/api-kPM52mb-.js +1 -0
- package/console-dist/assets/asset-detail-tmOrYE8x.js +1 -0
- package/console-dist/assets/{auth-screen-backdrop-CgwRhIbi.js → auth-screen-backdrop-hcEYy3K4.js} +1 -1
- package/console-dist/assets/badge-D4jktT8T.js +1 -0
- package/console-dist/assets/catalog-DN-klsod.js +1 -0
- package/console-dist/assets/catalog-M-k7Y9Sp.js +1 -0
- package/console-dist/assets/catalog-source-2aT9qob-.js +1 -0
- package/console-dist/assets/catalog-template-icons-C7KJdJJX.js +1 -0
- package/console-dist/assets/checkbox-AaJhjtZk.js +1 -0
- package/console-dist/assets/chevron-down-CAk5w9Wt.js +1 -0
- package/console-dist/assets/chevron-right-BfZjrUWh.js +1 -0
- package/console-dist/assets/circle-x-CGcRflg7.js +1 -0
- package/console-dist/assets/combobox-BFEY6lgO.js +1 -0
- package/console-dist/assets/control-CD9UoTvu.js +1 -0
- package/console-dist/assets/control-DHa2-a2v.js +1 -0
- package/console-dist/assets/copy-button-DHm7RGJ5.js +1 -0
- package/console-dist/assets/dialog-Di9Bs0FH.js +1 -0
- package/console-dist/assets/{download-DmUZKo9N.js → download-B9e1wNK4.js} +1 -1
- package/console-dist/assets/events-D19CzgoQ.js +1 -0
- package/console-dist/assets/events-DmftG8n5.js +1 -0
- package/console-dist/assets/export-tab-ouFgYEU_.js +1 -0
- package/console-dist/assets/factory-CT2VYi0n.js +1 -0
- package/console-dist/assets/factory-DSrBtcG2.js +1 -0
- package/console-dist/assets/{format-B9CcV2dj.js → format-OUFL_tef.js} +1 -1
- package/console-dist/assets/{get-error-message-CFs0lSQP.js → get-error-message-eGdenTLv.js} +1 -1
- package/console-dist/assets/index-DuJJSpJp.js +12 -0
- package/console-dist/assets/index-iEV9hU2I.css +2 -0
- package/console-dist/assets/integration-api-Bg7D1eQc.js +2 -0
- package/console-dist/assets/integration-targets-BehiqWyT.js +1 -0
- package/console-dist/assets/integrations-DWW9HjH0.js +1 -0
- package/console-dist/assets/integrations-DoXNrzD5.js +1 -0
- package/console-dist/assets/{label-DTHSKF2S.js → label-DWyy9MeT.js} +1 -1
- package/console-dist/assets/local-flag-CPAqDO-L.js +1 -0
- package/console-dist/assets/{login-CtfweHfy.js → login-BZKYK0yZ.js} +2 -2
- package/console-dist/assets/models-CrDBHBV5.js +1 -0
- package/console-dist/assets/models-jBVcY8Xd.js +1 -0
- package/console-dist/assets/{not-found-Dw4OTZHH.js → not-found-BqVny4Md.js} +1 -1
- package/console-dist/assets/play-TTg_EXSa.js +1 -0
- package/console-dist/assets/plus-BbVbvFTe.js +1 -0
- package/console-dist/assets/protocol-card-B2SpAJKe.js +1 -0
- package/console-dist/assets/{query-fetch-error-2yqCNP9X.js → query-fetch-error-C2Ec4RQS.js} +1 -1
- package/console-dist/assets/radio-DRkzblxj.js +1 -0
- package/console-dist/assets/rocket-807Pf7C1.js +1 -0
- package/console-dist/assets/select-Bg6PPro0.js +1 -0
- package/console-dist/assets/{select-display-items-Bqb6Sbg6.js → select-display-items-D-L3PesO.js} +1 -1
- package/console-dist/assets/server-CS2Tw__K.js +1 -0
- package/console-dist/assets/source-host-miravo-D_AecPVc.js +1 -0
- package/console-dist/assets/tabs-bI9sskHy.js +1 -0
- package/console-dist/assets/tags-B7e7VYVW.js +1 -0
- package/console-dist/assets/tags-DJJKQRZZ.js +4 -0
- package/console-dist/assets/{transition-nav-link-CDSeWWsP.js → transition-nav-link-cn4KZD6W.js} +1 -1
- package/console-dist/assets/trash-2-BJ-1df0F.js +1 -0
- package/console-dist/assets/{triangle-alert-BXrJNk3g.js → triangle-alert-D1AraFcP.js} +1 -1
- package/console-dist/assets/use-engine-command-mutation-DMkQxmt9.js +1 -0
- package/console-dist/assets/use-transition-navigate-BiV2QCcA.js +2 -0
- package/console-dist/assets/validation-q38DYDwu.js +1 -0
- package/console-dist/assets/vendor-ui-D8j69UH4.js +1 -0
- package/console-dist/index.html +55 -50
- package/miravo +2 -2
- package/package.json +1 -1
- package/console-dist/assets/AnimatePresence-CPmH1DMY.js +0 -9
- package/console-dist/assets/api-5BZroqlO.js +0 -1
- package/console-dist/assets/api-BwgmLQCC.js +0 -1
- package/console-dist/assets/arrow-right-BjBb4z7g.js +0 -1
- package/console-dist/assets/arrow-up-down-C1oJAmrw.js +0 -1
- package/console-dist/assets/badge-i00PiRCo.js +0 -1
- package/console-dist/assets/catalog-B477tO5a.js +0 -1
- package/console-dist/assets/catalog-BRYmHbXV.js +0 -1
- package/console-dist/assets/catalog-source-DL6GXE84.js +0 -1
- package/console-dist/assets/catalog-template-icons-3S8RvUxD.js +0 -1
- package/console-dist/assets/checkbox-C84IyqEB.js +0 -1
- package/console-dist/assets/circle-question-mark-CJvcT6V6.js +0 -1
- package/console-dist/assets/combobox-BJecIYHE.js +0 -1
- package/console-dist/assets/control-Dc6xLiUf.js +0 -1
- package/console-dist/assets/control-HqgjVMLG.js +0 -1
- package/console-dist/assets/copy-button-DnGsXbVV.js +0 -1
- package/console-dist/assets/dropdown-menu-82O7jPU6.js +0 -1
- package/console-dist/assets/events-BvwhACji.js +0 -1
- package/console-dist/assets/events-przfMV9x.js +0 -1
- package/console-dist/assets/fleet-C2Ipwzu5.js +0 -1
- package/console-dist/assets/fleet-D3Y6h1O_.js +0 -1
- package/console-dist/assets/index-AfBFCD9D.js +0 -12
- package/console-dist/assets/index-DmjK3skd.css +0 -2
- package/console-dist/assets/instance-detail-CQ6RO9hI.js +0 -1
- package/console-dist/assets/layers-1figUpjG.js +0 -1
- package/console-dist/assets/models-C57soXUz.js +0 -1
- package/console-dist/assets/models-CX3jQBRk.js +0 -1
- package/console-dist/assets/platform-targets-BIQ1lKOg.js +0 -1
- package/console-dist/assets/platforms-DMUEIKyH.js +0 -1
- package/console-dist/assets/platforms-nMtu3Mg5.js +0 -1
- package/console-dist/assets/proxy-Be4WzmcS.js +0 -1
- package/console-dist/assets/select-CMOnuEoT.js +0 -1
- package/console-dist/assets/shallow-Cin0mLuv.js +0 -1
- package/console-dist/assets/spawn-protocol-scope-picker-DUXJ8giB.js +0 -1
- package/console-dist/assets/tabs-D64chVAn.js +0 -1
- package/console-dist/assets/tags-BbNGPS4O.js +0 -1
- package/console-dist/assets/tags-Cl6Nj2-E.js +0 -4
- package/console-dist/assets/tooltip-D1ydB4g3.js +0 -1
- package/console-dist/assets/use-engine-command-mutation-CIly3RgV.js +0 -1
- package/console-dist/assets/use-platform-stream-BBDJCrNY.js +0 -2
- package/console-dist/assets/use-transition-navigate-Bxh77tVE.js +0 -2
- package/console-dist/assets/validation-Bt4EQDja.js +0 -1
- package/console-dist/assets/vendor-ui-CWUk2ulb.js +0 -1
- /package/console-dist/assets/{chunk-OE4NN4TA-DBWZidbW.js → chunk-OE4NN4TA-Q4iNR9l9.js} +0 -0
- /package/console-dist/assets/{dist-xY0pK9Wy.js → dist-CtuJWBnP.js} +0 -0
- /package/console-dist/assets/{runtime-link-D-uJbw97.js → runtime-link-ChF8TM68.js} +0 -0
- /package/console-dist/assets/{transition-types-CPlGtM8w.js → transition-types-049V0Kr0.js} +0 -0
- /package/console-dist/assets/{utils-XFKvwlFT.js → utils-BO2u-wC_.js} +0 -0
- /package/console-dist/assets/{vendor-table-BAHQgdwg.js → vendor-table-Br-cHaxY.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,i as t,n,r}from"./rolldown-runtime-COnpUsM8.js";import{c as i}from"./vendor-charts-95ykyDlI.js";import{at as a,it as o,ot as s}from"./vendor-ui-D8j69UH4.js";import{D as c}from"./format-OUFL_tef.js";import{t as l}from"./utils-BO2u-wC_.js";var u=s(),d=e(i(),1),f=(0,d.createContext)({});function p(e){let t=(0,d.useRef)(null);return t.current===null&&(t.current=e()),t.current}var m=typeof window<`u`?d.useLayoutEffect:d.useEffect,h=(0,d.createContext)(null);function g(e,t){e.indexOf(t)===-1&&e.push(t)}function _(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var v=(e,t,n)=>n>t?t:n<e?e:n,y={},b=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function x(e){return typeof e==`object`&&!!e}var S=e=>/^0[^.\s]+$/u.test(e);function C(e){let t;return()=>(t===void 0&&(t=e()),t)}var w=e=>e,ee=(e,t)=>n=>t(e(n)),T=(...e)=>e.reduce(ee),E=(e,t,n)=>{let r=t-e;return r===0?1:(n-e)/r},te=class{constructor(){this.subscriptions=[]}add(e){return g(this.subscriptions,e),()=>_(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},D=e=>e*1e3,O=e=>e/1e3;function ne(e,t){return t?1e3/t*e:0}var re=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,ie=1e-7,ae=12;function oe(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=re(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>ie&&++s<ae);return o}function se(e,t,n,r){if(e===t&&n===r)return w;let i=t=>oe(t,0,1,e,n);return e=>e===0||e===1?e:re(i(e),t,r)}var ce=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,le=e=>t=>1-e(1-t),ue=se(.33,1.53,.69,.99),de=le(ue),fe=ce(de),pe=e=>e>=1?1:(e*=2)<1?.5*de(e):.5*(2-2**(-10*(e-1))),me=e=>1-Math.sin(Math.acos(e)),he=le(me),ge=ce(me),_e=se(.42,0,1,1),ve=se(0,0,.58,1),ye=se(.42,0,.58,1),be=e=>Array.isArray(e)&&typeof e[0]!=`number`,xe=e=>Array.isArray(e)&&typeof e[0]==`number`,Se={linear:w,easeIn:_e,easeInOut:ye,easeOut:ve,circIn:me,circInOut:ge,circOut:he,backIn:de,backInOut:fe,backOut:ue,anticipate:pe},Ce=e=>typeof e==`string`,we=e=>{if(xe(e)){e.length;let[t,n,r,i]=e;return se(t,n,r,i)}else if(Ce(e))return Se[e],`${e}`,Se[e];return e},Te=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`],k={value:null,addProjectionMetrics:null};function Ee(e,t){let n=new Set,r=new Set,i=!1,a=!1,o=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1},c=0;function l(t){o.has(t)&&(u.schedule(t),e()),c++,t(s)}let u={schedule:(e,t=!1,a=!1)=>{let s=a&&i?n:r;return t&&o.add(e),s.add(e),e},cancel:e=>{r.delete(e),o.delete(e)},process:e=>{if(s=e,i){a=!0;return}i=!0;let o=n;n=r,r=o,n.forEach(l),t&&k.value&&k.value.frameloop[t].push(c),c=0,n.clear(),i=!1,a&&(a=!1,u.process(e))}};return u}var De=40;function Oe(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=Te.reduce((e,n)=>(e[n]=Ee(a,t?n:void 0),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=y.useManualTiming,o=a?i.timestamp:performance.now();n=!1,a||(i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,De),1)),i.timestamp=o,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),p.process(i),m.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},g=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:Te.reduce((e,t)=>{let r=o[t];return e[t]=(e,t=!1,i=!1)=>(n||g(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<Te.length;t++)o[Te[t]].cancel(e)},state:i,steps:o}}var{schedule:A,cancel:j,state:M,steps:ke}=Oe(typeof requestAnimationFrame<`u`?requestAnimationFrame:w,!0),Ae;function je(){Ae=void 0}var N={now:()=>(Ae===void 0&&N.set(M.isProcessing||y.useManualTiming?M.timestamp:performance.now()),Ae),set:e=>{Ae=e,queueMicrotask(je)}},P={layout:0,mainThread:0,waapi:0},Me=e=>t=>typeof t==`string`&&t.startsWith(e),Ne=Me(`--`),Pe=Me(`var(--`),Fe=e=>Pe(e)?Ie.test(e.split(`/*`)[0].trim()):!1,Ie=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Le(e){return typeof e==`string`?e.split(`/*`)[0].includes(`var(--`):!1}var Re={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},ze={...Re,transform:e=>v(0,1,e)},Be={...Re,default:1},Ve=e=>Math.round(e*1e5)/1e5,He=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ue(e){return e==null}var We=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Ge=(e,t)=>n=>!!(typeof n==`string`&&We.test(n)&&n.startsWith(e)||t&&!Ue(n)&&Object.prototype.hasOwnProperty.call(n,t)),Ke=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(He);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},qe=e=>v(0,255,e),Je={...Re,transform:e=>Math.round(qe(e))},Ye={test:Ge(`rgb`,`red`),parse:Ke(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+Je.transform(e)+`, `+Je.transform(t)+`, `+Je.transform(n)+`, `+Ve(ze.transform(r))+`)`};function Xe(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var Ze={test:Ge(`#`),parse:Xe,transform:Ye.transform},Qe=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),F=Qe(`deg`),I=Qe(`%`),L=Qe(`px`),$e=Qe(`vh`),et=Qe(`vw`),tt={...I,parse:e=>I.parse(e)/100,transform:e=>I.transform(e*100)},nt={test:Ge(`hsl`,`hue`),parse:Ke(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+I.transform(Ve(t))+`, `+I.transform(Ve(n))+`, `+Ve(ze.transform(r))+`)`},R={test:e=>Ye.test(e)||Ze.test(e)||nt.test(e),parse:e=>Ye.test(e)?Ye.parse(e):nt.test(e)?nt.parse(e):Ze.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?Ye.transform(e):nt.transform(e),getAnimatableNone:e=>{let t=R.parse(e);return t.alpha=0,R.transform(t)}},rt=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function it(e){return isNaN(e)&&typeof e==`string`&&(e.match(He)?.length||0)+(e.match(rt)?.length||0)>0}var at=`number`,ot=`color`,st=`var`,ct=`var(`,lt="${}",ut=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function dt(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(ut,e=>(R.test(e)?(r.color.push(a),i.push(ot),n.push(R.parse(e))):e.startsWith(ct)?(r.var.push(a),i.push(st),n.push(e)):(r.number.push(a),i.push(at),n.push(parseFloat(e))),++a,lt)).split(lt),indexes:r,types:i}}function ft(e){return dt(e).values}function pt({split:e,types:t}){let n=e.length;return r=>{let i=``;for(let a=0;a<n;a++)if(i+=e[a],r[a]!==void 0){let e=t[a];e===at?i+=Ve(r[a]):e===ot?i+=R.transform(r[a]):i+=r[a]}return i}}function mt(e){return pt(dt(e))}var ht=e=>typeof e==`number`?0:R.test(e)?R.getAnimatableNone(e):e,gt=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:ht(e);function _t(e){let t=dt(e);return pt(t)(t.values.map((e,n)=>gt(e,t.split[n])))}var z={test:it,parse:ft,createTransformer:mt,getAnimatableNone:_t};function vt(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function yt({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=vt(s,r,e+1/3),a=vt(s,r,e),o=vt(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function bt(e,t){return n=>n>0?t:e}var B=(e,t,n)=>e+(t-e)*n,xt=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},St=[Ze,Ye,nt],Ct=e=>St.find(t=>t.test(e));function wt(e){let t=Ct(e);if(`${e}`,!t)return!1;let n=t.parse(e);return t===nt&&(n=yt(n)),n}var Tt=(e,t)=>{let n=wt(e),r=wt(t);if(!n||!r)return bt(e,t);let i={...n};return e=>(i.red=xt(n.red,r.red,e),i.green=xt(n.green,r.green,e),i.blue=xt(n.blue,r.blue,e),i.alpha=B(n.alpha,r.alpha,e),Ye.transform(i))},Et=new Set([`none`,`hidden`]);function Dt(e,t){return Et.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Ot(e,t){return n=>B(e,t,n)}function kt(e){return typeof e==`number`?Ot:typeof e==`string`?Fe(e)?bt:R.test(e)?Tt:Nt:Array.isArray(e)?At:typeof e==`object`?R.test(e)?Tt:jt:bt}function At(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>kt(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function jt(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=kt(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function Mt(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]];n[i]=e.values[o]??0,r[a]++}return n}var Nt=(e,t)=>{let n=z.createTransformer(t),r=dt(e),i=dt(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Et.has(e)&&!i.values.length||Et.has(t)&&!r.values.length?Dt(e,t):T(At(Mt(r,i),i.values),n):(`${e}${t}`,bt(e,t))};function Pt(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?B(e,t,n):kt(e)(e,t)}var Ft=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>A.update(t,e),stop:()=>j(t),now:()=>M.isProcessing?M.timestamp:N.now()}},It=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},Lt=2e4;function Rt(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}function zt(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(Rt(r),Lt);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:O(i)}}var V={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function Bt(e,t){return e*Math.sqrt(1-t*t)}var Vt=12;function Ht(e,t,n){let r=n;for(let n=1;n<Vt;n++)r-=e(r)/t(r);return r}var Ut=.001;function Wt({duration:e=V.duration,bounce:t=V.bounce,velocity:n=V.velocity,mass:r=V.mass}){let i,a;V.maxDuration;let o=1-t;o=v(V.minDamping,V.maxDamping,o),e=v(V.minDuration,V.maxDuration,O(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=Bt(t,o),c=Math.exp(-i);return Ut-a/s*c},a=t=>{let r=t*o*e,a=r*n+n,s=o**2*t**2*e,c=Math.exp(-r),l=Bt(t**2,o);return(-i(t)+Ut>0?-1:1)*((a-s)*c)/l}):(i=t=>{let r=Math.exp(-t*e),i=(t-n)*e+1;return-Ut+r*i},a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=Ht(i,a,s);if(e=D(e),isNaN(c))return{stiffness:V.stiffness,damping:V.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var Gt=[`duration`,`bounce`],Kt=[`stiffness`,`damping`,`mass`];function qt(e,t){return t.some(t=>e[t]!==void 0)}function Jt(e){let t={velocity:V.velocity,stiffness:V.stiffness,damping:V.damping,mass:V.mass,isResolvedFromDuration:!1,...e};if(!qt(e,Kt)&&qt(e,Gt))if(t.velocity=0,e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*v(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:V.mass,stiffness:i,damping:a}}else{let n=Wt({...e,velocity:0});t={...t,...n,mass:V.mass},t.isResolvedFromDuration=!0}return t}function Yt(e=V.visualDuration,t=V.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},{restSpeed:r,restDelta:i}=n,a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:c,damping:l,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=Jt({...n,velocity:-O(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=O(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?V.restSpeed.granular:V.restSpeed.default,i||=v?V.restDelta.granular:V.restDelta.default;let y,b,x,S,C,w;if(h<1)x=Bt(_,h),S=(m+h*_*g)/x,y=e=>o-Math.exp(-h*_*e)*(S*Math.sin(x*e)+g*Math.cos(x*e)),C=h*_*S+g*x,w=h*_*g-S*x,b=e=>Math.exp(-h*_*e)*(C*Math.sin(x*e)+w*Math.cos(x*e));else if(h===1){y=e=>o-Math.exp(-_*e)*(g+(m+_*g)*e);let e=m+_*g;b=t=>Math.exp(-_*t)*(_*e*t-m)}else{let e=_*Math.sqrt(h*h-1);y=t=>{let n=Math.exp(-h*_*t),r=Math.min(e*t,300);return o-n*((m+h*_*g)*Math.sinh(r)+e*g*Math.cosh(r))/e};let t=(m+h*_*g)/e,n=h*_*t-g*e,r=h*_*g-t*e;b=t=>{let i=Math.exp(-h*_*t),a=Math.min(e*t,300);return i*(n*Math.sinh(a)+r*Math.cosh(a))}}let ee={calculatedDuration:p&&d||null,velocity:e=>D(b(e)),next:e=>{if(!p&&h<1){let t=Math.exp(-h*_*e),n=Math.sin(x*e),a=Math.cos(x*e),c=o-t*(S*n+g*a),l=D(t*(C*n+w*a));return s.done=Math.abs(l)<=r&&Math.abs(o-c)<=i,s.value=s.done?o:c,s}let t=y(e);if(p)s.done=e>=d;else{let n=D(b(e));s.done=Math.abs(n)<=r&&Math.abs(o-t)<=i}return s.value=s.done?o:t,s},toString:()=>{let e=Math.min(Rt(ee),Lt),t=It(t=>ee.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return ee}Yt.applyToOptions=e=>{let t=zt(e,100,Yt);return e.ease=t.ease,e.duration=D(t.duration),e.type=`keyframes`,e};var Xt=5;function Zt(e,t,n){let r=Math.max(t-Xt,0);return ne(n-e(r),t-r)}function Qt({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>s!==void 0&&e<s||c!==void 0&&e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o===void 0?g:o(g);_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>_+v(e),b=e=>{let t=v(e),n=y(e);f.done=Math.abs(t)<=l,f.value=f.done?_:n},x,S,C=e=>{p(f.value)&&(x=e,S=Yt({keyframes:[f.value,m(f.value)],velocity:Zt(y,e,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return C(0),{calculatedDuration:null,next:e=>{let t=!1;return!S&&x===void 0&&(t=!0,b(e),C(e)),x!==void 0&&e>=x?S.next(e-x):(!t&&b(e),f)}}}function $t(e,t,n){let r=[],i=n||y.mix||Pt,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=T(Array.isArray(t)?t[n]||w:t,a)),r.push(a)}return r}function en(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(t.length,a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=$t(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=E(e[r],e[r+1],n);return s[r](i)};return n?t=>l(v(e[0],e[a-1],t)):l}function tn(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=E(0,t,r);e.push(B(n,1,i))}}function nn(e){let t=[0];return tn(t,e.length-1),t}function rn(e,t){return e.map(e=>e*t)}function an(e,t){return e.map(()=>t||ye).splice(0,e.length-1)}function on({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=be(r)?r.map(we):we(r),a={done:!1,value:t[0]},o=en(rn(n&&n.length===t.length?n:nn(t),e),t,{ease:Array.isArray(i)?i:an(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var sn=e=>e!==null;function cn(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(sn),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var ln={decay:Qt,inertia:Qt,tween:on,keyframes:on,spring:Yt};function un(e){typeof e.type==`string`&&(e.type=ln[e.type])}var dn=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}},fn=e=>e/100,pn=class extends dn{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==N.now()&&this.tick(N.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},P.mainThread++,this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;un(e);let{type:t=on,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||on;s!==on&&typeof o[0]!=`number`&&(this.mixKeyframes=T(fn,Pt(o[0],o[1])),o=[0,100]);let c=s({...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=Rt(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime===null?this.currentTime=t:this.currentTime=this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:l,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let y=this.currentTime,b=n;if(u){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,u+1),t%2&&(d===`reverse`?(n=1-n,f&&(n-=f/o)):d===`mirror`&&(b=a)),y=v(0,1,n)*o}let x;_?(this.delayState.value=l[0],x=this.delayState):x=b.next(y),i&&!_&&(x.value=i(x.value));let{done:S}=x;!_&&s!==null&&(S=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let C=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&S);return C&&p!==Qt&&(x.value=cn(l,this.options,h,this.speed)),m&&m(x.value),C&&this.finish(),x}then(e,t){return this.finished.then(e,t)}get duration(){return O(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+O(e)}get time(){return O(this.currentTime)}set time(e){e=D(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state=`paused`,this.holdTime=e,this.tick(e))}getGeneratorVelocity(){let e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);let t=this.generator.next(e).value;return Zt(e=>this.generator.next(e).value,e,t)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(N.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=O(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=Ft,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??n:this.startTime=n-this.holdTime,this.state===`finished`&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state=`running`,this.driver.start()}pause(){this.state=`paused`,this.updateTime(N.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.stopDriver(),this.startTime=this.holdTime=null,P.mainThread--}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}};function mn(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var H=e=>e*180/Math.PI,hn=e=>_n(H(Math.atan2(e[1],e[0]))),gn={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:hn,rotateZ:hn,skewX:e=>H(Math.atan(e[1])),skewY:e=>H(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},_n=e=>(e%=360,e<0&&(e+=360),e),vn=hn,yn=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),bn=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),xn={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:yn,scaleY:bn,scale:e=>(yn(e)+bn(e))/2,rotateX:e=>_n(H(Math.atan2(e[6],e[5]))),rotateY:e=>_n(H(Math.atan2(-e[2],e[0]))),rotateZ:vn,rotate:vn,skewX:e=>H(Math.atan(e[4])),skewY:e=>H(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Sn(e){return+!!e.includes(`scale`)}function Cn(e,t){if(!e||e===`none`)return Sn(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=xn,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=gn,i=t}if(!i)return Sn(t);let a=r[t],o=i[1].split(`,`).map(Tn);return typeof a==`function`?a(o):o[a]}var wn=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return Cn(n,t)};function Tn(e){return parseFloat(e.trim())}var En=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],Dn=new Set(En),On=e=>e===Re||e===L,kn=new Set([`x`,`y`,`z`]),An=En.filter(e=>!kn.has(e));function jn(e){let t=[];return An.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(+!!n.startsWith(`scale`)))}),t}var U={width:({x:e},{paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Cn(t,`x`),y:(e,{transform:t})=>Cn(t,`y`)};U.translateX=U.x,U.translateY=U.y;var W=new Set,Mn=!1,Nn=!1,Pn=!1;function Fn(){if(Nn){let e=Array.from(W).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=jn(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}Nn=!1,Mn=!1,W.forEach(e=>e.complete(Pn)),W.clear()}function In(){W.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Nn=!0)})}function Ln(){Pn=!0,In(),Fn(),Pn=!1}var Rn=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(W.add(this),Mn||(Mn=!0,A.read(In),A.resolveKeyframes(Fn))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=n.readValue(t,a);r!=null&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}mn(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),W.delete(this)}cancel(){this.state===`scheduled`&&(W.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},zn=e=>e.startsWith(`--`);function Bn(e,t,n){zn(t)?e.style.setProperty(t,n):e.style[t]=n}var Vn={};function Hn(e,t){let n=C(e);return()=>Vn[t]??n()}var Un=Hn(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),Wn=Hn(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),Gn=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Kn={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:Gn([0,.65,.55,1]),circOut:Gn([.55,0,1,.45]),backIn:Gn([.31,.01,.66,-.59]),backOut:Gn([.33,1.53,.69,.99])};function qn(e,t){if(e)return typeof e==`function`?Wn()?It(e,t):`ease-out`:xe(e)?Gn(e):Array.isArray(e)?e.map(e=>qn(e,t)||Kn.easeOut):Kn[e]}function Jn(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=qn(s,i);Array.isArray(d)&&(u.easing=d),k.value&&P.waapi++;let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};l&&(f.pseudoElement=l);let p=e.animate(u,f);return k.value&&p.finished.finally(()=>{P.waapi--}),p}function Yn(e){return typeof e==`function`&&`applyToOptions`in e}function Xn({type:e,...t}){return Yn(e)&&Wn()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var Zn=class extends dn{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,e.type;let c=Xn(e);this.animation=Jn(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=cn(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),Bn(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e===`idle`||e===`finished`||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return O(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+O(e)}get time(){return O(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=D(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:n,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&Un()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),w):r(this)}},Qn={anticipate:pe,backInOut:fe,circInOut:ge};function $n(e){return e in Qn}function er(e){typeof e.ease==`string`&&$n(e.ease)&&(e.ease=Qn[e.ease])}var tr=10,nr=class extends Zn{constructor(e){er(e),un(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let o=new pn({...a,autoplay:!1}),s=Math.max(tr,N.now()-this.startTime),c=v(0,tr,s-tr),l=o.sample(s).value,{name:u}=this.options;i&&u&&Bn(i,u,l),t.setWithVelocity(o.sample(Math.max(0,s-c)).value,l,c),o.stop()}},rr=(e,t)=>t===`zIndex`?!1:!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(z.test(e)||e===`0`)&&!e.startsWith(`url(`));function ir(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function ar(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=rr(i,t),s=rr(a,t);return`${t}${i}${a}${o?a:i}`,!o||!s?!1:ir(e)||(n===`spring`||Yn(n))&&r}function or(e){e.duration=0,e.type=`keyframes`}var sr=new Set([`opacity`,`clipPath`,`filter`,`transform`]),cr=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function lr(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&cr.test(e[t]))return!0;return!1}var ur=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),dr=C(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function fr(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:c,transformTemplate:l}=t.owner.getProps();return dr()&&n&&(sr.has(n)||ur.has(n)&&lr(s))&&(n!==`transform`||!l)&&!c&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var pr=40,mr=class extends dn{constructor({autoplay:e=!0,delay:t=0,type:n=`keyframes`,repeat:r=0,repeatDelay:i=0,repeatType:a=`loop`,keyframes:o,name:s,motionValue:c,element:l,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=N.now();let d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,name:s,motionValue:c,element:l,...u};this.keyframeResolver=new(l?.KeyframeResolver||Rn)(o,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,c,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=N.now();let u=!0;ar(e,i,a,o)||(u=!1,(y.instantAnimations||!s)&&l?.(cn(e,n,t)),e[0]=e[e.length-1],or(n),n.repeat=0);let d={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>pr?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},f=u&&!c&&fr(d),p=d.motionValue?.owner?.current,m;if(f)try{m=new nr({...d,element:p})}catch{m=new pn(d)}else m=new pn(d);m.finished.then(()=>{this.notifyFinished()}).catch(w),this.pendingTimeline&&=(this.stopTimeline=m.attachTimeline(this.pendingTimeline),void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Ln()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};function hr(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}var gr=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function _r(e){let t=gr.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function vr(e,t,n=1){`${e}`;let[r,i]=_r(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return b(e)?parseFloat(e):e}return Fe(i)?vr(i,t,n+1):i}var yr={type:`spring`,stiffness:500,damping:25,restSpeed:10},br=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),xr={type:`keyframes`,duration:.8},Sr={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},Cr=(e,{keyframes:t})=>t.length>2?xr:Dn.has(e)?e.startsWith(`scale`)?br(t[1]):yr:Sr;function wr(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function Tr(e,t){let n=e?.[t]??e?.default??e;return n===e?n:wr(n,e)}var Er=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`]);function Dr(e){for(let t in e)if(!Er.has(t))return!0;return!1}var Or=(e,t,n,r={},i,a)=>o=>{let s=Tr(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=D(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};Dr(s)||Object.assign(u,Cr(e,u)),u.duration&&=D(u.duration),u.repeatDelay&&=D(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(or(u),u.delay===0&&(d=!0)),(y.instantAnimations||y.skipAnimations||i?.shouldSkipAnimations)&&(d=!0,or(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=cn(u.keyframes,s);if(e!==void 0){A.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new pn(u):new mr(u)};function kr(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function Ar(e,t,n,r){if(typeof t==`function`){let[i,a]=kr(r);t=t(n===void 0?e.custom:n,i,a)}if(typeof t==`string`&&(t=e.variants&&e.variants[t]),typeof t==`function`){let[i,a]=kr(r);t=t(n===void 0?e.custom:n,i,a)}return t}function G(e,t,n){let r=e.getProps();return Ar(r,t,n===void 0?r.custom:n,e)}var jr=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...En]),Mr=30,Nr=e=>!isNaN(parseFloat(e)),Pr={current:void 0},Fr=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=N.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=N.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Nr(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){this.events[e]||(this.events[e]=new te);let n=this.events[e].add(t);return e===`change`?()=>{n(),A.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return Pr.current&&Pr.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=N.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Mr)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,Mr);return ne(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function Ir(e,t){return new Fr(e,t)}var Lr=e=>Array.isArray(e);function Rr(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ir(n))}function zr(e){return Lr(e)?e[e.length-1]||0:e}function Br(e,t){let{transitionEnd:n={},transition:r={},...i}=G(e,t)||{};i={...i,...n};for(let t in i)Rr(e,t,zr(i[t]))}var K=e=>!!(e&&e.getVelocity);function Vr(e){return!!(K(e)&&e.add)}function Hr(e,t){let n=e.getValue(`willChange`);if(Vr(n))return n.add(t);if(!n&&y.WillChange){let n=new y.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function Ur(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var Wr=`data-`+Ur(`framerAppearId`);function Gr(e){return e.props[Wr]}function Kr({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function qr(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?wr(a,c):c;let l=a?.reduceMotion;r&&(a=r);let u=[],d=i&&e.animationState&&e.animationState.getState()[i];for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||d&&Kr(d,t))continue;let o={delay:n,...Tr(a||{},t)},c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){A.update(()=>r.set(i));continue}let f=!1;if(window.MotionHandoffAnimation){let n=Gr(e);if(n){let e=window.MotionHandoffAnimation(n,t,A);e!==null&&(o.startTime=e,f=!0)}}Hr(e,t);let p=l??e.shouldReduceMotion;r.start(Or(t,r,i,p&&jr.has(t)?{type:!1}:o,e,f));let m=r.animation;m&&u.push(m)}if(o){let t=()=>A.update(()=>{o&&Br(e,o)});u.length?Promise.all(u).then(t):t()}return u}function Jr(e,t,n={}){let r=G(e,t,n.type===`exit`?e.presenceContext?.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);let a=r?()=>Promise.all(qr(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return Yr(e,t,r,a,o,s,n)}:()=>Promise.resolve(),{when:s}=i;if(s){let[e,t]=s===`beforeChildren`?[a,o]:[o,a];return e().then(()=>t())}else return Promise.all([a(),o(n.delay)])}function Yr(e,t,n=0,r=0,i=0,a=1,o){let s=[];for(let c of e.variantChildren)c.notify(`AnimationStart`,t),s.push(Jr(c,t,{...o,delay:n+(typeof r==`function`?0:r)+hr(e.variantChildren,c,r,i,a)}).then(()=>c.notify(`AnimationComplete`,t)));return Promise.all(s)}function Xr(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>Jr(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=Jr(e,t,n);else{let i=typeof t==`function`?G(e,t,n.custom):t;r=Promise.all(qr(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}var Zr={test:e=>e===`auto`,parse:e=>e},Qr=e=>t=>t.test(e),$r=[Re,L,I,F,et,$e,Zr],ei=e=>$r.find(Qr(e));function ti(e){return typeof e==`number`?e===0:e===null?!0:e===`none`||e===`0`||S(e)}var ni=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function ri(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(He)||[];if(!r)return e;let i=n.replace(r,``),a=+!!ni.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var ii=/\b([a-z-]*)\(.*?\)/gu,ai={...z,getAnimatableNone:e=>{let t=e.match(ii);return t?t.map(ri).join(` `):e}},oi={...z,getAnimatableNone:e=>{let t=z.parse(e);return z.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},si={...Re,transform:Math.round},ci={borderWidth:L,borderTopWidth:L,borderRightWidth:L,borderBottomWidth:L,borderLeftWidth:L,borderRadius:L,borderTopLeftRadius:L,borderTopRightRadius:L,borderBottomRightRadius:L,borderBottomLeftRadius:L,width:L,maxWidth:L,height:L,maxHeight:L,top:L,right:L,bottom:L,left:L,inset:L,insetBlock:L,insetBlockStart:L,insetBlockEnd:L,insetInline:L,insetInlineStart:L,insetInlineEnd:L,padding:L,paddingTop:L,paddingRight:L,paddingBottom:L,paddingLeft:L,paddingBlock:L,paddingBlockStart:L,paddingBlockEnd:L,paddingInline:L,paddingInlineStart:L,paddingInlineEnd:L,margin:L,marginTop:L,marginRight:L,marginBottom:L,marginLeft:L,marginBlock:L,marginBlockStart:L,marginBlockEnd:L,marginInline:L,marginInlineStart:L,marginInlineEnd:L,fontSize:L,backgroundPositionX:L,backgroundPositionY:L,rotate:F,rotateX:F,rotateY:F,rotateZ:F,scale:Be,scaleX:Be,scaleY:Be,scaleZ:Be,skew:F,skewX:F,skewY:F,distance:L,translateX:L,translateY:L,translateZ:L,x:L,y:L,z:L,perspective:L,transformPerspective:L,opacity:ze,originX:tt,originY:tt,originZ:L,zIndex:si,fillOpacity:ze,strokeOpacity:ze,numOctaves:si},li={...ci,color:R,backgroundColor:R,outlineColor:R,fill:R,stroke:R,borderColor:R,borderTopColor:R,borderRightColor:R,borderBottomColor:R,borderLeftColor:R,filter:ai,WebkitFilter:ai,mask:oi,WebkitMask:oi},ui=e=>li[e],di=new Set([ai,oi]);function fi(e,t){let n=ui(e);return di.has(n)||(n=z),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var pi=new Set([`auto`,`none`,`0`]);function mi(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!pi.has(t)&&dt(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=fi(n,i)}var hi=class extends Rn{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),Fe(r))){let i=vr(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!jr.has(n)||e.length!==2)return;let[r,i]=e,a=ei(r),o=ei(i);if(Le(r)!==Le(i)&&U[n]){this.needsMeasurement=!0;return}if(a!==o)if(On(a)&&On(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else U[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||ti(e[t]))&&n.push(t);n.length&&mi(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=U[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&e.getValue(n,r).jump(r,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;let r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);let i=n.length-1,a=n[i];n[i]=U[t](e.measureViewportBox(),window.getComputedStyle(e.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}};function gi(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}var _i=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function vi(e){return x(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}var{schedule:yi,cancel:bi}=Oe(queueMicrotask,!1),q={x:!1,y:!1};function xi(){return q.x||q.y}function Si(e){return e===`x`||e===`y`?q[e]?null:(q[e]=!0,()=>{q[e]=!1}):q.x||q.y?null:(q.x=q.y=!0,()=>{q.x=q.y=!1})}function Ci(e,t){let n=gi(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function wi(e){return!(e.pointerType===`touch`||xi())}function Ti(e,t,n={}){let[r,i,a]=Ci(e,n);return r.forEach(e=>{let n=!1,r=!1,a,o=()=>{e.removeEventListener(`pointerleave`,u)},s=e=>{a&&=(a(e),void 0),o()},c=e=>{n=!1,window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),r&&(r=!1,s(e))},l=()=>{n=!0,window.addEventListener(`pointerup`,c,i),window.addEventListener(`pointercancel`,c,i)},u=e=>{if(e.pointerType!==`touch`){if(n){r=!0;return}s(e)}};e.addEventListener(`pointerenter`,n=>{if(!wi(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,u,i))},i),e.addEventListener(`pointerdown`,l,i)}),a}var Ei=(e,t)=>t?e===t?!0:Ei(e,t.parentElement):!1,Di=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,Oi=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function ki(e){return Oi.has(e.tagName)||e.isContentEditable===!0}var Ai=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function ji(e){return Ai.has(e.tagName)||e.isContentEditable===!0}var Mi=new WeakSet;function Ni(e){return t=>{t.key===`Enter`&&e(t)}}function Pi(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var Fi=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=Ni(()=>{if(Mi.has(n))return;Pi(n,`down`);let e=Ni(()=>{Pi(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>Pi(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function Ii(e){return Di(e)&&!xi()}var Li=new WeakSet;function Ri(e,t,n={}){let[r,i,a]=Ci(e,n),o=e=>{let r=e.currentTarget;if(!Ii(e)||Li.has(e))return;Mi.add(r),n.stopPropagation&&Li.add(e);let a=t(r,e),o=(e,t)=>{window.removeEventListener(`pointerup`,s),window.removeEventListener(`pointercancel`,c),Mi.has(r)&&Mi.delete(r),Ii(e)&&typeof a==`function`&&a(e,{success:t})},s=e=>{o(e,r===window||r===document||n.useGlobalTarget||Ei(r,e.target))},c=e=>{o(e,!1)};window.addEventListener(`pointerup`,s,i),window.addEventListener(`pointercancel`,c,i)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),vi(e)&&(e.addEventListener(`focus`,e=>Fi(e,i)),!ki(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function zi(e){return x(e)&&`ownerSVGElement`in e}var Bi=new WeakMap,Vi,Hi=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:zi(r)&&`getBBox`in r?r.getBBox()[t]:r[n],Ui=Hi(`inline`,`width`,`offsetWidth`),Wi=Hi(`block`,`height`,`offsetHeight`);function Gi({target:e,borderBoxSize:t}){Bi.get(e)?.forEach(n=>{n(e,{get width(){return Ui(e,t)},get height(){return Wi(e,t)}})})}function Ki(e){e.forEach(Gi)}function qi(){typeof ResizeObserver>`u`||(Vi=new ResizeObserver(Ki))}function Ji(e,t){Vi||qi();let n=gi(e);return n.forEach(e=>{let n=Bi.get(e);n||(n=new Set,Bi.set(e,n)),n.add(t),Vi?.observe(e)}),()=>{n.forEach(e=>{let n=Bi.get(e);n?.delete(t),n?.size||Vi?.unobserve(e)})}}var Yi=new Set,Xi;function Zi(){Xi=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Yi.forEach(t=>t(e))},window.addEventListener(`resize`,Xi)}function Qi(e){return Yi.add(e),Xi||Zi(),()=>{Yi.delete(e),!Yi.size&&typeof Xi==`function`&&(window.removeEventListener(`resize`,Xi),Xi=void 0)}}function $i(e,t){return typeof e==`function`?Qi(e):Ji(e,t)}function ea(e){return zi(e)&&e.tagName===`svg`}var ta=[...$r,R,z],na=e=>ta.find(Qr(e)),ra=()=>({translate:0,scale:1,origin:0,originPoint:0}),ia=()=>({x:ra(),y:ra()}),aa=()=>({min:0,max:0}),J=()=>({x:aa(),y:aa()}),oa=new WeakMap;function sa(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function ca(e){return typeof e==`string`||Array.isArray(e)}var la=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],ua=[`initial`,...la];function da(e){return sa(e.animate)||ua.some(t=>ca(e[t]))}function fa(e){return!!(da(e)||e.variants)}function pa(e,t,n){for(let r in t){let i=t[r],a=n[r];if(K(i))e.addValue(r,i);else if(K(a))e.addValue(r,Ir(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,Ir(t===void 0?i:t,{owner:e}))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var ma={current:null},ha={current:!1},ga=typeof window<`u`;function _a(){if(ha.current=!0,ga)if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>ma.current=e.matches;e.addEventListener(`change`,t),t()}else ma.current=!1}var va=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],ya={};function ba(e){ya=e}function xa(){return ya}var Sa=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Rn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify(`Update`,this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=N.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,A.render(this.render,!1,!0))};let{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=t.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=da(t),this.isVariantNode=fa(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];c[e]!==void 0&&K(t)&&t.set(c[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,oa.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:(ha.current||_a(),this.shouldReduceMotion=ma.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),j(this.notifyUpdate),j(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&sr.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new Zn({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:D(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=Dn.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&A.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;typeof window<`u`&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i(),t.owner&&t.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in ya){let t=ya[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):J()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<va.length;t++){let n=va[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=pa(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=Ir(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(b(n)||S(n))?n=parseFloat(n):!na(n)&&z.test(t)&&(n=fi(e,t)),this.setBaseTarget(e,K(n)?n.get():n)),K(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if(typeof t==`string`||typeof t==`object`){let r=Ar(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&n!==void 0)return n;let r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!K(r)?r:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new te),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){yi.render(this.render)}},Ca=class extends Sa{constructor(){super(...arguments),this.KeyframeResolver=hi}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;K(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}},Y=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function wa({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Ta({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Ea(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Da(e){return e===void 0||e===1}function Oa({scale:e,scaleX:t,scaleY:n}){return!Da(e)||!Da(t)||!Da(n)}function ka(e){return Oa(e)||Aa(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Aa(e){return ja(e.x)||ja(e.y)}function ja(e){return e&&e!==`0%`}function Ma(e,t,n){return n+t*(e-n)}function Na(e,t,n,r,i){return i!==void 0&&(e=Ma(e,i,r)),Ma(e,n,r)+t}function Pa(e,t=0,n=1,r,i){e.min=Na(e.min,t,n,r,i),e.max=Na(e.max,t,n,r,i)}function Fa(e,{x:t,y:n}){Pa(e.x,t.translate,t.scale,t.originPoint),Pa(e.y,n.translate,n.scale,n.originPoint)}var Ia=.999999999999,La=1.0000000000001;function Ra(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;let{visualElement:i}=a.options;i&&i.props.style&&i.props.style.display===`contents`||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(X(e.x,-a.scroll.offset.x),X(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Fa(e,o)),r&&ka(a.latestValues)&&Va(e,a.latestValues,a.layout?.layoutBox))}t.x<La&&t.x>Ia&&(t.x=1),t.y<La&&t.y>Ia&&(t.y=1)}function X(e,t){e.min+=t,e.max+=t}function za(e,t,n,r,i=.5){Pa(e,t,n,B(e.min,e.max,i),r)}function Ba(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function Va(e,t,n){let r=n??e;za(e.x,Ba(t.x,r.x),t.scaleX,t.scale,t.originX),za(e.y,Ba(t.y,r.y),t.scaleY,t.scale,t.originY)}function Ha(e,t){return wa(Ea(e.getBoundingClientRect(),t))}function Ua(e,t,n){let r=Ha(e,n),{scroll:i}=t;return i&&(X(r.x,i.offset.x),X(r.y,i.offset.y)),r}var Wa={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},Ga=En.length;function Ka(e,t,n){let r=``,i=!0;for(let a=0;a<Ga;a++){let o=En[a],s=e[o];if(s===void 0)continue;let c=!0;if(typeof s==`number`)c=s===+!!o.startsWith(`scale`);else{let e=parseFloat(s);c=o.startsWith(`scale`)?e===1:e===0}if(!c||n){let e=_i(s,ci[o]);if(!c){i=!1;let t=Wa[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}return r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function qa(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(Dn.has(e)){o=!0;continue}else if(Ne(e)){i[e]=n;continue}else{let t=_i(n,ci[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=Ka(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}function Ja(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function Ya(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var Xa={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(L.test(e))e=parseFloat(e);else return e;return`${Ya(e,t.target.x)}% ${Ya(e,t.target.y)}%`}},Za={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=z.parse(e);if(i.length>5)return r;let a=z.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=B(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},Qa={borderRadius:{...Xa,applyTo:[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`]},borderTopLeftRadius:Xa,borderTopRightRadius:Xa,borderBottomLeftRadius:Xa,borderBottomRightRadius:Xa,boxShadow:Za};function $a(e,{layout:t,layoutId:n}){return Dn.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!Qa[e]||e===`opacity`)}function eo(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(K(r[t])||i&&K(i[t])||$a(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function to(e){return window.getComputedStyle(e)}var no=class extends Ca{constructor(){super(...arguments),this.type=`html`,this.renderInstance=Ja}readValueFromInstance(e,t){if(Dn.has(t))return this.projection?.isProjecting?Sn(t):wn(e,t);{let n=to(e),r=(Ne(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return Ha(e,t)}build(e,t,n){qa(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return eo(e,t,n)}},ro={offset:`stroke-dashoffset`,array:`stroke-dasharray`},io={offset:`strokeDashoffset`,array:`strokeDasharray`};function ao(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?ro:io;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var oo=[`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function so(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(qa(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox);for(let e of oo)d[e]!==void 0&&(f[e]=d[e],delete d[e]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&ao(d,i,a,o,!1)}var co=new Set([`baseFrequency`,`diffuseConstant`,`kernelMatrix`,`kernelUnitLength`,`keySplines`,`keyTimes`,`limitingConeAngle`,`markerHeight`,`markerWidth`,`numOctaves`,`targetX`,`targetY`,`surfaceScale`,`specularConstant`,`specularExponent`,`stdDeviation`,`tableValues`,`viewBox`,`gradientTransform`,`pathLength`,`startOffset`,`textLength`,`lengthAdjust`]),lo=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function uo(e,t,n,r){Ja(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(co.has(n)?n:Ur(n),t.attrs[n])}function fo(e,t,n){let r=eo(e,t,n);for(let n in e)if(K(e[n])||K(t[n])){let t=En.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var po=class extends Ca{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=J}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(Dn.has(t)){let e=ui(t);return e&&e.default||0}return t=co.has(t)?t:Ur(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return fo(e,t,n)}build(e,t,n){so(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){uo(e,t,n,r)}mount(e){this.isSVGTag=lo(e.tagName),super.mount(e)}},mo=ua.length;function ho(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&ho(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<mo;n++){let r=ua[n],i=e.props[r];(ca(i)||i===!1)&&(t[r]=i)}return t}function go(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var _o=[...la].reverse(),vo=la.length;function yo(e){return t=>Promise.all(t.map(({animation:t,options:n})=>Xr(e,t,n)))}function bo(e){let t=yo(e),n=Co(),r=!0,i=!1,a=t=>(n,r)=>{let i=G(e,r,t===`exit`?e.presenceContext?.custom:void 0);if(i){let{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function o(n){t=n(e)}function s(o){let{props:s}=e,c=ho(e.parent)||{},l=[],u=new Set,d={},f=1/0;for(let t=0;t<vo;t++){let p=_o[t],m=n[p],h=s[p]===void 0?c[p]:s[p],g=ca(h),_=p===o?m.isActive:null;_===!1&&(f=t);let v=h===c[p]&&h!==s[p]&&g;if(v&&(r||i)&&e.manuallyAnimateOnMount&&(v=!1),m.protectedKeys={...d},!m.isActive&&_===null||!h&&!m.prevProp||sa(h)||typeof h==`boolean`)continue;if(p===`exit`&&m.isActive&&_!==!0){m.prevResolvedValues&&(d={...d,...m.prevResolvedValues});continue}let y=xo(m.prevProp,h),b=y||p===o&&m.isActive&&!v&&g||t>f&&g,x=!1,S=Array.isArray(h)?h:[h],C=S.reduce(a(p),{});_===!1&&(C={});let{prevResolvedValues:w={}}=m,ee={...w,...C},T=t=>{b=!0,u.has(t)&&(x=!0,u.delete(t)),m.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in ee){let t=C[e],n=w[e];if(d.hasOwnProperty(e))continue;let r=!1;r=Lr(t)&&Lr(n)?!go(t,n):t!==n,r?t==null?u.add(e):T(e):t!==void 0&&u.has(e)?T(e):m.protectedKeys[e]=!0}m.prevProp=h,m.prevResolvedValues=C,m.isActive&&(d={...d,...C}),(r||i)&&e.blockInitialAnimation&&(b=!1);let E=v&&y;b&&(!E||x)&&l.push(...S.map(t=>{let n={type:p};if(typeof t==`string`&&(r||i)&&!E&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,i=G(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=hr(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){let t={};if(typeof s.initial!=`boolean`){let n=G(e,Array.isArray(s.initial)?s.initial[0]:s.initial);n&&n.transition&&(t.transition=n.transition)}u.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),l.push({animation:t})}let p=!!l.length;return r&&(s.initial===!1||s.initial===s.animate)&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,i=!1,p?t(l):Promise.resolve()}function c(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=s(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:s,setActive:c,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Co(),i=!0}}}function xo(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!go(t,e):!1}function So(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Co(){return{animate:So(!0),whileInView:So(),whileHover:So(),whileTap:So(),whileDrag:So(),whileFocus:So(),exit:So()}}function wo(e,t){e.min=t.min,e.max=t.max}function Z(e,t){wo(e.x,t.x),wo(e.y,t.y)}function To(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var Eo=1e-4,Do=1-Eo,Oo=1+Eo,ko=.01,Ao=0-ko,jo=0+ko;function Q(e){return e.max-e.min}function Mo(e,t,n){return Math.abs(e-t)<=n}function No(e,t,n,r=.5){e.origin=r,e.originPoint=B(t.min,t.max,e.origin),e.scale=Q(n)/Q(t),e.translate=B(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Do&&e.scale<=Oo||isNaN(e.scale))&&(e.scale=1),(e.translate>=Ao&&e.translate<=jo||isNaN(e.translate))&&(e.translate=0)}function Po(e,t,n,r){No(e.x,t.x,n.x,r?r.originX:void 0),No(e.y,t.y,n.y,r?r.originY:void 0)}function Fo(e,t,n,r=0){e.min=(r?B(n.min,n.max,r):n.min)+t.min,e.max=e.min+Q(t)}function Io(e,t,n,r){Fo(e.x,t.x,n.x,r?.x),Fo(e.y,t.y,n.y,r?.y)}function Lo(e,t,n,r=0){let i=r?B(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+Q(t)}function Ro(e,t,n,r){Lo(e.x,t.x,n.x,r?.x),Lo(e.y,t.y,n.y,r?.y)}function zo(e,t,n,r,i){return e-=t,e=Ma(e,1/n,r),i!==void 0&&(e=Ma(e,1/i,r)),e}function Bo(e,t=0,n=1,r=.5,i,a=e,o=e){if(I.test(t)&&(t=parseFloat(t),t=B(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=B(a.min,a.max,r);e===a&&(s-=t),e.min=zo(e.min,t,n,s,i),e.max=zo(e.max,t,n,s,i)}function Vo(e,t,[n,r,i],a,o){Bo(e,t[n],t[r],t[i],t.scale,a,o)}var Ho=[`x`,`scaleX`,`originX`],Uo=[`y`,`scaleY`,`originY`];function Wo(e,t,n,r){Vo(e.x,t,Ho,n?n.x:void 0,r?r.x:void 0),Vo(e.y,t,Uo,n?n.y:void 0,r?r.y:void 0)}function Go(e){return e.translate===0&&e.scale===1}function Ko(e){return Go(e.x)&&Go(e.y)}function qo(e,t){return e.min===t.min&&e.max===t.max}function Jo(e,t){return qo(e.x,t.x)&&qo(e.y,t.y)}function Yo(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Xo(e,t){return Yo(e.x,t.x)&&Yo(e.y,t.y)}function Zo(e){return Q(e.x)/Q(e.y)}function Qo(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function $(e){return[e(`x`),e(`y`)]}function $o(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,rotateX:i,rotateY:a,skewX:o,skewY:s}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotateX(${i}deg) `),a&&(r+=`rotateY(${a}deg) `),o&&(r+=`skewX(${o}deg) `),s&&(r+=`skewY(${s}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}var es=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`],ts=es.length,ns=e=>typeof e==`string`?parseFloat(e):e,rs=e=>typeof e==`number`||L.test(e);function is(e,t,n,r,i,a){i?(e.opacity=B(0,n.opacity??1,os(r)),e.opacityExit=B(t.opacity??1,0,ss(r))):a&&(e.opacity=B(t.opacity??1,n.opacity??1,r));for(let i=0;i<ts;i++){let a=es[i],o=as(t,a),s=as(n,a);o===void 0&&s===void 0||(o||=0,s||=0,o===0||s===0||rs(o)===rs(s)?(e[a]=Math.max(B(ns(o),ns(s),r),0),(I.test(s)||I.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=B(t.rotate||0,n.rotate||0,r))}function as(e,t){return e[t]===void 0?e.borderRadius:e[t]}var os=cs(0,.5,he),ss=cs(.5,.95,w);function cs(e,t,n){return r=>r<e?0:r>t?1:n(E(e,t,r))}function ls(e,t,n){let r=K(e)?e:Ir(e);return r.start(Or(``,r,t,n)),r.animation}function us(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}var ds=(e,t)=>e.depth-t.depth,fs=class{constructor(){this.children=[],this.isDirty=!1}add(e){g(this.children,e),this.isDirty=!0}remove(e){_(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(ds),this.isDirty=!1,this.children.forEach(e)}};function ps(e,t){let n=N.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(j(r),e(a-t))};return A.setup(r,!0),()=>j(r)}function ms(e){return K(e)?e.get():e}var hs=class{constructor(){this.members=[]}add(e){g(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;(!r||r.isConnected===!1)&&!n.snapshot&&(_(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(_(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(e.isPresent!==!1&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(r===void 0||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}},gs={hasAnimatedSinceResize:!0,hasEverUpdated:!1},_s={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},vs=[``,`X`,`Y`,`Z`],ys=1e3,bs=0;function xs(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Ss(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=Gr(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,A,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Ss(r)}function Cs({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=bs++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,k.value&&(_s.nodes=_s.calculatedTargetDeltas=_s.calculatedProjections=0),this.nodes.forEach(Es),this.nodes.forEach(Fs),this.nodes.forEach(Is),this.nodes.forEach(Ds),k.addProjectionMetrics&&k.addProjectionMetrics(_s)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new fs)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new te),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=zi(t)&&!ea(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;A.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=ps(i,250),gs.hasAnimatedSinceResize&&(gs.hasAnimatedSinceResize=!1,this.nodes.forEach(Ps)))})}n&&this.root.registerSharedNode(n,this),this.options.animate!==!1&&i&&(n||r)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||i.getDefaultTransition()||Us,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!Xo(this.targetLayout,r),l=!t&&n;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...Tr(a,`layout`),onPlay:o,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l)}else t||Ps(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),j(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Ls),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Ss(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,(typeof t.latestValues.x==`string`||typeof t.latestValues.y==`string`)&&(t.isLayoutDirty=!0),t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(As),this.nodes.forEach(ks);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(js);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Ms),this.nodes.forEach(Ns),this.nodes.forEach(ws),this.nodes.forEach(Ts)):this.nodes.forEach(js),this.clearAllSnapshots();let e=N.now();M.delta=v(0,1e3/60,e-M.timestamp),M.timestamp=e,M.isProcessing=!0,ke.update.process(M),ke.preRender.process(M),ke.render.process(M),M.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,yi.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Os),this.sharedNodes.forEach(Rs)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,A.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){A.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Q(this.snapshot.measuredBox.x)&&!Q(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||=J(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify(`LayoutMeasure`,this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e=`measure`){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!Ko(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||ka(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),qs(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return J();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Ys))){let{scroll:e}=this.root;e&&(X(t.x,e.offset.x),X(t.y,e.offset.y))}return t}removeElementScroll(e){let t=J();if(Z(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&Z(t,e),X(t.x,i.offset.x),X(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n){let r=n||J();Z(r,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(X(r.x,-n.scroll.offset.x),X(r.y,-n.scroll.offset.y)),ka(n.latestValues)&&Va(r,n.latestValues,n.layout?.layoutBox)}return ka(this.latestValues)&&Va(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){let t=J();Z(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!ka(n.latestValues))continue;let r;n.instance&&(Oa(n.latestValues)&&n.updateSnapshot(),r=J(),Z(r,n.measurePageBox())),Wo(t,n.latestValues,n.snapshot?.layoutBox,r)}return ka(this.latestValues)&&Wo(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0?!0:e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==M.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=M.timestamp;let a=this.getClosestProjectingParent();a&&this.linkedParentVersion!==a.layoutVersion&&!a.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=J(),this.targetWithTransforms=J()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Io(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):Z(this.target,this.layout.layoutBox),Fa(this.target,this.targetDelta)):Z(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&a&&!!a.resumingFrom==!!this.resumingFrom&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),k.value&&_s.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||Oa(this.parent.latestValues)||Aa(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=J(),this.relativeTargetOrigin=J(),Ro(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),Z(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===M.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;Z(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;Ra(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=J());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(To(this.prevProjectionDelta.x,this.projectionDelta.x),To(this.prevProjectionDelta.y,this.projectionDelta.y)),Po(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!Qo(this.projectionDelta.x,this.prevProjectionDelta.x)||!Qo(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),k.value&&_s.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ia(),this.projectionDelta=ia(),this.projectionDeltaWithTransform=ia()}setAnimationOrigin(e,t=!1){let n=this.snapshot,r=n?n.latestValues:{},i={...this.latestValues},a=ia();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let o=J(),s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),c=this.getStack(),l=!c||c.members.length<=1,u=!!(s&&!l&&this.options.crossfade===!0&&!this.path.some(Hs));this.animationProgress=0;let d;this.mixTargetDelta=t=>{let n=t/1e3;zs(a.x,e.x,n),zs(a.y,e.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ro(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),Vs(this.relativeTarget,this.relativeTargetOrigin,o,n),d&&Jo(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||=J(),Z(d,this.relativeTarget)),s&&(this.animationValues=i,is(i,r,this.latestValues,n,u,l)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(j(this.pendingAnimation),void 0),this.pendingAnimation=A.update(()=>{gs.hasAnimatedSinceResize=!0,P.layout++,this.motionValue||=Ir(0),this.motionValue.jump(0,!1),this.currentAnimation=ls(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{P.layout--},onComplete:()=>{P.layout--,e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(ys),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(!(!t||!n||!r)){if(this!==e&&this.layout&&r&&Js(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||J();let t=Q(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=Q(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}Z(t,n),Va(t,i),Po(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new hs),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return e?e.lead===this:!0}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&xs(`z`,e,r,this.animationValues);for(let t=0;t<vs.length;t++)xs(`rotate${vs[t]}`,e,r,this.animationValues),xs(`skew${vs[t]}`,e,r,this.animationValues);e.render();for(let t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility=`hidden`;return}let n=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=ms(t?.pointerEvents)||``,e.transform=n?n(this.latestValues,``):`none`;return}let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){this.options.layoutId&&(e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=ms(t?.pointerEvents)||``),this.hasProjected&&!ka(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=$o(this.projectionDeltaWithTransform,this.treeScale,i);n&&(a=n(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,r.animationValues?e.opacity=r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:e.opacity=r===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let t in Qa){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=Qa[t],c=a===`none`?i[t]:n(i[t],r);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=r===this?ms(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(ks),this.root.sharedNodes.clear()}}}function ws(e){e.updateLayout()}function Ts(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;if(i===`size`)$(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=Q(r);r.min=n[e].min,r.max=r.min+i});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;wo(a?t.measuredBox[e]:t.layoutBox[e],n[e])}else Js(i,t.layoutBox,n)&&$(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=Q(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=ia();Po(o,n,t.layoutBox);let s=ia();a?Po(s,e.applyTransform(r,!0),t.measuredBox):Po(s,n,t.layoutBox);let c=!Ko(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=e.options.layoutAnchor||void 0,s=J();Ro(s,t.layoutBox,i.layoutBox,o);let c=J();Ro(c,n,a.layoutBox,o),Xo(s,c)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=c,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Es(e){k.value&&_s.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function Ds(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Os(e){e.clearSnapshot()}function ks(e){e.clearMeasurements()}function As(e){e.isLayoutDirty=!0,e.updateLayout()}function js(e){e.isLayoutDirty=!1}function Ms(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function Ns(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function Ps(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Fs(e){e.resolveTargetDelta()}function Is(e){e.calcProjection()}function Ls(e){e.resetSkewAndRotation()}function Rs(e){e.removeLeadSnapshot()}function zs(e,t,n){e.translate=B(t.translate,0,n),e.scale=B(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Bs(e,t,n,r){e.min=B(t.min,n.min,r),e.max=B(t.max,n.max,r)}function Vs(e,t,n,r){Bs(e.x,t.x,n.x,r),Bs(e.y,t.y,n.y,r)}function Hs(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var Us={duration:.45,ease:[.4,0,.1,1]},Ws=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Gs=Ws(`applewebkit/`)&&!Ws(`chrome/`)?Math.round:w;function Ks(e){e.min=Gs(e.min),e.max=Gs(e.max)}function qs(e){Ks(e.x),Ks(e.y)}function Js(e,t,n){return e===`position`||e===`preserve-aspect`&&!Mo(Zo(t),Zo(n),.2)}function Ys(e){return e!==e.root&&e.scroll?.wasRoot}var Xs=Cs({attachResizeListener:(e,t)=>us(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Zs={current:void 0},Qs=Cs({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Zs.current){let e=new Xs({});e.mount(window),e.setOptions({layoutScroll:!0}),Zs.current=e}return Zs.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),$s=(0,d.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function ec(e=!0){let t=(0,d.useContext)(h);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,d.useId)();(0,d.useEffect)(()=>{if(e)return i(a)},[e]);let o=(0,d.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var tc=(0,d.createContext)({strict:!1}),nc={animation:[`animate`,`variants`,`whileHover`,`whileTap`,`exit`,`whileInView`,`whileFocus`,`whileDrag`],exit:[`exit`],drag:[`drag`,`dragControls`],focus:[`whileFocus`],hover:[`whileHover`,`onHoverStart`,`onHoverEnd`],tap:[`whileTap`,`onTap`,`onTapStart`,`onTapCancel`],pan:[`onPan`,`onPanStart`,`onPanSessionStart`,`onPanEnd`],inView:[`whileInView`,`onViewportEnter`,`onViewportLeave`],layout:[`layout`,`layoutId`]},rc=!1;function ic(){if(rc)return;let e={};for(let t in nc)e[t]={isEnabled:e=>nc[t].some(t=>!!e[t])};ba(e),rc=!0}function ac(){return ic(),xa()}function oc(e){let t=ac();for(let n in e)t[n]={...t[n],...e[n]};ba(t)}var sc=new Set(`animate.exit.variants.initial.style.values.variants.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.propagate.ignoreStrict.viewport`.split(`.`));function cc(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||sc.has(e)}var lc=r({default:()=>uc}),uc,dc=n((()=>{throw uc={},Error(`Could not resolve "@emotion/is-prop-valid" imported by "framer-motion". Is it installed?`)})),fc=e=>!cc(e);function pc(e){typeof e==`function`&&(fc=t=>t.startsWith(`on`)?!cc(t):e(t))}try{pc((dc(),t(lc)).default)}catch{}function mc(e,t,n){let r={};for(let i in e)i===`values`&&typeof e.values==`object`||K(e[i])||(fc(i)||n===!0&&cc(i)||!t&&!cc(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i]);return r}var hc=(0,d.createContext)({});function gc(e,t){if(da(e)){let{initial:t,animate:n}=e;return{initial:t===!1||ca(t)?t:void 0,animate:ca(n)?n:void 0}}return e.inherit===!1?{}:t}function _c(e){let{initial:t,animate:n}=gc(e,(0,d.useContext)(hc));return(0,d.useMemo)(()=>({initial:t,animate:n}),[vc(t),vc(n)])}function vc(e){return Array.isArray(e)?e.join(` `):e}var yc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function bc(e,t,n){for(let r in t)!K(t[r])&&!$a(r,n)&&(e[r]=t[r])}function xc({transformTemplate:e},t){return(0,d.useMemo)(()=>{let n=yc();return qa(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Sc(e,t){let n=e.style||{},r={};return bc(r,n,e),Object.assign(r,xc(e,t)),r}function Cc(e,t){let n={},r=Sc(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var wc=()=>({...yc(),attrs:{}});function Tc(e,t,n,r){let i=(0,d.useMemo)(()=>{let n=wc();return so(n,t,lo(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};bc(t,e.style,e),i.style={...t,...i.style}}return i}var Ec=[`animate`,`circle`,`defs`,`desc`,`ellipse`,`g`,`image`,`line`,`filter`,`marker`,`mask`,`metadata`,`path`,`pattern`,`polygon`,`polyline`,`rect`,`stop`,`switch`,`symbol`,`svg`,`text`,`tspan`,`use`,`view`];function Dc(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(Ec.indexOf(e)>-1||/[A-Z]/u.test(e))}function Oc(e,t,n,{latestValues:r},i,a=!1,o){let s=(o??Dc(e)?Tc:Cc)(t,r,i,e),c=mc(t,typeof e==`string`,a),l=e===d.Fragment?{}:{...c,...s,ref:n},{children:u}=t,f=(0,d.useMemo)(()=>K(u)?u.get():u,[u]);return(0,d.createElement)(e,{...l,children:f})}function kc({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:Ac(n,r,i,e),renderState:t()}}function Ac(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=ms(a[e]);let{initial:o,animate:s}=e,c=da(e),l=fa(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!sa(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=Ar(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var jc=e=>(t,n)=>{let r=(0,d.useContext)(hc),i=(0,d.useContext)(h),a=()=>kc(e,t,r,i);return n?a():p(a)},Mc=jc({scrapeMotionValuesFromProps:eo,createRenderState:yc}),Nc=jc({scrapeMotionValuesFromProps:fo,createRenderState:wc}),Pc=Symbol.for(`motionComponentSymbol`);function Fc(e,t,n){let r=(0,d.useRef)(n);(0,d.useInsertionEffect)(()=>{r.current=n});let i=(0,d.useRef)(null);return(0,d.useCallback)(n=>{n&&e.onMount?.(n);let a=r.current;if(typeof a==`function`)if(n){let e=a(n);typeof e==`function`&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n);else a&&(a.current=n);t&&(n?t.mount(n):t.unmount())},[t])}var Ic=(0,d.createContext)({});function Lc(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function Rc(e,t,n,r,i,a){let{visualElement:o}=(0,d.useContext)(hc),s=(0,d.useContext)(tc),c=(0,d.useContext)(h),l=(0,d.useContext)($s),u=l.reducedMotion,f=l.skipAnimations,p=(0,d.useRef)(null),g=(0,d.useRef)(!1);r||=s.renderer,!p.current&&r&&(p.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:f,isSVG:a}),g.current&&p.current&&(p.current.manuallyAnimateOnMount=!0));let _=p.current,v=(0,d.useContext)(Ic);_&&!_.projection&&i&&(_.type===`html`||_.type===`svg`)&&zc(p.current,n,i,v);let y=(0,d.useRef)(!1);(0,d.useInsertionEffect)(()=>{_&&y.current&&_.update(n,c)});let b=n[Wr],x=(0,d.useRef)(!!b&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(b)&&window.MotionHasOptimisedAnimation?.(b));return m(()=>{g.current=!0,_&&(y.current=!0,window.MotionIsMounted=!0,_.updateFeatures(),_.scheduleRenderMicrotask(),x.current&&_.animationState&&_.animationState.animateChanges())}),(0,d.useEffect)(()=>{_&&(!x.current&&_.animationState&&_.animationState.animateChanges(),x.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(b)}),!1),_.enteringChildren=void 0)}),_}function zc(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:Bc(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&Lc(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u})}function Bc(e){if(e)return e.options.allowProjection===!1?Bc(e.parent):e.projection}function Vc(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&oc(r);let a=n?n===`svg`:Dc(e),o=a?Nc:Mc;function s(n,s){let c,l={...(0,d.useContext)($s),...n,layoutId:Hc(n)},{isStatic:f}=l,p=_c(n),m=o(n,f);if(!f&&typeof window<`u`){Uc(l,r);let t=Wc(l);c=t.MeasureLayout,p.visualElement=Rc(e,m,l,i,t.ProjectionNode,a)}return(0,u.jsxs)(hc.Provider,{value:p,children:[c&&p.visualElement?(0,u.jsx)(c,{visualElement:p.visualElement,...l}):null,Oc(e,n,Fc(m,p.visualElement,s),m,f,t,a)]})}s.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let c=(0,d.forwardRef)(s);return c[Pc]=e,c}function Hc({layoutId:e}){let t=(0,d.useContext)(f).id;return t&&e!==void 0?t+`-`+e:e}function Uc(e,t){(0,d.useContext)(tc).strict}function Wc(e){let{drag:t,layout:n}=ac();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function Gc(e,t){if(typeof Proxy>`u`)return Vc;let n=new Map,r=(n,r)=>Vc(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,Vc(a,void 0,e,t)),n.get(a))})}var Kc=(e,t)=>t.isSVG??Dc(e)?new po(t):new no(t,{allowProjection:e!==d.Fragment}),qc=class extends Y{constructor(e){super(e),e.animationState||=bo(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();sa(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},Jc=0,Yc={animation:{Feature:qc},exit:{Feature:class extends Y{constructor(){super(...arguments),this.id=Jc++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;if(e&&n===!1){if(this.isExitComplete){let{initial:e,custom:t}=this.node.getProps();if(typeof e==`string`){let n=G(this.node,e,t);if(n){let{transition:e,transitionEnd:t,...r}=n;for(let e in r)this.node.getValue(e)?.jump(r[e])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive(`exit`,!1);this.isExitComplete=!1;return}let r=this.node.animationState.setActive(`exit`,!e);t&&!e&&r.then(()=>{this.isExitComplete=!0,t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function Xc(e){return{point:{x:e.pageX,y:e.pageY}}}var Zc=e=>t=>Di(t)&&e(t,Xc(t));function Qc(e,t,n,r){return us(e,t,Zc(n),r)}var $c=({current:e})=>e?e.ownerDocument.defaultView:null,el=(e,t)=>Math.abs(e-t);function tl(e,t){let n=el(e.x,t.x),r=el(e.y,t.y);return Math.sqrt(n**2+r**2)}var nl=new Set([`auto`,`scroll`]),rl=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=il(this.lastRawMoveEventInfo,this.transformPagePoint));let e=ol(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=tl(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=M;this.history.push({...r,timestamp:i});let{onStart:a,onMove:o}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=il(t,this.transformPagePoint),A.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=ol(e.type===`pointercancel`?this.lastMoveEventInfo:il(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!Di(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=il(Xc(e),this.transformPagePoint),{point:c}=s,{timestamp:l}=M;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,ol(s,this.history)),this.removeListeners=T(Qc(this.contextWindow,`pointermove`,this.handlePointerMove),Qc(this.contextWindow,`pointerup`,this.handlePointerUp),Qc(this.contextWindow,`pointercancel`,this.handlePointerUp)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(nl.has(e.overflowX)||nl.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.addEventListener(`scroll`,this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.removeEventListener(`scroll`,this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:r.x-t.x,y:r.y-t.y};i.x===0&&i.y===0||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),A.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),j(this.updatePoint)}};function il(e,t){return t?{point:t(e.point)}:e}function al(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ol({point:e},t){return{point:e,delta:al(e,cl(t)),offset:al(e,sl(t)),velocity:ll(t,.1)}}function sl(e){return e[0]}function cl(e){return e[e.length-1]}function ll(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=cl(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>D(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>D(t)*2&&(r=e[1]);let a=O(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function ul(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?B(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?B(n,e,r.max):Math.min(e,n)),e}function dl(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function fl(e,{top:t,left:n,bottom:r,right:i}){return{x:dl(e.x,n,i),y:dl(e.y,t,r)}}function pl(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function ml(e,t){return{x:pl(e.x,t.x),y:pl(e.y,t.y)}}function hl(e,t){let n=.5,r=Q(e),i=Q(t);return i>r?n=E(t.min,t.max-r,e.min):r>i&&(n=E(e.min,e.max-i,t.min)),v(0,1,n)}function gl(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var _l=.35;function vl(e=_l){return e===!1?e=0:e===!0&&(e=_l),{x:yl(e,`left`,`right`),y:yl(e,`top`,`bottom`)}}function yl(e,t,n){return{min:bl(e,t),max:bl(e,n)}}function bl(e,t){return typeof e==`number`?e:e[t]||0}var xl=new WeakMap,Sl=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=J(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;let i=e=>{t&&this.snapToCursor(Xc(e).point),this.stopAnimation()},a=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Si(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),$(e=>{let t=this.getAxisMotionValue(e).get()||0;if(I.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=Q(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&A.update(()=>i(e,t),!1,!0),Hr(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){this.currentDirection=El(o),this.currentDirection!==null&&i&&i(this.currentDirection);return}this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&A.update(()=>a(e,t),!1,!0)},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:l}=this.getProps();this.panSession=new rl(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:$c(this.visualElement),element:this.visualElement.current})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:a}=r;this.startAnimation(a);let{onDragEnd:o}=this.getProps();o&&A.postRender(()=>o(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!Tl(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=ul(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&Lc(e)?this.constraints||=this.resolveRefConstraints():e&&n?this.constraints=fl(n.layoutBox,e):this.constraints=!1,this.elastic=vl(t),r!==this.constraints&&!Lc(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&$(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=gl(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Lc(e))return!1;let n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;let i=Ua(n,r.root,this.visualElement.getTransformPagePoint()),a=ml(r.layout.layoutBox,i);if(t){let e=t(Ta(a));this.hasMutatedConstraints=!!e,e&&(a=wa(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=$(o=>{if(!Tl(o,t,this.currentDirection))return;let c=s&&s[o]||{};(a===!0||a===o)&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return Hr(this.visualElement,e),n.start(Or(e,n,0,t,this.visualElement,!1))}stopAnimation(){$(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps();return n[t]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){$(t=>{let{drag:n}=this.getProps();if(!Tl(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:a}=r.layout.layoutBox[t],o=i.get()||0;i.set(e[t]-B(n,a,.5)+o)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Lc(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};$(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=hl({min:n,max:n},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),$(t=>{if(!Tl(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(B(i,a,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;xl.set(this.visualElement,this);let e=this.visualElement.current,t=Qc(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&ji(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps();Lc(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||=wl(e,t.current,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),A.read(r);let o=us(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&($(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{o(),t(),a(),s&&s(),n&&n()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=_l,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function Cl(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function wl(e,t,n){let r=$i(e,Cl(n)),i=$i(t,Cl(n));return()=>{r(),i()}}function Tl(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function El(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var Dl=class extends Y{constructor(e){super(e),this.removeGroupControls=w,this.removeListeners=w,this.controls=new Sl(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||w}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},Ol=e=>(t,n)=>{e&&A.update(()=>e(t,n),!1,!0)},kl=class extends Y{constructor(){super(...arguments),this.removePointerDownListener=w}onPointerDown(e){this.session=new rl(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:$c(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Ol(e),onStart:Ol(t),onMove:Ol(n),onEnd:(e,t)=>{delete this.session,r&&A.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=Qc(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},Al=!1,jl=class extends d.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),Al&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),gs.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a?(a.isPresent=i,e.layoutDependency!==t&&a.setOptions({...a.options,layoutDependency:t}),Al=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||A.postRender(()=>{let e=a.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),yi.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;Al=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function Ml(e){let[t,n]=ec(),r=(0,d.useContext)(f);return(0,u.jsx)(jl,{...e,layoutGroup:r,switchLayoutGroup:(0,d.useContext)(Ic),isPresent:t,safeToRemove:n})}var Nl={pan:{Feature:kl},drag:{Feature:Dl,ProjectionNode:Qs,MeasureLayout:Ml}};function Pl(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&A.postRender(()=>i(t,Xc(t)))}var Fl=class extends Y{mount(){let{current:e}=this.node;e&&(this.unmount=Ti(e,(e,t)=>(Pl(this.node,t,`Start`),e=>Pl(this.node,e,`End`))))}unmount(){}},Il=class extends Y{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!1),this.isActive=!1)}mount(){this.unmount=T(us(this.node.current,`focus`,()=>this.onFocus()),us(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function Ll(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&A.postRender(()=>i(t,Xc(t)))}var Rl=class extends Y{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=Ri(e,(e,t)=>(Ll(this.node,t,`Start`),(e,{success:t})=>Ll(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},zl=new WeakMap,Bl=new WeakMap,Vl=e=>{let t=zl.get(e.target);t&&t(e)},Hl=e=>{e.forEach(Vl)};function Ul({root:e,...t}){let n=e||document;Bl.has(n)||Bl.set(n,{});let r=Bl.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Hl,{root:e,...t})),r[i]}function Wl(e,t,n){let r=Ul(t);return zl.set(e,n),r.observe(e),()=>{zl.delete(e),r.unobserve(e)}}var Gl={some:0,all:1},Kl=class extends Y{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:Gl[r]};this.stopObserver=Wl(this.node.current,a,e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)})}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(ql(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function ql({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var Jl={inView:{Feature:Kl},tap:{Feature:Rl},focus:{Feature:Il},hover:{Feature:Fl}},Yl={layout:{ProjectionNode:Qs,MeasureLayout:Ml}},Xl=Gc({...Yc,...Jl,...Nl,...Yl},Kc),Zl=c(`group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-[var(--miravo-radius-pill)] border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[background-color,border-color,color] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!`,{variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,secondary:`bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80`,destructive:`bg-destructive/10 text-destructive focus-visible:ring-destructive/20 bg-destructive/20 focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20`,outline:`border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground`,ghost:`hover:bg-muted hover:text-muted-foreground hover:bg-muted/50`,link:`text-primary underline-offset-4 hover:underline`}},defaultVariants:{variant:`default`}});function Ql({className:e,variant:t=`default`,render:n,...r}){return o({defaultTagName:`span`,props:a({className:l(Zl({variant:t}),e)},r),render:n,state:{slot:`badge`,variant:t}})}export{$s as a,ma as c,h as d,m as f,ec as i,vi as l,f as m,Xl as n,_a as o,p,pc as r,ha as s,Ql as t,wr as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./catalog-M-k7Y9Sp.js";export{e as CatalogPage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./rolldown-runtime-COnpUsM8.js";import{c as t}from"./vendor-charts-95ykyDlI.js";import{ot as n}from"./vendor-ui-D8j69UH4.js";import{S as r,o as i,ot as a,v as o}from"./api-kPM52mb-.js";import{i as s,t as c}from"./query-fetch-error-C2Ec4RQS.js";import{n as l,t as u}from"./badge-D4jktT8T.js";import{t as ee}from"./AnimatePresence-BZCmb1bq.js";import{c as d,n as f}from"./chunk-OE4NN4TA-Q4iNR9l9.js";import{a as p,c as m,i as h,n as g,o as _,r as v,t as te}from"./dialog-Di9Bs0FH.js";import{C as y,S as b,u as x,w as S}from"./format-OUFL_tef.js";import{n as C,t as w}from"./utils-BO2u-wC_.js";import{n as T,t as E}from"./catalog-template-icons-C7KJdJJX.js";import{r as D}from"./source-host-miravo-D_AecPVc.js";import{t as O}from"./play-TTg_EXSa.js";import{t as k}from"./rocket-807Pf7C1.js";import{i as A,n as j,r as M,t as N}from"./catalog-source-2aT9qob-.js";import{n as ne}from"./get-error-message-eGdenTLv.js";import{a as P,i as F,o as I,t as L}from"./use-engine-command-mutation-DMkQxmt9.js";var R=C(`layout-dashboard`,[[`rect`,{width:`7`,height:`9`,x:`3`,y:`3`,rx:`1`,key:`10lvy0`}],[`rect`,{width:`7`,height:`5`,x:`14`,y:`3`,rx:`1`,key:`16une8`}],[`rect`,{width:`7`,height:`9`,x:`14`,y:`12`,rx:`1`,key:`1hutg5`}],[`rect`,{width:`7`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`ldoo1y`}]]),z=e(t(),1),B=n(),V=[`builtin`,`personal`];function H(){let[e,t]=(0,z.useState)(``),[n,f]=(0,z.useState)(`all`),[S,C]=(0,z.useState)(null),[E,D]=(0,z.useState)(null),[O,j]=(0,z.useState)(null),N=(0,z.useRef)(null),F=L(),I=d(),R=a(e=>e.templates),H=(0,z.useMemo)(()=>new Set(R.map(e=>e.templateId)),[R]);(0,z.useEffect)(()=>{let e=e=>{if(e.key!==`/`||e.metaKey||e.ctrlKey||e.altKey)return;let t=e.target.tagName;t===`INPUT`||t===`TEXTAREA`||t===`SELECT`||(e.preventDefault(),N.current?.focus())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]);let W=s({queryKey:o.catalog.templates(),queryFn:()=>i(`/catalog/templates`,r.catalogTemplates)}),K=W.data??[],q=E===null?null:K.find(e=>e.id===E)??null,J=W.isPending&&!W.data,Y=W.isError&&!W.data,X=W.isError&&!!W.data,Z=ne(W.error,`Failed to load templates.`),re=(0,z.useCallback)(e=>{j(e)},[]),ie=(0,z.useCallback)(e=>{D(e)},[]),ae=async e=>{C(e);try{return await F.mutateAsync({type:`loadTemplate`,templatePath:e}),m(`Next: connect a client`),I(`/?highlight=${encodeURIComponent(e)}`),!0}catch{return!1}finally{C(null)}},oe=(0,z.useMemo)(()=>{let e={all:K.length};for(let t of V)e[t]=0;for(let t of K){let n=M(t.source);e[n]=(e[n]??0)+1}return e},[K]),Q=e.toLowerCase(),$=K.filter(e=>n===`all`||M(e.source)===n).filter(e=>Q?e.name.toLowerCase().includes(Q)||e.id.toLowerCase().includes(Q)||(e.description?.toLowerCase().includes(Q)??!1):!0);return(0,B.jsxs)(`div`,{className:`@container/templates mx-auto flex w-full max-w-screen-2xl flex-col gap-5 p-4 sm:gap-6 sm:p-6`,children:[(0,B.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,B.jsx)(`h1`,{className:`font-heading text-2xl font-semibold tracking-tight`,children:`Template Catalog`}),(0,B.jsx)(u,{variant:`outline`,className:`text-xs`,children:Y?(0,B.jsx)(`span`,{className:`text-destructive`,children:`Unavailable`}):J&&K.length===0?(0,B.jsx)(B.Fragment,{children:`Loading...`}):(0,B.jsxs)(B.Fragment,{children:[new Set(K.map(e=>e.id)).size,` templates`]})})]}),(0,B.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Choose a template to launch a realistic industrial system. Each template includes pre-configured asset models with realistic physics, lifecycle degradation, and fault modes.`})]}),Y&&(0,B.jsx)(c,{message:Z,onRetry:()=>void W.refetch(),isRetrying:W.isFetching}),X&&(0,B.jsx)(c,{message:`${Z} Showing cached templates.`,onRetry:()=>void W.refetch(),isRetrying:W.isFetching}),!Y&&(0,B.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,B.jsxs)(`div`,{className:`relative max-w-xs flex-1 min-w-[14rem]`,children:[(0,B.jsx)(A,{className:`absolute left-2.5 top-2.5 size-4 text-muted-foreground`}),(0,B.jsx)(b,{ref:N,placeholder:`Filter templates...`,value:e,onChange:e=>t(e.target.value),className:`pl-9 pr-7`}),!e&&(0,B.jsx)(`kbd`,{className:`pointer-events-none absolute top-1/2 right-2 -translate-y-1/2 rounded-[var(--miravo-radius-tight)] border border-border bg-muted px-1 font-mono text-[10px] text-muted-foreground`,children:`/`})]}),(0,B.jsx)(G,{value:n,counts:oe,onChange:f})]}),(0,B.jsx)(`div`,{className:`grid grid-cols-1 gap-4 @[720px]/templates:grid-cols-2`,"aria-busy":J&&!Y,children:Y?null:(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(ee,{children:$.map((e,t)=>(0,B.jsx)(l.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,scale:.96,transition:{duration:.15}},transition:{type:`spring`,stiffness:380,damping:30,delay:t*.04},className:`grid`,children:(0,B.jsx)(U,{template:e,launching:S===e.id,loaded:H.has(e.id),onInspect:re,onLaunch:ie})},`${e.source}:${e.id}`))}),$.length===0&&K.length>0&&(0,B.jsx)(`p`,{className:`col-span-full py-8 text-center text-sm text-muted-foreground`,children:`No templates match the current filters.`})]})}),K.length>0&&(0,B.jsx)(`div`,{className:w(P,`p-0`),children:(0,B.jsx)(`div`,{className:`community-teaser relative overflow-hidden rounded-[inherit]`,children:(0,B.jsx)(`div`,{className:`relative z-10 mx-auto max-w-3xl px-5 py-10 sm:px-10 sm:py-12`,children:(0,B.jsxs)(`div`,{className:`grid items-center gap-10 lg:grid-cols-[minmax(0,1fr)_minmax(0,17rem)]`,children:[(0,B.jsxs)(`div`,{className:`order-2 flex min-w-0 flex-col gap-4 lg:order-1`,children:[(0,B.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-x-3 gap-y-1`,children:[(0,B.jsx)(`p`,{className:`blueprint-title text-primary`,children:`Future channel`}),(0,B.jsx)(`span`,{className:`blueprint-stat text-[10px] text-muted-foreground`,children:`MIRAVO_REGISTRY · NOT_CONNECTED`})]}),(0,B.jsx)(`h2`,{className:`font-heading text-xl font-semibold tracking-tight sm:text-2xl`,children:`Community Templates`}),(0,B.jsx)(`p`,{className:`max-w-xl text-sm leading-relaxed text-muted-foreground`,children:`Share your industrial templates with the Miravo community. Publish custom templates, discover configurations from other engineers, and fork them as your starting point.`}),(0,B.jsx)(`div`,{children:(0,B.jsx)(u,{variant:`outline`,className:`community-teaser-soon border-primary/35 bg-primary/5 text-[10px] text-primary`,children:`Coming Soon`})})]}),(0,B.jsx)(`div`,{className:`order-1 flex justify-center lg:order-2 lg:justify-end`,children:(0,B.jsxs)(`div`,{className:`community-teaser-module relative flex w-full max-w-[14rem] flex-col items-center justify-center gap-3 border border-primary/15 bg-muted/15 py-8 sm:max-w-[15.5rem] sm:py-10`,"aria-hidden":!0,children:[(0,B.jsx)(`div`,{className:`community-teaser-icon-ring relative z-[1] flex size-[4.25rem] items-center justify-center rounded-[var(--miravo-radius-tight)] border border-primary/35 bg-gradient-to-br from-primary/18 to-primary/5`,children:(0,B.jsx)(k,{className:`size-9 text-primary`,"aria-hidden":!0})}),(0,B.jsx)(`span`,{className:`blueprint-stat relative z-[1] text-[9px] tracking-[0.18em] text-muted-foreground`,children:`AWAITING SIGNAL`}),(0,B.jsx)(`span`,{className:`blueprint-stat relative z-[1] text-[9px] text-muted-foreground`,children:`Uplink idle`})]})})]})})})}),(0,B.jsx)(te,{open:E!==null,onOpenChange:e=>{e||D(null)},children:(0,B.jsxs)(g,{className:`min-w-0 sm:max-w-md`,children:[(0,B.jsxs)(p,{children:[(0,B.jsx)(_,{children:`Launch template?`}),(0,B.jsx)(v,{children:q!==null&&(0,B.jsxs)(B.Fragment,{children:[`This loads`,` `,(0,B.jsx)(`span`,{className:`font-medium text-foreground`,children:x(q.name)}),` `,`into the running factory.`]})})]}),(0,B.jsxs)(h,{children:[(0,B.jsx)(y,{variant:`outline`,disabled:S!==null,onClick:()=>D(null),children:`Cancel`}),(0,B.jsx)(y,{disabled:S!==null||q===null,onClick:async()=>{q!==null&&await ae(q.id)&&D(null)},children:S===q?.id?`Launching...`:`Launch`})]})]})}),(0,B.jsx)(T,{templateId:O?.id??null,onClose:()=>j(null)})]})}var U=(0,z.memo)(function({template:e,launching:t,loaded:n,onInspect:r,onLaunch:i}){return(0,B.jsxs)(`div`,{className:w(I,`flex flex-col gap-4 p-5`),children:[(0,B.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,B.jsx)(`div`,{className:`flex size-10 shrink-0 items-center justify-center rounded-[var(--miravo-radius-stadium-sm)] bg-primary/10 text-primary`,children:(0,B.jsx)(E,{id:e.id,className:`size-5`})}),(0,B.jsxs)(`div`,{className:`min-w-0 flex flex-col gap-1`,children:[(0,B.jsx)(`span`,{className:`font-heading text-sm font-semibold uppercase tracking-wide`,children:x(e.name)}),(0,B.jsx)(`p`,{className:`line-clamp-3 text-xs leading-relaxed text-foreground/75`,children:e.description??`Industrial template.`}),(0,B.jsx)(`span`,{className:`font-mono text-[10px] text-muted-foreground`,children:e.id})]})]}),(0,B.jsx)(`div`,{className:`px-3 py-2`,children:(0,B.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:e.models.map(e=>(0,B.jsx)(u,{variant:`outline`,className:`h-auto min-h-5 rounded-[var(--miravo-radius-tight)] px-1.5 py-0 font-mono text-[10px] font-normal text-primary`,children:e},e))})}),(0,B.jsxs)(`div`,{className:`mt-auto flex flex-wrap items-center gap-4 font-mono text-[11px] text-muted-foreground`,children:[(0,B.jsxs)(`span`,{children:[(0,B.jsx)(`span`,{className:`text-foreground`,children:e.assetCount}),` assets`]}),(0,B.jsxs)(`span`,{children:[(0,B.jsx)(`span`,{className:`text-foreground`,children:e.models.length}),` models`]}),e.memberCount>0&&(0,B.jsxs)(`span`,{children:[`~`,(0,B.jsx)(`span`,{className:`text-foreground`,children:W(e.memberCount)}),` tags/cycle`]}),n&&(0,B.jsx)(u,{variant:`outline`,className:`ml-auto shrink-0 border-success/40 bg-success/10 font-sans text-[10px] font-medium uppercase tracking-wide text-success`,children:`Loaded`}),(0,B.jsx)(u,{variant:`outline`,className:w(`shrink-0 font-sans text-[10px] font-medium uppercase tracking-wide`,!n&&`ml-auto`,N(e.source)),children:j(e.source)})]}),(0,B.jsxs)(`div`,{className:`flex items-center gap-2 border-t border-border/30 pt-3`,children:[(0,B.jsxs)(y,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>r(e),className:F,children:[(0,B.jsx)(D,{className:`size-3.5`,"aria-hidden":!0}),`Inspect`]}),n?(0,B.jsxs)(f,{to:`/`,className:w(S({size:`sm`}),`ml-auto`),children:[(0,B.jsx)(R,{className:`mr-1 size-3`,"aria-hidden":!0}),`Open`]}):(0,B.jsxs)(y,{size:`sm`,className:`ml-auto`,disabled:t,onClick:()=>i(e.id),children:[(0,B.jsx)(O,{className:`mr-1 size-3`}),t?`...`:`Launch`]})]})]})});function W(e){return e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function G({value:e,counts:t,onChange:n}){return(0,B.jsx)(`div`,{className:`flex flex-wrap items-center gap-1.5`,role:`radiogroup`,"aria-label":`Filter by source`,children:[{id:`all`,label:`All`},...V.map(e=>({id:e,label:j(e)}))].map(r=>{let i=e===r.id,a=t[r.id]??0,o=r.id!==`all`&&a===0;return(0,B.jsxs)(`label`,{className:w(`inline-flex h-7 items-center gap-1.5 rounded-[var(--miravo-radius-pill)] border px-3 text-xs font-medium transition-colors`,i?`border-primary/60 bg-primary/15 text-primary`:`border-border/60 bg-card/30 text-muted-foreground hover:border-border hover:bg-muted/40 hover:text-foreground`,o?`cursor-not-allowed opacity-40 hover:border-border/60 hover:bg-card/30 hover:text-muted-foreground`:`cursor-pointer`),children:[(0,B.jsx)(`input`,{type:`radio`,name:`catalog-source-filter`,value:r.id,checked:i,disabled:o,onChange:()=>n(r.id),className:`sr-only`}),(0,B.jsx)(`span`,{children:r.label}),(0,B.jsx)(`span`,{className:`font-mono text-[10px] opacity-70`,children:a})]},r.id)})})}export{R as n,H as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./utils-BO2u-wC_.js";var t=e(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),n={builtin:`Built-in`,personal:`Personal`,community:`Community`},r=`border-border/60 bg-muted/40 text-muted-foreground`,i={builtin:r,personal:`border-primary/40 bg-primary/10 text-primary`,community:`border-accent/40 bg-accent/10 text-accent`};function a(e){return e===`cwd`||e===`namespace`?`personal`:e}function o(e){return n[a(e)]??e}function s(e){return i[a(e)]??r}export{t as i,o as n,a as r,s as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./rolldown-runtime-COnpUsM8.js";import{c as t}from"./vendor-charts-95ykyDlI.js";import{ot as n}from"./vendor-ui-D8j69UH4.js";import{S as r,o as i,v as a}from"./api-kPM52mb-.js";import{i as o,t as s}from"./query-fetch-error-C2Ec4RQS.js";import{n as c,t as l}from"./badge-D4jktT8T.js";import{t as u}from"./AnimatePresence-BZCmb1bq.js";import{c as d,h as f,s as p}from"./format-OUFL_tef.js";import{n as m,t as h}from"./utils-BO2u-wC_.js";import{t as g}from"./chevron-down-CAk5w9Wt.js";import{t as _}from"./chevron-right-BfZjrUWh.js";import{t as v}from"./copy-button-DHm7RGJ5.js";import{i as y,n as b,r as x,t as S}from"./tabs-bI9sskHy.js";import{c as C,d as w,f as T,l as E,s as ee,t as D,u as O}from"./export-tab-ouFgYEU_.js";import{n as k}from"./get-error-message-eGdenTLv.js";import{a as A}from"./use-engine-command-mutation-DMkQxmt9.js";var j=m(`building`,[[`path`,{d:`M12 10h.01`,key:`1nrarc`}],[`path`,{d:`M12 14h.01`,key:`1etili`}],[`path`,{d:`M12 6h.01`,key:`1vi96p`}],[`path`,{d:`M16 10h.01`,key:`1m94wz`}],[`path`,{d:`M16 14h.01`,key:`1gbofw`}],[`path`,{d:`M16 6h.01`,key:`1x0f13`}],[`path`,{d:`M8 10h.01`,key:`19clt8`}],[`path`,{d:`M8 14h.01`,key:`6423bh`}],[`path`,{d:`M8 6h.01`,key:`1dz90k`}],[`path`,{d:`M9 22v-3a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v3`,key:`cabbwy`}],[`rect`,{x:`4`,y:`2`,width:`16`,height:`20`,rx:`2`,key:`1uxh74`}]]),M=m(`droplet`,[[`path`,{d:`M12 22a7 7 0 0 0 7-7c0-2-1-3.9-3-5.5s-3.5-4-4-6.5c-.5 2.5-2 4.9-4 6.5C6 11.1 5 13 5 15a7 7 0 0 0 7 7z`,key:`c7niix`}]]),N=m(`factory`,[[`path`,{d:`M12 16h.01`,key:`1drbdi`}],[`path`,{d:`M16 16h.01`,key:`1f9h7w`}],[`path`,{d:`M3 19a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8.5a.5.5 0 0 0-.769-.422l-4.462 2.844A.5.5 0 0 1 15 10.5v-2a.5.5 0 0 0-.769-.422L9.77 10.922A.5.5 0 0 1 9 10.5V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2z`,key:`1iv0i2`}],[`path`,{d:`M8 16h.01`,key:`18s6g9`}]]),P=m(`flask-conical`,[[`path`,{d:`M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2`,key:`18mbvz`}],[`path`,{d:`M6.453 15h11.094`,key:`3shlmq`}],[`path`,{d:`M8.5 2h7`,key:`csnxdl`}]]),F=m(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),I=m(`layout-grid`,[[`rect`,{width:`7`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`1g98yp`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`3`,rx:`1`,key:`6d4xhi`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`14`,rx:`1`,key:`nxv5o0`}],[`rect`,{width:`7`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`1bb6yr`}]]),L=m(`layout-template`,[[`rect`,{width:`18`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`f1a2em`}],[`rect`,{width:`9`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`jqznyg`}],[`rect`,{width:`5`,height:`7`,x:`16`,y:`14`,rx:`1`,key:`q5h2i8`}]]),R=m(`list`,[[`path`,{d:`M3 5h.01`,key:`18ugdj`}],[`path`,{d:`M3 12h.01`,key:`nlz23k`}],[`path`,{d:`M3 19h.01`,key:`noohij`}],[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M8 12h13`,key:`1za7za`}],[`path`,{d:`M8 19h13`,key:`m83p4d`}]]),z=m(`thermometer-sun`,[[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 8a4 4 0 0 0-1.645 7.647`,key:`wz5p04`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 14.54a4 4 0 1 1-4 0V4a2 2 0 0 1 4 0z`,key:`yu0u2z`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}]]),B=m(`zap`,[[`path`,{d:`M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z`,key:`1xq2db`}]]),V=e(t(),1),H=n(),U=20,W=14,G=`flex w-3.5 shrink-0 items-center justify-center`;function K({asset:e,depth:t,area:n,line:r,detail:i}){let[a,o]=(0,V.useState)(!1),[s,c]=(0,V.useState)(!1),l=a?e.tags:e.tags.slice(0,10),u=e.tags.length-10;return(0,H.jsxs)(H.Fragment,{children:[l.map(a=>(0,H.jsx)(q,{member:a,depth:t,area:n,line:r,assetId:e.id,detail:i},a.name)),!a&&u>0&&(0,H.jsxs)(`button`,{type:`button`,className:`flex min-h-11 w-full items-center gap-1.5 border-t border-border/30 py-2 text-left font-mono text-xs text-muted-foreground hover:bg-muted/40 touch-manipulation sm:min-h-0 sm:py-1.5`,style:{paddingLeft:`${t*14+U}px`},onClick:()=>o(!0),children:[(0,H.jsx)(`span`,{className:G,"aria-hidden":!0}),(0,H.jsxs)(`span`,{children:[`+`,u,` more tags`]})]}),e.properties.length>0&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`button`,{type:`button`,className:`flex min-h-11 w-full items-center gap-1.5 border-t border-border/30 py-2 text-left font-mono text-xs text-muted-foreground hover:bg-muted/40 touch-manipulation sm:min-h-0 sm:py-1.5`,style:{paddingLeft:`${t*14+U}px`},onClick:()=>c(e=>!e),children:[(0,H.jsx)(`span`,{className:G,"aria-hidden":!0,children:s?(0,H.jsx)(g,{className:`size-3.5 opacity-60`,"aria-hidden":!0}):(0,H.jsx)(_,{className:`size-3.5 opacity-60`,"aria-hidden":!0})}),(0,H.jsxs)(`span`,{children:[e.properties.length,` properties`]})]}),s&&e.properties.map(a=>(0,H.jsx)(q,{member:a,depth:t,area:n,line:r,assetId:e.id,detail:i},a.name))]})]})}function q({member:e,depth:t,area:n,line:r,assetId:i,detail:a}){let o=e.kind===`property`,s=t*14+U+(o?W:0),c=a.namespace,l=[c?.enterprise?`${c.enterprise}/${c.site??``}`:c?.prefix??``,n,r,i,e.name].filter(Boolean).join(`/`);return(0,H.jsx)(v,{value:l,label:`Copy UNS path`,successMessage:`UNS path copied`,successDescription:l,tooltipSide:`top`,render:()=>(0,H.jsxs)(`button`,{type:`button`,className:h(`flex w-full cursor-pointer flex-col gap-1 border-t border-border/25 py-2 text-left font-mono text-xs hover:bg-muted/35 touch-manipulation sm:min-h-0 sm:flex-row sm:items-center sm:gap-1.5 sm:py-1.5`,o&&`opacity-65`),style:{paddingLeft:`${s}px`},children:[(0,H.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,H.jsx)(`span`,{className:G,"aria-hidden":!0,children:(0,H.jsx)(`span`,{className:h(`size-1 rounded-full ring-1 ring-border/50`,o?`bg-muted-foreground/25`:`bg-primary/50`)})}),(0,H.jsx)(`span`,{title:e.name,className:h(`min-w-0 truncate`,o?`text-muted-foreground`:`text-foreground`),children:d(e.name)}),o&&(0,H.jsx)(`span`,{className:`shrink-0 rounded-[var(--miravo-radius-tight)] bg-muted/60 px-1 py-px text-[10px] text-muted-foreground`,children:`PROP`})]}),(0,H.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-x-2 gap-y-0.5 pl-0 sm:ml-auto sm:flex-1 sm:justify-end sm:pl-0 sm:pr-1`,children:[(0,H.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:e.dataType}),e.unit&&(0,H.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:e.unit}),e.euRange&&(0,H.jsxs)(`span`,{className:`ml-auto shrink-0 tabular-nums text-muted-foreground`,children:[`[`,e.euRange[0],`–`,e.euRange[1],`]`]})]})]})})}function J({depth:e,label:t,labelTitle:n,tag:r,tagKind:i,subtitle:a,subtitleTitle:o,count:s,expanded:c,onToggle:l,hasChildren:u}){let d=c?g:_,f=i===`area`?`text-primary`:`text-foreground`;return(0,H.jsxs)(`button`,{type:`button`,className:`flex min-h-11 w-full flex-col gap-1 border-t border-border/35 py-2 pr-2 text-left text-xs transition-colors touch-manipulation first:border-t-0 hover:bg-muted/40 sm:min-h-0 sm:flex-row sm:flex-wrap sm:items-center sm:gap-1.5 sm:gap-y-0 sm:py-1.5`,style:{paddingLeft:`${12+e*14}px`},onClick:l,children:[(0,H.jsxs)(`div`,{className:`flex min-w-0 w-full items-center gap-1.5 sm:w-auto sm:flex-1 sm:flex-wrap sm:items-center`,children:[u?(0,H.jsx)(d,{className:`size-3.5 shrink-0 text-muted-foreground`,"aria-hidden":!0}):(0,H.jsx)(`span`,{className:`size-3.5 shrink-0`,"aria-hidden":!0}),(0,H.jsx)(`span`,{title:n??void 0,className:h(`min-w-0 flex-1 truncate font-medium`,f),children:t}),(0,H.jsx)(`span`,{className:`shrink-0 text-[10px] tracking-wide text-muted-foreground uppercase`,children:r}),a&&(0,H.jsx)(`span`,{title:o??void 0,className:`hidden min-w-0 max-w-[min(11rem,38vw)] shrink truncate font-mono text-xs text-muted-foreground sm:inline`,children:a}),s!==void 0&&(0,H.jsx)(`span`,{className:`ml-auto shrink-0 tabular-nums text-xs text-muted-foreground`,children:s})]}),a&&(0,H.jsx)(`span`,{title:o??void 0,className:`min-w-0 truncate pl-7 font-mono text-xs text-muted-foreground sm:hidden`,children:a})]})}function Y(e){let t=e.split(/[-_]/).filter(e=>e.length>0);return t[t.length-1]??e}function X(e,t,n){let r=[];for(let i of e){let e=Y(i.model),a=t.get(i.model),o=[],s=[];if(a)for(let[e,t]of Object.entries(a.members)){let n={name:e,kind:t.kind,dataType:t.dataType,unit:t.unit,euRange:t.euRange};t.kind===`property`?s.push(n):o.push(n)}for(let t=0;t<i.count;t++){let t=(n.get(i.model)??0)+1;n.set(i.model,t),r.push({id:`${e}-${String(t).padStart(3,`0`)}`,model:i.model,tags:o,properties:s})}}return r}function Z({detail:e}){let[t,n]=(0,V.useState)(new Set),c=(0,V.useRef)(null),l=(0,V.useMemo)(()=>[...new Set(e.models)],[e.models]),u=l.join(`,`),d=o({queryKey:a.catalog.modelSchemasBatch(u),queryFn:async()=>Promise.all(l.map(e=>i(`/catalog/models/${e}`,r.catalogModelDetail)))}),m=d.isPending&&!d.data,h=(0,V.useMemo)(()=>{let e=new Map;if(!d.data)return e;for(let[t,n]of d.data.entries())e.set(l[t],n);return e},[d.data,l]),g=(0,V.useMemo)(()=>{let t=new Map,n=new Map;for(let r of e.topology)for(let e of r.lines)n.set(`${r.name}/${e.name}`,X(e.assets,h,t));return n},[e.topology,h]);(0,V.useEffect)(()=>{if(m)return;let t=e.name;if(c.current===t)return;let r=new Set;for(let t of e.topology){r.add(`area:${t.name}`);for(let e of t.lines)r.add(`line:${t.name}/${e.name}`)}outer:for(let t of e.topology)for(let e of t.lines){let n=(g.get(`${t.name}/${e.name}`)??[])[0];if(n){r.add(`inst:${t.name}/${e.name}/${n.id}`);break outer}}n(r),c.current=t},[m,e.name,e.topology,g]);let _=(0,V.useCallback)(e=>{n(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]);return m?null:d.isError&&!d.data?(0,H.jsx)(s,{message:k(d.error,`Failed to load model schemas.`),onRetry:()=>void d.refetch(),isRetrying:d.isFetching&&!d.isPending}):(0,H.jsx)(`div`,{className:`overflow-hidden rounded-[var(--miravo-radius-stadium-sm)] border border-border/50 py-2 pl-1 pr-2 touch-manipulation sm:py-2.5 sm:pl-1.5 sm:pr-2.5`,children:e.topology.map(n=>{let r=`area:${n.name}`,i=t.has(r);return(0,H.jsxs)(`div`,{children:[(0,H.jsx)(J,{depth:0,label:f(n.name),labelTitle:n.name,tag:`AREA`,tagKind:`area`,expanded:i,onToggle:()=>_(r),hasChildren:!0}),i&&n.lines.map(r=>{let i=`line:${n.name}/${r.name}`,a=t.has(i),o=g.get(`${n.name}/${r.name}`)??[];return(0,H.jsxs)(`div`,{children:[(0,H.jsx)(J,{depth:1,label:f(r.name),labelTitle:r.name,tag:`LINE`,tagKind:`line`,count:o.length,expanded:a,onToggle:()=>_(i),hasChildren:!0}),a&&o.map(i=>{let a=`inst:${n.name}/${r.name}/${i.id}`,o=t.has(a);return(0,H.jsxs)(`div`,{children:[(0,H.jsx)(J,{depth:2,label:p(i.id),labelTitle:i.id,tag:`INST`,tagKind:`inst`,subtitle:f(i.model),subtitleTitle:i.model,count:i.tags.length+i.properties.length,expanded:o,onToggle:()=>_(a),hasChildren:i.tags.length+i.properties.length>0}),o&&(0,H.jsx)(K,{asset:i,depth:3,area:n.name,line:r.name,detail:e})]},i.id)})]},r.name)})]},n.name)})})}function Q(e){return o({queryKey:a.catalog.modelSchemasBatch(e.join(`,`)),queryFn:()=>Promise.all(e.map(e=>i(`/catalog/models/${e}`,r.catalogModelDetail))),enabled:e.length>0})}function te(e){return e.lines.reduce((e,t)=>e+t.assets.reduce((e,t)=>e+t.count,0),0)}function ne(e){return Object.values(e.members).filter(e=>e.kind!==`property`).length}function re(e,t){let n=0;for(let r of e.topology)for(let e of r.lines)for(let r of e.assets){let e=t.get(r.model),i=e?ne(e):0;n+=r.count*i}return n}var $=`min-h-10 px-2 py-1 text-xs text-foreground/82 after:bottom-[-3px] data-active:text-foreground sm:min-h-0 sm:px-2.5 sm:py-1`;function ie({templateId:e,onClose:t,live:n,fallbackTitle:u}){let[d,f]=(0,V.useState)(new Set),p=o({queryKey:a.catalog.templateDetail(e??``),queryFn:()=>i(`/catalog/templates/${e}`,r.catalogTemplateDetail),enabled:e!==null}),m=p.data,g=p.isPending&&!m,_=p.isError,v=k(p.error,`Failed to load template.`),A=Q(m?.models??[]),j=(0,V.useMemo)(()=>{if(!m||!A.data)return null;let e=new Map;for(let[t,n]of A.data.entries())e.set(m.models[t],n);return re(m,e)},[m,A.data]);(0,V.useEffect)(()=>{e&&m&&f(new Set(m.topology.map(e=>e.name)))},[e,m]);let M=(0,V.useCallback)(e=>{f(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]);return(0,H.jsx)(ee,{open:e!==null,onOpenChange:e=>{e||t()},children:(0,H.jsx)(C,{side:`right`,className:h(`flex w-full flex-col gap-4 touch-manipulation`,n&&`data-[side=right]:max-w-3xl`),children:g?null:_&&!m&&n?(0,H.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-4`,children:[(0,H.jsx)(O,{className:`gap-1 pb-0 pe-12`,children:(0,H.jsx)(w,{className:`font-heading text-base uppercase tracking-wide`,children:u})}),(0,H.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-4 pb-4`,children:n})]}):_&&!m?(0,H.jsx)(`div`,{className:`flex flex-1 flex-col justify-center px-2`,children:(0,H.jsx)(s,{message:v,onRetry:()=>void p.refetch(),isRetrying:p.isFetching})}):m?(0,H.jsxs)(c.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.18},className:`flex min-h-0 flex-1 flex-col gap-4`,children:[(0,H.jsxs)(O,{className:`gap-1 pb-0 pe-12`,children:[(0,H.jsx)(w,{className:`font-heading text-base uppercase tracking-wide`,children:m.name}),m.description&&(0,H.jsx)(E,{className:`text-xs leading-relaxed text-foreground/88`,children:m.description})]}),(0,H.jsxs)(S,{defaultValue:n?`live`:`overview`,className:`flex min-h-0 flex-1 flex-col gap-1 pt-0`,children:[(0,H.jsxs)(x,{variant:`line`,className:`h-8! shrink-0 gap-0.5 border-b-border/60 px-2 py-0.5`,children:[n?(0,H.jsx)(y,{value:`live`,className:$,children:`Live`}):null,(0,H.jsx)(y,{value:`overview`,className:$,children:`Overview`}),(0,H.jsx)(y,{value:`uns`,className:$,children:`UNS`}),(0,H.jsx)(y,{value:`export`,className:$,children:`Export`})]}),n?(0,H.jsx)(b,{value:`live`,className:`flex min-h-0 flex-1 flex-col`,children:(0,H.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-3 pt-1 pb-4`,children:n})}):null,(0,H.jsx)(b,{value:`overview`,keepMounted:!0,className:`flex min-h-0 flex-1 flex-col`,children:(0,H.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col px-3 pt-0`,children:(0,H.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto pr-2`,children:(0,H.jsxs)(`div`,{className:`flex flex-col gap-2 pb-1 pt-0.5`,children:[(0,H.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,H.jsxs)(l,{variant:`outline`,className:`font-mono text-xs`,children:[m.topology.length,` areas`]}),(0,H.jsxs)(l,{variant:`outline`,className:`font-mono text-xs`,children:[m.assetCount,` assets`]}),(0,H.jsxs)(l,{variant:`outline`,className:`font-mono text-xs`,children:[m.models.length,` models`]}),j!==null&&(0,H.jsxs)(l,{variant:`outline`,className:`font-mono text-xs`,children:[j,` tags`]}),m.settings?.tickIntervalMs&&(0,H.jsxs)(l,{variant:`outline`,className:`font-mono text-xs`,children:[`tick `,m.settings.tickIntervalMs,`ms`]}),m.settings?.timeMultiplier&&m.settings.timeMultiplier!==1&&(0,H.jsxs)(l,{variant:`outline`,className:`font-mono text-xs`,children:[m.settings.timeMultiplier,`× speed`]})]}),m.namespace&&(m.namespace.enterprise||m.namespace.site||m.namespace.prefix)&&(0,H.jsxs)(`div`,{className:`min-w-0 overflow-hidden rounded-[var(--miravo-radius-tight)] border border-border/60 px-2.5 py-2`,children:[(0,H.jsx)(`h3`,{className:`font-heading text-xs font-semibold uppercase tracking-[0.12em] text-primary`,children:`Namespace`}),(0,H.jsxs)(`dl`,{className:`mt-1 grid grid-cols-1 gap-x-4 gap-y-1.5 sm:grid-cols-2`,children:[m.namespace.enterprise&&(0,H.jsxs)(`div`,{className:`min-w-0 sm:max-w-[min(100%,16rem)]`,children:[(0,H.jsx)(`dt`,{className:`font-heading text-xs font-medium uppercase tracking-[0.12em] text-muted-foreground`,children:`Enterprise`}),(0,H.jsx)(`dd`,{className:`mt-1 font-mono text-xs leading-snug text-foreground [overflow-wrap:anywhere] break-words`,children:m.namespace.enterprise})]}),m.namespace.site&&(0,H.jsxs)(`div`,{className:`min-w-0 sm:max-w-[min(100%,16rem)]`,children:[(0,H.jsx)(`dt`,{className:`font-heading text-xs font-medium uppercase tracking-[0.12em] text-muted-foreground`,children:`Site`}),(0,H.jsx)(`dd`,{className:`mt-1 font-mono text-xs leading-snug text-foreground [overflow-wrap:anywhere] break-words`,children:m.namespace.site})]}),m.namespace.prefix&&(0,H.jsxs)(`div`,{className:`min-w-0 sm:col-span-2`,children:[(0,H.jsx)(`dt`,{className:`font-heading text-xs font-medium uppercase tracking-[0.12em] text-muted-foreground`,children:`Prefix`}),(0,H.jsx)(`dd`,{className:`mt-1 font-mono text-xs leading-snug text-foreground [overflow-wrap:anywhere] break-words`,children:m.namespace.prefix})]})]})]}),m.topology.map(e=>(0,H.jsx)(ae,{area:e,expanded:d.has(e.name),onToggle:()=>M(e.name)},e.name)),m.settings&&(0,H.jsxs)(`div`,{className:`rounded-[var(--miravo-radius-tight)] border border-border/50 p-2`,children:[(0,H.jsxs)(`div`,{className:`mb-1.5 flex items-center gap-1.5 font-heading text-xs font-semibold uppercase tracking-[0.12em] text-warning`,children:[(0,H.jsx)(T,{className:`size-3.5`,"aria-hidden":!0}),(0,H.jsx)(`span`,{children:`Settings`})]}),(0,H.jsxs)(`div`,{className:`grid grid-cols-1 gap-1.5 font-mono text-xs sm:grid-cols-2`,children:[(0,H.jsxs)(`div`,{className:`flex flex-col`,children:[(0,H.jsx)(`span`,{className:`text-muted-foreground`,children:`tick interval`}),(0,H.jsxs)(`span`,{className:`text-foreground`,children:[m.settings.tickIntervalMs??1e3,`ms`]})]}),(0,H.jsxs)(`div`,{className:`flex flex-col`,children:[(0,H.jsx)(`span`,{className:`text-muted-foreground`,children:`time multiplier`}),(0,H.jsxs)(`span`,{className:`text-foreground`,children:[m.settings.timeMultiplier??1,`×`]})]})]})]})]})})})}),(0,H.jsx)(b,{value:`uns`,keepMounted:!0,className:`flex min-h-0 flex-1 flex-col`,children:(0,H.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col px-3 pt-0`,children:(0,H.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto pr-2`,children:(0,H.jsx)(`div`,{className:`pb-1 pt-0.5`,children:(0,H.jsx)(Z,{detail:m})})})})}),(0,H.jsx)(b,{value:`export`,keepMounted:!0,className:`flex min-h-0 flex-1 flex-col`,children:(0,H.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col px-3 pt-0`,children:(0,H.jsx)(D,{kind:`template`,id:m.id,yamlPath:`/catalog/templates/${m.id}/yaml`,yamlFilename:`${m.id}.miravo.yaml`})})})]})]},m.id):(0,H.jsx)(`div`,{className:`flex flex-1 items-center justify-center text-sm text-muted-foreground`,children:`Template not found`})})})}function ae({area:e,expanded:t,onToggle:n}){let r=te(e);return(0,H.jsxs)(`div`,{className:A,children:[(0,H.jsxs)(`button`,{type:`button`,className:`flex min-h-11 w-full items-center gap-1.5 px-2.5 py-2 text-left text-xs font-medium transition-colors hover:bg-muted/30 touch-manipulation sm:min-h-0 sm:py-1.5`,onClick:n,children:[(0,H.jsx)(F,{className:`size-3.5 text-primary`}),(0,H.jsx)(`span`,{className:`uppercase tracking-wider text-primary`,children:f(e.name)}),(0,H.jsxs)(`div`,{className:`ml-auto flex items-center gap-1.5`,children:[(0,H.jsxs)(l,{variant:`secondary`,className:`text-xs`,children:[r,` assets`]}),(0,H.jsxs)(l,{variant:`secondary`,className:`text-xs`,children:[e.lines.length,` lines`]}),(0,H.jsx)(g,{className:`size-3 text-muted-foreground transition-transform ${t?`rotate-180`:``}`})]})]}),(0,H.jsx)(u,{initial:!1,children:t&&(0,H.jsx)(c.div,{initial:{height:0,opacity:0},animate:{height:`auto`,opacity:1},exit:{height:0,opacity:0},transition:{duration:.2,ease:`easeOut`},className:`overflow-hidden`,children:(0,H.jsx)(`div`,{className:`flex flex-col gap-1.5 border-t border-border p-2`,children:e.lines.map(e=>(0,H.jsx)(oe,{line:e},e.name))})},`content`)})]})}function oe({line:e}){return(0,H.jsxs)(`div`,{className:`rounded-[var(--miravo-radius-tight)] border border-border/60 bg-muted/10 p-2`,children:[(0,H.jsxs)(`div`,{className:`mb-1.5 flex items-center gap-1.5 text-xs font-medium text-muted-foreground`,children:[(0,H.jsx)(R,{className:`size-3.5`}),(0,H.jsx)(`span`,{title:e.name,children:f(e.name)}),(0,H.jsx)(I,{className:`ml-auto size-3.5 text-muted-foreground`}),(0,H.jsxs)(`span`,{className:`text-muted-foreground`,children:[e.assets.reduce((e,t)=>e+t.count,0),` assets`]})]}),(0,H.jsx)(`div`,{className:`flex flex-col gap-1.5`,children:e.assets.map(e=>(0,H.jsx)(se,{assignment:e},`${e.model}-${e.count}`))})]})}function se({assignment:e}){let t=e.parameters&&Object.keys(e.parameters).length>0;return(0,H.jsxs)(`div`,{className:`rounded-[var(--miravo-radius-tight)] border border-border/30 bg-background/50 px-2.5 py-1.5`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-1.5 text-xs`,children:[(0,H.jsx)(`span`,{className:`font-mono font-medium text-primary`,title:e.model,children:f(e.model)}),(0,H.jsxs)(l,{variant:`secondary`,className:`shrink-0 px-1 py-0 text-xs`,children:[`×`,e.count]}),e.variation>0&&(0,H.jsxs)(`span`,{className:`text-muted-foreground`,children:[`±`,(e.variation*100).toFixed(0),`% variation`]})]}),t&&e.parameters&&(0,H.jsx)(`div`,{className:`mt-1.5 flex flex-wrap gap-x-4 gap-y-1 border-t border-border/20 pt-1.5 font-mono text-xs`,children:Object.entries(e.parameters).map(([e,t])=>(0,H.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,H.jsx)(`span`,{className:`text-muted-foreground`,children:e}),(0,H.jsx)(`span`,{className:`text-foreground`,children:t})]},e))})]})}function ce({id:e,className:t}){let n=h(`shrink-0 text-primary`,t);switch(e){case`smart-factory`:return(0,H.jsx)(N,{className:n,"aria-hidden":!0});case`water-treatment`:return(0,H.jsx)(M,{className:n,"aria-hidden":!0});case`commercial-building`:return(0,H.jsx)(j,{className:n,"aria-hidden":!0});case`backup-power`:return(0,H.jsx)(B,{className:n,"aria-hidden":!0});case`district-heating`:return(0,H.jsx)(z,{className:n,"aria-hidden":!0});case`pharma-cleanroom`:return(0,H.jsx)(P,{className:n,"aria-hidden":!0});default:return(0,H.jsx)(L,{className:n,"aria-hidden":!0})}}export{I as a,B as i,ie as n,Q as r,ce as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as e,ot as t,v as n}from"./vendor-ui-D8j69UH4.js";import{E as r}from"./format-OUFL_tef.js";import{t as i}from"./utils-BO2u-wC_.js";var a=t();function o({className:t,...o}){return(0,a.jsx)(n,{"data-slot":`checkbox`,className:i(`peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input transition-colors outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary bg-input/30 aria-invalid:border-destructive/50 aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground data-checked:bg-primary`,t),...o,children:(0,a.jsx)(e,{"data-slot":`checkbox-indicator`,className:`grid place-content-center text-current transition-none [&>svg]:size-3.5`,children:(0,a.jsx)(r,{})})})}export{o as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./utils-BO2u-wC_.js";var t=e(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]);export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./utils-BO2u-wC_.js";var t=e(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]);export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./utils-BO2u-wC_.js";var t=e(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),n=e(`circle-x`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]);export{t as n,n as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./rolldown-runtime-COnpUsM8.js";import{c as e}from"./vendor-charts-95ykyDlI.js";import{C as t,E as n,S as r,T as i,b as a,g as o,h as s,ot as c,w as l,x as u,y as d}from"./vendor-ui-D8j69UH4.js";import{C as f,D as p,E as m,S as h,T as g}from"./format-OUFL_tef.js";import{t as _}from"./utils-BO2u-wC_.js";import{t as v}from"./chevron-down-CAk5w9Wt.js";var y=c();function b({className:e,size:t=`default`,...n}){return(0,y.jsx)(`div`,{"data-slot":`card`,"data-size":t,className:_(`group/card flex flex-col gap-4 overflow-hidden rounded-[var(--miravo-radius-stadium-sm)] border bg-card py-4 text-sm text-card-foreground has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-[var(--miravo-radius-stadium-sm)] *:[img:last-child]:rounded-b-[var(--miravo-radius-stadium-sm)]`,e),...n})}function x({className:e,...t}){return(0,y.jsx)(`div`,{"data-slot":`card-header`,className:_(`group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-[var(--miravo-radius-stadium-sm)] px-4 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3`,e),...t})}function S({className:e,...t}){return(0,y.jsx)(`div`,{"data-slot":`card-title`,className:_(`text-base leading-snug font-medium group-data-[size=sm]/card:text-sm`,e),...t})}function C({className:e,...t}){return(0,y.jsx)(`div`,{"data-slot":`card-content`,className:_(`px-4 group-data-[size=sm]/card:px-3`,e),...t})}e();function w({className:e,...t}){return(0,y.jsx)(`div`,{"data-slot":`input-group`,role:`group`,className:_(`group/input-group relative flex h-8 w-full min-w-0 items-center gap-1.5 rounded-[var(--miravo-radius-stadium-sm)] border border-input bg-input/30 transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 hover:bg-input/50 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-primary/35 has-[[data-slot=input-group-control]:focus-visible]:ring-2 has-[[data-slot=input-group-control]:focus-visible]:ring-primary/22 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5`,e),...t})}var T=p(`flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-xs font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4`,{variants:{align:{"inline-start":`order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]`,"inline-end":`order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]`,"block-start":`order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2`,"block-end":`order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2`}},defaultVariants:{align:`inline-start`}});function E({className:e,align:t=`inline-start`,...n}){return(0,y.jsx)(`div`,{role:`group`,"data-slot":`input-group-addon`,"data-align":t,className:_(T({align:t}),e),onClick:e=>{e.target.closest(`button`)||e.currentTarget.parentElement?.querySelector(`input`)?.focus()},...n})}var D=p(`flex items-center gap-2 text-xs shadow-none`,{variants:{size:{xs:`h-6 gap-1 rounded-[var(--miravo-radius-stadium-sm)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5`,sm:``,"icon-xs":`size-6 rounded-[var(--miravo-radius-stadium-sm)] p-0 has-[>svg]:p-0`,"icon-sm":`size-8 p-0 has-[>svg]:p-0`}},defaultVariants:{size:`xs`}});function O({className:e,type:t=`button`,variant:n=`ghost`,size:r=`xs`,...i}){return(0,y.jsx)(f,{type:t,"data-size":r,variant:n,className:_(D({size:r}),e),...i})}function k({className:e,...t}){return(0,y.jsx)(h,{"data-slot":`input-group-control`,className:_(`min-w-0 flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 hover:bg-transparent disabled:bg-transparent aria-invalid:ring-0 dark:hover:bg-transparent dark:disabled:bg-transparent`,e),...t})}var A=o;function j({className:e,children:t,...r}){return(0,y.jsxs)(n,{"data-slot":`combobox-trigger`,className:_(`[&_svg:not([class*='size-'])]:size-4`,e),...r,children:[t,(0,y.jsx)(v,{className:`pointer-events-none size-4 text-muted-foreground`})]})}function M({className:e,...t}){return(0,y.jsx)(l,{"data-slot":`combobox-clear`,render:(0,y.jsx)(O,{variant:`ghost`,size:`icon-xs`,"aria-label":`Clear selection`}),className:_(e),...t,children:(0,y.jsx)(g,{className:`pointer-events-none`})})}function N({className:e,children:t,disabled:n=!1,showTrigger:r=!0,showClear:a=!1,...o}){return(0,y.jsxs)(w,{className:_(`w-auto`,e),children:[(0,y.jsx)(i,{render:(0,y.jsx)(k,{disabled:n}),...o}),(0,y.jsxs)(E,{align:`inline-end`,children:[r&&(0,y.jsx)(O,{size:`icon-xs`,variant:`ghost`,render:(0,y.jsx)(j,{}),"data-slot":`input-group-button`,className:`group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent`,disabled:n,"aria-label":`Toggle options`}),a&&(0,y.jsx)(M,{disabled:n})]}),t]})}function P({className:e,side:t=`bottom`,sideOffset:n=6,align:i=`start`,alignOffset:o=0,anchor:s,...c}){return(0,y.jsx)(r,{children:(0,y.jsx)(u,{side:t,sideOffset:n,align:i,alignOffset:o,anchor:s,className:`isolate z-50`,children:(0,y.jsx)(a,{"data-slot":`combobox-content`,"data-chips":!!s,className:_(`group/combobox-content relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-[var(--miravo-radius-tight)] bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[chips=true]:min-w-(--anchor-width) data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:border-input/30 *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:shadow-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 motion-reduce:data-open:animate-none motion-reduce:data-closed:animate-none motion-reduce:data-open:duration-0 motion-reduce:data-closed:duration-0`,e),...c})})})}function F({className:e,...n}){return(0,y.jsx)(t,{"data-slot":`combobox-list`,className:_(`no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto overscroll-contain p-1 data-empty:p-0`,e),...n})}function I({className:e,children:t,...n}){return(0,y.jsxs)(d,{"data-slot":`combobox-item`,className:_(`relative flex w-full cursor-pointer items-center gap-1.5 rounded-[var(--miravo-radius-tight)] py-1 pr-8 pl-1.5 text-xs outline-hidden select-none data-[highlighted]:bg-sidebar-accent data-[highlighted]:text-sidebar-accent-foreground not-data-[variant=destructive]:data-[highlighted]:**:text-sidebar-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...n,children:[t,(0,y.jsx)(s,{render:(0,y.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex size-4 items-center justify-center`}),children:(0,y.jsx)(m,{className:`pointer-events-none`})})]})}export{F as a,x as c,I as i,S as l,P as n,b as o,N as r,C as s,A as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./rolldown-runtime-COnpUsM8.js";import{c as t}from"./vendor-charts-95ykyDlI.js";import{ot as n}from"./vendor-ui-D8j69UH4.js";import{B as r,ot as i}from"./api-kPM52mb-.js";import{n as a,t as o}from"./badge-D4jktT8T.js";import{t as s}from"./AnimatePresence-BZCmb1bq.js";import{i as c,r as l}from"./dist-CtuJWBnP.js";import{a as u,i as d,n as f,o as p,r as m,t as h}from"./dialog-Di9Bs0FH.js";import{a as g,n as _,o as ee,r as v,s as y}from"./protocol-card-B2SpAJKe.js";import{C as b,S as x,d as S,l as C}from"./format-OUFL_tef.js";import{n as w,t as T}from"./utils-BO2u-wC_.js";import{n as E}from"./server-CS2Tw__K.js";import{n as D}from"./circle-x-CGcRflg7.js";import{a as te,n as ne,r as re}from"./copy-button-DHm7RGJ5.js";import{a as ie,n as ae,o as oe,r as O,s as k,t as A}from"./validation-q38DYDwu.js";import{i as j,n as M,r as N,t as P}from"./tabs-bI9sskHy.js";import{t as F}from"./play-TTg_EXSa.js";import{t as I}from"./rocket-807Pf7C1.js";import{t as L}from"./triangle-alert-D1AraFcP.js";import{t as R}from"./label-DWyy9MeT.js";import{a as z,t as B}from"./use-engine-command-mutation-DMkQxmt9.js";import{a as V,c as H,i as U,l as W,n as G,o as K,r as q,s as J,t as se}from"./combobox-BFEY6lgO.js";import{c as ce,i as le,n as ue,s as de,t as fe}from"./select-Bg6PPro0.js";var pe=w(`octagon-alert`,[[`path`,{d:`M12 16h.01`,key:`1drbdi`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z`,key:`1fd625`}]]),me=w(`pause`,[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]),Y=w(`radio-tower`,[[`path`,{d:`M4.9 16.1C1 12.2 1 5.8 4.9 1.9`,key:`s0qx1y`}],[`path`,{d:`M7.8 4.7a6.14 6.14 0 0 0-.8 7.5`,key:`1idnkw`}],[`circle`,{cx:`12`,cy:`9`,r:`2`,key:`1092wv`}],[`path`,{d:`M16.2 4.8c2 2 2.26 5.11.8 7.47`,key:`ojru2q`}],[`path`,{d:`M19.1 1.9a9.96 9.96 0 0 1 0 14.1`,key:`rhi7fg`}],[`path`,{d:`M9.5 18h5`,key:`mfy3pd`}],[`path`,{d:`m8 22 4-11 4 11`,key:`25yftu`}]]),X=e(t(),1),Z=n();function he(){let{assets:e,models:t}=i(y(e=>({assets:e.assets,models:e.models}))),n=B(),[r,c]=(0,X.useState)(``),[l,u]=(0,X.useState)(``),[d,f]=(0,X.useState)(``),p=(0,X.useMemo)(()=>d?e.filter(e=>e.id.toLowerCase().includes(d.toLowerCase())):e,[e,d]),m=(0,X.useMemo)(()=>{let n=e.find(e=>e.id===r);return n?t.find(e=>e.name===n.model)?.faultNames??[]:[]},[r,e,t]),h=(0,X.useMemo)(()=>e.filter(e=>e.activeFaults.length>0),[e]),g=h.reduce((e,t)=>e+t.activeFaults.length,0);return(0,Z.jsxs)(K,{className:`h-full min-w-0`,children:[(0,Z.jsx)(H,{className:`pb-3`,children:(0,Z.jsxs)(W,{className:`flex items-center gap-2 text-xs font-medium uppercase tracking-wider`,children:[(0,Z.jsx)(L,{className:`size-3.5 ${g>0?`text-destructive`:`text-muted-foreground`}`}),`Fault Lab`,(0,Z.jsx)(s,{children:g>0&&(0,Z.jsx)(a.div,{initial:{scale:0,opacity:0},animate:{scale:1,opacity:1},exit:{scale:0,opacity:0},transition:{type:`spring`,stiffness:500,damping:30},children:(0,Z.jsxs)(o,{variant:`destructive`,className:`text-[10px]`,children:[g,` active`]})},`fault-count`)})]})}),(0,Z.jsxs)(J,{className:`flex flex-1 flex-col gap-3`,children:[(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,Z.jsxs)(se,{value:r||null,onValueChange:e=>{c(e??``),u(``)},onInputValueChange:f,children:[(0,Z.jsx)(q,{placeholder:`Select asset`,"aria-label":`Fault asset`,className:`h-8 min-h-11 w-full min-w-0 touch-manipulation sm:min-h-8`,showClear:!!r}),(0,Z.jsx)(G,{children:(0,Z.jsxs)(V,{children:[p.map(e=>(0,Z.jsxs)(U,{value:e.id,children:[(0,Z.jsx)(`span`,{className:`font-mono`,children:e.id}),e.activeFaults.length>0&&(0,Z.jsx)(o,{variant:`destructive`,className:`ml-auto text-[10px]`,children:e.activeFaults.length})]},e.id)),p.length===0&&(0,Z.jsx)(`p`,{className:`py-2 text-center text-xs text-muted-foreground`,children:`No assets found`})]})})]}),(0,Z.jsxs)(fe,{value:l,onValueChange:e=>u(e??``),children:[(0,Z.jsx)(de,{className:`h-8 min-h-11 w-full touch-manipulation sm:min-h-8`,"aria-label":`Fault type`,children:(0,Z.jsx)(ce,{placeholder:r?`Select fault`:`Pick asset first`})}),(0,Z.jsx)(ue,{alignItemWithTrigger:!1,align:`start`,children:m.map(e=>(0,Z.jsx)(le,{value:e,children:e},e))})]})]}),(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-2`,children:[(0,Z.jsx)(b,{variant:`destructive`,size:`sm`,className:`h-7 min-h-11 touch-manipulation text-xs sm:min-h-7`,disabled:!r||!l,onClick:()=>{let e=O(A,{assetId:r,fault:l});e&&n.mutate({type:`triggerFault`,...e})},children:`Trigger`}),(0,Z.jsx)(b,{variant:`secondary`,size:`sm`,className:`h-7 min-h-11 touch-manipulation text-xs sm:min-h-7`,disabled:!r||!l,onClick:()=>{let e=O(A,{assetId:r,fault:l});e&&n.mutate({type:`clearFault`,...e})},children:`Clear`})]}),(0,Z.jsx)(ie,{}),(0,Z.jsx)(s,{mode:`wait`,initial:!1,children:h.length>0?(0,Z.jsxs)(a.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},className:`flex flex-col gap-2`,children:[(0,Z.jsx)(`span`,{className:`text-[10px] font-medium uppercase tracking-wider text-muted-foreground`,children:`Faulted Assets`}),(0,Z.jsx)(s,{initial:!1,children:h.map(e=>(0,Z.jsx)(a.div,{initial:{opacity:0,x:-6},animate:{opacity:1,x:0},exit:{opacity:0,x:6,transition:{duration:.1}},transition:{type:`spring`,stiffness:400,damping:35},children:(0,Z.jsxs)(`button`,{type:`button`,className:`flex min-h-11 w-full touch-manipulation items-center justify-between rounded-[var(--miravo-radius-tight)] border border-destructive/20 bg-destructive/5 px-2.5 py-1.5 text-left transition-colors hover:bg-destructive/10 sm:min-h-0`,onClick:()=>{c(e.id),u(``)},children:[(0,Z.jsx)(`span`,{className:`truncate font-mono text-xs`,children:e.id}),(0,Z.jsx)(`span`,{className:`shrink-0 font-mono text-[10px] text-destructive`,children:e.activeFaults.join(`, `)})]})},e.id))})]},`faulted`):(0,Z.jsxs)(a.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},className:`flex items-center gap-2 py-1 text-xs text-muted-foreground`,children:[(0,Z.jsx)(D,{className:`size-3.5 text-success`}),`All clear — no active faults`]},`all-clear`)})]})]})}function ge(e){let t=Math.floor(e/1e3),n=Math.floor(t/3600),r=Math.floor(t%3600/60),i=t%60;return n>0?`${n}h ${r}m`:r>0?`${r}m ${i}s`:`${i}s`}function _e(e){if(!Number.isFinite(e)||e<=0)return`0s`;if(e<60)return`${e.toFixed(1)}s`;let t=Math.floor(e),n=Math.floor(t/86400),r=Math.floor(t%86400/3600),i=Math.floor(t%3600/60),a=t%60;return n>0?r>0?`${n}d ${r}h`:i>0?`${n}d ${i}m`:`${n}d`:r>0?`${r}h ${i}m`:i>0?`${i}m ${a}s`:`${a}s`}function ve({data:e}){let t=(0,X.useMemo)(()=>{if(e.length<2)return null;let t=e.map(e=>e.tps),n=Math.max(...t,.1),r=Math.min(...t,0),i=n-r||1;return{points:t.map((e,n)=>{let a=n/(t.length-1)*200,o=2+(1-(e-r)/i)*28;return`${n===0?`M`:`L`}${a.toFixed(1)},${o.toFixed(1)}`}).join(` `),min:r,max:n}},[e]);return t?(0,Z.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,Z.jsxs)(`svg`,{viewBox:`0 0 200 32`,className:`h-8 w-full`,preserveAspectRatio:`none`,role:`img`,"aria-label":`TPS trend sparkline`,children:[(0,Z.jsx)(`line`,{x1:`0`,y1:`10.7`,x2:`200`,y2:`10.7`,stroke:`currentColor`,strokeWidth:`0.5`,strokeDasharray:`3,2`,className:`text-border`}),(0,Z.jsx)(`line`,{x1:`0`,y1:`21.3`,x2:`200`,y2:`21.3`,stroke:`currentColor`,strokeWidth:`0.5`,strokeDasharray:`3,2`,className:`text-border`}),(0,Z.jsx)(`path`,{d:t.points,fill:`none`,stroke:`var(--primary)`,strokeWidth:`1.5`})]}),(0,Z.jsxs)(`div`,{className:`flex justify-between text-[9px] text-muted-foreground`,children:[(0,Z.jsxs)(`span`,{children:[`60s ago · `,t.min.toFixed(1)]}),(0,Z.jsxs)(`span`,{children:[t.max.toFixed(1),` · now`]})]})]}):(0,Z.jsx)(`div`,{className:`flex h-8 items-center text-[10px] text-muted-foreground`,children:`Collecting...`})}var ye={running:`bg-success`,paused:`bg-warning`,idle:`bg-muted-foreground`,stopped:`bg-destructive`};function be({state:e}){let t=ye[e]??`bg-muted-foreground`,n=e===`running`;return(0,Z.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,Z.jsxs)(`div`,{className:`relative flex items-center justify-center`,children:[(0,Z.jsx)(`span`,{className:`size-2.5 rounded-full ${t}`}),n&&(0,Z.jsx)(`span`,{className:`absolute size-2.5 animate-ping rounded-full ${t} opacity-40`})]}),(0,Z.jsx)(s,{mode:`wait`,initial:!1,children:(0,Z.jsx)(a.span,{initial:{opacity:0,y:-5},animate:{opacity:1,y:0},exit:{opacity:0,y:5},transition:{type:`spring`,stiffness:500,damping:30},className:`font-mono text-lg font-bold uppercase tracking-wider`,children:e},e)})]})}function Q({label:e,tooltip:t,tooltipClassName:n}){return(0,Z.jsxs)(`div`,{className:`inline-flex w-fit min-w-0 max-w-full items-center gap-1`,children:[(0,Z.jsx)(`span`,{className:`blueprint-title min-w-0 shrink text-[11px] leading-tight text-muted-foreground`,children:e}),(0,Z.jsxs)(ne,{children:[(0,Z.jsx)(te,{className:`inline-flex size-4 shrink-0 items-center justify-center rounded-[var(--miravo-radius-tight)] border-0 bg-transparent p-0 text-muted-foreground shadow-none outline-none hover:text-foreground focus-visible:ring-1 focus-visible:ring-ring`,render:(0,Z.jsx)(`button`,{type:`button`}),"aria-label":`About ${e}`,children:(0,Z.jsx)(E,{className:`size-3`,"aria-hidden":!0})}),(0,Z.jsx)(re,{side:`top`,className:T(`max-w-xs`,n),children:t})]})]})}function $(){let{engineState:e,connectionState:t}=i(y(e=>({engineState:e.engineState,connectionState:e.connectionState}))),n=B();return(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Z.jsx)(Q,{label:`Run state`,tooltip:(0,Z.jsx)(`p`,{className:`text-[11px] leading-snug`,children:`Whether the scheduler is running, paused, idle, or stopped. Pause freezes simulated time; resume continues from the same tick.`})}),(0,Z.jsx)(be,{state:e}),t===`live`&&(e===`running`||e===`paused`)&&(0,Z.jsx)(`div`,{className:`mt-1 flex items-center gap-2`,children:(0,Z.jsxs)(b,{type:`button`,size:`sm`,variant:e===`paused`?`default`:`outline`,className:T(`h-8 min-h-11 w-fit touch-manipulation gap-1.5 px-3 text-xs sm:min-h-8`,e===`running`&&`border-warning/40 bg-warning/10 text-warning hover:bg-warning/20 hover:text-warning focus-visible:border-warning/50 focus-visible:ring-warning/25 border-warning/35`),onClick:()=>n.mutate({type:e===`paused`?`resume`:`pause`}),children:[e===`paused`?(0,Z.jsx)(F,{className:`size-3`}):(0,Z.jsx)(me,{className:`size-3`}),e===`paused`?`Resume`:`Pause`]})})]})}function xe(){let{speedMultiplier:e,connectionState:t}=i(y(e=>({speedMultiplier:e.speedMultiplier,connectionState:e.connectionState}))),n=B(),[r,a]=(0,X.useState)(String(e)),o=t===`live`;return(0,X.useEffect)(()=>{a(String(e))},[e]),(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Z.jsx)(Q,{label:`Speed`,tooltip:(0,Z.jsx)(`p`,{className:`text-[11px] leading-snug`,children:`Runs the factory at this multiple of real time. 1× is real time; higher values speed up the model. Change it with the field and Set.`})}),(0,Z.jsxs)(`span`,{className:`w-fit font-mono text-lg font-bold tabular-nums`,children:[e,`x`]}),(0,Z.jsxs)(`div`,{className:`mt-1 flex min-w-0 flex-wrap items-center gap-2`,children:[(0,Z.jsx)(R,{htmlFor:`speed-multiplier`,className:`sr-only`,children:`Speed multiplier`}),(0,Z.jsx)(x,{id:`speed-multiplier`,type:`number`,value:r,onChange:e=>a(e.target.value),className:`h-8 min-h-11 w-[4.75rem] touch-manipulation font-mono text-xs tabular-nums sm:min-h-8`,min:`1`,max:`1000`,disabled:!o}),(0,Z.jsx)(b,{type:`button`,size:`sm`,variant:`outline`,className:`h-8 min-h-11 touch-manipulation px-3 text-xs sm:min-h-8`,disabled:!o,onClick:()=>{let e=O(ae,{multiplier:Number(r)});e&&n.mutate({type:`setSpeed`,multiplier:e.multiplier})},children:`Set`})]})]})}function Se(){let{tick:e,simulationTime:t,tps:n,tpsHistory:r,uptimeMs:a,assetCount:o,memberValueCount:s}=i(y(e=>({tick:e.tick,simulationTime:e.simulationTime,tps:e.tps,tpsHistory:e.tpsHistory,uptimeMs:e.uptimeMs,assetCount:e.assetCount,memberValueCount:e.memberValueCount})));return(0,Z.jsxs)(`div`,{className:T(z,`px-4 py-3`),children:[(0,Z.jsxs)(`header`,{className:`mb-3 border-b border-border/60 pb-2`,children:[(0,Z.jsx)(`h2`,{className:`font-heading text-sm font-semibold tracking-tight text-foreground`,children:`Engine vitals`}),(0,Z.jsx)(`p`,{className:`mt-0.5 text-xs text-muted-foreground`,children:`Scheduler, speed, cycle count, and throughput for this session.`})]}),(0,Z.jsxs)(`div`,{className:`grid min-w-0 grid-cols-2 gap-3 @2xl/main:gap-4 @3xl/main:grid-cols-3 @5xl/main:grid-cols-6`,children:[(0,Z.jsx)($,{}),(0,Z.jsx)(xe,{}),(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Z.jsx)(Q,{label:`Cycle`,tooltipClassName:`flex flex-col items-start gap-2 text-left`,tooltip:(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(`p`,{className:`text-[11px] leading-snug`,children:[(0,Z.jsx)(`span`,{className:`font-medium`,children:`Cycle`}),` compares simulated progress with wall time: how many steps ran, how much model time advanced, and how long this session has been open.`]}),(0,Z.jsxs)(`p`,{className:`text-[11px] leading-snug`,children:[`The number is `,(0,Z.jsx)(`span`,{className:`font-medium`,children:`tick`}),` count — completed scheduler steps since this run. Each tick refreshes the plant model and live tags.`]}),(0,Z.jsxs)(`p`,{className:`text-[11px] leading-snug`,children:[(0,Z.jsx)(`span`,{className:`font-medium`,children:`Sim`}),` is simulated elapsed time. Each tick adds (tick interval × speed) to this clock. Generators, lifecycle, and in-model timestamps use Sim, not your system clock. It stops advancing while paused.`]}),(0,Z.jsxs)(`p`,{className:`text-[11px] leading-snug`,children:[(0,Z.jsx)(`span`,{className:`font-medium`,children:`Real`}),` is wall-clock uptime since the run started (real time).`]})]})}),(0,Z.jsx)(`span`,{className:`w-fit font-mono text-lg font-bold tabular-nums`,children:C(e)}),(0,Z.jsxs)(`div`,{className:`mt-1 flex w-full min-w-0 flex-col gap-0.5 leading-tight`,children:[(0,Z.jsxs)(`div`,{className:`flex min-w-0 items-baseline gap-2`,children:[(0,Z.jsx)(`span`,{className:`w-10 shrink-0 text-[9px] font-semibold uppercase tracking-wide text-muted-foreground`,children:`Sim`}),(0,Z.jsx)(`span`,{className:`min-w-0 font-mono text-[10px] tabular-nums text-muted-foreground`,children:_e(t)})]}),(0,Z.jsxs)(`div`,{className:`flex min-w-0 items-baseline gap-2`,children:[(0,Z.jsx)(`span`,{className:`w-10 shrink-0 text-[9px] font-semibold uppercase tracking-wide text-muted-foreground`,children:`Real`}),(0,Z.jsx)(`span`,{className:`min-w-0 font-mono text-[10px] tabular-nums text-muted-foreground`,children:ge(a)})]})]})]}),(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Z.jsx)(Q,{label:`Throughput`,tooltip:(0,Z.jsx)(`p`,{className:`text-[11px] leading-snug`,children:`Ticks per second: how fast the engine is stepping. Rises and falls with workload, speed setting, and CPU headroom.`})}),(0,Z.jsxs)(`span`,{className:`w-fit font-mono text-lg font-bold tabular-nums`,children:[n.toFixed(1),` tps`]}),(0,Z.jsxs)(`span`,{className:`mt-1 text-[10px] text-muted-foreground`,children:[o,` inst · `,S(s),` tags`]})]}),(0,Z.jsxs)(`div`,{className:`col-span-2 flex flex-col gap-2`,children:[(0,Z.jsx)(Q,{label:`TPS Trend`,tooltip:(0,Z.jsx)(`p`,{className:`text-[11px] leading-snug`,children:`Recent ticks-per-second samples over about the last minute. Flat or noisy lines usually mean load or speed changes.`})}),(0,Z.jsx)(ve,{data:r})]})]})]})}function Ce({enabled:e,total:t}){return(0,Z.jsxs)(ee,{tone:t===0?`off`:e===0?`idle`:`live`,children:[(0,Z.jsx)(`span`,{className:`font-mono font-semibold tabular-nums text-foreground`,children:e}),(0,Z.jsx)(`span`,{className:`mx-1 text-muted-foreground/60`,children:`/`}),(0,Z.jsx)(`span`,{className:`font-mono tabular-nums`,children:t}),(0,Z.jsx)(`span`,{className:`ml-1.5`}),(0,Z.jsx)(g,{children:`active`})]})}function we(){let{availableAdapters:e,adapterMetrics:t}=i(y(e=>({availableAdapters:e.availableAdapters,adapterMetrics:e.adapterMetrics}))),n=e.filter(e=>e.enabled).length;return(0,Z.jsxs)(v,{icon:Y,title:`Protocol Gateway`,description:`Northbound adapters publishing engine telemetry to external systems.`,aside:(0,Z.jsx)(Ce,{enabled:n,total:e.length}),bodyClassName:`p-0`,children:[e.length>0&&(0,Z.jsx)(`div`,{className:`flex flex-col gap-2 px-4 py-4`,children:(0,Z.jsx)(s,{children:e.map((e,n)=>{let r=t.find(t=>t.name===e.name)?.metrics;return(0,Z.jsx)(a.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},exit:{opacity:0},transition:{type:`spring`,stiffness:380,damping:30,delay:n*.05},children:(0,Z.jsx)(_,{adapter:e,metrics:r})},e.name)})})}),(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-x-3 gap-y-2 border-t border-border/60 bg-background/40 px-4 py-2.5`,role:`status`,"aria-label":`Upcoming protocol adapters`,children:[(0,Z.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1.5`,children:[(0,Z.jsx)(I,{className:`size-3 text-muted-foreground/70`,"aria-hidden":!0}),(0,Z.jsx)(`span`,{className:`text-[10px] font-medium uppercase tracking-[0.14em] text-muted-foreground`,children:`Roadmap`})]}),(0,Z.jsx)(`span`,{className:`font-mono text-[10px] leading-[15px] tracking-tight text-muted-foreground`,children:`More protocols to come`})]})]})}function Te(){let{assets:e,templates:t}=i(y(e=>({assets:e.assets,templates:e.templates}))),n=B(),[r,a]=(0,X.useState)(!1),[o,s]=(0,X.useState)(!1);return(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-col`,children:[(0,Z.jsxs)(K,{className:`min-w-0`,children:[(0,Z.jsx)(H,{className:`pb-3`,children:(0,Z.jsxs)(W,{className:`flex items-center gap-2 text-xs font-medium uppercase tracking-wider`,children:[(0,Z.jsx)(pe,{className:`size-3.5 text-muted-foreground`,"aria-hidden":!0}),`Danger Zone`]})}),(0,Z.jsx)(J,{className:`flex flex-1 flex-col`,children:(0,Z.jsxs)(`div`,{className:`flex min-h-0 min-w-0 flex-1 flex-col gap-3 rounded-[var(--miravo-radius-stadium-sm)] border border-dashed border-border p-3 @2xl/main:flex-row @2xl/main:items-center @2xl/main:justify-between`,children:[(0,Z.jsxs)(`div`,{className:`min-w-0 space-y-0.5`,children:[(0,Z.jsx)(`p`,{className:`text-sm font-medium text-foreground`,children:`Reset factory`}),(0,Z.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Unloads `,t.length,` template`,t.length===1?``:`s`,` and removes`,` `,e.length,` asset`,e.length===1?``:`s`,`, including standalone ones.`]})]}),(0,Z.jsx)(b,{className:`min-h-11 w-full shrink-0 touch-manipulation @2xl/main:w-auto sm:min-h-7`,variant:`destructive`,size:`sm`,onClick:()=>a(!0),children:`Reset`})]})})]}),(0,Z.jsx)(h,{open:r,onOpenChange:a,children:(0,Z.jsxs)(f,{children:[(0,Z.jsxs)(u,{children:[(0,Z.jsx)(p,{children:`Reset Factory`}),(0,Z.jsx)(m,{children:`Unloads every template and removes every asset, including standalone ones. With persistence on, the empty factory is saved and stays empty after a restart.`})]}),(0,Z.jsxs)(d,{children:[(0,Z.jsx)(b,{variant:`outline`,className:`min-h-11 w-full touch-manipulation sm:min-h-8 sm:w-auto`,onClick:()=>a(!1),disabled:o,children:`Cancel`}),(0,Z.jsx)(b,{variant:`destructive`,className:`min-h-11 w-full touch-manipulation sm:min-h-8 sm:w-auto`,disabled:o,onClick:async()=>{s(!0);try{await n.mutateAsync({type:`resetFactory`}),a(!1)}catch{}finally{s(!1)}},children:o?`Resetting...`:`Confirm Reset`})]})]})})]})}function Ee(){let[e,t]=c(`tab`,l([`monitor`,`operate`]).withDefault(`monitor`));return(0,Z.jsxs)(`div`,{className:`mx-auto flex w-full min-w-0 max-w-screen-2xl flex-col gap-5 p-4 sm:gap-6 sm:p-6`,children:[(0,Z.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-2`,children:[(0,Z.jsx)(`h1`,{className:`font-heading text-2xl font-semibold tracking-tight`,children:`Mission Control`}),(0,Z.jsxs)(o,{variant:`outline`,title:`Miravo version ${r}`,className:`font-mono text-[10px] leading-none text-muted-foreground`,children:[`v`,r]})]}),(0,Z.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Engine telemetry, protocol management, and fault operations.`})]}),(0,Z.jsxs)(P,{value:e,onValueChange:e=>{t(e)},className:`min-h-0 flex-1`,children:[(0,Z.jsx)(`div`,{className:`shrink-0 overflow-x-auto`,children:(0,Z.jsxs)(N,{variant:`line`,className:`h-10! min-w-max gap-0.5`,children:[(0,Z.jsxs)(j,{value:`monitor`,className:`gap-1.5 px-3 text-sm`,children:[(0,Z.jsx)(k,{className:`size-3.5 shrink-0`}),`Monitor`]}),(0,Z.jsxs)(j,{value:`operate`,className:`gap-1.5 px-3 text-sm`,children:[(0,Z.jsx)(oe,{className:`size-3.5 shrink-0`}),`Operate`]})]})}),(0,Z.jsx)(M,{value:`monitor`,className:`flex-1 py-2`,children:(0,Z.jsxs)(a.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},transition:{duration:.15,ease:`easeOut`},className:`flex flex-col gap-5 sm:gap-6`,children:[(0,Z.jsx)(Se,{}),(0,Z.jsx)(we,{})]},`monitor`)}),(0,Z.jsx)(M,{value:`operate`,className:`flex-1 py-2`,children:(0,Z.jsxs)(a.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},transition:{duration:.15,ease:`easeOut`},className:`grid min-h-0 min-w-0 grid-cols-1 items-start gap-5 @2xl/main:grid-cols-2 @2xl/main:gap-4`,children:[(0,Z.jsx)(he,{}),(0,Z.jsx)(Te,{})]},`operate`)})]})]})}export{Y as n,Ee as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./control-CD9UoTvu.js";export{e as ControlPage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./rolldown-runtime-COnpUsM8.js";import{c as t}from"./vendor-charts-95ykyDlI.js";import{G as n,H as r,K as i,U as a,V as o,W as s,ot as c,q as l}from"./vendor-ui-D8j69UH4.js";import{c as u}from"./dialog-Di9Bs0FH.js";import{E as d}from"./format-OUFL_tef.js";import{n as f,t as p}from"./utils-BO2u-wC_.js";var m=f(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),h=e(t(),1),g=c();function _({delay:e=0,...t}){return(0,g.jsx)(o,{"data-slot":`tooltip-provider`,delay:e,...t})}function v({...e}){return(0,g.jsx)(l,{"data-slot":`tooltip`,...e})}function y({...e}){return(0,g.jsx)(i,{"data-slot":`tooltip-trigger`,...e})}function b({className:e,side:t=`top`,sideOffset:i=3,align:o=`center`,alignOffset:c=0,children:l,...u}){return(0,g.jsx)(n,{children:(0,g.jsx)(s,{align:o,alignOffset:c,side:t,sideOffset:i,className:`isolate z-50`,children:(0,g.jsxs)(a,{"data-slot":`tooltip-content`,className:p(`z-50 inline-flex w-fit max-w-[min(18rem,85vw)] origin-(--transform-origin) items-center gap-1 rounded-[var(--miravo-radius-tight)] bg-tooltip px-2 py-1 text-[11px] leading-tight text-tooltip-foreground shadow-md shadow-black/25 has-data-[slot=kbd]:pr-1 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-[var(--miravo-radius-tight)] data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...u,children:[l,(0,g.jsx)(r,{className:`z-50 size-2 translate-y-[calc(-50%-1px)] rotate-45 rounded-[1px] bg-tooltip fill-tooltip data-[side=bottom]:top-0.5 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-0.5 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-0.5 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-0.5 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-0.5 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2`})]})})})}function x(e,t){if(!t?.body||!t.createElement||typeof t.execCommand!=`function`)return!1;let n=t.createElement(`textarea`),r=t.activeElement;n.value=e,n.setAttribute(`readonly`,``),n.setAttribute(`aria-hidden`,`true`),n.style.position=`fixed`,n.style.top=`0`,n.style.left=`-9999px`,n.style.opacity=`0`,t.body.appendChild(n),n.focus(),n.select(),n.setSelectionRange(0,n.value.length);try{return t.execCommand(`copy`)}finally{t.body.removeChild(n),r?.focus?.()}}async function S(e,t=globalThis){let n=t.navigator?.clipboard?.writeText;if(n)try{await n(e);return}catch{if(x(e,t.document))return;throw Error(`Clipboard write failed`)}if(!x(e,t.document))throw Error(`Clipboard API unavailable`)}function C({value:e,label:t=`Copy`,className:n,successMessage:r=`Copied to clipboard`,successDescription:i,tooltipSide:a=`right`,render:o}){let[s,c]=(0,h.useState)(!1),l=(0,h.useRef)(void 0);(0,h.useEffect)(()=>()=>clearTimeout(l.current),[]);let f=(0,h.useCallback)(async t=>{t.stopPropagation();try{await S(e),c(!0),u.success(r,{description:i}),clearTimeout(l.current),l.current=setTimeout(()=>c(!1),1500)}catch{u.error(`Failed to copy`)}},[i,r,e]),_=s?(0,g.jsx)(d,{className:`size-3 text-success`}):(0,g.jsx)(m,{className:`size-3`}),x=o?.({copied:s,icon:_});return(0,g.jsxs)(v,{children:[(0,g.jsx)(y,{className:x?void 0:p(`relative inline-flex size-6 items-center justify-center rounded-[var(--miravo-radius-tight)] text-muted-foreground hover:bg-muted hover:text-foreground before:absolute before:inset-[-10px] before:content-['']`,n),onClick:f,closeOnClick:!1,"aria-label":t,render:x,children:_}),(0,g.jsx)(b,{side:a,children:s?`Copied!`:t})]})}export{y as a,_ as i,v as n,b as r,C as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./rolldown-runtime-COnpUsM8.js";import{c as t}from"./vendor-charts-95ykyDlI.js";import{$ as n,J as r,Q as i,X as a,Y as o,Z as s,et as c,ot as ee,st as l}from"./vendor-ui-D8j69UH4.js";import{C as u,T as d}from"./format-OUFL_tef.js";import{t as f}from"./utils-BO2u-wC_.js";var p=e(t(),1),te=e(l(),1);function m(e){if(!e||typeof document>`u`)return;let t=document.head||document.getElementsByTagName(`head`)[0],n=document.createElement(`style`);n.type=`text/css`,t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}var ne=e=>{switch(e){case`success`:return _;case`info`:return y;case`warning`:return v;case`error`:return b;default:return null}},h=Array(12).fill(0),g=({visible:e,className:t})=>p.createElement(`div`,{className:[`sonner-loading-wrapper`,t].filter(Boolean).join(` `),"data-visible":e},p.createElement(`div`,{className:`sonner-spinner`},h.map((e,t)=>p.createElement(`div`,{className:`sonner-loading-bar`,key:`spinner-bar-${t}`})))),_=p.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},p.createElement(`path`,{fillRule:`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z`,clipRule:`evenodd`})),v=p.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`},p.createElement(`path`,{fillRule:`evenodd`,d:`M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z`,clipRule:`evenodd`})),y=p.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},p.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z`,clipRule:`evenodd`})),b=p.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},p.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z`,clipRule:`evenodd`})),x=p.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`},p.createElement(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),p.createElement(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})),S=()=>{let[e,t]=p.useState(document.hidden);return p.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener(`visibilitychange`,e),()=>window.removeEventListener(`visibilitychange`,e)},[]),e},C=1,w=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{let{message:t,...n}=e,r=typeof e?.id==`number`||e.id?.length>0?e.id:C++,i=this.toasts.find(e=>e.id===r),a=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(r)&&this.dismissedToasts.delete(r),i?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:a,title:t}):n):this.addToast({title:t,...n,dismissible:a,id:r}),r},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:`error`}),this.success=(e,t)=>this.create({...t,type:`success`,message:e}),this.info=(e,t)=>this.create({...t,type:`info`,message:e}),this.warning=(e,t)=>this.create({...t,type:`warning`,message:e}),this.loading=(e,t)=>this.create({...t,type:`loading`,message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=Promise.resolve(e instanceof Function?e():e),i=n!==void 0,a,o=r.then(async e=>{if(a=[`resolve`,e],p.isValidElement(e))i=!1,this.create({id:n,type:`default`,message:e});else if(E(e)&&!e.ok){i=!1;let r=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,a=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description,o=typeof r==`object`&&!p.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(e instanceof Error){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!p.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?await t.success(e):t.success,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!p.isValidElement(r)?r:{message:r};this.create({id:n,type:`success`,description:a,...o})}}).catch(async e=>{if(a=[`reject`,e],t.error!==void 0){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!p.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally==null||t.finally.call(t)}),s=()=>new Promise((e,t)=>o.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=t?.id||C++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},T=(e,t)=>{let n=t?.id||C++;return w.addToast({title:e,...t,id:n}),n},E=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,D=Object.assign(T,{success:w.success,info:w.info,warning:w.warning,error:w.error,custom:w.custom,message:w.message,promise:w.promise,dismiss:w.dismiss,loading:w.loading},{getHistory:()=>w.toasts,getToasts:()=>w.getActiveToasts()});m(`[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}`);function O(e){return e.label!==void 0}var k=3,A=`24px`,j=`16px`,M=4e3,re=356,N=14,P=45,F=200;function I(...e){return e.filter(Boolean).join(` `)}function L(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}var ie=e=>{let{invert:t,toast:n,unstyled:r,interacting:i,setHeights:a,visibleToasts:o,heights:s,index:c,toasts:ee,expanded:l,removeToast:u,defaultRichColors:d,closeButton:f,style:te,cancelButtonStyle:m,actionButtonStyle:h,className:_=``,descriptionClassName:v=``,duration:y,position:b,gap:C,expandByDefault:w,classNames:T,icons:E,closeButtonAriaLabel:D=`Close toast`}=e,[k,A]=p.useState(null),[j,re]=p.useState(null),[N,ie]=p.useState(!1),[R,ae]=p.useState(!1),[z,B]=p.useState(!1),[V,oe]=p.useState(!1),[se,H]=p.useState(!1),[ce,U]=p.useState(0),[le,W]=p.useState(0),G=p.useRef(n.duration||y||M),ue=p.useRef(null),K=p.useRef(null),de=c===0,fe=c+1<=o,q=n.type,J=n.dismissible!==!1,pe=n.className||``,me=n.descriptionClassName||``,Y=p.useMemo(()=>s.findIndex(e=>e.toastId===n.id)||0,[s,n.id]),he=p.useMemo(()=>n.closeButton??f,[n.closeButton,f]),ge=p.useMemo(()=>n.duration||y||M,[n.duration,y]),X=p.useRef(0),Z=p.useRef(0),_e=p.useRef(0),Q=p.useRef(null),[ve,ye]=b.split(`-`),be=p.useMemo(()=>s.reduce((e,t,n)=>n>=Y?e:e+t.height,0),[s,Y]),xe=S(),Se=n.invert||t,Ce=q===`loading`;Z.current=p.useMemo(()=>Y*C+be,[Y,be]),p.useEffect(()=>{G.current=ge},[ge]),p.useEffect(()=>{ie(!0)},[]),p.useEffect(()=>{let e=K.current;if(e){let t=e.getBoundingClientRect().height;return W(t),a(e=>[{toastId:n.id,height:t,position:n.position},...e]),()=>a(e=>e.filter(e=>e.toastId!==n.id))}},[a,n.id]),p.useLayoutEffect(()=>{if(!N)return;let e=K.current,t=e.style.height;e.style.height=`auto`;let r=e.getBoundingClientRect().height;e.style.height=t,W(r),a(e=>e.find(e=>e.toastId===n.id)?e.map(e=>e.toastId===n.id?{...e,height:r}:e):[{toastId:n.id,height:r,position:n.position},...e])},[N,n.title,n.description,a,n.id,n.jsx,n.action,n.cancel]);let $=p.useCallback(()=>{ae(!0),U(Z.current),a(e=>e.filter(e=>e.toastId!==n.id)),setTimeout(()=>{u(n)},F)},[n,u,a,Z]);p.useEffect(()=>{if(n.promise&&q===`loading`||n.duration===1/0||n.type===`loading`)return;let e;return l||i||xe?(()=>{if(_e.current<X.current){let e=new Date().getTime()-X.current;G.current-=e}_e.current=new Date().getTime()})():G.current!==1/0&&(X.current=new Date().getTime(),e=setTimeout(()=>{n.onAutoClose==null||n.onAutoClose.call(n,n),$()},G.current)),()=>clearTimeout(e)},[l,i,n,q,xe,$]),p.useEffect(()=>{n.delete&&($(),n.onDismiss==null||n.onDismiss.call(n,n))},[$,n.delete]);function we(){return E?.loading?p.createElement(`div`,{className:I(T?.loader,n?.classNames?.loader,`sonner-loader`),"data-visible":q===`loading`},E.loading):p.createElement(g,{className:I(T?.loader,n?.classNames?.loader),visible:q===`loading`})}let Te=n.icon||E?.[q]||ne(q);return p.createElement(`li`,{tabIndex:0,ref:K,className:I(_,pe,T?.toast,n?.classNames?.toast,T?.default,T?.[q],n?.classNames?.[q]),"data-sonner-toast":``,"data-rich-colors":n.richColors??d,"data-styled":!(n.jsx||n.unstyled||r),"data-mounted":N,"data-promise":!!n.promise,"data-swiped":se,"data-removed":R,"data-visible":fe,"data-y-position":ve,"data-x-position":ye,"data-index":c,"data-front":de,"data-swiping":z,"data-dismissible":J,"data-type":q,"data-invert":Se,"data-swipe-out":V,"data-swipe-direction":j,"data-expanded":!!(l||w&&N),"data-testid":n.testId,style:{"--index":c,"--toasts-before":c,"--z-index":ee.length-c,"--offset":`${R?ce:Z.current}px`,"--initial-height":w?`auto`:`${le}px`,...te,...n.style},onDragEnd:()=>{B(!1),A(null),Q.current=null},onPointerDown:e=>{e.button!==2&&(Ce||!J||(ue.current=new Date,U(Z.current),e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(B(!0),Q.current={x:e.clientX,y:e.clientY})))},onPointerUp:()=>{if(V||!J)return;Q.current=null;let e=Number(K.current?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),t=Number(K.current?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),r=new Date().getTime()-ue.current?.getTime(),i=k===`x`?e:t,a=Math.abs(i)/r;if(Math.abs(i)>=P||a>.11){U(Z.current),n.onDismiss==null||n.onDismiss.call(n,n),re(k===`x`?e>0?`right`:`left`:t>0?`down`:`up`),$(),oe(!0);return}else{var o,s;(o=K.current)==null||o.style.setProperty(`--swipe-amount-x`,`0px`),(s=K.current)==null||s.style.setProperty(`--swipe-amount-y`,`0px`)}H(!1),B(!1),A(null)},onPointerMove:t=>{var n,r;if(!Q.current||!J||window.getSelection()?.toString().length>0)return;let i=t.clientY-Q.current.y,a=t.clientX-Q.current.x,o=e.swipeDirections??L(b);!k&&(Math.abs(a)>1||Math.abs(i)>1)&&A(Math.abs(a)>Math.abs(i)?`x`:`y`);let s={x:0,y:0},c=e=>1/(1.5+Math.abs(e)/20);if(k===`y`){if(o.includes(`top`)||o.includes(`bottom`))if(o.includes(`top`)&&i<0||o.includes(`bottom`)&&i>0)s.y=i;else{let e=i*c(i);s.y=Math.abs(e)<Math.abs(i)?e:i}}else if(k===`x`&&(o.includes(`left`)||o.includes(`right`)))if(o.includes(`left`)&&a<0||o.includes(`right`)&&a>0)s.x=a;else{let e=a*c(a);s.x=Math.abs(e)<Math.abs(a)?e:a}(Math.abs(s.x)>0||Math.abs(s.y)>0)&&H(!0),(n=K.current)==null||n.style.setProperty(`--swipe-amount-x`,`${s.x}px`),(r=K.current)==null||r.style.setProperty(`--swipe-amount-y`,`${s.y}px`)}},he&&!n.jsx&&q!==`loading`?p.createElement(`button`,{"aria-label":D,"data-disabled":Ce,"data-close-button":!0,onClick:Ce||!J?()=>{}:()=>{$(),n.onDismiss==null||n.onDismiss.call(n,n)},className:I(T?.closeButton,n?.classNames?.closeButton)},E?.close??x):null,(q||n.icon||n.promise)&&n.icon!==null&&(E?.[q]!==null||n.icon)?p.createElement(`div`,{"data-icon":``,className:I(T?.icon,n?.classNames?.icon)},n.promise||n.type===`loading`&&!n.icon?n.icon||we():null,n.type===`loading`?null:Te):null,p.createElement(`div`,{"data-content":``,className:I(T?.content,n?.classNames?.content)},p.createElement(`div`,{"data-title":``,className:I(T?.title,n?.classNames?.title)},n.jsx?n.jsx:typeof n.title==`function`?n.title():n.title),n.description?p.createElement(`div`,{"data-description":``,className:I(v,me,T?.description,n?.classNames?.description)},typeof n.description==`function`?n.description():n.description):null),p.isValidElement(n.cancel)?n.cancel:n.cancel&&O(n.cancel)?p.createElement(`button`,{"data-button":!0,"data-cancel":!0,style:n.cancelButtonStyle||m,onClick:e=>{O(n.cancel)&&J&&(n.cancel.onClick==null||n.cancel.onClick.call(n.cancel,e),$())},className:I(T?.cancelButton,n?.classNames?.cancelButton)},n.cancel.label):null,p.isValidElement(n.action)?n.action:n.action&&O(n.action)?p.createElement(`button`,{"data-button":!0,"data-action":!0,style:n.actionButtonStyle||h,onClick:e=>{O(n.action)&&(n.action.onClick==null||n.action.onClick.call(n.action,e),!e.defaultPrevented&&$())},className:I(T?.actionButton,n?.classNames?.actionButton)},n.action.label):null)};function R(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?window.getComputedStyle(document.documentElement).direction:e}function ae(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?j:A;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{e[t]===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof e[t]==`number`?`${e[t]}px`:e[t]}):o(a)}),n}var z=p.forwardRef(function(e,t){let{id:n,invert:r,position:i=`bottom-right`,hotkey:a=[`altKey`,`KeyT`],expand:o,closeButton:s,className:c,offset:ee,mobileOffset:l,theme:u=`light`,richColors:d,duration:f,style:m,visibleToasts:ne=k,toastOptions:h,dir:g=R(),gap:_=N,icons:v,containerAriaLabel:y=`Notifications`}=e,[b,x]=p.useState([]),S=p.useMemo(()=>n?b.filter(e=>e.toasterId===n):b.filter(e=>!e.toasterId),[b,n]),C=p.useMemo(()=>Array.from(new Set([i].concat(S.filter(e=>e.position).map(e=>e.position)))),[S,i]),[T,E]=p.useState([]),[D,O]=p.useState(!1),[A,j]=p.useState(!1),[M,P]=p.useState(u===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:u),F=p.useRef(null),I=a.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),L=p.useRef(null),z=p.useRef(!1),B=p.useCallback(e=>{x(t=>(t.find(t=>t.id===e.id)?.delete||w.dismiss(e.id),t.filter(({id:t})=>t!==e.id)))},[]);return p.useEffect(()=>w.subscribe(e=>{if(e.dismiss){requestAnimationFrame(()=>{x(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))});return}setTimeout(()=>{te.flushSync(()=>{x(t=>{let n=t.findIndex(t=>t.id===e.id);return n===-1?[e,...t]:[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]})})})}),[b]),p.useEffect(()=>{if(u!==`system`){P(u);return}if(u===`system`&&(window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?P(`dark`):P(`light`)),typeof window>`u`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`);try{e.addEventListener(`change`,({matches:e})=>{P(e?`dark`:`light`)})}catch{e.addListener(({matches:e})=>{try{P(e?`dark`:`light`)}catch(e){console.error(e)}})}},[u]),p.useEffect(()=>{b.length<=1&&O(!1)},[b]),p.useEffect(()=>{let e=e=>{if(a.every(t=>e[t]||e.code===t)){var t;O(!0),(t=F.current)==null||t.focus()}e.code===`Escape`&&(document.activeElement===F.current||F.current?.contains(document.activeElement))&&O(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[a]),p.useEffect(()=>{if(F.current)return()=>{L.current&&(L.current.focus({preventScroll:!0}),L.current=null,z.current=!1)}},[F.current]),p.createElement(`section`,{ref:t,"aria-label":`${y} ${I}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`,suppressHydrationWarning:!0},C.map((t,n)=>{let[i,a]=t.split(`-`);return S.length?p.createElement(`ol`,{key:t,dir:g===`auto`?R():g,tabIndex:-1,ref:F,className:c,"data-sonner-toaster":!0,"data-sonner-theme":M,"data-y-position":i,"data-x-position":a,style:{"--front-toast-height":`${T[0]?.height||0}px`,"--width":`${re}px`,"--gap":`${_}px`,...m,...ae(ee,l)},onBlur:e=>{z.current&&!e.currentTarget.contains(e.relatedTarget)&&(z.current=!1,L.current&&=(L.current.focus({preventScroll:!0}),null))},onFocus:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||z.current||(z.current=!0,L.current=e.relatedTarget)},onMouseEnter:()=>O(!0),onMouseMove:()=>O(!0),onMouseLeave:()=>{A||O(!1)},onDragEnd:()=>O(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||j(!0)},onPointerUp:()=>j(!1)},S.filter(e=>!e.position&&n===0||e.position===t).map((n,i)=>p.createElement(ie,{key:n.id,icons:v,index:i,toast:n,defaultRichColors:d,duration:h?.duration??f,className:h?.className,descriptionClassName:h?.descriptionClassName,invert:r,visibleToasts:ne,closeButton:h?.closeButton??s,interacting:A,position:t,style:h?.style,unstyled:h?.unstyled,classNames:h?.classNames,cancelButtonStyle:h?.cancelButtonStyle,actionButtonStyle:h?.actionButtonStyle,closeButtonAriaLabel:h?.closeButtonAriaLabel,removeToast:B,toasts:S.filter(e=>e.position==n.position),heights:T.filter(e=>e.position==n.position),setHeights:E,expandByDefault:o,gap:_,expanded:D,swipeDirections:e.swipeDirections}))):null}))}),B=ee();function V({...e}){return(0,B.jsx)(o,{"data-slot":`dialog`,...e})}function oe({...e}){return(0,B.jsx)(a,{"data-slot":`dialog-portal`,...e})}function se({className:e,...t}){return(0,B.jsx)(c,{"data-slot":`dialog-overlay`,className:f(`fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,e),...t})}function H({className:e,children:t,showCloseButton:r=!0,...i}){return(0,B.jsxs)(oe,{children:[(0,B.jsx)(se,{}),(0,B.jsxs)(s,{"data-slot":`dialog-content`,className:f(`fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-[var(--miravo-radius-stadium-sm)] bg-background p-4 text-sm ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...i,children:[t,r&&(0,B.jsxs)(n,{"data-slot":`dialog-close`,render:(0,B.jsx)(u,{variant:`ghost`,className:`absolute top-2 right-2`,size:`icon-sm`}),children:[(0,B.jsx)(d,{}),(0,B.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function ce({className:e,...t}){return(0,B.jsx)(`div`,{"data-slot":`dialog-header`,className:f(`flex flex-col gap-2`,e),...t})}function U({className:e,showCloseButton:t=!1,children:r,...i}){return(0,B.jsxs)(`div`,{"data-slot":`dialog-footer`,className:f(`-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-[var(--miravo-radius-stadium-sm)] border-t p-4 sm:flex-row sm:justify-end`,e),...i,children:[r,t&&(0,B.jsx)(n,{render:(0,B.jsx)(u,{variant:`outline`}),children:`Close`})]})}function le({className:e,...t}){return(0,B.jsx)(r,{"data-slot":`dialog-title`,className:f(`text-base leading-none font-medium`,e),...t})}function W({className:e,...t}){return(0,B.jsx)(i,{"data-slot":`dialog-description`,className:f(`text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground`,e),...t})}export{ce as a,D as c,U as i,H as n,le as o,W as r,z as s,V as t};
|