@miravo/cli-linux-x64 0.10.0 → 0.11.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.
Files changed (140) hide show
  1. package/console-dist/assets/{AnimatePresence-BZCmb1bq.js → AnimatePresence-BSSlw02V.js} +3 -3
  2. package/console-dist/assets/{activity-Cn48I9qe.js → activity-Cy_niK56.js} +1 -1
  3. package/console-dist/assets/{api-kPM52mb-.js → api-B2QJEzbS.js} +1 -1
  4. package/console-dist/assets/api-Vq4lny_H.js +1 -0
  5. package/console-dist/assets/arrow-up-right-CwPw_2U1.js +1 -0
  6. package/console-dist/assets/asset-detail-E-TllNHT.js +1 -0
  7. package/console-dist/assets/asset-detail-actions-jjbvaDES.js +1 -0
  8. package/console-dist/assets/asset-panel-DDziFlFl.js +1 -0
  9. package/console-dist/assets/{auth-screen-backdrop-hcEYy3K4.js → auth-screen-backdrop-CEykEbfF.js} +1 -1
  10. package/console-dist/assets/backup-power-BDMAO2bO.js +1 -0
  11. package/console-dist/assets/badge-Bk1DaL6C.js +1 -0
  12. package/console-dist/assets/boiler-CWAR1Nq2.js +1 -0
  13. package/console-dist/assets/by-path-VBqTBdlG.js +1 -0
  14. package/console-dist/assets/catalog-BlkPPAWE.js +1 -0
  15. package/console-dist/assets/catalog-CQopEu5C.js +1 -0
  16. package/console-dist/assets/{catalog-source-2aT9qob-.js → catalog-source-B4L5N-a1.js} +1 -1
  17. package/console-dist/assets/catalog-template-icons-BOSywIKV.js +1 -0
  18. package/console-dist/assets/check-B-yvIfMj.js +1 -0
  19. package/console-dist/assets/checkbox-DEAkDfFr.js +1 -0
  20. package/console-dist/assets/chevron-down-x70Pto6j.js +1 -0
  21. package/console-dist/assets/chevron-left-XHFooLn1.js +1 -0
  22. package/console-dist/assets/chevron-right-CMSQPSEo.js +1 -0
  23. package/console-dist/assets/chiller-BSx8eUMN.js +1 -0
  24. package/console-dist/assets/{circle-x-CGcRflg7.js → circle-x-_o0nl0Rg.js} +1 -1
  25. package/console-dist/assets/combobox-B8h0-NHs.js +1 -0
  26. package/console-dist/assets/commercial-building-CNvi6IZK.js +1 -0
  27. package/console-dist/assets/compressor-D63w6Ir2.js +1 -0
  28. package/console-dist/assets/console-panel-CMDoBJiO.js +1 -0
  29. package/console-dist/assets/control-CBviLxJB.js +1 -0
  30. package/console-dist/assets/control-jNqzZWa9.js +1 -0
  31. package/console-dist/assets/copy-button-CSUP1VjU.js +1 -0
  32. package/console-dist/assets/{dialog-Di9Bs0FH.js → dialog-B5PqrKVw.js} +1 -1
  33. package/console-dist/assets/district-heating-Cr4CrgCA.js +1 -0
  34. package/console-dist/assets/dom-Cm_OH5jc.js +1 -0
  35. package/console-dist/assets/{download-B9e1wNK4.js → download-i8CTJ7oi.js} +1 -1
  36. package/console-dist/assets/{local-flag-CPAqDO-L.js → dropdown-menu-B_MMNbTy.js} +1 -1
  37. package/console-dist/assets/events-D531_1EZ.js +1 -0
  38. package/console-dist/assets/events-RmbRTKFV.js +1 -0
  39. package/console-dist/assets/events-format-C5HTkIsC.js +1 -0
  40. package/console-dist/assets/export-tab-fZDO4r2u.js +1 -0
  41. package/console-dist/assets/factory-C2OucdpQ.js +1 -0
  42. package/console-dist/assets/factory-CgSIjU5V.js +1 -0
  43. package/console-dist/assets/factory-DLE12zAd.js +1 -0
  44. package/console-dist/assets/floor-page-D0mX5OuA.js +1 -0
  45. package/console-dist/assets/floor-page-E-0txA4z.css +1 -0
  46. package/console-dist/assets/format-Bx7DF-TB.js +1 -0
  47. package/console-dist/assets/genset-BRgqR1AT.js +1 -0
  48. package/console-dist/assets/{get-error-message-eGdenTLv.js → get-error-message-dM0BMfdP.js} +1 -1
  49. package/console-dist/assets/index-CrLa65Ur.css +2 -0
  50. package/console-dist/assets/index-CvuwOe37.js +12 -0
  51. package/console-dist/assets/{integration-api-Bg7D1eQc.js → integration-api-D2tA69Yb.js} +1 -1
  52. package/console-dist/assets/integrations-BLG4PT3c.js +1 -0
  53. package/console-dist/assets/integrations-iAjWxaDS.js +1 -0
  54. package/console-dist/assets/{label-DWyy9MeT.js → label-2sIXTEUK.js} +1 -1
  55. package/console-dist/assets/loader-circle-DjgHgHHl.js +1 -0
  56. package/console-dist/assets/{login-BZKYK0yZ.js → login-DpNKicxy.js} +1 -1
  57. package/console-dist/assets/minus-CaT9UaQx.js +1 -0
  58. package/console-dist/assets/model-schemas-3w38IPdc.js +1 -0
  59. package/console-dist/assets/models-CMN9Eppf.js +1 -0
  60. package/console-dist/assets/models-I_V8J5Y0.js +1 -0
  61. package/console-dist/assets/not-found-C4YVKP97.js +1 -0
  62. package/console-dist/assets/pause-CqW7v5Dc.js +1 -0
  63. package/console-dist/assets/pharma-cleanroom-ClJRwROz.js +1 -0
  64. package/console-dist/assets/play-kg50os4l.js +1 -0
  65. package/console-dist/assets/plus-Cl4Ay5Ry.js +1 -0
  66. package/console-dist/assets/protocol-card-ARSwIjkN.js +1 -0
  67. package/console-dist/assets/proxy-CWZabK8f.js +1 -0
  68. package/console-dist/assets/query-fetch-error-CWLZA2L5.js +1 -0
  69. package/console-dist/assets/{radio-DRkzblxj.js → radio-BxpVYiyS.js} +1 -1
  70. package/console-dist/assets/registry-Dau_GjK6.js +2 -0
  71. package/console-dist/assets/{rocket-807Pf7C1.js → rocket-KZ5oHK1G.js} +1 -1
  72. package/console-dist/assets/rtu-D-1lltcO.js +1 -0
  73. package/console-dist/assets/select-BWlrSYlA.js +1 -0
  74. package/console-dist/assets/{select-display-items-D-L3PesO.js → select-display-items-DN2G8DNG.js} +1 -1
  75. package/console-dist/assets/{server-CS2Tw__K.js → server-BVem_egD.js} +1 -1
  76. package/console-dist/assets/sliders-horizontal-BNKmYQgd.js +1 -0
  77. package/console-dist/assets/smart-factory-cem4tLAv.js +1 -0
  78. package/console-dist/assets/{source-host-miravo-D_AecPVc.js → source-host-miravo-B8eM2IHw.js} +1 -1
  79. package/console-dist/assets/stages-hidkaJPI.js +1 -0
  80. package/console-dist/assets/status-CZFZLqVk.js +1 -0
  81. package/console-dist/assets/tabs-BbQkzBZZ.js +1 -0
  82. package/console-dist/assets/tags-BBz30-eV.js +4 -0
  83. package/console-dist/assets/tags-K96jT8PY.js +1 -0
  84. package/console-dist/assets/tank-THHXGdzg.js +1 -0
  85. package/console-dist/assets/tooltip-B3vOB1Vu.js +1 -0
  86. package/console-dist/assets/{transition-nav-link-cn4KZD6W.js → transition-nav-link-B11-gXld.js} +1 -1
  87. package/console-dist/assets/{trash-2-BJ-1df0F.js → trash-2-BH9HDsZv.js} +1 -1
  88. package/console-dist/assets/{triangle-alert-D1AraFcP.js → triangle-alert-DoAwrRgk.js} +1 -1
  89. package/console-dist/assets/use-engine-command-mutation-CHqjOqfS.js +1 -0
  90. package/console-dist/assets/use-transition-navigate-B-nk4aWh.js +2 -0
  91. package/console-dist/assets/useQuery-M9KTdi7Q.js +1 -0
  92. package/console-dist/assets/validation-BkfmaBBi.js +1 -0
  93. package/console-dist/assets/water-treatment-CfVR0p0L.js +1 -0
  94. package/console-dist/index.html +68 -54
  95. package/miravo +2 -2
  96. package/package.json +1 -1
  97. package/console-dist/assets/api-DybIIqOe.js +0 -1
  98. package/console-dist/assets/asset-detail-tmOrYE8x.js +0 -1
  99. package/console-dist/assets/badge-D4jktT8T.js +0 -1
  100. package/console-dist/assets/catalog-DN-klsod.js +0 -1
  101. package/console-dist/assets/catalog-M-k7Y9Sp.js +0 -1
  102. package/console-dist/assets/catalog-template-icons-C7KJdJJX.js +0 -1
  103. package/console-dist/assets/checkbox-AaJhjtZk.js +0 -1
  104. package/console-dist/assets/chevron-down-CAk5w9Wt.js +0 -1
  105. package/console-dist/assets/chevron-right-BfZjrUWh.js +0 -1
  106. package/console-dist/assets/combobox-BFEY6lgO.js +0 -1
  107. package/console-dist/assets/control-CD9UoTvu.js +0 -1
  108. package/console-dist/assets/control-DHa2-a2v.js +0 -1
  109. package/console-dist/assets/copy-button-DHm7RGJ5.js +0 -1
  110. package/console-dist/assets/events-D19CzgoQ.js +0 -1
  111. package/console-dist/assets/events-DmftG8n5.js +0 -1
  112. package/console-dist/assets/export-tab-ouFgYEU_.js +0 -1
  113. package/console-dist/assets/factory-CT2VYi0n.js +0 -1
  114. package/console-dist/assets/factory-DSrBtcG2.js +0 -1
  115. package/console-dist/assets/format-OUFL_tef.js +0 -1
  116. package/console-dist/assets/index-DuJJSpJp.js +0 -12
  117. package/console-dist/assets/index-iEV9hU2I.css +0 -2
  118. package/console-dist/assets/integrations-DWW9HjH0.js +0 -1
  119. package/console-dist/assets/integrations-DoXNrzD5.js +0 -1
  120. package/console-dist/assets/models-CrDBHBV5.js +0 -1
  121. package/console-dist/assets/models-jBVcY8Xd.js +0 -1
  122. package/console-dist/assets/not-found-BqVny4Md.js +0 -1
  123. package/console-dist/assets/play-TTg_EXSa.js +0 -1
  124. package/console-dist/assets/plus-BbVbvFTe.js +0 -1
  125. package/console-dist/assets/protocol-card-B2SpAJKe.js +0 -1
  126. package/console-dist/assets/query-fetch-error-C2Ec4RQS.js +0 -1
  127. package/console-dist/assets/select-Bg6PPro0.js +0 -1
  128. package/console-dist/assets/tabs-bI9sskHy.js +0 -1
  129. package/console-dist/assets/tags-B7e7VYVW.js +0 -1
  130. package/console-dist/assets/tags-DJJKQRZZ.js +0 -4
  131. package/console-dist/assets/use-engine-command-mutation-DMkQxmt9.js +0 -1
  132. package/console-dist/assets/use-transition-navigate-BiV2QCcA.js +0 -2
  133. package/console-dist/assets/validation-q38DYDwu.js +0 -1
  134. /package/console-dist/assets/{chunk-OE4NN4TA-Q4iNR9l9.js → chunk-OE4NN4TA-DBWZidbW.js} +0 -0
  135. /package/console-dist/assets/{dist-CtuJWBnP.js → dist-xY0pK9Wy.js} +0 -0
  136. /package/console-dist/assets/{integration-targets-BehiqWyT.js → integration-targets-Byvdd3Or.js} +0 -0
  137. /package/console-dist/assets/{runtime-link-ChF8TM68.js → runtime-link-vBANRqcD.js} +0 -0
  138. /package/console-dist/assets/{transition-types-049V0Kr0.js → transition-types-BKZuWApE.js} +0 -0
  139. /package/console-dist/assets/{utils-BO2u-wC_.js → utils-XFKvwlFT.js} +0 -0
  140. /package/console-dist/assets/{vendor-table-Br-cHaxY.js → vendor-table-B0Z9e_sn.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{ot as a}from"./vendor-ui-D8j69UH4.js";var o=a(),s=e(i(),1),c=(0,s.createContext)({});function l(e){let t=(0,s.useRef)(null);return t.current===null&&(t.current=e()),t.current}var u=typeof window<`u`?s.useLayoutEffect:s.useEffect,d=(0,s.createContext)(null);function f(e,t){e.indexOf(t)===-1&&e.push(t)}function p(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var m=(e,t,n)=>n>t?t:n<e?e:n,h={},g=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function _(e){return typeof e==`object`&&!!e}var v=e=>/^0[^.\s]+$/u.test(e);function y(e){let t;return()=>(t===void 0&&(t=e()),t)}var b=e=>e,x=(e,t)=>n=>t(e(n)),S=(...e)=>e.reduce(x),C=(e,t,n)=>{let r=t-e;return r===0?1:(n-e)/r},w=class{constructor(){this.subscriptions=[]}add(e){return f(this.subscriptions,e),()=>p(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}},T=e=>e*1e3,E=e=>e/1e3;function D(e,t){return t?1e3/t*e:0}var ee=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,te=1e-7,ne=12;function re(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=ee(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>te&&++s<ne);return o}function ie(e,t,n,r){if(e===t&&n===r)return b;let i=t=>re(t,0,1,e,n);return e=>e===0||e===1?e:ee(i(e),t,r)}var ae=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,oe=e=>t=>1-e(1-t),se=ie(.33,1.53,.69,.99),ce=oe(se),le=ae(ce),ue=e=>e>=1?1:(e*=2)<1?.5*ce(e):.5*(2-2**(-10*(e-1))),de=e=>1-Math.sin(Math.acos(e)),fe=oe(de),pe=ae(de),me=ie(.42,0,1,1),he=ie(0,0,.58,1),ge=ie(.42,0,.58,1),_e=e=>Array.isArray(e)&&typeof e[0]!=`number`,ve=e=>Array.isArray(e)&&typeof e[0]==`number`,ye={linear:b,easeIn:me,easeInOut:ge,easeOut:he,circIn:de,circInOut:pe,circOut:fe,backIn:ce,backInOut:le,backOut:se,anticipate:ue},be=e=>typeof e==`string`,xe=e=>{if(ve(e)){e.length;let[t,n,r,i]=e;return ie(t,n,r,i)}else if(be(e))return ye[e],`${e}`,ye[e];return e},Se=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`],O={value:null,addProjectionMetrics:null};function Ce(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&&O.value&&O.value.frameloop[t].push(c),c=0,n.clear(),i=!1,a&&(a=!1,u.process(e))}};return u}var we=40;function Te(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=Se.reduce((e,n)=>(e[n]=Ce(a,t?n:void 0),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,g=()=>{let a=h.useManualTiming,o=a?i.timestamp:performance.now();n=!1,a||(i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,we),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(g))},_=()=>{n=!0,r=!0,i.isProcessing||e(g)};return{schedule:Se.reduce((e,t)=>{let r=o[t];return e[t]=(e,t=!1,i=!1)=>(n||_(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<Se.length;t++)o[Se[t]].cancel(e)},state:i,steps:o}}var{schedule:k,cancel:A,state:j,steps:Ee}=Te(typeof requestAnimationFrame<`u`?requestAnimationFrame:b,!0),De;function Oe(){De=void 0}var M={now:()=>(De===void 0&&M.set(j.isProcessing||h.useManualTiming?j.timestamp:performance.now()),De),set:e=>{De=e,queueMicrotask(Oe)}},N={layout:0,mainThread:0,waapi:0},ke=e=>t=>typeof t==`string`&&t.startsWith(e),Ae=ke(`--`),je=ke(`var(--`),Me=e=>je(e)?Ne.test(e.split(`/*`)[0].trim()):!1,Ne=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Pe(e){return typeof e==`string`?e.split(`/*`)[0].includes(`var(--`):!1}var Fe={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},Ie={...Fe,transform:e=>m(0,1,e)},Le={...Fe,default:1},Re=e=>Math.round(e*1e5)/1e5,ze=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Be(e){return e==null}var Ve=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,He=(e,t)=>n=>!!(typeof n==`string`&&Ve.test(n)&&n.startsWith(e)||t&&!Be(n)&&Object.prototype.hasOwnProperty.call(n,t)),Ue=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(ze);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},We=e=>m(0,255,e),Ge={...Fe,transform:e=>Math.round(We(e))},P={test:He(`rgb`,`red`),parse:Ue(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+Ge.transform(e)+`, `+Ge.transform(t)+`, `+Ge.transform(n)+`, `+Re(Ie.transform(r))+`)`};function Ke(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 qe={test:He(`#`),parse:Ke,transform:P.transform},Je=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),F=Je(`deg`),I=Je(`%`),L=Je(`px`),Ye=Je(`vh`),Xe=Je(`vw`),Ze={...I,parse:e=>I.parse(e)/100,transform:e=>I.transform(e*100)},Qe={test:He(`hsl`,`hue`),parse:Ue(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+I.transform(Re(t))+`, `+I.transform(Re(n))+`, `+Re(Ie.transform(r))+`)`},R={test:e=>P.test(e)||qe.test(e)||Qe.test(e),parse:e=>P.test(e)?P.parse(e):Qe.test(e)?Qe.parse(e):qe.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?P.transform(e):Qe.transform(e),getAnimatableNone:e=>{let t=R.parse(e);return t.alpha=0,R.transform(t)}},$e=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function et(e){return isNaN(e)&&typeof e==`string`&&(e.match(ze)?.length||0)+(e.match($e)?.length||0)>0}var tt=`number`,nt=`color`,rt=`var`,it=`var(`,at="${}",ot=/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 st(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(ot,e=>(R.test(e)?(r.color.push(a),i.push(nt),n.push(R.parse(e))):e.startsWith(it)?(r.var.push(a),i.push(rt),n.push(e)):(r.number.push(a),i.push(tt),n.push(parseFloat(e))),++a,at)).split(at),indexes:r,types:i}}function ct(e){return st(e).values}function lt({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===tt?i+=Re(r[a]):e===nt?i+=R.transform(r[a]):i+=r[a]}return i}}function ut(e){return lt(st(e))}var dt=e=>typeof e==`number`?0:R.test(e)?R.getAnimatableNone(e):e,ft=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:dt(e);function pt(e){let t=st(e);return lt(t)(t.values.map((e,n)=>ft(e,t.split[n])))}var z={test:et,parse:ct,createTransformer:ut,getAnimatableNone:pt};function mt(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 ht({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=mt(s,r,e+1/3),a=mt(s,r,e),o=mt(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function gt(e,t){return n=>n>0?t:e}var B=(e,t,n)=>e+(t-e)*n,_t=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},vt=[qe,P,Qe],yt=e=>vt.find(t=>t.test(e));function bt(e){let t=yt(e);if(`${e}`,!t)return!1;let n=t.parse(e);return t===Qe&&(n=ht(n)),n}var xt=(e,t)=>{let n=bt(e),r=bt(t);if(!n||!r)return gt(e,t);let i={...n};return e=>(i.red=_t(n.red,r.red,e),i.green=_t(n.green,r.green,e),i.blue=_t(n.blue,r.blue,e),i.alpha=B(n.alpha,r.alpha,e),P.transform(i))},St=new Set([`none`,`hidden`]);function Ct(e,t){return St.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function wt(e,t){return n=>B(e,t,n)}function Tt(e){return typeof e==`number`?wt:typeof e==`string`?Me(e)?gt:R.test(e)?xt:kt:Array.isArray(e)?Et:typeof e==`object`?R.test(e)?xt:Dt:gt}function Et(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>Tt(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function Dt(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Tt(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function Ot(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 kt=(e,t)=>{let n=z.createTransformer(t),r=st(e),i=st(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?St.has(e)&&!i.values.length||St.has(t)&&!r.values.length?Ct(e,t):S(Et(Ot(r,i),i.values),n):(`${e}${t}`,gt(e,t))};function At(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?B(e,t,n):Tt(e)(e,t)}var jt=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>k.update(t,e),stop:()=>A(t),now:()=>j.isProcessing?j.timestamp:M.now()}},Mt=(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)})`},Nt=2e4;function Pt(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 Ft(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(Pt(r),Nt);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:E(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 It(e,t){return e*Math.sqrt(1-t*t)}var Lt=12;function Rt(e,t,n){let r=n;for(let n=1;n<Lt;n++)r-=e(r)/t(r);return r}var zt=.001;function Bt({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=m(V.minDamping,V.maxDamping,o),e=m(V.minDuration,V.maxDuration,E(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=It(t,o),c=Math.exp(-i);return zt-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=It(t**2,o);return(-i(t)+zt>0?-1:1)*((a-s)*c)/l}):(i=t=>{let r=Math.exp(-t*e),i=(t-n)*e+1;return-zt+r*i},a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=Rt(i,a,s);if(e=T(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 Vt=[`duration`,`bounce`],Ht=[`stiffness`,`damping`,`mass`];function Ut(e,t){return t.some(t=>e[t]!==void 0)}function Wt(e){let t={velocity:V.velocity,stiffness:V.stiffness,damping:V.damping,mass:V.mass,isResolvedFromDuration:!1,...e};if(!Ut(e,Ht)&&Ut(e,Vt))if(t.velocity=0,e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*m(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:V.mass,stiffness:i,damping:a}}else{let n=Bt({...e,velocity:0});t={...t,...n,mass:V.mass},t.isResolvedFromDuration=!0}return t}function Gt(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}=Wt({...n,velocity:-E(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=E(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=It(_,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 D={calculatedDuration:p&&d||null,velocity:e=>T(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=T(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=T(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(Pt(D),Nt),t=Mt(t=>D.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return D}Gt.applyToOptions=e=>{let t=Ft(e,100,Gt);return e.ease=t.ease,e.duration=T(t.duration),e.type=`keyframes`,e};var Kt=5;function qt(e,t,n){let r=Math.max(t-Kt,0);return D(n-e(r),t-r)}function Jt({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=Gt({keyframes:[f.value,m(f.value)],velocity:qt(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 Yt(e,t,n){let r=[],i=n||h.mix||At,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=S(Array.isArray(t)?t[n]||b:t,a)),r.push(a)}return r}function Xt(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=Yt(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=C(e[r],e[r+1],n);return s[r](i)};return n?t=>l(m(e[0],e[a-1],t)):l}function Zt(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=C(0,t,r);e.push(B(n,1,i))}}function Qt(e){let t=[0];return Zt(t,e.length-1),t}function $t(e,t){return e.map(e=>e*t)}function en(e,t){return e.map(()=>t||ge).splice(0,e.length-1)}function tn({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=_e(r)?r.map(xe):xe(r),a={done:!1,value:t[0]},o=Xt($t(n&&n.length===t.length?n:Qt(t),e),t,{ease:Array.isArray(i)?i:en(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var nn=e=>e!==null;function rn(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(nn),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var an={decay:Jt,inertia:Jt,tween:tn,keyframes:tn,spring:Gt};function on(e){typeof e.type==`string`&&(e.type=an[e.type])}var sn=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)}},cn=e=>e/100,ln=class extends sn{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!==M.now()&&this.tick(M.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},N.mainThread++,this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;on(e);let{type:t=tn,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||tn;s!==tn&&typeof o[0]!=`number`&&(this.mixKeyframes=S(cn,At(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=Pt(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:h,finalKeyframe:g}=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 _=this.currentTime-c*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?_<0:_>r;this.currentTime=Math.max(_,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=m(0,1,n)*o}let x;v?(this.delayState.value=l[0],x=this.delayState):x=b.next(y),i&&!v&&(x.value=i(x.value));let{done:S}=x;!v&&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!==Jt&&(x.value=rn(l,this.options,g,this.speed)),h&&h(x.value),C&&this.finish(),x}then(e,t){return this.finished.then(e,t)}get duration(){return E(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+E(e)}get time(){return E(this.currentTime)}set time(e){e=T(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 qt(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(M.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=E(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=jt,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(M.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,N.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 un(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var dn=e=>e*180/Math.PI,fn=e=>mn(dn(Math.atan2(e[1],e[0]))),pn={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:fn,rotateZ:fn,skewX:e=>dn(Math.atan(e[1])),skewY:e=>dn(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},mn=e=>(e%=360,e<0&&(e+=360),e),hn=fn,gn=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),_n=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),vn={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:gn,scaleY:_n,scale:e=>(gn(e)+_n(e))/2,rotateX:e=>mn(dn(Math.atan2(e[6],e[5]))),rotateY:e=>mn(dn(Math.atan2(-e[2],e[0]))),rotateZ:hn,rotate:hn,skewX:e=>dn(Math.atan(e[4])),skewY:e=>dn(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function yn(e){return+!!e.includes(`scale`)}function bn(e,t){if(!e||e===`none`)return yn(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=vn,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=pn,i=t}if(!i)return yn(t);let a=r[t],o=i[1].split(`,`).map(Sn);return typeof a==`function`?a(o):o[a]}var xn=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return bn(n,t)};function Sn(e){return parseFloat(e.trim())}var Cn=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],wn=new Set(Cn),Tn=e=>e===Fe||e===L,En=new Set([`x`,`y`,`z`]),Dn=Cn.filter(e=>!En.has(e));function On(e){let t=[];return Dn.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(+!!n.startsWith(`scale`)))}),t}var H={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})=>bn(t,`x`),y:(e,{transform:t})=>bn(t,`y`)};H.translateX=H.x,H.translateY=H.y;var U=new Set,kn=!1,An=!1,jn=!1;function Mn(){if(An){let e=Array.from(U).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=On(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)})}An=!1,kn=!1,U.forEach(e=>e.complete(jn)),U.clear()}function Nn(){U.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(An=!0)})}function Pn(){jn=!0,Nn(),Mn(),jn=!1}var Fn=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?(U.add(this),kn||(kn=!0,k.read(Nn),k.resolveKeyframes(Mn))):(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])}un(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),U.delete(this)}cancel(){this.state===`scheduled`&&(U.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},In=e=>e.startsWith(`--`);function Ln(e,t,n){In(t)?e.style.setProperty(t,n):e.style[t]=n}var Rn={};function zn(e,t){let n=y(e);return()=>Rn[t]??n()}var Bn=zn(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),Vn=zn(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),Hn=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Un={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:Hn([0,.65,.55,1]),circOut:Hn([.55,0,1,.45]),backIn:Hn([.31,.01,.66,-.59]),backOut:Hn([.33,1.53,.69,.99])};function Wn(e,t){if(e)return typeof e==`function`?Vn()?Mt(e,t):`ease-out`:ve(e)?Hn(e):Array.isArray(e)?e.map(e=>Wn(e,t)||Un.easeOut):Un[e]}function Gn(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=Wn(s,i);Array.isArray(d)&&(u.easing=d),O.value&&N.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 O.value&&p.finished.finally(()=>{N.waapi--}),p}function Kn(e){return typeof e==`function`&&`applyToOptions`in e}function qn({type:e,...t}){return Kn(e)&&Vn()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var Jn=class extends sn{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=qn(e);this.animation=Gn(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=rn(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),Ln(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 E(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+E(e)}get time(){return E(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=T(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&&Bn()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),b):r(this)}},Yn={anticipate:ue,backInOut:le,circInOut:pe};function Xn(e){return e in Yn}function Zn(e){typeof e.ease==`string`&&Xn(e.ease)&&(e.ease=Yn[e.ease])}var Qn=10,$n=class extends Jn{constructor(e){Zn(e),on(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 ln({...a,autoplay:!1}),s=Math.max(Qn,M.now()-this.startTime),c=m(0,Qn,s-Qn),l=o.sample(s).value,{name:u}=this.options;i&&u&&Ln(i,u,l),t.setWithVelocity(o.sample(Math.max(0,s-c)).value,l,c),o.stop()}},er=(e,t)=>t===`zIndex`?!1:!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(z.test(e)||e===`0`)&&!e.startsWith(`url(`));function tr(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 nr(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=er(i,t),s=er(a,t);return`${t}${i}${a}${o?a:i}`,!o||!s?!1:tr(e)||(n===`spring`||Kn(n))&&r}function rr(e){e.duration=0,e.type=`keyframes`}var ir=new Set([`opacity`,`clipPath`,`filter`,`transform`]),ar=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function or(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&ar.test(e[t]))return!0;return!1}var sr=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),cr=y(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function lr(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 cr()&&n&&(ir.has(n)||sr.has(n)&&or(s))&&(n!==`transform`||!l)&&!c&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var ur=40,dr=class extends sn{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=M.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||Fn)(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=M.now();let u=!0;nr(e,i,a,o)||(u=!1,(h.instantAnimations||!s)&&l?.(rn(e,n,t)),e[0]=e[e.length-1],rr(n),n.repeat=0);let d={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>ur?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},f=u&&!c&&lr(d),p=d.motionValue?.owner?.current,m;if(f)try{m=new $n({...d,element:p})}catch{m=new ln(d)}else m=new ln(d);m.finished.then(()=>{this.notifyFinished()}).catch(b),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(),Pn()),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 fr(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 pr=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function mr(e){let t=pr.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function hr(e,t,n=1){`${e}`;let[r,i]=mr(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return g(e)?parseFloat(e):e}return Me(i)?hr(i,t,n+1):i}var gr={type:`spring`,stiffness:500,damping:25,restSpeed:10},_r=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),vr={type:`keyframes`,duration:.8},yr={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},br=(e,{keyframes:t})=>t.length>2?vr:wn.has(e)?e.startsWith(`scale`)?_r(t[1]):gr:yr;function xr(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function Sr(e,t){let n=e?.[t]??e?.default??e;return n===e?n:xr(n,e)}var Cr=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`]);function wr(e){for(let t in e)if(!Cr.has(t))return!0;return!1}var Tr=(e,t,n,r={},i,a)=>o=>{let s=Sr(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=T(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};wr(s)||Object.assign(u,br(e,u)),u.duration&&=T(u.duration),u.repeatDelay&&=T(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(rr(u),u.delay===0&&(d=!0)),(h.instantAnimations||h.skipAnimations||i?.shouldSkipAnimations)&&(d=!0,rr(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=rn(u.keyframes,s);if(e!==void 0){k.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new ln(u):new dr(u)};function Er(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function Dr(e,t,n,r){if(typeof t==`function`){let[i,a]=Er(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]=Er(r);t=t(n===void 0?e.custom:n,i,a)}return t}function W(e,t,n){let r=e.getProps();return Dr(r,t,n===void 0?r.custom:n,e)}var Or=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...Cn]),kr=30,Ar=e=>!isNaN(parseFloat(e)),jr={current:void 0},Mr=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=M.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=M.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Ar(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 w);let n=this.events[e].add(t);return e===`change`?()=>{n(),k.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 jr.current&&jr.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=M.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>kr)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,kr);return D(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 Nr(e,t){return new Mr(e,t)}var Pr=e=>Array.isArray(e);function Fr(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Nr(n))}function Ir(e){return Pr(e)?e[e.length-1]||0:e}function Lr(e,t){let{transitionEnd:n={},transition:r={},...i}=W(e,t)||{};i={...i,...n};for(let t in i)Fr(e,t,Ir(i[t]))}var G=e=>!!(e&&e.getVelocity);function Rr(e){return!!(G(e)&&e.add)}function zr(e,t){let n=e.getValue(`willChange`);if(Rr(n))return n.add(t);if(!n&&h.WillChange){let n=new h.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function Br(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var Vr=`data-`+Br(`framerAppearId`);function Hr(e){return e.props[Vr]}function Ur({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Wr(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?xr(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&&Ur(d,t))continue;let o={delay:n,...Sr(a||{},t)},c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){k.update(()=>r.set(i));continue}let f=!1;if(window.MotionHandoffAnimation){let n=Hr(e);if(n){let e=window.MotionHandoffAnimation(n,t,k);e!==null&&(o.startTime=e,f=!0)}}zr(e,t);let p=l??e.shouldReduceMotion;r.start(Tr(t,r,i,p&&Or.has(t)?{type:!1}:o,e,f));let m=r.animation;m&&u.push(m)}if(o){let t=()=>k.update(()=>{o&&Lr(e,o)});u.length?Promise.all(u).then(t):t()}return u}function Gr(e,t,n={}){let r=W(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(Wr(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return Kr(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 Kr(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(Gr(c,t,{...o,delay:n+(typeof r==`function`?0:r)+fr(e.variantChildren,c,r,i,a)}).then(()=>c.notify(`AnimationComplete`,t)));return Promise.all(s)}function qr(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>Gr(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=Gr(e,t,n);else{let i=typeof t==`function`?W(e,t,n.custom):t;r=Promise.all(Wr(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}var Jr={test:e=>e===`auto`,parse:e=>e},Yr=e=>t=>t.test(e),Xr=[Fe,L,I,F,Xe,Ye,Jr],Zr=e=>Xr.find(Yr(e));function Qr(e){return typeof e==`number`?e===0:e===null?!0:e===`none`||e===`0`||v(e)}var $r=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function ei(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(ze)||[];if(!r)return e;let i=n.replace(r,``),a=+!!$r.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var ti=/\b([a-z-]*)\(.*?\)/gu,ni={...z,getAnimatableNone:e=>{let t=e.match(ti);return t?t.map(ei).join(` `):e}},ri={...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))}},ii={...Fe,transform:Math.round},ai={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:Le,scaleX:Le,scaleY:Le,scaleZ:Le,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:Ie,originX:Ze,originY:Ze,originZ:L,zIndex:ii,fillOpacity:Ie,strokeOpacity:Ie,numOctaves:ii},oi={...ai,color:R,backgroundColor:R,outlineColor:R,fill:R,stroke:R,borderColor:R,borderTopColor:R,borderRightColor:R,borderBottomColor:R,borderLeftColor:R,filter:ni,WebkitFilter:ni,mask:ri,WebkitMask:ri},si=e=>oi[e],ci=new Set([ni,ri]);function li(e,t){let n=si(e);return ci.has(n)||(n=z),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var ui=new Set([`auto`,`none`,`0`]);function di(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!ui.has(t)&&st(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=li(n,i)}var fi=class extends Fn{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(),Me(r))){let i=hr(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!Or.has(n)||e.length!==2)return;let[r,i]=e,a=Zr(r),o=Zr(i);if(Pe(r)!==Pe(i)&&H[n]){this.needsMeasurement=!0;return}if(a!==o)if(Tn(a)&&Tn(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else H[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||Qr(e[t]))&&n.push(t);n.length&&di(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=H[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]=H[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 pi(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 mi=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function hi(e){return _(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}var{schedule:gi,cancel:_i}=Te(queueMicrotask,!1),K={x:!1,y:!1};function vi(){return K.x||K.y}function yi(e){return e===`x`||e===`y`?K[e]?null:(K[e]=!0,()=>{K[e]=!1}):K.x||K.y?null:(K.x=K.y=!0,()=>{K.x=K.y=!1})}function bi(e,t){let n=pi(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function xi(e){return!(e.pointerType===`touch`||vi())}function Si(e,t,n={}){let[r,i,a]=bi(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(!xi(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 Ci=(e,t)=>t?e===t?!0:Ci(e,t.parentElement):!1,wi=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,Ti=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function Ei(e){return Ti.has(e.tagName)||e.isContentEditable===!0}var Di=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function Oi(e){return Di.has(e.tagName)||e.isContentEditable===!0}var ki=new WeakSet;function Ai(e){return t=>{t.key===`Enter`&&e(t)}}function ji(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var Mi=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=Ai(()=>{if(ki.has(n))return;ji(n,`down`);let e=Ai(()=>{ji(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>ji(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function Ni(e){return wi(e)&&!vi()}var Pi=new WeakSet;function Fi(e,t,n={}){let[r,i,a]=bi(e,n),o=e=>{let r=e.currentTarget;if(!Ni(e)||Pi.has(e))return;ki.add(r),n.stopPropagation&&Pi.add(e);let a=t(r,e),o=(e,t)=>{window.removeEventListener(`pointerup`,s),window.removeEventListener(`pointercancel`,c),ki.has(r)&&ki.delete(r),Ni(e)&&typeof a==`function`&&a(e,{success:t})},s=e=>{o(e,r===window||r===document||n.useGlobalTarget||Ci(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),hi(e)&&(e.addEventListener(`focus`,e=>Mi(e,i)),!Ei(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function Ii(e){return _(e)&&`ownerSVGElement`in e}var Li=new WeakMap,Ri,zi=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:Ii(r)&&`getBBox`in r?r.getBBox()[t]:r[n],Bi=zi(`inline`,`width`,`offsetWidth`),Vi=zi(`block`,`height`,`offsetHeight`);function Hi({target:e,borderBoxSize:t}){Li.get(e)?.forEach(n=>{n(e,{get width(){return Bi(e,t)},get height(){return Vi(e,t)}})})}function Ui(e){e.forEach(Hi)}function Wi(){typeof ResizeObserver>`u`||(Ri=new ResizeObserver(Ui))}function Gi(e,t){Ri||Wi();let n=pi(e);return n.forEach(e=>{let n=Li.get(e);n||(n=new Set,Li.set(e,n)),n.add(t),Ri?.observe(e)}),()=>{n.forEach(e=>{let n=Li.get(e);n?.delete(t),n?.size||Ri?.unobserve(e)})}}var Ki=new Set,qi;function Ji(){qi=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Ki.forEach(t=>t(e))},window.addEventListener(`resize`,qi)}function Yi(e){return Ki.add(e),qi||Ji(),()=>{Ki.delete(e),!Ki.size&&typeof qi==`function`&&(window.removeEventListener(`resize`,qi),qi=void 0)}}function Xi(e,t){return typeof e==`function`?Yi(e):Gi(e,t)}function Zi(e){return Ii(e)&&e.tagName===`svg`}var Qi=[...Xr,R,z],$i=e=>Qi.find(Yr(e)),ea=()=>({translate:0,scale:1,origin:0,originPoint:0}),ta=()=>({x:ea(),y:ea()}),na=()=>({min:0,max:0}),q=()=>({x:na(),y:na()}),ra=new WeakMap;function ia(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function aa(e){return typeof e==`string`||Array.isArray(e)}var oa=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],sa=[`initial`,...oa];function ca(e){return ia(e.animate)||sa.some(t=>aa(e[t]))}function la(e){return!!(ca(e)||e.variants)}function ua(e,t,n){for(let r in t){let i=t[r],a=n[r];if(G(i))e.addValue(r,i);else if(G(a))e.addValue(r,Nr(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,Nr(t===void 0?i:t,{owner:e}))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var da={current:null},fa={current:!1},pa=typeof window<`u`;function ma(){if(fa.current=!0,pa)if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>da.current=e.matches;e.addEventListener(`change`,t),t()}else da.current=!1}var ha=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],ga={};function _a(e){ga=e}function va(){return ga}var ya=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=Fn,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=M.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,k.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=ca(t),this.isVariantNode=la(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&&G(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,ra.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:(fa.current||ma(),this.shouldReduceMotion=da.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(),A(this.notifyUpdate),A(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&&ir.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new Jn({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:T(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=wn.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&k.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 ga){let t=ga[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):q()}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<ha.length;t++){let n=ha[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=ua(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=Nr(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`&&(g(n)||v(n))?n=parseFloat(n):!$i(n)&&z.test(t)&&(n=li(e,t)),this.setBaseTarget(e,G(n)?n.get():n)),G(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=Dr(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&&!G(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 w),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){gi.render(this.render)}},ba=class extends ya{constructor(){super(...arguments),this.KeyframeResolver=fi}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;G(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}},J=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function xa({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Sa({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Ca(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 wa(e){return e===void 0||e===1}function Ta({scale:e,scaleX:t,scaleY:n}){return!wa(e)||!wa(t)||!wa(n)}function Y(e){return Ta(e)||Ea(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Ea(e){return Da(e.x)||Da(e.y)}function Da(e){return e&&e!==`0%`}function Oa(e,t,n){return n+t*(e-n)}function ka(e,t,n,r,i){return i!==void 0&&(e=Oa(e,i,r)),Oa(e,n,r)+t}function Aa(e,t=0,n=1,r,i){e.min=ka(e.min,t,n,r,i),e.max=ka(e.max,t,n,r,i)}function ja(e,{x:t,y:n}){Aa(e.x,t.translate,t.scale,t.originPoint),Aa(e.y,n.translate,n.scale,n.originPoint)}var Ma=.999999999999,Na=1.0000000000001;function Pa(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,ja(e,o)),r&&Y(a.latestValues)&&La(e,a.latestValues,a.layout?.layoutBox))}t.x<Na&&t.x>Ma&&(t.x=1),t.y<Na&&t.y>Ma&&(t.y=1)}function X(e,t){e.min+=t,e.max+=t}function Fa(e,t,n,r,i=.5){Aa(e,t,n,B(e.min,e.max,i),r)}function Ia(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function La(e,t,n){let r=n??e;Fa(e.x,Ia(t.x,r.x),t.scaleX,t.scale,t.originX),Fa(e.y,Ia(t.y,r.y),t.scaleY,t.scale,t.originY)}function Ra(e,t){return xa(Ca(e.getBoundingClientRect(),t))}function za(e,t,n){let r=Ra(e,n),{scroll:i}=t;return i&&(X(r.x,i.offset.x),X(r.y,i.offset.y)),r}var Ba={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},Va=Cn.length;function Ha(e,t,n){let r=``,i=!0;for(let a=0;a<Va;a++){let o=Cn[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=mi(s,ai[o]);if(!c){i=!1;let t=Ba[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}return r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function Ua(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(wn.has(e)){o=!0;continue}else if(Ae(e)){i[e]=n;continue}else{let t=mi(n,ai[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=Ha(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 Wa(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 Ga(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var Ka={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(L.test(e))e=parseFloat(e);else return e;return`${Ga(e,t.target.x)}% ${Ga(e,t.target.y)}%`}},qa={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)}},Ja={borderRadius:{...Ka,applyTo:[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`]},borderTopLeftRadius:Ka,borderTopRightRadius:Ka,borderBottomLeftRadius:Ka,borderBottomRightRadius:Ka,boxShadow:qa};function Ya(e,{layout:t,layoutId:n}){return wn.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!Ja[e]||e===`opacity`)}function Xa(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(G(r[t])||i&&G(i[t])||Ya(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function Za(e){return window.getComputedStyle(e)}var Qa=class extends ba{constructor(){super(...arguments),this.type=`html`,this.renderInstance=Wa}readValueFromInstance(e,t){if(wn.has(t))return this.projection?.isProjecting?yn(t):xn(e,t);{let n=Za(e),r=(Ae(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return Ra(e,t)}build(e,t,n){Ua(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return Xa(e,t,n)}},$a={offset:`stroke-dashoffset`,array:`stroke-dasharray`},eo={offset:`strokeDashoffset`,array:`strokeDasharray`};function to(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?$a:eo;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var no=[`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function ro(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(Ua(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 no)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&&to(d,i,a,o,!1)}var io=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`]),ao=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function oo(e,t,n,r){Wa(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(io.has(n)?n:Br(n),t.attrs[n])}function so(e,t,n){let r=Xa(e,t,n);for(let n in e)if(G(e[n])||G(t[n])){let t=Cn.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var co=class extends ba{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=q}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(wn.has(t)){let e=si(t);return e&&e.default||0}return t=io.has(t)?t:Br(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return so(e,t,n)}build(e,t,n){ro(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){oo(e,t,n,r)}mount(e){this.isSVGTag=ao(e.tagName),super.mount(e)}},lo=sa.length;function uo(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&uo(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<lo;n++){let r=sa[n],i=e.props[r];(aa(i)||i===!1)&&(t[r]=i)}return t}function fo(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 po=[...oa].reverse(),mo=oa.length;function ho(e){return t=>Promise.all(t.map(({animation:t,options:n})=>qr(e,t,n)))}function go(e){let t=ho(e),n=yo(),r=!0,i=!1,a=t=>(n,r)=>{let i=W(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=uo(e.parent)||{},l=[],u=new Set,d={},f=1/0;for(let t=0;t<mo;t++){let p=po[t],m=n[p],h=s[p]===void 0?c[p]:s[p],g=aa(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||ia(h)||typeof h==`boolean`)continue;if(p===`exit`&&m.isActive&&_!==!0){m.prevResolvedValues&&(d={...d,...m.prevResolvedValues});continue}let y=_o(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,T={...w,...C},E=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 T){let t=C[e],n=w[e];if(d.hasOwnProperty(e))continue;let r=!1;r=Pr(t)&&Pr(n)?!fo(t,n):t!==n,r?t==null?u.add(e):E(e):t!==void 0&&u.has(e)?E(e):m.protectedKeys[e]=!0}m.prevProp=h,m.prevResolvedValues=C,m.isActive&&(d={...d,...C}),(r||i)&&e.blockInitialAnimation&&(b=!1);let D=v&&y;b&&(!D||x)&&l.push(...S.map(t=>{let n={type:p};if(typeof t==`string`&&(r||i)&&!D&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,i=W(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=fr(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){let t={};if(typeof s.initial!=`boolean`){let n=W(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=yo(),i=!0}}}function _o(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!fo(t,e):!1}function vo(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function yo(){return{animate:vo(!0),whileInView:vo(),whileHover:vo(),whileTap:vo(),whileDrag:vo(),whileFocus:vo(),exit:vo()}}function bo(e,t){e.min=t.min,e.max=t.max}function Z(e,t){bo(e.x,t.x),bo(e.y,t.y)}function xo(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var So=1e-4,Co=1-So,wo=1+So,To=.01,Eo=0-To,Do=0+To;function Q(e){return e.max-e.min}function Oo(e,t,n){return Math.abs(e-t)<=n}function ko(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>=Co&&e.scale<=wo||isNaN(e.scale))&&(e.scale=1),(e.translate>=Eo&&e.translate<=Do||isNaN(e.translate))&&(e.translate=0)}function Ao(e,t,n,r){ko(e.x,t.x,n.x,r?r.originX:void 0),ko(e.y,t.y,n.y,r?r.originY:void 0)}function jo(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 Mo(e,t,n,r){jo(e.x,t.x,n.x,r?.x),jo(e.y,t.y,n.y,r?.y)}function No(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 Po(e,t,n,r){No(e.x,t.x,n.x,r?.x),No(e.y,t.y,n.y,r?.y)}function Fo(e,t,n,r,i){return e-=t,e=Oa(e,1/n,r),i!==void 0&&(e=Oa(e,1/i,r)),e}function Io(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=Fo(e.min,t,n,s,i),e.max=Fo(e.max,t,n,s,i)}function Lo(e,t,[n,r,i],a,o){Io(e,t[n],t[r],t[i],t.scale,a,o)}var Ro=[`x`,`scaleX`,`originX`],zo=[`y`,`scaleY`,`originY`];function Bo(e,t,n,r){Lo(e.x,t,Ro,n?n.x:void 0,r?r.x:void 0),Lo(e.y,t,zo,n?n.y:void 0,r?r.y:void 0)}function Vo(e){return e.translate===0&&e.scale===1}function Ho(e){return Vo(e.x)&&Vo(e.y)}function Uo(e,t){return e.min===t.min&&e.max===t.max}function Wo(e,t){return Uo(e.x,t.x)&&Uo(e.y,t.y)}function Go(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Ko(e,t){return Go(e.x,t.x)&&Go(e.y,t.y)}function qo(e){return Q(e.x)/Q(e.y)}function Jo(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function $(e){return[e(`x`),e(`y`)]}function Yo(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 Xo=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`],Zo=Xo.length,Qo=e=>typeof e==`string`?parseFloat(e):e,$o=e=>typeof e==`number`||L.test(e);function es(e,t,n,r,i,a){i?(e.opacity=B(0,n.opacity??1,ns(r)),e.opacityExit=B(t.opacity??1,0,rs(r))):a&&(e.opacity=B(t.opacity??1,n.opacity??1,r));for(let i=0;i<Zo;i++){let a=Xo[i],o=ts(t,a),s=ts(n,a);o===void 0&&s===void 0||(o||=0,s||=0,o===0||s===0||$o(o)===$o(s)?(e[a]=Math.max(B(Qo(o),Qo(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 ts(e,t){return e[t]===void 0?e.borderRadius:e[t]}var ns=is(0,.5,fe),rs=is(.5,.95,b);function is(e,t,n){return r=>r<e?0:r>t?1:n(C(e,t,r))}function as(e,t,n){let r=G(e)?e:Nr(e);return r.start(Tr(``,r,t,n)),r.animation}function os(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}var ss=(e,t)=>e.depth-t.depth,cs=class{constructor(){this.children=[],this.isDirty=!1}add(e){f(this.children,e),this.isDirty=!0}remove(e){p(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(ss),this.isDirty=!1,this.children.forEach(e)}};function ls(e,t){let n=M.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(A(r),e(a-t))};return k.setup(r,!0),()=>A(r)}function us(e){return G(e)?e.get():e}var ds=class{constructor(){this.members=[]}add(e){f(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&&(p(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(p(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)}},fs={hasAnimatedSinceResize:!0,hasEverUpdated:!1},ps={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},ms=[``,`X`,`Y`,`Z`],hs=1e3,gs=0;function _s(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function vs(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=Hr(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,k,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&vs(r)}function ys({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=gs++,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,O.value&&(ps.nodes=ps.calculatedTargetDeltas=ps.calculatedProjections=0),this.nodes.forEach(Ss),this.nodes.forEach(js),this.nodes.forEach(Ms),this.nodes.forEach(Cs),O.addProjectionMetrics&&O.addProjectionMetrics(ps)},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 cs)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new w),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=Ii(t)&&!Zi(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;k.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=ls(i,250),fs.hasAnimatedSinceResize&&(fs.hasAnimatedSinceResize=!1,this.nodes.forEach(As)))})}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()||zs,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!Ko(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={...Sr(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||As(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(),A(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(Ns),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&&vs(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(Es),this.nodes.forEach(Ts);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Ds);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Os),this.nodes.forEach(ks),this.nodes.forEach(bs),this.nodes.forEach(xs)):this.nodes.forEach(Ds),this.clearAllSnapshots();let e=M.now();j.delta=m(0,1e3/60,e-j.timestamp),j.timestamp=e,j.isProcessing=!0,Ee.update.process(j),Ee.preRender.process(j),Ee.render.process(j),j.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,gi.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(ws),this.sharedNodes.forEach(Ps)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,k.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){k.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||=q(),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&&!Ho(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||Y(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)),Us(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return q();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Gs))){let{scroll:e}=this.root;e&&(X(t.x,e.offset.x),X(t.y,e.offset.y))}return t}removeElementScroll(e){let t=q();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||q();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)),Y(n.latestValues)&&La(r,n.latestValues,n.layout?.layoutBox)}return Y(this.latestValues)&&La(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){let t=q();Z(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!Y(n.latestValues))continue;let r;n.instance&&(Ta(n.latestValues)&&n.updateSnapshot(),r=q(),Z(r,n.measurePageBox())),Bo(t,n.latestValues,n.snapshot?.layoutBox,r)}return Y(this.latestValues)&&Bo(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!==j.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=j.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=q(),this.targetWithTransforms=q()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Mo(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),ja(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),O.value&&ps.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||Ta(this.parent.latestValues)||Ea(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=q(),this.relativeTargetOrigin=q(),Po(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===j.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;Pa(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=q());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(xo(this.prevProjectionDelta.x,this.projectionDelta.x),xo(this.prevProjectionDelta.y,this.projectionDelta.y)),Ao(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!Jo(this.projectionDelta.x,this.prevProjectionDelta.x)||!Jo(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),O.value&&ps.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=ta(),this.projectionDelta=ta(),this.projectionDeltaWithTransform=ta()}setAnimationOrigin(e,t=!1){let n=this.snapshot,r=n?n.latestValues:{},i={...this.latestValues},a=ta();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let o=q(),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(Rs));this.animationProgress=0;let d;this.mixTargetDelta=t=>{let n=t/1e3;Fs(a.x,e.x,n),Fs(a.y,e.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Po(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),Ls(this.relativeTarget,this.relativeTargetOrigin,o,n),d&&Wo(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||=q(),Z(d,this.relativeTarget)),s&&(this.animationValues=i,es(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&&=(A(this.pendingAnimation),void 0),this.pendingAnimation=k.update(()=>{fs.hasAnimatedSinceResize=!0,N.layout++,this.motionValue||=Nr(0),this.motionValue.jump(0,!1),this.currentAnimation=as(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{N.layout--},onComplete:()=>{N.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(hs),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&&Ws(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||q();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),La(t,i),Ao(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new ds),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&&_s(`z`,e,r,this.animationValues);for(let t=0;t<ms.length;t++)_s(`rotate${ms[t]}`,e,r,this.animationValues),_s(`skew${ms[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=us(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=us(t?.pointerEvents)||``),this.hasProjected&&!Y(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=Yo(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 Ja){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=Ja[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?us(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(Ts),this.root.sharedNodes.clear()}}}function bs(e){e.updateLayout()}function xs(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`;bo(a?t.measuredBox[e]:t.layoutBox[e],n[e])}else Ws(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=ta();Ao(o,n,t.layoutBox);let s=ta();a?Ao(s,e.applyTransform(r,!0),t.measuredBox):Ao(s,n,t.layoutBox);let c=!Ho(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=q();Po(s,t.layoutBox,i.layoutBox,o);let c=q();Po(c,n,a.layoutBox,o),Ko(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 Ss(e){O.value&&ps.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 Cs(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function ws(e){e.clearSnapshot()}function Ts(e){e.clearMeasurements()}function Es(e){e.isLayoutDirty=!0,e.updateLayout()}function Ds(e){e.isLayoutDirty=!1}function Os(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function ks(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function As(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function js(e){e.resolveTargetDelta()}function Ms(e){e.calcProjection()}function Ns(e){e.resetSkewAndRotation()}function Ps(e){e.removeLeadSnapshot()}function Fs(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 Is(e,t,n,r){e.min=B(t.min,n.min,r),e.max=B(t.max,n.max,r)}function Ls(e,t,n,r){Is(e.x,t.x,n.x,r),Is(e.y,t.y,n.y,r)}function Rs(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var zs={duration:.45,ease:[.4,0,.1,1]},Bs=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Vs=Bs(`applewebkit/`)&&!Bs(`chrome/`)?Math.round:b;function Hs(e){e.min=Vs(e.min),e.max=Vs(e.max)}function Us(e){Hs(e.x),Hs(e.y)}function Ws(e,t,n){return e===`position`||e===`preserve-aspect`&&!Oo(qo(t),qo(n),.2)}function Gs(e){return e!==e.root&&e.scroll?.wasRoot}var Ks=ys({attachResizeListener:(e,t)=>os(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),qs={current:void 0},Js=ys({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!qs.current){let e=new Ks({});e.mount(window),e.setOptions({layoutScroll:!0}),qs.current=e}return qs.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),Ys=(0,s.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function Xs(e=!0){let t=(0,s.useContext)(d);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,s.useId)();(0,s.useEffect)(()=>{if(e)return i(a)},[e]);let o=(0,s.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var Zs=(0,s.createContext)({strict:!1}),Qs={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`]},$s=!1;function ec(){if($s)return;let e={};for(let t in Qs)e[t]={isEnabled:e=>Qs[t].some(t=>!!e[t])};_a(e),$s=!0}function tc(){return ec(),va()}function nc(e){let t=tc();for(let n in e)t[n]={...t[n],...e[n]};_a(t)}var rc=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 ic(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||rc.has(e)}var ac=r({default:()=>oc}),oc,sc=n((()=>{throw oc={},Error(`Could not resolve "@emotion/is-prop-valid" imported by "framer-motion". Is it installed?`)})),cc=e=>!ic(e);function lc(e){typeof e==`function`&&(cc=t=>t.startsWith(`on`)?!ic(t):e(t))}try{lc((sc(),t(ac)).default)}catch{}function uc(e,t,n){let r={};for(let i in e)i===`values`&&typeof e.values==`object`||G(e[i])||(cc(i)||n===!0&&ic(i)||!t&&!ic(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i]);return r}var dc=(0,s.createContext)({});function fc(e,t){if(ca(e)){let{initial:t,animate:n}=e;return{initial:t===!1||aa(t)?t:void 0,animate:aa(n)?n:void 0}}return e.inherit===!1?{}:t}function pc(e){let{initial:t,animate:n}=fc(e,(0,s.useContext)(dc));return(0,s.useMemo)(()=>({initial:t,animate:n}),[mc(t),mc(n)])}function mc(e){return Array.isArray(e)?e.join(` `):e}var hc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function gc(e,t,n){for(let r in t)!G(t[r])&&!Ya(r,n)&&(e[r]=t[r])}function _c({transformTemplate:e},t){return(0,s.useMemo)(()=>{let n=hc();return Ua(n,t,e),Object.assign({},n.vars,n.style)},[t])}function vc(e,t){let n=e.style||{},r={};return gc(r,n,e),Object.assign(r,_c(e,t)),r}function yc(e,t){let n={},r=vc(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 bc=()=>({...hc(),attrs:{}});function xc(e,t,n,r){let i=(0,s.useMemo)(()=>{let n=bc();return ro(n,t,ao(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};gc(t,e.style,e),i.style={...t,...i.style}}return i}var Sc=[`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 Cc(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(Sc.indexOf(e)>-1||/[A-Z]/u.test(e))}function wc(e,t,n,{latestValues:r},i,a=!1,o){let c=(o??Cc(e)?xc:yc)(t,r,i,e),l=uc(t,typeof e==`string`,a),u=e===s.Fragment?{}:{...l,...c,ref:n},{children:d}=t,f=(0,s.useMemo)(()=>G(d)?d.get():d,[d]);return(0,s.createElement)(e,{...u,children:f})}function Tc({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:Ec(n,r,i,e),renderState:t()}}function Ec(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=us(a[e]);let{initial:o,animate:s}=e,c=ca(e),l=la(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`&&!ia(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=Dr(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 Dc=e=>(t,n)=>{let r=(0,s.useContext)(dc),i=(0,s.useContext)(d),a=()=>Tc(e,t,r,i);return n?a():l(a)},Oc=Dc({scrapeMotionValuesFromProps:Xa,createRenderState:hc}),kc=Dc({scrapeMotionValuesFromProps:so,createRenderState:bc}),Ac=Symbol.for(`motionComponentSymbol`);function jc(e,t,n){let r=(0,s.useRef)(n);(0,s.useInsertionEffect)(()=>{r.current=n});let i=(0,s.useRef)(null);return(0,s.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 Mc=(0,s.createContext)({});function Nc(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function Pc(e,t,n,r,i,a){let{visualElement:o}=(0,s.useContext)(dc),c=(0,s.useContext)(Zs),l=(0,s.useContext)(d),f=(0,s.useContext)(Ys),p=f.reducedMotion,m=f.skipAnimations,h=(0,s.useRef)(null),g=(0,s.useRef)(!1);r||=c.renderer,!h.current&&r&&(h.current=r(e,{visualState:t,parent:o,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:p,skipAnimations:m,isSVG:a}),g.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));let _=h.current,v=(0,s.useContext)(Mc);_&&!_.projection&&i&&(_.type===`html`||_.type===`svg`)&&Fc(h.current,n,i,v);let y=(0,s.useRef)(!1);(0,s.useInsertionEffect)(()=>{_&&y.current&&_.update(n,l)});let b=n[Vr],x=(0,s.useRef)(!!b&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(b)&&window.MotionHasOptimisedAnimation?.(b));return u(()=>{g.current=!0,_&&(y.current=!0,window.MotionIsMounted=!0,_.updateFeatures(),_.scheduleRenderMicrotask(),x.current&&_.animationState&&_.animationState.animateChanges())}),(0,s.useEffect)(()=>{_&&(!x.current&&_.animationState&&_.animationState.animateChanges(),x.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(b)}),!1),_.enteringChildren=void 0)}),_}function Fc(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:Ic(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&Nc(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u})}function Ic(e){if(e)return e.options.allowProjection===!1?Ic(e.parent):e.projection}function Lc(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&nc(r);let a=n?n===`svg`:Cc(e),c=a?kc:Oc;function l(n,l){let u,d={...(0,s.useContext)(Ys),...n,layoutId:Rc(n)},{isStatic:f}=d,p=pc(n),m=c(n,f);if(!f&&typeof window<`u`){zc(d,r);let t=Bc(d);u=t.MeasureLayout,p.visualElement=Pc(e,m,d,i,t.ProjectionNode,a)}return(0,o.jsxs)(dc.Provider,{value:p,children:[u&&p.visualElement?(0,o.jsx)(u,{visualElement:p.visualElement,...d}):null,wc(e,n,jc(m,p.visualElement,l),m,f,t,a)]})}l.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let u=(0,s.forwardRef)(l);return u[Ac]=e,u}function Rc({layoutId:e}){let t=(0,s.useContext)(c).id;return t&&e!==void 0?t+`-`+e:e}function zc(e,t){(0,s.useContext)(Zs).strict}function Bc(e){let{drag:t,layout:n}=tc();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function Vc(e,t){if(typeof Proxy>`u`)return Lc;let n=new Map,r=(n,r)=>Lc(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,Lc(a,void 0,e,t)),n.get(a))})}var Hc=(e,t)=>t.isSVG??Cc(e)?new co(t):new Qa(t,{allowProjection:e!==s.Fragment}),Uc=class extends J{constructor(e){super(e),e.animationState||=go(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();ia(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?.()}},Wc=0,Gc={animation:{Feature:Uc},exit:{Feature:class extends J{constructor(){super(...arguments),this.id=Wc++,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=W(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 Kc(e){return{point:{x:e.pageX,y:e.pageY}}}var qc=e=>t=>wi(t)&&e(t,Kc(t));function Jc(e,t,n,r){return os(e,t,qc(n),r)}var Yc=({current:e})=>e?e.ownerDocument.defaultView:null,Xc=(e,t)=>Math.abs(e-t);function Zc(e,t){let n=Xc(e.x,t.x),r=Xc(e.y,t.y);return Math.sqrt(n**2+r**2)}var Qc=new Set([`auto`,`scroll`]),$c=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=el(this.lastRawMoveEventInfo,this.transformPagePoint));let e=nl(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=Zc(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=j;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=el(t,this.transformPagePoint),k.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=nl(e.type===`pointercancel`?this.lastMoveEventInfo:el(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!wi(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=el(Kc(e),this.transformPagePoint),{point:c}=s,{timestamp:l}=j;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,nl(s,this.history)),this.removeListeners=S(Jc(this.contextWindow,`pointermove`,this.handlePointerMove),Jc(this.contextWindow,`pointerup`,this.handlePointerUp),Jc(this.contextWindow,`pointercancel`,this.handlePointerUp)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(Qc.has(e.overflowX)||Qc.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),k.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),A(this.updatePoint)}};function el(e,t){return t?{point:t(e.point)}:e}function tl(e,t){return{x:e.x-t.x,y:e.y-t.y}}function nl({point:e},t){return{point:e,delta:tl(e,il(t)),offset:tl(e,rl(t)),velocity:al(t,.1)}}function rl(e){return e[0]}function il(e){return e[e.length-1]}function al(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=il(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>T(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>T(t)*2&&(r=e[1]);let a=E(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 ol(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 sl(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 cl(e,{top:t,left:n,bottom:r,right:i}){return{x:sl(e.x,n,i),y:sl(e.y,t,r)}}function ll(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 ul(e,t){return{x:ll(e.x,t.x),y:ll(e.y,t.y)}}function dl(e,t){let n=.5,r=Q(e),i=Q(t);return i>r?n=C(t.min,t.max-r,e.min):r>i&&(n=C(e.min,e.max-i,t.min)),m(0,1,n)}function fl(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 pl=.35;function ml(e=pl){return e===!1?e=0:e===!0&&(e=pl),{x:hl(e,`left`,`right`),y:hl(e,`top`,`bottom`)}}function hl(e,t,n){return{min:gl(e,t),max:gl(e,n)}}function gl(e,t){return typeof e==`number`?e:e[t]||0}var _l=new WeakMap,vl=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=q(),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(Kc(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=yi(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&&k.update(()=>i(e,t),!1,!0),zr(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=Sl(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&&k.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 $c(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:Yc(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&&k.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||!xl(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=ol(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&&Nc(e)?this.constraints||=this.resolveRefConstraints():e&&n?this.constraints=cl(n.layoutBox,e):this.constraints=!1,this.elastic=ml(t),r!==this.constraints&&!Nc(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&$(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=fl(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Nc(e))return!1;let n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;let i=za(n,r.root,this.visualElement.getTransformPagePoint()),a=ul(r.layout.layoutBox,i);if(t){let e=t(Sa(a));this.hasMutatedConstraints=!!e,e&&(a=xa(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(!xl(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 zr(this.visualElement,e),n.start(Tr(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(!xl(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(!Nc(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]=dl({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(!xl(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;_l.set(this.visualElement,this);let e=this.visualElement.current,t=Jc(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&Oi(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps();Nc(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||=bl(e,t.current,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),k.read(r);let o=os(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=pl,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function yl(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function bl(e,t,n){let r=Xi(e,yl(n)),i=Xi(t,yl(n));return()=>{r(),i()}}function xl(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Sl(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var Cl=class extends J{constructor(e){super(e),this.removeGroupControls=b,this.removeListeners=b,this.controls=new vl(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||b}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()}},wl=e=>(t,n)=>{e&&k.update(()=>e(t,n),!1,!0)},Tl=class extends J{constructor(){super(...arguments),this.removePointerDownListener=b}onPointerDown(e){this.session=new $c(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Yc(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:wl(e),onStart:wl(t),onMove:wl(n),onEnd:(e,t)=>{delete this.session,r&&k.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=Jc(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},El=!1,Dl=class extends s.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),El&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),fs.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}),El=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||k.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(),gi.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;El=!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 Ol(e){let[t,n]=Xs(),r=(0,s.useContext)(c);return(0,o.jsx)(Dl,{...e,layoutGroup:r,switchLayoutGroup:(0,s.useContext)(Mc),isPresent:t,safeToRemove:n})}var kl={pan:{Feature:Tl},drag:{Feature:Cl,ProjectionNode:Js,MeasureLayout:Ol}};function Al(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&k.postRender(()=>i(t,Kc(t)))}var jl=class extends J{mount(){let{current:e}=this.node;e&&(this.unmount=Si(e,(e,t)=>(Al(this.node,t,`Start`),e=>Al(this.node,e,`End`))))}unmount(){}},Ml=class extends J{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=S(os(this.node.current,`focus`,()=>this.onFocus()),os(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function Nl(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&&k.postRender(()=>i(t,Kc(t)))}var Pl=class extends J{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=Fi(e,(e,t)=>(Nl(this.node,t,`Start`),(e,{success:t})=>Nl(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},Fl=new WeakMap,Il=new WeakMap,Ll=e=>{let t=Fl.get(e.target);t&&t(e)},Rl=e=>{e.forEach(Ll)};function zl({root:e,...t}){let n=e||document;Il.has(n)||Il.set(n,{});let r=Il.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Rl,{root:e,...t})),r[i]}function Bl(e,t,n){let r=zl(t);return Fl.set(e,n),r.observe(e),()=>{Fl.delete(e),r.unobserve(e)}}var Vl={some:0,all:1},Hl=class extends J{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:Vl[r]};this.stopObserver=Bl(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(Ul(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function Ul({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var Wl={inView:{Feature:Hl},tap:{Feature:Pl},focus:{Feature:Ml},hover:{Feature:jl}},Gl={layout:{ProjectionNode:Js,MeasureLayout:Ol}},Kl=Vc({...Gc,...Wl,...kl,...Gl},Hc);export{ma as a,hi as c,u as d,l as f,Ys as i,xr as l,lc as n,fa as o,c as p,Xs as r,da as s,Kl as t,d as u};
@@ -0,0 +1 @@
1
+ import{ot as e}from"./vendor-ui-D8j69UH4.js";import{C as t}from"./format-Bx7DF-TB.js";import{n,t as r}from"./utils-XFKvwlFT.js";var i=n(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),a=e();function o({role:e=`status`,"aria-live":n=`polite`,"aria-atomic":i=!0,className:o,eyebrow:s,stamp:c,title:l,children:u,detailLabel:d=`Technical detail`,detail:f,primaryLabel:p,onPrimary:m,primaryIcon:h,primaryDisabled:g,primaryBusy:_,secondaryLabel:v,onSecondary:y}){return(0,a.jsx)(`div`,{role:e,"aria-live":n,"aria-atomic":i,className:r(`relative overflow-hidden rounded-[var(--miravo-radius-stadium-lg)] border border-primary/20 bg-transparent`,o),children:(0,a.jsx)(`div`,{className:`p-5 sm:p-6`,children:(0,a.jsxs)(`div`,{className:`min-w-0 space-y-4`,children:[(0,a.jsxs)(`div`,{className:`space-y-3`,children:[(0,a.jsx)(`p`,{className:`font-mono text-[0.65rem] uppercase tracking-[0.38em] text-muted-foreground`,children:s}),(0,a.jsxs)(`div`,{className:`flex items-end gap-3`,children:[(0,a.jsx)(`span`,{className:`font-heading text-3xl font-black leading-none tracking-[-0.06em] text-transparent [-webkit-text-stroke:1px_color-mix(in_srgb,var(--primary)_50%,transparent)] sm:text-4xl`,"aria-hidden":!0,children:c}),(0,a.jsx)(`div`,{className:`mb-1.5 h-px min-w-8 flex-1 bg-linear-to-r from-primary/55 to-transparent`})]}),(0,a.jsx)(`h2`,{className:`text-lg font-semibold tracking-[-0.03em] text-foreground sm:text-xl`,children:l}),u?(0,a.jsx)(`div`,{className:`space-y-2 text-sm leading-relaxed text-muted-foreground`,children:u}):null]}),(0,a.jsxs)(`div`,{className:`rounded-[var(--miravo-radius-stadium-sm)] border border-border/80 bg-background/55 p-4 backdrop-blur-sm`,children:[(0,a.jsx)(`div`,{className:`mb-2 font-mono text-[0.65rem] uppercase tracking-[0.28em] text-muted-foreground`,children:d}),(0,a.jsx)(`p`,{className:`wrap-break-word font-mono text-sm leading-relaxed text-primary`,children:f})]}),(0,a.jsxs)(`div`,{className:`flex flex-col gap-2 sm:flex-row sm:flex-wrap`,children:[(0,a.jsxs)(t,{type:`button`,onClick:m,disabled:!!(g||_),"aria-busy":_,className:r(`inline-flex w-full items-center justify-center gap-2 rounded-[var(--miravo-radius-stadium-sm)] border border-foreground/15 bg-foreground px-4 py-2.5 font-medium text-background shadow-none transition hover:bg-foreground/90 sm:w-auto`,_&&`pointer-events-none opacity-90`),children:[h,p]}),v&&y?(0,a.jsx)(t,{type:`button`,variant:`ghost`,size:`sm`,className:`sm:self-center`,onClick:y,children:v}):null]})]})})})}function s({message:e,onRetry:t,isRetrying:n}){return(0,a.jsxs)(o,{role:`alert`,eyebrow:`Data link fault`,stamp:`ERR`,title:`Couldn't reach Miravo`,detail:e,primaryLabel:`Retry request`,onPrimary:t,primaryBusy:!!n,primaryIcon:(0,a.jsx)(i,{className:r(`size-4 shrink-0`,n&&`animate-spin`),"aria-hidden":!0}),children:[(0,a.jsxs)(`p`,{children:[(0,a.jsx)(`span`,{className:`text-foreground`,children:`Most often:`}),` the Miravo admin server isn't running, or this browser can't reach it (wrong host, port, or firewall).`]}),(0,a.jsx)(`p`,{children:`Start or restart Miravo if needed, use the correct link to the Miravo Console, then try again.`})]})}export{o as n,i as r,s as t};
@@ -1 +1 @@
1
- import{n as e}from"./utils-BO2u-wC_.js";var t=e(`radio`,[[`path`,{d:`M16.247 7.761a6 6 0 0 1 0 8.478`,key:`1fwjs5`}],[`path`,{d:`M19.075 4.933a10 10 0 0 1 0 14.134`,key:`ehdyv1`}],[`path`,{d:`M4.925 19.067a10 10 0 0 1 0-14.134`,key:`1q22gi`}],[`path`,{d:`M7.753 16.239a6 6 0 0 1 0-8.478`,key:`r2q7qm`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}]]);export{t};
1
+ import{n as e}from"./utils-XFKvwlFT.js";var t=e(`radio`,[[`path`,{d:`M16.247 7.761a6 6 0 0 1 0 8.478`,key:`1fwjs5`}],[`path`,{d:`M19.075 4.933a10 10 0 0 1 0 14.134`,key:`ehdyv1`}],[`path`,{d:`M4.925 19.067a10 10 0 0 1 0-14.134`,key:`1q22gi`}],[`path`,{d:`M7.753 16.239a6 6 0 0 1 0-8.478`,key:`r2q7qm`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}]]);export{t};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/smart-factory-cem4tLAv.js","assets/rolldown-runtime-COnpUsM8.js","assets/vendor-ui-D8j69UH4.js","assets/vendor-charts-95ykyDlI.js","assets/chiller-BSx8eUMN.js","assets/status-CZFZLqVk.js","assets/dom-Cm_OH5jc.js","assets/compressor-D63w6Ir2.js","assets/water-treatment-CfVR0p0L.js","assets/tank-THHXGdzg.js","assets/by-path-VBqTBdlG.js","assets/api-B2QJEzbS.js","assets/utils-XFKvwlFT.js","assets/chevron-right-CMSQPSEo.js","assets/asset-panel-DDziFlFl.js","assets/chunk-OE4NN4TA-DBWZidbW.js","assets/useQuery-M9KTdi7Q.js","assets/format-Bx7DF-TB.js","assets/arrow-up-right-CwPw_2U1.js","assets/chevron-left-XHFooLn1.js","assets/console-panel-CMDoBJiO.js","assets/use-engine-command-mutation-CHqjOqfS.js","assets/dialog-B5PqrKVw.js","assets/runtime-link-vBANRqcD.js","assets/asset-detail-actions-jjbvaDES.js","assets/circle-x-_o0nl0Rg.js","assets/loader-circle-DjgHgHHl.js","assets/play-kg50os4l.js","assets/trash-2-BH9HDsZv.js","assets/triangle-alert-DoAwrRgk.js","assets/badge-Bk1DaL6C.js","assets/validation-BkfmaBBi.js","assets/tooltip-B3vOB1Vu.js","assets/model-schemas-3w38IPdc.js","assets/district-heating-Cr4CrgCA.js","assets/boiler-CWAR1Nq2.js","assets/stages-hidkaJPI.js","assets/pharma-cleanroom-ClJRwROz.js","assets/rtu-D-1lltcO.js","assets/commercial-building-CNvi6IZK.js","assets/genset-BRgqR1AT.js","assets/backup-power-BDMAO2bO.js"])))=>i.map(i=>d[i]);
2
+ import{d as e}from"./chunk-OE4NN4TA-DBWZidbW.js";var t=new Map([[`smart-factory`,()=>e(()=>import(`./smart-factory-cem4tLAv.js`).then(e=>e.smartFactoryFloor),__vite__mapDeps([0,1,2,3,4,5,6,7]))],[`water-treatment`,()=>e(()=>import(`./water-treatment-CfVR0p0L.js`).then(e=>e.waterFloor),__vite__mapDeps([8,1,2,3,7,5,6,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33]))],[`district-heating`,()=>e(()=>import(`./district-heating-Cr4CrgCA.js`).then(e=>e.heatingFloor),__vite__mapDeps([34,1,2,3,35,5,6,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,36]))],[`pharma-cleanroom`,()=>e(()=>import(`./pharma-cleanroom-ClJRwROz.js`).then(e=>e.pharmaFloor),__vite__mapDeps([37,1,2,3,38,5,6,35,4,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,36]))],[`commercial-building`,()=>e(()=>import(`./commercial-building-CNvi6IZK.js`).then(e=>e.buildingFloor),__vite__mapDeps([39,1,2,3,38,5,6,35,4,40,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,36]))],[`backup-power`,()=>e(()=>import(`./backup-power-BDMAO2bO.js`).then(e=>e.backupFloor),__vite__mapDeps([41,1,2,3,4,5,6,7,40,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,36]))]]);function n(e){return t.has(e)}function r(e){return`/floor/${encodeURIComponent(e)}`}var i=new Map;function a(e){let n=i.get(e);if(!n){let r=t.get(e);if(!r)throw Error(`No floor for template '${e}'. Add it to FLOORS in layouts/registry.ts.`);n=r(),i.set(e,n)}return n}export{n,a as r,r as t};
@@ -1 +1 @@
1
- import{n as e}from"./utils-BO2u-wC_.js";var t=e(`rocket`,[[`path`,{d:`M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5`,key:`qeys4`}],[`path`,{d:`M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09`,key:`u4xsad`}],[`path`,{d:`M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z`,key:`676m9`}],[`path`,{d:`M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05`,key:`92ym6u`}]]);export{t};
1
+ import{n as e}from"./utils-XFKvwlFT.js";var t=e(`rocket`,[[`path`,{d:`M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5`,key:`qeys4`}],[`path`,{d:`M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09`,key:`u4xsad`}],[`path`,{d:`M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z`,key:`676m9`}],[`path`,{d:`M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05`,key:`92ym6u`}]]);export{t};
@@ -0,0 +1 @@
1
+ import{c as e,n as t,s as n}from"./dom-Cm_OH5jc.js";import{C as r,I as i,_ as a,c as o,d as s,g as c,h as l,s as u,w as d,y as f}from"./status-CZFZLqVk.js";var p=15,m=3,h=28,g=m+h,_=[0,.18,.4,.6,.74,1],v=34;function y(e,t=4){let n=t=>-e/2+e*t,r=e=>(n(_[e]??0)+n(_[e+1]??0))/2;return{intake:[r(0),-p,m+14],chwSupply:[r(2)-t,-6,g+4],chwReturn:[r(2)+t,-6,g+4],steam:[r(3),-6,g+4],discharge:[r(4),p+3,g-9]}}var b=(e,t=!1)=>({x:-e/2,y:-p-1,w:e+(t?v:0),d:p*2+2,r:2});function x(e,t){let{G:n,P:r,S:i,slab:a}=e,o=t/2-1,s=m+14,c=n.frameAlong([o,0,s],[1,0,0]),l=n.frameAlong([o+10,0,s],[1,0,0]);return[a({x:o,y:-12,w:v,d:24,r:1},0,m,{tone:`lo`},2,0),a({x:o+12,y:-9,w:17,d:18,r:1},m,s-7.4-m,{tone:`lo`},2,0),i(n.disc(0,9.5,4.6,c,r),{tone:`mid`,crease:`lo`}),i(n.solidOf([[0,6.2],[1.6,7.4],[21,7.4],[22.6,6.2]],l,r),{tone:`mid`,inner:e.k.fadedSvg(n.ribsOf(l,1.6,21,7.4,16,r,{fade:[.1,.55],seams:!0}),{tone:`lo`})}),i(n.disc(22.6,26.4,5.6,l,r),{tone:`mid`}),a({x:o+17,y:-4.2,w:9,d:8.4,r:.8},s+7,4.4,{tone:`mid`},2,.3)].join(``)}function S(e,t,n,r={}){let{k:a,G:o,P:s,S:c,L:l,D:u,slab:d,cyl:f,hmi:v,at:b}=e,{stubHalf:S=4,humidifier:C=!0,filterGauge:w=!0,fanHook:T=`data-fan`,motor:E=!1}=r,D=e=>-n/2+n*e,O=y(n,S),k=[];k.push(d({x:-n/2,y:-p-1,w:n,d:p*2+2,r:1},0,m,{tone:`lo`},2,0));let A={x:-n/2+1,y:-p,w:n-2,d:p*2,r:1.2},j=_.slice(1,-1).map(e=>a.segment([D(e),p,m],[D(e),p,g],s)+a.segment([D(e),p,g],[D(e),-p,g],s)).join(``);k.push(c(a.slabOf(A,m,h,s,2,.5),{tone:`mid`,inner:l(j,{tone:`faint`})}));let M=e.front(p),[N,P]=[D(_[1])+2,D(_[2])-2];if(k.push(`<g transform="${M}"><path class="iso-line" data-tone="lo" fill="none" d="M${N} ${-(m+3)}H${P}V${-(g-3)}H${N}Z"/><path class="sf-grime" data-foul="" style="opacity:0" d="M${N+.5} ${-(m+3.5)}H${P-.5}V${-(g-3.5)}H${N+.5}Z"/></g>`),k.push(u([m+9,g-9].map(e=>b([P-2,p,e])),{size:.4})),w&&k.push(i(M,`${t}:hepa`,(N+P)/2-2,g-9,3)),C){let e=b([O.steam[0],p,m+8]);k.push(`<circle class="cr-lamp" data-hum="" cx="${e[0].toFixed(2)}" cy="${e[1].toFixed(2)}" r="${(.8*s.scale).toFixed(2)}"/>`)}k.push(v(t,p,D(_[2])+2,D(_[3])-2,m+4,g-4));let F=(e,t)=>{let n=o.frameAlong([e[0],e[1],g],[0,0,1]);return c(o.disc(0,e[2]-g-1.4,t,n,s),{tone:`mid`})+c(o.disc(e[2]-g-1.4,e[2]-g,t+1.2,n,s),{tone:`mid`})};k.push(F(O.chwSupply,1.8),F(O.chwReturn,1.8)),C&&k.push(F(O.steam,1.6));let I=(D(_[4])+D(_[5]))/2,L=Math.min(10,(D(_[5])-D(_[4]))/2-3);k.push(f(I,0,L+1,g,1.4,{tone:`mid`},40)),k.push(l(a.ring(I,0,L-1,g+1.4,s,40),{tone:`lo`}));let R=`${n/2+14},0,${m+14}`,z=T===`data-vfan`?` data-axis="z" data-top="${n/2+18},0,${m+22}" data-bearing="${R}"`:``;k.push(`<path class="iso-line" data-tone="mid" ${T}="${I},0,${g+1.4},${L-1}"${z} d=""/>`),k.push(l(a.ring(I,0,2,g+1.4,s,16),{tone:`mid`}));let[B,V,H]=O.discharge,U=o.frameAlong([B,p,H],[0,1,0]);return k.push(c(o.disc(0,V-p-1.4,3,U,s),{tone:`mid`}),c(o.disc(V-p-1.4,V-p,4.2,U,s),{tone:`mid`})),E&&k.push(x(e,n)),k.join(``)}var C=46,w=20,T=4,E=32,D=[-32,0,E+4],O={x:-C,y:-w,w:C*2,d:w*2,r:2};function k(e,t,n=`top`){let{k:r,G:i,P:a,S:o,L:s,D:c,slab:l,cyl:u,hmi:d,screws:f}=e,p=[];p.push(l({x:-C+2,y:-w+2,w:C*2-4,d:w*2-4,r:1},0,T,{tone:`lo`},2,0));let m={x:-C,y:-w,w:C*2,d:w*2,r:1.5},h=[];for(let e=-w+3;e<=w-3;e+=2)h.push(r.segment([C,e,T+4],[C,e,E-4],a));let g=r.segment([4,w,T],[4,w,E],a)+r.segment([4,w,E],[4,-w,E],a);p.push(o(r.slabOf(m,T,E-T,a,3,.6),{tone:`mid`,inner:s(h.join(``),{tone:`faint`})+s(g,{tone:`lo`})}));let _=e.front(w);p.push(l({x:-C+3,y:w,w:18,d:5,r:.6},T+10,16,{tone:`mid`},2,.3));let v=[16,19.5,23,26.5].map(e=>`M${-C+5} ${-e}H${-C+19}`).join(``);if(p.push(`<g transform="${e.front(w+5)}"><path class="iso-line" data-tone="lo" d="${v}"/></g>`),p.push(`<g transform="${_}"><path class="iso-line" data-tone="lo" fill="none" d="M-24 ${-(T+3)}H-6V${-(E-3)}H-24Z"/><path class="sf-grime" data-foul="" style="opacity:0" d="M-23.5 ${-(T+3.5)}H-6.5V${-(E-3.5)}H-23.5Z"/><path class="iso-line" data-tone="lo" fill="none" d="M24 ${-(T+3)}H42V${-(E-3)}H24Z"/></g>`),p.push(c([T+8,E-8].flatMap(t=>[e.at([-8,w,t]),e.at([40,w,t])]),{size:.4})),p.push(`<path class="iso-line" data-rtu="33,${w},${E-8}" d=""/>`),p.push(d(t,w,7,21,T+5,E-5)),n===`top`){let e=i.frameAlong([D[0],D[1],E],[0,0,1]);p.push(o(i.disc(0,2.6,5,e,a),{tone:`mid`}),o(i.disc(2.6,4,6.2,e,a),{tone:`mid`}))}for(let e of[16,34])p.push(u(e,0,9.5,E,2,{tone:`mid`},40)),p.push(s(r.ring(e,0,8,E+2,a,40),{tone:`lo`})),p.push(`<path class="iso-line" data-tone="mid" data-fan="${e},0,${E+2},8" d=""/>`),p.push(s(r.ring(e,0,1.6,E+2,a,16),{tone:`mid`}));return p.push(f(r.corners(m,2.5),E)),p.join(``)}function A(i,p){let{svg:m,P:h,feed:g}=i,_=(e,t)=>g.num(e,t),v=t(m,`[data-rtu]`).map(e=>{let i=u(e),a=e=>t(m,`[data-asset="${i}"] ${e}`);return{id:i,leak:o(e.dataset.rtu),fans:a(`[data-fan]`).map(e=>({el:e,at:n(e.dataset.fan)})),foul:a(`[data-foul]`),hiss:f(r(m,i),`frost`),rate:0,spin:0}}),y=new Map(v.map(e=>[e.id,e])),b=e=>c(_(e,`supply_airflow_cfm`)/g.param(e,`rated_airflow_cfm`,12e3));return{draw(t,n,r){let o=i.reducedMotion();for(let i of v){let c=_(i.id,`compressor_stage2_active`)>0?1.4:_(i.id,`compressor_stage1_active`)>0?.9:0;i.rate=a(i.rate,c,t,1.2,o),o||(i.spin+=i.rate*l*t);for(let{el:t,at:n}of i.fans)e(t,`d`,s(h,n,i.spin));let u=e=>r&&d(g,i.id,e);i.hiss.draw(u(`refrigerant_leak`)&&!o,n,h,i.leak,[.3,1]);let f=u(`dirty_filter`)?`0.85`:`0`;for(let e of i.foul)e.style.opacity=f;p(i.id,o?0:u(`compressor_failure`)?.3:0,n)}},bar(e){return y.has(e)?b(e):void 0},airPu:b}}export{b as a,k as i,O as n,y as o,D as r,S as s,A as t};
@@ -0,0 +1 @@
1
+ import{a as e,c as t,d as n,f as r,i,l as a,m as o,n as s,o as c,ot as l,p as u,r as d,s as f,t as p,u as m}from"./vendor-ui-D8j69UH4.js";import{t as h}from"./utils-XFKvwlFT.js";import{t as g}from"./check-B-yvIfMj.js";import{t as _}from"./chevron-down-x70Pto6j.js";var v=l(),y=o;function b({className:e,...t}){return(0,v.jsx)(d,{"data-slot":`select-group`,className:h(`scroll-my-1 p-1`,e),...t})}function x({className:e,...t}){return(0,v.jsx)(r,{"data-slot":`select-value`,className:h(`flex flex-1 text-left`,e),...t})}function S({className:e,size:t=`default`,children:r,...i}){return(0,v.jsxs)(u,{"data-slot":`select-trigger`,"data-size":t,className:h(`flex w-fit min-w-0 items-center justify-between gap-1.5 rounded-[var(--miravo-radius-stadium-sm)] border border-input bg-input/30 px-2.5 text-xs whitespace-nowrap transition-colors outline-none select-none hover:bg-input/50 focus-visible:border-primary/35 focus-visible:ring-2 focus-visible:ring-primary/22 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[var(--miravo-radius-stadium-sm)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...i,children:[r,(0,v.jsx)(n,{render:(0,v.jsx)(_,{className:`pointer-events-none size-4 text-muted-foreground`})})]})}function C({className:e,children:n,side:r=`bottom`,sideOffset:i=6,align:o=`center`,alignOffset:s=0,alignItemWithTrigger:c=!1,...l}){return(0,v.jsx)(m,{children:(0,v.jsx)(a,{side:r,sideOffset:i,align:o,alignOffset:s,alignItemWithTrigger:c,className:`isolate z-50`,children:(0,v.jsx)(t,{"data-slot":`select-content`,"data-align-trigger":c,className:h(`relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-[var(--miravo-radius-tight)] bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none 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-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),...l,children:(0,v.jsx)(f,{children:n})})})})}function w({className:e,...t}){return(0,v.jsx)(s,{"data-slot":`select-label`,className:h(`px-2 py-1.5 text-xs text-muted-foreground`,e),...t})}var T=`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 text-muted-foreground 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 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2`;function E({className:t,children:n,...r}){return(0,v.jsxs)(c,{"data-slot":`select-item`,className:h(T,t),...r,children:[(0,v.jsx)(i,{"data-slot":`select-item-text`,className:`flex min-w-0 flex-1 gap-2 whitespace-nowrap`,children:n}),(0,v.jsx)(e,{render:(0,v.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex size-4 items-center justify-center`}),children:(0,v.jsx)(g,{className:`pointer-events-none`})})]})}function D({className:e,...t}){return(0,v.jsx)(p,{"data-slot":`select-separator`,className:h(`pointer-events-none -mx-1 my-1 h-px bg-border`,e),...t})}export{w as a,x as c,E as i,C as n,D as o,b as r,S as s,y as t};
@@ -1 +1 @@
1
- import{ot as e}from"./vendor-ui-D8j69UH4.js";import{t}from"./utils-BO2u-wC_.js";var n=e();function r({className:e,...r}){return(0,n.jsx)(`div`,{className:`relative w-full overflow-x-auto`,children:(0,n.jsx)(`table`,{"data-slot":`table`,className:t(`min-w-full caption-bottom text-sm`,e),...r})})}function i({className:e,...r}){return(0,n.jsx)(`thead`,{"data-slot":`table-header`,className:t(`[&_tr]:border-b`,e),...r})}function a({className:e,...r}){return(0,n.jsx)(`tbody`,{"data-slot":`table-body`,className:t(`[&_tr:last-child]:border-0`,e),...r})}function o({className:e,...r}){return(0,n.jsx)(`tr`,{"data-slot":`table-row`,className:t(`border-b transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground data-[state=selected]:bg-sidebar-accent data-[state=selected]:text-sidebar-accent-foreground`,e),...r})}function s({className:e,...r}){return(0,n.jsx)(`th`,{"data-slot":`table-head`,className:t(`h-10 px-1.5 text-left align-middle font-medium whitespace-nowrap text-foreground sm:px-2 [&:has([role=checkbox])]:pr-0`,e),...r})}function c({className:e,...r}){return(0,n.jsx)(`td`,{"data-slot":`table-cell`,className:t(`p-1.5 align-middle whitespace-nowrap sm:p-2 [&:has([role=checkbox])]:pr-0`,e),...r})}var l=[{value:`all`,label:`All events`},{value:`fault:triggered`,label:`Fault Triggered`},{value:`fault:cleared`,label:`Fault Cleared`},{value:`lifecycle:changed`,label:`Lifecycle Changed`},{value:`asset:maintenance`,label:`Maintenance`},{value:`asset:created`,label:`Asset Created`},{value:`asset:removed`,label:`Asset Removed`},{value:`engine:state-changed`,label:`Engine State`}],u=[{value:`all`,label:`All status`},{value:`healthy`,label:`Healthy`},{value:`faulted`,label:`Faulted`},{value:`quarantined`,label:`Quarantined`}];export{c as a,o as c,a as i,u as n,s as o,r,i as s,l as t};
1
+ import{ot as e}from"./vendor-ui-D8j69UH4.js";import{t}from"./utils-XFKvwlFT.js";var n=e();function r({className:e,...r}){return(0,n.jsx)(`div`,{className:`relative w-full overflow-x-auto`,children:(0,n.jsx)(`table`,{"data-slot":`table`,className:t(`min-w-full caption-bottom text-sm`,e),...r})})}function i({className:e,...r}){return(0,n.jsx)(`thead`,{"data-slot":`table-header`,className:t(`[&_tr]:border-b`,e),...r})}function a({className:e,...r}){return(0,n.jsx)(`tbody`,{"data-slot":`table-body`,className:t(`[&_tr:last-child]:border-0`,e),...r})}function o({className:e,...r}){return(0,n.jsx)(`tr`,{"data-slot":`table-row`,className:t(`border-b transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground data-[state=selected]:bg-sidebar-accent data-[state=selected]:text-sidebar-accent-foreground`,e),...r})}function s({className:e,...r}){return(0,n.jsx)(`th`,{"data-slot":`table-head`,className:t(`h-10 px-1.5 text-left align-middle font-medium whitespace-nowrap text-foreground sm:px-2 [&:has([role=checkbox])]:pr-0`,e),...r})}function c({className:e,...r}){return(0,n.jsx)(`td`,{"data-slot":`table-cell`,className:t(`p-1.5 align-middle whitespace-nowrap sm:p-2 [&:has([role=checkbox])]:pr-0`,e),...r})}var l=[{value:`all`,label:`All events`},{value:`fault:triggered`,label:`Fault Triggered`},{value:`fault:cleared`,label:`Fault Cleared`},{value:`lifecycle:changed`,label:`Lifecycle Changed`},{value:`asset:maintenance`,label:`Maintenance`},{value:`asset:created`,label:`Asset Created`},{value:`asset:removed`,label:`Asset Removed`},{value:`engine:state-changed`,label:`Engine State`}],u=[{value:`all`,label:`All status`},{value:`healthy`,label:`Healthy`},{value:`faulted`,label:`Faulted`},{value:`quarantined`,label:`Quarantined`}];export{c as a,o as c,a as i,u as n,s as o,r,i as s,l as t};
@@ -1 +1 @@
1
- import{n as e}from"./utils-BO2u-wC_.js";var t=e(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),n=e(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),r=e(`server`,[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]);export{n,t as r,r as t};
1
+ import{n as e}from"./utils-XFKvwlFT.js";var t=e(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),n=e(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),r=e(`server`,[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]);export{n,t as r,r as t};
@@ -0,0 +1 @@
1
+ import{n as e}from"./utils-XFKvwlFT.js";var t=e(`gauge`,[[`path`,{d:`m12 14 4-4`,key:`9kzdfg`}],[`path`,{d:`M3.34 19a10 10 0 1 1 17.32 0`,key:`19p75a`}]]),n=e(`sliders-horizontal`,[[`path`,{d:`M10 5H3`,key:`1qgfaw`}],[`path`,{d:`M12 19H3`,key:`yhmn1j`}],[`path`,{d:`M14 3v4`,key:`1sua03`}],[`path`,{d:`M16 17v4`,key:`1q0r14`}],[`path`,{d:`M21 12h-9`,key:`1o4lsq`}],[`path`,{d:`M21 19h-5`,key:`1rlt1p`}],[`path`,{d:`M21 5h-7`,key:`1oszz2`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M8 12H3`,key:`a7s4jb`}]]);export{t as n,n 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{C as r,F as i,I as a,N as o,T as s,_ as c,a as l,b as u,c as d,d as f,f as p,l as m,m as h,n as g,o as _,p as v,s as y,t as b,v as x,x as S,y as C,z as w}from"./dom-Cm_OH5jc.js";import{B as T,C as E,D,E as O,F as k,G as A,H as j,I as M,J as N,K as P,L as ee,M as te,P as ne,R as F,S as re,T as I,U as ie,V as ae,W as oe,X as se,Y as ce,_ as L,a as le,b as ue,g as de,h as fe,i as pe,j as me,l as he,m as ge,n as _e,o as ve,p as ye,q as R,r as be,t as xe,u as Se,v as z,w as Ce,x as we,y as Te,z as Ee}from"./status-CZFZLqVk.js";import{n as De,r as Oe,t as ke}from"./chiller-BSx8eUMN.js";import{n as Ae,t as je}from"./compressor-D63w6Ir2.js";var Me=7.2,B=-156,V=4.8,H=33.6,Ne=H+4.4,Pe=59,Fe=[[B,28.4,V],[B,H+2.4,V]],Ie=[[B,Ne,V+4.2],[B,Ne,Pe],[B,22,Pe],[-112,22,Pe]],Le=1.2,Re=1.6,ze=4;function Be(e){let t=(t,n,r,i)=>({id:t,medium:`water`,r,path:e.G.fillet(n,i,12,{P:e.P,tube:r}),reverse:!1,capped:[!0,!0],slots:[],group:t});return[t(`wash-suction`,Fe,Le,2),t(`wash-spray`,Ie,Re,ze)]}function Ve(e,t,n){let{k:r,G:i,P:a,at:o,S:s,L:c,slab:l,cyl:u,hmi:d,andon:f,screws:p,conveyor:m}=e,h=m(-176,92,4,24,23),g={x:-150,y:0,w:42,d:32,r:2},_=[0,1,2,3].map(e=>r.pathOf(r.roundedPlan({x:g.y+6+e*5.4,y:35,w:1.8,d:14,r:.9},3).map(([e,t])=>o([g.x+g.w,e,t])),!0)).join(``),v={x:-168,y:5,w:74,d:22,r:1},y=i.frameAlong([-98,34.5,10],[0,1,0]);return[l(v,0,Me,{tone:`lo`},2,0),`<path class="sf-void" d="${r.pathOf(r.roundedPlan(r.insetPlan(v,1),2).map(([e,t])=>o([e,t,Me])),!0)}"/>`,`<path class="sf-water" d="${r.pathOf(r.roundedPlan(r.insetPlan(v,3),2).map(([e,t])=>o([e,t,Me])),!0)}"/>`,h.back,h.belt,l({x:-85,y:8,w:4,d:14,r:.3},23.4,.6,{tone:`mid`},2,0),`<g data-belt="wash" data-x0="-175" data-x1="-86" data-y0="4" data-y1="28" data-z="${h.top}"><path class="iso-line" data-tone="faint" data-cleats="" d=""/><g data-parts-back=""></g></g>`,`<g data-robot-late="1" data-asset="${n}" class="sf-robot"></g>`,s(r.slabOf(g,24,30,a,3,.8),{tone:`mid`,inner:c(r.sideSeam(g,43,a,3)+r.sideSeam(g,27,a,3),{tone:`faint`})+c(_,{tone:`lo`})}),p(r.corners(g,2.2),54),u(-121,10,4,54,10,{tone:`mid`,inner:c(r.sideArc(-121,10,4,59,a,24),{tone:`faint`})},24),u(-121,10,5.2,64,1.6,{tone:`mid`},24),`<g data-steam="-121,10,66"></g>`,f(t,-144,6,54),u(-128,22,1.4,54,4,{tone:`mid`},12),u(-117,22,1.4,54,4,{tone:`mid`},12),d(t,32,-146,-112,28,49),`<path class="sf-void" d="${r.pathOf([[-108,5,24.2],[-108,27,24.2],[-108,27,33.4],[-108,5,33.4]].map(e=>o(e)),!0)}"/>`,`<path class="sf-flaps" data-flaps="" d=""/>`,l({x:-104,y:.4,w:2,d:2,r:.4},27,11,{tone:`mid`},2,0),l({x:-104,y:29.6,w:2,d:2,r:.4},27,11,{tone:`mid`},2,0),s(i.solidOf([[0,1.3],[31.2,1.3]],i.frameAlong([-103,.4,37.4],[0,1,0]),a),{tone:`mid`,crease:`none`}),`<g class="sf-fx" data-airknife="-103,16,35.4"></g>`,`<g data-parts-front="wash"></g>`,`<g class="sf-fx" data-drips=""></g>`,h.front,l({x:-103,y:30.5,w:10,d:4,r:.8},4,12,{tone:`mid`},2,.3),s(i.solidOf([[0,3.6],[.6,4.2],[9,4.2],[9.6,3.6]],y,a),{tone:`mid`,inner:r.fadedSvg(i.ribsOf(i.frameAlong([-98,34.5,10],[0,1,0]),.6,9,4.2,14,a,{fade:[.1,.55],seams:!0}),{tone:`lo`})}),s(i.disc(9.6,11,2.8,y,a),{tone:`mid`}),He(e)].join(``)}function He(e){let{k:t,G:n,P:r,S:i,D:a,slab:o,cyl:s,screws:c}=e,l=n.frameAlong([B,H,V],[0,1,0]);return[i(n.disc(0,1.2,2.2,n.frameAlong([B,27,V],[0,1,0]),r),{tone:`mid`}),T(e,Fe,Le,`mid`,2,`water`,[!1,!1]),`<g data-glints="wash-suction"></g>`,o({x:B-5,y:H+1,w:10,d:18,r:.8},0,1.2,{tone:`lo`},2,.3),c([[B-3.6,H+2.4],[B+3.6,H+2.4],[B-3.6,H+17.6],[B+3.6,H+17.6]],1.2),i(n.disc(2.4,6.4,3.6,l,r),{tone:`mid`,crease:`lo`}),i(n.disc(6.4,8,2.2,l,r),{tone:`mid`}),i(n.solidOf([[8,2.8],[8.4,3.2],[16.4,3.2],[16.8,2.8]],l,r),{tone:`mid`,inner:t.fadedSvg(n.ribsOf(l,8.4,16.4,3.2,12,r,{fade:[.1,.55],seams:!0}),{tone:`lo`})}),i(n.disc(16.8,18,2.6,l,r),{tone:`mid`}),a(n.dotsOf(n.frameAlong([B,H+18,V],[0,1,0]),0,1.6,6,r,{all:!0}),{size:.35}),s(B,Ne,2.4,V+3,1.2,{tone:`mid`},20),T(e,Ie,Re,`mid`,ze,`water`,[!1,!1]),`<g data-glints="wash-spray"></g>`,i(n.disc(0,1.2,2.2,n.frameAlong([-112,22,Pe],[1,0,0]),r),{tone:`mid`})].join(``)}var Ue=[[`cnc`,`cnc-spindle`],[`robot`,`industrial-robot`],[`wash`,`belt-conveyor`],[`press`,`hydraulic-press`],[`test`,`belt-conveyor`],[`packer`,`industrial-robot`]],We=[[`chiller`,`industrial-chiller`],[`comp`,`air-compressor`],[`pump`,`centrifugal-pump`],[`amr`,`industrial-robot`]];function Ge({template:e,assets:t,line:n}){if(n===void 0)return{status:`pending`};let r=new Set(e.assetIds),i=new Map(t.filter(e=>r.has(e.id)).map(e=>[e.id,e.model])),a=new Map;for(let[e,[t,r]]of Ue.entries()){let o=n.stations[e]?.id;if(!o||i.get(o)!==r)return{status:`mismatch`};a.set(t,o)}let o=new Set(a.values());for(let[e,t]of We){let n=[...i].filter(([e,n])=>n===t&&!o.has(e)),r=n.length===1?n[0]?.[0]:void 0;if(!r)return{status:`mismatch`};a.set(e,r)}let s=e=>a.get(e)??``;return{status:`ready`,ids:{cnc:s(`cnc`),robot:s(`robot`),wash:s(`wash`),press:s(`press`),test:s(`test`),packer:s(`packer`),chiller:s(`chiller`),comp:s(`comp`),pump:s(`pump`),amr:s(`amr`)}}}function Ke(e){return[{key:e.cnc,assetId:e.cnc,name:`CNC machining centre`,kind:`station`},{key:e.robot,assetId:e.robot,name:`Unload robot`,kind:`station`},{key:e.wash,assetId:e.wash,name:`Parts washer`,kind:`station`},{key:e.press,assetId:e.press,name:`Hydraulic press`,kind:`station`},{key:e.test,assetId:e.test,name:`Inspection conveyor`,kind:`station`},{key:e.packer,assetId:e.packer,name:`Packing robot`,kind:`station`},{key:e.chiller,assetId:e.chiller,name:`Process chiller`,kind:`utility`},{key:e.comp,assetId:e.comp,name:`Air compressor`,kind:`utility`},{key:e.pump,assetId:e.pump,name:`Coolant pump`,kind:`utility`},{key:e.amr,assetId:e.amr,name:`AMR tote shuttle`,kind:`utility`}]}var qe=9.5,Je=162,Ye=176.8;function Xe(e,t){let n=e.id===`wash`?t.wash:e.id===`test`?t.test:null;return{...e,station:n,phase:0,speed:0,items:[],good:-1,scrap:-1,starved:0}}var Ze=(e,t)=>!e.items.some(e=>!e.push&&Math.abs(e.x-t)<9.5),U=(e,t)=>e.find(e=>e.id===t),Qe=(e,t)=>{e.items.push({x:t,push:0,out:!1})};function $e(e,t,n,r,i,a){let o=e.id===`feed`?e.items.some(t=>t.x<e.x1-6.5):n?.state===`running`;if(e.speed=L(e.speed,o?7*a:0,t,.4,i),e.phase=(e.phase+e.speed*t)%6,n){if(e.starved=n.state===`starved`?e.starved+t:0,e.starved>3)for(let t of e.items)t.push||(t.out=!0);if(e.good>=0&&n.good>e.good)for(let t=n.good-e.good;t>0;t--){let t=e.items.filter(e=>!e.out&&!e.push).sort((e,t)=>t.x-e.x)[0];t&&(t.out=!0)}if(e.scrap>=0&&n.scrap>e.scrap){let t=e.items.filter(e=>!e.out&&!e.push).sort((e,t)=>Math.abs(e.x-Je)-Math.abs(t.x-Je))[0];t&&(t.push=.001,t.x0=t.x)}e.good=n.good,e.scrap=n.scrap}let s=e.id===`test`?Ye:e.x1-6,c=e.id===`wash`&&r!==void 0&&!Ze(r,e.x1+3),l=s,u=c?e.x1+2.9:1/0;for(let n of[...e.items].sort((e,t)=>t.x-e.x)){if(n.push){n.push+=t/1.1,n.x=(n.x0??n.x)+(Je-(n.x0??n.x))*Math.min(1,n.push*3);continue}if(n.out){e.id===`test`?n.x=Math.min(n.x+Math.max(e.speed,5)*t,l,Ye):n.x=Math.max(n.x,Math.min(n.x+Math.max(e.speed,5)*t,u)),l=u=n.x-qe;continue}n.x=Math.min(n.x+e.speed*t,l),l=u=n.x-qe}if(e.id===`wash`&&r)for(let t of e.items)!t.push&&t.x>=e.x1+3&&r.items.push({x:t.x,push:0,out:!1});e.items=e.items.filter(t=>t.push?t.push<1:t.x<e.x1+3)}function et(e,t,n,r,i){let a=U(e,`feed`);for(let o of e)$e(o,t,o.station?n(o.station):void 0,a,r,o.station?i(o.station):1)}function tt(e,t){for(let[n,r]of t){let t=e.get(n);if(t&&r.good+r.scrap-t.good-t.scrap>2)return!0}return!1}var nt=42.4,rt=3.6,it=5.8,at=41,ot=50.9,st=18.9,ct=[32,83],lt=87,ut=e=>{let t=1.5/it,n=2.3/it,r=4.3/it;return e<t?.85*z(e/t):e<n?.85+.15*((e-t)/(n-t)):e<r?1:1-z((e-r)/(1-r))},dt=e=>-((e-28)/56)*2.6,ft=e=>Math.min(3,Math.max(1,e/3));function pt(){return{stroke:{t:-1},ram:0,die:{has:!1,pressed:!1,done:0,good:-1,h:null,hit:!1,jolt:0},loader:{phase:`idle`,t:0,x:0,lead:!1},unloader:{phase:`idle`,t:0,x:0,z:6},chute:{x:null,v:0},counts:{strokes:0,loads:0,unloads:0}}}function mt(e){Object.assign(e.die,{has:!1,done:0,good:-1}),e.chute.x=null}var ht=(e,t)=>e.ram<20&&(t.simSpeed>=5?e.stroke.t<0:t.phase===0||t.phase===6),gt=e=>70-Math.max(0,Math.min(278,e))/278*nt;function _t(e,t,n){e.stroke.t<0&&e.die.has&&!e.die.pressed&&e.loader.phase===`idle`&&(n.simSpeed>=5||n.phase>=1&&n.phase<=4)&&(e.stroke.t=0,e.counts.strokes++),e.stroke.t>=0?(e.stroke.t+=t/Math.max(1.2,it/n.simSpeed),e.ram=278*ut(Math.min(1,e.stroke.t)),e.stroke.t>=1&&(e.stroke.t=-1)):e.ram=L(e.ram,0,t,.3,n.still)}var W=(e,t,n,r)=>(e.t+=n/(r.still?.01:t/ft(r.simSpeed)),z(Math.min(1,e.t)));function vt(e,t,n,r,i){let{die:a,loader:o,unloader:s,chute:c}=e;n.pressGood!==void 0&&(a.good>=0&&n.pressGood>a.good&&(a.done=Math.min(a.done+n.pressGood-a.good,3)),a.good=n.pressGood);let l=r.items.find(e=>e.x>=-41.5);o.lead=!!l,l&&o.phase===`idle`&&s.phase===`idle`&&!a.has&&ht(e,n)&&(r.items.splice(r.items.indexOf(l),1),o.phase=`push`,o.t=0),o.phase===`push`?(o.x=W(o,1.5,t,n)*at,o.t>=1&&(a.has=!0,a.pressed=!1,a.h=null,e.counts.loads++,o.phase=`back`,o.t=0)):o.phase===`back`&&(o.x=(1-W(o,.9,t,n))*at,o.t>=1&&(o.phase=`idle`,o.t=0)),s.phase===`idle`&&o.phase===`idle`&&a.has&&a.pressed&&a.done>0&&c.x===null&&ht(e,n)&&(s.phase=`lower`,s.t=0),s.phase===`lower`?(s.z=6*(1-W(s,.25,t,n)),s.t>=1&&(s.phase=`push`,s.t=0,a.has=!1,a.done--,e.counts.unloads++)):s.phase===`push`?(s.x=W(s,1.4,t,n)*ot,s.t>=1&&(s.phase=`lift`,s.t=0,c.x=ct[0],c.v=0)):s.phase===`lift`?(s.z=6*W(s,.2,t,n),s.t>=1&&(s.phase=`back`,s.t=0)):s.phase===`back`&&(s.x=(1-W(s,.9,t,n))*ot,s.t>=1&&(s.phase=`idle`,s.t=0)),c.x!==null&&(c.v=Math.min(14,c.v+16*t),c.x=Math.min(ct[1],c.x+c.v*t),c.x>=ct[1]&&(c.v=0,Ze(i,lt)&&(Qe(i,lt),c.x=null)));let u=gt(e.ram);if(a.has){o.phase===`push`&&(a.pressed=!1);let e=a.pressed?rt:Math.max(rt,Math.min(5,u-24));e<=3.75&&(a.pressed=!0);let t=e.toFixed(2);a.h!==t&&(a.h=t),u<27.900000000000002&&!a.hit&&(a.hit=!0,a.jolt=.22),u>40&&(a.hit=!1)}a.jolt=Math.max(0,a.jolt-t)}function yt(e){return g(e,`[data-belt]`).map(e=>({id:e.dataset.belt??``,x0:+(e.dataset.x0??0),x1:+(e.dataset.x1??0),y0:+(e.dataset.y0??0),y1:+(e.dataset.y1??0),z:+(e.dataset.z??0)}))}var bt=new Map([[`wash`,[-152,-106]]]),G=-108,xt=129;function St(e,t){let{svg:n,P:i}=e,o=i.scale,c=t.map(e=>{let t=b(n,`[data-belt="${e.id}"]`),r=t?b(t,`[data-parts-back]`):null,a=b(n,`[data-parts-front="${e.id}"]`),o=ge(he,e.z,e.id===`test`?rt:5,i),s=Array.from({length:7},()=>{let e=_(`g`,{}),t=_(`g`,{});return e.innerHTML=t.innerHTML=o,e.style.display=t.style.display=`none`,r?.append(e),a?.append(t),{back:e,front:t}});return{b:e,cleats:t?b(t,`[data-cleats]`):null,pool:s}}),u=b(n,`[data-flaps]`),f=b(n,`[data-airknife]`),p=y(f?.dataset.airknife),m=Array.from({length:10},(e,t)=>({el:_(`circle`,{class:`sf-hiss`,style:`display:none`},f),seed:t*.618%1})),h=b(n,`[data-drips]`),g=Array.from({length:10},(e,t)=>({el:_(`ellipse`,{class:`sf-drip-w`,rx:`0.4`,ry:`0.7`,style:`display:none`},h),seed:t*.382%1})),v=b(n,`[data-eye="test"]`);function x(e,n){let a=U(t,`wash`);if(!a)return;let s=0;for(let e of a.items)s=Math.max(s,Math.exp(-(((e.x-G)/3.2)**2)));let c=``;for(let t=0;t<7;t++){let n=6.2+t*3.25,a=s*3.4+Math.sin(e*6+t)*.12,[o,l]=r([G,n,33.2],i),[u,d]=r([G+a,n,24.6+s*1.2],i);c+=`M${o.toFixed(2)} ${l.toFixed(2)}L${u.toFixed(2)} ${d.toFixed(2)}`}d(u,`d`,c);let f=a.items.filter(e=>e.x>G&&e.x<G+12);g.forEach((t,a)=>{let o=f[a%Math.max(1,f.length)];if(!o||n){l(t.el,`0`);return}let s=(e*1.4+t.seed)%1,c=24-s*s*(24-Me),[u,d]=r([o.x-3+t.seed*6,10+t.seed*7%1*12,c],i);t.el.setAttribute(`cx`,u.toFixed(1)),t.el.setAttribute(`cy`,d.toFixed(1)),l(t.el,((1-(o.x-G)/12)*.85).toFixed(2))});let h=a.items.some(e=>Math.abs(e.x-(p[0]??0))<4.5)&&!n;for(let t of m){if(!h){l(t.el,`0`);continue}let n=(e*3+t.seed)%1,[a,s]=r([(p[0]??0)-1-n*5,(p[1]??0)-11+t.seed*22,(p[2]??0)-n*6],i);t.el.setAttribute(`cx`,a.toFixed(1)),t.el.setAttribute(`cy`,s.toFixed(1)),t.el.setAttribute(`r`,((.4+n*1.4)*o*.5).toFixed(2)),l(t.el,(Math.sin(Math.PI*n)*.4).toFixed(2))}}return{draw(t){x(t,e.reducedMotion());let n=!1;for(let{b:e,cleats:t,pool:r}of c){let o=``;for(let t=e.x0+2+e.phase;t<e.x1-1;t+=6)o+=s([t,e.y0+.6],[t,e.y1-.6],e.z,i);d(t,`d`,o);let c=bt.get(e.id);r.forEach((t,r)=>{let o=e.items[r],s=!!o,l=0,u=0;if(o?.push){let e=Math.max(0,(o.push-.3)/.7);l=Math.min(1,e*1.6)*24,u=e>.62?-(((e-.62)/.38)**2)*16:0}let d=o?a(i,[o.x,l,u]):``,f=s&&!!c&&o.x<c[0],p=s&&(!c||o.x>c[1]);d&&(t.back.setAttribute(`transform`,d),t.front.setAttribute(`transform`,d)),t.back.style.display=f?``:`none`,t.front.style.display=p?``:`none`,e.id===`test`&&o&&!o.push&&Math.abs(o.x-xt)<5&&(n=!0)})}return d(v,`data-on`,n?``:null),n}}}var Ct=(e,t)=>[e[0],e[1],e[2]+t],wt=e=>[e.base[0],e.base[1],e.shoulder];function Tt(e,t){let n=wt(e),r=[t[0],t[1],t[2]+e.tool],i=r[0]-n[0],a=r[1]-n[1],o=Math.hypot(i,a)||1e-6,s=r[2]-n[2],c=[i/o,a/o],l=Math.min(e.L1+e.L2-.01,Math.hypot(o,s)),u=Math.atan2(s,o)+Math.acos(Math.max(-1,Math.min(1,(e.L1*e.L1+l*l-e.L2*e.L2)/(2*e.L1*l))));return{E:[n[0]+c[0]*e.L1*Math.cos(u),n[1]+c[1]*e.L1*Math.cos(u),n[2]+e.L1*Math.sin(u)],W:r,n:[-c[1],c[0],0],yaw:Math.atan2(a,i)}}var Et=(e,t)=>[Math.atan2(t[1]-e.base[1],t[0]-e.base[0]),Math.hypot(t[0]-e.base[0],t[1]-e.base[1]),t[2]],Dt=(e,[t,n,r])=>[e.base[0]+Math.cos(t)*n,e.base[1]+Math.sin(t)*n,r];function Ot(e,t,n,r,i=0){let a=Et(e,t),o=Et(e,n),s=Math.atan2(Math.sin(o[0]-a[0]),Math.cos(o[0]-a[0]));if(i){let e=s-Math.sign(s)*2*Math.PI;Math.sin(a[0]+e/2)>Math.sin(a[0]+s/2)&&(s=e)}let c=a[1]+(o[1]-a[1])*r-i*Math.sin(Math.PI*r)*Math.min(1,Math.abs(s)/1.5);return Dt(e,[a[0]+s*r,c,a[2]+(o[2]-a[2])*r])}function kt(e,t,n,r,i){let a=Math.max(t[2],n[2])+r,o=Ot(e,t,n,z(de((i-.16)/.68)),e.tuck),s=i<.5?t[2]+(a-t[2])*z(de(i/.34)):a+(n[2]-a)*z(de((i-.66)/.34));return[o[0],o[1],s]}function At(e,t,n){return[{arc:Ct(e.pick,12),lift:4,s:1},{wait:`pick`},{lin:e.pick,s:.5},{grip:!0,s:.28},{pause:.12},{wait:`place`},{arc:t,lift:12,s:1.7},{grip:!1,s:.26},{lin:Ct(t,n?14:9),s:.32},{arc:e.home,lift:0,s:1.1,home:!0}]}function jt(e,t){let n=e.place??t.placeAt?.();if(!n)throw Error(`Robot ${e.id} has no place point. Give its RobotSpec a 'place' or its hooks a 'placeAt'.`);return{spec:e,hooks:t,state:{id:e.id,tip:e.home,from:e.home,step:-1,t:0,holding:!1,grip:0,queue:0,last:-1,dirty:!0,moved:0,eject:void 0,nestLast:-1,onNest:!1},plan:At(e,n,!!t.placeAt)}}function Mt(e){e.state.queue=0,e.state.last=-1,e.state.nestLast=-1,e.state.onNest=!1}function Nt(e,t){if(t===`pick`)return e.hooks.pending?.()??!0;if(e.hooks.canPlace)return e.hooks.canPlace();let n=e.spec.place;return!e.hooks.belt||!n?!0:Ze(e.hooks.belt,n[0])}function Pt(e,t,{own:n,nest:r,halted:i},a,o){let{spec:s,hooks:c,state:l}=e;if(n&&(l.last>=0&&n.good>l.last&&(l.queue=Math.min(2,l.queue+n.good-l.last)),l.last=n.good),r&&(l.nestLast>=0&&r.good>l.nestLast&&(l.eject=0,l.onNest=!0),l.nestLast=r.good),s.nestSel&&l.eject!==void 0&&(l.eject=Math.min(1,l.eject+t/(a?.01:.7))),!i&&(l.step<0&&l.queue>0&&o&&(l.step=0,l.t=0,l.from=l.tip,c.placeAt&&(e.plan=At(s,c.placeAt(),!0))),l.step>=0)){let n=e.plan[l.step];if(!n)throw Error(`Robot ${s.id} stepped past its plan (step ${l.step}). Plans are rebuilt on cycle start.`);let r=!1;if(n.wait)r=Nt(e,n.wait);else{l.t+=t/(a?.01:n.s??n.pause??1);let e=Math.min(1,l.t);n.arc?l.tip=kt(s,l.from,n.arc,n.lift??0,e):n.lin?l.tip=Ot(s,l.from,n.lin,z(e)):n.grip!==void 0&&(l.grip=n.grip?z(e):1-z(e)),r=l.t>=1,n.home&&l.queue>0&&e>.35&&(r=!0,l.step=-1)}r&&(n.grip===!0&&(l.holding=!0,l.onNest=!1,l.queue=Math.max(0,l.queue-1),c.onPick?.()),n.grip===!1&&(l.holding=!1,c.onPlace?c.onPlace():c.belt&&s.place&&Qe(c.belt,s.place[0]),l.moved++),l.step=l.step>=0&&l.step+1<e.plan.length?l.step+1:l.queue>0&&l.step===-1?0:-1,l.step===0&&c.placeAt&&(e.plan=At(s,c.placeAt(),!0)),l.t=0,l.from=l.tip),l.dirty=!0}}var Ft=[[`bearing_failure`,.3],[`belt_misalignment`,.15],[`belt_slip`,.1]];function It(e,t,n){let{svg:i,P:a,feed:o,ids:s}=e,c=a.scale,u=(e,...t)=>Ce(o,e,...t),f=e=>E(i,e),p=ue(i),m=f(s.press),h={age:0,puddle:_(`path`,{class:`sf-puddle`},m),sheen:_(`path`,{class:`sf-puddle-sheen`},m),drops:I(m,3,`ellipse`,`sf-drip`),splash:_(`path`,{class:`sf-splash`},m)},g=[{at:[70,-19,19],dir:[.6,1],on:()=>u(s.press,`air_pressure_loss`),hiss:Te(f(s.press))},{at:[56,-24,22],dir:[.4,-.5],on:()=>u(s.press,`overpressure`),hiss:Te(f(s.press))}],v=we(m,3,4),x=e=>e.id===`wash`?[-98,40,14]:[e.x1-3,e.y1,e.z],S=n.flatMap(e=>e.station?[{id:e.station,at:x(e),smoke:Te(f(e.station)),heat:we(f(e.station),2,3)}]:[]),C=f(s.cnc),w=[-266,30,34],T=I(C,24,`path`,`sf-spark`),D=we(C),O=b(i,`[data-spark="${s.cnc}"]`)?.parentElement?.querySelector(`.sf-hmi-head`),k=t.map(({id:e,motion:t})=>({id:e,motion:t,bleed:Te(f(e)),heat:we(f(e),3,3),hit:-1})),A=b(i,`[data-drain]`),j=y(A?.dataset.drain),M=A?I(A,9,`circle`,`sf-hiss`):[],N=b(i,`[data-drain-led]`);return{shake:p,draw(t,n,i,o){if(!o)return;let f=e.reducedMotion(),m=n%24/24,_=m<.035&&!f;d(N,`data-on`,m<.06?``:null);for(let e of M){if(!_){l(e.el,`0`);continue}let t=(m/.035+e.seed)%1,[n,i]=r([(j[0]??0)+t*6+Math.sin(e.seed*30)*1.5,(j[1]??0)+Math.cos(e.seed*20)*2,(j[2]??0)-t*t*4],a);re(e.el,n,i),e.el.setAttribute(`r`,((.4+t*1.8)*c*.5).toFixed(2)),l(e.el,(Math.sin(Math.PI*t)*.5).toFixed(2))}let y=u(s.press,`seal_leak`);h.age=y?Math.min(h.age+t,90):Math.max(0,h.age-t*.5);let b=h.age>0?4+5*(1-Math.exp(-h.age/12)):0,x=b*.62;d(h.puddle,`d`,b?Se([8,29],x,19.05,a,36):``),d(h.sheen,`d`,x>2?Se([7.4,28.4],x*.45,19.1,a,24):``);let C=76-Math.max(0,Math.min(278,i))/278*nt,E=``;for(let e of h.drops){if(!y||f){l(e.el,`0`);continue}let t=(n*.55+e.seed)%1,i=t<.35?0:((t-.35)/.65)**2,[o,s]=r([8,32.2,C-.4-i*(C-19.4)],a);re(e.el,o,s),e.el.setAttribute(`rx`,`0.55`),e.el.setAttribute(`ry`,(t<.35?.4+t*1.6:.95).toFixed(2)),l(e.el,`0.95`),t>.96&&(E=Se([8,32.2],.8+(t-.96)*40,19.1,a,16))}d(h.splash,`d`,E);for(let e of g)e.hiss.draw(e.on()&&!f,n,a,e.at,e.dir);let A=u(s.cnc,`tool_breakage`,`spindle_seizure`);for(let e of T){let t=(n*1.3+e.seed*.3)%1;if(!A||f||t>.45){l(e.el,`0`);continue}let i=t/.45,o=e.seed*6.283+Math.floor(n*1.3)*2.1,s=10+e.seed*9,c=e=>r([w[0]+Math.cos(o)*s*e,w[1]+Math.sin(o)*s*e,w[2]+7*e-24*e*e],a),[u,d]=c(Math.max(0,i-.08)),[p,m]=c(i);e.el.setAttribute(`d`,`M${u.toFixed(1)} ${d.toFixed(1)}L${p.toFixed(1)} ${m.toFixed(1)}`),l(e.el,(1-i).toFixed(2))}d(O,`data-s`,u(s.cnc,`coolant_sensor_failure`)&&(f||Math.sin(n*6)>0)?`a`:null),D.draw(u(s.cnc,`thermal_overload`,`spindle_seizure`)&&!f,n,a,[-294,-12,116]),v.draw(u(s.press,`pump_failure`)&&!f,n,a,[38,-14,22]);for(let e of S)e.smoke.draw(u(e.id,`belt_slip`)&&!f,n,a,e.at,[.5,-.3]),e.heat.draw(u(e.id,`drive_failure`)&&!f,n,a,e.at);for(let e of k){e.bleed.draw(u(e.id,`gripper_misgrip`)&&!f,n,a,e.motion.state.tip,[.4,1]);let t=wt(e.motion.spec);e.heat.draw(u(e.id,`joint_overtemp`)&&!f,n,a,[t[0]-3,t[1],t[2]+6]),u(e.id,`collision_stop`)?e.hit<0&&(e.hit=n):e.hit=-1}let P=+!f;p(s.cnc,P*(u(s.cnc,`spindle_seizure`)?.5:u(s.cnc,`bearing_wear`)?.2:0),n);for(let e of[s.wash,s.test])p(e,P*(Ft.find(([t])=>u(e,t))?.[1]??0),n);for(let e of k)p(e.id,e.hit<0?0:P*.8*Math.exp(-(n-e.hit)*4),n);u(s.press,`valve_stuck`)&&p(s.press,P*.12,n)}}}var K={x:189.6,y:1.6,cols:3,rows:3,layers:4,w:7,d:10,h:3.6,gap:.9},Lt={w:22.8,d:31.8};function Rt(e){let t=[];for(let n=0;n<K.layers;n++){let r=[];for(let e=0;e<K.rows;e++)for(let t=0;t<K.cols;t++)r.push([K.x+t*(K.w+K.gap),K.y+e*(K.d+K.gap)]);r.sort((t,n)=>e([t[0],t[1],0])-e([n[0],n[1],0]));for(let[e,i]of r){let r=1+n*K.h;t.push({cx:e,cy:i,x:e+K.w/2,y:i+K.d/2,z:r,top:r+K.h})}}return t}var zt=(e,t)=>{let n=e[Math.min(t,e.length-1)];if(!n)throw Error(`Tote has no slots. Build them with buildToteSlots() before placing.`);return[n.x,n.y,n.top]},Bt=[[`out`,[0,-143]],[`out`,[60,-143]],[`away`,[60,-143]],[`in`,[0,-143]],[`dock`,[0,0]]],Vt=8;function Ht(){return{count:-1,swap:{t:-1,pending:!1},lane:{has:!1,t:-1},amr:{leg:-1,t:0,at:[0,0],from:[0,0],carrying:!1,trips:0},lastScrap:-1,pusher:{ext:0,until:0}}}function Ut(e){e.lastScrap=-1}var Wt=e=>{e.swap.pending=!0},Gt=(e,t)=>e.swap.t<0&&e.count>=0&&e.count<t;function Kt(e,t){e.count++,e.count>=t&&Wt(e)}function qt(e,t,n){return t>K.x&&t<K.x+Lt.w&&n>K.y&&n<K.y+Lt.d?1+Math.floor(Math.max(0,e.count)/(K.cols*K.rows))*K.h:null}function Jt(e,t,n,{test:r,packer:i,amrMoving:a},o,s){i&&e.count<0&&(e.count=i.good%o),r&&(e.lastScrap>=0&&r.scrap>e.lastScrap&&(e.pusher.until=n+.6),e.lastScrap=r.scrap),e.swap.pending&&e.swap.t<0&&!e.lane.has&&(e.swap.pending=!1,e.swap.t=0,e.count=0),e.swap.t>=0&&(e.swap.t+=t/(s?.01:1),e.swap.t>=2&&(e.swap.t=-1,e.lane.has=!0)),e.lane.has&&e.amr.leg<0&&!e.amr.carrying&&e.lane.t<0&&a&&(e.lane.t=0),e.lane.t>=0&&(e.lane.t+=t/(s?.01:1.4),e.lane.t>=1&&(e.lane.t=-1,e.lane.has=!1,e.amr.carrying=!0,e.amr.leg=0,e.amr.t=0,e.amr.from=[...e.amr.at]));let c=e.amr,l=c.leg>=0&&a?Bt[c.leg]:void 0;if(l){let[e,n]=l,r=Math.hypot(n[0]-c.from[0],n[1]-c.from[1]);c.t+=t/(s?.01:e===`away`?Vt:Math.max(.6,r/16));let i=z(Math.min(1,c.t));c.at=[c.from[0]+(n[0]-c.from[0])*i,c.from[1]+(n[1]-c.from[1])*i],c.t>=1&&(e===`away`&&c.carrying&&(c.carrying=!1,c.trips++),c.leg=c.leg+1<Bt.length?c.leg+1:-1,c.t=0,c.from=[...c.at])}e.pusher.ext=L(e.pusher.ext,n<e.pusher.until?24:0,t,n<e.pusher.until?.06:.22,s)}function Yt(e){let{ids:t}=e,n=e.belts.map(e=>Xe(e,t)),r=pt(),i=Ht(),a=Rt(e.depth),o=U(n,`test`),s=U(n,`wash`),c=()=>o?.items.find(e=>e.out&&!e.push&&e.x>=176.60000000000002);return{ids:t,belts:n,press:r,pack:i,slots:a,robots:e.robots.map(e=>e.pack?jt(e,{station:t.packer,pending:()=>!!c(),placeAt:()=>zt(a,Math.max(0,i.count)),canPlace:()=>Gt(i,a.length),onPick:()=>{let e=c();o&&e&&o.items.splice(o.items.indexOf(e),1)},onPlace:()=>Kt(i,a.length),floorAt:(e,t)=>qt(i,e,t)}):jt(e,{station:t.robot,nest:t.cnc,belt:s})),readings:new Map,introDone:!0}}function Xt(e){for(let t of e.belts)t.items=[],t.good=t.scrap=-1;for(let t of e.robots)Mt(t);mt(e.press),Ut(e.pack)}var Zt=e=>[e.cnc,e.robot,e.wash,e.press,e.test,e.packer];function Qt(e,t){let n=new Map;for(let r of Zt(e.ids)){let e=t.station(r);e&&n.set(r,e)}let r=tt(e.readings,n);e.readings.clear();for(let[t,r]of n)e.readings.set(t,r);return r&&Xt(e),r}function $t(e,t,n,r,i){let{ids:a,press:o,pack:s}=e;Qt(e,t);let c={simSpeed:t.simSpeed(),phase:Math.round(t.num(a.press,`press_phase`)),pressGood:t.station(a.press)?.good,still:i};_t(o,n,c);let l=i?.85:.6+.4*Math.abs(Math.sin(r*4));et(e.belts,n,e=>t.station(e),i,e=>t.faults(e).includes(`belt_slip`)?l:1),Jt(s,n,r,{test:t.station(a.test),packer:t.station(a.packer),amrMoving:t.num(a.amr,`running`)>0},e.slots.length,i);for(let r of e.robots){let a=t.station(r.hooks.station);Pt(r,n,{own:a,nest:r.hooks.nest?t.station(r.hooks.nest):void 0,halted:a?.state===`down_unplanned`},i,e.introDone)}let u=U(e.belts,`feed`),d=U(e.belts,`test`);u&&d&&vt(o,n,c,u,d)}function en(e){let{svg:t,feed:n,ids:r}=e,i=b(t,`[data-work="cnc"]`);return{draw(){n.buffers().forEach((e,n)=>{for(let r of g(t,`[data-slot^="b${n}:"]`))d(r,`data-on`,+(r.dataset.slot?.split(`:`)[1]??0)<e.level?``:null)}),d(i,`data-on`,n.station(r.cnc)?.state===`running`?``:null)}}}function tn(e){let{svg:t,P:n,feed:i,ids:s}=e,c=n.scale,u=(e,t,n=0)=>i.num(e,t,n),f={cncSpin:0,cncHead:0,cncRpm:0,washing:0,flash:0},p=b(t,`[data-move="cnc-head"]`),m=b(t,`[data-spin="cnc"]`),h=b(t,`[data-carousel]`),[v=0,x=0,S=0,C=0]=y(h?.dataset.carousel),w={rings:Array.from({length:12},()=>_(`path`,{class:`iso-line`,"data-tone":`lo`},h)),tools:Array.from({length:12},()=>_(`path`,{class:`iso-line`,"data-tone":`mid`},h)),angle:0,target:0},T=-1,E=b(t,`[data-mist]`),D=y(E?.dataset.mist),O=Array.from({length:14},(e,t)=>({el:_(`circle`,{class:`sf-mist`,style:`display:none`},E),seed:t*1.37})),k=b(t,`[data-steam]`),A=y(k?.dataset.steam),j=Array.from({length:7},(e,t)=>({el:_(`circle`,{class:`sf-steam`,style:`display:none`},k),seed:t/7})),M=g(t,`[data-beam]`),N=b(t,`[data-oil]`),P=y(N?.dataset.oil),ee=b(t,`[data-flash]`);return{resync(){T=-1},draw(t,h,g){let _=e.reducedMotion(),y=i.station(s.cnc),b=y?.state===`running`;f.cncRpm=L(f.cncRpm,u(s.cnc,`spindle_speed_feedback`),t,.8,_),_||(f.cncSpin+=f.cncRpm/8500*2.4*fe*t),f.cncHead=L(f.cncHead,b?-3.2-.8*Math.sin(h*.8)*Math.min(1,u(s.cnc,`feed_rate`)/1750):2,t,.5,_),d(p,`transform`,a(n,[0,0,f.cncHead])),d(m,`d`,ye(n,`z`,[-266,30,0],4.2,44.3,49.7,f.cncSpin,8)),y&&(T>=0&&y.good>T&&(w.target+=fe/12),T=y.good),w.angle=L(w.angle,w.target,t,.35,_),w.rings.forEach((e,t)=>{let r=w.angle+t*fe/12,i=[v,x+C*Math.cos(r),S+C*Math.sin(r)];d(e,`d`,o(i,1.5,`x`,n)),d(w.tools[t],`d`,o(i,.6,`x`,n)),d(e,`data-tone`,Math.abs(Math.sin(r/2-Math.PI/4))<.14?`lit`:`lo`)});let E=+!!b;for(let e of O){let t=(h*1.7+e.seed)%1,i=e.seed*4.1+h*.6,a=1.6+t*5,[o,s]=r([(D[0]??0)+Math.cos(i)*a,(D[1]??0)+Math.sin(i)*a,(D[2]??0)-2+t*3-t*t*5],n);re(e.el,o,s),e.el.setAttribute(`r`,(.25+t*.5).toFixed(2)),l(e.el,(E*Math.sin(Math.PI*t)*.7).toFixed(2))}f.washing=L(f.washing,+(i.station(s.wash)?.state===`running`),t,2.5,_);for(let e of j){let t=(h*.22+e.seed)%1,[i,a]=r([(A[0]??0)+t*6+Math.sin(h+e.seed*9)*1.5,(A[1]??0)-t*3,(A[2]??0)+t*26],n);re(e.el,i,a),e.el.setAttribute(`r`,((1.6+t*6)*c*.6).toFixed(2)),l(e.el,(f.washing*Math.sin(Math.PI*t)**1.5*.16).toFixed(3))}let k=i.station(s.press),te=k&&k.state!==`off_shift`?Math.floor(h*14)%(M.length+6):-1;for(let[e,t]of M.entries())d(t,`data-on`,e===te?``:null);let ne=de(u(s.press,`oil_level`,90)/100),[F=0,I=0,ie=0,ae=0]=P;d(N,`d`,`M${F} ${-(I+(ae-I)*ne)}H${ie}V${-I}H${F}Z`),f.flash=g?1:f.flash*Math.exp(-t/.25),ee&&(ee.style.opacity=(f.flash*.55).toFixed(2))}}}var nn=[[162,37,0],[167.6,38.4,0],[163.4,40.6,0],[168.8,36.6,1],[161.8,39,1],[166,41,1],[164.6,37.4,2],[169,40,2],[162.6,40.8,2],[166.4,38.6,3]],rn=55,an=`M246 4H258V4.6H246Z`,on=`M246 4H249V4.6H246Z`,q=[272,17.5,-14],sn=22,cn=.9;function ln(e,t,n){let{svg:o,P:s}=e,c=b(o,`[data-move="pusher"]`),u=b(o,`[data-rod="pusher"]`),f=b(o,`[data-tote]`),p=f?b(f,`[data-tote-parts]`):null,m=b(o,`[data-tote-over]`),h=b(o,`[data-tote-full]`),g=h?b(h,`[data-tote-parts]`):null,v=b(o,`[data-amr]`),y=_(`g`,{transform:a(s,[rn,0,0])},v?b(v,`[data-tote-parts]`):null),x=b(o,`[data-tote-amr]`),S=b(o,`[data-amr-led]`),C=_(`path`,{class:`sf-scan`},v),T=_(`path`,{class:`sf-scan-beam`},v),E=(()=>{let e=Array.from({length:13},(e,t)=>{let n=-cn+t/12*2*cn;return r([q[0]+Math.cos(n)*sn,q[1]+Math.sin(n)*sn,q[2]],s)}),[t,n]=r(q,s);return`M${t.toFixed(1)} ${n.toFixed(1)}${e.map(([e,t])=>`L${e.toFixed(1)} ${t.toFixed(1)}`).join(``)}Z`})(),D=b(o,`[data-scrap]`),O=nn.map(([e,t,n])=>{let r=_(`g`,{class:`sf-part`},D);return r.innerHTML=ge({x:e,y:t,w:5,d:3.6,r:.6},5.4+n*1.6,2.4,s),r}),k=n.map(e=>{let t=ge({x:e.cx,y:e.cy,w:K.w,d:K.d,r:.8},e.z,K.h,s),n=_(`g`,{class:`sf-part`},p);n.innerHTML=t;for(let e of[g,y])_(`g`,{class:`sf-part`,"data-on":``},e).innerHTML=t;return n}),A=!1,j=!1;return{draw(e,n,o,p){let{swap:g,lane:_,amr:y}=t;if(g.t>=0){let e=z(Math.min(1,g.t/1.1)),t=z(Math.max(0,Math.min(1,(g.t-1.1)/.9)));d(h,`data-on`,``),h?.setAttribute(`transform`,a(s,[e*27,0,0]));let n=a(s,[0,(1-t)*44,0]),r=g.t>1.1?`1`:`0`;for(let e of[f,m])e?.setAttribute(`transform`,n),e&&(e.style.opacity=r)}else if(A){h?.setAttribute(`transform`,a(s,[27,0,0]));for(let e of[f,m])e&&(e.style.opacity=``),e?.removeAttribute(`transform`)}A=g.t>=0,_.t>=0?h?.setAttribute(`transform`,a(s,[27+z(Math.min(1,_.t))*28,0,0])):j&&(d(h,`data-on`,null),h?.removeAttribute(`transform`)),j=_.t>=0,v?.setAttribute(`transform`,a(s,[y.at[0],y.at[1],0])),v&&(v.style.opacity=(1-Math.max(0,Math.min(1,(y.at[0]-20)/30))).toFixed(2)),d(x,`data-on`,y.carrying?``:null);let b=n.includes(`low_battery`),D=n.includes(`nav_blocked`),M=p||Math.sin(o*6)>0;d(S,`d`,b?on:an),d(S,`data-s`,b||D?M?`warn`:null:n.length?`fault`:y.leg<0&&_.has?`warn`:`live`),d(C,`d`,D?E:``),l(C,D?p?`0.5`:(.35+.25*Math.sin(o*6)).toFixed(2):`0`);let N=``;if(D&&!p){let e=-cn+(Math.sin(o*2.4)+1)/2*2*cn,[t,n]=r(q,s),[i,a]=r([q[0]+Math.cos(e)*sn,q[1]+Math.sin(e)*sn,q[2]],s);N=`M${t.toFixed(1)} ${n.toFixed(1)}L${i.toFixed(1)} ${a.toFixed(1)}`}if(d(T,`d`,N),e!==void 0)for(let[t,n]of O.entries())d(n,`data-on`,t<e?``:null);for(let[e,n]of k.entries())d(n,`data-on`,e<t.count?``:null);c?.setAttribute(`transform`,a(s,[0,t.pusher.ext,0])),u&&(u.innerHTML=w(i({x:161.2,y:-4.4,w:1.6,d:1.2+t.pusher.ext,r:.6},25.6,1.6,s,2),{tone:`hi`,crease:`none`}))}}}var un={x:-3.5,y:10,w:7,d:10,r:1},dn=24;function fn(e,t,n){let{svg:r,P:i}=e,o=g(r,`[data-move="press-ram"]`),s=g(r,`[data-colstub]`),c=b(r,`[data-rod="press"]`),l=b(r,`[data-work="press"]`),u=b(r,`[data-move="loader"]`),f=b(r,`[data-push-part]`),p=b(r,`[data-feed-eye]`),m=b(r,`[data-move="unloader"]`),h=m?b(m,`[data-lift]`):null,_=b(r,`[data-pull-part]`),v=b(r,`[data-chute-part]`),S=null;return{draw(r){let{ram:g,loader:b,unloader:C,chute:T,die:E}=t,D=-(Math.max(0,Math.min(278,g))/278)*nt;for(let e of o)d(e,`transform`,a(i,[0,0,D]));let O=84+D;for(let e of s){let[t=0,n=0]=y(e.dataset.colstub);e.innerHTML=w(x(t,n,3.2,O,92-O,i,20),{tone:`mid`,crease:`none`})}c&&(c.innerHTML=w(x(0,15,4.6,O,92-O,i,28),{tone:`hi`,crease:`none`})),d(p,`data-s`,b.lead?`g`:null),d(u,`transform`,b.x?a(i,[b.x,0,0]):null),d(f,`data-on`,b.phase===`push`?``:null),d(f,`transform`,a(i,[-41+b.x,0,0])),d(m,`transform`,a(i,[C.x,0,0])),d(h,`transform`,a(i,[0,0,C.z]));let k=C.phase===`push`;d(_,`data-on`,k?``:null),d(_,`transform`,a(i,[Math.max(0,C.x-st),0,0])),d(v,`data-on`,T.x===null?null:``),T.x!==null&&d(v,`transform`,a(i,[T.x,0,dt(T.x)])),d(l,`data-on`,E.has&&b.phase!==`push`&&!k?``:null),E.has&&E.h!==null&&l&&S!==E.h&&(S=E.h,l.innerHTML=ge(un,dn,Math.max(rt,+E.h),i)),n(e.ids.press,e.reducedMotion()?0:E.jolt*2.2,r)}}}var pn=e=>`<g class="sf-steel">${e}</g>`;function mn(e,t,n){let{svg:o,P:c}=e,{spec:l,state:u}=t,f=wt(l),p=b(o,`[data-robot="${l.id}"]`),m=l.late==null?null:b(o,`[data-robot-late="${l.id}"]`),h=l.nestSel?b(o,l.nestSel):null,g=b(o,`[data-work="cnc"]`),[_,v,y]=l.part,x=e=>ge({x:e[0]-_/2,y:e[1]-v/2,w:_,d:v,r:1},e[2]-y,y,c);function S(e,r){if(Math.abs(e-l.pick[0])<_&&Math.abs(r-l.pick[1])<v)return l.pick[2]-y;let i=t.hooks.floorAt?.(e,r);if(i!=null)return i;for(let t of n)if(e>t.x0&&e<t.x1&&r>t.y0&&r<t.y1)return t.z;return 0}function T(){let{E:e,W:t,n,yaw:a}=Tt(l,u.tip),o=[],d=(e,t,n)=>{o.push({key:n??C(e,c),x:e[0],svg:t})},h=(e,t)=>ce(N(t,e)),g=S(u.tip[0],u.tip[1]),b=u.tip[2]-(u.holding?y:0)-g,T=.5*Math.exp(-Math.max(0,b)/16);T>.03&&d([u.tip[0],u.tip[1],g],`<path class="sf-shadow" style="opacity:${T.toFixed(2)}" d="${Se([u.tip[0],u.tip[1]],(u.holding?Math.max(_,v)*.5:2.6)+b*.04,g+.06,c,24)}"/>`,-1e9),d(f,`<path class="sf-j1" d="${s([l.base[0]+Math.cos(a)*2.2,l.base[1]+Math.sin(a)*2.2],[l.base[0]+Math.cos(a)*5.6,l.base[1]+Math.sin(a)*5.6],14.45,c)}"/>`,-1e8),d(f,w(ie(-5.4,5.4,6.2,P(f,n),c),{tone:`mid`})),d(A(f,R(n,5.6)),w(ie(5.4,6.4,3.4,P(f,n),c),{tone:`mid`}));let E=R(A(f,e),.5);d(E,w(oe([[0,3.6],[l.L1,2.9]],P(f,h(f,e)),c),{tone:`mid`})),d(e,w(ie(-4.2,4.2,4.4,P(e,n),c),{tone:`mid`})),d(R(A(e,t),.5),w(oe([[0,2.7],[l.L2,2.1]],P(e,h(e,t)),c),{tone:`mid`})),d(t,w(ie(-3,3,2.8,P(t,n),c),{tone:`mid`})),d(A(t,[0,0,-1]),pn(w(oe([[0,2.2],[1.6,2.2]],P(A(t,[0,0,-.2]),[0,0,-1]),c),{tone:`mid`,crease:`lo`}))),d(A(t,[0,0,-3.6]),w(i({x:t[0]-3,y:t[1]-2.4,w:6,d:4.8,r:.8},t[2]-5.6,4,c,2,.3),{tone:`mid`}));let[D,O]=r([t[0]+1.6,t[1]+2.45,t[2]-3.2],c);if(d(A(t,[.5,2.6,-3.2]),`<circle class="sf-gled" data-s="${u.holding?`g`:u.step>=0?`a`:``}" cx="${D.toFixed(2)}" cy="${O.toFixed(2)}" r="0.42"/>`),l.vacuum){let e=t[2]-5.6,n=u.tip[2]+.8;d([t[0],t[1],(e+n)/2],pn(w(oe([[0,.8],[e-n,.8]],P([t[0],t[1],e],[0,0,-1]),c),{tone:`mid`,crease:`none`}))),d([u.tip[0],u.tip[1],u.tip[2]+.4],w(oe([[0,1.1],[.8,2.3]],P([u.tip[0],u.tip[1],n],[0,0,-1]),c),{tone:`lo`}))}else{let e=_/2+.6+(1-u.grip)*1.8;d(A(t,[0,0,-6.2]),pn(w(i({x:t[0]-e-1.2,y:t[1]-1.6,w:2*e+2.4,d:3.2,r:.6},t[2]-6.8,1.2,c,2,.2),{tone:`mid`})));let n=u.tip[2]-y*.7;for(let r of[-1,1]){let a=t[0]+r*(e+.6);d([a,t[1],(n+t[2]-6.8)/2],pn(w(i({x:a-.6,y:t[1]-1.6,w:1.2,d:3.2,r:.3},n,t[2]-6.8-n,c,2),{tone:`mid`,crease:`lo`}))),d([a-r*.7,t[1],n+1.2],w(i({x:a-r*.6-(r>0?.35:0),y:t[1]-1.3,w:.35,d:2.6,r:.1},n+.2,2,c,2),{tone:`lo`,crease:`none`}))}}let k=(e,t)=>A(e,R(n,t)),j=[k([f[0],f[1],12],6.9),k(f,6.6),k(A(f,R(h(f,e),l.L1*.5)),3.9),k(e,4.8),k(A(e,R(h(e,t),6)),3.2)],M=e=>e.map((e,t)=>{let[n,i]=r(e,c);return`${t?`L`:`M`}${n.toFixed(2)} ${i.toFixed(2)}`}).join(``),ee=M(j),te=[j[2],j[4]].map(e=>r(e,c));d(k(E,5),`<path class="sf-cable" d="${ee}"/><path class="sf-cable-hi" d="${ee}"/>${te.map(([e,t])=>`<circle class="sf-clip" cx="${e.toFixed(1)}" cy="${t.toFixed(1)}" r="0.9"/>`).join(``)}`);let ne=k(A(e,R(h(e,t),l.L2*.72)),2.6);for(let[e,n]of[[2.2,-2.2],[2.8,-3.8]]){let r=k(A(t,[0,0,n]),e),i=A(R(A(r,ne),.5),[0,0,1.8]);d(A(r,[0,0,2]),`<path class="sf-hose" d="${M([r,k(A(t,[0,0,n+2.4]),e+.6),i,ne])}"/>`)}u.holding&&d(A(u.tip,[0,0,-y/2]),x(u.tip)),o.sort((e,t)=>e.key-t.key);let F=e=>!!m&&l.late!==void 0&&e.x>=l.late&&e.key>-1e8;m&&(m.innerHTML=o.filter(F).map(e=>e.svg).join(``)),p&&(p.innerHTML=o.filter(e=>!F(e)).map(e=>e.svg).join(``))}return{draw(){h&&(d(h,`data-on`,u.onNest?``:null),d(h,`transform`,u.eject!==void 0&&u.eject<1?a(c,[-(1-z(u.eject))*10,0,0]):null),u.eject!==void 0&&u.eject<1&&d(g,`data-on`,null)),u.dirty&&=(T(),!1)}}}var hn=1e3,gn={x:-318,y:-32,w:540,d:96,r:8},_n={x:-262,y:-176,w:410,d:92,r:8},J=[60,-90,0],vn={..._n,x:_n.x+J[0],y:_n.y+J[1]},Y={x:-338,y:-286,w:660,d:368,r:16},yn=u([...h(Y,-21,-14),...h(gn,-14,0),...h(vn,-14,0),[-288,-12,122],[0,15,134],[-200+J[0],-150+J[1],60]],hn,470,{pad:26,azimuth:60}),bn=[{id:`1`,base:[-205,-12],shoulder:20,L1:38,L2:34,tool:9,pick:[-244.5,29,29],place:[-166,15,29],home:[-206,8,52],part:[7,10,5],nestSel:`[data-nest]`,tuck:12,late:-182},{id:`2`,pack:!0,vacuum:!0,base:[198,-12],shoulder:20,L1:30,L2:28,tool:24,pick:[176.8,15,24.6],home:[194,6,44],part:[7,10,3.6],tuck:0}],xn=[94,-130,0],Sn=[-84,-130,0],Cn=.5625,wn=[-68,-128,0],Tn=[52,-128,0],En=e=>[Sn[0]+J[0]+(e[0]-xn[0])*Cn,Sn[1]+J[1]+(e[1]-xn[1])*Cn,e[2]*Cn],Dn=En(ne),On=En(te),X=2.2,kn=-182,An=-176.5,jn=-268,Mn=-256,Nn=[De[0]+J[0],De[1]+J[1],De[2]],Pn=Dn[0]+8,Fn={z:X,flowAloftBeforeY:-174,routes:[{id:`supply`,medium:`coolant`,r:1.8,pts:[[-176,-188.4,40],[-176,-182,40],[-176,kn,X],[jn,kn,X],[jn,-22,X]]},{id:`return`,medium:`coolant`,r:1.8,reverse:!0,pts:[Dn,[Pn,Dn[1],Dn[2]],[Pn,Dn[1],X],[Pn,An,X],[Mn,An,X],[Mn,-22,X]]},{id:`discharge`,medium:`coolant`,r:1.8,pts:[On,[On[0],On[1],Nn[2]],Nn]},{id:`air`,medium:`air`,r:1.2,pts:[[70,-204,24],[70,-192,24],[70,-192,X],[70,-24,X]]}],posts:[[-236,kn,1.8],[jn,-130,1.8],[jn,-80,1.8],[Mn,-110,1.8],[Mn,-60,1.8],[-110,An,1.8],[-40,An,1.8],[70,-150,1.2],[70,-106,1.2],[70,-62,1.2]]};function In(e){let{L:t,screws:n}=e,r=[ee(e,Y)],i=Y.x+6,a=Y.x+Y.w-6;r.push(t([-150,-146.6,-106,-102.6].map(e=>s([i,e],[a,e],-14,yn)).join(``),{className:`sf-aisle`}));let o=[];for(let e=Y.x+40;e<Y.x+Y.w-20;e+=40)o.push(s([e,Y.y+6],[e,Y.y+Y.d-6],-14,yn));return r.push(t(o.join(``),{className:`sf-joint`})),r.push(n(c(Y,12),-14)),r.join(``)}var Ln=e=>{let{svg:t,P:n,feed:r,ids:i}=e,a=Yt({ids:i,robots:bn,belts:yt(t),depth:e=>C(e,n)}),o=[i.robot,i.packer],s=It(e,a.robots.map((e,t)=>({id:o[t]??``,motion:e})),a.belts),c=be(e,s.shake),l=je(e,s.shake),u=ke(e,s.shake),d=new Set([i.cnc,i.robot,i.wash,i.press,i.test,i.packer]),f=(e,t,n=0)=>r.num(e,t,n),p=new Map([[i.cnc,()=>f(i.cnc,`spindle_load`)/100],[i.wash,()=>f(i.wash,`motor_current`)/12],[i.press,()=>f(i.press,`system_pressure`)/315],[i.test,()=>{let e=r.station(i.test);return e?e.good/Math.max(1,e.good+e.scrap):0}]]),m=new Map([[`press`,()=>f(i.press,`system_pressure`)/315],[`frl`,()=>f(i.press,`clamp_pressure`,f(i.comp,`header_pressure`))/10]]),h=ve(e,{needle:e=>l.needle(e)??u.needle(e)??m.get(e)?.()??0,bar:e=>c.bar(e)??l.bar(e)??u.bar(e)??p.get(e)?.()??0,alertsHigh:e=>e!==i.test,ready:()=>!!r.station(i.cnc)}),g=e=>r.station(e)?.state===`running`,_=le(e,e=>e.id===`air`?g(i.press)?6+26*f(i.press,`clamping_demand`):0:e.id.startsWith(`wash-`)?g(i.wash)?12:0:g(i.cnc)?f(i.chiller,`coolant_flow_rate`)/4:0),v=e=>d.has(e)&&!r.station(e)&&!r.faults(e).length?``:_e(r,e,`run_command`),y=pe(e,v),b=tn(e),x=en(e),S=St(e,a.belts),w=fn(e,a.press,s.shake),T=ln(e,a.pack,a.slots),E=a.robots.map(t=>mn(e,t,a.belts));return{data(e){y.draw(e),x.draw()},draw({sdt:e,t,still:n,introDone:o}){a.introDone=o,$t(a,r,e,t,n);let d=S.draw(t);w.draw(t),b.draw(e,t,d),_.draw(e),h.draw(e,t),c.draw(e,t,o),l.draw(e,t,o),u.draw(e,t,o),T.draw(r.station(i.test)?.scrap,r.faults(i.amr),t,n);for(let e of E)e.draw();s.draw(e,t,a.press.ram,o)},resync(){Xt(a),b.resync()},status(e){return d.has(e)&&!r.faults(e).length?[r.station(e)?.state??`--`,v(e)]:xe(r,e,`run_command`)},debug:{robots:a.robots.map(e=>e.state),belts:a.belts,loader:a.press.loader,unloader:a.press.unloader,chute:a.press.chute,die:a.press.die,tote:{fill:e=>{a.pack.count=e},swap:a.pack.swap,lane:a.pack.lane,amr:a.pack.amr},sim:a}}},Z=e(t(),1);function Rn(e,t){let{k:n,P:r,L:i,slab:a,screws:o}=e,s=t.x+5,c=t.x+t.w-5,l=[-284,-136,112].map(e=>a({x:e,y:49.6,w:12,d:3.6,r:.6},0,.5,{tone:`lo`,crease:`none`},2,0)+i(n.lineOnTop([e+1.6,51.4],[e+7.6,51.4],.5,r),{tone:`mid`,free:!0})+o([[e+10.4,51.4]],.5)).join(``);return i([55,57.4].map(e=>n.lineOnTop([s,e],[c,e],0,r)).join(``),{className:`sf-walk`})+l}var Q=n();function zn(e){return(0,Q.jsx)(m,{...e,draw:Ae})}function Bn(e,t){let{k:n,P:r,at:i,S:a,L:o,front:s,faceRule:c}=e,l={x:243,y:-1,w:28,d:37,r:3},u={x:243.6,y:-.4,w:26.8,d:35.8,r:1.2},d=Array.from({length:7},(e,t)=>n.lineOnTop([u.x+1.8+t*3.9,u.y+.4],[u.x+1.8+t*3.9,u.y+u.d-.4],0,r)).join(``),f={x:243,y:0,w:26,d:35,r:1.6},p=n.pathOf(n.roundedPlan(n.insetPlan(f,1.6),3).map(([e,t])=>i([e,t,16])),!0),m=`<g data-tote-amr="">${a(n.slabOf(f,0,16,r,3,.4),{tone:`mid`,inner:o(n.sideSeam(f,12,r,3),{tone:`faint`})})}<path class="sf-void" d="${p}"/><clipPath id="tote-open-amr"><path d="${p}"/></clipPath><g clip-path="url(#tote-open-amr)" data-tote-parts=""></g>${o(n.planOutline(n.insetPlan(f,1.6),16,r,3),{tone:`lo`})}${c(35,246,4,14,5)}</g>`;return`<g data-amr="" data-asset="${t}"><path class="iso-halo sf-contact" d="${n.haloOf(l,-14,1,r)}"/><path class="sf-alarm" data-alarm="${t}" d="${n.haloOf(l,-14,1,r)}"/>${a(n.slabOf(l,-13.2,10.8,r,3,.6),{tone:`mid`,inner:o(n.sideSeam(l,-10,r,3),{tone:`faint`})})}${Ee(e,l.y+l.d,262,-11,268,-8.8,`sf-void`)}<g transform="${s(l.y+l.d)}"><path class="sf-amr-led" data-amr-led="" d="M246 4H258V4.6H246Z"/></g>${a(n.slabOf(u,-2.4,2.4,r,2,.3),{tone:`lo`,inner:o(d,{tone:`mid`})})}${m}</g>`}function Vn({id:e,intro:t}){let n=p();return(0,Q.jsx)(f,{html:(0,Z.useMemo)(()=>Bn(n,e),[n,e]),intro:t})}function Hn({name:e,at:t,capacity:n,intro:r}){let i=p(),[a,o]=t;return(0,Q.jsx)(f,{html:(0,Z.useMemo)(()=>i.buffer(e,a,o,n),[i,e,a,o,n]),intro:r})}function Un(e,t){let{k:n,G:r,P:i,S:a,L:o,slab:s,cyl:c,andon:l,screws:u,faceRule:d,workpiece:f}=e,p=[],m={x:-304,y:-22,w:74,d:70,r:3};p.push(a(n.slabOf(m,0,12,i,3,.8),{tone:`mid`,inner:o(n.sideSeam(m,3,i,3),{tone:`faint`})})),p.push(d(48,-298,4.6,20,5.6));let h={x:-296,y:-20,w:32,d:26,r:2};p.push(a(n.slabOf(h,12,90,i,3,.8),{tone:`mid`,inner:o([30,34,38,42,46,50,54,58].map(e=>n.sideSeam(h,e,i,3)).join(``),{tone:`faint`})}));let g=r.frameAlong([-264,-8,80],[1,0,0]);p.push(a(r.disc(0,2,12.4,g,i),{tone:`mid`}),a(r.disc(2,3.6,11,g,i),{tone:`mid`}),a(r.disc(3.6,5,3,g,i),{tone:`mid`})),p.push(`<g data-carousel="-260.4,-8,80,8.4"></g>`),p.push(l(t,-290,-14,102)),p.push(s({x:-300,y:14,w:64,d:30,r:2},12,6,{tone:`mid`},3,.4)),p.push(s({x:-302,y:16,w:68,d:26,r:1.5},18,4,{tone:`lo`},3,.4)),p.push(o([21,26,31,36].map(e=>n.lineOnTop([-302,e],[-234,e],22,i)).join(``),{tone:`faint`})),p.push(s({x:-282,y:20,w:4,d:18,r:.6},22,6,{tone:`mid`},2,.3)),p.push(s({x:-258,y:20,w:4,d:18,r:.6},22,6,{tone:`mid`},2,.3)),p.push(c(-256,40,1.2,24,2,{tone:`mid`},12)),p.push(`<g class="sf-work" data-work="cnc">${f({x:-276,y:22,w:16,d:14,r:1},22,8)}</g>`);let _=[s({x:-280,y:6,w:28,d:32,r:3},62,18,{tone:`mid`},3,.8),c(-266,18,6.4,80,14,{tone:`mid`,inner:n.fadedSvg([82,84,86,88,90].map(e=>({d:n.sideArc(-266,18,6.4,e,i,24),alpha:.7})),{tone:`lo`})}),c(-266,18,4,94,1.6,{tone:`mid`},20),c(-266,30,7,50,12,{tone:`mid`,inner:o(n.sideArc(-266,30,7,56,i,32),{tone:`faint`})},36),c(-266,30,4.2,44,6,{tone:`mid`,crease:`lo`},28),`<path class="iso-line" data-tone="lo" data-spin="cnc" d=""/>`,c(-266,30,1.5,34,10,{tone:`hi`,lit:!0,crease:`none`},14),`<g data-mist="-266,30,36"></g>`,c(-255,34,1.5,60.4,1.6,{tone:`mid`},12),T(e,[[-255,34,60.6],[-255,34,52],[-261,32,41.5]],.8,`mid`,4,`coolant`,[!1,!0]),c(-261.6,32,1.1,40,1.6,{tone:`mid`},10)].join(``);return p.push(`<g data-move="cnc-head">${_}</g>`),p.push(s({x:-249,y:23,w:9,d:12,r:.8},22,2,{tone:`mid`},2,.3)),p.push(u([[-247.6,24.4],[-241.4,33.6]],24)),p.push(`<g class="sf-part" data-nest="">${f({x:-248,y:24,w:7,d:10,r:1},24,5)}</g>`),p.join(``)}function Wn(e,t){let{slab:n,hmi:r,screws:i}=e;return[n({x:-226,y:30,w:4,d:4,r:.8},0,36,{tone:`mid`},2,.3),n({x:-230,y:34,w:26,d:6,r:1},30,18,{tone:`mid`},2,.4),r(t,40,-228,-206,32,47),i([[-228.6,39.6],[-205.4,39.6]],47.4),F(e,-217,40,48)].join(``)}function Gn(e){return(0,Q.jsx)(m,{...e,draw:Un})}function Kn({id:e,intro:t}){let n=p();return(0,Q.jsx)(f,{html:(0,Z.useMemo)(()=>Wn(n,e),[n,e]),asset:e,intro:t})}function qn(e){let{at:t,cyl:n,conveyor:r}=e,i=r(-82,44,8,14,23),a=t([-44,26.6,27.6]);return[i.back,i.belt,`<g data-belt="feed" data-x0="-81" data-x1="-35" data-y0="8" data-y1="22" data-z="${i.top}"><path class="iso-line" data-tone="faint" data-cleats="" d=""/><g data-parts-back=""></g></g>`,`<g data-parts-front="feed"></g>`,n(-44,25.5,1,24,4.4,{tone:`mid`,crease:`none`},12),`<circle class="sf-gled" data-feed-eye="" cx="${a[0].toFixed(2)}" cy="${a[1].toFixed(2)}" r="0.5"/>`,i.front].join(``)}function Jn({intro:e}){return(0,Q.jsx)(f,{html:v(qn),intro:e})}var Yn=e=>24-(e-28)/56*2.6,Xn=(()=>{let e=Math.hypot(56,2.6);return[56/e,0,-2.6/e]})();function Zn(e){let{G:t,P:n,S:r,cyl:i}=e,a=[];for(let[e,t]of[[40,8.2],[72,8.2]])a.push(i(e,t,.9,0,Yn(e)-2.2,{tone:`mid`,crease:`none`},12));a.push(r(t.solidOf([[0,.8],[57,.8]],t.frameAlong([28,8.2,25],Xn),n),{tone:`mid`,crease:`none`}));for(let e=30;e<=82;e+=3.5)a.push(r(t.solidOf([[0,.9],[12.4,.9]],t.frameAlong([e,8.8,Yn(e)-.9],[0,1,0]),n),{tone:`mid`,crease:`none`}));return a.join(``)}function Qn(e){let{G:t,P:n,S:r,cyl:i,workpiece:a}=e,o=[`<g class="sf-work" data-chute-part="">${a({x:-3.5,y:10,w:7,d:10,r:1},24,3.6)}</g>`];for(let[e,t]of[[40,21.8],[72,21.8]])o.push(i(e,t,.9,0,Yn(e)-2.2,{tone:`mid`,crease:`none`},12));return o.push(r(t.solidOf([[0,.8],[57,.8]],t.frameAlong([28,21.8,25],Xn),n),{tone:`mid`,crease:`none`})),o.join(``)}function $n(e,t,n){let{k:r,P:i,S:a,L:o,cyl:s}=e,c=[`<path class="iso-halo sf-contact" d="${r.haloOf({x:t-4,y:n-4,w:8,d:8,r:4},0,.5,i)}"/>`];c.push(s(t,n,3.2,0,1,{tone:`lo`},20),s(t,n,1.2,1,24,{tone:`mid`,crease:`none`},12));let l={x:t-11,y:n-3,w:22,d:6,r:1};c.push(a(r.slabOf(l,25,4,i,2,.4),{tone:`mid`,inner:o(r.sideSeam(l,26.4,i,2),{tone:`faint`})}));for(let e of[t-7,t+7])c.push(s(e,n,2.2,29,.6,{tone:`mid`},18),`<g class="sf-green">${s(e,n,1.7,29.6,1.2,{tone:`mid`},18)}</g>`);return c.push(F(e,t,n,29)),c.join(``)}var er=[[-5,54,93],[-1.8,57.5,101]];function tr(e,t){let{k:n,G:r,P:i,at:a,S:o,L:s,D:c,slab:l,cyl:u,hmi:d,andon:f,dial:p,screws:m,faceRule:h,front:g,workpiece:_}=e,v=[],y={x:34,y:-28,w:26,d:30,r:1.6};v.push(o(n.slabOf(y,0,22,i,3,.6),{tone:`mid`,inner:s(n.sideSeam(y,4,i,3),{tone:`faint`})})),v.push(`<g transform="${g(y.y+y.d)}"><path class="sf-hmi" d="M48 -19H51V-4H48Z"/><path class="sf-oil" data-oil="48,4,51,19" d=""/><path class="iso-line" data-tone="lo" d="M48 -19H51V-4H48Z"/></g>`),v.push(h(y.y+y.d,36,12,12,5)),v.push(M(g(y.y+y.d),`press`,42,7,4.2));let b=r.frameAlong([37,-13,29.4],[1,0,0]);v.push(l({x:38,y:-18,w:12,d:10,r:1},22,2,{tone:`lo`},2,0)),v.push(o(r.solidOf([[0,4.6],[.5,5.2],[12,5.2],[12.5,4.6]],b,i),{tone:`mid`,inner:n.fadedSvg(r.ribsOf(b,.5,12,5.2,14,i,{fade:[.1,.55],seams:!0}),{tone:`lo`})})),v.push(o(r.disc(12.5,16,3.4,b,i),{tone:`mid`}),o(r.disc(16,21,4.2,b,i),{tone:`mid`})),v.push(u(55,-22,2,22,3,{tone:`mid`},14)),v.push(o(r.disc(0,.8,1.8,r.frameAlong([60,-19,15.5],[1,0,0]),i),{tone:`mid`}),T(e,[[60.8,-19,15.5],[66.8,-19,15.5]],.8,`mid`,2.2,`air`,[!1,!1])),v.push(l({x:64,y:-24,w:12,d:10,r:1},0,6,{tone:`mid`},2,.3)),v.push(u(70,-19,2.6,6,8,{tone:`mid`,inner:s(n.sideArc(70,-19,2.6,9,i,16),{tone:`faint`})},20),u(70,-19,3.2,14,4,{tone:`mid`},20)),v.push(p(`frl`,70,-19,18,3)),v.push(l({x:-30,y:-12,w:60,d:54,r:3},0,16,{tone:`mid`},3,1)),v.push(l({x:-22,y:-4,w:44,d:38,r:1.5},16,3,{tone:`lo`},3,.4)),v.push(m([[-20.4,-2.4],[20.4,-2.4],[-20.4,32.4],[20.4,32.4]],19)),v.push(l({x:-18,y:-3.5,w:36,d:37,r:1.2},19,2.5,{tone:`mid`},2,.4));for(let e of[-14.5,14.5])v.push(u(e,-.5,1.3,21.5,11.5,{tone:`mid`,crease:`none`},14));v.push(l({x:-10,y:6,w:20,d:18,r:1},21.5,2.5,{tone:`mid`},2,.4)),v.push(s(n.planOutline({x:-4.4,y:9.1,w:8.8,d:11.8,r:1.2},24,i,3),{tone:`lo`})),v.push(`<g class="sf-work" data-work="press">${_({x:-3.5,y:10,w:7,d:10,r:1},24,5)}</g>`,`<g class="sf-fx" data-fx-slot="${t}"></g>`);for(let e of[-24,24])v.push(u(e,-6,3.2,19,73,{tone:`mid`,crease:`none`},20));v.push(l({x:-36,y:11,w:3,d:8,r:.5},0,23,{tone:`lo`},2,.2)),v.push(l({x:-16,y:11,w:3,d:8,r:.5},21.5,1.5,{tone:`lo`},2,0)),v.push(l({x:-38,y:9,w:28,d:12,r:.6},23,1,{tone:`mid`},2,.2)),v.push(l({x:-50,y:2.6,w:4,d:4.8,r:.6},0,29,{tone:`mid`},2,.3)),v.push(l({x:-50,y:3.4,w:46,d:3.2,r:1},25.6,2.8,{tone:`mid`,inner:s(n.lineOnTop([-48,5],[-6,5],28.4,i),{tone:`faint`})},2,.3)),v.push(l({x:-51,y:3,w:2.4,d:4,r:.4},25,4,{tone:`mid`},2,0),l({x:-5,y:3,w:2.4,d:4,r:.4},25,4,{tone:`mid`},2,0)),v.push(`<g data-move="loader">${l({x:-48.6,y:2.8,w:5,d:4.4,r:.6},26.2,3.6,{tone:`mid`},2,.3)}${l({x:-46.4,y:6.6,w:1.6,d:13,r:.4},24.4,3.4,{tone:`mid`},2,.2)}</g>`),v.push(`<g class="sf-work" data-push-part="">${_({x:-3.5,y:10,w:7,d:10,r:1},24,5)}</g>`),v.push(l({x:-27,y:-3,w:6,d:6.6,r:.6},33,2.8,{tone:`mid`},2,.3)),v.push(l({x:31.4,y:3.2,w:3.6,d:3.6,r:.6},0,33,{tone:`mid`},2,.3)),v.push(l({x:-28,y:3.6,w:62,d:2.8,r:1},33,2.8,{tone:`mid`,inner:s(n.lineOnTop([-26,5],[32,5],35.8,i),{tone:`faint`})},2,.3)),v.push(l({x:-29,y:3.2,w:2.4,d:3.6,r:.4},32.4,4,{tone:`mid`},2,0),l({x:33,y:3.2,w:2.4,d:3.6,r:.4},32.4,4,{tone:`mid`},2,0));let x=l({x:-24,y:7,w:1.6,d:1.8,r:.3},24.4,11.6,{tone:`mid`},2,0)+l({x:-24,y:8.6,w:1.6,d:12.8,r:.4},24.4,6,{tone:`mid`},2,.2);v.push(`<g data-move="unloader">${l({x:-26,y:3,w:5,d:4,r:.6},32.6,4,{tone:`mid`},2,.3)}${l({x:-25,y:7,w:3,d:2,r:.4},33,3.4,{tone:`lo`},2,0)}<g data-lift="">${x}</g></g>`),v.push(Zn(e)),v.push(`<g class="sf-work" data-pull-part="">${_({x:-3.5,y:10,w:7,d:10,r:1},24,3.6)}</g>`),v.push(Qn(e));for(let e of[-14.5,14.5])v.push(u(e,30.5,1.3,21.5,11.5,{tone:`mid`,crease:`none`},14));let S=[...[-24,24].map(e=>u(e,-6,4.6,76,8,{tone:`mid`},28)),...[-14.5,14.5].map(e=>u(e,-.5,2.2,65,11,{tone:`mid`},18)),l({x:-4.4,y:9.1,w:8.8,d:11.8,r:1.2},70,2,{tone:`hi`,lit:!0},2,.2),l({x:-12,y:4,w:24,d:22,r:1},72,4,{tone:`mid`},2,.4),...[-14.5,14.5].map(e=>u(e,30.5,2.2,65,11,{tone:`mid`},18)),l({x:-19,y:-4,w:38,d:36,r:2},76,8,{tone:`mid`},3,.6),m([[-15,0],[15,0],[-15,28],[15,28]],84)].join(``);v.push(`<g data-move="press-ram">${S}</g>`),v.push(`<g data-colstub="-24,-6"></g><g data-colstub="24,-6"></g>`),v.push(`<g data-rod="press"></g>`);for(let e of[-24,24])v.push(u(e,36,3.2,19,73,{tone:`mid`,crease:`none`},20));v.push(`<g data-move="press-ram">${[-24,24].map(e=>u(e,36,4.6,76,8,{tone:`mid`},28)).join(``)}</g>`),v.push(`<g data-colstub="-24,36"></g><g data-colstub="24,36"></g>`),v.push(l({x:-30,y:-12,w:60,d:54,r:3},92,14,{tone:`mid`},3,1)),v.push(m([[-24,-6],[24,-6],[-24,36],[24,36]],106)),v.push(u(0,15,12,106,22,{tone:`mid`,inner:s(n.sideArc(0,15,12,110,i,40)+n.sideArc(0,15,12,124,i,40),{tone:`faint`})},48)),v.push(u(0,15,13,128,3,{tone:`mid`},48)),v.push(c(r.dotsOf(r.frameAlong([0,15,131],[0,0,1]),0,10.6,8,i,{all:!0}),{size:.45})),v.push(u(0,15,3,131,2,{tone:`mid`},16)),v.push(f(t,-24,-6,106));for(let[e,,t]of er)v.push(o(r.disc(0,1.2,2.4,r.frameAlong([30,e,t],[1,0,0]),i),{tone:`mid`}));for(let[t,n,r]of er)v.push(u(n,t,2.1,22,.9,{tone:`mid`},16),T(e,[[n,t,22.9],[n,t,r],[31.2,t,r]],1.3,`mid`,5,`hyd`));v.push(d(t,42,-24,16,2.4,14));let C={x0:-28,x1:28,y0:48.6,y1:53},w=[];for(let e=C.x0-(C.y1-C.y0);e<C.x1;e+=3){let t=[Math.max(C.x0,e),0],r=[Math.min(C.x1,e+(C.y1-C.y0)),0];t[1]=C.y1-(t[0]-e),r[1]=C.y1-(r[0]-e),w.push(n.lineOnTop(t,r,0,i))}v.push(s(w.join(``),{className:`sf-hatch`}),s(n.onTop([[C.x0,C.y0],[C.x1,C.y0],[C.x1,C.y1],[C.x0,C.y1]],0,i,!0),{className:`sf-hatch-edge`}));for(let e of[-31,29])v.push(l({x:e,y:44.4,w:2.6,d:2.6,r:.5},0,60,{tone:`mid`},2,.2)),v.push(l({x:e-.4,y:44,w:3.4,d:3.4,r:.6},0,1.2,{tone:`lo`},2,0));v.push($n(e,-44,47));let E=[];for(let e=0,t=22;t<=56;t+=3.4,e++)E.push(`<path class="sf-beam" data-beam="${e}" d="${n.segment([-28.4,45.7,t],[29,45.7,t],i)}"/>`);let D=[];for(let e=22;e<=56;e+=3.4)D.push(a([-28.4,45.7,e]));return v.push(`<g class="sf-curtain">${E.join(``)}${D.map(([e,t])=>`<circle class="sf-led" cx="${e.toFixed(1)}" cy="${t.toFixed(1)}" r="0.55"/>`).join(``)}</g>`),v.join(``)}function nr(e){return(0,Q.jsx)(m,{...e,draw:tr})}var rr=26,ir=35;function ar(e){let t=[...e].sort((e,t)=>e[0]-t[0]||e[1]-t[1]),n=(e,t,n)=>(t[0]-e[0])*(n[1]-e[1])-(t[1]-e[1])*(n[0]-e[0]),r=e=>{let t=[];for(let r of e){for(;t.length>=2&&n(t[t.length-2],t[t.length-1],r)<=0;)t.pop();t.push(r)}return t.pop(),t};return[...r(t),...r([...t].reverse())]}var or=e=>`M${e.map(([e,t])=>`${e.toFixed(2)} ${t.toFixed(2)}`).join(`L`)}Z`;function sr(e,t,n){let{k:r,G:i,P:a,at:o,S:s,L:c,slab:l,cyl:u,hmi:d,andon:f,screws:p,conveyor:m,faceRule:h}=e,g=m(84,100,4,24,20),_=[g.back,g.belt,`<g data-belt="test" data-x0="85" data-x1="182" data-y0="4" data-y1="28" data-z="${g.top}"><path class="iso-line" data-tone="faint" data-cleats="" d=""/><g data-parts-back=""></g></g>`],v=i.frameAlong([162,-14,26.4],[0,1,0]);_.push(l({x:158,y:-16,w:8,d:4,r:.6},0,24,{tone:`mid`},2,.3)),_.push(s(i.solidOf([[0,2.6],[10,2.6]],v,a),{tone:`mid`,inner:c(i.arcOf(v,2,2.6,a)+i.arcOf(v,8,2.6,a),{tone:`faint`})})),_.push(`<g data-rod="pusher"></g><g data-move="pusher">${l({x:156,y:-3.4,w:12,d:1.6,r:.4},23.6,6,{tone:`mid`},2,.2)}</g>`),_.push(l({x:126,y:-4,w:6,d:4,r:.8},0,54,{tone:`mid`},2,.3)),_.push(l({x:124,y:-5,w:10,d:39,r:1.5},54,6,{tone:`mid`},3,.5)),_.push(p([[126,-3],[132,-3],[126,32],[132,32]],60)),_.push(f(t,129,-1,60)),_.push(u(129,16,4,42,12,{tone:`mid`,inner:c(r.sideArc(129,16,4,48,a,24),{tone:`faint`})},24)),_.push(u(129,16,5.6,40.4,1.6,{tone:`mid`},28)),_.push(`<g class="sf-eye" data-eye="test">${u(129,16,2.6,38,2.4,{tone:`hi`,lit:!0},20)}</g>`),_.push(`<path class="sf-flash" data-flash="" d="${r.pathOf(r.circleRing(129,16,9,40).map(([e,t])=>o([e,t,21.2])),!0)}"/>`),_.push(`<g data-parts-front="test"></g>`),_.push(l({x:180.4,y:4.2,w:1,d:23.6,r:.3},21.6,4,{tone:`mid`},2,0)),_.push(g.front);let y=o([183.4,31,27]),b=l({x:180,y:1,w:2,d:30,r:.4},24,1.4,{tone:`mid`},2,.2)+u(183.4,30,.9,25.4,2.6,{tone:`mid`,crease:`none`},12)+`<circle class="sf-gled" data-pack-eye="" cx="${y[0].toFixed(2)}" cy="${y[1].toFixed(2)}" r="0.45"/>`;_.push(b),_.push(l({x:126,y:30,w:6,d:4,r:.8},0,54,{tone:`mid`},2,.3)),_.push(l({x:134,y:31,w:26,d:4,r:1},28,18,{tone:`mid`},2,.4)),_.push(d(t,35,135.2,158.8,29.4,45.4)),_.push(F(e,155,33,46));let x={x:160,y:35,w:16,d:11,r:1.2};_.push(l(x,0,11,{tone:`mid`},3,.3));let S=r.pathOf(r.roundedPlan(r.insetPlan(x,1.2),3).map(([e,t])=>o([e,t,11])),!0);_.push(`<path class="sf-void" d="${S}"/>`),_.push(`<clipPath id="bin-open"><path d="${S}"/></clipPath><g clip-path="url(#bin-open)" data-scrap=""></g>`),_.push(c(r.planOutline(r.insetPlan(x,1.2),11,a,3),{tone:`lo`})),_.push(h(x.y+x.d,x.x+2,3,12,4.4));let C=e=>({x:e,y:0,w:rr,d:ir,r:1.6}),w=e=>s(r.slabOf(C(e),0,16,a,3,.4),{tone:`mid`,inner:c(r.sideSeam(C(e),12,a,3),{tone:`faint`})}),T=e=>r.pathOf(r.roundedPlan(r.insetPlan(C(e),1.6),3).map(([e,t])=>o([e,t,16])),!0),E=e=>c(r.planOutline(r.insetPlan(C(e),1.6),16,a,3),{tone:`lo`})+h(ir,e+3,4,14,5),D=(e,t,n)=>`<g ${n}>${w(e)}<path class="sf-void" d="${T(e)}"/><clipPath id="${t}"><path d="${T(e)}"/></clipPath><g clip-path="url(#${t})" data-tote-parts=""></g>${E(e)}</g>`;_.push(D(188,`tote-open`,`data-tote=""`));let O={x:214,y:-1,w:28,d:37,r:1};_.push(l({x:239,y:0,w:2.4,d:2.4,r:.4},-14,12.4,{tone:`lo`},2,0),l({x:239,y:33.6,w:2.4,d:2.4,r:.4},-14,12.4,{tone:`lo`},2,0)),_.push(s(r.slabOf(O,-1.6,1.6,a,2,.3),{tone:`mid`,inner:c([0,1,2,3,4,5,6].map(e=>r.lineOnTop([O.x+2+e*3.9,O.y+.3],[O.x+2+e*3.9,O.y+O.d-.3],0,a)).join(``),{tone:`lo`})})),_.push(D(188,`tote-open-full`,`data-tote-full=""`)),_.push(`<g data-robot="2" data-asset="${n}" class="sf-robot"></g>`);let k=[[189.6,1.6],[188+rr-1.6,1.6],[188+rr-1.6,ir-1.6],[189.6,ir-1.6]].map(([e,t])=>o([e,t,16])),A=k.reduce((e,t)=>t[0]<e[0]?t:e),j=k.reduce((e,t)=>t[0]>e[0]?t:e),M=k.reduce((e,t)=>t[1]>e[1]?t:e),N=[[A[0]-30,A[1]-.6],[A[0],A[1]-.6],[M[0],M[1]-.6],[j[0],j[1]-.6],[j[0]+30,j[1]-.6],[j[0]+30,4e3],[A[0]-30,4e3]];_.push(`<g data-tote-over=""><clipPath id="tote-over-clip"><path d="${or(N)}"/></clipPath><g clip-path="url(#tote-over-clip)">${w(188)}${E(188)}</g></g>`);let P=ar([166,186].flatMap(e=>[-2,34].flatMap(t=>[14,48].map(n=>o([e,t,n])))));return _.push(`<clipPath id="pick-clip"><path d="${or(P)}"/></clipPath><g clip-path="url(#pick-clip)">${g.front}${b}</g>`),_.join(``)}function cr({packer:e,...t}){let n=(0,Z.useCallback)((t,n)=>sr(t,n,e),[e]);return(0,Q.jsx)(m,{...t,draw:n})}function lr(e,t,n,r){let{k:i,G:a,P:o,D:s,L:c,slab:l,cyl:u,screws:d,andon:f}=e,p=[`<path class="iso-halo sf-contact" d="${i.haloOf({x:t-10,y:n-10,w:20,d:20,r:10},0,.5,o)}"/>`];return p.push(l({x:t-11,y:n-11,w:22,d:22,r:3},0,2.4,{tone:`lo`},3,.4)),p.push(d(i.corners({x:t-11,y:n-11,w:22,d:22},2.4),2.4)),p.push(u(t,n,8.4,2.4,3,{tone:`mid`},40)),p.push(s(a.dotsOf(a.frameAlong([t,n,5.4],[0,0,1]),0,7,10,o,{all:!0}),{size:.4})),p.push(`<g class="sf-robot">${u(t,n,6.4,5.4,9,{tone:`mid`,inner:c(i.sideArc(t,n,6.4,9,o,32),{tone:`faint`})},36)}</g>`),p.push(l({x:t-9,y:n+7,w:6,d:3,r:.6},2.4,5,{tone:`mid`},2,.3)),p.push(f(r,t+8,n-8,2.4)),p.join(``)}function ur({id:e,base:t,intro:n}){let r=p(),[i,a]=t;return(0,Q.jsx)(f,{html:(0,Z.useMemo)(()=>`<path class="sf-alarm" data-alarm="${e}" d="${S({x:i-14,y:a-14,w:28,d:28,r:8},0,1,r.P)}"/>${lr(r,i,a,e)}`,[r,i,a,e]),asset:e,intro:n})}function dr({id:e,robot:t,intro:n}){return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`g`,{"data-robot":t,"data-asset":e,"data-intro":n,className:`sf-robot`}),(0,Q.jsx)(`g`,{"data-fx-slot":e})]})}var $=-14;function fr(e){let{k:t,P:n,at:r,S:i,slab:a,front:o,faceRule:s,screws:c}=e,l=[],u={x:-322,y:-262,w:96,d:26,r:1};l.push(`<path class="iso-halo sf-contact" d="${t.haloOf(u,$,1,n)}"/>`),l.push(a(u,$,4,{tone:`lo`},2,.3));let d=u.y+u.d-1;[0,1,2].forEach(e=>{let f=u.x+1+e*31.4,p={x:f,y:u.y+1,w:31,d:u.d-2,r:.8},m=$+4+54,h=[];for(let e=$+10;e<$+20;e+=2.2)h.push(`M${f+5} ${-e}H${f+26}`);h.push(`M${f+5} ${-($+8.8)}H${f+26}V${-($+20)}H${f+5}Z`);let g=`<g transform="${o(d)}"><path class="iso-line" data-tone="lo" d="M${f+2} ${-(m-2)}H${f+29}V${-($+6)}H${f+2}Z"/><path class="iso-line" data-tone="faint" d="${h.join(``)}"/></g>`;l.push(i(t.slabOf(p,$+4,54,n,2,.6),{tone:`mid`,inner:g})),l.push(a({x:f+25.4,y:d,w:1.6,d:1.2,r:.4},$+30,8,{tone:`mid`},2,0));let _=r([f+7,d,m-7]),v=r([f+10.5,d,m-7]);l.push(`<circle class="sf-pilot" data-pilot="${e}" cx="${_[0].toFixed(1)}" cy="${_[1].toFixed(1)}" r="0.9"/>`),l.push(`<circle class="sf-pilot sf-pilot-off" cx="${v[0].toFixed(1)}" cy="${v[1].toFixed(1)}" r="0.9"/>`),l.push(s(d,f+15,m-10,11,5)),l.push(c([[f+3,p.y+3],[f+28,p.y+3]],m))});let f={x:u.x+70,y:u.y+4,w:14,d:8,r:.4};return l.push(a(f,$+58,4,{tone:`lo`},2,0)),l.join(``)}function pr(e,t,n){let{k:r,P:i,L:a,slab:o,cyl:s,front:c}=e,l=[];return l.push(`<path class="iso-halo sf-contact" d="${r.haloOf({x:t-5,y:n-5,w:10,d:10,r:5},$,1,i)}"/>`),l.push(o({x:t-4,y:n-8,w:8,d:2,r:.4},$,40,{tone:`mid`},2,.2)),l.push(`<g transform="${c(n-6)}"><path class="sf-sign" d="M${t-3.4} ${-($+38)}H${t+3.4}V${-($+30)}H${t-3.4}Z"/><path class="sf-sign-mark" d="M${t-1.2} ${-($+31.6)}H${t+1.2}V${-($+36.4)}H${t-1.2}Z"/></g>`),l.push(`<g class="sf-red">${s(t,n-2.6,2.6,$+6,13,{tone:`mid`,inner:a(r.sideArc(t,n-2.6,2.6,$+15,i,20),{tone:`faint`})},24)}${s(t,n-2.6,1.2,$+19,2,{tone:`mid`},14)}</g>`),l.push(o({x:t-1.6,y:n-3.6,w:3.2,d:2,r:.4},$+21,1.2,{tone:`mid`},2,0)),l.push(o({x:t-3.4,y:n-6.2,w:6.8,d:1.2,r:.3},$+4.4,1.4,{tone:`lo`},2,0)),l.join(``)}function mr(e){let{k:t,P:n,at:r,L:i}=e;return[[-120,-126],[120,-126]].map(([e,a])=>{let o={x:e-10,y:a-3,w:20,d:6,r:1},s=[];for(let e=1;e<10;e++)s.push(t.lineOnTop([o.x+e*2,o.y+1],[o.x+e*2,o.y+5],$,n));return`<path class="sf-void" d="${t.pathOf(t.roundedPlan(o,2).map(([e,t])=>r([e,t,$])),!0)}"/>`+i(t.planOutline(o,$,n,2),{tone:`mid`})+i(s.join(``),{tone:`lo`})}).join(``)}function hr(e,t,n){let{k:r,P:i,at:a,L:o}=e,s=17.6,c=19.6,l=e=>r.pathOf(r.circleRing(t,n,e,56).map(([e,t])=>a([e,t,0])),!0),u=[];for(let e=0;e<28;e++){let a=e/28*Math.PI*2;u.push(r.lineOnTop([t+Math.cos(a)*s,n+Math.sin(a)*s],[t+Math.cos(a+.12)*c,n+Math.sin(a+.12)*c],0,i))}return`<path class="sf-hatch-edge" d="${l(s)+l(c)}" fill="none"/>`+o(u.join(``),{className:`sf-hatch`})}function gr(e,t,n){let{k:r,P:i,at:a,S:o,L:s,slab:c,workpiece:l}=e,u=[],d={x:t,y:n,w:54,d:37,r:.6};u.push(`<path class="iso-halo sf-contact" d="${r.haloOf(d,$,1,i)}"/>`);for(let e of[n+1,n+17,n+33])for(let n of[t+1,t+25,t+49])u.push(c({x:n,y:e,w:4,d:3,r:.3},$,2.4,{tone:`lo`},2,0));let f=[];for(let e=1;e<9;e++)f.push(r.lineOnTop([t+e*6,n+.6],[t+e*6,n+36.4],$+4,i));u.push(o(r.slabOf(d,$+2.4,1.6,i,2,.2),{tone:`lo`,inner:s(f.join(``),{tone:`faint`})}));let p=0;for(let e of[0,1])for(let c of[t+.5,t+27.5]){let t={x:c,y:n+1,w:26,d:35,r:1.6},d=$+4+e*16;if(u.push(o(r.slabOf(t,d,16,i,3,.4),{tone:`mid`,inner:s(r.sideSeam(t,d+12,i,3),{tone:`faint`})})),!e)continue;let f=r.pathOf(r.roundedPlan(r.insetPlan(t,1.6),3).map(([e,t])=>a([e,t,d+16])),!0),m=[];for(let e=0;e<3;e++)for(let t=0;t<3;t++)m.push([c+1.6+t*7.9,n+2.6+e*10.9]);m.sort((e,t)=>r.depthOf([e[0],e[1],0],i)-r.depthOf([t[0],t[1],0],i)),u.push(`<path class="sf-void" d="${f}"/><clipPath id="pallet-tote-${p}"><path d="${f}"/></clipPath><g clip-path="url(#pallet-tote-${p++})">${m.map(([e,t])=>l({x:e,y:t,w:7,d:10,r:.8},d+1+3*3.6,3.6)).join(``)}</g>`),u.push(s(r.planOutline(r.insetPlan(t,1.6),d+16,i,3),{tone:`lo`}))}return u.join(``)}function _r(e,t,n){let{G:r,P:i,S:a,slab:o,cyl:s}=e,c=[];c.push(o({x:t,y:n-4,w:6,d:8,r:1},$,4,{tone:`mid`},2,.3)),c.push(s(t+3,n,2.2,$+4,5,{tone:`mid`},18));let l=r.frameAlong([t+3,n,$+8.6],[.48,0,.88]);c.push(a(r.solidOf([[0,.7],[22,.7]],l,i),{tone:`mid`,crease:`none`}));let u=r.frameAlong([t+3+.48*22,n-3.2,$+8.6+.88*22],[0,1,0]);return c.push(a(r.solidOf([[0,.8],[6.4,.8]],u,i),{tone:`mid`,crease:`none`})),`<g class="sf-yellow">${c.join(``)}</g>`}function vr(e,t,n){let{k:r,P:i,L:a,cyl:o}=e;return`<path class="iso-halo sf-contact" d="${r.haloOf({x:t-3,y:n-3,w:6,d:6,r:3},$,1,i)}"/><g class="sf-yellow">${o(t,n,3.2,$,1,{tone:`mid`},20)}${o(t,n,2.2,$+1,20,{tone:`mid`,inner:a(r.sideArc(t,n,2.2,$+12,i,20)+r.sideArc(t,n,2.2,$+15,i,20),{tone:`faint`})},22)}</g>${o(t,n,2.3,$+21,1.4,{tone:`mid`},22)}`}function yr(e,t){let n=p(),[r,i]=t;return(0,Z.useMemo)(()=>e(n,r,i),[n,e,r,i])}function br({intro:e}){return(0,Q.jsx)(f,{html:v(fr),intro:e})}function xr(){return v(mr)}function Sr({at:e,intro:t}){return(0,Q.jsx)(f,{html:yr(pr,e),intro:t})}function Cr({at:e,intro:t}){let n=p();return(0,Q.jsx)(f,{html:(0,Z.useMemo)(()=>e.map(([e,t])=>vr(n,e,t)).join(``),[n,e]),intro:t})}function wr({pallet:e,jack:t,intro:n}){return(0,Q.jsx)(f,{html:yr(gr,e)+yr(_r,t),intro:n})}function Tr(e){return yr(hr,e)}function Er({robot:e,...t}){let n=(0,Z.useCallback)((t,n)=>Ve(t,n,e),[e]);return(0,Q.jsx)(m,{...t,draw:n})}var Dr={chiller:{x:-248,y:-164,w:92,d:58,r:3},comp:{x:-132,y:-150,w:128,d:44,r:3},cnc:{x:-304,y:-22,w:74,d:70,r:3},wash:{x:-176,y:1,w:92,d:30,r:3},press:{x:-30,y:-12,w:60,d:54,r:3},test:{x:84,y:1,w:100,d:30,r:3}},Or=(e,t)=>k(e,t,`coolant`,!0),kr=(e,t)=>Oe(e,t,!0),Ar=[[-326,-42],[230,-42]],jr=bn[0],Mr=bn[1];function Nr({ids:e}){if(!jr||!Mr)throw Error(`Smart Factory layout needs two robots in ROBOTS.`);let t=p(),n=xr(),r=O(Fn,gn.y),i=Tr(jr.base),o=Tr(Mr.base),s=(0,Z.useMemo)(()=>In(t),[t]),c=(0,Z.useMemo)(()=>t.plinth(_n),[t]),l=(0,Z.useMemo)(()=>t.plinth(gn)+Rn(t,gn),[t]);return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(f,{html:s+n,data:{plinth:``}}),(0,Q.jsx)(br,{intro:0}),(0,Q.jsxs)(`g`,{transform:a(yn,J),children:[(0,Q.jsx)(f,{html:c,data:{plinth:``}}),(0,Q.jsx)(m,{id:e.chiller,plan:Dr.chiller,intro:1,draw:kr}),(0,Q.jsx)(D,{from:xn,to:Sn,scale:Cn,children:(0,Q.jsx)(m,{id:e.pump,plan:me,intro:2,draw:Or})}),(0,Q.jsx)(D,{from:wn,to:Tn,children:(0,Q.jsx)(zn,{id:e.comp,plan:Dr.comp,intro:3})})]}),(0,Q.jsx)(f,{html:`${r.off}<g data-flows=""></g>`,data:{pipes:``}}),(0,Q.jsx)(Sr,{at:[-328,54],intro:4}),(0,Q.jsx)(Cr,{at:Ar,intro:5}),(0,Q.jsx)(wr,{pallet:[100,-98],jack:[155,-79.5],intro:6}),(0,Q.jsx)(f,{html:l+i+o,data:{plinth:``}}),(0,Q.jsx)(f,{html:r.on,data:{pipes:``}}),(0,Q.jsx)(Gn,{id:e.cnc,plan:Dr.cnc,intro:7}),(0,Q.jsx)(ur,{id:e.robot,base:jr.base,intro:8}),(0,Q.jsx)(Hn,{name:`b0`,at:[-220,2],capacity:10,intro:9}),(0,Q.jsx)(dr,{id:e.robot,robot:jr.id,intro:8}),(0,Q.jsx)(Kn,{id:e.cnc,intro:10}),(0,Q.jsx)(Hn,{name:`b1`,at:[-78,-28],capacity:5,intro:11}),(0,Q.jsx)(Er,{id:e.wash,robot:e.robot,plan:Dr.wash,intro:12}),(0,Q.jsx)(Jn,{intro:13}),(0,Q.jsx)(nr,{id:e.press,plan:Dr.press,intro:14}),(0,Q.jsx)(Hn,{name:`b2`,at:[40,46],capacity:5,intro:15}),(0,Q.jsx)(ur,{id:e.packer,base:Mr.base,intro:16}),(0,Q.jsx)(cr,{id:e.test,packer:e.packer,plan:Dr.test,intro:17}),(0,Q.jsx)(`g`,{"data-fx-slot":e.packer}),(0,Q.jsx)(Vn,{id:e.amr,intro:18})]})}var Pr=ae(yn),Fr=j(Pr,Fn,gn.y),Ir=se({layout:{width:hn,height:470,label:`Isometric model of the Smart Factory: a machining line of CNC, wash conveyor, hydraulic press and inspection conveyor with buffers between them, and a utilities plinth behind with a chiller, an air compressor and a centrifugal pump, joined to the line by a coolant loop and an air line. Every moving part follows live values from the running engine.`,kit:Pr,flows:[...Fr.flows,...Be(Pr)],joints:Fr.joints,Scene:Nr,compose:Ln},resolve:Ge,things:Ke,caption:`production · utilities`,mismatch:`This floor expects the Smart Factory line (CNC, washer, press, inspection) and its utilities.`,statusBasis:`run_command`});export{Ir as smartFactoryFloor};
@@ -1 +1 @@
1
- import{n as e}from"./utils-BO2u-wC_.js";var t=e(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),n=`Source host (Miravo)`,r=`Address Litmus Edge uses to reach your running Miravo factory.`;export{n,t as r,r as t};
1
+ import{n as e}from"./utils-XFKvwlFT.js";var t=e(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),n=`Source host (Miravo)`,r=`Address Litmus Edge uses to reach your running Miravo factory.`;export{n,t as r,r as t};
@@ -0,0 +1 @@
1
+ import{y as e}from"./dom-Cm_OH5jc.js";function t(t,n){let r=t=>e([t[0],t[1],0],n),i=[...t].sort((e,t)=>r(e.at)-r(t.at));return{order:i,slotDepths:i.map(e=>r(e.at)),depth:{layer:([t,a,o])=>{let s=i.findIndex(i=>r(i.at)>e([t,a,o>i.h?Math.max(0,o-12):0],n));return s<0?i.length:s},glide:()=>!0}}}export{t};