dsh-open-artifact 0.14.3 → 0.14.4

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 (100) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/lib/client.js +7 -7
  3. package/lib/index.js +9 -9
  4. package/package.json +1 -1
  5. package/skills/open-artifact/SKILL.md +1 -1
  6. package/vendor/artifact-types/motion/SKILL.md +3 -3
  7. package/vendor/artifact-types/motion/artifact-type.json +1 -1
  8. package/vendor/artifact-types/motion/reference/film-api.md +2 -2
  9. package/vendor/artifact-types/motion/reference/voice.md +38 -3
  10. package/vendor/frame-host/client/comments.js +9 -9
  11. package/vendor/frame-host/frame-host.mjs +30 -9
  12. package/vendor/home/assets/{index-CMbgE2oc.js → index-tTYbu9Md.js} +1 -1
  13. package/vendor/home/index.html +1 -1
  14. package/vendor/open-artifact.mjs +17 -13
  15. package/vendor/runtime.json +1 -1
  16. package/vendor/{type-server/shell/assets/index-yS15KRJ8.js → shell/assets/index-C3-yWoJw.js} +14 -14
  17. package/vendor/shell/index.html +1 -1
  18. package/vendor/type-server/cli.mjs +13 -13
  19. package/vendor/type-server/editors/data/assets/{index-CelumSdk.js → index-BK7K9G2U.js} +47 -47
  20. package/vendor/type-server/editors/data/index.html +1 -1
  21. package/vendor/type-server/editors/design/assets/{index-BrdhJyzS.js → index-B7xC9lgd.js} +1 -1
  22. package/vendor/type-server/editors/design/index.html +1 -1
  23. package/vendor/type-server/editors/design-system/assets/{index-CzmxC323.js → index-DGKI25Kz.js} +1 -1
  24. package/vendor/type-server/editors/design-system/index.html +1 -1
  25. package/vendor/type-server/editors/docs/assets/{abnfDiagram-WEYOIA3C-Dv154SrF.js → abnfDiagram-WEYOIA3C-DLYeh61n.js} +1 -1
  26. package/vendor/type-server/editors/docs/assets/{architectureDiagram-ZHVYKT53-DyZHuLhJ.js → architectureDiagram-ZHVYKT53-CvfX-f6t.js} +1 -1
  27. package/vendor/type-server/editors/docs/assets/{blockDiagram-RJAE7QA3-BVzElt5r.js → blockDiagram-RJAE7QA3-BuMdAurF.js} +1 -1
  28. package/vendor/type-server/editors/docs/assets/{c4Diagram-XDPPPE54-CZt_JzyM.js → c4Diagram-XDPPPE54-DnsUS0yb.js} +1 -1
  29. package/vendor/type-server/editors/docs/assets/channel-BYTsmpKR.js +1 -0
  30. package/vendor/type-server/editors/docs/assets/{chunk-2E7WHVMD-B9sK7gtB.js → chunk-2E7WHVMD-B0hTS-j6.js} +1 -1
  31. package/vendor/type-server/editors/docs/assets/{chunk-2Q5K7J3B-0sEzcfME.js → chunk-2Q5K7J3B-kuaWCtjo.js} +1 -1
  32. package/vendor/type-server/editors/docs/assets/{chunk-4EMNKR2T-C_Z99jKO.js → chunk-4EMNKR2T-CnIFvtij.js} +1 -1
  33. package/vendor/type-server/editors/docs/assets/{chunk-55XCU76K-CTJ_yvnE.js → chunk-55XCU76K-DeNoc63i.js} +1 -1
  34. package/vendor/type-server/editors/docs/assets/{chunk-5VM5RSS4-BVUngG1n.js → chunk-5VM5RSS4-ByJmCCoZ.js} +1 -1
  35. package/vendor/type-server/editors/docs/assets/{chunk-JWPE2WC7-BG8q643y.js → chunk-JWPE2WC7-nYIDADtB.js} +1 -1
  36. package/vendor/type-server/editors/docs/assets/{chunk-VQ5W62QI-DM3WoZ2q.js → chunk-VQ5W62QI-C076AjWx.js} +1 -1
  37. package/vendor/type-server/editors/docs/assets/{chunk-XXDRQBXY-C00q7Mab.js → chunk-XXDRQBXY-B78mCstV.js} +1 -1
  38. package/vendor/type-server/editors/docs/assets/{chunk-ZCHMQSOR-D4maMLQe.js → chunk-ZCHMQSOR-BFZDC_RV.js} +2 -2
  39. package/vendor/type-server/editors/docs/assets/{classDiagram-v2-4MYWR3UA-Bp5cp9Vf.js → classDiagram-v2-4MYWR3UA-BgoltvGQ.js} +1 -1
  40. package/vendor/type-server/editors/docs/assets/{core-B_ycqU5t.js → core-DOLotgzB.js} +1 -1
  41. package/vendor/type-server/editors/docs/assets/{cose-bilkent-JH36ORCC-DkfTi_Mh.js → cose-bilkent-JH36ORCC-CTi9NUjI.js} +1 -1
  42. package/vendor/type-server/editors/docs/assets/{cynefin-EF2NZ3EQ-BAO9xuAp.js → cynefin-EF2NZ3EQ-AT185m6Z.js} +1 -1
  43. package/vendor/type-server/editors/docs/assets/{cynefinDiagram-WF24UDRP-Dg1Wkac0.js → cynefinDiagram-WF24UDRP-B7A32WOt.js} +1 -1
  44. package/vendor/type-server/editors/docs/assets/{dagre-NK4GIZVX-CfNALyX0.js → dagre-NK4GIZVX-BPpChDdA.js} +1 -1
  45. package/vendor/type-server/editors/docs/assets/{diagram-CBK3MWTC-DgJwZ6YO.js → diagram-CBK3MWTC-B8E9ZfwT.js} +1 -1
  46. package/vendor/type-server/editors/docs/assets/{diagram-I5XIIV2D-DfXCPCo3.js → diagram-I5XIIV2D-Ba0NVe3Z.js} +1 -1
  47. package/vendor/type-server/editors/docs/assets/{diagram-ODIL2UCW-CS08zfFl.js → diagram-ODIL2UCW-DcEJYqLV.js} +1 -1
  48. package/vendor/type-server/editors/docs/assets/{diagram-PFBEJUXE-AiRj8OJ_.js → diagram-PFBEJUXE-qd3Bqm9b.js} +1 -1
  49. package/vendor/type-server/editors/docs/assets/{diagram-RJA3I4VV-sPxKazJU.js → diagram-RJA3I4VV-CXK64Gxp.js} +1 -1
  50. package/vendor/type-server/editors/docs/assets/{diagram-TYUNFSNR-BTGn9TFm.js → diagram-TYUNFSNR-BUC8aGLh.js} +1 -1
  51. package/vendor/type-server/editors/docs/assets/{ebnfDiagram-V4P3TTPT-BPbh_BoA.js → ebnfDiagram-V4P3TTPT-BPC5VX-Z.js} +1 -1
  52. package/vendor/type-server/editors/docs/assets/{elk-QONTBCTQ-D7zmcVsR.js → elk-QONTBCTQ-CXewxyIL.js} +1 -1
  53. package/vendor/type-server/editors/docs/assets/{erDiagram-KYQIGQAA-q-bPsv5E.js → erDiagram-KYQIGQAA-CCExoS15.js} +1 -1
  54. package/vendor/type-server/editors/docs/assets/{flowDiagram-IUGLLWBU-C_zjPe4l.js → flowDiagram-IUGLLWBU-Cd-ITEO3.js} +1 -1
  55. package/vendor/type-server/editors/docs/assets/{ganttDiagram-R7GPNTJY-DDpOC6aJ.js → ganttDiagram-R7GPNTJY-5Xes1jOR.js} +1 -1
  56. package/vendor/type-server/editors/docs/assets/{gitGraphDiagram-PDYL7XHY-BU1msmkW.js → gitGraphDiagram-PDYL7XHY-DxAnpwu-.js} +1 -1
  57. package/vendor/type-server/editors/docs/assets/{index-qJ3X4MC1.js → index-C_nafIet.js} +3 -3
  58. package/vendor/type-server/editors/docs/assets/{infoDiagram-MVDRKAX5-B0LtNVGB.js → infoDiagram-MVDRKAX5-JnY_-gtr.js} +1 -1
  59. package/vendor/type-server/editors/docs/assets/{ishikawaDiagram-HPEHV2GE-BhviCdhI.js → ishikawaDiagram-HPEHV2GE-B1CanJ8I.js} +1 -1
  60. package/vendor/type-server/editors/docs/assets/{journeyDiagram-BOSHW7O7-BTSz6EUz.js → journeyDiagram-BOSHW7O7-CRxNu8ma.js} +1 -1
  61. package/vendor/type-server/editors/docs/assets/{kanban-definition-FNSA4HC5-CswepIc1.js → kanban-definition-FNSA4HC5-CbVkfK-B.js} +1 -1
  62. package/vendor/type-server/editors/docs/assets/{mermaid.core-CP2KJVd4.js → mermaid.core-B8KhXrKp.js} +4 -4
  63. package/vendor/type-server/editors/docs/assets/{mindmap-definition-6OY57UG3-B8dzRim4.js → mindmap-definition-6OY57UG3-CeAI8W2f.js} +1 -1
  64. package/vendor/type-server/editors/docs/assets/{pegDiagram-ECIUJNBX-B7V2uqYh.js → pegDiagram-ECIUJNBX-LgerP_ec.js} +1 -1
  65. package/vendor/type-server/editors/docs/assets/{pieDiagram-GNMPY74T-h2YV0--u.js → pieDiagram-GNMPY74T-C__3Jf4D.js} +1 -1
  66. package/vendor/type-server/editors/docs/assets/{quadrantDiagram-D57K4MC3-BDrvmUiS.js → quadrantDiagram-D57K4MC3-CKMN0DdI.js} +1 -1
  67. package/vendor/type-server/editors/docs/assets/{railroadDiagram-Y72NRBL7-CBc2jbav.js → railroadDiagram-Y72NRBL7-DAp9-ZpN.js} +1 -1
  68. package/vendor/type-server/editors/docs/assets/{requirementDiagram-EQYSW5RA-2vzlnjD8.js → requirementDiagram-EQYSW5RA-umiVS7zv.js} +1 -1
  69. package/vendor/type-server/editors/docs/assets/{sankeyDiagram-SY24JHO5-ChkHrWqS.js → sankeyDiagram-SY24JHO5-CBy4oqxY.js} +1 -1
  70. package/vendor/type-server/editors/docs/assets/{sequenceDiagram-BLEHNHQU-x-fxt2Mo.js → sequenceDiagram-BLEHNHQU-AdVt_Q-4.js} +1 -1
  71. package/vendor/type-server/editors/docs/assets/{sizeCapture-INFHLROL-CGjaw82k.js → sizeCapture-INFHLROL-VLf13Ek7.js} +1 -1
  72. package/vendor/type-server/editors/docs/assets/{stateDiagram-v2-A6IESKWZ-DOK0Upui.js → stateDiagram-v2-A6IESKWZ-CKlLy5OU.js} +1 -1
  73. package/vendor/type-server/editors/docs/assets/{swimlanes-B3ENRKFQ-D5eScFWA.js → swimlanes-B3ENRKFQ-CDMDw0Is.js} +1 -1
  74. package/vendor/type-server/editors/docs/assets/swimlanesDiagram-AYQRV4AK-D3A8RfCK.js +8 -0
  75. package/vendor/type-server/editors/docs/assets/{timeline-definition-JXYKGLGB-W55YrrVw.js → timeline-definition-JXYKGLGB-GSz1JMKO.js} +1 -1
  76. package/vendor/type-server/editors/docs/assets/{usecaseDiagram-WPOLBNNX-tABT6ize.js → usecaseDiagram-WPOLBNNX-CiFLmg1q.js} +1 -1
  77. package/vendor/type-server/editors/docs/assets/{vennDiagram-Q3Y3IDCW-BWt2GhcT.js → vennDiagram-Q3Y3IDCW-DWWW2vU4.js} +1 -1
  78. package/vendor/type-server/editors/docs/assets/{wardleyDiagram-IVAIDKWA-fvuZtRA5.js → wardleyDiagram-IVAIDKWA-Te2-YFAR.js} +1 -1
  79. package/vendor/type-server/editors/docs/assets/{xychartDiagram-4URNHDU4-DcwGParI.js → xychartDiagram-4URNHDU4-Bg5qZWXz.js} +1 -1
  80. package/vendor/type-server/editors/docs/index.html +1 -1
  81. package/vendor/type-server/editors/motion/assets/{gif-jobs-D3frbcNq.js → gif-jobs-DJ_BlyJ3.js} +1 -1
  82. package/vendor/type-server/editors/motion/assets/{index-SWgAM2I3.js → index-wDfoRno_.js} +56 -56
  83. package/vendor/type-server/editors/motion/assets/{src-D5Za67Y-.js → src-CI-JlOkT.js} +1 -1
  84. package/vendor/type-server/editors/motion/index.html +1 -1
  85. package/vendor/type-server/editors/sheets/assets/{index-rCtPaKgo.js → index-CepxaSRn.js} +2 -2
  86. package/vendor/type-server/editors/sheets/assets/{open_artifact_sheets_bg-5Z-ovm0X.wasm → open_artifact_sheets_bg-BTR1sk36.wasm} +0 -0
  87. package/vendor/type-server/editors/sheets/assets/{workbook-worker-mGAKSVY2.js → workbook-worker-oPs2yIfH.js} +11 -11
  88. package/vendor/type-server/editors/sheets/index.html +1 -1
  89. package/vendor/type-server/editors/slides/assets/{index-DjcMrs2F.js → index-C2Khifud.js} +2 -2
  90. package/vendor/type-server/editors/slides/assets/{src-Bd7LdOFl.js → src-DVVcnfGK.js} +1 -1
  91. package/vendor/type-server/editors/slides/index.html +1 -1
  92. package/vendor/type-server/editors/whiteboard/assets/{drawing-look-worker-LId0hWzY.js → drawing-look-worker-CRANgcMl.js} +3 -3
  93. package/vendor/type-server/editors/whiteboard/assets/{index-nmJr9plT.js → index-BUcaEfJn.js} +2 -2
  94. package/vendor/type-server/editors/whiteboard/index.html +1 -1
  95. package/vendor/type-server/motion-tools.html +6 -6
  96. package/vendor/type-server/sheets.wasm +0 -0
  97. package/vendor/{shell/assets/index-yS15KRJ8.js → type-server/shell/assets/index-C3-yWoJw.js} +14 -14
  98. package/vendor/type-server/shell/index.html +1 -1
  99. package/vendor/type-server/editors/docs/assets/channel-wcQnbnDl.js +0 -1
  100. package/vendor/type-server/editors/docs/assets/swimlanesDiagram-AYQRV4AK-C21UYBd-.js +0 -8
@@ -6,7 +6,7 @@ function ST(n,i){for(var l=0;l<i.length;l++){const r=i[l];if(typeof r!="string"&
6
6
  `+_[a].replace(" at new "," at ");return e.displayName&&re.includes("<anonymous>")&&(re=re.replace("<anonymous>",e.displayName)),re}while(1<=a&&0<=s);break}}}finally{Le=!1,Error.prepareStackTrace=o}return(o=e?e.displayName||e.name:"")?je(o):""}function Te(e,t){switch(e.tag){case 26:case 27:case 5:return je(e.type);case 16:return je("Lazy");case 13:return e.child!==t&&t!==null?je("Suspense Fallback"):je("Suspense");case 19:return je("SuspenseList");case 0:case 15:return Ve(e.type,!1);case 11:return Ve(e.type.render,!1);case 1:return Ve(e.type,!0);case 31:return je("Activity");default:return""}}function Ue(e){try{var t="",o=null;do t+=Te(e,o),o=e,e=e.return;while(e);return t}catch(a){return`
7
7
  Error generating stack: `+a.message+`
8
8
  `+a.stack}}var Ee=Object.prototype.hasOwnProperty,we=n.unstable_scheduleCallback,Ae=n.unstable_cancelCallback,Qe=n.unstable_shouldYield,Me=n.unstable_requestPaint,fe=n.unstable_now,ye=n.unstable_getCurrentPriorityLevel,de=n.unstable_ImmediatePriority,le=n.unstable_UserBlockingPriority,be=n.unstable_NormalPriority,Be=n.unstable_LowPriority,Ut=n.unstable_IdlePriority,tn=n.log,Tt=n.unstable_setDisableYieldValue,xe=null,Ye=null;function nt(e){if(typeof tn=="function"&&Tt(e),Ye&&typeof Ye.setStrictMode=="function")try{Ye.setStrictMode(xe,e)}catch{}}var pt=Math.clz32?Math.clz32:En,Tn=Math.log,Un=Math.LN2;function En(e){return e>>>=0,e===0?32:31-(Tn(e)/Un|0)|0}var At=256,Bn=262144,Xe=4194304;function xt(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Yt(e,t,o){var a=e.pendingLanes;if(a===0)return 0;var s=0,c=e.suspendedLanes,g=e.pingedLanes;e=e.warmLanes;var x=a&134217727;return x!==0?(a=x&~c,a!==0?s=xt(a):(g&=x,g!==0?s=xt(g):o||(o=x&~e,o!==0&&(s=xt(o))))):(x=a&~c,x!==0?s=xt(x):g!==0?s=xt(g):o||(o=a&~e,o!==0&&(s=xt(o)))),s===0?0:t!==0&&t!==s&&(t&c)===0&&(c=s&-s,o=t&-t,c>=o||c===32&&(o&4194048)!==0)?t:s}function Mt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Kn(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function nn(){var e=Xe;return Xe<<=1,(Xe&62914560)===0&&(Xe=4194304),e}function ko(e){for(var t=[],o=0;31>o;o++)t.push(e);return t}function wn(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function qi(e,t,o,a,s,c){var g=e.pendingLanes;e.pendingLanes=o,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=o,e.entangledLanes&=o,e.errorRecoveryDisabledLanes&=o,e.shellSuspendCounter=0;var x=e.entanglements,_=e.expirationTimes,X=e.hiddenUpdates;for(o=g&~o;0<o;){var re=31-pt(o),ce=1<<re;x[re]=0,_[re]=-1;var Z=X[re];if(Z!==null)for(X[re]=null,re=0;re<Z.length;re++){var te=Z[re];te!==null&&(te.lane&=-536870913)}o&=~ce}a!==0&&In(e,a,0),c!==0&&s===0&&e.tag!==0&&(e.suspendedLanes|=c&~(g&~t))}function In(e,t,o){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-pt(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|o&261930}function jo(e,t){var o=e.entangledLanes|=t;for(e=e.entanglements;o;){var a=31-pt(o),s=1<<a;s&t|e[a]&t&&(e[a]|=t),o&=~s}}function Ho(e,t){var o=t&-t;return o=(o&42)!==0?1:Lo(o),(o&(e.suspendedLanes|t))!==0?0:o}function Lo(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function gi(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Kl(){var e=q.p;return e!==0?e:(e=window.event,e===void 0?32:iy(e.type))}function Ql(e,t){var o=q.p;try{return q.p=e,t()}finally{q.p=o}}var Uo=Math.random().toString(36).slice(2),qt="__reactFiber$"+Uo,on="__reactProps$"+Uo,Vi="__reactContainer$"+Uo,lu="__reactEvents$"+Uo,uS="__reactListeners$"+Uo,cS="__reactHandles$"+Uo,xp="__reactResources$"+Uo,Ia="__reactMarker$"+Uo;function ru(e){delete e[qt],delete e[on],delete e[lu],delete e[uS],delete e[cS]}function Gi(e){var t=e[qt];if(t)return t;for(var o=e.parentNode;o;){if(t=o[Vi]||o[qt]){if(o=t.alternate,t.child!==null||o!==null&&o.child!==null)for(e=Ym(e);e!==null;){if(o=e[qt])return o;e=Ym(e)}return t}e=o,o=e.parentNode}return null}function Xi(e){if(e=e[qt]||e[Vi]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Pa(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function Fi(e){var t=e[xp];return t||(t=e[xp]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Bt(e){e[Ia]=!0}var Tp=new Set,Ep={};function mi(e,t){Ki(e,t),Ki(e+"Capture",t)}function Ki(e,t){for(Ep[e]=t,e=0;e<t.length;e++)Tp.add(t[e])}var fS=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),wp={},Rp={};function dS(e){return Ee.call(Rp,e)?!0:Ee.call(wp,e)?!1:fS.test(e)?Rp[e]=!0:(wp[e]=!0,!1)}function Zl(e,t,o){if(dS(t))if(o===null)e.removeAttribute(t);else{switch(typeof o){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+o)}}function Wl(e,t,o){if(o===null)e.removeAttribute(t);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+o)}}function no(e,t,o,a){if(a===null)e.removeAttribute(o);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(o);return}e.setAttributeNS(t,o,""+a)}}function Rn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Cp(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function pS(e,t,o){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var s=a.get,c=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(g){o=""+g,c.call(this,g)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return o},setValue:function(g){o=""+g},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function su(e){if(!e._valueTracker){var t=Cp(e)?"checked":"value";e._valueTracker=pS(e,t,""+e[t])}}function Op(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var o=t.getValue(),a="";return e&&(a=Cp(e)?e.checked?"true":"false":e.value),e=a,e!==o?(t.setValue(e),!0):!1}function Jl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var hS=/[\n"\\]/g;function Cn(e){return e.replace(hS,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function uu(e,t,o,a,s,c,g,x){e.name="",g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"?e.type=g:e.removeAttribute("type"),t!=null?g==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Rn(t)):e.value!==""+Rn(t)&&(e.value=""+Rn(t)):g!=="submit"&&g!=="reset"||e.removeAttribute("value"),t!=null?cu(e,g,Rn(t)):o!=null?cu(e,g,Rn(o)):a!=null&&e.removeAttribute("value"),s==null&&c!=null&&(e.defaultChecked=!!c),s!=null&&(e.checked=s&&typeof s!="function"&&typeof s!="symbol"),x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.name=""+Rn(x):e.removeAttribute("name")}function Ap(e,t,o,a,s,c,g,x){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.type=c),t!=null||o!=null){if(!(c!=="submit"&&c!=="reset"||t!=null)){su(e);return}o=o!=null?""+Rn(o):"",t=t!=null?""+Rn(t):o,x||t===e.value||(e.value=t),e.defaultValue=t}a=a??s,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=x?e.checked:!!a,e.defaultChecked=!!a,g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(e.name=g),su(e)}function cu(e,t,o){t==="number"&&Jl(e.ownerDocument)===e||e.defaultValue===""+o||(e.defaultValue=""+o)}function Qi(e,t,o,a){if(e=e.options,t){t={};for(var s=0;s<o.length;s++)t["$"+o[s]]=!0;for(o=0;o<e.length;o++)s=t.hasOwnProperty("$"+e[o].value),e[o].selected!==s&&(e[o].selected=s),s&&a&&(e[o].defaultSelected=!0)}else{for(o=""+Rn(o),t=null,s=0;s<e.length;s++){if(e[s].value===o){e[s].selected=!0,a&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function Mp(e,t,o){if(t!=null&&(t=""+Rn(t),t!==e.value&&(e.value=t),o==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=o!=null?""+Rn(o):""}function Dp(e,t,o,a){if(t==null){if(a!=null){if(o!=null)throw Error(r(92));if(F(a)){if(1<a.length)throw Error(r(93));a=a[0]}o=a}o==null&&(o=""),t=o}o=Rn(t),e.defaultValue=o,a=e.textContent,a===o&&a!==""&&a!==null&&(e.value=a),su(e)}function Zi(e,t){if(t){var o=e.firstChild;if(o&&o===e.lastChild&&o.nodeType===3){o.nodeValue=t;return}}e.textContent=t}var gS=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Np(e,t,o){var a=t.indexOf("--")===0;o==null||typeof o=="boolean"||o===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,o):typeof o!="number"||o===0||gS.has(t)?t==="float"?e.cssFloat=o:e[t]=(""+o).trim():e[t]=o+"px"}function zp(e,t,o){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,o!=null){for(var a in o)!o.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var s in t)a=t[s],t.hasOwnProperty(s)&&o[s]!==a&&Np(e,s,a)}else for(var c in t)t.hasOwnProperty(c)&&Np(e,c,t[c])}function fu(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var mS=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),yS=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function $l(e){return yS.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function oo(){}var du=null;function pu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Wi=null,Ji=null;function _p(e){var t=Xi(e);if(t&&(e=t.stateNode)){var o=e[on]||null;e:switch(e=t.stateNode,t.type){case"input":if(uu(e,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name),t=o.name,o.type==="radio"&&t!=null){for(o=e;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll('input[name="'+Cn(""+t)+'"][type="radio"]'),t=0;t<o.length;t++){var a=o[t];if(a!==e&&a.form===e.form){var s=a[on]||null;if(!s)throw Error(r(90));uu(a,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name)}}for(t=0;t<o.length;t++)a=o[t],a.form===e.form&&Op(a)}break e;case"textarea":Mp(e,o.value,o.defaultValue);break e;case"select":t=o.value,t!=null&&Qi(e,!!o.multiple,t,!1)}}}var hu=!1;function kp(e,t,o){if(hu)return e(t,o);hu=!0;try{var a=e(t);return a}finally{if(hu=!1,(Wi!==null||Ji!==null)&&(Ir(),Wi&&(t=Wi,e=Ji,Ji=Wi=null,_p(t),e)))for(t=0;t<e.length;t++)_p(e[t])}}function Ya(e,t){var o=e.stateNode;if(o===null)return null;var a=o[on]||null;if(a===null)return null;o=a[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(o&&typeof o!="function")throw Error(r(231,t,typeof o));return o}var io=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),gu=!1;if(io)try{var qa={};Object.defineProperty(qa,"passive",{get:function(){gu=!0}}),window.addEventListener("test",qa,qa),window.removeEventListener("test",qa,qa)}catch{gu=!1}var Bo=null,mu=null,er=null;function jp(){if(er)return er;var e,t=mu,o=t.length,a,s="value"in Bo?Bo.value:Bo.textContent,c=s.length;for(e=0;e<o&&t[e]===s[e];e++);var g=o-e;for(a=1;a<=g&&t[o-a]===s[c-a];a++);return er=s.slice(e,1<a?1-a:void 0)}function tr(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function nr(){return!0}function Hp(){return!1}function an(e){function t(o,a,s,c,g){this._reactName=o,this._targetInst=s,this.type=a,this.nativeEvent=c,this.target=g,this.currentTarget=null;for(var x in e)e.hasOwnProperty(x)&&(o=e[x],this[x]=o?o(c):c[x]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?nr:Hp,this.isPropagationStopped=Hp,this}return v(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=nr)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=nr)},persist:function(){},isPersistent:nr}),t}var yi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},or=an(yi),Va=v({},yi,{view:0,detail:0}),bS=an(Va),yu,bu,Ga,ir=v({},Va,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Su,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Ga&&(Ga&&e.type==="mousemove"?(yu=e.screenX-Ga.screenX,bu=e.screenY-Ga.screenY):bu=yu=0,Ga=e),yu)},movementY:function(e){return"movementY"in e?e.movementY:bu}}),Lp=an(ir),vS=v({},ir,{dataTransfer:0}),SS=an(vS),xS=v({},Va,{relatedTarget:0}),vu=an(xS),TS=v({},yi,{animationName:0,elapsedTime:0,pseudoElement:0}),ES=an(TS),wS=v({},yi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),RS=an(wS),CS=v({},yi,{data:0}),Up=an(CS),OS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},AS={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},MS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function DS(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=MS[e])?!!t[e]:!1}function Su(){return DS}var NS=v({},Va,{key:function(e){if(e.key){var t=OS[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=tr(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?AS[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Su,charCode:function(e){return e.type==="keypress"?tr(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?tr(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),zS=an(NS),_S=v({},ir,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Bp=an(_S),kS=v({},Va,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Su}),jS=an(kS),HS=v({},yi,{propertyName:0,elapsedTime:0,pseudoElement:0}),LS=an(HS),US=v({},ir,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),BS=an(US),IS=v({},yi,{newState:0,oldState:0}),PS=an(IS),YS=[9,13,27,32],xu=io&&"CompositionEvent"in window,Xa=null;io&&"documentMode"in document&&(Xa=document.documentMode);var qS=io&&"TextEvent"in window&&!Xa,Ip=io&&(!xu||Xa&&8<Xa&&11>=Xa),Pp=" ",Yp=!1;function qp(e,t){switch(e){case"keyup":return YS.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Vp(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var $i=!1;function VS(e,t){switch(e){case"compositionend":return Vp(t);case"keypress":return t.which!==32?null:(Yp=!0,Pp);case"textInput":return e=t.data,e===Pp&&Yp?null:e;default:return null}}function GS(e,t){if($i)return e==="compositionend"||!xu&&qp(e,t)?(e=jp(),er=mu=Bo=null,$i=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Ip&&t.locale!=="ko"?null:t.data;default:return null}}var XS={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Gp(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!XS[e.type]:t==="textarea"}function Xp(e,t,o,a){Wi?Ji?Ji.push(a):Ji=[a]:Wi=a,t=Fr(t,"onChange"),0<t.length&&(o=new or("onChange","change",null,o,a),e.push({event:o,listeners:t}))}var Fa=null,Ka=null;function FS(e){Am(e,0)}function ar(e){var t=Pa(e);if(Op(t))return e}function Fp(e,t){if(e==="change")return t}var Kp=!1;if(io){var Tu;if(io){var Eu="oninput"in document;if(!Eu){var Qp=document.createElement("div");Qp.setAttribute("oninput","return;"),Eu=typeof Qp.oninput=="function"}Tu=Eu}else Tu=!1;Kp=Tu&&(!document.documentMode||9<document.documentMode)}function Zp(){Fa&&(Fa.detachEvent("onpropertychange",Wp),Ka=Fa=null)}function Wp(e){if(e.propertyName==="value"&&ar(Ka)){var t=[];Xp(t,Ka,e,pu(e)),kp(FS,t)}}function KS(e,t,o){e==="focusin"?(Zp(),Fa=t,Ka=o,Fa.attachEvent("onpropertychange",Wp)):e==="focusout"&&Zp()}function QS(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ar(Ka)}function ZS(e,t){if(e==="click")return ar(t)}function WS(e,t){if(e==="input"||e==="change")return ar(t)}function JS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var dn=typeof Object.is=="function"?Object.is:JS;function Qa(e,t){if(dn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var o=Object.keys(e),a=Object.keys(t);if(o.length!==a.length)return!1;for(a=0;a<o.length;a++){var s=o[a];if(!Ee.call(t,s)||!dn(e[s],t[s]))return!1}return!0}function Jp(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function $p(e,t){var o=Jp(e);e=0;for(var a;o;){if(o.nodeType===3){if(a=e+o.textContent.length,e<=t&&a>=t)return{node:o,offset:t-e};e=a}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=Jp(o)}}function eh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?eh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function th(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Jl(e.document);t instanceof e.HTMLIFrameElement;){try{var o=typeof t.contentWindow.location.href=="string"}catch{o=!1}if(o)e=t.contentWindow;else break;t=Jl(e.document)}return t}function wu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var $S=io&&"documentMode"in document&&11>=document.documentMode,ea=null,Ru=null,Za=null,Cu=!1;function nh(e,t,o){var a=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;Cu||ea==null||ea!==Jl(a)||(a=ea,"selectionStart"in a&&wu(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Za&&Qa(Za,a)||(Za=a,a=Fr(Ru,"onSelect"),0<a.length&&(t=new or("onSelect","select",null,t,o),e.push({event:t,listeners:a}),t.target=ea)))}function bi(e,t){var o={};return o[e.toLowerCase()]=t.toLowerCase(),o["Webkit"+e]="webkit"+t,o["Moz"+e]="moz"+t,o}var ta={animationend:bi("Animation","AnimationEnd"),animationiteration:bi("Animation","AnimationIteration"),animationstart:bi("Animation","AnimationStart"),transitionrun:bi("Transition","TransitionRun"),transitionstart:bi("Transition","TransitionStart"),transitioncancel:bi("Transition","TransitionCancel"),transitionend:bi("Transition","TransitionEnd")},Ou={},oh={};io&&(oh=document.createElement("div").style,"AnimationEvent"in window||(delete ta.animationend.animation,delete ta.animationiteration.animation,delete ta.animationstart.animation),"TransitionEvent"in window||delete ta.transitionend.transition);function vi(e){if(Ou[e])return Ou[e];if(!ta[e])return e;var t=ta[e],o;for(o in t)if(t.hasOwnProperty(o)&&o in oh)return Ou[e]=t[o];return e}var ih=vi("animationend"),ah=vi("animationiteration"),lh=vi("animationstart"),ex=vi("transitionrun"),tx=vi("transitionstart"),nx=vi("transitioncancel"),rh=vi("transitionend"),sh=new Map,Au="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Au.push("scrollEnd");function Pn(e,t){sh.set(e,t),mi(t,[e])}var lr=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},On=[],na=0,Mu=0;function rr(){for(var e=na,t=Mu=na=0;t<e;){var o=On[t];On[t++]=null;var a=On[t];On[t++]=null;var s=On[t];On[t++]=null;var c=On[t];if(On[t++]=null,a!==null&&s!==null){var g=a.pending;g===null?s.next=s:(s.next=g.next,g.next=s),a.pending=s}c!==0&&uh(o,s,c)}}function sr(e,t,o,a){On[na++]=e,On[na++]=t,On[na++]=o,On[na++]=a,Mu|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function Du(e,t,o,a){return sr(e,t,o,a),ur(e)}function Si(e,t){return sr(e,null,null,t),ur(e)}function uh(e,t,o){e.lanes|=o;var a=e.alternate;a!==null&&(a.lanes|=o);for(var s=!1,c=e.return;c!==null;)c.childLanes|=o,a=c.alternate,a!==null&&(a.childLanes|=o),c.tag===22&&(e=c.stateNode,e===null||e._visibility&1||(s=!0)),e=c,c=c.return;return e.tag===3?(c=e.stateNode,s&&t!==null&&(s=31-pt(o),e=c.hiddenUpdates,a=e[s],a===null?e[s]=[t]:a.push(t),t.lane=o|536870912),c):null}function ur(e){if(50<bl)throw bl=0,Bc=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var oa={};function ox(e,t,o,a){this.tag=e,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function pn(e,t,o,a){return new ox(e,t,o,a)}function Nu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ao(e,t){var o=e.alternate;return o===null?(o=pn(e.tag,t,e.key,e.mode),o.elementType=e.elementType,o.type=e.type,o.stateNode=e.stateNode,o.alternate=e,e.alternate=o):(o.pendingProps=t,o.type=e.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=e.flags&65011712,o.childLanes=e.childLanes,o.lanes=e.lanes,o.child=e.child,o.memoizedProps=e.memoizedProps,o.memoizedState=e.memoizedState,o.updateQueue=e.updateQueue,t=e.dependencies,o.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},o.sibling=e.sibling,o.index=e.index,o.ref=e.ref,o.refCleanup=e.refCleanup,o}function ch(e,t){e.flags&=65011714;var o=e.alternate;return o===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=o.childLanes,e.lanes=o.lanes,e.child=o.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=o.memoizedProps,e.memoizedState=o.memoizedState,e.updateQueue=o.updateQueue,e.type=o.type,t=o.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function cr(e,t,o,a,s,c){var g=0;if(a=e,typeof e=="function")Nu(e)&&(g=1);else if(typeof e=="string")g=sT(e,o,V.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case J:return e=pn(31,o,t,s),e.elementType=J,e.lanes=c,e;case C:return xi(o.children,s,c,t);case O:g=8,s|=24;break;case A:return e=pn(12,o,t,s|2),e.elementType=A,e.lanes=c,e;case k:return e=pn(13,o,t,s),e.elementType=k,e.lanes=c,e;case L:return e=pn(19,o,t,s),e.elementType=L,e.lanes=c,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case M:g=10;break e;case N:g=9;break e;case D:g=11;break e;case j:g=14;break e;case H:g=16,a=null;break e}g=29,o=Error(r(130,e===null?"null":typeof e,"")),a=null}return t=pn(g,o,t,s),t.elementType=e,t.type=a,t.lanes=c,t}function xi(e,t,o,a){return e=pn(7,e,a,t),e.lanes=o,e}function zu(e,t,o){return e=pn(6,e,null,t),e.lanes=o,e}function fh(e){var t=pn(18,null,null,0);return t.stateNode=e,t}function _u(e,t,o){return t=pn(4,e.children!==null?e.children:[],e.key,t),t.lanes=o,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var dh=new WeakMap;function An(e,t){if(typeof e=="object"&&e!==null){var o=dh.get(e);return o!==void 0?o:(t={value:e,source:t,stack:Ue(t)},dh.set(e,t),t)}return{value:e,source:t,stack:Ue(t)}}var ia=[],aa=0,fr=null,Wa=0,Mn=[],Dn=0,Io=null,Qn=1,Zn="";function lo(e,t){ia[aa++]=Wa,ia[aa++]=fr,fr=e,Wa=t}function ph(e,t,o){Mn[Dn++]=Qn,Mn[Dn++]=Zn,Mn[Dn++]=Io,Io=e;var a=Qn;e=Zn;var s=32-pt(a)-1;a&=~(1<<s),o+=1;var c=32-pt(t)+s;if(30<c){var g=s-s%5;c=(a&(1<<g)-1).toString(32),a>>=g,s-=g,Qn=1<<32-pt(t)+s|o<<s|a,Zn=c+e}else Qn=1<<c|o<<s|a,Zn=e}function ku(e){e.return!==null&&(lo(e,1),ph(e,1,0))}function ju(e){for(;e===fr;)fr=ia[--aa],ia[aa]=null,Wa=ia[--aa],ia[aa]=null;for(;e===Io;)Io=Mn[--Dn],Mn[Dn]=null,Zn=Mn[--Dn],Mn[Dn]=null,Qn=Mn[--Dn],Mn[Dn]=null}function hh(e,t){Mn[Dn++]=Qn,Mn[Dn++]=Zn,Mn[Dn++]=Io,Qn=t.id,Zn=t.overflow,Io=e}var Vt=null,gt=null,tt=!1,Po=null,Nn=!1,Hu=Error(r(519));function Yo(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ja(An(t,e)),Hu}function gh(e){var t=e.stateNode,o=e.type,a=e.memoizedProps;switch(t[qt]=e,t[on]=a,o){case"dialog":We("cancel",t),We("close",t);break;case"iframe":case"object":case"embed":We("load",t);break;case"video":case"audio":for(o=0;o<Sl.length;o++)We(Sl[o],t);break;case"source":We("error",t);break;case"img":case"image":case"link":We("error",t),We("load",t);break;case"details":We("toggle",t);break;case"input":We("invalid",t),Ap(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":We("invalid",t);break;case"textarea":We("invalid",t),Dp(t,a.value,a.defaultValue,a.children)}o=a.children,typeof o!="string"&&typeof o!="number"&&typeof o!="bigint"||t.textContent===""+o||a.suppressHydrationWarning===!0||zm(t.textContent,o)?(a.popover!=null&&(We("beforetoggle",t),We("toggle",t)),a.onScroll!=null&&We("scroll",t),a.onScrollEnd!=null&&We("scrollend",t),a.onClick!=null&&(t.onclick=oo),t=!0):t=!1,t||Yo(e,!0)}function mh(e){for(Vt=e.return;Vt;)switch(Vt.tag){case 5:case 31:case 13:Nn=!1;return;case 27:case 3:Nn=!0;return;default:Vt=Vt.return}}function la(e){if(e!==Vt)return!1;if(!tt)return mh(e),tt=!0,!1;var t=e.tag,o;if((o=t!==3&&t!==27)&&((o=t===5)&&(o=e.type,o=!(o!=="form"&&o!=="button")||ef(e.type,e.memoizedProps)),o=!o),o&&gt&&Yo(e),mh(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));gt=Pm(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));gt=Pm(e)}else t===27?(t=gt,ni(e.type)?(e=lf,lf=null,gt=e):gt=t):gt=Vt?_n(e.stateNode.nextSibling):null;return!0}function Ti(){gt=Vt=null,tt=!1}function Lu(){var e=Po;return e!==null&&(un===null?un=e:un.push.apply(un,e),Po=null),e}function Ja(e){Po===null?Po=[e]:Po.push(e)}var Uu=R(null),Ei=null,ro=null;function qo(e,t,o){W(Uu,t._currentValue),t._currentValue=o}function so(e){e._currentValue=Uu.current,B(Uu)}function Bu(e,t,o){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===o)break;e=e.return}}function Iu(e,t,o,a){var s=e.child;for(s!==null&&(s.return=e);s!==null;){var c=s.dependencies;if(c!==null){var g=s.child;c=c.firstContext;e:for(;c!==null;){var x=c;c=s;for(var _=0;_<t.length;_++)if(x.context===t[_]){c.lanes|=o,x=c.alternate,x!==null&&(x.lanes|=o),Bu(c.return,o,e),a||(g=null);break e}c=x.next}}else if(s.tag===18){if(g=s.return,g===null)throw Error(r(341));g.lanes|=o,c=g.alternate,c!==null&&(c.lanes|=o),Bu(g,o,e),g=null}else g=s.child;if(g!==null)g.return=s;else for(g=s;g!==null;){if(g===e){g=null;break}if(s=g.sibling,s!==null){s.return=g.return,g=s;break}g=g.return}s=g}}function ra(e,t,o,a){e=null;for(var s=t,c=!1;s!==null;){if(!c){if((s.flags&524288)!==0)c=!0;else if((s.flags&262144)!==0)break}if(s.tag===10){var g=s.alternate;if(g===null)throw Error(r(387));if(g=g.memoizedProps,g!==null){var x=s.type;dn(s.pendingProps.value,g.value)||(e!==null?e.push(x):e=[x])}}else if(s===ge.current){if(g=s.alternate,g===null)throw Error(r(387));g.memoizedState.memoizedState!==s.memoizedState.memoizedState&&(e!==null?e.push(Rl):e=[Rl])}s=s.return}e!==null&&Iu(t,e,o,a),t.flags|=262144}function dr(e){for(e=e.firstContext;e!==null;){if(!dn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function wi(e){Ei=e,ro=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Gt(e){return yh(Ei,e)}function pr(e,t){return Ei===null&&wi(e),yh(e,t)}function yh(e,t){var o=t._currentValue;if(t={context:t,memoizedValue:o,next:null},ro===null){if(e===null)throw Error(r(308));ro=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ro=ro.next=t;return o}var ix=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(o,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(o){return o()})}},ax=n.unstable_scheduleCallback,lx=n.unstable_NormalPriority,Dt={$$typeof:M,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Pu(){return{controller:new ix,data:new Map,refCount:0}}function $a(e){e.refCount--,e.refCount===0&&ax(lx,function(){e.controller.abort()})}var el=null,Yu=0,sa=0,ua=null;function rx(e,t){if(el===null){var o=el=[];Yu=0,sa=Gc(),ua={status:"pending",value:void 0,then:function(a){o.push(a)}}}return Yu++,t.then(bh,bh),t}function bh(){if(--Yu===0&&el!==null){ua!==null&&(ua.status="fulfilled");var e=el;el=null,sa=0,ua=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function sx(e,t){var o=[],a={status:"pending",value:null,reason:null,then:function(s){o.push(s)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var s=0;s<o.length;s++)(0,o[s])(t)},function(s){for(a.status="rejected",a.reason=s,s=0;s<o.length;s++)(0,o[s])(void 0)}),a}var vh=z.S;z.S=function(e,t){nm=fe(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&rx(e,t),vh!==null&&vh(e,t)};var Ri=R(null);function qu(){var e=Ri.current;return e!==null?e:ht.pooledCache}function hr(e,t){t===null?W(Ri,Ri.current):W(Ri,t.pool)}function Sh(){var e=qu();return e===null?null:{parent:Dt._currentValue,pool:e}}var ca=Error(r(460)),Vu=Error(r(474)),gr=Error(r(542)),mr={then:function(){}};function xh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Th(e,t,o){switch(o=e[o],o===void 0?e.push(t):o!==t&&(t.then(oo,oo),t=o),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,wh(e),e;default:if(typeof t.status=="string")t.then(oo,oo);else{if(e=ht,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var s=t;s.status="fulfilled",s.value=a}},function(a){if(t.status==="pending"){var s=t;s.status="rejected",s.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,wh(e),e}throw Oi=t,ca}}function Ci(e){try{var t=e._init;return t(e._payload)}catch(o){throw o!==null&&typeof o=="object"&&typeof o.then=="function"?(Oi=o,ca):o}}var Oi=null;function Eh(){if(Oi===null)throw Error(r(459));var e=Oi;return Oi=null,e}function wh(e){if(e===ca||e===gr)throw Error(r(483))}var fa=null,tl=0;function yr(e){var t=tl;return tl+=1,fa===null&&(fa=[]),Th(fa,e,t)}function nl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function br(e,t){throw t.$$typeof===S?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Rh(e){function t(Y,U){if(e){var G=Y.deletions;G===null?(Y.deletions=[U],Y.flags|=16):G.push(U)}}function o(Y,U){if(!e)return null;for(;U!==null;)t(Y,U),U=U.sibling;return null}function a(Y){for(var U=new Map;Y!==null;)Y.key!==null?U.set(Y.key,Y):U.set(Y.index,Y),Y=Y.sibling;return U}function s(Y,U){return Y=ao(Y,U),Y.index=0,Y.sibling=null,Y}function c(Y,U,G){return Y.index=G,e?(G=Y.alternate,G!==null?(G=G.index,G<U?(Y.flags|=67108866,U):G):(Y.flags|=67108866,U)):(Y.flags|=1048576,U)}function g(Y){return e&&Y.alternate===null&&(Y.flags|=67108866),Y}function x(Y,U,G,se){return U===null||U.tag!==6?(U=zu(G,Y.mode,se),U.return=Y,U):(U=s(U,G),U.return=Y,U)}function _(Y,U,G,se){var _e=G.type;return _e===C?re(Y,U,G.props.children,se,G.key):U!==null&&(U.elementType===_e||typeof _e=="object"&&_e!==null&&_e.$$typeof===H&&Ci(_e)===U.type)?(U=s(U,G.props),nl(U,G),U.return=Y,U):(U=cr(G.type,G.key,G.props,null,Y.mode,se),nl(U,G),U.return=Y,U)}function X(Y,U,G,se){return U===null||U.tag!==4||U.stateNode.containerInfo!==G.containerInfo||U.stateNode.implementation!==G.implementation?(U=_u(G,Y.mode,se),U.return=Y,U):(U=s(U,G.children||[]),U.return=Y,U)}function re(Y,U,G,se,_e){return U===null||U.tag!==7?(U=xi(G,Y.mode,se,_e),U.return=Y,U):(U=s(U,G),U.return=Y,U)}function ce(Y,U,G){if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return U=zu(""+U,Y.mode,G),U.return=Y,U;if(typeof U=="object"&&U!==null){switch(U.$$typeof){case w:return G=cr(U.type,U.key,U.props,null,Y.mode,G),nl(G,U),G.return=Y,G;case T:return U=_u(U,Y.mode,G),U.return=Y,U;case H:return U=Ci(U),ce(Y,U,G)}if(F(U)||I(U))return U=xi(U,Y.mode,G,null),U.return=Y,U;if(typeof U.then=="function")return ce(Y,yr(U),G);if(U.$$typeof===M)return ce(Y,pr(Y,U),G);br(Y,U)}return null}function Z(Y,U,G,se){var _e=U!==null?U.key:null;if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return _e!==null?null:x(Y,U,""+G,se);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case w:return G.key===_e?_(Y,U,G,se):null;case T:return G.key===_e?X(Y,U,G,se):null;case H:return G=Ci(G),Z(Y,U,G,se)}if(F(G)||I(G))return _e!==null?null:re(Y,U,G,se,null);if(typeof G.then=="function")return Z(Y,U,yr(G),se);if(G.$$typeof===M)return Z(Y,U,pr(Y,G),se);br(Y,G)}return null}function te(Y,U,G,se,_e){if(typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint")return Y=Y.get(G)||null,x(U,Y,""+se,_e);if(typeof se=="object"&&se!==null){switch(se.$$typeof){case w:return Y=Y.get(se.key===null?G:se.key)||null,_(U,Y,se,_e);case T:return Y=Y.get(se.key===null?G:se.key)||null,X(U,Y,se,_e);case H:return se=Ci(se),te(Y,U,G,se,_e)}if(F(se)||I(se))return Y=Y.get(G)||null,re(U,Y,se,_e,null);if(typeof se.then=="function")return te(Y,U,G,yr(se),_e);if(se.$$typeof===M)return te(Y,U,G,pr(U,se),_e);br(U,se)}return null}function Ce(Y,U,G,se){for(var _e=null,ot=null,De=U,Ge=U=0,et=null;De!==null&&Ge<G.length;Ge++){De.index>Ge?(et=De,De=null):et=De.sibling;var it=Z(Y,De,G[Ge],se);if(it===null){De===null&&(De=et);break}e&&De&&it.alternate===null&&t(Y,De),U=c(it,U,Ge),ot===null?_e=it:ot.sibling=it,ot=it,De=et}if(Ge===G.length)return o(Y,De),tt&&lo(Y,Ge),_e;if(De===null){for(;Ge<G.length;Ge++)De=ce(Y,G[Ge],se),De!==null&&(U=c(De,U,Ge),ot===null?_e=De:ot.sibling=De,ot=De);return tt&&lo(Y,Ge),_e}for(De=a(De);Ge<G.length;Ge++)et=te(De,Y,Ge,G[Ge],se),et!==null&&(e&&et.alternate!==null&&De.delete(et.key===null?Ge:et.key),U=c(et,U,Ge),ot===null?_e=et:ot.sibling=et,ot=et);return e&&De.forEach(function(ri){return t(Y,ri)}),tt&&lo(Y,Ge),_e}function He(Y,U,G,se){if(G==null)throw Error(r(151));for(var _e=null,ot=null,De=U,Ge=U=0,et=null,it=G.next();De!==null&&!it.done;Ge++,it=G.next()){De.index>Ge?(et=De,De=null):et=De.sibling;var ri=Z(Y,De,it.value,se);if(ri===null){De===null&&(De=et);break}e&&De&&ri.alternate===null&&t(Y,De),U=c(ri,U,Ge),ot===null?_e=ri:ot.sibling=ri,ot=ri,De=et}if(it.done)return o(Y,De),tt&&lo(Y,Ge),_e;if(De===null){for(;!it.done;Ge++,it=G.next())it=ce(Y,it.value,se),it!==null&&(U=c(it,U,Ge),ot===null?_e=it:ot.sibling=it,ot=it);return tt&&lo(Y,Ge),_e}for(De=a(De);!it.done;Ge++,it=G.next())it=te(De,Y,Ge,it.value,se),it!==null&&(e&&it.alternate!==null&&De.delete(it.key===null?Ge:it.key),U=c(it,U,Ge),ot===null?_e=it:ot.sibling=it,ot=it);return e&&De.forEach(function(vT){return t(Y,vT)}),tt&&lo(Y,Ge),_e}function ct(Y,U,G,se){if(typeof G=="object"&&G!==null&&G.type===C&&G.key===null&&(G=G.props.children),typeof G=="object"&&G!==null){switch(G.$$typeof){case w:e:{for(var _e=G.key;U!==null;){if(U.key===_e){if(_e=G.type,_e===C){if(U.tag===7){o(Y,U.sibling),se=s(U,G.props.children),se.return=Y,Y=se;break e}}else if(U.elementType===_e||typeof _e=="object"&&_e!==null&&_e.$$typeof===H&&Ci(_e)===U.type){o(Y,U.sibling),se=s(U,G.props),nl(se,G),se.return=Y,Y=se;break e}o(Y,U);break}else t(Y,U);U=U.sibling}G.type===C?(se=xi(G.props.children,Y.mode,se,G.key),se.return=Y,Y=se):(se=cr(G.type,G.key,G.props,null,Y.mode,se),nl(se,G),se.return=Y,Y=se)}return g(Y);case T:e:{for(_e=G.key;U!==null;){if(U.key===_e)if(U.tag===4&&U.stateNode.containerInfo===G.containerInfo&&U.stateNode.implementation===G.implementation){o(Y,U.sibling),se=s(U,G.children||[]),se.return=Y,Y=se;break e}else{o(Y,U);break}else t(Y,U);U=U.sibling}se=_u(G,Y.mode,se),se.return=Y,Y=se}return g(Y);case H:return G=Ci(G),ct(Y,U,G,se)}if(F(G))return Ce(Y,U,G,se);if(I(G)){if(_e=I(G),typeof _e!="function")throw Error(r(150));return G=_e.call(G),He(Y,U,G,se)}if(typeof G.then=="function")return ct(Y,U,yr(G),se);if(G.$$typeof===M)return ct(Y,U,pr(Y,G),se);br(Y,G)}return typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint"?(G=""+G,U!==null&&U.tag===6?(o(Y,U.sibling),se=s(U,G),se.return=Y,Y=se):(o(Y,U),se=zu(G,Y.mode,se),se.return=Y,Y=se),g(Y)):o(Y,U)}return function(Y,U,G,se){try{tl=0;var _e=ct(Y,U,G,se);return fa=null,_e}catch(De){if(De===ca||De===gr)throw De;var ot=pn(29,De,null,Y.mode);return ot.lanes=se,ot.return=Y,ot}}}var Ai=Rh(!0),Ch=Rh(!1),Vo=!1;function Gu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Xu(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Go(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Xo(e,t,o){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(at&2)!==0){var s=a.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),a.pending=t,t=ur(e),uh(e,null,o),t}return sr(e,a,t,o),ur(e)}function ol(e,t,o){if(t=t.updateQueue,t!==null&&(t=t.shared,(o&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,o|=a,t.lanes=o,jo(e,o)}}function Fu(e,t){var o=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,o===a)){var s=null,c=null;if(o=o.firstBaseUpdate,o!==null){do{var g={lane:o.lane,tag:o.tag,payload:o.payload,callback:null,next:null};c===null?s=c=g:c=c.next=g,o=o.next}while(o!==null);c===null?s=c=t:c=c.next=t}else s=c=t;o={baseState:a.baseState,firstBaseUpdate:s,lastBaseUpdate:c,shared:a.shared,callbacks:a.callbacks},e.updateQueue=o;return}e=o.lastBaseUpdate,e===null?o.firstBaseUpdate=t:e.next=t,o.lastBaseUpdate=t}var Ku=!1;function il(){if(Ku){var e=ua;if(e!==null)throw e}}function al(e,t,o,a){Ku=!1;var s=e.updateQueue;Vo=!1;var c=s.firstBaseUpdate,g=s.lastBaseUpdate,x=s.shared.pending;if(x!==null){s.shared.pending=null;var _=x,X=_.next;_.next=null,g===null?c=X:g.next=X,g=_;var re=e.alternate;re!==null&&(re=re.updateQueue,x=re.lastBaseUpdate,x!==g&&(x===null?re.firstBaseUpdate=X:x.next=X,re.lastBaseUpdate=_))}if(c!==null){var ce=s.baseState;g=0,re=X=_=null,x=c;do{var Z=x.lane&-536870913,te=Z!==x.lane;if(te?($e&Z)===Z:(a&Z)===Z){Z!==0&&Z===sa&&(Ku=!0),re!==null&&(re=re.next={lane:0,tag:x.tag,payload:x.payload,callback:null,next:null});e:{var Ce=e,He=x;Z=t;var ct=o;switch(He.tag){case 1:if(Ce=He.payload,typeof Ce=="function"){ce=Ce.call(ct,ce,Z);break e}ce=Ce;break e;case 3:Ce.flags=Ce.flags&-65537|128;case 0:if(Ce=He.payload,Z=typeof Ce=="function"?Ce.call(ct,ce,Z):Ce,Z==null)break e;ce=v({},ce,Z);break e;case 2:Vo=!0}}Z=x.callback,Z!==null&&(e.flags|=64,te&&(e.flags|=8192),te=s.callbacks,te===null?s.callbacks=[Z]:te.push(Z))}else te={lane:Z,tag:x.tag,payload:x.payload,callback:x.callback,next:null},re===null?(X=re=te,_=ce):re=re.next=te,g|=Z;if(x=x.next,x===null){if(x=s.shared.pending,x===null)break;te=x,x=te.next,te.next=null,s.lastBaseUpdate=te,s.shared.pending=null}}while(!0);re===null&&(_=ce),s.baseState=_,s.firstBaseUpdate=X,s.lastBaseUpdate=re,c===null&&(s.shared.lanes=0),Wo|=g,e.lanes=g,e.memoizedState=ce}}function Oh(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function Ah(e,t){var o=e.callbacks;if(o!==null)for(e.callbacks=null,e=0;e<o.length;e++)Oh(o[e],t)}var da=R(null),vr=R(0);function Mh(e,t){e=bo,W(vr,e),W(da,t),bo=e|t.baseLanes}function Qu(){W(vr,bo),W(da,da.current)}function Zu(){bo=vr.current,B(da),B(vr)}var hn=R(null),zn=null;function Fo(e){var t=e.alternate;W(Ct,Ct.current&1),W(hn,e),zn===null&&(t===null||da.current!==null||t.memoizedState!==null)&&(zn=e)}function Wu(e){W(Ct,Ct.current),W(hn,e),zn===null&&(zn=e)}function Dh(e){e.tag===22?(W(Ct,Ct.current),W(hn,e),zn===null&&(zn=e)):Ko()}function Ko(){W(Ct,Ct.current),W(hn,hn.current)}function gn(e){B(hn),zn===e&&(zn=null),B(Ct)}var Ct=R(0);function Sr(e){for(var t=e;t!==null;){if(t.tag===13){var o=t.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||of(o)||af(o)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var uo=0,qe=null,st=null,Nt=null,xr=!1,pa=!1,Mi=!1,Tr=0,ll=0,ha=null,ux=0;function Et(){throw Error(r(321))}function Ju(e,t){if(t===null)return!1;for(var o=0;o<t.length&&o<e.length;o++)if(!dn(e[o],t[o]))return!1;return!0}function $u(e,t,o,a,s,c){return uo=c,qe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,z.H=e===null||e.memoizedState===null?pg:hc,Mi=!1,c=o(a,s),Mi=!1,pa&&(c=zh(t,o,a,s)),Nh(e),c}function Nh(e){z.H=ul;var t=st!==null&&st.next!==null;if(uo=0,Nt=st=qe=null,xr=!1,ll=0,ha=null,t)throw Error(r(300));e===null||zt||(e=e.dependencies,e!==null&&dr(e)&&(zt=!0))}function zh(e,t,o,a){qe=e;var s=0;do{if(pa&&(ha=null),ll=0,pa=!1,25<=s)throw Error(r(301));if(s+=1,Nt=st=null,e.updateQueue!=null){var c=e.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}z.H=hg,c=t(o,a)}while(pa);return c}function cx(){var e=z.H,t=e.useState()[0];return t=typeof t.then=="function"?rl(t):t,e=e.useState()[0],(st!==null?st.memoizedState:null)!==e&&(qe.flags|=1024),t}function ec(){var e=Tr!==0;return Tr=0,e}function tc(e,t,o){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o}function nc(e){if(xr){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}xr=!1}uo=0,Nt=st=qe=null,pa=!1,ll=Tr=0,ha=null}function en(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Nt===null?qe.memoizedState=Nt=e:Nt=Nt.next=e,Nt}function Ot(){if(st===null){var e=qe.alternate;e=e!==null?e.memoizedState:null}else e=st.next;var t=Nt===null?qe.memoizedState:Nt.next;if(t!==null)Nt=t,st=e;else{if(e===null)throw qe.alternate===null?Error(r(467)):Error(r(310));st=e,e={memoizedState:st.memoizedState,baseState:st.baseState,baseQueue:st.baseQueue,queue:st.queue,next:null},Nt===null?qe.memoizedState=Nt=e:Nt=Nt.next=e}return Nt}function Er(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function rl(e){var t=ll;return ll+=1,ha===null&&(ha=[]),e=Th(ha,e,t),t=qe,(Nt===null?t.memoizedState:Nt.next)===null&&(t=t.alternate,z.H=t===null||t.memoizedState===null?pg:hc),e}function wr(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return rl(e);if(e.$$typeof===M)return Gt(e)}throw Error(r(438,String(e)))}function oc(e){var t=null,o=qe.updateQueue;if(o!==null&&(t=o.memoCache),t==null){var a=qe.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(s){return s.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),o===null&&(o=Er(),qe.updateQueue=o),o.memoCache=t,o=t.data[t.index],o===void 0)for(o=t.data[t.index]=Array(e),a=0;a<e;a++)o[a]=$;return t.index++,o}function co(e,t){return typeof t=="function"?t(e):t}function Rr(e){var t=Ot();return ic(t,st,e)}function ic(e,t,o){var a=e.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=o;var s=e.baseQueue,c=a.pending;if(c!==null){if(s!==null){var g=s.next;s.next=c.next,c.next=g}t.baseQueue=s=c,a.pending=null}if(c=e.baseState,s===null)e.memoizedState=c;else{t=s.next;var x=g=null,_=null,X=t,re=!1;do{var ce=X.lane&-536870913;if(ce!==X.lane?($e&ce)===ce:(uo&ce)===ce){var Z=X.revertLane;if(Z===0)_!==null&&(_=_.next={lane:0,revertLane:0,gesture:null,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null}),ce===sa&&(re=!0);else if((uo&Z)===Z){X=X.next,Z===sa&&(re=!0);continue}else ce={lane:0,revertLane:X.revertLane,gesture:null,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null},_===null?(x=_=ce,g=c):_=_.next=ce,qe.lanes|=Z,Wo|=Z;ce=X.action,Mi&&o(c,ce),c=X.hasEagerState?X.eagerState:o(c,ce)}else Z={lane:ce,revertLane:X.revertLane,gesture:X.gesture,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null},_===null?(x=_=Z,g=c):_=_.next=Z,qe.lanes|=ce,Wo|=ce;X=X.next}while(X!==null&&X!==t);if(_===null?g=c:_.next=x,!dn(c,e.memoizedState)&&(zt=!0,re&&(o=ua,o!==null)))throw o;e.memoizedState=c,e.baseState=g,e.baseQueue=_,a.lastRenderedState=c}return s===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function ac(e){var t=Ot(),o=t.queue;if(o===null)throw Error(r(311));o.lastRenderedReducer=e;var a=o.dispatch,s=o.pending,c=t.memoizedState;if(s!==null){o.pending=null;var g=s=s.next;do c=e(c,g.action),g=g.next;while(g!==s);dn(c,t.memoizedState)||(zt=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),o.lastRenderedState=c}return[c,a]}function _h(e,t,o){var a=qe,s=Ot(),c=tt;if(c){if(o===void 0)throw Error(r(407));o=o()}else o=t();var g=!dn((st||s).memoizedState,o);if(g&&(s.memoizedState=o,zt=!0),s=s.queue,sc(Hh.bind(null,a,s,e),[e]),s.getSnapshot!==t||g||Nt!==null&&Nt.memoizedState.tag&1){if(a.flags|=2048,ga(9,{destroy:void 0},jh.bind(null,a,s,o,t),null),ht===null)throw Error(r(349));c||(uo&127)!==0||kh(a,t,o)}return o}function kh(e,t,o){e.flags|=16384,e={getSnapshot:t,value:o},t=qe.updateQueue,t===null?(t=Er(),qe.updateQueue=t,t.stores=[e]):(o=t.stores,o===null?t.stores=[e]:o.push(e))}function jh(e,t,o,a){t.value=o,t.getSnapshot=a,Lh(t)&&Uh(e)}function Hh(e,t,o){return o(function(){Lh(t)&&Uh(e)})}function Lh(e){var t=e.getSnapshot;e=e.value;try{var o=t();return!dn(e,o)}catch{return!0}}function Uh(e){var t=Si(e,2);t!==null&&cn(t,e,2)}function lc(e){var t=en();if(typeof e=="function"){var o=e;if(e=o(),Mi){nt(!0);try{o()}finally{nt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:co,lastRenderedState:e},t}function Bh(e,t,o,a){return e.baseState=o,ic(e,st,typeof a=="function"?a:co)}function fx(e,t,o,a,s){if(Ar(e))throw Error(r(485));if(e=t.action,e!==null){var c={payload:s,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(g){c.listeners.push(g)}};z.T!==null?o(!0):c.isTransition=!1,a(c),o=t.pending,o===null?(c.next=t.pending=c,Ih(t,c)):(c.next=o.next,t.pending=o.next=c)}}function Ih(e,t){var o=t.action,a=t.payload,s=e.state;if(t.isTransition){var c=z.T,g={};z.T=g;try{var x=o(s,a),_=z.S;_!==null&&_(g,x),Ph(e,t,x)}catch(X){rc(e,t,X)}finally{c!==null&&g.types!==null&&(c.types=g.types),z.T=c}}else try{c=o(s,a),Ph(e,t,c)}catch(X){rc(e,t,X)}}function Ph(e,t,o){o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(function(a){Yh(e,t,a)},function(a){return rc(e,t,a)}):Yh(e,t,o)}function Yh(e,t,o){t.status="fulfilled",t.value=o,qh(t),e.state=o,t=e.pending,t!==null&&(o=t.next,o===t?e.pending=null:(o=o.next,t.next=o,Ih(e,o)))}function rc(e,t,o){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=o,qh(t),t=t.next;while(t!==a)}e.action=null}function qh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Vh(e,t){return t}function Gh(e,t){if(tt){var o=ht.formState;if(o!==null){e:{var a=qe;if(tt){if(gt){t:{for(var s=gt,c=Nn;s.nodeType!==8;){if(!c){s=null;break t}if(s=_n(s.nextSibling),s===null){s=null;break t}}c=s.data,s=c==="F!"||c==="F"?s:null}if(s){gt=_n(s.nextSibling),a=s.data==="F!";break e}}Yo(a)}a=!1}a&&(t=o[0])}}return o=en(),o.memoizedState=o.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vh,lastRenderedState:t},o.queue=a,o=cg.bind(null,qe,a),a.dispatch=o,a=lc(!1),c=pc.bind(null,qe,!1,a.queue),a=en(),s={state:t,dispatch:null,action:e,pending:null},a.queue=s,o=fx.bind(null,qe,s,c,o),s.dispatch=o,a.memoizedState=e,[t,o,!1]}function Xh(e){var t=Ot();return Fh(t,st,e)}function Fh(e,t,o){if(t=ic(e,t,Vh)[0],e=Rr(co)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=rl(t)}catch(g){throw g===ca?gr:g}else a=t;t=Ot();var s=t.queue,c=s.dispatch;return o!==t.memoizedState&&(qe.flags|=2048,ga(9,{destroy:void 0},dx.bind(null,s,o),null)),[a,c,e]}function dx(e,t){e.action=t}function Kh(e){var t=Ot(),o=st;if(o!==null)return Fh(t,o,e);Ot(),t=t.memoizedState,o=Ot();var a=o.queue.dispatch;return o.memoizedState=e,[t,a,!1]}function ga(e,t,o,a){return e={tag:e,create:o,deps:a,inst:t,next:null},t=qe.updateQueue,t===null&&(t=Er(),qe.updateQueue=t),o=t.lastEffect,o===null?t.lastEffect=e.next=e:(a=o.next,o.next=e,e.next=a,t.lastEffect=e),e}function Qh(){return Ot().memoizedState}function Cr(e,t,o,a){var s=en();qe.flags|=e,s.memoizedState=ga(1|t,{destroy:void 0},o,a===void 0?null:a)}function Or(e,t,o,a){var s=Ot();a=a===void 0?null:a;var c=s.memoizedState.inst;st!==null&&a!==null&&Ju(a,st.memoizedState.deps)?s.memoizedState=ga(t,c,o,a):(qe.flags|=e,s.memoizedState=ga(1|t,c,o,a))}function Zh(e,t){Cr(8390656,8,e,t)}function sc(e,t){Or(2048,8,e,t)}function px(e){qe.flags|=4;var t=qe.updateQueue;if(t===null)t=Er(),qe.updateQueue=t,t.events=[e];else{var o=t.events;o===null?t.events=[e]:o.push(e)}}function Wh(e){var t=Ot().memoizedState;return px({ref:t,nextImpl:e}),function(){if((at&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function Jh(e,t){return Or(4,2,e,t)}function $h(e,t){return Or(4,4,e,t)}function eg(e,t){if(typeof t=="function"){e=e();var o=t(e);return function(){typeof o=="function"?o():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function tg(e,t,o){o=o!=null?o.concat([e]):null,Or(4,4,eg.bind(null,t,e),o)}function uc(){}function ng(e,t){var o=Ot();t=t===void 0?null:t;var a=o.memoizedState;return t!==null&&Ju(t,a[1])?a[0]:(o.memoizedState=[e,t],e)}function og(e,t){var o=Ot();t=t===void 0?null:t;var a=o.memoizedState;if(t!==null&&Ju(t,a[1]))return a[0];if(a=e(),Mi){nt(!0);try{e()}finally{nt(!1)}}return o.memoizedState=[a,t],a}function cc(e,t,o){return o===void 0||(uo&1073741824)!==0&&($e&261930)===0?e.memoizedState=t:(e.memoizedState=o,e=im(),qe.lanes|=e,Wo|=e,o)}function ig(e,t,o,a){return dn(o,t)?o:da.current!==null?(e=cc(e,o,a),dn(e,t)||(zt=!0),e):(uo&42)===0||(uo&1073741824)!==0&&($e&261930)===0?(zt=!0,e.memoizedState=o):(e=im(),qe.lanes|=e,Wo|=e,t)}function ag(e,t,o,a,s){var c=q.p;q.p=c!==0&&8>c?c:8;var g=z.T,x={};z.T=x,pc(e,!1,t,o);try{var _=s(),X=z.S;if(X!==null&&X(x,_),_!==null&&typeof _=="object"&&typeof _.then=="function"){var re=sx(_,a);sl(e,t,re,bn(e))}else sl(e,t,a,bn(e))}catch(ce){sl(e,t,{then:function(){},status:"rejected",reason:ce},bn())}finally{q.p=c,g!==null&&x.types!==null&&(g.types=x.types),z.T=g}}function hx(){}function fc(e,t,o,a){if(e.tag!==5)throw Error(r(476));var s=lg(e).queue;ag(e,s,t,P,o===null?hx:function(){return rg(e),o(a)})}function lg(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:P,baseState:P,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:co,lastRenderedState:P},next:null};var o={};return t.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:co,lastRenderedState:o},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function rg(e){var t=lg(e);t.next===null&&(t=e.alternate.memoizedState),sl(e,t.next.queue,{},bn())}function dc(){return Gt(Rl)}function sg(){return Ot().memoizedState}function ug(){return Ot().memoizedState}function gx(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var o=bn();e=Go(o);var a=Xo(t,e,o);a!==null&&(cn(a,t,o),ol(a,t,o)),t={cache:Pu()},e.payload=t;return}t=t.return}}function mx(e,t,o){var a=bn();o={lane:a,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},Ar(e)?fg(t,o):(o=Du(e,t,o,a),o!==null&&(cn(o,e,a),dg(o,t,a)))}function cg(e,t,o){var a=bn();sl(e,t,o,a)}function sl(e,t,o,a){var s={lane:a,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};if(Ar(e))fg(t,s);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var g=t.lastRenderedState,x=c(g,o);if(s.hasEagerState=!0,s.eagerState=x,dn(x,g))return sr(e,t,s,0),ht===null&&rr(),!1}catch{}if(o=Du(e,t,s,a),o!==null)return cn(o,e,a),dg(o,t,a),!0}return!1}function pc(e,t,o,a){if(a={lane:2,revertLane:Gc(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Ar(e)){if(t)throw Error(r(479))}else t=Du(e,o,a,2),t!==null&&cn(t,e,2)}function Ar(e){var t=e.alternate;return e===qe||t!==null&&t===qe}function fg(e,t){pa=xr=!0;var o=e.pending;o===null?t.next=t:(t.next=o.next,o.next=t),e.pending=t}function dg(e,t,o){if((o&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,o|=a,t.lanes=o,jo(e,o)}}var ul={readContext:Gt,use:wr,useCallback:Et,useContext:Et,useEffect:Et,useImperativeHandle:Et,useLayoutEffect:Et,useInsertionEffect:Et,useMemo:Et,useReducer:Et,useRef:Et,useState:Et,useDebugValue:Et,useDeferredValue:Et,useTransition:Et,useSyncExternalStore:Et,useId:Et,useHostTransitionStatus:Et,useFormState:Et,useActionState:Et,useOptimistic:Et,useMemoCache:Et,useCacheRefresh:Et};ul.useEffectEvent=Et;var pg={readContext:Gt,use:wr,useCallback:function(e,t){return en().memoizedState=[e,t===void 0?null:t],e},useContext:Gt,useEffect:Zh,useImperativeHandle:function(e,t,o){o=o!=null?o.concat([e]):null,Cr(4194308,4,eg.bind(null,t,e),o)},useLayoutEffect:function(e,t){return Cr(4194308,4,e,t)},useInsertionEffect:function(e,t){Cr(4,2,e,t)},useMemo:function(e,t){var o=en();t=t===void 0?null:t;var a=e();if(Mi){nt(!0);try{e()}finally{nt(!1)}}return o.memoizedState=[a,t],a},useReducer:function(e,t,o){var a=en();if(o!==void 0){var s=o(t);if(Mi){nt(!0);try{o(t)}finally{nt(!1)}}}else s=t;return a.memoizedState=a.baseState=s,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:s},a.queue=e,e=e.dispatch=mx.bind(null,qe,e),[a.memoizedState,e]},useRef:function(e){var t=en();return e={current:e},t.memoizedState=e},useState:function(e){e=lc(e);var t=e.queue,o=cg.bind(null,qe,t);return t.dispatch=o,[e.memoizedState,o]},useDebugValue:uc,useDeferredValue:function(e,t){var o=en();return cc(o,e,t)},useTransition:function(){var e=lc(!1);return e=ag.bind(null,qe,e.queue,!0,!1),en().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,o){var a=qe,s=en();if(tt){if(o===void 0)throw Error(r(407));o=o()}else{if(o=t(),ht===null)throw Error(r(349));($e&127)!==0||kh(a,t,o)}s.memoizedState=o;var c={value:o,getSnapshot:t};return s.queue=c,Zh(Hh.bind(null,a,c,e),[e]),a.flags|=2048,ga(9,{destroy:void 0},jh.bind(null,a,c,o,t),null),o},useId:function(){var e=en(),t=ht.identifierPrefix;if(tt){var o=Zn,a=Qn;o=(a&~(1<<32-pt(a)-1)).toString(32)+o,t="_"+t+"R_"+o,o=Tr++,0<o&&(t+="H"+o.toString(32)),t+="_"}else o=ux++,t="_"+t+"r_"+o.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:dc,useFormState:Gh,useActionState:Gh,useOptimistic:function(e){var t=en();t.memoizedState=t.baseState=e;var o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=o,t=pc.bind(null,qe,!0,o),o.dispatch=t,[e,t]},useMemoCache:oc,useCacheRefresh:function(){return en().memoizedState=gx.bind(null,qe)},useEffectEvent:function(e){var t=en(),o={impl:e};return t.memoizedState=o,function(){if((at&2)!==0)throw Error(r(440));return o.impl.apply(void 0,arguments)}}},hc={readContext:Gt,use:wr,useCallback:ng,useContext:Gt,useEffect:sc,useImperativeHandle:tg,useInsertionEffect:Jh,useLayoutEffect:$h,useMemo:og,useReducer:Rr,useRef:Qh,useState:function(){return Rr(co)},useDebugValue:uc,useDeferredValue:function(e,t){var o=Ot();return ig(o,st.memoizedState,e,t)},useTransition:function(){var e=Rr(co)[0],t=Ot().memoizedState;return[typeof e=="boolean"?e:rl(e),t]},useSyncExternalStore:_h,useId:sg,useHostTransitionStatus:dc,useFormState:Xh,useActionState:Xh,useOptimistic:function(e,t){var o=Ot();return Bh(o,st,e,t)},useMemoCache:oc,useCacheRefresh:ug};hc.useEffectEvent=Wh;var hg={readContext:Gt,use:wr,useCallback:ng,useContext:Gt,useEffect:sc,useImperativeHandle:tg,useInsertionEffect:Jh,useLayoutEffect:$h,useMemo:og,useReducer:ac,useRef:Qh,useState:function(){return ac(co)},useDebugValue:uc,useDeferredValue:function(e,t){var o=Ot();return st===null?cc(o,e,t):ig(o,st.memoizedState,e,t)},useTransition:function(){var e=ac(co)[0],t=Ot().memoizedState;return[typeof e=="boolean"?e:rl(e),t]},useSyncExternalStore:_h,useId:sg,useHostTransitionStatus:dc,useFormState:Kh,useActionState:Kh,useOptimistic:function(e,t){var o=Ot();return st!==null?Bh(o,st,e,t):(o.baseState=e,[e,o.queue.dispatch])},useMemoCache:oc,useCacheRefresh:ug};hg.useEffectEvent=Wh;function gc(e,t,o,a){t=e.memoizedState,o=o(a,t),o=o==null?t:v({},t,o),e.memoizedState=o,e.lanes===0&&(e.updateQueue.baseState=o)}var mc={enqueueSetState:function(e,t,o){e=e._reactInternals;var a=bn(),s=Go(a);s.payload=t,o!=null&&(s.callback=o),t=Xo(e,s,a),t!==null&&(cn(t,e,a),ol(t,e,a))},enqueueReplaceState:function(e,t,o){e=e._reactInternals;var a=bn(),s=Go(a);s.tag=1,s.payload=t,o!=null&&(s.callback=o),t=Xo(e,s,a),t!==null&&(cn(t,e,a),ol(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var o=bn(),a=Go(o);a.tag=2,t!=null&&(a.callback=t),t=Xo(e,a,o),t!==null&&(cn(t,e,o),ol(t,e,o))}};function gg(e,t,o,a,s,c,g){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,c,g):t.prototype&&t.prototype.isPureReactComponent?!Qa(o,a)||!Qa(s,c):!0}function mg(e,t,o,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(o,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(o,a),t.state!==e&&mc.enqueueReplaceState(t,t.state,null)}function Di(e,t){var o=t;if("ref"in t){o={};for(var a in t)a!=="ref"&&(o[a]=t[a])}if(e=e.defaultProps){o===t&&(o=v({},o));for(var s in e)o[s]===void 0&&(o[s]=e[s])}return o}function yg(e){lr(e)}function bg(e){console.error(e)}function vg(e){lr(e)}function Mr(e,t){try{var o=e.onUncaughtError;o(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function Sg(e,t,o){try{var a=e.onCaughtError;a(o.value,{componentStack:o.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(s){setTimeout(function(){throw s})}}function yc(e,t,o){return o=Go(o),o.tag=3,o.payload={element:null},o.callback=function(){Mr(e,t)},o}function xg(e){return e=Go(e),e.tag=3,e}function Tg(e,t,o,a){var s=o.type.getDerivedStateFromError;if(typeof s=="function"){var c=a.value;e.payload=function(){return s(c)},e.callback=function(){Sg(t,o,a)}}var g=o.stateNode;g!==null&&typeof g.componentDidCatch=="function"&&(e.callback=function(){Sg(t,o,a),typeof s!="function"&&(Jo===null?Jo=new Set([this]):Jo.add(this));var x=a.stack;this.componentDidCatch(a.value,{componentStack:x!==null?x:""})})}function yx(e,t,o,a,s){if(o.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=o.alternate,t!==null&&ra(t,o,s,!0),o=hn.current,o!==null){switch(o.tag){case 31:case 13:return zn===null?Pr():o.alternate===null&&wt===0&&(wt=3),o.flags&=-257,o.flags|=65536,o.lanes=s,a===mr?o.flags|=16384:(t=o.updateQueue,t===null?o.updateQueue=new Set([a]):t.add(a),Yc(e,a,s)),!1;case 22:return o.flags|=65536,a===mr?o.flags|=16384:(t=o.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},o.updateQueue=t):(o=t.retryQueue,o===null?t.retryQueue=new Set([a]):o.add(a)),Yc(e,a,s)),!1}throw Error(r(435,o.tag))}return Yc(e,a,s),Pr(),!1}if(tt)return t=hn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=s,a!==Hu&&(e=Error(r(422),{cause:a}),Ja(An(e,o)))):(a!==Hu&&(t=Error(r(423),{cause:a}),Ja(An(t,o))),e=e.current.alternate,e.flags|=65536,s&=-s,e.lanes|=s,a=An(a,o),s=yc(e.stateNode,a,s),Fu(e,s),wt!==4&&(wt=2)),!1;var c=Error(r(520),{cause:a});if(c=An(c,o),yl===null?yl=[c]:yl.push(c),wt!==4&&(wt=2),t===null)return!0;a=An(a,o),o=t;do{switch(o.tag){case 3:return o.flags|=65536,e=s&-s,o.lanes|=e,e=yc(o.stateNode,a,e),Fu(o,e),!1;case 1:if(t=o.type,c=o.stateNode,(o.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(Jo===null||!Jo.has(c))))return o.flags|=65536,s&=-s,o.lanes|=s,s=xg(s),Tg(s,e,o,a),Fu(o,s),!1}o=o.return}while(o!==null);return!1}var bc=Error(r(461)),zt=!1;function Xt(e,t,o,a){t.child=e===null?Ch(t,null,o,a):Ai(t,e.child,o,a)}function Eg(e,t,o,a,s){o=o.render;var c=t.ref;if("ref"in a){var g={};for(var x in a)x!=="ref"&&(g[x]=a[x])}else g=a;return wi(t),a=$u(e,t,o,g,c,s),x=ec(),e!==null&&!zt?(tc(e,t,s),fo(e,t,s)):(tt&&x&&ku(t),t.flags|=1,Xt(e,t,a,s),t.child)}function wg(e,t,o,a,s){if(e===null){var c=o.type;return typeof c=="function"&&!Nu(c)&&c.defaultProps===void 0&&o.compare===null?(t.tag=15,t.type=c,Rg(e,t,c,a,s)):(e=cr(o.type,null,a,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,!Cc(e,s)){var g=c.memoizedProps;if(o=o.compare,o=o!==null?o:Qa,o(g,a)&&e.ref===t.ref)return fo(e,t,s)}return t.flags|=1,e=ao(c,a),e.ref=t.ref,e.return=t,t.child=e}function Rg(e,t,o,a,s){if(e!==null){var c=e.memoizedProps;if(Qa(c,a)&&e.ref===t.ref)if(zt=!1,t.pendingProps=a=c,Cc(e,s))(e.flags&131072)!==0&&(zt=!0);else return t.lanes=e.lanes,fo(e,t,s)}return vc(e,t,o,a,s)}function Cg(e,t,o,a){var s=a.children,c=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(c=c!==null?c.baseLanes|o:o,e!==null){for(a=t.child=e.child,s=0;a!==null;)s=s|a.lanes|a.childLanes,a=a.sibling;a=s&~c}else a=0,t.child=null;return Og(e,t,c,o,a)}if((o&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&hr(t,c!==null?c.cachePool:null),c!==null?Mh(t,c):Qu(),Dh(t);else return a=t.lanes=536870912,Og(e,t,c!==null?c.baseLanes|o:o,o,a)}else c!==null?(hr(t,c.cachePool),Mh(t,c),Ko(),t.memoizedState=null):(e!==null&&hr(t,null),Qu(),Ko());return Xt(e,t,s,o),t.child}function cl(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Og(e,t,o,a,s){var c=qu();return c=c===null?null:{parent:Dt._currentValue,pool:c},t.memoizedState={baseLanes:o,cachePool:c},e!==null&&hr(t,null),Qu(),Dh(t),e!==null&&ra(e,t,a,!0),t.childLanes=s,null}function Dr(e,t){return t=zr({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Ag(e,t,o){return Ai(t,e.child,null,o),e=Dr(t,t.pendingProps),e.flags|=2,gn(t),t.memoizedState=null,e}function bx(e,t,o){var a=t.pendingProps,s=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(tt){if(a.mode==="hidden")return e=Dr(t,a),t.lanes=536870912,cl(null,e);if(Wu(t),(e=gt)?(e=Im(e,Nn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Io!==null?{id:Qn,overflow:Zn}:null,retryLane:536870912,hydrationErrors:null},o=fh(e),o.return=t,t.child=o,Vt=t,gt=null)):e=null,e===null)throw Yo(t);return t.lanes=536870912,null}return Dr(t,a)}var c=e.memoizedState;if(c!==null){var g=c.dehydrated;if(Wu(t),s)if(t.flags&256)t.flags&=-257,t=Ag(e,t,o);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(zt||ra(e,t,o,!1),s=(o&e.childLanes)!==0,zt||s){if(a=ht,a!==null&&(g=Ho(a,o),g!==0&&g!==c.retryLane))throw c.retryLane=g,Si(e,g),cn(a,e,g),bc;Pr(),t=Ag(e,t,o)}else e=c.treeContext,gt=_n(g.nextSibling),Vt=t,tt=!0,Po=null,Nn=!1,e!==null&&hh(t,e),t=Dr(t,a),t.flags|=4096;return t}return e=ao(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Nr(e,t){var o=t.ref;if(o===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof o!="function"&&typeof o!="object")throw Error(r(284));(e===null||e.ref!==o)&&(t.flags|=4194816)}}function vc(e,t,o,a,s){return wi(t),o=$u(e,t,o,a,void 0,s),a=ec(),e!==null&&!zt?(tc(e,t,s),fo(e,t,s)):(tt&&a&&ku(t),t.flags|=1,Xt(e,t,o,s),t.child)}function Mg(e,t,o,a,s,c){return wi(t),t.updateQueue=null,o=zh(t,a,o,s),Nh(e),a=ec(),e!==null&&!zt?(tc(e,t,c),fo(e,t,c)):(tt&&a&&ku(t),t.flags|=1,Xt(e,t,o,c),t.child)}function Dg(e,t,o,a,s){if(wi(t),t.stateNode===null){var c=oa,g=o.contextType;typeof g=="object"&&g!==null&&(c=Gt(g)),c=new o(a,c),t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=mc,t.stateNode=c,c._reactInternals=t,c=t.stateNode,c.props=a,c.state=t.memoizedState,c.refs={},Gu(t),g=o.contextType,c.context=typeof g=="object"&&g!==null?Gt(g):oa,c.state=t.memoizedState,g=o.getDerivedStateFromProps,typeof g=="function"&&(gc(t,o,g,a),c.state=t.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(g=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),g!==c.state&&mc.enqueueReplaceState(c,c.state,null),al(t,a,c,s),il(),c.state=t.memoizedState),typeof c.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){c=t.stateNode;var x=t.memoizedProps,_=Di(o,x);c.props=_;var X=c.context,re=o.contextType;g=oa,typeof re=="object"&&re!==null&&(g=Gt(re));var ce=o.getDerivedStateFromProps;re=typeof ce=="function"||typeof c.getSnapshotBeforeUpdate=="function",x=t.pendingProps!==x,re||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(x||X!==g)&&mg(t,c,a,g),Vo=!1;var Z=t.memoizedState;c.state=Z,al(t,a,c,s),il(),X=t.memoizedState,x||Z!==X||Vo?(typeof ce=="function"&&(gc(t,o,ce,a),X=t.memoizedState),(_=Vo||gg(t,o,_,a,Z,X,g))?(re||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(t.flags|=4194308)):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=X),c.props=a,c.state=X,c.context=g,a=_):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{c=t.stateNode,Xu(e,t),g=t.memoizedProps,re=Di(o,g),c.props=re,ce=t.pendingProps,Z=c.context,X=o.contextType,_=oa,typeof X=="object"&&X!==null&&(_=Gt(X)),x=o.getDerivedStateFromProps,(X=typeof x=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(g!==ce||Z!==_)&&mg(t,c,a,_),Vo=!1,Z=t.memoizedState,c.state=Z,al(t,a,c,s),il();var te=t.memoizedState;g!==ce||Z!==te||Vo||e!==null&&e.dependencies!==null&&dr(e.dependencies)?(typeof x=="function"&&(gc(t,o,x,a),te=t.memoizedState),(re=Vo||gg(t,o,re,a,Z,te,_)||e!==null&&e.dependencies!==null&&dr(e.dependencies))?(X||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(a,te,_),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(a,te,_)),typeof c.componentDidUpdate=="function"&&(t.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof c.componentDidUpdate!="function"||g===e.memoizedProps&&Z===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&Z===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=te),c.props=a,c.state=te,c.context=_,a=re):(typeof c.componentDidUpdate!="function"||g===e.memoizedProps&&Z===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&Z===e.memoizedState||(t.flags|=1024),a=!1)}return c=a,Nr(e,t),a=(t.flags&128)!==0,c||a?(c=t.stateNode,o=a&&typeof o.getDerivedStateFromError!="function"?null:c.render(),t.flags|=1,e!==null&&a?(t.child=Ai(t,e.child,null,s),t.child=Ai(t,null,o,s)):Xt(e,t,o,s),t.memoizedState=c.state,e=t.child):e=fo(e,t,s),e}function Ng(e,t,o,a){return Ti(),t.flags|=256,Xt(e,t,o,a),t.child}var Sc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function xc(e){return{baseLanes:e,cachePool:Sh()}}function Tc(e,t,o){return e=e!==null?e.childLanes&~o:0,t&&(e|=yn),e}function zg(e,t,o){var a=t.pendingProps,s=!1,c=(t.flags&128)!==0,g;if((g=c)||(g=e!==null&&e.memoizedState===null?!1:(Ct.current&2)!==0),g&&(s=!0,t.flags&=-129),g=(t.flags&32)!==0,t.flags&=-33,e===null){if(tt){if(s?Fo(t):Ko(),(e=gt)?(e=Im(e,Nn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Io!==null?{id:Qn,overflow:Zn}:null,retryLane:536870912,hydrationErrors:null},o=fh(e),o.return=t,t.child=o,Vt=t,gt=null)):e=null,e===null)throw Yo(t);return af(e)?t.lanes=32:t.lanes=536870912,null}var x=a.children;return a=a.fallback,s?(Ko(),s=t.mode,x=zr({mode:"hidden",children:x},s),a=xi(a,s,o,null),x.return=t,a.return=t,x.sibling=a,t.child=x,a=t.child,a.memoizedState=xc(o),a.childLanes=Tc(e,g,o),t.memoizedState=Sc,cl(null,a)):(Fo(t),Ec(t,x))}var _=e.memoizedState;if(_!==null&&(x=_.dehydrated,x!==null)){if(c)t.flags&256?(Fo(t),t.flags&=-257,t=wc(e,t,o)):t.memoizedState!==null?(Ko(),t.child=e.child,t.flags|=128,t=null):(Ko(),x=a.fallback,s=t.mode,a=zr({mode:"visible",children:a.children},s),x=xi(x,s,o,null),x.flags|=2,a.return=t,x.return=t,a.sibling=x,t.child=a,Ai(t,e.child,null,o),a=t.child,a.memoizedState=xc(o),a.childLanes=Tc(e,g,o),t.memoizedState=Sc,t=cl(null,a));else if(Fo(t),af(x)){if(g=x.nextSibling&&x.nextSibling.dataset,g)var X=g.dgst;g=X,a=Error(r(419)),a.stack="",a.digest=g,Ja({value:a,source:null,stack:null}),t=wc(e,t,o)}else if(zt||ra(e,t,o,!1),g=(o&e.childLanes)!==0,zt||g){if(g=ht,g!==null&&(a=Ho(g,o),a!==0&&a!==_.retryLane))throw _.retryLane=a,Si(e,a),cn(g,e,a),bc;of(x)||Pr(),t=wc(e,t,o)}else of(x)?(t.flags|=192,t.child=e.child,t=null):(e=_.treeContext,gt=_n(x.nextSibling),Vt=t,tt=!0,Po=null,Nn=!1,e!==null&&hh(t,e),t=Ec(t,a.children),t.flags|=4096);return t}return s?(Ko(),x=a.fallback,s=t.mode,_=e.child,X=_.sibling,a=ao(_,{mode:"hidden",children:a.children}),a.subtreeFlags=_.subtreeFlags&65011712,X!==null?x=ao(X,x):(x=xi(x,s,o,null),x.flags|=2),x.return=t,a.return=t,a.sibling=x,t.child=a,cl(null,a),a=t.child,x=e.child.memoizedState,x===null?x=xc(o):(s=x.cachePool,s!==null?(_=Dt._currentValue,s=s.parent!==_?{parent:_,pool:_}:s):s=Sh(),x={baseLanes:x.baseLanes|o,cachePool:s}),a.memoizedState=x,a.childLanes=Tc(e,g,o),t.memoizedState=Sc,cl(e.child,a)):(Fo(t),o=e.child,e=o.sibling,o=ao(o,{mode:"visible",children:a.children}),o.return=t,o.sibling=null,e!==null&&(g=t.deletions,g===null?(t.deletions=[e],t.flags|=16):g.push(e)),t.child=o,t.memoizedState=null,o)}function Ec(e,t){return t=zr({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function zr(e,t){return e=pn(22,e,null,t),e.lanes=0,e}function wc(e,t,o){return Ai(t,e.child,null,o),e=Ec(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function _g(e,t,o){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),Bu(e.return,t,o)}function Rc(e,t,o,a,s,c){var g=e.memoizedState;g===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:o,tailMode:s,treeForkCount:c}:(g.isBackwards=t,g.rendering=null,g.renderingStartTime=0,g.last=a,g.tail=o,g.tailMode=s,g.treeForkCount=c)}function kg(e,t,o){var a=t.pendingProps,s=a.revealOrder,c=a.tail;a=a.children;var g=Ct.current,x=(g&2)!==0;if(x?(g=g&1|2,t.flags|=128):g&=1,W(Ct,g),Xt(e,t,a,o),a=tt?Wa:0,!x&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&_g(e,o,t);else if(e.tag===19)_g(e,o,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(s){case"forwards":for(o=t.child,s=null;o!==null;)e=o.alternate,e!==null&&Sr(e)===null&&(s=o),o=o.sibling;o=s,o===null?(s=t.child,t.child=null):(s=o.sibling,o.sibling=null),Rc(t,!1,s,o,c,a);break;case"backwards":case"unstable_legacy-backwards":for(o=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Sr(e)===null){t.child=s;break}e=s.sibling,s.sibling=o,o=s,s=e}Rc(t,!0,o,null,c,a);break;case"together":Rc(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function fo(e,t,o){if(e!==null&&(t.dependencies=e.dependencies),Wo|=t.lanes,(o&t.childLanes)===0)if(e!==null){if(ra(e,t,o,!1),(o&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,o=ao(e,e.pendingProps),t.child=o,o.return=t;e.sibling!==null;)e=e.sibling,o=o.sibling=ao(e,e.pendingProps),o.return=t;o.sibling=null}return t.child}function Cc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&dr(e)))}function vx(e,t,o){switch(t.tag){case 3:ue(t,t.stateNode.containerInfo),qo(t,Dt,e.memoizedState.cache),Ti();break;case 27:case 5:Re(t);break;case 4:ue(t,t.stateNode.containerInfo);break;case 10:qo(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Wu(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(Fo(t),t.flags|=128,null):(o&t.child.childLanes)!==0?zg(e,t,o):(Fo(t),e=fo(e,t,o),e!==null?e.sibling:null);Fo(t);break;case 19:var s=(e.flags&128)!==0;if(a=(o&t.childLanes)!==0,a||(ra(e,t,o,!1),a=(o&t.childLanes)!==0),s){if(a)return kg(e,t,o);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),W(Ct,Ct.current),a)break;return null;case 22:return t.lanes=0,Cg(e,t,o,t.pendingProps);case 24:qo(t,Dt,e.memoizedState.cache)}return fo(e,t,o)}function jg(e,t,o){if(e!==null)if(e.memoizedProps!==t.pendingProps)zt=!0;else{if(!Cc(e,o)&&(t.flags&128)===0)return zt=!1,vx(e,t,o);zt=(e.flags&131072)!==0}else zt=!1,tt&&(t.flags&1048576)!==0&&ph(t,Wa,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=Ci(t.elementType),t.type=e,typeof e=="function")Nu(e)?(a=Di(e,a),t.tag=1,t=Dg(null,t,e,a,o)):(t.tag=0,t=vc(null,t,e,a,o));else{if(e!=null){var s=e.$$typeof;if(s===D){t.tag=11,t=Eg(null,t,e,a,o);break e}else if(s===j){t.tag=14,t=wg(null,t,e,a,o);break e}}throw t=ie(e)||e,Error(r(306,t,""))}}return t;case 0:return vc(e,t,t.type,t.pendingProps,o);case 1:return a=t.type,s=Di(a,t.pendingProps),Dg(e,t,a,s,o);case 3:e:{if(ue(t,t.stateNode.containerInfo),e===null)throw Error(r(387));a=t.pendingProps;var c=t.memoizedState;s=c.element,Xu(e,t),al(t,a,null,o);var g=t.memoizedState;if(a=g.cache,qo(t,Dt,a),a!==c.cache&&Iu(t,[Dt],o,!0),il(),a=g.element,c.isDehydrated)if(c={element:a,isDehydrated:!1,cache:g.cache},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){t=Ng(e,t,a,o);break e}else if(a!==s){s=An(Error(r(424)),t),Ja(s),t=Ng(e,t,a,o);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,gt=_n(e.firstChild),Vt=t,tt=!0,Po=null,Nn=!0,o=Ch(t,null,a,o),t.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(Ti(),a===s){t=fo(e,t,o);break e}Xt(e,t,a,o)}t=t.child}return t;case 26:return Nr(e,t),e===null?(o=Xm(t.type,null,t.pendingProps,null))?t.memoizedState=o:tt||(o=t.type,e=t.pendingProps,a=Kr(ae.current).createElement(o),a[qt]=t,a[on]=e,Ft(a,o,e),Bt(a),t.stateNode=a):t.memoizedState=Xm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Re(t),e===null&&tt&&(a=t.stateNode=qm(t.type,t.pendingProps,ae.current),Vt=t,Nn=!0,s=gt,ni(t.type)?(lf=s,gt=_n(a.firstChild)):gt=s),Xt(e,t,t.pendingProps.children,o),Nr(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&tt&&((s=a=gt)&&(a=Qx(a,t.type,t.pendingProps,Nn),a!==null?(t.stateNode=a,Vt=t,gt=_n(a.firstChild),Nn=!1,s=!0):s=!1),s||Yo(t)),Re(t),s=t.type,c=t.pendingProps,g=e!==null?e.memoizedProps:null,a=c.children,ef(s,c)?a=null:g!==null&&ef(s,g)&&(t.flags|=32),t.memoizedState!==null&&(s=$u(e,t,cx,null,null,o),Rl._currentValue=s),Nr(e,t),Xt(e,t,a,o),t.child;case 6:return e===null&&tt&&((e=o=gt)&&(o=Zx(o,t.pendingProps,Nn),o!==null?(t.stateNode=o,Vt=t,gt=null,e=!0):e=!1),e||Yo(t)),null;case 13:return zg(e,t,o);case 4:return ue(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=Ai(t,null,a,o):Xt(e,t,a,o),t.child;case 11:return Eg(e,t,t.type,t.pendingProps,o);case 7:return Xt(e,t,t.pendingProps,o),t.child;case 8:return Xt(e,t,t.pendingProps.children,o),t.child;case 12:return Xt(e,t,t.pendingProps.children,o),t.child;case 10:return a=t.pendingProps,qo(t,t.type,a.value),Xt(e,t,a.children,o),t.child;case 9:return s=t.type._context,a=t.pendingProps.children,wi(t),s=Gt(s),a=a(s),t.flags|=1,Xt(e,t,a,o),t.child;case 14:return wg(e,t,t.type,t.pendingProps,o);case 15:return Rg(e,t,t.type,t.pendingProps,o);case 19:return kg(e,t,o);case 31:return bx(e,t,o);case 22:return Cg(e,t,o,t.pendingProps);case 24:return wi(t),a=Gt(Dt),e===null?(s=qu(),s===null&&(s=ht,c=Pu(),s.pooledCache=c,c.refCount++,c!==null&&(s.pooledCacheLanes|=o),s=c),t.memoizedState={parent:a,cache:s},Gu(t),qo(t,Dt,s)):((e.lanes&o)!==0&&(Xu(e,t),al(t,null,null,o),il()),s=e.memoizedState,c=t.memoizedState,s.parent!==a?(s={parent:a,cache:a},t.memoizedState=s,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=s),qo(t,Dt,a)):(a=c.cache,qo(t,Dt,a),a!==s.cache&&Iu(t,[Dt],o,!0))),Xt(e,t,t.pendingProps.children,o),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function po(e){e.flags|=4}function Oc(e,t,o,a,s){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(s&335544128)===s)if(e.stateNode.complete)e.flags|=8192;else if(sm())e.flags|=8192;else throw Oi=mr,Vu}else e.flags&=-16777217}function Hg(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Wm(t))if(sm())e.flags|=8192;else throw Oi=mr,Vu}function _r(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?nn():536870912,e.lanes|=t,va|=t)}function fl(e,t){if(!tt)switch(e.tailMode){case"hidden":t=e.tail;for(var o=null;t!==null;)t.alternate!==null&&(o=t),t=t.sibling;o===null?e.tail=null:o.sibling=null;break;case"collapsed":o=e.tail;for(var a=null;o!==null;)o.alternate!==null&&(a=o),o=o.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function mt(e){var t=e.alternate!==null&&e.alternate.child===e.child,o=0,a=0;if(t)for(var s=e.child;s!==null;)o|=s.lanes|s.childLanes,a|=s.subtreeFlags&65011712,a|=s.flags&65011712,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)o|=s.lanes|s.childLanes,a|=s.subtreeFlags,a|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=a,e.childLanes=o,t}function Sx(e,t,o){var a=t.pendingProps;switch(ju(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return mt(t),null;case 1:return mt(t),null;case 3:return o=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),so(Dt),pe(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(e===null||e.child===null)&&(la(t)?po(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Lu())),mt(t),null;case 26:var s=t.type,c=t.memoizedState;return e===null?(po(t),c!==null?(mt(t),Hg(t,c)):(mt(t),Oc(t,s,null,a,o))):c?c!==e.memoizedState?(po(t),mt(t),Hg(t,c)):(mt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&po(t),mt(t),Oc(t,s,e,a,o)),null;case 27:if(ke(t),o=ae.current,s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&po(t);else{if(!a){if(t.stateNode===null)throw Error(r(166));return mt(t),null}e=V.current,la(t)?gh(t):(e=qm(s,a,o),t.stateNode=e,po(t))}return mt(t),null;case 5:if(ke(t),s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&po(t);else{if(!a){if(t.stateNode===null)throw Error(r(166));return mt(t),null}if(c=V.current,la(t))gh(t);else{var g=Kr(ae.current);switch(c){case 1:c=g.createElementNS("http://www.w3.org/2000/svg",s);break;case 2:c=g.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;default:switch(s){case"svg":c=g.createElementNS("http://www.w3.org/2000/svg",s);break;case"math":c=g.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;case"script":c=g.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof a.is=="string"?g.createElement("select",{is:a.is}):g.createElement("select"),a.multiple?c.multiple=!0:a.size&&(c.size=a.size);break;default:c=typeof a.is=="string"?g.createElement(s,{is:a.is}):g.createElement(s)}}c[qt]=t,c[on]=a;e:for(g=t.child;g!==null;){if(g.tag===5||g.tag===6)c.appendChild(g.stateNode);else if(g.tag!==4&&g.tag!==27&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===t)break e;for(;g.sibling===null;){if(g.return===null||g.return===t)break e;g=g.return}g.sibling.return=g.return,g=g.sibling}t.stateNode=c;e:switch(Ft(c,s,a),s){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&po(t)}}return mt(t),Oc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,o),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&po(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(r(166));if(e=ae.current,la(t)){if(e=t.stateNode,o=t.memoizedProps,a=null,s=Vt,s!==null)switch(s.tag){case 27:case 5:a=s.memoizedProps}e[qt]=t,e=!!(e.nodeValue===o||a!==null&&a.suppressHydrationWarning===!0||zm(e.nodeValue,o)),e||Yo(t,!0)}else e=Kr(e).createTextNode(a),e[qt]=t,t.stateNode=e}return mt(t),null;case 31:if(o=t.memoizedState,e===null||e.memoizedState!==null){if(a=la(t),o!==null){if(e===null){if(!a)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[qt]=t}else Ti(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;mt(t),e=!1}else o=Lu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),e=!0;if(!e)return t.flags&256?(gn(t),t):(gn(t),null);if((t.flags&128)!==0)throw Error(r(558))}return mt(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(s=la(t),a!==null&&a.dehydrated!==null){if(e===null){if(!s)throw Error(r(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));s[qt]=t}else Ti(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;mt(t),s=!1}else s=Lu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),s=!0;if(!s)return t.flags&256?(gn(t),t):(gn(t),null)}return gn(t),(t.flags&128)!==0?(t.lanes=o,t):(o=a!==null,e=e!==null&&e.memoizedState!==null,o&&(a=t.child,s=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(s=a.alternate.memoizedState.cachePool.pool),c=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(c=a.memoizedState.cachePool.pool),c!==s&&(a.flags|=2048)),o!==e&&o&&(t.child.flags|=8192),_r(t,t.updateQueue),mt(t),null);case 4:return pe(),e===null&&Qc(t.stateNode.containerInfo),mt(t),null;case 10:return so(t.type),mt(t),null;case 19:if(B(Ct),a=t.memoizedState,a===null)return mt(t),null;if(s=(t.flags&128)!==0,c=a.rendering,c===null)if(s)fl(a,!1);else{if(wt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=Sr(e),c!==null){for(t.flags|=128,fl(a,!1),e=c.updateQueue,t.updateQueue=e,_r(t,e),t.subtreeFlags=0,e=o,o=t.child;o!==null;)ch(o,e),o=o.sibling;return W(Ct,Ct.current&1|2),tt&&lo(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&fe()>Ur&&(t.flags|=128,s=!0,fl(a,!1),t.lanes=4194304)}else{if(!s)if(e=Sr(c),e!==null){if(t.flags|=128,s=!0,e=e.updateQueue,t.updateQueue=e,_r(t,e),fl(a,!0),a.tail===null&&a.tailMode==="hidden"&&!c.alternate&&!tt)return mt(t),null}else 2*fe()-a.renderingStartTime>Ur&&o!==536870912&&(t.flags|=128,s=!0,fl(a,!1),t.lanes=4194304);a.isBackwards?(c.sibling=t.child,t.child=c):(e=a.last,e!==null?e.sibling=c:t.child=c,a.last=c)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=fe(),e.sibling=null,o=Ct.current,W(Ct,s?o&1|2:o&1),tt&&lo(t,a.treeForkCount),e):(mt(t),null);case 22:case 23:return gn(t),Zu(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(o&536870912)!==0&&(t.flags&128)===0&&(mt(t),t.subtreeFlags&6&&(t.flags|=8192)):mt(t),o=t.updateQueue,o!==null&&_r(t,o.retryQueue),o=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(o=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==o&&(t.flags|=2048),e!==null&&B(Ri),null;case 24:return o=null,e!==null&&(o=e.memoizedState.cache),t.memoizedState.cache!==o&&(t.flags|=2048),so(Dt),mt(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function xx(e,t){switch(ju(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return so(Dt),pe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ke(t),null;case 31:if(t.memoizedState!==null){if(gn(t),t.alternate===null)throw Error(r(340));Ti()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(gn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Ti()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return B(Ct),null;case 4:return pe(),null;case 10:return so(t.type),null;case 22:case 23:return gn(t),Zu(),e!==null&&B(Ri),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return so(Dt),null;case 25:return null;default:return null}}function Lg(e,t){switch(ju(t),t.tag){case 3:so(Dt),pe();break;case 26:case 27:case 5:ke(t);break;case 4:pe();break;case 31:t.memoizedState!==null&&gn(t);break;case 13:gn(t);break;case 19:B(Ct);break;case 10:so(t.type);break;case 22:case 23:gn(t),Zu(),e!==null&&B(Ri);break;case 24:so(Dt)}}function dl(e,t){try{var o=t.updateQueue,a=o!==null?o.lastEffect:null;if(a!==null){var s=a.next;o=s;do{if((o.tag&e)===e){a=void 0;var c=o.create,g=o.inst;a=c(),g.destroy=a}o=o.next}while(o!==s)}}catch(x){rt(t,t.return,x)}}function Qo(e,t,o){try{var a=t.updateQueue,s=a!==null?a.lastEffect:null;if(s!==null){var c=s.next;a=c;do{if((a.tag&e)===e){var g=a.inst,x=g.destroy;if(x!==void 0){g.destroy=void 0,s=t;var _=o,X=x;try{X()}catch(re){rt(s,_,re)}}}a=a.next}while(a!==c)}}catch(re){rt(t,t.return,re)}}function Ug(e){var t=e.updateQueue;if(t!==null){var o=e.stateNode;try{Ah(t,o)}catch(a){rt(e,e.return,a)}}}function Bg(e,t,o){o.props=Di(e.type,e.memoizedProps),o.state=e.memoizedState;try{o.componentWillUnmount()}catch(a){rt(e,t,a)}}function pl(e,t){try{var o=e.ref;if(o!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof o=="function"?e.refCleanup=o(a):o.current=a}}catch(s){rt(e,t,s)}}function Wn(e,t){var o=e.ref,a=e.refCleanup;if(o!==null)if(typeof a=="function")try{a()}catch(s){rt(e,t,s)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof o=="function")try{o(null)}catch(s){rt(e,t,s)}else o.current=null}function Ig(e){var t=e.type,o=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":o.autoFocus&&a.focus();break e;case"img":o.src?a.src=o.src:o.srcSet&&(a.srcset=o.srcSet)}}catch(s){rt(e,e.return,s)}}function Ac(e,t,o){try{var a=e.stateNode;qx(a,e.type,o,t),a[on]=t}catch(s){rt(e,e.return,s)}}function Pg(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ni(e.type)||e.tag===4}function Mc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Pg(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&ni(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Dc(e,t,o){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o).insertBefore(e,t):(t=o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,t.appendChild(e),o=o._reactRootContainer,o!=null||t.onclick!==null||(t.onclick=oo));else if(a!==4&&(a===27&&ni(e.type)&&(o=e.stateNode,t=null),e=e.child,e!==null))for(Dc(e,t,o),e=e.sibling;e!==null;)Dc(e,t,o),e=e.sibling}function kr(e,t,o){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?o.insertBefore(e,t):o.appendChild(e);else if(a!==4&&(a===27&&ni(e.type)&&(o=e.stateNode),e=e.child,e!==null))for(kr(e,t,o),e=e.sibling;e!==null;)kr(e,t,o),e=e.sibling}function Yg(e){var t=e.stateNode,o=e.memoizedProps;try{for(var a=e.type,s=t.attributes;s.length;)t.removeAttributeNode(s[0]);Ft(t,a,o),t[qt]=e,t[on]=o}catch(c){rt(e,e.return,c)}}var ho=!1,_t=!1,Nc=!1,qg=typeof WeakSet=="function"?WeakSet:Set,It=null;function Tx(e,t){if(e=e.containerInfo,Jc=ts,e=th(e),wu(e)){if("selectionStart"in e)var o={start:e.selectionStart,end:e.selectionEnd};else e:{o=(o=e.ownerDocument)&&o.defaultView||window;var a=o.getSelection&&o.getSelection();if(a&&a.rangeCount!==0){o=a.anchorNode;var s=a.anchorOffset,c=a.focusNode;a=a.focusOffset;try{o.nodeType,c.nodeType}catch{o=null;break e}var g=0,x=-1,_=-1,X=0,re=0,ce=e,Z=null;t:for(;;){for(var te;ce!==o||s!==0&&ce.nodeType!==3||(x=g+s),ce!==c||a!==0&&ce.nodeType!==3||(_=g+a),ce.nodeType===3&&(g+=ce.nodeValue.length),(te=ce.firstChild)!==null;)Z=ce,ce=te;for(;;){if(ce===e)break t;if(Z===o&&++X===s&&(x=g),Z===c&&++re===a&&(_=g),(te=ce.nextSibling)!==null)break;ce=Z,Z=ce.parentNode}ce=te}o=x===-1||_===-1?null:{start:x,end:_}}else o=null}o=o||{start:0,end:0}}else o=null;for($c={focusedElem:e,selectionRange:o},ts=!1,It=t;It!==null;)if(t=It,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,It=e;else for(;It!==null;){switch(t=It,c=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(o=0;o<e.length;o++)s=e[o],s.ref.impl=s.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&c!==null){e=void 0,o=t,s=c.memoizedProps,c=c.memoizedState,a=o.stateNode;try{var Ce=Di(o.type,s);e=a.getSnapshotBeforeUpdate(Ce,c),a.__reactInternalSnapshotBeforeUpdate=e}catch(He){rt(o,o.return,He)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,o=e.nodeType,o===9)nf(e);else if(o===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":nf(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(r(163))}if(e=t.sibling,e!==null){e.return=t.return,It=e;break}It=t.return}}function Vg(e,t,o){var a=o.flags;switch(o.tag){case 0:case 11:case 15:mo(e,o),a&4&&dl(5,o);break;case 1:if(mo(e,o),a&4)if(e=o.stateNode,t===null)try{e.componentDidMount()}catch(g){rt(o,o.return,g)}else{var s=Di(o.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(s,t,e.__reactInternalSnapshotBeforeUpdate)}catch(g){rt(o,o.return,g)}}a&64&&Ug(o),a&512&&pl(o,o.return);break;case 3:if(mo(e,o),a&64&&(e=o.updateQueue,e!==null)){if(t=null,o.child!==null)switch(o.child.tag){case 27:case 5:t=o.child.stateNode;break;case 1:t=o.child.stateNode}try{Ah(e,t)}catch(g){rt(o,o.return,g)}}break;case 27:t===null&&a&4&&Yg(o);case 26:case 5:mo(e,o),t===null&&a&4&&Ig(o),a&512&&pl(o,o.return);break;case 12:mo(e,o);break;case 31:mo(e,o),a&4&&Fg(e,o);break;case 13:mo(e,o),a&4&&Kg(e,o),a&64&&(e=o.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(o=Nx.bind(null,o),Wx(e,o))));break;case 22:if(a=o.memoizedState!==null||ho,!a){t=t!==null&&t.memoizedState!==null||_t,s=ho;var c=_t;ho=a,(_t=t)&&!c?yo(e,o,(o.subtreeFlags&8772)!==0):mo(e,o),ho=s,_t=c}break;case 30:break;default:mo(e,o)}}function Gg(e){var t=e.alternate;t!==null&&(e.alternate=null,Gg(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ru(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var vt=null,ln=!1;function go(e,t,o){for(o=o.child;o!==null;)Xg(e,t,o),o=o.sibling}function Xg(e,t,o){if(Ye&&typeof Ye.onCommitFiberUnmount=="function")try{Ye.onCommitFiberUnmount(xe,o)}catch{}switch(o.tag){case 26:_t||Wn(o,t),go(e,t,o),o.memoizedState?o.memoizedState.count--:o.stateNode&&(o=o.stateNode,o.parentNode.removeChild(o));break;case 27:_t||Wn(o,t);var a=vt,s=ln;ni(o.type)&&(vt=o.stateNode,ln=!1),go(e,t,o),Tl(o.stateNode),vt=a,ln=s;break;case 5:_t||Wn(o,t);case 6:if(a=vt,s=ln,vt=null,go(e,t,o),vt=a,ln=s,vt!==null)if(ln)try{(vt.nodeType===9?vt.body:vt.nodeName==="HTML"?vt.ownerDocument.body:vt).removeChild(o.stateNode)}catch(c){rt(o,t,c)}else try{vt.removeChild(o.stateNode)}catch(c){rt(o,t,c)}break;case 18:vt!==null&&(ln?(e=vt,Um(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,o.stateNode),Oa(e)):Um(vt,o.stateNode));break;case 4:a=vt,s=ln,vt=o.stateNode.containerInfo,ln=!0,go(e,t,o),vt=a,ln=s;break;case 0:case 11:case 14:case 15:Qo(2,o,t),_t||Qo(4,o,t),go(e,t,o);break;case 1:_t||(Wn(o,t),a=o.stateNode,typeof a.componentWillUnmount=="function"&&Bg(o,t,a)),go(e,t,o);break;case 21:go(e,t,o);break;case 22:_t=(a=_t)||o.memoizedState!==null,go(e,t,o),_t=a;break;default:go(e,t,o)}}function Fg(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Oa(e)}catch(o){rt(t,t.return,o)}}}function Kg(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Oa(e)}catch(o){rt(t,t.return,o)}}function Ex(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new qg),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new qg),t;default:throw Error(r(435,e.tag))}}function jr(e,t){var o=Ex(e);t.forEach(function(a){if(!o.has(a)){o.add(a);var s=zx.bind(null,e,a);a.then(s,s)}})}function rn(e,t){var o=t.deletions;if(o!==null)for(var a=0;a<o.length;a++){var s=o[a],c=e,g=t,x=g;e:for(;x!==null;){switch(x.tag){case 27:if(ni(x.type)){vt=x.stateNode,ln=!1;break e}break;case 5:vt=x.stateNode,ln=!1;break e;case 3:case 4:vt=x.stateNode.containerInfo,ln=!0;break e}x=x.return}if(vt===null)throw Error(r(160));Xg(c,g,s),vt=null,ln=!1,c=s.alternate,c!==null&&(c.return=null),s.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Qg(t,e),t=t.sibling}var Yn=null;function Qg(e,t){var o=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:rn(t,e),sn(e),a&4&&(Qo(3,e,e.return),dl(3,e),Qo(5,e,e.return));break;case 1:rn(t,e),sn(e),a&512&&(_t||o===null||Wn(o,o.return)),a&64&&ho&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(o=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=o===null?a:o.concat(a))));break;case 26:var s=Yn;if(rn(t,e),sn(e),a&512&&(_t||o===null||Wn(o,o.return)),a&4){var c=o!==null?o.memoizedState:null;if(a=e.memoizedState,o===null)if(a===null)if(e.stateNode===null){e:{a=e.type,o=e.memoizedProps,s=s.ownerDocument||s;t:switch(a){case"title":c=s.getElementsByTagName("title")[0],(!c||c[Ia]||c[qt]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=s.createElement(a),s.head.insertBefore(c,s.querySelector("head > title"))),Ft(c,a,o),c[qt]=e,Bt(c),a=c;break e;case"link":var g=Qm("link","href",s).get(a+(o.href||""));if(g){for(var x=0;x<g.length;x++)if(c=g[x],c.getAttribute("href")===(o.href==null||o.href===""?null:o.href)&&c.getAttribute("rel")===(o.rel==null?null:o.rel)&&c.getAttribute("title")===(o.title==null?null:o.title)&&c.getAttribute("crossorigin")===(o.crossOrigin==null?null:o.crossOrigin)){g.splice(x,1);break t}}c=s.createElement(a),Ft(c,a,o),s.head.appendChild(c);break;case"meta":if(g=Qm("meta","content",s).get(a+(o.content||""))){for(x=0;x<g.length;x++)if(c=g[x],c.getAttribute("content")===(o.content==null?null:""+o.content)&&c.getAttribute("name")===(o.name==null?null:o.name)&&c.getAttribute("property")===(o.property==null?null:o.property)&&c.getAttribute("http-equiv")===(o.httpEquiv==null?null:o.httpEquiv)&&c.getAttribute("charset")===(o.charSet==null?null:o.charSet)){g.splice(x,1);break t}}c=s.createElement(a),Ft(c,a,o),s.head.appendChild(c);break;default:throw Error(r(468,a))}c[qt]=e,Bt(c),a=c}e.stateNode=a}else Zm(s,e.type,e.stateNode);else e.stateNode=Km(s,a,e.memoizedProps);else c!==a?(c===null?o.stateNode!==null&&(o=o.stateNode,o.parentNode.removeChild(o)):c.count--,a===null?Zm(s,e.type,e.stateNode):Km(s,a,e.memoizedProps)):a===null&&e.stateNode!==null&&Ac(e,e.memoizedProps,o.memoizedProps)}break;case 27:rn(t,e),sn(e),a&512&&(_t||o===null||Wn(o,o.return)),o!==null&&a&4&&Ac(e,e.memoizedProps,o.memoizedProps);break;case 5:if(rn(t,e),sn(e),a&512&&(_t||o===null||Wn(o,o.return)),e.flags&32){s=e.stateNode;try{Zi(s,"")}catch(Ce){rt(e,e.return,Ce)}}a&4&&e.stateNode!=null&&(s=e.memoizedProps,Ac(e,s,o!==null?o.memoizedProps:s)),a&1024&&(Nc=!0);break;case 6:if(rn(t,e),sn(e),a&4){if(e.stateNode===null)throw Error(r(162));a=e.memoizedProps,o=e.stateNode;try{o.nodeValue=a}catch(Ce){rt(e,e.return,Ce)}}break;case 3:if(Wr=null,s=Yn,Yn=Qr(t.containerInfo),rn(t,e),Yn=s,sn(e),a&4&&o!==null&&o.memoizedState.isDehydrated)try{Oa(t.containerInfo)}catch(Ce){rt(e,e.return,Ce)}Nc&&(Nc=!1,Zg(e));break;case 4:a=Yn,Yn=Qr(e.stateNode.containerInfo),rn(t,e),sn(e),Yn=a;break;case 12:rn(t,e),sn(e);break;case 31:rn(t,e),sn(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,jr(e,a)));break;case 13:rn(t,e),sn(e),e.child.flags&8192&&e.memoizedState!==null!=(o!==null&&o.memoizedState!==null)&&(Lr=fe()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,jr(e,a)));break;case 22:s=e.memoizedState!==null;var _=o!==null&&o.memoizedState!==null,X=ho,re=_t;if(ho=X||s,_t=re||_,rn(t,e),_t=re,ho=X,sn(e),a&8192)e:for(t=e.stateNode,t._visibility=s?t._visibility&-2:t._visibility|1,s&&(o===null||_||ho||_t||Ni(e)),o=null,t=e;;){if(t.tag===5||t.tag===26){if(o===null){_=o=t;try{if(c=_.stateNode,s)g=c.style,typeof g.setProperty=="function"?g.setProperty("display","none","important"):g.display="none";else{x=_.stateNode;var ce=_.memoizedProps.style,Z=ce!=null&&ce.hasOwnProperty("display")?ce.display:null;x.style.display=Z==null||typeof Z=="boolean"?"":(""+Z).trim()}}catch(Ce){rt(_,_.return,Ce)}}}else if(t.tag===6){if(o===null){_=t;try{_.stateNode.nodeValue=s?"":_.memoizedProps}catch(Ce){rt(_,_.return,Ce)}}}else if(t.tag===18){if(o===null){_=t;try{var te=_.stateNode;s?Bm(te,!0):Bm(_.stateNode,!1)}catch(Ce){rt(_,_.return,Ce)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;o===t&&(o=null),t=t.return}o===t&&(o=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(o=a.retryQueue,o!==null&&(a.retryQueue=null,jr(e,o))));break;case 19:rn(t,e),sn(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,jr(e,a)));break;case 30:break;case 21:break;default:rn(t,e),sn(e)}}function sn(e){var t=e.flags;if(t&2){try{for(var o,a=e.return;a!==null;){if(Pg(a)){o=a;break}a=a.return}if(o==null)throw Error(r(160));switch(o.tag){case 27:var s=o.stateNode,c=Mc(e);kr(e,c,s);break;case 5:var g=o.stateNode;o.flags&32&&(Zi(g,""),o.flags&=-33);var x=Mc(e);kr(e,x,g);break;case 3:case 4:var _=o.stateNode.containerInfo,X=Mc(e);Dc(e,X,_);break;default:throw Error(r(161))}}catch(re){rt(e,e.return,re)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Zg(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Zg(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function mo(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Vg(e,t.alternate,t),t=t.sibling}function Ni(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Qo(4,t,t.return),Ni(t);break;case 1:Wn(t,t.return);var o=t.stateNode;typeof o.componentWillUnmount=="function"&&Bg(t,t.return,o),Ni(t);break;case 27:Tl(t.stateNode);case 26:case 5:Wn(t,t.return),Ni(t);break;case 22:t.memoizedState===null&&Ni(t);break;case 30:Ni(t);break;default:Ni(t)}e=e.sibling}}function yo(e,t,o){for(o=o&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,s=e,c=t,g=c.flags;switch(c.tag){case 0:case 11:case 15:yo(s,c,o),dl(4,c);break;case 1:if(yo(s,c,o),a=c,s=a.stateNode,typeof s.componentDidMount=="function")try{s.componentDidMount()}catch(X){rt(a,a.return,X)}if(a=c,s=a.updateQueue,s!==null){var x=a.stateNode;try{var _=s.shared.hiddenCallbacks;if(_!==null)for(s.shared.hiddenCallbacks=null,s=0;s<_.length;s++)Oh(_[s],x)}catch(X){rt(a,a.return,X)}}o&&g&64&&Ug(c),pl(c,c.return);break;case 27:Yg(c);case 26:case 5:yo(s,c,o),o&&a===null&&g&4&&Ig(c),pl(c,c.return);break;case 12:yo(s,c,o);break;case 31:yo(s,c,o),o&&g&4&&Fg(s,c);break;case 13:yo(s,c,o),o&&g&4&&Kg(s,c);break;case 22:c.memoizedState===null&&yo(s,c,o),pl(c,c.return);break;case 30:break;default:yo(s,c,o)}t=t.sibling}}function zc(e,t){var o=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(o=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==o&&(e!=null&&e.refCount++,o!=null&&$a(o))}function _c(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&$a(e))}function qn(e,t,o,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Wg(e,t,o,a),t=t.sibling}function Wg(e,t,o,a){var s=t.flags;switch(t.tag){case 0:case 11:case 15:qn(e,t,o,a),s&2048&&dl(9,t);break;case 1:qn(e,t,o,a);break;case 3:qn(e,t,o,a),s&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&$a(e)));break;case 12:if(s&2048){qn(e,t,o,a),e=t.stateNode;try{var c=t.memoizedProps,g=c.id,x=c.onPostCommit;typeof x=="function"&&x(g,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(_){rt(t,t.return,_)}}else qn(e,t,o,a);break;case 31:qn(e,t,o,a);break;case 13:qn(e,t,o,a);break;case 23:break;case 22:c=t.stateNode,g=t.alternate,t.memoizedState!==null?c._visibility&2?qn(e,t,o,a):hl(e,t):c._visibility&2?qn(e,t,o,a):(c._visibility|=2,ma(e,t,o,a,(t.subtreeFlags&10256)!==0||!1)),s&2048&&zc(g,t);break;case 24:qn(e,t,o,a),s&2048&&_c(t.alternate,t);break;default:qn(e,t,o,a)}}function ma(e,t,o,a,s){for(s=s&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var c=e,g=t,x=o,_=a,X=g.flags;switch(g.tag){case 0:case 11:case 15:ma(c,g,x,_,s),dl(8,g);break;case 23:break;case 22:var re=g.stateNode;g.memoizedState!==null?re._visibility&2?ma(c,g,x,_,s):hl(c,g):(re._visibility|=2,ma(c,g,x,_,s)),s&&X&2048&&zc(g.alternate,g);break;case 24:ma(c,g,x,_,s),s&&X&2048&&_c(g.alternate,g);break;default:ma(c,g,x,_,s)}t=t.sibling}}function hl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var o=e,a=t,s=a.flags;switch(a.tag){case 22:hl(o,a),s&2048&&zc(a.alternate,a);break;case 24:hl(o,a),s&2048&&_c(a.alternate,a);break;default:hl(o,a)}t=t.sibling}}var gl=8192;function ya(e,t,o){if(e.subtreeFlags&gl)for(e=e.child;e!==null;)Jg(e,t,o),e=e.sibling}function Jg(e,t,o){switch(e.tag){case 26:ya(e,t,o),e.flags&gl&&e.memoizedState!==null&&uT(o,Yn,e.memoizedState,e.memoizedProps);break;case 5:ya(e,t,o);break;case 3:case 4:var a=Yn;Yn=Qr(e.stateNode.containerInfo),ya(e,t,o),Yn=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=gl,gl=16777216,ya(e,t,o),gl=a):ya(e,t,o));break;default:ya(e,t,o)}}function $g(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function ml(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var o=0;o<t.length;o++){var a=t[o];It=a,tm(a,e)}$g(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)em(e),e=e.sibling}function em(e){switch(e.tag){case 0:case 11:case 15:ml(e),e.flags&2048&&Qo(9,e,e.return);break;case 3:ml(e);break;case 12:ml(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Hr(e)):ml(e);break;default:ml(e)}}function Hr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var o=0;o<t.length;o++){var a=t[o];It=a,tm(a,e)}$g(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Qo(8,t,t.return),Hr(t);break;case 22:o=t.stateNode,o._visibility&2&&(o._visibility&=-3,Hr(t));break;default:Hr(t)}e=e.sibling}}function tm(e,t){for(;It!==null;){var o=It;switch(o.tag){case 0:case 11:case 15:Qo(8,o,t);break;case 23:case 22:if(o.memoizedState!==null&&o.memoizedState.cachePool!==null){var a=o.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:$a(o.memoizedState.cache)}if(a=o.child,a!==null)a.return=o,It=a;else e:for(o=e;It!==null;){a=It;var s=a.sibling,c=a.return;if(Gg(a),a===o){It=null;break e}if(s!==null){s.return=c,It=s;break e}It=c}}}var wx={getCacheForType:function(e){var t=Gt(Dt),o=t.data.get(e);return o===void 0&&(o=e(),t.data.set(e,o)),o},cacheSignal:function(){return Gt(Dt).controller.signal}},Rx=typeof WeakMap=="function"?WeakMap:Map,at=0,ht=null,Ze=null,$e=0,lt=0,mn=null,Zo=!1,ba=!1,kc=!1,bo=0,wt=0,Wo=0,zi=0,jc=0,yn=0,va=0,yl=null,un=null,Hc=!1,Lr=0,nm=0,Ur=1/0,Br=null,Jo=null,Ht=0,$o=null,Sa=null,vo=0,Lc=0,Uc=null,om=null,bl=0,Bc=null;function bn(){return(at&2)!==0&&$e!==0?$e&-$e:z.T!==null?Gc():Kl()}function im(){if(yn===0)if(($e&536870912)===0||tt){var e=Bn;Bn<<=1,(Bn&3932160)===0&&(Bn=262144),yn=e}else yn=536870912;return e=hn.current,e!==null&&(e.flags|=32),yn}function cn(e,t,o){(e===ht&&(lt===2||lt===9)||e.cancelPendingCommit!==null)&&(xa(e,0),ei(e,$e,yn,!1)),wn(e,o),((at&2)===0||e!==ht)&&(e===ht&&((at&2)===0&&(zi|=o),wt===4&&ei(e,$e,yn,!1)),Jn(e))}function am(e,t,o){if((at&6)!==0)throw Error(r(327));var a=!o&&(t&127)===0&&(t&e.expiredLanes)===0||Mt(e,t),s=a?Ax(e,t):Pc(e,t,!0),c=a;do{if(s===0){ba&&!a&&ei(e,t,0,!1);break}else{if(o=e.current.alternate,c&&!Cx(o)){s=Pc(e,t,!1),c=!1;continue}if(s===2){if(c=t,e.errorRecoveryDisabledLanes&c)var g=0;else g=e.pendingLanes&-536870913,g=g!==0?g:g&536870912?536870912:0;if(g!==0){t=g;e:{var x=e;s=yl;var _=x.current.memoizedState.isDehydrated;if(_&&(xa(x,g).flags|=256),g=Pc(x,g,!1),g!==2){if(kc&&!_){x.errorRecoveryDisabledLanes|=c,zi|=c,s=4;break e}c=un,un=s,c!==null&&(un===null?un=c:un.push.apply(un,c))}s=g}if(c=!1,s!==2)continue}}if(s===1){xa(e,0),ei(e,t,0,!0);break}e:{switch(a=e,c=s,c){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t)break;case 6:ei(a,t,yn,!Zo);break e;case 2:un=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(s=Lr+300-fe(),10<s)){if(ei(a,t,yn,!Zo),Yt(a,0,!0)!==0)break e;vo=t,a.timeoutHandle=Hm(lm.bind(null,a,o,un,Br,Hc,t,yn,zi,va,Zo,c,"Throttled",-0,0),s);break e}lm(a,o,un,Br,Hc,t,yn,zi,va,Zo,c,null,-0,0)}}break}while(!0);Jn(e)}function lm(e,t,o,a,s,c,g,x,_,X,re,ce,Z,te){if(e.timeoutHandle=-1,ce=t.subtreeFlags,ce&8192||(ce&16785408)===16785408){ce={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:oo},Jg(t,c,ce);var Ce=(c&62914560)===c?Lr-fe():(c&4194048)===c?nm-fe():0;if(Ce=cT(ce,Ce),Ce!==null){vo=c,e.cancelPendingCommit=Ce(hm.bind(null,e,t,c,o,a,s,g,x,_,re,ce,null,Z,te)),ei(e,c,g,!X);return}}hm(e,t,c,o,a,s,g,x,_)}function Cx(e){for(var t=e;;){var o=t.tag;if((o===0||o===11||o===15)&&t.flags&16384&&(o=t.updateQueue,o!==null&&(o=o.stores,o!==null)))for(var a=0;a<o.length;a++){var s=o[a],c=s.getSnapshot;s=s.value;try{if(!dn(c(),s))return!1}catch{return!1}}if(o=t.child,t.subtreeFlags&16384&&o!==null)o.return=t,t=o;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ei(e,t,o,a){t&=~jc,t&=~zi,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var s=t;0<s;){var c=31-pt(s),g=1<<c;a[c]=-1,s&=~g}o!==0&&In(e,o,t)}function Ir(){return(at&6)===0?(vl(0),!1):!0}function Ic(){if(Ze!==null){if(lt===0)var e=Ze.return;else e=Ze,ro=Ei=null,nc(e),fa=null,tl=0,e=Ze;for(;e!==null;)Lg(e.alternate,e),e=e.return;Ze=null}}function xa(e,t){var o=e.timeoutHandle;o!==-1&&(e.timeoutHandle=-1,Xx(o)),o=e.cancelPendingCommit,o!==null&&(e.cancelPendingCommit=null,o()),vo=0,Ic(),ht=e,Ze=o=ao(e.current,null),$e=t,lt=0,mn=null,Zo=!1,ba=Mt(e,t),kc=!1,va=yn=jc=zi=Wo=wt=0,un=yl=null,Hc=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var s=31-pt(a),c=1<<s;t|=e[s],a&=~c}return bo=t,rr(),o}function rm(e,t){qe=null,z.H=ul,t===ca||t===gr?(t=Eh(),lt=3):t===Vu?(t=Eh(),lt=4):lt=t===bc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,mn=t,Ze===null&&(wt=1,Mr(e,An(t,e.current)))}function sm(){var e=hn.current;return e===null?!0:($e&4194048)===$e?zn===null:($e&62914560)===$e||($e&536870912)!==0?e===zn:!1}function um(){var e=z.H;return z.H=ul,e===null?ul:e}function cm(){var e=z.A;return z.A=wx,e}function Pr(){wt=4,Zo||($e&4194048)!==$e&&hn.current!==null||(ba=!0),(Wo&134217727)===0&&(zi&134217727)===0||ht===null||ei(ht,$e,yn,!1)}function Pc(e,t,o){var a=at;at|=2;var s=um(),c=cm();(ht!==e||$e!==t)&&(Br=null,xa(e,t)),t=!1;var g=wt;e:do try{if(lt!==0&&Ze!==null){var x=Ze,_=mn;switch(lt){case 8:Ic(),g=6;break e;case 3:case 2:case 9:case 6:hn.current===null&&(t=!0);var X=lt;if(lt=0,mn=null,Ta(e,x,_,X),o&&ba){g=0;break e}break;default:X=lt,lt=0,mn=null,Ta(e,x,_,X)}}Ox(),g=wt;break}catch(re){rm(e,re)}while(!0);return t&&e.shellSuspendCounter++,ro=Ei=null,at=a,z.H=s,z.A=c,Ze===null&&(ht=null,$e=0,rr()),g}function Ox(){for(;Ze!==null;)fm(Ze)}function Ax(e,t){var o=at;at|=2;var a=um(),s=cm();ht!==e||$e!==t?(Br=null,Ur=fe()+500,xa(e,t)):ba=Mt(e,t);e:do try{if(lt!==0&&Ze!==null){t=Ze;var c=mn;t:switch(lt){case 1:lt=0,mn=null,Ta(e,t,c,1);break;case 2:case 9:if(xh(c)){lt=0,mn=null,dm(t);break}t=function(){lt!==2&&lt!==9||ht!==e||(lt=7),Jn(e)},c.then(t,t);break e;case 3:lt=7;break e;case 4:lt=5;break e;case 7:xh(c)?(lt=0,mn=null,dm(t)):(lt=0,mn=null,Ta(e,t,c,7));break;case 5:var g=null;switch(Ze.tag){case 26:g=Ze.memoizedState;case 5:case 27:var x=Ze;if(g?Wm(g):x.stateNode.complete){lt=0,mn=null;var _=x.sibling;if(_!==null)Ze=_;else{var X=x.return;X!==null?(Ze=X,Yr(X)):Ze=null}break t}}lt=0,mn=null,Ta(e,t,c,5);break;case 6:lt=0,mn=null,Ta(e,t,c,6);break;case 8:Ic(),wt=6;break e;default:throw Error(r(462))}}Mx();break}catch(re){rm(e,re)}while(!0);return ro=Ei=null,z.H=a,z.A=s,at=o,Ze!==null?0:(ht=null,$e=0,rr(),wt)}function Mx(){for(;Ze!==null&&!Qe();)fm(Ze)}function fm(e){var t=jg(e.alternate,e,bo);e.memoizedProps=e.pendingProps,t===null?Yr(e):Ze=t}function dm(e){var t=e,o=t.alternate;switch(t.tag){case 15:case 0:t=Mg(o,t,t.pendingProps,t.type,void 0,$e);break;case 11:t=Mg(o,t,t.pendingProps,t.type.render,t.ref,$e);break;case 5:nc(t);default:Lg(o,t),t=Ze=ch(t,bo),t=jg(o,t,bo)}e.memoizedProps=e.pendingProps,t===null?Yr(e):Ze=t}function Ta(e,t,o,a){ro=Ei=null,nc(t),fa=null,tl=0;var s=t.return;try{if(yx(e,s,t,o,$e)){wt=1,Mr(e,An(o,e.current)),Ze=null;return}}catch(c){if(s!==null)throw Ze=s,c;wt=1,Mr(e,An(o,e.current)),Ze=null;return}t.flags&32768?(tt||a===1?e=!0:ba||($e&536870912)!==0?e=!1:(Zo=e=!0,(a===2||a===9||a===3||a===6)&&(a=hn.current,a!==null&&a.tag===13&&(a.flags|=16384))),pm(t,e)):Yr(t)}function Yr(e){var t=e;do{if((t.flags&32768)!==0){pm(t,Zo);return}e=t.return;var o=Sx(t.alternate,t,bo);if(o!==null){Ze=o;return}if(t=t.sibling,t!==null){Ze=t;return}Ze=t=e}while(t!==null);wt===0&&(wt=5)}function pm(e,t){do{var o=xx(e.alternate,e);if(o!==null){o.flags&=32767,Ze=o;return}if(o=e.return,o!==null&&(o.flags|=32768,o.subtreeFlags=0,o.deletions=null),!t&&(e=e.sibling,e!==null)){Ze=e;return}Ze=e=o}while(e!==null);wt=6,Ze=null}function hm(e,t,o,a,s,c,g,x,_){e.cancelPendingCommit=null;do qr();while(Ht!==0);if((at&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(c=t.lanes|t.childLanes,c|=Mu,qi(e,o,c,g,x,_),e===ht&&(Ze=ht=null,$e=0),Sa=t,$o=e,vo=o,Lc=c,Uc=s,om=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,_x(be,function(){return vm(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=z.T,z.T=null,s=q.p,q.p=2,g=at,at|=4;try{Tx(e,t,o)}finally{at=g,q.p=s,z.T=a}}Ht=1,gm(),mm(),ym()}}function gm(){if(Ht===1){Ht=0;var e=$o,t=Sa,o=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||o){o=z.T,z.T=null;var a=q.p;q.p=2;var s=at;at|=4;try{Qg(t,e);var c=$c,g=th(e.containerInfo),x=c.focusedElem,_=c.selectionRange;if(g!==x&&x&&x.ownerDocument&&eh(x.ownerDocument.documentElement,x)){if(_!==null&&wu(x)){var X=_.start,re=_.end;if(re===void 0&&(re=X),"selectionStart"in x)x.selectionStart=X,x.selectionEnd=Math.min(re,x.value.length);else{var ce=x.ownerDocument||document,Z=ce&&ce.defaultView||window;if(Z.getSelection){var te=Z.getSelection(),Ce=x.textContent.length,He=Math.min(_.start,Ce),ct=_.end===void 0?He:Math.min(_.end,Ce);!te.extend&&He>ct&&(g=ct,ct=He,He=g);var Y=$p(x,He),U=$p(x,ct);if(Y&&U&&(te.rangeCount!==1||te.anchorNode!==Y.node||te.anchorOffset!==Y.offset||te.focusNode!==U.node||te.focusOffset!==U.offset)){var G=ce.createRange();G.setStart(Y.node,Y.offset),te.removeAllRanges(),He>ct?(te.addRange(G),te.extend(U.node,U.offset)):(G.setEnd(U.node,U.offset),te.addRange(G))}}}}for(ce=[],te=x;te=te.parentNode;)te.nodeType===1&&ce.push({element:te,left:te.scrollLeft,top:te.scrollTop});for(typeof x.focus=="function"&&x.focus(),x=0;x<ce.length;x++){var se=ce[x];se.element.scrollLeft=se.left,se.element.scrollTop=se.top}}ts=!!Jc,$c=Jc=null}finally{at=s,q.p=a,z.T=o}}e.current=t,Ht=2}}function mm(){if(Ht===2){Ht=0;var e=$o,t=Sa,o=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||o){o=z.T,z.T=null;var a=q.p;q.p=2;var s=at;at|=4;try{Vg(e,t.alternate,t)}finally{at=s,q.p=a,z.T=o}}Ht=3}}function ym(){if(Ht===4||Ht===3){Ht=0,Me();var e=$o,t=Sa,o=vo,a=om;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Ht=5:(Ht=0,Sa=$o=null,bm(e,e.pendingLanes));var s=e.pendingLanes;if(s===0&&(Jo=null),gi(o),t=t.stateNode,Ye&&typeof Ye.onCommitFiberRoot=="function")try{Ye.onCommitFiberRoot(xe,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=z.T,s=q.p,q.p=2,z.T=null;try{for(var c=e.onRecoverableError,g=0;g<a.length;g++){var x=a[g];c(x.value,{componentStack:x.stack})}}finally{z.T=t,q.p=s}}(vo&3)!==0&&qr(),Jn(e),s=e.pendingLanes,(o&261930)!==0&&(s&42)!==0?e===Bc?bl++:(bl=0,Bc=e):bl=0,vl(0)}}function bm(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,$a(t)))}function qr(){return gm(),mm(),ym(),vm()}function vm(){if(Ht!==5)return!1;var e=$o,t=Lc;Lc=0;var o=gi(vo),a=z.T,s=q.p;try{q.p=32>o?32:o,z.T=null,o=Uc,Uc=null;var c=$o,g=vo;if(Ht=0,Sa=$o=null,vo=0,(at&6)!==0)throw Error(r(331));var x=at;if(at|=4,em(c.current),Wg(c,c.current,g,o),at=x,vl(0,!1),Ye&&typeof Ye.onPostCommitFiberRoot=="function")try{Ye.onPostCommitFiberRoot(xe,c)}catch{}return!0}finally{q.p=s,z.T=a,bm(e,t)}}function Sm(e,t,o){t=An(o,t),t=yc(e.stateNode,t,2),e=Xo(e,t,2),e!==null&&(wn(e,2),Jn(e))}function rt(e,t,o){if(e.tag===3)Sm(e,e,o);else for(;t!==null;){if(t.tag===3){Sm(t,e,o);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Jo===null||!Jo.has(a))){e=An(o,e),o=xg(2),a=Xo(t,o,2),a!==null&&(Tg(o,a,t,e),wn(a,2),Jn(a));break}}t=t.return}}function Yc(e,t,o){var a=e.pingCache;if(a===null){a=e.pingCache=new Rx;var s=new Set;a.set(t,s)}else s=a.get(t),s===void 0&&(s=new Set,a.set(t,s));s.has(o)||(kc=!0,s.add(o),e=Dx.bind(null,e,t,o),t.then(e,e))}function Dx(e,t,o){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&o,e.warmLanes&=~o,ht===e&&($e&o)===o&&(wt===4||wt===3&&($e&62914560)===$e&&300>fe()-Lr?(at&2)===0&&xa(e,0):jc|=o,va===$e&&(va=0)),Jn(e)}function xm(e,t){t===0&&(t=nn()),e=Si(e,t),e!==null&&(wn(e,t),Jn(e))}function Nx(e){var t=e.memoizedState,o=0;t!==null&&(o=t.retryLane),xm(e,o)}function zx(e,t){var o=0;switch(e.tag){case 31:case 13:var a=e.stateNode,s=e.memoizedState;s!==null&&(o=s.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(r(314))}a!==null&&a.delete(t),xm(e,o)}function _x(e,t){return we(e,t)}var Vr=null,Ea=null,qc=!1,Gr=!1,Vc=!1,ti=0;function Jn(e){e!==Ea&&e.next===null&&(Ea===null?Vr=Ea=e:Ea=Ea.next=e),Gr=!0,qc||(qc=!0,jx())}function vl(e,t){if(!Vc&&Gr){Vc=!0;do for(var o=!1,a=Vr;a!==null;){if(e!==0){var s=a.pendingLanes;if(s===0)var c=0;else{var g=a.suspendedLanes,x=a.pingedLanes;c=(1<<31-pt(42|e)+1)-1,c&=s&~(g&~x),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(o=!0,Rm(a,c))}else c=$e,c=Yt(a,a===ht?c:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(c&3)===0||Mt(a,c)||(o=!0,Rm(a,c));a=a.next}while(o);Vc=!1}}function kx(){Tm()}function Tm(){Gr=qc=!1;var e=0;ti!==0&&Gx()&&(e=ti);for(var t=fe(),o=null,a=Vr;a!==null;){var s=a.next,c=Em(a,t);c===0?(a.next=null,o===null?Vr=s:o.next=s,s===null&&(Ea=o)):(o=a,(e!==0||(c&3)!==0)&&(Gr=!0)),a=s}Ht!==0&&Ht!==5||vl(e),ti!==0&&(ti=0)}function Em(e,t){for(var o=e.suspendedLanes,a=e.pingedLanes,s=e.expirationTimes,c=e.pendingLanes&-62914561;0<c;){var g=31-pt(c),x=1<<g,_=s[g];_===-1?((x&o)===0||(x&a)!==0)&&(s[g]=Kn(x,t)):_<=t&&(e.expiredLanes|=x),c&=~x}if(t=ht,o=$e,o=Yt(e,e===t?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,o===0||e===t&&(lt===2||lt===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&Ae(a),e.callbackNode=null,e.callbackPriority=0;if((o&3)===0||Mt(e,o)){if(t=o&-o,t===e.callbackPriority)return t;switch(a!==null&&Ae(a),gi(o)){case 2:case 8:o=le;break;case 32:o=be;break;case 268435456:o=Ut;break;default:o=be}return a=wm.bind(null,e),o=we(o,a),e.callbackPriority=t,e.callbackNode=o,t}return a!==null&&a!==null&&Ae(a),e.callbackPriority=2,e.callbackNode=null,2}function wm(e,t){if(Ht!==0&&Ht!==5)return e.callbackNode=null,e.callbackPriority=0,null;var o=e.callbackNode;if(qr()&&e.callbackNode!==o)return null;var a=$e;return a=Yt(e,e===ht?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(am(e,a,t),Em(e,fe()),e.callbackNode!=null&&e.callbackNode===o?wm.bind(null,e):null)}function Rm(e,t){if(qr())return null;am(e,t,!0)}function jx(){Fx(function(){(at&6)!==0?we(de,kx):Tm()})}function Gc(){if(ti===0){var e=sa;e===0&&(e=At,At<<=1,(At&261888)===0&&(At=256)),ti=e}return ti}function Cm(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:$l(""+e)}function Om(e,t){var o=t.ownerDocument.createElement("input");return o.name=t.name,o.value=t.value,e.id&&o.setAttribute("form",e.id),t.parentNode.insertBefore(o,t),e=new FormData(e),o.parentNode.removeChild(o),e}function Hx(e,t,o,a,s){if(t==="submit"&&o&&o.stateNode===s){var c=Cm((s[on]||null).action),g=a.submitter;g&&(t=(t=g[on]||null)?Cm(t.formAction):g.getAttribute("formAction"),t!==null&&(c=t,g=null));var x=new or("action","action",null,a,s);e.push({event:x,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(ti!==0){var _=g?Om(s,g):new FormData(s);fc(o,{pending:!0,data:_,method:s.method,action:c},null,_)}}else typeof c=="function"&&(x.preventDefault(),_=g?Om(s,g):new FormData(s),fc(o,{pending:!0,data:_,method:s.method,action:c},c,_))},currentTarget:s}]})}}for(var Xc=0;Xc<Au.length;Xc++){var Fc=Au[Xc],Lx=Fc.toLowerCase(),Ux=Fc[0].toUpperCase()+Fc.slice(1);Pn(Lx,"on"+Ux)}Pn(ih,"onAnimationEnd"),Pn(ah,"onAnimationIteration"),Pn(lh,"onAnimationStart"),Pn("dblclick","onDoubleClick"),Pn("focusin","onFocus"),Pn("focusout","onBlur"),Pn(ex,"onTransitionRun"),Pn(tx,"onTransitionStart"),Pn(nx,"onTransitionCancel"),Pn(rh,"onTransitionEnd"),Ki("onMouseEnter",["mouseout","mouseover"]),Ki("onMouseLeave",["mouseout","mouseover"]),Ki("onPointerEnter",["pointerout","pointerover"]),Ki("onPointerLeave",["pointerout","pointerover"]),mi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),mi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),mi("onBeforeInput",["compositionend","keypress","textInput","paste"]),mi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),mi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),mi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Sl="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Bx=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Sl));function Am(e,t){t=(t&4)!==0;for(var o=0;o<e.length;o++){var a=e[o],s=a.event;a=a.listeners;e:{var c=void 0;if(t)for(var g=a.length-1;0<=g;g--){var x=a[g],_=x.instance,X=x.currentTarget;if(x=x.listener,_!==c&&s.isPropagationStopped())break e;c=x,s.currentTarget=X;try{c(s)}catch(re){lr(re)}s.currentTarget=null,c=_}else for(g=0;g<a.length;g++){if(x=a[g],_=x.instance,X=x.currentTarget,x=x.listener,_!==c&&s.isPropagationStopped())break e;c=x,s.currentTarget=X;try{c(s)}catch(re){lr(re)}s.currentTarget=null,c=_}}}}function We(e,t){var o=t[lu];o===void 0&&(o=t[lu]=new Set);var a=e+"__bubble";o.has(a)||(Mm(t,e,2,!1),o.add(a))}function Kc(e,t,o){var a=0;t&&(a|=4),Mm(o,e,a,t)}var Xr="_reactListening"+Math.random().toString(36).slice(2);function Qc(e){if(!e[Xr]){e[Xr]=!0,Tp.forEach(function(o){o!=="selectionchange"&&(Bx.has(o)||Kc(o,!1,e),Kc(o,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Xr]||(t[Xr]=!0,Kc("selectionchange",!1,t))}}function Mm(e,t,o,a){switch(iy(t)){case 2:var s=pT;break;case 8:s=hT;break;default:s=ff}o=s.bind(null,t,o,e),s=void 0,!gu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),a?s!==void 0?e.addEventListener(t,o,{capture:!0,passive:s}):e.addEventListener(t,o,!0):s!==void 0?e.addEventListener(t,o,{passive:s}):e.addEventListener(t,o,!1)}function Zc(e,t,o,a,s){var c=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var g=a.tag;if(g===3||g===4){var x=a.stateNode.containerInfo;if(x===s)break;if(g===4)for(g=a.return;g!==null;){var _=g.tag;if((_===3||_===4)&&g.stateNode.containerInfo===s)return;g=g.return}for(;x!==null;){if(g=Gi(x),g===null)return;if(_=g.tag,_===5||_===6||_===26||_===27){a=c=g;continue e}x=x.parentNode}}a=a.return}kp(function(){var X=c,re=pu(o),ce=[];e:{var Z=sh.get(e);if(Z!==void 0){var te=or,Ce=e;switch(e){case"keypress":if(tr(o)===0)break e;case"keydown":case"keyup":te=zS;break;case"focusin":Ce="focus",te=vu;break;case"focusout":Ce="blur",te=vu;break;case"beforeblur":case"afterblur":te=vu;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":te=Lp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":te=SS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":te=jS;break;case ih:case ah:case lh:te=ES;break;case rh:te=LS;break;case"scroll":case"scrollend":te=bS;break;case"wheel":te=BS;break;case"copy":case"cut":case"paste":te=RS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":te=Bp;break;case"toggle":case"beforetoggle":te=PS}var He=(t&4)!==0,ct=!He&&(e==="scroll"||e==="scrollend"),Y=He?Z!==null?Z+"Capture":null:Z;He=[];for(var U=X,G;U!==null;){var se=U;if(G=se.stateNode,se=se.tag,se!==5&&se!==26&&se!==27||G===null||Y===null||(se=Ya(U,Y),se!=null&&He.push(xl(U,se,G))),ct)break;U=U.return}0<He.length&&(Z=new te(Z,Ce,null,o,re),ce.push({event:Z,listeners:He}))}}if((t&7)===0){e:{if(Z=e==="mouseover"||e==="pointerover",te=e==="mouseout"||e==="pointerout",Z&&o!==du&&(Ce=o.relatedTarget||o.fromElement)&&(Gi(Ce)||Ce[Vi]))break e;if((te||Z)&&(Z=re.window===re?re:(Z=re.ownerDocument)?Z.defaultView||Z.parentWindow:window,te?(Ce=o.relatedTarget||o.toElement,te=X,Ce=Ce?Gi(Ce):null,Ce!==null&&(ct=f(Ce),He=Ce.tag,Ce!==ct||He!==5&&He!==27&&He!==6)&&(Ce=null)):(te=null,Ce=X),te!==Ce)){if(He=Lp,se="onMouseLeave",Y="onMouseEnter",U="mouse",(e==="pointerout"||e==="pointerover")&&(He=Bp,se="onPointerLeave",Y="onPointerEnter",U="pointer"),ct=te==null?Z:Pa(te),G=Ce==null?Z:Pa(Ce),Z=new He(se,U+"leave",te,o,re),Z.target=ct,Z.relatedTarget=G,se=null,Gi(re)===X&&(He=new He(Y,U+"enter",Ce,o,re),He.target=G,He.relatedTarget=ct,se=He),ct=se,te&&Ce)t:{for(He=Ix,Y=te,U=Ce,G=0,se=Y;se;se=He(se))G++;se=0;for(var _e=U;_e;_e=He(_e))se++;for(;0<G-se;)Y=He(Y),G--;for(;0<se-G;)U=He(U),se--;for(;G--;){if(Y===U||U!==null&&Y===U.alternate){He=Y;break t}Y=He(Y),U=He(U)}He=null}else He=null;te!==null&&Dm(ce,Z,te,He,!1),Ce!==null&&ct!==null&&Dm(ce,ct,Ce,He,!0)}}e:{if(Z=X?Pa(X):window,te=Z.nodeName&&Z.nodeName.toLowerCase(),te==="select"||te==="input"&&Z.type==="file")var ot=Fp;else if(Gp(Z))if(Kp)ot=WS;else{ot=QS;var De=KS}else te=Z.nodeName,!te||te.toLowerCase()!=="input"||Z.type!=="checkbox"&&Z.type!=="radio"?X&&fu(X.elementType)&&(ot=Fp):ot=ZS;if(ot&&(ot=ot(e,X))){Xp(ce,ot,o,re);break e}De&&De(e,Z,X),e==="focusout"&&X&&Z.type==="number"&&X.memoizedProps.value!=null&&cu(Z,"number",Z.value)}switch(De=X?Pa(X):window,e){case"focusin":(Gp(De)||De.contentEditable==="true")&&(ea=De,Ru=X,Za=null);break;case"focusout":Za=Ru=ea=null;break;case"mousedown":Cu=!0;break;case"contextmenu":case"mouseup":case"dragend":Cu=!1,nh(ce,o,re);break;case"selectionchange":if($S)break;case"keydown":case"keyup":nh(ce,o,re)}var Ge;if(xu)e:{switch(e){case"compositionstart":var et="onCompositionStart";break e;case"compositionend":et="onCompositionEnd";break e;case"compositionupdate":et="onCompositionUpdate";break e}et=void 0}else $i?qp(e,o)&&(et="onCompositionEnd"):e==="keydown"&&o.keyCode===229&&(et="onCompositionStart");et&&(Ip&&o.locale!=="ko"&&($i||et!=="onCompositionStart"?et==="onCompositionEnd"&&$i&&(Ge=jp()):(Bo=re,mu="value"in Bo?Bo.value:Bo.textContent,$i=!0)),De=Fr(X,et),0<De.length&&(et=new Up(et,e,null,o,re),ce.push({event:et,listeners:De}),Ge?et.data=Ge:(Ge=Vp(o),Ge!==null&&(et.data=Ge)))),(Ge=qS?VS(e,o):GS(e,o))&&(et=Fr(X,"onBeforeInput"),0<et.length&&(De=new Up("onBeforeInput","beforeinput",null,o,re),ce.push({event:De,listeners:et}),De.data=Ge)),Hx(ce,e,X,o,re)}Am(ce,t)})}function xl(e,t,o){return{instance:e,listener:t,currentTarget:o}}function Fr(e,t){for(var o=t+"Capture",a=[];e!==null;){var s=e,c=s.stateNode;if(s=s.tag,s!==5&&s!==26&&s!==27||c===null||(s=Ya(e,o),s!=null&&a.unshift(xl(e,s,c)),s=Ya(e,t),s!=null&&a.push(xl(e,s,c))),e.tag===3)return a;e=e.return}return[]}function Ix(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Dm(e,t,o,a,s){for(var c=t._reactName,g=[];o!==null&&o!==a;){var x=o,_=x.alternate,X=x.stateNode;if(x=x.tag,_!==null&&_===a)break;x!==5&&x!==26&&x!==27||X===null||(_=X,s?(X=Ya(o,c),X!=null&&g.unshift(xl(o,X,_))):s||(X=Ya(o,c),X!=null&&g.push(xl(o,X,_)))),o=o.return}g.length!==0&&e.push({event:t,listeners:g})}var Px=/\r\n?/g,Yx=/\u0000|\uFFFD/g;function Nm(e){return(typeof e=="string"?e:""+e).replace(Px,`
9
- `).replace(Yx,"")}function zm(e,t){return t=Nm(t),Nm(e)===t}function ut(e,t,o,a,s,c){switch(o){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||Zi(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&Zi(e,""+a);break;case"className":Wl(e,"class",a);break;case"tabIndex":Wl(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":Wl(e,o,a);break;case"style":zp(e,a,c);break;case"data":if(t!=="object"){Wl(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||o!=="href")){e.removeAttribute(o);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(o);break}a=$l(""+a),e.setAttribute(o,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(o,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof c=="function"&&(o==="formAction"?(t!=="input"&&ut(e,t,"name",s.name,s,null),ut(e,t,"formEncType",s.formEncType,s,null),ut(e,t,"formMethod",s.formMethod,s,null),ut(e,t,"formTarget",s.formTarget,s,null)):(ut(e,t,"encType",s.encType,s,null),ut(e,t,"method",s.method,s,null),ut(e,t,"target",s.target,s,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(o);break}a=$l(""+a),e.setAttribute(o,a);break;case"onClick":a!=null&&(e.onclick=oo);break;case"onScroll":a!=null&&We("scroll",e);break;case"onScrollEnd":a!=null&&We("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(r(61));if(o=a.__html,o!=null){if(s.children!=null)throw Error(r(60));e.innerHTML=o}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}o=$l(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(o,""+a):e.removeAttribute(o);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(o,""):e.removeAttribute(o);break;case"capture":case"download":a===!0?e.setAttribute(o,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(o,a):e.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(o,a):e.removeAttribute(o);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(o):e.setAttribute(o,a);break;case"popover":We("beforetoggle",e),We("toggle",e),Zl(e,"popover",a);break;case"xlinkActuate":no(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":no(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":no(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":no(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":no(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":no(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":no(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":no(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":no(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":Zl(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(o=mS.get(o)||o,Zl(e,o,a))}}function Wc(e,t,o,a,s,c){switch(o){case"style":zp(e,a,c);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(r(61));if(o=a.__html,o!=null){if(s.children!=null)throw Error(r(60));e.innerHTML=o}}break;case"children":typeof a=="string"?Zi(e,a):(typeof a=="number"||typeof a=="bigint")&&Zi(e,""+a);break;case"onScroll":a!=null&&We("scroll",e);break;case"onScrollEnd":a!=null&&We("scrollend",e);break;case"onClick":a!=null&&(e.onclick=oo);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ep.hasOwnProperty(o))e:{if(o[0]==="o"&&o[1]==="n"&&(s=o.endsWith("Capture"),t=o.slice(2,s?o.length-7:void 0),c=e[on]||null,c=c!=null?c[o]:null,typeof c=="function"&&e.removeEventListener(t,c,s),typeof a=="function")){typeof c!="function"&&c!==null&&(o in e?e[o]=null:e.hasAttribute(o)&&e.removeAttribute(o)),e.addEventListener(t,a,s);break e}o in e?e[o]=a:a===!0?e.setAttribute(o,""):Zl(e,o,a)}}}function Ft(e,t,o){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":We("error",e),We("load",e);var a=!1,s=!1,c;for(c in o)if(o.hasOwnProperty(c)){var g=o[c];if(g!=null)switch(c){case"src":a=!0;break;case"srcSet":s=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:ut(e,t,c,g,o,null)}}s&&ut(e,t,"srcSet",o.srcSet,o,null),a&&ut(e,t,"src",o.src,o,null);return;case"input":We("invalid",e);var x=c=g=s=null,_=null,X=null;for(a in o)if(o.hasOwnProperty(a)){var re=o[a];if(re!=null)switch(a){case"name":s=re;break;case"type":g=re;break;case"checked":_=re;break;case"defaultChecked":X=re;break;case"value":c=re;break;case"defaultValue":x=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(r(137,t));break;default:ut(e,t,a,re,o,null)}}Ap(e,c,x,_,X,g,s,!1);return;case"select":We("invalid",e),a=g=c=null;for(s in o)if(o.hasOwnProperty(s)&&(x=o[s],x!=null))switch(s){case"value":c=x;break;case"defaultValue":g=x;break;case"multiple":a=x;default:ut(e,t,s,x,o,null)}t=c,o=g,e.multiple=!!a,t!=null?Qi(e,!!a,t,!1):o!=null&&Qi(e,!!a,o,!0);return;case"textarea":We("invalid",e),c=s=a=null;for(g in o)if(o.hasOwnProperty(g)&&(x=o[g],x!=null))switch(g){case"value":a=x;break;case"defaultValue":s=x;break;case"children":c=x;break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(r(91));break;default:ut(e,t,g,x,o,null)}Dp(e,a,s,c);return;case"option":for(_ in o)o.hasOwnProperty(_)&&(a=o[_],a!=null)&&(_==="selected"?e.selected=a&&typeof a!="function"&&typeof a!="symbol":ut(e,t,_,a,o,null));return;case"dialog":We("beforetoggle",e),We("toggle",e),We("cancel",e),We("close",e);break;case"iframe":case"object":We("load",e);break;case"video":case"audio":for(a=0;a<Sl.length;a++)We(Sl[a],e);break;case"image":We("error",e),We("load",e);break;case"details":We("toggle",e);break;case"embed":case"source":case"link":We("error",e),We("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(X in o)if(o.hasOwnProperty(X)&&(a=o[X],a!=null))switch(X){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:ut(e,t,X,a,o,null)}return;default:if(fu(t)){for(re in o)o.hasOwnProperty(re)&&(a=o[re],a!==void 0&&Wc(e,t,re,a,o,void 0));return}}for(x in o)o.hasOwnProperty(x)&&(a=o[x],a!=null&&ut(e,t,x,a,o,null))}function qx(e,t,o,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var s=null,c=null,g=null,x=null,_=null,X=null,re=null;for(te in o){var ce=o[te];if(o.hasOwnProperty(te)&&ce!=null)switch(te){case"checked":break;case"value":break;case"defaultValue":_=ce;default:a.hasOwnProperty(te)||ut(e,t,te,null,a,ce)}}for(var Z in a){var te=a[Z];if(ce=o[Z],a.hasOwnProperty(Z)&&(te!=null||ce!=null))switch(Z){case"type":c=te;break;case"name":s=te;break;case"checked":X=te;break;case"defaultChecked":re=te;break;case"value":g=te;break;case"defaultValue":x=te;break;case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(r(137,t));break;default:te!==ce&&ut(e,t,Z,te,a,ce)}}uu(e,g,x,_,X,re,c,s);return;case"select":te=g=x=Z=null;for(c in o)if(_=o[c],o.hasOwnProperty(c)&&_!=null)switch(c){case"value":break;case"multiple":te=_;default:a.hasOwnProperty(c)||ut(e,t,c,null,a,_)}for(s in a)if(c=a[s],_=o[s],a.hasOwnProperty(s)&&(c!=null||_!=null))switch(s){case"value":Z=c;break;case"defaultValue":x=c;break;case"multiple":g=c;default:c!==_&&ut(e,t,s,c,a,_)}t=x,o=g,a=te,Z!=null?Qi(e,!!o,Z,!1):!!a!=!!o&&(t!=null?Qi(e,!!o,t,!0):Qi(e,!!o,o?[]:"",!1));return;case"textarea":te=Z=null;for(x in o)if(s=o[x],o.hasOwnProperty(x)&&s!=null&&!a.hasOwnProperty(x))switch(x){case"value":break;case"children":break;default:ut(e,t,x,null,a,s)}for(g in a)if(s=a[g],c=o[g],a.hasOwnProperty(g)&&(s!=null||c!=null))switch(g){case"value":Z=s;break;case"defaultValue":te=s;break;case"children":break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(r(91));break;default:s!==c&&ut(e,t,g,s,a,c)}Mp(e,Z,te);return;case"option":for(var Ce in o)Z=o[Ce],o.hasOwnProperty(Ce)&&Z!=null&&!a.hasOwnProperty(Ce)&&(Ce==="selected"?e.selected=!1:ut(e,t,Ce,null,a,Z));for(_ in a)Z=a[_],te=o[_],a.hasOwnProperty(_)&&Z!==te&&(Z!=null||te!=null)&&(_==="selected"?e.selected=Z&&typeof Z!="function"&&typeof Z!="symbol":ut(e,t,_,Z,a,te));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var He in o)Z=o[He],o.hasOwnProperty(He)&&Z!=null&&!a.hasOwnProperty(He)&&ut(e,t,He,null,a,Z);for(X in a)if(Z=a[X],te=o[X],a.hasOwnProperty(X)&&Z!==te&&(Z!=null||te!=null))switch(X){case"children":case"dangerouslySetInnerHTML":if(Z!=null)throw Error(r(137,t));break;default:ut(e,t,X,Z,a,te)}return;default:if(fu(t)){for(var ct in o)Z=o[ct],o.hasOwnProperty(ct)&&Z!==void 0&&!a.hasOwnProperty(ct)&&Wc(e,t,ct,void 0,a,Z);for(re in a)Z=a[re],te=o[re],!a.hasOwnProperty(re)||Z===te||Z===void 0&&te===void 0||Wc(e,t,re,Z,a,te);return}}for(var Y in o)Z=o[Y],o.hasOwnProperty(Y)&&Z!=null&&!a.hasOwnProperty(Y)&&ut(e,t,Y,null,a,Z);for(ce in a)Z=a[ce],te=o[ce],!a.hasOwnProperty(ce)||Z===te||Z==null&&te==null||ut(e,t,ce,Z,a,te)}function _m(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Vx(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,o=performance.getEntriesByType("resource"),a=0;a<o.length;a++){var s=o[a],c=s.transferSize,g=s.initiatorType,x=s.duration;if(c&&x&&_m(g)){for(g=0,x=s.responseEnd,a+=1;a<o.length;a++){var _=o[a],X=_.startTime;if(X>x)break;var re=_.transferSize,ce=_.initiatorType;re&&_m(ce)&&(_=_.responseEnd,g+=re*(_<x?1:(x-X)/(_-X)))}if(--a,t+=8*(c+g)/(s.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Jc=null,$c=null;function Kr(e){return e.nodeType===9?e:e.ownerDocument}function km(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function jm(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function ef(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var tf=null;function Gx(){var e=window.event;return e&&e.type==="popstate"?e===tf?!1:(tf=e,!0):(tf=null,!1)}var Hm=typeof setTimeout=="function"?setTimeout:void 0,Xx=typeof clearTimeout=="function"?clearTimeout:void 0,Lm=typeof Promise=="function"?Promise:void 0,Fx=typeof queueMicrotask=="function"?queueMicrotask:typeof Lm<"u"?function(e){return Lm.resolve(null).then(e).catch(Kx)}:Hm;function Kx(e){setTimeout(function(){throw e})}function ni(e){return e==="head"}function Um(e,t){var o=t,a=0;do{var s=o.nextSibling;if(e.removeChild(o),s&&s.nodeType===8)if(o=s.data,o==="/$"||o==="/&"){if(a===0){e.removeChild(s),Oa(t);return}a--}else if(o==="$"||o==="$?"||o==="$~"||o==="$!"||o==="&")a++;else if(o==="html")Tl(e.ownerDocument.documentElement);else if(o==="head"){o=e.ownerDocument.head,Tl(o);for(var c=o.firstChild;c;){var g=c.nextSibling,x=c.nodeName;c[Ia]||x==="SCRIPT"||x==="STYLE"||x==="LINK"&&c.rel.toLowerCase()==="stylesheet"||o.removeChild(c),c=g}}else o==="body"&&Tl(e.ownerDocument.body);o=s}while(o);Oa(t)}function Bm(e,t){var o=e;e=0;do{var a=o.nextSibling;if(o.nodeType===1?t?(o._stashedDisplay=o.style.display,o.style.display="none"):(o.style.display=o._stashedDisplay||"",o.getAttribute("style")===""&&o.removeAttribute("style")):o.nodeType===3&&(t?(o._stashedText=o.nodeValue,o.nodeValue=""):o.nodeValue=o._stashedText||""),a&&a.nodeType===8)if(o=a.data,o==="/$"){if(e===0)break;e--}else o!=="$"&&o!=="$?"&&o!=="$~"&&o!=="$!"||e++;o=a}while(o)}function nf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var o=t;switch(t=t.nextSibling,o.nodeName){case"HTML":case"HEAD":case"BODY":nf(o),ru(o);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(o.rel.toLowerCase()==="stylesheet")continue}e.removeChild(o)}}function Qx(e,t,o,a){for(;e.nodeType===1;){var s=o;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[Ia])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(c=e.getAttribute("rel"),c==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(c!==s.rel||e.getAttribute("href")!==(s.href==null||s.href===""?null:s.href)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin)||e.getAttribute("title")!==(s.title==null?null:s.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(c=e.getAttribute("src"),(c!==(s.src==null?null:s.src)||e.getAttribute("type")!==(s.type==null?null:s.type)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin))&&c&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var c=s.name==null?null:""+s.name;if(s.type==="hidden"&&e.getAttribute("name")===c)return e}else return e;if(e=_n(e.nextSibling),e===null)break}return null}function Zx(e,t,o){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!o||(e=_n(e.nextSibling),e===null))return null;return e}function Im(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=_n(e.nextSibling),e===null))return null;return e}function of(e){return e.data==="$?"||e.data==="$~"}function af(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Wx(e,t){var o=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||o.readyState!=="loading")t();else{var a=function(){t(),o.removeEventListener("DOMContentLoaded",a)};o.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function _n(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var lf=null;function Pm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var o=e.data;if(o==="/$"||o==="/&"){if(t===0)return _n(e.nextSibling);t--}else o!=="$"&&o!=="$!"&&o!=="$?"&&o!=="$~"&&o!=="&"||t++}e=e.nextSibling}return null}function Ym(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var o=e.data;if(o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"){if(t===0)return e;t--}else o!=="/$"&&o!=="/&"||t++}e=e.previousSibling}return null}function qm(e,t,o){switch(t=Kr(o),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function Tl(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ru(e)}var kn=new Map,Vm=new Set;function Qr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var So=q.d;q.d={f:Jx,r:$x,D:eT,C:tT,L:nT,m:oT,X:aT,S:iT,M:lT};function Jx(){var e=So.f(),t=Ir();return e||t}function $x(e){var t=Xi(e);t!==null&&t.tag===5&&t.type==="form"?rg(t):So.r(e)}var wa=typeof document>"u"?null:document;function Gm(e,t,o){var a=wa;if(a&&typeof t=="string"&&t){var s=Cn(t);s='link[rel="'+e+'"][href="'+s+'"]',typeof o=="string"&&(s+='[crossorigin="'+o+'"]'),Vm.has(s)||(Vm.add(s),e={rel:e,crossOrigin:o,href:t},a.querySelector(s)===null&&(t=a.createElement("link"),Ft(t,"link",e),Bt(t),a.head.appendChild(t)))}}function eT(e){So.D(e),Gm("dns-prefetch",e,null)}function tT(e,t){So.C(e,t),Gm("preconnect",e,t)}function nT(e,t,o){So.L(e,t,o);var a=wa;if(a&&e&&t){var s='link[rel="preload"][as="'+Cn(t)+'"]';t==="image"&&o&&o.imageSrcSet?(s+='[imagesrcset="'+Cn(o.imageSrcSet)+'"]',typeof o.imageSizes=="string"&&(s+='[imagesizes="'+Cn(o.imageSizes)+'"]')):s+='[href="'+Cn(e)+'"]';var c=s;switch(t){case"style":c=Ra(e);break;case"script":c=Ca(e)}kn.has(c)||(e=v({rel:"preload",href:t==="image"&&o&&o.imageSrcSet?void 0:e,as:t},o),kn.set(c,e),a.querySelector(s)!==null||t==="style"&&a.querySelector(El(c))||t==="script"&&a.querySelector(wl(c))||(t=a.createElement("link"),Ft(t,"link",e),Bt(t),a.head.appendChild(t)))}}function oT(e,t){So.m(e,t);var o=wa;if(o&&e){var a=t&&typeof t.as=="string"?t.as:"script",s='link[rel="modulepreload"][as="'+Cn(a)+'"][href="'+Cn(e)+'"]',c=s;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=Ca(e)}if(!kn.has(c)&&(e=v({rel:"modulepreload",href:e},t),kn.set(c,e),o.querySelector(s)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(o.querySelector(wl(c)))return}a=o.createElement("link"),Ft(a,"link",e),Bt(a),o.head.appendChild(a)}}}function iT(e,t,o){So.S(e,t,o);var a=wa;if(a&&e){var s=Fi(a).hoistableStyles,c=Ra(e);t=t||"default";var g=s.get(c);if(!g){var x={loading:0,preload:null};if(g=a.querySelector(El(c)))x.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":t},o),(o=kn.get(c))&&rf(e,o);var _=g=a.createElement("link");Bt(_),Ft(_,"link",e),_._p=new Promise(function(X,re){_.onload=X,_.onerror=re}),_.addEventListener("load",function(){x.loading|=1}),_.addEventListener("error",function(){x.loading|=2}),x.loading|=4,Zr(g,t,a)}g={type:"stylesheet",instance:g,count:1,state:x},s.set(c,g)}}}function aT(e,t){So.X(e,t);var o=wa;if(o&&e){var a=Fi(o).hoistableScripts,s=Ca(e),c=a.get(s);c||(c=o.querySelector(wl(s)),c||(e=v({src:e,async:!0},t),(t=kn.get(s))&&sf(e,t),c=o.createElement("script"),Bt(c),Ft(c,"link",e),o.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},a.set(s,c))}}function lT(e,t){So.M(e,t);var o=wa;if(o&&e){var a=Fi(o).hoistableScripts,s=Ca(e),c=a.get(s);c||(c=o.querySelector(wl(s)),c||(e=v({src:e,async:!0,type:"module"},t),(t=kn.get(s))&&sf(e,t),c=o.createElement("script"),Bt(c),Ft(c,"link",e),o.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},a.set(s,c))}}function Xm(e,t,o,a){var s=(s=ae.current)?Qr(s):null;if(!s)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof o.precedence=="string"&&typeof o.href=="string"?(t=Ra(o.href),o=Fi(s).hoistableStyles,a=o.get(t),a||(a={type:"style",instance:null,count:0,state:null},o.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(o.rel==="stylesheet"&&typeof o.href=="string"&&typeof o.precedence=="string"){e=Ra(o.href);var c=Fi(s).hoistableStyles,g=c.get(e);if(g||(s=s.ownerDocument||s,g={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,g),(c=s.querySelector(El(e)))&&!c._p&&(g.instance=c,g.state.loading=5),kn.has(e)||(o={rel:"preload",as:"style",href:o.href,crossOrigin:o.crossOrigin,integrity:o.integrity,media:o.media,hrefLang:o.hrefLang,referrerPolicy:o.referrerPolicy},kn.set(e,o),c||rT(s,e,o,g.state))),t&&a===null)throw Error(r(528,""));return g}if(t&&a!==null)throw Error(r(529,""));return null;case"script":return t=o.async,o=o.src,typeof o=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ca(o),o=Fi(s).hoistableScripts,a=o.get(t),a||(a={type:"script",instance:null,count:0,state:null},o.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Ra(e){return'href="'+Cn(e)+'"'}function El(e){return'link[rel="stylesheet"]['+e+"]"}function Fm(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function rT(e,t,o,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),Ft(t,"link",o),Bt(t),e.head.appendChild(t))}function Ca(e){return'[src="'+Cn(e)+'"]'}function wl(e){return"script[async]"+e}function Km(e,t,o){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+Cn(o.href)+'"]');if(a)return t.instance=a,Bt(a),a;var s=v({},o,{"data-href":o.href,"data-precedence":o.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),Bt(a),Ft(a,"style",s),Zr(a,o.precedence,e),t.instance=a;case"stylesheet":s=Ra(o.href);var c=e.querySelector(El(s));if(c)return t.state.loading|=4,t.instance=c,Bt(c),c;a=Fm(o),(s=kn.get(s))&&rf(a,s),c=(e.ownerDocument||e).createElement("link"),Bt(c);var g=c;return g._p=new Promise(function(x,_){g.onload=x,g.onerror=_}),Ft(c,"link",a),t.state.loading|=4,Zr(c,o.precedence,e),t.instance=c;case"script":return c=Ca(o.src),(s=e.querySelector(wl(c)))?(t.instance=s,Bt(s),s):(a=o,(s=kn.get(c))&&(a=v({},o),sf(a,s)),e=e.ownerDocument||e,s=e.createElement("script"),Bt(s),Ft(s,"link",a),e.head.appendChild(s),t.instance=s);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,Zr(a,o.precedence,e));return t.instance}function Zr(e,t,o){for(var a=o.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),s=a.length?a[a.length-1]:null,c=s,g=0;g<a.length;g++){var x=a[g];if(x.dataset.precedence===t)c=x;else if(c!==s)break}c?c.parentNode.insertBefore(e,c.nextSibling):(t=o.nodeType===9?o.head:o,t.insertBefore(e,t.firstChild))}function rf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function sf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Wr=null;function Qm(e,t,o){if(Wr===null){var a=new Map,s=Wr=new Map;s.set(o,a)}else s=Wr,a=s.get(o),a||(a=new Map,s.set(o,a));if(a.has(e))return a;for(a.set(e,null),o=o.getElementsByTagName(e),s=0;s<o.length;s++){var c=o[s];if(!(c[Ia]||c[qt]||e==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var g=c.getAttribute(t)||"";g=e+g;var x=a.get(g);x?x.push(c):a.set(g,[c])}}return a}function Zm(e,t,o){e=e.ownerDocument||e,e.head.insertBefore(o,t==="title"?e.querySelector("head > title"):null)}function sT(e,t,o){if(o===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Wm(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function uT(e,t,o,a){if(o.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(o.state.loading&4)===0){if(o.instance===null){var s=Ra(a.href),c=t.querySelector(El(s));if(c){t=c._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Jr.bind(e),t.then(e,e)),o.state.loading|=4,o.instance=c,Bt(c);return}c=t.ownerDocument||t,a=Fm(a),(s=kn.get(s))&&rf(a,s),c=c.createElement("link"),Bt(c);var g=c;g._p=new Promise(function(x,_){g.onload=x,g.onerror=_}),Ft(c,"link",a),o.instance=c}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(o,t),(t=o.state.preload)&&(o.state.loading&3)===0&&(e.count++,o=Jr.bind(e),t.addEventListener("load",o),t.addEventListener("error",o))}}var uf=0;function cT(e,t){return e.stylesheets&&e.count===0&&es(e,e.stylesheets),0<e.count||0<e.imgCount?function(o){var a=setTimeout(function(){if(e.stylesheets&&es(e,e.stylesheets),e.unsuspend){var c=e.unsuspend;e.unsuspend=null,c()}},6e4+t);0<e.imgBytes&&uf===0&&(uf=62500*Vx());var s=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&es(e,e.stylesheets),e.unsuspend)){var c=e.unsuspend;e.unsuspend=null,c()}},(e.imgBytes>uf?50:800)+t);return e.unsuspend=o,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(s)}}:null}function Jr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)es(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var $r=null;function es(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,$r=new Map,t.forEach(fT,e),$r=null,Jr.call(e))}function fT(e,t){if(!(t.state.loading&4)){var o=$r.get(e);if(o)var a=o.get(null);else{o=new Map,$r.set(e,o);for(var s=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<s.length;c++){var g=s[c];(g.nodeName==="LINK"||g.getAttribute("media")!=="not all")&&(o.set(g.dataset.precedence,g),a=g)}a&&o.set(null,a)}s=t.instance,g=s.getAttribute("data-precedence"),c=o.get(g)||a,c===a&&o.set(null,s),o.set(g,s),this.count++,a=Jr.bind(this),s.addEventListener("load",a),s.addEventListener("error",a),c?c.parentNode.insertBefore(s,c.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(s,e.firstChild)),t.state.loading|=4}}var Rl={$$typeof:M,Provider:null,Consumer:null,_currentValue:P,_currentValue2:P,_threadCount:0};function dT(e,t,o,a,s,c,g,x,_){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ko(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ko(0),this.hiddenUpdates=ko(null),this.identifierPrefix=a,this.onUncaughtError=s,this.onCaughtError=c,this.onRecoverableError=g,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=_,this.incompleteTransitions=new Map}function Jm(e,t,o,a,s,c,g,x,_,X,re,ce){return e=new dT(e,t,o,g,_,X,re,ce,x),t=1,c===!0&&(t|=24),c=pn(3,null,null,t),e.current=c,c.stateNode=e,t=Pu(),t.refCount++,e.pooledCache=t,t.refCount++,c.memoizedState={element:a,isDehydrated:o,cache:t},Gu(c),e}function $m(e){return e?(e=oa,e):oa}function ey(e,t,o,a,s,c){s=$m(s),a.context===null?a.context=s:a.pendingContext=s,a=Go(t),a.payload={element:o},c=c===void 0?null:c,c!==null&&(a.callback=c),o=Xo(e,a,t),o!==null&&(cn(o,e,t),ol(o,e,t))}function ty(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var o=e.retryLane;e.retryLane=o!==0&&o<t?o:t}}function cf(e,t){ty(e,t),(e=e.alternate)&&ty(e,t)}function ny(e){if(e.tag===13||e.tag===31){var t=Si(e,67108864);t!==null&&cn(t,e,67108864),cf(e,67108864)}}function oy(e){if(e.tag===13||e.tag===31){var t=bn();t=Lo(t);var o=Si(e,t);o!==null&&cn(o,e,t),cf(e,t)}}var ts=!0;function pT(e,t,o,a){var s=z.T;z.T=null;var c=q.p;try{q.p=2,ff(e,t,o,a)}finally{q.p=c,z.T=s}}function hT(e,t,o,a){var s=z.T;z.T=null;var c=q.p;try{q.p=8,ff(e,t,o,a)}finally{q.p=c,z.T=s}}function ff(e,t,o,a){if(ts){var s=df(a);if(s===null)Zc(e,t,a,ns,o),ay(e,a);else if(mT(s,e,t,o,a))a.stopPropagation();else if(ay(e,a),t&4&&-1<gT.indexOf(e)){for(;s!==null;){var c=Xi(s);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var g=xt(c.pendingLanes);if(g!==0){var x=c;for(x.pendingLanes|=2,x.entangledLanes|=2;g;){var _=1<<31-pt(g);x.entanglements[1]|=_,g&=~_}Jn(c),(at&6)===0&&(Ur=fe()+500,vl(0))}}break;case 31:case 13:x=Si(c,2),x!==null&&cn(x,c,2),Ir(),cf(c,2)}if(c=df(a),c===null&&Zc(e,t,a,ns,o),c===s)break;s=c}s!==null&&a.stopPropagation()}else Zc(e,t,a,null,o)}}function df(e){return e=pu(e),pf(e)}var ns=null;function pf(e){if(ns=null,e=Gi(e),e!==null){var t=f(e);if(t===null)e=null;else{var o=t.tag;if(o===13){if(e=d(t),e!==null)return e;e=null}else if(o===31){if(e=m(t),e!==null)return e;e=null}else if(o===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return ns=e,null}function iy(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ye()){case de:return 2;case le:return 8;case be:case Be:return 32;case Ut:return 268435456;default:return 32}default:return 32}}var hf=!1,oi=null,ii=null,ai=null,Cl=new Map,Ol=new Map,li=[],gT="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function ay(e,t){switch(e){case"focusin":case"focusout":oi=null;break;case"dragenter":case"dragleave":ii=null;break;case"mouseover":case"mouseout":ai=null;break;case"pointerover":case"pointerout":Cl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ol.delete(t.pointerId)}}function Al(e,t,o,a,s,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:o,eventSystemFlags:a,nativeEvent:c,targetContainers:[s]},t!==null&&(t=Xi(t),t!==null&&ny(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function mT(e,t,o,a,s){switch(t){case"focusin":return oi=Al(oi,e,t,o,a,s),!0;case"dragenter":return ii=Al(ii,e,t,o,a,s),!0;case"mouseover":return ai=Al(ai,e,t,o,a,s),!0;case"pointerover":var c=s.pointerId;return Cl.set(c,Al(Cl.get(c)||null,e,t,o,a,s)),!0;case"gotpointercapture":return c=s.pointerId,Ol.set(c,Al(Ol.get(c)||null,e,t,o,a,s)),!0}return!1}function ly(e){var t=Gi(e.target);if(t!==null){var o=f(t);if(o!==null){if(t=o.tag,t===13){if(t=d(o),t!==null){e.blockedOn=t,Ql(e.priority,function(){oy(o)});return}}else if(t===31){if(t=m(o),t!==null){e.blockedOn=t,Ql(e.priority,function(){oy(o)});return}}else if(t===3&&o.stateNode.current.memoizedState.isDehydrated){e.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}e.blockedOn=null}function os(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var o=df(e.nativeEvent);if(o===null){o=e.nativeEvent;var a=new o.constructor(o.type,o);du=a,o.target.dispatchEvent(a),du=null}else return t=Xi(o),t!==null&&ny(t),e.blockedOn=o,!1;t.shift()}return!0}function ry(e,t,o){os(e)&&o.delete(t)}function yT(){hf=!1,oi!==null&&os(oi)&&(oi=null),ii!==null&&os(ii)&&(ii=null),ai!==null&&os(ai)&&(ai=null),Cl.forEach(ry),Ol.forEach(ry)}function is(e,t){e.blockedOn===t&&(e.blockedOn=null,hf||(hf=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,yT)))}var as=null;function sy(e){as!==e&&(as=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){as===e&&(as=null);for(var t=0;t<e.length;t+=3){var o=e[t],a=e[t+1],s=e[t+2];if(typeof a!="function"){if(pf(a||o)===null)continue;break}var c=Xi(o);c!==null&&(e.splice(t,3),t-=3,fc(c,{pending:!0,data:s,method:o.method,action:a},a,s))}}))}function Oa(e){function t(_){return is(_,e)}oi!==null&&is(oi,e),ii!==null&&is(ii,e),ai!==null&&is(ai,e),Cl.forEach(t),Ol.forEach(t);for(var o=0;o<li.length;o++){var a=li[o];a.blockedOn===e&&(a.blockedOn=null)}for(;0<li.length&&(o=li[0],o.blockedOn===null);)ly(o),o.blockedOn===null&&li.shift();if(o=(e.ownerDocument||e).$$reactFormReplay,o!=null)for(a=0;a<o.length;a+=3){var s=o[a],c=o[a+1],g=s[on]||null;if(typeof c=="function")g||sy(o);else if(g){var x=null;if(c&&c.hasAttribute("formAction")){if(s=c,g=c[on]||null)x=g.formAction;else if(pf(s)!==null)continue}else x=g.action;typeof x=="function"?o[a+1]=x:(o.splice(a,3),a-=3),sy(o)}}}function uy(){function e(c){c.canIntercept&&c.info==="react-transition"&&c.intercept({handler:function(){return new Promise(function(g){return s=g})},focusReset:"manual",scroll:"manual"})}function t(){s!==null&&(s(),s=null),a||setTimeout(o,20)}function o(){if(!a&&!navigation.transition){var c=navigation.currentEntry;c&&c.url!=null&&navigation.navigate(c.url,{state:c.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,s=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(o,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),s!==null&&(s(),s=null)}}}function gf(e){this._internalRoot=e}ls.prototype.render=gf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var o=t.current,a=bn();ey(o,a,e,t,null,null)},ls.prototype.unmount=gf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ey(e.current,2,null,e,null,null),Ir(),t[Vi]=null}};function ls(e){this._internalRoot=e}ls.prototype.unstable_scheduleHydration=function(e){if(e){var t=Kl();e={blockedOn:null,target:e,priority:t};for(var o=0;o<li.length&&t!==0&&t<li[o].priority;o++);li.splice(o,0,e),o===0&&ly(e)}};var cy=i.version;if(cy!=="19.2.4")throw Error(r(527,cy,"19.2.4"));q.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=p(t),e=e!==null?y(e):null,e=e===null?null:e.stateNode,e};var bT={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:z,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var rs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!rs.isDisabled&&rs.supportsFiber)try{xe=rs.inject(bT),Ye=rs}catch{}}return Dl.createRoot=function(e,t){if(!u(e))throw Error(r(299));var o=!1,a="",s=yg,c=bg,g=vg;return t!=null&&(t.unstable_strictMode===!0&&(o=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(s=t.onUncaughtError),t.onCaughtError!==void 0&&(c=t.onCaughtError),t.onRecoverableError!==void 0&&(g=t.onRecoverableError)),t=Jm(e,1,!1,null,null,o,a,null,s,c,g,uy),e[Vi]=t.current,Qc(e),new gf(t)},Dl.hydrateRoot=function(e,t,o){if(!u(e))throw Error(r(299));var a=!1,s="",c=yg,g=bg,x=vg,_=null;return o!=null&&(o.unstable_strictMode===!0&&(a=!0),o.identifierPrefix!==void 0&&(s=o.identifierPrefix),o.onUncaughtError!==void 0&&(c=o.onUncaughtError),o.onCaughtError!==void 0&&(g=o.onCaughtError),o.onRecoverableError!==void 0&&(x=o.onRecoverableError),o.formState!==void 0&&(_=o.formState)),t=Jm(e,1,!0,t,o??null,a,s,_,c,g,x,uy),t.context=$m(null),o=t.current,a=bn(),a=Lo(a),s=Go(a),s.callback=null,Xo(o,s,a),o=a,t.current.lanes=o,wn(t,o),Jn(t),e[Vi]=t.current,Qc(e),new ls(t)},Dl.version="19.2.4",Dl}var Sy;function DT(){if(Sy)return bf.exports;Sy=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(i){console.error(i)}}return n(),bf.exports=MT(),bf.exports}var NT=DT();function Hb(n){var i,l,r="";if(typeof n=="string"||typeof n=="number")r+=n;else if(typeof n=="object")if(Array.isArray(n)){var u=n.length;for(i=0;i<u;i++)n[i]&&(l=Hb(n[i]))&&(r&&(r+=" "),r+=l)}else for(l in n)n[l]&&(r&&(r+=" "),r+=l);return r}function zT(){for(var n,i,l=0,r="",u=arguments.length;l<u;l++)(n=arguments[l])&&(i=Hb(n))&&(r&&(r+=" "),r+=i);return r}function zo(...n){return zT(n)}const xy={};function Jt(n,i){const l=b.useRef(xy);return l.current===xy&&(l.current=n(i)),l}const Gf=[];let Xf;function _T(){return Xf}function kT(n){Gf.push(n)}function js(n){const i=(l,r)=>{const u=Jt(jT).current;let f;try{Xf=u;for(const d of Gf)d.before(u);f=n(l,r);for(const d of Gf)d.after(u);u.didInitialize=!0}finally{Xf=void 0}return f};return i.displayName=n.displayName||n.name,i}function Lb(n){return b.forwardRef(js(n))}function jT(){return{didInitialize:!1}}function vd(){}const Mo=Object.freeze([]),Rt=Object.freeze({}),HT=()=>{},Se=typeof document<"u"?b.useLayoutEffect:HT;function LT(n,i){return function(r,...u){const f=new URL(n);return f.searchParams.set("code",r.toString()),u.forEach(d=>f.searchParams.append("args[]",d)),`${i} error #${r}; visit ${f} for the full message.`}}const Zt=LT("https://base-ui.com/production-error","Base UI"),Ub=b.createContext(void 0);function Hs(n){const i=b.useContext(Ub);if(i===void 0&&!n)throw new Error(Zt(72));return i}function Ls(n){b.useEffect(n,Mo)}const Nl=0;class vn{static create(){return new vn}currentId=Nl;start(i,l){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Nl,l()},i)}isStarted(){return this.currentId!==Nl}clear=()=>{this.currentId!==Nl&&(clearTimeout(this.currentId),this.currentId=Nl)};disposeEffect=()=>this.clear}function $t(){const n=Jt(vn.create).current;return Ls(n.disposeEffect),n}function UT(){return typeof navigator>"u"?{userAgent:"",platform:"",maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0}}const{userAgent:BT,platform:IT,maxTouchPoints:PT}=UT(),Us=BT.toLowerCase(),Bl=IT.toLowerCase(),Bs=/^i(os$|p)/.test(Bl)||Bl==="macintel"&&PT>1,Ty="android",Ff=Bl===Ty||Us.includes(Ty),Sd=!Bs&&Bl.startsWith("mac");Bl.startsWith("win");const YT=Sd||Bs,pi=typeof CSS<"u"&&!!CSS.supports?.("-webkit-backdrop-filter:none");!pi&&Us.includes("firefox");!pi&&Us.includes("chrom");const qT=YT,xd=/jsdom|happydom/.test(Us);function $n(n){n.preventDefault(),n.stopPropagation()}function VT(n){return"nativeEvent"in n}function Td(n){return n.pointerType===""&&n.isTrusted?!0:Ff&&n.pointerType?n.type==="click"&&n.buttons===1:n.detail===0&&!n.pointerType}function Ed(n){return xd?!1:!Ff&&n.width===0&&n.height===0||Ff&&n.width===1&&n.height===1&&n.pressure===0&&n.detail===0&&n.pointerType==="mouse"||n.width<1&&n.height<1&&n.pressure===0&&n.detail===0&&n.pointerType==="touch"}function ui(n,i){const l=["mouse","pen"];return i||l.push("",void 0),l.includes(n)}function GT(n){const i=n.type;return i==="click"||i==="mousedown"||i==="keydown"||i==="keyup"}function Is(){return typeof window<"u"}function Qt(n){return wd(n)?(n.nodeName||"").toLowerCase():"#document"}function yt(n){var i;return(n==null||(i=n.ownerDocument)==null?void 0:i.defaultView)||window}function _o(n){var i;return(i=(wd(n)?n.ownerDocument:n.document)||window.document)==null?void 0:i.documentElement}function wd(n){return Is()?n instanceof Node||n instanceof yt(n).Node:!1}function Je(n){return Is()?n instanceof Element||n instanceof yt(n).Element:!1}function dt(n){return Is()?n instanceof HTMLElement||n instanceof yt(n).HTMLElement:!1}function za(n){return!Is()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof yt(n).ShadowRoot}function Vl(n){const{overflow:i,overflowX:l,overflowY:r,display:u}=Sn(n);return/auto|scroll|overlay|hidden|clip/.test(i+r+l)&&u!=="inline"&&u!=="contents"}function XT(n){return/^(table|td|th)$/.test(Qt(n))}function Ps(n){try{if(n.matches(":popover-open"))return!0}catch{}try{return n.matches(":modal")}catch{return!1}}const FT=/transform|translate|scale|rotate|perspective|filter/,KT=/paint|layout|strict|content/,_i=n=>!!n&&n!=="none";let Tf;function Rd(n){const i=Je(n)?Sn(n):n;return _i(i.transform)||_i(i.translate)||_i(i.scale)||_i(i.rotate)||_i(i.perspective)||!Cd()&&(_i(i.backdropFilter)||_i(i.filter))||FT.test(i.willChange||"")||KT.test(i.contain||"")}function QT(n){let i=Do(n);for(;dt(i)&&!Ro(i);){if(Rd(i))return i;if(Ps(i))return null;i=Do(i)}return null}function Cd(){return Tf==null&&(Tf=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Tf}function Ro(n){return/^(html|body|#document)$/.test(Qt(n))}function Sn(n){return yt(n).getComputedStyle(n)}function Ys(n){return Je(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function Do(n){if(Qt(n)==="html")return n;const i=n.assignedSlot||n.parentNode||za(n)&&n.host||_o(n);return za(i)?i.host:i}function Bb(n){const i=Do(n);return Ro(i)?(n.ownerDocument||n).body:dt(i)&&Vl(i)?i:Bb(i)}function Il(n,i,l){var r;i===void 0&&(i=[]),l===void 0&&(l=!0);const u=Bb(n),f=u===((r=n.ownerDocument)==null?void 0:r.body),d=yt(u);if(f){const m=Kf(d);return i.concat(d,d.visualViewport||[],Vl(u)?u:[],m&&l?Il(m):[])}else return i.concat(u,Il(u,[],l))}function Kf(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function kt(n){let i=n.activeElement;for(;i?.shadowRoot?.activeElement!=null;)i=i.shadowRoot.activeElement;return i}function Ne(n,i){if(!n||!i)return!1;const l=i.getRootNode?.();if(n.contains(i))return!0;if(l&&za(l)){let r=i;for(;r;){if(n===r)return!0;r=r.parentNode||r.host}}return!1}function St(n){return"composedPath"in n?n.composedPath()[0]??n.target:n.target}const Qf="data-base-ui-focusable",Ib="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",qs="ArrowLeft",Vs="ArrowRight",Pb="ArrowUp",Od="ArrowDown",Yb="data-starting-style",ZT="data-ending-style",WT={[Yb]:""},JT={[ZT]:""},Gs={transitionStatus(n){return n==="starting"?WT:n==="ending"?JT:null}},$T="data-open",e1="data-closed",t1="data-anchor-hidden",qb="data-popup-open",n1="data-pressed",o1={[qb]:""},i1={[qb]:"",[n1]:""},a1={[$T]:""},l1={[e1]:""},r1={[t1]:""},s1={open(n){return n?o1:null}},Ey={open(n){return n?i1:null}},Ad={open(n){return n?a1:l1},anchorHidden(n){return n?r1:null}},Md={...Ad,...Gs},Zf="data-trigger-disabled";function Es(n,i){if(!Je(n))return!1;const l=n;if(i.hasElement(l))return!l.hasAttribute(Zf);for(const[,r]of i.entries())if(Ne(r,l))return!r.hasAttribute(Zf);return!1}function Ef(n,i){if(i==null)return!1;if("composedPath"in n)return n.composedPath().includes(i);const l=n;return l.target!=null&&i.contains(l.target)}function u1(n){return n.matches("html,body")}function Xs(n){return dt(n)&&n.matches(Ib)}function c1(n){return n?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${Ib}`)!=null}function Wf(n){return n?n.getAttribute("role")==="combobox"&&Xs(n):!1}function ws(n){if(!n||xd)return!0;try{return n.matches(":focus-visible")}catch{return!0}}function Jf(n){return n?n.hasAttribute(Qf)?n:n.querySelector(`[${Qf}]`)||n:null}function f1(n,i){return i!=null&&!ui(i)?0:typeof n=="function"?n():n}function ji(n,i,l){const r=f1(n,l);return typeof r=="number"?r:r?.[i]}function wy(n){return typeof n=="function"?n():n}function Vb(n,i){return i||n==="click"||n==="mousedown"}function d1(n){return n?.includes("mouse")&&n!=="mousedown"}const Fs="none",ja="trigger-press",Lt="trigger-hover",Aa="trigger-focus",Dd="outside-press",Gb="item-press",p1="close-press",_a="focus-out",Ks="escape-key",$f="list-navigation",h1="cancel-open",jl="sibling-open",Xb="disabled",Ry="missing",Cy="initial",Nd="imperative-action";function Ke(n,i,l,r){let u=!1,f=!1;const d=r??Rt;return{reason:n,event:i??new Event("base-ui"),cancel(){u=!0},allowPropagation(){f=!0},get isCanceled(){return u},get isPropagationAllowed(){return f},trigger:l,...d}}const Fb=b.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new vn,currentIdRef:{current:null},currentContextRef:{current:null}});function g1(n,i){n.current=i.current}function m1(n){const{children:i,delay:l,timeoutMs:r=0}=n,u=b.useRef(l),f=b.useRef(l),d=b.useRef(null),m=b.useRef(null),h=$t();return Se(()=>{if(f.current=l,!d.current){u.current=l;return}u.current={open:ji(u.current,"open"),close:ji(l,"close")}},[l,d,u,f]),E.jsx(Fb.Provider,{value:b.useMemo(()=>({hasProvider:!0,delayRef:u,initialDelayRef:f,currentIdRef:d,timeoutMs:r,currentContextRef:m,timeout:h}),[r,h]),children:i})}function y1(n,i={open:!1}){const{open:l}=i,r="rootStore"in n?n.rootStore:n,u=r.useState("floatingId"),f=b.useContext(Fb),{currentIdRef:d,delayRef:m,timeoutMs:h,initialDelayRef:p,currentContextRef:y,hasProvider:v,timeout:S}=f,[w,T]=b.useState(!1),C=b.useRef(l);return Se(()=>{C.current=l},[l]),Se(()=>{function O(){y.current?.setIsInstantPhase(!1),d.current=null,y.current=null,m.current=p.current,S.clear()}if(d.current&&!l&&d.current===u){if(T(!1),h){const A=u;return S.start(h,()=>{r.select("open")||d.current&&d.current!==A||O()}),()=>{(C.current||d.current!==A)&&S.clear()}}O()}},[l,u,d,m,h,p,y,S,r]),Se(()=>{if(!l)return;const O=y.current,A=d.current;S.clear(),y.current={onOpenChange:r.setOpen,setIsInstantPhase:T},d.current=u,m.current={open:0,close:ji(p.current,"close")},A!==null&&A!==u?(T(!0),O?.setIsInstantPhase(!0),O?.onOpenChange(!1,Ke(Fs))):(T(!1),O?.setIsInstantPhase(!1))},[l,u,r,d,m,p,y,S]),Se(()=>()=>{if(d.current===u){if(y.current=null,!C.current)return;d.current=null,g1(m,p),S.clear()}},[y,d,m,u,p,S]),b.useMemo(()=>({activeIdRef:d,hasProvider:v,delayRef:m,isInstantPhase:w}),[d,v,m,w])}function Pe(n,i,l,r){return n.addEventListener(i,l,r),()=>{n.removeEventListener(i,l,r)}}function Gn(...n){return()=>{for(let i=0;i<n.length;i+=1){const l=n[i];l&&l()}}}function Hi(n,i,l,r){const u=Jt(Kb).current;return v1(u,n,i,l,r)&&Qb(u,[n,i,l,r]),u.callback}function b1(n){const i=Jt(Kb).current;return S1(i,n)&&Qb(i,n),i.callback}function Kb(){return{callback:null,cleanup:null,refs:[]}}function v1(n,i,l,r,u){return n.refs[0]!==i||n.refs[1]!==l||n.refs[2]!==r||n.refs[3]!==u}function S1(n,i){return n.refs.length!==i.length||n.refs.some((l,r)=>l!==i[r])}function Qb(n,i){if(n.refs=i,i.every(l=>l==null)){n.callback=null;return}n.callback=l=>{if(n.cleanup&&(n.cleanup(),n.cleanup=null),l!=null){const r=Array(i.length).fill(null);for(let u=0;u<i.length;u+=1){const f=i[u];if(f!=null)switch(typeof f){case"function":{const d=f(l);typeof d=="function"&&(r[u]=d);break}case"object":{f.current=l;break}}}n.cleanup=()=>{for(let u=0;u<i.length;u+=1){const f=i[u];if(f!=null)switch(typeof f){case"function":{const d=r[u];typeof d=="function"?d():f(null);break}case"object":{f.current=null;break}}}}}}}function jt(n){const i=Jt(x1,n).current;return i.next=n,Se(i.effect),i}function x1(n){const i={current:n,next:n,effect:()=>{i.current=i.next}};return i}const zd={...RT},wf=zd.useInsertionEffect,T1=wf&&wf!==zd.useLayoutEffect?wf:n=>n();function Oe(n){const i=Jt(E1).current;return i.next=n,T1(i.effect),i.trampoline}function E1(){const n={next:void 0,callback:w1,trampoline:(...i)=>n.callback?.(...i),effect:()=>{n.callback=n.next}};return n}function w1(){}const ss=null;class R1{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=i=>{this.isScheduled=!1;const l=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let u=0;u<l.length;u+=1)l[u]?.(i)};request(i){const l=this.nextId;return this.nextId+=1,this.callbacks.push(i),this.callbacksCount+=1,!this.isScheduled&&(requestAnimationFrame(this.tick),this.isScheduled=!0),l}cancel(i){const l=i-this.startId;l<0||l>=this.callbacks.length||this.callbacks[l]!==null&&(this.callbacks[l]=null,this.callbacksCount-=1)}}let us=new R1;class eo{static create(){return new eo}static request(i){return us.request(i)}static cancel(i){return us.cancel(i)}currentId=ss;request(i){this.cancel(),this.currentId=us.request(()=>{this.currentId=ss,i()})}cancel=()=>{this.currentId!==ss&&(us.cancel(this.currentId),this.currentId=ss)};disposeEffect=()=>this.cancel}function Pl(){const n=Jt(eo.create).current;return Ls(n.disposeEffect),n}function Fe(n){return n?.ownerDocument||document}const C1={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},Zb={...C1,position:"fixed",top:0,left:0},Li=b.forwardRef(function(i,l){const[r,u]=b.useState();Se(()=>{qT&&pi&&u("button")},[]);const f={tabIndex:0,role:r};return E.jsx("span",{...i,ref:l,style:Zb,"aria-hidden":r?void 0:!0,...f,"data-base-ui-focus-guard":""})}),ka=Math.min,Co=Math.max,Rs=Math.round,cs=Math.floor,Oo=n=>({x:n,y:n}),O1={left:"right",right:"left",bottom:"top",top:"bottom"};function Wb(n,i,l){return Co(n,ka(i,l))}function fi(n,i){return typeof n=="function"?n(i):n}function Hn(n){return n.split("-")[0]}function No(n){return n.split("-")[1]}function _d(n){return n==="x"?"y":"x"}function kd(n){return n==="y"?"height":"width"}function jn(n){const i=n[0];return i==="t"||i==="b"?"y":"x"}function jd(n){return _d(jn(n))}function A1(n,i,l){l===void 0&&(l=!1);const r=No(n),u=jd(n),f=kd(u);let d=u==="x"?r===(l?"end":"start")?"right":"left":r==="start"?"bottom":"top";return i.reference[f]>i.floating[f]&&(d=Cs(d)),[d,Cs(d)]}function M1(n){const i=Cs(n);return[ed(n),i,ed(i)]}function ed(n){return n.includes("start")?n.replace("start","end"):n.replace("end","start")}const Oy=["left","right"],Ay=["right","left"],D1=["top","bottom"],N1=["bottom","top"];function z1(n,i,l){switch(n){case"top":case"bottom":return l?i?Ay:Oy:i?Oy:Ay;case"left":case"right":return i?D1:N1;default:return[]}}function _1(n,i,l,r){const u=No(n);let f=z1(Hn(n),l==="start",r);return u&&(f=f.map(d=>d+"-"+u),i&&(f=f.concat(f.map(ed)))),f}function Cs(n){const i=Hn(n);return O1[i]+n.slice(i.length)}function k1(n){var i,l,r,u;return{top:(i=n.top)!=null?i:0,right:(l=n.right)!=null?l:0,bottom:(r=n.bottom)!=null?r:0,left:(u=n.left)!=null?u:0}}function Jb(n){return typeof n!="number"?k1(n):{top:n,right:n,bottom:n,left:n}}function Os(n){const{x:i,y:l,width:r,height:u}=n;return{width:r,height:u,top:l,left:i,right:i+r,bottom:l+u,x:i,y:l}}function Ll(n,i){return i<0||i>=n.length}function vs(n,i){return wo(n.current,{disabledIndices:i})}function td(n,i){return wo(n.current,{decrement:!0,startingIndex:n.current.length,disabledIndices:i})}function wo(n,{startingIndex:i=-1,decrement:l=!1,disabledIndices:r,amount:u=1}={}){let f=i;do f+=l?-u:u;while(f>=0&&f<=n.length-1&&Ma(n,f,r));return f}function Ma(n,i,l){if(typeof l=="function"?l(i):l?.includes(i)??!1)return!0;const u=n[i];return u?!Qs(u)||u.matches(":disabled")?!0:!l&&(u.hasAttribute("disabled")||u.getAttribute("aria-disabled")==="true"):!1}function j1(n){return n.visibility==="hidden"||n.visibility==="collapse"}function Qs(n,i=n?Sn(n):null){return!n||!n.isConnected||!i||j1(i)?!1:typeof n.checkVisibility=="function"?n.checkVisibility():i.display!=="none"&&i.display!=="contents"}const H1='a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';function L1(n){const i=n.assignedSlot;if(i)return i;if(n.parentElement)return n.parentElement;const l=n.getRootNode();return za(l)?l.host:null}function nd(n){for(const i of Array.from(n.children))if(Qt(i)==="summary")return i;return null}function U1(n,i){const l=nd(i);return!!l&&(n===l||Ne(l,n))}function $b(n){const i=n?Qt(n):"";return n!=null&&n.matches(H1)&&(i!=="summary"||n.parentElement!=null&&Qt(n.parentElement)==="details"&&nd(n.parentElement)===n)&&(i!=="details"||nd(n)==null)&&(i!=="input"||n.type!=="hidden")}function ev(n){if(!$b(n)||!n.isConnected||n.matches(":disabled"))return!1;for(let i=n;i;i=L1(i)){const l=i!==n,r=Qt(i)==="slot";if(i.hasAttribute("inert")||l&&Qt(i)==="details"&&!i.open&&!U1(n,i)||i.hasAttribute("hidden")||!r&&!B1(i,l))return!1}return!0}function B1(n,i){const l=Sn(n);return i?l.display!=="none":Qs(n,l)}function tv(n){const i=n.tabIndex;if(i<0){const l=Qt(n);if(l==="details"||l==="audio"||l==="video"||dt(n)&&n.isContentEditable)return 0}return i}function Rf(n){if(Qt(n)!=="input")return null;const i=n;return i.type==="radio"&&i.name!==""?i:null}function I1(n,i){const l=Rf(n);if(!l)return!0;const r=i.find(u=>{const f=Rf(u);return f?.name===l.name&&f.form===l.form&&f.checked});return r?r===l:i.find(u=>{const f=Rf(u);return f?.name===l.name&&f.form===l.form})===l}function nv(n){if(dt(n)&&Qt(n)==="slot"){const i=n.assignedElements({flatten:!0});if(i.length>0)return i}return dt(n)&&n.shadowRoot?Array.from(n.shadowRoot.children):Array.from(n.children)}function ov(n,i){nv(n).forEach(l=>{$b(l)&&i.push(l),ov(l,i)})}function iv(n,i,l){nv(n).forEach(r=>{dt(r)&&r.matches(i)&&l.push(r),iv(r,i,l)})}function Hd(n){return ev(n)&&tv(n)>=0}function av(n){const i=[];return ov(n,i),i.filter(ev)}function Gl(n){const i=av(n);return i.filter(l=>tv(l)>=0&&I1(l,i))}function lv(n,i){const l=Gl(n),r=l.length;if(r===0)return;const u=kt(Fe(n)),f=l.indexOf(u),d=f===-1?i===1?0:r-1:f+i;return l[d]}function Ld(n){return lv(Fe(n).body,1)||n}function rv(n){return lv(Fe(n).body,-1)||n}function sv(n,i){if(!n)return null;const l=Gl(Fe(n).body),r=l.length;if(r===0)return null;const u=l.indexOf(n);if(u===-1)return null;const f=(u+i+r)%r;return l[f]}function P1(n){return sv(n,1)}function Y1(n){return sv(n,-1)}function Da(n,i){const l=i||n.currentTarget,r=n.relatedTarget;return!r||!Ne(l,r)}function q1(n){Gl(n).forEach(l=>{l.dataset.tabindex=l.getAttribute("tabindex")||"",l.setAttribute("tabindex","-1")})}function My(n){const i=[];iv(n,"[data-tabindex]",i),i.forEach(l=>{const r=l.dataset.tabindex;delete l.dataset.tabindex,r?l.setAttribute("tabindex",r):l.removeAttribute("tabindex")})}function di(n,i,l=!0){return n.filter(u=>u.parentId===i).flatMap(u=>[...!l||u.context?.open?[u]:[],...di(n,u.id,l)])}function Dy(n,i){let l=[],r=n.find(u=>u.id===i)?.parentId;for(;r;){const u=n.find(f=>f.id===r);r=u?.parentId,u&&(l=l.concat(u))}return l}function Yl(n){return`data-base-ui-${n}`}let fs=0;function Ss(n,i={}){const{preventScroll:l=!1,sync:r=!1,shouldFocus:u}=i;cancelAnimationFrame(fs);function f(){u&&!u()||n?.focus({preventScroll:l})}if(r)return f(),vd;const d=requestAnimationFrame(f);return fs=d,()=>{fs===d&&(cancelAnimationFrame(d),fs=0)}}const Cf={inert:new WeakMap,"aria-hidden":new WeakMap},Ny="data-base-ui-inert",od={inert:new WeakSet,"aria-hidden":new WeakSet};let zl=new WeakMap,Of=0;function V1(n){return od[n]}function uv(n){return n?za(n)?n.host:uv(n.parentNode):null}const zy=(n,i)=>i.map(l=>{if(n.contains(l))return l;const r=uv(l);return n.contains(r)?r:null}).filter(l=>l!=null),_y=n=>{const i=new Set;return n.forEach(l=>{let r=l;for(;r&&!i.has(r);)i.add(r),r=r.parentNode}),i},ky=(n,i,l)=>{const r=[],u=f=>{!f||l.has(f)||Array.from(f.children).forEach(d=>{Qt(d)!=="script"&&(i.has(d)?u(d):r.push(d))})};return u(n),r};function G1(n,i,l,r,{mark:u=!0}){let f=null;r?f="inert":l&&(f="aria-hidden");let d=null,m=null;const h=zy(i,n),p=u?ky(i,_y(h),new Set(h)):[],y=[],v=[];if(f){const S=Cf[f],w=V1(f);m=w,d=S;const T=zy(i,Array.from(i.querySelectorAll("[aria-live]"))),C=h.concat(T);ky(i,_y(C),new Set(C)).forEach(A=>{const N=A.getAttribute(f),M=N!==null&&N!=="false",D=(S.get(A)||0)+1;S.set(A,D),y.push(A),D===1&&M&&w.add(A),M||A.setAttribute(f,f==="inert"?"":"true")})}return u&&p.forEach(S=>{const w=(zl.get(S)||0)+1;zl.set(S,w),v.push(S),w===1&&S.setAttribute(Ny,"")}),Of+=1,()=>{d&&y.forEach(S=>{const T=(d.get(S)||0)-1;d.set(S,T),T||(!m?.has(S)&&f&&S.removeAttribute(f),m?.delete(S))}),u&&v.forEach(S=>{const w=(zl.get(S)||0)-1;zl.set(S,w),w||S.removeAttribute(Ny)}),Of-=1,Of||(Cf.inert=new WeakMap,Cf["aria-hidden"]=new WeakMap,od.inert=new WeakSet,od["aria-hidden"]=new WeakSet,zl=new WeakMap)}}function jy(n,i={}){const{ariaHidden:l=!1,inert:r=!1,mark:u=!0}=i,f=Fe(n[0]).body;return G1(n,f,l,r,{mark:u})}var Xn=jb();let Hy=0;function X1(n,i="mui"){const[l,r]=b.useState(n),u=n||l;return b.useEffect(()=>{l==null&&(Hy+=1,r(`${i}-${Hy}`))},[l,i]),u}const Ly=zd.useId;function Ui(n,i){if(Ly!==void 0){const l=Ly();return n??(i?`${i}-${l}`:l)}return X1(n,i)}const F1=parseInt(b.version,10);function Ud(n){return F1>=n}function Uy(n){if(!b.isValidElement(n))return null;const i=n,l=i.props;return(Ud(19)?l?.ref:i.ref)??null}function id(n,i){if(n&&!i)return n;if(!n&&i)return i;if(n||i)return{...n,...i}}function K1(n,i){const l={};for(const r in n){const u=n[r];if(i?.hasOwnProperty(r)){const f=i[r](u);f!=null&&Object.assign(l,f);continue}u===!0?l[`data-${r.toLowerCase()}`]="":u&&(l[`data-${r.toLowerCase()}`]=u.toString())}return l}function Q1(n,i){return typeof n=="function"?n(i):n}function Z1(n,i){return typeof n=="function"?n(i):n}const Bd={};function Ao(n,i,l,r,u){if(!l&&!r&&!u&&!n)return As(i);let f=As(n);return i&&(f=Hl(f,i)),l&&(f=Hl(f,l)),r&&(f=Hl(f,r)),u&&(f=Hl(f,u)),f}function W1(n){if(n.length===0)return Bd;if(n.length===1)return As(n[0]);let i=As(n[0]);for(let l=1;l<n.length;l+=1)i=Hl(i,n[l]);return i}function As(n){return Id(n)?{...fv(n,Bd)}:J1(n)}function Hl(n,i){return Id(i)?fv(i,n):$1(n,i)}function J1(n){const i={...n};for(const l in i){const r=i[l];cv(l,r)&&(i[l]=dv(r))}return i}function $1(n,i){if(!i)return n;for(const l in i){const r=i[l];switch(l){case"style":{n[l]=id(n.style,r);break}case"className":{n[l]=pv(n.className,r);break}default:cv(l,r)?n[l]=eE(n[l],r):n[l]=r}}return n}function cv(n,i){const l=n.charCodeAt(0),r=n.charCodeAt(1),u=n.charCodeAt(2);return l===111&&r===110&&u>=65&&u<=90&&(typeof i=="function"||typeof i>"u")}function Id(n){return typeof n=="function"}function fv(n,i){return Id(n)?n(i):n??Bd}function eE(n,i){return i?n?(...l)=>{const r=l[0];if(hv(r)){const f=r;Ms(f);const d=i(...l);return f.baseUIHandlerPrevented||n?.(...l),d}const u=i(...l);return n?.(...l),u}:dv(i):n}function dv(n){return n&&((...i)=>{const l=i[0];return hv(l)&&Ms(l),n(...i)})}function Ms(n){return n.preventBaseUIHandler=()=>{n.baseUIHandlerPrevented=!0},n}function pv(n,i){return i?n?i+" "+n:i:n}function hv(n){return n!=null&&typeof n=="object"&&"nativeEvent"in n}function bt(n,i,l={}){let r=i.render;l.enabled!==!1&&(r=iE(r));const u=tE(i,l,r);if(l.enabled===!1)return null;const f=l.state??Rt;return aE(n,r,u,f)}function tE(n,i,l){const{className:r,style:u}=n,{state:f=Rt,ref:d,props:m,stateAttributesMapping:h,enabled:p=!0}=i,y=p?Q1(r,f):void 0,v=p?Z1(u,f):void 0,S=p?K1(f,h):Rt,w=p&&m?nE(m):void 0,T=p?id(S,w)??{}:Rt;return typeof document<"u"&&(p?Array.isArray(d)?T.ref=b1([T.ref,Uy(l),...d]):T.ref=Hi(T.ref,Uy(l),d):Hi(null,null)),p?(y!==void 0&&(T.className=pv(T.className,y)),v!==void 0&&(T.style=id(T.style,v)),T):Rt}function nE(n){return Array.isArray(n)?W1(n):Ao(void 0,n)}const oE=Symbol.for("react.lazy");function iE(n){if(n?.$$typeof!==oE)return n;const i=b.Children.toArray(n)[0];return b.isValidElement(i)?i:n}function aE(n,i,l,r){if(i){if(typeof i=="function")return i(l,r);const u=Ao(l,i.props);return u.ref=l.ref,b.cloneElement(i,u)}if(n&&typeof n=="string")return lE(n,l);throw new Error(Zt(8))}function lE(n,i){return n==="button"?b.createElement("button",{type:"button",...i,key:i.key}):n==="img"?b.createElement("img",{alt:"",...i,key:i.key}):b.createElement(n,i)}const rE=500,sE=500,uE={style:{transition:"none"}},cE="data-base-ui-click-trigger",fE="data-base-ui-swipe-ignore",dE="data-swipe-ignore",pE=`[${fE}]`,hE=`[${dE}]`,gE={fallbackAxisSide:"none"},gv={fallbackAxisSide:"end"},mE={clipPath:"inset(50%)",position:"fixed",top:0,left:0},mv=b.createContext(null),yv=()=>b.useContext(mv),yE=Yl("portal");function bv(n={}){const{ref:i,container:l,componentProps:r=Rt,elementProps:u}=n,f=Ui(),m=yv()?.portalNode,[h,p]=b.useState(null),[y,v]=b.useState(null),S=Oe(O=>{O!==null&&v(O)}),w=b.useRef(null);Se(()=>{if(l===null){w.current&&(w.current=null,v(null),p(null));return}const O=(l&&(wd(l)?l:l.current))??m??document.body;if(O==null){w.current&&(w.current=null,v(null),p(null));return}w.current!==O&&(w.current=O,v(null),p(O))},[l,m]);const T=bt("div",r,{ref:[i,S],props:[{id:f,[yE]:""},u]}),C=h&&T?Xn.createPortal(T,h):null;return{node:y,nodeId:b.isValidElement(T)?T.props.id:void 0,subtree:C}}const vv=b.forwardRef(function(i,l){const{render:r,className:u,style:f,children:d,container:m,portalOwnerRole:h,...p}=i,{node:y,nodeId:v,subtree:S}=bv({container:m,ref:l,componentProps:i,elementProps:p}),w=b.useRef(null),T=b.useRef(null),C=b.useRef(null),O=b.useRef(null),[A,N]=b.useState(null),M=b.useRef(!1),D=A?.modal,k=A?.open,L=!!A&&!A.modal&&A.open&&!!y;b.useEffect(()=>{if(!y||D)return;function H(J){y&&J.relatedTarget&&Da(J)&&(J.type==="focusin"?M.current&&(My(y),M.current=!1):(q1(y),M.current=!0))}return Gn(Pe(y,"focusin",H,!0),Pe(y,"focusout",H,!0))},[y,D]),Se(()=>{!y||k!==!0||!M.current||(My(y),M.current=!1)},[k,y]);const j=b.useMemo(()=>({beforeOutsideRef:w,afterOutsideRef:T,beforeInsideRef:C,afterInsideRef:O,portalNode:y,setFocusManagerState:N}),[y]);return E.jsxs(b.Fragment,{children:[S,E.jsxs(mv.Provider,{value:j,children:[L&&y&&E.jsx(Li,{"data-type":"outside",ref:w,onFocus:H=>{if(Da(H,y))C.current?.focus();else{const J=A?A.domReference:null;rv(J)?.focus()}}}),L&&y&&E.jsx("span",{role:h,"aria-owns":v,style:mE}),y&&Xn.createPortal(d,y),L&&y&&E.jsx(Li,{"data-type":"outside",ref:T,onFocus:H=>{if(Da(H,y))O.current?.focus();else{const J=A?A.domReference:null;Ld(J)?.focus(),A?.closeOnFocusOut&&A?.onOpenChange(!1,Ke(_a,H.nativeEvent))}}})]})]})});function Sv(){const n=new Map;return{emit(i,l){n.get(i)?.forEach(r=>r(l))},on(i,l){n.has(i)||n.set(i,new Set),n.get(i).add(l)},off(i,l){n.get(i)?.delete(l)}}}class Pd{nodesRef={current:[]};events=Sv();addNode(i){this.nodesRef.current.push(i)}removeNode(i){const l=this.nodesRef.current.findIndex(r=>r===i);l!==-1&&this.nodesRef.current.splice(l,1)}}const xv=b.createContext(null),Tv=b.createContext(null),Ii=()=>b.useContext(xv)?.id||null,hi=n=>{const i=b.useContext(Tv);return n??i};function Ev(n){const i=Ui(),l=hi(n),r=Ii();return Se(()=>{if(!i)return;const u={id:i,parentId:r};return l?.addNode(u),()=>{l?.removeNode(u)}},[l,i,r]),i}function bE(n){const{children:i,id:l}=n,r=Ii();return E.jsx(xv.Provider,{value:b.useMemo(()=>({id:l,parentId:r}),[l,r]),children:i})}function vE(n){const{children:i,externalTree:l}=n,r=Jt(()=>l??new Pd).current;return E.jsx(Tv.Provider,{value:r,children:i})}function xo(n){return n==null?n:"current"in n?n.current:n}function SE(n,i){const l=yt(St(n));return n instanceof l.KeyboardEvent?"keyboard":n instanceof l.FocusEvent?i||"keyboard":"pointerType"in n?n.pointerType||"keyboard":"touches"in n?"touch":n instanceof l.MouseEvent?i||(n.detail===0?"keyboard":"mouse"):""}const By=20;let si=[];function Yd(){si=si.filter(n=>n.deref()?.isConnected)}function Iy(n){Yd(),n&&Qt(n)!=="body"&&(si.push(new WeakRef(n)),si.length>By&&(si=si.slice(-By)))}function Py(){return Yd(),si[si.length-1]?.deref()}function xE(n){return n?Hd(n)?n:Gl(n)[0]||n:null}function Yy(n){if(n.hasAttribute("tabindex")&&!n.hasAttribute("data-tabindex")||!n.getAttribute("role")?.includes("dialog"))return;const l=av(n).filter(u=>{const f=u.getAttribute("data-tabindex")||"";return Hd(u)||u.hasAttribute("data-tabindex")&&!f.startsWith("-")}),r=n.getAttribute("tabindex");l.length===0?r!=="0"&&(n.setAttribute("tabindex","0"),n.setAttribute("data-tabindex","0")):(r!=="-1"||n.hasAttribute("data-tabindex")&&n.getAttribute("data-tabindex")!=="-1")&&(n.setAttribute("tabindex","-1"),n.setAttribute("data-tabindex","-1"))}function wv(n){const{context:i,children:l,disabled:r=!1,initialFocus:u=!0,returnFocus:f=!0,restoreFocus:d=!1,modal:m=!0,closeOnFocusOut:h=!0,openInteractionType:p="",nextFocusableElement:y,previousFocusableElement:v,beforeContentFocusGuardRef:S,externalTree:w,getInsideElements:T}=n,C="rootStore"in i?i.rootStore:i,O=C.useState("open"),A=C.useState("domReferenceElement"),N=C.useState("floatingElement"),{events:M,dataRef:D}=C.context,k=Oe(()=>D.current.floatingContext?.nodeId),L=u===!1,j=Wf(A)&&L,H=jt(u),J=jt(f),$=jt(p),Q=jt(O),I=hi(w),ee=yv(),ie=b.useRef(!1),F=b.useRef(!1),z=b.useRef(!1),q=b.useRef(null),P=b.useRef(""),K=b.useRef(""),ne=b.useRef(null),R=b.useRef(null),B=Hi(ne,S,ee?.beforeInsideRef),W=Hi(R,ee?.afterInsideRef),V=$t(),oe=$t(),ae=Pl(),ge=ee!=null,ue=Jf(N),pe=Oe((ve=ue)=>ve?Gl(ve):[]),Re=Oe(()=>T?.().filter(ve=>ve!=null)??[]);b.useEffect(()=>{if(r||!m)return;function ve(je){je.key==="Tab"&&Ne(ue,kt(Fe(ue)))&&pe().length===0&&!j&&$n(je)}const me=Fe(ue);return Pe(me,"keydown",ve)},[r,ue,m,j,pe]),b.useEffect(()=>{if(r||!O)return;const ve=Fe(ue);function me(){z.current=!1}function je(Ve){const Te=St(Ve),Ue=Re(),Ee=Ne(N,Te)||Ne(A,Te)||Ne(ee?.portalNode,Te)||Ue.some(we=>we===Te||Ne(we,Te));z.current=!Ee,K.current=Ve.pointerType||"keyboard",Te?.closest(`[${cE}]`)&&(F.current=!0,oe.start(0,()=>{F.current=!1}))}function Le(){K.current="keyboard"}return Gn(Pe(ve,"pointerdown",je,!0),Pe(ve,"pointerup",me,!0),Pe(ve,"pointercancel",me,!0),Pe(ve,"keydown",Le,!0),me)},[r,N,A,ue,O,ee,oe,Re]),b.useEffect(()=>{if(r||!h)return;const ve=Fe(ue);function me(){F.current=!0,oe.start(0,()=>{F.current=!1})}function je(Ue){const Ee=St(Ue);Hd(Ee)&&(q.current=Ee)}function Le(Ue){const Ee=Ue.relatedTarget,we=Ue.currentTarget,Ae=St(Ue);m&&Ee==null&&Ae!=null&&Ne(N,Ae)&&Iy(Ae),queueMicrotask(()=>{const Qe=k(),Me=C.context.triggerElements,fe=Re(),ye=Ee?.hasAttribute(Yl("focus-guard"))&&[ne.current,R.current,ee?.beforeInsideRef.current,ee?.afterInsideRef.current,ee?.beforeOutsideRef.current,ee?.afterOutsideRef.current,xo(v),xo(y)].includes(Ee),de=!(Ne(A,Ee)||Ne(N,Ee)||Ne(Ee,N)||Ne(ee?.portalNode,Ee)||fe.some(le=>le===Ee||Ne(le,Ee))||Me.hasMatchingElement(le=>Ne(le,Ee))||ye||I&&(di(I.nodesRef.current,Qe).find(le=>Ne(le.context?.elements.floating,Ee)||Ne(le.context?.elements.domReference,Ee))||Dy(I.nodesRef.current,Qe).find(le=>[le.context?.elements.floating,Jf(le.context?.elements.floating)].includes(Ee)||le.context?.elements.domReference===Ee)));if(we===A&&ue&&Yy(ue),d&&we!==A&&!Qs(Ae)&&kt(ve)===ve.body){if(dt(ue)&&(ue.focus(),d==="popup")){ae.request(()=>{ue.focus()});return}const le=pe(),be=q.current,Be=(be&&le.includes(be)?be:null)||le[le.length-1]||ue;dt(Be)&&Be.focus()}if(D.current.insideReactTree){D.current.insideReactTree=!1;return}(j||!m)&&Ee&&de&&!F.current&&(j||Ee!==Py())&&(ie.current=!0,C.setOpen(!1,Ke(_a,Ue)))})}function Ve(){z.current||(D.current.insideReactTree=!0,V.start(0,()=>{D.current.insideReactTree=!1}))}const Te=dt(A)?A:null;if(!(!N&&!Te))return Gn(Te&&Pe(Te,"focusout",Le),Te&&Pe(Te,"pointerdown",me),N&&Pe(N,"focusin",je),N&&Pe(N,"focusout",Le),N&&ee&&Pe(N,"focusout",Ve,!0))},[r,A,N,ue,m,I,ee,C,h,d,pe,j,k,D,V,oe,ae,y,v,Re]),b.useEffect(()=>{if(r||!N||!O)return;const ve=Array.from(ee?.portalNode?.querySelectorAll(`[${Yl("portal")}]`)||[]),je=(I?Dy(I.nodesRef.current,k()):[]).find(we=>Wf(we.context?.elements.domReference||null))?.context?.elements.domReference,Ve=[...[N,...ve,ne.current,R.current,ee?.beforeOutsideRef.current,ee?.afterOutsideRef.current,...Re()],je,xo(v),xo(y),j?A:null].filter(we=>we!=null),Te=jy(Ve,{ariaHidden:m||j,mark:!1}),Ue=[N,...ve].filter(we=>we!=null),Ee=jy(Ue);return()=>{Ee(),Te()}},[O,r,A,N,m,ee,j,I,k,y,v,Re]),Se(()=>{if(!O||r||!dt(ue))return;P.current="",K.current="";const ve=Fe(ue),me=kt(ve);queueMicrotask(()=>{const je=H.current,Le=typeof je=="function"?je($.current||""):je;if(Le===void 0||Le===!1||Ne(ue,me))return;let Te=null;const Ue=()=>(Te==null&&(Te=pe(ue)),Te[0]||ue);let Ee;Le===!0||Le===null?Ee=Ue():Ee=xo(Le),Ee=Ee||Ue();const we=Ne(ue,kt(ve));Ss(Ee,{preventScroll:Ee===ue,shouldFocus(){if(!Q.current)return!1;if(we)return!0;const Ae=kt(ve);return!(Ae!==Ee&&Ne(ue,Ae))}})})},[r,O,ue,pe,H,$,Q]),Se(()=>{if(r||!ue)return;const ve=Fe(ue),me=kt(ve),je=$.current==null;Iy(me);function Le(Te){if(Te.open||(P.current=SE(Te.nativeEvent,K.current)),Te.reason===Lt&&Te.nativeEvent.type==="mouseleave"&&(ie.current=!0),Te.reason===Dd)if(Te.nested)ie.current=!1;else if(Td(Te.nativeEvent)||Ed(Te.nativeEvent))ie.current=!1;else{let Ue=!1;Fe(ue).createElement("div").focus({get preventScroll(){return Ue=!0,!1}}),Ue?ie.current=!1:ie.current=!0}}M.on("openchange",Le);function Ve(Te){const Ue=J.current;let Ee=typeof Ue=="function"?Ue(Te):Ue;if(Ee===void 0||Ee===!1)return null;Ee===null&&(Ee=!0);const we=A?.isConnected?A:null,Ae=me?.isConnected&&Qt(me)!=="body"?me:null;let Qe=je?Ae||we:we||Ae;return Qe||(Qe=Py()||null),typeof Ee=="boolean"?Qe:xo(Ee)||Qe||null}return()=>{M.off("openchange",Le);const Te=kt(ve),Ue=Re(),Ee=Ne(N,Te)||Ue.some(Me=>Me===Te||Ne(Me,Te))||I&&di(I.nodesRef.current,k(),!1).some(Me=>Ne(Me.context?.elements.floating,Te)),we=J.current,Ae=P.current,Qe=Ve(Ae);queueMicrotask(()=>{const Me=xE(Qe),fe=typeof we!="boolean";if(we&&!ie.current&&dt(Me)&&(!(!fe&&Me!==Te&&Te!==ve.body)||Ee)){const ye={preventScroll:!0};Ae==="keyboard"&&(ye.focusVisible=!0),Me.focus(ye)}ie.current=!1})}},[r,N,ue,J,$,M,I,A,k,Re]),Se(()=>{if(!pi||O||!N)return;const ve=kt(Fe(N));!dt(ve)||!Xs(ve)||Ne(N,ve)&&ve.blur()},[O,N]),Se(()=>{if(!(r||!ee))return ee.setFocusManagerState({modal:m,closeOnFocusOut:h,open:O,onOpenChange:C.setOpen,domReference:A}),()=>{ee.setFocusManagerState(null)}},[r,ee,m,O,C,h,A]),Se(()=>{if(!(r||!ue))return Yy(ue),()=>{queueMicrotask(Yd)}},[r,ue]);const ke=!r&&(m?!j:!0)&&(ge||m);return E.jsxs(b.Fragment,{children:[ke&&E.jsx(Li,{"data-type":"inside",ref:B,onFocus:ve=>{if(m){const me=pe();Ss(me[me.length-1])}else ee?.portalNode&&(ie.current=!1,Da(ve,ee.portalNode)?Ld(A)?.focus():xo(v??ee.beforeOutsideRef)?.focus())}}),l,ke&&E.jsx(Li,{"data-type":"inside",ref:W,onFocus:ve=>{m?Ss(pe()[0]):ee?.portalNode&&(h&&(ie.current=!0),Da(ve,ee.portalNode)?rv(A)?.focus():xo(y??ee.afterOutsideRef)?.focus())}})]})}function TE(n,i={}){const{enabled:l=!0,event:r="click",toggle:u=!0,ignoreMouse:f=!1,stickIfOpen:d=!0,touchOpenDelay:m=0,reason:h=ja}=i,p="rootStore"in n?n.rootStore:n,y=p.context.dataRef,v=b.useRef(void 0),S=Pl(),w=$t(),T=b.useMemo(()=>{function C(A,N,M,D){const k=Ke(h,N,M);A&&D==="touch"&&m>0?w.start(m,()=>{p.setOpen(!0,k)}):p.setOpen(A,k)}function O(A,N,M){const D=y.current.openEvent,k=p.select("domReferenceElement")!==N;return A&&k||!A||!u?!0:D&&d?!M(D.type):!1}return{onPointerDown(A){v.current=ui(A.pointerType,!0)&&Ed(A.nativeEvent)?"virtual":A.pointerType},onMouseDown(A){const N=v.current,M=A.nativeEvent,D=p.select("open");if(A.button!==0||r==="click"||ui(N,!0)&&f)return;const k=O(D,A.currentTarget,H=>H==="click"||H==="mousedown"),L=St(M);if(Xs(L)){C(k,M,L,N);return}const j=A.currentTarget;S.request(()=>{C(k,M,j,N)})},onClick(A){if(r==="mousedown-only")return;const N=v.current;if(r==="mousedown"&&N){v.current=void 0;return}if(ui(N,!0)&&f)return;const M=p.select("open"),D=O(M,A.currentTarget,k=>k==="click"||k==="mousedown"||k==="keydown"||k==="keyup");C(D,A.nativeEvent,A.currentTarget,N)},onKeyDown(){v.current=void 0}}},[y,r,f,h,p,d,u,S,w,m]);return b.useMemo(()=>l?{reference:T}:Rt,[l,T])}function EE(n,i){let l=null,r=null,u=!1;return{contextElement:n||void 0,getBoundingClientRect(){const f=n?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},d=i.axis==="x"||i.axis==="both",m=i.axis==="y"||i.axis==="both",h=["mouseenter","mousemove"].includes(i.dataRef.current.openEvent?.type||"")&&i.pointerType!=="touch";let p=f.width,y=f.height,v=f.x,S=f.y;return l==null&&i.x&&d&&(l=f.x-i.x),r==null&&i.y&&m&&(r=f.y-i.y),v-=l||0,S-=r||0,p=0,y=0,!u||h?(p=i.axis==="y"?f.width:0,y=i.axis==="x"?f.height:0,v=d&&i.x!=null?i.x:v,S=m&&i.y!=null?i.y:S):u&&!h&&(y=i.axis==="x"?f.height:y,p=i.axis==="y"?f.width:p),u=!0,{width:p,height:y,x:v,y:S,top:S,right:v+p,bottom:S+y,left:v}}}}function qy(n){return n!=null&&n.clientX!=null}function wE(n,i={}){const{enabled:l=!0,axis:r="both"}=i,u="rootStore"in n?n.rootStore:n,f=u.useState("open"),d=u.useState("floatingElement"),m=u.useState("domReferenceElement"),h=u.context.dataRef,p=b.useRef(!1),y=b.useRef(null),[v,S]=b.useState(),[w,T]=b.useState([]),C=Oe(D=>{u.set("positionReference",D)}),O=Oe((D,k,L)=>{p.current||h.current.openEvent&&!qy(h.current.openEvent)||u.set("positionReference",EE(L??m,{x:D,y:k,axis:r,dataRef:h,pointerType:v}))}),A=Oe(D=>{f?y.current||(O(D.clientX,D.clientY,D.currentTarget),T([])):O(D.clientX,D.clientY,D.currentTarget)}),N=ui(v)?d:f;b.useEffect(()=>{if(!l){C(m);return}if(!N)return;function D(){y.current?.(),y.current=null}const k=yt(d);function L(j){const H=St(j);Ne(d,H)?D():O(j.clientX,j.clientY)}return!h.current.openEvent||qy(h.current.openEvent)?y.current=Pe(k,"mousemove",L):C(m),D},[N,l,d,h,m,u,O,C,w]),b.useEffect(()=>()=>{u.set("positionReference",null)},[u]),b.useEffect(()=>{l&&!d&&(p.current=!1)},[l,d]),b.useEffect(()=>{!l&&f&&(p.current=!0)},[l,f]);const M=b.useMemo(()=>{function D(k){S(k.pointerType)}return{onPointerDown:D,onPointerEnter:D,onMouseMove:A,onMouseEnter:A}},[A]);return b.useMemo(()=>l?{reference:M,trigger:M}:{},[l,M])}function RE(){return!1}function CE(n){return{escapeKey:typeof n=="boolean"?n:n?.escapeKey??!1,outsidePress:typeof n=="boolean"?n:n?.outsidePress??!0}}function qd(n,i={}){const{enabled:l=!0,escapeKey:r=!0,outsidePress:u=!0,outsidePressEvent:f="sloppy",referencePress:d=RE,bubbles:m,externalTree:h}=i,p="rootStore"in n?n.rootStore:n,y=p.useState("open"),v=p.useState("floatingElement"),{dataRef:S,events:w}=p.context,T=hi(h),C=Oe(typeof u=="function"?u:()=>!1),O=typeof u=="function"?C:u,A=O!==!1,N=Oe(()=>f),{escapeKey:M,outsidePress:D}=CE(m),k=b.useRef(!1),L=b.useRef(!1),j=b.useRef(!1),H=b.useRef(!1),J=b.useRef(!1),$=b.useRef(""),Q=b.useRef(null),I=$t(),ee=$t(),ie=Oe(()=>{ee.clear(),S.current.insideReactTree=!1}),F=Oe(V=>{const oe=S.current.floatingContext?.nodeId;return(T?di(T.nodesRef.current,oe):[]).some(ge=>ge.context?.open&&!ge.context.dataRef.current[V])}),z=Oe(V=>Ef(V,p.select("floatingElement"))||Ef(V,p.select("domReferenceElement"))),q=Oe(V=>{d()&&p.setOpen(!1,Ke(ja,V.nativeEvent))}),P=Oe(V=>{if(!y||!l||!r||V.key!=="Escape"||J.current||!M&&F("__escapeKeyBubbles"))return;const oe=VT(V)?V.nativeEvent:V,ae=Ke(Ks,oe);p.setOpen(!1,ae),ae.isCanceled||V.preventDefault(),!M&&!ae.isPropagationAllowed&&V.stopPropagation()}),K=Oe(()=>{S.current.insideReactTree=!0,ee.start(0,ie)}),ne=Oe(V=>{if(!y||!l||V.button!==0)return;const oe=St(V.nativeEvent);Ne(p.select("floatingElement"),oe)&&(k.current||(k.current=!0,L.current=!1))}),R=Oe(V=>{!y||!l||(V.defaultPrevented||V.nativeEvent.defaultPrevented)&&k.current&&(L.current=!0)});b.useEffect(()=>{function V(oe){oe.open||(H.current=!1)}return w.on("openchange",V),()=>{w.off("openchange",V)}},[w]),b.useEffect(()=>{if(!y||!l)return y||(H.current=!1),ie;S.current.__escapeKeyBubbles=M,S.current.__outsidePressBubbles=D;const V=new vn,oe=new vn,ae=Fe(v);function ge(){V.clear(),J.current=!0}function ue(){V.start(pi?5:0,()=>{J.current=!1})}function pe(){j.current=!0,oe.start(0,()=>{j.current=!1})}function Re(){k.current=!1,L.current=!1}function ke(){const de=$.current,le=de==="pen"||!de?"mouse":de,be=N(),Be=typeof be=="function"?be():be;return typeof Be=="string"?Be:Be[le]}function ve(de){const le=ke();return le==="intentional"&&de.type!=="click"||le==="sloppy"&&de.type==="click"}function me(de){const le=S.current.floatingContext?.nodeId,be=T&&di(T.nodesRef.current,le).some(Be=>Ef(de,Be.context?.elements.floating));return z(de)||be}function je(de){if(ve(de)){de.type!=="click"&&!z(de)&&(oe.clear(),j.current=!1),ie();return}if(S.current.insideReactTree){ie();return}const le=St(de),be=`[${Yl("inert")}]`,Be=Je(le)?le.getRootNode():null,Ut=Array.from((za(Be)?Be:Fe(p.select("floatingElement"))).querySelectorAll(be)),tn=p.context.triggerElements;if(le&&(tn.hasElement(le)||tn.hasMatchingElement(xe=>Ne(xe,le))))return;let Tt=Je(le)?le:null;for(;Tt&&!Ro(Tt);){const xe=Do(Tt);if(Ro(xe)||!Je(xe))break;Tt=xe}if(!(Ut.length&&Je(le)&&!u1(le)&&!Ne(le,p.select("floatingElement"))&&Ut.every(xe=>!Ne(Tt,xe)))){if(dt(le)&&!("touches"in de)){const xe=Ro(le),Ye=Sn(le),nt=/auto|scroll/,pt=xe||nt.test(Ye.overflowX),Tn=xe||nt.test(Ye.overflowY),Un=pt&&le.clientWidth>0&&le.scrollWidth>le.clientWidth,En=Tn&&le.clientHeight>0&&le.scrollHeight>le.clientHeight,At=Ye.direction==="rtl",Bn=En&&(At?de.offsetX<=le.offsetWidth-le.clientWidth:de.offsetX>le.clientWidth),Xe=Un&&de.offsetY>le.clientHeight;if(Bn||Xe)return}if(!me(de)){if(ke()==="intentional"){if(de.detail!==0&&!Td(de)&&!H.current)return;if(j.current){oe.clear(),j.current=!1;return}}typeof O=="function"&&!O(de)||F("__outsidePressBubbles")||(p.setOpen(!1,Ke(Dd,de)),ie())}}}function Le(de){ke()!=="sloppy"||de.pointerType==="touch"||!p.select("open")||!l||z(de)||je(de)}function Ve(de){if(ke()!=="sloppy"||!p.select("open")||!l||z(de))return;const le=de.touches[0];le&&(Q.current={startTime:Date.now(),startX:le.clientX,startY:le.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},I.start(1e3,()=>{Q.current&&(Q.current.dismissOnTouchEnd=!1,Q.current.dismissOnMouseDown=!1)}))}function Te(de,le){const be=St(de);if(!be)return;const Be=Pe(be,de.type,()=>{le(de),Be()})}function Ue(de){$.current="touch",Te(de,Ve)}function Ee(de){I.clear(),de.type==="pointerdown"&&(de.button===0&&(H.current=!0),$.current=de.pointerType),!(de.type==="mousedown"&&Q.current&&!Q.current.dismissOnMouseDown)&&Te(de,le=>{le.type==="pointerdown"?Le(le):je(le)})}function we(de){if(de.type==="pointercancel"&&(H.current=!1),!k.current)return;const le=L.current;if(Re(),ke()==="intentional"){if(de.type==="pointercancel"){le&&pe();return}if(!me(de)){if(le){pe();return}typeof O=="function"&&!O(de)||(oe.clear(),j.current=!0,ie())}}}function Ae(de){if(ke()!=="sloppy"||!Q.current||z(de))return;const le=de.touches[0];if(!le)return;const be=Math.abs(le.clientX-Q.current.startX),Be=Math.abs(le.clientY-Q.current.startY),Ut=Math.sqrt(be*be+Be*Be);Ut>5&&(Q.current.dismissOnTouchEnd=!0),Ut>10&&(je(de),I.clear(),Q.current=null)}function Qe(de){Te(de,Ae)}function Me(de){ke()!=="sloppy"||!Q.current||z(de)||(Q.current.dismissOnTouchEnd&&je(de),I.clear(),Q.current=null)}function fe(de){Te(de,Me)}const ye=Gn(r&&Gn(Pe(ae,"keydown",P),Pe(ae,"compositionstart",ge),Pe(ae,"compositionend",ue)),A&&Gn(Pe(ae,"click",Ee,!0),Pe(ae,"pointerdown",Ee,!0),Pe(ae,"pointerup",we,!0),Pe(ae,"pointercancel",we,!0),Pe(ae,"mousedown",Ee,!0),Pe(ae,"mouseup",we,!0),Pe(ae,"touchstart",Ue,{capture:!0,passive:!0}),Pe(ae,"touchmove",Qe,{capture:!0,passive:!0}),Pe(ae,"touchend",fe,{capture:!0,passive:!0})));return()=>{ye(),V.clear(),oe.clear(),Re(),j.current=!1,ie()}},[S,v,r,A,O,y,l,M,D,P,ie,N,F,z,T,p,I]);const B=b.useMemo(()=>({onKeyDown:P,onPointerDown:q,onClick:q}),[P,q]),W=b.useMemo(()=>({onKeyDown:P,onPointerDown:R,onMouseDown:R,onClickCapture:K,onMouseDownCapture(V){K(),ne(V)},onPointerDownCapture(V){K(),ne(V)},onMouseUpCapture:K,onTouchEndCapture:K,onTouchMoveCapture:K}),[P,K,ne,R]);return b.useMemo(()=>l?{reference:B,floating:W,trigger:B}:{},[l,B,W])}function Vy(n,i,l){let{reference:r,floating:u}=n;const f=jn(i),d=jd(i),m=kd(d),h=Hn(i),p=f==="y",y=r.x+r.width/2-u.width/2,v=r.y+r.height/2-u.height/2,S=r[m]/2-u[m]/2;let w;switch(h){case"top":w={x:y,y:r.y-u.height};break;case"bottom":w={x:y,y:r.y+r.height};break;case"right":w={x:r.x+r.width,y:v};break;case"left":w={x:r.x-u.width,y:v};break;default:w={x:r.x,y:r.y}}const T=No(i);return T&&(w[d]+=S*(T==="end"?1:-1)*(l&&p?-1:1)),w}async function OE(n,i){var l;i===void 0&&(i={});const{x:r,y:u,platform:f,rects:d,elements:m,strategy:h}=n,{boundary:p="clippingAncestors",rootBoundary:y="viewport",elementContext:v="floating",altBoundary:S=!1,padding:w=0}=fi(i,n),T=Jb(w),O=m[S?v==="floating"?"reference":"floating":v],A=Os(await f.getClippingRect({element:(l=await(f.isElement==null?void 0:f.isElement(O)))==null||l?O:O.contextElement||await(f.getDocumentElement==null?void 0:f.getDocumentElement(m.floating)),boundary:p,rootBoundary:y,strategy:h})),N=v==="floating"?{x:r,y:u,width:d.floating.width,height:d.floating.height}:d.reference,M=await(f.getOffsetParent==null?void 0:f.getOffsetParent(m.floating)),D=await(f.isElement==null?void 0:f.isElement(M))&&await(f.getScale==null?void 0:f.getScale(M))||{x:1,y:1},k=Os(f.convertOffsetParentRelativeRectToViewportRelativeRect?await f.convertOffsetParentRelativeRectToViewportRelativeRect({elements:m,rect:N,offsetParent:M,strategy:h}):N);return{top:(A.top-k.top+T.top)/D.y,bottom:(k.bottom-A.bottom+T.bottom)/D.y,left:(A.left-k.left+T.left)/D.x,right:(k.right-A.right+T.right)/D.x}}const AE=50,ME=async(n,i,l)=>{const{placement:r="bottom",strategy:u="absolute",middleware:f=[],platform:d}=l,m=d.detectOverflow?d:{...d,detectOverflow:OE},h=await(d.isRTL==null?void 0:d.isRTL(i));let p=await d.getElementRects({reference:n,floating:i,strategy:u}),{x:y,y:v}=Vy(p,r,h),S=r,w=0;const T={};for(let C=0;C<f.length;C++){const O=f[C];if(!O)continue;const{name:A,fn:N}=O,{x:M,y:D,data:k,reset:L}=await N({x:y,y:v,initialPlacement:r,placement:S,strategy:u,middlewareData:T,rects:p,platform:m,elements:{reference:n,floating:i}});y=M??y,v=D??v,T[A]={...T[A],...k},L&&w<AE&&(w++,typeof L=="object"&&(L.placement&&(S=L.placement),L.rects&&(p=L.rects===!0?await d.getElementRects({reference:n,floating:i,strategy:u}):L.rects),{x:y,y:v}=Vy(p,S,h)),C=-1)}return{x:y,y:v,placement:S,strategy:u,middlewareData:T}},DE=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(i){var l,r;const{placement:u,middlewareData:f,rects:d,initialPlacement:m,platform:h,elements:p}=i,{mainAxis:y=!0,crossAxis:v=!0,fallbackPlacements:S,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:T="none",flipAlignment:C=!0,...O}=fi(n,i);if((l=f.arrow)!=null&&l.alignmentOffset)return{};const A=Hn(u),N=jn(m),M=Hn(m)===m,D=await(h.isRTL==null?void 0:h.isRTL(p.floating)),k=S||(M||!C?[Cs(m)]:M1(m)),L=T!=="none";!S&&L&&k.push(..._1(m,C,T,D));const j=[m,...k],H=await h.detectOverflow(i,O),J=[];let $=((r=f.flip)==null?void 0:r.overflows)||[];if(y&&J.push(H[A]),v){const ie=A1(u,d,D);J.push(H[ie[0]],H[ie[1]])}if($=[...$,{placement:u,overflows:J}],!J.every(ie=>ie<=0)){var Q,I;const ie=(((Q=f.flip)==null?void 0:Q.index)||0)+1,F=j[ie];if(F&&(!(v==="alignment"?N!==jn(F):!1)||$.every(P=>jn(P.placement)===N?P.overflows[0]>0:!0)))return{data:{index:ie,overflows:$},reset:{placement:F}};let z=(I=$.filter(q=>q.overflows[0]<=0).sort((q,P)=>q.overflows[1]-P.overflows[1])[0])==null?void 0:I.placement;if(!z)switch(w){case"bestFit":{var ee;const q=(ee=$.filter(P=>{if(L){const K=jn(P.placement);return K===N||K==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(K=>K>0).reduce((K,ne)=>K+ne,0)]).sort((P,K)=>P[1]-K[1])[0])==null?void 0:ee[0];q&&(z=q);break}case"initialPlacement":z=m;break}if(u!==z)return{reset:{placement:z}}}return{}}}},Rv=new Set(["left","top"]);async function NE(n,i){const{placement:l,platform:r,elements:u}=n,f=await(r.isRTL==null?void 0:r.isRTL(u.floating)),d=Hn(l),m=No(l),h=jn(l)==="y",p=Rv.has(d)?-1:1,y=f&&h?-1:1,v=fi(i,n);let{mainAxis:S,crossAxis:w,alignmentAxis:T}=typeof v=="number"?{mainAxis:v,crossAxis:0,alignmentAxis:null}:{mainAxis:v.mainAxis||0,crossAxis:v.crossAxis||0,alignmentAxis:v.alignmentAxis};return m&&typeof T=="number"&&(w=m==="end"?T*-1:T),h?{x:w*y,y:S*p}:{x:S*p,y:w*y}}const zE=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(i){var l,r;const{x:u,y:f,placement:d,middlewareData:m}=i,h=await NE(i,n);return d===((l=m.offset)==null?void 0:l.placement)&&(r=m.arrow)!=null&&r.alignmentOffset?{}:{x:u+h.x,y:f+h.y,data:{...h,placement:d}}}}},_E=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(i){const{x:l,y:r,placement:u,platform:f}=i,{mainAxis:d=!0,crossAxis:m=!1,limiter:h={fn:N=>{let{x:M,y:D}=N;return{x:M,y:D}}},...p}=fi(n,i),y={x:l,y:r},v=await f.detectOverflow(i,p),S=jn(u),w=_d(S);let T=y[w],C=y[S];const O=(N,M)=>Wb(M+v[N==="y"?"top":"left"],M,M-v[N==="y"?"bottom":"right"]);d&&(T=O(w,T)),m&&(C=O(S,C));const A=h.fn({...i,[w]:T,[S]:C});return{...A,data:{x:A.x-l,y:A.y-r,enabled:{[w]:d,[S]:m}}}}}},kE=function(n){return n===void 0&&(n={}),{options:n,fn(i){var l,r;const{x:u,y:f,placement:d,rects:m,middlewareData:h}=i,{offset:p=0,mainAxis:y=!0,crossAxis:v=!0}=fi(n,i),S={x:u,y:f},w=jn(d),T=_d(w);let C=S[T],O=S[w];const A=fi(p,i),N=typeof A=="number"?{mainAxis:A,crossAxis:0}:{mainAxis:(l=A.mainAxis)!=null?l:0,crossAxis:(r=A.crossAxis)!=null?r:0};if(y){const k=T==="y"?"height":"width",L=m.reference[T]-m.floating[k]+N.mainAxis,j=m.reference[T]+m.reference[k]-N.mainAxis;C<L?C=L:C>j&&(C=j)}if(v){var M,D;const k=T==="y"?"width":"height",L=Rv.has(Hn(d)),j=m.reference[w]-m.floating[k]+(L&&((M=h.offset)==null?void 0:M[w])||0)+(L?0:N.crossAxis),H=m.reference[w]+m.reference[k]+(L?0:((D=h.offset)==null?void 0:D[w])||0)-(L?N.crossAxis:0);O<j?O=j:O>H&&(O=H)}return{[T]:C,[w]:O}}}},jE=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(i){const{placement:l,rects:r,platform:u,elements:f}=i,{apply:d=()=>{},...m}=fi(n,i),h=await u.detectOverflow(i,m),p=Hn(l),y=No(l),v=jn(l)==="y",{width:S,height:w}=r.floating;let T,C;p==="top"||p==="bottom"?(T=p,C=y===(await(u.isRTL==null?void 0:u.isRTL(f.floating))?"start":"end")?"left":"right"):(C=p,T=y==="end"?"top":"bottom");const O=w-h.top-h.bottom,A=S-h.left-h.right,N=ka(w-h[T],O),M=ka(S-h[C],A),D=i.middlewareData.shift,k=!D;let L=N,j=M;D!=null&&D.enabled.x&&(j=A),D!=null&&D.enabled.y&&(L=O),k&&!y&&(v?j=S-2*Co(h.left,h.right):L=w-2*Co(h.top,h.bottom)),await d({...i,availableWidth:j,availableHeight:L});const H=await u.getDimensions(f.floating);return S!==H.width||w!==H.height?{reset:{rects:!0}}:{}}}};function Cv(n){const i=Sn(n);let l=parseFloat(i.width)||0,r=parseFloat(i.height)||0;const u=dt(n),f=u?n.offsetWidth:l,d=u?n.offsetHeight:r,m=Rs(l)!==f||Rs(r)!==d;return m&&(l=f,r=d),{width:l,height:r,$:m}}function Vd(n){return Je(n)?n:n.contextElement}function Na(n){const i=Vd(n);if(!dt(i))return Oo(1);const l=i.getBoundingClientRect(),{width:r,height:u,$:f}=Cv(i);let d=(f?Rs(l.width):l.width)/r,m=(f?Rs(l.height):l.height)/u;return(!d||!Number.isFinite(d))&&(d=1),(!m||!Number.isFinite(m))&&(m=1),{x:d,y:m}}const HE=Oo(0);function Ov(n){const i=yt(n);return!Cd()||!i.visualViewport?HE:{x:i.visualViewport.offsetLeft,y:i.visualViewport.offsetTop}}function LE(n,i,l){return i===void 0&&(i=!1),!!l&&i&&l===yt(n)}function Bi(n,i,l,r){i===void 0&&(i=!1),l===void 0&&(l=!1);const u=n.getBoundingClientRect(),f=Vd(n);let d=Oo(1);i&&(r?Je(r)&&(d=Na(r)):d=Na(n));const m=LE(f,l,r)?Ov(f):Oo(0);let h=(u.left+m.x)/d.x,p=(u.top+m.y)/d.y,y=u.width/d.x,v=u.height/d.y;if(f&&r){const S=yt(f),w=Je(r)?yt(r):r;let T=S,C=Kf(T);for(;C&&w!==T;){const O=Na(C),A=C.getBoundingClientRect(),N=Sn(C),M=A.left+(C.clientLeft+parseFloat(N.paddingLeft))*O.x,D=A.top+(C.clientTop+parseFloat(N.paddingTop))*O.y;h*=O.x,p*=O.y,y*=O.x,v*=O.y,h+=M,p+=D,T=yt(C),C=Kf(T)}}return Os({width:y,height:v,x:h,y:p})}function Zs(n,i){const l=Ys(n).scrollLeft;return i?i.left+l:Bi(_o(n)).left+l}function Av(n,i){const l=n.getBoundingClientRect(),r=l.left+i.scrollLeft-Zs(n,l),u=l.top+i.scrollTop;return{x:r,y:u}}function UE(n){let{elements:i,rect:l,offsetParent:r,strategy:u}=n;const f=u==="fixed",d=_o(r),m=i?Ps(i.floating):!1;if(r===d||m&&f)return l;let h={scrollLeft:0,scrollTop:0},p=Oo(1);const y=Oo(0),v=dt(r);if((v||!f)&&((Qt(r)!=="body"||Vl(d))&&(h=Ys(r)),v)){const w=Bi(r);p=Na(r),y.x=w.x+r.clientLeft,y.y=w.y+r.clientTop}const S=d&&!v&&!f?Av(d,h):Oo(0);return{width:l.width*p.x,height:l.height*p.y,x:l.x*p.x-h.scrollLeft*p.x+y.x+S.x,y:l.y*p.y-h.scrollTop*p.y+y.y+S.y}}function BE(n){return n.getClientRects?Array.from(n.getClientRects()):[]}function IE(n){const i=Ys(n),l=n.ownerDocument.body,r=Co(n.scrollWidth,n.clientWidth,l.scrollWidth,l.clientWidth),u=Co(n.scrollHeight,n.clientHeight,l.scrollHeight,l.clientHeight);let f=-i.scrollLeft+Zs(n);const d=-i.scrollTop;return Sn(l).direction==="rtl"&&(f+=Co(n.clientWidth,l.clientWidth)-r),{width:r,height:u,x:f,y:d}}const PE=25;function YE(n,i,l){l===void 0&&(l="viewport");const r=l==="layoutViewport",u=yt(n),f=_o(n),d=u.visualViewport;let m=f.clientWidth,h=f.clientHeight,p=0,y=0;if(d){const S=!Cd()||i==="fixed";r?S||(p=-d.offsetLeft,y=-d.offsetTop):(m=d.width,h=d.height,S&&(p=d.offsetLeft,y=d.offsetTop))}if(Zs(f)<=0){const S=f.ownerDocument,w=S.body,T=getComputedStyle(w),C=S.compatMode==="CSS1Compat"&&parseFloat(T.marginLeft)+parseFloat(T.marginRight)||0,O=Math.abs(f.clientWidth-w.clientWidth-C),A=getComputedStyle(f).scrollbarGutter==="stable both-edges"?O/2:O;A<=PE&&(m-=A)}return{width:m,height:h,x:p,y}}function qE(n,i){const l=Bi(n,!0,i==="fixed"),r=l.top+n.clientTop,u=l.left+n.clientLeft,f=Na(n),d=n.clientWidth*f.x,m=n.clientHeight*f.y,h=u*f.x,p=r*f.y;return{width:d,height:m,x:h,y:p}}function Gy(n,i,l){let r;if(i==="viewport"||i==="layoutViewport")r=YE(n,l,i);else if(i==="document")r=IE(_o(n));else if(Je(i))r=qE(i,l);else{const u=Ov(n);r={x:i.x-u.x,y:i.y-u.y,width:i.width,height:i.height}}return Os(r)}function VE(n,i){const l=i.get(n);if(l)return l;let r=Il(n,[],!1).filter(m=>Je(m)&&Qt(m)!=="body"),u=null;const f=Sn(n).position==="fixed";let d=f?Do(n):n;for(;Je(d)&&!Ro(d);){const m=Sn(d),h=Rd(d),p=u?u.position:f?"fixed":"";!h&&(p==="fixed"||p==="absolute"&&m.position==="static")?r=r.filter(v=>v!==d):u=m,d=Do(d)}return i.set(n,r),r}function GE(n){let{element:i,boundary:l,rootBoundary:r,strategy:u}=n;const d=[...l==="clippingAncestors"?Ps(i)?[]:VE(i,this._c):[].concat(l),r],m=Gy(i,d[0],u);let h=m.top,p=m.right,y=m.bottom,v=m.left;for(let S=1;S<d.length;S++){const w=Gy(i,d[S],u);h=Co(w.top,h),p=ka(w.right,p),y=ka(w.bottom,y),v=Co(w.left,v)}return{width:p-v,height:y-h,x:v,y:h}}function XE(n){const{width:i,height:l}=Cv(n);return{width:i,height:l}}function FE(n,i,l){const r=dt(i),u=_o(i),f=l==="fixed",d=Bi(n,!0,f,i);let m={scrollLeft:0,scrollTop:0};const h=Oo(0);if((r||!f)&&((Qt(i)!=="body"||Vl(u))&&(m=Ys(i)),r)){const S=Bi(i,!0,f,i);h.x=S.x+i.clientLeft,h.y=S.y+i.clientTop}!r&&u&&(h.x=Zs(u));const p=u&&!r&&!f?Av(u,m):Oo(0),y=d.left+m.scrollLeft-h.x-p.x,v=d.top+m.scrollTop-h.y-p.y;return{x:y,y:v,width:d.width,height:d.height}}function Af(n){return Sn(n).position==="static"}function Xy(n,i){if(!dt(n)||Sn(n).position==="fixed")return null;if(i)return i(n);let l=n.offsetParent;return _o(n)===l&&(l=l.ownerDocument.body),l}function Mv(n,i){const l=yt(n);if(Ps(n))return l;if(!dt(n)){let u=Do(n);for(;u&&!Ro(u);){if(Je(u)&&!Af(u))return u;u=Do(u)}return l}let r=Xy(n,i);for(;r&&XT(r)&&Af(r);)r=Xy(r,i);return r&&Ro(r)&&Af(r)&&!Rd(r)?l:r||QT(n)||l}const KE=async function(n){const i=this.getOffsetParent||Mv,l=this.getDimensions,r=await l(n.floating);return{reference:FE(n.reference,await i(n.floating),n.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function QE(n){return Sn(n).direction==="rtl"}const ZE={convertOffsetParentRelativeRectToViewportRelativeRect:UE,getDocumentElement:_o,getClippingRect:GE,getOffsetParent:Mv,getElementRects:KE,getClientRects:BE,getDimensions:XE,getScale:Na,isElement:Je,isRTL:QE};function Dv(n,i){return n.x===i.x&&n.y===i.y&&n.width===i.width&&n.height===i.height}function WE(n,i,l){let r=null,u;const f=_o(n);function d(){var y;clearTimeout(u),(y=r)==null||y.disconnect(),r=null}function m(y,v){y===void 0&&(y=!1),v===void 0&&(v=1),d();const S=n.getBoundingClientRect(),{left:w,top:T,width:C,height:O}=S;if(y||i(),!C||!O)return;const A=cs(T),N=cs(f.clientWidth-(w+C)),M=cs(f.clientHeight-(T+O)),D=cs(w),L={rootMargin:-A+"px "+-N+"px "+-M+"px "+-D+"px",threshold:Co(0,ka(1,v))||1};let j=!0;function H(J){const $=J[0].intersectionRatio;if(!Dv(S,n.getBoundingClientRect()))return m();if($!==v){if(!j)return m();$?m(!1,$):u=setTimeout(()=>{m(!1,1e-7)},1e3)}j=!1}try{r=new IntersectionObserver(H,{...L,root:f.ownerDocument})}catch{r=new IntersectionObserver(H,L)}r.observe(n)}const h=yt(n),p=()=>m(l);return h.addEventListener("resize",p),m(!0),()=>{h.removeEventListener("resize",p),d()}}function Fy(n,i,l,r){r===void 0&&(r={});const{ancestorScroll:u=!0,ancestorResize:f=!0,elementResize:d=typeof ResizeObserver=="function",layoutShift:m=typeof IntersectionObserver=="function",animationFrame:h=!1}=r,p=Vd(n),y=u||f?[...p?Il(p):[],...i?Il(i):[]]:[];y.forEach(A=>{u&&A.addEventListener("scroll",l),f&&A.addEventListener("resize",l)});const v=p&&m?WE(p,l,f):null;let S=-1,w=null;d&&(w=new ResizeObserver(A=>{let[N]=A;N&&N.target===p&&w&&i&&(w.unobserve(i),cancelAnimationFrame(S),S=requestAnimationFrame(()=>{var M;(M=w)==null||M.observe(i)})),l()}),p&&!h&&w.observe(p),i&&w.observe(i));let T,C=h?Bi(n):null;h&&O();function O(){const A=Bi(n);C&&!Dv(C,A)&&l(),C=A,T=requestAnimationFrame(O)}return l(),()=>{var A;y.forEach(N=>{u&&N.removeEventListener("scroll",l),f&&N.removeEventListener("resize",l)}),v?.(),(A=w)==null||A.disconnect(),w=null,h&&cancelAnimationFrame(T)}}const JE=zE,$E=_E,ew=DE,tw=jE,nw=kE,ow=(n,i,l)=>{const r=new Map,u=l??{},f={...ZE,...u.platform,_c:r};return ME(n,i,{...u,platform:f})};var iw=typeof document<"u",aw=function(){},xs=iw?b.useLayoutEffect:aw;function Ds(n,i){if(n===i)return!0;if(typeof n!=typeof i)return!1;if(typeof n=="function"&&n.toString()===i.toString())return!0;let l,r,u;if(n&&i&&typeof n=="object"){if(Array.isArray(n)){if(l=n.length,l!==i.length)return!1;for(r=l;r--!==0;)if(!Ds(n[r],i[r]))return!1;return!0}if(u=Object.keys(n),l=u.length,l!==Object.keys(i).length)return!1;for(r=l;r--!==0;)if(!{}.hasOwnProperty.call(i,u[r]))return!1;for(r=l;r--!==0;){const f=u[r];if(!(f==="_owner"&&n.$$typeof)&&!Ds(n[f],i[f]))return!1}return!0}return n!==n&&i!==i}function Nv(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function Ky(n,i){const l=Nv(n);return Math.round(i*l)/l}function Mf(n){const i=b.useRef(n);return xs(()=>{i.current=n}),i}function lw(n){n===void 0&&(n={});const{placement:i="bottom",strategy:l="absolute",middleware:r=[],platform:u,elements:{reference:f,floating:d}={},transform:m=!0,whileElementsMounted:h,open:p}=n,[y,v]=b.useState({x:0,y:0,strategy:l,placement:i,middlewareData:{},isPositioned:!1}),[S,w]=b.useState(r);Ds(S,r)||w(r);const[T,C]=b.useState(null),[O,A]=b.useState(null),N=b.useCallback(P=>{P!==L.current&&(L.current=P,C(P))},[]),M=b.useCallback(P=>{P!==j.current&&(j.current=P,A(P))},[]),D=f||T,k=d||O,L=b.useRef(null),j=b.useRef(null),H=b.useRef(y),J=h!=null,$=Mf(h),Q=Mf(u),I=Mf(p),ee=b.useCallback(()=>{if(!L.current||!j.current)return;const P={placement:i,strategy:l,middleware:S};Q.current&&(P.platform=Q.current),ow(L.current,j.current,P).then(K=>{const ne={...K,isPositioned:I.current!==!1};ie.current&&!Ds(H.current,ne)&&(H.current=ne,Xn.flushSync(()=>{v(ne)}))})},[S,i,l,Q,I]);xs(()=>{p===!1&&H.current.isPositioned&&(H.current.isPositioned=!1,v(P=>({...P,isPositioned:!1})))},[p]);const ie=b.useRef(!1);xs(()=>(ie.current=!0,()=>{ie.current=!1}),[]),xs(()=>{if(D&&(L.current=D),k&&(j.current=k),D&&k){if($.current)return $.current(D,k,ee);ee()}},[D,k,ee,$,J]);const F=b.useMemo(()=>({reference:L,floating:j,setReference:N,setFloating:M}),[N,M]),z=b.useMemo(()=>({reference:D,floating:k}),[D,k]),q=b.useMemo(()=>{const P={position:l,left:0,top:0};if(!z.floating)return P;const K=Ky(z.floating,y.x),ne=Ky(z.floating,y.y);return m?{...P,transform:"translate("+K+"px, "+ne+"px)",...Nv(z.floating)>=1.5&&{willChange:"transform"}}:{position:l,left:K,top:ne}},[l,m,z.floating,y.x,y.y]);return b.useMemo(()=>({...y,update:ee,refs:F,elements:z,floatingStyles:q}),[y,ee,F,z,q])}const rw=(n,i)=>{const l=JE(n);return{name:l.name,fn:l.fn,options:[n,i]}},sw=(n,i)=>{const l=$E(n);return{name:l.name,fn:l.fn,options:[n,i]}},uw=(n,i)=>({fn:nw(n).fn,options:[n,i]}),cw=(n,i)=>{const l=ew(n);return{name:l.name,fn:l.fn,options:[n,i]}},fw=(n,i)=>{const l=tw(n);return{name:l.name,fn:l.fn,options:[n,i]}};var Df={exports:{}},Nf={};var Qy;function dw(){if(Qy)return Nf;Qy=1;var n=ql();function i(v,S){return v===S&&(v!==0||1/v===1/S)||v!==v&&S!==S}var l=typeof Object.is=="function"?Object.is:i,r=n.useState,u=n.useEffect,f=n.useLayoutEffect,d=n.useDebugValue;function m(v,S){var w=S(),T=r({inst:{value:w,getSnapshot:S}}),C=T[0].inst,O=T[1];return f(function(){C.value=w,C.getSnapshot=S,h(C)&&O({inst:C})},[v,w,S]),u(function(){return h(C)&&O({inst:C}),v(function(){h(C)&&O({inst:C})})},[v]),d(w),w}function h(v){var S=v.getSnapshot;v=v.value;try{var w=S();return!l(v,w)}catch{return!0}}function p(v,S){return S()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p:m;return Nf.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:y,Nf}var Zy;function zv(){return Zy||(Zy=1,Df.exports=dw()),Df.exports}var Gd=zv(),zf={exports:{}},_f={};var Wy;function pw(){if(Wy)return _f;Wy=1;var n=ql(),i=zv();function l(p,y){return p===y&&(p!==0||1/p===1/y)||p!==p&&y!==y}var r=typeof Object.is=="function"?Object.is:l,u=i.useSyncExternalStore,f=n.useRef,d=n.useEffect,m=n.useMemo,h=n.useDebugValue;return _f.useSyncExternalStoreWithSelector=function(p,y,v,S,w){var T=f(null);if(T.current===null){var C={hasValue:!1,value:null};T.current=C}else C=T.current;T=m(function(){function A(L){if(!N){if(N=!0,M=L,L=S(L),w!==void 0&&C.hasValue){var j=C.value;if(w(j,L))return D=j}return D=L}if(j=D,r(M,L))return j;var H=S(L);return w!==void 0&&w(j,H)?(M=L,j):(M=L,D=H)}var N=!1,M,D,k=v===void 0?null:v;return[function(){return A(y())},k===null?void 0:function(){return A(k())}]},[y,v,S,w]);var O=u(p,T[0],T[1]);return d(function(){C.hasValue=!0,C.value=O},[O]),h(O),O},_f}var Jy;function hw(){return Jy||(Jy=1,zf.exports=pw()),zf.exports}var gw=hw();const mw=Ud(19),yw=mw?vw:Sw;function _v(n,i,l,r,u){return yw(n,i,l,r,u)}function bw(n,i,l,r,u){const f=b.useCallback(()=>i(n.getSnapshot(),l,r,u),[n,i,l,r,u]);return Gd.useSyncExternalStore(n.subscribe,f,f)}kT({before(n){n.syncIndex=0,n.didInitialize||(n.syncTick=1,n.syncHooks=[],n.didChangeStore=!0,n.getSnapshot=()=>{let i=!1;for(let l=0;l<n.syncHooks.length;l+=1){const r=n.syncHooks[l],u=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,u)||(i=!0,r.value=u)}return i&&(n.syncTick+=1),n.syncTick})},after(n){n.syncHooks.length>0&&(n.didChangeStore&&(n.didChangeStore=!1,n.subscribe=i=>{const l=new Set;for(const u of n.syncHooks)l.add(u.store);const r=[];for(const u of l)r.push(u.subscribe(i));return()=>{for(const u of r)u()}}),Gd.useSyncExternalStore(n.subscribe,n.getSnapshot,n.getSnapshot))}});function vw(n,i,l,r,u){const f=_T();if(!f)return bw(n,i,l,r,u);const d=f.syncIndex;f.syncIndex+=1;let m;return f.didInitialize?(m=f.syncHooks[d],(m.store!==n||m.selector!==i||!Object.is(m.a1,l)||!Object.is(m.a2,r)||!Object.is(m.a3,u))&&(m.store!==n&&(f.didChangeStore=!0),m.store=n,m.selector=i,m.a1=l,m.a2=r,m.a3=u,m.value=i(n.getSnapshot(),l,r,u))):(m={store:n,selector:i,a1:l,a2:r,a3:u,value:i(n.getSnapshot(),l,r,u)},f.syncHooks.push(m)),m.value}function Sw(n,i,l,r,u){return gw.useSyncExternalStoreWithSelector(n.subscribe,n.getSnapshot,n.getSnapshot,f=>i(f,l,r,u))}class xw{static create(i){return new this(i)}constructor(i){this.state=i,this.listeners=new Set,this.updateTick=0}subscribe=i=>(this.listeners.add(i),()=>{this.listeners.delete(i)});getSnapshot=()=>this.state;setState(i){if(this.state===i)return;this.state=i,this.updateTick+=1;const l=this.updateTick;for(const r of this.listeners){if(l!==this.updateTick)return;r(i)}}update(i){for(const l in i)if(!Object.is(this.state[l],i[l])){this.setState({...this.state,...i});return}}set(i,l){Object.is(this.state[i],l)||this.setState({...this.state,[i]:l})}notifyAll(){const i={...this.state};this.setState(i)}use(i,l,r,u){return _v(this,i,l,r,u)}}class Xl extends xw{constructor(i,l={},r){super(i),this.context=l,this.selectors=r}useSyncedValue(i,l){b.useDebugValue(i);const r=this;Se(()=>{r.state[i]!==l&&r.set(i,l)},[r,i,l])}useSyncedValueWithCleanup(i,l){const r=this;Se(()=>(r.state[i]!==l&&r.set(i,l),()=>{r.set(i,void 0)}),[r,i,l])}useSyncedValues(i){const l=this,r=Object.values(i);Se(()=>{l.update(i)},[l,...r])}useControlledProp(i,l){b.useDebugValue(i);const r=this,u=l!==void 0;Se(()=>{u&&!Object.is(r.state[i],l)&&r.setState({...r.state,[i]:l})},[r,i,l,u])}select(i,l,r,u){const f=this.selectors[i];return f(this.state,l,r,u)}useState(i,l,r,u){return b.useDebugValue(i),_v(this,this.selectors[i],l,r,u)}useContextCallback(i,l){b.useDebugValue(i);const r=Oe(l??vd);this.context[i]=r}useStateSetter(i){const l=b.useRef(void 0);return l.current===void 0&&(l.current=r=>{this.set(i,r)}),l.current}observe(i,l){let r;typeof i=="function"?r=i:r=this.selectors[i];let u=r(this.state);return l(u,u,this),this.subscribe(f=>{const d=r(f);if(!Object.is(u,d)){const m=u;u=d,l(d,m,this)}})}}const Tw={open:n=>n.open,transitionStatus:n=>n.transitionStatus,domReferenceElement:n=>n.domReferenceElement,referenceElement:n=>n.positionReference??n.referenceElement,floatingElement:n=>n.floatingElement,floatingId:n=>n.floatingId};class kv extends Xl{constructor(i){const{syncOnly:l,nested:r,onOpenChange:u,triggerElements:f,...d}=i;super({...d,positionReference:d.referenceElement,domReferenceElement:d.referenceElement},{onOpenChange:u,dataRef:{current:{}},events:Sv(),nested:r,triggerElements:f},Tw),this.syncOnly=l}syncOpenEvent=(i,l)=>{(!i||!this.state.open||l!=null&&GT(l))&&(this.context.dataRef.current.openEvent=i?l:void 0)};dispatchOpenChange=(i,l)=>{this.syncOpenEvent(i,l.event);const r={open:i,reason:l.reason,nativeEvent:l.event,nested:this.context.nested,triggerElement:l.trigger};this.context.events.emit("openchange",r)};setOpen=(i,l)=>{if(this.syncOnly){this.context.onOpenChange?.(i,l);return}this.dispatchOpenChange(i,l),this.context.onOpenChange?.(i,l)}}function jv(n){const{popupStore:i,treatPopupAsFloatingElement:l=!1,floatingRootContext:r,floatingId:u,nested:f,onOpenChange:d}=n,m=i.useState("open"),h=i.useState("activeTriggerElement"),p=i.useState(l?"popupElement":"positionerElement"),y=i.context.triggerElements,v=d,S=b.useRef(null);r===void 0&&S.current===null&&(S.current=new kv({open:m,transitionStatus:void 0,referenceElement:h,floatingElement:p,triggerElements:y,onOpenChange:v,floatingId:u,syncOnly:!0,nested:f}));const w=r??S.current;return i.useSyncedValue("floatingId",u),Se(()=>{const T={open:m,floatingId:u,referenceElement:h,floatingElement:p};Je(h)&&(T.domReferenceElement=h),w.state.positionReference===w.state.referenceElement&&(T.positionReference=h),w.update(T)},[m,u,h,p,w]),w.context.onOpenChange=v,w.context.nested=f,w}function Hv(n,i=!1,l=!1,r=!1){const[u,f]=b.useState(n&&i?"idle":void 0),[d,m]=b.useState(n&&!r);return n&&!d&&(m(!0),f("starting")),!n&&d&&u!=="ending"&&!l&&f("ending"),!n&&!d&&u==="ending"&&f(void 0),Se(()=>{if(!n&&d&&u!=="ending"&&l){const h=eo.request(()=>{f("ending")});return()=>{eo.cancel(h)}}},[n,d,u,l]),Se(()=>{if(!n||i)return;const h=eo.request(()=>{f(void 0)});return()=>{eo.cancel(h)}},[i,n]),Se(()=>{if(!n||!i)return;n&&d&&u!=="idle"&&f("starting");const h=eo.request(()=>{f("idle")});return()=>{eo.cancel(h)}},[i,n,d,u]),{mounted:d,setMounted:m,transitionStatus:u}}let ds=null;function Ew(n){if(!ds){const i=[];ds=i,queueMicrotask(()=>{ds=null,Xn.flushSync(()=>{for(const l of i)l()})})}ds.push(n)}function Xd(n,i=!1,l=!1){const r=Pl();return Oe((u,f=null)=>{r.cancel();const d=xo(n);if(d==null)return;const m=d,h=()=>{if(!l){Xn.flushSync(u);return}Ew(()=>{f?.aborted||u()})};if(typeof m.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){u();return}function p(){Promise.all(m.getAnimations().map(y=>y.finished)).then(()=>{f?.aborted||h()},()=>{if(f?.aborted)return;if(m.getAnimations().some(v=>v.pending||v.playState!=="finished")){p();return}h()})}if(i){const y=Yb;if(!m.hasAttribute(y)){r.request(p);return}const v=new MutationObserver(()=>{m.hasAttribute(y)||(v.disconnect(),p())});v.observe(m,{attributes:!0,attributeFilter:[y]}),f?.addEventListener("abort",()=>v.disconnect(),{once:!0});return}r.request(p)})}function Ha(n){const{enabled:i=!0,open:l,ref:r,batch:u=!1,onComplete:f}=n,d=Oe(f),m=Xd(r,l,u);b.useEffect(()=>{if(!i)return;const h=new AbortController;return m(d,h.signal),()=>{h.abort()}},[i,l,d,m])}const Fd={tabIndex:-1,[Qf]:""};function ww(n){return i=>i==="touch"?n.current:!0}function Lv(n,i=!1){const l=Ui(),r=Ii()!=null,u=Jt(()=>n(l,r)).current;return jv({popupStore:u,treatPopupAsFloatingElement:i,floatingRootContext:u.state.floatingRootContext,floatingId:l,nested:r,onOpenChange:u.setOpen}),u}function Kd({handle:n,store:i}){return Se(()=>n.attachStore(i),[n,i]),null}function $y(n){const i=n.context.triggerElements.size;n.select("open")&&n.state.triggerCount!==i&&n.set("triggerCount",i)}function Rw(n,i){const l=b.useRef(null);return Oe(r=>{const u=l.current;if(u!==null){if(u.element===r&&u.store===i&&u.id===n)return;l.current=null;const f=u.store;f.context.triggerElements.getById(u.id)===u.element&&(f.context.triggerElements.delete(u.id),$y(f))}r!==null&&n!==void 0&&(l.current={store:i,id:n,element:r},i.context.triggerElements.add(n,r),$y(i))})}function Qd(n,i,l,r=!1){let u=n.preventUnmountingOnClose;i?u=!1:r&&(u=!0);const f=l?.id??null;let d=n.activeTriggerId,m=n.activeTriggerElement;return(f||i)&&(d=f,m=l??null),{open:i,preventUnmountingOnClose:u,activeTriggerId:d,activeTriggerElement:m}}function Uv(n){let i=!1;return n.preventUnmountOnClose=()=>{i=!0},()=>i}function Cw(n,i,l,r={}){const u=l.reason,f=u===Lt,d=i&&u===Aa,m=!i&&(u===ja||u===Ks),h=Uv(l);if(n.context.onOpenChange?.(i,l),l.isCanceled)return;r.onBeforeDispatch?.(),n.state.floatingRootContext.dispatchOpenChange(i,l);const p=()=>{const y=Qd(n.state,i,l.trigger,h()),v={...r.extraState,...y};d?v.instantType="focus":m?v.instantType="dismiss":f&&(v.instantType=void 0),n.update(v)};f?Xn.flushSync(p):p()}function Bv(n,i,l,r){const u=l.useState("isMountedByTrigger",n),f=Rw(n,l),d=Oe(h=>{const p=l.select("open"),y=l.select("activeTriggerId");if(y===n){const v={activeTriggerElement:h,...p?r:null};l.update(v);return}if(y==null&&p){const v={activeTriggerId:n??null,activeTriggerElement:h,...r};l.update(v)}}),m=Oe(h=>{f(h),h&&d(h)});return Se(()=>(m(i.current),()=>m(null)),[m,i,l,n]),Se(()=>{if(u){const h={activeTriggerElement:i.current,...r};l.update(h)}},[u,l,i,...Object.values(r)]),{registerTrigger:m,isMountedByThisTrigger:u}}function Zd(n,i={}){const{closeOnActiveTriggerUnmount:l=!1}=i,r=b.useRef(null),u=n.useState("open"),f=n.useState("triggerCount"),d=n.useState("activeTriggerId"),m=n.useState("activeTriggerElement");Se(()=>{if(!u){r.current=null,n.state.triggerCount!==0&&n.set("triggerCount",0);return}const h=n.context.triggerElements.size,p={};n.state.triggerCount!==h&&(p.triggerCount=h);const y=n.select("activeTriggerId");let v=null;if(y){const S=n.context.triggerElements.getById(y);if(S)r.current=y,S!==n.state.activeTriggerElement&&(p.activeTriggerElement=S);else{for(const[w,T]of n.context.triggerElements.entries())if(T===n.state.activeTriggerElement){p.activeTriggerId=w,p.activeTriggerElement=T,r.current=w;break}p.activeTriggerId===void 0&&(r.current===y?v=y:r.current=null)}}else r.current=null;if(!v&&!y&&h===1){const S=n.context.triggerElements.entries().next();if(!S.done){const[w,T]=S.value;p.activeTriggerId=w,p.activeTriggerElement=T,r.current=w}}(p.triggerCount!==void 0||p.activeTriggerId!==void 0||p.activeTriggerElement!==void 0)&&n.update(p),v&&l&&queueMicrotask(()=>{if(n.select("open")&&n.select("activeTriggerId")===v&&!n.context.triggerElements.getById(v)){const S=Ke(Fs);n.setOpen(!1,S),S.isCanceled||n.update({activeTriggerId:null,activeTriggerElement:null})}})},[u,n,f,d,m,l])}function Wd(n,i,l,r){const{mounted:u,setMounted:f,transitionStatus:d}=Hv(n,!1,!1,r),m=i.useState("preventUnmountingOnClose"),h=n?!1:m;i.useSyncedValues({mounted:u,transitionStatus:d,preventUnmountingOnClose:h});const p=Oe(()=>{f(!1),i.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),l?.(),i.context.onOpenChangeComplete?.(!1)});return Ha({enabled:u&&!n&&!h,open:n,ref:i.context.popupRef,onComplete(){n||p()}}),{forceUnmount:p,transitionStatus:d}}function Jd(n,i){n.useSyncedValues(i),Se(()=>()=>{n.update({activeTriggerProps:Rt,inactiveTriggerProps:Rt,popupProps:Rt})},[n])}function Ow(n,i){Se(()=>{!i&&n.state.openMethod!==null&&n.set("openMethod",null)},[i,n]),Se(()=>()=>{n.state.openMethod!==null&&n.set("openMethod",null)},[n])}class $d{constructor(){this.idMap=new Map}add(i,l){this.idMap.set(i,l)}delete(i){this.idMap.delete(i)}hasElement(i){for(const l of this.idMap.values())if(l===i)return!0;return!1}hasMatchingElement(i){for(const l of this.idMap.values())if(i(l))return!0;return!1}getById(i){return this.idMap.get(i)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}}function ep(n,i,l=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new kv({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:n,floatingId:i,syncOnly:!0,nested:l,onOpenChange:void 0}),floatingId:i,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:Rt,inactiveTriggerProps:Rt,popupProps:Rt}}const Ul=n=>n.triggerIdProp??n.activeTriggerId,tp=n=>n.openProp??n.open,eb=n=>(n.popupElement?.id??n.floatingId)||void 0;function Iv(n,i){return i!==void 0&&tp(n)&&Ul(n)===i}function Aw(n,i){return Iv(n,i)?!0:i!==void 0&&tp(n)&&Ul(n)==null&&n.triggerCount===1}const np={open:tp,mounted:n=>n.mounted,transitionStatus:n=>n.transitionStatus,floatingRootContext:n=>n.floatingRootContext,triggerCount:n=>n.triggerCount,preventUnmountingOnClose:n=>n.preventUnmountingOnClose,payload:n=>n.payload,activeTriggerId:Ul,activeTriggerElement:n=>n.mounted?n.activeTriggerElement:null,popupId:eb,isTriggerActive:(n,i)=>i!==void 0&&Ul(n)===i,isOpenedByTrigger:(n,i)=>Iv(n,i),isMountedByTrigger:(n,i)=>i!==void 0&&Ul(n)===i&&n.mounted,triggerProps:(n,i)=>i?n.activeTriggerProps:n.inactiveTriggerProps,triggerPopupId:(n,i)=>Aw(n,i)?eb(n):void 0,popupProps:n=>n.popupProps,popupElement:n=>n.popupElement,positionerElement:n=>n.positionerElement};function Pv(n){const i=b.useCallback(r=>n===void 0?vd:n.subscribeStore(r),[n]),l=b.useCallback(()=>n===void 0?void 0:n.store,[n]);return Gd.useSyncExternalStore(i,l,()=>n?.serverStore)}function Mw(n){return Dw(n,n.rootContext)}function Dw(n,i){const{nodeId:l,externalTree:r}=n,u=i.useState("referenceElement"),f=i.useState("floatingElement"),d=i.useState("domReferenceElement"),m=i.useState("open"),h=i.useState("floatingId"),[p,y]=b.useState(null),[v,S]=b.useState(void 0),[w,T]=b.useState(void 0),C=b.useRef(null),O=hi(r),A=b.useMemo(()=>({reference:u,floating:f,domReference:d}),[u,f,d]),N=lw({...n,elements:{...A,...p&&{reference:p}}}),M=Je(v)?v:null,D=w===void 0?i.state.floatingElement:w;i.useSyncedValue("referenceElement",v??null),i.useSyncedValue("domReferenceElement",v===void 0?d:M),i.useSyncedValue("floatingElement",D);const k=b.useCallback(Q=>{const I=Je(Q)?{getBoundingClientRect:()=>Q.getBoundingClientRect(),getClientRects:()=>Q.getClientRects(),contextElement:Q}:Q;y(I),N.refs.setReference(I)},[N.refs]),L=b.useCallback(Q=>{(Je(Q)||Q===null)&&(C.current=Q,S(Q)),(Je(N.refs.reference.current)||N.refs.reference.current===null||Q!==null&&!Je(Q))&&N.refs.setReference(Q)},[N.refs,S]),j=b.useCallback(Q=>{T(Q),N.refs.setFloating(Q)},[N.refs]),H=b.useMemo(()=>({...N.refs,setReference:L,setFloating:j,setPositionReference:k,domReference:C}),[N.refs,L,j,k]),J=b.useMemo(()=>({...N.elements,domReference:d}),[N.elements,d]),$=b.useMemo(()=>({...N,dataRef:i.context.dataRef,open:m,onOpenChange:i.setOpen,events:i.context.events,floatingId:h,refs:H,elements:J,nodeId:l,rootStore:i}),[N,H,J,l,i,m,h]);return Se(()=>{d&&(C.current=d)},[d]),Se(()=>{i.context.dataRef.current.floatingContext=$;const Q=O?.nodesRef.current.find(I=>I.id===l);Q&&(Q.context=$)}),b.useMemo(()=>({...N,context:$,refs:H,elements:J,rootStore:i}),[N,H,J,$,i])}const kf=Sd&&pi;function Yv(n,i={}){const{enabled:l=!0,delay:r}=i,u="rootStore"in n?n.rootStore:n,{events:f,dataRef:d}=u.context,m=b.useRef(!1),h=b.useRef(null),p=b.useRef(!0),y=$t();b.useEffect(()=>{const S=u.select("domReferenceElement");if(!l)return;const w=yt(S);function T(){const A=u.select("domReferenceElement");!u.select("open")&&dt(A)&&A===kt(Fe(A))&&(m.current=!0,h.current=A)}function C(){p.current=!0}function O(){p.current=!1}return Gn(Pe(w,"blur",T),kf&&Pe(w,"keydown",C,!0),kf&&Pe(w,"pointerdown",O,!0))},[u,l]),b.useEffect(()=>{if(!l)return;function S(w){if(w.reason===ja||w.reason===Ks){const T=u.select("domReferenceElement");Je(T)&&(h.current=T,m.current=!0)}}return f.on("openchange",S),()=>{f.off("openchange",S)}},[f,l,u]);const v=b.useMemo(()=>{function S(){m.current=!1,h.current=null}return{onMouseLeave(){S()},onFocus(w){const T=w.currentTarget;if(m.current){if(h.current===T)return;S()}const C=St(w.nativeEvent);if(Je(C)){if(kf&&!w.relatedTarget){if(!p.current&&!Xs(C))return}else if(!ws(C))return}const O=Es(w.relatedTarget,u.context.triggerElements),{nativeEvent:A,currentTarget:N}=w,M=typeof r=="function"?r():r;if(u.select("open")&&O||M===0||M===void 0){u.setOpen(!0,Ke(Aa,A,N));return}y.start(M,()=>{m.current||u.setOpen(!0,Ke(Aa,A,N))})},onBlur(w){S();const T=w.relatedTarget,C=w.nativeEvent,O=Je(T)&&T.hasAttribute(Yl("focus-guard"))&&T.getAttribute("data-type")==="outside";y.start(0,()=>{const A=u.select("domReferenceElement"),N=kt(Fe(A));!T&&N===A||Ne(d.current.floatingContext?.refs.floating.current,N)||Ne(A,N)||O||Es(T??N,u.context.triggerElements)||u.setOpen(!1,Ke(Aa,C))})}}},[d,r,u,y]);return b.useMemo(()=>l?{reference:v,trigger:v}:{},[l,v])}class op{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new vn,this.restTimeout=new vn,this.handleCloseOptions=void 0}static create(){return new op}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose}const Ns=new WeakMap;function zs(n){if(!n.performedPointerEventsMutation)return;const i=n.pointerEventsScopeElement;i&&Ns.get(i)===n&&(n.pointerEventsScopeElement?.style.removeProperty("pointer-events"),n.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),n.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),Ns.delete(i)),n.performedPointerEventsMutation=!1,n.pointerEventsScopeElement=null,n.pointerEventsReferenceElement=null,n.pointerEventsFloatingElement=null}function qv(n,i){const{scopeElement:l,referenceElement:r,floatingElement:u}=i,f=Ns.get(l);f&&f!==n&&zs(f),zs(n),n.performedPointerEventsMutation=!0,n.pointerEventsScopeElement=l,n.pointerEventsReferenceElement=r,n.pointerEventsFloatingElement=u,Ns.set(l,n),l.style.pointerEvents="none",r.style.pointerEvents="auto",u.style.pointerEvents="auto"}function ip(n){const i=n.context.dataRef.current,l=Jt(()=>i.hoverInteractionState??op.create()).current;return i.hoverInteractionState||(i.hoverInteractionState=l),Ls(i.hoverInteractionState.disposeEffect),i.hoverInteractionState}function Vv(n,i={}){const{enabled:l=!0,closeDelay:r=0,nodeId:u}=i,f="rootStore"in n?n.rootStore:n,d=f.useState("open"),m=f.useState("floatingElement"),h=f.useState("domReferenceElement"),{dataRef:p}=f.context,y=hi(),v=Ii(),S=ip(f),w=$t(),T=Oe(()=>Vb(p.current.openEvent?.type,S.interactedInside)),C=Oe(()=>d1(p.current.openEvent?.type)),O=Oe(()=>{zs(S)});Se(()=>{d||(S.pointerType=void 0,S.restTimeoutPending=!1,S.interactedInside=!1,O())},[d,S,O]),b.useEffect(()=>O,[O]),Se(()=>{if(l&&d&&S.handleCloseOptions?.blockPointerEvents&&C()&&Je(h)&&m){const A=h,N=m,M=Fe(m),D=y?.nodesRef.current.find(H=>H.id===v)?.context?.elements.floating;D&&(D.style.pointerEvents="");const k=S.pointerEventsScopeElement!==N?S.pointerEventsScopeElement:null,L=D!==N?D:null,j=S.handleCloseOptions?.getScope?.()??k??L??A.closest("[data-rootownerid]")??M.body;return qv(S,{scopeElement:j,referenceElement:A,floatingElement:N}),()=>{O()}}},[l,d,h,m,S,C,y,v,O]),b.useEffect(()=>{if(!l)return;function A(){return!!(y&&v&&di(y.nodesRef.current,v).length>0)}function N(H){const J=ji(r,"close",S.pointerType),$=()=>{f.setOpen(!1,Ke(Lt,H)),y?.events.emit("floating.closed",H)};J?S.openChangeTimeout.start(J,$):(S.openChangeTimeout.clear(),$())}function M(H){const J=St(H);if(!c1(J)){S.interactedInside=!1;return}S.interactedInside=J?.closest("[aria-haspopup]")!=null}function D(){S.openChangeTimeout.clear(),w.clear(),y?.events.off("floating.closed",L),O()}function k(H){if(A()&&y){y.events.on("floating.closed",L);return}if(Es(H.relatedTarget,f.context.triggerElements))return;const J=p.current.floatingContext?.nodeId??u,$=H.relatedTarget;if(!(y&&J&&Je($)&&di(y.nodesRef.current,J,!1).some(I=>Ne(I.context?.elements.floating,$)))){if(S.handler){S.handler(H);return}O(),C()&&!T()&&N(H)}}function L(H){!y||!v||A()||w.start(0,()=>{y.events.off("floating.closed",L),f.setOpen(!1,Ke(Lt,H)),y.events.emit("floating.closed",H)})}const j=m;return Gn(j&&Pe(j,"mouseenter",D),j&&Pe(j,"mouseleave",k),j&&Pe(j,"pointerdown",M,!0),()=>{y?.events.off("floating.closed",L)})},[l,m,f,p,r,u,C,T,O,S,y,v,w])}const Nw={current:null};function Gv(n,i={}){const{enabled:l=!0,delay:r=0,handleClose:u=null,mouseOnly:f=!1,restMs:d=0,move:m=!0,triggerElementRef:h=Nw,externalTree:p,isActiveTrigger:y=!0,getHandleCloseContext:v,isClosing:S,shouldOpen:w,guardStaleOpen:T=!1}=i,C="rootStore"in n?n.rootStore:n,{dataRef:O,events:A}=C.context,N=hi(p),M=ip(C),D=b.useRef(!1),k=jt(u),L=jt(r),j=jt(d),H=jt(l),J=jt(w),$=jt(S),Q=Oe(()=>Vb(O.current.openEvent?.type,M.interactedInside)),I=Oe(()=>J.current?.()!==!1),ee=Oe((z,q,P)=>{const K=C.context.triggerElements;if(K.hasElement(q))return!z||!Ne(z,q);if(!Je(P))return!1;const ne=P;return K.hasMatchingElement(R=>Ne(R,ne))&&(!z||!Ne(z,ne))}),ie=Oe(()=>{if(!M.handler)return;Fe(C.select("domReferenceElement")).removeEventListener("mousemove",M.handler),M.handler=void 0}),F=Oe(()=>{zs(M)});return y&&(M.handleCloseOptions=u?.__options),b.useEffect(()=>ie,[ie]),b.useEffect(()=>{if(!l)return;function z(q){q.open?D.current=!1:(D.current=q.reason===Lt,ie(),M.openChangeTimeout.clear(),M.restTimeout.clear(),M.blockMouseMove=!0,M.restTimeoutPending=!1)}return A.on("openchange",z),()=>{A.off("openchange",z)}},[l,A,M,ie]),b.useEffect(()=>{if(!l)return;function z(B,W=!0){const V=ji(L.current,"close",M.pointerType);V?M.openChangeTimeout.start(V,()=>{C.setOpen(!1,Ke(Lt,B)),N?.events.emit("floating.closed",B)}):W&&(M.openChangeTimeout.clear(),C.setOpen(!1,Ke(Lt,B)),N?.events.emit("floating.closed",B))}const q=h.current??(y?C.select("domReferenceElement"):null);if(!Je(q))return;function P(B){if(M.openChangeTimeout.clear(),M.blockMouseMove=!1,f&&!ui(M.pointerType))return;const W=wy(j.current),V=ji(L.current,"open",M.pointerType),oe=St(B),ae=B.currentTarget??null,ge=C.select("domReferenceElement");let ue=ae;if(Je(oe)&&!C.context.triggerElements.hasElement(oe)){for(const Te of C.context.triggerElements.elements())if(Ne(Te,oe)){ue=Te;break}}Je(ae)&&Je(ge)&&!C.context.triggerElements.hasElement(ae)&&Ne(ae,ge)&&(ue=ge);const pe=ue==null?!1:ee(ge,ue,oe),Re=C.select("open"),ke=$.current?.()??C.select("transitionStatus")==="ending",ve=!Re&&ke&&D.current,me=!pe&&Je(ue)&&Je(ge)&&Ne(ge,ue)&&ve,je=W>0&&!V,Le=pe&&(Re||ve)||me,Ve=!Re||pe;if(Le){I()&&C.setOpen(!0,Ke(Lt,B,ue));return}je||(V?M.openChangeTimeout.start(V,()=>{Ve&&I()&&C.setOpen(!0,Ke(Lt,B,ue))}):Ve&&I()&&C.setOpen(!0,Ke(Lt,B,ue)))}function K(B){if(Q()){F();return}ie();const W=C.select("domReferenceElement"),V=Fe(W);M.restTimeout.clear(),M.restTimeoutPending=!1;const oe=O.current.floatingContext??v?.();if(Es(B.relatedTarget,C.context.triggerElements))return;if(k.current&&oe){C.select("open")||M.openChangeTimeout.clear();const ge=h.current;M.handler=k.current({...oe,tree:N,x:B.clientX,y:B.clientY,onClose(){F(),ie(),H.current&&!Q()&&ge===C.select("domReferenceElement")&&z(B,!0)}}),V.addEventListener("mousemove",M.handler),M.handler(B);return}(M.pointerType!=="touch"||!Ne(C.select("floatingElement"),B.relatedTarget))&&z(B)}function ne(B){Ne(q,B.relatedTarget)||(M.openChangeTimeout.clear(),M.restTimeout.clear(),M.restTimeoutPending=!1)}const R=T?Pe(q,"mouseout",ne):void 0;return m?Gn(Pe(q,"mousemove",P,{once:!0}),Pe(q,"mouseenter",P),Pe(q,"mouseleave",K),R):Gn(Pe(q,"mouseenter",P),Pe(q,"mouseleave",K),R)},[ie,F,O,L,C,l,k,M,y,ee,Q,f,m,j,h,N,H,v,$,I,T]),b.useMemo(()=>{if(!l)return;function z(q){M.pointerType=q.pointerType}return{onPointerDown:z,onPointerEnter:z,onMouseMove(q){const{nativeEvent:P}=q,K=q.currentTarget,ne=C.select("domReferenceElement"),R=C.select("open"),B=ee(ne,K,q.target);if(f&&!ui(M.pointerType))return;if(R&&B&&M.handleCloseOptions?.blockPointerEvents){const oe=C.select("floatingElement");if(oe){const ae=M.handleCloseOptions?.getScope?.()??K.ownerDocument.body;qv(M,{scopeElement:ae,referenceElement:K,floatingElement:oe})}}const W=wy(j.current);if(R&&!B||W===0||!B&&M.restTimeoutPending&&q.movementX**2+q.movementY**2<2)return;M.restTimeout.clear();function V(){if(M.restTimeoutPending=!1,Q())return;const oe=C.select("open");!M.blockMouseMove&&(!oe||B)&&I()&&C.setOpen(!0,Ke(Lt,P,K))}M.pointerType==="touch"?Xn.flushSync(()=>{V()}):B&&R?V():(M.restTimeoutPending=!0,M.restTimeout.start(W,V))}}},[l,M,Q,ee,f,C,j,I])}const zw="Escape";function tb(n){return pi&&n.movementX===0&&n.movementY===0}function Ws(n,i,l){switch(n){case"vertical":return i;case"horizontal":return l;default:return i||l}}function ps(n,i){return Ws(i,n===Pb||n===Od,n===qs||n===Vs)}function jf(n,i,l){return Ws(i,n===Od,l?n===qs:n===Vs)||n==="Enter"||n===" "||n===""}function _w(n,i,l){return Ws(i,l?n===qs:n===Vs,n===Od)}function kw(n,i,l,r){const u=l?n===Vs:n===qs,f=n===Pb;return i==="both"||i==="horizontal"&&r?n===zw:Ws(i,u,f)}function jw(n,i){const{listRef:l,activeIndex:r,onNavigate:u=()=>{},enabled:f=!0,selectedIndex:d=null,allowEscape:m=!1,loopFocus:h=!1,nested:p=!1,rtl:y=!1,virtual:v=!1,focusItemOnOpen:S="auto",focusItemOnHover:w=!0,openOnArrowKeyDown:T=!0,disabledIndices:C=void 0,orientation:O="vertical",parentOrientation:A,id:N,resetOnPointerLeave:M=!0,externalTree:D,grid:k}=i,L=k!=null,j="rootStore"in n?n.rootStore:n,H=j.useState("open"),J=j.useState("floatingElement"),$=j.useState("domReferenceElement"),Q=j.context.dataRef,I=Jf(J),ee=Wf($),ie=jt(I),F=Ii(),z=hi(D),q=b.useRef(S),P=b.useRef(d??-1),K=b.useRef(null),ne=b.useRef(!0),R=Oe(fe=>{u(P.current===-1?null:P.current,fe)}),B=b.useRef(!!J),W=b.useRef(H),V=b.useRef(!1),oe=b.useRef(!1),ae=b.useRef(null),ge=jt(C),ue=jt(H),pe=jt(d),Re=jt(M),ke=Pl(),ve=Pl(),me=Oe(()=>{function fe(be){v?z?.events.emit("virtualfocus",be):ae.current=Ss(be,{sync:V.current,preventScroll:!0})}const ye=l.current[P.current],de=oe.current;ye&&fe(ye),(V.current?be=>be():be=>ke.request(be))(()=>{const be=l.current[P.current]||ye;if(!be)return;ye||fe(be),Ee&&(de||!ne.current)&&be.scrollIntoView?.({block:"nearest",inline:"nearest"})})});Se(()=>{Q.current.orientation=O},[Q,O]),Se(()=>{f&&(H&&J?(P.current=d??-1,q.current&&d!=null&&(oe.current=!0,R())):B.current&&(P.current=-1,R()))},[f,H,J,d,R]),Se(()=>{if(f){if(!H){V.current=!1;return}if(J)if(r==null){if(V.current=!1,pe.current!=null)return;if(B.current&&(P.current=-1,me()),(!W.current||!B.current)&&q.current&&(K.current!=null||q.current===!0&&K.current==null)){let fe=0;const ye=()=>{l.current[0]==null?(fe<2&&(fe?le=>ve.request(le):queueMicrotask)(ye),fe+=1):(P.current=K.current==null||jf(K.current,O,y)||p?vs(l):td(l),K.current=null,R())};ye()}}else Ll(l.current,r)||(P.current=r,me(),oe.current=!1)}},[f,H,J,r,pe,p,l,O,y,R,me,ve]),Se(()=>{if(!f||J||!z||v||!B.current)return;const fe=z.nodesRef.current,ye=fe.find(be=>be.id===F)?.context?.elements.floating,de=kt(Fe($??ye??null)),le=fe.some(be=>be.context&&Ne(be.context.elements.floating,de));ye&&!le&&ne.current&&ye.focus({preventScroll:!0})},[f,J,$,z,F,v]),Se(()=>{W.current=H,B.current=!!J}),Se(()=>{H||(K.current=null,q.current=S)},[H,S]);const je=r!=null,Le=Oe(fe=>{if(!ue.current)return;const ye=l.current.indexOf(fe.currentTarget);ye!==-1&&(P.current!==ye||r!==ye)&&(P.current=ye,R(fe))}),Ve=Oe(()=>A??z?.nodesRef.current.find(fe=>fe.id===F)?.context?.dataRef?.current.orientation),Te=Oe(()=>vs(l,ge.current)),Ue=Oe(fe=>{if(ne.current=!1,V.current=!0,fe.which===229||!ue.current&&fe.currentTarget===ie.current)return;if(p&&kw(fe.key,O,y,L)){ps(fe.key,Ve())||$n(fe),j.setOpen(!1,Ke($f,fe.nativeEvent)),dt($)&&(v?z?.events.emit("virtualfocus",$):$.focus());return}const ye=P.current,de=vs(l,C),le=td(l,C);if(ee||(fe.key==="Home"&&($n(fe),P.current=de,R(fe)),fe.key==="End"&&($n(fe),P.current=le,R(fe))),k!=null){const be=k(fe,P.current,l,O,h,y,C,de,le);if(be!=null&&(P.current=be,R(fe)),O==="both")return}if(ps(fe.key,O)){if($n(fe),H&&!v&&kt(fe.currentTarget.ownerDocument)===fe.currentTarget){P.current=jf(fe.key,O,y)?de:le,R(fe);return}jf(fe.key,O,y)?h?ye>=le?m&&ye!==l.current.length?P.current=-1:(V.current=!1,P.current=de):P.current=wo(l.current,{startingIndex:ye,disabledIndices:C}):P.current=Math.min(le,wo(l.current,{startingIndex:ye,disabledIndices:C})):h?ye<=de?m&&ye!==-1?P.current=l.current.length:(V.current=!1,P.current=le):P.current=wo(l.current,{startingIndex:ye,decrement:!0,disabledIndices:C}):P.current=Math.max(de,wo(l.current,{startingIndex:ye,decrement:!0,disabledIndices:C})),Ll(l.current,P.current)&&(P.current=-1),R(fe)}}),Ee=b.useMemo(()=>({onFocus(ye){V.current=!0,Le(ye)},onClick:({currentTarget:ye})=>ye.focus({preventScroll:!0}),onMouseMove(ye){tb(ye)||(V.current=!0,oe.current=!1,w&&Le(ye))},onPointerLeave(ye){if(!ue.current||!ne.current||ye.pointerType==="touch")return;V.current=!0;const de=ye.relatedTarget;if(!(!w||l.current.includes(de))&&Re.current&&(ae.current?.(),ae.current=null,P.current=-1,R(ye),!v)){const le=ie.current,be=kt(Fe(le));le&&Ne(le,be)&&le.focus({preventScroll:!0})}}}),[Le,ue,ie,w,l,R,Re,v]),we=b.useMemo(()=>v&&H&&je&&{"aria-activedescendant":`${N}-${r}`},[v,H,je,N,r]),Ae=b.useMemo(()=>({...ee?{}:we,onKeyDown(fe){if(fe.key==="Tab"&&fe.shiftKey&&H&&!v){const ye=St(fe.nativeEvent);if(ye&&!Ne(ie.current,ye))return;$n(fe),j.setOpen(!1,Ke(_a,fe.nativeEvent)),dt($)&&$.focus();return}Ue(fe)},onPointerMove(fe){tb(fe)||(ne.current=!0)}}),[we,Ue,ie,ee,j,H,v,$]),Qe=b.useMemo(()=>{function fe(le){j.setOpen(!0,Ke($f,le.nativeEvent,le.currentTarget))}function ye(le){S==="auto"&&Td(le.nativeEvent)&&(q.current=!v)}function de(le){q.current=S,S==="auto"&&Ed(le.nativeEvent)&&(q.current=!0)}return{onKeyDown(le){const be=j.select("open");ne.current=!1;const Be=le.key.startsWith("Arrow"),Ut=_w(le.key,Ve(),y),tn=ps(le.key,O),Tt=(p?Ut:tn)||le.key==="Enter"||le.key.trim()==="";if(v&&be)return Ue(le);if(!(!be&&!T&&Be)){if(Tt){const xe=ps(le.key,Ve());K.current=p&&xe?null:le.key}if(p){Ut&&($n(le),be?(P.current=Te(),R(le)):fe(le));return}tn&&(pe.current!=null&&(P.current=pe.current),$n(le),!be&&T?fe(le):Ue(le),be&&R(le))}},onFocus(le){j.select("open")&&!v&&(P.current=-1,R(le))},onPointerDown:de,onPointerEnter:de,onMouseDown:ye,onClick:ye}},[Ue,S,Te,p,R,j,T,O,Ve,y,pe,v]),Me=b.useMemo(()=>({...we,...Qe}),[we,Qe]);return b.useMemo(()=>f?{reference:Me,floating:Ae,item:Ee,trigger:Qe}:{},[f,Me,Ae,Qe,Ee])}function Hw(n,i){const{listRef:l,elementsRef:r,activeIndex:u,onMatch:f,disabledIndices:d,onTyping:m,enabled:h=!0,resetMs:p=750,selectedIndex:y=null}=i,v="rootStore"in n?n.rootStore:n,S=v.useState("open"),w=$t(),T=b.useRef(""),C=b.useRef(y??u??-1),O=b.useRef(null),A=Oe(D=>{function k(ie){return r?.current[ie]}function L(ie){const F=k(ie);return F&&!Qs(F)||F?.matches(":disabled")?!1:d==null||!Ma(Mo,ie,d)}function j(ie,F,z=0){if(ie.length===0)return-1;const q=(z%ie.length+ie.length)%ie.length,P=F.toLowerCase();for(let K=0;K<ie.length;K+=1){const ne=(q+K)%ie.length;if(!(!ie[ne]?.toLowerCase().startsWith(P)||!L(ne)))return ne}return-1}const H=l.current;if(T.current.length>0&&D.key===" "&&($n(D),m?.(!0)),T.current.length>0&&T.current[0]!==" "&&j(H,T.current)===-1&&D.key!==" "&&m?.(!1),H==null||D.key.length!==1||D.ctrlKey||D.metaKey||D.altKey)return;S&&D.key!==" "&&($n(D),m?.(!0));const J=T.current==="";J&&(C.current=y??u??-1),H.every((ie,F)=>ie&&L(F)?ie[0]?.toLowerCase()!==ie[1]?.toLowerCase():!0)&&T.current===D.key&&(T.current="",C.current=O.current),T.current+=D.key,w.start(p,()=>{T.current="",C.current=O.current,m?.(!1)});const I=((J?y??u??-1:C.current)??0)+1,ee=j(H,T.current,I);ee!==-1?(f?.(ee),O.current=ee):D.key!==" "&&(T.current="",m?.(!1))}),N=Oe(D=>{const k=D.relatedTarget,L=v.select("domReferenceElement"),j=v.select("floatingElement");Ne(L,k)||Ne(j,k)||(w.clear(),T.current="",C.current=O.current,m?.(!1))});Se(()=>{!S&&y!==null||(w.clear(),O.current=null,T.current!==""&&(T.current=""))},[S,y,w]);const M=b.useMemo(()=>({onKeyDown:A,onBlur:N}),[A,N]);return b.useMemo(()=>h?{reference:M,floating:M}:{},[h,M])}const nb=.1,Lw=nb*nb,ft=.5;function hs(n,i,l,r,u,f){return r>=i!=f>=i&&n<=(u-l)*(i-r)/(f-r)+l}function gs(n,i,l,r,u,f,d,m,h,p){let y=!1;return hs(n,i,l,r,u,f)&&(y=!y),hs(n,i,u,f,d,m)&&(y=!y),hs(n,i,d,m,h,p)&&(y=!y),hs(n,i,h,p,l,r)&&(y=!y),y}function Uw(n,i,l){return n>=l.x&&n<=l.x+l.width&&i>=l.y&&i<=l.y+l.height}function ms(n,i,l,r,u,f){const d=Math.min(l,u),m=Math.max(l,u),h=Math.min(r,f),p=Math.max(r,f);return n>=d&&n<=m&&i>=h&&i<=p}function Xv(n={}){const{blockPointerEvents:i=!1}=n,l=new vn,r=({x:u,y:f,placement:d,elements:m,onClose:h,nodeId:p,tree:y})=>{const v=d?.split("-")[0];let S=!1,w=null,T=null,C=typeof performance<"u"?performance.now():0;function O(N,M){const D=performance.now(),k=D-C;if(w===null||T===null||k===0)return w=N,T=M,C=D,!1;const L=N-w,j=M-T,H=L*L+j*j,J=k*k*Lw;return w=N,T=M,C=D,H<J}function A(){l.clear(),h()}return function(M){l.clear();const D=m.domReference,k=m.floating;if(!D||!k||v==null||u==null||f==null)return;const{clientX:L,clientY:j}=M,H=St(M),J=M.type==="mouseleave",$=Ne(k,H),Q=Ne(D,H);if($&&(S=!0,!J))return;if(Q&&(S=!1,!J)){S=!0;return}if(J&&Je(M.relatedTarget)&&Ne(k,M.relatedTarget))return;function I(){return!!(y&&di(y.nodesRef.current,p).length>0)}function ee(){I()||A()}if(I())return;const ie=D.getBoundingClientRect(),F=k.getBoundingClientRect(),z=u>F.right-F.width/2,q=f>F.bottom-F.height/2,P=F.width>ie.width,K=F.height>ie.height,ne=(P?ie:F).left,R=(P?ie:F).right,B=(K?ie:F).top,W=(K?ie:F).bottom;if(v==="top"&&f>=ie.bottom-1||v==="bottom"&&f<=ie.top+1||v==="left"&&u>=ie.right-1||v==="right"&&u<=ie.left+1){ee();return}let V=!1;switch(v){case"top":V=ms(L,j,ne,ie.top+1,R,F.bottom-1);break;case"bottom":V=ms(L,j,ne,F.top+1,R,ie.bottom-1);break;case"left":V=ms(L,j,F.right-1,W,ie.left+1,B);break;case"right":V=ms(L,j,ie.right-1,W,F.left+1,B);break}if(V)return;if(S&&!Uw(L,j,ie)){ee();return}if(!J&&O(L,j)){ee();return}let oe=!1;switch(v){case"top":{const ae=P?ft/2:ft*4,ge=P||z?u+ae:u-ae,ue=P?u-ae:z?u+ae:u-ae,pe=f+ft+1,Re=z||P?F.bottom-ft:F.top,ke=z?P?F.bottom-ft:F.top:F.bottom-ft;oe=gs(L,j,ge,pe,ue,pe,F.left,Re,F.right,ke);break}case"bottom":{const ae=P?ft/2:ft*4,ge=P||z?u+ae:u-ae,ue=P?u-ae:z?u+ae:u-ae,pe=f-ft,Re=z||P?F.top+ft:F.bottom,ke=z?P?F.top+ft:F.bottom:F.top+ft;oe=gs(L,j,ge,pe,ue,pe,F.left,Re,F.right,ke);break}case"left":{const ae=K?ft/2:ft*4,ge=K||q?f+ae:f-ae,ue=K?f-ae:q?f+ae:f-ae,pe=u+ft+1,Re=q||K?F.right-ft:F.left,ke=q?K?F.right-ft:F.left:F.right-ft;oe=gs(L,j,Re,F.top,ke,F.bottom,pe,ge,pe,ue);break}case"right":{const ae=K?ft/2:ft*4,ge=K||q?f+ae:f-ae,ue=K?f-ae:q?f+ae:f-ae,pe=u-ft,Re=q||K?F.left+ft:F.right,ke=q?K?F.left+ft:F.right:F.left+ft;oe=gs(L,j,pe,ge,pe,ue,Re,F.top,ke,F.bottom);break}}oe?S||l.start(40,ee):ee()}};return r.__options={...n,blockPointerEvents:i},r}const Bw={...np,disabled:n=>n.disabled,instantType:n=>n.instantType,isInstantPhase:n=>n.isInstantPhase,trackCursorAxis:n=>n.trackCursorAxis,disableHoverablePopup:n=>n.disableHoverablePopup,lastOpenChangeReason:n=>n.openChangeReason,closeOnClick:n=>n.closeOnClick,closeDelay:n=>n.closeDelay,adaptiveOrigin:n=>n.adaptiveOrigin};class Iw extends Xl{constructor(i,l,r){const u=new $d;super(Pw(i,u,l,r),Yw(u),Bw)}setOpen=(i,l)=>{Cw(this,i,l,{extraState:{openChangeReason:l.reason}})};cancelPendingOpen(i){this.state.floatingRootContext.dispatchOpenChange(!1,Ke(ja,i))}}function Pw(n,i,l,r=!1){return{...ep(i,l,r),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,adaptiveOrigin:void 0,...n}}function Yw(n){return{popupRef:b.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:n}}const qw=js(function(i){const{disabled:l=!1,defaultOpen:r=!1,open:u,disableHoverablePopup:f=!1,trackCursorAxis:d="none",actionsRef:m,onOpenChange:h,onOpenChangeComplete:p,handle:y,triggerId:v,defaultTriggerId:S=null,children:w}=i,T=Lv((Q,I)=>new Iw({open:r,openProp:u,activeTriggerId:S,triggerIdProp:v},Q,I));T.useControlledProp("openProp",u),T.useControlledProp("triggerIdProp",v),T.useContextCallback("onOpenChange",h),T.useContextCallback("onOpenChangeComplete",p);const C=T.useState("open"),O=!l&&C,A=T.useState("activeTriggerId"),N=T.useState("mounted"),M=T.useState("payload");T.useSyncedValues({trackCursorAxis:d,disableHoverablePopup:f,disabled:l}),Zd(T,{closeOnActiveTriggerUnmount:!0});const{forceUnmount:D,transitionStatus:k}=Wd(O,T),L=T.useState("isInstantPhase"),j=T.useState("instantType"),H=T.useState("lastOpenChangeReason"),J=b.useRef(null);Se(()=>{C&&l&&T.setOpen(!1,Ke(Xb))},[C,l,T]),Se(()=>{k==="ending"&&H===Fs||k!=="ending"&&L?(j!=="delay"&&(J.current=j),T.set("instantType","delay")):J.current!==null&&(T.set("instantType",J.current),J.current=null)},[k,L,H,j,T]),Se(()=>{O&&A==null&&T.set("payload",void 0)},[T,A,O]),b.useImperativeHandle(m,()=>({unmount:D,close:()=>T.setOpen(!1,Ke(Nd))}),[D,T]);const $=O||N||!l&&d!=="none";return E.jsxs(Ub.Provider,{value:T,children:[y&&E.jsx(Kd,{handle:y,store:T}),$&&E.jsx(Vw,{store:T,disabled:l,trackCursorAxis:d}),typeof w=="function"?w({payload:M}):w]})});function Vw({store:n,disabled:i,trackCursorAxis:l}){const r=n.useState("floatingRootContext"),u=qd(r,{enabled:!i,referencePress:()=>n.select("closeOnClick")}),f=wE(r,{enabled:!i&&l!=="none",axis:l==="none"?void 0:l}),d=b.useMemo(()=>Ao(f.reference,u.reference),[f.reference,u.reference]);return Jd(n,{activeTriggerProps:d,inactiveTriggerProps:d,popupProps:u.floating??Rt}),null}function Pi(n){return Ui(n,"base-ui")}const Fv=b.createContext(void 0);function Gw(){return b.useContext(Fv)}const Xw=600,Kv="data-base-ui-tooltip-trigger";function ob(n){if("composedPath"in n){const l=n.composedPath();for(let r=0;r<l.length;r+=1){const u=l[r];if(Je(u))return u}}const i=n.target;return Je(i)?i:null}function Fw(n){let i=n;for(;i;){const l=i.closest(`[${Kv}]`);if(l)return l;const r=i.getRootNode();i="host"in r&&Je(r.host)?r.host:null}return null}const Kw=Lb(function(i,l){const{render:r,className:u,style:f,handle:d,payload:m,disabled:h,delay:p,closeOnClick:y=!0,closeDelay:v,id:S,...w}=i,T=Hs(!0),O=Pv(d)??T;if(!O)throw new Error(Zt(82));const A=Pi(S),N=O.useState("isTriggerActive",A),M=O.useState("isOpenedByTrigger",A),D=O.useState("floatingRootContext"),k=b.useRef(null),L=v??0,{registerTrigger:j,isMountedByThisTrigger:H}=Bv(A,k,O,{payload:m,closeOnClick:y,closeDelay:L}),J=Gw(),{activeIdRef:$,delayRef:Q,isInstantPhase:I,hasProvider:ee}=y1(D,{open:M}),ie=ip(D);O.useSyncedValue("isInstantPhase",I);const F=O.useState("disabled"),z=h??F,q=jt(z),P=O.useState("trackCursorAxis"),K=O.useState("disableHoverablePopup"),ne=b.useRef(!1),R=$t(),B=b.useRef(void 0);function W(){return ee&&$.current!=null?0:p??J??Xw}function V(me){const je=k.current;if(!je||!me)return!1;const Le=Fw(me);return Le!==null&&Le!==je&&Ne(je,Le)}function oe(me){const je=V(me);return ne.current=je,je&&(ie.openChangeTimeout.clear(),ie.restTimeout.clear(),ie.restTimeoutPending=!1,R.clear()),je}const ae=Gv(D,{enabled:!z,mouseOnly:!0,move:!1,handleClose:!K&&P!=="both"?Xv():null,restMs:W,delay(){return v==null&&ee?{close:ji(Q.current,"close")}:{close:L}},triggerElementRef:k,isActiveTrigger:N,isClosing:()=>O.select("transitionStatus")==="ending",shouldOpen(){return!ne.current}}),ge=Yv(D,{enabled:!z}).reference,ue=me=>{const je=ne.current,Le=ob(me),Ve=oe(Le),Te=k.current,Ue=Te&&Le&&Ne(Te,Le);if(Ve&&O.select("open")&&O.select("lastOpenChangeReason")===Lt){O.setOpen(!1,Ke(Lt,me));return}if(je&&!Ve&&Ue&&!q.current&&!O.select("open")&&Te&&ui(B.current)){const Ee=()=>{!ne.current&&!q.current&&!O.select("open")&&O.setOpen(!0,Ke(Lt,me,Te))},we=W();we===0?(R.clear(),Ee()):R.start(we,Ee)}},pe=O.useState("triggerProps",H);return bt("button",i,{state:{open:M},ref:[l,j,k],props:[ae,ge,H||P!=="none"?pe:void 0,{onMouseOver(me){ue(me.nativeEvent)},onFocus(me){V(ob(me.nativeEvent))&&me.preventBaseUIHandler()},onMouseLeave(){ne.current=!1,R.clear(),B.current=void 0},onPointerEnter(me){B.current=me.pointerType},onPointerDown(me){B.current=me.pointerType,O.set("closeOnClick",y),y&&!O.select("open")&&O.cancelPendingOpen(me.nativeEvent)},onClick(me){y&&!O.select("open")&&O.cancelPendingOpen(me.nativeEvent)},id:A,[Zf]:z?"":void 0,[Kv]:z?void 0:""},w],stateAttributesMapping:s1})}),Qv=b.createContext(void 0);function Qw(){const n=b.useContext(Qv);if(n===void 0)throw new Error(Zt(70));return n}const Zv=b.forwardRef(function(i,l){const{children:r,container:u,className:f,render:d,style:m,...h}=i,{node:p,subtree:y}=bv({container:u,ref:l,componentProps:i,elementProps:h});return!y&&!p?null:E.jsxs(b.Fragment,{children:[y,p&&Xn.createPortal(r,p)]})}),Zw=b.forwardRef(function(i,l){const{keepMounted:r=!1,...u}=i;return Hs().useState("mounted")||r?E.jsx(Qv.Provider,{value:r,children:E.jsx(Zv,{ref:l,...u})}):null}),Wv=b.createContext(void 0);function Ww(){const n=b.useContext(Wv);if(n===void 0)throw new Error(Zt(71));return n}const Jw=b.createContext(void 0);function ap(){return b.useContext(Jw)?.direction??"ltr"}const $w=n=>({name:"arrow",options:n,async fn(i){const{x:l,y:r,placement:u,rects:f,platform:d,elements:m,middlewareData:h}=i,{element:p,padding:y=0,offsetParent:v="real"}=fi(n,i)||{};if(p==null)return{};const S=Jb(y),w={x:l,y:r},T=jd(u),C=kd(T),O=await d.getDimensions(p),A=T==="y",N=A?"top":"left",M=A?"bottom":"right",D=A?"clientHeight":"clientWidth",k=f.reference[C]+f.reference[T]-w[T]-f.floating[C],L=w[T]-f.reference[T],j=v==="real"?await d.getOffsetParent?.(p):m.floating;let H=m.floating[D]||f.floating[C];(!H||!await d.isElement?.(j))&&(H=m.floating[D]||f.floating[C]);const J=k/2-L/2,$=H/2-O[C]/2-1,Q=Math.min(S[N],$),I=Math.min(S[M],$),ee=Q,ie=H-O[C]-I,F=H/2-O[C]/2+J,z=Wb(ee,F,ie),q=!h.arrow&&No(u)!=null&&F!==z&&f.reference[C]/2-(F<ee?Q:I)-O[C]/2<0,P=q?F<ee?F-ee:F-ie:0;return{[T]:w[T]+P,data:{[T]:z,centerOffset:F-z-P,...q&&{alignmentOffset:P}},reset:q}}}),eR=(n,i)=>{const{name:l,fn:r}=$w(n);return{name:l,fn:r,options:[n,i]}},tR={name:"hide",async fn(n){const{width:i,height:l,x:r,y:u}=n.rects.reference,f=i===0&&l===0&&r===0&&u===0,d=await n.platform.detectOverflow(n,{elementContext:"reference"});return{data:{referenceHidden:d.top-l>=0||d.right-i>=0||d.bottom-l>=0||d.left-i>=0||f}}}},nR={sideX:"left",sideY:"top"},oR="--available-width",iR="--available-height",aR="--anchor-width",lR="--anchor-height",rR="--transform-origin",ib=oR,ab=iR;function Jv(n,i,l){const r=n==="inline-start"||n==="inline-end";return{top:"top",right:r?l?"inline-start":"inline-end":"right",bottom:"bottom",left:r?l?"inline-end":"inline-start":"left"}[i]}function lb(n,i,l){const{rects:r,placement:u}=n;return{side:Jv(i,Hn(u),l),align:No(u)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function $v(n){return sR(n,Mw)}function sR(n,i){const{anchor:l,positionMethod:r="absolute",side:u="bottom",sideOffset:f=0,align:d="center",alignOffset:m=0,collisionBoundary:h,collisionPadding:p=5,sticky:y=!1,arrowPadding:v=5,disableAnchorTracking:S=!1,inline:w,keepMounted:T=!1,floatingRootContext:C,mounted:O,collisionAvoidance:A,shift:N,nodeId:M,adaptiveOrigin:D,lazyFlip:k=!1,externalTree:L}=n,[j,H]=b.useState(null);!O&&j!==null&&H(null);const J=A.side||"flip",$=A.align||"flip",Q=A.fallbackAxisSide||"end",I=N?.crossAxis??!1,ee=N?.rootBoundary,ie=typeof l=="function"?l:void 0,F=Oe(ie),z=ie?F:l,q=jt(l),P=jt(O),ne=ap()==="rtl",R=j||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":ne?"left":"right","inline-start":ne?"right":"left"}[u],B=d==="center"?R:`${R}-${d}`;let W=p;typeof W=="number"?W={top:W,right:W,bottom:W,left:W}:W&&(W={top:W.top||0,right:W.right||0,bottom:W.bottom||0,left:W.left||0});const V=1,oe=u==="bottom"?V:0,ae=u==="top"?V:0,ge=u==="right"?V:0,ue=u==="left"?V:0,pe={boundary:h==="clipping-ancestors"?"clippingAncestors":h,padding:W},Re=b.useRef(null),ke=jt(f),ve=jt(m),me=typeof f!="function"?f:0,je=typeof m!="function"?m:0,Le=[];w&&Le.push(w),Le.push(rw(Xe=>{const xt=lb(Xe,u,ne),Yt=typeof ke.current=="function"?ke.current(xt):ke.current,Mt=typeof ve.current=="function"?ve.current(xt):ve.current;return{mainAxis:Yt,crossAxis:Mt,alignmentAxis:Mt}},[me,je,ne,u]));const Ve=$==="none"&&J!=="shift",Te=!Ve&&(y||I||J==="shift"),Ue=J==="none"?null:cw({...pe,padding:{top:W.top+V+oe,right:W.right+V+ue,bottom:W.bottom+V+ae,left:W.left+V+ge},mainAxis:!I&&J==="flip",crossAxis:$==="flip"?"alignment":!1,fallbackAxisSideDirection:Q}),Ee=Ve?null:sw({...pe,rootBoundary:ee,mainAxis:$!=="none",crossAxis:Te,limiter:y||I?void 0:uw(Xe=>{if(!Re.current)return{};const{width:xt,height:Yt}=Re.current.getBoundingClientRect(),Mt=jn(Hn(Xe.placement)),Kn=Mt==="y"?xt:Yt,nn=Mt==="y"?W.left+W.right:W.top+W.bottom;return{offset:Kn/2+nn/2}})},[pe,y,I,ee,W,$]);J==="shift"||$==="shift"||d==="center"?Le.push(Ee,Ue):Le.push(Ue,Ee),Le.push(fw({...pe,apply({elements:{floating:Xe},availableWidth:xt,availableHeight:Yt,rects:Mt}){if(!P.current)return;const Kn=Xe.style;Kn.setProperty(ib,`${xt}px`),Kn.setProperty(ab,`${Yt}px`);const nn=yt(Xe).devicePixelRatio||1,{x:ko,y:wn,width:qi,height:In}=Mt.reference,jo=(Math.round((ko+qi)*nn)-Math.round(ko*nn))/nn,Ho=(Math.round((wn+In)*nn)-Math.round(wn*nn))/nn;Kn.setProperty(aR,`${jo}px`),Kn.setProperty(lR,`${Ho}px`)}}),eR(Xe=>({element:Re.current||Fe(Xe.elements.floating).createElement("div"),padding:Re.current?v:0,offsetParent:"floating"}),[v]),{name:"transformOrigin",fn(Xe){const{elements:{floating:xt},middlewareData:Yt,placement:Mt,platform:Kn,rects:nn,y:ko}=Xe,wn=Hn(Mt),qi=No(Mt),In=jn(wn)==="y",jo=Re.current,Ho=typeof f=="function"?f(lb(Xe,u,ne)):f;let Lo;if(!jo&&qi&&Math.abs(In?Yt.shift?.x||0:Yt.shift?.y||0)<=1)Lo=qi==="start"===(In&&Kn.isRTL?.(xt)===!0)?"100%":"0%";else{const Kl=In?Yt.arrow?.x||0:Yt.arrow?.y||0,Ql=In?jo?.clientWidth||0:jo?.clientHeight||0;Lo=`${Kl+Ql/2}px`}let gi=wn==="top"||wn==="left"?`calc(100% + ${Ho}px)`:`${-Ho}px`;return Te&&In&&Math.abs(Yt.shift?.y||0)>Ho&&(gi=`${nn.reference.y+nn.reference.height/2-ko}px`),xt.style.setProperty(rR,In?`${Lo} ${gi}`:`${gi} ${Lo}`),{}}},tR,D),Se(()=>{!O&&C&&C.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[O,C]);const we=b.useMemo(()=>({ancestorScroll:!S,elementResize:!S&&typeof ResizeObserver<"u",layoutShift:!S&&typeof IntersectionObserver<"u"}),[S]),{refs:Ae,elements:Qe,x:Me,y:fe,middlewareData:ye,update:de,placement:le,context:be,isPositioned:Be,floatingStyles:Ut}=i({rootContext:C,open:T?O:void 0,placement:B,middleware:Le,strategy:r,whileElementsMounted:T?void 0:(...Xe)=>Fy(...Xe,we),nodeId:M,externalTree:L}),{sideX:tn,sideY:Tt}=ye.adaptiveOrigin||nR,xe=Be?r:"fixed",Ye=b.useMemo(()=>{let Xe;return Be?D?Xe={position:xe,[tn]:Me,[Tt]:fe}:Xe={...Ut,position:xe}:Xe={position:xe,top:0,left:0},Xe[ib]="100vw",Xe[ab]="100vh",Be||(Xe.opacity=0),Xe},[D,xe,tn,Me,Tt,fe,Ut,Be]),nt=b.useRef(null);Se(()=>{if(!O)return;const Xe=q.current,xt=typeof Xe=="function"?Xe():Xe,Mt=(rb(xt)?xt.current:xt)||null||null;Mt!==nt.current&&(Ae.setPositionReference(Mt),nt.current=Mt)},[O,Ae,z,q]),b.useEffect(()=>{if(!O)return;const Xe=q.current;typeof Xe!="function"&&rb(Xe)&&Xe.current!==nt.current&&(Ae.setPositionReference(Xe.current),nt.current=Xe.current)},[O,Ae,z,q]),b.useEffect(()=>{if(T&&O&&Qe.reference&&Qe.floating)return Fy(Qe.reference,Qe.floating,de,we)},[T,O,Qe,de,we]);const pt=Hn(le),Tn=Jv(u,pt,ne),Un=No(le)||"center",En=!!ye.hide?.referenceHidden;Se(()=>{k&&O&&Be&&pt!==R&&H(pt)},[k,O,Be,pt,R]);const At=b.useMemo(()=>({position:"absolute",top:ye.arrow?.y,left:ye.arrow?.x}),[ye.arrow]),Bn=ye.arrow?.centerOffset!==0;return b.useMemo(()=>({positionerStyles:Ye,arrowStyles:At,arrowRef:Re,arrowUncentered:Bn,side:Tn,align:Un,physicalSide:pt,anchorHidden:En,refs:Ae,context:be,isPositioned:Be,update:de}),[Ye,At,Re,Bn,Tn,Un,pt,En,Ae,be,Be,de])}function rb(n){return n!=null&&"current"in n}function lp(n){return n==="starting"?uE:Rt}function e0(n,i,{styles:l,transitionStatus:r,props:u,refs:f,hidden:d,inert:m=!1}){const h={...l};return m&&(h.pointerEvents="none"),bt("div",n,{state:i,ref:f,props:[{role:"presentation",hidden:d,style:h},lp(r),u],stateAttributesMapping:Ad})}const uR=b.forwardRef(function(i,l){const{render:r,className:u,anchor:f,positionMethod:d="absolute",side:m="top",align:h="center",sideOffset:p=0,alignOffset:y=0,collisionBoundary:v="clipping-ancestors",collisionPadding:S=5,arrowPadding:w=5,sticky:T=!1,disableAnchorTracking:C=!1,collisionAvoidance:O=gv,style:A,...N}=i,M=Hs(),D=Qw(),k=M.useState("open"),L=M.useState("mounted"),j=M.useState("trackCursorAxis"),H=M.useState("disableHoverablePopup"),J=M.useState("floatingRootContext"),$=M.useState("instantType"),Q=M.useState("transitionStatus"),I=M.useState("adaptiveOrigin"),ee=$v({anchor:f,positionMethod:d,floatingRootContext:J,mounted:L,side:m,sideOffset:p,align:h,alignOffset:y,collisionBoundary:v,collisionPadding:S,sticky:T,arrowPadding:w,disableAnchorTracking:C,keepMounted:D,collisionAvoidance:O,adaptiveOrigin:I}),ie=b.useMemo(()=>({open:k,side:ee.side,align:ee.align,anchorHidden:ee.anchorHidden,instant:j!=="none"?"tracking-cursor":$}),[k,ee.side,ee.align,ee.anchorHidden,j,$]),F=e0(i,ie,{styles:ee.positionerStyles,transitionStatus:Q,props:N,refs:[l,M.useStateSetter("positionerElement")],hidden:!L,inert:!k||j==="both"||H});return E.jsx(Wv.Provider,{value:ee,children:F})}),cR=b.forwardRef(function(i,l){const{render:r,className:u,style:f,...d}=i,m=Hs(),{side:h,align:p}=Ww(),y=m.useState("open"),v=m.useState("instantType"),S=m.useState("transitionStatus"),w=m.useState("popupProps"),T=m.useState("floatingRootContext"),C=m.useState("disabled"),O=m.useState("closeDelay");Ha({open:y,ref:m.context.popupRef,onComplete(){y&&m.context.onOpenChangeComplete?.(!0)}}),Vv(T,{enabled:!C,closeDelay:O});const A=m.useStateSetter("popupElement");return bt("div",i,{state:{open:y,side:h,align:p,instant:v,transitionStatus:S},ref:[l,m.context.popupRef,A],props:[Fd,w,lp(S),d],stateAttributesMapping:Md})}),fR=function(i){const{delay:l,closeDelay:r,timeout:u=400}=i,f=b.useMemo(()=>({open:l,close:r}),[l,r]);return E.jsx(Fv.Provider,{value:l,children:E.jsx(m1,{delay:f,timeoutMs:u,children:i.children})})};function Js(n){return Ud(19)?n:n?"true":void 0}function t0({label:n,shortcut:i,side:l="bottom",children:r}){return E.jsxs(qw,{children:[E.jsx(Kw,{render:r}),E.jsx(Zw,{children:E.jsx(uR,{side:l,sideOffset:6,className:"z-[1000]",children:E.jsxs(cR,{className:"rounded-md bg-fg px-2 py-1 text-xs text-surface shadow-popup data-[starting-style]:opacity-0 data-[ending-style]:opacity-0 transition-opacity",children:[n,i?E.jsx("span",{className:"ml-2 opacity-60",children:i}):null]})})})]})}function dR({children:n}){return E.jsx(fR,{delay:500,closeDelay:0,children:n})}function pR(n){return n.repeat&&(n.key==="Enter"||n.key===" ")}function _s(n){pR(n)&&n.target===n.currentTarget&&n.preventDefault()}function n0(n){return n?i=>{_s(i),n(i)}:_s}const hR=200,gR=2e3;function mR(n,i,l){let r=null,u=!1;const f=()=>{u||(u=!0,n.removeEventListener("keydown",d,!0),n.removeEventListener("keyup",d,!0),n.clearTimeout(m),r!==null&&n.clearTimeout(r))},d=h=>{const p=h.key==="Enter"||h.key===" ";if(h.type==="keyup"){h.key===" "&&!l(h.target)&&h.preventDefault(),h.key===i&&r===null&&(r=n.setTimeout(f,hR));return}p&&!l(h.target)&&(h.preventDefault(),h.stopImmediatePropagation())},m=n.setTimeout(f,gR);return n.addEventListener("keydown",d,!0),n.addEventListener("keyup",d,!0),f}const yR={primary:"bg-accent text-accent-fg hover:brightness-110 active:brightness-95",secondary:"bg-surface text-fg border border-line hover:bg-hover",ghost:"bg-transparent text-fg hover:bg-hover",danger:"bg-danger text-white hover:brightness-110"},bR={sm:"h-6 px-2 text-xs gap-1",md:"h-7 px-2.5 text-[13px] gap-1.5",lg:"h-8 px-3 text-[13px] gap-2"},fn=b.forwardRef(function({variant:i="secondary",size:l="md",icon:r,className:u,children:f,type:d="button",onKeyDown:m,...h},p){return E.jsxs("button",{ref:p,type:d,className:zo("inline-flex shrink-0 select-none items-center justify-center whitespace-nowrap rounded-control font-medium transition-[background,filter]","focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-accent","disabled:pointer-events-none disabled:opacity-45",yR[i],bR[l],u),...h,onKeyDown:n0(m),children:[r,f]})}),vR={sm:"size-6",md:"size-7",lg:"size-8"},o0=b.forwardRef(function({label:i,icon:l,shortcut:r,active:u,size:f="md",noTooltip:d,className:m,type:h="button",onKeyDown:p,...y},v){const S=E.jsx("button",{ref:v,type:h,"aria-label":i,"aria-pressed":u===void 0?void 0:u,className:zo("inline-flex shrink-0 items-center justify-center rounded-control text-fg-muted transition-colors","hover:bg-hover hover:text-fg focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-accent","disabled:pointer-events-none disabled:opacity-40",u&&"bg-accent-soft text-accent hover:bg-accent-soft hover:text-accent",vR[f],m),...y,onKeyDown:n0(p),children:l});return d?S:E.jsx(t0,{label:i,shortcut:r,children:S})}),i0=b.createContext(void 0);function a0(n){const i=b.useContext(i0);if(i===void 0&&!n)throw new Error(Zt(33));return i}const l0=b.createContext(void 0);function La(n){const i=b.useContext(l0);if(i===void 0&&!n)throw new Error(Zt(36));return i}const SR=b.createContext(void 0);function rp(n=!0){const i=b.useContext(SR);if(i===void 0&&!n)throw new Error(Zt(25));return i}function xR({controlled:n,default:i,name:l,state:r="value"}){const{current:u}=b.useRef(n!==void 0),[f,d]=b.useState(i),m=u&&n!==void 0?n:f,h=b.useCallback(p=>{u||d(p)},[]);return[m,h]}const r0=b.createContext(void 0);function $s(n=!1){const i=b.useContext(r0);if(i===void 0&&!n)throw new Error(Zt(16));return i}function TR(n){const{focusableWhenDisabled:i,disabled:l,composite:r=!1,tabIndex:u=0,isNativeButton:f}=n,d=r&&i!==!1,m=r&&i===!1;return{props:b.useMemo(()=>{const p={onKeyDown(y){l&&i&&y.key!=="Tab"&&y.preventDefault()}};return r||(p.tabIndex=u,!f&&l&&(p.tabIndex=i?u:-1)),(f&&(i||d)||!f&&l)&&(p["aria-disabled"]=l),f&&(!i||m)&&(p.disabled=l),p},[r,l,i,d,m,f,u])}}function Ts(n,i,{detail:l=0}={}){n.dispatchEvent(new(yt(n)).PointerEvent("click",{bubbles:!0,cancelable:!0,composed:!0,detail:l,shiftKey:i.shiftKey,ctrlKey:i.ctrlKey,altKey:i.altKey,metaKey:i.metaKey}))}function Ua(n={}){const{disabled:i=!1,focusableWhenDisabled:l,tabIndex:r=0,native:u=!0,composite:f}=n,d=b.useRef(null),m=$s(!0),h=f??m!==void 0,{props:p}=TR({focusableWhenDisabled:l,disabled:i,composite:h,tabIndex:r,isNativeButton:u}),y=b.useCallback(()=>{const w=d.current;Hf(w)&&h&&i&&p.disabled===void 0&&w.disabled&&(w.disabled=!1)},[i,p.disabled,h]);Se(y,[y]);const v=b.useCallback((w={})=>{const{onClick:T,onMouseDown:C,onKeyUp:O,onKeyDown:A,onPointerDown:N,...M}=w;return Ao({onClick(D){if(i){D.preventDefault();return}T?.(D)},onMouseDown(D){i||C?.(D)},onKeyDown(D){if(i||(Ms(D),A?.(D),D.baseUIHandlerPrevented))return;const k=D.target===D.currentTarget,L=D.currentTarget,j=Hf(L),H=!u&&ER(L),J=k&&(u?j:!H),$=D.key==="Enter",Q=D.key===" ",I=L.getAttribute("role"),ee=I?.startsWith("menuitem")||I==="option"||I==="gridcell";if(k&&h&&Q){if(D.defaultPrevented&&ee)return;D.preventDefault(),(!u||j)&&(D.preventBaseUIHandler(),Ts(L,D));return}if(!J||u||!Q&&!$){k&&H&&Q&&D.preventDefault();return}D.defaultPrevented||(D.preventDefault(),$&&(D.preventBaseUIHandler(),Ts(L,D)))},onKeyUp(D){if(!i){if(Ms(D),O?.(D),D.target===D.currentTarget&&u&&h&&Hf(D.currentTarget)&&D.key===" "){D.preventDefault();return}D.baseUIHandlerPrevented||D.target===D.currentTarget&&!u&&!h&&!D.defaultPrevented&&D.key===" "&&(D.preventBaseUIHandler(),Ts(D.currentTarget,D))}},onPointerDown(D){if(i){D.preventDefault();return}N?.(D)}},u?{type:"button"}:{role:"button"},p,M)},[i,p,h,u]),S=Oe(w=>{d.current=w,y()});return{getButtonProps:v,buttonRef:S}}function Hf(n){return dt(n)&&n.tagName==="BUTTON"}function ER(n){return dt(n)&&n.tagName==="A"&&!!n.href}function wR(n){const{closeOnClick:i,highlighted:l,id:r,nodeId:u,store:f,typingRef:d,itemRef:m,itemMetadata:h}=n,{events:p}=f.useState("floatingTreeRoot"),y=f.useState("open"),v=rp(!0),S=v!==void 0;return b.useMemo(()=>({id:r,role:"menuitem",tabIndex:y&&l?0:-1,onKeyDown(w){w.key===" "&&d?.current&&w.preventDefault()},onMouseMove(w){u&&p.emit("itemhover",{nodeId:u,target:w.currentTarget})},onClick(w){i&&p.emit("close",{domEvent:w,reason:Gb})},onMouseUp(w){if(v){const T=v.initialCursorPointRef.current;if(v.initialCursorPointRef.current=null,S&&T&&Math.abs(w.clientX-T.x)<=1&&Math.abs(w.clientY-T.y)<=1||S&&!Sd&&w.button===2)return}m.current&&f.context.allowMouseUpTriggerRef.current&&(!S||w.button===2)&&h.type==="regular-item"&&Ts(m.current,w,{detail:1})}}),[i,l,r,p,u,y,f,d,m,v,S,h])}const RR={type:"regular-item"};function CR(n){const{closeOnClick:i,disabled:l,highlighted:r,id:u,store:f,typingRef:d=f.context.typingRef,nativeButton:m,itemMetadata:h,nodeId:p}=n,y=b.useRef(null),{getButtonProps:v,buttonRef:S}=Ua({disabled:l,focusableWhenDisabled:!0,native:m,composite:!0}),w=wR({closeOnClick:i,highlighted:r,id:u,nodeId:p,store:f,typingRef:d,itemRef:y,itemMetadata:h}),T=b.useCallback(O=>Ao(w,{onMouseEnter(){h.type==="submenu-trigger"&&h.setActive()}},O,v),[w,v,h]),C=Hi(y,S);return b.useMemo(()=>({getItemProps:T,itemRef:C}),[T,C])}const s0=b.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});function OR(){return b.useContext(s0)}function sp(n={}){const{guess:i,label:l,metadata:r,textRef:u,index:f}=n,{register:d,unregister:m,subscribeMapChange:h,nextIndexRef:p}=OR(),y=b.useRef(-1),[v,S]=b.useState(f==null&&i?()=>{if(y.current===-1){const O=p.current;p.current+=1,y.current=O}return y.current}:-1),w=f??v,T=b.useRef(null),C=b.useCallback(O=>{const A=T.current;A&&m(A),T.current=O,O&&d(O,{metadata:r??null,index:f??null,label:l,textRef:u})},[f,d,m,r,l,u]);return Se(()=>{if(f==null)return h(O=>{const A=T.current?O.get(T.current)?.index:null;A!=null&&S(A)})},[f,h]),{ref:C,index:w}}const AR=b.forwardRef(function(i,l){const{render:r,className:u,id:f,label:d,nativeButton:m=!1,disabled:h=!1,closeOnClick:p=!0,style:y,...v}=i,S=sp({guess:!0,label:d}),w=a0(!0),T=Pi(f),{store:C}=La(),O=C.useState("disabled"),A=h||O,N=C.useState("isActive",S.index),M=C.useState("itemProps"),{getItemProps:D,itemRef:k}=CR({closeOnClick:p,disabled:A,highlighted:N,id:T,store:C,nativeButton:m,nodeId:w?.context.nodeId,itemMetadata:RR});return bt("div",i,{state:{disabled:A,highlighted:N},props:[M,v,D],ref:[k,l,S.ref]})}),MR=b.createContext(void 0);function DR(n){return b.useContext(MR)}const ad="ArrowUp",ld="ArrowDown",rd="ArrowLeft",sd="ArrowRight",ud="Home",cd="End",up=new Set([ad,ld,rd,sd,ud,cd]),NR="Shift",zR=[NR,"Control","Alt","Meta"];function _R(n){return dt(n)&&n.tagName==="INPUT"}function sb(n){return!!(_R(n)&&n.selectionStart!=null||dt(n)&&n.tagName==="TEXTAREA")}function ub(n,i,l,r){if(!n||!i||!i.scrollTo)return;let u=n.scrollLeft,f=n.scrollTop;const d=n.clientWidth<n.scrollWidth,m=n.clientHeight<n.scrollHeight;if(d&&r!=="vertical"){const h=cb(n,i,"left"),p=ys(n),y=ys(i);l==="ltr"&&(h+i.offsetWidth+y.scrollMarginRight>n.scrollLeft+n.clientWidth-p.scrollPaddingRight?u=h+i.offsetWidth+y.scrollMarginRight-n.clientWidth+p.scrollPaddingRight:h-y.scrollMarginLeft<n.scrollLeft+p.scrollPaddingLeft&&(u=h-y.scrollMarginLeft-p.scrollPaddingLeft)),l==="rtl"&&(h-y.scrollMarginLeft<n.scrollLeft+p.scrollPaddingLeft?u=h-y.scrollMarginLeft-p.scrollPaddingLeft:h+i.offsetWidth+y.scrollMarginRight>n.scrollLeft+n.clientWidth-p.scrollPaddingRight&&(u=h+i.offsetWidth+y.scrollMarginRight-n.clientWidth+p.scrollPaddingRight))}if(m&&r!=="horizontal"){const h=cb(n,i,"top"),p=ys(n),y=ys(i);h-y.scrollMarginTop<n.scrollTop+p.scrollPaddingTop?f=h-y.scrollMarginTop-p.scrollPaddingTop:h+i.offsetHeight+y.scrollMarginBottom>n.scrollTop+n.clientHeight-p.scrollPaddingBottom&&(f=h+i.offsetHeight+y.scrollMarginBottom-n.clientHeight+p.scrollPaddingBottom)}n.scrollTo({left:u,top:f,behavior:"auto"})}function cb(n,i,l){const r=l==="left"?"offsetLeft":"offsetTop";let u=0;for(;i.offsetParent&&(u+=i[r],i.offsetParent!==n);)i=i.offsetParent;return u}function ys(n){const i=getComputedStyle(n);return{scrollMarginTop:parseFloat(i.scrollMarginTop)||0,scrollMarginRight:parseFloat(i.scrollMarginRight)||0,scrollMarginBottom:parseFloat(i.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(i.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(i.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(i.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(i.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(i.scrollPaddingLeft)||0}}const kR=b.forwardRef(function(i,l){const{render:r,className:u,style:f,finalFocus:d,...m}=i,{store:h}=La(),{side:p,align:y}=a0(),v=DR()!=null,S=h.useState("open"),w=h.useState("transitionStatus"),T=h.useState("popupProps"),C=h.useState("mounted"),O=h.useState("instantType"),A=h.useState("activeTriggerElement"),N=h.useState("parent"),M=h.useState("lastOpenChangeReason"),D=h.useState("rootId"),k=h.useState("floatingRootContext"),L=h.useState("floatingTreeRoot"),j=h.useState("closeDelay"),H=h.useState("hoverEnabled"),J=h.useState("disabled"),$=h.useState("openMethod"),Q=N.type==="context-menu";Ha({open:S,ref:h.context.popupRef,onComplete(){S&&h.context.onOpenChangeComplete?.(!0)}}),b.useEffect(()=>{function z(q){h.setOpen(!1,Ke(q.reason,q.domEvent))}return L.events.on("close",z),()=>{L.events.off("close",z)}},[L.events,h]),Vv(k,{enabled:H&&!J&&!Q&&N.type!=="menubar",closeDelay:j});const I=h.useStateSetter("popupElement"),ee={transitionStatus:w,side:p,align:y,open:S,nested:N.type==="menu",instant:O},ie=bt("div",i,{state:ee,ref:[l,h.context.popupRef,I],stateAttributesMapping:Md,props:[T,{onKeyDown(z){v&&up.has(z.key)&&z.stopPropagation()}},lp(w),m,{"data-rootownerid":D}]});let F=N.type===void 0||Q;return(A||N.type==="menubar"&&M!==Dd)&&(F=!0),E.jsx(wv,{context:k,openInteractionType:$,modal:Q,disabled:!C,returnFocus:d===void 0?F:d,initialFocus:N.type!=="menu",restoreFocus:!0,externalTree:N.type!=="menubar"?L:void 0,previousFocusableElement:A,nextFocusableElement:N.type===void 0?h.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:N.type===void 0?h.context.beforeContentFocusGuardRef:void 0,children:ie})}),u0=b.createContext(void 0);function jR(){const n=b.useContext(u0);if(n===void 0)throw new Error(Zt(32));return n}const HR=b.forwardRef(function(i,l){const{keepMounted:r=!1,...u}=i,{store:f,parent:d}=La();if(!(f.useState("mounted")||r))return null;const p=d.type==="menu"||d.type==="menubar"?"group":void 0;return E.jsx(u0.Provider,{value:r,children:E.jsx(vv,{ref:l,...u,portalOwnerRole:p})})});function cp(n){const{children:i,elementsRef:l,labelsRef:r,onMapChange:u}=n,f=Oe(u),[,d]=b.useState(!1),m=Jt(UR).current,h=Jt(LR).current,p=b.useRef(0),y=b.useRef(!0),v=b.useRef(null),S=b.useRef(null),w=Oe(()=>{y.current||(y.current=!0,d(k=>!k))}),T=Oe((k,L)=>{h.set(k,L),w()}),C=Oe(k=>{h.delete(k),w()}),O=Oe(k=>{const L=new Map;return l.current.length=0,r&&(r.current.length=0),k.forEach(j=>{L.set(j.element,{...j.registration.metadata??{},index:j.index}),l.current[j.index]=j.element,r&&(r.current[j.index]=j.registration.label!==void 0?j.registration.label:j.registration.textRef?.current?.textContent??j.element.textContent)}),p.current=l.current.length,L});function A(k){if(S.current?.disconnect(),S.current=null,typeof MutationObserver!="function"||k.length<2)return;const L=new MutationObserver(H=>{if(!PR(H))return;let J=null;for(const $ of k)if($.isConnected){if(J&&c0(J,$)>0){L.disconnect(),w();return}J=$}});S.current=L;const j=new Set;for(let H=1;H<k.length;H+=1){const J=IR(k[H-1],k[H]);J&&j.add(J)}j.forEach(H=>L.observe(H,{childList:!0}))}const N=Oe(()=>{const[k,L]=BR(h),j=O(k),H=v.current,J=!H||H.length!==k.length||k.some(($,Q)=>{const I=H[Q];return $.index!==I.index||$.element!==I.element||$.registration.index!==I.registration.index||$.registration.metadata!==I.registration.metadata});A(L),v.current=k,y.current=!1,J&&(m.forEach($=>$(j)),f(j))});Se(()=>(!y.current&&v.current&&O(v.current),()=>{l.current=[],r&&(r.current=[])}),[l,r,O]),Se(()=>{y.current&&N()}),Se(()=>()=>{S.current?.disconnect(),y.current=!0},[]);const M=Oe(k=>(m.add(k),()=>{m.delete(k)})),D=b.useMemo(()=>({register:T,unregister:C,subscribeMapChange:M,nextIndexRef:p}),[T,C,M,p]);return E.jsx(s0.Provider,{value:D,children:i})}function LR(){return new Map}function UR(){return new Set}function BR(n){const i=new Set,l=[],r=[];n.forEach((f,d)=>{if(!d.isConnected)return;const m=f.index,h={index:m??-1,element:d,registration:f};m===null?r.push(h):m>=0&&(i.add(m),l.push(h))});let u=0;return r.sort((f,d)=>c0(f.element,d.element)),r.forEach(f=>{for(;i.has(u);)u+=1;f.index=u,l.push(f),u+=1}),i.size>0&&l.sort((f,d)=>f.index-d.index),[l,r.map(f=>f.element)]}function IR(n,i){let l=n.parentElement;for(;l&&!l.contains(i);)l=l.parentElement;return l}function PR(n){for(const i of n)for(let l=0;l<i.removedNodes.length;l+=1)if(i.removedNodes[l].isConnected)return!0;return!1}function c0(n,i){return n.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}const f0=b.forwardRef(function(i,l){const{cutout:r,...u}=i;let f;if(r){const d=r.getBoundingClientRect();f=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${d.left}px ${d.top}px,${d.left}px ${d.bottom}px,${d.right}px ${d.bottom}px,${d.right}px ${d.top}px,${d.left}px ${d.top}px)`}return E.jsx("div",{ref:l,role:"presentation","data-base-ui-inert":"",...u,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:f}})});let fb={},db={},pb="";function eu(n,i){return Vl(n)?n:i}function hb(n,i,l){return/hidden|clip/.test(n.getComputedStyle(eu(i,l)).overflowY)}function YR(n){if(typeof document>"u")return!1;const i=Fe(n);return yt(i).innerWidth-i.documentElement.clientWidth>0}function qR(n){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const l=Fe(n),r=l.documentElement,u=l.body,f=eu(r,u),d=f.style.overflowY,m=r.style.scrollbarGutter;r.style.scrollbarGutter="stable",f.style.overflowY="scroll";const h=f.offsetWidth;f.style.overflowY="hidden";const p=f.offsetWidth;return f.style.overflowY=d,r.style.scrollbarGutter=m,h===p}function VR(n){const i=Fe(n),l=i.documentElement,r=i.body,u=eu(l,r),f={overflowY:u.style.overflowY,overflowX:u.style.overflowX};return Object.assign(u.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(u.style,f)}}function GR(n){const i=Fe(n),l=i.documentElement,r=i.body,u=yt(l);let f=0,d=0,m=!1;const h=eo.create();if(pi&&(u.visualViewport?.scale??1)!==1)return()=>{};function p(){const w=u.getComputedStyle(l),T=u.getComputedStyle(r),A=(w.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";f=l.scrollTop,d=l.scrollLeft,fb={scrollbarGutter:l.style.scrollbarGutter,overflowY:l.style.overflowY,overflowX:l.style.overflowX},pb=l.style.scrollBehavior,db={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};const N=l.scrollHeight>l.clientHeight,M=l.scrollWidth>l.clientWidth,D=w.overflowY==="scroll"||T.overflowY==="scroll",k=w.overflowX==="scroll"||T.overflowX==="scroll",L=Math.max(0,u.innerWidth-r.clientWidth),j=Math.max(0,u.innerHeight-r.clientHeight),H=parseFloat(T.marginTop)+parseFloat(T.marginBottom),J=parseFloat(T.marginLeft)+parseFloat(T.marginRight),$=eu(l,r);if(m=qR(n),m){l.style.scrollbarGutter=A,$.style.overflowY="hidden",$.style.overflowX="hidden";return}Object.assign(l.style,{scrollbarGutter:A,overflowY:"hidden",overflowX:"hidden"}),(N||D)&&(l.style.overflowY="scroll"),(M||k)&&(l.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:H||j?`calc(100dvh - ${H+j}px)`:"100dvh",width:J||L?`calc(100vw - ${J+L}px)`:"100vw",boxSizing:"border-box",overflowY:"hidden",overflowX:"hidden",scrollBehavior:"unset"}),r.scrollTop=f,r.scrollLeft=d,l.setAttribute("data-base-ui-scroll-locked",""),l.style.scrollBehavior="unset"}function y(){Object.assign(l.style,fb),Object.assign(r.style,db),m||(l.scrollTop=f,l.scrollLeft=d,l.removeAttribute("data-base-ui-scroll-locked"),l.style.scrollBehavior=pb)}function v(){y(),h.request(p)}p();const S=Pe(u,"resize",v);return()=>{h.cancel(),y(),typeof u.removeEventListener=="function"&&S()}}class XR{lockCount=0;restore=null;timeoutLock=vn.create();timeoutUnlock=vn.create();acquire(i){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(i)),this.release}release=()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(i){if(this.lockCount===0||this.restore!==null)return;const l=Fe(i),r=l.documentElement,u=l.body,f=yt(r);if(hb(f,r,u)){const m=new f.MutationObserver(()=>{hb(f,r,u)||(m.disconnect(),this.restore=null,this.lock(i))}),h={attributes:!0};m.observe(r,h),m.observe(u,h),this.restore=()=>m.disconnect();return}const d=Bs||!YR(i);this.restore=d?VR(i):GR(i)}}const FR=new XR;function d0(n=!0,i=null){Se(()=>{if(n)return FR.acquire(i)},[n,i])}const KR=20;function QR(n,i,l,r){const[u,f]=b.useState(!1);Se(()=>{if(!n||!i||l==null){f(!1);return}const d=Fe(l).documentElement.clientWidth,m=l.offsetWidth;f(d>0&&m>0&&m>=d-KR)},[n,i,l]),d0(n&&(!i||u),r)}const ZR=b.forwardRef(function(i,l){const{anchor:r,positionMethod:u="absolute",className:f,render:d,side:m,align:h,sideOffset:p=0,alignOffset:y=0,collisionBoundary:v="clipping-ancestors",collisionPadding:S=5,arrowPadding:w=5,sticky:T=!1,disableAnchorTracking:C=!1,collisionAvoidance:O=gE,style:A,...N}=i,{store:M}=La(),D=jR(),k=rp(!0),L=M.useState("parent"),j=M.useState("floatingRootContext"),H=M.useState("floatingTreeRoot"),J=M.useState("mounted"),$=M.useState("open"),Q=M.useState("modal"),I=M.useState("openMethod"),ee=M.useState("activeTriggerElement"),ie=M.useState("transitionStatus"),F=M.useState("positionerElement"),z=M.useState("instantType"),q=M.useState("adaptiveOrigin"),P=M.useState("lastOpenChangeReason"),K=M.useState("floatingNodeId"),ne=M.useState("floatingParentNodeId"),R=j.useState("domReferenceElement"),B=b.useRef(null),W=Xd(F);let V=r,oe=p,ae=y,ge=h,ue=O;L.type==="context-menu"&&(V=r??L.context?.anchor,ge=ge??"start",!m&&ge!=="center"&&(ae=i.alignOffset??2,oe=i.sideOffset??-5));let pe=m,Re=ge;L.type==="menu"?(pe=pe??"inline-end",Re=Re??"start",ue=i.collisionAvoidance??gv):L.type==="menubar"&&(pe=pe??(L.context.orientation==="vertical"?"inline-end":"bottom"),Re=Re??"start");const ke=L.type==="context-menu",ve=$v({anchor:V,floatingRootContext:j,positionMethod:k?"fixed":u,mounted:J,side:pe,sideOffset:oe,align:Re,alignOffset:ae,arrowPadding:ke?0:w,collisionBoundary:v,collisionPadding:S,sticky:T,nodeId:K,keepMounted:D,disableAnchorTracking:C,collisionAvoidance:ue,shift:ke?{crossAxis:!("side"in ue&&ue.side==="flip"),rootBoundary:"layoutViewport"}:void 0,externalTree:H,adaptiveOrigin:q});b.useEffect(()=>{function we(Ae){Ae.open&&(Ae.parentNodeId===K&&M.set("hoverEnabled",!1),Ae.nodeId!==K&&Ae.parentNodeId===M.select("floatingParentNodeId")&&M.setOpen(!1,Ke(jl)))}return H.events.on("menuopenchange",we),()=>{H.events.off("menuopenchange",we)}},[M,H.events,K]),b.useEffect(()=>{if(M.select("floatingParentNodeId")==null)return;function we(Ae){if(Ae.open||Ae.nodeId!==M.select("floatingParentNodeId"))return;const Qe=Ae.reason??jl;M.setOpen(!1,Ke(Qe))}return H.events.on("menuopenchange",we),()=>{H.events.off("menuopenchange",we)}},[H.events,M]);const me=$t();b.useEffect(()=>{$||me.clear()},[$,me]),b.useEffect(()=>{function we(Ae){if(!(!$||Ae.nodeId!==M.select("floatingParentNodeId")))if(Ae.target&&ee&&ee!==Ae.target){const Qe=M.select("closeDelay");Qe>0?me.isStarted()||me.start(Qe,()=>{M.setOpen(!1,Ke(jl))}):M.setOpen(!1,Ke(jl))}else me.clear()}return H.events.on("itemhover",we),()=>{H.events.off("itemhover",we)}},[H.events,$,ee,M,me]),b.useEffect(()=>{const we={open:$,nodeId:K,parentNodeId:ne,reason:M.select("lastOpenChangeReason")};H.events.emit("menuopenchange",we)},[H.events,$,M,K,ne]),Se(()=>{const we=R,Ae=B.current;if(we&&(B.current=we),Ae&&we&&we!==Ae){M.set("instantType",void 0);const Qe=new AbortController;return W(()=>{M.set("instantType","trigger-change")},Qe.signal),()=>{Qe.abort()}}},[R,W,M]);const je={open:$,side:ve.side,align:ve.align,anchorHidden:ve.anchorHidden,nested:L.type==="menu",instant:z},Le=L.type==="menubar"&&L.context.modal;QR($&&(Le||Q&&P!==Lt),I==="touch",F,ee);const Te=e0(i,je,{styles:ve.positionerStyles,transitionStatus:ie,props:N,refs:[l,M.useStateSetter("positionerElement")],hidden:!J,inert:!$}),Ue=J&&L.type!=="menu"&&(L.type!=="menubar"&&Q&&P!==Lt||L.type==="menubar"&&L.context.modal);let Ee=null;return L.type==="menubar"?Ee=L.context.contentElement:L.type===void 0&&(Ee=ee),E.jsxs(i0.Provider,{value:ve,children:[Ue&&E.jsx(f0,{ref:L.type==="context-menu"||L.type==="nested-context-menu"?L.context.internalBackdropRef:null,inert:Js(!$),cutout:Ee}),E.jsx(bE,{id:K,children:E.jsx(cp,{elementsRef:M.context.itemDomElements,labelsRef:M.context.itemLabels,children:Te})})]})}),WR=b.createContext(null);function p0(n){return b.useContext(WR)}function JR(n){const i=b.useRef(""),l=b.useCallback(u=>{u.defaultPrevented||(i.current=u.pointerType,n(u,u.pointerType))},[n]);return{onClick:b.useCallback(u=>{if(u.detail===0){n(u,"keyboard");return}"pointerType"in u?n(u,u.pointerType):n(u,i.current),i.current=""},[n]),onPointerDown:l}}function $R(n,i){const l=b.useRef(n),r=Oe(i);Se(()=>{l.current!==n&&r(l.current),l.current=n},[n,r])}function eC(n,i){const l=Oe((f,d)=>{(typeof n=="function"?n():n)||i(d||(Bs?"touch":""))}),{onClick:r,onPointerDown:u}=JR(l);return b.useMemo(()=>({onClick:r,onPointerDown:u}),[r,u])}function tC(n){const[i,l]=b.useState(null),r=eC(n,l);return $R(n,u=>{u&&!n&&l(null)}),b.useMemo(()=>({openMethod:i,triggerProps:r}),[i,r])}const nC={...np,disabled:n=>n.parent.type==="menubar"&&n.parent.context.disabled||n.disabled,modal:n=>(n.parent.type===void 0||n.parent.type==="context-menu")&&(n.modal??!0),openMethod:n=>n.openMethod,allowMouseEnter:n=>n.allowMouseEnter,highlightItemOnHover:n=>n.highlightItemOnHover,parent:n=>n.parent,rootId:n=>n.parent.type==="menu"?n.parent.store.select("rootId"):n.parent.type!==void 0?n.parent.context.rootId:n.rootId,activeIndex:n=>n.activeIndex,isActive:(n,i)=>n.activeIndex===i,hoverEnabled:n=>n.hoverEnabled,instantType:n=>n.instantType,lastOpenChangeReason:n=>n.openChangeReason,floatingTreeRoot:n=>n.parent.type==="menu"?n.parent.store.select("floatingTreeRoot"):n.floatingTreeRoot,floatingNodeId:n=>n.floatingNodeId,floatingParentNodeId:n=>n.floatingParentNodeId,itemProps:n=>n.itemProps,closeDelay:n=>n.closeDelay,adaptiveOrigin:n=>n.adaptiveOrigin,keyboardEventRelay:n=>{if(n.keyboardEventRelay)return n.keyboardEventRelay;if(n.parent.type==="menu")return n.parent.store.select("keyboardEventRelay")}};class oC extends Xl{constructor(i,l,r=!1){const u=new $d,f=aC(u,l,r,i);super(f,iC(u),nC),this.unsubscribeParentListener=this.observe("parent",d=>{if(this.unsubscribeParentListener?.(),d.type==="menu"){let m=d.store.select("rootId"),h=d.store.select("floatingTreeRoot"),p=d.store.select("keyboardEventRelay");this.unsubscribeParentListener=d.store.subscribe(()=>{const y=d.store.select("rootId"),v=d.store.select("floatingTreeRoot"),S=d.store.select("keyboardEventRelay");m===y&&h===v&&p===S||(m=y,h=v,p=S,this.notifyAll())}),this.context.allowMouseUpTriggerRef=d.store.context.allowMouseUpTriggerRef;return}d.type!==void 0&&(this.context.allowMouseUpTriggerRef=d.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(i,l){this.state.floatingRootContext.context.events.emit("setOpen",{open:i,eventDetails:l})}unsubscribeParentListener=null}function iC(n){return{positionerRef:b.createRef(),popupRef:b.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:b.createRef(),beforeContentFocusGuardRef:b.createRef(),onOpenChangeComplete:void 0,triggerElements:n}}function aC(n,i,l=!1,r){return{...ep(n,i,l),disabled:!1,modal:!0,openMethod:null,allowMouseEnter:!1,highlightItemOnHover:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new Pd,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:Rt,keyboardEventRelay:void 0,closeDelay:0,adaptiveOrigin:void 0,...r}}const lC=b.createContext(void 0);function rC(){return b.useContext(lC)}const sC=js(function(i){const{children:l,open:r,onOpenChange:u,onOpenChangeComplete:f,defaultOpen:d=!1,disabled:m=!1,modal:h,loopFocus:p=!0,orientation:y="vertical",actionsRef:v,closeParentOnEsc:S=!1,handle:w,triggerId:T,defaultTriggerId:C=null,highlightItemOnHover:O=!0}=i,A=rp(!0),N=La(!0),M=p0(!0),D=rC(),k=b.useMemo(()=>D&&N?{type:"menu",store:N.store}:M?{type:"menubar",context:M}:A&&!N?{type:"context-menu",context:A}:{type:void 0},[A,N,M,D]),L=Ui(),j=Ui(),H=Ii(),J=k.type==="menu"?k.store:void 0,$=(r??d)&&J?.state.transitionStatus==="starting",Q=Jt(()=>$?J?.state.instantType:void 0).current,I=uC({open:d,openProp:r,activeTriggerId:C,triggerIdProp:T,parent:k,disabled:m,highlightItemOnHover:O,modal:k.type===void 0?h:void 0,rootId:L,instantType:Q},j,H!=null);I.useControlledProp("openProp",r),I.useControlledProp("triggerIdProp",T),I.useContextCallback("onOpenChangeComplete",f);const ee=I.useState("floatingTreeRoot"),ie=Ev(ee),F=I.useState("open"),z=I.useState("activeTriggerElement"),q=I.useState("positionerElement"),P=I.useState("hoverEnabled"),K=I.useState("disabled"),ne=I.useState("lastOpenChangeReason"),R=I.useState("parent"),B=I.useState("activeIndex"),W=I.useState("payload"),V=I.useState("floatingParentNodeId"),oe=b.useRef(null),ae=b.useRef(R.type!=="context-menu"),ge=$t(),ue=b.useRef(!0),pe=$t(),Re=V!=null,{openMethod:ke,triggerProps:ve}=tC(F);I.useSyncedValues({disabled:m,highlightItemOnHover:O,modal:R.type===void 0?h:void 0,openMethod:ke,rootId:L}),Zd(I);const{forceUnmount:me,transitionStatus:je}=Wd(F,I,()=>{I.set("allowMouseEnter",!1)},$),Le=Xd(I.context.popupRef);b.useEffect(()=>{if(Q===void 0)return;const xe=()=>{I.state.instantType===Q&&I.set("instantType",void 0)};if(!F){xe();return}if(je!==void 0)return;if(I.context.popupRef.current==null){xe();return}const Ye=new AbortController;return Le(xe,Ye.signal),()=>{Ye.abort()}},[Q,F,je,Le,I]),Se(()=>{A&&!N?I.update({parent:{type:"context-menu",context:A},floatingNodeId:ie,floatingParentNodeId:H}):N&&I.update({floatingNodeId:ie,floatingParentNodeId:H})},[A,N,ie,H,I]),b.useEffect(()=>{if(F||(oe.current=null),R.type==="context-menu"){if(!F){ge.clear(),ae.current=!1;return}ge.start(500,()=>{ae.current=!0})}},[ge,F,R.type]),Se(()=>{!F&&!P&&I.set("hoverEnabled",!0)},[F,P,I]);const Ve=Oe((xe,Ye)=>{const nt=Ye.reason;if(!xe&&!I.select("open")||F===xe&&Ye.trigger===z&&ne===nt)return;const pt=Uv(Ye);if(!xe&&Ye.trigger==null&&(Ye.trigger=z??void 0),u?.(xe,Ye),Ye.isCanceled)return;I.state.floatingRootContext.dispatchOpenChange(xe,Ye);const Tn=Ye.event;if(xe===!1&&Tn?.type==="click"&&Tn.pointerType==="touch"&&!ue.current)return;xe&&nt===Aa?(ue.current=!1,pe.start(300,()=>{ue.current=!0})):(ue.current=!0,pe.clear());const Un=(nt===ja||nt===Gb)&&Tn.detail===0,En=!xe&&(nt===Ks||nt==null);oe.current=Ye.event;const At=Qd(I.state,xe,Ye.trigger,pt());At.openChangeReason=nt,R.type==="menubar"&&(nt===Aa||nt===_a||nt===Lt||nt===$f||nt===jl)?At.instantType="group":Un||En?At.instantType=Un?"click":"dismiss":At.instantType=void 0,I.update(At)}),Te=jv({popupStore:I,floatingRootContext:I.state.floatingRootContext,floatingId:j,nested:H!=null,onOpenChange:Ve}),Ue=Te.context.events;Se(()=>{const xe=({open:Ye,eventDetails:nt})=>Ve(Ye,nt);return Ue.on("setOpen",xe),()=>{Ue?.off("setOpen",xe)}},[Ue,Ve]);const Ee=b.useCallback(()=>{I.setOpen(!1,Ke(Nd))},[I]);b.useImperativeHandle(v,()=>({unmount:me,close:Ee}),[me,Ee]);let we;R.type==="context-menu"&&(we=R.context),b.useImperativeHandle(we?.positionerRef,()=>q,[q]),b.useImperativeHandle(we?.actionsRef,()=>({setOpen:Ve}),[Ve]);const Ae=qd(Te,{enabled:!K,bubbles:{escapeKey:S&&R.type==="menu"},outsidePress(){return R.type!=="context-menu"||oe.current?.type==="contextmenu"?!0:ae.current},externalTree:Re?ee:void 0}),Qe=ap(),Me=b.useCallback(xe=>{I.select("activeIndex")!==xe&&I.set("activeIndex",xe)},[I]),fe=jw(Te,{enabled:!K,listRef:I.context.itemDomElements,activeIndex:B,nested:R.type!==void 0,loopFocus:p,orientation:y,parentOrientation:R.type==="menubar"?R.context.orientation:void 0,rtl:Qe==="rtl",disabledIndices:Mo,onNavigate:Me,openOnArrowKeyDown:R.type!=="context-menu",externalTree:Re?ee:void 0,focusItemOnHover:O}),ye=b.useCallback(xe=>{I.context.typingRef.current=xe},[I]),de=Hw(Te,{enabled:!K,listRef:I.context.itemLabels,elementsRef:I.context.itemDomElements,activeIndex:B,resetMs:rE,onMatch:xe=>{F&&xe!==B&&I.set("activeIndex",xe)},onTyping:ye}),le=b.useMemo(()=>{const xe=Ao(de.reference,fe.reference,Ae.reference,{onMouseMove(){I.set("allowMouseEnter",!0)}},ve);return xe["aria-haspopup"]="menu",xe["aria-expanded"]=F,xe},[I,de.reference,fe.reference,Ae.reference,ve,F]),be=b.useMemo(()=>{const xe=Ao(fe.trigger,Ae.trigger,ve);return xe["aria-haspopup"]="menu",xe["aria-expanded"]=!1,xe},[fe.trigger,Ae.trigger,ve]);Jt(()=>(I.update({inactiveTriggerProps:be}),null));const Be=b.useMemo(()=>Ao(Fd,{id:j,role:"menu","aria-orientation":y==="horizontal"?"horizontal":void 0,"aria-labelledby":z?.id,onMouseMove(){I.set("allowMouseEnter",!0),R.type==="menu"&&I.set("hoverEnabled",!1)},onClick(){I.select("hoverEnabled")&&I.set("hoverEnabled",!1)},onKeyDown(xe){const Ye=I.select("keyboardEventRelay");Ye&&!xe.isPropagationStopped()&&Ye(xe)}},de.floating,fe.floating,Ae.floating),[z,j,y,R.type,I,de.floating,fe.floating,Ae.floating]),Ut=fe.item??Rt;Jd(I,{floatingRootContext:Te,activeTriggerProps:le,inactiveTriggerProps:be,popupProps:Be,itemProps:Ut});const tn=b.useMemo(()=>({store:I,parent:k}),[I,k]),Tt=E.jsxs(l0.Provider,{value:tn,children:[w&&E.jsx(Kd,{handle:w,store:I}),typeof l=="function"?l({payload:W}):l]});return R.type===void 0||R.type==="context-menu"?E.jsx(vE,{externalTree:ee,children:Tt}):Tt});function uC(n,i,l){return Jt(()=>new oC(n,i,l)).current}const bs=5;function cC(n,i){const l=fC(i);return n.clientX>=l.left-bs&&n.clientX<=l.right+bs&&n.clientY>=l.top-bs&&n.clientY<=l.bottom+bs}function fC(n){const i=n.getBoundingClientRect(),l=yt(n);if(xd)return i;const r=l.getComputedStyle(n,"::before"),u=l.getComputedStyle(n,"::after");if(!(r.content!=="none"||u.content!=="none"))return i;const d=parseFloat(r.width)||0,m=parseFloat(r.height)||0,h=parseFloat(u.width)||0,p=parseFloat(u.height)||0,y=Math.max(i.width,d,h),v=Math.max(i.height,m,p),S=y-i.width,w=v-i.height;return{left:i.left-S/2,right:i.right+S/2,top:i.top-w/2,bottom:i.bottom+w/2}}function h0(n={}){const{highlightItemOnHover:i,highlightedIndex:l,onHighlightedIndexChange:r}=$s(),{ref:u,index:f}=sp(n),d=l===f,m=b.useRef(null),h=Hi(u,m);return{compositeProps:{tabIndex:d?0:-1,onFocus(){r(f)},onMouseMove(){const y=m.current;if(!i||!y)return;const v=y.hasAttribute("disabled")||y.ariaDisabled==="true";!d&&!v&&y.focus()}},compositeRef:h,index:f}}function dC(n){const{render:i,className:l,style:r,state:u=Rt,props:f=Mo,refs:d=Mo,metadata:m,stateAttributesMapping:h,tag:p="div",...y}=n,{compositeProps:v,compositeRef:S}=h0({metadata:m});return bt(p,n,{state:u,ref:[S,...d],props:[v,...f,y],stateAttributesMapping:h})}function g0(n){if(dt(n)&&n.hasAttribute("data-rootownerid"))return n.getAttribute("data-rootownerid");if(!Ro(n))return g0(Do(n))}function pC(n,i){const l=b.useRef(null);function r(f){Xn.flushSync(()=>{n.setOpen(!1,Ke(_a,f.nativeEvent,f.currentTarget))}),Y1(l.current)?.focus()}function u(f){const d=n.select("positionerElement");if(d&&Da(f,d))n.context.beforeContentFocusGuardRef.current?.focus();else{Xn.flushSync(()=>{n.setOpen(!1,Ke(_a,f.nativeEvent,f.currentTarget))});let m=P1(n.context.triggerFocusTargetRef.current||i.current);for(;m!==null&&Ne(d,m);){const h=m;if(m=Ld(m),m===h)break}m?.focus()}}return{preFocusGuardRef:l,handlePreFocusGuardFocus:r,handleFocusTargetFocus:u}}function hC(n){const{enabled:i=!0,mouseDownAction:l,open:r}=n,u=b.useRef(!1);return b.useMemo(()=>i?{onMouseDown:f=>{(l==="open"&&!r||l==="close"&&r)&&(u.current=!0,Fe(f.currentTarget).addEventListener("click",()=>{u.current=!1},{once:!0}))},onClick:f=>{u.current&&(u.current=!1,f.preventBaseUIHandler())}}:Rt,[i,l,r])}const gC=Lb(function(i,l){const{render:r,className:u,style:f,disabled:d=!1,nativeButton:m=!0,id:h,openOnHover:p,delay:y=100,closeDelay:v=0,handle:S,payload:w,...T}=i,C=La(!0),A=Pv(S)??C?.store;if(!A)throw new Error(Zt(85));const N=Pi(h),M=A.useState("isTriggerActive",N),D=A.useState("floatingRootContext"),k=A.useState("isOpenedByTrigger",N),L=A.useState("triggerPopupId",N),j=b.useRef(null),H=yC(),J=$s(!0),$=hi(),Q=b.useMemo(()=>$??new Pd,[$]),I=Ev(Q),ee=Ii(),{registerTrigger:ie,isMountedByThisTrigger:F}=Bv(N,j,A,{payload:w,closeDelay:v,parent:H,floatingTreeRoot:Q,floatingNodeId:I,floatingParentNodeId:ee,keyboardEventRelay:J?.relayKeyboardEvent}),z=H.type==="menubar",q=A.useState("disabled"),P=d||q||z&&H.context.disabled,{getButtonProps:K,buttonRef:ne}=Ua({disabled:P,native:m});b.useEffect(()=>{!k&&H.type===void 0&&(A.context.allowMouseUpTriggerRef.current=!1)},[A,k,H.type]);const R=b.useRef(null),B=$t(),W=Oe(we=>{if(!R.current)return;B.clear(),A.context.allowMouseUpTriggerRef.current=!1;const Ae=we.target;Ne(R.current,Ae)||Ne(A.select("positionerElement"),Ae)||Ae===R.current||Ae!=null&&g0(Ae)===A.select("rootId")||cC(we,R.current)||Q.events.emit("close",{domEvent:we,reason:h1})});b.useEffect(()=>{k&&A.select("lastOpenChangeReason")===Lt&&Fe(R.current).addEventListener("mouseup",W,{once:!0})},[k,W,A]);const V=z&&H.context.hasSubmenuOpen,ae=Gv(D,{enabled:(p??V)&&!P&&(!z||V&&!F),handleClose:Xv({blockPointerEvents:!z}),mouseOnly:!0,move:!1,restMs:H.type===void 0?y:void 0,delay:{close:v},triggerElementRef:j,externalTree:Q,isActiveTrigger:M,isClosing:()=>A.select("transitionStatus")==="ending"}),ge=mC(k,A.select("lastOpenChangeReason")),ue=TE(D,{enabled:!P,event:k&&z?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:H.type===void 0?ge:!1}),pe=Yv(D,{enabled:!P&&V}),Re=hC({open:k,enabled:z,mouseDownAction:"open"}),ke=b.useMemo(()=>Ao(pe.reference,ue.reference),[pe.reference,ue.reference]),ve=A.useState("triggerProps",F),{preFocusGuardRef:me,handlePreFocusGuardFocus:je,handleFocusTargetFocus:Le}=pC(A,j),Ve={disabled:P,open:k},Te=[R,l,ne,ie,j],Ue=[ke,ae??Rt,ve,{"aria-haspopup":"menu","aria-controls":L,id:N,onMouseDown:we=>{if(A.select("open"))return;B.start(200,()=>{A.context.allowMouseUpTriggerRef.current=!0}),Fe(we.currentTarget).addEventListener("mouseup",W,{once:!0})}},z?{role:"menuitem"}:{},Re,T,K],Ee=bt("button",i,{enabled:!z,stateAttributesMapping:Ey,state:Ve,ref:Te,props:Ue});return z?E.jsx(dC,{tag:"button",render:r,className:u,style:f,state:Ve,refs:Te,props:Ue,stateAttributesMapping:Ey}):k?E.jsxs(b.Fragment,{children:[E.jsx(Li,{ref:me,onFocus:je},`${N}-pre-focus-guard`),E.jsx(b.Fragment,{children:Ee},N),E.jsx(Li,{ref:A.context.triggerFocusTargetRef,onFocus:Le},`${N}-post-focus-guard`)]}):E.jsx(b.Fragment,{children:Ee},N)});function mC(n,i){const l=$t(),[r,u]=b.useState(!1);return Se(()=>{n&&i===Lt?(u(!0),l.start(sE,()=>{u(!1)})):n||(l.clear(),u(!1))},[n,i,l]),r}function yC(){const n=p0();return b.useMemo(()=>n?{type:"menubar",context:n}:{type:void 0},[n])}const bC=b.forwardRef(function(i,l){const{className:r,render:u,orientation:f="horizontal",style:d,...m}=i;return bt("div",i,{state:{orientation:f},ref:l,props:[{role:"separator","aria-orientation":f},m]})});function vC(n){return n==null||n.hasAttribute("disabled")||n.getAttribute("aria-disabled")==="true"}const SC=n=>n?.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();function xC(n,i,l=[]){if(i==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:SC(n),size:24,node:i,...l.length>0?{aliases:l}:{}}}const TC=n=>{let i="",l=!1;for(const r of n){if(r==="-"||r==="_"||r<=" "){l=i.length>0;continue}i.length===0?i+=r.toLowerCase():i+=l?r.toUpperCase():r,l=!1}return i};const EC=n=>{const i=TC(n);return i.charAt(0).toUpperCase()+i.slice(1)};const fd=(...n)=>n.filter((i,l,r)=>!!i&&i.trim()!==""&&r.indexOf(i)===l).join(" ").trim();const ki={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};function Lf(n){return n!=null}function wC(n,i={}){const l=i.attributeNames??{},r=S=>l[S]??S,u=n.size??n.width??ki.width,f=n.size??n.height??ki.height,d=n.aliases?.filter(S=>typeof S=="string"&&S.trim()!=="").map(S=>`lucide-${S}`)??[],m=[...n.name?[`lucide-${n.name}`]:[],...d],h=i.className?.split(" ").filter(Boolean)??[],p=i.includeDefaultClasses===!1?fd(...h):fd("lucide",...m,...h),y=i.absoluteStrokeWidth?Number(i.strokeWidth??ki["stroke-width"])*Number(n.size??n.width??ki.width)/Number(i.size??i.width??ki.width):i.strokeWidth??ki["stroke-width"];return["svg",{...Object.entries(ki).reduce((S,[w,T])=>(S[r(w)]=T,S),{}),..."color"in i&&i.color&&{[r("stroke")]:i.color},..."size"in i&&Lf(i.size)&&{[r("width")]:i.size,[r("height")]:i.size},..."width"in i&&Lf(i.width)&&{[r("width")]:i.width},..."height"in i&&Lf(i.height)&&{[r("height")]:i.height},[r("stroke-width")]:y,...p&&{[r("class")]:p},[r("viewBox")]:`0 0 ${u} ${f}`,...i.hasA11yProp===!1?{[r("aria-hidden")]:"true"}:{},..."attributes"in i&&i.attributes},n.node.map(S=>{const[w,T,C]=S,O=i.nonScalingStroke?{[r("vector-effect")]:"non-scaling-stroke",...T}:T;return C?[w,O,C]:[w,O]})]}function RC(n,i={}){return wC(n,{...i,attributeNames:{...i.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}const CC=n=>{for(const i in n)if(i.startsWith("aria-")||i==="role"||i==="title")return!0;return!1},OC=b.createContext({}),AC=()=>b.useContext(OC),MC=b.forwardRef(({color:n,size:i,width:l,height:r,strokeWidth:u,absoluteStrokeWidth:f,nonScalingStroke:d,className:m="",children:h,iconNode:p=[],icon:y={node:p,aliases:[],size:24},...v},S)=>{const{size:w=24,strokeWidth:T=2,absoluteStrokeWidth:C=!1,nonScalingStroke:O=!1,color:A="currentColor",className:N=""}=AC()??{},M=!!h||CC(v),[D,k,L=[]]=RC(y,{color:n??A,width:l??i??w,height:r??i??w,strokeWidth:u??T,absoluteStrokeWidth:f??C,nonScalingStroke:d??O,className:fd(N,m),hasA11yProp:M,attributes:v});return b.createElement(D,{ref:S,...k},[...L.map(([j,H])=>b.createElement(j,H)),...Array.isArray(h)?h:[h]])});function Pt(n,i=[],l=[]){const r=typeof n=="string"?xC(n,i,l):n,u=b.forwardRef(({className:f,...d},m)=>b.createElement(MC,{ref:m,icon:r,className:f,...d}));return r.name&&(u.displayName=EC(r.name)),u}const m0={name:"cloud",size:24,node:[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]};m0.node;const DC=Pt(m0);const y0={name:"copy",size:24,node:[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]};y0.node;const NC=Pt(y0);const b0={name:"ellipsis",size:24,node:[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],aliases:["more-horizontal"]};b0.node;const zC=Pt(b0);const v0={name:"external-link",size:24,node:[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]};v0.node;const fp=Pt(v0);const S0={name:"link",size:24,node:[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]};S0.node;const _C=Pt(S0);const x0={name:"log-in",size:24,node:[["path",{d:"m10 17 5-5-5-5",key:"1bsop3"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}]]};x0.node;const kC=Pt(x0);const T0={name:"log-out",size:24,node:[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]};T0.node;const jC=Pt(T0);const E0={name:"message-square",size:24,node:[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]};E0.node;const HC=Pt(E0);const w0={name:"pencil",size:24,node:[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]};w0.node;const LC=Pt(w0);const R0={name:"pin-off",size:24,node:[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89",key:"znwnzq"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11",key:"c9qhm2"}]]};R0.node;const UC=Pt(R0);const C0={name:"pin",size:24,node:[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]};C0.node;const gb=Pt(C0);const O0={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};O0.node;const A0=Pt(O0);const M0={name:"rotate-ccw",size:24,node:[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]};M0.node;const BC=Pt(M0);const D0={name:"shapes",size:24,node:[["path",{d:"M8.3 10a.7.7 0 0 1-.626-1.079L11.4 3a.7.7 0 0 1 1.198-.043L16.3 8.9a.7.7 0 0 1-.572 1.1Z",key:"1bo67w"}],["rect",{x:"3",y:"14",width:"7",height:"7",rx:"1",key:"1bkyp8"}],["circle",{cx:"17.5",cy:"17.5",r:"3.5",key:"w3z12y"}]]};D0.node;const IC=Pt(D0);const N0={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};N0.node;const dd=Pt(N0);const z0={name:"triangle-alert",size:24,node:[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["alert-triangle"]};z0.node;const tu=Pt(z0);const _0={name:"upload",size:24,node:[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]};_0.node;const k0=Pt(_0);const j0={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};j0.node;const dp=Pt(j0),pd=500,PC=8;function YC(n,i,l){return l<n.at||l-n.at>pd?!1:Math.hypot(i.clientX-n.x,i.clientY-n.y)<=PC}const mb=["pointerdown","mousedown","pointerup","mouseup","click","dblclick"];function qC(n,i,l=Date.now){let r=!1,u=!1,f=0;const d=()=>{if(!u){u=!0,n.clearTimeout(f);for(const p of mb)n.removeEventListener(p,h,!0)}},m=()=>{r?f=n.setTimeout(m,pd):d()},h=p=>{const y=p.type==="pointerdown"||p.type==="mousedown";!(r&&!y)&&!YC(i,p,l())||(p.preventDefault(),p.stopImmediatePropagation(),y?r=!0:(p.type==="click"||p.type==="dblclick")&&(r=!1))};for(const p of mb)n.addEventListener(p,h,!0);return f=n.setTimeout(m,Math.max(0,pd-(l()-i.at))),d}function VC(n){n.detail<1||!n.view||qC(n.view,{x:n.clientX,y:n.clientY,at:Date.now()})}const GC="rounded-lg bg-surface p-1 text-[13px] text-fg shadow-popup outline-none origin-[var(--transform-origin)] transition-[opacity,transform] duration-100 data-[starting-style]:opacity-0 data-[starting-style]:scale-95 data-[ending-style]:opacity-0",XC="flex h-7 min-w-40 cursor-default select-none items-center gap-2 rounded-md px-2 outline-none data-[highlighted]:bg-hover data-[disabled]:opacity-40";function H0({trigger:n,children:i,side:l="bottom",align:r="start",open:u,onOpenChange:f}){return E.jsxs(sC,{open:u,onOpenChange:f?d=>f(d):void 0,children:[E.jsx(gC,{render:n,onKeyDown:_s}),E.jsx(HR,{children:E.jsx(ZR,{side:l,align:r,sideOffset:6,className:"z-[1000]",children:E.jsx(kR,{className:GC,children:i})})})]})}function To({children:n,onSelect:i,icon:l,shortcut:r,disabled:u,danger:f}){return E.jsxs(AR,{className:zo(XC,f&&"text-danger"),disabled:u,onClick:d=>{VC(d.nativeEvent),i?.()},onKeyDown:_s,children:[E.jsx("span",{className:"flex size-4 items-center justify-center text-fg-muted",children:l}),E.jsx("span",{className:"flex-1",children:n}),r?E.jsx("span",{className:"ml-4 text-xs text-fg-subtle",children:r}):null]})}function ks(){return E.jsx(bC,{className:"mx-1 my-1 h-px bg-line"})}function FC({children:n}){return E.jsx("div",{className:"px-2 py-1 text-xs text-fg-subtle",children:n})}const L0=b.createContext(void 0);function Yi(n){const i=b.useContext(L0);if(!n&&i===void 0)throw new Error(Zt(27));return i}const KC=b.forwardRef(function(i,l){const{render:r,className:u,style:f,forceRender:d=!1,...m}=i,h=Yi(),p=h.useState("open"),y=h.useState("nested"),v=h.useState("mounted"),S=h.useState("transitionStatus");return bt("div",i,{state:{open:p,transitionStatus:S},ref:[h.context.backdropRef,l],stateAttributesMapping:Md,props:[{role:"presentation",hidden:!v,style:{userSelect:"none",WebkitUserSelect:"none"}},m],enabled:d||!y})}),QC=b.forwardRef(function(i,l){const{render:r,className:u,style:f,disabled:d=!1,nativeButton:m=!0,...h}=i,p=Yi(),y=p.useState("open"),{getButtonProps:v,buttonRef:S}=Ua({disabled:d,native:m}),w={disabled:d};function T(C){y&&p.setOpen(!1,Ke(p1,C.nativeEvent))}return bt("button",i,{state:w,ref:[l,S],props:[{onClick:T},h,v]})}),ZC=b.forwardRef(function(i,l){const{render:r,className:u,style:f,id:d,...m}=i,h=Yi(),p=Pi(d);return h.useSyncedValueWithCleanup("descriptionElementId",p),bt("p",i,{ref:l,props:[{id:p},m]})}),U0=b.createContext(void 0);function WC(){const n=b.useContext(U0);if(n===void 0)throw new Error(Zt(26));return n}const JC="--nested-dialogs",$C="data-nested-dialog-open",eO={...Ad,...Gs,nestedDialogOpen(n){return n?{[$C]:""}:null}},tO=b.forwardRef(function(i,l){const{render:r,className:u,style:f,finalFocus:d,initialFocus:m,...h}=i,p=Yi(),y=p.useState("descriptionElementId"),v=p.useState("disablePointerDismissal"),S=p.useState("floatingRootContext"),w=p.useState("popupProps"),T=p.useState("modal"),C=p.useState("mounted"),O=p.useState("nested"),A=p.useState("nestedOpenDialogCount"),N=p.useState("open"),M=p.useState("openMethod"),D=p.useState("titleElementId"),k=p.useState("transitionStatus"),L=p.useState("role"),j=S.useState("floatingId");WC(),Ha({open:N,ref:p.context.popupRef,onComplete(){N&&p.context.onOpenChangeComplete?.(!0)}});const H=m===void 0?ww(p.context.popupRef):m,J=A>0,$=p.useStateSetter("popupElement"),I=bt("div",i,{state:{open:N,nested:O,transitionStatus:k,nestedDialogOpen:J},props:[w,{id:j,"aria-labelledby":D,"aria-describedby":y,role:L,...Fd,hidden:!C,onKeyDown(ee){up.has(ee.key)&&ee.stopPropagation()},style:{[JC]:A}},h],ref:[l,p.context.popupRef,$],stateAttributesMapping:eO});return E.jsx(wv,{context:S,openInteractionType:M,disabled:!C,closeOnFocusOut:!v,initialFocus:H,returnFocus:d,modal:T!==!1,restoreFocus:"popup",children:I})}),nO=b.forwardRef(function(i,l){const{keepMounted:r=!1,...u}=i,f=Yi(),d=f.useState("mounted"),m=f.useState("modal"),h=f.useState("open");return d||r?E.jsx(U0.Provider,{value:r,children:E.jsxs(vv,{ref:l,...u,children:[d&&m===!0&&E.jsx(f0,{ref:f.context.internalBackdropRef,inert:Js(!h)}),i.children]})}):null});function oO({store:n,parentContext:i,isDrawer:l}){const r=n.useState("open"),u=n.useState("disablePointerDismissal"),f=n.useState("modal"),d=n.useState("popupElement"),m=n.useState("floatingRootContext"),[h,p]=b.useState(0),[y,v]=b.useState(0),S=h===0,w=qd(m,{outsidePressEvent(){return n.context.internalBackdropRef.current||n.context.backdropRef.current?"intentional":{mouse:f==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(T){if(!n.context.outsidePressEnabledRef.current||"button"in T&&T.button!==0)return!1;if("touches"in T){if(T.type==="touchend"){if(T.changedTouches.length!==1||T.touches.length!==0)return!1}else if(T.touches.length!==1)return!1}const C=St(T);if(S&&!u){if(f){const O=n.context.internalBackdropRef.current,A=n.context.backdropRef.current;return O||A?O===C||A===C||Ne(C,d)&&!C?.hasAttribute("data-base-ui-portal"):!0}return!0}return!1},escapeKey:S});return d0(r&&f===!0,d),n.useContextCallback("onNestedDialogOpen",(T,C)=>{p(T),v(C)}),Se(()=>(i?.onNestedDialogOpen&&(r?i.onNestedDialogOpen(h+1,y+(l?1:0)):i.onNestedDialogOpen(0,0)),()=>{i?.onNestedDialogOpen&&r&&i.onNestedDialogOpen(0,0)}),[l,r,h,y,i]),Jd(n,{activeTriggerProps:w.reference,inactiveTriggerProps:w.trigger,popupProps:w.floating,nestedOpenDialogCount:h,nestedOpenDrawerCount:y}),null}const iO={...np,modal:n=>n.modal,nested:n=>n.nested,nestedOpenDialogCount:n=>n.nestedOpenDialogCount,nestedOpenDrawerCount:n=>n.nestedOpenDrawerCount,disablePointerDismissal:n=>n.disablePointerDismissal,openMethod:n=>n.openMethod,descriptionElementId:n=>n.descriptionElementId,titleElementId:n=>n.titleElementId,viewportElement:n=>n.viewportElement,role:n=>n.role};class aO extends Xl{constructor(i,l,r){const u=new $d,f=lO(i,u,l,r);super(f,rO(u),iO)}setOpen=(i,l)=>{l.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!i&&l.trigger==null&&this.state.activeTriggerId!=null&&(l.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(i,l),!l.isCanceled&&(this.state.floatingRootContext.dispatchOpenChange(i,l),this.update(Qd(this.state,i,l.trigger)))}}function lO(n,i,l,r=!1){return{...ep(i,l,r),modal:!0,disablePointerDismissal:!1,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:"dialog",...n}}function rO(n){return{popupRef:b.createRef(),backdropRef:b.createRef(),internalBackdropRef:b.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:n,onOpenChange:void 0,onOpenChangeComplete:void 0}}function sO(n,i){const{children:l,open:r,defaultOpen:u=!1,onOpenChange:f,onOpenChangeComplete:d,disablePointerDismissal:m=!1,modal:h=!0,actionsRef:p,handle:y,triggerId:v,defaultTriggerId:S=null}=i,w=n==="drawer",T=h,C=m,O="dialog",A=Yi(!0),N=A!=null,M={modal:T,disablePointerDismissal:C,nested:N,role:O},D=Lv(($,Q)=>new aO({open:u,openProp:r,activeTriggerId:S,triggerIdProp:v,...M},$,Q),!0);D.useControlledProp("openProp",r),D.useControlledProp("triggerIdProp",v),D.useSyncedValues(M),D.useContextCallback("onOpenChange",f),D.useContextCallback("onOpenChangeComplete",d);const k=D.useState("open"),L=D.useState("mounted"),j=D.useState("payload");Ow(D,k),Zd(D);const{forceUnmount:H}=Wd(k,D);b.useImperativeHandle(p,()=>({unmount:H,close:()=>D.setOpen(!1,Ke(Nd))}),[H,D]);const J=k||L;return E.jsxs(L0.Provider,{value:D,children:[y&&E.jsx(Kd,{handle:y,store:D}),J&&E.jsx(oO,{store:D,parentContext:A?.context,isDrawer:w}),typeof l=="function"?l({payload:j}):l]})}const uO=js(function(i){return sO("dialog",i)}),cO=b.forwardRef(function(i,l){const{render:r,className:u,style:f,id:d,...m}=i,h=Yi(),p=Pi(d);return h.useSyncedValueWithCleanup("titleElementId",p),bt("h2",i,{ref:l,props:[{id:p},m]})});function pp({open:n,onOpenChange:i,title:l,description:r,children:u,footer:f,className:d}){return E.jsx(uO,{open:n,onOpenChange:m=>i(m),children:E.jsxs(nO,{children:[E.jsx(KC,{className:"fixed inset-0 z-[900] bg-black/30 transition-opacity data-[starting-style]:opacity-0 data-[ending-style]:opacity-0"}),E.jsxs(tO,{className:zo("fixed left-1/2 top-1/2 z-[901] w-[min(28rem,calc(100vw-2rem))] -translate-x-1/2 -translate-y-1/2 rounded-xl bg-surface p-5 text-fg shadow-popup outline-none","transition-[opacity,transform] data-[starting-style]:scale-95 data-[starting-style]:opacity-0 data-[ending-style]:opacity-0",d),children:[E.jsxs("div",{className:"mb-3 flex items-start gap-3",children:[E.jsxs("div",{className:"flex-1",children:[E.jsx(cO,{className:"text-[15px] font-semibold",children:l}),r?E.jsx(ZC,{className:"mt-1 text-fg-muted",children:r}):null]}),E.jsx(QC,{"aria-label":"Close",className:"rounded-md p-1 text-fg-muted hover:bg-hover",children:E.jsx(dp,{className:"size-4"})})]}),u,f?E.jsx("div",{className:"mt-4 flex justify-end gap-2",children:f}):null]})]})})}const hp="data-composite-item-active";function fO(n){const{loopFocus:i=!0,orientation:l="both",grid:r,onLoop:u,direction:f,highlightedIndex:d,onHighlightedIndexChange:m,rootRef:h,enableHomeAndEndKeys:p=!1,stopEventPropagation:y,disabledIndices:v,modifierKeys:S=Mo}=n,[w,T]=b.useState(0),C=r!=null,O=b.useRef(null),A=Hi(O,h),N=b.useRef([]),M=b.useRef(!1),D=b.useRef(null),k=d??w,L=Oe((Q,I=!1)=>{if(D.current=N.current[Q]??null,(m??T)(Q),I){const ee=N.current[Q];ub(O.current,ee,f,l)}}),j=Oe(Q=>{if(Q.size===0)return;if(M.current){const F=N.current,z=F.indexOf(D.current);if(z===-1){const q=F[k];!q||Ma(F,k,v)?L(dO(F,v)):D.current=q}else z!==k&&L(z);return}M.current=!0;const I=Array.from(Q.keys()),ee=I.find(F=>F?.hasAttribute(hp))??null,ie=ee?Q.get(ee)?.index??-1:-1;if(ie!==-1)L(ie);else if(Ma(I,k,v)){const F=wo(I,{disabledIndices:v});Ll(I,F)||L(F)}ub(O.current,ee,f,l)});Se(()=>{if(v==null||d!=null||!M.current)return;const Q=N.current;if(Ma(Q,k,v)){const I=wo(Q,{disabledIndices:v});Ll(Q,I)||L(I)}},[v,d,k,N,L]);const H=Oe((Q,I,ee)=>u?u(Q,I,ee,N):ee),J=Oe(Q=>{const I=Q.key===ud||Q.key===cd;if(!up.has(Q.key)||!p&&I||pO(Q,S)||!O.current)return;const ie=f==="rtl",F=ie?rd:sd,z=ie?sd:rd,q=l==="vertical"?ld:F,P=l==="vertical"?ad:z,K=St(Q.nativeEvent);if(K!=null&&sb(K)&&!vC(K)){const oe=K.selectionStart,ae=K.selectionEnd,ge=K.value;if(oe==null||Q.shiftKey||oe!==ae||Q.key!==P&&oe<ge.length||Q.key!==q&&oe>0)return}let ne=k;const R=vs(N,v),B=td(N,v);r!=null&&(ne=r({disabledIndices:v,elementsRef:N,event:Q,highlightedIndex:k,loopFocus:i,maxIndex:B,minIndex:R,onLoop:H,orientation:l,rtl:ie}));const W=l!=="vertical"&&Q.key===F||l!=="horizontal"&&Q.key===ld,V=l!=="vertical"&&Q.key===z||l!=="horizontal"&&Q.key===ad;p&&(Q.key===ud?ne=R:Q.key===cd&&(ne=B)),ne===k&&(W||V)&&(i&&ne===B&&W?(ne=R,u&&(ne=u(Q,k,ne,N))):i&&ne===R&&V?(ne=B,u&&(ne=u(Q,k,ne,N))):ne=wo(N.current,{startingIndex:ne,decrement:V,disabledIndices:v})),ne!==k&&!Ll(N.current,ne)&&(y&&Q.stopPropagation(),(C||I||W||V)&&Q.preventDefault(),L(ne,!0),queueMicrotask(()=>{N.current[ne]?.focus()}))});return{props:{ref:A,onFocus(Q){const I=O.current,ee=St(Q.nativeEvent);!I||ee==null||!sb(ee)||ee.setSelectionRange(0,ee.value.length)},onKeyDown:J},highlightedIndex:k,onHighlightedIndexChange:L,elementsRef:N,onMapChange:j,relayKeyboardEvent:J}}function dO(n,i){let l=-1;for(let r=0;r<n.length;r+=1){const u=n[r];if(!(!u||Ma(n,r,i))){if(u.hasAttribute(hp))return r;l===-1&&(l=r)}}return Math.max(l,0)}function pO(n,i){for(const l of zR)if(!i.includes(l)&&n.getModifierState(l))return!0;return!1}function hO(n){const{render:i,className:l,style:r,refs:u=Mo,props:f=Mo,state:d=Rt,stateAttributesMapping:m,highlightedIndex:h,onHighlightedIndexChange:p,orientation:y,grid:v,loopFocus:S,onLoop:w,enableHomeAndEndKeys:T,onMapChange:C,stopEventPropagation:O=!0,rootRef:A,disabledIndices:N,modifierKeys:M,highlightItemOnHover:D=!1,tag:k="div",...L}=n,j=ap(),{props:H,highlightedIndex:J,onHighlightedIndexChange:$,elementsRef:Q,onMapChange:I,relayKeyboardEvent:ee}=fO({grid:v,loopFocus:S,onLoop:w,orientation:y,highlightedIndex:h,onHighlightedIndexChange:p,rootRef:A,stopEventPropagation:O,enableHomeAndEndKeys:T,direction:j,disabledIndices:N,modifierKeys:M}),ie=bt(k,n,{state:d,ref:u,props:[H,...f,L],stateAttributesMapping:m}),F=b.useMemo(()=>({highlightedIndex:J,onHighlightedIndexChange:$,highlightItemOnHover:D,relayKeyboardEvent:ee}),[J,$,D,ee]);return E.jsx(r0.Provider,{value:F,children:E.jsx(cp,{elementsRef:Q,onMapChange:z=>{C?.(z),I(z)},children:ie})})}const gO="h-7 w-full min-w-0 rounded-control border border-line bg-surface-2 px-2 text-[13px] text-fg outline-none placeholder:text-fg-subtle focus:border-accent focus:bg-surface",hd=b.forwardRef(function({className:i,...l},r){return E.jsx("input",{ref:r,"data-ui-field":"",className:zo(gO,i),...l})}),B0=b.createContext(void 0);function gp(){const n=b.useContext(B0);if(n===void 0)throw new Error(Zt(64));return n}const mO="data-activation-direction",nu={tabActivationDirection:n=>({[mO]:n})},yO=b.forwardRef(function(i,l){const{className:r,defaultValue:u=0,onValueChange:f,orientation:d="horizontal",render:m,value:h,style:p,...y}=i,v=i.defaultValue!==void 0,S=b.useRef([]),[w,T]=b.useState(()=>new Map),[C,O]=xR({controlled:h,default:u,name:"Tabs",state:"value"}),A=h!==void 0,[N,M]=b.useState(()=>new Map),D=b.useRef(void 0),k=b.useCallback(ue=>gd(N,ue),[N]),[L,j]=b.useState(()=>({previousValue:C,tabActivationDirection:"none"})),{previousValue:H,tabActivationDirection:J}=L;let $=J,Q=!1;H!==C&&($=yb(H,C,d,N),Q=H!=null&&C!=null&&k(C)==null);const I=Q?H:C,ee=H!==I||J!==$;Se(()=>{ee&&j({previousValue:I,tabActivationDirection:$})},[I,ee,$]);const ie=Oe((ue,pe)=>{const Re=yb(C,ue,d,N);pe.activationDirection=Re,f?.(ue,pe),!pe.isCanceled&&O(ue)}),F=Oe((ue,pe)=>{f?.(ue,Ke(pe,void 0,void 0,{activationDirection:"none"}))}),z=Oe((ue,pe)=>(T(Re=>{const ke=new Map(Re);return ke.set(ue,pe),ke}),()=>{T(Re=>{if(Re.get(ue)!==pe)return Re;const ke=new Map(Re);return ke.delete(ue),ke})})),q=b.useCallback(ue=>w.get(ue),[w]),P=b.useCallback(ue=>{for(const pe of N.values())if(ue===pe.value)return pe.id},[N]),K=b.useMemo(()=>({getTabElementBySelectedValue:k,getTabIdByPanelValue:P,getTabPanelIdByValue:q,onValueChange:ie,orientation:d,registerMountedTabPanel:z,setTabMap:M,tabActivationDirection:$,value:C}),[k,P,q,ie,d,z,M,$,C]),ne=b.useMemo(()=>{for(const ue of N.values())if(ue.value===C)return ue},[N,C]),R=b.useMemo(()=>{for(const ue of N.values())if(!ue.disabled)return ue.value},[N]),B=b.useRef(!v),W=b.useRef(u),V=b.useRef(v),oe=b.useRef(!1);Se(()=>{if(A)return;function ue(ve,me){O(ve),j({previousValue:ve,tabActivationDirection:"none"}),F(ve,me),B.current=!1}if(N.size===0){oe.current&&C!==null&&!D.current?.isConnected&&ue(null,Ry);return}oe.current=!0,D.current=N.keys().next().value;const pe=ne?.disabled,Re=ne==null&&C!==null;if(!pe&&C===W.current&&(V.current=!1),V.current&&pe&&C===W.current)return;const ke=B.current;if(pe||Re){const ve=R??null;if(C===ve){B.current=!1;return}let me=Ry;ke?me=Cy:pe&&(me=Xb),ue(ve,me);return}ke&&ne!=null&&(F(C,Cy),B.current=!1)},[R,A,F,ne,O,N,C]);const ge=bt("div",i,{state:{orientation:d,tabActivationDirection:$},ref:l,props:y,stateAttributesMapping:nu});return E.jsx(B0.Provider,{value:K,children:E.jsx(cp,{elementsRef:S,children:ge})})});function gd(n,i){for(const[l,r]of n.entries())if(i===r.value)return l;return null}function yb(n,i,l,r){if(n==null||i==null)return"none";const[u,f,d]=l==="horizontal"?["left","left","right"]:["top","up","down"],m=gd(r,n),h=gd(r,i);if(m==null||h==null)return m!==h&&(typeof n=="number"||typeof n=="string")&&typeof n==typeof i?i>n?d:f:"none";const p=m.getBoundingClientRect()[u],y=h.getBoundingClientRect()[u];return y<p?f:y>p?d:"none"}const I0=b.createContext(void 0);function bO(){const n=b.useContext(I0);if(n===void 0)throw new Error(Zt(65));return n}const vO=b.forwardRef(function(i,l){const{className:r,disabled:u=!1,render:f,value:d,id:m,nativeButton:h=!0,style:p,...y}=i,{value:v,getTabPanelIdByValue:S,onValueChange:w,orientation:T,tabActivationDirection:C}=gp(),{activateOnFocus:O,registerTabResizeObserverElement:A,tabsListElement:N}=bO(),{highlightedIndex:M,onHighlightedIndexChange:D}=$s(),k=Pi(m),L=b.useMemo(()=>({disabled:u,id:k,value:d}),[u,k,d]),{compositeProps:j,compositeRef:H,index:J}=h0({metadata:L}),$=d===v,Q=b.useRef(!1),I=b.useRef(null),ee=Oe(oe=>{I.current?.(),I.current=oe?A(oe):null});Se(()=>{if(Q.current){Q.current=!1;return}if(!($&&J>-1&&M!==J))return;const oe=N;if(oe!=null){const ae=kt(Fe(oe));if(ae&&Ne(oe,ae))return}u||D(J)},[$,J,M,D,u,N]);const{getButtonProps:ie,buttonRef:F}=Ua({disabled:u,native:h,focusableWhenDisabled:!0}),z=S(d),q=b.useRef(!1),P=b.useRef(!1);function K(oe){w(d,Ke(Fs,oe.nativeEvent,void 0,{activationDirection:"none"}))}function ne(oe){$||u||K(oe)}function R(oe){$||u||O&&(!q.current||P.current)&&K(oe)}function B(oe){if($||u)return;q.current=!0,P.current=oe.button===0;const ae=Fe(oe.currentTarget);function ge(){q.current=!1,P.current=!1,ae.removeEventListener("pointerup",ge),ae.removeEventListener("pointercancel",ge)}ae.addEventListener("pointerup",ge),ae.addEventListener("pointercancel",ge)}return bt("button",i,{state:{disabled:u,active:$,orientation:T,tabActivationDirection:C},ref:[l,F,H,ee],props:[j,{role:"tab","aria-controls":z,"aria-selected":$,id:k,onClick:ne,onFocus:R,onPointerDown:B,[hp]:$?"":void 0,onKeyDownCapture(){Q.current=!0}},y,ie],stateAttributesMapping:nu})});function SO(n,i){const l=yt(n).getComputedStyle(n).transform;let r=0,u=0,f=1;if(l&&l!=="none"){const d=l.match(/matrix(?:3d)?\(([^)]+)\)/);if(d){const m=d[1].split(", ").map(parseFloat);m.length===6?(r=m[4],u=m[5],f=Math.sqrt(m[0]*m[0]+m[1]*m[1])):m.length===16&&(r=m[12],u=m[13],f=m[0])}}return{x:r,y:u,scale:f}}const xO="data-index",TO={...nu,...Gs},EO=b.forwardRef(function(i,l){const{className:r,value:u,render:f,keepMounted:d=!1,style:m,...h}=i,{value:p,getTabIdByPanelValue:y,orientation:v,tabActivationDirection:S,registerMountedTabPanel:w}=gp(),T=Pi(),{ref:C,index:O}=sp(),A=u===p,{mounted:N,transitionStatus:M,setMounted:D}=Hv(A),k=!N,L=y(u),j={hidden:k,orientation:v,tabActivationDirection:S,transitionStatus:M},H=b.useRef(null),J=bt("div",i,{state:j,ref:[l,C,H],props:[{"aria-labelledby":L,hidden:k,id:T,role:"tabpanel",tabIndex:A?0:-1,inert:Js(!A),[xO]:O},h],stateAttributesMapping:TO});return Ha({open:A,ref:H,onComplete(){A||D(!1)}}),Se(()=>{if(!(T==null||k&&!d))return w(u,T)},[k,d,u,T,w]),d||N?J:null}),wO=b.forwardRef(function(i,l){const{activateOnFocus:r=!1,className:u,loopFocus:f=!0,render:d,style:m,...h}=i,{orientation:p,setTabMap:y,tabActivationDirection:v}=gp(),[S,w]=b.useState(0),[T,C]=b.useState(null),O=b.useRef(new Set),A=b.useRef(new Set),N=b.useRef(null);Se(()=>{if(typeof ResizeObserver>"u")return;const H=new ResizeObserver(()=>{O.current.forEach(J=>{J()})});return N.current=H,T&&H.observe(T),A.current.forEach(J=>{H.observe(J)}),()=>{H.disconnect(),N.current=null}},[T]);const M=Oe(H=>(O.current.add(H),()=>{O.current.delete(H)})),D=Oe(H=>(A.current.add(H),N.current?.observe(H),()=>{A.current.delete(H),N.current?.unobserve(H)})),k={orientation:p,tabActivationDirection:v},L={"aria-orientation":p==="vertical"?"vertical":void 0,role:"tablist"},j=b.useMemo(()=>({activateOnFocus:r,registerIndicatorUpdateListener:M,registerTabResizeObserverElement:D,tabsListElement:T}),[r,M,D,T]);return E.jsx(I0.Provider,{value:j,children:E.jsx(hO,{render:d,className:u,style:m,state:k,refs:[l,C],props:[L,h],stateAttributesMapping:nu,highlightedIndex:S,enableHomeAndEndKeys:!0,loopFocus:f,orientation:p,onHighlightedIndexChange:w,onMapChange:y,disabledIndices:Mo})})}),P0=b.createContext(void 0);function ou(){const n=b.useContext(P0);if(!n)throw new Error(Zt(73));return n}let bb=0;function Y0(n){return bb+=1,`${n}-${Math.random().toString(36).slice(2,6)}-${bb}`}function Uf(n,i){if(typeof n=="string")return{description:n};if(typeof n=="function"){const l=n(i);return typeof l=="string"?{description:l}:l}return n}function Bf(n){const i=new Map;let l=0,r=0;return n.forEach((u,f)=>{const d=u.transitionStatus==="ending";i.set(u.id,{value:u,domIndex:f,visibleIndex:d?-1:l,offsetY:r}),r+=u.height||0,d||(l+=1)}),i}function If(n,i){let l=0;return n.map(r=>{if(r.transitionStatus==="ending")return r;const u=l>=i;return l+=1,r.limited===u?r:{...r,limited:u}})}const Vn={toasts:n=>n.toasts,isEmpty:n=>n.toasts.length===0,toast:(n,i)=>n.toastMetadata.get(i)?.value,toastIndex:(n,i)=>n.toastMetadata.get(i)?.domIndex??-1,toastOffsetY:(n,i)=>n.toastMetadata.get(i)?.offsetY??0,toastVisibleIndex:(n,i)=>n.toastMetadata.get(i)?.visibleIndex??-1,focused:n=>n.focused,expanded:n=>n.hovering||n.focused,expandedOrOutOfFocus:n=>n.hovering||n.focused||!n.isWindowFocused,prevFocusElement:n=>n.prevFocusElement};class RO extends Xl{timers=new Map;areTimersPaused=!1;constructor(i){super({...i,toastMetadata:Bf(i.toasts)},{},Vn)}setViewport=i=>{this.set("viewport",i)};syncProviderProps(i,l){const r=this.state.limit!==l;if(this.state.timeout===i&&!r)return;const u={timeout:i,limit:l};if(r){const f=If(this.state.toasts,l);u.toasts=f,u.toastMetadata=Bf(f)}this.update(u)}disposeEffect=()=>()=>{this.timers.forEach(i=>{i.timeout?.clear()}),this.timers.clear()};removeToast(i,l=!1){const r=Vn.toastIndex(this.state,i);if(r===-1)return;const u=this.state.toasts[r];l||u?.onRemove?.();const f=[...this.state.toasts];f.splice(r,1),this.setToasts(f)}addToast=i=>{const{timeout:l,limit:r}=this.state,u=i.id||Y0("toast");if(i.id){const h=Vn.toast(this.state,i.id);if(h)if(h.transitionStatus==="ending")this.removeToast(i.id,!0);else{const{id:p,transitionStatus:y,...v}=i;return this.updateToastInternal(i.id,v,!0,!0),i.id}}const f={...i,id:u,updateKey:0,transitionStatus:"starting"},d=[f,...this.state.toasts];this.setToasts(If(d,r));const m=f.timeout??l;return f.type!=="loading"&&m>0&&this.scheduleTimer(u,m,()=>this.closeToast(u)),Vn.expandedOrOutOfFocus(this.state)&&this.pauseTimers(),u};updateToast=(i,l)=>{const r=Vn.toast(this.state,i);!r||r.transitionStatus==="ending"||this.updateToastInternal(i,typeof l=="function"?l(r):l,!1,!0)};updateToastInternal=(i,l,r=!1,u=!1)=>{const{timeout:f,toasts:d}=this.state,m=Vn.toast(this.state,i);if(!m||m.transitionStatus==="ending")return;const h={...m,...l,...u&&{updateKey:m.updateKey+1}};this.setToasts(d.map(O=>O.id===i?h:O));const p=h.timeout??f,y=m.timeout??f,v=Object.hasOwn(l,"timeout"),S=h.transitionStatus!=="ending"&&h.type!=="loading"&&p>0,w=this.timers.has(i),T=y!==p,C=m.type==="loading";if(!S&&w){this.clearTimer(i);return}S&&(!w||T||v||C||r)&&(this.clearTimer(i),this.scheduleTimer(i,p,()=>this.closeToast(i)),Vn.expandedOrOutOfFocus(this.state)&&this.pauseTimers())};closeToast=i=>{const l=i===void 0,{limit:r,toasts:u}=this.state;let f;if(l)f=u,this.clearTimers();else{const h=Vn.toast(this.state,i);if(!h)return;f=[h],this.clearTimer(i)}const d=u.map(h=>l||h.id===i?{...h,transitionStatus:"ending",height:0}:h),m=If(d,r);this.setToasts(m,!m.some(h=>h.transitionStatus!=="ending")),f.forEach(h=>{h.transitionStatus!=="ending"&&h.onClose?.()}),this.handleFocusManagement(i)};promiseToast=(i,l)=>{const r=Uf(l.loading),u=this.addToast({...r,type:"loading"}),f=i.then(d=>{const m=Uf(l.success,d);return this.updateToast(u,{...m,type:"success",timeout:m.timeout}),d}).catch(d=>{const m=Uf(l.error,d);return this.updateToast(u,{...m,type:"error",timeout:m.timeout}),Promise.reject(d)});return{}.hasOwnProperty.call(l,"setPromise")&&l.setPromise(f),f};pauseTimers(){this.areTimersPaused||(this.areTimersPaused=!0,this.timers.forEach(i=>{i.timeout&&(i.timeout.clear(),i.remaining=Math.max(i.remaining-(Date.now()-i.start),0))}))}resumeTimers(){this.areTimersPaused&&(this.areTimersPaused=!1,this.timers.forEach((i,l)=>{i.remaining=i.remaining>0?i.remaining:i.delay,i.timeout??=vn.create(),i.timeout.start(i.remaining,()=>{this.handleTimerFired(l),i.callback()}),i.start=Date.now()}))}restoreFocusToPrevElement(){this.state.prevFocusElement?.focus({preventScroll:!0})}handleDocumentPointerDown=i=>{if(i.pointerType!=="touch")return;const l=St(i);Ne(this.state.viewport,l)||(this.resumeTimers(),this.update({hovering:!1,focused:!1}))};scheduleTimer(i,l,r){const u=Date.now(),d=!Vn.expandedOrOutOfFocus(this.state)?vn.create():void 0;d?.start(l,()=>{this.handleTimerFired(i),r()}),this.timers.set(i,{timeout:d,start:u,delay:l,remaining:l,callback:r})}clearTimers(){this.timers.forEach(i=>{i.timeout?.clear()}),this.timers.clear(),this.areTimersPaused=!1}clearTimer(i){this.timers.get(i)?.timeout?.clear(),this.timers.delete(i),this.resetPausedStateIfNoTimersRemain()}handleTimerFired(i){this.timers.delete(i),this.resetPausedStateIfNoTimersRemain()}resetPausedStateIfNoTimersRemain(){this.timers.size===0&&(this.areTimersPaused=!1)}setToasts(i,l=i.length===0){const r={toasts:i,toastMetadata:Bf(i)};l&&(r.hovering=!1,r.focused=!1),this.update(r)}handleFocusManagement(i){const l=kt(Fe(this.state.viewport));if(!this.state.viewport||!Ne(this.state.viewport,l)||!ws(l))return;if(i===void 0){this.restoreFocusToPrevElement();return}const r=Vn.toasts(this.state),u=Vn.toastIndex(this.state,i),f=(m,h)=>{for(let p=m;p>=0&&p<r.length;p+=h)if(r[p].transitionStatus!=="ending")return r[p];return null},d=f(u+1,1)??f(u-1,-1);d?d.ref?.current?.focus():this.restoreFocusToPrevElement()}}const CO=function(i){const{children:l,timeout:r=5e3,limit:u=3,toastManager:f}=i,d=Jt(()=>new RO({timeout:r,limit:u,viewport:null,toasts:[],hovering:!1,focused:!1,isWindowFocused:!0,prevFocusElement:null})).current;return Ls(d.disposeEffect),b.useEffect(function(){return f?f[" subscribe"](({action:p,options:y})=>{const v=y.id;p==="promise"&&y.promise?d.promiseToast(y.promise,y):p==="update"&&v?d.updateToast(v,y.updates):p==="close"?d.closeToast(v):d.addToast(y)}):void 0},[d,f]),E.jsxs(P0.Provider,{value:d,children:[E.jsx(OO,{store:d,timeout:r,limit:u}),l]})};function OO(n){const{store:i,timeout:l,limit:r}=n;return Se(()=>{i.syncProviderProps(l,r)},[i,l,r]),null}const AO="--toast-frontmost-height",MO=b.forwardRef(function(i,l){const{render:r,className:u,style:f,children:d,...m}=i,h=ou(),p=$t(),y=b.useRef(!1),v=b.useRef(!1),S=b.useRef(!1),w=h.useState("isEmpty"),T=h.useState("toasts"),C=h.useState("focused"),O=h.useState("expanded"),A=h.useState("prevFocusElement"),N=T[0]?.height,M=T.some(K=>K.transitionStatus==="ending"),D=T.filter(K=>K.priority==="high");b.useEffect(()=>{const K=h.state.viewport;if(!K||w)return;const ne=yt(K),R=Fe(K);function B(oe){oe.key==="F6"&&St(oe)!==K&&(oe.preventDefault(),h.set("prevFocusElement",kt(R)),K?.focus({preventScroll:!0}),h.pauseTimers(),h.set("focused",!0))}function W(oe){St(oe)===ne&&(h.set("isWindowFocused",!1),h.pauseTimers())}function V(oe){if(oe.relatedTarget)return;const ae=St(oe),ge=kt(Fe(K));(ae===ne||!Ne(K,ae)||!ws(ge))&&h.resumeTimers(),p.start(0,()=>h.set("isWindowFocused",!0))}return Gn(Pe(ne,"keydown",B),Pe(ne,"blur",W,!0),Pe(ne,"focus",V,!0),Pe(R,"pointerdown",h.handleDocumentPointerDown,!0))},[h,p,w]);function k(K){y.current=!0;const ne=K.relatedTarget===h.state.viewport?T.find(R=>R.transitionStatus!=="ending"&&!R.limited):void 0;ne?ne.ref?.current?.focus():h.restoreFocusToPrevElement()}function L(K){K.key==="Tab"&&K.shiftKey&&St(K.nativeEvent)===h.state.viewport&&(K.preventDefault(),h.restoreFocusToPrevElement())}function j(){h.state.toasts.some(ne=>ne.transitionStatus==="ending")||S.current||!v.current||(h.state.isWindowFocused&&h.resumeTimers(),h.set("hovering",!1),v.current=!1)}b.useEffect(j,[M,h]);function H(){h.pauseTimers(),h.set("hovering",!0),v.current=!1}function J(){h.state.isWindowFocused&&h.resumeTimers()}function $(){v.current=!0,j()}function Q(K){K.pointerType==="touch"&&(S.current=!0)}function I(K){K.pointerType==="touch"&&(S.current=!1,j())}function ee(){if(y.current){y.current=!1;return}C||ws(kt(Fe(h.state.viewport)))&&(h.set("focused",!0),h.pauseTimers())}function ie(K){!C||Ne(h.state.viewport,K.relatedTarget)||(h.set("focused",!1),J())}const F={tabIndex:-1,role:"region","aria-live":"polite","aria-atomic":!1,"aria-relevant":"additions text","aria-label":"Notifications",onMouseEnter:H,onMouseMove:H,onMouseLeave:$,onFocus:ee,onBlur:ie,onKeyDown:L,onClick:ee,onPointerDown:Q,onPointerUp:I,onPointerCancel:I,style:{[AO]:N?`${N}px`:void 0}},z={expanded:O},q=!w&&A&&E.jsx(Li,{onFocus:k}),P=bt("div",i,{ref:[l,h.setViewport],state:z,props:[F,m,{children:E.jsxs(b.Fragment,{children:[q,d,q]})}]});return E.jsxs(b.Fragment,{children:[q,P,!C&&D.length>0&&E.jsx("div",{style:Zb,children:D.map(K=>E.jsxs("div",{role:"alert","aria-atomic":!0,children:[E.jsx("div",{children:K.title}),E.jsx("div",{children:K.description})]},K.id))})]})}),q0=b.createContext(void 0);function iu(){const n=b.useContext(q0);if(!n)throw new Error(Zt(66));return n}function Pf(n,i,l){switch(n){case"up":return-l;case"down":return l;case"left":return-i;case"right":return i;default:return 0}}const DO="--toast-index",NO="--toast-offset-y",zO="--toast-height",_O="--toast-swipe-movement-x",kO="--toast-swipe-movement-y",jO="data-swipe-direction",HO={...Gs,swipeDirection(n){return n?{[jO]:n}:null}},vb=40,LO=10,Sb=.5,UO=1,BO=`${pE},${hE}`,IO=b.forwardRef(function(i,l){const{toast:r,render:u,className:f,swipeDirection:d=["down","right"],style:m,...h}=i,p=r.positionerProps?.anchor!==void 0;let y=[];p||(y=Array.isArray(d)?d:[d]);const v=y.length>0,S=ou(),[w,T]=b.useState(void 0),[C,O]=b.useState(!1),[A,N]=b.useState(!1),[M,D]=b.useState({x:0,y:0}),[k,L]=b.useState({x:0,y:0,scale:1}),[j,H]=b.useState(),[J,$]=b.useState(),[Q,I]=b.useState(null),ee=b.useRef(null),ie=b.useRef(void 0),F=b.useRef({x:0,y:0}),z=b.useRef({x:0,y:0,scale:1}),q=b.useRef(void 0),P=b.useRef(0),K=b.useRef(!1),ne=b.useRef({x:0,y:0}),R=b.useRef(!1),B=b.useRef({x:0,y:0}),W=b.useRef(null),V=b.useRef(null),oe=S.useState("toastIndex",r.id),ae=S.useState("toastVisibleIndex",r.id),ge=S.useState("toastOffsetY",r.id),ue=S.useState("focused"),pe=S.useState("expanded");Ha({open:r.transitionStatus!=="ending",ref:ee,onComplete(){r.transitionStatus==="ending"&&S.removeToast(r.id)}});const Re=Oe((Me=!1)=>{const fe=ee.current;if(!fe)return;const ye=fe.style.height;fe.style.height="auto";const de=fe.offsetHeight;fe.style.height=ye;function le(){S.updateToastInternal(r.id,{ref:ee,height:de,transitionStatus:void 0})}Me?Xn.flushSync(le):le()});Se(()=>{const Me=ie.current;r.transitionStatus!=="starting"&&Me===r.id||(Me!==void 0&&(T(void 0),L({x:0,y:0,scale:1}),ke({x:0,y:0})),ie.current=r.id,Re())},[Re,r.id,r.transitionStatus]);function ke(Me){B.current=Me,D(Me)}Se(()=>()=>{V.current?.abort()},[]);function ve(Me,fe){const ye=be=>be>0?be**Sb:-(Math.abs(be)**Sb),de=Me>0&&!y.includes("right")||Me<0&&!y.includes("left"),le=fe>0&&!y.includes("down")||fe<0&&!y.includes("up");return{x:de?ye(Me):Me,y:le?ye(fe):fe}}const me=Oe(Me=>{if(Me.pointerId!==W.current)return;W.current=null,V.current?.abort(),V.current=null,O(!1),N(!1),I(null);const fe=z.current;if(Me.type==="pointercancel"||K.current){ke({x:fe.x,y:fe.y}),T(void 0);return}const ye=B.current,de=ye.x-fe.x,le=ye.y-fe.y;let be;for(const Be of y)if(Pf(Be,de,le)>vb){be=Be;break}be?(T(be),S.closeToast(r.id)):(ke({x:fe.x,y:fe.y}),T(void 0))});function je(Me){if(Me.button!==0||(Me.pointerType==="touch"&&S.pauseTimers(),St(Me.nativeEvent)?.closest(`button,a,input,textarea,[role="button"],${BO}`)))return;K.current=!1,q.current=void 0,P.current=0,W.current=Me.pointerId,F.current={x:Me.clientX,y:Me.clientY},ne.current=F.current;const de=Me.currentTarget,le=SO(de);z.current=le,L(le),ke({x:le.x,y:le.y}),S.set("hovering",!0),O(!0),N(!1),I(null),R.current=!0,V.current?.abort();const be=new AbortController;V.current=be;const Be=Fe(de);Be.addEventListener("pointerup",me,{signal:be.signal}),Be.addEventListener("pointercancel",me,{signal:be.signal}),de.setPointerCapture?.(Me.pointerId)}function Le(Me){if(Me.pointerId!==W.current)return;Me.preventDefault(),R.current&&(F.current={x:Me.clientX,y:Me.clientY},R.current=!1);const{clientY:fe,clientX:ye,movementX:de,movementY:le}=Me;(le<0&&fe>ne.current.y||le>0&&fe<ne.current.y)&&(ne.current={x:ne.current.x,y:fe}),(de<0&&ye>ne.current.x||de>0&&ye<ne.current.x)&&(ne.current={x:ye,y:ne.current.y});const be=ye-F.current.x,Be=fe-F.current.y,Ut=fe-ne.current.y,tn=ye-ne.current.x;let Tt=Q;if(!A&&Math.sqrt(be*be+Be*Be)>=UO){N(!0);const At=y.includes("left")||y.includes("right"),Bn=y.includes("up")||y.includes("down");if(At&&Bn){const Xe=Math.abs(be),xt=Math.abs(Be);Tt=Xe>xt?"horizontal":"vertical",I(Tt)}}let xe;if(!q.current)Tt==="vertical"?Be>0?xe="down":Be<0&&(xe="up"):Tt==="horizontal"?be>0?xe="right":be<0&&(xe="left"):Math.abs(be)>=Math.abs(Be)?xe=be>0?"right":"left":xe=Be>0?"down":"up",xe&&y.includes(xe)&&(q.current=xe,P.current=Pf(xe,be,Be),T(xe));else{const En=q.current,At=Pf(En,tn,Ut);At>vb?(K.current=!1,T(En)):!(y.includes("left")&&y.includes("right"))&&!(y.includes("up")&&y.includes("down"))&&P.current-At>=LO&&(K.current=!0)}const Ye=ve(be,Be);let nt=z.current.x,pt=z.current.y;const Tn=y.includes("left")||y.includes("right"),Un=y.includes("up")||y.includes("down");Tt!=="vertical"&&Tn&&(nt+=Ye.x),Tt!=="horizontal"&&Un&&(pt+=Ye.y),ke({x:nt,y:pt})}function Ve(Me){if(Me.key==="Escape"){if(!ee.current||!Ne(ee.current,kt(Fe(ee.current))))return;S.closeToast(r.id)}}b.useEffect(()=>{const Me=ee.current;if(!v||!Me)return;function fe(ye){W.current===null||!Ne(Me,St(ye))||ye.preventDefault()}return Pe(Me,"touchmove",fe,{passive:!1})},[v]);function Te(){const Me=M.x-k.x,fe=M.y-k.y;return{transition:C?"none":void 0,transform:C?`translateX(${M.x}px) translateY(${M.y}px) scale(${k.scale})`:void 0,[_O]:`${Me}px`,[kO]:`${fe}px`}}const Ue=r.priority==="high",Ee={role:Ue?"alertdialog":"dialog",tabIndex:0,"aria-modal":!1,"aria-labelledby":j,"aria-describedby":J,"aria-hidden":Ue&&!ue?!0:void 0,onPointerDown:v?je:void 0,onPointerMove:v?Le:void 0,onPointerUp:v?me:void 0,onPointerCancel:v?me:void 0,onKeyDown:Ve,inert:Js(r.limited),style:{...Te(),[DO]:r.transitionStatus==="ending"?oe:ae,[NO]:`${ge}px`,[zO]:r.height?`${r.height}px`:void 0}},we=b.useMemo(()=>({toast:r,setTitleId:H,setDescriptionId:$,recalculateHeight:Re,visibleIndex:ae,expanded:pe}),[r,H,$,Re,ae,pe]),Ae={transitionStatus:r.transitionStatus,expanded:pe,limited:r.limited||!1,type:r.type,swiping:C,swipeDirection:w},Qe=bt("div",i,{ref:[l,ee],state:Ae,stateAttributesMapping:HO,props:[Ee,h]});return E.jsx(q0.Provider,{value:we,children:Qe})}),PO=b.forwardRef(function(i,l){const{render:r,className:u,style:f,...d}=i,{visibleIndex:m,expanded:h,recalculateHeight:p}=iu(),y=b.useRef(null);Se(()=>{p();const w=y.current;if(!w||typeof ResizeObserver!="function"||typeof MutationObserver!="function")return;const T=new ResizeObserver(()=>p(!0)),C=new MutationObserver(()=>p(!0));return T.observe(w),C.observe(w,{childList:!0,subtree:!0,characterData:!0}),()=>{T.disconnect(),C.disconnect()}},[p]);const v=m>0;return bt("div",i,{ref:[l,y],state:{expanded:h,behind:v},props:d})});function V0(n){return n==null||typeof n=="boolean"||n===""?!1:Array.isArray(n)?n.some(V0):!0}function G0(n){return b.isValidElement(n)&&V0(n.props.children)}function X0(n,i,l){const{toast:r,setTitleId:u,setDescriptionId:f}=iu(),d=l==="title"?u:f,m=i??(l==="title"?r.title:r.description);return{id:Ui(n),children:m,type:r.type,setId:d}}function F0(n,i,l){const r=G0(n);return Se(()=>{if(r)return l(i),()=>{l(u=>u===i?void 0:u)}},[r,i,l]),r?n:null}const YO=b.forwardRef(function(i,l){const{render:r,className:u,style:f,id:d,children:m,...h}=i,{id:p,children:y,type:v,setId:S}=X0(d,m,"description"),T=bt("p",i,{ref:l,state:{type:v},props:{...h,id:p,children:y}});return F0(T,p,S)}),qO=b.forwardRef(function(i,l){const{render:r,className:u,style:f,id:d,children:m,...h}=i,{id:p,children:y,type:v,setId:S}=X0(d,m,"title"),T=bt("h2",i,{ref:l,state:{type:v},props:{...h,id:p,children:y}});return F0(T,p,S)}),VO=b.forwardRef(function(i,l){const{render:r,className:u,style:f,disabled:d,nativeButton:m=!0,...h}=i,p=ou(),{toast:y,expanded:v}=iu(),[S,w]=b.useState(!1),{getButtonProps:T,buttonRef:C}=Ua({disabled:d,native:m}),O={type:y.type};return bt("button",i,{ref:[l,C],state:O,props:[{"aria-hidden":!v&&!S,onClick(){p.closeToast(y.id)},onFocus(){w(!0)},onBlur(){w(!1)}},h,T]})}),GO=b.forwardRef(function(i,l){const{render:r,className:u,style:f,disabled:d,nativeButton:m=!0,...h}=i,{toast:p}=iu(),y=p.actionProps?.children??h.children,{getButtonProps:v,buttonRef:S}=Ua({disabled:d,native:m}),w={type:p.type},T=bt("button",i,{ref:[l,S],state:w,props:[h,p.actionProps,v,{children:y}]});return G0(T)?T:null}),XO=b.forwardRef(function(i,l){return E.jsx(Zv,{ref:l,...i})});function FO(){const n=ou(),i=n.useState("toasts");return b.useMemo(()=>({toasts:i,add:n.addToast,close:n.closeToast,update:n.updateToast,promise:n.promiseToast}),[i,n])}function KO(){const n=new Set;function i(l){n.forEach(r=>r(l))}return{" subscribe":function(r){return n.add(r),()=>{n.delete(r)}},add(l){const r=l.id||Y0("toast"),u={...l,id:r,transitionStatus:"starting"};return i({action:"add",options:u}),r},close(l){i({action:"close",options:{id:l}})},update(l,r){i({action:"update",options:{id:l,updates:r}})},promise(l,r){let u=l;return i({action:"promise",options:{...r,promise:l,setPromise(f){u=f}}}),u}}}function K0({value:n,onChange:i,items:l,className:r,trailing:u,label:f}){return E.jsxs(yO,{value:n,onValueChange:d=>i(d),className:zo("flex min-h-0 flex-col",r),children:[E.jsxs("div",{className:"flex h-9 shrink-0 items-center gap-1 border-b border-line px-2","data-ui-tabs-bar":"",children:[E.jsx(wO,{"aria-label":f,className:"relative flex items-center gap-1",children:l.map(d=>E.jsx(vO,{value:d.value,className:"h-7 rounded-md px-2 text-[13px] font-medium text-fg-muted outline-none hover:text-fg data-[active]:bg-hover data-[active]:text-fg focus-visible:outline-2 focus-visible:outline-accent",children:d.label},d.value))}),E.jsx("div",{className:"ml-auto flex items-center gap-1",children:u})]}),l.map(d=>E.jsx(EO,{value:d.value,keepMounted:d.keepMounted,className:"min-h-0 flex-1 overflow-auto outline-none",children:d.content},d.value))]})}function mp({icon:n,title:i,children:l}){return E.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-2 p-8 text-center text-fg-muted",children:[n?E.jsx("div",{className:"text-fg-subtle",children:n}):null,E.jsx("div",{className:"text-[15px] font-semibold text-fg",children:i}),l?E.jsx("div",{className:"max-w-sm",children:l}):null]})}const yp=KO();function QO(n){if(n.repeat||n.key!=="Enter"&&n.key!==" ")return;const i=n.currentTarget.closest("[data-toast]")??n.currentTarget,l=i.ownerDocument.defaultView;l&&mR(l,n.key,r=>r instanceof l.Node&&i.contains(r))}function ZO(){const{toasts:n}=FO();return n.map(i=>E.jsxs(IO,{toast:i,"data-toast":"",className:"pointer-events-auto flex w-80 items-start gap-3 rounded-lg bg-surface p-3 text-fg shadow-popup transition-[opacity,transform] data-[starting-style]:translate-y-2 data-[starting-style]:opacity-0 data-[ending-style]:opacity-0",children:[E.jsxs(PO,{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[E.jsx(qO,{className:"text-[13px] font-semibold"}),E.jsx(YO,{className:"text-xs text-fg-muted"}),i.actionProps?E.jsx(GO,{className:"mt-1 self-start rounded px-2 py-0.5 text-xs font-medium text-accent hover:bg-hover"}):null]}),E.jsx(VO,{"aria-label":"Dismiss",onKeyDown:QO,className:"rounded p-0.5 text-fg-muted hover:bg-hover",children:E.jsx(dp,{className:"size-3.5"})})]},i.id))}function WO({children:n}){return E.jsxs(CO,{toastManager:yp,timeout:4e3,children:[n,E.jsx(XO,{children:E.jsx(MO,{className:"pointer-events-none fixed bottom-4 right-4 z-[1100] flex flex-col gap-2",children:E.jsx(ZO,{})})})]})}const JO=["a[href]","button","iframe","input","select","textarea","summary","audio[controls]","video[controls]","[contenteditable]:not([contenteditable='false'])","[tabindex]"].join(", "),$O="audio[controls], video[controls], [contenteditable]:not([contenteditable='false'])";function eA(n){return!(n.tabIndex>=0||!n.hasAttribute("tabindex")&&n.matches($O))||n.getAttribute("aria-hidden")==="true"||n.matches(":disabled")?!1:typeof n.checkVisibility!="function"||n.checkVisibility({visibilityProperty:!0})}function tA(n){return Array.from(n.querySelectorAll(JO)).filter(eA)}function nA(n){const i=l=>!/visible|hidden|clip/.test(l);return n.scrollWidth>n.clientWidth+1&&i(n.overflowX)||n.scrollHeight>n.clientHeight+1&&i(n.overflowY)}function oA(n){const[i,l]=b.useState(!1);return b.useLayoutEffect(()=>{const r=n.current,u=r?.ownerDocument.defaultView;if(!r||!u)return;const f=()=>{const y=u.getComputedStyle(r);l(nA({scrollWidth:r.scrollWidth,clientWidth:r.clientWidth,scrollHeight:r.scrollHeight,clientHeight:r.clientHeight,overflowX:y.overflowX,overflowY:y.overflowY}))};if(f(),typeof u.ResizeObserver!="function")return;const d=new u.ResizeObserver(f),m=new Set,h=y=>{if(y.nodeType!==1)return;const v=y;if(u.getComputedStyle(v).display==="contents"){v.childNodes.forEach(h);return}m.has(v)||(m.add(v),d.observe(v))};d.observe(r),r.childNodes.forEach(h);const p=new u.MutationObserver(y=>{for(const v of y)v.addedNodes.forEach(h);for(const v of m)r.contains(v)||(d.unobserve(v),m.delete(v));f()});return p.observe(r,{childList:!0,subtree:!0,characterData:!0}),()=>{d.disconnect(),p.disconnect()}},[n]),i}b.forwardRef(function({label:i,className:l,...r},u){const f=b.useRef(null),d=b.useCallback(w=>{f.current=w,typeof u=="function"?u(w):u&&(u.current=w)},[u]),m=oA(f),[h,p]=b.useState(!1),[y,v]=b.useState(null);b.useLayoutEffect(()=>{const w=f.current,T=w?.ownerDocument.defaultView;if(!m||!w||!T)return;const C=()=>{p(tA(w).length===0),v(w.closest('[role="dialog"], [role="alertdialog"]')?.getAttribute("aria-labelledby")??null)};C();const O=new T.MutationObserver(C);return O.observe(w,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["tabindex","disabled","hidden","href","contenteditable"]}),()=>O.disconnect()},[m]);const S=m&&h;return E.jsx("div",{ref:d,...S?{role:"group",tabIndex:0,"aria-labelledby":i===void 0?y??void 0:void 0,"aria-label":i??(y===null?"Panel content":void 0)}:{},className:zo(S&&"focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-accent",l),...r})});const iA={blur:{label:"Blur",unit:"px",min:0,max:200,step:1,identity:0,initial:4},brightness:{label:"Brightness",unit:"%",min:0,max:500,step:1,identity:100,initial:120},contrast:{label:"Contrast",unit:"%",min:0,max:500,step:1,identity:100,initial:120},grayscale:{label:"Grayscale",unit:"%",min:0,max:100,step:1,identity:0,initial:100},saturate:{label:"Saturate",unit:"%",min:0,max:500,step:1,identity:100,initial:150},"hue-rotate":{label:"Hue rotate",unit:"deg",min:-360,max:360,step:1,identity:0,initial:90},invert:{label:"Invert",unit:"%",min:0,max:100,step:1,identity:0,initial:100},sepia:{label:"Sepia",unit:"%",min:0,max:100,step:1,identity:0,initial:100},opacity:{label:"Opacity",unit:"%",min:0,max:100,step:1,identity:100,initial:50}};[...Object.keys(iA)];const aA={cancel:"Cancel",close:"Close",copy:"Copy",copied:"Copied",copyLink:"Copy link",loading:"Loading…",justNow:"just now",never:"never",agent:"Agent",delete:"Delete",rename:"Rename",duplicate:"Duplicate",copyName:"Name of the copy",documentTabs:"Document tabs",pin:"Pin",unpin:"Unpin",open:"Open",save:"Save",updated:"Updated {when}",pinned:"Pinned",unpinned:"Unpinned",duplicated:"Duplicated",couldNotPin:"Could not pin: {error}",couldNotUnpin:"Could not unpin: {error}",couldNotRename:"Could not rename: {error}",couldNotDuplicate:"Could not duplicate: {error}",couldNotDelete:"Could not delete: {error}",statusNone:"No session",statusWorking:"Working",statusIdle:"Idle",statusWaiting:"Waiting",statusOffline:"Offline",working:"{agent} is working…",artifactOptions:"Artifact options",artifactName:"Artifact name",comments:"Comments",doneCommenting:"Done commenting",openComment:"1 open comment",openComments:"{count} open comments",commentOptions:"Comment options",showAllComments:"Show all comments",hideComments:"Hide comments",share:"Share",sharedOnNetwork:"Shared with your network",onlyThisComputer:"Only this computer",ask:"Ask {agent}",hideAsk:"Hide",openHarnessSession:"Open the {harness} session",messageAgent:"Message {agent} about this artifact",switchArtifact:"Switch artifact",inThisSession:"In this session",recent:"Recent",allArtifacts:"All artifacts",export:"Export",openSession:"Open session",offline:"offline",versionHistory:"Version history",peopleHere:"Here now",peopleHereNames:"Here now: {names}",peopleMore:"+{count}",youOtherTab:"You, in another tab",yourOtherTab:"your other tab",follow:"Follow",stopFollow:"Stop",followName:"Follow {name}",stopFollowingName:"Stop following {name}",followingName:"Following {name}",followingYou:"Following you",followingToast:"Following {name}. Press Escape to stop.",stoppedFollowingLeft:"Stopped following: {name} left.",openInNewTab:"Open in new tab",refresh:"Refresh",storage:"Storage",inThisFolder:"{size} in this folder",copyPath:"Copy path",linkCopied:"Link copied",pathCopied:"Path copied",deleteTitle:'Delete "{title}"?',deleteBody:"It leaves your artifacts. Its folder stays where it is: {root}",shareTitle:"Share this artifact",peopleWithAccess:"People with access",joinedPeople:"People who joined",noneJoined:"Nobody has joined yet. Send someone a link below.",online:"Online",seenAgo:"Seen {when}",guestPaused:"Link off: no access until it is back on",changeRole:"Change {name}'s role",roleLinkOff:"Link off",remove:"Remove",removeGuest:"Remove {name}",removeTitle:"Remove {name}?",removeBody:"They lose access to this artifact. They can join again with a link.",you:"(you)",thisComputer:"This computer",owner:"Owner",generalAccess:"General access",onLan:"Anyone on your network with a link",onlyHereSub:"Nobody else can open the links.",onLanSub:"People on the same Wi-Fi or LAN open it with a link; the link sets their role.",onNetworkAt:"On this network at {addresses}",onTailnet:"Tailscale: {address}, for people on your tailnet from any network (copy it from a link's More menu)",noAddress:"This computer has no local network address.",whereOff:"Only this computer can open these links for now. Copying one opens this to your network.",inviteLinks:"Invite links",roleEditor:"Editor",roleCommenter:"Commenter",roleViewer:"Viewer",linkEditor:"Can edit",linkCommenter:"Can comment",linkViewer:"Can view",noteEditor:"Edit and comment",noteCommenter:"Comment, no edits",noteViewer:"Read only",linkOff:"Off: nobody can join with it",turnOn:"Turn on",more:"More",moreFor:"More: {role}",copyTailnet:"Copy Tailscale link",copyTailnetNote:"For people on your tailnet, off this network ({address})",turnOnLink:"Turn on link",turnOffLink:"Turn off link",turnOffNote:"Whoever joined with it loses access until it is back on",resetLink:"Reset link",resetNote:"A new address; whoever joined with the old one is removed",resetTitle:'Reset the "{role}" link?',resetBody:"The old link stops working and the people who joined with it lose access.",plainHttp:"This is plain HTTP: others on the network can read what passes. A link is the permission: whoever has it gets its role, so send it only to the people meant to have it, and reset a link that went further.",cannotShare:"{type} pages can't be shared on the network yet: only this computer opens it.",shareError:"Could not do that: {error}",shareNoAnswer:"The sharing settings did not load: the Open Artifact service is not answering. Try again in a moment.",sendingTitle:"Sending this to someone?",sendingBody:"Share the link instead of a file and they will always have the latest changes.",invitePeople:"Invite people",allLinksOff:"All the links are off. Invite people to turn one on.",joinsAs:"People who open this link join as {role}. Invite people to give another role.",standaloneShare:"Manage network sharing in the Open Artifact app or with the share CLI command.",onlyHereLink:"Only this computer can open the link.",nothingToExport:"Nothing to export yet.",exportOptions:"Asks for options first",archiveLabel:"Whole folder (.zip)",destinationDescription:"Asks {agent} to export it there",destinationRequestLabel:"Export to {label}",destinationSent:"Asked {agent} to export to {label}",archiveDescription:"Everything here, to back up or move",archiveStarted:"Downloading {name}",archiveHint:"The whole folder in one zip, to back up, move to another computer or send to someone. Unzip it and open it with the same type to carry on; share links and this computer's server state are left out.",archiveTooLarge:"The folder is over what a zip holds (4 GiB or 65,535 files): copy the folder itself instead.",archiveUnsupported:"{type} folders can't be zipped here: copy the folder itself instead.",archiveFailed:"Could not zip the folder: {error}",exportBusy:"Another export is running. Try {label} again in a moment.",exportUnsupported:"{label} can't be exported right now.",exportFailed:"Could not export {label}.",saving:"Saving…",reconnecting:"Reconnecting…",notSaved:"Not saved",notSavedTitle:"The page could not save its last changes.",saveRetry:"Couldn't save — retry",readOnly:"Read-only",readOnlyTitle:"Nothing can be saved here",leaveLosesWork:"Leave? Changes that are not saved yet will be lost.",actionSaveNow:"Save now",actionOpenFind:"Find",actionUndo:"Undo",actionRedo:"Redo",actionEditPage:"Edit page",actionUsePage:"Use this page",actionCommentSelection:"Comment on selection",actionOpenPageList:"Pages",actionHandOffCode:"Hand off to code",whyOlderVersion:"You are viewing an older version",whyAgentWorking:"{agent} is working",whyDraftOpen:"Close the open draft first",whyCommentsOn:"Turn off comment mode first",whyNeedsAgent:"Needs an agent session",whyUnsaved:"Save first",whyOther:"Not available right now",noOwner:"No session owns this artifact",noOwnerNote:"What you send waits for the next session that works on it.",ownerNote:"Messages go to the {harness} session that made this artifact.",agentIdle:"{agent} is idle",agentWaiting:"{agent} is waiting",sessionOffline:"The session is offline",offlineNote:"{agent} sees what you send the next time the {harness} session works.",askPlaceholder:"What should change?",sendToAgent:"Send to {agent}",sendToConversation:"Put in the {agent} conversation",sending:"Sending…",sent:"Sent.",sentInbox:"{agent} will see it the next time the session works.",sentDrafted:"It is in the {agent} conversation now: send it there.",notDelivered:"Not delivered.",notSent:"Not sent: {error}",viaDelivered:"delivered",viaDrafted:"in the conversation, for you to send",viaInbox:"waiting for the session",viaFailed:"not delivered",askCloudOnline:"{agent} is connected: it gets this now.",askCloudOffline:"{agent} will get this when its computer is back online.",askCloudMcp:"{agent} will see this the next time it works on the artifact.",askCloudNone:"No agent is connected to this site for you. Connect a computer or an MCP client; the request waits until then.",askCloudNoneOther:"The owner has no agent connected to this site. The request waits until they connect one.",sentCloudDelivered:"Delivered: {agent} has it now.",sentCloudOffline:"Sent. {agent} will get it when its computer is back online.",sentCloudMcp:"Sent. {agent} will see it the next time it works on the artifact.",sentCloudNone:"Sent. It waits until an agent is connected.",viaWaitingAgent:"waiting for the agent",statusConnected:"Connected",statusNoAgent:"No agent",emptyTitle:"This artifact is empty",emptyBody:"Nothing of {type} has been written to {root} yet. An agent writes it: send it this.",startSession:"Start a session with {agent}",promptCopied:"Copied: paste it into any agent session that has the Artifact tool.",sentToSession:"Sent to a new session.",problemTitle:"This artifact cannot open here",noPage:"No page.",readOnlyNewer:"Read-only here: {type} {release} wrote this artifact and this computer has {version}. Update Open Artifact (open-artifact runtime update, or update the app it came with) to edit it.",folder:"Folder: {root}",askToLook:"Ask {agent} to look",problemAsk:"The artifact page could not open: {problem}",noBoot:"No artifact to show. Open one from the home page.",tryAgain:"Try again",bootFailed:"The page did not open: {error}",frameNotOpen:"The page is not open any more (its server may have restarted), and opening it again did not work.",frameNotGranted:"This page is not open to you here any more.",homeTitle:"Open Artifact",homeSub:"The artifacts and types every agent on this computer shares.",artifacts:"Artifacts",types:"Types",newArtifact:"New artifact",moreActions:"More actions",backToSession:"Back to session",noArtifacts:"No artifacts yet. Ask an agent to make one with the Artifact tool, or start one here.",pageOpen:"Open now",typeMissing:"Type not installed",deleted:'Deleted "{title}". Its folder stays.',undo:"Undo",restored:"Restored",couldNotRestore:"Could not restore: {error}",couldNotLoad:"Could not load: {error}",typeRoots:"Type roots: {roots}",noTypes:"No types found.",disabled:"Disabled",shadowedBy:"Overridden by {root}",newOf:"New {type}",create:"Create",title:"Title",folderOptional:"Folder (optional)",folderHint:"Default: a new folder in the home workspace",needTitle:"Give it a title first.",couldNotCreate:"Could not create it: {error}",renameArtifact:"Rename artifact",cannotCreateYet:"Only Design artifacts can be made here for now.",cannotShareCloud:"{type} artifacts can't be shared here yet.",signIn:"Sign in",signOut:"Sign out",signOutFailed:"Could not sign out: {error}",accountOf:"Account: {name}",sharedWithOthers:"Shared with others",addPeople:"Add people",addPeoplePlaceholder:"Email, or @domain for everyone there",add:"Add",addInvalid:"Not an email address or @domain: {entries}",roleFor:"Role for the people you add",memberPending:"Invited: has not signed in yet",memberDomain:"Everyone at {domain}",memberGroup:"Group",removeAccess:"Remove access",removeMemberBody:"They lose access to this artifact. You can add them again.",noMembers:"Nobody else is added yet.",accessRestricted:"Restricted",accessRestrictedSub:"Only the people added here can open it.",accessLink:"Anyone with the link",accessLinkSub:"Whoever has one of the links below gets its role.",accessPublic:"Public",accessPublicSub:"Anyone can open it as a viewer; the links below give more.",shareSettings:"Settings",viewersCanExport:"Viewers can download and export",editorsCanAsk:"Editors can ask {agent}",ownedBy:"Owned by {name}",yourRole:"Your role: {role}",onlyOwnerShares:"Only the owner can change who has access.",emptyBodyCloud:"Nothing of {type} has been written yet. An agent writes it: send it this.",homeSubCloud:"Your artifacts and the ones shared with you.",noArtifactsCloud:"No artifacts yet. Publish one from an agent with the Artifact tool, or ask someone to share one with you.",pubTitle:"Publish to the web",pubIntro:"Give it a web address that works even when this computer is off. You choose who can open it there.",pubDataNote:"Publishing this dashboard publishes its data too: this computer runs its live queries and puts the rows on the site, where everyone who can open it sees them.",pubDataPending:"Its live data isn’t on the site yet: the page there shows no figures until you publish the data.",pubDataConfirm:"Publish its data",pubDataAsOf:"Data on the site as of {time}, refreshed from this computer.",pubDataNone:"Its data is published; the first rows are on their way.",pubDataFailed:"The last refresh failed: {reason}",pubDataRefresh:"Refresh now",pubDataRefreshing:"Refreshing…",pubDataStop:"Stop publishing data",pubDataStopTitle:"Stop publishing its data?",pubDataStopBody:"The rows are removed from {host} and this computer stops refreshing them. The dashboard stays published there, with no figures until you publish its data again.",pubConnectSite:"Connect a site…",pubConnectAnother:"Connect another site…",pubAddress:"Site address",pubAddressPlaceholder:"https://artifacts.example.com",pubAddressHint:"The web address of an Open Artifact site you have an account on.",pubName:"Name",pubNameHint:"A short name to tell your sites apart, like work.",pubConnect:"Connect",pubConnecting:"Connecting…",pubCodeTitle:"Approve this computer on {host}",pubCodeBody:"Check that the page shows this code, then approve.",pubCodeOpened:"The approval page opened in your browser. If you don’t see it, open it here:",pubOpenApproval:"Open approval page",pubWaitingApproval:"Waiting for you to approve…",pubConnected:"Connected to {host} as {name}.",pubTryAgain:"Try again",pubSignedInAs:"Signed in as {name}",pubStateConnected:"Connected",pubStateConnecting:"Connecting…",pubStateUnreachable:"Can't be reached",pubStateSignedOut:"Signed out",pubPublish:"Publish",pubPublishing:"Publishing…",pubReconnect:"Connect again",pubPublishedAt:"Published on {host}",pubOpen:"Open",pubManage:"Who can open it is set on its web page: open it and use Share there.",pubManageLink:"Manage access on the web",pubOpensThere:"Opening it on this computer now takes you to its web address while the site can be reached.",pubUnpublish:"Unpublish",pubUnpublishing:"Unpublishing…",unpubTitle:"Unpublish this artifact?",unpubBody:"The web copy goes to the trash on {host} and its web address stops working. This folder stays on this computer, with the latest changes from the web.",pubInSync:"Up to date",pubInSyncAt:"Up to date · synced {when}",pubWaitingOne:"1 change waiting to be sent",pubWaiting:"{count} changes waiting to be sent",pubOffline:"Can't reach {host}: changes are kept here and sent when it is back.",pubSignedOutSync:"Signed out of {host}: changes are kept here. Connect again to send them.",pubSyncFailed:"The last sync failed: {error}",pubCloudMark:"Published to the web",pubCloudAt:"Published at {url}",pubHostEmpty:"Type the site’s address.",pubHostInvalid:"That is not a web address. Type it like https://artifacts.example.com.",pubHostNotHttps:"The address must start with https:// (plain http only works for this computer or a private network, like 192.168.1.20, nas.lan or 192-168-1-20.nip.io).",pubInsecureWarning:"Plain http: what you publish travels unencrypted. Use it only on a network you trust.",pubAutoSwitch:"Publish new artifacts automatically",pubAutoHint:"Artifacts created from now on go to {host} by themselves. Earlier ones stay as they are.",pubAutoNoSite:"Choose a default site to publish to.",pubDefaultSite:"Default site",pubDefaultMark:"default",pubAutoPublishing:"Being published to {host} automatically…",pubAutoSignedOut:"Waiting to be published to {host}: this computer is not signed in there yet.",pubAutoUnreachable:"Waiting to be published: can't reach {host}. It is tried again by itself.",pubAutoFailed:"Not published to {host} yet: {error} It is tried again by itself.",pubApprovalTitle:"Approve this computer on {host}",pubApprovalBody:"This computer was set up to publish to {host}. Open the approval page, check that it shows this code, and approve.",pubCloudSettingsFailed:"Could not change the setting: {error}",pubNameInvalid:"Use letters, digits, - and _ (up to 32), like work.",pubNameTaken:"That name is already used for another site. Choose another name.",pubNoDaemon:"Open Artifact on this computer did not answer. Check that it is running, then try again.",pubConnectDenied:"The connection was refused on {host}. Try again if that was a mistake.",pubConnectExpired:"The code ran out before it was approved. Try again and approve within a few minutes.",pubConnectUnreachable:"Can't reach {host}. Check the address and your connection, then try again.",pubConnectNotHost:"{host} does not look like an Open Artifact site. Check the address.",pubConnectFailed:"Could not connect: {error}",pubIdTaken:"{host} already has an artifact with this one’s id that is still published there (maybe from another computer) or is someone else’s. Unpublish it there first (one you unpublished is replaced when you publish again), or duplicate this artifact and publish the copy.",pubAlreadyElsewhere:"It is already published to another site. Unpublish it there first.",pubTooLarge:"It is too large for {host}. Remove big files from its folder, then try again.",pubSignedOut:"You are signed out of {host}. Connect again, then try again.",pubNotAllowed:"{host} did not allow it: your account there may not be able to publish.",pubUnreachable:"Can't reach {host} right now. Try again once it is back.",pubUnsupported:"{host} cannot take this kind of artifact yet.",pubFailed:"Could not publish: {error}",unpubUnreachable:"Can't reach {host} to bring its latest version here first. Try again once it is back.",unpubFailed:"Could not unpublish: {error}",openOnWeb:"Open on the web",copyWebLink:"Copy web link",webLinkCopied:"Web link copied",signOutAccess:"Sign out, here and of your organisation’s sign-in",upload:"Upload",uploadHint:"Upload an artifact: the .zip from “Whole folder (.zip)” in its Export tab.",uploadDrop:"Drop the .zip to upload it",uploadSending:"Uploading {name}… {percent}%",uploadSendingSize:"Uploading {name}…",uploadChecking:"Checking {name}…",uploadOpening:"Uploaded {name}. Opening it…",uploadNotZip:"That file is not a .zip. Use “Whole folder (.zip)” from an artifact’s Export tab.",uploadNotArtifact:"That zip is not an Open Artifact folder. Use “Whole folder (.zip)” from an artifact’s Export tab.",uploadTooLargeLimit:"That zip is too large: this site takes up to {limit}. Remove big files from the folder, then try again.",uploadTooLarge:"That zip is too large for this site. Remove big files from the folder, then try again.",uploadTooLargeSaid:"That zip is too large for this site: {error} Remove big files from the folder, then try again.",uploadSignedOut:"You are signed out. Sign in again, then upload it.",uploadNotAllowed:"This site does not let you upload artifacts.",uploadConflict:"Something on the site got in the way. Try again.",uploadTypeMissing:"This site cannot open {type} artifacts yet.",uploadBusy:"Too many tries at once. Wait a moment, then try again.",uploadNoAnswer:"The site did not answer. Check your connection, then try again.",uploadFailed:"Could not upload it: {error}",dismiss:"Dismiss",trash:"Trash",trashEmpty:"The trash is empty.",trashNote:"Nobody it was shared with can open an artifact while it is in the trash.",trashedWhen:"Moved to the trash {when}",trashKeptDays:"Deleted for good after {days} days in the trash.",trashKeptOneDay:"Deleted for good after 1 day in the trash.",trashKeptForever:"Kept here until you delete it forever.",restore:"Restore",restoredTitle:'Restored "{title}"',deleteForever:"Delete forever",purgeTitle:'Delete "{title}" forever?',purgeBody:"This cannot be undone. It is removed from this site, and everyone it was shared with loses access to it.",purged:'Deleted "{title}" forever',purgeNotTrashed:"It is not in the trash any more.",purgeGone:"It is already gone.",couldNotPurge:"Could not delete it: {error}",moveToTrash:"Move to trash",movedToTrash:'Moved "{title}" to the trash.',shareOnNetwork:"Share on this network instead",shareOnNetworkSub:"Links from here open this computer’s copy, not the web page."},lA={cancel:"取消",close:"关闭",copy:"复制",copied:"已复制",copyLink:"复制链接",loading:"加载中…",justNow:"刚刚",never:"从未",agent:"Agent",delete:"删除",rename:"重命名",duplicate:"复制一份",copyName:"副本名称",documentTabs:"文档标签页",pin:"置顶",unpin:"取消置顶",open:"打开",save:"保存",updated:"更新于 {when}",pinned:"已置顶",unpinned:"已取消置顶",duplicated:"已复制一份",couldNotPin:"没能置顶:{error}",couldNotUnpin:"没能取消置顶:{error}",couldNotRename:"没能重命名:{error}",couldNotDuplicate:"没能复制:{error}",couldNotDelete:"没能删除:{error}",statusNone:"无会话",statusWorking:"工作中",statusIdle:"空闲",statusWaiting:"等待中",statusOffline:"离线",working:"{agent} 正在工作…",artifactOptions:"作品选项",artifactName:"作品名",comments:"评论",doneCommenting:"结束评论",openComment:"1 条未解决的评论",openComments:"{count} 条未解决的评论",commentOptions:"评论选项",showAllComments:"显示全部评论",hideComments:"隐藏评论",share:"分享",sharedOnNetwork:"已分享到局域网",onlyThisComputer:"仅这台电脑",ask:"问 {agent}",hideAsk:"收起",openHarnessSession:"打开 {harness} 会话",messageAgent:"就这个作品给 {agent} 发消息",switchArtifact:"切换作品",inThisSession:"这个会话里的",recent:"最近",allArtifacts:"所有作品",export:"导出",openSession:"打开会话",offline:"离线",versionHistory:"版本历史",peopleHere:"正在查看",peopleHereNames:"正在查看:{names}",youOtherTab:"你(另一个标签页)",yourOtherTab:"你的另一个标签页",follow:"跟随",stopFollow:"停止",followName:"跟随 {name}",stopFollowingName:"停止跟随 {name}",followingName:"正在跟随 {name}",followingYou:"正在跟随你",followingToast:"正在跟随 {name},按 Esc 停止。",stoppedFollowingLeft:"{name} 已离开,停止跟随。",openInNewTab:"在新标签页打开",refresh:"刷新",storage:"存储",inThisFolder:"这个文件夹 {size}",copyPath:"复制路径",linkCopied:"链接已复制",pathCopied:"路径已复制",deleteTitle:"删除「{title}」?",deleteBody:"它会移出作品列表,文件夹保留在原处:{root}",shareTitle:"分享这份内容",peopleWithAccess:"有权访问的人",joinedPeople:"加入的人",noneJoined:"还没有人加入。把下面的链接发给对方。",online:"在线",seenAgo:"{when}来过",guestPaused:"链接已关闭,暂时无法访问",changeRole:"更改「{name}」的角色",roleLinkOff:"链接已关闭",remove:"移出",removeGuest:"移出 {name}",removeTitle:"移出「{name}」?",removeBody:"对方将无法再访问这份内容,之后仍可以用链接重新加入。",you:"(你)",thisComputer:"这台电脑",owner:"所有者",generalAccess:"一般访问权限",onLan:"同一网络里有链接的人",onlyHereSub:"别人打不开这些链接。",onLanSub:"同一 Wi-Fi 或局域网里的人用链接打开,链接决定角色。",onNetworkAt:"在这个网络上:{addresses}",onTailnet:"Tailscale:{address},同一 tailnet 的人在别的网络也能打开(复制在链接的「更多」里)",noAddress:"这台电脑没有局域网地址。",whereOff:"现在只有这台电脑能打开这些链接。复制链接会顺手分享到局域网。",inviteLinks:"邀请链接",roleEditor:"编辑者",roleCommenter:"评论者",roleViewer:"查看者",linkEditor:"可编辑",linkCommenter:"可评论",linkViewer:"可查看",noteEditor:"编辑和评论",noteCommenter:"只能评论",noteViewer:"只读",linkOff:"已关闭:没人能用它加入",turnOn:"开启",more:"更多",moreFor:"更多:{role}",copyTailnet:"复制 Tailscale 链接",copyTailnetNote:"给同一 tailnet 里不在这个网络的人({address})",turnOnLink:"开启链接",turnOffLink:"关闭链接",turnOffNote:"用它加入的人暂时无法访问",resetLink:"重置链接",resetNote:"换一个新地址,用旧链接加入的人会被移出",resetTitle:"重置「{role}」链接?",resetBody:"旧链接会失效,通过它加入的人也会失去访问权限。",plainHttp:"这是明文 HTTP:同一网络的人能看到传输内容。链接就是权限:拿到链接的人就有对应角色,只发给该有的人;传出去了就重置链接。",cannotShare:"{type} 的页面暂时不能分享到网络:只有这台电脑能打开。",shareError:"没做成:{error}",shareNoAnswer:"分享设置没有加载出来:Open Artifact 服务没有响应,稍后再试。",sendingTitle:"要发给别人?",sendingBody:"发链接而不是文件,对方看到的总是最新版本。",invitePeople:"邀请别人",allLinksOff:"所有链接都关着。去邀请页打开一条。",joinsAs:"用这条链接打开的人以{role}身份加入。要给别的角色,去邀请页。",standaloneShare:"可在 Open Artifact 应用或 CLI 的 share 命令中管理网络分享。",onlyHereLink:"只有这台电脑能打开这个链接。",nothingToExport:"还没有可导出的内容。",exportOptions:"会先询问导出选项",archiveLabel:"整个文件夹(.zip)",destinationDescription:"请 {agent} 导出到这里",destinationRequestLabel:"导出到 {label}",destinationSent:"已请 {agent} 导出到 {label}",archiveDescription:"这里的全部内容,用来备份或搬走",archiveStarted:"开始下载 {name}",archiveHint:"整个文件夹打成了一个 zip,可以备份、换电脑或发给别人。解压后用同一个类型打开就能接着用;分享链接和这台电脑上的服务器状态不在里面。",archiveTooLarge:"文件夹超过了 zip 的上限(4 GiB 或 65535 个文件),请直接复制文件夹。",archiveUnsupported:"{type} 的文件夹在这里打不了包,请直接复制文件夹。",archiveFailed:"没能打包:{error}",exportBusy:"另一个导出正在进行,请稍后再导出 {label}。",exportUnsupported:"现在无法导出 {label}。",exportFailed:"无法导出 {label}。",saving:"正在保存…",reconnecting:"正在重新连接…",notSaved:"未保存",notSavedTitle:"页面没能保存最近的修改。",saveRetry:"保存失败,点击重试",readOnly:"只读",readOnlyTitle:"这里的内容无法保存",leaveLosesWork:"确定离开?尚未保存的修改会丢失。",actionSaveNow:"立即保存",actionOpenFind:"查找",actionUndo:"撤销",actionRedo:"重做",actionEditPage:"编辑页面",actionUsePage:"使用这个页面",actionCommentSelection:"评论选中内容",actionOpenPageList:"页面列表",actionHandOffCode:"交给代码处理",whyOlderVersion:"你正在查看旧版本",whyAgentWorking:"{agent} 正在工作",whyDraftOpen:"请先关闭打开的草稿",whyCommentsOn:"请先退出评论模式",whyNeedsAgent:"需要一个智能体会话",whyUnsaved:"请先保存",whyOther:"暂时不可用",noOwner:"没有会话拥有这个作品",noOwnerNote:"发出的消息会等下一个处理它的会话。",ownerNote:"消息会发给做这个作品的 {harness} 会话。",agentIdle:"{agent} 空闲",agentWaiting:"{agent} 在等待",sessionOffline:"会话离线",offlineNote:"{harness} 会话下次工作时,{agent} 会看到你发的消息。",askPlaceholder:"想改什么?",sendToAgent:"发给 {agent}",sendToConversation:"放进 {agent} 的对话",sending:"发送中…",sent:"已发送。",sentInbox:"会话下次工作时 {agent} 会看到。",sentDrafted:"已放进 {agent} 的对话:到那里发出去。",notDelivered:"没送达。",notSent:"没发出去:{error}",viaDelivered:"已送达",viaDrafted:"在对话里,等你发出",viaInbox:"等会话处理",viaFailed:"没送达",askCloudOnline:"{agent} 已连接:它现在就会收到。",askCloudOffline:"{agent} 所在的电脑重新上线后,它会收到。",askCloudMcp:"{agent} 下次处理这个作品时会看到。",askCloudNone:"这个站点上还没有连接你的 Agent。连接一台电脑或一个 MCP 客户端;在那之前,请求会一直等着。",askCloudNoneOther:"所有者还没有在这个站点上连接 Agent。请求会等到他们连接为止。",sentCloudDelivered:"已送达:{agent} 现在就收到了。",sentCloudOffline:"已发送。{agent} 所在的电脑重新上线后,它会收到。",sentCloudMcp:"已发送。{agent} 下次处理这个作品时会看到。",sentCloudNone:"已发送。会等到有 Agent 连接为止。",viaWaitingAgent:"等 Agent 接收",statusConnected:"已连接",statusNoAgent:"无 Agent",emptyTitle:"这个作品还是空的",emptyBody:"{root} 里还没有写入 {type} 的内容。由 Agent 来写:把下面这段发给它。",startSession:"和 {agent} 开个新会话",promptCopied:"已复制:粘贴到任意装了 Artifact 工具的 Agent 会话里。",sentToSession:"已发到新会话。",problemTitle:"这个作品在这里打不开",noPage:"没有页面。",readOnlyNewer:"在这里只读:这个作品由 {type} {release} 写入,这台电脑上是 {version}。更新 Open Artifact(open-artifact runtime update,或更新附带它的应用)后才能编辑。",folder:"文件夹:{root}",askToLook:"让 {agent} 看看",problemAsk:"作品页打不开:{problem}",noBoot:"没有要显示的作品。从主页打开一个。",tryAgain:"重试",bootFailed:"页面没有打开:{error}",frameNotOpen:"页面已经不在打开状态(它的服务可能重启过),重新打开也没成功。",frameNotGranted:"这个页面在这里已经不对你开放了。",homeTitle:"Open Artifact",homeSub:"本机所有 Agent 共用的作品和类型。",artifacts:"作品",types:"类型",newArtifact:"新建作品",moreActions:"更多操作",backToSession:"回到会话",noArtifacts:"还没有作品。让 Agent 用 Artifact 工具创建一个,或者在这里新建。",pageOpen:"已打开",typeMissing:"类型没有安装",deleted:"已删除「{title}」,文件夹保留。",undo:"撤销",restored:"已恢复",couldNotRestore:"没能恢复:{error}",couldNotLoad:"读取失败:{error}",typeRoots:"类型根目录:{roots}",noTypes:"没有找到类型。",disabled:"已停用",shadowedBy:"被 {root} 覆盖",newOf:"新建 {type}",create:"创建",title:"标题",folderOptional:"文件夹(可不填)",folderHint:"默认:主工作区里新建一个文件夹",needTitle:"先写个标题。",couldNotCreate:"没建成:{error}",renameArtifact:"重命名作品",cannotCreateYet:"目前这里只能新建 Design 作品。",cannotShareCloud:"{type} 作品暂时不能在这里分享。",signIn:"登录",signOut:"退出登录",signOutFailed:"没能退出登录:{error}",accountOf:"账号:{name}",sharedWithOthers:"已分享给他人",addPeople:"添加成员",addPeoplePlaceholder:"邮箱,或 @域名(该域名下所有人)",add:"添加",addInvalid:"不是邮箱地址或 @域名:{entries}",roleFor:"新加成员的角色",memberPending:"已邀请,还没登录过",memberDomain:"{domain} 的所有人",memberGroup:"群组",removeAccess:"移除访问权限",removeMemberBody:"对方将无法再访问这份内容,之后可以再加回来。",noMembers:"还没有添加其他人。",accessRestricted:"受限",accessRestrictedSub:"只有这里添加的人能打开。",accessLink:"知道链接的任何人",accessLinkSub:"拿到下面某条链接的人获得对应角色。",accessPublic:"公开",accessPublicSub:"任何人都能以查看者身份打开;下面的链接可以给更多权限。",shareSettings:"设置",viewersCanExport:"查看者可以下载和导出",editorsCanAsk:"编辑者可以向 {agent} 提需求",ownedBy:"所有者:{name}",yourRole:"你的角色:{role}",onlyOwnerShares:"只有所有者能更改谁可以访问。",emptyBodyCloud:"还没有写入任何 {type} 内容。由 Agent 来写:把下面这段发给它。",homeSubCloud:"你的作品,以及别人分享给你的。",noArtifactsCloud:"还没有作品。让 Agent 用 Artifact 工具发布一个,或者请别人分享给你。",pubTitle:"发布到网上",pubIntro:"给它一个网址,这台电脑关机也能打开。在那边由你决定谁能打开。",pubDataNote:"发布这个仪表盘也会发布它的数据:这台电脑运行它的实时查询,把结果放到站点上,能打开它的人都看得到。",pubDataPending:"它的实时数据还没上站点:在你发布数据之前,那边的页面没有数字。",pubDataConfirm:"发布它的数据",pubDataAsOf:"站点上的数据截至 {time},由这台电脑刷新。",pubDataNone:"它的数据已发布,第一批结果正在上传。",pubDataFailed:"上次刷新失败:{reason}",pubDataRefresh:"现在刷新",pubDataRefreshing:"正在刷新…",pubDataStop:"停止发布数据",pubDataStopTitle:"停止发布它的数据?",pubDataStopBody:"数据会从 {host} 上删掉,这台电脑也不再刷新它们。仪表盘仍发布在那里,只是在你再次发布数据之前没有数字。",pubConnectSite:"连接一个站点…",pubConnectAnother:"再连接一个站点…",pubAddress:"站点地址",pubAddressPlaceholder:"https://artifacts.example.com",pubAddressHint:"你有账号的 Open Artifact 站点的网址。",pubName:"名称",pubNameHint:"用来区分不同站点的简短名字,比如 work。",pubConnect:"连接",pubConnecting:"正在连接…",pubCodeTitle:"在 {host} 上批准这台电脑",pubCodeBody:"确认页面上显示的是这个代码,然后点批准。",pubCodeOpened:"已在浏览器里打开批准页面。没看到的话,从这里打开:",pubOpenApproval:"打开批准页面",pubWaitingApproval:"等你批准…",pubConnected:"已连接到 {host},账号 {name}。",pubTryAgain:"重试",pubSignedInAs:"账号:{name}",pubStateConnected:"已连接",pubStateConnecting:"正在连接…",pubStateUnreachable:"连不上",pubStateSignedOut:"已退出登录",pubPublish:"发布",pubPublishing:"正在发布…",pubReconnect:"重新连接",pubPublishedAt:"已发布到 {host}",pubOpen:"打开",pubManage:"谁能打开,在它的网页上设置:打开后点那里的“分享”。",pubManageLink:"到网上管理访问权限",pubOpensThere:"站点连得上时,在这台电脑上打开它会直接跳到网址。",pubUnpublish:"取消发布",pubUnpublishing:"正在取消发布…",unpubTitle:"取消发布这份内容?",unpubBody:"网上那份会移到 {host} 的回收站,网址随之失效。这个文件夹留在这台电脑上,并带上网上的最新改动。",pubInSync:"已同步",pubInSyncAt:"已同步 · {when}",pubWaitingOne:"有 1 处改动等待发送",pubWaiting:"有 {count} 处改动等待发送",pubOffline:"连不上 {host}:改动先保存在这里,恢复后自动发送。",pubSignedOutSync:"已退出 {host} 的登录:改动先保存在这里,重新连接后发送。",pubSyncFailed:"上次同步失败:{error}",pubCloudMark:"已发布到网上",pubCloudAt:"已发布:{url}",pubHostEmpty:"请填写站点地址。",pubHostInvalid:"这不是网址。请按 https://artifacts.example.com 这样填写。",pubHostNotHttps:"地址必须以 https:// 开头(http 只能用于本机或内网地址,比如 192.168.1.20、nas.lan、192-168-1-20.nip.io)。",pubInsecureWarning:"这是明文 http:发布的内容不加密传输。只在你信任的网络里使用。",pubAutoSwitch:"自动发布新建的作品",pubAutoHint:"从现在起新建的作品会自动发布到 {host},之前的保持不变。",pubAutoNoSite:"先选一个默认站点。",pubDefaultSite:"默认站点",pubDefaultMark:"默认",pubAutoPublishing:"正在自动发布到 {host}…",pubAutoSignedOut:"等待发布到 {host}:这台电脑还没在那边登录。",pubAutoUnreachable:"等待发布:连不上 {host},稍后会自动重试。",pubAutoFailed:"还没发布到 {host}:{error} 稍后会自动重试。",pubApprovalTitle:"在 {host} 上批准这台电脑",pubApprovalBody:"这台电脑已设置为发布到 {host}。打开批准页面,确认显示的是这个代码,然后批准。",pubCloudSettingsFailed:"没能修改设置:{error}",pubNameInvalid:"只能用字母、数字、- 和 _(最多 32 个),比如 work。",pubNameTaken:"这个名称已经用于另一个站点,换一个名称。",pubNoDaemon:"这台电脑上的 Open Artifact 没有响应。确认它在运行后再试。",pubConnectDenied:"{host} 拒绝了这次连接。如果是误操作,再试一次。",pubConnectExpired:"代码在批准前过期了。请重试,并在几分钟内批准。",pubConnectUnreachable:"连不上 {host}。检查地址和网络后再试。",pubConnectNotHost:"{host} 看起来不是 Open Artifact 站点,请检查地址。",pubConnectFailed:"连接失败:{error}",pubIdTaken:"{host} 上已经有一份同样 id 的作品,它仍在那边发布着(可能是从另一台电脑发布的),或者属于别人。先在那边取消发布(你取消发布过的作品,再次发布时会被替换),或者复制这份作品后发布副本。",pubAlreadyElsewhere:"它已经发布到另一个站点了,先在那边取消发布。",pubTooLarge:"它对 {host} 来说太大了。把文件夹里的大文件移走后再试。",pubSignedOut:"你已退出 {host} 的登录。重新连接后再试。",pubNotAllowed:"{host} 不允许这样做:你在那边的账号可能没有发布权限。",pubUnreachable:"暂时连不上 {host},恢复后再试。",pubUnsupported:"{host} 暂时不支持这类作品。",pubFailed:"发布失败:{error}",unpubUnreachable:"连不上 {host},没法先把网上的最新版本取回来。恢复后再试。",unpubFailed:"取消发布失败:{error}",openOnWeb:"在网上打开",copyWebLink:"复制网址",webLinkCopied:"网址已复制",signOutAccess:"退出登录(同时退出组织的统一登录)",upload:"上传",uploadHint:"上传一个作品:在它的“导出”里选“整个文件夹(.zip)”得到的 .zip。",uploadDrop:"松开即可上传这个 .zip",uploadSending:"正在上传 {name}… {percent}%",uploadSendingSize:"正在上传 {name}…",uploadChecking:"正在检查 {name}…",uploadOpening:"{name} 已上传,正在打开…",uploadNotZip:"这不是 .zip 文件。请在作品的“导出”里选“整个文件夹(.zip)”。",uploadNotArtifact:"这个 zip 不是 Open Artifact 作品文件夹。请在作品的“导出”里选“整个文件夹(.zip)”。",uploadTooLargeLimit:"这个 zip 太大了:这个站点最多接收 {limit}。把文件夹里的大文件删掉后再试。",uploadTooLarge:"这个 zip 对这个站点来说太大了。把文件夹里的大文件删掉后再试。",uploadTooLargeSaid:"这个 zip 对这个站点来说太大了:{error} 把文件夹里的大文件删掉后再试。",uploadSignedOut:"你已退出登录。重新登录后再上传。",uploadNotAllowed:"这个站点不允许你上传作品。",uploadConflict:"站点那边出了点冲突,再试一次。",uploadTypeMissing:"这个站点暂时打不开 {type} 作品。",uploadBusy:"尝试太频繁了,稍等一会儿再试。",uploadNoAnswer:"站点没有响应。检查网络后再试。",uploadFailed:"没能上传:{error}",dismiss:"关闭",trash:"回收站",trashEmpty:"回收站是空的。",trashNote:"作品在回收站里时,分享过的人都打不开它。",trashedWhen:"{when}移到回收站",trashKeptDays:"在回收站里放满 {days} 天后会被永久删除。",trashKeptOneDay:"在回收站里放满 1 天后会被永久删除。",trashKeptForever:"会一直留在这里,直到你永久删除。",restore:"恢复",restoredTitle:"已恢复「{title}」",deleteForever:"永久删除",purgeTitle:"永久删除「{title}」?",purgeBody:"删除后无法撤销。它会从这个站点上移除,分享过的人也都无法再打开。",purged:"已永久删除「{title}」",purgeNotTrashed:"它已经不在回收站里了。",purgeGone:"它已经不存在了。",couldNotPurge:"没能删除:{error}",moveToTrash:"移到回收站",movedToTrash:"已把「{title}」移到回收站。",shareOnNetwork:"改为在本地网络里分享",shareOnNetworkSub:"这里的链接打开的是这台电脑上的副本,不是网页版。"};function rA(n){return n&&/^zh\b/i.test(n)?"zh-CN":"en"}const bp=rA(typeof navigator>"u"?void 0:navigator.language);function sA(n,i){return i?n.replace(/\{(\w+)\}/g,(l,r)=>r in i?String(i[r]):l):n}function uA(n,i,l){return sA((n==="zh-CN"?lA[i]:void 0)??aA[i],l)}function he(n,i){return uA(bp,n,i)}const Kt={artifacts:"artifacts",artifact:"artifact",types:"types",harnesses:"harnesses",events:"events",share:"artifact.share",archive:"artifact.archive",thumbnail:"artifacts.thumbnail",restore:"artifacts.restore",open:"artifacts.open",boot:"artifacts.boot",preview:"artifacts.preview",create:"artifacts.create",update:"artifacts.update",duplicate:"artifacts.duplicate",delete:"artifacts.delete",ask:"artifacts.ask",adopt:"artifacts.adopt",tools:"tools",embed:"embed",view:"view"},cA="application/zip",fA="[Artifact comment sent to agent]",dA="[Artifact edit request sent to agent]",pA="[Artifact task finished]",hA=8,gA=8e3,mA=(n,i=gA)=>typeof n=="string"?n.slice(0,i):"",_l=n=>!!n&&typeof n=="object"&&!Array.isArray(n);function yA(n){if(!_l(n))return null;if(n.openArtifact==="goto"){const r=mA(n.hash,2e3);return r?{openArtifact:"goto",hash:r}:null}if(n.openArtifact!=="host_hello")return null;const i=_l(n.caps)?n.caps:{},l={openArtifact:"host_hello",caps:{...i.sessions===!0?{sessions:!0}:{},...i.toolbar===!0?{toolbar:!0}:{},...i.artifacts===!0?{artifacts:!0}:{}}};if(typeof n.agentName=="string"&&n.agentName.trim()&&(l.agentName=n.agentName.trim().slice(0,80)),typeof n.harness=="string"&&n.harness&&(l.harness=n.harness.slice(0,64)),Number.isInteger(n.protocol)&&(l.protocol=n.protocol),_l(n.theme)&&(n.theme.scheme==="light"||n.theme.scheme==="dark")&&(l.theme={scheme:n.theme.scheme,...typeof n.theme.accent=="string"&&/^#[0-9a-f]{6}$/i.test(n.theme.accent)?{accent:n.theme.accent}:{}}),Array.isArray(n.destinations)&&(l.destinations=n.destinations.filter(r=>_l(r)&&typeof r.id=="string"&&!!r.id&&typeof r.label=="string"&&!!r.label.trim()).slice(0,hA).map(r=>({id:r.id.slice(0,64),label:r.label.trim().slice(0,80)}))),_l(n.library)){const r={};typeof n.library.harness=="string"&&n.library.harness&&(r.harness=n.library.harness.slice(0,64)),typeof n.library.workspace=="string"&&n.library.workspace&&(r.workspace=n.library.workspace.slice(0,4096)),(r.harness||r.workspace)&&(l.library=r)}return l}function bA(n){return!!n&&typeof n=="object"&&typeof n.openArtifact=="string"}const vA=["quickstart","list","publish","read","open","call","adopt","delete","share"],SA=["get","list","query","set","update","delete","str_replace","batch"],xA=["read","reply","resolve","reopen","wait"],TA=["share","export"],EA={type:"object",properties:{action:{type:"string",enum:vA,description:"What to do. Omitted: publish."},intent:{type:"string",description:"quickstart: what is being made (design, design-system, slides, whiteboard, document, data, sheets, motion, other), or a few words about it."},scope:{type:"string",enum:["types","mine","all"],description:"list: the installed types, this session's and this workspace's artifacts (default), or every artifact."},type:{type:"string",description:"list: only artifacts of this type (an id, or open-artifact://type/<id>). quickstart: the type already chosen (an id), to get its create call and steps without matching."},query:{type:"string",description:"list: only artifacts whose title contains this text."},limit:{type:"integer",description:"list: how many to return (default 50, at most 200)."},cursor:{type:"string",description:"list: the next_cursor of the previous page."},type_url:{type:"string",description:"publish without url: the type to create from (open-artifact://type/<id>, from quickstart). read without url: the type to describe."},title:{type:"string",description:"publish without url: the new artifact's name. quickstart: the name it will have, to find similar ones."},folder:{type:"string",description:"publish without url, or adopt: where the artifact's folder goes (absolute, or relative to the workspace). Default <workspace>/artifacts/<slug>."},url:{type:"string",description:"An artifact: open-artifact://artifact/<id>, as publish returned it."},files:{type:"object",additionalProperties:!0,description:'publish with url: files to write under the artifact root, as {"rel/path": "text"} or {"rel/path": {"content": "...", "encoding": "base64"}}; null deletes.'},if_match:{type:"object",additionalProperties:!0,description:'publish with url: {"rel/path": sha256 | null | "*"}. Write only while the file still has the sha256 you read, does not exist (null), or anyway ("*"). One mismatch writes nothing and returns the current versions.'},check:{type:"boolean",description:"publish with url: run the type's check action after writing; its result comes back as check."},open:{type:"string",enum:["after_first_write","now","never"],description:"publish without url: after_first_write (the default) opens the page in your app once your first write lands; now opens it at once; never leaves it closed. Where your app cannot show pages by itself the result says so: open view_url in your app's built-in browser, if you have one."},related:{type:"boolean",description:"quickstart: list existing artifacts the recommended type can build on, such as design systems (default true)."},path:{type:"string",description:"read: one file or folder under the root (omitted: the record and the file list)."},paths:{type:"array",items:{type:"string"},description:"read: several files under the root at once."},name:{type:"string",description:"call: the action's name (check, upload, ...; read with url lists them)."},args:{type:"object",additionalProperties:!0,description:"call: the action's arguments. upload: {file: absolute path, name?, group?}."},panel:{type:"string",enum:TA,description:"open: also open the page's Share panel (share), for the person to share it on the network, or its Export tab (export), for them to download a file."},cloud:{type:"string",description:"share: publish the artifact to this cloud remote (its name, as `open-artifact remote list` shows it). It works only on a remote the person set up and let agents publish to (agentMayPublish); otherwise the person publishes it, from the Share panel or with `open-artifact publish <id> --remote <name>`."}}},wA={type:"object",properties:{action:{type:"string",enum:SA},url:{type:"string",description:"The artifact (open-artifact://artifact/<id>)."},collection:{type:"string"},doc_id:{type:"string"},path:{type:"string",description:"collection/doc_id, instead of the two."},data:{type:"object",additionalProperties:!0,description:"set / update: the document's fields."},file_path:{type:"string",description:"set / update: a JSON file holding the fields, instead of data."},if_match:{description:'set / update / delete / str_replace: the sha256 get returned (write only if unchanged), null (only if it does not exist) or "*" (replace whatever is there).'},field:{type:"string",description:"str_replace: the text field, as a dot path (body, notes.text)."},old:{type:"string",description:"str_replace: the passage to replace; it must occur exactly once."},new:{type:"string",description:"str_replace: the passage that replaces it."},where:{type:"array",items:{type:"object",additionalProperties:!0},description:"query: [{field, op, value}], all must hold. op: ==, !=, <, <=, >, >=, in, not-in (up to 30 values), array-contains."},order_by:{type:"object",additionalProperties:!0,description:'query: {field, dir: "asc" | "desc"}.'},limit:{type:"integer",description:"list / query: how many documents (default 100, at most 1000)."},cursor:{type:"string",description:"list / query: the next_cursor of the previous page."},out_file:{type:"string",description:"get / list / query: write the result to this JSON file (absolute, or relative to the workspace) and return only its path and counts."},writes:{type:"array",items:{type:"object",additionalProperties:!0},description:"batch: [{op: set|update|delete|str_replace, path | collection+doc_id, data | file_path, if_match?, field?, old?, new?}], at most 500."}},required:["action","url"]},RA={type:"object",properties:{action:{type:"string",enum:xA},url:{type:"string",description:"The artifact (open-artifact://artifact/<id>). wait: optional."},thread_id:{type:"string",description:'reply / resolve / reopen: the thread (after ";thread=" in the message).'},text:{type:"string",description:"reply: the answer."},resolve:{type:"boolean",description:"reply: resolve the thread too."},all:{type:"boolean",description:"read: resolved threads too."},since:{type:"string",description:"read: only threads with a message at or after this time (ISO 8601)."},acknowledge_duplicate:{type:"boolean",description:"reply: send the same text as your last reply in this thread again, on purpose."},timeout_ms:{type:"number",description:"wait: how long (default 600000)."}},required:["action"]},xb={Artifact:EA,ArtifactData:wA,ArtifactComments:RA},CA={Artifact:["Make and change artifacts: typed folders of files that open as live pages the person can view, edit, comment on and export. Actions:","- quickstart {intent, type?}: call first for a new artifact; recommends a type (or takes the one given) and returns the call that creates it, the steps for this app and similar artifacts that already exist.",'- list {scope: "mine" | "all" | "types", type?, query?}: find existing artifacts, or the installed types.',"- publish {type_url, title, folder?, open?}: create an artifact; the result carries its root folder and the type's instructions. publish {url, files, if_match?, check?}: write files when you have no file tools of your own.","- read {url, path? | paths?}: the artifact's record, files and actions, or some of its files with their sha256. read {type_url}: a type's instructions, before creating.",`- open {url, panel?}: show it to the person in the computer's browser (or the app, when it shows pages), once its content is written. When your app has a built-in browser, open view_url there instead. panel "share" or "export" opens its Share panel or Export tab for them.`,"- call {url, name, args?}: run one of the type's actions (check, upload, ...). A long one answers {task, pending: true}; its result comes later as a message.","- adopt {url | folder}: take over an artifact, or add an existing folder. Only when the person asks.","- share {url}: whether it is shared on the local network, and its links. Only the person changes that, in the page's Share panel.","- delete {url}: forget an artifact; its folder stays. Only when the person asks."].join(`
9
+ `).replace(Yx,"")}function zm(e,t){return t=Nm(t),Nm(e)===t}function ut(e,t,o,a,s,c){switch(o){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||Zi(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&Zi(e,""+a);break;case"className":Wl(e,"class",a);break;case"tabIndex":Wl(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":Wl(e,o,a);break;case"style":zp(e,a,c);break;case"data":if(t!=="object"){Wl(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||o!=="href")){e.removeAttribute(o);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(o);break}a=$l(""+a),e.setAttribute(o,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(o,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof c=="function"&&(o==="formAction"?(t!=="input"&&ut(e,t,"name",s.name,s,null),ut(e,t,"formEncType",s.formEncType,s,null),ut(e,t,"formMethod",s.formMethod,s,null),ut(e,t,"formTarget",s.formTarget,s,null)):(ut(e,t,"encType",s.encType,s,null),ut(e,t,"method",s.method,s,null),ut(e,t,"target",s.target,s,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(o);break}a=$l(""+a),e.setAttribute(o,a);break;case"onClick":a!=null&&(e.onclick=oo);break;case"onScroll":a!=null&&We("scroll",e);break;case"onScrollEnd":a!=null&&We("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(r(61));if(o=a.__html,o!=null){if(s.children!=null)throw Error(r(60));e.innerHTML=o}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}o=$l(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(o,""+a):e.removeAttribute(o);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(o,""):e.removeAttribute(o);break;case"capture":case"download":a===!0?e.setAttribute(o,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(o,a):e.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(o,a):e.removeAttribute(o);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(o):e.setAttribute(o,a);break;case"popover":We("beforetoggle",e),We("toggle",e),Zl(e,"popover",a);break;case"xlinkActuate":no(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":no(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":no(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":no(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":no(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":no(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":no(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":no(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":no(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":Zl(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(o=mS.get(o)||o,Zl(e,o,a))}}function Wc(e,t,o,a,s,c){switch(o){case"style":zp(e,a,c);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(r(61));if(o=a.__html,o!=null){if(s.children!=null)throw Error(r(60));e.innerHTML=o}}break;case"children":typeof a=="string"?Zi(e,a):(typeof a=="number"||typeof a=="bigint")&&Zi(e,""+a);break;case"onScroll":a!=null&&We("scroll",e);break;case"onScrollEnd":a!=null&&We("scrollend",e);break;case"onClick":a!=null&&(e.onclick=oo);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ep.hasOwnProperty(o))e:{if(o[0]==="o"&&o[1]==="n"&&(s=o.endsWith("Capture"),t=o.slice(2,s?o.length-7:void 0),c=e[on]||null,c=c!=null?c[o]:null,typeof c=="function"&&e.removeEventListener(t,c,s),typeof a=="function")){typeof c!="function"&&c!==null&&(o in e?e[o]=null:e.hasAttribute(o)&&e.removeAttribute(o)),e.addEventListener(t,a,s);break e}o in e?e[o]=a:a===!0?e.setAttribute(o,""):Zl(e,o,a)}}}function Ft(e,t,o){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":We("error",e),We("load",e);var a=!1,s=!1,c;for(c in o)if(o.hasOwnProperty(c)){var g=o[c];if(g!=null)switch(c){case"src":a=!0;break;case"srcSet":s=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:ut(e,t,c,g,o,null)}}s&&ut(e,t,"srcSet",o.srcSet,o,null),a&&ut(e,t,"src",o.src,o,null);return;case"input":We("invalid",e);var x=c=g=s=null,_=null,X=null;for(a in o)if(o.hasOwnProperty(a)){var re=o[a];if(re!=null)switch(a){case"name":s=re;break;case"type":g=re;break;case"checked":_=re;break;case"defaultChecked":X=re;break;case"value":c=re;break;case"defaultValue":x=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(r(137,t));break;default:ut(e,t,a,re,o,null)}}Ap(e,c,x,_,X,g,s,!1);return;case"select":We("invalid",e),a=g=c=null;for(s in o)if(o.hasOwnProperty(s)&&(x=o[s],x!=null))switch(s){case"value":c=x;break;case"defaultValue":g=x;break;case"multiple":a=x;default:ut(e,t,s,x,o,null)}t=c,o=g,e.multiple=!!a,t!=null?Qi(e,!!a,t,!1):o!=null&&Qi(e,!!a,o,!0);return;case"textarea":We("invalid",e),c=s=a=null;for(g in o)if(o.hasOwnProperty(g)&&(x=o[g],x!=null))switch(g){case"value":a=x;break;case"defaultValue":s=x;break;case"children":c=x;break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(r(91));break;default:ut(e,t,g,x,o,null)}Dp(e,a,s,c);return;case"option":for(_ in o)o.hasOwnProperty(_)&&(a=o[_],a!=null)&&(_==="selected"?e.selected=a&&typeof a!="function"&&typeof a!="symbol":ut(e,t,_,a,o,null));return;case"dialog":We("beforetoggle",e),We("toggle",e),We("cancel",e),We("close",e);break;case"iframe":case"object":We("load",e);break;case"video":case"audio":for(a=0;a<Sl.length;a++)We(Sl[a],e);break;case"image":We("error",e),We("load",e);break;case"details":We("toggle",e);break;case"embed":case"source":case"link":We("error",e),We("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(X in o)if(o.hasOwnProperty(X)&&(a=o[X],a!=null))switch(X){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:ut(e,t,X,a,o,null)}return;default:if(fu(t)){for(re in o)o.hasOwnProperty(re)&&(a=o[re],a!==void 0&&Wc(e,t,re,a,o,void 0));return}}for(x in o)o.hasOwnProperty(x)&&(a=o[x],a!=null&&ut(e,t,x,a,o,null))}function qx(e,t,o,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var s=null,c=null,g=null,x=null,_=null,X=null,re=null;for(te in o){var ce=o[te];if(o.hasOwnProperty(te)&&ce!=null)switch(te){case"checked":break;case"value":break;case"defaultValue":_=ce;default:a.hasOwnProperty(te)||ut(e,t,te,null,a,ce)}}for(var Z in a){var te=a[Z];if(ce=o[Z],a.hasOwnProperty(Z)&&(te!=null||ce!=null))switch(Z){case"type":c=te;break;case"name":s=te;break;case"checked":X=te;break;case"defaultChecked":re=te;break;case"value":g=te;break;case"defaultValue":x=te;break;case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(r(137,t));break;default:te!==ce&&ut(e,t,Z,te,a,ce)}}uu(e,g,x,_,X,re,c,s);return;case"select":te=g=x=Z=null;for(c in o)if(_=o[c],o.hasOwnProperty(c)&&_!=null)switch(c){case"value":break;case"multiple":te=_;default:a.hasOwnProperty(c)||ut(e,t,c,null,a,_)}for(s in a)if(c=a[s],_=o[s],a.hasOwnProperty(s)&&(c!=null||_!=null))switch(s){case"value":Z=c;break;case"defaultValue":x=c;break;case"multiple":g=c;default:c!==_&&ut(e,t,s,c,a,_)}t=x,o=g,a=te,Z!=null?Qi(e,!!o,Z,!1):!!a!=!!o&&(t!=null?Qi(e,!!o,t,!0):Qi(e,!!o,o?[]:"",!1));return;case"textarea":te=Z=null;for(x in o)if(s=o[x],o.hasOwnProperty(x)&&s!=null&&!a.hasOwnProperty(x))switch(x){case"value":break;case"children":break;default:ut(e,t,x,null,a,s)}for(g in a)if(s=a[g],c=o[g],a.hasOwnProperty(g)&&(s!=null||c!=null))switch(g){case"value":Z=s;break;case"defaultValue":te=s;break;case"children":break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(r(91));break;default:s!==c&&ut(e,t,g,s,a,c)}Mp(e,Z,te);return;case"option":for(var Ce in o)Z=o[Ce],o.hasOwnProperty(Ce)&&Z!=null&&!a.hasOwnProperty(Ce)&&(Ce==="selected"?e.selected=!1:ut(e,t,Ce,null,a,Z));for(_ in a)Z=a[_],te=o[_],a.hasOwnProperty(_)&&Z!==te&&(Z!=null||te!=null)&&(_==="selected"?e.selected=Z&&typeof Z!="function"&&typeof Z!="symbol":ut(e,t,_,Z,a,te));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var He in o)Z=o[He],o.hasOwnProperty(He)&&Z!=null&&!a.hasOwnProperty(He)&&ut(e,t,He,null,a,Z);for(X in a)if(Z=a[X],te=o[X],a.hasOwnProperty(X)&&Z!==te&&(Z!=null||te!=null))switch(X){case"children":case"dangerouslySetInnerHTML":if(Z!=null)throw Error(r(137,t));break;default:ut(e,t,X,Z,a,te)}return;default:if(fu(t)){for(var ct in o)Z=o[ct],o.hasOwnProperty(ct)&&Z!==void 0&&!a.hasOwnProperty(ct)&&Wc(e,t,ct,void 0,a,Z);for(re in a)Z=a[re],te=o[re],!a.hasOwnProperty(re)||Z===te||Z===void 0&&te===void 0||Wc(e,t,re,Z,a,te);return}}for(var Y in o)Z=o[Y],o.hasOwnProperty(Y)&&Z!=null&&!a.hasOwnProperty(Y)&&ut(e,t,Y,null,a,Z);for(ce in a)Z=a[ce],te=o[ce],!a.hasOwnProperty(ce)||Z===te||Z==null&&te==null||ut(e,t,ce,Z,a,te)}function _m(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Vx(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,o=performance.getEntriesByType("resource"),a=0;a<o.length;a++){var s=o[a],c=s.transferSize,g=s.initiatorType,x=s.duration;if(c&&x&&_m(g)){for(g=0,x=s.responseEnd,a+=1;a<o.length;a++){var _=o[a],X=_.startTime;if(X>x)break;var re=_.transferSize,ce=_.initiatorType;re&&_m(ce)&&(_=_.responseEnd,g+=re*(_<x?1:(x-X)/(_-X)))}if(--a,t+=8*(c+g)/(s.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Jc=null,$c=null;function Kr(e){return e.nodeType===9?e:e.ownerDocument}function km(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function jm(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function ef(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var tf=null;function Gx(){var e=window.event;return e&&e.type==="popstate"?e===tf?!1:(tf=e,!0):(tf=null,!1)}var Hm=typeof setTimeout=="function"?setTimeout:void 0,Xx=typeof clearTimeout=="function"?clearTimeout:void 0,Lm=typeof Promise=="function"?Promise:void 0,Fx=typeof queueMicrotask=="function"?queueMicrotask:typeof Lm<"u"?function(e){return Lm.resolve(null).then(e).catch(Kx)}:Hm;function Kx(e){setTimeout(function(){throw e})}function ni(e){return e==="head"}function Um(e,t){var o=t,a=0;do{var s=o.nextSibling;if(e.removeChild(o),s&&s.nodeType===8)if(o=s.data,o==="/$"||o==="/&"){if(a===0){e.removeChild(s),Oa(t);return}a--}else if(o==="$"||o==="$?"||o==="$~"||o==="$!"||o==="&")a++;else if(o==="html")Tl(e.ownerDocument.documentElement);else if(o==="head"){o=e.ownerDocument.head,Tl(o);for(var c=o.firstChild;c;){var g=c.nextSibling,x=c.nodeName;c[Ia]||x==="SCRIPT"||x==="STYLE"||x==="LINK"&&c.rel.toLowerCase()==="stylesheet"||o.removeChild(c),c=g}}else o==="body"&&Tl(e.ownerDocument.body);o=s}while(o);Oa(t)}function Bm(e,t){var o=e;e=0;do{var a=o.nextSibling;if(o.nodeType===1?t?(o._stashedDisplay=o.style.display,o.style.display="none"):(o.style.display=o._stashedDisplay||"",o.getAttribute("style")===""&&o.removeAttribute("style")):o.nodeType===3&&(t?(o._stashedText=o.nodeValue,o.nodeValue=""):o.nodeValue=o._stashedText||""),a&&a.nodeType===8)if(o=a.data,o==="/$"){if(e===0)break;e--}else o!=="$"&&o!=="$?"&&o!=="$~"&&o!=="$!"||e++;o=a}while(o)}function nf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var o=t;switch(t=t.nextSibling,o.nodeName){case"HTML":case"HEAD":case"BODY":nf(o),ru(o);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(o.rel.toLowerCase()==="stylesheet")continue}e.removeChild(o)}}function Qx(e,t,o,a){for(;e.nodeType===1;){var s=o;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[Ia])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(c=e.getAttribute("rel"),c==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(c!==s.rel||e.getAttribute("href")!==(s.href==null||s.href===""?null:s.href)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin)||e.getAttribute("title")!==(s.title==null?null:s.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(c=e.getAttribute("src"),(c!==(s.src==null?null:s.src)||e.getAttribute("type")!==(s.type==null?null:s.type)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin))&&c&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var c=s.name==null?null:""+s.name;if(s.type==="hidden"&&e.getAttribute("name")===c)return e}else return e;if(e=_n(e.nextSibling),e===null)break}return null}function Zx(e,t,o){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!o||(e=_n(e.nextSibling),e===null))return null;return e}function Im(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=_n(e.nextSibling),e===null))return null;return e}function of(e){return e.data==="$?"||e.data==="$~"}function af(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Wx(e,t){var o=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||o.readyState!=="loading")t();else{var a=function(){t(),o.removeEventListener("DOMContentLoaded",a)};o.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function _n(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var lf=null;function Pm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var o=e.data;if(o==="/$"||o==="/&"){if(t===0)return _n(e.nextSibling);t--}else o!=="$"&&o!=="$!"&&o!=="$?"&&o!=="$~"&&o!=="&"||t++}e=e.nextSibling}return null}function Ym(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var o=e.data;if(o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"){if(t===0)return e;t--}else o!=="/$"&&o!=="/&"||t++}e=e.previousSibling}return null}function qm(e,t,o){switch(t=Kr(o),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function Tl(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ru(e)}var kn=new Map,Vm=new Set;function Qr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var So=q.d;q.d={f:Jx,r:$x,D:eT,C:tT,L:nT,m:oT,X:aT,S:iT,M:lT};function Jx(){var e=So.f(),t=Ir();return e||t}function $x(e){var t=Xi(e);t!==null&&t.tag===5&&t.type==="form"?rg(t):So.r(e)}var wa=typeof document>"u"?null:document;function Gm(e,t,o){var a=wa;if(a&&typeof t=="string"&&t){var s=Cn(t);s='link[rel="'+e+'"][href="'+s+'"]',typeof o=="string"&&(s+='[crossorigin="'+o+'"]'),Vm.has(s)||(Vm.add(s),e={rel:e,crossOrigin:o,href:t},a.querySelector(s)===null&&(t=a.createElement("link"),Ft(t,"link",e),Bt(t),a.head.appendChild(t)))}}function eT(e){So.D(e),Gm("dns-prefetch",e,null)}function tT(e,t){So.C(e,t),Gm("preconnect",e,t)}function nT(e,t,o){So.L(e,t,o);var a=wa;if(a&&e&&t){var s='link[rel="preload"][as="'+Cn(t)+'"]';t==="image"&&o&&o.imageSrcSet?(s+='[imagesrcset="'+Cn(o.imageSrcSet)+'"]',typeof o.imageSizes=="string"&&(s+='[imagesizes="'+Cn(o.imageSizes)+'"]')):s+='[href="'+Cn(e)+'"]';var c=s;switch(t){case"style":c=Ra(e);break;case"script":c=Ca(e)}kn.has(c)||(e=v({rel:"preload",href:t==="image"&&o&&o.imageSrcSet?void 0:e,as:t},o),kn.set(c,e),a.querySelector(s)!==null||t==="style"&&a.querySelector(El(c))||t==="script"&&a.querySelector(wl(c))||(t=a.createElement("link"),Ft(t,"link",e),Bt(t),a.head.appendChild(t)))}}function oT(e,t){So.m(e,t);var o=wa;if(o&&e){var a=t&&typeof t.as=="string"?t.as:"script",s='link[rel="modulepreload"][as="'+Cn(a)+'"][href="'+Cn(e)+'"]',c=s;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=Ca(e)}if(!kn.has(c)&&(e=v({rel:"modulepreload",href:e},t),kn.set(c,e),o.querySelector(s)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(o.querySelector(wl(c)))return}a=o.createElement("link"),Ft(a,"link",e),Bt(a),o.head.appendChild(a)}}}function iT(e,t,o){So.S(e,t,o);var a=wa;if(a&&e){var s=Fi(a).hoistableStyles,c=Ra(e);t=t||"default";var g=s.get(c);if(!g){var x={loading:0,preload:null};if(g=a.querySelector(El(c)))x.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":t},o),(o=kn.get(c))&&rf(e,o);var _=g=a.createElement("link");Bt(_),Ft(_,"link",e),_._p=new Promise(function(X,re){_.onload=X,_.onerror=re}),_.addEventListener("load",function(){x.loading|=1}),_.addEventListener("error",function(){x.loading|=2}),x.loading|=4,Zr(g,t,a)}g={type:"stylesheet",instance:g,count:1,state:x},s.set(c,g)}}}function aT(e,t){So.X(e,t);var o=wa;if(o&&e){var a=Fi(o).hoistableScripts,s=Ca(e),c=a.get(s);c||(c=o.querySelector(wl(s)),c||(e=v({src:e,async:!0},t),(t=kn.get(s))&&sf(e,t),c=o.createElement("script"),Bt(c),Ft(c,"link",e),o.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},a.set(s,c))}}function lT(e,t){So.M(e,t);var o=wa;if(o&&e){var a=Fi(o).hoistableScripts,s=Ca(e),c=a.get(s);c||(c=o.querySelector(wl(s)),c||(e=v({src:e,async:!0,type:"module"},t),(t=kn.get(s))&&sf(e,t),c=o.createElement("script"),Bt(c),Ft(c,"link",e),o.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},a.set(s,c))}}function Xm(e,t,o,a){var s=(s=ae.current)?Qr(s):null;if(!s)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof o.precedence=="string"&&typeof o.href=="string"?(t=Ra(o.href),o=Fi(s).hoistableStyles,a=o.get(t),a||(a={type:"style",instance:null,count:0,state:null},o.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(o.rel==="stylesheet"&&typeof o.href=="string"&&typeof o.precedence=="string"){e=Ra(o.href);var c=Fi(s).hoistableStyles,g=c.get(e);if(g||(s=s.ownerDocument||s,g={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,g),(c=s.querySelector(El(e)))&&!c._p&&(g.instance=c,g.state.loading=5),kn.has(e)||(o={rel:"preload",as:"style",href:o.href,crossOrigin:o.crossOrigin,integrity:o.integrity,media:o.media,hrefLang:o.hrefLang,referrerPolicy:o.referrerPolicy},kn.set(e,o),c||rT(s,e,o,g.state))),t&&a===null)throw Error(r(528,""));return g}if(t&&a!==null)throw Error(r(529,""));return null;case"script":return t=o.async,o=o.src,typeof o=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ca(o),o=Fi(s).hoistableScripts,a=o.get(t),a||(a={type:"script",instance:null,count:0,state:null},o.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Ra(e){return'href="'+Cn(e)+'"'}function El(e){return'link[rel="stylesheet"]['+e+"]"}function Fm(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function rT(e,t,o,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),Ft(t,"link",o),Bt(t),e.head.appendChild(t))}function Ca(e){return'[src="'+Cn(e)+'"]'}function wl(e){return"script[async]"+e}function Km(e,t,o){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+Cn(o.href)+'"]');if(a)return t.instance=a,Bt(a),a;var s=v({},o,{"data-href":o.href,"data-precedence":o.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),Bt(a),Ft(a,"style",s),Zr(a,o.precedence,e),t.instance=a;case"stylesheet":s=Ra(o.href);var c=e.querySelector(El(s));if(c)return t.state.loading|=4,t.instance=c,Bt(c),c;a=Fm(o),(s=kn.get(s))&&rf(a,s),c=(e.ownerDocument||e).createElement("link"),Bt(c);var g=c;return g._p=new Promise(function(x,_){g.onload=x,g.onerror=_}),Ft(c,"link",a),t.state.loading|=4,Zr(c,o.precedence,e),t.instance=c;case"script":return c=Ca(o.src),(s=e.querySelector(wl(c)))?(t.instance=s,Bt(s),s):(a=o,(s=kn.get(c))&&(a=v({},o),sf(a,s)),e=e.ownerDocument||e,s=e.createElement("script"),Bt(s),Ft(s,"link",a),e.head.appendChild(s),t.instance=s);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,Zr(a,o.precedence,e));return t.instance}function Zr(e,t,o){for(var a=o.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),s=a.length?a[a.length-1]:null,c=s,g=0;g<a.length;g++){var x=a[g];if(x.dataset.precedence===t)c=x;else if(c!==s)break}c?c.parentNode.insertBefore(e,c.nextSibling):(t=o.nodeType===9?o.head:o,t.insertBefore(e,t.firstChild))}function rf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function sf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Wr=null;function Qm(e,t,o){if(Wr===null){var a=new Map,s=Wr=new Map;s.set(o,a)}else s=Wr,a=s.get(o),a||(a=new Map,s.set(o,a));if(a.has(e))return a;for(a.set(e,null),o=o.getElementsByTagName(e),s=0;s<o.length;s++){var c=o[s];if(!(c[Ia]||c[qt]||e==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var g=c.getAttribute(t)||"";g=e+g;var x=a.get(g);x?x.push(c):a.set(g,[c])}}return a}function Zm(e,t,o){e=e.ownerDocument||e,e.head.insertBefore(o,t==="title"?e.querySelector("head > title"):null)}function sT(e,t,o){if(o===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Wm(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function uT(e,t,o,a){if(o.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(o.state.loading&4)===0){if(o.instance===null){var s=Ra(a.href),c=t.querySelector(El(s));if(c){t=c._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Jr.bind(e),t.then(e,e)),o.state.loading|=4,o.instance=c,Bt(c);return}c=t.ownerDocument||t,a=Fm(a),(s=kn.get(s))&&rf(a,s),c=c.createElement("link"),Bt(c);var g=c;g._p=new Promise(function(x,_){g.onload=x,g.onerror=_}),Ft(c,"link",a),o.instance=c}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(o,t),(t=o.state.preload)&&(o.state.loading&3)===0&&(e.count++,o=Jr.bind(e),t.addEventListener("load",o),t.addEventListener("error",o))}}var uf=0;function cT(e,t){return e.stylesheets&&e.count===0&&es(e,e.stylesheets),0<e.count||0<e.imgCount?function(o){var a=setTimeout(function(){if(e.stylesheets&&es(e,e.stylesheets),e.unsuspend){var c=e.unsuspend;e.unsuspend=null,c()}},6e4+t);0<e.imgBytes&&uf===0&&(uf=62500*Vx());var s=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&es(e,e.stylesheets),e.unsuspend)){var c=e.unsuspend;e.unsuspend=null,c()}},(e.imgBytes>uf?50:800)+t);return e.unsuspend=o,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(s)}}:null}function Jr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)es(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var $r=null;function es(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,$r=new Map,t.forEach(fT,e),$r=null,Jr.call(e))}function fT(e,t){if(!(t.state.loading&4)){var o=$r.get(e);if(o)var a=o.get(null);else{o=new Map,$r.set(e,o);for(var s=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<s.length;c++){var g=s[c];(g.nodeName==="LINK"||g.getAttribute("media")!=="not all")&&(o.set(g.dataset.precedence,g),a=g)}a&&o.set(null,a)}s=t.instance,g=s.getAttribute("data-precedence"),c=o.get(g)||a,c===a&&o.set(null,s),o.set(g,s),this.count++,a=Jr.bind(this),s.addEventListener("load",a),s.addEventListener("error",a),c?c.parentNode.insertBefore(s,c.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(s,e.firstChild)),t.state.loading|=4}}var Rl={$$typeof:M,Provider:null,Consumer:null,_currentValue:P,_currentValue2:P,_threadCount:0};function dT(e,t,o,a,s,c,g,x,_){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ko(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ko(0),this.hiddenUpdates=ko(null),this.identifierPrefix=a,this.onUncaughtError=s,this.onCaughtError=c,this.onRecoverableError=g,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=_,this.incompleteTransitions=new Map}function Jm(e,t,o,a,s,c,g,x,_,X,re,ce){return e=new dT(e,t,o,g,_,X,re,ce,x),t=1,c===!0&&(t|=24),c=pn(3,null,null,t),e.current=c,c.stateNode=e,t=Pu(),t.refCount++,e.pooledCache=t,t.refCount++,c.memoizedState={element:a,isDehydrated:o,cache:t},Gu(c),e}function $m(e){return e?(e=oa,e):oa}function ey(e,t,o,a,s,c){s=$m(s),a.context===null?a.context=s:a.pendingContext=s,a=Go(t),a.payload={element:o},c=c===void 0?null:c,c!==null&&(a.callback=c),o=Xo(e,a,t),o!==null&&(cn(o,e,t),ol(o,e,t))}function ty(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var o=e.retryLane;e.retryLane=o!==0&&o<t?o:t}}function cf(e,t){ty(e,t),(e=e.alternate)&&ty(e,t)}function ny(e){if(e.tag===13||e.tag===31){var t=Si(e,67108864);t!==null&&cn(t,e,67108864),cf(e,67108864)}}function oy(e){if(e.tag===13||e.tag===31){var t=bn();t=Lo(t);var o=Si(e,t);o!==null&&cn(o,e,t),cf(e,t)}}var ts=!0;function pT(e,t,o,a){var s=z.T;z.T=null;var c=q.p;try{q.p=2,ff(e,t,o,a)}finally{q.p=c,z.T=s}}function hT(e,t,o,a){var s=z.T;z.T=null;var c=q.p;try{q.p=8,ff(e,t,o,a)}finally{q.p=c,z.T=s}}function ff(e,t,o,a){if(ts){var s=df(a);if(s===null)Zc(e,t,a,ns,o),ay(e,a);else if(mT(s,e,t,o,a))a.stopPropagation();else if(ay(e,a),t&4&&-1<gT.indexOf(e)){for(;s!==null;){var c=Xi(s);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var g=xt(c.pendingLanes);if(g!==0){var x=c;for(x.pendingLanes|=2,x.entangledLanes|=2;g;){var _=1<<31-pt(g);x.entanglements[1]|=_,g&=~_}Jn(c),(at&6)===0&&(Ur=fe()+500,vl(0))}}break;case 31:case 13:x=Si(c,2),x!==null&&cn(x,c,2),Ir(),cf(c,2)}if(c=df(a),c===null&&Zc(e,t,a,ns,o),c===s)break;s=c}s!==null&&a.stopPropagation()}else Zc(e,t,a,null,o)}}function df(e){return e=pu(e),pf(e)}var ns=null;function pf(e){if(ns=null,e=Gi(e),e!==null){var t=f(e);if(t===null)e=null;else{var o=t.tag;if(o===13){if(e=d(t),e!==null)return e;e=null}else if(o===31){if(e=m(t),e!==null)return e;e=null}else if(o===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return ns=e,null}function iy(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ye()){case de:return 2;case le:return 8;case be:case Be:return 32;case Ut:return 268435456;default:return 32}default:return 32}}var hf=!1,oi=null,ii=null,ai=null,Cl=new Map,Ol=new Map,li=[],gT="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function ay(e,t){switch(e){case"focusin":case"focusout":oi=null;break;case"dragenter":case"dragleave":ii=null;break;case"mouseover":case"mouseout":ai=null;break;case"pointerover":case"pointerout":Cl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ol.delete(t.pointerId)}}function Al(e,t,o,a,s,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:o,eventSystemFlags:a,nativeEvent:c,targetContainers:[s]},t!==null&&(t=Xi(t),t!==null&&ny(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function mT(e,t,o,a,s){switch(t){case"focusin":return oi=Al(oi,e,t,o,a,s),!0;case"dragenter":return ii=Al(ii,e,t,o,a,s),!0;case"mouseover":return ai=Al(ai,e,t,o,a,s),!0;case"pointerover":var c=s.pointerId;return Cl.set(c,Al(Cl.get(c)||null,e,t,o,a,s)),!0;case"gotpointercapture":return c=s.pointerId,Ol.set(c,Al(Ol.get(c)||null,e,t,o,a,s)),!0}return!1}function ly(e){var t=Gi(e.target);if(t!==null){var o=f(t);if(o!==null){if(t=o.tag,t===13){if(t=d(o),t!==null){e.blockedOn=t,Ql(e.priority,function(){oy(o)});return}}else if(t===31){if(t=m(o),t!==null){e.blockedOn=t,Ql(e.priority,function(){oy(o)});return}}else if(t===3&&o.stateNode.current.memoizedState.isDehydrated){e.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}e.blockedOn=null}function os(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var o=df(e.nativeEvent);if(o===null){o=e.nativeEvent;var a=new o.constructor(o.type,o);du=a,o.target.dispatchEvent(a),du=null}else return t=Xi(o),t!==null&&ny(t),e.blockedOn=o,!1;t.shift()}return!0}function ry(e,t,o){os(e)&&o.delete(t)}function yT(){hf=!1,oi!==null&&os(oi)&&(oi=null),ii!==null&&os(ii)&&(ii=null),ai!==null&&os(ai)&&(ai=null),Cl.forEach(ry),Ol.forEach(ry)}function is(e,t){e.blockedOn===t&&(e.blockedOn=null,hf||(hf=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,yT)))}var as=null;function sy(e){as!==e&&(as=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){as===e&&(as=null);for(var t=0;t<e.length;t+=3){var o=e[t],a=e[t+1],s=e[t+2];if(typeof a!="function"){if(pf(a||o)===null)continue;break}var c=Xi(o);c!==null&&(e.splice(t,3),t-=3,fc(c,{pending:!0,data:s,method:o.method,action:a},a,s))}}))}function Oa(e){function t(_){return is(_,e)}oi!==null&&is(oi,e),ii!==null&&is(ii,e),ai!==null&&is(ai,e),Cl.forEach(t),Ol.forEach(t);for(var o=0;o<li.length;o++){var a=li[o];a.blockedOn===e&&(a.blockedOn=null)}for(;0<li.length&&(o=li[0],o.blockedOn===null);)ly(o),o.blockedOn===null&&li.shift();if(o=(e.ownerDocument||e).$$reactFormReplay,o!=null)for(a=0;a<o.length;a+=3){var s=o[a],c=o[a+1],g=s[on]||null;if(typeof c=="function")g||sy(o);else if(g){var x=null;if(c&&c.hasAttribute("formAction")){if(s=c,g=c[on]||null)x=g.formAction;else if(pf(s)!==null)continue}else x=g.action;typeof x=="function"?o[a+1]=x:(o.splice(a,3),a-=3),sy(o)}}}function uy(){function e(c){c.canIntercept&&c.info==="react-transition"&&c.intercept({handler:function(){return new Promise(function(g){return s=g})},focusReset:"manual",scroll:"manual"})}function t(){s!==null&&(s(),s=null),a||setTimeout(o,20)}function o(){if(!a&&!navigation.transition){var c=navigation.currentEntry;c&&c.url!=null&&navigation.navigate(c.url,{state:c.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,s=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(o,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),s!==null&&(s(),s=null)}}}function gf(e){this._internalRoot=e}ls.prototype.render=gf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var o=t.current,a=bn();ey(o,a,e,t,null,null)},ls.prototype.unmount=gf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ey(e.current,2,null,e,null,null),Ir(),t[Vi]=null}};function ls(e){this._internalRoot=e}ls.prototype.unstable_scheduleHydration=function(e){if(e){var t=Kl();e={blockedOn:null,target:e,priority:t};for(var o=0;o<li.length&&t!==0&&t<li[o].priority;o++);li.splice(o,0,e),o===0&&ly(e)}};var cy=i.version;if(cy!=="19.2.4")throw Error(r(527,cy,"19.2.4"));q.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=p(t),e=e!==null?y(e):null,e=e===null?null:e.stateNode,e};var bT={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:z,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var rs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!rs.isDisabled&&rs.supportsFiber)try{xe=rs.inject(bT),Ye=rs}catch{}}return Dl.createRoot=function(e,t){if(!u(e))throw Error(r(299));var o=!1,a="",s=yg,c=bg,g=vg;return t!=null&&(t.unstable_strictMode===!0&&(o=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(s=t.onUncaughtError),t.onCaughtError!==void 0&&(c=t.onCaughtError),t.onRecoverableError!==void 0&&(g=t.onRecoverableError)),t=Jm(e,1,!1,null,null,o,a,null,s,c,g,uy),e[Vi]=t.current,Qc(e),new gf(t)},Dl.hydrateRoot=function(e,t,o){if(!u(e))throw Error(r(299));var a=!1,s="",c=yg,g=bg,x=vg,_=null;return o!=null&&(o.unstable_strictMode===!0&&(a=!0),o.identifierPrefix!==void 0&&(s=o.identifierPrefix),o.onUncaughtError!==void 0&&(c=o.onUncaughtError),o.onCaughtError!==void 0&&(g=o.onCaughtError),o.onRecoverableError!==void 0&&(x=o.onRecoverableError),o.formState!==void 0&&(_=o.formState)),t=Jm(e,1,!0,t,o??null,a,s,_,c,g,x,uy),t.context=$m(null),o=t.current,a=bn(),a=Lo(a),s=Go(a),s.callback=null,Xo(o,s,a),o=a,t.current.lanes=o,wn(t,o),Jn(t),e[Vi]=t.current,Qc(e),new ls(t)},Dl.version="19.2.4",Dl}var Sy;function DT(){if(Sy)return bf.exports;Sy=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(i){console.error(i)}}return n(),bf.exports=MT(),bf.exports}var NT=DT();function Hb(n){var i,l,r="";if(typeof n=="string"||typeof n=="number")r+=n;else if(typeof n=="object")if(Array.isArray(n)){var u=n.length;for(i=0;i<u;i++)n[i]&&(l=Hb(n[i]))&&(r&&(r+=" "),r+=l)}else for(l in n)n[l]&&(r&&(r+=" "),r+=l);return r}function zT(){for(var n,i,l=0,r="",u=arguments.length;l<u;l++)(n=arguments[l])&&(i=Hb(n))&&(r&&(r+=" "),r+=i);return r}function zo(...n){return zT(n)}const xy={};function Jt(n,i){const l=b.useRef(xy);return l.current===xy&&(l.current=n(i)),l}const Gf=[];let Xf;function _T(){return Xf}function kT(n){Gf.push(n)}function js(n){const i=(l,r)=>{const u=Jt(jT).current;let f;try{Xf=u;for(const d of Gf)d.before(u);f=n(l,r);for(const d of Gf)d.after(u);u.didInitialize=!0}finally{Xf=void 0}return f};return i.displayName=n.displayName||n.name,i}function Lb(n){return b.forwardRef(js(n))}function jT(){return{didInitialize:!1}}function vd(){}const Mo=Object.freeze([]),Rt=Object.freeze({}),HT=()=>{},Se=typeof document<"u"?b.useLayoutEffect:HT;function LT(n,i){return function(r,...u){const f=new URL(n);return f.searchParams.set("code",r.toString()),u.forEach(d=>f.searchParams.append("args[]",d)),`${i} error #${r}; visit ${f} for the full message.`}}const Zt=LT("https://base-ui.com/production-error","Base UI"),Ub=b.createContext(void 0);function Hs(n){const i=b.useContext(Ub);if(i===void 0&&!n)throw new Error(Zt(72));return i}function Ls(n){b.useEffect(n,Mo)}const Nl=0;class vn{static create(){return new vn}currentId=Nl;start(i,l){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Nl,l()},i)}isStarted(){return this.currentId!==Nl}clear=()=>{this.currentId!==Nl&&(clearTimeout(this.currentId),this.currentId=Nl)};disposeEffect=()=>this.clear}function $t(){const n=Jt(vn.create).current;return Ls(n.disposeEffect),n}function UT(){return typeof navigator>"u"?{userAgent:"",platform:"",maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0}}const{userAgent:BT,platform:IT,maxTouchPoints:PT}=UT(),Us=BT.toLowerCase(),Bl=IT.toLowerCase(),Bs=/^i(os$|p)/.test(Bl)||Bl==="macintel"&&PT>1,Ty="android",Ff=Bl===Ty||Us.includes(Ty),Sd=!Bs&&Bl.startsWith("mac");Bl.startsWith("win");const YT=Sd||Bs,pi=typeof CSS<"u"&&!!CSS.supports?.("-webkit-backdrop-filter:none");!pi&&Us.includes("firefox");!pi&&Us.includes("chrom");const qT=YT,xd=/jsdom|happydom/.test(Us);function $n(n){n.preventDefault(),n.stopPropagation()}function VT(n){return"nativeEvent"in n}function Td(n){return n.pointerType===""&&n.isTrusted?!0:Ff&&n.pointerType?n.type==="click"&&n.buttons===1:n.detail===0&&!n.pointerType}function Ed(n){return xd?!1:!Ff&&n.width===0&&n.height===0||Ff&&n.width===1&&n.height===1&&n.pressure===0&&n.detail===0&&n.pointerType==="mouse"||n.width<1&&n.height<1&&n.pressure===0&&n.detail===0&&n.pointerType==="touch"}function ui(n,i){const l=["mouse","pen"];return i||l.push("",void 0),l.includes(n)}function GT(n){const i=n.type;return i==="click"||i==="mousedown"||i==="keydown"||i==="keyup"}function Is(){return typeof window<"u"}function Qt(n){return wd(n)?(n.nodeName||"").toLowerCase():"#document"}function yt(n){var i;return(n==null||(i=n.ownerDocument)==null?void 0:i.defaultView)||window}function _o(n){var i;return(i=(wd(n)?n.ownerDocument:n.document)||window.document)==null?void 0:i.documentElement}function wd(n){return Is()?n instanceof Node||n instanceof yt(n).Node:!1}function Je(n){return Is()?n instanceof Element||n instanceof yt(n).Element:!1}function dt(n){return Is()?n instanceof HTMLElement||n instanceof yt(n).HTMLElement:!1}function za(n){return!Is()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof yt(n).ShadowRoot}function Vl(n){const{overflow:i,overflowX:l,overflowY:r,display:u}=Sn(n);return/auto|scroll|overlay|hidden|clip/.test(i+r+l)&&u!=="inline"&&u!=="contents"}function XT(n){return/^(table|td|th)$/.test(Qt(n))}function Ps(n){try{if(n.matches(":popover-open"))return!0}catch{}try{return n.matches(":modal")}catch{return!1}}const FT=/transform|translate|scale|rotate|perspective|filter/,KT=/paint|layout|strict|content/,_i=n=>!!n&&n!=="none";let Tf;function Rd(n){const i=Je(n)?Sn(n):n;return _i(i.transform)||_i(i.translate)||_i(i.scale)||_i(i.rotate)||_i(i.perspective)||!Cd()&&(_i(i.backdropFilter)||_i(i.filter))||FT.test(i.willChange||"")||KT.test(i.contain||"")}function QT(n){let i=Do(n);for(;dt(i)&&!Ro(i);){if(Rd(i))return i;if(Ps(i))return null;i=Do(i)}return null}function Cd(){return Tf==null&&(Tf=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Tf}function Ro(n){return/^(html|body|#document)$/.test(Qt(n))}function Sn(n){return yt(n).getComputedStyle(n)}function Ys(n){return Je(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function Do(n){if(Qt(n)==="html")return n;const i=n.assignedSlot||n.parentNode||za(n)&&n.host||_o(n);return za(i)?i.host:i}function Bb(n){const i=Do(n);return Ro(i)?(n.ownerDocument||n).body:dt(i)&&Vl(i)?i:Bb(i)}function Il(n,i,l){var r;i===void 0&&(i=[]),l===void 0&&(l=!0);const u=Bb(n),f=u===((r=n.ownerDocument)==null?void 0:r.body),d=yt(u);if(f){const m=Kf(d);return i.concat(d,d.visualViewport||[],Vl(u)?u:[],m&&l?Il(m):[])}else return i.concat(u,Il(u,[],l))}function Kf(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function kt(n){let i=n.activeElement;for(;i?.shadowRoot?.activeElement!=null;)i=i.shadowRoot.activeElement;return i}function Ne(n,i){if(!n||!i)return!1;const l=i.getRootNode?.();if(n.contains(i))return!0;if(l&&za(l)){let r=i;for(;r;){if(n===r)return!0;r=r.parentNode||r.host}}return!1}function St(n){return"composedPath"in n?n.composedPath()[0]??n.target:n.target}const Qf="data-base-ui-focusable",Ib="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",qs="ArrowLeft",Vs="ArrowRight",Pb="ArrowUp",Od="ArrowDown",Yb="data-starting-style",ZT="data-ending-style",WT={[Yb]:""},JT={[ZT]:""},Gs={transitionStatus(n){return n==="starting"?WT:n==="ending"?JT:null}},$T="data-open",e1="data-closed",t1="data-anchor-hidden",qb="data-popup-open",n1="data-pressed",o1={[qb]:""},i1={[qb]:"",[n1]:""},a1={[$T]:""},l1={[e1]:""},r1={[t1]:""},s1={open(n){return n?o1:null}},Ey={open(n){return n?i1:null}},Ad={open(n){return n?a1:l1},anchorHidden(n){return n?r1:null}},Md={...Ad,...Gs},Zf="data-trigger-disabled";function Es(n,i){if(!Je(n))return!1;const l=n;if(i.hasElement(l))return!l.hasAttribute(Zf);for(const[,r]of i.entries())if(Ne(r,l))return!r.hasAttribute(Zf);return!1}function Ef(n,i){if(i==null)return!1;if("composedPath"in n)return n.composedPath().includes(i);const l=n;return l.target!=null&&i.contains(l.target)}function u1(n){return n.matches("html,body")}function Xs(n){return dt(n)&&n.matches(Ib)}function c1(n){return n?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${Ib}`)!=null}function Wf(n){return n?n.getAttribute("role")==="combobox"&&Xs(n):!1}function ws(n){if(!n||xd)return!0;try{return n.matches(":focus-visible")}catch{return!0}}function Jf(n){return n?n.hasAttribute(Qf)?n:n.querySelector(`[${Qf}]`)||n:null}function f1(n,i){return i!=null&&!ui(i)?0:typeof n=="function"?n():n}function ji(n,i,l){const r=f1(n,l);return typeof r=="number"?r:r?.[i]}function wy(n){return typeof n=="function"?n():n}function Vb(n,i){return i||n==="click"||n==="mousedown"}function d1(n){return n?.includes("mouse")&&n!=="mousedown"}const Fs="none",ja="trigger-press",Lt="trigger-hover",Aa="trigger-focus",Dd="outside-press",Gb="item-press",p1="close-press",_a="focus-out",Ks="escape-key",$f="list-navigation",h1="cancel-open",jl="sibling-open",Xb="disabled",Ry="missing",Cy="initial",Nd="imperative-action";function Ke(n,i,l,r){let u=!1,f=!1;const d=r??Rt;return{reason:n,event:i??new Event("base-ui"),cancel(){u=!0},allowPropagation(){f=!0},get isCanceled(){return u},get isPropagationAllowed(){return f},trigger:l,...d}}const Fb=b.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new vn,currentIdRef:{current:null},currentContextRef:{current:null}});function g1(n,i){n.current=i.current}function m1(n){const{children:i,delay:l,timeoutMs:r=0}=n,u=b.useRef(l),f=b.useRef(l),d=b.useRef(null),m=b.useRef(null),h=$t();return Se(()=>{if(f.current=l,!d.current){u.current=l;return}u.current={open:ji(u.current,"open"),close:ji(l,"close")}},[l,d,u,f]),E.jsx(Fb.Provider,{value:b.useMemo(()=>({hasProvider:!0,delayRef:u,initialDelayRef:f,currentIdRef:d,timeoutMs:r,currentContextRef:m,timeout:h}),[r,h]),children:i})}function y1(n,i={open:!1}){const{open:l}=i,r="rootStore"in n?n.rootStore:n,u=r.useState("floatingId"),f=b.useContext(Fb),{currentIdRef:d,delayRef:m,timeoutMs:h,initialDelayRef:p,currentContextRef:y,hasProvider:v,timeout:S}=f,[w,T]=b.useState(!1),C=b.useRef(l);return Se(()=>{C.current=l},[l]),Se(()=>{function O(){y.current?.setIsInstantPhase(!1),d.current=null,y.current=null,m.current=p.current,S.clear()}if(d.current&&!l&&d.current===u){if(T(!1),h){const A=u;return S.start(h,()=>{r.select("open")||d.current&&d.current!==A||O()}),()=>{(C.current||d.current!==A)&&S.clear()}}O()}},[l,u,d,m,h,p,y,S,r]),Se(()=>{if(!l)return;const O=y.current,A=d.current;S.clear(),y.current={onOpenChange:r.setOpen,setIsInstantPhase:T},d.current=u,m.current={open:0,close:ji(p.current,"close")},A!==null&&A!==u?(T(!0),O?.setIsInstantPhase(!0),O?.onOpenChange(!1,Ke(Fs))):(T(!1),O?.setIsInstantPhase(!1))},[l,u,r,d,m,p,y,S]),Se(()=>()=>{if(d.current===u){if(y.current=null,!C.current)return;d.current=null,g1(m,p),S.clear()}},[y,d,m,u,p,S]),b.useMemo(()=>({activeIdRef:d,hasProvider:v,delayRef:m,isInstantPhase:w}),[d,v,m,w])}function Pe(n,i,l,r){return n.addEventListener(i,l,r),()=>{n.removeEventListener(i,l,r)}}function Gn(...n){return()=>{for(let i=0;i<n.length;i+=1){const l=n[i];l&&l()}}}function Hi(n,i,l,r){const u=Jt(Kb).current;return v1(u,n,i,l,r)&&Qb(u,[n,i,l,r]),u.callback}function b1(n){const i=Jt(Kb).current;return S1(i,n)&&Qb(i,n),i.callback}function Kb(){return{callback:null,cleanup:null,refs:[]}}function v1(n,i,l,r,u){return n.refs[0]!==i||n.refs[1]!==l||n.refs[2]!==r||n.refs[3]!==u}function S1(n,i){return n.refs.length!==i.length||n.refs.some((l,r)=>l!==i[r])}function Qb(n,i){if(n.refs=i,i.every(l=>l==null)){n.callback=null;return}n.callback=l=>{if(n.cleanup&&(n.cleanup(),n.cleanup=null),l!=null){const r=Array(i.length).fill(null);for(let u=0;u<i.length;u+=1){const f=i[u];if(f!=null)switch(typeof f){case"function":{const d=f(l);typeof d=="function"&&(r[u]=d);break}case"object":{f.current=l;break}}}n.cleanup=()=>{for(let u=0;u<i.length;u+=1){const f=i[u];if(f!=null)switch(typeof f){case"function":{const d=r[u];typeof d=="function"?d():f(null);break}case"object":{f.current=null;break}}}}}}}function jt(n){const i=Jt(x1,n).current;return i.next=n,Se(i.effect),i}function x1(n){const i={current:n,next:n,effect:()=>{i.current=i.next}};return i}const zd={...RT},wf=zd.useInsertionEffect,T1=wf&&wf!==zd.useLayoutEffect?wf:n=>n();function Oe(n){const i=Jt(E1).current;return i.next=n,T1(i.effect),i.trampoline}function E1(){const n={next:void 0,callback:w1,trampoline:(...i)=>n.callback?.(...i),effect:()=>{n.callback=n.next}};return n}function w1(){}const ss=null;class R1{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=i=>{this.isScheduled=!1;const l=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let u=0;u<l.length;u+=1)l[u]?.(i)};request(i){const l=this.nextId;return this.nextId+=1,this.callbacks.push(i),this.callbacksCount+=1,!this.isScheduled&&(requestAnimationFrame(this.tick),this.isScheduled=!0),l}cancel(i){const l=i-this.startId;l<0||l>=this.callbacks.length||this.callbacks[l]!==null&&(this.callbacks[l]=null,this.callbacksCount-=1)}}let us=new R1;class eo{static create(){return new eo}static request(i){return us.request(i)}static cancel(i){return us.cancel(i)}currentId=ss;request(i){this.cancel(),this.currentId=us.request(()=>{this.currentId=ss,i()})}cancel=()=>{this.currentId!==ss&&(us.cancel(this.currentId),this.currentId=ss)};disposeEffect=()=>this.cancel}function Pl(){const n=Jt(eo.create).current;return Ls(n.disposeEffect),n}function Fe(n){return n?.ownerDocument||document}const C1={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},Zb={...C1,position:"fixed",top:0,left:0},Li=b.forwardRef(function(i,l){const[r,u]=b.useState();Se(()=>{qT&&pi&&u("button")},[]);const f={tabIndex:0,role:r};return E.jsx("span",{...i,ref:l,style:Zb,"aria-hidden":r?void 0:!0,...f,"data-base-ui-focus-guard":""})}),ka=Math.min,Co=Math.max,Rs=Math.round,cs=Math.floor,Oo=n=>({x:n,y:n}),O1={left:"right",right:"left",bottom:"top",top:"bottom"};function Wb(n,i,l){return Co(n,ka(i,l))}function fi(n,i){return typeof n=="function"?n(i):n}function Hn(n){return n.split("-")[0]}function No(n){return n.split("-")[1]}function _d(n){return n==="x"?"y":"x"}function kd(n){return n==="y"?"height":"width"}function jn(n){const i=n[0];return i==="t"||i==="b"?"y":"x"}function jd(n){return _d(jn(n))}function A1(n,i,l){l===void 0&&(l=!1);const r=No(n),u=jd(n),f=kd(u);let d=u==="x"?r===(l?"end":"start")?"right":"left":r==="start"?"bottom":"top";return i.reference[f]>i.floating[f]&&(d=Cs(d)),[d,Cs(d)]}function M1(n){const i=Cs(n);return[ed(n),i,ed(i)]}function ed(n){return n.includes("start")?n.replace("start","end"):n.replace("end","start")}const Oy=["left","right"],Ay=["right","left"],D1=["top","bottom"],N1=["bottom","top"];function z1(n,i,l){switch(n){case"top":case"bottom":return l?i?Ay:Oy:i?Oy:Ay;case"left":case"right":return i?D1:N1;default:return[]}}function _1(n,i,l,r){const u=No(n);let f=z1(Hn(n),l==="start",r);return u&&(f=f.map(d=>d+"-"+u),i&&(f=f.concat(f.map(ed)))),f}function Cs(n){const i=Hn(n);return O1[i]+n.slice(i.length)}function k1(n){var i,l,r,u;return{top:(i=n.top)!=null?i:0,right:(l=n.right)!=null?l:0,bottom:(r=n.bottom)!=null?r:0,left:(u=n.left)!=null?u:0}}function Jb(n){return typeof n!="number"?k1(n):{top:n,right:n,bottom:n,left:n}}function Os(n){const{x:i,y:l,width:r,height:u}=n;return{width:r,height:u,top:l,left:i,right:i+r,bottom:l+u,x:i,y:l}}function Ll(n,i){return i<0||i>=n.length}function vs(n,i){return wo(n.current,{disabledIndices:i})}function td(n,i){return wo(n.current,{decrement:!0,startingIndex:n.current.length,disabledIndices:i})}function wo(n,{startingIndex:i=-1,decrement:l=!1,disabledIndices:r,amount:u=1}={}){let f=i;do f+=l?-u:u;while(f>=0&&f<=n.length-1&&Ma(n,f,r));return f}function Ma(n,i,l){if(typeof l=="function"?l(i):l?.includes(i)??!1)return!0;const u=n[i];return u?!Qs(u)||u.matches(":disabled")?!0:!l&&(u.hasAttribute("disabled")||u.getAttribute("aria-disabled")==="true"):!1}function j1(n){return n.visibility==="hidden"||n.visibility==="collapse"}function Qs(n,i=n?Sn(n):null){return!n||!n.isConnected||!i||j1(i)?!1:typeof n.checkVisibility=="function"?n.checkVisibility():i.display!=="none"&&i.display!=="contents"}const H1='a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';function L1(n){const i=n.assignedSlot;if(i)return i;if(n.parentElement)return n.parentElement;const l=n.getRootNode();return za(l)?l.host:null}function nd(n){for(const i of Array.from(n.children))if(Qt(i)==="summary")return i;return null}function U1(n,i){const l=nd(i);return!!l&&(n===l||Ne(l,n))}function $b(n){const i=n?Qt(n):"";return n!=null&&n.matches(H1)&&(i!=="summary"||n.parentElement!=null&&Qt(n.parentElement)==="details"&&nd(n.parentElement)===n)&&(i!=="details"||nd(n)==null)&&(i!=="input"||n.type!=="hidden")}function ev(n){if(!$b(n)||!n.isConnected||n.matches(":disabled"))return!1;for(let i=n;i;i=L1(i)){const l=i!==n,r=Qt(i)==="slot";if(i.hasAttribute("inert")||l&&Qt(i)==="details"&&!i.open&&!U1(n,i)||i.hasAttribute("hidden")||!r&&!B1(i,l))return!1}return!0}function B1(n,i){const l=Sn(n);return i?l.display!=="none":Qs(n,l)}function tv(n){const i=n.tabIndex;if(i<0){const l=Qt(n);if(l==="details"||l==="audio"||l==="video"||dt(n)&&n.isContentEditable)return 0}return i}function Rf(n){if(Qt(n)!=="input")return null;const i=n;return i.type==="radio"&&i.name!==""?i:null}function I1(n,i){const l=Rf(n);if(!l)return!0;const r=i.find(u=>{const f=Rf(u);return f?.name===l.name&&f.form===l.form&&f.checked});return r?r===l:i.find(u=>{const f=Rf(u);return f?.name===l.name&&f.form===l.form})===l}function nv(n){if(dt(n)&&Qt(n)==="slot"){const i=n.assignedElements({flatten:!0});if(i.length>0)return i}return dt(n)&&n.shadowRoot?Array.from(n.shadowRoot.children):Array.from(n.children)}function ov(n,i){nv(n).forEach(l=>{$b(l)&&i.push(l),ov(l,i)})}function iv(n,i,l){nv(n).forEach(r=>{dt(r)&&r.matches(i)&&l.push(r),iv(r,i,l)})}function Hd(n){return ev(n)&&tv(n)>=0}function av(n){const i=[];return ov(n,i),i.filter(ev)}function Gl(n){const i=av(n);return i.filter(l=>tv(l)>=0&&I1(l,i))}function lv(n,i){const l=Gl(n),r=l.length;if(r===0)return;const u=kt(Fe(n)),f=l.indexOf(u),d=f===-1?i===1?0:r-1:f+i;return l[d]}function Ld(n){return lv(Fe(n).body,1)||n}function rv(n){return lv(Fe(n).body,-1)||n}function sv(n,i){if(!n)return null;const l=Gl(Fe(n).body),r=l.length;if(r===0)return null;const u=l.indexOf(n);if(u===-1)return null;const f=(u+i+r)%r;return l[f]}function P1(n){return sv(n,1)}function Y1(n){return sv(n,-1)}function Da(n,i){const l=i||n.currentTarget,r=n.relatedTarget;return!r||!Ne(l,r)}function q1(n){Gl(n).forEach(l=>{l.dataset.tabindex=l.getAttribute("tabindex")||"",l.setAttribute("tabindex","-1")})}function My(n){const i=[];iv(n,"[data-tabindex]",i),i.forEach(l=>{const r=l.dataset.tabindex;delete l.dataset.tabindex,r?l.setAttribute("tabindex",r):l.removeAttribute("tabindex")})}function di(n,i,l=!0){return n.filter(u=>u.parentId===i).flatMap(u=>[...!l||u.context?.open?[u]:[],...di(n,u.id,l)])}function Dy(n,i){let l=[],r=n.find(u=>u.id===i)?.parentId;for(;r;){const u=n.find(f=>f.id===r);r=u?.parentId,u&&(l=l.concat(u))}return l}function Yl(n){return`data-base-ui-${n}`}let fs=0;function Ss(n,i={}){const{preventScroll:l=!1,sync:r=!1,shouldFocus:u}=i;cancelAnimationFrame(fs);function f(){u&&!u()||n?.focus({preventScroll:l})}if(r)return f(),vd;const d=requestAnimationFrame(f);return fs=d,()=>{fs===d&&(cancelAnimationFrame(d),fs=0)}}const Cf={inert:new WeakMap,"aria-hidden":new WeakMap},Ny="data-base-ui-inert",od={inert:new WeakSet,"aria-hidden":new WeakSet};let zl=new WeakMap,Of=0;function V1(n){return od[n]}function uv(n){return n?za(n)?n.host:uv(n.parentNode):null}const zy=(n,i)=>i.map(l=>{if(n.contains(l))return l;const r=uv(l);return n.contains(r)?r:null}).filter(l=>l!=null),_y=n=>{const i=new Set;return n.forEach(l=>{let r=l;for(;r&&!i.has(r);)i.add(r),r=r.parentNode}),i},ky=(n,i,l)=>{const r=[],u=f=>{!f||l.has(f)||Array.from(f.children).forEach(d=>{Qt(d)!=="script"&&(i.has(d)?u(d):r.push(d))})};return u(n),r};function G1(n,i,l,r,{mark:u=!0}){let f=null;r?f="inert":l&&(f="aria-hidden");let d=null,m=null;const h=zy(i,n),p=u?ky(i,_y(h),new Set(h)):[],y=[],v=[];if(f){const S=Cf[f],w=V1(f);m=w,d=S;const T=zy(i,Array.from(i.querySelectorAll("[aria-live]"))),C=h.concat(T);ky(i,_y(C),new Set(C)).forEach(A=>{const N=A.getAttribute(f),M=N!==null&&N!=="false",D=(S.get(A)||0)+1;S.set(A,D),y.push(A),D===1&&M&&w.add(A),M||A.setAttribute(f,f==="inert"?"":"true")})}return u&&p.forEach(S=>{const w=(zl.get(S)||0)+1;zl.set(S,w),v.push(S),w===1&&S.setAttribute(Ny,"")}),Of+=1,()=>{d&&y.forEach(S=>{const T=(d.get(S)||0)-1;d.set(S,T),T||(!m?.has(S)&&f&&S.removeAttribute(f),m?.delete(S))}),u&&v.forEach(S=>{const w=(zl.get(S)||0)-1;zl.set(S,w),w||S.removeAttribute(Ny)}),Of-=1,Of||(Cf.inert=new WeakMap,Cf["aria-hidden"]=new WeakMap,od.inert=new WeakSet,od["aria-hidden"]=new WeakSet,zl=new WeakMap)}}function jy(n,i={}){const{ariaHidden:l=!1,inert:r=!1,mark:u=!0}=i,f=Fe(n[0]).body;return G1(n,f,l,r,{mark:u})}var Xn=jb();let Hy=0;function X1(n,i="mui"){const[l,r]=b.useState(n),u=n||l;return b.useEffect(()=>{l==null&&(Hy+=1,r(`${i}-${Hy}`))},[l,i]),u}const Ly=zd.useId;function Ui(n,i){if(Ly!==void 0){const l=Ly();return n??(i?`${i}-${l}`:l)}return X1(n,i)}const F1=parseInt(b.version,10);function Ud(n){return F1>=n}function Uy(n){if(!b.isValidElement(n))return null;const i=n,l=i.props;return(Ud(19)?l?.ref:i.ref)??null}function id(n,i){if(n&&!i)return n;if(!n&&i)return i;if(n||i)return{...n,...i}}function K1(n,i){const l={};for(const r in n){const u=n[r];if(i?.hasOwnProperty(r)){const f=i[r](u);f!=null&&Object.assign(l,f);continue}u===!0?l[`data-${r.toLowerCase()}`]="":u&&(l[`data-${r.toLowerCase()}`]=u.toString())}return l}function Q1(n,i){return typeof n=="function"?n(i):n}function Z1(n,i){return typeof n=="function"?n(i):n}const Bd={};function Ao(n,i,l,r,u){if(!l&&!r&&!u&&!n)return As(i);let f=As(n);return i&&(f=Hl(f,i)),l&&(f=Hl(f,l)),r&&(f=Hl(f,r)),u&&(f=Hl(f,u)),f}function W1(n){if(n.length===0)return Bd;if(n.length===1)return As(n[0]);let i=As(n[0]);for(let l=1;l<n.length;l+=1)i=Hl(i,n[l]);return i}function As(n){return Id(n)?{...fv(n,Bd)}:J1(n)}function Hl(n,i){return Id(i)?fv(i,n):$1(n,i)}function J1(n){const i={...n};for(const l in i){const r=i[l];cv(l,r)&&(i[l]=dv(r))}return i}function $1(n,i){if(!i)return n;for(const l in i){const r=i[l];switch(l){case"style":{n[l]=id(n.style,r);break}case"className":{n[l]=pv(n.className,r);break}default:cv(l,r)?n[l]=eE(n[l],r):n[l]=r}}return n}function cv(n,i){const l=n.charCodeAt(0),r=n.charCodeAt(1),u=n.charCodeAt(2);return l===111&&r===110&&u>=65&&u<=90&&(typeof i=="function"||typeof i>"u")}function Id(n){return typeof n=="function"}function fv(n,i){return Id(n)?n(i):n??Bd}function eE(n,i){return i?n?(...l)=>{const r=l[0];if(hv(r)){const f=r;Ms(f);const d=i(...l);return f.baseUIHandlerPrevented||n?.(...l),d}const u=i(...l);return n?.(...l),u}:dv(i):n}function dv(n){return n&&((...i)=>{const l=i[0];return hv(l)&&Ms(l),n(...i)})}function Ms(n){return n.preventBaseUIHandler=()=>{n.baseUIHandlerPrevented=!0},n}function pv(n,i){return i?n?i+" "+n:i:n}function hv(n){return n!=null&&typeof n=="object"&&"nativeEvent"in n}function bt(n,i,l={}){let r=i.render;l.enabled!==!1&&(r=iE(r));const u=tE(i,l,r);if(l.enabled===!1)return null;const f=l.state??Rt;return aE(n,r,u,f)}function tE(n,i,l){const{className:r,style:u}=n,{state:f=Rt,ref:d,props:m,stateAttributesMapping:h,enabled:p=!0}=i,y=p?Q1(r,f):void 0,v=p?Z1(u,f):void 0,S=p?K1(f,h):Rt,w=p&&m?nE(m):void 0,T=p?id(S,w)??{}:Rt;return typeof document<"u"&&(p?Array.isArray(d)?T.ref=b1([T.ref,Uy(l),...d]):T.ref=Hi(T.ref,Uy(l),d):Hi(null,null)),p?(y!==void 0&&(T.className=pv(T.className,y)),v!==void 0&&(T.style=id(T.style,v)),T):Rt}function nE(n){return Array.isArray(n)?W1(n):Ao(void 0,n)}const oE=Symbol.for("react.lazy");function iE(n){if(n?.$$typeof!==oE)return n;const i=b.Children.toArray(n)[0];return b.isValidElement(i)?i:n}function aE(n,i,l,r){if(i){if(typeof i=="function")return i(l,r);const u=Ao(l,i.props);return u.ref=l.ref,b.cloneElement(i,u)}if(n&&typeof n=="string")return lE(n,l);throw new Error(Zt(8))}function lE(n,i){return n==="button"?b.createElement("button",{type:"button",...i,key:i.key}):n==="img"?b.createElement("img",{alt:"",...i,key:i.key}):b.createElement(n,i)}const rE=500,sE=500,uE={style:{transition:"none"}},cE="data-base-ui-click-trigger",fE="data-base-ui-swipe-ignore",dE="data-swipe-ignore",pE=`[${fE}]`,hE=`[${dE}]`,gE={fallbackAxisSide:"none"},gv={fallbackAxisSide:"end"},mE={clipPath:"inset(50%)",position:"fixed",top:0,left:0},mv=b.createContext(null),yv=()=>b.useContext(mv),yE=Yl("portal");function bv(n={}){const{ref:i,container:l,componentProps:r=Rt,elementProps:u}=n,f=Ui(),m=yv()?.portalNode,[h,p]=b.useState(null),[y,v]=b.useState(null),S=Oe(O=>{O!==null&&v(O)}),w=b.useRef(null);Se(()=>{if(l===null){w.current&&(w.current=null,v(null),p(null));return}const O=(l&&(wd(l)?l:l.current))??m??document.body;if(O==null){w.current&&(w.current=null,v(null),p(null));return}w.current!==O&&(w.current=O,v(null),p(O))},[l,m]);const T=bt("div",r,{ref:[i,S],props:[{id:f,[yE]:""},u]}),C=h&&T?Xn.createPortal(T,h):null;return{node:y,nodeId:b.isValidElement(T)?T.props.id:void 0,subtree:C}}const vv=b.forwardRef(function(i,l){const{render:r,className:u,style:f,children:d,container:m,portalOwnerRole:h,...p}=i,{node:y,nodeId:v,subtree:S}=bv({container:m,ref:l,componentProps:i,elementProps:p}),w=b.useRef(null),T=b.useRef(null),C=b.useRef(null),O=b.useRef(null),[A,N]=b.useState(null),M=b.useRef(!1),D=A?.modal,k=A?.open,L=!!A&&!A.modal&&A.open&&!!y;b.useEffect(()=>{if(!y||D)return;function H(J){y&&J.relatedTarget&&Da(J)&&(J.type==="focusin"?M.current&&(My(y),M.current=!1):(q1(y),M.current=!0))}return Gn(Pe(y,"focusin",H,!0),Pe(y,"focusout",H,!0))},[y,D]),Se(()=>{!y||k!==!0||!M.current||(My(y),M.current=!1)},[k,y]);const j=b.useMemo(()=>({beforeOutsideRef:w,afterOutsideRef:T,beforeInsideRef:C,afterInsideRef:O,portalNode:y,setFocusManagerState:N}),[y]);return E.jsxs(b.Fragment,{children:[S,E.jsxs(mv.Provider,{value:j,children:[L&&y&&E.jsx(Li,{"data-type":"outside",ref:w,onFocus:H=>{if(Da(H,y))C.current?.focus();else{const J=A?A.domReference:null;rv(J)?.focus()}}}),L&&y&&E.jsx("span",{role:h,"aria-owns":v,style:mE}),y&&Xn.createPortal(d,y),L&&y&&E.jsx(Li,{"data-type":"outside",ref:T,onFocus:H=>{if(Da(H,y))O.current?.focus();else{const J=A?A.domReference:null;Ld(J)?.focus(),A?.closeOnFocusOut&&A?.onOpenChange(!1,Ke(_a,H.nativeEvent))}}})]})]})});function Sv(){const n=new Map;return{emit(i,l){n.get(i)?.forEach(r=>r(l))},on(i,l){n.has(i)||n.set(i,new Set),n.get(i).add(l)},off(i,l){n.get(i)?.delete(l)}}}class Pd{nodesRef={current:[]};events=Sv();addNode(i){this.nodesRef.current.push(i)}removeNode(i){const l=this.nodesRef.current.findIndex(r=>r===i);l!==-1&&this.nodesRef.current.splice(l,1)}}const xv=b.createContext(null),Tv=b.createContext(null),Ii=()=>b.useContext(xv)?.id||null,hi=n=>{const i=b.useContext(Tv);return n??i};function Ev(n){const i=Ui(),l=hi(n),r=Ii();return Se(()=>{if(!i)return;const u={id:i,parentId:r};return l?.addNode(u),()=>{l?.removeNode(u)}},[l,i,r]),i}function bE(n){const{children:i,id:l}=n,r=Ii();return E.jsx(xv.Provider,{value:b.useMemo(()=>({id:l,parentId:r}),[l,r]),children:i})}function vE(n){const{children:i,externalTree:l}=n,r=Jt(()=>l??new Pd).current;return E.jsx(Tv.Provider,{value:r,children:i})}function xo(n){return n==null?n:"current"in n?n.current:n}function SE(n,i){const l=yt(St(n));return n instanceof l.KeyboardEvent?"keyboard":n instanceof l.FocusEvent?i||"keyboard":"pointerType"in n?n.pointerType||"keyboard":"touches"in n?"touch":n instanceof l.MouseEvent?i||(n.detail===0?"keyboard":"mouse"):""}const By=20;let si=[];function Yd(){si=si.filter(n=>n.deref()?.isConnected)}function Iy(n){Yd(),n&&Qt(n)!=="body"&&(si.push(new WeakRef(n)),si.length>By&&(si=si.slice(-By)))}function Py(){return Yd(),si[si.length-1]?.deref()}function xE(n){return n?Hd(n)?n:Gl(n)[0]||n:null}function Yy(n){if(n.hasAttribute("tabindex")&&!n.hasAttribute("data-tabindex")||!n.getAttribute("role")?.includes("dialog"))return;const l=av(n).filter(u=>{const f=u.getAttribute("data-tabindex")||"";return Hd(u)||u.hasAttribute("data-tabindex")&&!f.startsWith("-")}),r=n.getAttribute("tabindex");l.length===0?r!=="0"&&(n.setAttribute("tabindex","0"),n.setAttribute("data-tabindex","0")):(r!=="-1"||n.hasAttribute("data-tabindex")&&n.getAttribute("data-tabindex")!=="-1")&&(n.setAttribute("tabindex","-1"),n.setAttribute("data-tabindex","-1"))}function wv(n){const{context:i,children:l,disabled:r=!1,initialFocus:u=!0,returnFocus:f=!0,restoreFocus:d=!1,modal:m=!0,closeOnFocusOut:h=!0,openInteractionType:p="",nextFocusableElement:y,previousFocusableElement:v,beforeContentFocusGuardRef:S,externalTree:w,getInsideElements:T}=n,C="rootStore"in i?i.rootStore:i,O=C.useState("open"),A=C.useState("domReferenceElement"),N=C.useState("floatingElement"),{events:M,dataRef:D}=C.context,k=Oe(()=>D.current.floatingContext?.nodeId),L=u===!1,j=Wf(A)&&L,H=jt(u),J=jt(f),$=jt(p),Q=jt(O),I=hi(w),ee=yv(),ie=b.useRef(!1),F=b.useRef(!1),z=b.useRef(!1),q=b.useRef(null),P=b.useRef(""),K=b.useRef(""),ne=b.useRef(null),R=b.useRef(null),B=Hi(ne,S,ee?.beforeInsideRef),W=Hi(R,ee?.afterInsideRef),V=$t(),oe=$t(),ae=Pl(),ge=ee!=null,ue=Jf(N),pe=Oe((ve=ue)=>ve?Gl(ve):[]),Re=Oe(()=>T?.().filter(ve=>ve!=null)??[]);b.useEffect(()=>{if(r||!m)return;function ve(je){je.key==="Tab"&&Ne(ue,kt(Fe(ue)))&&pe().length===0&&!j&&$n(je)}const me=Fe(ue);return Pe(me,"keydown",ve)},[r,ue,m,j,pe]),b.useEffect(()=>{if(r||!O)return;const ve=Fe(ue);function me(){z.current=!1}function je(Ve){const Te=St(Ve),Ue=Re(),Ee=Ne(N,Te)||Ne(A,Te)||Ne(ee?.portalNode,Te)||Ue.some(we=>we===Te||Ne(we,Te));z.current=!Ee,K.current=Ve.pointerType||"keyboard",Te?.closest(`[${cE}]`)&&(F.current=!0,oe.start(0,()=>{F.current=!1}))}function Le(){K.current="keyboard"}return Gn(Pe(ve,"pointerdown",je,!0),Pe(ve,"pointerup",me,!0),Pe(ve,"pointercancel",me,!0),Pe(ve,"keydown",Le,!0),me)},[r,N,A,ue,O,ee,oe,Re]),b.useEffect(()=>{if(r||!h)return;const ve=Fe(ue);function me(){F.current=!0,oe.start(0,()=>{F.current=!1})}function je(Ue){const Ee=St(Ue);Hd(Ee)&&(q.current=Ee)}function Le(Ue){const Ee=Ue.relatedTarget,we=Ue.currentTarget,Ae=St(Ue);m&&Ee==null&&Ae!=null&&Ne(N,Ae)&&Iy(Ae),queueMicrotask(()=>{const Qe=k(),Me=C.context.triggerElements,fe=Re(),ye=Ee?.hasAttribute(Yl("focus-guard"))&&[ne.current,R.current,ee?.beforeInsideRef.current,ee?.afterInsideRef.current,ee?.beforeOutsideRef.current,ee?.afterOutsideRef.current,xo(v),xo(y)].includes(Ee),de=!(Ne(A,Ee)||Ne(N,Ee)||Ne(Ee,N)||Ne(ee?.portalNode,Ee)||fe.some(le=>le===Ee||Ne(le,Ee))||Me.hasMatchingElement(le=>Ne(le,Ee))||ye||I&&(di(I.nodesRef.current,Qe).find(le=>Ne(le.context?.elements.floating,Ee)||Ne(le.context?.elements.domReference,Ee))||Dy(I.nodesRef.current,Qe).find(le=>[le.context?.elements.floating,Jf(le.context?.elements.floating)].includes(Ee)||le.context?.elements.domReference===Ee)));if(we===A&&ue&&Yy(ue),d&&we!==A&&!Qs(Ae)&&kt(ve)===ve.body){if(dt(ue)&&(ue.focus(),d==="popup")){ae.request(()=>{ue.focus()});return}const le=pe(),be=q.current,Be=(be&&le.includes(be)?be:null)||le[le.length-1]||ue;dt(Be)&&Be.focus()}if(D.current.insideReactTree){D.current.insideReactTree=!1;return}(j||!m)&&Ee&&de&&!F.current&&(j||Ee!==Py())&&(ie.current=!0,C.setOpen(!1,Ke(_a,Ue)))})}function Ve(){z.current||(D.current.insideReactTree=!0,V.start(0,()=>{D.current.insideReactTree=!1}))}const Te=dt(A)?A:null;if(!(!N&&!Te))return Gn(Te&&Pe(Te,"focusout",Le),Te&&Pe(Te,"pointerdown",me),N&&Pe(N,"focusin",je),N&&Pe(N,"focusout",Le),N&&ee&&Pe(N,"focusout",Ve,!0))},[r,A,N,ue,m,I,ee,C,h,d,pe,j,k,D,V,oe,ae,y,v,Re]),b.useEffect(()=>{if(r||!N||!O)return;const ve=Array.from(ee?.portalNode?.querySelectorAll(`[${Yl("portal")}]`)||[]),je=(I?Dy(I.nodesRef.current,k()):[]).find(we=>Wf(we.context?.elements.domReference||null))?.context?.elements.domReference,Ve=[...[N,...ve,ne.current,R.current,ee?.beforeOutsideRef.current,ee?.afterOutsideRef.current,...Re()],je,xo(v),xo(y),j?A:null].filter(we=>we!=null),Te=jy(Ve,{ariaHidden:m||j,mark:!1}),Ue=[N,...ve].filter(we=>we!=null),Ee=jy(Ue);return()=>{Ee(),Te()}},[O,r,A,N,m,ee,j,I,k,y,v,Re]),Se(()=>{if(!O||r||!dt(ue))return;P.current="",K.current="";const ve=Fe(ue),me=kt(ve);queueMicrotask(()=>{const je=H.current,Le=typeof je=="function"?je($.current||""):je;if(Le===void 0||Le===!1||Ne(ue,me))return;let Te=null;const Ue=()=>(Te==null&&(Te=pe(ue)),Te[0]||ue);let Ee;Le===!0||Le===null?Ee=Ue():Ee=xo(Le),Ee=Ee||Ue();const we=Ne(ue,kt(ve));Ss(Ee,{preventScroll:Ee===ue,shouldFocus(){if(!Q.current)return!1;if(we)return!0;const Ae=kt(ve);return!(Ae!==Ee&&Ne(ue,Ae))}})})},[r,O,ue,pe,H,$,Q]),Se(()=>{if(r||!ue)return;const ve=Fe(ue),me=kt(ve),je=$.current==null;Iy(me);function Le(Te){if(Te.open||(P.current=SE(Te.nativeEvent,K.current)),Te.reason===Lt&&Te.nativeEvent.type==="mouseleave"&&(ie.current=!0),Te.reason===Dd)if(Te.nested)ie.current=!1;else if(Td(Te.nativeEvent)||Ed(Te.nativeEvent))ie.current=!1;else{let Ue=!1;Fe(ue).createElement("div").focus({get preventScroll(){return Ue=!0,!1}}),Ue?ie.current=!1:ie.current=!0}}M.on("openchange",Le);function Ve(Te){const Ue=J.current;let Ee=typeof Ue=="function"?Ue(Te):Ue;if(Ee===void 0||Ee===!1)return null;Ee===null&&(Ee=!0);const we=A?.isConnected?A:null,Ae=me?.isConnected&&Qt(me)!=="body"?me:null;let Qe=je?Ae||we:we||Ae;return Qe||(Qe=Py()||null),typeof Ee=="boolean"?Qe:xo(Ee)||Qe||null}return()=>{M.off("openchange",Le);const Te=kt(ve),Ue=Re(),Ee=Ne(N,Te)||Ue.some(Me=>Me===Te||Ne(Me,Te))||I&&di(I.nodesRef.current,k(),!1).some(Me=>Ne(Me.context?.elements.floating,Te)),we=J.current,Ae=P.current,Qe=Ve(Ae);queueMicrotask(()=>{const Me=xE(Qe),fe=typeof we!="boolean";if(we&&!ie.current&&dt(Me)&&(!(!fe&&Me!==Te&&Te!==ve.body)||Ee)){const ye={preventScroll:!0};Ae==="keyboard"&&(ye.focusVisible=!0),Me.focus(ye)}ie.current=!1})}},[r,N,ue,J,$,M,I,A,k,Re]),Se(()=>{if(!pi||O||!N)return;const ve=kt(Fe(N));!dt(ve)||!Xs(ve)||Ne(N,ve)&&ve.blur()},[O,N]),Se(()=>{if(!(r||!ee))return ee.setFocusManagerState({modal:m,closeOnFocusOut:h,open:O,onOpenChange:C.setOpen,domReference:A}),()=>{ee.setFocusManagerState(null)}},[r,ee,m,O,C,h,A]),Se(()=>{if(!(r||!ue))return Yy(ue),()=>{queueMicrotask(Yd)}},[r,ue]);const ke=!r&&(m?!j:!0)&&(ge||m);return E.jsxs(b.Fragment,{children:[ke&&E.jsx(Li,{"data-type":"inside",ref:B,onFocus:ve=>{if(m){const me=pe();Ss(me[me.length-1])}else ee?.portalNode&&(ie.current=!1,Da(ve,ee.portalNode)?Ld(A)?.focus():xo(v??ee.beforeOutsideRef)?.focus())}}),l,ke&&E.jsx(Li,{"data-type":"inside",ref:W,onFocus:ve=>{m?Ss(pe()[0]):ee?.portalNode&&(h&&(ie.current=!0),Da(ve,ee.portalNode)?rv(A)?.focus():xo(y??ee.afterOutsideRef)?.focus())}})]})}function TE(n,i={}){const{enabled:l=!0,event:r="click",toggle:u=!0,ignoreMouse:f=!1,stickIfOpen:d=!0,touchOpenDelay:m=0,reason:h=ja}=i,p="rootStore"in n?n.rootStore:n,y=p.context.dataRef,v=b.useRef(void 0),S=Pl(),w=$t(),T=b.useMemo(()=>{function C(A,N,M,D){const k=Ke(h,N,M);A&&D==="touch"&&m>0?w.start(m,()=>{p.setOpen(!0,k)}):p.setOpen(A,k)}function O(A,N,M){const D=y.current.openEvent,k=p.select("domReferenceElement")!==N;return A&&k||!A||!u?!0:D&&d?!M(D.type):!1}return{onPointerDown(A){v.current=ui(A.pointerType,!0)&&Ed(A.nativeEvent)?"virtual":A.pointerType},onMouseDown(A){const N=v.current,M=A.nativeEvent,D=p.select("open");if(A.button!==0||r==="click"||ui(N,!0)&&f)return;const k=O(D,A.currentTarget,H=>H==="click"||H==="mousedown"),L=St(M);if(Xs(L)){C(k,M,L,N);return}const j=A.currentTarget;S.request(()=>{C(k,M,j,N)})},onClick(A){if(r==="mousedown-only")return;const N=v.current;if(r==="mousedown"&&N){v.current=void 0;return}if(ui(N,!0)&&f)return;const M=p.select("open"),D=O(M,A.currentTarget,k=>k==="click"||k==="mousedown"||k==="keydown"||k==="keyup");C(D,A.nativeEvent,A.currentTarget,N)},onKeyDown(){v.current=void 0}}},[y,r,f,h,p,d,u,S,w,m]);return b.useMemo(()=>l?{reference:T}:Rt,[l,T])}function EE(n,i){let l=null,r=null,u=!1;return{contextElement:n||void 0,getBoundingClientRect(){const f=n?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},d=i.axis==="x"||i.axis==="both",m=i.axis==="y"||i.axis==="both",h=["mouseenter","mousemove"].includes(i.dataRef.current.openEvent?.type||"")&&i.pointerType!=="touch";let p=f.width,y=f.height,v=f.x,S=f.y;return l==null&&i.x&&d&&(l=f.x-i.x),r==null&&i.y&&m&&(r=f.y-i.y),v-=l||0,S-=r||0,p=0,y=0,!u||h?(p=i.axis==="y"?f.width:0,y=i.axis==="x"?f.height:0,v=d&&i.x!=null?i.x:v,S=m&&i.y!=null?i.y:S):u&&!h&&(y=i.axis==="x"?f.height:y,p=i.axis==="y"?f.width:p),u=!0,{width:p,height:y,x:v,y:S,top:S,right:v+p,bottom:S+y,left:v}}}}function qy(n){return n!=null&&n.clientX!=null}function wE(n,i={}){const{enabled:l=!0,axis:r="both"}=i,u="rootStore"in n?n.rootStore:n,f=u.useState("open"),d=u.useState("floatingElement"),m=u.useState("domReferenceElement"),h=u.context.dataRef,p=b.useRef(!1),y=b.useRef(null),[v,S]=b.useState(),[w,T]=b.useState([]),C=Oe(D=>{u.set("positionReference",D)}),O=Oe((D,k,L)=>{p.current||h.current.openEvent&&!qy(h.current.openEvent)||u.set("positionReference",EE(L??m,{x:D,y:k,axis:r,dataRef:h,pointerType:v}))}),A=Oe(D=>{f?y.current||(O(D.clientX,D.clientY,D.currentTarget),T([])):O(D.clientX,D.clientY,D.currentTarget)}),N=ui(v)?d:f;b.useEffect(()=>{if(!l){C(m);return}if(!N)return;function D(){y.current?.(),y.current=null}const k=yt(d);function L(j){const H=St(j);Ne(d,H)?D():O(j.clientX,j.clientY)}return!h.current.openEvent||qy(h.current.openEvent)?y.current=Pe(k,"mousemove",L):C(m),D},[N,l,d,h,m,u,O,C,w]),b.useEffect(()=>()=>{u.set("positionReference",null)},[u]),b.useEffect(()=>{l&&!d&&(p.current=!1)},[l,d]),b.useEffect(()=>{!l&&f&&(p.current=!0)},[l,f]);const M=b.useMemo(()=>{function D(k){S(k.pointerType)}return{onPointerDown:D,onPointerEnter:D,onMouseMove:A,onMouseEnter:A}},[A]);return b.useMemo(()=>l?{reference:M,trigger:M}:{},[l,M])}function RE(){return!1}function CE(n){return{escapeKey:typeof n=="boolean"?n:n?.escapeKey??!1,outsidePress:typeof n=="boolean"?n:n?.outsidePress??!0}}function qd(n,i={}){const{enabled:l=!0,escapeKey:r=!0,outsidePress:u=!0,outsidePressEvent:f="sloppy",referencePress:d=RE,bubbles:m,externalTree:h}=i,p="rootStore"in n?n.rootStore:n,y=p.useState("open"),v=p.useState("floatingElement"),{dataRef:S,events:w}=p.context,T=hi(h),C=Oe(typeof u=="function"?u:()=>!1),O=typeof u=="function"?C:u,A=O!==!1,N=Oe(()=>f),{escapeKey:M,outsidePress:D}=CE(m),k=b.useRef(!1),L=b.useRef(!1),j=b.useRef(!1),H=b.useRef(!1),J=b.useRef(!1),$=b.useRef(""),Q=b.useRef(null),I=$t(),ee=$t(),ie=Oe(()=>{ee.clear(),S.current.insideReactTree=!1}),F=Oe(V=>{const oe=S.current.floatingContext?.nodeId;return(T?di(T.nodesRef.current,oe):[]).some(ge=>ge.context?.open&&!ge.context.dataRef.current[V])}),z=Oe(V=>Ef(V,p.select("floatingElement"))||Ef(V,p.select("domReferenceElement"))),q=Oe(V=>{d()&&p.setOpen(!1,Ke(ja,V.nativeEvent))}),P=Oe(V=>{if(!y||!l||!r||V.key!=="Escape"||J.current||!M&&F("__escapeKeyBubbles"))return;const oe=VT(V)?V.nativeEvent:V,ae=Ke(Ks,oe);p.setOpen(!1,ae),ae.isCanceled||V.preventDefault(),!M&&!ae.isPropagationAllowed&&V.stopPropagation()}),K=Oe(()=>{S.current.insideReactTree=!0,ee.start(0,ie)}),ne=Oe(V=>{if(!y||!l||V.button!==0)return;const oe=St(V.nativeEvent);Ne(p.select("floatingElement"),oe)&&(k.current||(k.current=!0,L.current=!1))}),R=Oe(V=>{!y||!l||(V.defaultPrevented||V.nativeEvent.defaultPrevented)&&k.current&&(L.current=!0)});b.useEffect(()=>{function V(oe){oe.open||(H.current=!1)}return w.on("openchange",V),()=>{w.off("openchange",V)}},[w]),b.useEffect(()=>{if(!y||!l)return y||(H.current=!1),ie;S.current.__escapeKeyBubbles=M,S.current.__outsidePressBubbles=D;const V=new vn,oe=new vn,ae=Fe(v);function ge(){V.clear(),J.current=!0}function ue(){V.start(pi?5:0,()=>{J.current=!1})}function pe(){j.current=!0,oe.start(0,()=>{j.current=!1})}function Re(){k.current=!1,L.current=!1}function ke(){const de=$.current,le=de==="pen"||!de?"mouse":de,be=N(),Be=typeof be=="function"?be():be;return typeof Be=="string"?Be:Be[le]}function ve(de){const le=ke();return le==="intentional"&&de.type!=="click"||le==="sloppy"&&de.type==="click"}function me(de){const le=S.current.floatingContext?.nodeId,be=T&&di(T.nodesRef.current,le).some(Be=>Ef(de,Be.context?.elements.floating));return z(de)||be}function je(de){if(ve(de)){de.type!=="click"&&!z(de)&&(oe.clear(),j.current=!1),ie();return}if(S.current.insideReactTree){ie();return}const le=St(de),be=`[${Yl("inert")}]`,Be=Je(le)?le.getRootNode():null,Ut=Array.from((za(Be)?Be:Fe(p.select("floatingElement"))).querySelectorAll(be)),tn=p.context.triggerElements;if(le&&(tn.hasElement(le)||tn.hasMatchingElement(xe=>Ne(xe,le))))return;let Tt=Je(le)?le:null;for(;Tt&&!Ro(Tt);){const xe=Do(Tt);if(Ro(xe)||!Je(xe))break;Tt=xe}if(!(Ut.length&&Je(le)&&!u1(le)&&!Ne(le,p.select("floatingElement"))&&Ut.every(xe=>!Ne(Tt,xe)))){if(dt(le)&&!("touches"in de)){const xe=Ro(le),Ye=Sn(le),nt=/auto|scroll/,pt=xe||nt.test(Ye.overflowX),Tn=xe||nt.test(Ye.overflowY),Un=pt&&le.clientWidth>0&&le.scrollWidth>le.clientWidth,En=Tn&&le.clientHeight>0&&le.scrollHeight>le.clientHeight,At=Ye.direction==="rtl",Bn=En&&(At?de.offsetX<=le.offsetWidth-le.clientWidth:de.offsetX>le.clientWidth),Xe=Un&&de.offsetY>le.clientHeight;if(Bn||Xe)return}if(!me(de)){if(ke()==="intentional"){if(de.detail!==0&&!Td(de)&&!H.current)return;if(j.current){oe.clear(),j.current=!1;return}}typeof O=="function"&&!O(de)||F("__outsidePressBubbles")||(p.setOpen(!1,Ke(Dd,de)),ie())}}}function Le(de){ke()!=="sloppy"||de.pointerType==="touch"||!p.select("open")||!l||z(de)||je(de)}function Ve(de){if(ke()!=="sloppy"||!p.select("open")||!l||z(de))return;const le=de.touches[0];le&&(Q.current={startTime:Date.now(),startX:le.clientX,startY:le.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},I.start(1e3,()=>{Q.current&&(Q.current.dismissOnTouchEnd=!1,Q.current.dismissOnMouseDown=!1)}))}function Te(de,le){const be=St(de);if(!be)return;const Be=Pe(be,de.type,()=>{le(de),Be()})}function Ue(de){$.current="touch",Te(de,Ve)}function Ee(de){I.clear(),de.type==="pointerdown"&&(de.button===0&&(H.current=!0),$.current=de.pointerType),!(de.type==="mousedown"&&Q.current&&!Q.current.dismissOnMouseDown)&&Te(de,le=>{le.type==="pointerdown"?Le(le):je(le)})}function we(de){if(de.type==="pointercancel"&&(H.current=!1),!k.current)return;const le=L.current;if(Re(),ke()==="intentional"){if(de.type==="pointercancel"){le&&pe();return}if(!me(de)){if(le){pe();return}typeof O=="function"&&!O(de)||(oe.clear(),j.current=!0,ie())}}}function Ae(de){if(ke()!=="sloppy"||!Q.current||z(de))return;const le=de.touches[0];if(!le)return;const be=Math.abs(le.clientX-Q.current.startX),Be=Math.abs(le.clientY-Q.current.startY),Ut=Math.sqrt(be*be+Be*Be);Ut>5&&(Q.current.dismissOnTouchEnd=!0),Ut>10&&(je(de),I.clear(),Q.current=null)}function Qe(de){Te(de,Ae)}function Me(de){ke()!=="sloppy"||!Q.current||z(de)||(Q.current.dismissOnTouchEnd&&je(de),I.clear(),Q.current=null)}function fe(de){Te(de,Me)}const ye=Gn(r&&Gn(Pe(ae,"keydown",P),Pe(ae,"compositionstart",ge),Pe(ae,"compositionend",ue)),A&&Gn(Pe(ae,"click",Ee,!0),Pe(ae,"pointerdown",Ee,!0),Pe(ae,"pointerup",we,!0),Pe(ae,"pointercancel",we,!0),Pe(ae,"mousedown",Ee,!0),Pe(ae,"mouseup",we,!0),Pe(ae,"touchstart",Ue,{capture:!0,passive:!0}),Pe(ae,"touchmove",Qe,{capture:!0,passive:!0}),Pe(ae,"touchend",fe,{capture:!0,passive:!0})));return()=>{ye(),V.clear(),oe.clear(),Re(),j.current=!1,ie()}},[S,v,r,A,O,y,l,M,D,P,ie,N,F,z,T,p,I]);const B=b.useMemo(()=>({onKeyDown:P,onPointerDown:q,onClick:q}),[P,q]),W=b.useMemo(()=>({onKeyDown:P,onPointerDown:R,onMouseDown:R,onClickCapture:K,onMouseDownCapture(V){K(),ne(V)},onPointerDownCapture(V){K(),ne(V)},onMouseUpCapture:K,onTouchEndCapture:K,onTouchMoveCapture:K}),[P,K,ne,R]);return b.useMemo(()=>l?{reference:B,floating:W,trigger:B}:{},[l,B,W])}function Vy(n,i,l){let{reference:r,floating:u}=n;const f=jn(i),d=jd(i),m=kd(d),h=Hn(i),p=f==="y",y=r.x+r.width/2-u.width/2,v=r.y+r.height/2-u.height/2,S=r[m]/2-u[m]/2;let w;switch(h){case"top":w={x:y,y:r.y-u.height};break;case"bottom":w={x:y,y:r.y+r.height};break;case"right":w={x:r.x+r.width,y:v};break;case"left":w={x:r.x-u.width,y:v};break;default:w={x:r.x,y:r.y}}const T=No(i);return T&&(w[d]+=S*(T==="end"?1:-1)*(l&&p?-1:1)),w}async function OE(n,i){var l;i===void 0&&(i={});const{x:r,y:u,platform:f,rects:d,elements:m,strategy:h}=n,{boundary:p="clippingAncestors",rootBoundary:y="viewport",elementContext:v="floating",altBoundary:S=!1,padding:w=0}=fi(i,n),T=Jb(w),O=m[S?v==="floating"?"reference":"floating":v],A=Os(await f.getClippingRect({element:(l=await(f.isElement==null?void 0:f.isElement(O)))==null||l?O:O.contextElement||await(f.getDocumentElement==null?void 0:f.getDocumentElement(m.floating)),boundary:p,rootBoundary:y,strategy:h})),N=v==="floating"?{x:r,y:u,width:d.floating.width,height:d.floating.height}:d.reference,M=await(f.getOffsetParent==null?void 0:f.getOffsetParent(m.floating)),D=await(f.isElement==null?void 0:f.isElement(M))&&await(f.getScale==null?void 0:f.getScale(M))||{x:1,y:1},k=Os(f.convertOffsetParentRelativeRectToViewportRelativeRect?await f.convertOffsetParentRelativeRectToViewportRelativeRect({elements:m,rect:N,offsetParent:M,strategy:h}):N);return{top:(A.top-k.top+T.top)/D.y,bottom:(k.bottom-A.bottom+T.bottom)/D.y,left:(A.left-k.left+T.left)/D.x,right:(k.right-A.right+T.right)/D.x}}const AE=50,ME=async(n,i,l)=>{const{placement:r="bottom",strategy:u="absolute",middleware:f=[],platform:d}=l,m=d.detectOverflow?d:{...d,detectOverflow:OE},h=await(d.isRTL==null?void 0:d.isRTL(i));let p=await d.getElementRects({reference:n,floating:i,strategy:u}),{x:y,y:v}=Vy(p,r,h),S=r,w=0;const T={};for(let C=0;C<f.length;C++){const O=f[C];if(!O)continue;const{name:A,fn:N}=O,{x:M,y:D,data:k,reset:L}=await N({x:y,y:v,initialPlacement:r,placement:S,strategy:u,middlewareData:T,rects:p,platform:m,elements:{reference:n,floating:i}});y=M??y,v=D??v,T[A]={...T[A],...k},L&&w<AE&&(w++,typeof L=="object"&&(L.placement&&(S=L.placement),L.rects&&(p=L.rects===!0?await d.getElementRects({reference:n,floating:i,strategy:u}):L.rects),{x:y,y:v}=Vy(p,S,h)),C=-1)}return{x:y,y:v,placement:S,strategy:u,middlewareData:T}},DE=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(i){var l,r;const{placement:u,middlewareData:f,rects:d,initialPlacement:m,platform:h,elements:p}=i,{mainAxis:y=!0,crossAxis:v=!0,fallbackPlacements:S,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:T="none",flipAlignment:C=!0,...O}=fi(n,i);if((l=f.arrow)!=null&&l.alignmentOffset)return{};const A=Hn(u),N=jn(m),M=Hn(m)===m,D=await(h.isRTL==null?void 0:h.isRTL(p.floating)),k=S||(M||!C?[Cs(m)]:M1(m)),L=T!=="none";!S&&L&&k.push(..._1(m,C,T,D));const j=[m,...k],H=await h.detectOverflow(i,O),J=[];let $=((r=f.flip)==null?void 0:r.overflows)||[];if(y&&J.push(H[A]),v){const ie=A1(u,d,D);J.push(H[ie[0]],H[ie[1]])}if($=[...$,{placement:u,overflows:J}],!J.every(ie=>ie<=0)){var Q,I;const ie=(((Q=f.flip)==null?void 0:Q.index)||0)+1,F=j[ie];if(F&&(!(v==="alignment"?N!==jn(F):!1)||$.every(P=>jn(P.placement)===N?P.overflows[0]>0:!0)))return{data:{index:ie,overflows:$},reset:{placement:F}};let z=(I=$.filter(q=>q.overflows[0]<=0).sort((q,P)=>q.overflows[1]-P.overflows[1])[0])==null?void 0:I.placement;if(!z)switch(w){case"bestFit":{var ee;const q=(ee=$.filter(P=>{if(L){const K=jn(P.placement);return K===N||K==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(K=>K>0).reduce((K,ne)=>K+ne,0)]).sort((P,K)=>P[1]-K[1])[0])==null?void 0:ee[0];q&&(z=q);break}case"initialPlacement":z=m;break}if(u!==z)return{reset:{placement:z}}}return{}}}},Rv=new Set(["left","top"]);async function NE(n,i){const{placement:l,platform:r,elements:u}=n,f=await(r.isRTL==null?void 0:r.isRTL(u.floating)),d=Hn(l),m=No(l),h=jn(l)==="y",p=Rv.has(d)?-1:1,y=f&&h?-1:1,v=fi(i,n);let{mainAxis:S,crossAxis:w,alignmentAxis:T}=typeof v=="number"?{mainAxis:v,crossAxis:0,alignmentAxis:null}:{mainAxis:v.mainAxis||0,crossAxis:v.crossAxis||0,alignmentAxis:v.alignmentAxis};return m&&typeof T=="number"&&(w=m==="end"?T*-1:T),h?{x:w*y,y:S*p}:{x:S*p,y:w*y}}const zE=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(i){var l,r;const{x:u,y:f,placement:d,middlewareData:m}=i,h=await NE(i,n);return d===((l=m.offset)==null?void 0:l.placement)&&(r=m.arrow)!=null&&r.alignmentOffset?{}:{x:u+h.x,y:f+h.y,data:{...h,placement:d}}}}},_E=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(i){const{x:l,y:r,placement:u,platform:f}=i,{mainAxis:d=!0,crossAxis:m=!1,limiter:h={fn:N=>{let{x:M,y:D}=N;return{x:M,y:D}}},...p}=fi(n,i),y={x:l,y:r},v=await f.detectOverflow(i,p),S=jn(u),w=_d(S);let T=y[w],C=y[S];const O=(N,M)=>Wb(M+v[N==="y"?"top":"left"],M,M-v[N==="y"?"bottom":"right"]);d&&(T=O(w,T)),m&&(C=O(S,C));const A=h.fn({...i,[w]:T,[S]:C});return{...A,data:{x:A.x-l,y:A.y-r,enabled:{[w]:d,[S]:m}}}}}},kE=function(n){return n===void 0&&(n={}),{options:n,fn(i){var l,r;const{x:u,y:f,placement:d,rects:m,middlewareData:h}=i,{offset:p=0,mainAxis:y=!0,crossAxis:v=!0}=fi(n,i),S={x:u,y:f},w=jn(d),T=_d(w);let C=S[T],O=S[w];const A=fi(p,i),N=typeof A=="number"?{mainAxis:A,crossAxis:0}:{mainAxis:(l=A.mainAxis)!=null?l:0,crossAxis:(r=A.crossAxis)!=null?r:0};if(y){const k=T==="y"?"height":"width",L=m.reference[T]-m.floating[k]+N.mainAxis,j=m.reference[T]+m.reference[k]-N.mainAxis;C<L?C=L:C>j&&(C=j)}if(v){var M,D;const k=T==="y"?"width":"height",L=Rv.has(Hn(d)),j=m.reference[w]-m.floating[k]+(L&&((M=h.offset)==null?void 0:M[w])||0)+(L?0:N.crossAxis),H=m.reference[w]+m.reference[k]+(L?0:((D=h.offset)==null?void 0:D[w])||0)-(L?N.crossAxis:0);O<j?O=j:O>H&&(O=H)}return{[T]:C,[w]:O}}}},jE=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(i){const{placement:l,rects:r,platform:u,elements:f}=i,{apply:d=()=>{},...m}=fi(n,i),h=await u.detectOverflow(i,m),p=Hn(l),y=No(l),v=jn(l)==="y",{width:S,height:w}=r.floating;let T,C;p==="top"||p==="bottom"?(T=p,C=y===(await(u.isRTL==null?void 0:u.isRTL(f.floating))?"start":"end")?"left":"right"):(C=p,T=y==="end"?"top":"bottom");const O=w-h.top-h.bottom,A=S-h.left-h.right,N=ka(w-h[T],O),M=ka(S-h[C],A),D=i.middlewareData.shift,k=!D;let L=N,j=M;D!=null&&D.enabled.x&&(j=A),D!=null&&D.enabled.y&&(L=O),k&&!y&&(v?j=S-2*Co(h.left,h.right):L=w-2*Co(h.top,h.bottom)),await d({...i,availableWidth:j,availableHeight:L});const H=await u.getDimensions(f.floating);return S!==H.width||w!==H.height?{reset:{rects:!0}}:{}}}};function Cv(n){const i=Sn(n);let l=parseFloat(i.width)||0,r=parseFloat(i.height)||0;const u=dt(n),f=u?n.offsetWidth:l,d=u?n.offsetHeight:r,m=Rs(l)!==f||Rs(r)!==d;return m&&(l=f,r=d),{width:l,height:r,$:m}}function Vd(n){return Je(n)?n:n.contextElement}function Na(n){const i=Vd(n);if(!dt(i))return Oo(1);const l=i.getBoundingClientRect(),{width:r,height:u,$:f}=Cv(i);let d=(f?Rs(l.width):l.width)/r,m=(f?Rs(l.height):l.height)/u;return(!d||!Number.isFinite(d))&&(d=1),(!m||!Number.isFinite(m))&&(m=1),{x:d,y:m}}const HE=Oo(0);function Ov(n){const i=yt(n);return!Cd()||!i.visualViewport?HE:{x:i.visualViewport.offsetLeft,y:i.visualViewport.offsetTop}}function LE(n,i,l){return i===void 0&&(i=!1),!!l&&i&&l===yt(n)}function Bi(n,i,l,r){i===void 0&&(i=!1),l===void 0&&(l=!1);const u=n.getBoundingClientRect(),f=Vd(n);let d=Oo(1);i&&(r?Je(r)&&(d=Na(r)):d=Na(n));const m=LE(f,l,r)?Ov(f):Oo(0);let h=(u.left+m.x)/d.x,p=(u.top+m.y)/d.y,y=u.width/d.x,v=u.height/d.y;if(f&&r){const S=yt(f),w=Je(r)?yt(r):r;let T=S,C=Kf(T);for(;C&&w!==T;){const O=Na(C),A=C.getBoundingClientRect(),N=Sn(C),M=A.left+(C.clientLeft+parseFloat(N.paddingLeft))*O.x,D=A.top+(C.clientTop+parseFloat(N.paddingTop))*O.y;h*=O.x,p*=O.y,y*=O.x,v*=O.y,h+=M,p+=D,T=yt(C),C=Kf(T)}}return Os({width:y,height:v,x:h,y:p})}function Zs(n,i){const l=Ys(n).scrollLeft;return i?i.left+l:Bi(_o(n)).left+l}function Av(n,i){const l=n.getBoundingClientRect(),r=l.left+i.scrollLeft-Zs(n,l),u=l.top+i.scrollTop;return{x:r,y:u}}function UE(n){let{elements:i,rect:l,offsetParent:r,strategy:u}=n;const f=u==="fixed",d=_o(r),m=i?Ps(i.floating):!1;if(r===d||m&&f)return l;let h={scrollLeft:0,scrollTop:0},p=Oo(1);const y=Oo(0),v=dt(r);if((v||!f)&&((Qt(r)!=="body"||Vl(d))&&(h=Ys(r)),v)){const w=Bi(r);p=Na(r),y.x=w.x+r.clientLeft,y.y=w.y+r.clientTop}const S=d&&!v&&!f?Av(d,h):Oo(0);return{width:l.width*p.x,height:l.height*p.y,x:l.x*p.x-h.scrollLeft*p.x+y.x+S.x,y:l.y*p.y-h.scrollTop*p.y+y.y+S.y}}function BE(n){return n.getClientRects?Array.from(n.getClientRects()):[]}function IE(n){const i=Ys(n),l=n.ownerDocument.body,r=Co(n.scrollWidth,n.clientWidth,l.scrollWidth,l.clientWidth),u=Co(n.scrollHeight,n.clientHeight,l.scrollHeight,l.clientHeight);let f=-i.scrollLeft+Zs(n);const d=-i.scrollTop;return Sn(l).direction==="rtl"&&(f+=Co(n.clientWidth,l.clientWidth)-r),{width:r,height:u,x:f,y:d}}const PE=25;function YE(n,i,l){l===void 0&&(l="viewport");const r=l==="layoutViewport",u=yt(n),f=_o(n),d=u.visualViewport;let m=f.clientWidth,h=f.clientHeight,p=0,y=0;if(d){const S=!Cd()||i==="fixed";r?S||(p=-d.offsetLeft,y=-d.offsetTop):(m=d.width,h=d.height,S&&(p=d.offsetLeft,y=d.offsetTop))}if(Zs(f)<=0){const S=f.ownerDocument,w=S.body,T=getComputedStyle(w),C=S.compatMode==="CSS1Compat"&&parseFloat(T.marginLeft)+parseFloat(T.marginRight)||0,O=Math.abs(f.clientWidth-w.clientWidth-C),A=getComputedStyle(f).scrollbarGutter==="stable both-edges"?O/2:O;A<=PE&&(m-=A)}return{width:m,height:h,x:p,y}}function qE(n,i){const l=Bi(n,!0,i==="fixed"),r=l.top+n.clientTop,u=l.left+n.clientLeft,f=Na(n),d=n.clientWidth*f.x,m=n.clientHeight*f.y,h=u*f.x,p=r*f.y;return{width:d,height:m,x:h,y:p}}function Gy(n,i,l){let r;if(i==="viewport"||i==="layoutViewport")r=YE(n,l,i);else if(i==="document")r=IE(_o(n));else if(Je(i))r=qE(i,l);else{const u=Ov(n);r={x:i.x-u.x,y:i.y-u.y,width:i.width,height:i.height}}return Os(r)}function VE(n,i){const l=i.get(n);if(l)return l;let r=Il(n,[],!1).filter(m=>Je(m)&&Qt(m)!=="body"),u=null;const f=Sn(n).position==="fixed";let d=f?Do(n):n;for(;Je(d)&&!Ro(d);){const m=Sn(d),h=Rd(d),p=u?u.position:f?"fixed":"";!h&&(p==="fixed"||p==="absolute"&&m.position==="static")?r=r.filter(v=>v!==d):u=m,d=Do(d)}return i.set(n,r),r}function GE(n){let{element:i,boundary:l,rootBoundary:r,strategy:u}=n;const d=[...l==="clippingAncestors"?Ps(i)?[]:VE(i,this._c):[].concat(l),r],m=Gy(i,d[0],u);let h=m.top,p=m.right,y=m.bottom,v=m.left;for(let S=1;S<d.length;S++){const w=Gy(i,d[S],u);h=Co(w.top,h),p=ka(w.right,p),y=ka(w.bottom,y),v=Co(w.left,v)}return{width:p-v,height:y-h,x:v,y:h}}function XE(n){const{width:i,height:l}=Cv(n);return{width:i,height:l}}function FE(n,i,l){const r=dt(i),u=_o(i),f=l==="fixed",d=Bi(n,!0,f,i);let m={scrollLeft:0,scrollTop:0};const h=Oo(0);if((r||!f)&&((Qt(i)!=="body"||Vl(u))&&(m=Ys(i)),r)){const S=Bi(i,!0,f,i);h.x=S.x+i.clientLeft,h.y=S.y+i.clientTop}!r&&u&&(h.x=Zs(u));const p=u&&!r&&!f?Av(u,m):Oo(0),y=d.left+m.scrollLeft-h.x-p.x,v=d.top+m.scrollTop-h.y-p.y;return{x:y,y:v,width:d.width,height:d.height}}function Af(n){return Sn(n).position==="static"}function Xy(n,i){if(!dt(n)||Sn(n).position==="fixed")return null;if(i)return i(n);let l=n.offsetParent;return _o(n)===l&&(l=l.ownerDocument.body),l}function Mv(n,i){const l=yt(n);if(Ps(n))return l;if(!dt(n)){let u=Do(n);for(;u&&!Ro(u);){if(Je(u)&&!Af(u))return u;u=Do(u)}return l}let r=Xy(n,i);for(;r&&XT(r)&&Af(r);)r=Xy(r,i);return r&&Ro(r)&&Af(r)&&!Rd(r)?l:r||QT(n)||l}const KE=async function(n){const i=this.getOffsetParent||Mv,l=this.getDimensions,r=await l(n.floating);return{reference:FE(n.reference,await i(n.floating),n.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function QE(n){return Sn(n).direction==="rtl"}const ZE={convertOffsetParentRelativeRectToViewportRelativeRect:UE,getDocumentElement:_o,getClippingRect:GE,getOffsetParent:Mv,getElementRects:KE,getClientRects:BE,getDimensions:XE,getScale:Na,isElement:Je,isRTL:QE};function Dv(n,i){return n.x===i.x&&n.y===i.y&&n.width===i.width&&n.height===i.height}function WE(n,i,l){let r=null,u;const f=_o(n);function d(){var y;clearTimeout(u),(y=r)==null||y.disconnect(),r=null}function m(y,v){y===void 0&&(y=!1),v===void 0&&(v=1),d();const S=n.getBoundingClientRect(),{left:w,top:T,width:C,height:O}=S;if(y||i(),!C||!O)return;const A=cs(T),N=cs(f.clientWidth-(w+C)),M=cs(f.clientHeight-(T+O)),D=cs(w),L={rootMargin:-A+"px "+-N+"px "+-M+"px "+-D+"px",threshold:Co(0,ka(1,v))||1};let j=!0;function H(J){const $=J[0].intersectionRatio;if(!Dv(S,n.getBoundingClientRect()))return m();if($!==v){if(!j)return m();$?m(!1,$):u=setTimeout(()=>{m(!1,1e-7)},1e3)}j=!1}try{r=new IntersectionObserver(H,{...L,root:f.ownerDocument})}catch{r=new IntersectionObserver(H,L)}r.observe(n)}const h=yt(n),p=()=>m(l);return h.addEventListener("resize",p),m(!0),()=>{h.removeEventListener("resize",p),d()}}function Fy(n,i,l,r){r===void 0&&(r={});const{ancestorScroll:u=!0,ancestorResize:f=!0,elementResize:d=typeof ResizeObserver=="function",layoutShift:m=typeof IntersectionObserver=="function",animationFrame:h=!1}=r,p=Vd(n),y=u||f?[...p?Il(p):[],...i?Il(i):[]]:[];y.forEach(A=>{u&&A.addEventListener("scroll",l),f&&A.addEventListener("resize",l)});const v=p&&m?WE(p,l,f):null;let S=-1,w=null;d&&(w=new ResizeObserver(A=>{let[N]=A;N&&N.target===p&&w&&i&&(w.unobserve(i),cancelAnimationFrame(S),S=requestAnimationFrame(()=>{var M;(M=w)==null||M.observe(i)})),l()}),p&&!h&&w.observe(p),i&&w.observe(i));let T,C=h?Bi(n):null;h&&O();function O(){const A=Bi(n);C&&!Dv(C,A)&&l(),C=A,T=requestAnimationFrame(O)}return l(),()=>{var A;y.forEach(N=>{u&&N.removeEventListener("scroll",l),f&&N.removeEventListener("resize",l)}),v?.(),(A=w)==null||A.disconnect(),w=null,h&&cancelAnimationFrame(T)}}const JE=zE,$E=_E,ew=DE,tw=jE,nw=kE,ow=(n,i,l)=>{const r=new Map,u=l??{},f={...ZE,...u.platform,_c:r};return ME(n,i,{...u,platform:f})};var iw=typeof document<"u",aw=function(){},xs=iw?b.useLayoutEffect:aw;function Ds(n,i){if(n===i)return!0;if(typeof n!=typeof i)return!1;if(typeof n=="function"&&n.toString()===i.toString())return!0;let l,r,u;if(n&&i&&typeof n=="object"){if(Array.isArray(n)){if(l=n.length,l!==i.length)return!1;for(r=l;r--!==0;)if(!Ds(n[r],i[r]))return!1;return!0}if(u=Object.keys(n),l=u.length,l!==Object.keys(i).length)return!1;for(r=l;r--!==0;)if(!{}.hasOwnProperty.call(i,u[r]))return!1;for(r=l;r--!==0;){const f=u[r];if(!(f==="_owner"&&n.$$typeof)&&!Ds(n[f],i[f]))return!1}return!0}return n!==n&&i!==i}function Nv(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function Ky(n,i){const l=Nv(n);return Math.round(i*l)/l}function Mf(n){const i=b.useRef(n);return xs(()=>{i.current=n}),i}function lw(n){n===void 0&&(n={});const{placement:i="bottom",strategy:l="absolute",middleware:r=[],platform:u,elements:{reference:f,floating:d}={},transform:m=!0,whileElementsMounted:h,open:p}=n,[y,v]=b.useState({x:0,y:0,strategy:l,placement:i,middlewareData:{},isPositioned:!1}),[S,w]=b.useState(r);Ds(S,r)||w(r);const[T,C]=b.useState(null),[O,A]=b.useState(null),N=b.useCallback(P=>{P!==L.current&&(L.current=P,C(P))},[]),M=b.useCallback(P=>{P!==j.current&&(j.current=P,A(P))},[]),D=f||T,k=d||O,L=b.useRef(null),j=b.useRef(null),H=b.useRef(y),J=h!=null,$=Mf(h),Q=Mf(u),I=Mf(p),ee=b.useCallback(()=>{if(!L.current||!j.current)return;const P={placement:i,strategy:l,middleware:S};Q.current&&(P.platform=Q.current),ow(L.current,j.current,P).then(K=>{const ne={...K,isPositioned:I.current!==!1};ie.current&&!Ds(H.current,ne)&&(H.current=ne,Xn.flushSync(()=>{v(ne)}))})},[S,i,l,Q,I]);xs(()=>{p===!1&&H.current.isPositioned&&(H.current.isPositioned=!1,v(P=>({...P,isPositioned:!1})))},[p]);const ie=b.useRef(!1);xs(()=>(ie.current=!0,()=>{ie.current=!1}),[]),xs(()=>{if(D&&(L.current=D),k&&(j.current=k),D&&k){if($.current)return $.current(D,k,ee);ee()}},[D,k,ee,$,J]);const F=b.useMemo(()=>({reference:L,floating:j,setReference:N,setFloating:M}),[N,M]),z=b.useMemo(()=>({reference:D,floating:k}),[D,k]),q=b.useMemo(()=>{const P={position:l,left:0,top:0};if(!z.floating)return P;const K=Ky(z.floating,y.x),ne=Ky(z.floating,y.y);return m?{...P,transform:"translate("+K+"px, "+ne+"px)",...Nv(z.floating)>=1.5&&{willChange:"transform"}}:{position:l,left:K,top:ne}},[l,m,z.floating,y.x,y.y]);return b.useMemo(()=>({...y,update:ee,refs:F,elements:z,floatingStyles:q}),[y,ee,F,z,q])}const rw=(n,i)=>{const l=JE(n);return{name:l.name,fn:l.fn,options:[n,i]}},sw=(n,i)=>{const l=$E(n);return{name:l.name,fn:l.fn,options:[n,i]}},uw=(n,i)=>({fn:nw(n).fn,options:[n,i]}),cw=(n,i)=>{const l=ew(n);return{name:l.name,fn:l.fn,options:[n,i]}},fw=(n,i)=>{const l=tw(n);return{name:l.name,fn:l.fn,options:[n,i]}};var Df={exports:{}},Nf={};var Qy;function dw(){if(Qy)return Nf;Qy=1;var n=ql();function i(v,S){return v===S&&(v!==0||1/v===1/S)||v!==v&&S!==S}var l=typeof Object.is=="function"?Object.is:i,r=n.useState,u=n.useEffect,f=n.useLayoutEffect,d=n.useDebugValue;function m(v,S){var w=S(),T=r({inst:{value:w,getSnapshot:S}}),C=T[0].inst,O=T[1];return f(function(){C.value=w,C.getSnapshot=S,h(C)&&O({inst:C})},[v,w,S]),u(function(){return h(C)&&O({inst:C}),v(function(){h(C)&&O({inst:C})})},[v]),d(w),w}function h(v){var S=v.getSnapshot;v=v.value;try{var w=S();return!l(v,w)}catch{return!0}}function p(v,S){return S()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p:m;return Nf.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:y,Nf}var Zy;function zv(){return Zy||(Zy=1,Df.exports=dw()),Df.exports}var Gd=zv(),zf={exports:{}},_f={};var Wy;function pw(){if(Wy)return _f;Wy=1;var n=ql(),i=zv();function l(p,y){return p===y&&(p!==0||1/p===1/y)||p!==p&&y!==y}var r=typeof Object.is=="function"?Object.is:l,u=i.useSyncExternalStore,f=n.useRef,d=n.useEffect,m=n.useMemo,h=n.useDebugValue;return _f.useSyncExternalStoreWithSelector=function(p,y,v,S,w){var T=f(null);if(T.current===null){var C={hasValue:!1,value:null};T.current=C}else C=T.current;T=m(function(){function A(L){if(!N){if(N=!0,M=L,L=S(L),w!==void 0&&C.hasValue){var j=C.value;if(w(j,L))return D=j}return D=L}if(j=D,r(M,L))return j;var H=S(L);return w!==void 0&&w(j,H)?(M=L,j):(M=L,D=H)}var N=!1,M,D,k=v===void 0?null:v;return[function(){return A(y())},k===null?void 0:function(){return A(k())}]},[y,v,S,w]);var O=u(p,T[0],T[1]);return d(function(){C.hasValue=!0,C.value=O},[O]),h(O),O},_f}var Jy;function hw(){return Jy||(Jy=1,zf.exports=pw()),zf.exports}var gw=hw();const mw=Ud(19),yw=mw?vw:Sw;function _v(n,i,l,r,u){return yw(n,i,l,r,u)}function bw(n,i,l,r,u){const f=b.useCallback(()=>i(n.getSnapshot(),l,r,u),[n,i,l,r,u]);return Gd.useSyncExternalStore(n.subscribe,f,f)}kT({before(n){n.syncIndex=0,n.didInitialize||(n.syncTick=1,n.syncHooks=[],n.didChangeStore=!0,n.getSnapshot=()=>{let i=!1;for(let l=0;l<n.syncHooks.length;l+=1){const r=n.syncHooks[l],u=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,u)||(i=!0,r.value=u)}return i&&(n.syncTick+=1),n.syncTick})},after(n){n.syncHooks.length>0&&(n.didChangeStore&&(n.didChangeStore=!1,n.subscribe=i=>{const l=new Set;for(const u of n.syncHooks)l.add(u.store);const r=[];for(const u of l)r.push(u.subscribe(i));return()=>{for(const u of r)u()}}),Gd.useSyncExternalStore(n.subscribe,n.getSnapshot,n.getSnapshot))}});function vw(n,i,l,r,u){const f=_T();if(!f)return bw(n,i,l,r,u);const d=f.syncIndex;f.syncIndex+=1;let m;return f.didInitialize?(m=f.syncHooks[d],(m.store!==n||m.selector!==i||!Object.is(m.a1,l)||!Object.is(m.a2,r)||!Object.is(m.a3,u))&&(m.store!==n&&(f.didChangeStore=!0),m.store=n,m.selector=i,m.a1=l,m.a2=r,m.a3=u,m.value=i(n.getSnapshot(),l,r,u))):(m={store:n,selector:i,a1:l,a2:r,a3:u,value:i(n.getSnapshot(),l,r,u)},f.syncHooks.push(m)),m.value}function Sw(n,i,l,r,u){return gw.useSyncExternalStoreWithSelector(n.subscribe,n.getSnapshot,n.getSnapshot,f=>i(f,l,r,u))}class xw{static create(i){return new this(i)}constructor(i){this.state=i,this.listeners=new Set,this.updateTick=0}subscribe=i=>(this.listeners.add(i),()=>{this.listeners.delete(i)});getSnapshot=()=>this.state;setState(i){if(this.state===i)return;this.state=i,this.updateTick+=1;const l=this.updateTick;for(const r of this.listeners){if(l!==this.updateTick)return;r(i)}}update(i){for(const l in i)if(!Object.is(this.state[l],i[l])){this.setState({...this.state,...i});return}}set(i,l){Object.is(this.state[i],l)||this.setState({...this.state,[i]:l})}notifyAll(){const i={...this.state};this.setState(i)}use(i,l,r,u){return _v(this,i,l,r,u)}}class Xl extends xw{constructor(i,l={},r){super(i),this.context=l,this.selectors=r}useSyncedValue(i,l){b.useDebugValue(i);const r=this;Se(()=>{r.state[i]!==l&&r.set(i,l)},[r,i,l])}useSyncedValueWithCleanup(i,l){const r=this;Se(()=>(r.state[i]!==l&&r.set(i,l),()=>{r.set(i,void 0)}),[r,i,l])}useSyncedValues(i){const l=this,r=Object.values(i);Se(()=>{l.update(i)},[l,...r])}useControlledProp(i,l){b.useDebugValue(i);const r=this,u=l!==void 0;Se(()=>{u&&!Object.is(r.state[i],l)&&r.setState({...r.state,[i]:l})},[r,i,l,u])}select(i,l,r,u){const f=this.selectors[i];return f(this.state,l,r,u)}useState(i,l,r,u){return b.useDebugValue(i),_v(this,this.selectors[i],l,r,u)}useContextCallback(i,l){b.useDebugValue(i);const r=Oe(l??vd);this.context[i]=r}useStateSetter(i){const l=b.useRef(void 0);return l.current===void 0&&(l.current=r=>{this.set(i,r)}),l.current}observe(i,l){let r;typeof i=="function"?r=i:r=this.selectors[i];let u=r(this.state);return l(u,u,this),this.subscribe(f=>{const d=r(f);if(!Object.is(u,d)){const m=u;u=d,l(d,m,this)}})}}const Tw={open:n=>n.open,transitionStatus:n=>n.transitionStatus,domReferenceElement:n=>n.domReferenceElement,referenceElement:n=>n.positionReference??n.referenceElement,floatingElement:n=>n.floatingElement,floatingId:n=>n.floatingId};class kv extends Xl{constructor(i){const{syncOnly:l,nested:r,onOpenChange:u,triggerElements:f,...d}=i;super({...d,positionReference:d.referenceElement,domReferenceElement:d.referenceElement},{onOpenChange:u,dataRef:{current:{}},events:Sv(),nested:r,triggerElements:f},Tw),this.syncOnly=l}syncOpenEvent=(i,l)=>{(!i||!this.state.open||l!=null&&GT(l))&&(this.context.dataRef.current.openEvent=i?l:void 0)};dispatchOpenChange=(i,l)=>{this.syncOpenEvent(i,l.event);const r={open:i,reason:l.reason,nativeEvent:l.event,nested:this.context.nested,triggerElement:l.trigger};this.context.events.emit("openchange",r)};setOpen=(i,l)=>{if(this.syncOnly){this.context.onOpenChange?.(i,l);return}this.dispatchOpenChange(i,l),this.context.onOpenChange?.(i,l)}}function jv(n){const{popupStore:i,treatPopupAsFloatingElement:l=!1,floatingRootContext:r,floatingId:u,nested:f,onOpenChange:d}=n,m=i.useState("open"),h=i.useState("activeTriggerElement"),p=i.useState(l?"popupElement":"positionerElement"),y=i.context.triggerElements,v=d,S=b.useRef(null);r===void 0&&S.current===null&&(S.current=new kv({open:m,transitionStatus:void 0,referenceElement:h,floatingElement:p,triggerElements:y,onOpenChange:v,floatingId:u,syncOnly:!0,nested:f}));const w=r??S.current;return i.useSyncedValue("floatingId",u),Se(()=>{const T={open:m,floatingId:u,referenceElement:h,floatingElement:p};Je(h)&&(T.domReferenceElement=h),w.state.positionReference===w.state.referenceElement&&(T.positionReference=h),w.update(T)},[m,u,h,p,w]),w.context.onOpenChange=v,w.context.nested=f,w}function Hv(n,i=!1,l=!1,r=!1){const[u,f]=b.useState(n&&i?"idle":void 0),[d,m]=b.useState(n&&!r);return n&&!d&&(m(!0),f("starting")),!n&&d&&u!=="ending"&&!l&&f("ending"),!n&&!d&&u==="ending"&&f(void 0),Se(()=>{if(!n&&d&&u!=="ending"&&l){const h=eo.request(()=>{f("ending")});return()=>{eo.cancel(h)}}},[n,d,u,l]),Se(()=>{if(!n||i)return;const h=eo.request(()=>{f(void 0)});return()=>{eo.cancel(h)}},[i,n]),Se(()=>{if(!n||!i)return;n&&d&&u!=="idle"&&f("starting");const h=eo.request(()=>{f("idle")});return()=>{eo.cancel(h)}},[i,n,d,u]),{mounted:d,setMounted:m,transitionStatus:u}}let ds=null;function Ew(n){if(!ds){const i=[];ds=i,queueMicrotask(()=>{ds=null,Xn.flushSync(()=>{for(const l of i)l()})})}ds.push(n)}function Xd(n,i=!1,l=!1){const r=Pl();return Oe((u,f=null)=>{r.cancel();const d=xo(n);if(d==null)return;const m=d,h=()=>{if(!l){Xn.flushSync(u);return}Ew(()=>{f?.aborted||u()})};if(typeof m.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){u();return}function p(){Promise.all(m.getAnimations().map(y=>y.finished)).then(()=>{f?.aborted||h()},()=>{if(f?.aborted)return;if(m.getAnimations().some(v=>v.pending||v.playState!=="finished")){p();return}h()})}if(i){const y=Yb;if(!m.hasAttribute(y)){r.request(p);return}const v=new MutationObserver(()=>{m.hasAttribute(y)||(v.disconnect(),p())});v.observe(m,{attributes:!0,attributeFilter:[y]}),f?.addEventListener("abort",()=>v.disconnect(),{once:!0});return}r.request(p)})}function Ha(n){const{enabled:i=!0,open:l,ref:r,batch:u=!1,onComplete:f}=n,d=Oe(f),m=Xd(r,l,u);b.useEffect(()=>{if(!i)return;const h=new AbortController;return m(d,h.signal),()=>{h.abort()}},[i,l,d,m])}const Fd={tabIndex:-1,[Qf]:""};function ww(n){return i=>i==="touch"?n.current:!0}function Lv(n,i=!1){const l=Ui(),r=Ii()!=null,u=Jt(()=>n(l,r)).current;return jv({popupStore:u,treatPopupAsFloatingElement:i,floatingRootContext:u.state.floatingRootContext,floatingId:l,nested:r,onOpenChange:u.setOpen}),u}function Kd({handle:n,store:i}){return Se(()=>n.attachStore(i),[n,i]),null}function $y(n){const i=n.context.triggerElements.size;n.select("open")&&n.state.triggerCount!==i&&n.set("triggerCount",i)}function Rw(n,i){const l=b.useRef(null);return Oe(r=>{const u=l.current;if(u!==null){if(u.element===r&&u.store===i&&u.id===n)return;l.current=null;const f=u.store;f.context.triggerElements.getById(u.id)===u.element&&(f.context.triggerElements.delete(u.id),$y(f))}r!==null&&n!==void 0&&(l.current={store:i,id:n,element:r},i.context.triggerElements.add(n,r),$y(i))})}function Qd(n,i,l,r=!1){let u=n.preventUnmountingOnClose;i?u=!1:r&&(u=!0);const f=l?.id??null;let d=n.activeTriggerId,m=n.activeTriggerElement;return(f||i)&&(d=f,m=l??null),{open:i,preventUnmountingOnClose:u,activeTriggerId:d,activeTriggerElement:m}}function Uv(n){let i=!1;return n.preventUnmountOnClose=()=>{i=!0},()=>i}function Cw(n,i,l,r={}){const u=l.reason,f=u===Lt,d=i&&u===Aa,m=!i&&(u===ja||u===Ks),h=Uv(l);if(n.context.onOpenChange?.(i,l),l.isCanceled)return;r.onBeforeDispatch?.(),n.state.floatingRootContext.dispatchOpenChange(i,l);const p=()=>{const y=Qd(n.state,i,l.trigger,h()),v={...r.extraState,...y};d?v.instantType="focus":m?v.instantType="dismiss":f&&(v.instantType=void 0),n.update(v)};f?Xn.flushSync(p):p()}function Bv(n,i,l,r){const u=l.useState("isMountedByTrigger",n),f=Rw(n,l),d=Oe(h=>{const p=l.select("open"),y=l.select("activeTriggerId");if(y===n){const v={activeTriggerElement:h,...p?r:null};l.update(v);return}if(y==null&&p){const v={activeTriggerId:n??null,activeTriggerElement:h,...r};l.update(v)}}),m=Oe(h=>{f(h),h&&d(h)});return Se(()=>(m(i.current),()=>m(null)),[m,i,l,n]),Se(()=>{if(u){const h={activeTriggerElement:i.current,...r};l.update(h)}},[u,l,i,...Object.values(r)]),{registerTrigger:m,isMountedByThisTrigger:u}}function Zd(n,i={}){const{closeOnActiveTriggerUnmount:l=!1}=i,r=b.useRef(null),u=n.useState("open"),f=n.useState("triggerCount"),d=n.useState("activeTriggerId"),m=n.useState("activeTriggerElement");Se(()=>{if(!u){r.current=null,n.state.triggerCount!==0&&n.set("triggerCount",0);return}const h=n.context.triggerElements.size,p={};n.state.triggerCount!==h&&(p.triggerCount=h);const y=n.select("activeTriggerId");let v=null;if(y){const S=n.context.triggerElements.getById(y);if(S)r.current=y,S!==n.state.activeTriggerElement&&(p.activeTriggerElement=S);else{for(const[w,T]of n.context.triggerElements.entries())if(T===n.state.activeTriggerElement){p.activeTriggerId=w,p.activeTriggerElement=T,r.current=w;break}p.activeTriggerId===void 0&&(r.current===y?v=y:r.current=null)}}else r.current=null;if(!v&&!y&&h===1){const S=n.context.triggerElements.entries().next();if(!S.done){const[w,T]=S.value;p.activeTriggerId=w,p.activeTriggerElement=T,r.current=w}}(p.triggerCount!==void 0||p.activeTriggerId!==void 0||p.activeTriggerElement!==void 0)&&n.update(p),v&&l&&queueMicrotask(()=>{if(n.select("open")&&n.select("activeTriggerId")===v&&!n.context.triggerElements.getById(v)){const S=Ke(Fs);n.setOpen(!1,S),S.isCanceled||n.update({activeTriggerId:null,activeTriggerElement:null})}})},[u,n,f,d,m,l])}function Wd(n,i,l,r){const{mounted:u,setMounted:f,transitionStatus:d}=Hv(n,!1,!1,r),m=i.useState("preventUnmountingOnClose"),h=n?!1:m;i.useSyncedValues({mounted:u,transitionStatus:d,preventUnmountingOnClose:h});const p=Oe(()=>{f(!1),i.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),l?.(),i.context.onOpenChangeComplete?.(!1)});return Ha({enabled:u&&!n&&!h,open:n,ref:i.context.popupRef,onComplete(){n||p()}}),{forceUnmount:p,transitionStatus:d}}function Jd(n,i){n.useSyncedValues(i),Se(()=>()=>{n.update({activeTriggerProps:Rt,inactiveTriggerProps:Rt,popupProps:Rt})},[n])}function Ow(n,i){Se(()=>{!i&&n.state.openMethod!==null&&n.set("openMethod",null)},[i,n]),Se(()=>()=>{n.state.openMethod!==null&&n.set("openMethod",null)},[n])}class $d{constructor(){this.idMap=new Map}add(i,l){this.idMap.set(i,l)}delete(i){this.idMap.delete(i)}hasElement(i){for(const l of this.idMap.values())if(l===i)return!0;return!1}hasMatchingElement(i){for(const l of this.idMap.values())if(i(l))return!0;return!1}getById(i){return this.idMap.get(i)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}}function ep(n,i,l=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new kv({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:n,floatingId:i,syncOnly:!0,nested:l,onOpenChange:void 0}),floatingId:i,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:Rt,inactiveTriggerProps:Rt,popupProps:Rt}}const Ul=n=>n.triggerIdProp??n.activeTriggerId,tp=n=>n.openProp??n.open,eb=n=>(n.popupElement?.id??n.floatingId)||void 0;function Iv(n,i){return i!==void 0&&tp(n)&&Ul(n)===i}function Aw(n,i){return Iv(n,i)?!0:i!==void 0&&tp(n)&&Ul(n)==null&&n.triggerCount===1}const np={open:tp,mounted:n=>n.mounted,transitionStatus:n=>n.transitionStatus,floatingRootContext:n=>n.floatingRootContext,triggerCount:n=>n.triggerCount,preventUnmountingOnClose:n=>n.preventUnmountingOnClose,payload:n=>n.payload,activeTriggerId:Ul,activeTriggerElement:n=>n.mounted?n.activeTriggerElement:null,popupId:eb,isTriggerActive:(n,i)=>i!==void 0&&Ul(n)===i,isOpenedByTrigger:(n,i)=>Iv(n,i),isMountedByTrigger:(n,i)=>i!==void 0&&Ul(n)===i&&n.mounted,triggerProps:(n,i)=>i?n.activeTriggerProps:n.inactiveTriggerProps,triggerPopupId:(n,i)=>Aw(n,i)?eb(n):void 0,popupProps:n=>n.popupProps,popupElement:n=>n.popupElement,positionerElement:n=>n.positionerElement};function Pv(n){const i=b.useCallback(r=>n===void 0?vd:n.subscribeStore(r),[n]),l=b.useCallback(()=>n===void 0?void 0:n.store,[n]);return Gd.useSyncExternalStore(i,l,()=>n?.serverStore)}function Mw(n){return Dw(n,n.rootContext)}function Dw(n,i){const{nodeId:l,externalTree:r}=n,u=i.useState("referenceElement"),f=i.useState("floatingElement"),d=i.useState("domReferenceElement"),m=i.useState("open"),h=i.useState("floatingId"),[p,y]=b.useState(null),[v,S]=b.useState(void 0),[w,T]=b.useState(void 0),C=b.useRef(null),O=hi(r),A=b.useMemo(()=>({reference:u,floating:f,domReference:d}),[u,f,d]),N=lw({...n,elements:{...A,...p&&{reference:p}}}),M=Je(v)?v:null,D=w===void 0?i.state.floatingElement:w;i.useSyncedValue("referenceElement",v??null),i.useSyncedValue("domReferenceElement",v===void 0?d:M),i.useSyncedValue("floatingElement",D);const k=b.useCallback(Q=>{const I=Je(Q)?{getBoundingClientRect:()=>Q.getBoundingClientRect(),getClientRects:()=>Q.getClientRects(),contextElement:Q}:Q;y(I),N.refs.setReference(I)},[N.refs]),L=b.useCallback(Q=>{(Je(Q)||Q===null)&&(C.current=Q,S(Q)),(Je(N.refs.reference.current)||N.refs.reference.current===null||Q!==null&&!Je(Q))&&N.refs.setReference(Q)},[N.refs,S]),j=b.useCallback(Q=>{T(Q),N.refs.setFloating(Q)},[N.refs]),H=b.useMemo(()=>({...N.refs,setReference:L,setFloating:j,setPositionReference:k,domReference:C}),[N.refs,L,j,k]),J=b.useMemo(()=>({...N.elements,domReference:d}),[N.elements,d]),$=b.useMemo(()=>({...N,dataRef:i.context.dataRef,open:m,onOpenChange:i.setOpen,events:i.context.events,floatingId:h,refs:H,elements:J,nodeId:l,rootStore:i}),[N,H,J,l,i,m,h]);return Se(()=>{d&&(C.current=d)},[d]),Se(()=>{i.context.dataRef.current.floatingContext=$;const Q=O?.nodesRef.current.find(I=>I.id===l);Q&&(Q.context=$)}),b.useMemo(()=>({...N,context:$,refs:H,elements:J,rootStore:i}),[N,H,J,$,i])}const kf=Sd&&pi;function Yv(n,i={}){const{enabled:l=!0,delay:r}=i,u="rootStore"in n?n.rootStore:n,{events:f,dataRef:d}=u.context,m=b.useRef(!1),h=b.useRef(null),p=b.useRef(!0),y=$t();b.useEffect(()=>{const S=u.select("domReferenceElement");if(!l)return;const w=yt(S);function T(){const A=u.select("domReferenceElement");!u.select("open")&&dt(A)&&A===kt(Fe(A))&&(m.current=!0,h.current=A)}function C(){p.current=!0}function O(){p.current=!1}return Gn(Pe(w,"blur",T),kf&&Pe(w,"keydown",C,!0),kf&&Pe(w,"pointerdown",O,!0))},[u,l]),b.useEffect(()=>{if(!l)return;function S(w){if(w.reason===ja||w.reason===Ks){const T=u.select("domReferenceElement");Je(T)&&(h.current=T,m.current=!0)}}return f.on("openchange",S),()=>{f.off("openchange",S)}},[f,l,u]);const v=b.useMemo(()=>{function S(){m.current=!1,h.current=null}return{onMouseLeave(){S()},onFocus(w){const T=w.currentTarget;if(m.current){if(h.current===T)return;S()}const C=St(w.nativeEvent);if(Je(C)){if(kf&&!w.relatedTarget){if(!p.current&&!Xs(C))return}else if(!ws(C))return}const O=Es(w.relatedTarget,u.context.triggerElements),{nativeEvent:A,currentTarget:N}=w,M=typeof r=="function"?r():r;if(u.select("open")&&O||M===0||M===void 0){u.setOpen(!0,Ke(Aa,A,N));return}y.start(M,()=>{m.current||u.setOpen(!0,Ke(Aa,A,N))})},onBlur(w){S();const T=w.relatedTarget,C=w.nativeEvent,O=Je(T)&&T.hasAttribute(Yl("focus-guard"))&&T.getAttribute("data-type")==="outside";y.start(0,()=>{const A=u.select("domReferenceElement"),N=kt(Fe(A));!T&&N===A||Ne(d.current.floatingContext?.refs.floating.current,N)||Ne(A,N)||O||Es(T??N,u.context.triggerElements)||u.setOpen(!1,Ke(Aa,C))})}}},[d,r,u,y]);return b.useMemo(()=>l?{reference:v,trigger:v}:{},[l,v])}class op{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new vn,this.restTimeout=new vn,this.handleCloseOptions=void 0}static create(){return new op}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose}const Ns=new WeakMap;function zs(n){if(!n.performedPointerEventsMutation)return;const i=n.pointerEventsScopeElement;i&&Ns.get(i)===n&&(n.pointerEventsScopeElement?.style.removeProperty("pointer-events"),n.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),n.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),Ns.delete(i)),n.performedPointerEventsMutation=!1,n.pointerEventsScopeElement=null,n.pointerEventsReferenceElement=null,n.pointerEventsFloatingElement=null}function qv(n,i){const{scopeElement:l,referenceElement:r,floatingElement:u}=i,f=Ns.get(l);f&&f!==n&&zs(f),zs(n),n.performedPointerEventsMutation=!0,n.pointerEventsScopeElement=l,n.pointerEventsReferenceElement=r,n.pointerEventsFloatingElement=u,Ns.set(l,n),l.style.pointerEvents="none",r.style.pointerEvents="auto",u.style.pointerEvents="auto"}function ip(n){const i=n.context.dataRef.current,l=Jt(()=>i.hoverInteractionState??op.create()).current;return i.hoverInteractionState||(i.hoverInteractionState=l),Ls(i.hoverInteractionState.disposeEffect),i.hoverInteractionState}function Vv(n,i={}){const{enabled:l=!0,closeDelay:r=0,nodeId:u}=i,f="rootStore"in n?n.rootStore:n,d=f.useState("open"),m=f.useState("floatingElement"),h=f.useState("domReferenceElement"),{dataRef:p}=f.context,y=hi(),v=Ii(),S=ip(f),w=$t(),T=Oe(()=>Vb(p.current.openEvent?.type,S.interactedInside)),C=Oe(()=>d1(p.current.openEvent?.type)),O=Oe(()=>{zs(S)});Se(()=>{d||(S.pointerType=void 0,S.restTimeoutPending=!1,S.interactedInside=!1,O())},[d,S,O]),b.useEffect(()=>O,[O]),Se(()=>{if(l&&d&&S.handleCloseOptions?.blockPointerEvents&&C()&&Je(h)&&m){const A=h,N=m,M=Fe(m),D=y?.nodesRef.current.find(H=>H.id===v)?.context?.elements.floating;D&&(D.style.pointerEvents="");const k=S.pointerEventsScopeElement!==N?S.pointerEventsScopeElement:null,L=D!==N?D:null,j=S.handleCloseOptions?.getScope?.()??k??L??A.closest("[data-rootownerid]")??M.body;return qv(S,{scopeElement:j,referenceElement:A,floatingElement:N}),()=>{O()}}},[l,d,h,m,S,C,y,v,O]),b.useEffect(()=>{if(!l)return;function A(){return!!(y&&v&&di(y.nodesRef.current,v).length>0)}function N(H){const J=ji(r,"close",S.pointerType),$=()=>{f.setOpen(!1,Ke(Lt,H)),y?.events.emit("floating.closed",H)};J?S.openChangeTimeout.start(J,$):(S.openChangeTimeout.clear(),$())}function M(H){const J=St(H);if(!c1(J)){S.interactedInside=!1;return}S.interactedInside=J?.closest("[aria-haspopup]")!=null}function D(){S.openChangeTimeout.clear(),w.clear(),y?.events.off("floating.closed",L),O()}function k(H){if(A()&&y){y.events.on("floating.closed",L);return}if(Es(H.relatedTarget,f.context.triggerElements))return;const J=p.current.floatingContext?.nodeId??u,$=H.relatedTarget;if(!(y&&J&&Je($)&&di(y.nodesRef.current,J,!1).some(I=>Ne(I.context?.elements.floating,$)))){if(S.handler){S.handler(H);return}O(),C()&&!T()&&N(H)}}function L(H){!y||!v||A()||w.start(0,()=>{y.events.off("floating.closed",L),f.setOpen(!1,Ke(Lt,H)),y.events.emit("floating.closed",H)})}const j=m;return Gn(j&&Pe(j,"mouseenter",D),j&&Pe(j,"mouseleave",k),j&&Pe(j,"pointerdown",M,!0),()=>{y?.events.off("floating.closed",L)})},[l,m,f,p,r,u,C,T,O,S,y,v,w])}const Nw={current:null};function Gv(n,i={}){const{enabled:l=!0,delay:r=0,handleClose:u=null,mouseOnly:f=!1,restMs:d=0,move:m=!0,triggerElementRef:h=Nw,externalTree:p,isActiveTrigger:y=!0,getHandleCloseContext:v,isClosing:S,shouldOpen:w,guardStaleOpen:T=!1}=i,C="rootStore"in n?n.rootStore:n,{dataRef:O,events:A}=C.context,N=hi(p),M=ip(C),D=b.useRef(!1),k=jt(u),L=jt(r),j=jt(d),H=jt(l),J=jt(w),$=jt(S),Q=Oe(()=>Vb(O.current.openEvent?.type,M.interactedInside)),I=Oe(()=>J.current?.()!==!1),ee=Oe((z,q,P)=>{const K=C.context.triggerElements;if(K.hasElement(q))return!z||!Ne(z,q);if(!Je(P))return!1;const ne=P;return K.hasMatchingElement(R=>Ne(R,ne))&&(!z||!Ne(z,ne))}),ie=Oe(()=>{if(!M.handler)return;Fe(C.select("domReferenceElement")).removeEventListener("mousemove",M.handler),M.handler=void 0}),F=Oe(()=>{zs(M)});return y&&(M.handleCloseOptions=u?.__options),b.useEffect(()=>ie,[ie]),b.useEffect(()=>{if(!l)return;function z(q){q.open?D.current=!1:(D.current=q.reason===Lt,ie(),M.openChangeTimeout.clear(),M.restTimeout.clear(),M.blockMouseMove=!0,M.restTimeoutPending=!1)}return A.on("openchange",z),()=>{A.off("openchange",z)}},[l,A,M,ie]),b.useEffect(()=>{if(!l)return;function z(B,W=!0){const V=ji(L.current,"close",M.pointerType);V?M.openChangeTimeout.start(V,()=>{C.setOpen(!1,Ke(Lt,B)),N?.events.emit("floating.closed",B)}):W&&(M.openChangeTimeout.clear(),C.setOpen(!1,Ke(Lt,B)),N?.events.emit("floating.closed",B))}const q=h.current??(y?C.select("domReferenceElement"):null);if(!Je(q))return;function P(B){if(M.openChangeTimeout.clear(),M.blockMouseMove=!1,f&&!ui(M.pointerType))return;const W=wy(j.current),V=ji(L.current,"open",M.pointerType),oe=St(B),ae=B.currentTarget??null,ge=C.select("domReferenceElement");let ue=ae;if(Je(oe)&&!C.context.triggerElements.hasElement(oe)){for(const Te of C.context.triggerElements.elements())if(Ne(Te,oe)){ue=Te;break}}Je(ae)&&Je(ge)&&!C.context.triggerElements.hasElement(ae)&&Ne(ae,ge)&&(ue=ge);const pe=ue==null?!1:ee(ge,ue,oe),Re=C.select("open"),ke=$.current?.()??C.select("transitionStatus")==="ending",ve=!Re&&ke&&D.current,me=!pe&&Je(ue)&&Je(ge)&&Ne(ge,ue)&&ve,je=W>0&&!V,Le=pe&&(Re||ve)||me,Ve=!Re||pe;if(Le){I()&&C.setOpen(!0,Ke(Lt,B,ue));return}je||(V?M.openChangeTimeout.start(V,()=>{Ve&&I()&&C.setOpen(!0,Ke(Lt,B,ue))}):Ve&&I()&&C.setOpen(!0,Ke(Lt,B,ue)))}function K(B){if(Q()){F();return}ie();const W=C.select("domReferenceElement"),V=Fe(W);M.restTimeout.clear(),M.restTimeoutPending=!1;const oe=O.current.floatingContext??v?.();if(Es(B.relatedTarget,C.context.triggerElements))return;if(k.current&&oe){C.select("open")||M.openChangeTimeout.clear();const ge=h.current;M.handler=k.current({...oe,tree:N,x:B.clientX,y:B.clientY,onClose(){F(),ie(),H.current&&!Q()&&ge===C.select("domReferenceElement")&&z(B,!0)}}),V.addEventListener("mousemove",M.handler),M.handler(B);return}(M.pointerType!=="touch"||!Ne(C.select("floatingElement"),B.relatedTarget))&&z(B)}function ne(B){Ne(q,B.relatedTarget)||(M.openChangeTimeout.clear(),M.restTimeout.clear(),M.restTimeoutPending=!1)}const R=T?Pe(q,"mouseout",ne):void 0;return m?Gn(Pe(q,"mousemove",P,{once:!0}),Pe(q,"mouseenter",P),Pe(q,"mouseleave",K),R):Gn(Pe(q,"mouseenter",P),Pe(q,"mouseleave",K),R)},[ie,F,O,L,C,l,k,M,y,ee,Q,f,m,j,h,N,H,v,$,I,T]),b.useMemo(()=>{if(!l)return;function z(q){M.pointerType=q.pointerType}return{onPointerDown:z,onPointerEnter:z,onMouseMove(q){const{nativeEvent:P}=q,K=q.currentTarget,ne=C.select("domReferenceElement"),R=C.select("open"),B=ee(ne,K,q.target);if(f&&!ui(M.pointerType))return;if(R&&B&&M.handleCloseOptions?.blockPointerEvents){const oe=C.select("floatingElement");if(oe){const ae=M.handleCloseOptions?.getScope?.()??K.ownerDocument.body;qv(M,{scopeElement:ae,referenceElement:K,floatingElement:oe})}}const W=wy(j.current);if(R&&!B||W===0||!B&&M.restTimeoutPending&&q.movementX**2+q.movementY**2<2)return;M.restTimeout.clear();function V(){if(M.restTimeoutPending=!1,Q())return;const oe=C.select("open");!M.blockMouseMove&&(!oe||B)&&I()&&C.setOpen(!0,Ke(Lt,P,K))}M.pointerType==="touch"?Xn.flushSync(()=>{V()}):B&&R?V():(M.restTimeoutPending=!0,M.restTimeout.start(W,V))}}},[l,M,Q,ee,f,C,j,I])}const zw="Escape";function tb(n){return pi&&n.movementX===0&&n.movementY===0}function Ws(n,i,l){switch(n){case"vertical":return i;case"horizontal":return l;default:return i||l}}function ps(n,i){return Ws(i,n===Pb||n===Od,n===qs||n===Vs)}function jf(n,i,l){return Ws(i,n===Od,l?n===qs:n===Vs)||n==="Enter"||n===" "||n===""}function _w(n,i,l){return Ws(i,l?n===qs:n===Vs,n===Od)}function kw(n,i,l,r){const u=l?n===Vs:n===qs,f=n===Pb;return i==="both"||i==="horizontal"&&r?n===zw:Ws(i,u,f)}function jw(n,i){const{listRef:l,activeIndex:r,onNavigate:u=()=>{},enabled:f=!0,selectedIndex:d=null,allowEscape:m=!1,loopFocus:h=!1,nested:p=!1,rtl:y=!1,virtual:v=!1,focusItemOnOpen:S="auto",focusItemOnHover:w=!0,openOnArrowKeyDown:T=!0,disabledIndices:C=void 0,orientation:O="vertical",parentOrientation:A,id:N,resetOnPointerLeave:M=!0,externalTree:D,grid:k}=i,L=k!=null,j="rootStore"in n?n.rootStore:n,H=j.useState("open"),J=j.useState("floatingElement"),$=j.useState("domReferenceElement"),Q=j.context.dataRef,I=Jf(J),ee=Wf($),ie=jt(I),F=Ii(),z=hi(D),q=b.useRef(S),P=b.useRef(d??-1),K=b.useRef(null),ne=b.useRef(!0),R=Oe(fe=>{u(P.current===-1?null:P.current,fe)}),B=b.useRef(!!J),W=b.useRef(H),V=b.useRef(!1),oe=b.useRef(!1),ae=b.useRef(null),ge=jt(C),ue=jt(H),pe=jt(d),Re=jt(M),ke=Pl(),ve=Pl(),me=Oe(()=>{function fe(be){v?z?.events.emit("virtualfocus",be):ae.current=Ss(be,{sync:V.current,preventScroll:!0})}const ye=l.current[P.current],de=oe.current;ye&&fe(ye),(V.current?be=>be():be=>ke.request(be))(()=>{const be=l.current[P.current]||ye;if(!be)return;ye||fe(be),Ee&&(de||!ne.current)&&be.scrollIntoView?.({block:"nearest",inline:"nearest"})})});Se(()=>{Q.current.orientation=O},[Q,O]),Se(()=>{f&&(H&&J?(P.current=d??-1,q.current&&d!=null&&(oe.current=!0,R())):B.current&&(P.current=-1,R()))},[f,H,J,d,R]),Se(()=>{if(f){if(!H){V.current=!1;return}if(J)if(r==null){if(V.current=!1,pe.current!=null)return;if(B.current&&(P.current=-1,me()),(!W.current||!B.current)&&q.current&&(K.current!=null||q.current===!0&&K.current==null)){let fe=0;const ye=()=>{l.current[0]==null?(fe<2&&(fe?le=>ve.request(le):queueMicrotask)(ye),fe+=1):(P.current=K.current==null||jf(K.current,O,y)||p?vs(l):td(l),K.current=null,R())};ye()}}else Ll(l.current,r)||(P.current=r,me(),oe.current=!1)}},[f,H,J,r,pe,p,l,O,y,R,me,ve]),Se(()=>{if(!f||J||!z||v||!B.current)return;const fe=z.nodesRef.current,ye=fe.find(be=>be.id===F)?.context?.elements.floating,de=kt(Fe($??ye??null)),le=fe.some(be=>be.context&&Ne(be.context.elements.floating,de));ye&&!le&&ne.current&&ye.focus({preventScroll:!0})},[f,J,$,z,F,v]),Se(()=>{W.current=H,B.current=!!J}),Se(()=>{H||(K.current=null,q.current=S)},[H,S]);const je=r!=null,Le=Oe(fe=>{if(!ue.current)return;const ye=l.current.indexOf(fe.currentTarget);ye!==-1&&(P.current!==ye||r!==ye)&&(P.current=ye,R(fe))}),Ve=Oe(()=>A??z?.nodesRef.current.find(fe=>fe.id===F)?.context?.dataRef?.current.orientation),Te=Oe(()=>vs(l,ge.current)),Ue=Oe(fe=>{if(ne.current=!1,V.current=!0,fe.which===229||!ue.current&&fe.currentTarget===ie.current)return;if(p&&kw(fe.key,O,y,L)){ps(fe.key,Ve())||$n(fe),j.setOpen(!1,Ke($f,fe.nativeEvent)),dt($)&&(v?z?.events.emit("virtualfocus",$):$.focus());return}const ye=P.current,de=vs(l,C),le=td(l,C);if(ee||(fe.key==="Home"&&($n(fe),P.current=de,R(fe)),fe.key==="End"&&($n(fe),P.current=le,R(fe))),k!=null){const be=k(fe,P.current,l,O,h,y,C,de,le);if(be!=null&&(P.current=be,R(fe)),O==="both")return}if(ps(fe.key,O)){if($n(fe),H&&!v&&kt(fe.currentTarget.ownerDocument)===fe.currentTarget){P.current=jf(fe.key,O,y)?de:le,R(fe);return}jf(fe.key,O,y)?h?ye>=le?m&&ye!==l.current.length?P.current=-1:(V.current=!1,P.current=de):P.current=wo(l.current,{startingIndex:ye,disabledIndices:C}):P.current=Math.min(le,wo(l.current,{startingIndex:ye,disabledIndices:C})):h?ye<=de?m&&ye!==-1?P.current=l.current.length:(V.current=!1,P.current=le):P.current=wo(l.current,{startingIndex:ye,decrement:!0,disabledIndices:C}):P.current=Math.max(de,wo(l.current,{startingIndex:ye,decrement:!0,disabledIndices:C})),Ll(l.current,P.current)&&(P.current=-1),R(fe)}}),Ee=b.useMemo(()=>({onFocus(ye){V.current=!0,Le(ye)},onClick:({currentTarget:ye})=>ye.focus({preventScroll:!0}),onMouseMove(ye){tb(ye)||(V.current=!0,oe.current=!1,w&&Le(ye))},onPointerLeave(ye){if(!ue.current||!ne.current||ye.pointerType==="touch")return;V.current=!0;const de=ye.relatedTarget;if(!(!w||l.current.includes(de))&&Re.current&&(ae.current?.(),ae.current=null,P.current=-1,R(ye),!v)){const le=ie.current,be=kt(Fe(le));le&&Ne(le,be)&&le.focus({preventScroll:!0})}}}),[Le,ue,ie,w,l,R,Re,v]),we=b.useMemo(()=>v&&H&&je&&{"aria-activedescendant":`${N}-${r}`},[v,H,je,N,r]),Ae=b.useMemo(()=>({...ee?{}:we,onKeyDown(fe){if(fe.key==="Tab"&&fe.shiftKey&&H&&!v){const ye=St(fe.nativeEvent);if(ye&&!Ne(ie.current,ye))return;$n(fe),j.setOpen(!1,Ke(_a,fe.nativeEvent)),dt($)&&$.focus();return}Ue(fe)},onPointerMove(fe){tb(fe)||(ne.current=!0)}}),[we,Ue,ie,ee,j,H,v,$]),Qe=b.useMemo(()=>{function fe(le){j.setOpen(!0,Ke($f,le.nativeEvent,le.currentTarget))}function ye(le){S==="auto"&&Td(le.nativeEvent)&&(q.current=!v)}function de(le){q.current=S,S==="auto"&&Ed(le.nativeEvent)&&(q.current=!0)}return{onKeyDown(le){const be=j.select("open");ne.current=!1;const Be=le.key.startsWith("Arrow"),Ut=_w(le.key,Ve(),y),tn=ps(le.key,O),Tt=(p?Ut:tn)||le.key==="Enter"||le.key.trim()==="";if(v&&be)return Ue(le);if(!(!be&&!T&&Be)){if(Tt){const xe=ps(le.key,Ve());K.current=p&&xe?null:le.key}if(p){Ut&&($n(le),be?(P.current=Te(),R(le)):fe(le));return}tn&&(pe.current!=null&&(P.current=pe.current),$n(le),!be&&T?fe(le):Ue(le),be&&R(le))}},onFocus(le){j.select("open")&&!v&&(P.current=-1,R(le))},onPointerDown:de,onPointerEnter:de,onMouseDown:ye,onClick:ye}},[Ue,S,Te,p,R,j,T,O,Ve,y,pe,v]),Me=b.useMemo(()=>({...we,...Qe}),[we,Qe]);return b.useMemo(()=>f?{reference:Me,floating:Ae,item:Ee,trigger:Qe}:{},[f,Me,Ae,Qe,Ee])}function Hw(n,i){const{listRef:l,elementsRef:r,activeIndex:u,onMatch:f,disabledIndices:d,onTyping:m,enabled:h=!0,resetMs:p=750,selectedIndex:y=null}=i,v="rootStore"in n?n.rootStore:n,S=v.useState("open"),w=$t(),T=b.useRef(""),C=b.useRef(y??u??-1),O=b.useRef(null),A=Oe(D=>{function k(ie){return r?.current[ie]}function L(ie){const F=k(ie);return F&&!Qs(F)||F?.matches(":disabled")?!1:d==null||!Ma(Mo,ie,d)}function j(ie,F,z=0){if(ie.length===0)return-1;const q=(z%ie.length+ie.length)%ie.length,P=F.toLowerCase();for(let K=0;K<ie.length;K+=1){const ne=(q+K)%ie.length;if(!(!ie[ne]?.toLowerCase().startsWith(P)||!L(ne)))return ne}return-1}const H=l.current;if(T.current.length>0&&D.key===" "&&($n(D),m?.(!0)),T.current.length>0&&T.current[0]!==" "&&j(H,T.current)===-1&&D.key!==" "&&m?.(!1),H==null||D.key.length!==1||D.ctrlKey||D.metaKey||D.altKey)return;S&&D.key!==" "&&($n(D),m?.(!0));const J=T.current==="";J&&(C.current=y??u??-1),H.every((ie,F)=>ie&&L(F)?ie[0]?.toLowerCase()!==ie[1]?.toLowerCase():!0)&&T.current===D.key&&(T.current="",C.current=O.current),T.current+=D.key,w.start(p,()=>{T.current="",C.current=O.current,m?.(!1)});const I=((J?y??u??-1:C.current)??0)+1,ee=j(H,T.current,I);ee!==-1?(f?.(ee),O.current=ee):D.key!==" "&&(T.current="",m?.(!1))}),N=Oe(D=>{const k=D.relatedTarget,L=v.select("domReferenceElement"),j=v.select("floatingElement");Ne(L,k)||Ne(j,k)||(w.clear(),T.current="",C.current=O.current,m?.(!1))});Se(()=>{!S&&y!==null||(w.clear(),O.current=null,T.current!==""&&(T.current=""))},[S,y,w]);const M=b.useMemo(()=>({onKeyDown:A,onBlur:N}),[A,N]);return b.useMemo(()=>h?{reference:M,floating:M}:{},[h,M])}const nb=.1,Lw=nb*nb,ft=.5;function hs(n,i,l,r,u,f){return r>=i!=f>=i&&n<=(u-l)*(i-r)/(f-r)+l}function gs(n,i,l,r,u,f,d,m,h,p){let y=!1;return hs(n,i,l,r,u,f)&&(y=!y),hs(n,i,u,f,d,m)&&(y=!y),hs(n,i,d,m,h,p)&&(y=!y),hs(n,i,h,p,l,r)&&(y=!y),y}function Uw(n,i,l){return n>=l.x&&n<=l.x+l.width&&i>=l.y&&i<=l.y+l.height}function ms(n,i,l,r,u,f){const d=Math.min(l,u),m=Math.max(l,u),h=Math.min(r,f),p=Math.max(r,f);return n>=d&&n<=m&&i>=h&&i<=p}function Xv(n={}){const{blockPointerEvents:i=!1}=n,l=new vn,r=({x:u,y:f,placement:d,elements:m,onClose:h,nodeId:p,tree:y})=>{const v=d?.split("-")[0];let S=!1,w=null,T=null,C=typeof performance<"u"?performance.now():0;function O(N,M){const D=performance.now(),k=D-C;if(w===null||T===null||k===0)return w=N,T=M,C=D,!1;const L=N-w,j=M-T,H=L*L+j*j,J=k*k*Lw;return w=N,T=M,C=D,H<J}function A(){l.clear(),h()}return function(M){l.clear();const D=m.domReference,k=m.floating;if(!D||!k||v==null||u==null||f==null)return;const{clientX:L,clientY:j}=M,H=St(M),J=M.type==="mouseleave",$=Ne(k,H),Q=Ne(D,H);if($&&(S=!0,!J))return;if(Q&&(S=!1,!J)){S=!0;return}if(J&&Je(M.relatedTarget)&&Ne(k,M.relatedTarget))return;function I(){return!!(y&&di(y.nodesRef.current,p).length>0)}function ee(){I()||A()}if(I())return;const ie=D.getBoundingClientRect(),F=k.getBoundingClientRect(),z=u>F.right-F.width/2,q=f>F.bottom-F.height/2,P=F.width>ie.width,K=F.height>ie.height,ne=(P?ie:F).left,R=(P?ie:F).right,B=(K?ie:F).top,W=(K?ie:F).bottom;if(v==="top"&&f>=ie.bottom-1||v==="bottom"&&f<=ie.top+1||v==="left"&&u>=ie.right-1||v==="right"&&u<=ie.left+1){ee();return}let V=!1;switch(v){case"top":V=ms(L,j,ne,ie.top+1,R,F.bottom-1);break;case"bottom":V=ms(L,j,ne,F.top+1,R,ie.bottom-1);break;case"left":V=ms(L,j,F.right-1,W,ie.left+1,B);break;case"right":V=ms(L,j,ie.right-1,W,F.left+1,B);break}if(V)return;if(S&&!Uw(L,j,ie)){ee();return}if(!J&&O(L,j)){ee();return}let oe=!1;switch(v){case"top":{const ae=P?ft/2:ft*4,ge=P||z?u+ae:u-ae,ue=P?u-ae:z?u+ae:u-ae,pe=f+ft+1,Re=z||P?F.bottom-ft:F.top,ke=z?P?F.bottom-ft:F.top:F.bottom-ft;oe=gs(L,j,ge,pe,ue,pe,F.left,Re,F.right,ke);break}case"bottom":{const ae=P?ft/2:ft*4,ge=P||z?u+ae:u-ae,ue=P?u-ae:z?u+ae:u-ae,pe=f-ft,Re=z||P?F.top+ft:F.bottom,ke=z?P?F.top+ft:F.bottom:F.top+ft;oe=gs(L,j,ge,pe,ue,pe,F.left,Re,F.right,ke);break}case"left":{const ae=K?ft/2:ft*4,ge=K||q?f+ae:f-ae,ue=K?f-ae:q?f+ae:f-ae,pe=u+ft+1,Re=q||K?F.right-ft:F.left,ke=q?K?F.right-ft:F.left:F.right-ft;oe=gs(L,j,Re,F.top,ke,F.bottom,pe,ge,pe,ue);break}case"right":{const ae=K?ft/2:ft*4,ge=K||q?f+ae:f-ae,ue=K?f-ae:q?f+ae:f-ae,pe=u-ft,Re=q||K?F.left+ft:F.right,ke=q?K?F.left+ft:F.right:F.left+ft;oe=gs(L,j,pe,ge,pe,ue,Re,F.top,ke,F.bottom);break}}oe?S||l.start(40,ee):ee()}};return r.__options={...n,blockPointerEvents:i},r}const Bw={...np,disabled:n=>n.disabled,instantType:n=>n.instantType,isInstantPhase:n=>n.isInstantPhase,trackCursorAxis:n=>n.trackCursorAxis,disableHoverablePopup:n=>n.disableHoverablePopup,lastOpenChangeReason:n=>n.openChangeReason,closeOnClick:n=>n.closeOnClick,closeDelay:n=>n.closeDelay,adaptiveOrigin:n=>n.adaptiveOrigin};class Iw extends Xl{constructor(i,l,r){const u=new $d;super(Pw(i,u,l,r),Yw(u),Bw)}setOpen=(i,l)=>{Cw(this,i,l,{extraState:{openChangeReason:l.reason}})};cancelPendingOpen(i){this.state.floatingRootContext.dispatchOpenChange(!1,Ke(ja,i))}}function Pw(n,i,l,r=!1){return{...ep(i,l,r),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,adaptiveOrigin:void 0,...n}}function Yw(n){return{popupRef:b.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:n}}const qw=js(function(i){const{disabled:l=!1,defaultOpen:r=!1,open:u,disableHoverablePopup:f=!1,trackCursorAxis:d="none",actionsRef:m,onOpenChange:h,onOpenChangeComplete:p,handle:y,triggerId:v,defaultTriggerId:S=null,children:w}=i,T=Lv((Q,I)=>new Iw({open:r,openProp:u,activeTriggerId:S,triggerIdProp:v},Q,I));T.useControlledProp("openProp",u),T.useControlledProp("triggerIdProp",v),T.useContextCallback("onOpenChange",h),T.useContextCallback("onOpenChangeComplete",p);const C=T.useState("open"),O=!l&&C,A=T.useState("activeTriggerId"),N=T.useState("mounted"),M=T.useState("payload");T.useSyncedValues({trackCursorAxis:d,disableHoverablePopup:f,disabled:l}),Zd(T,{closeOnActiveTriggerUnmount:!0});const{forceUnmount:D,transitionStatus:k}=Wd(O,T),L=T.useState("isInstantPhase"),j=T.useState("instantType"),H=T.useState("lastOpenChangeReason"),J=b.useRef(null);Se(()=>{C&&l&&T.setOpen(!1,Ke(Xb))},[C,l,T]),Se(()=>{k==="ending"&&H===Fs||k!=="ending"&&L?(j!=="delay"&&(J.current=j),T.set("instantType","delay")):J.current!==null&&(T.set("instantType",J.current),J.current=null)},[k,L,H,j,T]),Se(()=>{O&&A==null&&T.set("payload",void 0)},[T,A,O]),b.useImperativeHandle(m,()=>({unmount:D,close:()=>T.setOpen(!1,Ke(Nd))}),[D,T]);const $=O||N||!l&&d!=="none";return E.jsxs(Ub.Provider,{value:T,children:[y&&E.jsx(Kd,{handle:y,store:T}),$&&E.jsx(Vw,{store:T,disabled:l,trackCursorAxis:d}),typeof w=="function"?w({payload:M}):w]})});function Vw({store:n,disabled:i,trackCursorAxis:l}){const r=n.useState("floatingRootContext"),u=qd(r,{enabled:!i,referencePress:()=>n.select("closeOnClick")}),f=wE(r,{enabled:!i&&l!=="none",axis:l==="none"?void 0:l}),d=b.useMemo(()=>Ao(f.reference,u.reference),[f.reference,u.reference]);return Jd(n,{activeTriggerProps:d,inactiveTriggerProps:d,popupProps:u.floating??Rt}),null}function Pi(n){return Ui(n,"base-ui")}const Fv=b.createContext(void 0);function Gw(){return b.useContext(Fv)}const Xw=600,Kv="data-base-ui-tooltip-trigger";function ob(n){if("composedPath"in n){const l=n.composedPath();for(let r=0;r<l.length;r+=1){const u=l[r];if(Je(u))return u}}const i=n.target;return Je(i)?i:null}function Fw(n){let i=n;for(;i;){const l=i.closest(`[${Kv}]`);if(l)return l;const r=i.getRootNode();i="host"in r&&Je(r.host)?r.host:null}return null}const Kw=Lb(function(i,l){const{render:r,className:u,style:f,handle:d,payload:m,disabled:h,delay:p,closeOnClick:y=!0,closeDelay:v,id:S,...w}=i,T=Hs(!0),O=Pv(d)??T;if(!O)throw new Error(Zt(82));const A=Pi(S),N=O.useState("isTriggerActive",A),M=O.useState("isOpenedByTrigger",A),D=O.useState("floatingRootContext"),k=b.useRef(null),L=v??0,{registerTrigger:j,isMountedByThisTrigger:H}=Bv(A,k,O,{payload:m,closeOnClick:y,closeDelay:L}),J=Gw(),{activeIdRef:$,delayRef:Q,isInstantPhase:I,hasProvider:ee}=y1(D,{open:M}),ie=ip(D);O.useSyncedValue("isInstantPhase",I);const F=O.useState("disabled"),z=h??F,q=jt(z),P=O.useState("trackCursorAxis"),K=O.useState("disableHoverablePopup"),ne=b.useRef(!1),R=$t(),B=b.useRef(void 0);function W(){return ee&&$.current!=null?0:p??J??Xw}function V(me){const je=k.current;if(!je||!me)return!1;const Le=Fw(me);return Le!==null&&Le!==je&&Ne(je,Le)}function oe(me){const je=V(me);return ne.current=je,je&&(ie.openChangeTimeout.clear(),ie.restTimeout.clear(),ie.restTimeoutPending=!1,R.clear()),je}const ae=Gv(D,{enabled:!z,mouseOnly:!0,move:!1,handleClose:!K&&P!=="both"?Xv():null,restMs:W,delay(){return v==null&&ee?{close:ji(Q.current,"close")}:{close:L}},triggerElementRef:k,isActiveTrigger:N,isClosing:()=>O.select("transitionStatus")==="ending",shouldOpen(){return!ne.current}}),ge=Yv(D,{enabled:!z}).reference,ue=me=>{const je=ne.current,Le=ob(me),Ve=oe(Le),Te=k.current,Ue=Te&&Le&&Ne(Te,Le);if(Ve&&O.select("open")&&O.select("lastOpenChangeReason")===Lt){O.setOpen(!1,Ke(Lt,me));return}if(je&&!Ve&&Ue&&!q.current&&!O.select("open")&&Te&&ui(B.current)){const Ee=()=>{!ne.current&&!q.current&&!O.select("open")&&O.setOpen(!0,Ke(Lt,me,Te))},we=W();we===0?(R.clear(),Ee()):R.start(we,Ee)}},pe=O.useState("triggerProps",H);return bt("button",i,{state:{open:M},ref:[l,j,k],props:[ae,ge,H||P!=="none"?pe:void 0,{onMouseOver(me){ue(me.nativeEvent)},onFocus(me){V(ob(me.nativeEvent))&&me.preventBaseUIHandler()},onMouseLeave(){ne.current=!1,R.clear(),B.current=void 0},onPointerEnter(me){B.current=me.pointerType},onPointerDown(me){B.current=me.pointerType,O.set("closeOnClick",y),y&&!O.select("open")&&O.cancelPendingOpen(me.nativeEvent)},onClick(me){y&&!O.select("open")&&O.cancelPendingOpen(me.nativeEvent)},id:A,[Zf]:z?"":void 0,[Kv]:z?void 0:""},w],stateAttributesMapping:s1})}),Qv=b.createContext(void 0);function Qw(){const n=b.useContext(Qv);if(n===void 0)throw new Error(Zt(70));return n}const Zv=b.forwardRef(function(i,l){const{children:r,container:u,className:f,render:d,style:m,...h}=i,{node:p,subtree:y}=bv({container:u,ref:l,componentProps:i,elementProps:h});return!y&&!p?null:E.jsxs(b.Fragment,{children:[y,p&&Xn.createPortal(r,p)]})}),Zw=b.forwardRef(function(i,l){const{keepMounted:r=!1,...u}=i;return Hs().useState("mounted")||r?E.jsx(Qv.Provider,{value:r,children:E.jsx(Zv,{ref:l,...u})}):null}),Wv=b.createContext(void 0);function Ww(){const n=b.useContext(Wv);if(n===void 0)throw new Error(Zt(71));return n}const Jw=b.createContext(void 0);function ap(){return b.useContext(Jw)?.direction??"ltr"}const $w=n=>({name:"arrow",options:n,async fn(i){const{x:l,y:r,placement:u,rects:f,platform:d,elements:m,middlewareData:h}=i,{element:p,padding:y=0,offsetParent:v="real"}=fi(n,i)||{};if(p==null)return{};const S=Jb(y),w={x:l,y:r},T=jd(u),C=kd(T),O=await d.getDimensions(p),A=T==="y",N=A?"top":"left",M=A?"bottom":"right",D=A?"clientHeight":"clientWidth",k=f.reference[C]+f.reference[T]-w[T]-f.floating[C],L=w[T]-f.reference[T],j=v==="real"?await d.getOffsetParent?.(p):m.floating;let H=m.floating[D]||f.floating[C];(!H||!await d.isElement?.(j))&&(H=m.floating[D]||f.floating[C]);const J=k/2-L/2,$=H/2-O[C]/2-1,Q=Math.min(S[N],$),I=Math.min(S[M],$),ee=Q,ie=H-O[C]-I,F=H/2-O[C]/2+J,z=Wb(ee,F,ie),q=!h.arrow&&No(u)!=null&&F!==z&&f.reference[C]/2-(F<ee?Q:I)-O[C]/2<0,P=q?F<ee?F-ee:F-ie:0;return{[T]:w[T]+P,data:{[T]:z,centerOffset:F-z-P,...q&&{alignmentOffset:P}},reset:q}}}),eR=(n,i)=>{const{name:l,fn:r}=$w(n);return{name:l,fn:r,options:[n,i]}},tR={name:"hide",async fn(n){const{width:i,height:l,x:r,y:u}=n.rects.reference,f=i===0&&l===0&&r===0&&u===0,d=await n.platform.detectOverflow(n,{elementContext:"reference"});return{data:{referenceHidden:d.top-l>=0||d.right-i>=0||d.bottom-l>=0||d.left-i>=0||f}}}},nR={sideX:"left",sideY:"top"},oR="--available-width",iR="--available-height",aR="--anchor-width",lR="--anchor-height",rR="--transform-origin",ib=oR,ab=iR;function Jv(n,i,l){const r=n==="inline-start"||n==="inline-end";return{top:"top",right:r?l?"inline-start":"inline-end":"right",bottom:"bottom",left:r?l?"inline-end":"inline-start":"left"}[i]}function lb(n,i,l){const{rects:r,placement:u}=n;return{side:Jv(i,Hn(u),l),align:No(u)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function $v(n){return sR(n,Mw)}function sR(n,i){const{anchor:l,positionMethod:r="absolute",side:u="bottom",sideOffset:f=0,align:d="center",alignOffset:m=0,collisionBoundary:h,collisionPadding:p=5,sticky:y=!1,arrowPadding:v=5,disableAnchorTracking:S=!1,inline:w,keepMounted:T=!1,floatingRootContext:C,mounted:O,collisionAvoidance:A,shift:N,nodeId:M,adaptiveOrigin:D,lazyFlip:k=!1,externalTree:L}=n,[j,H]=b.useState(null);!O&&j!==null&&H(null);const J=A.side||"flip",$=A.align||"flip",Q=A.fallbackAxisSide||"end",I=N?.crossAxis??!1,ee=N?.rootBoundary,ie=typeof l=="function"?l:void 0,F=Oe(ie),z=ie?F:l,q=jt(l),P=jt(O),ne=ap()==="rtl",R=j||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":ne?"left":"right","inline-start":ne?"right":"left"}[u],B=d==="center"?R:`${R}-${d}`;let W=p;typeof W=="number"?W={top:W,right:W,bottom:W,left:W}:W&&(W={top:W.top||0,right:W.right||0,bottom:W.bottom||0,left:W.left||0});const V=1,oe=u==="bottom"?V:0,ae=u==="top"?V:0,ge=u==="right"?V:0,ue=u==="left"?V:0,pe={boundary:h==="clipping-ancestors"?"clippingAncestors":h,padding:W},Re=b.useRef(null),ke=jt(f),ve=jt(m),me=typeof f!="function"?f:0,je=typeof m!="function"?m:0,Le=[];w&&Le.push(w),Le.push(rw(Xe=>{const xt=lb(Xe,u,ne),Yt=typeof ke.current=="function"?ke.current(xt):ke.current,Mt=typeof ve.current=="function"?ve.current(xt):ve.current;return{mainAxis:Yt,crossAxis:Mt,alignmentAxis:Mt}},[me,je,ne,u]));const Ve=$==="none"&&J!=="shift",Te=!Ve&&(y||I||J==="shift"),Ue=J==="none"?null:cw({...pe,padding:{top:W.top+V+oe,right:W.right+V+ue,bottom:W.bottom+V+ae,left:W.left+V+ge},mainAxis:!I&&J==="flip",crossAxis:$==="flip"?"alignment":!1,fallbackAxisSideDirection:Q}),Ee=Ve?null:sw({...pe,rootBoundary:ee,mainAxis:$!=="none",crossAxis:Te,limiter:y||I?void 0:uw(Xe=>{if(!Re.current)return{};const{width:xt,height:Yt}=Re.current.getBoundingClientRect(),Mt=jn(Hn(Xe.placement)),Kn=Mt==="y"?xt:Yt,nn=Mt==="y"?W.left+W.right:W.top+W.bottom;return{offset:Kn/2+nn/2}})},[pe,y,I,ee,W,$]);J==="shift"||$==="shift"||d==="center"?Le.push(Ee,Ue):Le.push(Ue,Ee),Le.push(fw({...pe,apply({elements:{floating:Xe},availableWidth:xt,availableHeight:Yt,rects:Mt}){if(!P.current)return;const Kn=Xe.style;Kn.setProperty(ib,`${xt}px`),Kn.setProperty(ab,`${Yt}px`);const nn=yt(Xe).devicePixelRatio||1,{x:ko,y:wn,width:qi,height:In}=Mt.reference,jo=(Math.round((ko+qi)*nn)-Math.round(ko*nn))/nn,Ho=(Math.round((wn+In)*nn)-Math.round(wn*nn))/nn;Kn.setProperty(aR,`${jo}px`),Kn.setProperty(lR,`${Ho}px`)}}),eR(Xe=>({element:Re.current||Fe(Xe.elements.floating).createElement("div"),padding:Re.current?v:0,offsetParent:"floating"}),[v]),{name:"transformOrigin",fn(Xe){const{elements:{floating:xt},middlewareData:Yt,placement:Mt,platform:Kn,rects:nn,y:ko}=Xe,wn=Hn(Mt),qi=No(Mt),In=jn(wn)==="y",jo=Re.current,Ho=typeof f=="function"?f(lb(Xe,u,ne)):f;let Lo;if(!jo&&qi&&Math.abs(In?Yt.shift?.x||0:Yt.shift?.y||0)<=1)Lo=qi==="start"===(In&&Kn.isRTL?.(xt)===!0)?"100%":"0%";else{const Kl=In?Yt.arrow?.x||0:Yt.arrow?.y||0,Ql=In?jo?.clientWidth||0:jo?.clientHeight||0;Lo=`${Kl+Ql/2}px`}let gi=wn==="top"||wn==="left"?`calc(100% + ${Ho}px)`:`${-Ho}px`;return Te&&In&&Math.abs(Yt.shift?.y||0)>Ho&&(gi=`${nn.reference.y+nn.reference.height/2-ko}px`),xt.style.setProperty(rR,In?`${Lo} ${gi}`:`${gi} ${Lo}`),{}}},tR,D),Se(()=>{!O&&C&&C.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[O,C]);const we=b.useMemo(()=>({ancestorScroll:!S,elementResize:!S&&typeof ResizeObserver<"u",layoutShift:!S&&typeof IntersectionObserver<"u"}),[S]),{refs:Ae,elements:Qe,x:Me,y:fe,middlewareData:ye,update:de,placement:le,context:be,isPositioned:Be,floatingStyles:Ut}=i({rootContext:C,open:T?O:void 0,placement:B,middleware:Le,strategy:r,whileElementsMounted:T?void 0:(...Xe)=>Fy(...Xe,we),nodeId:M,externalTree:L}),{sideX:tn,sideY:Tt}=ye.adaptiveOrigin||nR,xe=Be?r:"fixed",Ye=b.useMemo(()=>{let Xe;return Be?D?Xe={position:xe,[tn]:Me,[Tt]:fe}:Xe={...Ut,position:xe}:Xe={position:xe,top:0,left:0},Xe[ib]="100vw",Xe[ab]="100vh",Be||(Xe.opacity=0),Xe},[D,xe,tn,Me,Tt,fe,Ut,Be]),nt=b.useRef(null);Se(()=>{if(!O)return;const Xe=q.current,xt=typeof Xe=="function"?Xe():Xe,Mt=(rb(xt)?xt.current:xt)||null||null;Mt!==nt.current&&(Ae.setPositionReference(Mt),nt.current=Mt)},[O,Ae,z,q]),b.useEffect(()=>{if(!O)return;const Xe=q.current;typeof Xe!="function"&&rb(Xe)&&Xe.current!==nt.current&&(Ae.setPositionReference(Xe.current),nt.current=Xe.current)},[O,Ae,z,q]),b.useEffect(()=>{if(T&&O&&Qe.reference&&Qe.floating)return Fy(Qe.reference,Qe.floating,de,we)},[T,O,Qe,de,we]);const pt=Hn(le),Tn=Jv(u,pt,ne),Un=No(le)||"center",En=!!ye.hide?.referenceHidden;Se(()=>{k&&O&&Be&&pt!==R&&H(pt)},[k,O,Be,pt,R]);const At=b.useMemo(()=>({position:"absolute",top:ye.arrow?.y,left:ye.arrow?.x}),[ye.arrow]),Bn=ye.arrow?.centerOffset!==0;return b.useMemo(()=>({positionerStyles:Ye,arrowStyles:At,arrowRef:Re,arrowUncentered:Bn,side:Tn,align:Un,physicalSide:pt,anchorHidden:En,refs:Ae,context:be,isPositioned:Be,update:de}),[Ye,At,Re,Bn,Tn,Un,pt,En,Ae,be,Be,de])}function rb(n){return n!=null&&"current"in n}function lp(n){return n==="starting"?uE:Rt}function e0(n,i,{styles:l,transitionStatus:r,props:u,refs:f,hidden:d,inert:m=!1}){const h={...l};return m&&(h.pointerEvents="none"),bt("div",n,{state:i,ref:f,props:[{role:"presentation",hidden:d,style:h},lp(r),u],stateAttributesMapping:Ad})}const uR=b.forwardRef(function(i,l){const{render:r,className:u,anchor:f,positionMethod:d="absolute",side:m="top",align:h="center",sideOffset:p=0,alignOffset:y=0,collisionBoundary:v="clipping-ancestors",collisionPadding:S=5,arrowPadding:w=5,sticky:T=!1,disableAnchorTracking:C=!1,collisionAvoidance:O=gv,style:A,...N}=i,M=Hs(),D=Qw(),k=M.useState("open"),L=M.useState("mounted"),j=M.useState("trackCursorAxis"),H=M.useState("disableHoverablePopup"),J=M.useState("floatingRootContext"),$=M.useState("instantType"),Q=M.useState("transitionStatus"),I=M.useState("adaptiveOrigin"),ee=$v({anchor:f,positionMethod:d,floatingRootContext:J,mounted:L,side:m,sideOffset:p,align:h,alignOffset:y,collisionBoundary:v,collisionPadding:S,sticky:T,arrowPadding:w,disableAnchorTracking:C,keepMounted:D,collisionAvoidance:O,adaptiveOrigin:I}),ie=b.useMemo(()=>({open:k,side:ee.side,align:ee.align,anchorHidden:ee.anchorHidden,instant:j!=="none"?"tracking-cursor":$}),[k,ee.side,ee.align,ee.anchorHidden,j,$]),F=e0(i,ie,{styles:ee.positionerStyles,transitionStatus:Q,props:N,refs:[l,M.useStateSetter("positionerElement")],hidden:!L,inert:!k||j==="both"||H});return E.jsx(Wv.Provider,{value:ee,children:F})}),cR=b.forwardRef(function(i,l){const{render:r,className:u,style:f,...d}=i,m=Hs(),{side:h,align:p}=Ww(),y=m.useState("open"),v=m.useState("instantType"),S=m.useState("transitionStatus"),w=m.useState("popupProps"),T=m.useState("floatingRootContext"),C=m.useState("disabled"),O=m.useState("closeDelay");Ha({open:y,ref:m.context.popupRef,onComplete(){y&&m.context.onOpenChangeComplete?.(!0)}}),Vv(T,{enabled:!C,closeDelay:O});const A=m.useStateSetter("popupElement");return bt("div",i,{state:{open:y,side:h,align:p,instant:v,transitionStatus:S},ref:[l,m.context.popupRef,A],props:[Fd,w,lp(S),d],stateAttributesMapping:Md})}),fR=function(i){const{delay:l,closeDelay:r,timeout:u=400}=i,f=b.useMemo(()=>({open:l,close:r}),[l,r]);return E.jsx(Fv.Provider,{value:l,children:E.jsx(m1,{delay:f,timeoutMs:u,children:i.children})})};function Js(n){return Ud(19)?n:n?"true":void 0}function t0({label:n,shortcut:i,side:l="bottom",children:r}){return E.jsxs(qw,{children:[E.jsx(Kw,{render:r}),E.jsx(Zw,{children:E.jsx(uR,{side:l,sideOffset:6,className:"z-[1000]",children:E.jsxs(cR,{className:"rounded-md bg-fg px-2 py-1 text-xs text-surface shadow-popup data-[starting-style]:opacity-0 data-[ending-style]:opacity-0 transition-opacity",children:[n,i?E.jsx("span",{className:"ml-2 opacity-60",children:i}):null]})})})]})}function dR({children:n}){return E.jsx(fR,{delay:500,closeDelay:0,children:n})}function pR(n){return n.repeat&&(n.key==="Enter"||n.key===" ")}function _s(n){pR(n)&&n.target===n.currentTarget&&n.preventDefault()}function n0(n){return n?i=>{_s(i),n(i)}:_s}const hR=200,gR=2e3;function mR(n,i,l){let r=null,u=!1;const f=()=>{u||(u=!0,n.removeEventListener("keydown",d,!0),n.removeEventListener("keyup",d,!0),n.clearTimeout(m),r!==null&&n.clearTimeout(r))},d=h=>{const p=h.key==="Enter"||h.key===" ";if(h.type==="keyup"){h.key===" "&&!l(h.target)&&h.preventDefault(),h.key===i&&r===null&&(r=n.setTimeout(f,hR));return}p&&!l(h.target)&&(h.preventDefault(),h.stopImmediatePropagation())},m=n.setTimeout(f,gR);return n.addEventListener("keydown",d,!0),n.addEventListener("keyup",d,!0),f}const yR={primary:"bg-accent text-accent-fg hover:brightness-110 active:brightness-95",secondary:"bg-surface text-fg border border-line hover:bg-hover",ghost:"bg-transparent text-fg hover:bg-hover",danger:"bg-danger text-white hover:brightness-110"},bR={sm:"h-6 px-2 text-xs gap-1",md:"h-7 px-2.5 text-[13px] gap-1.5",lg:"h-8 px-3 text-[13px] gap-2"},fn=b.forwardRef(function({variant:i="secondary",size:l="md",icon:r,className:u,children:f,type:d="button",onKeyDown:m,...h},p){return E.jsxs("button",{ref:p,type:d,className:zo("inline-flex shrink-0 select-none items-center justify-center whitespace-nowrap rounded-control font-medium transition-[background,filter]","focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-accent","disabled:pointer-events-none disabled:opacity-45",yR[i],bR[l],u),...h,onKeyDown:n0(m),children:[r,f]})}),vR={sm:"size-6",md:"size-7",lg:"size-8"},o0=b.forwardRef(function({label:i,icon:l,shortcut:r,active:u,size:f="md",noTooltip:d,className:m,type:h="button",onKeyDown:p,...y},v){const S=E.jsx("button",{ref:v,type:h,"aria-label":i,"aria-pressed":u===void 0?void 0:u,className:zo("inline-flex shrink-0 items-center justify-center rounded-control text-fg-muted transition-colors","hover:bg-hover hover:text-fg focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-accent","disabled:pointer-events-none disabled:opacity-40",u&&"bg-accent-soft text-accent hover:bg-accent-soft hover:text-accent",vR[f],m),...y,onKeyDown:n0(p),children:l});return d?S:E.jsx(t0,{label:i,shortcut:r,children:S})}),i0=b.createContext(void 0);function a0(n){const i=b.useContext(i0);if(i===void 0&&!n)throw new Error(Zt(33));return i}const l0=b.createContext(void 0);function La(n){const i=b.useContext(l0);if(i===void 0&&!n)throw new Error(Zt(36));return i}const SR=b.createContext(void 0);function rp(n=!0){const i=b.useContext(SR);if(i===void 0&&!n)throw new Error(Zt(25));return i}function xR({controlled:n,default:i,name:l,state:r="value"}){const{current:u}=b.useRef(n!==void 0),[f,d]=b.useState(i),m=u&&n!==void 0?n:f,h=b.useCallback(p=>{u||d(p)},[]);return[m,h]}const r0=b.createContext(void 0);function $s(n=!1){const i=b.useContext(r0);if(i===void 0&&!n)throw new Error(Zt(16));return i}function TR(n){const{focusableWhenDisabled:i,disabled:l,composite:r=!1,tabIndex:u=0,isNativeButton:f}=n,d=r&&i!==!1,m=r&&i===!1;return{props:b.useMemo(()=>{const p={onKeyDown(y){l&&i&&y.key!=="Tab"&&y.preventDefault()}};return r||(p.tabIndex=u,!f&&l&&(p.tabIndex=i?u:-1)),(f&&(i||d)||!f&&l)&&(p["aria-disabled"]=l),f&&(!i||m)&&(p.disabled=l),p},[r,l,i,d,m,f,u])}}function Ts(n,i,{detail:l=0}={}){n.dispatchEvent(new(yt(n)).PointerEvent("click",{bubbles:!0,cancelable:!0,composed:!0,detail:l,shiftKey:i.shiftKey,ctrlKey:i.ctrlKey,altKey:i.altKey,metaKey:i.metaKey}))}function Ua(n={}){const{disabled:i=!1,focusableWhenDisabled:l,tabIndex:r=0,native:u=!0,composite:f}=n,d=b.useRef(null),m=$s(!0),h=f??m!==void 0,{props:p}=TR({focusableWhenDisabled:l,disabled:i,composite:h,tabIndex:r,isNativeButton:u}),y=b.useCallback(()=>{const w=d.current;Hf(w)&&h&&i&&p.disabled===void 0&&w.disabled&&(w.disabled=!1)},[i,p.disabled,h]);Se(y,[y]);const v=b.useCallback((w={})=>{const{onClick:T,onMouseDown:C,onKeyUp:O,onKeyDown:A,onPointerDown:N,...M}=w;return Ao({onClick(D){if(i){D.preventDefault();return}T?.(D)},onMouseDown(D){i||C?.(D)},onKeyDown(D){if(i||(Ms(D),A?.(D),D.baseUIHandlerPrevented))return;const k=D.target===D.currentTarget,L=D.currentTarget,j=Hf(L),H=!u&&ER(L),J=k&&(u?j:!H),$=D.key==="Enter",Q=D.key===" ",I=L.getAttribute("role"),ee=I?.startsWith("menuitem")||I==="option"||I==="gridcell";if(k&&h&&Q){if(D.defaultPrevented&&ee)return;D.preventDefault(),(!u||j)&&(D.preventBaseUIHandler(),Ts(L,D));return}if(!J||u||!Q&&!$){k&&H&&Q&&D.preventDefault();return}D.defaultPrevented||(D.preventDefault(),$&&(D.preventBaseUIHandler(),Ts(L,D)))},onKeyUp(D){if(!i){if(Ms(D),O?.(D),D.target===D.currentTarget&&u&&h&&Hf(D.currentTarget)&&D.key===" "){D.preventDefault();return}D.baseUIHandlerPrevented||D.target===D.currentTarget&&!u&&!h&&!D.defaultPrevented&&D.key===" "&&(D.preventBaseUIHandler(),Ts(D.currentTarget,D))}},onPointerDown(D){if(i){D.preventDefault();return}N?.(D)}},u?{type:"button"}:{role:"button"},p,M)},[i,p,h,u]),S=Oe(w=>{d.current=w,y()});return{getButtonProps:v,buttonRef:S}}function Hf(n){return dt(n)&&n.tagName==="BUTTON"}function ER(n){return dt(n)&&n.tagName==="A"&&!!n.href}function wR(n){const{closeOnClick:i,highlighted:l,id:r,nodeId:u,store:f,typingRef:d,itemRef:m,itemMetadata:h}=n,{events:p}=f.useState("floatingTreeRoot"),y=f.useState("open"),v=rp(!0),S=v!==void 0;return b.useMemo(()=>({id:r,role:"menuitem",tabIndex:y&&l?0:-1,onKeyDown(w){w.key===" "&&d?.current&&w.preventDefault()},onMouseMove(w){u&&p.emit("itemhover",{nodeId:u,target:w.currentTarget})},onClick(w){i&&p.emit("close",{domEvent:w,reason:Gb})},onMouseUp(w){if(v){const T=v.initialCursorPointRef.current;if(v.initialCursorPointRef.current=null,S&&T&&Math.abs(w.clientX-T.x)<=1&&Math.abs(w.clientY-T.y)<=1||S&&!Sd&&w.button===2)return}m.current&&f.context.allowMouseUpTriggerRef.current&&(!S||w.button===2)&&h.type==="regular-item"&&Ts(m.current,w,{detail:1})}}),[i,l,r,p,u,y,f,d,m,v,S,h])}const RR={type:"regular-item"};function CR(n){const{closeOnClick:i,disabled:l,highlighted:r,id:u,store:f,typingRef:d=f.context.typingRef,nativeButton:m,itemMetadata:h,nodeId:p}=n,y=b.useRef(null),{getButtonProps:v,buttonRef:S}=Ua({disabled:l,focusableWhenDisabled:!0,native:m,composite:!0}),w=wR({closeOnClick:i,highlighted:r,id:u,nodeId:p,store:f,typingRef:d,itemRef:y,itemMetadata:h}),T=b.useCallback(O=>Ao(w,{onMouseEnter(){h.type==="submenu-trigger"&&h.setActive()}},O,v),[w,v,h]),C=Hi(y,S);return b.useMemo(()=>({getItemProps:T,itemRef:C}),[T,C])}const s0=b.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});function OR(){return b.useContext(s0)}function sp(n={}){const{guess:i,label:l,metadata:r,textRef:u,index:f}=n,{register:d,unregister:m,subscribeMapChange:h,nextIndexRef:p}=OR(),y=b.useRef(-1),[v,S]=b.useState(f==null&&i?()=>{if(y.current===-1){const O=p.current;p.current+=1,y.current=O}return y.current}:-1),w=f??v,T=b.useRef(null),C=b.useCallback(O=>{const A=T.current;A&&m(A),T.current=O,O&&d(O,{metadata:r??null,index:f??null,label:l,textRef:u})},[f,d,m,r,l,u]);return Se(()=>{if(f==null)return h(O=>{const A=T.current?O.get(T.current)?.index:null;A!=null&&S(A)})},[f,h]),{ref:C,index:w}}const AR=b.forwardRef(function(i,l){const{render:r,className:u,id:f,label:d,nativeButton:m=!1,disabled:h=!1,closeOnClick:p=!0,style:y,...v}=i,S=sp({guess:!0,label:d}),w=a0(!0),T=Pi(f),{store:C}=La(),O=C.useState("disabled"),A=h||O,N=C.useState("isActive",S.index),M=C.useState("itemProps"),{getItemProps:D,itemRef:k}=CR({closeOnClick:p,disabled:A,highlighted:N,id:T,store:C,nativeButton:m,nodeId:w?.context.nodeId,itemMetadata:RR});return bt("div",i,{state:{disabled:A,highlighted:N},props:[M,v,D],ref:[k,l,S.ref]})}),MR=b.createContext(void 0);function DR(n){return b.useContext(MR)}const ad="ArrowUp",ld="ArrowDown",rd="ArrowLeft",sd="ArrowRight",ud="Home",cd="End",up=new Set([ad,ld,rd,sd,ud,cd]),NR="Shift",zR=[NR,"Control","Alt","Meta"];function _R(n){return dt(n)&&n.tagName==="INPUT"}function sb(n){return!!(_R(n)&&n.selectionStart!=null||dt(n)&&n.tagName==="TEXTAREA")}function ub(n,i,l,r){if(!n||!i||!i.scrollTo)return;let u=n.scrollLeft,f=n.scrollTop;const d=n.clientWidth<n.scrollWidth,m=n.clientHeight<n.scrollHeight;if(d&&r!=="vertical"){const h=cb(n,i,"left"),p=ys(n),y=ys(i);l==="ltr"&&(h+i.offsetWidth+y.scrollMarginRight>n.scrollLeft+n.clientWidth-p.scrollPaddingRight?u=h+i.offsetWidth+y.scrollMarginRight-n.clientWidth+p.scrollPaddingRight:h-y.scrollMarginLeft<n.scrollLeft+p.scrollPaddingLeft&&(u=h-y.scrollMarginLeft-p.scrollPaddingLeft)),l==="rtl"&&(h-y.scrollMarginLeft<n.scrollLeft+p.scrollPaddingLeft?u=h-y.scrollMarginLeft-p.scrollPaddingLeft:h+i.offsetWidth+y.scrollMarginRight>n.scrollLeft+n.clientWidth-p.scrollPaddingRight&&(u=h+i.offsetWidth+y.scrollMarginRight-n.clientWidth+p.scrollPaddingRight))}if(m&&r!=="horizontal"){const h=cb(n,i,"top"),p=ys(n),y=ys(i);h-y.scrollMarginTop<n.scrollTop+p.scrollPaddingTop?f=h-y.scrollMarginTop-p.scrollPaddingTop:h+i.offsetHeight+y.scrollMarginBottom>n.scrollTop+n.clientHeight-p.scrollPaddingBottom&&(f=h+i.offsetHeight+y.scrollMarginBottom-n.clientHeight+p.scrollPaddingBottom)}n.scrollTo({left:u,top:f,behavior:"auto"})}function cb(n,i,l){const r=l==="left"?"offsetLeft":"offsetTop";let u=0;for(;i.offsetParent&&(u+=i[r],i.offsetParent!==n);)i=i.offsetParent;return u}function ys(n){const i=getComputedStyle(n);return{scrollMarginTop:parseFloat(i.scrollMarginTop)||0,scrollMarginRight:parseFloat(i.scrollMarginRight)||0,scrollMarginBottom:parseFloat(i.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(i.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(i.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(i.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(i.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(i.scrollPaddingLeft)||0}}const kR=b.forwardRef(function(i,l){const{render:r,className:u,style:f,finalFocus:d,...m}=i,{store:h}=La(),{side:p,align:y}=a0(),v=DR()!=null,S=h.useState("open"),w=h.useState("transitionStatus"),T=h.useState("popupProps"),C=h.useState("mounted"),O=h.useState("instantType"),A=h.useState("activeTriggerElement"),N=h.useState("parent"),M=h.useState("lastOpenChangeReason"),D=h.useState("rootId"),k=h.useState("floatingRootContext"),L=h.useState("floatingTreeRoot"),j=h.useState("closeDelay"),H=h.useState("hoverEnabled"),J=h.useState("disabled"),$=h.useState("openMethod"),Q=N.type==="context-menu";Ha({open:S,ref:h.context.popupRef,onComplete(){S&&h.context.onOpenChangeComplete?.(!0)}}),b.useEffect(()=>{function z(q){h.setOpen(!1,Ke(q.reason,q.domEvent))}return L.events.on("close",z),()=>{L.events.off("close",z)}},[L.events,h]),Vv(k,{enabled:H&&!J&&!Q&&N.type!=="menubar",closeDelay:j});const I=h.useStateSetter("popupElement"),ee={transitionStatus:w,side:p,align:y,open:S,nested:N.type==="menu",instant:O},ie=bt("div",i,{state:ee,ref:[l,h.context.popupRef,I],stateAttributesMapping:Md,props:[T,{onKeyDown(z){v&&up.has(z.key)&&z.stopPropagation()}},lp(w),m,{"data-rootownerid":D}]});let F=N.type===void 0||Q;return(A||N.type==="menubar"&&M!==Dd)&&(F=!0),E.jsx(wv,{context:k,openInteractionType:$,modal:Q,disabled:!C,returnFocus:d===void 0?F:d,initialFocus:N.type!=="menu",restoreFocus:!0,externalTree:N.type!=="menubar"?L:void 0,previousFocusableElement:A,nextFocusableElement:N.type===void 0?h.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:N.type===void 0?h.context.beforeContentFocusGuardRef:void 0,children:ie})}),u0=b.createContext(void 0);function jR(){const n=b.useContext(u0);if(n===void 0)throw new Error(Zt(32));return n}const HR=b.forwardRef(function(i,l){const{keepMounted:r=!1,...u}=i,{store:f,parent:d}=La();if(!(f.useState("mounted")||r))return null;const p=d.type==="menu"||d.type==="menubar"?"group":void 0;return E.jsx(u0.Provider,{value:r,children:E.jsx(vv,{ref:l,...u,portalOwnerRole:p})})});function cp(n){const{children:i,elementsRef:l,labelsRef:r,onMapChange:u}=n,f=Oe(u),[,d]=b.useState(!1),m=Jt(UR).current,h=Jt(LR).current,p=b.useRef(0),y=b.useRef(!0),v=b.useRef(null),S=b.useRef(null),w=Oe(()=>{y.current||(y.current=!0,d(k=>!k))}),T=Oe((k,L)=>{h.set(k,L),w()}),C=Oe(k=>{h.delete(k),w()}),O=Oe(k=>{const L=new Map;return l.current.length=0,r&&(r.current.length=0),k.forEach(j=>{L.set(j.element,{...j.registration.metadata??{},index:j.index}),l.current[j.index]=j.element,r&&(r.current[j.index]=j.registration.label!==void 0?j.registration.label:j.registration.textRef?.current?.textContent??j.element.textContent)}),p.current=l.current.length,L});function A(k){if(S.current?.disconnect(),S.current=null,typeof MutationObserver!="function"||k.length<2)return;const L=new MutationObserver(H=>{if(!PR(H))return;let J=null;for(const $ of k)if($.isConnected){if(J&&c0(J,$)>0){L.disconnect(),w();return}J=$}});S.current=L;const j=new Set;for(let H=1;H<k.length;H+=1){const J=IR(k[H-1],k[H]);J&&j.add(J)}j.forEach(H=>L.observe(H,{childList:!0}))}const N=Oe(()=>{const[k,L]=BR(h),j=O(k),H=v.current,J=!H||H.length!==k.length||k.some(($,Q)=>{const I=H[Q];return $.index!==I.index||$.element!==I.element||$.registration.index!==I.registration.index||$.registration.metadata!==I.registration.metadata});A(L),v.current=k,y.current=!1,J&&(m.forEach($=>$(j)),f(j))});Se(()=>(!y.current&&v.current&&O(v.current),()=>{l.current=[],r&&(r.current=[])}),[l,r,O]),Se(()=>{y.current&&N()}),Se(()=>()=>{S.current?.disconnect(),y.current=!0},[]);const M=Oe(k=>(m.add(k),()=>{m.delete(k)})),D=b.useMemo(()=>({register:T,unregister:C,subscribeMapChange:M,nextIndexRef:p}),[T,C,M,p]);return E.jsx(s0.Provider,{value:D,children:i})}function LR(){return new Map}function UR(){return new Set}function BR(n){const i=new Set,l=[],r=[];n.forEach((f,d)=>{if(!d.isConnected)return;const m=f.index,h={index:m??-1,element:d,registration:f};m===null?r.push(h):m>=0&&(i.add(m),l.push(h))});let u=0;return r.sort((f,d)=>c0(f.element,d.element)),r.forEach(f=>{for(;i.has(u);)u+=1;f.index=u,l.push(f),u+=1}),i.size>0&&l.sort((f,d)=>f.index-d.index),[l,r.map(f=>f.element)]}function IR(n,i){let l=n.parentElement;for(;l&&!l.contains(i);)l=l.parentElement;return l}function PR(n){for(const i of n)for(let l=0;l<i.removedNodes.length;l+=1)if(i.removedNodes[l].isConnected)return!0;return!1}function c0(n,i){return n.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}const f0=b.forwardRef(function(i,l){const{cutout:r,...u}=i;let f;if(r){const d=r.getBoundingClientRect();f=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${d.left}px ${d.top}px,${d.left}px ${d.bottom}px,${d.right}px ${d.bottom}px,${d.right}px ${d.top}px,${d.left}px ${d.top}px)`}return E.jsx("div",{ref:l,role:"presentation","data-base-ui-inert":"",...u,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:f}})});let fb={},db={},pb="";function eu(n,i){return Vl(n)?n:i}function hb(n,i,l){return/hidden|clip/.test(n.getComputedStyle(eu(i,l)).overflowY)}function YR(n){if(typeof document>"u")return!1;const i=Fe(n);return yt(i).innerWidth-i.documentElement.clientWidth>0}function qR(n){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const l=Fe(n),r=l.documentElement,u=l.body,f=eu(r,u),d=f.style.overflowY,m=r.style.scrollbarGutter;r.style.scrollbarGutter="stable",f.style.overflowY="scroll";const h=f.offsetWidth;f.style.overflowY="hidden";const p=f.offsetWidth;return f.style.overflowY=d,r.style.scrollbarGutter=m,h===p}function VR(n){const i=Fe(n),l=i.documentElement,r=i.body,u=eu(l,r),f={overflowY:u.style.overflowY,overflowX:u.style.overflowX};return Object.assign(u.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(u.style,f)}}function GR(n){const i=Fe(n),l=i.documentElement,r=i.body,u=yt(l);let f=0,d=0,m=!1;const h=eo.create();if(pi&&(u.visualViewport?.scale??1)!==1)return()=>{};function p(){const w=u.getComputedStyle(l),T=u.getComputedStyle(r),A=(w.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";f=l.scrollTop,d=l.scrollLeft,fb={scrollbarGutter:l.style.scrollbarGutter,overflowY:l.style.overflowY,overflowX:l.style.overflowX},pb=l.style.scrollBehavior,db={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};const N=l.scrollHeight>l.clientHeight,M=l.scrollWidth>l.clientWidth,D=w.overflowY==="scroll"||T.overflowY==="scroll",k=w.overflowX==="scroll"||T.overflowX==="scroll",L=Math.max(0,u.innerWidth-r.clientWidth),j=Math.max(0,u.innerHeight-r.clientHeight),H=parseFloat(T.marginTop)+parseFloat(T.marginBottom),J=parseFloat(T.marginLeft)+parseFloat(T.marginRight),$=eu(l,r);if(m=qR(n),m){l.style.scrollbarGutter=A,$.style.overflowY="hidden",$.style.overflowX="hidden";return}Object.assign(l.style,{scrollbarGutter:A,overflowY:"hidden",overflowX:"hidden"}),(N||D)&&(l.style.overflowY="scroll"),(M||k)&&(l.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:H||j?`calc(100dvh - ${H+j}px)`:"100dvh",width:J||L?`calc(100vw - ${J+L}px)`:"100vw",boxSizing:"border-box",overflowY:"hidden",overflowX:"hidden",scrollBehavior:"unset"}),r.scrollTop=f,r.scrollLeft=d,l.setAttribute("data-base-ui-scroll-locked",""),l.style.scrollBehavior="unset"}function y(){Object.assign(l.style,fb),Object.assign(r.style,db),m||(l.scrollTop=f,l.scrollLeft=d,l.removeAttribute("data-base-ui-scroll-locked"),l.style.scrollBehavior=pb)}function v(){y(),h.request(p)}p();const S=Pe(u,"resize",v);return()=>{h.cancel(),y(),typeof u.removeEventListener=="function"&&S()}}class XR{lockCount=0;restore=null;timeoutLock=vn.create();timeoutUnlock=vn.create();acquire(i){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(i)),this.release}release=()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(i){if(this.lockCount===0||this.restore!==null)return;const l=Fe(i),r=l.documentElement,u=l.body,f=yt(r);if(hb(f,r,u)){const m=new f.MutationObserver(()=>{hb(f,r,u)||(m.disconnect(),this.restore=null,this.lock(i))}),h={attributes:!0};m.observe(r,h),m.observe(u,h),this.restore=()=>m.disconnect();return}const d=Bs||!YR(i);this.restore=d?VR(i):GR(i)}}const FR=new XR;function d0(n=!0,i=null){Se(()=>{if(n)return FR.acquire(i)},[n,i])}const KR=20;function QR(n,i,l,r){const[u,f]=b.useState(!1);Se(()=>{if(!n||!i||l==null){f(!1);return}const d=Fe(l).documentElement.clientWidth,m=l.offsetWidth;f(d>0&&m>0&&m>=d-KR)},[n,i,l]),d0(n&&(!i||u),r)}const ZR=b.forwardRef(function(i,l){const{anchor:r,positionMethod:u="absolute",className:f,render:d,side:m,align:h,sideOffset:p=0,alignOffset:y=0,collisionBoundary:v="clipping-ancestors",collisionPadding:S=5,arrowPadding:w=5,sticky:T=!1,disableAnchorTracking:C=!1,collisionAvoidance:O=gE,style:A,...N}=i,{store:M}=La(),D=jR(),k=rp(!0),L=M.useState("parent"),j=M.useState("floatingRootContext"),H=M.useState("floatingTreeRoot"),J=M.useState("mounted"),$=M.useState("open"),Q=M.useState("modal"),I=M.useState("openMethod"),ee=M.useState("activeTriggerElement"),ie=M.useState("transitionStatus"),F=M.useState("positionerElement"),z=M.useState("instantType"),q=M.useState("adaptiveOrigin"),P=M.useState("lastOpenChangeReason"),K=M.useState("floatingNodeId"),ne=M.useState("floatingParentNodeId"),R=j.useState("domReferenceElement"),B=b.useRef(null),W=Xd(F);let V=r,oe=p,ae=y,ge=h,ue=O;L.type==="context-menu"&&(V=r??L.context?.anchor,ge=ge??"start",!m&&ge!=="center"&&(ae=i.alignOffset??2,oe=i.sideOffset??-5));let pe=m,Re=ge;L.type==="menu"?(pe=pe??"inline-end",Re=Re??"start",ue=i.collisionAvoidance??gv):L.type==="menubar"&&(pe=pe??(L.context.orientation==="vertical"?"inline-end":"bottom"),Re=Re??"start");const ke=L.type==="context-menu",ve=$v({anchor:V,floatingRootContext:j,positionMethod:k?"fixed":u,mounted:J,side:pe,sideOffset:oe,align:Re,alignOffset:ae,arrowPadding:ke?0:w,collisionBoundary:v,collisionPadding:S,sticky:T,nodeId:K,keepMounted:D,disableAnchorTracking:C,collisionAvoidance:ue,shift:ke?{crossAxis:!("side"in ue&&ue.side==="flip"),rootBoundary:"layoutViewport"}:void 0,externalTree:H,adaptiveOrigin:q});b.useEffect(()=>{function we(Ae){Ae.open&&(Ae.parentNodeId===K&&M.set("hoverEnabled",!1),Ae.nodeId!==K&&Ae.parentNodeId===M.select("floatingParentNodeId")&&M.setOpen(!1,Ke(jl)))}return H.events.on("menuopenchange",we),()=>{H.events.off("menuopenchange",we)}},[M,H.events,K]),b.useEffect(()=>{if(M.select("floatingParentNodeId")==null)return;function we(Ae){if(Ae.open||Ae.nodeId!==M.select("floatingParentNodeId"))return;const Qe=Ae.reason??jl;M.setOpen(!1,Ke(Qe))}return H.events.on("menuopenchange",we),()=>{H.events.off("menuopenchange",we)}},[H.events,M]);const me=$t();b.useEffect(()=>{$||me.clear()},[$,me]),b.useEffect(()=>{function we(Ae){if(!(!$||Ae.nodeId!==M.select("floatingParentNodeId")))if(Ae.target&&ee&&ee!==Ae.target){const Qe=M.select("closeDelay");Qe>0?me.isStarted()||me.start(Qe,()=>{M.setOpen(!1,Ke(jl))}):M.setOpen(!1,Ke(jl))}else me.clear()}return H.events.on("itemhover",we),()=>{H.events.off("itemhover",we)}},[H.events,$,ee,M,me]),b.useEffect(()=>{const we={open:$,nodeId:K,parentNodeId:ne,reason:M.select("lastOpenChangeReason")};H.events.emit("menuopenchange",we)},[H.events,$,M,K,ne]),Se(()=>{const we=R,Ae=B.current;if(we&&(B.current=we),Ae&&we&&we!==Ae){M.set("instantType",void 0);const Qe=new AbortController;return W(()=>{M.set("instantType","trigger-change")},Qe.signal),()=>{Qe.abort()}}},[R,W,M]);const je={open:$,side:ve.side,align:ve.align,anchorHidden:ve.anchorHidden,nested:L.type==="menu",instant:z},Le=L.type==="menubar"&&L.context.modal;QR($&&(Le||Q&&P!==Lt),I==="touch",F,ee);const Te=e0(i,je,{styles:ve.positionerStyles,transitionStatus:ie,props:N,refs:[l,M.useStateSetter("positionerElement")],hidden:!J,inert:!$}),Ue=J&&L.type!=="menu"&&(L.type!=="menubar"&&Q&&P!==Lt||L.type==="menubar"&&L.context.modal);let Ee=null;return L.type==="menubar"?Ee=L.context.contentElement:L.type===void 0&&(Ee=ee),E.jsxs(i0.Provider,{value:ve,children:[Ue&&E.jsx(f0,{ref:L.type==="context-menu"||L.type==="nested-context-menu"?L.context.internalBackdropRef:null,inert:Js(!$),cutout:Ee}),E.jsx(bE,{id:K,children:E.jsx(cp,{elementsRef:M.context.itemDomElements,labelsRef:M.context.itemLabels,children:Te})})]})}),WR=b.createContext(null);function p0(n){return b.useContext(WR)}function JR(n){const i=b.useRef(""),l=b.useCallback(u=>{u.defaultPrevented||(i.current=u.pointerType,n(u,u.pointerType))},[n]);return{onClick:b.useCallback(u=>{if(u.detail===0){n(u,"keyboard");return}"pointerType"in u?n(u,u.pointerType):n(u,i.current),i.current=""},[n]),onPointerDown:l}}function $R(n,i){const l=b.useRef(n),r=Oe(i);Se(()=>{l.current!==n&&r(l.current),l.current=n},[n,r])}function eC(n,i){const l=Oe((f,d)=>{(typeof n=="function"?n():n)||i(d||(Bs?"touch":""))}),{onClick:r,onPointerDown:u}=JR(l);return b.useMemo(()=>({onClick:r,onPointerDown:u}),[r,u])}function tC(n){const[i,l]=b.useState(null),r=eC(n,l);return $R(n,u=>{u&&!n&&l(null)}),b.useMemo(()=>({openMethod:i,triggerProps:r}),[i,r])}const nC={...np,disabled:n=>n.parent.type==="menubar"&&n.parent.context.disabled||n.disabled,modal:n=>(n.parent.type===void 0||n.parent.type==="context-menu")&&(n.modal??!0),openMethod:n=>n.openMethod,allowMouseEnter:n=>n.allowMouseEnter,highlightItemOnHover:n=>n.highlightItemOnHover,parent:n=>n.parent,rootId:n=>n.parent.type==="menu"?n.parent.store.select("rootId"):n.parent.type!==void 0?n.parent.context.rootId:n.rootId,activeIndex:n=>n.activeIndex,isActive:(n,i)=>n.activeIndex===i,hoverEnabled:n=>n.hoverEnabled,instantType:n=>n.instantType,lastOpenChangeReason:n=>n.openChangeReason,floatingTreeRoot:n=>n.parent.type==="menu"?n.parent.store.select("floatingTreeRoot"):n.floatingTreeRoot,floatingNodeId:n=>n.floatingNodeId,floatingParentNodeId:n=>n.floatingParentNodeId,itemProps:n=>n.itemProps,closeDelay:n=>n.closeDelay,adaptiveOrigin:n=>n.adaptiveOrigin,keyboardEventRelay:n=>{if(n.keyboardEventRelay)return n.keyboardEventRelay;if(n.parent.type==="menu")return n.parent.store.select("keyboardEventRelay")}};class oC extends Xl{constructor(i,l,r=!1){const u=new $d,f=aC(u,l,r,i);super(f,iC(u),nC),this.unsubscribeParentListener=this.observe("parent",d=>{if(this.unsubscribeParentListener?.(),d.type==="menu"){let m=d.store.select("rootId"),h=d.store.select("floatingTreeRoot"),p=d.store.select("keyboardEventRelay");this.unsubscribeParentListener=d.store.subscribe(()=>{const y=d.store.select("rootId"),v=d.store.select("floatingTreeRoot"),S=d.store.select("keyboardEventRelay");m===y&&h===v&&p===S||(m=y,h=v,p=S,this.notifyAll())}),this.context.allowMouseUpTriggerRef=d.store.context.allowMouseUpTriggerRef;return}d.type!==void 0&&(this.context.allowMouseUpTriggerRef=d.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(i,l){this.state.floatingRootContext.context.events.emit("setOpen",{open:i,eventDetails:l})}unsubscribeParentListener=null}function iC(n){return{positionerRef:b.createRef(),popupRef:b.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:b.createRef(),beforeContentFocusGuardRef:b.createRef(),onOpenChangeComplete:void 0,triggerElements:n}}function aC(n,i,l=!1,r){return{...ep(n,i,l),disabled:!1,modal:!0,openMethod:null,allowMouseEnter:!1,highlightItemOnHover:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new Pd,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:Rt,keyboardEventRelay:void 0,closeDelay:0,adaptiveOrigin:void 0,...r}}const lC=b.createContext(void 0);function rC(){return b.useContext(lC)}const sC=js(function(i){const{children:l,open:r,onOpenChange:u,onOpenChangeComplete:f,defaultOpen:d=!1,disabled:m=!1,modal:h,loopFocus:p=!0,orientation:y="vertical",actionsRef:v,closeParentOnEsc:S=!1,handle:w,triggerId:T,defaultTriggerId:C=null,highlightItemOnHover:O=!0}=i,A=rp(!0),N=La(!0),M=p0(!0),D=rC(),k=b.useMemo(()=>D&&N?{type:"menu",store:N.store}:M?{type:"menubar",context:M}:A&&!N?{type:"context-menu",context:A}:{type:void 0},[A,N,M,D]),L=Ui(),j=Ui(),H=Ii(),J=k.type==="menu"?k.store:void 0,$=(r??d)&&J?.state.transitionStatus==="starting",Q=Jt(()=>$?J?.state.instantType:void 0).current,I=uC({open:d,openProp:r,activeTriggerId:C,triggerIdProp:T,parent:k,disabled:m,highlightItemOnHover:O,modal:k.type===void 0?h:void 0,rootId:L,instantType:Q},j,H!=null);I.useControlledProp("openProp",r),I.useControlledProp("triggerIdProp",T),I.useContextCallback("onOpenChangeComplete",f);const ee=I.useState("floatingTreeRoot"),ie=Ev(ee),F=I.useState("open"),z=I.useState("activeTriggerElement"),q=I.useState("positionerElement"),P=I.useState("hoverEnabled"),K=I.useState("disabled"),ne=I.useState("lastOpenChangeReason"),R=I.useState("parent"),B=I.useState("activeIndex"),W=I.useState("payload"),V=I.useState("floatingParentNodeId"),oe=b.useRef(null),ae=b.useRef(R.type!=="context-menu"),ge=$t(),ue=b.useRef(!0),pe=$t(),Re=V!=null,{openMethod:ke,triggerProps:ve}=tC(F);I.useSyncedValues({disabled:m,highlightItemOnHover:O,modal:R.type===void 0?h:void 0,openMethod:ke,rootId:L}),Zd(I);const{forceUnmount:me,transitionStatus:je}=Wd(F,I,()=>{I.set("allowMouseEnter",!1)},$),Le=Xd(I.context.popupRef);b.useEffect(()=>{if(Q===void 0)return;const xe=()=>{I.state.instantType===Q&&I.set("instantType",void 0)};if(!F){xe();return}if(je!==void 0)return;if(I.context.popupRef.current==null){xe();return}const Ye=new AbortController;return Le(xe,Ye.signal),()=>{Ye.abort()}},[Q,F,je,Le,I]),Se(()=>{A&&!N?I.update({parent:{type:"context-menu",context:A},floatingNodeId:ie,floatingParentNodeId:H}):N&&I.update({floatingNodeId:ie,floatingParentNodeId:H})},[A,N,ie,H,I]),b.useEffect(()=>{if(F||(oe.current=null),R.type==="context-menu"){if(!F){ge.clear(),ae.current=!1;return}ge.start(500,()=>{ae.current=!0})}},[ge,F,R.type]),Se(()=>{!F&&!P&&I.set("hoverEnabled",!0)},[F,P,I]);const Ve=Oe((xe,Ye)=>{const nt=Ye.reason;if(!xe&&!I.select("open")||F===xe&&Ye.trigger===z&&ne===nt)return;const pt=Uv(Ye);if(!xe&&Ye.trigger==null&&(Ye.trigger=z??void 0),u?.(xe,Ye),Ye.isCanceled)return;I.state.floatingRootContext.dispatchOpenChange(xe,Ye);const Tn=Ye.event;if(xe===!1&&Tn?.type==="click"&&Tn.pointerType==="touch"&&!ue.current)return;xe&&nt===Aa?(ue.current=!1,pe.start(300,()=>{ue.current=!0})):(ue.current=!0,pe.clear());const Un=(nt===ja||nt===Gb)&&Tn.detail===0,En=!xe&&(nt===Ks||nt==null);oe.current=Ye.event;const At=Qd(I.state,xe,Ye.trigger,pt());At.openChangeReason=nt,R.type==="menubar"&&(nt===Aa||nt===_a||nt===Lt||nt===$f||nt===jl)?At.instantType="group":Un||En?At.instantType=Un?"click":"dismiss":At.instantType=void 0,I.update(At)}),Te=jv({popupStore:I,floatingRootContext:I.state.floatingRootContext,floatingId:j,nested:H!=null,onOpenChange:Ve}),Ue=Te.context.events;Se(()=>{const xe=({open:Ye,eventDetails:nt})=>Ve(Ye,nt);return Ue.on("setOpen",xe),()=>{Ue?.off("setOpen",xe)}},[Ue,Ve]);const Ee=b.useCallback(()=>{I.setOpen(!1,Ke(Nd))},[I]);b.useImperativeHandle(v,()=>({unmount:me,close:Ee}),[me,Ee]);let we;R.type==="context-menu"&&(we=R.context),b.useImperativeHandle(we?.positionerRef,()=>q,[q]),b.useImperativeHandle(we?.actionsRef,()=>({setOpen:Ve}),[Ve]);const Ae=qd(Te,{enabled:!K,bubbles:{escapeKey:S&&R.type==="menu"},outsidePress(){return R.type!=="context-menu"||oe.current?.type==="contextmenu"?!0:ae.current},externalTree:Re?ee:void 0}),Qe=ap(),Me=b.useCallback(xe=>{I.select("activeIndex")!==xe&&I.set("activeIndex",xe)},[I]),fe=jw(Te,{enabled:!K,listRef:I.context.itemDomElements,activeIndex:B,nested:R.type!==void 0,loopFocus:p,orientation:y,parentOrientation:R.type==="menubar"?R.context.orientation:void 0,rtl:Qe==="rtl",disabledIndices:Mo,onNavigate:Me,openOnArrowKeyDown:R.type!=="context-menu",externalTree:Re?ee:void 0,focusItemOnHover:O}),ye=b.useCallback(xe=>{I.context.typingRef.current=xe},[I]),de=Hw(Te,{enabled:!K,listRef:I.context.itemLabels,elementsRef:I.context.itemDomElements,activeIndex:B,resetMs:rE,onMatch:xe=>{F&&xe!==B&&I.set("activeIndex",xe)},onTyping:ye}),le=b.useMemo(()=>{const xe=Ao(de.reference,fe.reference,Ae.reference,{onMouseMove(){I.set("allowMouseEnter",!0)}},ve);return xe["aria-haspopup"]="menu",xe["aria-expanded"]=F,xe},[I,de.reference,fe.reference,Ae.reference,ve,F]),be=b.useMemo(()=>{const xe=Ao(fe.trigger,Ae.trigger,ve);return xe["aria-haspopup"]="menu",xe["aria-expanded"]=!1,xe},[fe.trigger,Ae.trigger,ve]);Jt(()=>(I.update({inactiveTriggerProps:be}),null));const Be=b.useMemo(()=>Ao(Fd,{id:j,role:"menu","aria-orientation":y==="horizontal"?"horizontal":void 0,"aria-labelledby":z?.id,onMouseMove(){I.set("allowMouseEnter",!0),R.type==="menu"&&I.set("hoverEnabled",!1)},onClick(){I.select("hoverEnabled")&&I.set("hoverEnabled",!1)},onKeyDown(xe){const Ye=I.select("keyboardEventRelay");Ye&&!xe.isPropagationStopped()&&Ye(xe)}},de.floating,fe.floating,Ae.floating),[z,j,y,R.type,I,de.floating,fe.floating,Ae.floating]),Ut=fe.item??Rt;Jd(I,{floatingRootContext:Te,activeTriggerProps:le,inactiveTriggerProps:be,popupProps:Be,itemProps:Ut});const tn=b.useMemo(()=>({store:I,parent:k}),[I,k]),Tt=E.jsxs(l0.Provider,{value:tn,children:[w&&E.jsx(Kd,{handle:w,store:I}),typeof l=="function"?l({payload:W}):l]});return R.type===void 0||R.type==="context-menu"?E.jsx(vE,{externalTree:ee,children:Tt}):Tt});function uC(n,i,l){return Jt(()=>new oC(n,i,l)).current}const bs=5;function cC(n,i){const l=fC(i);return n.clientX>=l.left-bs&&n.clientX<=l.right+bs&&n.clientY>=l.top-bs&&n.clientY<=l.bottom+bs}function fC(n){const i=n.getBoundingClientRect(),l=yt(n);if(xd)return i;const r=l.getComputedStyle(n,"::before"),u=l.getComputedStyle(n,"::after");if(!(r.content!=="none"||u.content!=="none"))return i;const d=parseFloat(r.width)||0,m=parseFloat(r.height)||0,h=parseFloat(u.width)||0,p=parseFloat(u.height)||0,y=Math.max(i.width,d,h),v=Math.max(i.height,m,p),S=y-i.width,w=v-i.height;return{left:i.left-S/2,right:i.right+S/2,top:i.top-w/2,bottom:i.bottom+w/2}}function h0(n={}){const{highlightItemOnHover:i,highlightedIndex:l,onHighlightedIndexChange:r}=$s(),{ref:u,index:f}=sp(n),d=l===f,m=b.useRef(null),h=Hi(u,m);return{compositeProps:{tabIndex:d?0:-1,onFocus(){r(f)},onMouseMove(){const y=m.current;if(!i||!y)return;const v=y.hasAttribute("disabled")||y.ariaDisabled==="true";!d&&!v&&y.focus()}},compositeRef:h,index:f}}function dC(n){const{render:i,className:l,style:r,state:u=Rt,props:f=Mo,refs:d=Mo,metadata:m,stateAttributesMapping:h,tag:p="div",...y}=n,{compositeProps:v,compositeRef:S}=h0({metadata:m});return bt(p,n,{state:u,ref:[S,...d],props:[v,...f,y],stateAttributesMapping:h})}function g0(n){if(dt(n)&&n.hasAttribute("data-rootownerid"))return n.getAttribute("data-rootownerid");if(!Ro(n))return g0(Do(n))}function pC(n,i){const l=b.useRef(null);function r(f){Xn.flushSync(()=>{n.setOpen(!1,Ke(_a,f.nativeEvent,f.currentTarget))}),Y1(l.current)?.focus()}function u(f){const d=n.select("positionerElement");if(d&&Da(f,d))n.context.beforeContentFocusGuardRef.current?.focus();else{Xn.flushSync(()=>{n.setOpen(!1,Ke(_a,f.nativeEvent,f.currentTarget))});let m=P1(n.context.triggerFocusTargetRef.current||i.current);for(;m!==null&&Ne(d,m);){const h=m;if(m=Ld(m),m===h)break}m?.focus()}}return{preFocusGuardRef:l,handlePreFocusGuardFocus:r,handleFocusTargetFocus:u}}function hC(n){const{enabled:i=!0,mouseDownAction:l,open:r}=n,u=b.useRef(!1);return b.useMemo(()=>i?{onMouseDown:f=>{(l==="open"&&!r||l==="close"&&r)&&(u.current=!0,Fe(f.currentTarget).addEventListener("click",()=>{u.current=!1},{once:!0}))},onClick:f=>{u.current&&(u.current=!1,f.preventBaseUIHandler())}}:Rt,[i,l,r])}const gC=Lb(function(i,l){const{render:r,className:u,style:f,disabled:d=!1,nativeButton:m=!0,id:h,openOnHover:p,delay:y=100,closeDelay:v=0,handle:S,payload:w,...T}=i,C=La(!0),A=Pv(S)??C?.store;if(!A)throw new Error(Zt(85));const N=Pi(h),M=A.useState("isTriggerActive",N),D=A.useState("floatingRootContext"),k=A.useState("isOpenedByTrigger",N),L=A.useState("triggerPopupId",N),j=b.useRef(null),H=yC(),J=$s(!0),$=hi(),Q=b.useMemo(()=>$??new Pd,[$]),I=Ev(Q),ee=Ii(),{registerTrigger:ie,isMountedByThisTrigger:F}=Bv(N,j,A,{payload:w,closeDelay:v,parent:H,floatingTreeRoot:Q,floatingNodeId:I,floatingParentNodeId:ee,keyboardEventRelay:J?.relayKeyboardEvent}),z=H.type==="menubar",q=A.useState("disabled"),P=d||q||z&&H.context.disabled,{getButtonProps:K,buttonRef:ne}=Ua({disabled:P,native:m});b.useEffect(()=>{!k&&H.type===void 0&&(A.context.allowMouseUpTriggerRef.current=!1)},[A,k,H.type]);const R=b.useRef(null),B=$t(),W=Oe(we=>{if(!R.current)return;B.clear(),A.context.allowMouseUpTriggerRef.current=!1;const Ae=we.target;Ne(R.current,Ae)||Ne(A.select("positionerElement"),Ae)||Ae===R.current||Ae!=null&&g0(Ae)===A.select("rootId")||cC(we,R.current)||Q.events.emit("close",{domEvent:we,reason:h1})});b.useEffect(()=>{k&&A.select("lastOpenChangeReason")===Lt&&Fe(R.current).addEventListener("mouseup",W,{once:!0})},[k,W,A]);const V=z&&H.context.hasSubmenuOpen,ae=Gv(D,{enabled:(p??V)&&!P&&(!z||V&&!F),handleClose:Xv({blockPointerEvents:!z}),mouseOnly:!0,move:!1,restMs:H.type===void 0?y:void 0,delay:{close:v},triggerElementRef:j,externalTree:Q,isActiveTrigger:M,isClosing:()=>A.select("transitionStatus")==="ending"}),ge=mC(k,A.select("lastOpenChangeReason")),ue=TE(D,{enabled:!P,event:k&&z?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:H.type===void 0?ge:!1}),pe=Yv(D,{enabled:!P&&V}),Re=hC({open:k,enabled:z,mouseDownAction:"open"}),ke=b.useMemo(()=>Ao(pe.reference,ue.reference),[pe.reference,ue.reference]),ve=A.useState("triggerProps",F),{preFocusGuardRef:me,handlePreFocusGuardFocus:je,handleFocusTargetFocus:Le}=pC(A,j),Ve={disabled:P,open:k},Te=[R,l,ne,ie,j],Ue=[ke,ae??Rt,ve,{"aria-haspopup":"menu","aria-controls":L,id:N,onMouseDown:we=>{if(A.select("open"))return;B.start(200,()=>{A.context.allowMouseUpTriggerRef.current=!0}),Fe(we.currentTarget).addEventListener("mouseup",W,{once:!0})}},z?{role:"menuitem"}:{},Re,T,K],Ee=bt("button",i,{enabled:!z,stateAttributesMapping:Ey,state:Ve,ref:Te,props:Ue});return z?E.jsx(dC,{tag:"button",render:r,className:u,style:f,state:Ve,refs:Te,props:Ue,stateAttributesMapping:Ey}):k?E.jsxs(b.Fragment,{children:[E.jsx(Li,{ref:me,onFocus:je},`${N}-pre-focus-guard`),E.jsx(b.Fragment,{children:Ee},N),E.jsx(Li,{ref:A.context.triggerFocusTargetRef,onFocus:Le},`${N}-post-focus-guard`)]}):E.jsx(b.Fragment,{children:Ee},N)});function mC(n,i){const l=$t(),[r,u]=b.useState(!1);return Se(()=>{n&&i===Lt?(u(!0),l.start(sE,()=>{u(!1)})):n||(l.clear(),u(!1))},[n,i,l]),r}function yC(){const n=p0();return b.useMemo(()=>n?{type:"menubar",context:n}:{type:void 0},[n])}const bC=b.forwardRef(function(i,l){const{className:r,render:u,orientation:f="horizontal",style:d,...m}=i;return bt("div",i,{state:{orientation:f},ref:l,props:[{role:"separator","aria-orientation":f},m]})});function vC(n){return n==null||n.hasAttribute("disabled")||n.getAttribute("aria-disabled")==="true"}const SC=n=>n?.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();function xC(n,i,l=[]){if(i==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:SC(n),size:24,node:i,...l.length>0?{aliases:l}:{}}}const TC=n=>{let i="",l=!1;for(const r of n){if(r==="-"||r==="_"||r<=" "){l=i.length>0;continue}i.length===0?i+=r.toLowerCase():i+=l?r.toUpperCase():r,l=!1}return i};const EC=n=>{const i=TC(n);return i.charAt(0).toUpperCase()+i.slice(1)};const fd=(...n)=>n.filter((i,l,r)=>!!i&&i.trim()!==""&&r.indexOf(i)===l).join(" ").trim();const ki={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};function Lf(n){return n!=null}function wC(n,i={}){const l=i.attributeNames??{},r=S=>l[S]??S,u=n.size??n.width??ki.width,f=n.size??n.height??ki.height,d=n.aliases?.filter(S=>typeof S=="string"&&S.trim()!=="").map(S=>`lucide-${S}`)??[],m=[...n.name?[`lucide-${n.name}`]:[],...d],h=i.className?.split(" ").filter(Boolean)??[],p=i.includeDefaultClasses===!1?fd(...h):fd("lucide",...m,...h),y=i.absoluteStrokeWidth?Number(i.strokeWidth??ki["stroke-width"])*Number(n.size??n.width??ki.width)/Number(i.size??i.width??ki.width):i.strokeWidth??ki["stroke-width"];return["svg",{...Object.entries(ki).reduce((S,[w,T])=>(S[r(w)]=T,S),{}),..."color"in i&&i.color&&{[r("stroke")]:i.color},..."size"in i&&Lf(i.size)&&{[r("width")]:i.size,[r("height")]:i.size},..."width"in i&&Lf(i.width)&&{[r("width")]:i.width},..."height"in i&&Lf(i.height)&&{[r("height")]:i.height},[r("stroke-width")]:y,...p&&{[r("class")]:p},[r("viewBox")]:`0 0 ${u} ${f}`,...i.hasA11yProp===!1?{[r("aria-hidden")]:"true"}:{},..."attributes"in i&&i.attributes},n.node.map(S=>{const[w,T,C]=S,O=i.nonScalingStroke?{[r("vector-effect")]:"non-scaling-stroke",...T}:T;return C?[w,O,C]:[w,O]})]}function RC(n,i={}){return wC(n,{...i,attributeNames:{...i.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}const CC=n=>{for(const i in n)if(i.startsWith("aria-")||i==="role"||i==="title")return!0;return!1},OC=b.createContext({}),AC=()=>b.useContext(OC),MC=b.forwardRef(({color:n,size:i,width:l,height:r,strokeWidth:u,absoluteStrokeWidth:f,nonScalingStroke:d,className:m="",children:h,iconNode:p=[],icon:y={node:p,aliases:[],size:24},...v},S)=>{const{size:w=24,strokeWidth:T=2,absoluteStrokeWidth:C=!1,nonScalingStroke:O=!1,color:A="currentColor",className:N=""}=AC()??{},M=!!h||CC(v),[D,k,L=[]]=RC(y,{color:n??A,width:l??i??w,height:r??i??w,strokeWidth:u??T,absoluteStrokeWidth:f??C,nonScalingStroke:d??O,className:fd(N,m),hasA11yProp:M,attributes:v});return b.createElement(D,{ref:S,...k},[...L.map(([j,H])=>b.createElement(j,H)),...Array.isArray(h)?h:[h]])});function Pt(n,i=[],l=[]){const r=typeof n=="string"?xC(n,i,l):n,u=b.forwardRef(({className:f,...d},m)=>b.createElement(MC,{ref:m,icon:r,className:f,...d}));return r.name&&(u.displayName=EC(r.name)),u}const m0={name:"cloud",size:24,node:[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]};m0.node;const DC=Pt(m0);const y0={name:"copy",size:24,node:[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]};y0.node;const NC=Pt(y0);const b0={name:"ellipsis",size:24,node:[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],aliases:["more-horizontal"]};b0.node;const zC=Pt(b0);const v0={name:"external-link",size:24,node:[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]};v0.node;const fp=Pt(v0);const S0={name:"link",size:24,node:[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]};S0.node;const _C=Pt(S0);const x0={name:"log-in",size:24,node:[["path",{d:"m10 17 5-5-5-5",key:"1bsop3"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}]]};x0.node;const kC=Pt(x0);const T0={name:"log-out",size:24,node:[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]};T0.node;const jC=Pt(T0);const E0={name:"message-square",size:24,node:[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]};E0.node;const HC=Pt(E0);const w0={name:"pencil",size:24,node:[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]};w0.node;const LC=Pt(w0);const R0={name:"pin-off",size:24,node:[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89",key:"znwnzq"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11",key:"c9qhm2"}]]};R0.node;const UC=Pt(R0);const C0={name:"pin",size:24,node:[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]};C0.node;const gb=Pt(C0);const O0={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};O0.node;const A0=Pt(O0);const M0={name:"rotate-ccw",size:24,node:[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]};M0.node;const BC=Pt(M0);const D0={name:"shapes",size:24,node:[["path",{d:"M8.3 10a.7.7 0 0 1-.626-1.079L11.4 3a.7.7 0 0 1 1.198-.043L16.3 8.9a.7.7 0 0 1-.572 1.1Z",key:"1bo67w"}],["rect",{x:"3",y:"14",width:"7",height:"7",rx:"1",key:"1bkyp8"}],["circle",{cx:"17.5",cy:"17.5",r:"3.5",key:"w3z12y"}]]};D0.node;const IC=Pt(D0);const N0={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};N0.node;const dd=Pt(N0);const z0={name:"triangle-alert",size:24,node:[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["alert-triangle"]};z0.node;const tu=Pt(z0);const _0={name:"upload",size:24,node:[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]};_0.node;const k0=Pt(_0);const j0={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};j0.node;const dp=Pt(j0),pd=500,PC=8;function YC(n,i,l){return l<n.at||l-n.at>pd?!1:Math.hypot(i.clientX-n.x,i.clientY-n.y)<=PC}const mb=["pointerdown","mousedown","pointerup","mouseup","click","dblclick"];function qC(n,i,l=Date.now){let r=!1,u=!1,f=0;const d=()=>{if(!u){u=!0,n.clearTimeout(f);for(const p of mb)n.removeEventListener(p,h,!0)}},m=()=>{r?f=n.setTimeout(m,pd):d()},h=p=>{const y=p.type==="pointerdown"||p.type==="mousedown";!(r&&!y)&&!YC(i,p,l())||(p.preventDefault(),p.stopImmediatePropagation(),y?r=!0:(p.type==="click"||p.type==="dblclick")&&(r=!1))};for(const p of mb)n.addEventListener(p,h,!0);return f=n.setTimeout(m,Math.max(0,pd-(l()-i.at))),d}function VC(n){n.detail<1||!n.view||qC(n.view,{x:n.clientX,y:n.clientY,at:Date.now()})}const GC="rounded-lg bg-surface p-1 text-[13px] text-fg shadow-popup outline-none origin-[var(--transform-origin)] transition-[opacity,transform] duration-100 data-[starting-style]:opacity-0 data-[starting-style]:scale-95 data-[ending-style]:opacity-0",XC="flex h-7 min-w-40 cursor-default select-none items-center gap-2 rounded-md px-2 outline-none data-[highlighted]:bg-hover data-[disabled]:opacity-40";function H0({trigger:n,children:i,side:l="bottom",align:r="start",open:u,onOpenChange:f}){return E.jsxs(sC,{open:u,onOpenChange:f?d=>f(d):void 0,children:[E.jsx(gC,{render:n,onKeyDown:_s}),E.jsx(HR,{children:E.jsx(ZR,{side:l,align:r,sideOffset:6,className:"z-[1000]",children:E.jsx(kR,{className:GC,children:i})})})]})}function To({children:n,onSelect:i,icon:l,shortcut:r,disabled:u,danger:f}){return E.jsxs(AR,{className:zo(XC,f&&"text-danger"),disabled:u,onClick:d=>{VC(d.nativeEvent),i?.()},onKeyDown:_s,children:[E.jsx("span",{className:"flex size-4 items-center justify-center text-fg-muted",children:l}),E.jsx("span",{className:"flex-1",children:n}),r?E.jsx("span",{className:"ml-4 text-xs text-fg-subtle",children:r}):null]})}function ks(){return E.jsx(bC,{className:"mx-1 my-1 h-px bg-line"})}function FC({children:n}){return E.jsx("div",{className:"px-2 py-1 text-xs text-fg-subtle",children:n})}const L0=b.createContext(void 0);function Yi(n){const i=b.useContext(L0);if(!n&&i===void 0)throw new Error(Zt(27));return i}const KC=b.forwardRef(function(i,l){const{render:r,className:u,style:f,forceRender:d=!1,...m}=i,h=Yi(),p=h.useState("open"),y=h.useState("nested"),v=h.useState("mounted"),S=h.useState("transitionStatus");return bt("div",i,{state:{open:p,transitionStatus:S},ref:[h.context.backdropRef,l],stateAttributesMapping:Md,props:[{role:"presentation",hidden:!v,style:{userSelect:"none",WebkitUserSelect:"none"}},m],enabled:d||!y})}),QC=b.forwardRef(function(i,l){const{render:r,className:u,style:f,disabled:d=!1,nativeButton:m=!0,...h}=i,p=Yi(),y=p.useState("open"),{getButtonProps:v,buttonRef:S}=Ua({disabled:d,native:m}),w={disabled:d};function T(C){y&&p.setOpen(!1,Ke(p1,C.nativeEvent))}return bt("button",i,{state:w,ref:[l,S],props:[{onClick:T},h,v]})}),ZC=b.forwardRef(function(i,l){const{render:r,className:u,style:f,id:d,...m}=i,h=Yi(),p=Pi(d);return h.useSyncedValueWithCleanup("descriptionElementId",p),bt("p",i,{ref:l,props:[{id:p},m]})}),U0=b.createContext(void 0);function WC(){const n=b.useContext(U0);if(n===void 0)throw new Error(Zt(26));return n}const JC="--nested-dialogs",$C="data-nested-dialog-open",eO={...Ad,...Gs,nestedDialogOpen(n){return n?{[$C]:""}:null}},tO=b.forwardRef(function(i,l){const{render:r,className:u,style:f,finalFocus:d,initialFocus:m,...h}=i,p=Yi(),y=p.useState("descriptionElementId"),v=p.useState("disablePointerDismissal"),S=p.useState("floatingRootContext"),w=p.useState("popupProps"),T=p.useState("modal"),C=p.useState("mounted"),O=p.useState("nested"),A=p.useState("nestedOpenDialogCount"),N=p.useState("open"),M=p.useState("openMethod"),D=p.useState("titleElementId"),k=p.useState("transitionStatus"),L=p.useState("role"),j=S.useState("floatingId");WC(),Ha({open:N,ref:p.context.popupRef,onComplete(){N&&p.context.onOpenChangeComplete?.(!0)}});const H=m===void 0?ww(p.context.popupRef):m,J=A>0,$=p.useStateSetter("popupElement"),I=bt("div",i,{state:{open:N,nested:O,transitionStatus:k,nestedDialogOpen:J},props:[w,{id:j,"aria-labelledby":D,"aria-describedby":y,role:L,...Fd,hidden:!C,onKeyDown(ee){up.has(ee.key)&&ee.stopPropagation()},style:{[JC]:A}},h],ref:[l,p.context.popupRef,$],stateAttributesMapping:eO});return E.jsx(wv,{context:S,openInteractionType:M,disabled:!C,closeOnFocusOut:!v,initialFocus:H,returnFocus:d,modal:T!==!1,restoreFocus:"popup",children:I})}),nO=b.forwardRef(function(i,l){const{keepMounted:r=!1,...u}=i,f=Yi(),d=f.useState("mounted"),m=f.useState("modal"),h=f.useState("open");return d||r?E.jsx(U0.Provider,{value:r,children:E.jsxs(vv,{ref:l,...u,children:[d&&m===!0&&E.jsx(f0,{ref:f.context.internalBackdropRef,inert:Js(!h)}),i.children]})}):null});function oO({store:n,parentContext:i,isDrawer:l}){const r=n.useState("open"),u=n.useState("disablePointerDismissal"),f=n.useState("modal"),d=n.useState("popupElement"),m=n.useState("floatingRootContext"),[h,p]=b.useState(0),[y,v]=b.useState(0),S=h===0,w=qd(m,{outsidePressEvent(){return n.context.internalBackdropRef.current||n.context.backdropRef.current?"intentional":{mouse:f==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(T){if(!n.context.outsidePressEnabledRef.current||"button"in T&&T.button!==0)return!1;if("touches"in T){if(T.type==="touchend"){if(T.changedTouches.length!==1||T.touches.length!==0)return!1}else if(T.touches.length!==1)return!1}const C=St(T);if(S&&!u){if(f){const O=n.context.internalBackdropRef.current,A=n.context.backdropRef.current;return O||A?O===C||A===C||Ne(C,d)&&!C?.hasAttribute("data-base-ui-portal"):!0}return!0}return!1},escapeKey:S});return d0(r&&f===!0,d),n.useContextCallback("onNestedDialogOpen",(T,C)=>{p(T),v(C)}),Se(()=>(i?.onNestedDialogOpen&&(r?i.onNestedDialogOpen(h+1,y+(l?1:0)):i.onNestedDialogOpen(0,0)),()=>{i?.onNestedDialogOpen&&r&&i.onNestedDialogOpen(0,0)}),[l,r,h,y,i]),Jd(n,{activeTriggerProps:w.reference,inactiveTriggerProps:w.trigger,popupProps:w.floating,nestedOpenDialogCount:h,nestedOpenDrawerCount:y}),null}const iO={...np,modal:n=>n.modal,nested:n=>n.nested,nestedOpenDialogCount:n=>n.nestedOpenDialogCount,nestedOpenDrawerCount:n=>n.nestedOpenDrawerCount,disablePointerDismissal:n=>n.disablePointerDismissal,openMethod:n=>n.openMethod,descriptionElementId:n=>n.descriptionElementId,titleElementId:n=>n.titleElementId,viewportElement:n=>n.viewportElement,role:n=>n.role};class aO extends Xl{constructor(i,l,r){const u=new $d,f=lO(i,u,l,r);super(f,rO(u),iO)}setOpen=(i,l)=>{l.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!i&&l.trigger==null&&this.state.activeTriggerId!=null&&(l.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(i,l),!l.isCanceled&&(this.state.floatingRootContext.dispatchOpenChange(i,l),this.update(Qd(this.state,i,l.trigger)))}}function lO(n,i,l,r=!1){return{...ep(i,l,r),modal:!0,disablePointerDismissal:!1,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:"dialog",...n}}function rO(n){return{popupRef:b.createRef(),backdropRef:b.createRef(),internalBackdropRef:b.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:n,onOpenChange:void 0,onOpenChangeComplete:void 0}}function sO(n,i){const{children:l,open:r,defaultOpen:u=!1,onOpenChange:f,onOpenChangeComplete:d,disablePointerDismissal:m=!1,modal:h=!0,actionsRef:p,handle:y,triggerId:v,defaultTriggerId:S=null}=i,w=n==="drawer",T=h,C=m,O="dialog",A=Yi(!0),N=A!=null,M={modal:T,disablePointerDismissal:C,nested:N,role:O},D=Lv(($,Q)=>new aO({open:u,openProp:r,activeTriggerId:S,triggerIdProp:v,...M},$,Q),!0);D.useControlledProp("openProp",r),D.useControlledProp("triggerIdProp",v),D.useSyncedValues(M),D.useContextCallback("onOpenChange",f),D.useContextCallback("onOpenChangeComplete",d);const k=D.useState("open"),L=D.useState("mounted"),j=D.useState("payload");Ow(D,k),Zd(D);const{forceUnmount:H}=Wd(k,D);b.useImperativeHandle(p,()=>({unmount:H,close:()=>D.setOpen(!1,Ke(Nd))}),[H,D]);const J=k||L;return E.jsxs(L0.Provider,{value:D,children:[y&&E.jsx(Kd,{handle:y,store:D}),J&&E.jsx(oO,{store:D,parentContext:A?.context,isDrawer:w}),typeof l=="function"?l({payload:j}):l]})}const uO=js(function(i){return sO("dialog",i)}),cO=b.forwardRef(function(i,l){const{render:r,className:u,style:f,id:d,...m}=i,h=Yi(),p=Pi(d);return h.useSyncedValueWithCleanup("titleElementId",p),bt("h2",i,{ref:l,props:[{id:p},m]})});function pp({open:n,onOpenChange:i,title:l,description:r,children:u,footer:f,className:d}){return E.jsx(uO,{open:n,onOpenChange:m=>i(m),children:E.jsxs(nO,{children:[E.jsx(KC,{className:"fixed inset-0 z-[900] bg-black/30 transition-opacity data-[starting-style]:opacity-0 data-[ending-style]:opacity-0"}),E.jsxs(tO,{className:zo("fixed left-1/2 top-1/2 z-[901] w-[min(28rem,calc(100vw-2rem))] -translate-x-1/2 -translate-y-1/2 rounded-xl bg-surface p-5 text-fg shadow-popup outline-none","transition-[opacity,transform] data-[starting-style]:scale-95 data-[starting-style]:opacity-0 data-[ending-style]:opacity-0",d),children:[E.jsxs("div",{className:"mb-3 flex items-start gap-3",children:[E.jsxs("div",{className:"flex-1",children:[E.jsx(cO,{className:"text-[15px] font-semibold",children:l}),r?E.jsx(ZC,{className:"mt-1 text-fg-muted",children:r}):null]}),E.jsx(QC,{"aria-label":"Close",className:"rounded-md p-1 text-fg-muted hover:bg-hover",children:E.jsx(dp,{className:"size-4"})})]}),u,f?E.jsx("div",{className:"mt-4 flex justify-end gap-2",children:f}):null]})]})})}const hp="data-composite-item-active";function fO(n){const{loopFocus:i=!0,orientation:l="both",grid:r,onLoop:u,direction:f,highlightedIndex:d,onHighlightedIndexChange:m,rootRef:h,enableHomeAndEndKeys:p=!1,stopEventPropagation:y,disabledIndices:v,modifierKeys:S=Mo}=n,[w,T]=b.useState(0),C=r!=null,O=b.useRef(null),A=Hi(O,h),N=b.useRef([]),M=b.useRef(!1),D=b.useRef(null),k=d??w,L=Oe((Q,I=!1)=>{if(D.current=N.current[Q]??null,(m??T)(Q),I){const ee=N.current[Q];ub(O.current,ee,f,l)}}),j=Oe(Q=>{if(Q.size===0)return;if(M.current){const F=N.current,z=F.indexOf(D.current);if(z===-1){const q=F[k];!q||Ma(F,k,v)?L(dO(F,v)):D.current=q}else z!==k&&L(z);return}M.current=!0;const I=Array.from(Q.keys()),ee=I.find(F=>F?.hasAttribute(hp))??null,ie=ee?Q.get(ee)?.index??-1:-1;if(ie!==-1)L(ie);else if(Ma(I,k,v)){const F=wo(I,{disabledIndices:v});Ll(I,F)||L(F)}ub(O.current,ee,f,l)});Se(()=>{if(v==null||d!=null||!M.current)return;const Q=N.current;if(Ma(Q,k,v)){const I=wo(Q,{disabledIndices:v});Ll(Q,I)||L(I)}},[v,d,k,N,L]);const H=Oe((Q,I,ee)=>u?u(Q,I,ee,N):ee),J=Oe(Q=>{const I=Q.key===ud||Q.key===cd;if(!up.has(Q.key)||!p&&I||pO(Q,S)||!O.current)return;const ie=f==="rtl",F=ie?rd:sd,z=ie?sd:rd,q=l==="vertical"?ld:F,P=l==="vertical"?ad:z,K=St(Q.nativeEvent);if(K!=null&&sb(K)&&!vC(K)){const oe=K.selectionStart,ae=K.selectionEnd,ge=K.value;if(oe==null||Q.shiftKey||oe!==ae||Q.key!==P&&oe<ge.length||Q.key!==q&&oe>0)return}let ne=k;const R=vs(N,v),B=td(N,v);r!=null&&(ne=r({disabledIndices:v,elementsRef:N,event:Q,highlightedIndex:k,loopFocus:i,maxIndex:B,minIndex:R,onLoop:H,orientation:l,rtl:ie}));const W=l!=="vertical"&&Q.key===F||l!=="horizontal"&&Q.key===ld,V=l!=="vertical"&&Q.key===z||l!=="horizontal"&&Q.key===ad;p&&(Q.key===ud?ne=R:Q.key===cd&&(ne=B)),ne===k&&(W||V)&&(i&&ne===B&&W?(ne=R,u&&(ne=u(Q,k,ne,N))):i&&ne===R&&V?(ne=B,u&&(ne=u(Q,k,ne,N))):ne=wo(N.current,{startingIndex:ne,decrement:V,disabledIndices:v})),ne!==k&&!Ll(N.current,ne)&&(y&&Q.stopPropagation(),(C||I||W||V)&&Q.preventDefault(),L(ne,!0),queueMicrotask(()=>{N.current[ne]?.focus()}))});return{props:{ref:A,onFocus(Q){const I=O.current,ee=St(Q.nativeEvent);!I||ee==null||!sb(ee)||ee.setSelectionRange(0,ee.value.length)},onKeyDown:J},highlightedIndex:k,onHighlightedIndexChange:L,elementsRef:N,onMapChange:j,relayKeyboardEvent:J}}function dO(n,i){let l=-1;for(let r=0;r<n.length;r+=1){const u=n[r];if(!(!u||Ma(n,r,i))){if(u.hasAttribute(hp))return r;l===-1&&(l=r)}}return Math.max(l,0)}function pO(n,i){for(const l of zR)if(!i.includes(l)&&n.getModifierState(l))return!0;return!1}function hO(n){const{render:i,className:l,style:r,refs:u=Mo,props:f=Mo,state:d=Rt,stateAttributesMapping:m,highlightedIndex:h,onHighlightedIndexChange:p,orientation:y,grid:v,loopFocus:S,onLoop:w,enableHomeAndEndKeys:T,onMapChange:C,stopEventPropagation:O=!0,rootRef:A,disabledIndices:N,modifierKeys:M,highlightItemOnHover:D=!1,tag:k="div",...L}=n,j=ap(),{props:H,highlightedIndex:J,onHighlightedIndexChange:$,elementsRef:Q,onMapChange:I,relayKeyboardEvent:ee}=fO({grid:v,loopFocus:S,onLoop:w,orientation:y,highlightedIndex:h,onHighlightedIndexChange:p,rootRef:A,stopEventPropagation:O,enableHomeAndEndKeys:T,direction:j,disabledIndices:N,modifierKeys:M}),ie=bt(k,n,{state:d,ref:u,props:[H,...f,L],stateAttributesMapping:m}),F=b.useMemo(()=>({highlightedIndex:J,onHighlightedIndexChange:$,highlightItemOnHover:D,relayKeyboardEvent:ee}),[J,$,D,ee]);return E.jsx(r0.Provider,{value:F,children:E.jsx(cp,{elementsRef:Q,onMapChange:z=>{C?.(z),I(z)},children:ie})})}const gO="h-7 w-full min-w-0 rounded-control border border-line bg-surface-2 px-2 text-[13px] text-fg outline-none placeholder:text-fg-subtle focus:border-accent focus:bg-surface",hd=b.forwardRef(function({className:i,...l},r){return E.jsx("input",{ref:r,"data-ui-field":"",className:zo(gO,i),...l})}),B0=b.createContext(void 0);function gp(){const n=b.useContext(B0);if(n===void 0)throw new Error(Zt(64));return n}const mO="data-activation-direction",nu={tabActivationDirection:n=>({[mO]:n})},yO=b.forwardRef(function(i,l){const{className:r,defaultValue:u=0,onValueChange:f,orientation:d="horizontal",render:m,value:h,style:p,...y}=i,v=i.defaultValue!==void 0,S=b.useRef([]),[w,T]=b.useState(()=>new Map),[C,O]=xR({controlled:h,default:u,name:"Tabs",state:"value"}),A=h!==void 0,[N,M]=b.useState(()=>new Map),D=b.useRef(void 0),k=b.useCallback(ue=>gd(N,ue),[N]),[L,j]=b.useState(()=>({previousValue:C,tabActivationDirection:"none"})),{previousValue:H,tabActivationDirection:J}=L;let $=J,Q=!1;H!==C&&($=yb(H,C,d,N),Q=H!=null&&C!=null&&k(C)==null);const I=Q?H:C,ee=H!==I||J!==$;Se(()=>{ee&&j({previousValue:I,tabActivationDirection:$})},[I,ee,$]);const ie=Oe((ue,pe)=>{const Re=yb(C,ue,d,N);pe.activationDirection=Re,f?.(ue,pe),!pe.isCanceled&&O(ue)}),F=Oe((ue,pe)=>{f?.(ue,Ke(pe,void 0,void 0,{activationDirection:"none"}))}),z=Oe((ue,pe)=>(T(Re=>{const ke=new Map(Re);return ke.set(ue,pe),ke}),()=>{T(Re=>{if(Re.get(ue)!==pe)return Re;const ke=new Map(Re);return ke.delete(ue),ke})})),q=b.useCallback(ue=>w.get(ue),[w]),P=b.useCallback(ue=>{for(const pe of N.values())if(ue===pe.value)return pe.id},[N]),K=b.useMemo(()=>({getTabElementBySelectedValue:k,getTabIdByPanelValue:P,getTabPanelIdByValue:q,onValueChange:ie,orientation:d,registerMountedTabPanel:z,setTabMap:M,tabActivationDirection:$,value:C}),[k,P,q,ie,d,z,M,$,C]),ne=b.useMemo(()=>{for(const ue of N.values())if(ue.value===C)return ue},[N,C]),R=b.useMemo(()=>{for(const ue of N.values())if(!ue.disabled)return ue.value},[N]),B=b.useRef(!v),W=b.useRef(u),V=b.useRef(v),oe=b.useRef(!1);Se(()=>{if(A)return;function ue(ve,me){O(ve),j({previousValue:ve,tabActivationDirection:"none"}),F(ve,me),B.current=!1}if(N.size===0){oe.current&&C!==null&&!D.current?.isConnected&&ue(null,Ry);return}oe.current=!0,D.current=N.keys().next().value;const pe=ne?.disabled,Re=ne==null&&C!==null;if(!pe&&C===W.current&&(V.current=!1),V.current&&pe&&C===W.current)return;const ke=B.current;if(pe||Re){const ve=R??null;if(C===ve){B.current=!1;return}let me=Ry;ke?me=Cy:pe&&(me=Xb),ue(ve,me);return}ke&&ne!=null&&(F(C,Cy),B.current=!1)},[R,A,F,ne,O,N,C]);const ge=bt("div",i,{state:{orientation:d,tabActivationDirection:$},ref:l,props:y,stateAttributesMapping:nu});return E.jsx(B0.Provider,{value:K,children:E.jsx(cp,{elementsRef:S,children:ge})})});function gd(n,i){for(const[l,r]of n.entries())if(i===r.value)return l;return null}function yb(n,i,l,r){if(n==null||i==null)return"none";const[u,f,d]=l==="horizontal"?["left","left","right"]:["top","up","down"],m=gd(r,n),h=gd(r,i);if(m==null||h==null)return m!==h&&(typeof n=="number"||typeof n=="string")&&typeof n==typeof i?i>n?d:f:"none";const p=m.getBoundingClientRect()[u],y=h.getBoundingClientRect()[u];return y<p?f:y>p?d:"none"}const I0=b.createContext(void 0);function bO(){const n=b.useContext(I0);if(n===void 0)throw new Error(Zt(65));return n}const vO=b.forwardRef(function(i,l){const{className:r,disabled:u=!1,render:f,value:d,id:m,nativeButton:h=!0,style:p,...y}=i,{value:v,getTabPanelIdByValue:S,onValueChange:w,orientation:T,tabActivationDirection:C}=gp(),{activateOnFocus:O,registerTabResizeObserverElement:A,tabsListElement:N}=bO(),{highlightedIndex:M,onHighlightedIndexChange:D}=$s(),k=Pi(m),L=b.useMemo(()=>({disabled:u,id:k,value:d}),[u,k,d]),{compositeProps:j,compositeRef:H,index:J}=h0({metadata:L}),$=d===v,Q=b.useRef(!1),I=b.useRef(null),ee=Oe(oe=>{I.current?.(),I.current=oe?A(oe):null});Se(()=>{if(Q.current){Q.current=!1;return}if(!($&&J>-1&&M!==J))return;const oe=N;if(oe!=null){const ae=kt(Fe(oe));if(ae&&Ne(oe,ae))return}u||D(J)},[$,J,M,D,u,N]);const{getButtonProps:ie,buttonRef:F}=Ua({disabled:u,native:h,focusableWhenDisabled:!0}),z=S(d),q=b.useRef(!1),P=b.useRef(!1);function K(oe){w(d,Ke(Fs,oe.nativeEvent,void 0,{activationDirection:"none"}))}function ne(oe){$||u||K(oe)}function R(oe){$||u||O&&(!q.current||P.current)&&K(oe)}function B(oe){if($||u)return;q.current=!0,P.current=oe.button===0;const ae=Fe(oe.currentTarget);function ge(){q.current=!1,P.current=!1,ae.removeEventListener("pointerup",ge),ae.removeEventListener("pointercancel",ge)}ae.addEventListener("pointerup",ge),ae.addEventListener("pointercancel",ge)}return bt("button",i,{state:{disabled:u,active:$,orientation:T,tabActivationDirection:C},ref:[l,F,H,ee],props:[j,{role:"tab","aria-controls":z,"aria-selected":$,id:k,onClick:ne,onFocus:R,onPointerDown:B,[hp]:$?"":void 0,onKeyDownCapture(){Q.current=!0}},y,ie],stateAttributesMapping:nu})});function SO(n,i){const l=yt(n).getComputedStyle(n).transform;let r=0,u=0,f=1;if(l&&l!=="none"){const d=l.match(/matrix(?:3d)?\(([^)]+)\)/);if(d){const m=d[1].split(", ").map(parseFloat);m.length===6?(r=m[4],u=m[5],f=Math.sqrt(m[0]*m[0]+m[1]*m[1])):m.length===16&&(r=m[12],u=m[13],f=m[0])}}return{x:r,y:u,scale:f}}const xO="data-index",TO={...nu,...Gs},EO=b.forwardRef(function(i,l){const{className:r,value:u,render:f,keepMounted:d=!1,style:m,...h}=i,{value:p,getTabIdByPanelValue:y,orientation:v,tabActivationDirection:S,registerMountedTabPanel:w}=gp(),T=Pi(),{ref:C,index:O}=sp(),A=u===p,{mounted:N,transitionStatus:M,setMounted:D}=Hv(A),k=!N,L=y(u),j={hidden:k,orientation:v,tabActivationDirection:S,transitionStatus:M},H=b.useRef(null),J=bt("div",i,{state:j,ref:[l,C,H],props:[{"aria-labelledby":L,hidden:k,id:T,role:"tabpanel",tabIndex:A?0:-1,inert:Js(!A),[xO]:O},h],stateAttributesMapping:TO});return Ha({open:A,ref:H,onComplete(){A||D(!1)}}),Se(()=>{if(!(T==null||k&&!d))return w(u,T)},[k,d,u,T,w]),d||N?J:null}),wO=b.forwardRef(function(i,l){const{activateOnFocus:r=!1,className:u,loopFocus:f=!0,render:d,style:m,...h}=i,{orientation:p,setTabMap:y,tabActivationDirection:v}=gp(),[S,w]=b.useState(0),[T,C]=b.useState(null),O=b.useRef(new Set),A=b.useRef(new Set),N=b.useRef(null);Se(()=>{if(typeof ResizeObserver>"u")return;const H=new ResizeObserver(()=>{O.current.forEach(J=>{J()})});return N.current=H,T&&H.observe(T),A.current.forEach(J=>{H.observe(J)}),()=>{H.disconnect(),N.current=null}},[T]);const M=Oe(H=>(O.current.add(H),()=>{O.current.delete(H)})),D=Oe(H=>(A.current.add(H),N.current?.observe(H),()=>{A.current.delete(H),N.current?.unobserve(H)})),k={orientation:p,tabActivationDirection:v},L={"aria-orientation":p==="vertical"?"vertical":void 0,role:"tablist"},j=b.useMemo(()=>({activateOnFocus:r,registerIndicatorUpdateListener:M,registerTabResizeObserverElement:D,tabsListElement:T}),[r,M,D,T]);return E.jsx(I0.Provider,{value:j,children:E.jsx(hO,{render:d,className:u,style:m,state:k,refs:[l,C],props:[L,h],stateAttributesMapping:nu,highlightedIndex:S,enableHomeAndEndKeys:!0,loopFocus:f,orientation:p,onHighlightedIndexChange:w,onMapChange:y,disabledIndices:Mo})})}),P0=b.createContext(void 0);function ou(){const n=b.useContext(P0);if(!n)throw new Error(Zt(73));return n}let bb=0;function Y0(n){return bb+=1,`${n}-${Math.random().toString(36).slice(2,6)}-${bb}`}function Uf(n,i){if(typeof n=="string")return{description:n};if(typeof n=="function"){const l=n(i);return typeof l=="string"?{description:l}:l}return n}function Bf(n){const i=new Map;let l=0,r=0;return n.forEach((u,f)=>{const d=u.transitionStatus==="ending";i.set(u.id,{value:u,domIndex:f,visibleIndex:d?-1:l,offsetY:r}),r+=u.height||0,d||(l+=1)}),i}function If(n,i){let l=0;return n.map(r=>{if(r.transitionStatus==="ending")return r;const u=l>=i;return l+=1,r.limited===u?r:{...r,limited:u}})}const Vn={toasts:n=>n.toasts,isEmpty:n=>n.toasts.length===0,toast:(n,i)=>n.toastMetadata.get(i)?.value,toastIndex:(n,i)=>n.toastMetadata.get(i)?.domIndex??-1,toastOffsetY:(n,i)=>n.toastMetadata.get(i)?.offsetY??0,toastVisibleIndex:(n,i)=>n.toastMetadata.get(i)?.visibleIndex??-1,focused:n=>n.focused,expanded:n=>n.hovering||n.focused,expandedOrOutOfFocus:n=>n.hovering||n.focused||!n.isWindowFocused,prevFocusElement:n=>n.prevFocusElement};class RO extends Xl{timers=new Map;areTimersPaused=!1;constructor(i){super({...i,toastMetadata:Bf(i.toasts)},{},Vn)}setViewport=i=>{this.set("viewport",i)};syncProviderProps(i,l){const r=this.state.limit!==l;if(this.state.timeout===i&&!r)return;const u={timeout:i,limit:l};if(r){const f=If(this.state.toasts,l);u.toasts=f,u.toastMetadata=Bf(f)}this.update(u)}disposeEffect=()=>()=>{this.timers.forEach(i=>{i.timeout?.clear()}),this.timers.clear()};removeToast(i,l=!1){const r=Vn.toastIndex(this.state,i);if(r===-1)return;const u=this.state.toasts[r];l||u?.onRemove?.();const f=[...this.state.toasts];f.splice(r,1),this.setToasts(f)}addToast=i=>{const{timeout:l,limit:r}=this.state,u=i.id||Y0("toast");if(i.id){const h=Vn.toast(this.state,i.id);if(h)if(h.transitionStatus==="ending")this.removeToast(i.id,!0);else{const{id:p,transitionStatus:y,...v}=i;return this.updateToastInternal(i.id,v,!0,!0),i.id}}const f={...i,id:u,updateKey:0,transitionStatus:"starting"},d=[f,...this.state.toasts];this.setToasts(If(d,r));const m=f.timeout??l;return f.type!=="loading"&&m>0&&this.scheduleTimer(u,m,()=>this.closeToast(u)),Vn.expandedOrOutOfFocus(this.state)&&this.pauseTimers(),u};updateToast=(i,l)=>{const r=Vn.toast(this.state,i);!r||r.transitionStatus==="ending"||this.updateToastInternal(i,typeof l=="function"?l(r):l,!1,!0)};updateToastInternal=(i,l,r=!1,u=!1)=>{const{timeout:f,toasts:d}=this.state,m=Vn.toast(this.state,i);if(!m||m.transitionStatus==="ending")return;const h={...m,...l,...u&&{updateKey:m.updateKey+1}};this.setToasts(d.map(O=>O.id===i?h:O));const p=h.timeout??f,y=m.timeout??f,v=Object.hasOwn(l,"timeout"),S=h.transitionStatus!=="ending"&&h.type!=="loading"&&p>0,w=this.timers.has(i),T=y!==p,C=m.type==="loading";if(!S&&w){this.clearTimer(i);return}S&&(!w||T||v||C||r)&&(this.clearTimer(i),this.scheduleTimer(i,p,()=>this.closeToast(i)),Vn.expandedOrOutOfFocus(this.state)&&this.pauseTimers())};closeToast=i=>{const l=i===void 0,{limit:r,toasts:u}=this.state;let f;if(l)f=u,this.clearTimers();else{const h=Vn.toast(this.state,i);if(!h)return;f=[h],this.clearTimer(i)}const d=u.map(h=>l||h.id===i?{...h,transitionStatus:"ending",height:0}:h),m=If(d,r);this.setToasts(m,!m.some(h=>h.transitionStatus!=="ending")),f.forEach(h=>{h.transitionStatus!=="ending"&&h.onClose?.()}),this.handleFocusManagement(i)};promiseToast=(i,l)=>{const r=Uf(l.loading),u=this.addToast({...r,type:"loading"}),f=i.then(d=>{const m=Uf(l.success,d);return this.updateToast(u,{...m,type:"success",timeout:m.timeout}),d}).catch(d=>{const m=Uf(l.error,d);return this.updateToast(u,{...m,type:"error",timeout:m.timeout}),Promise.reject(d)});return{}.hasOwnProperty.call(l,"setPromise")&&l.setPromise(f),f};pauseTimers(){this.areTimersPaused||(this.areTimersPaused=!0,this.timers.forEach(i=>{i.timeout&&(i.timeout.clear(),i.remaining=Math.max(i.remaining-(Date.now()-i.start),0))}))}resumeTimers(){this.areTimersPaused&&(this.areTimersPaused=!1,this.timers.forEach((i,l)=>{i.remaining=i.remaining>0?i.remaining:i.delay,i.timeout??=vn.create(),i.timeout.start(i.remaining,()=>{this.handleTimerFired(l),i.callback()}),i.start=Date.now()}))}restoreFocusToPrevElement(){this.state.prevFocusElement?.focus({preventScroll:!0})}handleDocumentPointerDown=i=>{if(i.pointerType!=="touch")return;const l=St(i);Ne(this.state.viewport,l)||(this.resumeTimers(),this.update({hovering:!1,focused:!1}))};scheduleTimer(i,l,r){const u=Date.now(),d=!Vn.expandedOrOutOfFocus(this.state)?vn.create():void 0;d?.start(l,()=>{this.handleTimerFired(i),r()}),this.timers.set(i,{timeout:d,start:u,delay:l,remaining:l,callback:r})}clearTimers(){this.timers.forEach(i=>{i.timeout?.clear()}),this.timers.clear(),this.areTimersPaused=!1}clearTimer(i){this.timers.get(i)?.timeout?.clear(),this.timers.delete(i),this.resetPausedStateIfNoTimersRemain()}handleTimerFired(i){this.timers.delete(i),this.resetPausedStateIfNoTimersRemain()}resetPausedStateIfNoTimersRemain(){this.timers.size===0&&(this.areTimersPaused=!1)}setToasts(i,l=i.length===0){const r={toasts:i,toastMetadata:Bf(i)};l&&(r.hovering=!1,r.focused=!1),this.update(r)}handleFocusManagement(i){const l=kt(Fe(this.state.viewport));if(!this.state.viewport||!Ne(this.state.viewport,l)||!ws(l))return;if(i===void 0){this.restoreFocusToPrevElement();return}const r=Vn.toasts(this.state),u=Vn.toastIndex(this.state,i),f=(m,h)=>{for(let p=m;p>=0&&p<r.length;p+=h)if(r[p].transitionStatus!=="ending")return r[p];return null},d=f(u+1,1)??f(u-1,-1);d?d.ref?.current?.focus():this.restoreFocusToPrevElement()}}const CO=function(i){const{children:l,timeout:r=5e3,limit:u=3,toastManager:f}=i,d=Jt(()=>new RO({timeout:r,limit:u,viewport:null,toasts:[],hovering:!1,focused:!1,isWindowFocused:!0,prevFocusElement:null})).current;return Ls(d.disposeEffect),b.useEffect(function(){return f?f[" subscribe"](({action:p,options:y})=>{const v=y.id;p==="promise"&&y.promise?d.promiseToast(y.promise,y):p==="update"&&v?d.updateToast(v,y.updates):p==="close"?d.closeToast(v):d.addToast(y)}):void 0},[d,f]),E.jsxs(P0.Provider,{value:d,children:[E.jsx(OO,{store:d,timeout:r,limit:u}),l]})};function OO(n){const{store:i,timeout:l,limit:r}=n;return Se(()=>{i.syncProviderProps(l,r)},[i,l,r]),null}const AO="--toast-frontmost-height",MO=b.forwardRef(function(i,l){const{render:r,className:u,style:f,children:d,...m}=i,h=ou(),p=$t(),y=b.useRef(!1),v=b.useRef(!1),S=b.useRef(!1),w=h.useState("isEmpty"),T=h.useState("toasts"),C=h.useState("focused"),O=h.useState("expanded"),A=h.useState("prevFocusElement"),N=T[0]?.height,M=T.some(K=>K.transitionStatus==="ending"),D=T.filter(K=>K.priority==="high");b.useEffect(()=>{const K=h.state.viewport;if(!K||w)return;const ne=yt(K),R=Fe(K);function B(oe){oe.key==="F6"&&St(oe)!==K&&(oe.preventDefault(),h.set("prevFocusElement",kt(R)),K?.focus({preventScroll:!0}),h.pauseTimers(),h.set("focused",!0))}function W(oe){St(oe)===ne&&(h.set("isWindowFocused",!1),h.pauseTimers())}function V(oe){if(oe.relatedTarget)return;const ae=St(oe),ge=kt(Fe(K));(ae===ne||!Ne(K,ae)||!ws(ge))&&h.resumeTimers(),p.start(0,()=>h.set("isWindowFocused",!0))}return Gn(Pe(ne,"keydown",B),Pe(ne,"blur",W,!0),Pe(ne,"focus",V,!0),Pe(R,"pointerdown",h.handleDocumentPointerDown,!0))},[h,p,w]);function k(K){y.current=!0;const ne=K.relatedTarget===h.state.viewport?T.find(R=>R.transitionStatus!=="ending"&&!R.limited):void 0;ne?ne.ref?.current?.focus():h.restoreFocusToPrevElement()}function L(K){K.key==="Tab"&&K.shiftKey&&St(K.nativeEvent)===h.state.viewport&&(K.preventDefault(),h.restoreFocusToPrevElement())}function j(){h.state.toasts.some(ne=>ne.transitionStatus==="ending")||S.current||!v.current||(h.state.isWindowFocused&&h.resumeTimers(),h.set("hovering",!1),v.current=!1)}b.useEffect(j,[M,h]);function H(){h.pauseTimers(),h.set("hovering",!0),v.current=!1}function J(){h.state.isWindowFocused&&h.resumeTimers()}function $(){v.current=!0,j()}function Q(K){K.pointerType==="touch"&&(S.current=!0)}function I(K){K.pointerType==="touch"&&(S.current=!1,j())}function ee(){if(y.current){y.current=!1;return}C||ws(kt(Fe(h.state.viewport)))&&(h.set("focused",!0),h.pauseTimers())}function ie(K){!C||Ne(h.state.viewport,K.relatedTarget)||(h.set("focused",!1),J())}const F={tabIndex:-1,role:"region","aria-live":"polite","aria-atomic":!1,"aria-relevant":"additions text","aria-label":"Notifications",onMouseEnter:H,onMouseMove:H,onMouseLeave:$,onFocus:ee,onBlur:ie,onKeyDown:L,onClick:ee,onPointerDown:Q,onPointerUp:I,onPointerCancel:I,style:{[AO]:N?`${N}px`:void 0}},z={expanded:O},q=!w&&A&&E.jsx(Li,{onFocus:k}),P=bt("div",i,{ref:[l,h.setViewport],state:z,props:[F,m,{children:E.jsxs(b.Fragment,{children:[q,d,q]})}]});return E.jsxs(b.Fragment,{children:[q,P,!C&&D.length>0&&E.jsx("div",{style:Zb,children:D.map(K=>E.jsxs("div",{role:"alert","aria-atomic":!0,children:[E.jsx("div",{children:K.title}),E.jsx("div",{children:K.description})]},K.id))})]})}),q0=b.createContext(void 0);function iu(){const n=b.useContext(q0);if(!n)throw new Error(Zt(66));return n}function Pf(n,i,l){switch(n){case"up":return-l;case"down":return l;case"left":return-i;case"right":return i;default:return 0}}const DO="--toast-index",NO="--toast-offset-y",zO="--toast-height",_O="--toast-swipe-movement-x",kO="--toast-swipe-movement-y",jO="data-swipe-direction",HO={...Gs,swipeDirection(n){return n?{[jO]:n}:null}},vb=40,LO=10,Sb=.5,UO=1,BO=`${pE},${hE}`,IO=b.forwardRef(function(i,l){const{toast:r,render:u,className:f,swipeDirection:d=["down","right"],style:m,...h}=i,p=r.positionerProps?.anchor!==void 0;let y=[];p||(y=Array.isArray(d)?d:[d]);const v=y.length>0,S=ou(),[w,T]=b.useState(void 0),[C,O]=b.useState(!1),[A,N]=b.useState(!1),[M,D]=b.useState({x:0,y:0}),[k,L]=b.useState({x:0,y:0,scale:1}),[j,H]=b.useState(),[J,$]=b.useState(),[Q,I]=b.useState(null),ee=b.useRef(null),ie=b.useRef(void 0),F=b.useRef({x:0,y:0}),z=b.useRef({x:0,y:0,scale:1}),q=b.useRef(void 0),P=b.useRef(0),K=b.useRef(!1),ne=b.useRef({x:0,y:0}),R=b.useRef(!1),B=b.useRef({x:0,y:0}),W=b.useRef(null),V=b.useRef(null),oe=S.useState("toastIndex",r.id),ae=S.useState("toastVisibleIndex",r.id),ge=S.useState("toastOffsetY",r.id),ue=S.useState("focused"),pe=S.useState("expanded");Ha({open:r.transitionStatus!=="ending",ref:ee,onComplete(){r.transitionStatus==="ending"&&S.removeToast(r.id)}});const Re=Oe((Me=!1)=>{const fe=ee.current;if(!fe)return;const ye=fe.style.height;fe.style.height="auto";const de=fe.offsetHeight;fe.style.height=ye;function le(){S.updateToastInternal(r.id,{ref:ee,height:de,transitionStatus:void 0})}Me?Xn.flushSync(le):le()});Se(()=>{const Me=ie.current;r.transitionStatus!=="starting"&&Me===r.id||(Me!==void 0&&(T(void 0),L({x:0,y:0,scale:1}),ke({x:0,y:0})),ie.current=r.id,Re())},[Re,r.id,r.transitionStatus]);function ke(Me){B.current=Me,D(Me)}Se(()=>()=>{V.current?.abort()},[]);function ve(Me,fe){const ye=be=>be>0?be**Sb:-(Math.abs(be)**Sb),de=Me>0&&!y.includes("right")||Me<0&&!y.includes("left"),le=fe>0&&!y.includes("down")||fe<0&&!y.includes("up");return{x:de?ye(Me):Me,y:le?ye(fe):fe}}const me=Oe(Me=>{if(Me.pointerId!==W.current)return;W.current=null,V.current?.abort(),V.current=null,O(!1),N(!1),I(null);const fe=z.current;if(Me.type==="pointercancel"||K.current){ke({x:fe.x,y:fe.y}),T(void 0);return}const ye=B.current,de=ye.x-fe.x,le=ye.y-fe.y;let be;for(const Be of y)if(Pf(Be,de,le)>vb){be=Be;break}be?(T(be),S.closeToast(r.id)):(ke({x:fe.x,y:fe.y}),T(void 0))});function je(Me){if(Me.button!==0||(Me.pointerType==="touch"&&S.pauseTimers(),St(Me.nativeEvent)?.closest(`button,a,input,textarea,[role="button"],${BO}`)))return;K.current=!1,q.current=void 0,P.current=0,W.current=Me.pointerId,F.current={x:Me.clientX,y:Me.clientY},ne.current=F.current;const de=Me.currentTarget,le=SO(de);z.current=le,L(le),ke({x:le.x,y:le.y}),S.set("hovering",!0),O(!0),N(!1),I(null),R.current=!0,V.current?.abort();const be=new AbortController;V.current=be;const Be=Fe(de);Be.addEventListener("pointerup",me,{signal:be.signal}),Be.addEventListener("pointercancel",me,{signal:be.signal}),de.setPointerCapture?.(Me.pointerId)}function Le(Me){if(Me.pointerId!==W.current)return;Me.preventDefault(),R.current&&(F.current={x:Me.clientX,y:Me.clientY},R.current=!1);const{clientY:fe,clientX:ye,movementX:de,movementY:le}=Me;(le<0&&fe>ne.current.y||le>0&&fe<ne.current.y)&&(ne.current={x:ne.current.x,y:fe}),(de<0&&ye>ne.current.x||de>0&&ye<ne.current.x)&&(ne.current={x:ye,y:ne.current.y});const be=ye-F.current.x,Be=fe-F.current.y,Ut=fe-ne.current.y,tn=ye-ne.current.x;let Tt=Q;if(!A&&Math.sqrt(be*be+Be*Be)>=UO){N(!0);const At=y.includes("left")||y.includes("right"),Bn=y.includes("up")||y.includes("down");if(At&&Bn){const Xe=Math.abs(be),xt=Math.abs(Be);Tt=Xe>xt?"horizontal":"vertical",I(Tt)}}let xe;if(!q.current)Tt==="vertical"?Be>0?xe="down":Be<0&&(xe="up"):Tt==="horizontal"?be>0?xe="right":be<0&&(xe="left"):Math.abs(be)>=Math.abs(Be)?xe=be>0?"right":"left":xe=Be>0?"down":"up",xe&&y.includes(xe)&&(q.current=xe,P.current=Pf(xe,be,Be),T(xe));else{const En=q.current,At=Pf(En,tn,Ut);At>vb?(K.current=!1,T(En)):!(y.includes("left")&&y.includes("right"))&&!(y.includes("up")&&y.includes("down"))&&P.current-At>=LO&&(K.current=!0)}const Ye=ve(be,Be);let nt=z.current.x,pt=z.current.y;const Tn=y.includes("left")||y.includes("right"),Un=y.includes("up")||y.includes("down");Tt!=="vertical"&&Tn&&(nt+=Ye.x),Tt!=="horizontal"&&Un&&(pt+=Ye.y),ke({x:nt,y:pt})}function Ve(Me){if(Me.key==="Escape"){if(!ee.current||!Ne(ee.current,kt(Fe(ee.current))))return;S.closeToast(r.id)}}b.useEffect(()=>{const Me=ee.current;if(!v||!Me)return;function fe(ye){W.current===null||!Ne(Me,St(ye))||ye.preventDefault()}return Pe(Me,"touchmove",fe,{passive:!1})},[v]);function Te(){const Me=M.x-k.x,fe=M.y-k.y;return{transition:C?"none":void 0,transform:C?`translateX(${M.x}px) translateY(${M.y}px) scale(${k.scale})`:void 0,[_O]:`${Me}px`,[kO]:`${fe}px`}}const Ue=r.priority==="high",Ee={role:Ue?"alertdialog":"dialog",tabIndex:0,"aria-modal":!1,"aria-labelledby":j,"aria-describedby":J,"aria-hidden":Ue&&!ue?!0:void 0,onPointerDown:v?je:void 0,onPointerMove:v?Le:void 0,onPointerUp:v?me:void 0,onPointerCancel:v?me:void 0,onKeyDown:Ve,inert:Js(r.limited),style:{...Te(),[DO]:r.transitionStatus==="ending"?oe:ae,[NO]:`${ge}px`,[zO]:r.height?`${r.height}px`:void 0}},we=b.useMemo(()=>({toast:r,setTitleId:H,setDescriptionId:$,recalculateHeight:Re,visibleIndex:ae,expanded:pe}),[r,H,$,Re,ae,pe]),Ae={transitionStatus:r.transitionStatus,expanded:pe,limited:r.limited||!1,type:r.type,swiping:C,swipeDirection:w},Qe=bt("div",i,{ref:[l,ee],state:Ae,stateAttributesMapping:HO,props:[Ee,h]});return E.jsx(q0.Provider,{value:we,children:Qe})}),PO=b.forwardRef(function(i,l){const{render:r,className:u,style:f,...d}=i,{visibleIndex:m,expanded:h,recalculateHeight:p}=iu(),y=b.useRef(null);Se(()=>{p();const w=y.current;if(!w||typeof ResizeObserver!="function"||typeof MutationObserver!="function")return;const T=new ResizeObserver(()=>p(!0)),C=new MutationObserver(()=>p(!0));return T.observe(w),C.observe(w,{childList:!0,subtree:!0,characterData:!0}),()=>{T.disconnect(),C.disconnect()}},[p]);const v=m>0;return bt("div",i,{ref:[l,y],state:{expanded:h,behind:v},props:d})});function V0(n){return n==null||typeof n=="boolean"||n===""?!1:Array.isArray(n)?n.some(V0):!0}function G0(n){return b.isValidElement(n)&&V0(n.props.children)}function X0(n,i,l){const{toast:r,setTitleId:u,setDescriptionId:f}=iu(),d=l==="title"?u:f,m=i??(l==="title"?r.title:r.description);return{id:Ui(n),children:m,type:r.type,setId:d}}function F0(n,i,l){const r=G0(n);return Se(()=>{if(r)return l(i),()=>{l(u=>u===i?void 0:u)}},[r,i,l]),r?n:null}const YO=b.forwardRef(function(i,l){const{render:r,className:u,style:f,id:d,children:m,...h}=i,{id:p,children:y,type:v,setId:S}=X0(d,m,"description"),T=bt("p",i,{ref:l,state:{type:v},props:{...h,id:p,children:y}});return F0(T,p,S)}),qO=b.forwardRef(function(i,l){const{render:r,className:u,style:f,id:d,children:m,...h}=i,{id:p,children:y,type:v,setId:S}=X0(d,m,"title"),T=bt("h2",i,{ref:l,state:{type:v},props:{...h,id:p,children:y}});return F0(T,p,S)}),VO=b.forwardRef(function(i,l){const{render:r,className:u,style:f,disabled:d,nativeButton:m=!0,...h}=i,p=ou(),{toast:y,expanded:v}=iu(),[S,w]=b.useState(!1),{getButtonProps:T,buttonRef:C}=Ua({disabled:d,native:m}),O={type:y.type};return bt("button",i,{ref:[l,C],state:O,props:[{"aria-hidden":!v&&!S,onClick(){p.closeToast(y.id)},onFocus(){w(!0)},onBlur(){w(!1)}},h,T]})}),GO=b.forwardRef(function(i,l){const{render:r,className:u,style:f,disabled:d,nativeButton:m=!0,...h}=i,{toast:p}=iu(),y=p.actionProps?.children??h.children,{getButtonProps:v,buttonRef:S}=Ua({disabled:d,native:m}),w={type:p.type},T=bt("button",i,{ref:[l,S],state:w,props:[h,p.actionProps,v,{children:y}]});return G0(T)?T:null}),XO=b.forwardRef(function(i,l){return E.jsx(Zv,{ref:l,...i})});function FO(){const n=ou(),i=n.useState("toasts");return b.useMemo(()=>({toasts:i,add:n.addToast,close:n.closeToast,update:n.updateToast,promise:n.promiseToast}),[i,n])}function KO(){const n=new Set;function i(l){n.forEach(r=>r(l))}return{" subscribe":function(r){return n.add(r),()=>{n.delete(r)}},add(l){const r=l.id||Y0("toast"),u={...l,id:r,transitionStatus:"starting"};return i({action:"add",options:u}),r},close(l){i({action:"close",options:{id:l}})},update(l,r){i({action:"update",options:{id:l,updates:r}})},promise(l,r){let u=l;return i({action:"promise",options:{...r,promise:l,setPromise(f){u=f}}}),u}}}function K0({value:n,onChange:i,items:l,className:r,trailing:u,label:f}){return E.jsxs(yO,{value:n,onValueChange:d=>i(d),className:zo("flex min-h-0 flex-col",r),children:[E.jsxs("div",{className:"flex h-9 shrink-0 items-center gap-1 border-b border-line px-2","data-ui-tabs-bar":"",children:[E.jsx(wO,{"aria-label":f,className:"relative flex items-center gap-1",children:l.map(d=>E.jsx(vO,{value:d.value,className:"h-7 rounded-md px-2 text-[13px] font-medium text-fg-muted outline-none hover:text-fg data-[active]:bg-hover data-[active]:text-fg focus-visible:outline-2 focus-visible:outline-accent",children:d.label},d.value))}),E.jsx("div",{className:"ml-auto flex items-center gap-1",children:u})]}),l.map(d=>E.jsx(EO,{value:d.value,keepMounted:d.keepMounted,className:"min-h-0 flex-1 overflow-auto outline-none",children:d.content},d.value))]})}function mp({icon:n,title:i,children:l}){return E.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-2 p-8 text-center text-fg-muted",children:[n?E.jsx("div",{className:"text-fg-subtle",children:n}):null,E.jsx("div",{className:"text-[15px] font-semibold text-fg",children:i}),l?E.jsx("div",{className:"max-w-sm",children:l}):null]})}const yp=KO();function QO(n){if(n.repeat||n.key!=="Enter"&&n.key!==" ")return;const i=n.currentTarget.closest("[data-toast]")??n.currentTarget,l=i.ownerDocument.defaultView;l&&mR(l,n.key,r=>r instanceof l.Node&&i.contains(r))}function ZO(){const{toasts:n}=FO();return n.map(i=>E.jsxs(IO,{toast:i,"data-toast":"",className:"pointer-events-auto flex w-80 items-start gap-3 rounded-lg bg-surface p-3 text-fg shadow-popup transition-[opacity,transform] data-[starting-style]:translate-y-2 data-[starting-style]:opacity-0 data-[ending-style]:opacity-0",children:[E.jsxs(PO,{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[E.jsx(qO,{className:"text-[13px] font-semibold"}),E.jsx(YO,{className:"text-xs text-fg-muted"}),i.actionProps?E.jsx(GO,{className:"mt-1 self-start rounded px-2 py-0.5 text-xs font-medium text-accent hover:bg-hover"}):null]}),E.jsx(VO,{"aria-label":"Dismiss",onKeyDown:QO,className:"rounded p-0.5 text-fg-muted hover:bg-hover",children:E.jsx(dp,{className:"size-3.5"})})]},i.id))}function WO({children:n}){return E.jsxs(CO,{toastManager:yp,timeout:4e3,children:[n,E.jsx(XO,{children:E.jsx(MO,{className:"pointer-events-none fixed bottom-4 right-4 z-[1100] flex flex-col gap-2",children:E.jsx(ZO,{})})})]})}const JO=["a[href]","button","iframe","input","select","textarea","summary","audio[controls]","video[controls]","[contenteditable]:not([contenteditable='false'])","[tabindex]"].join(", "),$O="audio[controls], video[controls], [contenteditable]:not([contenteditable='false'])";function eA(n){return!(n.tabIndex>=0||!n.hasAttribute("tabindex")&&n.matches($O))||n.getAttribute("aria-hidden")==="true"||n.matches(":disabled")?!1:typeof n.checkVisibility!="function"||n.checkVisibility({visibilityProperty:!0})}function tA(n){return Array.from(n.querySelectorAll(JO)).filter(eA)}function nA(n){const i=l=>!/visible|hidden|clip/.test(l);return n.scrollWidth>n.clientWidth+1&&i(n.overflowX)||n.scrollHeight>n.clientHeight+1&&i(n.overflowY)}function oA(n){const[i,l]=b.useState(!1);return b.useLayoutEffect(()=>{const r=n.current,u=r?.ownerDocument.defaultView;if(!r||!u)return;const f=()=>{const y=u.getComputedStyle(r);l(nA({scrollWidth:r.scrollWidth,clientWidth:r.clientWidth,scrollHeight:r.scrollHeight,clientHeight:r.clientHeight,overflowX:y.overflowX,overflowY:y.overflowY}))};if(f(),typeof u.ResizeObserver!="function")return;const d=new u.ResizeObserver(f),m=new Set,h=y=>{if(y.nodeType!==1)return;const v=y;if(u.getComputedStyle(v).display==="contents"){v.childNodes.forEach(h);return}m.has(v)||(m.add(v),d.observe(v))};d.observe(r),r.childNodes.forEach(h);const p=new u.MutationObserver(y=>{for(const v of y)v.addedNodes.forEach(h);for(const v of m)r.contains(v)||(d.unobserve(v),m.delete(v));f()});return p.observe(r,{childList:!0,subtree:!0,characterData:!0}),()=>{d.disconnect(),p.disconnect()}},[n]),i}b.forwardRef(function({label:i,className:l,...r},u){const f=b.useRef(null),d=b.useCallback(w=>{f.current=w,typeof u=="function"?u(w):u&&(u.current=w)},[u]),m=oA(f),[h,p]=b.useState(!1),[y,v]=b.useState(null);b.useLayoutEffect(()=>{const w=f.current,T=w?.ownerDocument.defaultView;if(!m||!w||!T)return;const C=()=>{p(tA(w).length===0),v(w.closest('[role="dialog"], [role="alertdialog"]')?.getAttribute("aria-labelledby")??null)};C();const O=new T.MutationObserver(C);return O.observe(w,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["tabindex","disabled","hidden","href","contenteditable"]}),()=>O.disconnect()},[m]);const S=m&&h;return E.jsx("div",{ref:d,...S?{role:"group",tabIndex:0,"aria-labelledby":i===void 0?y??void 0:void 0,"aria-label":i??(y===null?"Panel content":void 0)}:{},className:zo(S&&"focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-accent",l),...r})});const iA={blur:{label:"Blur",unit:"px",min:0,max:200,step:1,identity:0,initial:4},brightness:{label:"Brightness",unit:"%",min:0,max:500,step:1,identity:100,initial:120},contrast:{label:"Contrast",unit:"%",min:0,max:500,step:1,identity:100,initial:120},grayscale:{label:"Grayscale",unit:"%",min:0,max:100,step:1,identity:0,initial:100},saturate:{label:"Saturate",unit:"%",min:0,max:500,step:1,identity:100,initial:150},"hue-rotate":{label:"Hue rotate",unit:"deg",min:-360,max:360,step:1,identity:0,initial:90},invert:{label:"Invert",unit:"%",min:0,max:100,step:1,identity:0,initial:100},sepia:{label:"Sepia",unit:"%",min:0,max:100,step:1,identity:0,initial:100},opacity:{label:"Opacity",unit:"%",min:0,max:100,step:1,identity:100,initial:50}};[...Object.keys(iA)];const aA={cancel:"Cancel",close:"Close",copy:"Copy",copied:"Copied",copyLink:"Copy link",loading:"Loading…",justNow:"just now",never:"never",agent:"Agent",delete:"Delete",rename:"Rename",duplicate:"Duplicate",copyName:"Name of the copy",documentTabs:"Document tabs",pin:"Pin",unpin:"Unpin",open:"Open",save:"Save",updated:"Updated {when}",pinned:"Pinned",unpinned:"Unpinned",duplicated:"Duplicated",couldNotPin:"Could not pin: {error}",couldNotUnpin:"Could not unpin: {error}",couldNotRename:"Could not rename: {error}",couldNotDuplicate:"Could not duplicate: {error}",couldNotDelete:"Could not delete: {error}",statusNone:"No session",statusWorking:"Working",statusIdle:"Idle",statusWaiting:"Waiting",statusOffline:"Offline",working:"{agent} is working…",artifactOptions:"Artifact options",artifactName:"Artifact name",comments:"Comments",doneCommenting:"Done commenting",openComment:"1 open comment",openComments:"{count} open comments",commentOptions:"Comment options",showAllComments:"Show all comments",hideComments:"Hide comments",share:"Share",sharedOnNetwork:"Shared with your network",onlyThisComputer:"Only this computer",ask:"Ask {agent}",hideAsk:"Hide",openHarnessSession:"Open the {harness} session",messageAgent:"Message {agent} about this artifact",switchArtifact:"Switch artifact",inThisSession:"In this session",recent:"Recent",allArtifacts:"All artifacts",export:"Export",openSession:"Open session",offline:"offline",versionHistory:"Version history",peopleHere:"Here now",peopleHereNames:"Here now: {names}",peopleMore:"+{count}",youOtherTab:"You, in another tab",yourOtherTab:"your other tab",follow:"Follow",stopFollow:"Stop",followName:"Follow {name}",stopFollowingName:"Stop following {name}",followingName:"Following {name}",followingYou:"Following you",followingToast:"Following {name}. Press Escape to stop.",stoppedFollowingLeft:"Stopped following: {name} left.",openInNewTab:"Open in new tab",refresh:"Refresh",storage:"Storage",inThisFolder:"{size} in this folder",copyPath:"Copy path",linkCopied:"Link copied",pathCopied:"Path copied",deleteTitle:'Delete "{title}"?',deleteBody:"It leaves your artifacts. Its folder stays where it is: {root}",shareTitle:"Share this artifact",peopleWithAccess:"People with access",joinedPeople:"People who joined",noneJoined:"Nobody has joined yet. Send someone a link below.",online:"Online",seenAgo:"Seen {when}",guestPaused:"Link off: no access until it is back on",changeRole:"Change {name}'s role",roleLinkOff:"Link off",remove:"Remove",removeGuest:"Remove {name}",removeTitle:"Remove {name}?",removeBody:"They lose access to this artifact. They can join again with a link.",you:"(you)",thisComputer:"This computer",owner:"Owner",generalAccess:"General access",onLan:"Anyone on your network with a link",onlyHereSub:"Nobody else can open the links.",onLanSub:"People on the same Wi-Fi or LAN open it with a link; the link sets their role.",onNetworkAt:"On this network at {addresses}",onTailnet:"Tailscale: {address}, for people on your tailnet from any network (copy it from a link's More menu)",noAddress:"This computer has no local network address.",whereOff:"Only this computer can open these links for now. Copying one opens this to your network.",inviteLinks:"Invite links",roleEditor:"Editor",roleCommenter:"Commenter",roleViewer:"Viewer",linkEditor:"Can edit",linkCommenter:"Can comment",linkViewer:"Can view",noteEditor:"Edit and comment",noteCommenter:"Comment, no edits",noteViewer:"Read only",linkOff:"Off: nobody can join with it",turnOn:"Turn on",more:"More",moreFor:"More: {role}",copyTailnet:"Copy Tailscale link",copyTailnetNote:"For people on your tailnet, off this network ({address})",turnOnLink:"Turn on link",turnOffLink:"Turn off link",turnOffNote:"Whoever joined with it loses access until it is back on",resetLink:"Reset link",resetNote:"A new address; whoever joined with the old one is removed",resetTitle:'Reset the "{role}" link?',resetBody:"The old link stops working and the people who joined with it lose access.",plainHttp:"This is plain HTTP: others on the network can read what passes. A link is the permission: whoever has it gets its role, so send it only to the people meant to have it, and reset a link that went further.",cannotShare:"{type} pages can't be shared on the network yet: only this computer opens it.",shareError:"Could not do that: {error}",shareNoAnswer:"The sharing settings did not load: the Open Artifact service is not answering. Try again in a moment.",sendingTitle:"Sending this to someone?",sendingBody:"Share the link instead of a file and they will always have the latest changes.",invitePeople:"Invite people",allLinksOff:"All the links are off. Invite people to turn one on.",joinsAs:"People who open this link join as {role}. Invite people to give another role.",standaloneShare:"Manage network sharing in the Open Artifact app or with the share CLI command.",onlyHereLink:"Only this computer can open the link.",nothingToExport:"Nothing to export yet.",exportOptions:"Asks for options first",archiveLabel:"Whole folder (.zip)",destinationDescription:"Asks {agent} to export it there",destinationRequestLabel:"Export to {label}",destinationSent:"Asked {agent} to export to {label}",archiveDescription:"Everything here, to back up or move",archiveStarted:"Downloading {name}",archiveHint:"The whole folder in one zip, to back up, move to another computer or send to someone. Unzip it and open it with the same type to carry on; share links and this computer's server state are left out.",archiveTooLarge:"The folder is over what a zip holds (4 GiB or 65,535 files): copy the folder itself instead.",archiveUnsupported:"{type} folders can't be zipped here: copy the folder itself instead.",archiveFailed:"Could not zip the folder: {error}",exportBusy:"Another export is running. Try {label} again in a moment.",exportUnsupported:"{label} can't be exported right now.",exportFailed:"Could not export {label}.",saving:"Saving…",reconnecting:"Reconnecting…",notSaved:"Not saved",notSavedTitle:"The page could not save its last changes.",saveRetry:"Couldn't save — retry",readOnly:"Read-only",readOnlyTitle:"Nothing can be saved here",leaveLosesWork:"Leave? Changes that are not saved yet will be lost.",actionSaveNow:"Save now",actionOpenFind:"Find",actionUndo:"Undo",actionRedo:"Redo",actionEditPage:"Edit page",actionUsePage:"Use this page",actionCommentSelection:"Comment on selection",actionOpenPageList:"Pages",actionHandOffCode:"Hand off to code",whyOlderVersion:"You are viewing an older version",whyAgentWorking:"{agent} is working",whyDraftOpen:"Close the open draft first",whyCommentsOn:"Turn off comment mode first",whyNeedsAgent:"Needs an agent session",whyUnsaved:"Save first",whyOther:"Not available right now",noOwner:"No session owns this artifact",noOwnerNote:"What you send waits for the next session that works on it.",ownerNote:"Messages go to the {harness} session that made this artifact.",agentIdle:"{agent} is idle",agentWaiting:"{agent} is waiting",sessionOffline:"The session is offline",offlineNote:"{agent} sees what you send the next time the {harness} session works.",askPlaceholder:"What should change?",sendToAgent:"Send to {agent}",sendToConversation:"Put in the {agent} conversation",sending:"Sending…",sent:"Sent.",sentInbox:"{agent} will see it the next time the session works.",sentDrafted:"It is in the {agent} conversation now: send it there.",notDelivered:"Not delivered.",notSent:"Not sent: {error}",viaDelivered:"delivered",viaDrafted:"in the conversation, for you to send",viaInbox:"waiting for the session",viaFailed:"not delivered",askCloudOnline:"{agent} is connected: it gets this now.",askCloudOffline:"{agent} will get this when its computer is back online.",askCloudMcp:"{agent} will see this the next time it works on the artifact.",askCloudNone:"No agent is connected to this site for you. Connect a computer or an MCP client; the request waits until then.",askCloudNoneOther:"The owner has no agent connected to this site. The request waits until they connect one.",sentCloudDelivered:"Delivered: {agent} has it now.",sentCloudOffline:"Sent. {agent} will get it when its computer is back online.",sentCloudMcp:"Sent. {agent} will see it the next time it works on the artifact.",sentCloudNone:"Sent. It waits until an agent is connected.",viaWaitingAgent:"waiting for the agent",statusConnected:"Connected",statusNoAgent:"No agent",emptyTitle:"This artifact is empty",emptyBody:"Nothing of {type} has been written to {root} yet. An agent writes it: send it this.",startSession:"Start a session with {agent}",promptCopied:"Copied: paste it into any agent session that has the Artifact tool.",sentToSession:"Sent to a new session.",problemTitle:"This artifact cannot open here",noPage:"No page.",readOnlyNewer:"Read-only here: {type} {release} wrote this artifact and this computer has {version}. Update Open Artifact (open-artifact runtime update, or update the app it came with) to edit it.",folder:"Folder: {root}",askToLook:"Ask {agent} to look",problemAsk:"The artifact page could not open: {problem}",noBoot:"No artifact to show. Open one from the home page.",tryAgain:"Try again",bootFailed:"The page did not open: {error}",frameNotOpen:"The page is not open any more (its server may have restarted), and opening it again did not work.",frameNotGranted:"This page is not open to you here any more.",homeTitle:"Open Artifact",homeSub:"The artifacts and types every agent on this computer shares.",artifacts:"Artifacts",types:"Types",newArtifact:"New artifact",moreActions:"More actions",backToSession:"Back to session",noArtifacts:"No artifacts yet. Ask an agent to make one with the Artifact tool, or start one here.",pageOpen:"Open now",typeMissing:"Type not installed",deleted:'Deleted "{title}". Its folder stays.',undo:"Undo",restored:"Restored",couldNotRestore:"Could not restore: {error}",couldNotLoad:"Could not load: {error}",typeRoots:"Type roots: {roots}",noTypes:"No types found.",disabled:"Disabled",shadowedBy:"Overridden by {root}",newOf:"New {type}",create:"Create",title:"Title",folderOptional:"Folder (optional)",folderHint:"Default: a new folder in the home workspace",needTitle:"Give it a title first.",couldNotCreate:"Could not create it: {error}",renameArtifact:"Rename artifact",cannotCreateYet:"Only Design artifacts can be made here for now.",cannotShareCloud:"{type} artifacts can't be shared here yet.",signIn:"Sign in",signOut:"Sign out",signOutFailed:"Could not sign out: {error}",accountOf:"Account: {name}",sharedWithOthers:"Shared with others",addPeople:"Add people",addPeoplePlaceholder:"Email, or @domain for everyone there",add:"Add",addInvalid:"Not an email address or @domain: {entries}",roleFor:"Role for the people you add",memberPending:"Invited: has not signed in yet",memberDomain:"Everyone at {domain}",memberGroup:"Group",removeAccess:"Remove access",removeMemberBody:"They lose access to this artifact. You can add them again.",noMembers:"Nobody else is added yet.",accessRestricted:"Restricted",accessRestrictedSub:"Only the people added here can open it.",accessLink:"Anyone with the link",accessLinkSub:"Whoever has one of the links below gets its role.",accessPublic:"Public",accessPublicSub:"Anyone can open it as a viewer; the links below give more.",shareSettings:"Settings",viewersCanExport:"Viewers can download and export",editorsCanAsk:"Editors can ask {agent}",ownedBy:"Owned by {name}",yourRole:"Your role: {role}",onlyOwnerShares:"Only the owner can change who has access.",emptyBodyCloud:"Nothing of {type} has been written yet. An agent writes it: send it this.",homeSubCloud:"Your artifacts and the ones shared with you.",noArtifactsCloud:"No artifacts yet. Publish one from an agent with the Artifact tool, or ask someone to share one with you.",pubTitle:"Publish to the web",pubIntro:"Give it a web address that works even when this computer is off. You choose who can open it there.",pubDataNote:"Publishing this dashboard publishes its data too: this computer runs its live queries and puts the rows on the site, where everyone who can open it sees them.",pubDataPending:"Its live data isn’t on the site yet: the page there shows no figures until you publish the data.",pubDataConfirm:"Publish its data",pubDataAsOf:"Data on the site as of {time}, refreshed from this computer.",pubDataNone:"Its data is published; the first rows are on their way.",pubDataFailed:"The last refresh failed: {reason}",pubDataRefresh:"Refresh now",pubDataRefreshing:"Refreshing…",pubDataStop:"Stop publishing data",pubDataStopTitle:"Stop publishing its data?",pubDataStopBody:"The rows are removed from {host} and this computer stops refreshing them. The dashboard stays published there, with no figures until you publish its data again.",pubConnectSite:"Connect a site…",pubConnectAnother:"Connect another site…",pubAddress:"Site address",pubAddressPlaceholder:"https://artifacts.example.com",pubAddressHint:"The web address of an Open Artifact site you have an account on.",pubName:"Name",pubNameHint:"A short name to tell your sites apart, like work.",pubConnect:"Connect",pubConnecting:"Connecting…",pubCodeTitle:"Approve this computer on {host}",pubCodeBody:"Check that the page shows this code, then approve.",pubCodeOpened:"The approval page opened in your browser. If you don’t see it, open it here:",pubOpenApproval:"Open approval page",pubWaitingApproval:"Waiting for you to approve…",pubConnected:"Connected to {host} as {name}.",pubTryAgain:"Try again",pubSignedInAs:"Signed in as {name}",pubStateConnected:"Connected",pubStateConnecting:"Connecting…",pubStateUnreachable:"Can't be reached",pubStateSignedOut:"Signed out",pubPublish:"Publish",pubPublishing:"Publishing…",pubReconnect:"Connect again",pubPublishedAt:"Published on {host}",pubOpen:"Open",pubManage:"Who can open it is set on its web page: open it and use Share there.",pubManageLink:"Manage access on the web",pubOpensThere:"Opening it on this computer now takes you to its web address while the site can be reached.",pubUnpublish:"Unpublish",pubUnpublishing:"Unpublishing…",unpubTitle:"Unpublish this artifact?",unpubBody:"The web copy goes to the trash on {host} and its web address stops working. This folder stays on this computer, with the latest changes from the web.",pubInSync:"Up to date",pubInSyncAt:"Up to date · synced {when}",pubWaitingOne:"1 change waiting to be sent",pubWaiting:"{count} changes waiting to be sent",pubOffline:"Can't reach {host}: changes are kept here and sent when it is back.",pubSignedOutSync:"Signed out of {host}: changes are kept here. Connect again to send them.",pubSyncFailed:"The last sync failed: {error}",pubCloudMark:"Published to the web",pubCloudAt:"Published at {url}",pubHostEmpty:"Type the site’s address.",pubHostInvalid:"That is not a web address. Type it like https://artifacts.example.com.",pubHostNotHttps:"The address must start with https:// (plain http only works for this computer or a private network, like 192.168.1.20, nas.lan or 192-168-1-20.nip.io).",pubInsecureWarning:"Plain http: what you publish travels unencrypted. Use it only on a network you trust.",pubAutoSwitch:"Publish new artifacts automatically",pubAutoHint:"Artifacts created from now on go to {host} by themselves. Earlier ones stay as they are.",pubAutoNoSite:"Choose a default site to publish to.",pubDefaultSite:"Default site",pubDefaultMark:"default",pubAutoPublishing:"Being published to {host} automatically…",pubAutoSignedOut:"Waiting to be published to {host}: this computer is not signed in there yet.",pubAutoUnreachable:"Waiting to be published: can't reach {host}. It is tried again by itself.",pubAutoFailed:"Not published to {host} yet: {error} It is tried again by itself.",pubApprovalTitle:"Approve this computer on {host}",pubApprovalBody:"This computer was set up to publish to {host}. Open the approval page, check that it shows this code, and approve.",pubCloudSettingsFailed:"Could not change the setting: {error}",pubNameInvalid:"Use letters, digits, - and _ (up to 32), like work.",pubNameTaken:"That name is already used for another site. Choose another name.",pubNoDaemon:"Open Artifact on this computer did not answer. Check that it is running, then try again.",pubConnectDenied:"The connection was refused on {host}. Try again if that was a mistake.",pubConnectExpired:"The code ran out before it was approved. Try again and approve within a few minutes.",pubConnectUnreachable:"Can't reach {host}. Check the address and your connection, then try again.",pubConnectNotHost:"{host} does not look like an Open Artifact site. Check the address.",pubConnectFailed:"Could not connect: {error}",pubIdTaken:"{host} already has an artifact with this one’s id that is still published there (maybe from another computer) or is someone else’s. Unpublish it there first (one you unpublished is replaced when you publish again), or duplicate this artifact and publish the copy.",pubAlreadyElsewhere:"It is already published to another site. Unpublish it there first.",pubTooLarge:"It is too large for {host}. Remove big files from its folder, then try again.",pubSignedOut:"You are signed out of {host}. Connect again, then try again.",pubNotAllowed:"{host} did not allow it: your account there may not be able to publish.",pubUnreachable:"Can't reach {host} right now. Try again once it is back.",pubUnsupported:"{host} cannot take this kind of artifact yet.",pubFailed:"Could not publish: {error}",unpubUnreachable:"Can't reach {host} to bring its latest version here first. Try again once it is back.",unpubFailed:"Could not unpublish: {error}",openOnWeb:"Open on the web",copyWebLink:"Copy web link",webLinkCopied:"Web link copied",signOutAccess:"Sign out, here and of your organisation’s sign-in",upload:"Upload",uploadHint:"Upload an artifact: the .zip from “Whole folder (.zip)” in its Export tab.",uploadDrop:"Drop the .zip to upload it",uploadSending:"Uploading {name}… {percent}%",uploadSendingSize:"Uploading {name}…",uploadChecking:"Checking {name}…",uploadOpening:"Uploaded {name}. Opening it…",uploadNotZip:"That file is not a .zip. Use “Whole folder (.zip)” from an artifact’s Export tab.",uploadNotArtifact:"That zip is not an Open Artifact folder. Use “Whole folder (.zip)” from an artifact’s Export tab.",uploadTooLargeLimit:"That zip is too large: this site takes up to {limit}. Remove big files from the folder, then try again.",uploadTooLarge:"That zip is too large for this site. Remove big files from the folder, then try again.",uploadTooLargeSaid:"That zip is too large for this site: {error} Remove big files from the folder, then try again.",uploadSignedOut:"You are signed out. Sign in again, then upload it.",uploadNotAllowed:"This site does not let you upload artifacts.",uploadConflict:"Something on the site got in the way. Try again.",uploadTypeMissing:"This site cannot open {type} artifacts yet.",uploadBusy:"Too many tries at once. Wait a moment, then try again.",uploadNoAnswer:"The site did not answer. Check your connection, then try again.",uploadFailed:"Could not upload it: {error}",dismiss:"Dismiss",trash:"Trash",trashEmpty:"The trash is empty.",trashNote:"Nobody it was shared with can open an artifact while it is in the trash.",trashedWhen:"Moved to the trash {when}",trashKeptDays:"Deleted for good after {days} days in the trash.",trashKeptOneDay:"Deleted for good after 1 day in the trash.",trashKeptForever:"Kept here until you delete it forever.",restore:"Restore",restoredTitle:'Restored "{title}"',deleteForever:"Delete forever",purgeTitle:'Delete "{title}" forever?',purgeBody:"This cannot be undone. It is removed from this site, and everyone it was shared with loses access to it.",purged:'Deleted "{title}" forever',purgeNotTrashed:"It is not in the trash any more.",purgeGone:"It is already gone.",couldNotPurge:"Could not delete it: {error}",moveToTrash:"Move to trash",movedToTrash:'Moved "{title}" to the trash.',shareOnNetwork:"Share on this network instead",shareOnNetworkSub:"Links from here open this computer’s copy, not the web page."},lA={cancel:"取消",close:"关闭",copy:"复制",copied:"已复制",copyLink:"复制链接",loading:"加载中…",justNow:"刚刚",never:"从未",agent:"Agent",delete:"删除",rename:"重命名",duplicate:"复制一份",copyName:"副本名称",documentTabs:"文档标签页",pin:"置顶",unpin:"取消置顶",open:"打开",save:"保存",updated:"更新于 {when}",pinned:"已置顶",unpinned:"已取消置顶",duplicated:"已复制一份",couldNotPin:"没能置顶:{error}",couldNotUnpin:"没能取消置顶:{error}",couldNotRename:"没能重命名:{error}",couldNotDuplicate:"没能复制:{error}",couldNotDelete:"没能删除:{error}",statusNone:"无会话",statusWorking:"工作中",statusIdle:"空闲",statusWaiting:"等待中",statusOffline:"离线",working:"{agent} 正在工作…",artifactOptions:"作品选项",artifactName:"作品名",comments:"评论",doneCommenting:"结束评论",openComment:"1 条未解决的评论",openComments:"{count} 条未解决的评论",commentOptions:"评论选项",showAllComments:"显示全部评论",hideComments:"隐藏评论",share:"分享",sharedOnNetwork:"已分享到局域网",onlyThisComputer:"仅这台电脑",ask:"问 {agent}",hideAsk:"收起",openHarnessSession:"打开 {harness} 会话",messageAgent:"就这个作品给 {agent} 发消息",switchArtifact:"切换作品",inThisSession:"这个会话里的",recent:"最近",allArtifacts:"所有作品",export:"导出",openSession:"打开会话",offline:"离线",versionHistory:"版本历史",peopleHere:"正在查看",peopleHereNames:"正在查看:{names}",youOtherTab:"你(另一个标签页)",yourOtherTab:"你的另一个标签页",follow:"跟随",stopFollow:"停止",followName:"跟随 {name}",stopFollowingName:"停止跟随 {name}",followingName:"正在跟随 {name}",followingYou:"正在跟随你",followingToast:"正在跟随 {name},按 Esc 停止。",stoppedFollowingLeft:"{name} 已离开,停止跟随。",openInNewTab:"在新标签页打开",refresh:"刷新",storage:"存储",inThisFolder:"这个文件夹 {size}",copyPath:"复制路径",linkCopied:"链接已复制",pathCopied:"路径已复制",deleteTitle:"删除「{title}」?",deleteBody:"它会移出作品列表,文件夹保留在原处:{root}",shareTitle:"分享这份内容",peopleWithAccess:"有权访问的人",joinedPeople:"加入的人",noneJoined:"还没有人加入。把下面的链接发给对方。",online:"在线",seenAgo:"{when}来过",guestPaused:"链接已关闭,暂时无法访问",changeRole:"更改「{name}」的角色",roleLinkOff:"链接已关闭",remove:"移出",removeGuest:"移出 {name}",removeTitle:"移出「{name}」?",removeBody:"对方将无法再访问这份内容,之后仍可以用链接重新加入。",you:"(你)",thisComputer:"这台电脑",owner:"所有者",generalAccess:"一般访问权限",onLan:"同一网络里有链接的人",onlyHereSub:"别人打不开这些链接。",onLanSub:"同一 Wi-Fi 或局域网里的人用链接打开,链接决定角色。",onNetworkAt:"在这个网络上:{addresses}",onTailnet:"Tailscale:{address},同一 tailnet 的人在别的网络也能打开(复制在链接的「更多」里)",noAddress:"这台电脑没有局域网地址。",whereOff:"现在只有这台电脑能打开这些链接。复制链接会顺手分享到局域网。",inviteLinks:"邀请链接",roleEditor:"编辑者",roleCommenter:"评论者",roleViewer:"查看者",linkEditor:"可编辑",linkCommenter:"可评论",linkViewer:"可查看",noteEditor:"编辑和评论",noteCommenter:"只能评论",noteViewer:"只读",linkOff:"已关闭:没人能用它加入",turnOn:"开启",more:"更多",moreFor:"更多:{role}",copyTailnet:"复制 Tailscale 链接",copyTailnetNote:"给同一 tailnet 里不在这个网络的人({address})",turnOnLink:"开启链接",turnOffLink:"关闭链接",turnOffNote:"用它加入的人暂时无法访问",resetLink:"重置链接",resetNote:"换一个新地址,用旧链接加入的人会被移出",resetTitle:"重置「{role}」链接?",resetBody:"旧链接会失效,通过它加入的人也会失去访问权限。",plainHttp:"这是明文 HTTP:同一网络的人能看到传输内容。链接就是权限:拿到链接的人就有对应角色,只发给该有的人;传出去了就重置链接。",cannotShare:"{type} 的页面暂时不能分享到网络:只有这台电脑能打开。",shareError:"没做成:{error}",shareNoAnswer:"分享设置没有加载出来:Open Artifact 服务没有响应,稍后再试。",sendingTitle:"要发给别人?",sendingBody:"发链接而不是文件,对方看到的总是最新版本。",invitePeople:"邀请别人",allLinksOff:"所有链接都关着。去邀请页打开一条。",joinsAs:"用这条链接打开的人以{role}身份加入。要给别的角色,去邀请页。",standaloneShare:"可在 Open Artifact 应用或 CLI 的 share 命令中管理网络分享。",onlyHereLink:"只有这台电脑能打开这个链接。",nothingToExport:"还没有可导出的内容。",exportOptions:"会先询问导出选项",archiveLabel:"整个文件夹(.zip)",destinationDescription:"请 {agent} 导出到这里",destinationRequestLabel:"导出到 {label}",destinationSent:"已请 {agent} 导出到 {label}",archiveDescription:"这里的全部内容,用来备份或搬走",archiveStarted:"开始下载 {name}",archiveHint:"整个文件夹打成了一个 zip,可以备份、换电脑或发给别人。解压后用同一个类型打开就能接着用;分享链接和这台电脑上的服务器状态不在里面。",archiveTooLarge:"文件夹超过了 zip 的上限(4 GiB 或 65535 个文件),请直接复制文件夹。",archiveUnsupported:"{type} 的文件夹在这里打不了包,请直接复制文件夹。",archiveFailed:"没能打包:{error}",exportBusy:"另一个导出正在进行,请稍后再导出 {label}。",exportUnsupported:"现在无法导出 {label}。",exportFailed:"无法导出 {label}。",saving:"正在保存…",reconnecting:"正在重新连接…",notSaved:"未保存",notSavedTitle:"页面没能保存最近的修改。",saveRetry:"保存失败,点击重试",readOnly:"只读",readOnlyTitle:"这里的内容无法保存",leaveLosesWork:"确定离开?尚未保存的修改会丢失。",actionSaveNow:"立即保存",actionOpenFind:"查找",actionUndo:"撤销",actionRedo:"重做",actionEditPage:"编辑页面",actionUsePage:"使用这个页面",actionCommentSelection:"评论选中内容",actionOpenPageList:"页面列表",actionHandOffCode:"交给代码处理",whyOlderVersion:"你正在查看旧版本",whyAgentWorking:"{agent} 正在工作",whyDraftOpen:"请先关闭打开的草稿",whyCommentsOn:"请先退出评论模式",whyNeedsAgent:"需要一个智能体会话",whyUnsaved:"请先保存",whyOther:"暂时不可用",noOwner:"没有会话拥有这个作品",noOwnerNote:"发出的消息会等下一个处理它的会话。",ownerNote:"消息会发给做这个作品的 {harness} 会话。",agentIdle:"{agent} 空闲",agentWaiting:"{agent} 在等待",sessionOffline:"会话离线",offlineNote:"{harness} 会话下次工作时,{agent} 会看到你发的消息。",askPlaceholder:"想改什么?",sendToAgent:"发给 {agent}",sendToConversation:"放进 {agent} 的对话",sending:"发送中…",sent:"已发送。",sentInbox:"会话下次工作时 {agent} 会看到。",sentDrafted:"已放进 {agent} 的对话:到那里发出去。",notDelivered:"没送达。",notSent:"没发出去:{error}",viaDelivered:"已送达",viaDrafted:"在对话里,等你发出",viaInbox:"等会话处理",viaFailed:"没送达",askCloudOnline:"{agent} 已连接:它现在就会收到。",askCloudOffline:"{agent} 所在的电脑重新上线后,它会收到。",askCloudMcp:"{agent} 下次处理这个作品时会看到。",askCloudNone:"这个站点上还没有连接你的 Agent。连接一台电脑或一个 MCP 客户端;在那之前,请求会一直等着。",askCloudNoneOther:"所有者还没有在这个站点上连接 Agent。请求会等到他们连接为止。",sentCloudDelivered:"已送达:{agent} 现在就收到了。",sentCloudOffline:"已发送。{agent} 所在的电脑重新上线后,它会收到。",sentCloudMcp:"已发送。{agent} 下次处理这个作品时会看到。",sentCloudNone:"已发送。会等到有 Agent 连接为止。",viaWaitingAgent:"等 Agent 接收",statusConnected:"已连接",statusNoAgent:"无 Agent",emptyTitle:"这个作品还是空的",emptyBody:"{root} 里还没有写入 {type} 的内容。由 Agent 来写:把下面这段发给它。",startSession:"和 {agent} 开个新会话",promptCopied:"已复制:粘贴到任意装了 Artifact 工具的 Agent 会话里。",sentToSession:"已发到新会话。",problemTitle:"这个作品在这里打不开",noPage:"没有页面。",readOnlyNewer:"在这里只读:这个作品由 {type} {release} 写入,这台电脑上是 {version}。更新 Open Artifact(open-artifact runtime update,或更新附带它的应用)后才能编辑。",folder:"文件夹:{root}",askToLook:"让 {agent} 看看",problemAsk:"作品页打不开:{problem}",noBoot:"没有要显示的作品。从主页打开一个。",tryAgain:"重试",bootFailed:"页面没有打开:{error}",frameNotOpen:"页面已经不在打开状态(它的服务可能重启过),重新打开也没成功。",frameNotGranted:"这个页面在这里已经不对你开放了。",homeTitle:"Open Artifact",homeSub:"本机所有 Agent 共用的作品和类型。",artifacts:"作品",types:"类型",newArtifact:"新建作品",moreActions:"更多操作",backToSession:"回到会话",noArtifacts:"还没有作品。让 Agent 用 Artifact 工具创建一个,或者在这里新建。",pageOpen:"已打开",typeMissing:"类型没有安装",deleted:"已删除「{title}」,文件夹保留。",undo:"撤销",restored:"已恢复",couldNotRestore:"没能恢复:{error}",couldNotLoad:"读取失败:{error}",typeRoots:"类型根目录:{roots}",noTypes:"没有找到类型。",disabled:"已停用",shadowedBy:"被 {root} 覆盖",newOf:"新建 {type}",create:"创建",title:"标题",folderOptional:"文件夹(可不填)",folderHint:"默认:主工作区里新建一个文件夹",needTitle:"先写个标题。",couldNotCreate:"没建成:{error}",renameArtifact:"重命名作品",cannotCreateYet:"目前这里只能新建 Design 作品。",cannotShareCloud:"{type} 作品暂时不能在这里分享。",signIn:"登录",signOut:"退出登录",signOutFailed:"没能退出登录:{error}",accountOf:"账号:{name}",sharedWithOthers:"已分享给他人",addPeople:"添加成员",addPeoplePlaceholder:"邮箱,或 @域名(该域名下所有人)",add:"添加",addInvalid:"不是邮箱地址或 @域名:{entries}",roleFor:"新加成员的角色",memberPending:"已邀请,还没登录过",memberDomain:"{domain} 的所有人",memberGroup:"群组",removeAccess:"移除访问权限",removeMemberBody:"对方将无法再访问这份内容,之后可以再加回来。",noMembers:"还没有添加其他人。",accessRestricted:"受限",accessRestrictedSub:"只有这里添加的人能打开。",accessLink:"知道链接的任何人",accessLinkSub:"拿到下面某条链接的人获得对应角色。",accessPublic:"公开",accessPublicSub:"任何人都能以查看者身份打开;下面的链接可以给更多权限。",shareSettings:"设置",viewersCanExport:"查看者可以下载和导出",editorsCanAsk:"编辑者可以向 {agent} 提需求",ownedBy:"所有者:{name}",yourRole:"你的角色:{role}",onlyOwnerShares:"只有所有者能更改谁可以访问。",emptyBodyCloud:"还没有写入任何 {type} 内容。由 Agent 来写:把下面这段发给它。",homeSubCloud:"你的作品,以及别人分享给你的。",noArtifactsCloud:"还没有作品。让 Agent 用 Artifact 工具发布一个,或者请别人分享给你。",pubTitle:"发布到网上",pubIntro:"给它一个网址,这台电脑关机也能打开。在那边由你决定谁能打开。",pubDataNote:"发布这个仪表盘也会发布它的数据:这台电脑运行它的实时查询,把结果放到站点上,能打开它的人都看得到。",pubDataPending:"它的实时数据还没上站点:在你发布数据之前,那边的页面没有数字。",pubDataConfirm:"发布它的数据",pubDataAsOf:"站点上的数据截至 {time},由这台电脑刷新。",pubDataNone:"它的数据已发布,第一批结果正在上传。",pubDataFailed:"上次刷新失败:{reason}",pubDataRefresh:"现在刷新",pubDataRefreshing:"正在刷新…",pubDataStop:"停止发布数据",pubDataStopTitle:"停止发布它的数据?",pubDataStopBody:"数据会从 {host} 上删掉,这台电脑也不再刷新它们。仪表盘仍发布在那里,只是在你再次发布数据之前没有数字。",pubConnectSite:"连接一个站点…",pubConnectAnother:"再连接一个站点…",pubAddress:"站点地址",pubAddressPlaceholder:"https://artifacts.example.com",pubAddressHint:"你有账号的 Open Artifact 站点的网址。",pubName:"名称",pubNameHint:"用来区分不同站点的简短名字,比如 work。",pubConnect:"连接",pubConnecting:"正在连接…",pubCodeTitle:"在 {host} 上批准这台电脑",pubCodeBody:"确认页面上显示的是这个代码,然后点批准。",pubCodeOpened:"已在浏览器里打开批准页面。没看到的话,从这里打开:",pubOpenApproval:"打开批准页面",pubWaitingApproval:"等你批准…",pubConnected:"已连接到 {host},账号 {name}。",pubTryAgain:"重试",pubSignedInAs:"账号:{name}",pubStateConnected:"已连接",pubStateConnecting:"正在连接…",pubStateUnreachable:"连不上",pubStateSignedOut:"已退出登录",pubPublish:"发布",pubPublishing:"正在发布…",pubReconnect:"重新连接",pubPublishedAt:"已发布到 {host}",pubOpen:"打开",pubManage:"谁能打开,在它的网页上设置:打开后点那里的“分享”。",pubManageLink:"到网上管理访问权限",pubOpensThere:"站点连得上时,在这台电脑上打开它会直接跳到网址。",pubUnpublish:"取消发布",pubUnpublishing:"正在取消发布…",unpubTitle:"取消发布这份内容?",unpubBody:"网上那份会移到 {host} 的回收站,网址随之失效。这个文件夹留在这台电脑上,并带上网上的最新改动。",pubInSync:"已同步",pubInSyncAt:"已同步 · {when}",pubWaitingOne:"有 1 处改动等待发送",pubWaiting:"有 {count} 处改动等待发送",pubOffline:"连不上 {host}:改动先保存在这里,恢复后自动发送。",pubSignedOutSync:"已退出 {host} 的登录:改动先保存在这里,重新连接后发送。",pubSyncFailed:"上次同步失败:{error}",pubCloudMark:"已发布到网上",pubCloudAt:"已发布:{url}",pubHostEmpty:"请填写站点地址。",pubHostInvalid:"这不是网址。请按 https://artifacts.example.com 这样填写。",pubHostNotHttps:"地址必须以 https:// 开头(http 只能用于本机或内网地址,比如 192.168.1.20、nas.lan、192-168-1-20.nip.io)。",pubInsecureWarning:"这是明文 http:发布的内容不加密传输。只在你信任的网络里使用。",pubAutoSwitch:"自动发布新建的作品",pubAutoHint:"从现在起新建的作品会自动发布到 {host},之前的保持不变。",pubAutoNoSite:"先选一个默认站点。",pubDefaultSite:"默认站点",pubDefaultMark:"默认",pubAutoPublishing:"正在自动发布到 {host}…",pubAutoSignedOut:"等待发布到 {host}:这台电脑还没在那边登录。",pubAutoUnreachable:"等待发布:连不上 {host},稍后会自动重试。",pubAutoFailed:"还没发布到 {host}:{error} 稍后会自动重试。",pubApprovalTitle:"在 {host} 上批准这台电脑",pubApprovalBody:"这台电脑已设置为发布到 {host}。打开批准页面,确认显示的是这个代码,然后批准。",pubCloudSettingsFailed:"没能修改设置:{error}",pubNameInvalid:"只能用字母、数字、- 和 _(最多 32 个),比如 work。",pubNameTaken:"这个名称已经用于另一个站点,换一个名称。",pubNoDaemon:"这台电脑上的 Open Artifact 没有响应。确认它在运行后再试。",pubConnectDenied:"{host} 拒绝了这次连接。如果是误操作,再试一次。",pubConnectExpired:"代码在批准前过期了。请重试,并在几分钟内批准。",pubConnectUnreachable:"连不上 {host}。检查地址和网络后再试。",pubConnectNotHost:"{host} 看起来不是 Open Artifact 站点,请检查地址。",pubConnectFailed:"连接失败:{error}",pubIdTaken:"{host} 上已经有一份同样 id 的作品,它仍在那边发布着(可能是从另一台电脑发布的),或者属于别人。先在那边取消发布(你取消发布过的作品,再次发布时会被替换),或者复制这份作品后发布副本。",pubAlreadyElsewhere:"它已经发布到另一个站点了,先在那边取消发布。",pubTooLarge:"它对 {host} 来说太大了。把文件夹里的大文件移走后再试。",pubSignedOut:"你已退出 {host} 的登录。重新连接后再试。",pubNotAllowed:"{host} 不允许这样做:你在那边的账号可能没有发布权限。",pubUnreachable:"暂时连不上 {host},恢复后再试。",pubUnsupported:"{host} 暂时不支持这类作品。",pubFailed:"发布失败:{error}",unpubUnreachable:"连不上 {host},没法先把网上的最新版本取回来。恢复后再试。",unpubFailed:"取消发布失败:{error}",openOnWeb:"在网上打开",copyWebLink:"复制网址",webLinkCopied:"网址已复制",signOutAccess:"退出登录(同时退出组织的统一登录)",upload:"上传",uploadHint:"上传一个作品:在它的“导出”里选“整个文件夹(.zip)”得到的 .zip。",uploadDrop:"松开即可上传这个 .zip",uploadSending:"正在上传 {name}… {percent}%",uploadSendingSize:"正在上传 {name}…",uploadChecking:"正在检查 {name}…",uploadOpening:"{name} 已上传,正在打开…",uploadNotZip:"这不是 .zip 文件。请在作品的“导出”里选“整个文件夹(.zip)”。",uploadNotArtifact:"这个 zip 不是 Open Artifact 作品文件夹。请在作品的“导出”里选“整个文件夹(.zip)”。",uploadTooLargeLimit:"这个 zip 太大了:这个站点最多接收 {limit}。把文件夹里的大文件删掉后再试。",uploadTooLarge:"这个 zip 对这个站点来说太大了。把文件夹里的大文件删掉后再试。",uploadTooLargeSaid:"这个 zip 对这个站点来说太大了:{error} 把文件夹里的大文件删掉后再试。",uploadSignedOut:"你已退出登录。重新登录后再上传。",uploadNotAllowed:"这个站点不允许你上传作品。",uploadConflict:"站点那边出了点冲突,再试一次。",uploadTypeMissing:"这个站点暂时打不开 {type} 作品。",uploadBusy:"尝试太频繁了,稍等一会儿再试。",uploadNoAnswer:"站点没有响应。检查网络后再试。",uploadFailed:"没能上传:{error}",dismiss:"关闭",trash:"回收站",trashEmpty:"回收站是空的。",trashNote:"作品在回收站里时,分享过的人都打不开它。",trashedWhen:"{when}移到回收站",trashKeptDays:"在回收站里放满 {days} 天后会被永久删除。",trashKeptOneDay:"在回收站里放满 1 天后会被永久删除。",trashKeptForever:"会一直留在这里,直到你永久删除。",restore:"恢复",restoredTitle:"已恢复「{title}」",deleteForever:"永久删除",purgeTitle:"永久删除「{title}」?",purgeBody:"删除后无法撤销。它会从这个站点上移除,分享过的人也都无法再打开。",purged:"已永久删除「{title}」",purgeNotTrashed:"它已经不在回收站里了。",purgeGone:"它已经不存在了。",couldNotPurge:"没能删除:{error}",moveToTrash:"移到回收站",movedToTrash:"已把「{title}」移到回收站。",shareOnNetwork:"改为在本地网络里分享",shareOnNetworkSub:"这里的链接打开的是这台电脑上的副本,不是网页版。"};function rA(n){return n&&/^zh\b/i.test(n)?"zh-CN":"en"}const bp=rA(typeof navigator>"u"?void 0:navigator.language);function sA(n,i){return i?n.replace(/\{(\w+)\}/g,(l,r)=>r in i?String(i[r]):l):n}function uA(n,i,l){return sA((n==="zh-CN"?lA[i]:void 0)??aA[i],l)}function he(n,i){return uA(bp,n,i)}const Kt={artifacts:"artifacts",artifact:"artifact",types:"types",harnesses:"harnesses",events:"events",share:"artifact.share",archive:"artifact.archive",thumbnail:"artifacts.thumbnail",restore:"artifacts.restore",open:"artifacts.open",boot:"artifacts.boot",preview:"artifacts.preview",create:"artifacts.create",update:"artifacts.update",duplicate:"artifacts.duplicate",delete:"artifacts.delete",ask:"artifacts.ask",adopt:"artifacts.adopt",tools:"tools",embed:"embed",view:"view"},cA="application/zip",fA="[Artifact comment sent to agent]",dA="[Artifact edit request sent to agent]",pA="[Artifact task finished]",hA=8,gA=8e3,mA=(n,i=gA)=>typeof n=="string"?n.slice(0,i):"",_l=n=>!!n&&typeof n=="object"&&!Array.isArray(n);function yA(n){if(!_l(n))return null;if(n.openArtifact==="goto"){const r=mA(n.hash,2e3);return r?{openArtifact:"goto",hash:r}:null}if(n.openArtifact!=="host_hello")return null;const i=_l(n.caps)?n.caps:{},l={openArtifact:"host_hello",caps:{...i.sessions===!0?{sessions:!0}:{},...i.toolbar===!0?{toolbar:!0}:{},...i.artifacts===!0?{artifacts:!0}:{}}};if(typeof n.agentName=="string"&&n.agentName.trim()&&(l.agentName=n.agentName.trim().slice(0,80)),typeof n.harness=="string"&&n.harness&&(l.harness=n.harness.slice(0,64)),Number.isInteger(n.protocol)&&(l.protocol=n.protocol),_l(n.theme)&&(n.theme.scheme==="light"||n.theme.scheme==="dark")&&(l.theme={scheme:n.theme.scheme,...typeof n.theme.accent=="string"&&/^#[0-9a-f]{6}$/i.test(n.theme.accent)?{accent:n.theme.accent}:{}}),Array.isArray(n.destinations)&&(l.destinations=n.destinations.filter(r=>_l(r)&&typeof r.id=="string"&&!!r.id&&typeof r.label=="string"&&!!r.label.trim()).slice(0,hA).map(r=>({id:r.id.slice(0,64),label:r.label.trim().slice(0,80)}))),_l(n.library)){const r={};typeof n.library.harness=="string"&&n.library.harness&&(r.harness=n.library.harness.slice(0,64)),typeof n.library.workspace=="string"&&n.library.workspace&&(r.workspace=n.library.workspace.slice(0,4096)),(r.harness||r.workspace)&&(l.library=r)}return l}function bA(n){return!!n&&typeof n=="object"&&typeof n.openArtifact=="string"}const vA=["quickstart","list","publish","read","open","call","adopt","delete","share"],SA=["get","list","query","set","update","delete","str_replace","batch"],xA=["read","reply","resolve","reopen","wait"],TA=["share","export"],EA={type:"object",properties:{action:{type:"string",enum:vA,description:"What to do: quickstart, list, publish, read, open, call, adopt, delete or share. Omitted: publish."},intent:{type:"string",description:"quickstart: what is being made (design, design-system, slides, whiteboard, document, data, sheets, motion, other), or a few words about it."},scope:{type:"string",enum:["types","mine","all"],description:"list: types (the installed types), mine (this session's and this workspace's artifacts; the default) or all (every artifact)."},type:{type:"string",description:"list: only artifacts of this type (an id, or open-artifact://type/<id>). quickstart: the type already chosen (an id), to get its create call and steps without matching."},query:{type:"string",description:"list: only artifacts whose title contains this text."},limit:{type:"integer",description:"list: how many to return (default 50, at most 200)."},cursor:{type:"string",description:"list: the next_cursor of the previous page."},type_url:{type:"string",description:"publish without url: the type to create from (open-artifact://type/<id>, from quickstart). read without url: the type to describe."},title:{type:"string",description:"publish without url: the new artifact's name. quickstart: the name it will have, to find similar ones."},folder:{type:"string",description:"publish without url, or adopt: where the artifact's folder goes (absolute, or relative to the workspace). Default <workspace>/artifacts/<slug>."},url:{type:"string",description:"An artifact: open-artifact://artifact/<id>, as publish returned it."},files:{type:"object",additionalProperties:!0,description:'publish with url: files to write under the artifact root, as {"rel/path": "text"} or {"rel/path": {"content": "...", "encoding": "base64"}}; null deletes.'},if_match:{type:"object",additionalProperties:!0,description:'publish with url: {"rel/path": sha256 | null | "*"}. Write only while the file still has the sha256 you read, does not exist (null), or anyway ("*"). One mismatch writes nothing and returns the current versions.'},check:{type:"boolean",description:"publish with url: run the type's check action after writing; its result comes back as check."},open:{type:"string",enum:["after_first_write","now","never"],description:"publish without url: after_first_write (the default) opens the page in your app once your first write lands; now opens it at once; never leaves it closed. Where your app cannot show pages by itself the result says so: open view_url in your app's built-in browser, if you have one."},related:{type:"boolean",description:"quickstart: list existing artifacts the recommended type can build on, such as design systems (default true)."},path:{type:"string",description:"read: one file or folder under the root (omitted: the record and the file list)."},paths:{type:"array",items:{type:"string"},description:"read: several files under the root at once."},name:{type:"string",description:"call: the action's name (check, upload, ...; read with url lists them)."},args:{type:"object",additionalProperties:!0,description:"call: the action's arguments. upload: {file: absolute path, name?, group?}."},panel:{type:"string",enum:TA,description:"open: also open the page's Share panel (share), for the person to share it on the network, or its Export tab (export), for them to download a file."},cloud:{type:"string",description:"share: publish the artifact to this cloud remote (its name, as `open-artifact remote list` shows it). It works only on a remote the person set up and let agents publish to (agentMayPublish); otherwise the person publishes it, from the Share panel or with `open-artifact publish <id> --remote <name>`."}}},wA={type:"object",properties:{action:{type:"string",enum:SA,description:"What to do: get, list, query, set, update, delete, str_replace or batch."},url:{type:"string",description:"The artifact (open-artifact://artifact/<id>)."},collection:{type:"string",description:"The collection: alone for list / query (query needs it), with doc_id for one document."},doc_id:{type:"string",description:"With collection: the document to get / set / update / delete / str_replace."},path:{type:"string",description:"collection/doc_id, instead of the two."},data:{type:"object",additionalProperties:!0,description:"set / update: the document's fields."},file_path:{type:"string",description:"set / update: a JSON file holding the fields, instead of data."},if_match:{description:'set / update / delete / str_replace: the sha256 get returned (write only if unchanged), null (only if it does not exist) or "*" (replace whatever is there).'},field:{type:"string",description:"str_replace: the text field, as a dot path (body, notes.text)."},old:{type:"string",description:"str_replace: the passage to replace; it must occur exactly once."},new:{type:"string",description:"str_replace: the passage that replaces it."},where:{type:"array",items:{type:"object",additionalProperties:!0},description:"query: [{field, op, value}], all must hold. op: ==, !=, <, <=, >, >=, in, not-in (up to 30 values), array-contains."},order_by:{type:"object",additionalProperties:!0,description:'query: {field, dir: "asc" | "desc"}.'},limit:{type:"integer",description:"list / query: how many documents (default 100, at most 1000)."},cursor:{type:"string",description:"list / query: the next_cursor of the previous page."},out_file:{type:"string",description:"get / list / query: write the result to this JSON file (absolute, or relative to the workspace) and return only its path and counts."},writes:{type:"array",items:{type:"object",additionalProperties:!0},description:"batch: [{op: set|update|delete|str_replace, path | collection+doc_id, data | file_path, if_match?, field?, old?, new?}], at most 500."}},required:["action","url"]},RA={type:"object",properties:{action:{type:"string",enum:xA,description:"What to do: read, reply, resolve, reopen or wait."},url:{type:"string",description:"The artifact (open-artifact://artifact/<id>). wait: optional."},thread_id:{type:"string",description:'reply / resolve / reopen: the thread (after ";thread=" in the message).'},text:{type:"string",description:"reply: the answer."},resolve:{type:"boolean",description:"reply: resolve the thread too."},all:{type:"boolean",description:"read: resolved threads too."},since:{type:"string",description:"read: only threads with a message at or after this time (ISO 8601)."},acknowledge_duplicate:{type:"boolean",description:"reply: send the same text as your last reply in this thread again, on purpose."},timeout_ms:{type:"number",description:"wait: how long (default 600000)."}},required:["action"]},xb={Artifact:EA,ArtifactData:wA,ArtifactComments:RA},CA={Artifact:["Make and change artifacts: typed folders of files that open as live pages the person can view, edit, comment on and export. Actions:","- quickstart {intent, type?}: call first for a new artifact; recommends a type (or takes the one given) and returns the call that creates it, the steps for this app and similar artifacts that already exist.",'- list {scope: "mine" | "all" | "types", type?, query?}: find existing artifacts, or the installed types.',"- publish {type_url, title, folder?, open?}: create an artifact; the result carries its root folder and the type's instructions. publish {url, files, if_match?, check?}: write files when you have no file tools of your own.","- read {url, path? | paths?}: the artifact's record, files and actions, or some of its files with their sha256. read {type_url}: a type's instructions, before creating.",`- open {url, panel?}: show it to the person in the computer's browser (or the app, when it shows pages), once its content is written. When your app has a built-in browser, open view_url there instead. panel "share" or "export" opens its Share panel or Export tab for them.`,"- call {url, name, args?}: run one of the type's actions (check, upload, ...). A long one answers {task, pending: true}; its result comes later as a message.","- adopt {url | folder}: take over an artifact, or add an existing folder. Only when the person asks.","- share {url}: whether it is shared on the local network, and its links. Only the person changes that, in the page's Share panel.","- delete {url}: forget an artifact; its folder stays. Only when the person asks."].join(`
10
10
  `),ArtifactData:'Read and write the document store of an artifact whose type keeps one (its instructions say so). get, list and query read documents with their sha256; set, update, delete, str_replace and batch write them. update merges fields, and {"__delete__": true} removes one; str_replace changes one passage of a long text field. Replacing or deleting an existing document needs if_match: the sha256 you read, or "*". Your writes show live on open pages.',ArtifactComments:`Comments the person leaves on their artifact's page, kept in the artifact's own folder on this computer (no outside service). read lists the threads; reply answers one (thread_id is after ";thread=" in the message), with resolve: true when it is done; resolve and reopen change a thread's state. A thread sent to you is the person asking for your answer in it, so replying there is what they asked for. Answer only threads sent to you, in one or two lines. wait blocks until the next message for this session: use it only when nothing else can wake you.`},Tb={Artifact:{title:"Artifact",openWorldHint:!1},ArtifactData:{title:"Artifact data",openWorldHint:!1},ArtifactComments:{title:"Artifact comments",destructiveHint:!1,openWorldHint:!1}},OA={Artifact:{quickstart:"read",list:"read",read:"read",publish:"write",call:"write",open:"ui",delete:"remove",adopt:"remove",share:"person"},ArtifactData:{get:"read",list:"read",query:"read",set:"write",update:"write",str_replace:"write",batch:"write",delete:"write"},ArtifactComments:{read:"read",wait:"read",reply:"write",resolve:"write",reopen:"write"}},AA={Artifact:["publish","open","call","share"],ArtifactData:["get","list","query","set","update","str_replace","batch","delete"],ArtifactComments:["read","reply","resolve","reopen"]};function MA(n={any:!1,actions:!1}){return Object.keys(xb).map(i=>{const l=i==="Artifact"?n.any:n.actions;return{name:i,description:CA[i],inputSchema:xb[i],annotations:l?{...Tb[i],openWorldHint:!0}:Tb[i],actions:OA[i],remoteActions:[...AA[i]]}})}MA();const DA=300,NA=12,Eb=["Artifact","ArtifactData","ArtifactComments"];function ci(n,i=DA){const l=String(n??"").replace(/[<>]/g,"").replace(/\s+/g," ").trim();return l.length>i?`${l.slice(0,i-1).trimEnd()}…`:l}function zA(n){const i=ci(n,Number.MAX_SAFE_INTEGER),l=i.search(/[.!?。!?](\s|$)/);return l>=0?i.slice(0,l+1):i}function _A(n){const i=ci(n,24);return/^[a-z0-9]{1,5}$/i.test(i)?i.toUpperCase():i}const wb=n=>!n||/[.!?。!?…]$/.test(n)?n:`${n}.`;function kA(n,i=!1){const l=ci(n.title,80)||n.id;if(i)return`- ${n.id}: ${l}`;const r=ci(n.when)||ci(zA(n.description)),u=(n.exports??[]).map(_A).filter(Boolean),f=[wb(l),wb(r),u.length?`Exports: ${u.join(", ")}.`:""].filter(Boolean);return`- ${n.id}: ${f.join(" ")}`}const jA="Open Artifact lets you make artifacts: typed folders of files (a slide deck, a design canvas, a whiteboard, a data dashboard, a spreadsheet, a doc, an animated motion piece and more) that open as live pages the person can view, edit, comment on and export. You make and change them with the Artifact, ArtifactData and ArtifactComments tools.",HA=`<where_output_goes>
11
11
  Decide where your output will live before you make anything.
12
12
  - Something the person will read once and move on from (an answer, an explanation, a summary, a short report) goes in your reply, however long it is. A diagram or chart that explains your answer goes in the reply too, when you can show one there.