trybeacon 0.1.66 → 0.1.67

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 (142) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/.next/BUILD_ID +1 -1
  3. package/.next/app-path-routes-manifest.json +8 -8
  4. package/.next/build-manifest.json +2 -2
  5. package/.next/prerender-manifest.json +3 -3
  6. package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  7. package/.next/server/app/_global-error.html +1 -1
  8. package/.next/server/app/_global-error.rsc +1 -1
  9. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  10. package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  11. package/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  12. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  13. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  14. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  15. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  16. package/.next/server/app/_not-found.html +1 -1
  17. package/.next/server/app/_not-found.rsc +11 -11
  18. package/.next/server/app/_not-found.segments/_full.segment.rsc +11 -11
  19. package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  20. package/.next/server/app/_not-found.segments/_index.segment.rsc +11 -11
  21. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  22. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  23. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  24. package/.next/server/app/api/lesson/close/route.js +1 -1
  25. package/.next/server/app/api/lesson/questions/route.js +1 -1
  26. package/.next/server/app/api/lesson/route.js +1 -1
  27. package/.next/server/app/api/lesson/save/route.js +1 -1
  28. package/.next/server/app/api/lesson/verdict/route.js +1 -1
  29. package/.next/server/app/docs/page_client-reference-manifest.js +1 -1
  30. package/.next/server/app/docs.html +1 -1
  31. package/.next/server/app/docs.rsc +11 -11
  32. package/.next/server/app/docs.segments/_full.segment.rsc +11 -11
  33. package/.next/server/app/docs.segments/_head.segment.rsc +1 -1
  34. package/.next/server/app/docs.segments/_index.segment.rsc +11 -11
  35. package/.next/server/app/docs.segments/_tree.segment.rsc +2 -2
  36. package/.next/server/app/docs.segments/docs/__PAGE__.segment.rsc +1 -1
  37. package/.next/server/app/docs.segments/docs.segment.rsc +1 -1
  38. package/.next/server/app/feedback/page_client-reference-manifest.js +1 -1
  39. package/.next/server/app/feedback.html +1 -1
  40. package/.next/server/app/feedback.rsc +11 -11
  41. package/.next/server/app/feedback.segments/_full.segment.rsc +11 -11
  42. package/.next/server/app/feedback.segments/_head.segment.rsc +1 -1
  43. package/.next/server/app/feedback.segments/_index.segment.rsc +11 -11
  44. package/.next/server/app/feedback.segments/_tree.segment.rsc +2 -2
  45. package/.next/server/app/feedback.segments/feedback/__PAGE__.segment.rsc +1 -1
  46. package/.next/server/app/feedback.segments/feedback.segment.rsc +1 -1
  47. package/.next/server/app/help/page_client-reference-manifest.js +1 -1
  48. package/.next/server/app/help.html +1 -1
  49. package/.next/server/app/help.rsc +11 -11
  50. package/.next/server/app/help.segments/_full.segment.rsc +11 -11
  51. package/.next/server/app/help.segments/_head.segment.rsc +1 -1
  52. package/.next/server/app/help.segments/_index.segment.rsc +11 -11
  53. package/.next/server/app/help.segments/_tree.segment.rsc +2 -2
  54. package/.next/server/app/help.segments/help/__PAGE__.segment.rsc +1 -1
  55. package/.next/server/app/help.segments/help.segment.rsc +1 -1
  56. package/.next/server/app/index.html +1 -1
  57. package/.next/server/app/index.rsc +12 -12
  58. package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  59. package/.next/server/app/index.segments/_full.segment.rsc +12 -12
  60. package/.next/server/app/index.segments/_head.segment.rsc +1 -1
  61. package/.next/server/app/index.segments/_index.segment.rsc +11 -11
  62. package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  63. package/.next/server/app/learn/page.js +5 -3
  64. package/.next/server/app/learn/page.js.nft.json +1 -1
  65. package/.next/server/app/learn/page_client-reference-manifest.js +1 -1
  66. package/.next/server/app/map/page.js +2 -2
  67. package/.next/server/app/map/page.js.nft.json +1 -1
  68. package/.next/server/app/map/page_client-reference-manifest.js +1 -1
  69. package/.next/server/app/page.js +2 -2
  70. package/.next/server/app/page.js.nft.json +1 -1
  71. package/.next/server/app/page_client-reference-manifest.js +1 -1
  72. package/.next/server/app/plan/page.js +2 -2
  73. package/.next/server/app/plan/page.js.nft.json +1 -1
  74. package/.next/server/app/plan/page_client-reference-manifest.js +1 -1
  75. package/.next/server/app/s/[token]/page.js +2 -2
  76. package/.next/server/app/s/[token]/page.js.nft.json +1 -1
  77. package/.next/server/app/s/[token]/page_client-reference-manifest.js +1 -1
  78. package/.next/server/app/settings/page.js +1 -1
  79. package/.next/server/app/settings/page.js.nft.json +1 -1
  80. package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  81. package/.next/server/app-paths-manifest.json +8 -8
  82. package/.next/server/chunks/2025.js +1 -0
  83. package/.next/server/chunks/2994.js +2 -0
  84. package/.next/server/chunks/4046.js +3 -3
  85. package/.next/server/chunks/5683.js +1 -0
  86. package/.next/server/chunks/5719.js +1 -0
  87. package/.next/server/chunks/7720.js +154 -0
  88. package/.next/server/middleware-build-manifest.js +1 -1
  89. package/.next/server/pages/404.html +1 -1
  90. package/.next/server/pages/500.html +1 -1
  91. package/.next/server/server-reference-manifest.js +1 -1
  92. package/.next/server/server-reference-manifest.json +1 -1
  93. package/.next/static/chunks/1276-b84f61ec9c0df862.js +1 -0
  94. package/.next/static/chunks/1a258343-954e0e6619585d3c.js +2 -0
  95. package/.next/static/chunks/2059-fba06ba63ba64522.js +62 -0
  96. package/.next/static/chunks/4607-a668ea431c41e60e.js +1 -0
  97. package/.next/static/chunks/4853-6dc402b4ce452fa5.js +1 -0
  98. package/.next/static/chunks/{7043-254590cf9891391f.js → 4888-911c0da3c2d785d2.js} +1 -1
  99. package/.next/static/chunks/5957-83f611fcd5a08b45.js +1 -0
  100. package/.next/static/chunks/766-242213d211df0afd.js +1 -0
  101. package/.next/static/chunks/8997-78a359d0d238622e.js +1 -0
  102. package/.next/static/chunks/app/{layout-0c993f55d3a798f4.js → layout-9f0f4d8e4534a62e.js} +1 -1
  103. package/.next/static/chunks/app/learn/page-03acad0a37068966.js +7 -0
  104. package/.next/static/chunks/app/map/page-5cfad64d5feea695.js +1 -0
  105. package/.next/static/chunks/app/page-d08947a671077569.js +1 -0
  106. package/.next/static/chunks/app/plan/page-5eacb6b83bd4873d.js +1 -0
  107. package/.next/static/chunks/app/s/[token]/page-1a350cf50a45500c.js +1 -0
  108. package/.next/static/chunks/app/settings/page-7e176d120b1effa9.js +1 -0
  109. package/.next/static/css/63986592e2be7d62.css +1 -0
  110. package/.next/trace +43 -43
  111. package/.next/trace-build +1 -1
  112. package/dist/bin/beacon.js +14 -12
  113. package/dist/bin/doctor.js +22 -15
  114. package/dist/bin/hook.js +18 -11
  115. package/dist/bin/mcp.js +41 -34
  116. package/dist/bin/plan.js +21 -14
  117. package/dist/bin/uninstall.js +26 -19
  118. package/dist/lib/assets.js +7 -0
  119. package/dist/lib/codex-install.js +28 -21
  120. package/dist/lib/global-install.js +27 -20
  121. package/package.json +1 -1
  122. package/plugin/skills/beacon-explain/SKILL.md +7 -0
  123. package/.next/server/chunks/3584.js +0 -154
  124. package/.next/server/chunks/6024.js +0 -2
  125. package/.next/server/chunks/7187.js +0 -1
  126. package/.next/server/chunks/8035.js +0 -1
  127. package/.next/static/chunks/1936-7fea5225b5bfcfda.js +0 -1
  128. package/.next/static/chunks/1a258343-6baccd9e573fdfaf.js +0 -2
  129. package/.next/static/chunks/2019-3be80edc82176878.js +0 -1
  130. package/.next/static/chunks/3845-6fe7e66d4bf82eb5.js +0 -1
  131. package/.next/static/chunks/4549-591415d55ca009a3.js +0 -62
  132. package/.next/static/chunks/6638-4e53879181b1df75.js +0 -1
  133. package/.next/static/chunks/7643-6c7ff4b9400f68fc.js +0 -1
  134. package/.next/static/chunks/app/learn/page-797d74e02b98fa88.js +0 -5
  135. package/.next/static/chunks/app/map/page-634b6d5d98e921b3.js +0 -1
  136. package/.next/static/chunks/app/page-84dc684d45002cfb.js +0 -1
  137. package/.next/static/chunks/app/plan/page-df829b2054c40611.js +0 -1
  138. package/.next/static/chunks/app/s/[token]/page-f97dec75856a7952.js +0 -1
  139. package/.next/static/chunks/app/settings/page-59d90685cd17fc1f.js +0 -1
  140. package/.next/static/css/b3d3212da726bbfb.css +0 -1
  141. /package/.next/static/{P3uXQySdS-m6_bxuiezYe → hkOIw5DQW9WSwBwZrD8_9}/_buildManifest.js +0 -0
  142. /package/.next/static/{P3uXQySdS-m6_bxuiezYe → hkOIw5DQW9WSwBwZrD8_9}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1936],{681:(e,t,n)=>{n.d(t,{g:()=>r});function r(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}},1938:(e,t,n)=>{n.d(t,{e:()=>b});var r,l=n(12115),o=n(21171),i=n(22531),u=n(63779),s=n(35724);let a=((r={})[r.None=0]="None",r[r.GuessFromOrder=1]="GuessFromOrder",r);var c=n(55004),f=n(69505),d=n(63548),p=n(67148),h=n(50812),g=n(90278),m=n(97370),v=n(57162),y=n(95155);let b=l.memo(l.forwardRef(function(e,t){let{render:n,className:r,style:b,value:x=null,label:w,disabled:R=!1,nativeButton:E=!1,...S}=e,T=l.useRef(null),M=function(e={}){let{label:t,metadata:n,textRef:r,indexGuessBehavior:i,index:u}=e,{register:c,unregister:f,subscribeMapChange:d,elementsRef:p,labelsRef:h,nextIndexRef:g}=(0,s.M)(),m=l.useRef(-1),[v,y]=l.useState(u??(i===a.GuessFromOrder?()=>{if(-1===m.current){let e=g.current;g.current+=1,m.current=e}return m.current}:-1)),b=l.useRef(null),x=l.useCallback(e=>{if(b.current=e,-1!==v&&null!==e&&(p.current[v]=e,h)){let n=void 0!==t;h.current[v]=n?t:r?.current?.textContent??e.textContent}},[v,p,h,t,r]);return(0,o.g)(()=>{if(null!=u)return;let e=b.current;if(e)return c(e,n),()=>{f(e)}},[u,c,f,n]),(0,o.g)(()=>{if(null==u)return d(e=>{let t=b.current?e.get(b.current)?.index:null;null!=t&&y(t)})},[u,d,y]),l.useMemo(()=>({ref:x,index:v}),[v,x])}({label:w,textRef:T,indexGuessBehavior:a.GuessFromOrder}),{store:k,itemProps:C,setOpen:A,setValue:P,selectionRef:I,typingRef:O,valuesRef:q,multiple:j,selectedItemTextRef:D}=(0,u.ll)(),L=(0,i.P)(k,d.T.isActive,M.index),V=(0,i.P)(k,d.T.isSelected,M.index,x),F=(0,i.P)(k,d.T.isSelectedByFocus,M.index),H=(0,i.P)(k,d.T.isItemEqualToValue),N=M.index,K=-1!==N,$=l.useRef(null);(0,o.g)(()=>{if(!K)return;let e=q.current;return e[N]=x,()=>{delete e[N]}},[K,N,x,q]),(0,o.g)(()=>{if(!K)return;let e=k.state.value,t=e;j&&Array.isArray(e)&&e.length>0&&(t=e[e.length-1]),void 0!==t&&(0,m.tl)(x,t,H)&&(k.set("selectedIndex",N),T.current&&(D.current=T.current))},[K,N,j,H,k,x,D]);let B=l.useRef(null),W=l.useRef("mouse"),U=l.useRef(!1),{getButtonProps:z,buttonRef:_}=(0,p.s)({disabled:R,focusableWhenDisabled:!0,native:E,composite:!0});function Y(){I.current.dragY=0}let X=(0,c.o)("div",e,{ref:[_,t,M.ref,$],state:{disabled:R,selected:V,highlighted:L},props:[C,{role:"option","aria-selected":V,tabIndex:L?0:-1,onKeyDown(e){B.current=e.key,k.set("activeIndex",N)," "===e.key&&O.current&&e.preventDefault()},onClick(e){let t="click"===e.type&&"touch"!==W.current,n=e.nativeEvent.pointerType,r=t&&(0,v.YF)(e.nativeEvent)&&(void 0!==n||L),l=t&&!r&&!U.current;if((U.current=!1,"keydown"!==e.type||null!==B.current)&&!R&&("keydown"!==e.type||" "!==B.current||!O.current)&&!l){B.current=null;var o=e.nativeEvent;let t=k.state.value;if(j){let e=Array.isArray(t)?t:[];P(V?(0,m.Ai)(e,x,H):[...e,x],(0,h.d)(g.Bo,o))}else P(x,(0,h.d)(g.Bo,o)),A(!1,(0,h.d)(g.Bo,o))}},onPointerEnter(e){W.current=e.pointerType},onPointerMove(e){if("mouse"===e.pointerType&&1===e.buttons){let t=I.current;t.dragY+=e.movementY,t.dragY**2>=64&&(t.allowUnselectedMouseUp=!0)}},onPointerDown(e){W.current=e.pointerType,U.current=!0,Y()},onMouseUp(){if(Y(),R||"touch"===W.current||U.current)return;let e=!I.current.allowSelectedMouseUp&&V,t=!I.current.allowUnselectedMouseUp&&!V;e||t||(U.current=!0,$.current?.click(),U.current=!1)}},S,z]}),J=l.useMemo(()=>({selected:V,index:N,textRef:T,selectedByFocus:F,hasRegistered:K}),[V,N,T,F,K]);return(0,y.jsx)(f.z.Provider,{value:J,children:X})}))},5102:(e,t,n)=>{n.d(t,{V$:()=>a});var r=n(46106),l=n(12115),o=n(57445),i=n(52899);let u={invalid:void 0,name:void 0,validityData:{state:i.ZV,errors:[],error:"",value:"",initialValue:null},setValidityData:o.tE,disabled:void 0,touched:i.HH.touched,setTouched:o.tE,dirty:i.HH.dirty,setDirty:o.tE,filled:i.HH.filled,setFilled:o.tE,focused:i.HH.focused,setFocused:o.tE,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:i.mk,markedDirtyRef:{current:!1},registerFieldControl:o.tE,validation:{getValidationProps:(e=o.t0)=>e,getInputValidationProps:(e=o.t0)=>e,inputRef:{current:null},commit:async()=>{}}},s=l.createContext(u);function a(e=!0){let t=l.useContext(s);if(t.setValidityData===o.tE&&!e)throw Error((0,r.A)(28));return t}},5909:(e,t,n)=>{n.d(t,{U:()=>o,a:()=>l});var r=n(45690);function l(e,t,n,l){var o,s,a,c,f;let d=(0,r.j)(i).current;return o=d,s=e,a=t,c=n,f=l,(o.refs[0]!==s||o.refs[1]!==a||o.refs[2]!==c||o.refs[3]!==f)&&u(d,[e,t,n,l]),d.callback}function o(e){var t,n;let l=(0,r.j)(i).current;return t=l,n=e,(t.refs.length!==n.length||t.refs.some((e,t)=>e!==n[t]))&&u(l,e),l.callback}function i(){return{callback:null,cleanup:null,refs:[]}}function u(e,t){if(e.refs=t,t.every(e=>null==e)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),null!=n){let r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){let l=t[e];if(null!=l)switch(typeof l){case"function":{let t=l(n);"function"==typeof t&&(r[e]=t);break}case"object":l.current=n}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){let n=t[e];if(null!=n)switch(typeof n){case"function":{let t=r[e];"function"==typeof t?t():n(null);break}case"object":n.current=null}}}}}}},5919:(e,t,n)=>{n.d(t,{h:()=>c});var r=n(12115),l=n(69505),o=n(25981),i=n(20363),u=n(55004),s=n(42075),a=n(95155);let c=r.forwardRef(function(e,t){let n=e.keepMounted??!1,{selected:r}=(0,l.G)();return n||r?(0,a.jsx)(f,{...e,ref:t}):null}),f=r.memo(r.forwardRef((e,t)=>{let{render:n,className:a,style:c,keepMounted:f,...d}=e,{selected:p}=(0,l.G)(),h=r.useRef(null),{transitionStatus:g,setMounted:m}=(0,o.$)(p),v=(0,u.o)("span",e,{ref:[t,h],state:{selected:p,transitionStatus:g},props:[{"aria-hidden":!0,children:"✔️"},d],stateAttributesMapping:s.G});return(0,i.v)({open:p,ref:h,onComplete(){p||m(!1)}}),v}))},6084:(e,t,n)=>{n.d(t,{j:()=>l});var r=n(12115);function l(e){let t=r.useRef(!0);t.current&&(t.current=!1,e())}},6751:(e,t,n)=>{n.d(t,{R:()=>r});function r(e){return e?.ownerDocument||document}},6791:(e,t,n)=>{let r;function l(){return"u">typeof window}function o(e){return s(e)?(e.nodeName||"").toLowerCase():"#document"}function i(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function u(e){var t;return null==(t=(s(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function s(e){return!!l()&&(e instanceof Node||e instanceof i(e).Node)}function a(e){return!!l()&&(e instanceof Element||e instanceof i(e).Element)}function c(e){return!!l()&&(e instanceof HTMLElement||e instanceof i(e).HTMLElement)}function f(e){return!(!l()||"u"<typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof i(e).ShadowRoot)}function d(e){let{overflow:t,overflowX:n,overflowY:r,display:l}=R(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==l&&"contents"!==l}function p(e){return/^(table|td|th)$/.test(o(e))}function h(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}n.d(t,{$4:()=>S,CP:()=>E,L9:()=>R,Ll:()=>s,Lv:()=>p,Ng:()=>f,Tc:()=>x,Tf:()=>h,ZU:()=>d,_m:()=>T,ep:()=>u,eu:()=>w,gJ:()=>b,mq:()=>o,sQ:()=>y,sb:()=>c,v9:()=>function e(t,n,r){var l;void 0===n&&(n=[]),void 0===r&&(r=!0);let o=function e(t){let n=S(t);return w(n)?t.ownerDocument?t.ownerDocument.body:t.body:c(n)&&d(n)?n:e(n)}(t),u=o===(null==(l=t.ownerDocument)?void 0:l.body),s=i(o);if(!u)return n.concat(o,e(o,[],r));{let t=T(s);return n.concat(s,s.visualViewport||[],d(o)?o:[],t&&r?e(t):[])}},vq:()=>a,zk:()=>i});let g=/transform|translate|scale|rotate|perspective|filter/,m=/paint|layout|strict|content/,v=e=>!!e&&"none"!==e;function y(e){let t=a(e)?R(e):e;return v(t.transform)||v(t.translate)||v(t.scale)||v(t.rotate)||v(t.perspective)||!x()&&(v(t.backdropFilter)||v(t.filter))||g.test(t.willChange||"")||m.test(t.contain||"")}function b(e){let t=S(e);for(;c(t)&&!w(t);){if(y(t))return t;if(h(t))break;t=S(t)}return null}function x(){return null==r&&(r="u">typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),r}function w(e){return/^(html|body|#document)$/.test(o(e))}function R(e){return i(e).getComputedStyle(e)}function E(e){return a(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function S(e){if("html"===o(e))return e;let t=e.assignedSlot||e.parentNode||f(e)&&e.host||u(e);return f(t)?t.host:t}function T(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}},12363:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(30772).A)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},12935:(e,t,n)=>{n.d(t,{W:()=>o});var r=n(12115),l=n(95155);let o=r.forwardRef(function(e,t){let n,{cutout:r,...o}=e;if(r){let e=r.getBoundingClientRect();n=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`}return(0,l.jsx)("div",{ref:t,role:"presentation","data-base-ui-inert":"",...o,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:n}})})},15433:(e,t,n)=>{n.d(t,{h:()=>u});var r=n(12115),l=n(63779),o=n(69505),i=n(55004);let u=r.memo(r.forwardRef(function(e,t){let{index:n,textRef:u,selectedByFocus:s,hasRegistered:a}=(0,o.G)(),{firstItemTextRef:c,selectedItemTextRef:f}=(0,l.ll)(),{render:d,className:p,style:h,...g}=e,m=r.useCallback(e=>{e&&(a&&0===n&&(c.current=e),a&&s&&(f.current=e))},[c,f,n,s,a]);return(0,i.o)("div",e,{ref:[m,t,u],props:g})}))},17314:(e,t,n)=>{n.d(t,{w:()=>a});var r=n(12115),l=n(22531),o=n(55004),i=n(63779),u=n(47843),s=n(63548);let a=r.forwardRef(function(e,t){let{render:n,className:r,style:a,...c}=e,{store:f}=(0,i.ll)(),d=(0,l.P)(f,s.T.open);return(0,o.o)("span",e,{state:{open:d},ref:t,props:[{"aria-hidden":!0,children:"▼"},c],stateAttributesMapping:u.qV})})},18337:(e,t,n)=>{n.d(t,{q:()=>r});function r(e){return null==e?e:"current"in e?e.current:e}},18381:(e,t,n)=>{n.d(t,{U:()=>s});var r=n(12115),l=n(21171),o=n(98221),i=n(90283),u=n(95155);let s=r.forwardRef(function(e,t){let[n,s]=r.useState();return(0,l.g)(()=>{o.nr&&s("button")},[]),(0,u.jsx)("span",{...e,ref:t,style:i.Q,"aria-hidden":!n||void 0,...{tabIndex:0,role:n},"data-base-ui-focus-guard":""})})},18504:(e,t,n)=>{n.d(t,{q:()=>r});function r(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}},20363:(e,t,n)=>{n.d(t,{v:()=>a});var r=n(12115),l=n(63987),o=n(47650),i=n(99672),u=n(18337),s=n(42075);function a(e){let{enabled:t=!0,open:n,ref:a,onComplete:c}=e,f=(0,l.K)(c),d=function(e,t=!1,n=!0){let r=(0,i.N)();return(0,l.K)((l,i=null)=>{r.cancel();let a=(0,u.q)(e);if(null==a)return;let c=()=>{o.flushSync(l)};if("function"!=typeof a.getAnimations||globalThis.BASE_UI_ANIMATIONS_DISABLED)return void l();function f(){Promise.all(a.getAnimations().map(e=>e.finished)).then(()=>{i?.aborted||c()}).catch(()=>{if(n){i?.aborted||c();return}let e=a.getAnimations();!i?.aborted&&e.length>0&&e.some(e=>e.pending||"finished"!==e.playState)&&f()})}if(t){let e=s.T.startingStyle;if(!a.hasAttribute(e))return void r.request(f);let t=new MutationObserver(()=>{a.hasAttribute(e)||(t.disconnect(),f())});return t.observe(a,{attributes:!0,attributeFilter:[e]}),void i?.addEventListener("abort",()=>t.disconnect(),{once:!0})}r.request(f)})}(a,n,!1);r.useEffect(()=>{if(!t)return;let e=new AbortController;return d(f,e.signal),()=>{e.abort()}},[t,n,f,d])}},21171:(e,t,n)=>{n.d(t,{g:()=>l});var r=n(12115);let l="u">typeof document?r.useLayoutEffect:()=>{}},22531:(e,t,n)=>{let r;n.d(t,{P:()=>s});var l=n(12115),o=n(8039),i=n(94577);let u=(0,n(53277)._)(19)?function(e,t,n,i,u){let s;if(!r){let r;return r=l.useCallback(()=>t(e.getSnapshot(),n,i,u),[e,t,n,i,u]),(0,o.useSyncExternalStore)(e.subscribe,r,r)}let a=r.syncIndex;return r.syncIndex+=1,r.didInitialize?(s=r.syncHooks[a]).store===e&&s.selector===t&&Object.is(s.a1,n)&&Object.is(s.a2,i)&&Object.is(s.a3,u)||(s.store!==e&&(r.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=i,s.a3=u,s.didChange=!0):(s={store:e,selector:t,a1:n,a2:i,a3:u,value:t(e.getSnapshot(),n,i,u),didChange:!1},r.syncHooks.push(s)),s.value}:function(e,t,n,r,l){return(0,i.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,l))};function s(e,t,n,r,l){return u(e,t,n,r,l)}[].push({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let r=e.syncHooks[n],l=r.selector(r.store.state,r.a1,r.a2,r.a3);(r.didChange||!Object.is(r.value,l))&&(t=!0,r.value=l,r.didChange=!1)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,o.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}})},23107:(e,t,n)=>{n.d(t,{l:()=>Y});var r=n(12115),l=n(62749),o=n(21171),i=n(63987),u=n(22531),s=n(63779),a=n(45690),c=n(35724),f=n(95155);function d(e){let{children:t,elementsRef:n,labelsRef:l,onMapChange:u}=e,s=(0,i.K)(u),d=r.useRef(0),m=(0,a.j)(h).current,v=(0,a.j)(p).current,[y,b]=r.useState(0),x=r.useRef(y),w=(0,i.K)((e,t)=>{v.set(e,t??null),x.current+=1,b(x.current)}),R=(0,i.K)(e=>{v.delete(e),x.current+=1,b(x.current)}),E=r.useMemo(()=>{let e=new Map;return Array.from(v.keys()).filter(e=>e.isConnected).sort(g).forEach((t,n)=>{let r=v.get(t)??{};e.set(t,{...r,index:n})}),e},[v,y]);(0,o.g)(()=>{if("function"!=typeof MutationObserver||0===E.size)return;let e=new MutationObserver(e=>{let t=new Set,n=e=>t.has(e)?t.delete(e):t.add(e);e.forEach(e=>{e.removedNodes.forEach(n),e.addedNodes.forEach(n)}),0===t.size&&(x.current+=1,b(x.current))});return E.forEach((t,n)=>{n.parentElement&&e.observe(n.parentElement,{childList:!0})}),()=>{e.disconnect()}},[E]),(0,o.g)(()=>{x.current===y&&(n.current.length!==E.size&&(n.current.length=E.size),l&&l.current.length!==E.size&&(l.current.length=E.size),d.current=E.size),s(E)},[s,E,n,l,y]),(0,o.g)(()=>()=>{n.current=[]},[n]),(0,o.g)(()=>()=>{l&&(l.current=[])},[l]);let S=(0,i.K)(e=>(m.add(e),()=>{m.delete(e)}));(0,o.g)(()=>{m.forEach(e=>e(E))},[m,E]);let T=r.useMemo(()=>({register:w,unregister:R,subscribeMapChange:S,elementsRef:n,labelsRef:l,nextIndexRef:d}),[w,R,S,n,l,d]);return(0,f.jsx)(c.D.Provider,{value:T,children:t})}function p(){return new Map}function h(){return new Set}function g(e,t){let n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}var m=n(92681),v=n(6751),y=n(6791),b=n(81717),x=n(79538),w=n(47650),R="u">typeof document?r.useLayoutEffect:function(){};function E(e,t){let n,r,l;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!E(e[r],t[r]))return!1;return!0}if((n=(l=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!({}).hasOwnProperty.call(t,l[r]))return!1;for(r=n;0!=r--;){let n=l[r];if(("_owner"!==n||!e.$$typeof)&&!E(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function S(e){return"u"<typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function T(e,t){let n=S(e);return Math.round(t*n)/n}function M(e){let t=r.useRef(e);return R(()=>{t.current=e}),t}var k=n(31823),C=n(47257),A=n(76893);let P={name:"hide",async fn(e){let t,{width:n,height:r,x:l,y:o}=e.rects.reference,i=await ({name:(t=(0,x.jD)(void 0)).name,fn:t.fn,options:[void 0,void 0]}).fn(e);return{data:{referenceHidden:i.data?.referenceHidden||0===n&&0===r&&0===l&&0===o}}}},I={sideX:"left",sideY:"top"};function O(e,t,n){let r="inline-start"===e||"inline-end"===e;return({top:"top",right:r?n?"inline-start":"inline-end":"right",bottom:"bottom",left:r?n?"inline-end":"inline-start":"left"})[t]}function q(e,t,n){let{rects:r,placement:l}=e;return{side:O(t,(0,m.C0)(l),n),align:(0,m.Sg)(l)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function j(e){return null!=e&&"current"in e}var D=n(91187),L=n(12935),V=n(58014),F=n(78277),H=n(63548),N=n(50812),K=n(90278),$=n(97370),B=n(47843),W=n(55004),U=n(84268),z=n(61001);let _={position:"fixed"},Y=r.forwardRef(function(e,t){let{anchor:n,positionMethod:a="absolute",className:c,render:p,side:h="bottom",align:g="center",sideOffset:Y=0,alignOffset:X=0,collisionBoundary:J="clipping-ancestors",collisionPadding:G,arrowPadding:Z=5,sticky:Q=!1,disableAnchorTracking:ee,alignItemWithTrigger:et=!0,collisionAvoidance:en=V.uD,style:er,...el}=e,{store:eo,listRef:ei,labelsRef:eu,alignItemWithTriggerActiveRef:es,selectedItemTextRef:ea,valuesRef:ec,initialValueRef:ef,popupRef:ed,setValue:ep}=(0,s.ll)(),eh=(0,s.hG)(),eg=(0,u.P)(eo,H.T.open),em=(0,u.P)(eo,H.T.mounted),ev=(0,u.P)(eo,H.T.modal),ey=(0,u.P)(eo,H.T.value),eb=(0,u.P)(eo,H.T.openMethod),ex=(0,u.P)(eo,H.T.positionerElement),ew=(0,u.P)(eo,H.T.triggerElement),eR=(0,u.P)(eo,H.T.isItemEqualToValue),eE=(0,u.P)(eo,H.T.transitionStatus),eS=r.useRef(null),eT=r.useRef(null),[eM,ek]=r.useState(et),eC=em&&eM&&"touch"!==eb;em||eM===et||ek(et),(0,o.g)(()=>{!em&&(H.T.scrollUpArrowVisible(eo.state)&&eo.set("scrollUpArrowVisible",!1),H.T.scrollDownArrowVisible(eo.state)&&eo.set("scrollDownArrowVisible",!1))},[eo,em]),r.useImperativeHandle(es,()=>eC),function(e,t,n,l){let[i,u]=r.useState(!1);(0,o.g)(()=>{if(!e||!t||null==n)return void u(!1);let r=(0,v.R)(n).documentElement.clientWidth,l=n.offsetWidth;u(r>0&&l>0&&l>=r-20)},[e,t,n]),(0,z.K)(e&&(!t||i),l)}((eC||ev)&&eg,"touch"===eb,ex,ew);let eA=function(e){var t,n,l,u,s,a,c,f;let d,p,h,g,{anchor:D,positionMethod:L="absolute",side:V="bottom",sideOffset:F=0,align:H="center",alignOffset:N=0,collisionBoundary:K,collisionPadding:$=5,sticky:B=!1,arrowPadding:W=5,disableAnchorTracking:U=!1,inline:z,keepMounted:_=!1,floatingRootContext:Y,mounted:X,collisionAvoidance:J,shiftCrossAxis:G=!1,nodeId:Z,adaptiveOrigin:Q,lazyFlip:ee=!1,externalTree:et}=e,[en,er]=r.useState(null);X||null===en||er(null);let el=J.side||"flip",eo=J.align||"flip",ei=J.fallbackAxisSide||"end",eu="function"==typeof D?D:void 0,es=(0,i.K)(eu),ea=eu?es:D,ec=(0,b.u)(D),ef=(0,b.u)(X),ed="rtl"===(0,A.j)(),ep=en||({top:"top",right:"right",bottom:"bottom",left:"left","inline-end":ed?"left":"right","inline-start":ed?"right":"left"})[V],eh="center"===H?ep:`${ep}-${H}`,eg=$,em=+("bottom"===V),ev=+("top"===V),ey=+("right"===V),eb=+("left"===V);"number"==typeof eg?eg={top:eg+em,right:eg+eb,bottom:eg+ev,left:eg+ey}:eg&&(eg={top:(eg.top||0)+em,right:(eg.right||0)+eb,bottom:(eg.bottom||0)+ev,left:(eg.left||0)+ey});let ex={boundary:"clipping-ancestors"===K?"clippingAncestors":K,padding:eg},ew=r.useRef(null),eR=(0,b.u)(F),eE=(0,b.u)(N),eS=[];z&&eS.push(z),eS.push((t=e=>{let t=q(e,V,ed),n="function"==typeof eR.current?eR.current(t):eR.current,r="function"==typeof eE.current?eE.current(t):eE.current;return{mainAxis:n,crossAxis:r,alignmentAxis:r}},n=["function"!=typeof F?F:0,"function"!=typeof N?N:0,ed,V],{name:(d=(0,x.cY)(t)).name,fn:d.fn,options:[t,n]}));let eT="none"===eo&&"shift"!==el,eM=!eT&&(B||G||"shift"===el),ek="none"===el?null:(l={...ex,padding:{top:eg.top+1,right:eg.right+1,bottom:eg.bottom+1,left:eg.left+1},mainAxis:!G&&"flip"===el,crossAxis:"flip"===eo&&"alignment",fallbackAxisSideDirection:ei},{name:(p=(0,x.UU)(l)).name,fn:p.fn,options:[l,void 0]}),eC=eT?null:(u=e=>{var t;let n=(0,v.R)(e.elements.floating).documentElement;return{...ex,rootBoundary:G?{x:0,y:0,width:n.clientWidth,height:n.clientHeight}:void 0,mainAxis:"none"!==eo,crossAxis:eM,limiter:B||G?void 0:(t=e=>{if(!ew.current)return{};let{width:t,height:n}=ew.current.getBoundingClientRect(),r=(0,m.TV)((0,m.C0)(e.placement)),l="y"===r?eg.left+eg.right:eg.top+eg.bottom;return{offset:("y"===r?t:n)/2+l/2}},{fn:(0,x.ER)(t).fn,options:[t,void 0]})}},s=[ex,B,G,eg,eo],{name:(h=(0,x.BN)(u)).name,fn:h.fn,options:[u,s]});"shift"===el||"shift"===eo||"center"===H?eS.push(eC,ek):eS.push(ek,eC),eS.push((a={...ex,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){if(!ef.current)return;let l=e.style;l.setProperty("--available-width",`${t}px`),l.setProperty("--available-height",`${n}px`);let o=(0,y.zk)(e).devicePixelRatio||1,{x:i,y:u,width:s,height:a}=r.reference,c=(Math.round((i+s)*o)-Math.round(i*o))/o,f=(Math.round((u+a)*o)-Math.round(u*o))/o;l.setProperty("--anchor-width",`${c}px`),l.setProperty("--anchor-height",`${f}px`)}},{name:(g=(0,x.Ej)(a)).name,fn:g.fn,options:[a,void 0]}),(c=e=>({element:ew.current||(0,v.R)(e.elements.floating).createElement("div"),padding:W,offsetParent:"floating"}),f=[W],{name:"arrow",options:c,async fn(e){let{x:t,y:n,placement:r,rects:l,platform:o,elements:i,middlewareData:u}=e,{element:s,padding:a=0,offsetParent:f="real"}=(0,m._3)(c,e)||{};if(null==s)return{};let d=(0,m.nI)(a),p={x:t,y:n},h=(0,m.Dz)(r),g=(0,m.sq)(h),v=await o.getDimensions(s),y="y"===h,b=y?"clientHeight":"clientWidth",x=l.reference[g]+l.reference[h]-p[h]-l.floating[g],w=p[h]-l.reference[h],R="real"===f?await o.getOffsetParent?.(s):i.floating,E=i.floating[b]||l.floating[g];E&&await o.isElement?.(R)||(E=i.floating[b]||l.floating[g]);let S=E/2-v[g]/2-1,T=Math.min(d[y?"top":"left"],S),M=Math.min(d[y?"bottom":"right"],S),k=E-v[g]-M,C=E/2-v[g]/2+(x/2-w/2),A=(0,m.qE)(T,C,k),P=!u.arrow&&null!=(0,m.Sg)(r)&&C!==A&&l.reference[g]/2-(C<T?T:M)-v[g]/2<0,I=P?C<T?C-T:C-k:0;return{[h]:p[h]+I,data:{[h]:A,centerOffset:C-A-I,...P&&{alignmentOffset:I}},reset:P}},options:[c,f]}),{name:"transformOrigin",fn(e){let{elements:t,middlewareData:n,placement:r,rects:l,y:o}=e,i=(0,m.C0)(r),u=(0,m.TV)(i),s=ew.current,a=n.arrow?.x||0,c=n.arrow?.y||0,f=s?.clientWidth||0,d=s?.clientHeight||0,p=a+f/2,h=c+d/2,g=Math.abs(n.shift?.y||0),v=l.reference.height/2,y="function"==typeof F?F(q(e,V,ed)):F,b=g>y,x={top:`${p}px calc(100% + ${y}px)`,bottom:`${p}px ${-y}px`,left:`calc(100% + ${y}px) ${h}px`,right:`${-y}px ${h}px`}[i],w=`${p}px ${l.reference.y+v-o}px`;return t.floating.style.setProperty("--transform-origin",eM&&"y"===u&&b?w:x),{}}},P,Q),(0,o.g)(()=>{!X&&Y&&Y.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[X,Y]);let eA=r.useMemo(()=>({elementResize:!U&&"u">typeof ResizeObserver,layoutShift:!U&&"u">typeof IntersectionObserver}),[U]),{refs:eP,elements:eI,x:eO,y:eq,middlewareData:ej,update:eD,placement:eL,context:eV,isPositioned:eF,floatingStyles:eH}=function(e={}){let{nodeId:t,externalTree:n}=e,l=(0,C.P)(e),i=e.rootContext||l,u=i.useState("referenceElement"),s=i.useState("floatingElement"),a=i.useState("domReferenceElement"),c=i.useState("open"),f=i.useState("floatingId"),[d,p]=r.useState(null),[h,g]=r.useState(void 0),[m,v]=r.useState(void 0),b=r.useRef(null),A=(0,k.cq)(n),P=r.useMemo(()=>({reference:u,floating:s,domReference:a}),[u,s,a]),I=function(e){void 0===e&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:l=[],platform:o,elements:{reference:i,floating:u}={},transform:s=!0,whileElementsMounted:a,open:c}=e,[f,d]=r.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=r.useState(l);E(p,l)||h(l);let[g,m]=r.useState(null),[v,y]=r.useState(null),b=r.useCallback(e=>{e!==P.current&&(P.current=e,m(e))},[]),k=r.useCallback(e=>{e!==I.current&&(I.current=e,y(e))},[]),C=i||g,A=u||v,P=r.useRef(null),I=r.useRef(null),O=r.useRef(f),q=null!=a,j=M(a),D=M(o),L=M(c),V=r.useCallback(()=>{if(!P.current||!I.current)return;let e={placement:t,strategy:n,middleware:p};D.current&&(e.platform=D.current),(0,x.rD)(P.current,I.current,e).then(e=>{let t={...e,isPositioned:!1!==L.current};F.current&&!E(O.current,t)&&(O.current=t,w.flushSync(()=>{d(t)}))})},[p,t,n,D,L]);R(()=>{!1===c&&O.current.isPositioned&&(O.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[c]);let F=r.useRef(!1);R(()=>(F.current=!0,()=>{F.current=!1}),[]),R(()=>{if(C&&(P.current=C),A&&(I.current=A),C&&A){if(j.current)return j.current(C,A,V);V()}},[C,A,V,j,q]);let H=r.useMemo(()=>({reference:P,floating:I,setReference:b,setFloating:k}),[b,k]),N=r.useMemo(()=>({reference:C,floating:A}),[C,A]),K=r.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=T(N.floating,f.x),r=T(N.floating,f.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...S(N.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,s,N.floating,f.x,f.y]);return r.useMemo(()=>({...f,update:V,refs:H,elements:N,floatingStyles:K}),[f,V,H,N,K])}({...e,elements:{...P,...d&&{reference:d}}}),O=(0,y.vq)(h)?h:null,q=void 0===m?i.state.floatingElement:m;i.useSyncedValue("referenceElement",h??null),i.useSyncedValue("domReferenceElement",void 0===h?a:O),i.useSyncedValue("floatingElement",q);let j=r.useCallback(e=>{let t=(0,y.vq)(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;p(t),I.refs.setReference(t)},[I.refs]),D=r.useCallback(e=>{((0,y.vq)(e)||null===e)&&(b.current=e,g(e)),((0,y.vq)(I.refs.reference.current)||null===I.refs.reference.current||null!==e&&!(0,y.vq)(e))&&I.refs.setReference(e)},[I.refs,g]),L=r.useCallback(e=>{v(e),I.refs.setFloating(e)},[I.refs]),V=r.useMemo(()=>({...I.refs,setReference:D,setFloating:L,setPositionReference:j,domReference:b}),[I.refs,D,L,j]),F=r.useMemo(()=>({...I.elements,domReference:a}),[I.elements,a]),H=r.useMemo(()=>({...I,dataRef:i.context.dataRef,open:c,onOpenChange:i.setOpen,events:i.context.events,floatingId:f,refs:V,elements:F,nodeId:t,rootStore:i}),[I,V,F,t,i,c,f]);return(0,o.g)(()=>{a&&(b.current=a)},[a]),(0,o.g)(()=>{i.context.dataRef.current.floatingContext=H;let e=A?.nodesRef.current.find(e=>e.id===t);e&&(e.context=H)}),r.useMemo(()=>({...I,context:H,refs:V,elements:F,rootStore:i}),[I,V,F,H,i])}({rootContext:Y,open:_?X:void 0,placement:eh,middleware:eS,strategy:L,whileElementsMounted:_?void 0:(...e)=>(0,x.ll)(...e,eA),nodeId:Z,externalTree:et}),{sideX:eN,sideY:eK}=ej.adaptiveOrigin||I,e$=eF?L:"fixed",eB=r.useMemo(()=>{let e=Q?{position:e$,[eN]:eO,[eK]:eq}:{position:e$,...eH};return eF||(e.opacity=0),e},[Q,e$,eN,eO,eK,eq,eH,eF]),eW=r.useRef(null);(0,o.g)(()=>{if(!X)return;let e=ec.current,t="function"==typeof e?e():e,n=(j(t)?t.current:t)||null;n!==eW.current&&(eP.setPositionReference(n),eW.current=n)},[X,eP,ea,ec]),r.useEffect(()=>{if(!X)return;let e=ec.current;"function"!=typeof e&&j(e)&&e.current!==eW.current&&(eP.setPositionReference(e.current),eW.current=e.current)},[X,eP,ea,ec]),r.useEffect(()=>{if(_&&X&&eI.domReference&&eI.floating)return(0,x.ll)(eI.domReference,eI.floating,eD,eA)},[_,X,eI,eD,eA]);let eU=(0,m.C0)(eL),ez=O(V,eU,ed),e_=(0,m.Sg)(eL)||"center",eY=!!ej.hide?.referenceHidden;(0,o.g)(()=>{ee&&X&&eF&&er(eU)},[ee,X,eF,eU]);let eX=r.useMemo(()=>({position:"absolute",top:ej.arrow?.y,left:ej.arrow?.x}),[ej.arrow]),eJ=ej.arrow?.centerOffset!==0;return r.useMemo(()=>({positionerStyles:eB,arrowStyles:eX,arrowRef:ew,arrowUncentered:eJ,side:ez,align:e_,physicalSide:eU,anchorHidden:eY,refs:eP,context:eV,isPositioned:eF,update:eD}),[eB,eX,ew,eJ,ez,e_,eU,eY,eP,eV,eF,eD])}({anchor:n,floatingRootContext:eh,positionMethod:a,mounted:em,side:h,sideOffset:Y,align:g,alignOffset:X,arrowPadding:Z,collisionBoundary:J,collisionPadding:G,sticky:Q,disableAnchorTracking:ee??eC,collisionAvoidance:en,keepMounted:!0}),eP=eC?"none":eA.side,eI=eC?_:eA.positionerStyles,eO={open:eg,side:eP,align:eA.align,anchorHidden:eA.anchorHidden};(0,o.g)(()=>{eo.set("popupSide",eA.side)},[eo,eA.side]);let eq=function(e,t,{styles:n,transitionStatus:r,props:l,refs:o,hidden:i,inert:u=!1}){let s={...n};return u&&(s.pointerEvents="none"),(0,W.o)("div",e,{state:t,ref:o,props:[{role:"presentation",hidden:i,style:s},(0,U.d)(r),l],stateAttributesMapping:B.GW})}(e,eO,{styles:eI,transitionStatus:eE,props:el,refs:[t,(0,i.K)(e=>{eo.set("positionerElement",e)})],hidden:!em,inert:!eg}),ej=r.useRef(0),eD=(0,i.K)(e=>{if(0===e.size&&0===ej.current||0===ec.current.length)return;let t=ej.current;if(ej.current=e.size,e.size===t)return;let n=(0,N.d)(K.dv);if(0!==t&&!eo.state.multiple&&null!==ey&&-1===(0,$.Vz)(ec.current,ey,eR)){let e=ef.current,t=null!=e&&-1!==(0,$.Vz)(ec.current,e,eR)?e:null;ep(t,n),null===t&&(eo.set("selectedIndex",null),ea.current=null)}if(0!==t&&eo.state.multiple&&Array.isArray(ey)){let e=ey.filter(e=>-1!==(0,$.Vz)(ec.current,e,eR));(e.length!==ey.length||e.some(e=>!(0,$.kJ)(ey,e,eR)))&&(ep(e,n),0===e.length&&(eo.set("selectedIndex",null),ea.current=null))}if(eg&&eC){eo.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let e={height:""};(0,F.Y)(ex,e),(0,F.Y)(ed.current,e)}}),eL=r.useMemo(()=>({...eA,side:eP,alignItemWithTriggerActive:eC,setControlledAlignItemWithTrigger:ek,scrollUpArrowRef:eS,scrollDownArrowRef:eT}),[eA,eP,eC,ek]);return(0,f.jsx)(d,{elementsRef:ei,labelsRef:eu,onMapChange:eD,children:(0,f.jsxs)(D.i.Provider,{value:eL,children:[em&&ev&&(0,f.jsx)(L.W,{inert:(0,l.Y)(!eg),cutout:ew}),eq]})})})},24178:(e,t,n)=>{n.d(t,{E:()=>o});var r=n(95155);let l="base-ui-disable-scrollbar",o={className:l,getElement:e=>(0,r.jsx)("style",{nonce:e,href:l,precedence:"base-ui:low",children:`.${l}{scrollbar-width:none}.${l}::-webkit-scrollbar{display:none}`})}},25981:(e,t,n)=>{n.d(t,{$:()=>i});var r=n(12115),l=n(21171),o=n(99672);function i(e,t=!1,n=!1){let[u,s]=r.useState(e&&t?"idle":void 0),[a,c]=r.useState(e);return e&&!a&&(c(!0),s("starting")),e||!a||"ending"===u||n||s("ending"),e||a||"ending"!==u||s(void 0),(0,l.g)(()=>{if(!e&&a&&"ending"!==u&&n){let e=o.K.request(()=>{s("ending")});return()=>{o.K.cancel(e)}}},[e,a,u,n]),(0,l.g)(()=>{if(!e||t)return;let n=o.K.request(()=>{s(void 0)});return()=>{o.K.cancel(n)}},[t,e]),(0,l.g)(()=>{if(!e||!t)return;e&&a&&"idle"!==u&&s("starting");let n=o.K.request(()=>{s("idle")});return()=>{o.K.cancel(n)}},[t,e,a,u]),{mounted:a,setMounted:c,transitionStatus:u}}},26821:(e,t,n)=>{n.d(t,{Dp:()=>u,u:()=>f,Md:()=>c,yg:()=>s,T:()=>a});var r=n(12115);function l(e){if(null==e)return"";if("string"==typeof e)return e;try{return JSON.stringify(e)}catch{return String(e)}}var o=n(95155);function i(e){return null!=e&&e.length>0&&"object"==typeof e[0]&&null!=e[0]&&"items"in e[0]}function u(e){if(!Array.isArray(e))return null!=e&&"null"in e;if(i(e)){for(let t of e)for(let e of t.items)if(e&&null==e.value&&null!=e.label)return!0;return!1}for(let t of e)if(t&&null==t.value&&null!=t.label)return!0;return!1}function s(e,t){if(t&&null!=e)return t(e)??"";if(e&&"object"==typeof e){if("label"in e&&null!=e.label)return String(e.label);if("value"in e)return String(e.value)}return l(e)}function a(e,t){return t&&null!=e?t(e)??"":e&&"object"==typeof e&&"value"in e&&"label"in e?l(e.value):l(e)}function c(e,t,n){if(n&&null!=e)return n(e);if(e&&"object"==typeof e&&"label"in e&&null!=e.label)return e.label;if(t&&!Array.isArray(t))return t[e]??s(e,n);if(Array.isArray(t)){let r=i(t)?t.flatMap(e=>e.items):t;if(null==e||"object"!=typeof e){let t=r.find(t=>t.value===e);return t&&null!=t.label?t.label:s(e,n)}if("value"in e){let t=r.find(t=>t&&t.value===e.value);if(t&&null!=t.label)return t.label}}return s(e,n)}function f(e,t,n){return e.reduce((e,l,i)=>(i>0&&e.push(", "),e.push((0,o.jsx)(r.Fragment,{children:c(l,t,n)},i)),e),[])}},28823:(e,t,n)=>{n.d(t,{EW:()=>i,RS:()=>l,gR:()=>o});var r=n(6791);function l(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function o(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&(0,r.Ng)(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function i(e){return"composedPath"in e?e.composedPath()[0]:e.target}},30656:(e,t,n)=>{n.d(t,{r:()=>r});function r(e,t){return e&&!t?e:!e&&t?t:e||t?{...e,...t}:void 0}},31823:(e,t,n)=>{n.d(t,{R1:()=>i,cq:()=>u});var r=n(12115);n(95155);let l=r.createContext(null),o=r.createContext(null),i=()=>r.useContext(l)?.id||null,u=e=>{let t=r.useContext(o);return e??t}},35188:(e,t,n)=>{n.d(t,{jF:()=>r});let r=new Set([...new Set([...new Set(["ArrowLeft","ArrowRight"]),...new Set(["ArrowUp","ArrowDown"])]),"Home","End"])},35724:(e,t,n)=>{n.d(t,{D:()=>l,M:()=>o});var r=n(12115);let l=r.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function o(){return r.useContext(l)}},37265:(e,t,n)=>{n.d(t,{V:()=>c});var r=n(12115),l=n(22531),o=n(74649);let i=r.createContext(void 0);var u=n(63779),s=n(63548),a=n(95155);let c=r.forwardRef(function(e,t){let{store:n}=(0,u.ll)(),r=(0,l.P)(n,s.T.mounted),c=(0,l.P)(n,s.T.forceMount);return r||c?(0,a.jsx)(i.Provider,{value:!0,children:(0,a.jsx)(o.XF,{ref:t,...e})}):null})},37919:(e,t,n)=>{n.d(t,{H:()=>i});var r=n(12115),l=n(57445);let o=r.createContext({controlId:void 0,registerControlId:l.tE,labelId:void 0,setLabelId:l.tE,messageIds:[],setMessageIds:l.tE,getDescriptionProps:e=>e});function i(){return r.useContext(o)}},40595:(e,t,n)=>{n.d(t,{H:()=>X});var r=n(12115),l=n(90283),o=n(5909),i=n(45690),u=n(6084);function s({controlled:e,default:t,name:n,state:l="value"}){let{current:o}=r.useRef(void 0!==e),[i,u]=r.useState(t),a=r.useCallback(e=>{o||u(e)},[]);return[o?e:i,a]}var a=n(21171),c=n(63987),f=n(81717),d=n(82647),p=n(22531),h=n(57445),g=n(47257),m=n(42164),v=n(80384),y=n(99672),b=n(6751),x=n(6791),w=n(50812),R=n(90278),E=n(31823),S=n(93965),T=n(41835),M=n(72218),k=n(28823),C=n(64364),A=n(57162);function P(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function I(e,t){return P(t,e===T.il||e===T.Jd,e===T.eR||e===T.RJ)}function O(e,t,n){return P(t,e===T.Jd,n?e===T.eR:e===T.RJ)||"Enter"===e||" "===e||""===e}var q=n(43110),j=n(63779),D=n(5102),L=n(44092),V=n(25981),F=n(63548),H=n(20363);let N=r.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:h.tE,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});var K=n(26821),$=n(97370),B=n(49087),W=n(49093),U=n(85965),z=n(62172),_=n(47936),Y=n(95155);function X(e){let{id:t,value:n,defaultValue:X=null,onValueChange:J,open:G,defaultOpen:Z=!1,onOpenChange:Q,name:ee,form:et,autoComplete:en,disabled:er=!1,readOnly:el=!1,required:eo=!1,modal:ei=!0,actionsRef:eu,inputRef:es,onOpenChangeComplete:ea,items:ec,multiple:ef=!1,itemToStringLabel:ed,itemToStringValue:ep,isItemEqualToValue:eh=$.jd,highlightItemOnHover:eg=!0,children:em}=e,{clearErrors:ev}=r.useContext(N),{setDirty:ey,setTouched:eb,setFocused:ex,shouldValidateOnChange:ew,validityData:eR,setFilled:eE,name:eS,disabled:eT,validation:eM,validationMode:ek}=(0,D.V$)(),eC=(0,L.l)({id:t}),eA=eT||er,eP=eS??ee,[eI,eO]=s({controlled:n,default:ef?X??h.Ml:X,name:"Select",state:"value"}),[eq,ej]=s({controlled:G,default:Z,name:"Select",state:"open"}),eD=r.useRef([]),eL=r.useRef([]),eV=r.useRef(null),eF=r.useRef(null),eH=r.useRef(0),eN=r.useRef(null),eK=r.useRef([]),e$=r.useRef(!1),eB=r.useRef(!1),eW=r.useRef(null),eU=r.useRef(null),ez=r.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),e_=r.useRef(!1),{mounted:eY,setMounted:eX,transitionStatus:eJ}=(0,V.$)(eq),{openMethod:eG,triggerProps:eZ}=(0,W.G)(eq),eQ=(0,i.j)(()=>new d.i({id:eC,labelId:void 0,modal:ei,multiple:ef,itemToStringLabel:ed,itemToStringValue:ep,isItemEqualToValue:eh,value:eI,open:eq,mounted:eY,transitionStatus:eJ,items:ec,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,e0=(0,p.P)(eQ,F.T.activeIndex),e1=(0,p.P)(eQ,F.T.selectedIndex),e2=(0,p.P)(eQ,F.T.triggerElement),e5=(0,p.P)(eQ,F.T.positionerElement),e7=function(e){let[t,n]=r.useState({current:e,previous:null});return e!==t.current&&n({current:e,previous:t.current}),t.previous}(eG),e9=eG??e7,e6=r.useMemo(()=>ef&&Array.isArray(eI)&&0===eI.length?"":(0,K.T)(eI,ep),[ef,eI,ep]),e8=r.useMemo(()=>ef&&Array.isArray(eI)?eI.map(e=>(0,K.T)(e,ep)):(0,K.T)(eI,ep),[ef,eI,ep]);!function(e,t,n,l,o=!0){let{registerFieldControl:i}=(0,D.V$)(),u=r.useRef(null);u.current||(u.current=Symbol()),(0,a.g)(()=>{let r=u.current;if(r&&o)return i(r,{controlRef:e,getValue:l,id:t,value:n}),()=>{i(r,void 0)}},[e,o,l,t,i,n])}((0,f.u)(eQ.state.triggerElement),eC,eI,(0,c.K)(()=>e8));let e3=r.useRef(eI),e4=ef?Array.isArray(eI)&&eI.length>0:null!=eI;(0,a.g)(()=>{eI!==e3.current&&eQ.set("forceMount",!0)},[eQ,eI]),(0,a.g)(()=>{eE(e4)},[e4,eE]),(0,a.g)(function(){let e,t=eK.current;if(ef){let n=Array.isArray(eI)?eI:[];if(0===n.length)e=null;else{let r=n[n.length-1],l=(0,$.Vz)(t,r,eh);e=-1===l?null:l}}else{let n=(0,$.Vz)(t,eI,eh);e=-1===n?null:n}null===e&&(eU.current=null),eq||eQ.set("selectedIndex",e)},[e4,ef,eq,eI,eK,eh,eQ,eU]),(0,B.x)(eI,()=>{ev(eP),ey(eI!==eR.initialValue),ew()?eM.commit(eI):eM.commit(eI,!0)});let te=(0,c.K)((e,t)=>{if(Q?.(e,t),!t.isCanceled&&(ej(e),e||t.reason!==R.Xn&&t.reason!==R.Np||(eb(!0),ex(!1),"onBlur"===ek&&eM.commit(eI)),!e&&null!==eQ.state.activeIndex)){let e=eD.current[eQ.state.activeIndex];queueMicrotask(()=>{e?.setAttribute("tabindex","-1")})}}),tt=(0,c.K)(()=>{eX(!1),eQ.update({activeIndex:null,openMethod:null}),ea?.(!1)});(0,H.v)({enabled:!eu,open:eq,ref:eV,onComplete(){eq||tt()}}),r.useImperativeHandle(eu,()=>({unmount:tt}),[tt]);let tn=(0,c.K)((e,t)=>{J?.(e,t),t.isCanceled||eO(e)}),tr=(0,c.K)(()=>{let e=eQ.state.listElement||eV.current;if(!e)return;let t=(0,U.XF)(e.scrollHeight,e.clientHeight),n=(0,U.Qw)(e.scrollTop,t),r=n>0,l=n<t;eQ.state.scrollUpArrowVisible!==r&&eQ.set("scrollUpArrowVisible",r),eQ.state.scrollDownArrowVisible!==l&&eQ.set("scrollDownArrowVisible",l)}),tl=(0,g.P)({open:eq,onOpenChange:te,elements:{reference:e2,floating:e5}}),to=(0,m.k)(tl,{enabled:!el&&!eA,event:"mousedown"}),ti=(0,v.s)(tl),tu=function(e,t){let{listRef:n,activeIndex:l,onNavigate:o=()=>{},enabled:i=!0,selectedIndex:u=null,allowEscape:s=!1,loopFocus:d=!1,nested:p=!1,rtl:h=!1,virtual:g=!1,focusItemOnOpen:m="auto",focusItemOnHover:v=!0,openOnArrowKeyDown:q=!0,disabledIndices:j,orientation:D="vertical",parentOrientation:L,cols:V=1,id:F,resetOnPointerLeave:H=!0,externalTree:N}=t,K="rootStore"in e?e.rootStore:e,$=K.useState("open"),B=K.useState("floatingElement"),W=K.useState("domReferenceElement"),U=K.context.dataRef,z=(0,M.nd)(B),_=(0,M.WZ)(W),Y=(0,f.u)(z),X=(0,E.R1)(),J=(0,E.cq)(N),G=r.useRef(m),Z=r.useRef(u??-1),Q=r.useRef(null),ee=r.useRef(!0),et=(0,c.K)(e=>{o(-1===Z.current?null:Z.current,e)}),en=r.useRef(et),er=r.useRef(!!B),el=r.useRef($),eo=r.useRef(!1),ei=r.useRef(!1),eu=r.useRef(null),es=(0,f.u)(j),ea=(0,f.u)($),ec=(0,f.u)(u),ef=(0,f.u)(H),ed=(0,y.N)(),ep=(0,y.N)(),eh=(0,c.K)(()=>{function e(e){g?J?.events.emit("virtualfocus",e):eu.current=(0,C.p)(e,{sync:eo.current,preventScroll:!0})}let t=n.current[Z.current],r=ei.current;t&&e(t),(eo.current?e=>e():e=>ed.request(e))(()=>{let l=n.current[Z.current]||t;!l||(t||e(l),ex&&(r||!ee.current)&&l.scrollIntoView?.({block:"nearest",inline:"nearest"}))})});(0,a.g)(()=>{U.current.orientation=D},[U,D]),(0,a.g)(()=>{i&&($&&B?(Z.current=u??-1,G.current&&null!=u&&(ei.current=!0,et())):er.current&&(Z.current=-1,en.current()))},[i,$,B,u,et]),(0,a.g)(()=>{if(i){if(!$){eo.current=!1;return}if(B)if(null==l){if(eo.current=!1,null!=ec.current)return;if(er.current&&(Z.current=-1,eh()),(!el.current||!er.current)&&G.current&&(null!=Q.current||!0===G.current&&null==Q.current)){let e=0,t=()=>{null==n.current[0]?(e<2&&(e?e=>ep.request(e):queueMicrotask)(t),e+=1):(Z.current=null==Q.current||O(Q.current,D,h)||p?(0,S.Zb)(n):(0,S.vB)(n),Q.current=null,et())};t()}}else(0,S.du)(n.current,l)||(Z.current=l,eh(),ei.current=!1)}},[i,$,B,l,ec,p,n,D,h,et,eh,ep]),(0,a.g)(()=>{if(!i||B||!J||g||!er.current)return;let e=J.nodesRef.current,t=e.find(e=>e.id===X)?.context?.elements.floating,n=(0,k.RS)((0,b.R)(B)),r=e.some(e=>e.context&&(0,k.gR)(e.context.elements.floating,n));t&&!r&&ee.current&&t.focus({preventScroll:!0})},[i,B,J,X,g]),(0,a.g)(()=>{en.current=et,el.current=$,er.current=!!B}),(0,a.g)(()=>{$||(Q.current=null,G.current=m)},[$,m]);let eg=null!=l,em=(0,c.K)(e=>{if(!ea.current)return;let t=n.current.indexOf(e.currentTarget);-1!==t&&(Z.current!==t||l!==t)&&(Z.current=t,et(e))}),ev=(0,c.K)(()=>L??J?.nodesRef.current.find(e=>e.id===X)?.context?.dataRef?.current.orientation),ey=(0,c.K)(()=>(0,S.Zb)(n,es.current)),eb=(0,c.K)(e=>{var t;let r,l;if(ee.current=!1,eo.current=!0,229===e.which||!ea.current&&e.currentTarget===Y.current)return;if(p&&(t=e.key,r=h?t===T.RJ:t===T.eR,l=t===T.il,"both"===D||"horizontal"===D&&V&&V>1?"Escape"===t:P(D,r,l))){I(e.key,ev())||(0,A.jo)(e),K.setOpen(!1,(0,w.d)(R.Dq,e.nativeEvent)),(0,x.sb)(W)&&(g?J?.events.emit("virtualfocus",W):W.focus());return}let o=Z.current,i=(0,S.Zb)(n,j),u=(0,S.vB)(n,j);if(_||("Home"===e.key&&((0,A.jo)(e),Z.current=i,et(e)),"End"===e.key&&((0,A.jo)(e),Z.current=u,et(e))),V>1){let t=Array.from({length:n.current.length},()=>({width:1,height:1})),r=(0,S.zf)(t,V,!1),l=r.findIndex(e=>null!=e&&!(0,S.FP)(n.current,e,j)),o=r.reduce((e,t,r)=>null==t||(0,S.FP)(n.current,t,j)?e:r,-1),s=r[(0,S.Kg)(r.map(e=>null!=e?n.current[e]:null),{event:e,orientation:D,loopFocus:d,rtl:h,cols:V,disabledIndices:(0,S.Y3)([...("function"!=typeof j?j:null)||n.current.map((e,t)=>(0,S.FP)(n.current,t,j)?t:void 0),void 0],r),minIndex:l,maxIndex:o,prevIndex:(0,S.fl)(Z.current>u?i:Z.current,t,r,V,e.key===T.Jd?"bl":e.key===(h?T.eR:T.RJ)?"tr":"tl"),stopEvent:!0})];if(null!=s&&(Z.current=s,et(e)),"both"===D)return}if(I(e.key,D)){if((0,A.jo)(e),$&&!g&&(0,k.RS)(e.currentTarget.ownerDocument)===e.currentTarget){Z.current=O(e.key,D,h)?i:u,et(e);return}O(e.key,D,h)?d?o>=u?s&&o!==n.current.length?Z.current=-1:(eo.current=!1,Z.current=i):Z.current=(0,S.BF)(n.current,{startingIndex:o,disabledIndices:j}):Z.current=Math.min(u,(0,S.BF)(n.current,{startingIndex:o,disabledIndices:j})):d?o<=i?s&&-1!==o?Z.current=n.current.length:(eo.current=!1,Z.current=u):Z.current=(0,S.BF)(n.current,{startingIndex:o,decrement:!0,disabledIndices:j}):Z.current=Math.max(i,(0,S.BF)(n.current,{startingIndex:o,decrement:!0,disabledIndices:j})),(0,S.du)(n.current,Z.current)&&(Z.current=-1),et(e)}}),ex=r.useMemo(()=>({onFocus(e){eo.current=!0,em(e)},onClick:({currentTarget:e})=>e.focus({preventScroll:!0}),onMouseMove(e){eo.current=!0,ei.current=!1,v&&em(e)},onPointerLeave(e){if(!ea.current||!ee.current||"touch"===e.pointerType)return;eo.current=!0;let t=e.relatedTarget;if(!(!v||n.current.includes(t))&&ef.current&&(eu.current?.(),eu.current=null,Z.current=-1,et(e),!g)){let e=Y.current,t=(0,k.RS)((0,b.R)(e));e&&(0,k.gR)(e,t)&&e.focus({preventScroll:!0})}}}),[em,ea,Y,v,n,et,ef,g]),ew=r.useMemo(()=>g&&$&&eg&&{"aria-activedescendant":`${F}-${l}`},[g,$,eg,F,l]),eR=r.useMemo(()=>({"aria-orientation":"both"===D?void 0:D,...!_?ew:{},onKeyDown(e){if("Tab"===e.key&&e.shiftKey&&$&&!g){let t=(0,k.EW)(e.nativeEvent);if(t&&!(0,k.gR)(Y.current,t))return;(0,A.jo)(e),K.setOpen(!1,(0,w.d)(R.Xn,e.nativeEvent)),(0,x.sb)(W)&&W.focus();return}eb(e)},onPointerMove(){ee.current=!0}}),[ew,eb,Y,D,_,K,$,g,W]),eE=r.useMemo(()=>{function e(e){K.setOpen(!0,(0,w.d)(R.Dq,e.nativeEvent,e.currentTarget))}function t(e){"auto"===m&&(0,A.YF)(e.nativeEvent)&&(G.current=!g)}function n(e){G.current=m,"auto"===m&&(0,A.Pg)(e.nativeEvent)&&(G.current=!0)}return{onKeyDown(t){var n,r;let l=K.select("open");ee.current=!1;let o=t.key.startsWith("Arrow"),i=(n=t.key,r=ev(),P(r,h?n===T.eR:n===T.RJ,n===T.Jd)),u=I(t.key,D),s=(p?i:u)||"Enter"===t.key||""===t.key.trim();if(g&&l)return eb(t);if(l||q||!o){if(s){let e=I(t.key,ev());Q.current=p&&e?null:t.key}if(p){i&&((0,A.jo)(t),l?(Z.current=ey(),et(t)):e(t));return}u&&(null!=ec.current&&(Z.current=ec.current),(0,A.jo)(t),!l&&q?e(t):eb(t),l&&et(t))}},onFocus(e){K.select("open")&&!g&&(Z.current=-1,et(e))},onPointerDown:n,onPointerEnter:n,onMouseDown:t,onClick:t}},[eb,m,ey,p,et,K,q,D,ev,h,ec,g]),eS=r.useMemo(()=>({...ew,...eE}),[ew,eE]);return r.useMemo(()=>i?{reference:eS,floating:eR,item:ex,trigger:eE}:{},[i,eS,eR,eE,ex])}(tl,{enabled:!el&&!eA,listRef:eD,activeIndex:e0,selectedIndex:e1,disabledIndices:h.Ml,onNavigate(e){(null!==e||eq)&&eQ.set("activeIndex",e)},focusItemOnHover:eg}),ts=function(e,t){let{listRef:n,elementsRef:l,activeIndex:o,onMatch:i,onTyping:u,enabled:s=!0,resetMs:f=750,selectedIndex:d=null}=t,p="rootStore"in e?e.rootStore:e,h=p.useState("open"),g=(0,q.Z)(),m=r.useRef(""),v=r.useRef(d??o??-1),y=r.useRef(null),b=(0,c.K)(e=>{function t(e,n,r=0){if(0===e.length)return -1;let o=(r%e.length+e.length)%e.length,i=n.toLocaleLowerCase();for(let t=0;t<e.length;t+=1){let n=(o+t)%e.length,r=e[n];if(r?.toLocaleLowerCase().startsWith(i)&&function(e){let t=l?.current[e];return!t||(0,S.J9)(t)}(n))return n}return -1}let r=n.current;if(m.current.length>0&&" "===e.key&&((0,A.jo)(e),u?.(!0)),m.current.length>0&&" "!==m.current[0]&&-1===t(r,m.current)&&" "!==e.key&&u?.(!1),null==r||1!==e.key.length||e.ctrlKey||e.metaKey||e.altKey)return;h&&" "!==e.key&&((0,A.jo)(e),u?.(!0));let s=""===m.current;s&&(v.current=d??o??-1),r.every(e=>!e||e[0]?.toLocaleLowerCase()!==e[1]?.toLocaleLowerCase())&&m.current===e.key&&(m.current="",v.current=y.current),m.current+=e.key,g.start(f,()=>{m.current="",v.current=y.current,u?.(!1)});let a=s?d??o??-1:v.current,c=t(r,m.current,(a??0)+1);-1!==c?(i?.(c),y.current=c):" "!==e.key&&(m.current="",u?.(!1))}),x=(0,c.K)(e=>{let t=e.relatedTarget,n=p.select("domReferenceElement"),r=p.select("floatingElement");(0,k.gR)(n,t)||(0,k.gR)(r,t)||(g.clear(),m.current="",v.current=y.current,u?.(!1))});(0,a.g)(()=>{(h||null===d)&&(g.clear(),y.current=null,""!==m.current&&(m.current=""))},[h,d,g]),(0,a.g)(()=>{h&&""===m.current&&(v.current=d??o??-1)},[h,d,o]);let w=r.useMemo(()=>({onKeyDown:b,onBlur:x}),[b,x]);return r.useMemo(()=>s?{reference:w,floating:w}:{},[s,w])}(tl,{enabled:!el&&!eA&&(eq||!ef),listRef:eL,activeIndex:e0,selectedIndex:e1,onMatch(e){eq?eQ.set("activeIndex",e):tn(eK.current[e],(0,w.d)("none"))},onTyping(e){e$.current=e}}),ta=r.useMemo(()=>{let e=(0,_.v6)(ts.reference,tu.reference,ti.reference,to.reference,eZ);return eC&&(e.id=eC),e},[to.reference,ts.reference,tu.reference,ti.reference,eZ,eC]),tc=r.useMemo(()=>(0,_.v6)(z.Ls,ts.floating,tu.floating,ti.floating),[ts.floating,tu.floating,ti.floating]),tf=tu.item??h.t0;(0,u.j)(()=>{eQ.update({popupProps:tc,triggerProps:ta})}),(0,a.g)(()=>{eQ.update({id:eC,modal:ei,multiple:ef,value:eI,open:eq,mounted:eY,transitionStatus:eJ,popupProps:tc,triggerProps:ta,items:ec,itemToStringLabel:ed,itemToStringValue:ep,isItemEqualToValue:eh,openMethod:e9})},[eQ,eC,ei,ef,eI,eq,eY,eJ,tc,ta,ec,ed,ep,eh,e9]);let td=r.useMemo(()=>({store:eQ,name:eP,required:eo,disabled:eA,readOnly:el,multiple:ef,highlightItemOnHover:eg,setValue:tn,setOpen:te,listRef:eD,popupRef:eV,scrollHandlerRef:eF,handleScrollArrowVisibility:tr,scrollArrowsMountedCountRef:eH,itemProps:tf,events:tl.context.events,valueRef:eN,valuesRef:eK,labelsRef:eL,typingRef:e$,selectionRef:ez,firstItemTextRef:eW,selectedItemTextRef:eU,validation:eM,onOpenChangeComplete:ea,keyboardActiveRef:eB,alignItemWithTriggerActiveRef:e_,initialValueRef:e3}),[eQ,eP,eo,eA,el,ef,eg,tn,te,tf,tl.context.events,eM,ea,tr]),tp=(0,o.a)(es,eM.inputRef),th=ef&&Array.isArray(eI)&&eI.length>0,tg=ef?void 0:eP,tm=r.useMemo(()=>ef&&Array.isArray(eI)&&eP?eI.map(e=>{let t=(0,K.T)(e,ep);return(0,Y.jsx)("input",{type:"hidden",form:et,name:eP,value:t},t)}):null,[ef,eI,et,eP,ep]);return(0,Y.jsx)(j.CG.Provider,{value:td,children:(0,Y.jsxs)(j.iP.Provider,{value:tl,children:[em,(0,Y.jsx)("input",{...eM.getInputValidationProps({onFocus(){eQ.state.triggerElement?.focus({focusVisible:!0})},onChange(e){if(e.nativeEvent.defaultPrevented||eA||el)return void e.preventBaseUIHandler?.();let t=e.currentTarget.value,n=(0,w.d)(R.dv,e.nativeEvent);eQ.set("forceMount",!0),queueMicrotask(function(){if(ef)return;let e=eK.current.find(e=>(0,K.T)(e,ep).toLowerCase()===t.toLowerCase()||(0,K.yg)(e,ed).toLowerCase()===t.toLowerCase());null!=e&&(ey(e!==eR.initialValue),tn(e,n),ew()&&eM.commit(e))})}}),id:eC&&null==tg?`${eC}-hidden-input`:void 0,form:et,name:tg,autoComplete:en,value:e6,disabled:eA,required:eo&&!th,readOnly:el,ref:tp,style:eP?l.a:l.Q,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),tm]})})}},41294:(e,t,n)=>{n.d(t,{y:()=>c});var r=n(12115),l=n(22531),o=n(55004),i=n(63779),u=n(26821),s=n(63548);let a={value:()=>null},c=r.forwardRef(function(e,t){let{className:n,render:r,children:c,placeholder:f,style:d,...p}=e,{store:h,valueRef:g}=(0,i.ll)(),m=(0,l.P)(h,s.T.value),v=(0,l.P)(h,s.T.items),y=(0,l.P)(h,s.T.itemToStringLabel),b=(0,l.P)(h,s.T.hasSelectedValue),x=(0,l.P)(h,s.T.hasNullItemLabel,!b&&null!=f&&null==c),w=null;return w="function"==typeof c?c(m):null!=c?c:b||null==f||x?Array.isArray(m)?(0,u.u)(m,v,y):(0,u.Md)(m,v,y):f,(0,o.o)("span",e,{state:{value:m,placeholder:!b},ref:[t,g],props:[{children:w},p],stateAttributesMapping:a})})},41835:(e,t,n)=>{n.d(t,{BT:()=>l,Ed:()=>r,Jd:()=>s,RJ:()=>i,eR:()=>o,il:()=>u});let r="data-base-ui-focusable",l="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",o="ArrowLeft",i="ArrowRight",u="ArrowUp",s="ArrowDown"},42075:(e,t,n)=>{var r;n.d(t,{G:()=>u,T:()=>l});let l=((r={}).startingStyle="data-starting-style",r.endingStyle="data-ending-style",r),o={[l.startingStyle]:""},i={[l.endingStyle]:""},u={transitionStatus:e=>"starting"===e?o:"ending"===e?i:null}},42164:(e,t,n)=>{n.d(t,{k:()=>d});var r=n(12115),l=n(99672),o=n(43110),i=n(57445),u=n(28823),s=n(72218),a=n(57162),c=n(50812),f=n(90278);function d(e,t={}){let{enabled:n=!0,event:p="click",toggle:h=!0,ignoreMouse:g=!1,stickIfOpen:m=!0,touchOpenDelay:v=0,reason:y=f.Ui}=t,b="rootStore"in e?e.rootStore:e,x=b.context.dataRef,w=r.useRef(void 0),R=(0,l.N)(),E=(0,o.Z)(),S=r.useMemo(()=>{function e(e,t,n,r){let l=(0,c.d)(y,t,n);e&&"touch"===r&&v>0?E.start(v,()=>{b.setOpen(!0,l)}):b.setOpen(e,l)}function t(e,t,n){let r=x.current.openEvent,l=b.select("domReferenceElement")!==t;return!!e&&!!l||!e||!h||!!r&&!!m&&!n(r.type)}return{onPointerDown(e){w.current=e.pointerType},onMouseDown(n){let r=w.current,l=n.nativeEvent,o=b.select("open");if(0!==n.button||"click"===p||(0,a.Go)(r,!0)&&g)return;let i=t(o,n.currentTarget,e=>"click"===e||"mousedown"===e),c=(0,u.EW)(l);if((0,s.$u)(c))return void e(i,l,c,r);let f=n.currentTarget;R.request(()=>{e(i,l,f,r)})},onClick(n){if("mousedown-only"===p)return;let r=w.current;if("mousedown"===p&&r){w.current=void 0;return}(0,a.Go)(r,!0)&&g||e(t(b.select("open"),n.currentTarget,e=>"click"===e||"mousedown"===e||"keydown"===e||"keyup"===e),n.nativeEvent,n.currentTarget,r)},onKeyDown(){w.current=void 0}}},[x,p,g,y,b,m,h,R,E,v]);return r.useMemo(()=>n?{reference:S}:i.t0,[n,S])}},43110:(e,t,n)=>{n.d(t,{E:()=>o,Z:()=>i});var r=n(45690),l=n(92623);class o{static create(){return new o}start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=0,t()},e)}isStarted(){return 0!==this.currentId}constructor(){this.currentId=0,this.clear=()=>{0!==this.currentId&&(clearTimeout(this.currentId),this.currentId=0)},this.disposeEffect=()=>this.clear}}function i(){let e=(0,r.j)(o.create).current;return(0,l.y)(e.disposeEffect),e}},44092:(e,t,n)=>{n.d(t,{l:()=>f});var r=n(12115),l=n(21171),o=n(63987),i=n(45690),u=n(6791),s=n(57445),a=n(49642),c=n(37919);function f(e={}){let{id:t,implicit:n=!1,controlRef:d}=e,{controlId:p,registerControlId:h}=(0,c.H)(),g=(0,a.e)(t),m=n?p:void 0,v=(0,i.j)(()=>Symbol("labelable-control")),y=r.useRef(!1),b=r.useRef(null!=t),x=(0,o.K)(()=>{y.current&&h!==s.tE&&(y.current=!1,h(v.current,void 0))});return(0,l.g)(()=>{let e;if(h!==s.tE){if(n){let n=d?.current;e=(0,u.vq)(n)&&null!=n.closest("label")?t??null:m??g}else if(null!=t)b.current=!0,e=t;else{if(!b.current)return void x();e=g}if(void 0===e)return void x();y.current=!0,h(v.current,e)}},[t,d,m,h,n,g,v,x]),r.useEffect(()=>x,[x]),p??g}},45450:(e,t,n)=>{n.d(t,{w:()=>i});var r=n(12115),l=n(71003),o=n(95155);let i=r.forwardRef(function(e,t){return(0,o.jsx)(l.f,{...e,ref:t,direction:"up"})})},45690:(e,t,n)=>{n.d(t,{j:()=>o});var r=n(12115);let l={};function o(e,t){let n=r.useRef(l);return n.current===l&&(n.current=e(t)),n}},46106:(e,t,n)=>{n.d(t,{A:()=>r});let r=function(e,...t){let n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(e=>n.searchParams.append("args[]",e)),`Base UI error #${e}; visit ${n} for the full message.`}},47257:(e,t,n)=>{n.d(t,{P:()=>c});var r=n(6791),l=n(63358),o=n(21171),i=n(45690),u=n(72668),s=n(31823),a=n(70531);function c(e){let{open:t=!1,onOpenChange:n,elements:c={}}=e,f=(0,l.B)(),d=null!=(0,s.R1)(),p=(0,i.j)(()=>new a.K({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:c.reference??null,floatingElement:c.floating??null,triggerElements:new u.Z,floatingId:f,syncOnly:!1,nested:d})).current;return(0,o.g)(()=>{let e={open:t,floatingId:f};void 0!==c.reference&&(e.referenceElement=c.reference,e.domReferenceElement=(0,r.vq)(c.reference)?c.reference:null),void 0!==c.floating&&(e.floatingElement=c.floating),p.update(e)},[t,f,c.reference,c.floating,p]),p.context.onOpenChange=n,p.context.nested=d,p}},47843:(e,t,n)=>{n.d(t,{GW:()=>g,jL:()=>h,lP:()=>i,qV:()=>p});var r,l,o=n(42075);let i=((r={}).open="data-open",r.closed="data-closed",r[r.startingStyle=o.T.startingStyle]="startingStyle",r[r.endingStyle=o.T.endingStyle]="endingStyle",r.anchorHidden="data-anchor-hidden",r.side="data-side",r.align="data-align",r),u=((l={}).popupOpen="data-popup-open",l.pressed="data-pressed",l),s={[u.popupOpen]:""},a={[u.popupOpen]:"",[u.pressed]:""},c={[i.open]:""},f={[i.closed]:""},d={[i.anchorHidden]:""},p={open:e=>e?s:null},h={open:e=>e?a:null},g={open:e=>e?c:f,anchorHidden:e=>e?d:null}},47936:(e,t,n)=>{n.d(t,{PT:()=>p,VN:()=>h,lZ:()=>i,v6:()=>o});var r=n(30656);let l={};function o(e,t,n,r,l){if(!n&&!r&&!l&&!e)return u(t);let o=u(e);return t&&(o=s(o,t)),n&&(o=s(o,n)),r&&(o=s(o,r)),l&&(o=s(o,l)),o}function i(e){if(0===e.length)return l;if(1===e.length)return u(e[0]);let t=u(e[0]);for(let n=1;n<e.length;n+=1)t=s(t,e[n]);return t}function u(e){return c(e)?{...f(e,l)}:function(e){let t={...e};for(let e in t){let n=t[e];a(e,n)&&(t[e]=d(n))}return t}(e)}function s(e,t){return c(t)?f(t,e):function(e,t){if(!t)return e;for(let n in t){let l=t[n];switch(n){case"style":e[n]=(0,r.r)(e.style,l);break;case"className":e[n]=h(e.className,l);break;default:a(n,l)?e[n]=function(e,t){return t?e?(...n)=>{let r=n[0];if(g(r)){p(r);let l=t(...n);return r.baseUIHandlerPrevented||e?.(...n),l}let l=t(...n);return e?.(...n),l}:d(t):e}(e[n],l):e[n]=l}}return e}(e,t)}function a(e,t){let n=e.charCodeAt(0),r=e.charCodeAt(1),l=e.charCodeAt(2);return 111===n&&110===r&&l>=65&&l<=90&&("function"==typeof t||void 0===t)}function c(e){return"function"==typeof e}function f(e,t){return c(e)?e(t):e??l}function d(e){return e?(...t)=>{let n=t[0];return g(n)&&p(n),e(...t)}:e}function p(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function h(e,t){return t?e?t+" "+e:t:e}function g(e){return null!=e&&"object"==typeof e&&"nativeEvent"in e}},49087:(e,t,n)=>{n.d(t,{x:()=>i});var r=n(12115),l=n(21171),o=n(63987);function i(e,t){let n=r.useRef(e),i=(0,o.K)(t);(0,l.g)(()=>{n.current!==e&&i(n.current)},[e,i]),(0,l.g)(()=>{n.current=e},[e])}},49093:(e,t,n)=>{n.d(t,{G:()=>s,L:()=>u});var r=n(12115),l=n(63987),o=n(98221),i=n(49087);function u(e,t){var n;let i,u,{onClick:s,onPointerDown:a}=(n=(0,l.K)((n,r)=>{("function"==typeof e?e():e)||t(r||(o.un?"touch":""))}),i=r.useRef(""),u=r.useCallback(e=>{e.defaultPrevented||(i.current=e.pointerType,n(e,e.pointerType))},[n]),{onClick:r.useCallback(e=>{0===e.detail?n(e,"keyboard"):("pointerType"in e?n(e,e.pointerType):n(e,i.current),i.current="")},[n]),onPointerDown:u});return r.useMemo(()=>({onClick:s,onPointerDown:a}),[s,a])}function s(e){let[t,n]=r.useState(null),l=u(e,n);return(0,i.x)(e,t=>{t&&!e&&n(null)}),r.useMemo(()=>({openMethod:t,triggerProps:l}),[t,l])}},49642:(e,t,n)=>{n.d(t,{e:()=>l});var r=n(63358);function l(e){return(0,r.B)(e,"base-ui")}},50812:(e,t,n)=>{n.d(t,{d:()=>l});var r=n(57445);function l(e,t,n,l){let o=!1,i=!1,u=l??r.t0;return{reason:e,event:t??new Event("base-ui"),cancel(){o=!0},allowPropagation(){i=!0},get isCanceled(){return o},get isPropagationAllowed(){return i},trigger:n,...u}}},52899:(e,t,n)=>{var r;n.d(t,{mk:()=>u,HH:()=>i,ZV:()=>o,dc:()=>s});let l=((r={}).disabled="data-disabled",r.valid="data-valid",r.invalid="data-invalid",r.touched="data-touched",r.dirty="data-dirty",r.filled="data-filled",r.focused="data-focused",r),o={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},i={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},u={disabled:!1,...i},s={valid:e=>null===e?null:e?{[l.valid]:""}:{[l.invalid]:""}}},53277:(e,t,n)=>{n.d(t,{_:()=>l});let r=parseInt(n(12115).version,10);function l(e){return r>=e}},54983:(e,t,n)=>{n.d(t,{M:()=>l});var r=n(46106);let l=(e,t,n,l,o,i,...u)=>{let s;if(u.length>0)throw Error((0,r.A)(1));if(e&&t&&n&&l&&o&&i)s=(r,u,s,a)=>i(e(r,u,s,a),t(r,u,s,a),n(r,u,s,a),l(r,u,s,a),o(r,u,s,a),u,s,a);else if(e&&t&&n&&l&&o)s=(r,i,u,s)=>o(e(r,i,u,s),t(r,i,u,s),n(r,i,u,s),l(r,i,u,s),i,u,s);else if(e&&t&&n&&l)s=(r,o,i,u)=>l(e(r,o,i,u),t(r,o,i,u),n(r,o,i,u),o,i,u);else if(e&&t&&n)s=(r,l,o,i)=>n(e(r,l,o,i),t(r,l,o,i),l,o,i);else if(e&&t)s=(n,r,l,o)=>t(e(n,r,l,o),r,l,o);else if(e)s=e;else throw Error("Missing arguments");return s}},55004:(e,t,n)=>{n.d(t,{o:()=>f});var r=n(46106),l=n(12115),o=n(5909),i=n(53277);function u(e){if(!l.isValidElement(e))return null;let t=e.props;return((0,i._)(19)?t?.ref:e.ref)??null}var s=n(30656),a=n(57445),c=n(47936);function f(e,t,n={}){let i=t.render,p=function(e,t={}){var n;let{className:r,style:l,render:i}=e,{state:f=a.t0,ref:d,props:p,stateAttributesMapping:h,enabled:g=!0}=t,m=g?"function"==typeof r?r(f):r:void 0,v=g?"function"==typeof l?l(f):l:void 0,y=g?function(e,t){let n={};for(let r in e){let l=e[r];if(t?.hasOwnProperty(r)){let e=t[r](l);null!=e&&Object.assign(n,e);continue}!0===l?n[`data-${r.toLowerCase()}`]="":l&&(n[`data-${r.toLowerCase()}`]=l.toString())}return n}(f,h):a.t0,b=g&&p?Array.isArray(n=p)?(0,c.lZ)(n):(0,c.v6)(void 0,n):void 0,x=g?(0,s.r)(y,b)??{}:a.t0;return("u">typeof document&&(g?Array.isArray(d)?x.ref=(0,o.U)([x.ref,u(i),...d]):x.ref=(0,o.a)(x.ref,u(i),d):(0,o.a)(null,null)),g)?(void 0!==m&&(x.className=(0,c.VN)(x.className,m)),void 0!==v&&(x.style=(0,s.r)(x.style,v)),x):a.t0}(t,n);return!1===n.enabled?null:function(e,t,n,o){if(t){if("function"==typeof t)return t(n,o);let e=(0,c.v6)(n,t.props);e.ref=n.ref;let r=t;return r?.$$typeof===d&&(r=l.Children.toArray(t)[0]),l.cloneElement(r,e)}if(e&&"string"==typeof e){var i,u;return i=e,u=n,"button"===i?(0,l.createElement)("button",{type:"button",...u,key:u.key}):"img"===i?(0,l.createElement)("img",{alt:"",...u,key:u.key}):l.createElement(i,u)}throw Error((0,r.A)(8))}(e,i,p,n.state??a.t0)}let d=Symbol.for("react.lazy")},57162:(e,t,n)=>{n.d(t,{Ev:()=>a,Go:()=>s,O_:()=>o,Pg:()=>u,YF:()=>i,jo:()=>l});var r=n(98221);function l(e){e.preventDefault(),e.stopPropagation()}function o(e){return"nativeEvent"in e}function i(e){return""===e.pointerType&&!!e.isTrusted||(r.m0&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}function u(e){return!r.KT&&(!r.m0&&0===e.width&&0===e.height||r.m0&&1===e.width&&1===e.height&&0===e.pressure&&0===e.detail&&"mouse"===e.pointerType||e.width<1&&e.height<1&&0===e.pressure&&0===e.detail&&"touch"===e.pointerType)}function s(e,t){let n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function a(e){let t=e.type;return"click"===t||"mousedown"===t||"keydown"===t||"keyup"===t}},57445:(e,t,n)=>{function r(){}n.d(t,{Ml:()=>l,t0:()=>o,tE:()=>r});let l=Object.freeze([]),o=Object.freeze({})},58014:(e,t,n)=>{n.d(t,{K2:()=>r,Kd:()=>l,uD:()=>o,z_:()=>i});let r={style:{transition:"none"}},l="data-base-ui-click-trigger",o={fallbackAxisSide:"none"},i={clipPath:"inset(50%)",position:"fixed",top:0,left:0}},61001:(e,t,n)=>{n.d(t,{K:()=>m});var r=n(6791),l=n(88481),o=n(98221),i=n(6751),u=n(21171),s=n(43110),a=n(99672),c=n(57445);let f={},d={},p="";class h{acquire(e){return this.lockCount+=1,1===this.lockCount&&null===this.restore&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}lock(e){let t,n,u,s,h;if(0===this.lockCount||null!==this.restore)return;let g=(0,i.R)(e).documentElement,m=(0,r.zk)(g).getComputedStyle(g).overflowY;if("hidden"===m||"clip"===m){this.restore=c.tE;return}let v=o.un||!function(e){if("u"<typeof document)return!1;let t=(0,i.R)(e);return(0,r.zk)(t).innerWidth-t.documentElement.clientWidth>0}(e);this.restore=v?(n=(t=(0,i.R)(e)).documentElement,u=t.body,h={overflowY:(s=(0,r.ZU)(n)?n:u).style.overflowY,overflowX:s.style.overflowX},Object.assign(s.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(s.style,h)}):function(e){let t=(0,i.R)(e),n=t.documentElement,u=t.body,s=(0,r.zk)(n),c=0,h=0,g=!1,m=a.K.create();if(o.Tc&&(s.visualViewport?.scale??1)!==1)return()=>{};function v(){let t=s.getComputedStyle(n),l=s.getComputedStyle(u),o=(t.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";c=n.scrollTop,h=n.scrollLeft,f={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},p=n.style.scrollBehavior,d={position:u.style.position,height:u.style.height,width:u.style.width,boxSizing:u.style.boxSizing,overflowY:u.style.overflowY,overflowX:u.style.overflowX,scrollBehavior:u.style.scrollBehavior};let a=n.scrollHeight>n.clientHeight,m=n.scrollWidth>n.clientWidth,v="scroll"===t.overflowY||"scroll"===l.overflowY,y="scroll"===t.overflowX||"scroll"===l.overflowX,b=Math.max(0,s.innerWidth-u.clientWidth),x=Math.max(0,s.innerHeight-u.clientHeight),w=parseFloat(l.marginTop)+parseFloat(l.marginBottom),R=parseFloat(l.marginLeft)+parseFloat(l.marginRight),E=(0,r.ZU)(n)?n:u;if(g=function(e){if(!("u">typeof CSS&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||"u"<typeof document)return!1;let t=(0,i.R)(e),n=t.documentElement,l=t.body,o=(0,r.ZU)(n)?n:l,u=o.style.overflowY,s=n.style.scrollbarGutter;n.style.scrollbarGutter="stable",o.style.overflowY="scroll";let a=o.offsetWidth;o.style.overflowY="hidden";let c=o.offsetWidth;return o.style.overflowY=u,n.style.scrollbarGutter=s,a===c}(e)){n.style.scrollbarGutter=o,E.style.overflowY="hidden",E.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:o,overflowY:"hidden",overflowX:"hidden"}),(a||v)&&(n.style.overflowY="scroll"),(m||y)&&(n.style.overflowX="scroll"),Object.assign(u.style,{position:"relative",height:w||x?`calc(100dvh - ${w+x}px)`:"100dvh",width:R||b?`calc(100vw - ${R+b}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),u.scrollTop=c,u.scrollLeft=h,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function y(){Object.assign(n.style,f),Object.assign(u.style,d),g||(n.scrollTop=c,n.scrollLeft=h,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=p)}v();let b=(0,l.q)(s,"resize",function(){y(),m.request(v)});return()=>{m.cancel(),y(),"function"==typeof s.removeEventListener&&b()}}(e)}constructor(){this.lockCount=0,this.restore=null,this.timeoutLock=s.E.create(),this.timeoutUnlock=s.E.create(),this.release=()=>{this.lockCount-=1,0===this.lockCount&&this.restore&&this.timeoutUnlock.start(0,this.unlock)},this.unlock=()=>{0===this.lockCount&&this.restore&&(this.restore?.(),this.restore=null)}}}let g=new h;function m(e=!0,t=null){(0,u.g)(()=>{if(e)return g.acquire(t)},[e,t])}},62172:(e,t,n)=>{n.d(t,{Ls:()=>h,CN:()=>m,tr:()=>y,l$:()=>b,i6:()=>x,xs:()=>w,Nj:()=>g,L_:()=>v});var r=n(12115),l=n(57445),o=n(63358),i=n(63987),u=n(21171),s=n(41835),a=n(31823),c=n(6791),f=n(70531),d=n(25981),p=n(20363);let h={tabIndex:-1,[s.Ed]:""};function g(e,t,n=!1){let l=(0,o.B)(),i=null!=(0,a.R1)(),s=r.useRef(null);void 0===e&&null===s.current&&(s.current=t(l,i));let d=e??s.current;return!function(e){let{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:l,floatingId:o,nested:i,onOpenChange:s}=e,a=t.useState("open"),d=t.useState("activeTriggerElement"),p=t.useState(n?"popupElement":"positionerElement"),h=t.context.triggerElements,g=r.useRef(null);void 0===l&&null===g.current&&(g.current=new f.K({open:a,transitionStatus:void 0,referenceElement:d,floatingElement:p,triggerElements:h,onOpenChange:s,floatingId:o,syncOnly:!0,nested:i}));let m=l??g.current;t.useSyncedValue("floatingId",o),(0,u.g)(()=>{let e={open:a,floatingId:o,referenceElement:d,floatingElement:p};(0,c.vq)(d)&&(e.domReferenceElement=d),m.state.positionReference===m.state.referenceElement&&(e.positionReference=d),m.update(e)},[a,o,d,p,m]),m.context.onOpenChange=s,m.context.nested=i}({popupStore:d,treatPopupAsFloatingElement:n,floatingRootContext:d.state.floatingRootContext,floatingId:l,nested:i,onOpenChange:d.setOpen}),{store:d,internalStore:s.current}}function m(e,t,n){let r=n?.id??null;(r||t)&&(e.activeTriggerId=r,e.activeTriggerElement=n??null)}function v(e,t,n,l){let o,s,a=n.useState("isMountedByTrigger",e),c=(o=r.useRef(null),s=r.useRef(null),r.useCallback(t=>{if(void 0===e)return;let r=!1;if(null!==o.current){let e=o.current,t=s.current,l=n.context.triggerElements.getById(e);t&&l===t&&(n.context.triggerElements.delete(e),r=!0),o.current=null,s.current=null}if(null!==t&&(o.current=e,s.current=t,n.context.triggerElements.add(e,t),r=!0),r){let e=n.context.triggerElements.size;n.select("open")&&n.state.triggerCount!==e&&n.set("triggerCount",e)}},[n,e])),f=(0,i.K)(t=>{if(c(t),!t)return;let r=n.select("open"),o=n.select("activeTriggerId");o===e?n.update({activeTriggerElement:t,...r?l:null}):null==o&&r&&n.update({activeTriggerId:e,activeTriggerElement:t,...l})});return(0,u.g)(()=>{a&&n.update({activeTriggerElement:t.current,...l})},[a,n,t,...Object.values(l)]),{registerTrigger:f,isMountedByThisTrigger:a}}function y(e){let t=e.useState("open"),n=e.useState("triggerCount");(0,u.g)(()=>{if(!t){0!==e.state.triggerCount&&e.set("triggerCount",0);return}let n=e.context.triggerElements.size,r={};if(e.state.triggerCount!==n&&(r.triggerCount=n),!e.select("activeTriggerId")&&1===n){let t=e.context.triggerElements.entries().next();if(!t.done){let[e,n]=t.value;r.activeTriggerId=e,r.activeTriggerElement=n}}(void 0!==r.triggerCount||void 0!==r.activeTriggerId)&&e.update(r)},[t,e,n])}function b(e,t,n){let{mounted:r,setMounted:l,transitionStatus:o}=(0,d.$)(e);t.useSyncedValues({mounted:r,transitionStatus:o});let u=(0,i.K)(()=>{l(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)}),s=t.useState("preventUnmountingOnClose");return(0,p.v)({enabled:r&&!e&&!s,open:e,ref:t.context.popupRef,onComplete(){e||u()}}),{forceUnmount:u,transitionStatus:o}}function x(e,t){e.useSyncedValues(t),(0,u.g)(()=>()=>{e.update({activeTriggerProps:l.t0,inactiveTriggerProps:l.t0,popupProps:l.t0})},[e])}function w(e,t){(0,u.g)(()=>{t||null===e.state.openMethod||e.set("openMethod",null)},[t,e]),(0,u.g)(()=>()=>{null!==e.state.openMethod&&e.set("openMethod",null)},[e])}},62749:(e,t,n)=>{n.d(t,{Y:()=>l});var r=n(53277);function l(e){return(0,r._)(19)?e:e?"true":void 0}},62955:(e,t,n)=>{n.d(t,{$4:()=>r,CM:()=>function e(t,n,r=!0){return t.filter(e=>e.parentId===n).flatMap(n=>[...!r||n.context?.open?[n]:[],...e(t,n.id,r)])}});function r(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}},63236:(e,t,n)=>{n.d(t,{X:()=>o});var r,l=n(12115);let o={...r||(r=n.t(l,2))}},63358:(e,t,n)=>{n.d(t,{B:()=>u});var r=n(12115),l=n(63236);let o=0,i=l.X.useId;function u(e,t){if(void 0!==i){let n=i();return e??(t?`${t}-${n}`:n)}return function(e,t="mui"){let[n,l]=r.useState(e),i=e||n;return r.useEffect(()=>{null==n&&(o+=1,l(`${t}-${o}`))},[n,t]),i}(e,t)}},63548:(e,t,n)=>{n.d(t,{T:()=>i});var r=n(54983),l=n(97370),o=n(26821);let i={id:(0,r.M)(e=>e.id),labelId:(0,r.M)(e=>e.labelId),modal:(0,r.M)(e=>e.modal),multiple:(0,r.M)(e=>e.multiple),items:(0,r.M)(e=>e.items),itemToStringLabel:(0,r.M)(e=>e.itemToStringLabel),itemToStringValue:(0,r.M)(e=>e.itemToStringValue),isItemEqualToValue:(0,r.M)(e=>e.isItemEqualToValue),value:(0,r.M)(e=>e.value),hasSelectedValue:(0,r.M)(e=>{let{value:t,multiple:n,itemToStringValue:r}=e;return null!=t&&(n&&Array.isArray(t)?t.length>0:""!==(0,o.T)(t,r))}),hasNullItemLabel:(0,r.M)((e,t)=>!!t&&(0,o.Dp)(e.items)),open:(0,r.M)(e=>e.open),mounted:(0,r.M)(e=>e.mounted),forceMount:(0,r.M)(e=>e.forceMount),transitionStatus:(0,r.M)(e=>e.transitionStatus),openMethod:(0,r.M)(e=>e.openMethod),activeIndex:(0,r.M)(e=>e.activeIndex),selectedIndex:(0,r.M)(e=>e.selectedIndex),isActive:(0,r.M)((e,t)=>e.activeIndex===t),isSelected:(0,r.M)((e,t,n)=>{let r=e.isItemEqualToValue,o=e.value;return e.multiple?Array.isArray(o)&&o.some(e=>(0,l.tl)(n,e,r)):e.selectedIndex===t&&null!==e.selectedIndex||(0,l.tl)(n,o,r)}),isSelectedByFocus:(0,r.M)((e,t)=>e.selectedIndex===t),popupProps:(0,r.M)(e=>e.popupProps),triggerProps:(0,r.M)(e=>e.triggerProps),triggerElement:(0,r.M)(e=>e.triggerElement),positionerElement:(0,r.M)(e=>e.positionerElement),listElement:(0,r.M)(e=>e.listElement),popupSide:(0,r.M)(e=>e.popupSide),scrollUpArrowVisible:(0,r.M)(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:(0,r.M)(e=>e.scrollDownArrowVisible),hasScrollArrows:(0,r.M)(e=>e.hasScrollArrows)}},63779:(e,t,n)=>{n.d(t,{CG:()=>o,hG:()=>s,iP:()=>i,ll:()=>u});var r=n(46106),l=n(12115);let o=l.createContext(null),i=l.createContext(null);function u(){let e=l.useContext(o);if(null===e)throw Error((0,r.A)(60));return e}function s(){let e=l.useContext(i);if(null===e)throw Error((0,r.A)(61));return e}},63987:(e,t,n)=>{n.d(t,{K:()=>u});var r=n(63236),l=n(45690);let o=r.X.useInsertionEffect,i=o&&o!==r.X.useLayoutEffect?o:e=>e();function u(e){let t=(0,l.j)(s).current;return t.next=e,i(t.effect),t.trampoline}function s(){let e={next:void 0,callback:a,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function a(){}},64364:(e,t,n)=>{n.d(t,{p:()=>o});var r=n(57445);let l=0;function o(e,t={}){let{preventScroll:n=!1,sync:i=!1,shouldFocus:u}=t;function s(){(!u||u())&&e?.focus({preventScroll:n})}if(cancelAnimationFrame(l),i)return s(),r.tE;let a=requestAnimationFrame(s);return l=a,()=>{l===a&&(cancelAnimationFrame(a),l=0)}}},65738:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(30772).A)("trash-2",[["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"}]])},67148:(e,t,n)=>{n.d(t,{s:()=>c});var r=n(12115),l=n(6791),o=n(63987),i=n(21171),u=n(47936),s=n(46106);let a=r.createContext(void 0);function c(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:l=0,native:d=!0,composite:p}=e,h=r.useRef(null),g=function(e=!1){let t=r.useContext(a);if(void 0===t&&!e)throw Error((0,s.A)(16));return t}(!0),m=p??void 0!==g,{props:v}=function(e){let{focusableWhenDisabled:t,disabled:n,composite:l=!1,tabIndex:o=0,isNativeButton:i}=e,u=l&&!1!==t,s=l&&!1===t;return{props:r.useMemo(()=>{let e={onKeyDown(e){n&&t&&"Tab"!==e.key&&e.preventDefault()}};return l||(e.tabIndex=o,!i&&n&&(e.tabIndex=t?o:-1)),(i&&(t||u)||!i&&n)&&(e["aria-disabled"]=n),i&&(!t||s)&&(e.disabled=n),e},[l,n,t,u,s,i,o])}}({focusableWhenDisabled:n,disabled:t,composite:m,tabIndex:l,isNativeButton:d}),y=r.useCallback(()=>{let e=h.current;f(e)&&m&&t&&void 0===v.disabled&&e.disabled&&(e.disabled=!1)},[t,v.disabled,m]);return(0,i.g)(y,[y]),{getButtonProps:r.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:l,onKeyDown:o,onPointerDown:i,...s}=e;return(0,u.v6)({onClick(e){t?e.preventDefault():n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){var r;if(t||((0,u.PT)(e),o?.(e),e.baseUIHandlerPrevented))return;let l=e.target===e.currentTarget,i=e.currentTarget,s=f(i),a=!d&&(r=i,!!(r?.tagName==="A"&&r?.href)),c=l&&(d?s:!a),p="Enter"===e.key,h=" "===e.key,g=i.getAttribute("role"),v=g?.startsWith("menuitem")||"option"===g||"gridcell"===g;if(l&&m&&h){if(e.defaultPrevented&&v)return;e.preventDefault(),a||d&&s?(i.click(),e.preventBaseUIHandler()):c&&(n?.(e),e.preventBaseUIHandler());return}c&&(!d&&(h||p)&&e.preventDefault(),!d&&p&&n?.(e))},onKeyUp(e){t||(((0,u.PT)(e),l?.(e),e.target===e.currentTarget&&d&&m&&f(e.currentTarget)&&" "===e.key)?e.preventDefault():!e.baseUIHandlerPrevented&&(e.target!==e.currentTarget||d||m||" "!==e.key||n?.(e)))},onPointerDown(e){t?e.preventDefault():i?.(e)}},d?{type:"button"}:{role:"button"},v,s)},[t,v,m,d]),buttonRef:(0,o.K)(e=>{h.current=e,y()})}}function f(e){return(0,l.sb)(e)&&"BUTTON"===e.tagName}},67564:(e,t,n)=>{n.d(t,{B:()=>d});var r=n(12115),l=n(63987),o=n(22531),i=n(63779),u=n(91187),s=n(55004),a=n(24178),c=n(78277),f=n(63548);let d=r.forwardRef(function(e,t){let{render:n,className:r,style:d,...p}=e,{store:h,scrollHandlerRef:g}=(0,i.ll)(),{alignItemWithTriggerActive:m}=(0,u.H)(),v=(0,o.P)(h,f.T.hasScrollArrows),y=(0,o.P)(h,f.T.openMethod),b=(0,o.P)(h,f.T.multiple),x=(0,o.P)(h,f.T.id),w={id:`${x}-list`,role:"listbox","aria-multiselectable":b||void 0,onScroll(e){g.current?.(e.currentTarget)},...m&&{style:c.O},className:v&&"touch"!==y?a.E.className:void 0},R=(0,l.K)(e=>{h.set("listElement",e)});return(0,s.o)("div",e,{ref:[t,R],props:[w,p]})})},67994:(e,t,n)=>{n.d(t,{H:()=>a});var r=n(12115),l=n(82647),o=n(22531),i=n(63987),u=n(21171),s=n(57445);class a extends l.i{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){r.useDebugValue(e);let n=this;(0,u.g)(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){let n=this;(0,u.g)(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this,n=Object.values(e);(0,u.g)(()=>{t.update(e)},[t,...n])}useControlledProp(e,t){r.useDebugValue(e);let n=this,l=void 0!==t;(0,u.g)(()=>{l&&!Object.is(n.state[e],t)&&n.setState({...n.state,[e]:t})},[n,e,t,l])}select(e,t,n,r){return(0,this.selectors[e])(this.state,t,n,r)}useState(e,t,n,l){return r.useDebugValue(e),(0,o.P)(this,this.selectors[e],t,n,l)}useContextCallback(e,t){r.useDebugValue(e);let n=(0,i.K)(t??s.tE);this.context[e]=n}useStateSetter(e){let t=r.useRef(void 0);return void 0===t.current&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n,r=(n="function"==typeof e?e:this.selectors[e])(this.state);return t(r,r,this),this.subscribe(e=>{let l=n(e);if(!Object.is(r,l)){let e=r;r=l,t(l,e,this)}})}}},69505:(e,t,n)=>{n.d(t,{G:()=>i,z:()=>o});var r=n(46106),l=n(12115);let o=l.createContext(void 0);function i(){let e=l.useContext(o);if(!e)throw Error((0,r.A)(57));return e}},70531:(e,t,n)=>{n.d(t,{K:()=>u});var r=n(54983),l=n(67994),o=n(57162);let i={open:(0,r.M)(e=>e.open),transitionStatus:(0,r.M)(e=>e.transitionStatus),domReferenceElement:(0,r.M)(e=>e.domReferenceElement),referenceElement:(0,r.M)(e=>e.positionReference??e.referenceElement),floatingElement:(0,r.M)(e=>e.floatingElement),floatingId:(0,r.M)(e=>e.floatingId)};class u extends l.H{constructor(e){const{syncOnly:t,nested:n,onOpenChange:r,triggerElements:l,...o}=e;super({...o,positionReference:o.referenceElement,domReferenceElement:o.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:function(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}(),nested:n,triggerElements:l},i),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||null!=t&&(0,o.Ev)(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)};dispatchOpenChange=(e,t)=>{this.syncOpenEvent(e,t.event);let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit("openchange",n)};setOpen=(e,t)=>{this.syncOnly||this.dispatchOpenChange(e,t),this.context.onOpenChange?.(e,t)}}},70826:(e,t,n)=>{n.d(t,{t:()=>V});var r=n(12115),l=n(92681),o=n(88481),i=n(98221),u=n(63987),s=n(6751),a=n(6791),c=n(21171),f=n(22531),d=n(99672),p=n(95491),h=n(79538),g=n(63779),m=n(47843),v=n(91187),y=n(24178),b=n(42075),x=n(20363),w=n(55004),R=n(63548),E=n(78277),S=n(50812),T=n(90278),M=n(46106);let k=r.createContext(void 0);var C=n(35188),A=n(84268),P=n(18504),I=n(85965);let O=r.createContext(void 0),q={disableStyleElements:!1};var j=n(76893),D=n(95155);let L={...m.GW,...b.G},V=r.forwardRef(function(e,t){let{render:n,className:l,style:h,finalFocus:m,...b}=e,{store:V,popupRef:B,onOpenChangeComplete:W,setOpen:U,valueRef:z,firstItemTextRef:_,selectedItemTextRef:Y,keyboardActiveRef:X,multiple:J,handleScrollArrowVisibility:G,scrollHandlerRef:Z,listRef:Q,highlightItemOnHover:ee}=(0,g.ll)(),{side:et,align:en,alignItemWithTriggerActive:er,isPositioned:el,setControlledAlignItemWithTrigger:eo,scrollDownArrowRef:ei,scrollUpArrowRef:eu}=(0,v.H)(),es=null!=function(e){let t=r.useContext(k);if(void 0===t&&!e)throw Error((0,M.A)(69));return t}(!0),ea=(0,g.hG)(),ec=(0,j.j)(),{nonce:ef,disableStyleElements:ed}=r.useContext(O)??q,ep=(0,f.P)(V,R.T.id),eh=(0,f.P)(V,R.T.open),eg=(0,f.P)(V,R.T.mounted),em=(0,f.P)(V,R.T.popupProps),ev=(0,f.P)(V,R.T.transitionStatus),ey=(0,f.P)(V,R.T.triggerElement),eb=(0,f.P)(V,R.T.positionerElement),ex=(0,f.P)(V,R.T.listElement),ew=r.useRef(!1),eR=r.useRef(!1),eE=r.useRef({}),eS=(0,d.N)(),eT=(0,u.K)(e=>{var t;if(!eb||!B.current||!eR.current)return;if(ew.current||!er)return void G();let n="0px"===eb.style.top,r="0px"===eb.style.bottom;if(!n&&!r)return void G();let l=N(eb),o=(t=eb.getBoundingClientRect().height,t/l.y),i=(0,s.R)(eb),u=getComputedStyle(eb),a=parseFloat(u.marginTop),c=parseFloat(u.marginBottom),f=F(getComputedStyle(B.current)),d=Math.min(i.documentElement.clientHeight-a-c,f),p=e.scrollTop,h=H(e),g=0,m=null,v=!1,y=!1,b=e=>{eb.style.height=`${e}px`},x=n?h-p:p,w=Math.min(o+x,d);if(g=w,x<=I.Pv){let t;return void((t=(0,P.q)(x,0,d-o))>0&&b(o+t),e.scrollTop=n?h:0,d-(o+t)<=I.Pv&&(ew.current=!0),G())}if(d-w>I.Pv)n?y=!0:m=0;else if(v=!0,r&&p<h){let e=o+x-d;m=p-(x-e)}if(0!==(g=Math.ceil(g))&&b(g),y||null!=m){let t=H(e),n=y?t:(0,P.q)(m,0,t);Math.abs(e.scrollTop-n)>I.Pv&&(e.scrollTop=n)}(v||g>=d-I.Pv)&&(ew.current=!0),G()});r.useImperativeHandle(Z,()=>eT,[eT]),(0,x.v)({open:eh,ref:B,onComplete(){eh&&W?.(!0)}}),(0,c.g)(()=>{eb&&B.current&&!Object.keys(eE.current).length&&(eE.current={top:eb.style.top||"0",left:eb.style.left||"0",right:eb.style.right,height:eb.style.height,bottom:eb.style.bottom,minHeight:eb.style.minHeight,maxHeight:eb.style.maxHeight,marginTop:eb.style.marginTop,marginBottom:eb.style.marginBottom})},[B,eb]),(0,c.g)(()=>{eh||er||(eR.current=!1,ew.current=!1,(0,E.Y)(eb,eE.current))},[eh,er,eb,B]),(0,c.g)(()=>{let e=B.current;if(!eh||!ey||!eb||!e||er&&!el||"ending"===V.state.transitionStatus)return;if(!er){eR.current=!0,eS.request(G),e.style.removeProperty("--transform-origin");return}let t=function(e){let{style:t}=e,n={};for(let[e,r]of $)n[e]=t.getPropertyValue(e),t.setProperty(e,r,"important");return()=>{for(let[e]of $){let r=n[e];r?t.setProperty(e,r):t.removeProperty(e)}}}(e);e.style.removeProperty("--transform-origin");try{let t,n=Y.current;n?.isConnected||(n=!R.T.hasSelectedValue(V.state)&&_.current?.isConnected?_.current:null);let r=z.current,l=getComputedStyle(eb),o=getComputedStyle(e),u=(0,s.R)(ey),c=(0,a.zk)(eb),f=N(ey),d=K(ey.getBoundingClientRect(),f),p=K(eb.getBoundingClientRect(),f),h=d.height,g=ex||e,m=g.scrollHeight,v=parseFloat(o.borderBottomWidth),y=parseFloat(l.marginTop)||10,b=parseFloat(l.marginBottom)||10,x=parseFloat(l.minHeight)||100,w=F(o),S=u.documentElement.clientHeight-y-b,T=u.documentElement.clientWidth,M=S-d.bottom+h,k="rtl"===ec?d.right-p.width:d.left,C=0;if(n&&r){let e=K(r.getBoundingClientRect(),f);t=K(n.getBoundingClientRect(),f),k=p.left+("rtl"===ec?e.right-t.right:e.left-t.left);let l=e.top-d.top+e.height/2;C=t.top-p.top+t.height/2-l}let A=M+C+b+v,O=Math.min(S,A),q=S-y-b,j=A-O;eb.style.left=`${(0,P.q)(k,5,T-5-p.width)}px`,eb.style.height=`${O}px`,eb.style.maxHeight="auto",eb.style.marginTop=`${y}px`,eb.style.marginBottom=`${b}px`,e.style.height="100%";let D=H(g),L=j>=D-I.Pv;L&&(O=Math.min(S,p.height)-(j-D));let $=d.top<20||d.bottom>S-20||Math.ceil(O)+I.Pv<Math.min(m,x),B=(c.visualViewport?.scale??1)!==1&&i.Tc;if($||B){eR.current=!0,(0,E.Y)(eb,eE.current),eo(!1);return}let W=Math.max(x,O);if(L){let e=Math.max(0,S-A);eb.style.top=p.height>=q?"0":`${e}px`,eb.style.height=`${O}px`,g.scrollTop=H(g)}else eb.style.bottom="0",g.scrollTop=j;if(t){let n=p.top,r=p.height,l=t.top+t.height/2,o=(0,P.q)(r>0?(l-n)/r*100:50,0,100);e.style.setProperty("--transform-origin",`50% ${o}%`)}(W===S||O>=w)&&(ew.current=!0),G(),ee&&null===V.state.selectedIndex&&null===V.state.activeIndex&&null!=Q.current[0]&&V.set("activeIndex",0),eR.current=!0}finally{t()}},[V,eh,eb,ey,z,_,Y,B,G,er,eo,eS,ei,eu,ex,Q,ee,ec,el]),r.useEffect(()=>{if(!er||!eb||!eh)return;let e=(0,a.zk)(eb);return(0,o.q)(e,"resize",function(e){U(!1,(0,S.d)(T.L5,e))})},[U,er,eb,eh]);let eM={...ex?{role:"presentation","aria-orientation":void 0}:{role:"listbox","aria-multiselectable":J||void 0,id:`${ep}-list`},onKeyDown(e){X.current=!0,es&&C.jF.has(e.key)&&e.stopPropagation()},onMouseMove(){X.current=!1},onScroll(e){ex||eT(e.currentTarget)},...er&&{style:ex?{height:"100%"}:E.O}},ek=(0,w.o)("div",e,{ref:[t,B],state:{open:eh,transitionStatus:ev,side:et,align:en},stateAttributesMapping:L,props:[em,eM,(0,A.d)(ev),{className:!ex&&er?y.E.className:void 0},b]});return(0,D.jsxs)(r.Fragment,{children:[!ed&&y.E.getElement(ef),(0,D.jsx)(p.s,{context:ea,modal:!1,disabled:!eg,returnFocus:m,restoreFocus:!0,children:ek})]})});function F(e){let t=e.maxHeight||"";return t.endsWith("px")&&parseFloat(t)||1/0}function H(e){return(0,I.XF)(e.scrollHeight,e.clientHeight)}function N(e){return h.iD.getScale(e)}function K(e,t){return(0,l.B1)({x:e.x/t.x,y:e.y/t.y,width:e.width/t.x,height:e.height/t.y})}let $=[["transform","none"],["scale","1"],["translate","0 0"]]},71003:(e,t,n)=>{n.d(t,{f:()=>h});var r=n(12115),l=n(43110),o=n(22531),i=n(21171),u=n(63779),s=n(91187),a=n(25981),c=n(20363),f=n(55004),d=n(85965),p=n(63548);let h=r.forwardRef(function(e,t){let{render:n,className:r,style:h,direction:g,keepMounted:m=!1,...v}=e,y="up"===g,{store:b,popupRef:x,listRef:w,handleScrollArrowVisibility:R,scrollArrowsMountedCountRef:E}=(0,u.ll)(),{side:S,scrollDownArrowRef:T,scrollUpArrowRef:M}=(0,s.H)(),k=y?p.T.scrollUpArrowVisible:p.T.scrollDownArrowVisible,C=(0,o.P)(b,k),A=(0,o.P)(b,p.T.openMethod),P=C&&"touch"!==A,I=(0,l.Z)(),O=y?M:T,{transitionStatus:q,setMounted:j}=(0,a.$)(P);(0,i.g)(()=>(E.current+=1,b.state.hasScrollArrows||b.set("hasScrollArrows",!0),()=>{E.current=Math.max(0,E.current-1),0===E.current&&b.state.hasScrollArrows&&b.set("hasScrollArrows",!1)}),[b,E]),(0,c.v)({open:P,ref:O,onComplete(){P||j(!1)}});let D=(0,f.o)("div",e,{ref:[t,O],state:{direction:g,visible:P,side:S,transitionStatus:q},props:[{"aria-hidden":!0,children:y?"▲":"▼",style:{position:"absolute"},onMouseMove(e){0===e.movementX&&0===e.movementY||I.isStarted()||(b.set("activeIndex",null),I.start(40,function e(){let t=b.state.listElement??x.current;if(!t)return;b.set("activeIndex",null),R();let n=(0,d.XF)(t.scrollHeight,t.clientHeight),r=(0,d.Qw)(t.scrollTop,n),l=r===(y?0:n),o=w.current;if(r!==t.scrollTop&&(t.scrollTop=r),0===o.length&&b.set(y?"scrollUpArrowVisible":"scrollDownArrowVisible",!l),l)return void I.clear();if(o.length>0){let e=O.current?.offsetHeight||0;t.scrollTop=function(e,t,n,r,l,o){if(t){let t=0,r=n+l-d.Pv;for(let n=0;n<e.length;n+=1){let l=e[n];if(l&&l.offsetTop>=r){t=n;break}}let i=Math.max(0,t-1),u=e[i];return i<t&&u?(0,d.Qw)(u.offsetTop-l,o):0}let i=e.length-1,u=n+r-l+d.Pv;for(let t=0;t<e.length;t+=1){let n=e[t];if(n&&n.offsetTop+n.offsetHeight>u){i=Math.max(0,t-1);break}}let s=Math.min(e.length-1,i+1),a=e[s];return s>i&&a?(0,d.Qw)(a.offsetTop+a.offsetHeight-r+l,o):o}(o,y,r,t.clientHeight,e,n)}I.start(40,e)}))},onMouseLeave(){I.clear()}},v]});return P||m?D:null})},71045:(e,t,n)=>{n.d(t,{AO:()=>p,Kr:()=>g,N:()=>x,Qp:()=>b,XJ:()=>y,nq:()=>h,vF:()=>v,yV:()=>w});var r=n(6791),l=n(6751),o=n(28823),i=n(93965);function u(e){for(let t of Array.from(e.children))if("summary"===(0,r.mq)(t))return t;return null}function s(e){let t=e?(0,r.mq)(e):"";return null!=e&&e.matches('a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]')&&("summary"!==t||null!=e.parentElement&&"details"===(0,r.mq)(e.parentElement)&&u(e.parentElement)===e)&&("details"!==t||null==u(e))&&("input"!==t||"hidden"!==e.type)}function a(e){if(!s(e)||!e.isConnected||e.matches(":disabled"))return!1;for(let t=e;t;t=function(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return(0,r.Ng)(n)?n.host:null}(t)){let n=t!==e,l="slot"===(0,r.mq)(t);if(t.hasAttribute("inert")||n&&"details"===(0,r.mq)(t)&&!t.open&&!function(e,t){let n=u(t);return!!n&&(e===n||(0,o.gR)(n,e))}(e,t)||t.hasAttribute("hidden")||!l&&!function(e,t){let n=(0,r.L9)(e);return t?"none"!==n.display:(0,i.J9)(e,n)}(t,n))return!1}return!0}function c(e){let t=e.tabIndex;if(t<0){let t=(0,r.mq)(e);if("details"===t||"audio"===t||"video"===t||(0,r.sb)(e)&&e.isContentEditable)return 0}return t}function f(e){return"input"!==(0,r.mq)(e)?null:"radio"===e.type&&""!==e.name?e:null}function d(e){if((0,r.sb)(e)&&"slot"===(0,r.mq)(e)){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return(0,r.sb)(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function p(e){return a(e)&&c(e)>=0}function h(e){let t=[];return!function e(t,n){d(t).forEach(t=>{s(t)&&n.push(t),e(t,n)})}(e,t),t.filter(a)}function g(e){let t=h(e);return t.filter(e=>c(e)>=0&&function(e,t){let n=f(e);if(!n)return!0;let r=t.find(e=>{let t=f(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=f(e);return t?.name===n.name&&t.form===n.form})===n}(e,t))}function m(e,t){let n=g(e),r=n.length;if(0===r)return;let i=(0,o.RS)((0,l.R)(e)),u=n.indexOf(i);return n[-1===u?1===t?0:r-1:u+t]}function v(e){return m((0,l.R)(e).body,1)||e}function y(e){return m((0,l.R)(e).body,-1)||e}function b(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!(0,o.gR)(n,r)}function x(e){g(e).forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")})}function w(e){let t=[];!function e(t,n,l){d(t).forEach(t=>{(0,r.sb)(t)&&t.matches(n)&&l.push(t),e(t,n,l)})}(e,"[data-tabindex]",t),t.forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")})}},71542:(e,t,n)=>{n.d(t,{F:()=>r});function r(e){return`data-base-ui-${e}`}},72218:(e,t,n)=>{n.d(t,{$u:()=>u,F2:()=>o,WZ:()=>s,nd:()=>a,tZ:()=>i});var r=n(6791),l=n(41835);function o(e,t){return null!=t&&("composedPath"in e?e.composedPath().includes(t):null!=e.target&&t.contains(e.target))}function i(e){return e.matches("html,body")}function u(e){return(0,r.sb)(e)&&e.matches(l.BT)}function s(e){return!!e&&"combobox"===e.getAttribute("role")&&u(e)}function a(e){return e?e.hasAttribute(l.Ed)?e:e.querySelector(`[${l.Ed}]`)||e:null}},72668:(e,t,n)=>{n.d(t,{Z:()=>r});class r{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(e,t){let n=this.idMap.get(e);n!==t&&(void 0!==n&&this.elementsSet.delete(n),this.elementsSet.add(t),this.idMap.set(e,t))}delete(e){let t=this.idMap.get(e);t&&(this.elementsSet.delete(t),this.idMap.delete(e))}hasElement(e){return this.elementsSet.has(e)}hasMatchingElement(e){for(let t of this.elementsSet)if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}}},73321:(e,t,n)=>{var r=n(74645);n.o(r,"usePathname")&&n.d(t,{usePathname:function(){return r.usePathname}}),n.o(r,"useRouter")&&n.d(t,{useRouter:function(){return r.useRouter}})},74649:(e,t,n)=>{n.d(t,{XF:()=>E,vB:()=>w});var r=n(12115),l=n(47650),o=n(6791),i=n(88481),u=n(681),s=n(63358),a=n(21171),c=n(63987),f=n(57445),d=n(18381),p=n(71045),h=n(50812),g=n(90278),m=n(71542),v=n(55004),y=n(58014),b=n(95155);let x=r.createContext(null),w=()=>r.useContext(x),R=(0,m.F)("portal"),E=r.forwardRef(function(e,t){let{render:n,className:m,style:E,children:S,container:T,renderGuards:M,...k}=e,{portalNode:C,portalSubtree:A}=function(e={}){let{ref:t,container:n,componentProps:i=f.t0,elementProps:u}=e,d=(0,s.B)(),p=w(),h=p?.portalNode,[g,m]=r.useState(null),[y,b]=r.useState(null),x=(0,c.K)(e=>{null!==e&&b(e)}),E=r.useRef(null);(0,a.g)(()=>{if(null===n){E.current&&(E.current=null,b(null),m(null));return}if(null==d)return;let e=(n&&((0,o.Ll)(n)?n:n.current))??h??document.body;if(null==e){E.current&&(E.current=null,b(null),m(null));return}E.current!==e&&(E.current=e,b(null),m(e))},[n,h,d]);let S=(0,v.o)("div",i,{ref:[t,x],props:[{id:d,[R]:""},u]});return{portalNode:y,portalSubtree:g&&S?l.createPortal(S,g):null}}({container:T,ref:t,componentProps:e,elementProps:k}),P=r.useRef(null),I=r.useRef(null),O=r.useRef(null),q=r.useRef(null),[j,D]=r.useState(null),L=r.useRef(!1),V=j?.modal,F=j?.open,H="boolean"==typeof M?M:!!j&&!j.modal&&j.open&&!!C;r.useEffect(()=>{if(C&&!V)return(0,u.g)((0,i.q)(C,"focusin",e,!0),(0,i.q)(C,"focusout",e,!0));function e(e){C&&e.relatedTarget&&(0,p.Qp)(e)&&("focusin"===e.type?L.current&&((0,p.yV)(C),L.current=!1):((0,p.N)(C),L.current=!0))}},[C,V]),r.useEffect(()=>{C&&!1===F&&((0,p.yV)(C),L.current=!1)},[F,C]);let N=r.useMemo(()=>({beforeOutsideRef:P,afterOutsideRef:I,beforeInsideRef:O,afterInsideRef:q,portalNode:C,setFocusManagerState:D}),[C]);return(0,b.jsxs)(r.Fragment,{children:[A,(0,b.jsxs)(x.Provider,{value:N,children:[H&&C&&(0,b.jsx)(d.U,{"data-type":"outside",ref:P,onFocus:e=>{if((0,p.Qp)(e,C))O.current?.focus();else{let e=j?j.domReference:null,t=(0,p.XJ)(e);t?.focus()}}}),H&&C&&(0,b.jsx)("span",{"aria-owns":C.id,style:y.z_}),C&&l.createPortal(S,C),H&&C&&(0,b.jsx)(d.U,{"data-type":"outside",ref:I,onFocus:e=>{if((0,p.Qp)(e,C))q.current?.focus();else{let t=j?j.domReference:null,n=(0,p.vF)(t);n?.focus(),j?.closeOnFocusOut&&j?.onOpenChange(!1,(0,h.d)(g.Xn,e.nativeEvent))}}})]})]})})},75681:(e,t,n)=>{n.d(t,{b:()=>M});var r=n(12115),l=n(6751),o=n(43110),i=n(63987),u=n(5909),s=n(81717),a=n(22531),c=n(63779),f=n(5102),d=n(37919),p=n(47843),h=n(52899),g=n(55004),m=n(63548),v=n(6791),y=n(72218),b=n(28823),x=n(47936),w=n(67148),R=n(50812),E=n(90278),S=n(44092);let T={...p.jL,...h.dc,popupSide:e=>e?{"data-popup-side":e}:null,value:()=>null},M=r.forwardRef(function(e,t){let{render:n,className:p,id:h,disabled:M=!1,nativeButton:k=!0,style:C,...A}=e,{setTouched:P,setFocused:I,validationMode:O,state:q,disabled:j}=(0,f.V$)(),{labelId:D}=(0,d.H)(),{store:L,setOpen:V,selectionRef:F,validation:H,readOnly:N,required:K,alignItemWithTriggerActiveRef:$,disabled:B,keyboardActiveRef:W}=(0,c.ll)(),U=j||B||M,z=(0,a.P)(L,m.T.open),_=(0,a.P)(L,m.T.mounted),Y=(0,a.P)(L,m.T.value),X=(0,a.P)(L,m.T.triggerProps),J=(0,a.P)(L,m.T.positionerElement),G=(0,a.P)(L,m.T.listElement),Z=(0,a.P)(L,m.T.popupSide),Q=(0,a.P)(L,m.T.id),ee=(0,a.P)(L,m.T.labelId),et=(0,a.P)(L,m.T.hasSelectedValue),en=_&&J?Z:null,er=h??Q;(0,S.l)({id:er});let el=(0,s.u)(J),eo=r.useRef(null),{getButtonProps:ei,buttonRef:eu}=(0,w.s)({disabled:U,native:k}),es=(0,i.K)(e=>{L.set("triggerElement",e)}),ea=(0,u.a)(t,eo,eu,es),ec=(0,o.Z)(),ef=(0,o.Z)(),ed=(0,o.Z)();r.useEffect(()=>{if(z)return ed.start(400,()=>{F.current.allowUnselectedMouseUp=!0,F.current.allowSelectedMouseUp=!0}),()=>{ed.clear()};F.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},ef.clear()},[z,F,ef,ed]);let ep=(0,x.v6)(X,{id:er,role:"combobox","aria-expanded":z?"true":"false","aria-haspopup":"listbox","aria-controls":z?G?.id??(0,y.nd)(J)?.id:void 0,"aria-labelledby":D??ee,"aria-readonly":N||void 0,"aria-required":K||void 0,tabIndex:U?-1:0,ref:ea,onFocus(e){I(!0),z&&$.current&&V(!1,(0,R.d)(E.dv,e.nativeEvent)),ec.start(0,()=>{L.set("forceMount",!0)})},onBlur(e){(0,b.gR)(J,e.relatedTarget)||(P(!0),I(!1),"onBlur"===O&&H.commit(Y))},onPointerMove(){W.current=!1},onKeyDown(){W.current=!0},onMouseDown(e){if(z)return;let t=(0,l.R)(e.currentTarget);function n(e){if(!eo.current)return;let t=e.target;if((0,b.gR)(eo.current,t)||(0,b.gR)(el.current,t)||t===eo.current)return;let n=function(e){let t=e.getBoundingClientRect(),n=(0,v.zk)(e),r=n.getComputedStyle(e,"::before"),l=n.getComputedStyle(e,"::after");if("none"===r.content&&"none"===l.content)return t;let o=parseFloat(r.width)||0,i=parseFloat(r.height)||0,u=parseFloat(l.width)||0,s=parseFloat(l.height)||0,a=Math.max(t.width,o,u),c=Math.max(t.height,i,s),f=a-t.width,d=c-t.height;return{left:t.left-f/2,right:t.right+f/2,top:t.top-d/2,bottom:t.bottom+d/2}}(eo.current);e.clientX>=n.left-2&&e.clientX<=n.right+2&&e.clientY>=n.top-2&&e.clientY<=n.bottom+2||V(!1,(0,R.d)(E.LO,e))}ef.start(0,()=>{t.addEventListener("mouseup",n,{once:!0})})}},H.getValidationProps,A,ei);ep.role="combobox";let eh={...q,open:z,disabled:U,value:Y,readOnly:N,popupSide:en,placeholder:!et};return(0,g.o)("button",e,{ref:[t,eo],state:eh,stateAttributesMapping:T,props:ep})})},76893:(e,t,n)=>{n.d(t,{j:()=>o});var r=n(12115);let l=r.createContext(void 0);function o(){let e=r.useContext(l);return e?.direction??"ltr"}},78277:(e,t,n)=>{function r(e,t){e&&Object.assign(e.style,t)}n.d(t,{O:()=>l,Y:()=>r});let l={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"}},79538:(e,t,n)=>{n.d(t,{ll:()=>k,rD:()=>j,UU:()=>P,jD:()=>O,ER:()=>q,cY:()=>C,iD:()=>T,BN:()=>A,Ej:()=>I});var r=n(92681);function l(e,t,n){let l,{reference:o,floating:i}=e,u=(0,r.TV)(t),s=(0,r.Dz)(t),a=(0,r.sq)(s),c=(0,r.C0)(t),f="y"===u,d=o.x+o.width/2-i.width/2,p=o.y+o.height/2-i.height/2,h=o[a]/2-i[a]/2;switch(c){case"top":l={x:d,y:o.y-i.height};break;case"bottom":l={x:d,y:o.y+o.height};break;case"right":l={x:o.x+o.width,y:p};break;case"left":l={x:o.x-i.width,y:p};break;default:l={x:o.x,y:o.y}}switch((0,r.Sg)(t)){case"start":l[s]-=h*(n&&f?-1:1);break;case"end":l[s]+=h*(n&&f?-1:1)}return l}async function o(e,t){var n;void 0===t&&(t={});let{x:l,y:o,platform:i,rects:u,elements:s,strategy:a}=e,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=(0,r._3)(t,e),g=(0,r.nI)(h),m=s[p?"floating"===d?"reference":"floating":d],v=(0,r.B1)(await i.getClippingRect({element:null==(n=await (null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await (null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:f,strategy:a})),y="floating"===d?{x:l,y:o,width:u.floating.width,height:u.floating.height}:u.reference,b=await (null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),x=await (null==i.isElement?void 0:i.isElement(b))&&await (null==i.getScale?void 0:i.getScale(b))||{x:1,y:1},w=(0,r.B1)(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:b,strategy:a}):y);return{top:(v.top-w.top+g.top)/x.y,bottom:(w.bottom-v.bottom+g.bottom)/x.y,left:(v.left-w.left+g.left)/x.x,right:(w.right-v.right+g.right)/x.x}}let i=async(e,t,n)=>{let{placement:r="bottom",strategy:i="absolute",middleware:u=[],platform:s}=n,a=s.detectOverflow?s:{...s,detectOverflow:o},c=await (null==s.isRTL?void 0:s.isRTL(t)),f=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:p}=l(f,r,c),h=r,g=0,m={};for(let n=0;n<u.length;n++){let o=u[n];if(!o)continue;let{name:v,fn:y}=o,{x:b,y:x,data:w,reset:R}=await y({x:d,y:p,initialPlacement:r,placement:h,strategy:i,middlewareData:m,rects:f,platform:a,elements:{reference:e,floating:t}});d=null!=b?b:d,p=null!=x?x:p,m[v]={...m[v],...w},R&&g<50&&(g++,"object"==typeof R&&(R.placement&&(h=R.placement),R.rects&&(f=!0===R.rects?await s.getElementRects({reference:e,floating:t,strategy:i}):R.rects),{x:d,y:p}=l(f,h,c)),n=-1)}return{x:d,y:p,placement:h,strategy:i,middlewareData:m}};function u(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function s(e){return r.r_.some(t=>e[t]>=0)}let a=new Set(["left","top"]);async function c(e,t){let{placement:n,platform:l,elements:o}=e,i=await (null==l.isRTL?void 0:l.isRTL(o.floating)),u=(0,r.C0)(n),s=(0,r.Sg)(n),c="y"===(0,r.TV)(n),f=a.has(u)?-1:1,d=i&&c?-1:1,p=(0,r._3)(t,e),{mainAxis:h,crossAxis:g,alignmentAxis:m}="number"==typeof p?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return s&&"number"==typeof m&&(g="end"===s?-1*m:m),c?{x:g*d,y:h*f}:{x:h*f,y:g*d}}var f=n(6791);function d(e){let t=(0,f.L9)(e),n=parseFloat(t.width)||0,l=parseFloat(t.height)||0,o=(0,f.sb)(e),i=o?e.offsetWidth:n,u=o?e.offsetHeight:l,s=(0,r.LI)(n)!==i||(0,r.LI)(l)!==u;return s&&(n=i,l=u),{width:n,height:l,$:s}}function p(e){return(0,f.vq)(e)?e:e.contextElement}function h(e){let t=p(e);if(!(0,f.sb)(t))return(0,r.Jx)(1);let n=t.getBoundingClientRect(),{width:l,height:o,$:i}=d(t),u=(i?(0,r.LI)(n.width):n.width)/l,s=(i?(0,r.LI)(n.height):n.height)/o;return u&&Number.isFinite(u)||(u=1),s&&Number.isFinite(s)||(s=1),{x:u,y:s}}let g=(0,r.Jx)(0);function m(e){let t=(0,f.zk)(e);return(0,f.Tc)()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:g}function v(e,t,n,l){var o;void 0===t&&(t=!1),void 0===n&&(n=!1);let i=e.getBoundingClientRect(),u=p(e),s=(0,r.Jx)(1);t&&(l?(0,f.vq)(l)&&(s=h(l)):s=h(e));let a=(void 0===(o=n)&&(o=!1),l&&(!o||l===(0,f.zk)(u))&&o)?m(u):(0,r.Jx)(0),c=(i.left+a.x)/s.x,d=(i.top+a.y)/s.y,g=i.width/s.x,v=i.height/s.y;if(u){let e=(0,f.zk)(u),t=l&&(0,f.vq)(l)?(0,f.zk)(l):l,n=e,r=(0,f._m)(n);for(;r&&l&&t!==n;){let e=h(r),t=r.getBoundingClientRect(),l=(0,f.L9)(r),o=t.left+(r.clientLeft+parseFloat(l.paddingLeft))*e.x,i=t.top+(r.clientTop+parseFloat(l.paddingTop))*e.y;c*=e.x,d*=e.y,g*=e.x,v*=e.y,c+=o,d+=i,n=(0,f.zk)(r),r=(0,f._m)(n)}}return(0,r.B1)({width:g,height:v,x:c,y:d})}function y(e,t){let n=(0,f.CP)(e).scrollLeft;return t?t.left+n:v((0,f.ep)(e)).left+n}function b(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-y(e,n),y:n.top+t.scrollTop}}function x(e,t,n){var l;let o;if("viewport"===t)o=function(e,t){let n=(0,f.zk)(e),r=(0,f.ep)(e),l=n.visualViewport,o=r.clientWidth,i=r.clientHeight,u=0,s=0;if(l){o=l.width,i=l.height;let e=(0,f.Tc)();(!e||e&&"fixed"===t)&&(u=l.offsetLeft,s=l.offsetTop)}let a=y(r);if(a<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),l="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(r.clientWidth-t.clientWidth-l);i<=25&&(o-=i)}else a<=25&&(o+=a);return{width:o,height:i,x:u,y:s}}(e,n);else if("document"===t){let t,n,i,u,s,a,c;l=(0,f.ep)(e),t=(0,f.ep)(l),n=(0,f.CP)(l),i=l.ownerDocument.body,u=(0,r.T9)(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),s=(0,r.T9)(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight),a=-n.scrollLeft+y(l),c=-n.scrollTop,"rtl"===(0,f.L9)(i).direction&&(a+=(0,r.T9)(t.clientWidth,i.clientWidth)-u),o={width:u,height:s,x:a,y:c}}else if((0,f.vq)(t)){let e,l,i,u,s,a;l=(e=v(t,!0,"fixed"===n)).top+t.clientTop,i=e.left+t.clientLeft,u=(0,f.sb)(t)?h(t):(0,r.Jx)(1),s=t.clientWidth*u.x,a=t.clientHeight*u.y,o={width:s,height:a,x:i*u.x,y:l*u.y}}else{let n=m(e);o={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return(0,r.B1)(o)}function w(e){return"static"===(0,f.L9)(e).position}function R(e,t){if(!(0,f.sb)(e)||"fixed"===(0,f.L9)(e).position)return null;if(t)return t(e);let n=e.offsetParent;return(0,f.ep)(e)===n&&(n=n.ownerDocument.body),n}function E(e,t){let n=(0,f.zk)(e);if((0,f.Tf)(e))return n;if(!(0,f.sb)(e)){let t=(0,f.$4)(e);for(;t&&!(0,f.eu)(t);){if((0,f.vq)(t)&&!w(t))return t;t=(0,f.$4)(t)}return n}let r=R(e,t);for(;r&&(0,f.Lv)(r)&&w(r);)r=R(r,t);return r&&(0,f.eu)(r)&&w(r)&&!(0,f.sQ)(r)?n:r||(0,f.gJ)(e)||n}let S=async function(e){let t=this.getOffsetParent||E,n=this.getDimensions,l=await n(e.floating);return{reference:function(e,t,n){let l=(0,f.sb)(t),o=(0,f.ep)(t),i="fixed"===n,u=v(e,!0,i,t),s={scrollLeft:0,scrollTop:0},a=(0,r.Jx)(0);if(l||!l&&!i)if(("body"!==(0,f.mq)(t)||(0,f.ZU)(o))&&(s=(0,f.CP)(t)),l){let e=v(t,!0,i,t);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else o&&(a.x=y(o));i&&!l&&o&&(a.x=y(o));let c=!o||l||i?(0,r.Jx)(0):b(o,s);return{x:u.left+s.scrollLeft-a.x-c.x,y:u.top+s.scrollTop-a.y-c.y,width:u.width,height:u.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:l.width,height:l.height}}},T={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:l,strategy:o}=e,i="fixed"===o,u=(0,f.ep)(l),s=!!t&&(0,f.Tf)(t.floating);if(l===u||s&&i)return n;let a={scrollLeft:0,scrollTop:0},c=(0,r.Jx)(1),d=(0,r.Jx)(0),p=(0,f.sb)(l);if((p||!p&&!i)&&(("body"!==(0,f.mq)(l)||(0,f.ZU)(u))&&(a=(0,f.CP)(l)),p)){let e=v(l);c=h(l),d.x=e.x+l.clientLeft,d.y=e.y+l.clientTop}let g=!u||p||i?(0,r.Jx)(0):b(u,a);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-a.scrollLeft*c.x+d.x+g.x,y:n.y*c.y-a.scrollTop*c.y+d.y+g.y}},getDocumentElement:f.ep,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:l,strategy:o}=e,i=[..."clippingAncestors"===n?(0,f.Tf)(t)?[]:function(e,t){let n=t.get(e);if(n)return n;let r=(0,f.v9)(e,[],!1).filter(e=>(0,f.vq)(e)&&"body"!==(0,f.mq)(e)),l=null,o="fixed"===(0,f.L9)(e).position,i=o?(0,f.$4)(e):e;for(;(0,f.vq)(i)&&!(0,f.eu)(i);){let t=(0,f.L9)(i),n=(0,f.sQ)(i);n||"fixed"!==t.position||(l=null),(o?n||l:!(!n&&"static"===t.position&&l&&("absolute"===l.position||"fixed"===l.position)||(0,f.ZU)(i)&&!n&&function e(t,n){let r=(0,f.$4)(t);return!(r===n||!(0,f.vq)(r)||(0,f.eu)(r))&&("fixed"===(0,f.L9)(r).position||e(r,n))}(e,i)))?l=t:r=r.filter(e=>e!==i),i=(0,f.$4)(i)}return t.set(e,r),r}(t,this._c):[].concat(n),l],u=x(t,i[0],o),s=u.top,a=u.right,c=u.bottom,d=u.left;for(let e=1;e<i.length;e++){let n=x(t,i[e],o);s=(0,r.T9)(n.top,s),a=(0,r.jk)(n.right,a),c=(0,r.jk)(n.bottom,c),d=(0,r.T9)(n.left,d)}return{width:a-d,height:c-s,x:d,y:s}},getOffsetParent:E,getElementRects:S,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:n}=d(e);return{width:t,height:n}},getScale:h,isElement:f.vq,isRTL:function(e){return"rtl"===(0,f.L9)(e).direction}};function M(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function k(e,t,n,l){let o;void 0===l&&(l={});let{ancestorScroll:i=!0,ancestorResize:u=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:c=!1}=l,d=p(e),h=i||u?[...d?(0,f.v9)(d):[],...t?(0,f.v9)(t):[]]:[];h.forEach(e=>{i&&e.addEventListener("scroll",n,{passive:!0}),u&&e.addEventListener("resize",n)});let g=d&&a?function(e,t){let n,l=null,o=(0,f.ep)(e);function i(){var e;clearTimeout(n),null==(e=l)||e.disconnect(),l=null}return!function u(s,a){void 0===s&&(s=!1),void 0===a&&(a=1),i();let c=e.getBoundingClientRect(),{left:f,top:d,width:p,height:h}=c;if(s||t(),!p||!h)return;let g={rootMargin:-(0,r.RI)(d)+"px "+-(0,r.RI)(o.clientWidth-(f+p))+"px "+-(0,r.RI)(o.clientHeight-(d+h))+"px "+-(0,r.RI)(f)+"px",threshold:(0,r.T9)(0,(0,r.jk)(1,a))||1},m=!0;function v(t){let r=t[0].intersectionRatio;if(r!==a){if(!m)return u();r?u(!1,r):n=setTimeout(()=>{u(!1,1e-7)},1e3)}1!==r||M(c,e.getBoundingClientRect())||u(),m=!1}try{l=new IntersectionObserver(v,{...g,root:o.ownerDocument})}catch(e){l=new IntersectionObserver(v,g)}l.observe(e)}(!0),i}(d,n):null,m=-1,y=null;s&&(y=new ResizeObserver(e=>{let[r]=e;r&&r.target===d&&y&&t&&(y.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var e;null==(e=y)||e.observe(t)})),n()}),d&&!c&&y.observe(d),t&&y.observe(t));let b=c?v(e):null;return c&&function t(){let r=v(e);b&&!M(b,r)&&n(),b=r,o=requestAnimationFrame(t)}(),n(),()=>{var e;h.forEach(e=>{i&&e.removeEventListener("scroll",n),u&&e.removeEventListener("resize",n)}),null==g||g(),null==(e=y)||e.disconnect(),y=null,c&&cancelAnimationFrame(o)}}let C=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;let{x:l,y:o,placement:i,middlewareData:u}=t,s=await c(t,e);return i===(null==(n=u.offset)?void 0:n.placement)&&null!=(r=u.arrow)&&r.alignmentOffset?{}:{x:l+s.x,y:o+s.y,data:{...s,placement:i}}}}},A=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:l,placement:o,platform:i}=t,{mainAxis:u=!0,crossAxis:s=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=(0,r._3)(e,t),f={x:n,y:l},d=await i.detectOverflow(t,c),p=(0,r.TV)((0,r.C0)(o)),h=(0,r.PG)(p),g=f[h],m=f[p];if(u){let e="y"===h?"top":"left",t="y"===h?"bottom":"right",n=g+d[e],l=g-d[t];g=(0,r.qE)(n,g,l)}if(s){let e="y"===p?"top":"left",t="y"===p?"bottom":"right",n=m+d[e],l=m-d[t];m=(0,r.qE)(n,m,l)}let v=a.fn({...t,[h]:g,[p]:m});return{...v,data:{x:v.x-n,y:v.y-l,enabled:{[h]:u,[p]:s}}}}}},P=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,l,o,i,u;let{placement:s,middlewareData:a,rects:c,initialPlacement:f,platform:d,elements:p}=t,{mainAxis:h=!0,crossAxis:g=!0,fallbackPlacements:m,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:b=!0,...x}=(0,r._3)(e,t);if(null!=(n=a.arrow)&&n.alignmentOffset)return{};let w=(0,r.C0)(s),R=(0,r.TV)(f),E=(0,r.C0)(f)===f,S=await (null==d.isRTL?void 0:d.isRTL(p.floating)),T=m||(E||!b?[(0,r.bV)(f)]:(0,r.WJ)(f)),M="none"!==y;!m&&M&&T.push(...(0,r.lP)(f,b,y,S));let k=[f,...T],C=await d.detectOverflow(t,x),A=[],P=(null==(l=a.flip)?void 0:l.overflows)||[];if(h&&A.push(C[w]),g){let e=(0,r.w7)(s,c,S);A.push(C[e[0]],C[e[1]])}if(P=[...P,{placement:s,overflows:A}],!A.every(e=>e<=0)){let e=((null==(o=a.flip)?void 0:o.index)||0)+1,t=k[e];if(t&&("alignment"!==g||R===(0,r.TV)(t)||P.every(e=>(0,r.TV)(e.placement)!==R||e.overflows[0]>0)))return{data:{index:e,overflows:P},reset:{placement:t}};let n=null==(i=P.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:i.placement;if(!n)switch(v){case"bestFit":{let e=null==(u=P.filter(e=>{if(M){let t=(0,r.TV)(e.placement);return t===R||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:u[0];e&&(n=e);break}case"initialPlacement":n=f}if(s!==n)return{reset:{placement:n}}}return{}}}},I=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,l;let o,i,{placement:u,rects:s,platform:a,elements:c}=t,{apply:f=()=>{},...d}=(0,r._3)(e,t),p=await a.detectOverflow(t,d),h=(0,r.C0)(u),g=(0,r.Sg)(u),m="y"===(0,r.TV)(u),{width:v,height:y}=s.floating;"top"===h||"bottom"===h?(o=h,i=g===(await (null==a.isRTL?void 0:a.isRTL(c.floating))?"start":"end")?"left":"right"):(i=h,o="end"===g?"top":"bottom");let b=y-p.top-p.bottom,x=v-p.left-p.right,w=(0,r.jk)(y-p[o],b),R=(0,r.jk)(v-p[i],x),E=!t.middlewareData.shift,S=w,T=R;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(T=x),null!=(l=t.middlewareData.shift)&&l.enabled.y&&(S=b),E&&!g){let e=(0,r.T9)(p.left,0),t=(0,r.T9)(p.right,0),n=(0,r.T9)(p.top,0),l=(0,r.T9)(p.bottom,0);m?T=v-2*(0!==e||0!==t?e+t:(0,r.T9)(p.left,p.right)):S=y-2*(0!==n||0!==l?n+l:(0,r.T9)(p.top,p.bottom))}await f({...t,availableWidth:T,availableHeight:S});let M=await a.getDimensions(c.floating);return v!==M.width||y!==M.height?{reset:{rects:!0}}:{}}}},O=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){let{rects:n,platform:l}=t,{strategy:o="referenceHidden",...i}=(0,r._3)(e,t);switch(o){case"referenceHidden":{let e=u(await l.detectOverflow(t,{...i,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:s(e)}}}case"escaped":{let e=u(await l.detectOverflow(t,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:s(e)}}}default:return{}}}}},q=function(e){return void 0===e&&(e={}),{options:e,fn(t){let{x:n,y:l,placement:o,rects:i,middlewareData:u}=t,{offset:s=0,mainAxis:c=!0,crossAxis:f=!0}=(0,r._3)(e,t),d={x:n,y:l},p=(0,r.TV)(o),h=(0,r.PG)(p),g=d[h],m=d[p],v=(0,r._3)(s,t),y="number"==typeof v?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(c){let e="y"===h?"height":"width",t=i.reference[h]-i.floating[e]+y.mainAxis,n=i.reference[h]+i.reference[e]-y.mainAxis;g<t?g=t:g>n&&(g=n)}if(f){var b,x;let e="y"===h?"width":"height",t=a.has((0,r.C0)(o)),n=i.reference[p]-i.floating[e]+(t&&(null==(b=u.offset)?void 0:b[p])||0)+(t?0:y.crossAxis),l=i.reference[p]+i.reference[e]+(t?0:(null==(x=u.offset)?void 0:x[p])||0)-(t?y.crossAxis:0);m<n?m=n:m>l&&(m=l)}return{[h]:g,[p]:m}}}},j=(e,t,n)=>{let r=new Map,l={platform:T,...n},o={...l.platform,_c:r};return i(e,t,{...l,platform:o})}},80384:(e,t,n)=>{n.d(t,{s:()=>x});var r=n(12115),l=n(88481),o=n(681),i=n(6751),u=n(63987),s=n(43110),a=n(6791),c=n(31823),f=n(50812),d=n(90278),p=n(71542),h=n(72218),g=n(28823),m=n(57162),v=n(62955);let y={intentional:"onClick",sloppy:"onPointerDown"};function b(){return!1}function x(e,t={}){let{enabled:n=!0,escapeKey:w=!0,outsidePress:R=!0,outsidePressEvent:E="sloppy",referencePress:S=b,referencePressEvent:T="sloppy",bubbles:M,externalTree:k}=t,C="rootStore"in e?e.rootStore:e,A=C.useState("open"),P=C.useState("floatingElement"),{dataRef:I}=C.context,O=(0,c.cq)(k),q=(0,u.K)("function"==typeof R?R:()=>!1),j="function"==typeof R?q:R,D=!1!==j,L=(0,u.K)(()=>E),{escapeKey:V,outsidePress:F}={escapeKey:"boolean"==typeof M?M:M?.escapeKey??!1,outsidePress:"boolean"==typeof M?M:M?.outsidePress??!0},H=r.useRef(!1),N=r.useRef(!1),K=r.useRef(!1),$=r.useRef(!1),B=r.useRef(""),W=r.useRef(null),U=(0,s.Z)(),z=(0,s.Z)(),_=(0,u.K)(()=>{z.clear(),I.current.insideReactTree=!1}),Y=(0,u.K)(e=>{let t=I.current.floatingContext?.nodeId;return(O?(0,v.CM)(O.nodesRef.current,t):[]).some(t=>t.context?.open&&!t.context.dataRef.current[e])}),X=(0,u.K)(e=>(0,h.F2)(e,C.select("floatingElement"))||(0,h.F2)(e,C.select("domReferenceElement"))),J=(0,u.K)(e=>{S()&&C.setOpen(!1,(0,f.d)(d.Ui,e.nativeEvent))}),G=(0,u.K)(e=>{if(!A||!n||!w||"Escape"!==e.key||$.current||!V&&Y("__escapeKeyBubbles"))return;let t=(0,m.O_)(e)?e.nativeEvent:e,r=(0,f.d)(d.jv,t);C.setOpen(!1,r),r.isCanceled||e.preventDefault(),V||r.isPropagationAllowed||e.stopPropagation()}),Z=(0,u.K)(()=>{I.current.insideReactTree=!0,z.start(0,_)}),Q=(0,u.K)(e=>{if(!A||!n||0!==e.button)return;let t=(0,g.EW)(e.nativeEvent);(0,g.gR)(C.select("floatingElement"),t)&&(H.current||(H.current=!0,N.current=!1))}),ee=(0,u.K)(e=>{!A||!n||(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&H.current&&(N.current=!0)});r.useEffect(()=>{if(!A||!n)return;I.current.__escapeKeyBubbles=V,I.current.__outsidePressBubbles=F;let e=new s.E,t=new s.E;function r(){K.current=!0,t.start(0,()=>{K.current=!1})}function u(){H.current=!1,N.current=!1}function c(){let e=B.current,t=L(),n="function"==typeof t?t():t;return"string"==typeof n?n:n["pen"!==e&&e?e:"mouse"]}function m(e){let t=I.current.floatingContext?.nodeId,n=O&&(0,v.CM)(O.nodesRef.current,t).some(t=>(0,h.F2)(e,t.context?.elements.floating));return X(e)||n}function y(e){let n;if("intentional"===(n=c())&&"click"!==e.type||"sloppy"===n&&"click"===e.type){"click"===e.type||X(e)||(t.clear(),K.current=!1),_();return}if(I.current.insideReactTree)return void _();let r=(0,g.EW)(e),l=`[${(0,p.F)("inert")}]`,o=(0,a.vq)(r)?r.getRootNode():null,u=Array.from(((0,a.Ng)(o)?o:(0,i.R)(C.select("floatingElement"))).querySelectorAll(l)),s=C.context.triggerElements;if(r&&(s.hasElement(r)||s.hasMatchingElement(e=>(0,g.gR)(e,r))))return;let v=(0,a.vq)(r)?r:null;for(;v&&!(0,a.eu)(v);){let e=(0,a.$4)(v);if((0,a.eu)(e)||!(0,a.vq)(e))break;v=e}if(!(u.length&&(0,a.vq)(r)&&!(0,h.tZ)(r)&&!(0,g.gR)(r,C.select("floatingElement"))&&u.every(e=>!(0,g.gR)(v,e)))){if((0,a.sb)(r)&&!("touches"in e)){let t=(0,a.eu)(r),n=(0,a.L9)(r),l=/auto|scroll/,o=t||l.test(n.overflowX),i=t||l.test(n.overflowY),u=o&&r.clientWidth>0&&r.scrollWidth>r.clientWidth,s=i&&r.clientHeight>0&&r.scrollHeight>r.clientHeight,c="rtl"===n.direction,f=s&&(c?e.offsetX<=r.offsetWidth-r.clientWidth:e.offsetX>r.clientWidth),d=u&&e.offsetY>r.clientHeight;if(f||d)return}if(!m(e)){if("intentional"===c()&&K.current){t.clear(),K.current=!1;return}"function"==typeof j&&!j(e)||Y("__outsidePressBubbles")||(C.setOpen(!1,(0,f.d)(d.Np,e)),_())}}}function b(e){if("sloppy"!==c()||!C.select("open")||!n||X(e))return;let t=e.touches[0];t&&(W.current={startTime:Date.now(),startX:t.clientX,startY:t.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},U.start(1e3,()=>{W.current&&(W.current.dismissOnTouchEnd=!1,W.current.dismissOnMouseDown=!1)}))}function x(e,t){let n=(0,g.EW)(e);if(!n)return;let r=(0,l.q)(n,e.type,()=>{t(e),r()})}function R(e){U.clear(),"pointerdown"===e.type&&(B.current=e.pointerType),("mousedown"!==e.type||!W.current||W.current.dismissOnMouseDown)&&x(e,e=>{if("pointerdown"===e.type)"sloppy"!==c()||"touch"===e.pointerType||!C.select("open")||!n||X(e)||y(e);else y(e)})}function E(e){if(!H.current)return;let n=N.current;if(u(),"intentional"===c()){if("pointercancel"===e.type){n&&r();return}m(e)||(n?r():("function"!=typeof j||j(e))&&(t.clear(),K.current=!0,_()))}}function S(e){if("sloppy"!==c()||!W.current||X(e))return;let t=e.touches[0];if(!t)return;let n=Math.abs(t.clientX-W.current.startX),r=Math.abs(t.clientY-W.current.startY),l=Math.sqrt(n*n+r*r);l>5&&(W.current.dismissOnTouchEnd=!0),l>10&&(y(e),U.clear(),W.current=null)}function T(e){"sloppy"!==c()||!W.current||X(e)||(W.current.dismissOnTouchEnd&&y(e),U.clear(),W.current=null)}let M=(0,i.R)(P),k=(0,o.g)(w&&(0,o.g)((0,l.q)(M,"keydown",G),(0,l.q)(M,"compositionstart",function(){e.clear(),$.current=!0}),(0,l.q)(M,"compositionend",function(){e.start(5*!!(0,a.Tc)(),()=>{$.current=!1})})),D&&(0,o.g)((0,l.q)(M,"click",R,!0),(0,l.q)(M,"pointerdown",R,!0),(0,l.q)(M,"pointerup",E,!0),(0,l.q)(M,"pointercancel",E,!0),(0,l.q)(M,"mousedown",R,!0),(0,l.q)(M,"mouseup",E,!0),(0,l.q)(M,"touchstart",function(e){B.current="touch",x(e,b)},!0),(0,l.q)(M,"touchmove",function(e){x(e,S)},!0),(0,l.q)(M,"touchend",function(e){x(e,T)},!0)));return()=>{k(),e.clear(),t.clear(),u(),K.current=!1}},[I,P,w,D,j,A,n,V,F,G,_,L,Y,X,O,C,U]),r.useEffect(_,[j,_]);let et=r.useMemo(()=>({onKeyDown:G,[y[T]]:J,..."intentional"!==T&&{onClick:J}}),[G,J,T]),en=r.useMemo(()=>({onKeyDown:G,onPointerDown:ee,onMouseDown:ee,onClickCapture:Z,onMouseDownCapture(e){Z(),Q(e)},onPointerDownCapture(e){Z(),Q(e)},onMouseUpCapture:Z,onTouchEndCapture:Z,onTouchMoveCapture:Z}),[G,Z,Q,ee]);return r.useMemo(()=>n?{reference:et,floating:en,trigger:et}:{},[n,et,en])}},81717:(e,t,n)=>{n.d(t,{u:()=>o});var r=n(21171),l=n(45690);function o(e){let t=(0,l.j)(i,e).current;return t.next=e,(0,r.g)(t.effect),t}function i(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}},82647:(e,t,n)=>{n.d(t,{i:()=>l});var r=n(22531);class l{constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t]))return void this.setState({...this.state,...e})}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,l){return(0,r.P)(this,e,t,n,l)}}},84268:(e,t,n)=>{n.d(t,{d:()=>o});var r=n(57445),l=n(58014);function o(e){return"starting"===e?l.K2:r.t0}},85965:(e,t,n)=>{n.d(t,{Pv:()=>l,Qw:()=>i,XF:()=>o});var r=n(18504);let l=1;function o(e,t){return Math.max(0,e-t)}function i(e,t){if(t<=0)return 0;let n=(0,r.q)(e,0,t),o=t-n,i=n<=l,u=o<=l;return i&&u?n<=o?0:t:i?0:u?t:n}},88481:(e,t,n)=>{n.d(t,{q:()=>r});function r(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}},88988:(e,t,n)=>{n.d(t,{d:()=>i});var r=n(12115),l=n(71003),o=n(95155);let i=r.forwardRef(function(e,t){return(0,o.jsx)(l.f,{...e,ref:t,direction:"down"})})},90278:(e,t,n)=>{n.d(t,{Bo:()=>u,Dq:()=>f,L5:()=>h,LO:()=>d,N7:()=>o,Np:()=>i,SR:()=>s,Ui:()=>l,Xn:()=>a,dv:()=>r,jv:()=>c,zJ:()=>p});let r="none",l="trigger-press",o="trigger-hover",i="outside-press",u="item-press",s="close-press",a="focus-out",c="escape-key",f="list-navigation",d="cancel-open",p="imperative-action",h="window-resize"},90283:(e,t,n)=>{n.d(t,{Q:()=>l,a:()=>o});let r={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},l={...r,position:"fixed",top:0,left:0},o={...r,position:"absolute"}},91187:(e,t,n)=>{n.d(t,{H:()=>i,i:()=>o});var r=n(46106),l=n(12115);let o=l.createContext(void 0);function i(){let e=l.useContext(o);if(!e)throw Error((0,r.A)(59));return e}},92623:(e,t,n)=>{n.d(t,{y:()=>o});var r=n(12115);let l=[];function o(e){r.useEffect(e,l)}},92681:(e,t,n)=>{n.d(t,{B1:()=>C,C0:()=>d,Dz:()=>v,Jx:()=>s,LI:()=>i,PG:()=>h,RI:()=>u,Sg:()=>p,T9:()=>o,TV:()=>m,WJ:()=>b,_3:()=>f,bV:()=>M,jk:()=>l,lP:()=>T,nI:()=>k,qE:()=>c,r_:()=>r,sq:()=>g,w7:()=>y});let r=["top","right","bottom","left"],l=Math.min,o=Math.max,i=Math.round,u=Math.floor,s=e=>({x:e,y:e}),a={left:"right",right:"left",bottom:"top",top:"bottom"};function c(e,t,n){return o(e,l(t,n))}function f(e,t){return"function"==typeof e?e(t):e}function d(e){return e.split("-")[0]}function p(e){return e.split("-")[1]}function h(e){return"x"===e?"y":"x"}function g(e){return"y"===e?"height":"width"}function m(e){let t=e[0];return"t"===t||"b"===t?"y":"x"}function v(e){return h(m(e))}function y(e,t,n){void 0===n&&(n=!1);let r=p(e),l=v(e),o=g(l),i="x"===l?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=M(i)),[i,M(i)]}function b(e){let t=M(e);return[x(e),t,x(t)]}function x(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}let w=["left","right"],R=["right","left"],E=["top","bottom"],S=["bottom","top"];function T(e,t,n,r){let l=p(e),o=function(e,t,n){switch(e){case"top":case"bottom":if(n)return t?R:w;return t?w:R;case"left":case"right":return t?E:S;default:return[]}}(d(e),"start"===n,r);return l&&(o=o.map(e=>e+"-"+l),t&&(o=o.concat(o.map(x)))),o}function M(e){let t=d(e);return a[t]+e.slice(t.length)}function k(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function C(e){let{x:t,y:n,width:r,height:l}=e;return{width:r,height:l,top:n,left:t,right:t+r,bottom:n+l,x:t,y:n}}},93965:(e,t,n)=>{n.d(t,{BF:()=>f,FP:()=>m,J9:()=>v,Kg:()=>d,Y3:()=>g,Zb:()=>a,du:()=>s,fl:()=>h,vB:()=>c,zf:()=>p});var r=n(92681),l=n(6791),o=n(57162),i=n(41835);function u(e,t,n){return Math.floor(e/t)!==n}function s(e,t){return t<0||t>=e.length}function a(e,t){return f(e.current,{disabledIndices:t})}function c(e,t){return f(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function f(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:l=1}={}){let o=t;do o+=n?-l:l;while(o>=0&&o<=e.length-1&&m(e,o,r));return o}function d(e,{event:t,orientation:n,loopFocus:l,onLoop:a,rtl:c,cols:p,disabledIndices:h,minIndex:g,maxIndex:v,prevIndex:y,stopEvent:b=!1}){let x,w=y;if(t.key===i.il?x="up":t.key===i.Jd&&(x="down"),x){let n=[],i=[],u=!1,c=0;{let t=null,r=-1;e.forEach((e,l)=>{if(null==e)return;c+=1;let o=e.closest('[role="row"]');o&&(u=!0),(o!==t||-1===r)&&(t=o,n[r+=1]=[]),n[r].push(l),i[l]=r})}let d=!1,R=0;if(u)for(let e of n){let t=e.length;t>R&&(R=t),t!==p&&(d=!0)}let E=d&&c<e.length,S=R||p;b&&(0,o.jo)(t);let T=(r=>{if(!d||-1===y)return;let o=i[y];if(null==o)return;let u=n[o].indexOf(y),s="up"===r?-1:1;for(let r=o+s,c=0;c<n.length;c+=1,r+=s){if(r<0||r>=n.length){if(!l||E)return;if(r=r<0?n.length-1:0,a){let e=Math.min(u,n[r].length-1);r=i[a(t,y,n[r][e]??n[r][0])]??r}}let o=n[r];for(let t=Math.min(u,o.length-1);t>=0;t-=1){let n=o[t];if(!m(e,n,h))return n}}})(x)??(t=>{if(!E||-1===y)return;let n=y%S,o="up"===t?-S:S,i=v-v%S,u=(0,r.RI)(v/S)+1;for(let t=y-n+o,r=0;r<u;r+=1,t+=o){if(t<0||t>v){if(!l)return;t=t<0?i:0}let r=Math.min(t+S-1,v);for(let l=Math.min(t+n,r);l>=t;l-=1)if(!m(e,l,h))return l}})(x);if(void 0!==T)w=T;else if(-1===y)w="up"===x?v:g;else if(w=f(e,{startingIndex:y,amount:S,decrement:"up"===x,disabledIndices:h}),l){if("up"===x&&(y-S<g||w<0)){let e=y%S,n=v%S,r=v-(n-e);w=n===e?v:n>e?r:r-S,a&&(w=a(t,y,w))}"down"===x&&y+S>v&&(w=f(e,{startingIndex:y%S-S,amount:S,disabledIndices:h}),a&&(w=a(t,y,w)))}s(e,w)&&(w=y)}if("both"===n){let n=(0,r.RI)(y/p);t.key===(c?i.eR:i.RJ)&&(b&&(0,o.jo)(t),y%p!=p-1?(w=f(e,{startingIndex:y,disabledIndices:h}),l&&u(w,p,n)&&(w=f(e,{startingIndex:y-y%p-1,disabledIndices:h}),a&&(w=a(t,y,w)))):l&&(w=f(e,{startingIndex:y-y%p-1,disabledIndices:h}),a&&(w=a(t,y,w))),u(w,p,n)&&(w=y)),t.key===(c?i.RJ:i.eR)&&(b&&(0,o.jo)(t),y%p!=0?(w=f(e,{startingIndex:y,decrement:!0,disabledIndices:h}),l&&u(w,p,n)&&(w=f(e,{startingIndex:y+(p-y%p),decrement:!0,disabledIndices:h}),a&&(w=a(t,y,w)))):l&&(w=f(e,{startingIndex:y+(p-y%p),decrement:!0,disabledIndices:h}),a&&(w=a(t,y,w))),u(w,p,n)&&(w=y));let d=(0,r.RI)(v/p)===n;s(e,w)&&(l&&d?(w=t.key===(c?i.RJ:i.eR)?v:f(e,{startingIndex:y-y%p-1,disabledIndices:h}),a&&(w=a(t,y,w))):w=y)}return w}function p(e,t,n){let r=[],l=0;return e.forEach(({width:e,height:o},i)=>{let u=!1;for(n&&(l=0);!u;){let n=[];for(let r=0;r<e;r+=1)for(let e=0;e<o;e+=1)n.push(l+r+e*t);l%t+e<=t&&n.every(e=>null==r[e])?(n.forEach(e=>{r[e]=i}),u=!0):l+=1}}),[...r]}function h(e,t,n,r,l){if(-1===e)return -1;let o=n.indexOf(e),i=t[e];switch(l){case"tl":return o;case"tr":if(!i)return o;return o+i.width-1;case"bl":if(!i)return o;return o+(i.height-1)*r;case"br":return n.lastIndexOf(e);default:return -1}}function g(e,t){return t.flatMap((t,n)=>e.includes(t)?[n]:[])}function m(e,t,n){if("function"==typeof n?n(t):n?.includes(t)??!1)return!0;let r=e[t];return!!r&&(!v(r)||!n&&(r.hasAttribute("disabled")||"true"===r.getAttribute("aria-disabled")))}function v(e,t=e?(0,l.L9)(e):null){var n;return!!e&&!!e.isConnected&&!!t&&"hidden"!==(n=t).visibility&&"collapse"!==n.visibility&&("function"==typeof e.checkVisibility?e.checkVisibility():"none"!==t.display&&"contents"!==t.display)}},94088:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(30772).A)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]])},95491:(e,t,n)=>{n.d(t,{s:()=>W});var r=n(12115),l=n(6791),o=n(88481),i=n(681),u=n(5909),s=n(81717),a=n(63987),c=n(21171),f=n(43110),d=n(98221),p=n(99672),h=n(6751),g=n(18381),m=n(28823),v=n(72218),y=n(57162),b=n(71045),x=n(62955),w=n(93965),R=n(50812),E=n(90278),S=n(71542),T=n(64364);let M={inert:new WeakMap,"aria-hidden":new WeakMap},k="data-base-ui-inert",C={inert:new WeakSet,"aria-hidden":new WeakSet},A=new WeakMap,P=0,I=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=function e(t){return t?(0,l.Ng)(t)?t.host:e(t.parentNode):null}(t);return e.contains(n)?n:null}).filter(e=>null!=e),O=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},q=(e,t,n)=>{let r=[],o=e=>{!e||n.has(e)||Array.from(e.children).forEach(e=>{"script"!==(0,l.mq)(e)&&(t.has(e)?o(e):r.push(e))})};return o(e),r};function j(e,t={}){let{ariaHidden:n=!1,inert:r=!1,mark:l=!0,markerIgnoreElements:o=[]}=t,i=(0,h.R)(e[0]).body;return function(e,t,n,r,{mark:l=!0,markerIgnoreElements:o=[]}){let i=r?"inert":n?"aria-hidden":null,u=null,s=null,a=I(t,e),c=new Set(l?I(t,o):[]),f=l?q(t,O(a),new Set(a)).filter(e=>!c.has(e)):[],d=[],p=[];if(i){let e=M[i],n=C[i];s=n,u=e;let r=I(t,Array.from(t.querySelectorAll("[aria-live]"))),l=a.concat(r);q(t,O(l),new Set(l)).forEach(t=>{let r=t.getAttribute(i),l=null!==r&&"false"!==r,o=(e.get(t)||0)+1;e.set(t,o),d.push(t),1===o&&l&&n.add(t),l||t.setAttribute(i,"inert"===i?"":"true")})}return l&&f.forEach(e=>{let t=(A.get(e)||0)+1;A.set(e,t),p.push(e),1===t&&e.setAttribute(k,"")}),P+=1,()=>{u&&d.forEach(e=>{let t=(u.get(e)||0)-1;u.set(e,t),t||(!s?.has(e)&&i&&e.removeAttribute(i),s?.delete(e))}),l&&p.forEach(e=>{let t=(A.get(e)||0)-1;A.set(e,t),t||e.removeAttribute(k)}),(P-=1)||(M.inert=new WeakMap,M["aria-hidden"]=new WeakMap,C.inert=new WeakSet,C["aria-hidden"]=new WeakSet,A=new WeakMap)}}(e,i,n,r,{mark:l,markerIgnoreElements:o})}var D=n(74649),L=n(31823),V=n(58014),F=n(18337),H=n(95155);let N=[];function K(){N=N.filter(e=>e.deref()?.isConnected)}function $(){return K(),N[N.length-1]?.deref()}function B(e,t){if(e.hasAttribute("tabindex")&&!e.hasAttribute("data-tabindex")||!t.current.includes("floating")&&!e.getAttribute("role")?.includes("dialog"))return;let n=(0,b.nq)(e).filter(e=>{let t=e.getAttribute("data-tabindex")||"";return(0,b.AO)(e)||e.hasAttribute("data-tabindex")&&!t.startsWith("-")}),r=e.getAttribute("tabindex");t.current.includes("floating")||0===n.length?"0"!==r&&e.setAttribute("tabindex","0"):("-1"!==r||e.hasAttribute("data-tabindex")&&"-1"!==e.getAttribute("data-tabindex"))&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function W(e){let{context:t,children:n,disabled:M=!1,initialFocus:k=!0,returnFocus:C=!0,restoreFocus:A=!1,modal:P=!0,closeOnFocusOut:I=!0,openInteractionType:O="",nextFocusableElement:q,previousFocusableElement:W,beforeContentFocusGuardRef:U,externalTree:z,getInsideElements:_}=e,Y="rootStore"in t?t.rootStore:t,X=Y.useState("open"),J=Y.useState("domReferenceElement"),G=Y.useState("floatingElement"),{events:Z,dataRef:Q}=Y.context,ee=(0,a.K)(()=>Q.current.floatingContext?.nodeId),et=(0,v.WZ)(J)&&!1===k,en=r.useRef(["content"]),er=(0,s.u)(k),el=(0,s.u)(C),eo=(0,s.u)(O),ei=(0,L.cq)(z),eu=(0,D.vB)(),es=r.useRef(!1),ea=r.useRef(!1),ec=r.useRef(!1),ef=r.useRef(null),ed=r.useRef(""),ep=r.useRef(""),eh=r.useRef(null),eg=r.useRef(null),em=(0,u.a)(eh,U,eu?.beforeInsideRef),ev=(0,u.a)(eg,eu?.afterInsideRef),ey=(0,f.Z)(),eb=(0,f.Z)(),ex=(0,p.N)(),ew=null!=eu,eR=(0,v.nd)(G),eE=(0,a.K)((e=eR)=>e?(0,b.Kr)(e):[]),eS=(0,a.K)(()=>_?.().filter(e=>null!=e)??[]);r.useEffect(()=>{if(M||!P)return;let e=(0,h.R)(eR);return(0,o.q)(e,"keydown",function(e){"Tab"===e.key&&(0,m.gR)(eR,(0,m.RS)((0,h.R)(eR)))&&0===eE().length&&!et&&(0,y.jo)(e)})},[M,eR,P,et,eE]),r.useEffect(()=>{if(M||!X)return;let e=(0,h.R)(eR);function t(){ec.current=!1}return(0,i.g)((0,o.q)(e,"pointerdown",function(e){let t=(0,m.EW)(e),n=eS();ec.current=!((0,m.gR)(G,t)||(0,m.gR)(J,t)||(0,m.gR)(eu?.portalNode,t)||n.some(e=>e===t||(0,m.gR)(e,t))),ep.current=e.pointerType||"keyboard",t?.closest(`[${V.Kd}]`)&&(ea.current=!0)},!0),(0,o.q)(e,"pointerup",t,!0),(0,o.q)(e,"pointercancel",t,!0),(0,o.q)(e,"keydown",function(){ep.current="keyboard"},!0))},[M,G,J,eR,X,eu,eS]),r.useEffect(()=>{if(M||!I)return;let e=(0,h.R)(eR);function t(t){let n=t.relatedTarget,r=t.currentTarget,o=(0,m.EW)(t);queueMicrotask(()=>{let i=ee(),u=Y.context.triggerElements,s=eS(),a=n?.hasAttribute((0,S.F)("focus-guard"))&&[eh.current,eg.current,eu?.beforeInsideRef.current,eu?.afterInsideRef.current,eu?.beforeOutsideRef.current,eu?.afterOutsideRef.current,(0,F.q)(W),(0,F.q)(q)].includes(n),c=!((0,m.gR)(J,n)||(0,m.gR)(G,n)||(0,m.gR)(n,G)||(0,m.gR)(eu?.portalNode,n)||s.some(e=>e===n||(0,m.gR)(e,n))||null!=n&&u.hasElement(n)||u.hasMatchingElement(e=>(0,m.gR)(e,n))||a||ei&&((0,x.CM)(ei.nodesRef.current,i).find(e=>(0,m.gR)(e.context?.elements.floating,n)||(0,m.gR)(e.context?.elements.domReference,n))||(0,x.$4)(ei.nodesRef.current,i).find(e=>[e.context?.elements.floating,(0,v.nd)(e.context?.elements.floating)].includes(n)||e.context?.elements.domReference===n)));if(r===J&&eR&&B(eR,en),A&&r!==J&&!(0,w.J9)(o)&&(0,m.RS)(e)===e.body){if((0,l.sb)(eR)&&(eR.focus(),"popup"===A))return void ex.request(()=>{eR.focus()});let e=eE(),t=ef.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||eR;(0,l.sb)(n)&&n.focus()}if(Q.current.insideReactTree){Q.current.insideReactTree=!1;return}(et||!P)&&n&&c&&!ea.current&&(et||n!==$())&&(es.current=!0,Y.setOpen(!1,(0,R.d)(E.Xn,t)))})}let n=(0,l.sb)(J)?J:null;if(G||n)return(0,i.g)(n&&(0,o.q)(n,"focusout",t),n&&(0,o.q)(n,"pointerdown",function(){ea.current=!0,eb.start(0,()=>{ea.current=!1})}),G&&(0,o.q)(G,"focusin",function(e){let t=(0,m.EW)(e);(0,b.AO)(t)&&(ef.current=t)}),G&&(0,o.q)(G,"focusout",t),G&&eu&&(0,o.q)(G,"focusout",function(){ec.current||(Q.current.insideReactTree=!0,ey.start(0,()=>{Q.current.insideReactTree=!1}))},!0))},[M,J,G,eR,P,ei,eu,Y,I,A,eE,et,ee,en,Q,ey,eb,ex,q,W,eS]),r.useEffect(()=>{if(M||!G||!X)return;let e=Array.from(eu?.portalNode?.querySelectorAll(`[${(0,S.F)("portal")}]`)||[]),t=ei?(0,x.$4)(ei.nodesRef.current,ee()):[],n=t.find(e=>(0,v.WZ)(e.context?.elements.domReference||null))?.context?.elements.domReference,r=j([G,...e,eh.current,eg.current,eu?.beforeOutsideRef.current,eu?.afterOutsideRef.current,...eS(),n,(0,F.q)(W),(0,F.q)(q),et?J:null].filter(e=>null!=e),{ariaHidden:P||et,mark:!1}),l=j([G,...e].filter(e=>null!=e));return()=>{l(),r()}},[X,M,J,G,P,eu,et,ei,ee,q,W,eS]),(0,c.g)(()=>{if(!X||M||!(0,l.sb)(eR))return;let e=(0,h.R)(eR),t=(0,m.RS)(e);queueMicrotask(()=>{let n,r=er.current,l="function"==typeof r?r(eo.current||""):r;if(void 0===l||!1===l||(0,m.gR)(eR,t))return;let o=null,i=()=>(null==o&&(o=eE(eR)),o[0]||eR);n=(n=!0===l||null===l?i():(0,F.q)(l))||i();let u=(0,m.gR)(eR,(0,m.RS)(e));(0,T.p)(n,{preventScroll:n===eR,shouldFocus(){if(u)return!0;let t=(0,m.RS)(e);return!(t!==n&&(0,m.gR)(eR,t))}})})},[M,X,eR,eE,er,eo]),(0,c.g)(()=>{var e;if(M||!eR)return;let t=(0,h.R)(eR);function n(e){var t,n;let r;if(e.open||(t=e.nativeEvent,n=ep.current,r=(0,l.zk)((0,m.EW)(t)),ed.current=t instanceof r.KeyboardEvent?"keyboard":t instanceof r.FocusEvent?n||"keyboard":"pointerType"in t?t.pointerType||"keyboard":"touches"in t?"touch":t instanceof r.MouseEvent?n||(0===t.detail?"keyboard":"mouse"):""),e.reason===E.N7&&"mouseleave"===e.nativeEvent.type&&(es.current=!0),e.reason===E.Np)if(e.nested)es.current=!1;else if((0,y.YF)(e.nativeEvent)||(0,y.Pg)(e.nativeEvent))es.current=!1;else{let e=!1;(0,h.R)(eR).createElement("div").focus({get preventScroll(){return e=!0,!1}}),e?es.current=!1:es.current=!0}}return e=(0,m.RS)(t),K(),e&&"body"!==(0,l.mq)(e)&&(N.push(new WeakRef(e)),N.length>20&&(N=N.slice(-20))),Z.on("openchange",n),()=>{Z.off("openchange",n);let e=(0,m.RS)(t),r=eS(),o=(0,m.gR)(G,e)||r.some(t=>t===e||(0,m.gR)(t,e))||ei&&(0,x.CM)(ei.nodesRef.current,ee(),!1).some(t=>(0,m.gR)(t.context?.elements.floating,e)),i=el.current,u=function(){let e=el.current,t="function"==typeof e?e(ed.current):e;if(void 0===t||!1===t)return null;if(null===t&&(t=!0),"boolean"==typeof t)return J?.isConnected?J:$()||null;let n=J?.isConnected?J:$();return(0,F.q)(t)||n||null}();queueMicrotask(()=>{let n=u?(0,b.AO)(u)?u:(0,b.Kr)(u)[0]||u:null;i&&!es.current&&(0,l.sb)(n)&&("boolean"!=typeof i||n===e||e===t.body||o)&&n.focus({preventScroll:!0}),es.current=!1})}},[M,G,eR,el,Z,ei,J,ee,eS]),(0,c.g)(()=>{if(!d.Tc||X||!G)return;let e=(0,m.RS)((0,h.R)(G));(0,l.sb)(e)&&(0,v.$u)(e)&&(0,m.gR)(G,e)&&e.blur()},[X,G]),(0,c.g)(()=>{if(!M&&eu)return eu.setFocusManagerState({modal:P,closeOnFocusOut:I,open:X,onOpenChange:Y.setOpen,domReference:J}),()=>{eu.setFocusManagerState(null)}},[M,eu,P,X,Y,I,J]),(0,c.g)(()=>{if(!M&&eR)return B(eR,en),()=>{queueMicrotask(K)}},[M,eR,en]);let eT=!M&&(!P||!et)&&(ew||P);return(0,H.jsxs)(r.Fragment,{children:[eT&&(0,H.jsx)(g.U,{"data-type":"inside",ref:em,onFocus:e=>{if(P){let e=eE();(0,T.p)(e[e.length-1])}else if(eu?.portalNode)if(es.current=!1,(0,b.Qp)(e,eu.portalNode)){let e=(0,b.vF)(J);e?.focus()}else(0,F.q)(W??eu.beforeOutsideRef)?.focus()}}),n,eT&&(0,H.jsx)(g.U,{"data-type":"inside",ref:ev,onFocus:e=>{if(P)(0,T.p)(eE()[0]);else if(eu?.portalNode)if(I&&(es.current=!0),(0,b.Qp)(e,eu.portalNode)){let e=(0,b.XJ)(J);e?.focus()}else(0,F.q)(q??eu.afterOutsideRef)?.focus()}})]})}},97370:(e,t,n)=>{n.d(t,{Ai:()=>u,Vz:()=>i,jd:()=>r,kJ:()=>o,tl:()=>l});let r=(e,t)=>Object.is(e,t);function l(e,t,n){return null==e||null==t?Object.is(e,t):n(e,t)}function o(e,t,n){return!!e&&0!==e.length&&e.some(e=>void 0!==e&&l(t,e,n))}function i(e,t,n){return e&&0!==e.length?e.findIndex(e=>void 0!==e&&l(e,t,n)):-1}function u(e,t,n){return e.filter(e=>!l(t,e,n))}},98221:(e,t,n)=>{n.d(t,{KT:()=>f,Tc:()=>u,m0:()=>c,nr:()=>a,un:()=>s});let r="u">typeof navigator,l=function(){if(!r)return{platform:"",maxTouchPoints:-1};let e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}(),o=function(){if(!r)return"";let e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}(),i=function(){if(!r)return"";let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(" "):navigator.userAgent}(),u="u">typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter:none"),s="MacIntel"===l.platform&&l.maxTouchPoints>1||/iP(hone|ad|od)|iOS/.test(l.platform);r&&/firefox/i.test(i);let a=r&&/apple/i.test(navigator.vendor);r&&/Edg/i.test(i);let c=r&&/android/i.test(o)||/android/i.test(i);r&&o.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints;let f=i.includes("jsdom/")},99672:(e,t,n)=>{n.d(t,{K:()=>u,N:()=>s});var r=n(45690),l=n(92623);class o{request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||(requestAnimationFrame(this.tick),this.isScheduled=!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||(this.callbacks[t]=null,this.callbacksCount-=1)}constructor(){this.callbacks=[],this.callbacksCount=0,this.nextId=1,this.startId=1,this.isScheduled=!1,this.tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)}}}let i=new o;class u{static create(){return new u}static request(e){return i.request(e)}static cancel(e){return i.cancel(e)}request(e){this.cancel(),this.currentId=i.request(()=>{this.currentId=null,e()})}constructor(){this.currentId=null,this.cancel=()=>{null!==this.currentId&&(i.cancel(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.cancel}}function s(){let e=(0,r.j)(u.create).current;return(0,l.y)(e.disposeEffect),e}}}]);
@@ -1,2 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3862],{81750:(e,t,n)=>{n.d(t,{DX:()=>tk,Gc:()=>tw,H2:()=>tF,JY:()=>tM,Pj:()=>m,VH:()=>ea,VS:()=>tR,Zk:()=>k,_0:()=>X,_5:()=>r,ck:()=>tN,h7:()=>eS,of:()=>tq,rV:()=>tC,tE:()=>eF,zW:()=>W});var o,r,a=n(95155),i=n(12115),l=n(69684),s=n(6266),d=n(50916),c=n(99026),u=n(47650);let g=(0,i.createContext)(null),f=g.Provider,p=s.xc.error001("react");function m(e,t){let n=(0,i.useContext)(g);if(null===n)throw Error(p);return(0,d.n)(n,e,t)}function h(){let e=(0,i.useContext)(g);if(null===e)throw Error(p);return(0,i.useMemo)(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}let y={display:"none"},x={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},b="react-flow__node-desc",v="react-flow__edge-desc",w=e=>e.ariaLiveMessage,S=e=>e.ariaLabelConfig;function C({rfId:e}){let t=m(w);return(0,a.jsx)("div",{id:`react-flow__aria-live-${e}`,"aria-live":"assertive","aria-atomic":"true",style:x,children:t})}function E({rfId:e,disableKeyboardA11y:t}){let n=m(S);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{id:`${b}-${e}`,style:y,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),(0,a.jsx)("div",{id:`${v}-${e}`,style:y,children:n["edge.a11yDescription.default"]}),!t&&(0,a.jsx)(C,{rfId:e})]})}let k=(0,i.forwardRef)(({position:e="top-left",children:t,className:n,style:o,...r},i)=>{let s=`${e}`.split("-");return(0,a.jsx)("div",{className:(0,l.A)(["react-flow__panel",n,...s]),style:o,ref:i,...r,children:t})});function N({proOptions:e,position:t="bottom-right"}){return e?.hideAttribution?null:(0,a.jsx)(k,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:(0,a.jsx)("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}k.displayName="Panel";let M=e=>{let t=[],n=[];for(let[,n]of e.nodeLookup)n.selected&&t.push(n.internals.userNode);for(let[,t]of e.edgeLookup)t.selected&&n.push(t);return{selectedNodes:t,selectedEdges:n}},P=e=>e.id;function j(e,t){return(0,c.x)(e.selectedNodes.map(P),t.selectedNodes.map(P))&&(0,c.x)(e.selectedEdges.map(P),t.selectedEdges.map(P))}function _({onSelectionChange:e}){let t=h(),{selectedNodes:n,selectedEdges:o}=m(M,j);return(0,i.useEffect)(()=>{let r={nodes:n,edges:o};e?.(r),t.getState().onSelectionChangeHandlers.forEach(e=>e(r))},[n,o,e]),null}let D=e=>!!e.onSelectionChangeHandlers;function A({onSelectionChange:e}){let t=m(D);return e||t?(0,a.jsx)(_,{onSelectionChange:e}):null}let R=[0,0],I={x:0,y:0,zoom:1},O=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode","rfId"],L=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),z={translateExtent:s.ZO,nodeOrigin:R,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function $(e){let{setNodes:t,setEdges:n,setMinZoom:o,setMaxZoom:r,setTranslateExtent:a,setNodeExtent:l,reset:d,setDefaultNodesAndEdges:u}=m(L,c.x),g=h();(0,i.useEffect)(()=>(u(e.defaultNodes,e.defaultEdges),()=>{f.current=z,d()}),[]);let f=(0,i.useRef)(z);return(0,i.useEffect)(()=>{for(let i of O){let d=e[i];d!==f.current[i]&&void 0!==e[i]&&("nodes"===i?t(d):"edges"===i?n(d):"minZoom"===i?o(d):"maxZoom"===i?r(d):"translateExtent"===i?a(d):"nodeExtent"===i?l(d):"ariaLabelConfig"===i?g.setState({ariaLabelConfig:(0,s.Q6)(d)}):"fitView"===i?g.setState({fitViewQueued:d}):"fitViewOptions"===i?g.setState({fitViewOptions:d}):g.setState({[i]:d}))}f.current=e},O.map(t=>e[t])),null}function B(){return"u"<typeof window||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}let V="u">typeof document?document:null;function H(e=null,t={target:V,actInsideInputWithModifier:!0}){let[n,o]=(0,i.useState)(!1),r=(0,i.useRef)(!1),a=(0,i.useRef)(new Set([])),[l,d]=(0,i.useMemo)(()=>{if(null!==e){let t=(Array.isArray(e)?e:[e]).filter(e=>"string"==typeof e).map(e=>e.replace("+","\n").replace("\n\n","\n+").split("\n")),n=t.reduce((e,t)=>e.concat(...t),[]);return[t,n]}return[[],[]]},[e]);return(0,i.useEffect)(()=>{let n=t?.target??V,i=t?.actInsideInputWithModifier??!0;if(null!==e){let e=e=>{if(r.current=e.ctrlKey||e.metaKey||e.shiftKey||e.altKey,(!r.current||r.current&&!i)&&(0,s.v5)(e))return!1;let n=T(e.code,d);if(a.current.add(e[n]),F(l,a.current,!1)){let n=e.composedPath?.()?.[0]||e.target,a=n?.nodeName==="BUTTON"||n?.nodeName==="A";!1!==t.preventDefault&&(r.current||!a)&&e.preventDefault(),o(!0)}},c=e=>{let t=T(e.code,d);F(l,a.current,!0)?(o(!1),a.current.clear()):a.current.delete(e[t]),"Meta"===e.key&&a.current.clear(),r.current=!1},u=()=>{a.current.clear(),o(!1)};return n?.addEventListener("keydown",e),n?.addEventListener("keyup",c),window.addEventListener("blur",u),window.addEventListener("contextmenu",u),()=>{n?.removeEventListener("keydown",e),n?.removeEventListener("keyup",c),window.removeEventListener("blur",u),window.removeEventListener("contextmenu",u)}}},[e,o]),n}function F(e,t,n){return e.filter(e=>n||e.length===t.size).some(e=>e.every(e=>t.has(e)))}function T(e,t){return t.includes(e)?"code":"key"}function Z(e,t){let n=[],o=new Map,r=[];for(let t of e)if("add"===t.type){r.push(t);continue}else if("remove"===t.type||"replace"===t.type)o.set(t.id,[t]);else{let e=o.get(t.id);e?e.push(t):o.set(t.id,[t])}for(let e of t){let t=o.get(e.id);if(!t){n.push(e);continue}if("remove"===t[0].type)continue;if("replace"===t[0].type){n.push({...t[0].item});continue}let r={...e};for(let e of t){var a=e,i=r;switch(a.type){case"select":i.selected=a.selected;break;case"position":void 0!==a.position&&(i.position=a.position),void 0!==a.dragging&&(i.dragging=a.dragging);break;case"dimensions":void 0!==a.dimensions&&(i.measured={...a.dimensions},a.setAttributes&&((!0===a.setAttributes||"width"===a.setAttributes)&&(i.width=a.dimensions.width),(!0===a.setAttributes||"height"===a.setAttributes)&&(i.height=a.dimensions.height))),"boolean"==typeof a.resizing&&(i.resizing=a.resizing)}}n.push(r)}return r.length&&r.forEach(e=>{void 0!==e.index?n.splice(e.index,0,{...e.item}):n.push({...e.item})}),n}function X(e,t){return Z(e,t)}function W(e,t){return Z(e,t)}function K(e,t){return{id:e,type:"select",selected:t}}function Y(e,t=new Set,n=!1){let o=[];for(let[r,a]of e){let e=t.has(r);(void 0!==a.selected||e)&&a.selected!==e&&(n&&(a.selected=e),o.push(K(a.id,e)))}return o}function Q({items:e=[],lookup:t}){let n=[],o=new Map(e.map(e=>[e.id,e]));for(let[o,r]of e.entries()){let e=t.get(r.id),a=e?.internals?.userNode??e;void 0!==a&&a!==r&&n.push({id:r.id,item:r,type:"replace"}),void 0===a&&n.push({item:r,type:"add",index:o})}for(let[e]of t)void 0===o.get(e)&&n.push({id:e,type:"remove"});return n}function U(e){return{id:e.id,type:"remove"}}let q=(0,s.kr)("React Flow","https://reactflow.dev/"),G=e=>(0,s.oB)(e);function J(e){return(0,i.forwardRef)(e)}let ee="u">typeof window?i.useLayoutEffect:i.useEffect;function et(e){let[t,n]=(0,i.useState)(BigInt(0)),[o]=(0,i.useState)(()=>{var e;let t;return e=()=>n(e=>e+BigInt(1)),t=[],{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}});return ee(()=>{let t=o.get();t.length&&(e(t),o.reset())},[t]),o}let en=(0,i.createContext)(null);function eo({children:e}){let t=h(),n=et((0,i.useCallback)(e=>{let{nodes:n=[],setNodes:o,hasDefaultNodes:r,onNodesChange:a,nodeLookup:i,fitViewQueued:l,onNodesChangeMiddlewareMap:s}=t.getState(),d=n;for(let t of e)d="function"==typeof t?t(d):t;let c=Q({items:d,lookup:i});for(let e of s.values())c=e(c);r&&o(d),c.length>0?a?.(c):l&&window.requestAnimationFrame(()=>{let{fitViewQueued:e,nodes:n,setNodes:o}=t.getState();e&&o(n)})},[])),o=et((0,i.useCallback)(e=>{let{edges:n=[],setEdges:o,hasDefaultEdges:r,onEdgesChange:a,edgeLookup:i}=t.getState(),l=n;for(let t of e)l="function"==typeof t?t(l):t;r?o(l):a&&a(Q({items:l,lookup:i}))},[])),r=(0,i.useMemo)(()=>({nodeQueue:n,edgeQueue:o}),[]);return(0,a.jsx)(en.Provider,{value:r,children:e})}let er=e=>!!e.panZoom;function ea(){let e,t=(e=h(),(0,i.useMemo)(()=>({zoomIn:async t=>{let{panZoom:n}=e.getState();return!!n&&n.scaleBy(1.2,t)},zoomOut:async t=>{let{panZoom:n}=e.getState();return!!n&&n.scaleBy(1/1.2,t)},zoomTo:async(t,n)=>{let{panZoom:o}=e.getState();return!!o&&o.scaleTo(t,n)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{let{transform:[o,r,a],panZoom:i}=e.getState();return!!i&&(await i.setViewport({x:t.x??o,y:t.y??r,zoom:t.zoom??a},n),!0)},getViewport:()=>{let[t,n,o]=e.getState().transform;return{x:t,y:n,zoom:o}},setCenter:async(t,n,o)=>e.getState().setCenter(t,n,o),fitBounds:async(t,n)=>{let{width:o,height:r,minZoom:a,maxZoom:i,panZoom:l}=e.getState(),d=(0,s.R4)(t,o,r,a,i,n?.padding??.1);return!!l&&(await l.setViewport(d,{duration:n?.duration,ease:n?.ease,interpolate:n?.interpolate}),!0)},screenToFlowPosition:(t,n={})=>{let{transform:o,snapGrid:r,snapToGrid:a,domNode:i}=e.getState();if(!i)return t;let{x:l,y:d}=i.getBoundingClientRect(),c={x:t.x-l,y:t.y-d},u=n.snapGrid??r,g=n.snapToGrid??a;return(0,s.Ff)(c,o,g,u)},flowToScreenPosition:t=>{let{transform:n,domNode:o}=e.getState();if(!o)return t;let{x:r,y:a}=o.getBoundingClientRect(),i=(0,s.zj)(t,n);return{x:i.x+r,y:i.y+a}}}),[])),n=h(),o=function(){let e=(0,i.useContext)(en);if(!e)throw Error("useBatchContext must be used within a BatchProvider");return e}(),r=m(er),a=(0,i.useMemo)(()=>{let e=e=>n.getState().nodeLookup.get(e),t=e=>{o.nodeQueue.push(e)},r=e=>{o.edgeQueue.push(e)},a=e=>{let{nodeLookup:t,nodeOrigin:o}=n.getState(),r=G(e)?e:t.get(e.id),a=r.parentId?(0,s.us)(r.position,r.measured,r.parentId,t,o):r.position,i={...r,position:a,width:r.measured?.width??r.width,height:r.measured?.height??r.height};return(0,s.kM)(i)},i=(e,n,o={replace:!1})=>{t(t=>t.map(t=>{if(t.id===e){let e="function"==typeof n?n(t):n;return o.replace&&G(e)?e:{...t,...e}}return t}))},l=(e,t,n={replace:!1})=>{r(o=>o.map(o=>{if(o.id===e){let e="function"==typeof t?t(o):t;return n.replace&&(0,s.b$)(e)?e:{...o,...e}}return o}))};return{getNodes:()=>n.getState().nodes.map(e=>({...e})),getNode:t=>e(t)?.internals.userNode,getInternalNode:e,getEdges:()=>{let{edges:e=[]}=n.getState();return e.map(e=>({...e}))},getEdge:e=>n.getState().edgeLookup.get(e),setNodes:t,setEdges:r,addNodes:e=>{let t=Array.isArray(e)?e:[e];o.nodeQueue.push(e=>[...e,...t])},addEdges:e=>{let t=Array.isArray(e)?e:[e];o.edgeQueue.push(e=>[...e,...t])},toObject:()=>{let{nodes:e=[],edges:t=[],transform:o}=n.getState(),[r,a,i]=o;return{nodes:e.map(e=>({...e})),edges:t.map(e=>({...e})),viewport:{x:r,y:a,zoom:i}}},deleteElements:async({nodes:e=[],edges:t=[]})=>{let{nodes:o,edges:r,onNodesDelete:a,onEdgesDelete:i,triggerNodeChanges:l,triggerEdgeChanges:d,onDelete:c,onBeforeDelete:u}=n.getState(),{nodes:g,edges:f}=await (0,s.Tq)({nodesToRemove:e,edgesToRemove:t,nodes:o,edges:r,onBeforeDelete:u}),p=f.length>0,m=g.length>0;if(p){let e=f.map(U);i?.(f),d(e)}if(m){let e=g.map(U);a?.(g),l(e)}return(m||p)&&c?.({nodes:g,edges:f}),{deletedNodes:g,deletedEdges:f}},getIntersectingNodes:(e,t=!0,o)=>{let r=(0,s.mW)(e),i=r?e:a(e),l=void 0!==o;return i?(o||n.getState().nodes).filter(o=>{let a=n.getState().nodeLookup.get(o.id);if(a&&!r&&(o.id===e.id||!a.internals.positionAbsolute))return!1;let d=(0,s.kM)(l?o:a),c=(0,s.X6)(d,i);return t&&c>0||c>=d.width*d.height||c>=i.width*i.height}):[]},isNodeIntersecting:(e,t,n=!0)=>{let o=(0,s.mW)(e)?e:a(e);if(!o)return!1;let r=(0,s.X6)(o,t);return n&&r>0||r>=t.width*t.height||r>=o.width*o.height},updateNode:i,updateNodeData:(e,t,n={replace:!1})=>{i(e,e=>{let o="function"==typeof t?t(e):t;return n.replace?{...e,data:o}:{...e,data:{...e.data,...o}}},n)},updateEdge:l,updateEdgeData:(e,t,n={replace:!1})=>{l(e,e=>{let o="function"==typeof t?t(e):t;return n.replace?{...e,data:o}:{...e,data:{...e.data,...o}}},n)},getNodesBounds:e=>{let{nodeLookup:t,nodeOrigin:o}=n.getState();return(0,s.Jo)(e,{nodeLookup:t,nodeOrigin:o})},getHandleConnections:({type:e,id:t,nodeId:o})=>Array.from(n.getState().connectionLookup.get(`${o}-${e}${t?`-${t}`:""}`)?.values()??[]),getNodeConnections:({type:e,handleId:t,nodeId:o})=>Array.from(n.getState().connectionLookup.get(`${o}${e?t?`-${e}-${t}`:`-${e}`:""}`)?.values()??[]),fitView:async e=>{let t=n.getState().fitViewResolver??(0,s.YN)();return n.setState({fitViewQueued:!0,fitViewOptions:e,fitViewResolver:t}),o.nodeQueue.push(e=>[...e]),t.promise}}},[]);return(0,i.useMemo)(()=>({...a,...t,viewportInitialized:r}),[r])}let ei=e=>e.selected,el="u">typeof window?window:void 0,es={position:"absolute",width:"100%",height:"100%",top:0,left:0},ed=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function ec({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:o=!1,panOnScrollSpeed:r=.5,panOnScrollMode:l=s.ny.Free,zoomOnDoubleClick:d=!0,panOnDrag:u=!0,defaultViewport:g,translateExtent:f,minZoom:p,maxZoom:y,zoomActivationKeyCode:x,preventScrolling:b=!0,children:v,noWheelClassName:w,noPanClassName:S,onViewportChange:C,isControlledViewport:E,paneClickDistance:k,selectionOnDrag:N}){let M,P=h(),j=(0,i.useRef)(null),{userSelectionActive:_,lib:D,connectionInProgress:A}=m(ed,c.x),R=H(x),I=(0,i.useRef)();M=h(),(0,i.useEffect)(()=>{let e=()=>{if(!j.current||!(j.current.checkVisibility?.()??!0))return!1;let e=(0,s.Eo)(j.current);(0===e.height||0===e.width)&&M.getState().onError?.("004",s.xc.error004()),M.setState({width:e.width||500,height:e.height||500})};if(j.current){e(),window.addEventListener("resize",e);let t=new ResizeObserver(()=>e());return t.observe(j.current),()=>{window.removeEventListener("resize",e),t&&j.current&&t.unobserve(j.current)}}},[]);let O=(0,i.useCallback)(e=>{C?.({x:e[0],y:e[1],zoom:e[2]}),E||P.setState({transform:e})},[C,E]);return(0,i.useEffect)(()=>{if(j.current){I.current=(0,s.kO)({domNode:j.current,minZoom:p,maxZoom:y,translateExtent:f,viewport:g,onDraggingChange:e=>P.setState(t=>t.paneDragging===e?t:{paneDragging:e}),onPanZoomStart:(e,t)=>{let{onViewportChangeStart:n,onMoveStart:o}=P.getState();o?.(e,t),n?.(t)},onPanZoom:(e,t)=>{let{onViewportChange:n,onMove:o}=P.getState();o?.(e,t),n?.(t)},onPanZoomEnd:(e,t)=>{let{onViewportChangeEnd:n,onMoveEnd:o}=P.getState();o?.(e,t),n?.(t)}});let{x:e,y:t,zoom:n}=I.current.getViewport();return P.setState({panZoom:I.current,transform:[e,t,n],domNode:j.current.closest(".react-flow")}),()=>{I.current?.destroy()}}},[]),(0,i.useEffect)(()=>{I.current?.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:o,panOnScrollSpeed:r,panOnScrollMode:l,zoomOnDoubleClick:d,panOnDrag:u,zoomActivationKeyPressed:R,preventScrolling:b,noPanClassName:S,userSelectionActive:_,noWheelClassName:w,lib:D,onTransformChange:O,connectionInProgress:A,selectionOnDrag:N,paneClickDistance:k})},[e,t,n,o,r,l,d,u,R,b,S,_,w,D,O,A,N,k]),(0,a.jsx)("div",{className:"react-flow__renderer",ref:j,style:es,children:v})}let eu=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function eg(){let{userSelectionActive:e,userSelectionRect:t}=m(eu,c.x);return e&&t?(0,a.jsx)("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}let ef=(e,t)=>n=>{n.target===t.current&&e?.(n)},ep=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging,panBy:e.panBy,autoPanSpeed:e.autoPanSpeed});function em({isSelecting:e,selectionKeyPressed:t,selectionMode:n=s.Qc.Full,panOnDrag:o,autoPanOnSelection:r,paneClickDistance:d,selectionOnDrag:u,onSelectionStart:g,onSelectionEnd:f,onPaneClick:p,onPaneContextMenu:y,onPaneScroll:x,onPaneMouseEnter:b,onPaneMouseMove:v,onPaneMouseLeave:w,children:S}){let C=(0,i.useRef)(0),E=h(),{userSelectionActive:k,elementsSelectable:N,dragging:M,connectionInProgress:P,panBy:j,autoPanSpeed:_}=m(ep,c.x),D=N&&(e||k),A=(0,i.useRef)(null),R=(0,i.useRef)(),I=(0,i.useRef)(new Set),O=(0,i.useRef)(new Set),L=(0,i.useRef)(!1),z=(0,i.useRef)({x:0,y:0}),$=(0,i.useRef)(!1),B=e=>{if(L.current||P){L.current=!1;return}p?.(e),E.getState().resetSelectedElements(),E.setState({nodesSelectionActive:!1})};function V(e,t){let{userSelectionRect:o}=E.getState();if(!o)return;let{transform:r,nodeLookup:a,edgeLookup:i,connectionLookup:l,triggerNodeChanges:d,triggerEdgeChanges:c,defaultEdgeOptions:u}=E.getState(),g={x:o.startX,y:o.startY},{x:f,y:p}=(0,s.zj)(g,r),m={startX:g.x,startY:g.y,x:e<f?e:f,y:t<p?t:p,width:Math.abs(e-f),height:Math.abs(t-p)},h=I.current,y=O.current;I.current=new Set((0,s.U$)(a,m,r,n===s.Qc.Partial,!0).map(e=>e.id)),O.current=new Set;let x=u?.selectable??!0;for(let e of I.current){let t=l.get(e);if(t)for(let{edgeId:e}of t.values()){let t=i.get(e);t&&(t.selectable??x)&&O.current.add(e)}}(0,s._s)(h,I.current)||d(Y(a,I.current,!0)),(0,s._s)(y,O.current)||c(Y(i,O.current)),E.setState({userSelectionRect:m,userSelectionActive:!0,nodesSelectionActive:!1})}let H=()=>{cancelAnimationFrame(C.current),C.current=0,$.current=!1};(0,i.useEffect)(()=>()=>H(),[]);let F=!0===o||Array.isArray(o)&&o.includes(0);return(0,a.jsxs)("div",{className:(0,l.A)(["react-flow__pane",{draggable:F,dragging:M,selection:e}]),onClick:D?void 0:ef(B,A),onContextMenu:ef(e=>{Array.isArray(o)&&o?.includes(2)?e.preventDefault():y?.(e)},A),onWheel:ef(x?e=>x(e):void 0,A),onPointerEnter:D?void 0:b,onPointerMove:D?e=>{let{userSelectionRect:n,transform:o,resetSelectedElements:a}=E.getState();if(!R.current||!n)return;let{x:i,y:l}=(0,s.q1)(e.nativeEvent,R.current);z.current={x:i,y:l};let c=(0,s.zj)({x:n.startX,y:n.startY},o);if(!L.current){if(Math.hypot(i-c.x,l-c.y)<=(t?0:d))return;a(),g?.(e)}L.current=!0,$.current||(!function e(){if(!r||!R.current)return;let[t,n]=(0,s._7)(z.current,R.current,_);j({x:t,y:n}).then(t=>{if(!L.current||!t){C.current=requestAnimationFrame(e);return}let{x:n,y:o}=z.current;V(n,o),C.current=requestAnimationFrame(e)})}(),$.current=!0),V(i,l)}:v,onPointerUp:D?e=>{0===e.button&&(e.target?.releasePointerCapture?.(e.pointerId),!k&&e.target===A.current&&E.getState().userSelectionRect&&B?.(e),E.setState({userSelectionActive:!1,userSelectionRect:null}),L.current&&(f?.(e),E.setState({nodesSelectionActive:I.current.size>0})),H())}:void 0,onPointerCancel:D?e=>{e.target?.releasePointerCapture?.(e.pointerId),H()}:void 0,onPointerDownCapture:D?n=>{let{domNode:o,transform:r}=E.getState();if(R.current=o?.getBoundingClientRect(),!R.current)return;let a=n.target===A.current;if(!a&&n.target.closest(".nokey")||!e||!(u&&a||t)||0!==n.button||!n.isPrimary)return;n.target?.setPointerCapture?.(n.pointerId),L.current=!1;let{x:i,y:l}=(0,s.q1)(n.nativeEvent,R.current),d=(0,s.Ff)({x:i,y:l},r);E.setState({userSelectionRect:{width:0,height:0,startX:d.x,startY:d.y,x:i,y:l}}),a||(n.stopPropagation(),n.preventDefault())}:void 0,onClickCapture:D?e=>{L.current&&(e.stopPropagation(),L.current=!1)}:void 0,onPointerLeave:w,ref:A,style:es,children:[S,(0,a.jsx)(eg,{})]})}function eh({id:e,store:t,unselect:n=!1,nodeRef:o}){let{addSelectedNodes:r,unselectNodesAndEdges:a,multiSelectionActive:i,nodeLookup:l,onError:d}=t.getState(),c=l.get(e);c?(t.setState({nodesSelectionActive:!1}),c.selected?(n||c.selected&&i)&&(a({nodes:[c],edges:[]}),requestAnimationFrame(()=>o?.current?.blur())):r([e])):d?.("012",s.xc.error012(e))}function ey({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:o,nodeId:r,isSelectable:a,nodeClickDistance:l}){let d=h(),[c,u]=(0,i.useState)(!1),g=(0,i.useRef)();return(0,i.useEffect)(()=>{g.current=(0,s.I$)({getStoreItems:()=>d.getState(),onNodeMouseDown:t=>{eh({id:t,store:d,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}})},[]),(0,i.useEffect)(()=>{if(!t&&e.current&&g.current)return g.current.update({noDragClassName:n,handleSelector:o,domNode:e.current,isSelectable:a,nodeId:r,nodeClickDistance:l}),()=>{g.current?.destroy()}},[n,o,t,a,e,r,l]),c}function ex(){let e=h();return(0,i.useCallback)(t=>{let{nodeExtent:n,snapToGrid:o,snapGrid:r,nodesDraggable:a,onError:i,updateNodePositions:l,nodeLookup:d,nodeOrigin:c}=e.getState(),u=new Map,g=e=>e.selected&&(e.draggable||a&&void 0===e.draggable),f=o?r[0]:5,p=o?r[1]:5,m=t.direction.x*f*t.factor,h=t.direction.y*p*t.factor;for(let[,e]of d){if(!g(e))continue;let t={x:e.internals.positionAbsolute.x+m,y:e.internals.positionAbsolute.y+h};o&&(t=(0,s.s_)(t,r));let{position:a,positionAbsolute:l}=(0,s.aE)({nodeId:e.id,nextPosition:t,nodeLookup:d,nodeExtent:n,nodeOrigin:c,onError:i});e.position=a,e.internals.positionAbsolute=l,u.set(e.id,e)}l(u)},[])}let eb=(0,i.createContext)(null),ev=eb.Provider;eb.Consumer;let ew=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),eS=(0,i.memo)(J(function({type:e="source",position:t=s.yX.Top,isValidConnection:n,isConnectable:o=!0,isConnectableStart:r=!0,isConnectableEnd:d=!0,id:u,onConnect:g,children:f,className:p,onMouseDown:y,onTouchStart:x,...b},v){let w=u||null,S="target"===e,C=h(),E=(0,i.useContext)(eb),{connectOnClick:k,noPanClassName:N,rfId:M}=m(ew,c.x),{connectingFrom:P,connectingTo:j,clickConnecting:_,isPossibleEndHandle:D,connectionInProcess:A,clickConnectionInProcess:R,valid:I}=m(t=>{let{connectionClickStartHandle:n,connectionMode:o,connection:r}=t,{fromHandle:a,toHandle:i,isValid:l}=r,d=i?.nodeId===E&&i?.id===w&&i?.type===e;return{connectingFrom:a?.nodeId===E&&a?.id===w&&a?.type===e,connectingTo:d,clickConnecting:n?.nodeId===E&&n?.id===w&&n?.type===e,isPossibleEndHandle:o===s.WZ.Strict?a?.type!==e:E!==a?.nodeId||w!==a?.id,connectionInProcess:!!a,clickConnectionInProcess:!!n,valid:d&&l}},c.x);E||C.getState().onError?.("010",s.xc.error010());let O=e=>{let{defaultEdgeOptions:t,onConnect:n,hasDefaultEdges:o}=C.getState(),r={...t,...e};if(o){let{edges:e,setEdges:t,onError:n}=C.getState();t(function(e,t,n={}){return(0,s.rN)(e,t,{...n,onError:n.onError??q})}(r,e,{onError:n}))}n?.(r),g?.(r)},L=e=>{if(!E)return;let t=(0,s.Er)(e.nativeEvent);if(r&&(t&&0===e.button||!t)){let t=C.getState();s.aQ.onPointerDown(e.nativeEvent,{handleDomNode:e.currentTarget,autoPanOnConnect:t.autoPanOnConnect,connectionMode:t.connectionMode,connectionRadius:t.connectionRadius,domNode:t.domNode,nodeLookup:t.nodeLookup,lib:t.lib,isTarget:S,handleId:w,nodeId:E,flowId:t.rfId,panBy:t.panBy,cancelConnection:t.cancelConnection,onConnectStart:t.onConnectStart,onConnectEnd:(...e)=>C.getState().onConnectEnd?.(...e),updateConnection:t.updateConnection,onConnect:O,isValidConnection:n||((...e)=>C.getState().isValidConnection?.(...e)??!0),getTransform:()=>C.getState().transform,getFromHandle:()=>C.getState().connection.fromHandle,autoPanSpeed:t.autoPanSpeed,dragThreshold:t.connectionDragThreshold})}t?y?.(e):x?.(e)};return(0,a.jsx)("div",{"data-handleid":w,"data-nodeid":E,"data-handlepos":t,"data-id":`${M}-${E}-${w}-${e}`,className:(0,l.A)(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",N,p,{source:!S,target:S,connectable:o,connectablestart:r,connectableend:d,clickconnecting:_,connectingfrom:P,connectingto:j,valid:I,connectionindicator:o&&(!A||D)&&(A||R?d:r)}]),onMouseDown:L,onTouchStart:L,onClick:k?t=>{let{onClickConnectStart:o,onClickConnectEnd:a,connectionClickStartHandle:i,connectionMode:l,isValidConnection:d,lib:c,rfId:u,nodeLookup:g,connection:f}=C.getState();if(!E||!i&&!r)return;if(!i){o?.(t.nativeEvent,{nodeId:E,handleId:w,handleType:e}),C.setState({connectionClickStartHandle:{nodeId:E,type:e,id:w}});return}let p=(0,s.oj)(t.target),m=n||d,{connection:h,isValid:y}=s.aQ.isValid(t.nativeEvent,{handle:{nodeId:E,id:w,type:e},connectionMode:l,fromNodeId:i.nodeId,fromHandleId:i.id||null,fromType:i.type,isValidConnection:m,flowId:u,doc:p,lib:c,nodeLookup:g});y&&h&&O(h);let x=structuredClone(f);delete x.inProgress,x.toPosition=x.toHandle?x.toHandle.position:null,a?.(t,x),C.setState({connectionClickStartHandle:null})}:void 0,ref:v,...b,children:f})})),eC={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},eE={input:function({data:e,isConnectable:t,sourcePosition:n=s.yX.Bottom}){return(0,a.jsxs)(a.Fragment,{children:[e?.label,(0,a.jsx)(eS,{type:"source",position:n,isConnectable:t})]})},default:function({data:e,isConnectable:t,targetPosition:n=s.yX.Top,sourcePosition:o=s.yX.Bottom}){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(eS,{type:"target",position:n,isConnectable:t}),e?.label,(0,a.jsx)(eS,{type:"source",position:o,isConnectable:t})]})},output:function({data:e,isConnectable:t,targetPosition:n=s.yX.Top}){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(eS,{type:"target",position:n,isConnectable:t}),e?.label]})},group:function(){return null}},ek=e=>{let{width:t,height:n,x:o,y:r}=(0,s.aZ)(e.nodeLookup,{filter:e=>!!e.selected});return{width:(0,s.kf)(t)?t:null,height:(0,s.kf)(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${o}px,${r}px)`}};function eN({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){let o=h(),{width:r,height:s,transformString:d,userSelectionActive:u}=m(ek,c.x),g=ex(),f=(0,i.useRef)(null);(0,i.useEffect)(()=>{n||f.current?.focus({preventScroll:!0})},[n]);let p=!u&&null!==r&&null!==s;if(ey({nodeRef:f,disabled:!p}),!p)return null;let y=e?t=>{e(t,o.getState().nodes.filter(e=>e.selected))}:void 0;return(0,a.jsx)("div",{className:(0,l.A)(["react-flow__nodesselection","react-flow__container",t]),style:{transform:d},children:(0,a.jsx)("div",{ref:f,className:"react-flow__nodesselection-rect",onContextMenu:y,tabIndex:n?void 0:-1,onKeyDown:n?void 0:e=>{Object.prototype.hasOwnProperty.call(eC,e.key)&&(e.preventDefault(),g({direction:eC[e.key],factor:e.shiftKey?4:1}))},style:{width:r,height:s}})})}let eM="u">typeof window?window:void 0,eP=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function ej({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:o,onPaneMouseLeave:r,onPaneContextMenu:l,onPaneScroll:s,paneClickDistance:d,deleteKeyCode:u,selectionKeyCode:g,selectionOnDrag:f,selectionMode:p,onSelectionStart:y,onSelectionEnd:x,multiSelectionKeyCode:b,panActivationKeyCode:v,zoomActivationKeyCode:w,elementsSelectable:S,zoomOnScroll:C,zoomOnPinch:E,panOnScroll:k,panOnScrollSpeed:N,panOnScrollMode:M,zoomOnDoubleClick:P,panOnDrag:j,autoPanOnSelection:_,defaultViewport:D,translateExtent:A,minZoom:R,maxZoom:I,preventScrolling:O,onSelectionContextMenu:L,noWheelClassName:z,noPanClassName:$,disableKeyboardA11y:B,onViewportChange:V,isControlledViewport:F}){let{nodesSelectionActive:T,userSelectionActive:Z}=m(eP,c.x),X=H(g,{target:eM}),W=H(v,{target:eM}),K=W||j,Y=W||k,Q=f&&!0!==K,U=X||Z||Q;return!function({deleteKeyCode:e,multiSelectionKeyCode:t}){let n=h(),{deleteElements:o}=ea(),r=H(e,{actInsideInputWithModifier:!1}),a=H(t,{target:el});(0,i.useEffect)(()=>{if(r){let{edges:e,nodes:t}=n.getState();o({nodes:t.filter(ei),edges:e.filter(ei)}),n.setState({nodesSelectionActive:!1})}},[r]),(0,i.useEffect)(()=>{n.setState({multiSelectionActive:a})},[a])}({deleteKeyCode:u,multiSelectionKeyCode:b}),(0,a.jsx)(ec,{onPaneContextMenu:l,elementsSelectable:S,zoomOnScroll:C,zoomOnPinch:E,panOnScroll:Y,panOnScrollSpeed:N,panOnScrollMode:M,zoomOnDoubleClick:P,panOnDrag:!X&&K,defaultViewport:D,translateExtent:A,minZoom:R,maxZoom:I,zoomActivationKeyCode:w,preventScrolling:O,noWheelClassName:z,noPanClassName:$,onViewportChange:V,isControlledViewport:F,paneClickDistance:d,selectionOnDrag:Q,children:(0,a.jsxs)(em,{onSelectionStart:y,onSelectionEnd:x,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:o,onPaneMouseLeave:r,onPaneContextMenu:l,onPaneScroll:s,panOnDrag:K,autoPanOnSelection:_,isSelecting:!!U,selectionMode:p,selectionKeyPressed:X,paneClickDistance:d,selectionOnDrag:Q,children:[e,T&&(0,a.jsx)(eN,{onSelectionContextMenu:L,noPanClassName:$,disableKeyboardA11y:B})]})})}ej.displayName="FlowRenderer";let e_=(0,i.memo)(ej),eD=e=>e.updateNodeInternals;var eA=(0,i.memo)(function({id:e,onClick:t,onMouseEnter:n,onMouseMove:o,onMouseLeave:r,onContextMenu:d,onDoubleClick:u,nodesDraggable:g,elementsSelectable:f,nodesConnectable:p,nodesFocusable:y,resizeObserver:x,noDragClassName:v,noPanClassName:w,disableKeyboardA11y:S,rfId:C,nodeTypes:E,nodeClickDistance:k,onError:N}){let{node:M,internals:P,isParent:j}=m(t=>{let n=t.nodeLookup.get(e),o=t.parentLookup.has(e);return{node:n,internals:n.internals,isParent:o}},c.x),_=M.type||"default",D=E?.[_]||eE[_];void 0===D&&(N?.("003",s.xc.error003(_)),_="default",D=E?.default||eE.default);let A=!!(M.draggable||g&&void 0===M.draggable),R=!!(M.selectable||f&&void 0===M.selectable),I=!!(M.connectable||p&&void 0===M.connectable),O=!!(M.focusable||y&&void 0===M.focusable),L=h(),z=(0,s.QE)(M),$=function({node:e,nodeType:t,hasDimensions:n,resizeObserver:o}){let r=h(),a=(0,i.useRef)(null),l=(0,i.useRef)(null),s=(0,i.useRef)(e.sourcePosition),d=(0,i.useRef)(e.targetPosition),c=(0,i.useRef)(t),u=n&&!!e.internals.handleBounds;return(0,i.useEffect)(()=>{!a.current||e.hidden||u&&l.current===a.current||(l.current&&o?.unobserve(l.current),o?.observe(a.current),l.current=a.current)},[u,e.hidden]),(0,i.useEffect)(()=>()=>{l.current&&(o?.unobserve(l.current),l.current=null)},[]),(0,i.useEffect)(()=>{if(a.current){let n=c.current!==t,o=s.current!==e.sourcePosition,i=d.current!==e.targetPosition;(n||o||i)&&(c.current=t,s.current=e.sourcePosition,d.current=e.targetPosition,r.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:a.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),a}({node:M,nodeType:_,hasDimensions:z,resizeObserver:x}),B=ey({nodeRef:$,disabled:M.hidden||!A,noDragClassName:v,handleSelector:M.dragHandle,nodeId:e,isSelectable:R,nodeClickDistance:k}),V=ex();if(M.hidden)return null;let H=(0,s.uD)(M),F=void 0===M.internals.handleBounds?{width:M.width??M.initialWidth??M.style?.width,height:M.height??M.initialHeight??M.style?.height}:{width:M.width??M.style?.width,height:M.height??M.style?.height},T=R||A||t||n||o||r,Z=n?e=>n(e,{...P.userNode}):void 0,X=o?e=>o(e,{...P.userNode}):void 0,W=r?e=>r(e,{...P.userNode}):void 0,K=d?e=>d(e,{...P.userNode}):void 0,Y=u?e=>u(e,{...P.userNode}):void 0;return(0,a.jsx)("div",{className:(0,l.A)(["react-flow__node",`react-flow__node-${_}`,{[w]:A},M.className,{selected:M.selected,selectable:R,parent:j,draggable:A,dragging:B}]),ref:$,style:{zIndex:P.z,transform:`translate(${P.positionAbsolute.x}px,${P.positionAbsolute.y}px)`,pointerEvents:T?"all":"none",visibility:z?"visible":"hidden",...M.style,...F},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:Z,onMouseMove:X,onMouseLeave:W,onContextMenu:K,onClick:n=>{let{selectNodesOnDrag:o,nodeDragThreshold:r}=L.getState();R&&(!o||!A||r>0)&&eh({id:e,store:L,nodeRef:$}),t&&t(n,{...P.userNode})},onDoubleClick:Y,onKeyDown:O?t=>{if(!(0,s.v5)(t.nativeEvent)&&!S){if(s.tn.includes(t.key)&&R)eh({id:e,store:L,unselect:"Escape"===t.key,nodeRef:$});else if(A&&M.selected&&Object.prototype.hasOwnProperty.call(eC,t.key)){t.preventDefault();let{ariaLabelConfig:e}=L.getState();L.setState({ariaLiveMessage:e["node.a11yDescription.ariaLiveMessage"]({direction:t.key.replace("Arrow","").toLowerCase(),x:~~P.positionAbsolute.x,y:~~P.positionAbsolute.y})}),V({direction:eC[t.key],factor:t.shiftKey?4:1})}}}:void 0,tabIndex:O?0:void 0,onFocus:O?()=>{if(S||!$.current?.matches(":focus-visible"))return;let{transform:t,width:n,height:o,autoPanOnNodeFocus:r,setCenter:a}=L.getState();!r||(0,s.U$)(new Map([[e,M]]),{x:0,y:0,width:n,height:o},t,!0).length>0||a(M.position.x+H.width/2,M.position.y+H.height/2,{zoom:t[2]})}:void 0,role:M.ariaRole??(O?"group":void 0),"aria-roledescription":"node","aria-describedby":S?void 0:`${b}-${C}`,"aria-label":M.ariaLabel,...M.domAttributes,children:(0,a.jsx)(ev,{value:e,children:(0,a.jsx)(D,{id:e,data:M.data,type:_,positionAbsoluteX:P.positionAbsolute.x,positionAbsoluteY:P.positionAbsolute.y,selected:M.selected??!1,selectable:R,draggable:A,deletable:M.deletable??!0,isConnectable:I,sourcePosition:M.sourcePosition,targetPosition:M.targetPosition,dragging:B,dragHandle:M.dragHandle,zIndex:P.z,parentId:M.parentId,...H})})})});let eR=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function eI(e){var t;let{nodesDraggable:n,nodesConnectable:o,nodesFocusable:r,elementsSelectable:l,onError:d}=m(eR,c.x),u=(t=e.onlyRenderVisibleElements,m((0,i.useCallback)(e=>t?(0,s.U$)(e.nodeLookup,{x:0,y:0,width:e.width,height:e.height},e.transform,!0).map(e=>e.id):Array.from(e.nodeLookup.keys()),[t]),c.x)),g=function(){let e=m(eD),[t]=(0,i.useState)(()=>"u"<typeof ResizeObserver?null:new ResizeObserver(t=>{let n=new Map;t.forEach(e=>{let t=e.target.getAttribute("data-id");n.set(t,{id:t,nodeElement:e.target,force:!0})}),e(n)}));return(0,i.useEffect)(()=>()=>{t?.disconnect()},[t]),t}();return(0,a.jsx)("div",{className:"react-flow__nodes",style:es,children:u.map(t=>(0,a.jsx)(eA,{id:t,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:g,nodesDraggable:n,nodesConnectable:o,nodesFocusable:r,elementsSelectable:l,nodeClickDistance:e.nodeClickDistance,onError:d},t))})}eI.displayName="NodeRenderer";let eO=(0,i.memo)(eI),eL={[s.TG.Arrow]:({color:e="none",strokeWidth:t=1})=>{let n={strokeWidth:t,...e&&{stroke:e}};return(0,a.jsx)("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},[s.TG.ArrowClosed]:({color:e="none",strokeWidth:t=1})=>{let n={strokeWidth:t,...e&&{stroke:e,fill:e}};return(0,a.jsx)("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})}},ez=({id:e,type:t,color:n,width:o=12.5,height:r=12.5,markerUnits:l="strokeWidth",strokeWidth:d,orient:c="auto-start-reverse"})=>{let u,g=(u=h(),(0,i.useMemo)(()=>Object.prototype.hasOwnProperty.call(eL,t)?eL[t]:(u.getState().onError?.("009",s.xc.error009(t)),null),[t]));return g?(0,a.jsx)("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${o}`,markerHeight:`${r}`,viewBox:"-10 -10 20 20",markerUnits:l,orient:c,refX:"0",refY:"0",children:(0,a.jsx)(g,{color:n,strokeWidth:d})}):null},e$=({defaultColor:e,rfId:t})=>{let n=m(e=>e.edges),o=m(e=>e.defaultEdgeOptions),r=(0,i.useMemo)(()=>(0,s.Hm)(n,{id:t,defaultColor:e,defaultMarkerStart:o?.markerStart,defaultMarkerEnd:o?.markerEnd}),[n,o,t,e]);return r.length?(0,a.jsx)("svg",{className:"react-flow__marker","aria-hidden":"true",children:(0,a.jsx)("defs",{children:r.map(e=>(0,a.jsx)(ez,{id:e.id,type:e.type,color:e.color,width:e.width,height:e.height,markerUnits:e.markerUnits,strokeWidth:e.strokeWidth,orient:e.orient},e.id))})}):null};e$.displayName="MarkerDefinitions";var eB=(0,i.memo)(e$);function eV({x:e,y:t,label:n,labelStyle:o,labelShowBg:r=!0,labelBgStyle:s,labelBgPadding:d=[2,4],labelBgBorderRadius:c=2,children:u,className:g,...f}){let[p,m]=(0,i.useState)({x:1,y:0,width:0,height:0}),h=(0,l.A)(["react-flow__edge-textwrapper",g]),y=(0,i.useRef)(null);return((0,i.useEffect)(()=>{if(y.current){let e=y.current.getBBox();m({x:e.x,y:e.y,width:e.width,height:e.height})}},[n]),n)?(0,a.jsxs)("g",{transform:`translate(${e-p.width/2} ${t-p.height/2})`,className:h,visibility:p.width?"visible":"hidden",...f,children:[r&&(0,a.jsx)("rect",{width:p.width+2*d[0],x:-d[0],y:-d[1],height:p.height+2*d[1],className:"react-flow__edge-textbg",style:s,rx:c,ry:c}),(0,a.jsx)("text",{className:"react-flow__edge-text",y:p.height/2,dy:"0.3em",ref:y,style:o,children:n}),u]}):null}eV.displayName="EdgeText";let eH=(0,i.memo)(eV);function eF({path:e,labelX:t,labelY:n,label:o,labelStyle:r,labelShowBg:i,labelBgStyle:d,labelBgPadding:c,labelBgBorderRadius:u,interactionWidth:g=20,...f}){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("path",{...f,d:e,fill:"none",className:(0,l.A)(["react-flow__edge-path",f.className])}),g?(0,a.jsx)("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:g,className:"react-flow__edge-interaction"}):null,o&&(0,s.kf)(t)&&(0,s.kf)(n)?(0,a.jsx)(eH,{x:t,y:n,label:o,labelStyle:r,labelShowBg:i,labelBgStyle:d,labelBgPadding:c,labelBgBorderRadius:u}):null]})}function eT({pos:e,x1:t,y1:n,x2:o,y2:r}){return e===s.yX.Left||e===s.yX.Right?[.5*(t+o),n]:[t,.5*(n+r)]}function eZ({sourceX:e,sourceY:t,sourcePosition:n=s.yX.Bottom,targetX:o,targetY:r,targetPosition:a=s.yX.Top}){let[i,l]=eT({pos:n,x1:e,y1:t,x2:o,y2:r}),[d,c]=eT({pos:a,x1:o,y1:r,x2:e,y2:t}),[u,g,f,p]=(0,s.e_)({sourceX:e,sourceY:t,targetX:o,targetY:r,sourceControlX:i,sourceControlY:l,targetControlX:d,targetControlY:c});return[`M${e},${t} C${i},${l} ${d},${c} ${o},${r}`,u,g,f,p]}function eX(e){return(0,i.memo)(({id:t,sourceX:n,sourceY:o,targetX:r,targetY:i,sourcePosition:l,targetPosition:s,label:d,labelStyle:c,labelShowBg:u,labelBgStyle:g,labelBgPadding:f,labelBgBorderRadius:p,style:m,markerEnd:h,markerStart:y,interactionWidth:x})=>{let[b,v,w]=eZ({sourceX:n,sourceY:o,sourcePosition:l,targetX:r,targetY:i,targetPosition:s}),S=e.isInternal?void 0:t;return(0,a.jsx)(eF,{id:S,path:b,labelX:v,labelY:w,label:d,labelStyle:c,labelShowBg:u,labelBgStyle:g,labelBgPadding:f,labelBgBorderRadius:p,style:m,markerEnd:h,markerStart:y,interactionWidth:x})})}let eW=eX({isInternal:!1}),eK=eX({isInternal:!0});function eY(e){return(0,i.memo)(({id:t,sourceX:n,sourceY:o,targetX:r,targetY:i,label:l,labelStyle:d,labelShowBg:c,labelBgStyle:u,labelBgPadding:g,labelBgBorderRadius:f,style:p,sourcePosition:m=s.yX.Bottom,targetPosition:h=s.yX.Top,markerEnd:y,markerStart:x,pathOptions:b,interactionWidth:v})=>{let[w,S,C]=(0,s.oN)({sourceX:n,sourceY:o,sourcePosition:m,targetX:r,targetY:i,targetPosition:h,borderRadius:b?.borderRadius,offset:b?.offset,stepPosition:b?.stepPosition}),E=e.isInternal?void 0:t;return(0,a.jsx)(eF,{id:E,path:w,labelX:S,labelY:C,label:l,labelStyle:d,labelShowBg:c,labelBgStyle:u,labelBgPadding:g,labelBgBorderRadius:f,style:p,markerEnd:y,markerStart:x,interactionWidth:v})})}eW.displayName="SimpleBezierEdge",eK.displayName="SimpleBezierEdgeInternal";let eQ=eY({isInternal:!1}),eU=eY({isInternal:!0});function eq(e){return(0,i.memo)(({id:t,...n})=>{let o=e.isInternal?void 0:t;return(0,a.jsx)(eQ,{...n,id:o,pathOptions:(0,i.useMemo)(()=>({borderRadius:0,offset:n.pathOptions?.offset}),[n.pathOptions?.offset])})})}eQ.displayName="SmoothStepEdge",eU.displayName="SmoothStepEdgeInternal";let eG=eq({isInternal:!1}),eJ=eq({isInternal:!0});function e0(e){return(0,i.memo)(({id:t,sourceX:n,sourceY:o,targetX:r,targetY:i,label:l,labelStyle:d,labelShowBg:c,labelBgStyle:u,labelBgPadding:g,labelBgBorderRadius:f,style:p,markerEnd:m,markerStart:h,interactionWidth:y})=>{let[x,b,v]=(0,s.ah)({sourceX:n,sourceY:o,targetX:r,targetY:i}),w=e.isInternal?void 0:t;return(0,a.jsx)(eF,{id:w,path:x,labelX:b,labelY:v,label:l,labelStyle:d,labelShowBg:c,labelBgStyle:u,labelBgPadding:g,labelBgBorderRadius:f,style:p,markerEnd:m,markerStart:h,interactionWidth:y})})}eG.displayName="StepEdge",eJ.displayName="StepEdgeInternal";let e1=e0({isInternal:!1}),e3=e0({isInternal:!0});function e2(e){return(0,i.memo)(({id:t,sourceX:n,sourceY:o,targetX:r,targetY:i,sourcePosition:l=s.yX.Bottom,targetPosition:d=s.yX.Top,label:c,labelStyle:u,labelShowBg:g,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:m,style:h,markerEnd:y,markerStart:x,pathOptions:b,interactionWidth:v})=>{let[w,S,C]=(0,s.Fp)({sourceX:n,sourceY:o,sourcePosition:l,targetX:r,targetY:i,targetPosition:d,curvature:b?.curvature}),E=e.isInternal?void 0:t;return(0,a.jsx)(eF,{id:E,path:w,labelX:S,labelY:C,label:c,labelStyle:u,labelShowBg:g,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:m,style:h,markerEnd:y,markerStart:x,interactionWidth:v})})}e1.displayName="StraightEdge",e3.displayName="StraightEdgeInternal";let e4=e2({isInternal:!1}),e5=e2({isInternal:!0});e4.displayName="BezierEdge",e5.displayName="BezierEdgeInternal";let e6={default:e5,straight:e3,step:eJ,smoothstep:eU,simplebezier:eK},e7={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},e8="react-flow__edgeupdater";function e9({position:e,centerX:t,centerY:n,radius:o=10,onMouseDown:r,onMouseEnter:i,onMouseOut:d,type:c}){return(0,a.jsx)("circle",{onMouseDown:r,onMouseEnter:i,onMouseOut:d,className:(0,l.A)([e8,`${e8}-${c}`]),cx:e===s.yX.Left?t-o:e===s.yX.Right?t+o:t,cy:e===s.yX.Top?n-o:e===s.yX.Bottom?n+o:n,r:o,stroke:"transparent",fill:"transparent"})}function te({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:o,sourceY:r,targetX:i,targetY:l,sourcePosition:d,targetPosition:c,onReconnect:u,onReconnectStart:g,onReconnectEnd:f,setReconnecting:p,setUpdateHover:m}){let y=h(),x=(e,t)=>{if(0!==e.button)return;let{autoPanOnConnect:o,domNode:r,connectionMode:a,connectionRadius:i,lib:l,onConnectStart:d,cancelConnection:c,nodeLookup:m,rfId:h,panBy:x,updateConnection:b}=y.getState(),v="target"===t.type;s.aQ.onPointerDown(e.nativeEvent,{autoPanOnConnect:o,connectionMode:a,connectionRadius:i,domNode:r,handleId:t.id,nodeId:t.nodeId,nodeLookup:m,isTarget:v,edgeUpdaterType:t.type,lib:l,flowId:h,cancelConnection:c,panBy:x,isValidConnection:(...e)=>y.getState().isValidConnection?.(...e)??!0,onConnect:e=>u?.(n,e),onConnectStart:(o,r)=>{p(!0),g?.(e,n,t.type),d?.(o,r)},onConnectEnd:(...e)=>y.getState().onConnectEnd?.(...e),onReconnectEnd:(e,o)=>{p(!1),f?.(e,n,t.type,o)},updateConnection:b,getTransform:()=>y.getState().transform,getFromHandle:()=>y.getState().connection.fromHandle,dragThreshold:y.getState().connectionDragThreshold,handleDomNode:e.currentTarget})},b=()=>m(!0),v=()=>m(!1);return(0,a.jsxs)(a.Fragment,{children:[(!0===e||"source"===e)&&(0,a.jsx)(e9,{position:d,centerX:o,centerY:r,radius:t,onMouseDown:e=>x(e,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),onMouseEnter:b,onMouseOut:v,type:"source"}),(!0===e||"target"===e)&&(0,a.jsx)(e9,{position:c,centerX:i,centerY:l,radius:t,onMouseDown:e=>x(e,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),onMouseEnter:b,onMouseOut:v,type:"target"})]})}var tt=(0,i.memo)(function({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:o,onClick:r,onDoubleClick:d,onContextMenu:u,onMouseEnter:g,onMouseMove:f,onMouseLeave:p,reconnectRadius:y,onReconnect:x,onReconnectStart:b,onReconnectEnd:w,rfId:S,edgeTypes:C,noPanClassName:E,onError:k,disableKeyboardA11y:N}){let M=m(t=>t.edgeLookup.get(e)),P=m(e=>e.defaultEdgeOptions),j=(M=P?{...P,...M}:M).type||"default",_=C?.[j]||e6[j];void 0===_&&(k?.("011",s.xc.error011(j)),j="default",_=C?.default||e6.default);let D=!!(M.focusable||t&&void 0===M.focusable),A=void 0!==x&&(M.reconnectable||n&&void 0===M.reconnectable),R=!!(M.selectable||o&&void 0===M.selectable),I=(0,i.useRef)(null),[O,L]=(0,i.useState)(!1),[z,$]=(0,i.useState)(!1),B=h(),{zIndex:V,sourceX:H,sourceY:F,targetX:T,targetY:Z,sourcePosition:X,targetPosition:W}=m((0,i.useCallback)(t=>{let n=t.nodeLookup.get(M.source),o=t.nodeLookup.get(M.target);if(!n||!o)return{zIndex:M.zIndex,...e7};let r=(0,s.b5)({id:e,sourceNode:n,targetNode:o,sourceHandle:M.sourceHandle||null,targetHandle:M.targetHandle||null,connectionMode:t.connectionMode,onError:k});return{zIndex:(0,s.qX)({selected:M.selected,zIndex:M.zIndex,sourceNode:n,targetNode:o,elevateOnSelect:t.elevateEdgesOnSelect,zIndexMode:t.zIndexMode}),...r||e7}},[M.source,M.target,M.sourceHandle,M.targetHandle,M.selected,M.zIndex]),c.x),K=(0,i.useMemo)(()=>M.markerStart?`url('#${(0,s.aW)(M.markerStart,S)}')`:void 0,[M.markerStart,S]),Y=(0,i.useMemo)(()=>M.markerEnd?`url('#${(0,s.aW)(M.markerEnd,S)}')`:void 0,[M.markerEnd,S]);if(M.hidden||null===H||null===F||null===T||null===Z)return null;let Q=d?e=>{d(e,{...M})}:void 0,U=u?e=>{u(e,{...M})}:void 0,q=g?e=>{g(e,{...M})}:void 0,G=f?e=>{f(e,{...M})}:void 0,J=p?e=>{p(e,{...M})}:void 0;return(0,a.jsx)("svg",{style:{zIndex:V},children:(0,a.jsxs)("g",{className:(0,l.A)(["react-flow__edge",`react-flow__edge-${j}`,M.className,E,{selected:M.selected,animated:M.animated,inactive:!R&&!r,updating:O,selectable:R}]),onClick:t=>{let{addSelectedEdges:n,unselectNodesAndEdges:o,multiSelectionActive:a}=B.getState();R&&(B.setState({nodesSelectionActive:!1}),M.selected&&a?(o({nodes:[],edges:[M]}),I.current?.blur()):n([e])),r&&r(t,M)},onDoubleClick:Q,onContextMenu:U,onMouseEnter:q,onMouseMove:G,onMouseLeave:J,onKeyDown:D?t=>{if(!N&&s.tn.includes(t.key)&&R){let{unselectNodesAndEdges:n,addSelectedEdges:o}=B.getState();"Escape"===t.key?(I.current?.blur(),n({edges:[M]})):o([e])}}:void 0,tabIndex:D?0:void 0,role:M.ariaRole??(D?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":null===M.ariaLabel?void 0:M.ariaLabel||`Edge from ${M.source} to ${M.target}`,"aria-describedby":D?`${v}-${S}`:void 0,ref:I,...M.domAttributes,children:[!z&&(0,a.jsx)(_,{id:e,source:M.source,target:M.target,type:M.type,selected:M.selected,animated:M.animated,selectable:R,deletable:M.deletable??!0,label:M.label,labelStyle:M.labelStyle,labelShowBg:M.labelShowBg,labelBgStyle:M.labelBgStyle,labelBgPadding:M.labelBgPadding,labelBgBorderRadius:M.labelBgBorderRadius,sourceX:H,sourceY:F,targetX:T,targetY:Z,sourcePosition:X,targetPosition:W,data:M.data,style:M.style,sourceHandleId:M.sourceHandle,targetHandleId:M.targetHandle,markerStart:K,markerEnd:Y,pathOptions:"pathOptions"in M?M.pathOptions:void 0,interactionWidth:M.interactionWidth}),A&&(0,a.jsx)(te,{edge:M,isReconnectable:A,reconnectRadius:y,onReconnect:x,onReconnectStart:b,onReconnectEnd:w,sourceX:H,sourceY:F,targetX:T,targetY:Z,sourcePosition:X,targetPosition:W,setUpdateHover:L,setReconnecting:$})]})})});let tn=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function to({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:o,noPanClassName:r,onReconnect:l,onEdgeContextMenu:d,onEdgeMouseEnter:u,onEdgeMouseMove:g,onEdgeMouseLeave:f,onEdgeClick:p,reconnectRadius:h,onEdgeDoubleClick:y,onReconnectStart:x,onReconnectEnd:b,disableKeyboardA11y:v}){let{edgesFocusable:w,edgesReconnectable:S,elementsSelectable:C,onError:E}=m(tn,c.x),k=m((0,i.useCallback)(e=>{if(!t)return e.edges.map(e=>e.id);let n=[];if(e.width&&e.height)for(let t of e.edges){let o=e.nodeLookup.get(t.source),r=e.nodeLookup.get(t.target);o&&r&&(0,s.uj)({sourceNode:o,targetNode:r,width:e.width,height:e.height,transform:e.transform})&&n.push(t.id)}return n},[t]),c.x);return(0,a.jsxs)("div",{className:"react-flow__edges",children:[(0,a.jsx)(eB,{defaultColor:e,rfId:n}),k.map(e=>(0,a.jsx)(tt,{id:e,edgesFocusable:w,edgesReconnectable:S,elementsSelectable:C,noPanClassName:r,onReconnect:l,onContextMenu:d,onMouseEnter:u,onMouseMove:g,onMouseLeave:f,onClick:p,reconnectRadius:h,onDoubleClick:y,onReconnectStart:x,onReconnectEnd:b,rfId:n,onError:E,edgeTypes:o,disableKeyboardA11y:v},e))]})}to.displayName="EdgeRenderer";let tr=(0,i.memo)(to),ta=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function ti({children:e}){let t=m(ta);return(0,a.jsx)("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}let tl=e=>e.panZoom?.syncViewport;function ts(e){return e.connection.inProgress?{...e.connection,to:(0,s.Ff)(e.connection.to,e.transform)}:{...e.connection}}let td=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function tc({containerStyle:e,style:t,type:n,component:o}){let{nodesConnectable:r,width:i,height:d,isValid:u,inProgress:g}=m(td,c.x);return i&&r&&g?(0,a.jsx)("svg",{style:e,width:i,height:d,className:"react-flow__connectionline react-flow__container",children:(0,a.jsx)("g",{className:(0,l.A)(["react-flow__connection",(0,s.HF)(u)]),children:(0,a.jsx)(tu,{style:t,type:n,CustomComponent:o,isValid:u})})}):null}let tu=({style:e,type:t=s.Do.Bezier,CustomComponent:n,isValid:o})=>{let{inProgress:r,from:i,fromNode:l,fromHandle:d,fromPosition:u,to:g,toNode:f,toHandle:p,toPosition:h,pointer:y}=m(ts,c.x);if(!r)return;if(n)return(0,a.jsx)(n,{connectionLineType:t,connectionLineStyle:e,fromNode:l,fromHandle:d,fromX:i.x,fromY:i.y,toX:g.x,toY:g.y,fromPosition:u,toPosition:h,connectionStatus:(0,s.HF)(o),toNode:f,toHandle:p,pointer:y});let x="",b={sourceX:i.x,sourceY:i.y,sourcePosition:u,targetX:g.x,targetY:g.y,targetPosition:h};switch(t){case s.Do.Bezier:[x]=(0,s.Fp)(b);break;case s.Do.SimpleBezier:[x]=eZ(b);break;case s.Do.Step:[x]=(0,s.oN)({...b,borderRadius:0});break;case s.Do.SmoothStep:[x]=(0,s.oN)(b);break;default:[x]=(0,s.ah)(b)}return(0,a.jsx)("path",{d:x,fill:"none",className:"react-flow__connection-path",style:e})};tu.displayName="ConnectionLine";let tg={};function tf(e=tg){(0,i.useRef)(e),h(),(0,i.useEffect)(()=>{},[e])}function tp({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:o,onEdgeClick:r,onNodeDoubleClick:l,onEdgeDoubleClick:s,onNodeMouseEnter:d,onNodeMouseMove:c,onNodeMouseLeave:u,onNodeContextMenu:g,onSelectionContextMenu:f,onSelectionStart:p,onSelectionEnd:y,connectionLineType:x,connectionLineStyle:b,connectionLineComponent:v,connectionLineContainerStyle:w,selectionKeyCode:S,selectionOnDrag:C,selectionMode:E,multiSelectionKeyCode:k,panActivationKeyCode:N,zoomActivationKeyCode:M,deleteKeyCode:P,onlyRenderVisibleElements:j,elementsSelectable:_,defaultViewport:D,translateExtent:A,minZoom:R,maxZoom:I,preventScrolling:O,defaultMarkerColor:L,zoomOnScroll:z,zoomOnPinch:$,panOnScroll:B,panOnScrollSpeed:V,panOnScrollMode:H,zoomOnDoubleClick:F,panOnDrag:T,autoPanOnSelection:Z,onPaneClick:X,onPaneMouseEnter:W,onPaneMouseMove:K,onPaneMouseLeave:Y,onPaneScroll:Q,onPaneContextMenu:U,paneClickDistance:q,nodeClickDistance:G,onEdgeContextMenu:J,onEdgeMouseEnter:ee,onEdgeMouseMove:et,onEdgeMouseLeave:en,reconnectRadius:eo,onReconnect:er,onReconnectStart:ei,onReconnectEnd:el,noDragClassName:es,noWheelClassName:ed,noPanClassName:ec,disableKeyboardA11y:eu,nodeExtent:eg,rfId:ef,viewport:ep,onViewportChange:em}){let eh,ey,ex,eb;return tf(e),tf(t),h(),(0,i.useRef)(!1),(0,i.useEffect)(()=>{},[]),eh=ea(),ey=(0,i.useRef)(!1),(0,i.useEffect)(()=>{!ey.current&&eh.viewportInitialized&&n&&(setTimeout(()=>n(eh),1),ey.current=!0)},[n,eh.viewportInitialized]),ex=m(tl),eb=h(),(0,i.useEffect)(()=>{ep&&(ex?.(ep),eb.setState({transform:[ep.x,ep.y,ep.zoom]}))},[ep,ex]),(0,a.jsx)(e_,{onPaneClick:X,onPaneMouseEnter:W,onPaneMouseMove:K,onPaneMouseLeave:Y,onPaneContextMenu:U,onPaneScroll:Q,paneClickDistance:q,deleteKeyCode:P,selectionKeyCode:S,selectionOnDrag:C,selectionMode:E,onSelectionStart:p,onSelectionEnd:y,multiSelectionKeyCode:k,panActivationKeyCode:N,zoomActivationKeyCode:M,elementsSelectable:_,zoomOnScroll:z,zoomOnPinch:$,zoomOnDoubleClick:F,panOnScroll:B,panOnScrollSpeed:V,panOnScrollMode:H,panOnDrag:T,autoPanOnSelection:Z,defaultViewport:D,translateExtent:A,minZoom:R,maxZoom:I,onSelectionContextMenu:f,preventScrolling:O,noDragClassName:es,noWheelClassName:ed,noPanClassName:ec,disableKeyboardA11y:eu,onViewportChange:em,isControlledViewport:!!ep,children:(0,a.jsxs)(ti,{children:[(0,a.jsx)(tr,{edgeTypes:t,onEdgeClick:r,onEdgeDoubleClick:s,onReconnect:er,onReconnectStart:ei,onReconnectEnd:el,onlyRenderVisibleElements:j,onEdgeContextMenu:J,onEdgeMouseEnter:ee,onEdgeMouseMove:et,onEdgeMouseLeave:en,reconnectRadius:eo,defaultMarkerColor:L,noPanClassName:ec,disableKeyboardA11y:eu,rfId:ef}),(0,a.jsx)(tc,{style:b,type:x,component:v,containerStyle:w}),(0,a.jsx)("div",{className:"react-flow__edgelabel-renderer"}),(0,a.jsx)(eO,{nodeTypes:e,onNodeClick:o,onNodeDoubleClick:l,onNodeMouseEnter:d,onNodeMouseMove:c,onNodeMouseLeave:u,onNodeContextMenu:g,nodeClickDistance:G,onlyRenderVisibleElements:j,noPanClassName:ec,noDragClassName:es,disableKeyboardA11y:eu,nodeExtent:eg,rfId:ef}),(0,a.jsx)("div",{className:"react-flow__viewport-portal"})]})})}tp.displayName="GraphView";let tm=(0,i.memo)(tp),th=(0,s.kr)("React Flow","https://reactflow.dev/"),ty=({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,width:r,height:a,fitView:i,fitViewOptions:l,minZoom:d=.5,maxZoom:c=2,nodeOrigin:u,nodeExtent:g,zIndexMode:f="basic"}={})=>{let p=new Map,m=new Map,h=new Map,y=new Map,x=o??t??[],b=n??e??[],v=u??[0,0],w=g??s.ZO;(0,s.qn)(h,y,x);let{nodesInitialized:S}=(0,s.bi)(b,p,m,{nodeOrigin:v,nodeExtent:w,zIndexMode:f}),C=[0,0,1];if(i&&r&&a){let e=(0,s.aZ)(p,{filter:e=>!!((e.width||e.initialWidth)&&(e.height||e.initialHeight))}),{x:t,y:n,zoom:o}=(0,s.R4)(e,r,a,d,c,l?.padding??.1);C=[t,n,o]}return{rfId:"1",width:r??0,height:a??0,transform:C,nodes:b,nodesInitialized:S,nodeLookup:p,parentLookup:m,edges:x,edgeLookup:y,connectionLookup:h,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:void 0!==n,hasDefaultEdges:void 0!==o,panZoom:null,minZoom:d,maxZoom:c,translateExtent:s.ZO,nodeExtent:w,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:s.WZ.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:v,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:i??!1,fitViewOptions:l,fitViewResolver:null,connection:{...s.bK},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:th,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:s.tM,zIndexMode:f,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}};function tx({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:o,initialWidth:r,initialHeight:l,initialMinZoom:c,initialMaxZoom:u,initialFitViewOptions:g,fitView:p,nodeOrigin:m,nodeExtent:h,zIndexMode:y,children:x}){let[b]=(0,i.useState)(()=>(({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,width:r,height:a,fitView:i,fitViewOptions:l,minZoom:c,maxZoom:u,nodeOrigin:g,nodeExtent:f,zIndexMode:p})=>(0,d.h)((d,m)=>{async function h(){let{nodeLookup:e,panZoom:t,fitViewOptions:n,fitViewResolver:o,width:r,height:a,minZoom:i,maxZoom:l}=m();t&&(await (0,s.IO)({nodes:e,width:r,height:a,panZoom:t,minZoom:i,maxZoom:l},n),o?.resolve(!0),d({fitViewResolver:null}))}return{...ty({nodes:e,edges:t,width:r,height:a,fitView:i,fitViewOptions:l,minZoom:c,maxZoom:u,nodeOrigin:g,nodeExtent:f,defaultNodes:n,defaultEdges:o,zIndexMode:p}),setNodes:e=>{let{nodeLookup:t,parentLookup:n,nodeOrigin:o,elevateNodesOnSelect:r,fitViewQueued:a,zIndexMode:i,nodesSelectionActive:l}=m(),{nodesInitialized:c,hasSelectedNodes:u}=(0,s.bi)(e,t,n,{nodeOrigin:o,nodeExtent:f,elevateNodesOnSelect:r,checkEquality:!0,zIndexMode:i}),g=l&&u;a&&c?(h(),d({nodes:e,nodesInitialized:c,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:g})):d({nodes:e,nodesInitialized:c,nodesSelectionActive:g})},setEdges:e=>{let{connectionLookup:t,edgeLookup:n}=m();(0,s.qn)(t,n,e),d({edges:e})},setDefaultNodesAndEdges:(e,t)=>{if(e){let{setNodes:t}=m();t(e),d({hasDefaultNodes:!0})}if(t){let{setEdges:e}=m();e(t),d({hasDefaultEdges:!0})}},updateNodeInternals:e=>{let{triggerNodeChanges:t,nodeLookup:n,parentLookup:o,domNode:r,nodeOrigin:a,nodeExtent:i,debug:l,fitViewQueued:c,zIndexMode:u}=m(),{changes:g,updatedInternals:f}=(0,s.uL)(e,n,o,r,a,i,u);f&&((0,s.vS)(n,o,{nodeOrigin:a,nodeExtent:i,zIndexMode:u}),c?(h(),d({fitViewQueued:!1,fitViewOptions:void 0})):d({}),g?.length>0&&(l&&console.log("React Flow: trigger node changes",g),t?.(g)))},updateNodePositions:(e,t=!1)=>{let n=[],o=[],{nodeLookup:r,triggerNodeChanges:a,connection:i,updateConnection:l,onNodesChangeMiddlewareMap:d}=m();for(let[a,d]of e){let e=r.get(a),c=!!(e?.expandParent&&e?.parentId&&d?.position),u={id:a,type:"position",position:c?{x:Math.max(0,d.position.x),y:Math.max(0,d.position.y)}:d.position,dragging:t};if(e&&i.inProgress&&i.fromNode.id===e.id){let t=(0,s.M_)(e,i.fromHandle,s.yX.Left,!0);l({...i,from:t})}c&&e.parentId&&n.push({id:a,parentId:e.parentId,rect:{...d.internals.positionAbsolute,width:d.measured.width??0,height:d.measured.height??0}}),o.push(u)}if(n.length>0){let{parentLookup:e,nodeOrigin:t}=m(),a=(0,s.r8)(n,r,e,t);o.push(...a)}for(let e of d.values())o=e(o);a(o)},triggerNodeChanges:e=>{let{onNodesChange:t,setNodes:n,nodes:o,hasDefaultNodes:r,debug:a}=m();e?.length&&(r&&n(Z(e,o)),a&&console.log("React Flow: trigger node changes",e),t?.(e))},triggerEdgeChanges:e=>{let{onEdgesChange:t,setEdges:n,edges:o,hasDefaultEdges:r,debug:a}=m();e?.length&&(r&&n(Z(e,o)),a&&console.log("React Flow: trigger edge changes",e),t?.(e))},addSelectedNodes:e=>{let{multiSelectionActive:t,edgeLookup:n,nodeLookup:o,triggerNodeChanges:r,triggerEdgeChanges:a}=m();t?r(e.map(e=>K(e,!0))):(r(Y(o,new Set([...e]),!0)),a(Y(n)))},addSelectedEdges:e=>{let{multiSelectionActive:t,edgeLookup:n,nodeLookup:o,triggerNodeChanges:r,triggerEdgeChanges:a}=m();t?a(e.map(e=>K(e,!0))):(a(Y(n,new Set([...e]))),r(Y(o,new Set,!0)))},unselectNodesAndEdges:({nodes:e,edges:t}={})=>{let{edges:n,nodes:o,nodeLookup:r,triggerNodeChanges:a,triggerEdgeChanges:i}=m(),l=[];for(let t of e||o){if(!t.selected)continue;let e=r.get(t.id);e&&(e.selected=!1),l.push(K(t.id,!1))}let s=[];for(let e of t||n)e.selected&&s.push(K(e.id,!1));a(l),i(s)},setMinZoom:e=>{let{panZoom:t,maxZoom:n}=m();t?.setScaleExtent([e,n]),d({minZoom:e})},setMaxZoom:e=>{let{panZoom:t,minZoom:n}=m();t?.setScaleExtent([n,e]),d({maxZoom:e})},setTranslateExtent:e=>{m().panZoom?.setTranslateExtent(e),d({translateExtent:e})},resetSelectedElements:()=>{let{edges:e,nodes:t,triggerNodeChanges:n,triggerEdgeChanges:o,elementsSelectable:r}=m();if(!r)return;let a=t.reduce((e,t)=>t.selected?[...e,K(t.id,!1)]:e,[]),i=e.reduce((e,t)=>t.selected?[...e,K(t.id,!1)]:e,[]);n(a),o(i)},setNodeExtent:e=>{let{nodes:t,nodeLookup:n,parentLookup:o,nodeOrigin:r,elevateNodesOnSelect:a,nodeExtent:i,zIndexMode:l}=m();(e[0][0]!==i[0][0]||e[0][1]!==i[0][1]||e[1][0]!==i[1][0]||e[1][1]!==i[1][1])&&((0,s.bi)(t,n,o,{nodeOrigin:r,nodeExtent:e,elevateNodesOnSelect:a,checkEquality:!1,zIndexMode:l}),d({nodeExtent:e}))},panBy:e=>{let{transform:t,width:n,height:o,panZoom:r,translateExtent:a}=m();return(0,s.No)({delta:e,panZoom:r,transform:t,translateExtent:a,width:n,height:o})},setCenter:async(e,t,n)=>{let{width:o,height:r,maxZoom:a,panZoom:i}=m();if(!i)return!1;let l=void 0!==n?.zoom?n.zoom:a;return await i.setViewport({x:o/2-e*l,y:r/2-t*l,zoom:l},{duration:n?.duration,ease:n?.ease,interpolate:n?.interpolate}),!0},cancelConnection:()=>{d({connection:{...s.bK}})},updateConnection:e=>{d({connection:e})},reset:()=>d({...ty()})}},Object.is))({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,width:r,height:l,fitView:p,minZoom:c,maxZoom:u,fitViewOptions:g,nodeOrigin:m,nodeExtent:h,zIndexMode:y}));return(0,a.jsx)(f,{value:b,children:(0,a.jsx)(eo,{children:x})})}function tb({children:e,nodes:t,edges:n,defaultNodes:o,defaultEdges:r,width:l,height:s,fitView:d,fitViewOptions:c,minZoom:u,maxZoom:f,nodeOrigin:p,nodeExtent:m,zIndexMode:h}){return(0,i.useContext)(g)?(0,a.jsx)(a.Fragment,{children:e}):(0,a.jsx)(tx,{initialNodes:t,initialEdges:n,defaultNodes:o,defaultEdges:r,initialWidth:l,initialHeight:s,fitView:d,initialFitViewOptions:c,initialMinZoom:u,initialMaxZoom:f,nodeOrigin:p,nodeExtent:m,zIndexMode:h,children:e})}let tv={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};var tw=J(function({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,className:r,nodeTypes:d,edgeTypes:c,onNodeClick:u,onEdgeClick:g,onInit:f,onMove:p,onMoveStart:m,onMoveEnd:h,onConnect:y,onConnectStart:x,onConnectEnd:b,onClickConnectStart:v,onClickConnectEnd:w,onNodeMouseEnter:S,onNodeMouseMove:C,onNodeMouseLeave:k,onNodeContextMenu:M,onNodeDoubleClick:P,onNodeDragStart:j,onNodeDrag:_,onNodeDragStop:D,onNodesDelete:O,onEdgesDelete:L,onDelete:z,onSelectionChange:V,onSelectionDragStart:H,onSelectionDrag:F,onSelectionDragStop:T,onSelectionContextMenu:Z,onSelectionStart:X,onSelectionEnd:W,onBeforeDelete:K,connectionMode:Y,connectionLineType:Q=s.Do.Bezier,connectionLineStyle:U,connectionLineComponent:q,connectionLineContainerStyle:G,deleteKeyCode:J="Backspace",selectionKeyCode:ee="Shift",selectionOnDrag:et=!1,selectionMode:en=s.Qc.Full,panActivationKeyCode:eo="Space",multiSelectionKeyCode:er=(0,s.Ue)()?"Meta":"Control",zoomActivationKeyCode:ea=(0,s.Ue)()?"Meta":"Control",snapToGrid:ei,snapGrid:el,onlyRenderVisibleElements:es=!1,selectNodesOnDrag:ed,nodesDraggable:ec,autoPanOnNodeFocus:eu,nodesConnectable:eg,nodesFocusable:ef,nodeOrigin:ep=R,edgesFocusable:em,edgesReconnectable:eh,elementsSelectable:ey=!0,defaultViewport:ex=I,minZoom:eb=.5,maxZoom:ev=2,translateExtent:ew=s.ZO,preventScrolling:eS=!0,nodeExtent:eC,defaultMarkerColor:eE="#b1b1b7",zoomOnScroll:ek=!0,zoomOnPinch:eN=!0,panOnScroll:eM=!1,panOnScrollSpeed:eP=.5,panOnScrollMode:ej=s.ny.Free,zoomOnDoubleClick:e_=!0,panOnDrag:eD=!0,onPaneClick:eA,onPaneMouseEnter:eR,onPaneMouseMove:eI,onPaneMouseLeave:eO,onPaneScroll:eL,onPaneContextMenu:ez,paneClickDistance:e$=1,nodeClickDistance:eB=0,children:eV,onReconnect:eH,onReconnectStart:eF,onReconnectEnd:eT,onEdgeContextMenu:eZ,onEdgeDoubleClick:eX,onEdgeMouseEnter:eW,onEdgeMouseMove:eK,onEdgeMouseLeave:eY,reconnectRadius:eQ=10,onNodesChange:eU,onEdgesChange:eq,noDragClassName:eG="nodrag",noWheelClassName:eJ="nowheel",noPanClassName:e0="nopan",fitView:e1,fitViewOptions:e3,connectOnClick:e2,attributionPosition:e4,proOptions:e5,defaultEdgeOptions:e6,elevateNodesOnSelect:e7=!0,elevateEdgesOnSelect:e8=!1,disableKeyboardA11y:e9=!1,autoPanOnConnect:te,autoPanOnNodeDrag:tt,autoPanOnSelection:tn=!0,autoPanSpeed:to,connectionRadius:tr,isValidConnection:ta,onError:ti,style:tl,id:ts,nodeDragThreshold:td,connectionDragThreshold:tc,viewport:tu,onViewportChange:tg,width:tf,height:tp,colorMode:th="light",debug:ty,onScroll:tx,ariaLabelConfig:tw,zIndexMode:tS="basic",...tC},tE){let tk=ts||"1",tN=function(e){let[t,n]=(0,i.useState)("system"===e?null:e);return(0,i.useEffect)(()=>{if("system"!==e)return void n(e);let t=B(),o=()=>n(t?.matches?"dark":"light");return o(),t?.addEventListener("change",o),()=>{t?.removeEventListener("change",o)}},[e]),null!==t?t:B()?.matches?"dark":"light"}(th),tM=(0,i.useCallback)(e=>{e.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),tx?.(e)},[tx]);return(0,a.jsx)("div",{"data-testid":"rf__wrapper",...tC,onScroll:tM,style:{...tl,...tv},ref:tE,className:(0,l.A)(["react-flow",r,tN]),id:ts,role:"application",children:(0,a.jsxs)(tb,{nodes:e,edges:t,width:tf,height:tp,fitView:e1,fitViewOptions:e3,minZoom:eb,maxZoom:ev,nodeOrigin:ep,nodeExtent:eC,zIndexMode:tS,children:[(0,a.jsx)($,{nodes:e,edges:t,defaultNodes:n,defaultEdges:o,onConnect:y,onConnectStart:x,onConnectEnd:b,onClickConnectStart:v,onClickConnectEnd:w,nodesDraggable:ec,autoPanOnNodeFocus:eu,nodesConnectable:eg,nodesFocusable:ef,edgesFocusable:em,edgesReconnectable:eh,elementsSelectable:ey,elevateNodesOnSelect:e7,elevateEdgesOnSelect:e8,minZoom:eb,maxZoom:ev,nodeExtent:eC,onNodesChange:eU,onEdgesChange:eq,snapToGrid:ei,snapGrid:el,connectionMode:Y,translateExtent:ew,connectOnClick:e2,defaultEdgeOptions:e6,fitView:e1,fitViewOptions:e3,onNodesDelete:O,onEdgesDelete:L,onDelete:z,onNodeDragStart:j,onNodeDrag:_,onNodeDragStop:D,onSelectionDrag:F,onSelectionDragStart:H,onSelectionDragStop:T,onMove:p,onMoveStart:m,onMoveEnd:h,noPanClassName:e0,nodeOrigin:ep,rfId:tk,autoPanOnConnect:te,autoPanOnNodeDrag:tt,autoPanSpeed:to,onError:ti,connectionRadius:tr,isValidConnection:ta,selectNodesOnDrag:ed,nodeDragThreshold:td,connectionDragThreshold:tc,onBeforeDelete:K,debug:ty,ariaLabelConfig:tw,zIndexMode:tS}),(0,a.jsx)(tm,{onInit:f,onNodeClick:u,onEdgeClick:g,onNodeMouseEnter:S,onNodeMouseMove:C,onNodeMouseLeave:k,onNodeContextMenu:M,onNodeDoubleClick:P,nodeTypes:d,edgeTypes:c,connectionLineType:Q,connectionLineStyle:U,connectionLineComponent:q,connectionLineContainerStyle:G,selectionKeyCode:ee,selectionOnDrag:et,selectionMode:en,deleteKeyCode:J,multiSelectionKeyCode:er,panActivationKeyCode:eo,zoomActivationKeyCode:ea,onlyRenderVisibleElements:es,defaultViewport:ex,translateExtent:ew,minZoom:eb,maxZoom:ev,preventScrolling:eS,zoomOnScroll:ek,zoomOnPinch:eN,zoomOnDoubleClick:e_,panOnScroll:eM,panOnScrollSpeed:eP,panOnScrollMode:ej,panOnDrag:eD,autoPanOnSelection:tn,onPaneClick:eA,onPaneMouseEnter:eR,onPaneMouseMove:eI,onPaneMouseLeave:eO,onPaneScroll:eL,onPaneContextMenu:ez,paneClickDistance:e$,nodeClickDistance:eB,onSelectionContextMenu:Z,onSelectionStart:X,onSelectionEnd:W,onReconnect:eH,onReconnectStart:eF,onReconnectEnd:eT,onEdgeContextMenu:eZ,onEdgeDoubleClick:eX,onEdgeMouseEnter:eW,onEdgeMouseMove:eK,onEdgeMouseLeave:eY,reconnectRadius:eQ,defaultMarkerColor:eE,noDragClassName:eG,noWheelClassName:eJ,noPanClassName:e0,rfId:tk,disableKeyboardA11y:e9,nodeExtent:eC,viewport:tu,onViewportChange:tg}),(0,a.jsx)(A,{onSelectionChange:V}),eV,(0,a.jsx)(N,{proOptions:e5,position:e4}),(0,a.jsx)(E,{rfId:tk,disableKeyboardA11y:e9})]})})});let tS=e=>e.domNode?.querySelector(".react-flow__edgelabel-renderer");function tC({children:e}){let t=m(tS);return t?(0,u.createPortal)(e,t):null}let tE=e=>e.domNode?.querySelector(".react-flow__viewport-portal");function tk({children:e}){let t=m(tE);return t?(0,u.createPortal)(e,t):null}function tN(e){let[t,n]=(0,i.useState)(e),o=(0,i.useCallback)(e=>n(t=>Z(e,t)),[]);return[t,n,o]}function tM(e){return m((0,i.useCallback)(t=>t.nodeLookup.get(e),[e]),c.x)}function tP({dimensions:e,lineWidth:t,variant:n,className:o}){return(0,a.jsx)("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:(0,l.A)(["react-flow__background-pattern",n,o])})}function tj({radius:e,className:t}){return(0,a.jsx)("circle",{cx:e,cy:e,r:e,className:(0,l.A)(["react-flow__background-pattern","dots",t])})}s.xc.error014(),(o=r||(r={})).Lines="lines",o.Dots="dots",o.Cross="cross";let t_={[r.Dots]:1,[r.Lines]:1,[r.Cross]:6},tD=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function tA({id:e,variant:t=r.Dots,gap:n=20,size:o,lineWidth:s=1,offset:d=0,color:u,bgColor:g,style:f,className:p,patternClassName:h}){let y=(0,i.useRef)(null),{transform:x,patternId:b}=m(tD,c.x),v=o||t_[t],w=t===r.Dots,S=t===r.Cross,C=Array.isArray(n)?n:[n,n],E=[C[0]*x[2]||1,C[1]*x[2]||1],k=v*x[2],N=Array.isArray(d)?d:[d,d],M=S?[k,k]:E,P=[N[0]*x[2]||1+M[0]/2,N[1]*x[2]||1+M[1]/2],j=`${b}${e||""}`;return(0,a.jsxs)("svg",{className:(0,l.A)(["react-flow__background",p]),style:{...f,...es,"--xy-background-color-props":g,"--xy-background-pattern-color-props":u},ref:y,"data-testid":"rf__background",children:[(0,a.jsx)("pattern",{id:j,x:x[0]%E[0],y:x[1]%E[1],width:E[0],height:E[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${P[0]},-${P[1]})`,children:w?(0,a.jsx)(tj,{radius:k/2,className:h}):(0,a.jsx)(tP,{dimensions:M,lineWidth:s,variant:t,className:h})}),(0,a.jsx)("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${j})`})]})}tA.displayName="Background";let tR=(0,i.memo)(tA);function tI(){return(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:(0,a.jsx)("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function tO(){return(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:(0,a.jsx)("path",{d:"M0 0h32v4.2H0z"})})}function tL(){return(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:(0,a.jsx)("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function tz(){return(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:(0,a.jsx)("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function t$(){return(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:(0,a.jsx)("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function tB({children:e,className:t,...n}){return(0,a.jsx)("button",{type:"button",className:(0,l.A)(["react-flow__controls-button",t]),...n,children:e})}let tV=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function tH({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:o=!0,fitViewOptions:r,onZoomIn:i,onZoomOut:s,onFitView:d,onInteractiveChange:u,className:g,children:f,position:p="bottom-left",orientation:y="vertical","aria-label":x}){let b=h(),{isInteractive:v,minZoomReached:w,maxZoomReached:S,ariaLabelConfig:C}=m(tV,c.x),{zoomIn:E,zoomOut:N,fitView:M}=ea();return(0,a.jsxs)(k,{className:(0,l.A)(["react-flow__controls","horizontal"===y?"horizontal":"vertical",g]),position:p,style:e,"data-testid":"rf__controls","aria-label":x??C["controls.ariaLabel"],children:[t&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(tB,{onClick:()=>{E(),i?.()},className:"react-flow__controls-zoomin",title:C["controls.zoomIn.ariaLabel"],"aria-label":C["controls.zoomIn.ariaLabel"],disabled:S,children:(0,a.jsx)(tI,{})}),(0,a.jsx)(tB,{onClick:()=>{N(),s?.()},className:"react-flow__controls-zoomout",title:C["controls.zoomOut.ariaLabel"],"aria-label":C["controls.zoomOut.ariaLabel"],disabled:w,children:(0,a.jsx)(tO,{})})]}),n&&(0,a.jsx)(tB,{className:"react-flow__controls-fitview",onClick:()=>{M(r),d?.()},title:C["controls.fitView.ariaLabel"],"aria-label":C["controls.fitView.ariaLabel"],children:(0,a.jsx)(tL,{})}),o&&(0,a.jsx)(tB,{className:"react-flow__controls-interactive",onClick:()=>{b.setState({nodesDraggable:!v,nodesConnectable:!v,elementsSelectable:!v}),u?.(!v)},title:C["controls.interactive.ariaLabel"],"aria-label":C["controls.interactive.ariaLabel"],children:v?(0,a.jsx)(t$,{}):(0,a.jsx)(tz,{})}),f]})}tH.displayName="Controls";let tF=(0,i.memo)(tH),tT=(0,i.memo)(function({id:e,x:t,y:n,width:o,height:r,style:i,color:s,strokeColor:d,strokeWidth:c,className:u,borderRadius:g,shapeRendering:f,selected:p,onClick:m}){let{background:h,backgroundColor:y}=i||{};return(0,a.jsx)("rect",{className:(0,l.A)(["react-flow__minimap-node",{selected:p},u]),x:t,y:n,rx:g,ry:g,width:o,height:r,style:{fill:s||h||y,stroke:d,strokeWidth:c},shapeRendering:f,onClick:m?t=>m(t,e):void 0})}),tZ=e=>e.nodes.map(e=>e.id),tX=e=>e instanceof Function?e:()=>e,tW=(0,i.memo)(function({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:o,nodeBorderRadius:r,nodeStrokeWidth:i,shapeRendering:l,NodeComponent:d,onClick:u}){let{node:g,x:f,y:p,width:h,height:y}=m(t=>{let n=t.nodeLookup.get(e);if(!n)return{node:void 0,x:0,y:0,width:0,height:0};let o=n.internals.userNode,{x:r,y:a}=n.internals.positionAbsolute,{width:i,height:l}=(0,s.uD)(o);return{node:o,x:r,y:a,width:i,height:l}},c.x);return g&&!g.hidden&&(0,s.QE)(g)?(0,a.jsx)(d,{x:f,y:p,width:h,height:y,style:g.style,selected:!!g.selected,className:o(g),color:t(g),borderRadius:r,strokeColor:n(g),strokeWidth:i,shapeRendering:l,onClick:u,id:g.id}):null});var tK=(0,i.memo)(function({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:o=5,nodeStrokeWidth:r,nodeComponent:i=tT,onClick:l}){let s=m(tZ,c.x),d=tX(t),u=tX(e),g=tX(n),f="u"<typeof window||window.chrome?"crispEdges":"geometricPrecision";return(0,a.jsx)(a.Fragment,{children:s.map(e=>(0,a.jsx)(tW,{id:e,nodeColorFunc:d,nodeStrokeColorFunc:u,nodeClassNameFunc:g,nodeBorderRadius:o,nodeStrokeWidth:r,NodeComponent:i,onClick:l,shapeRendering:f},e))})});let tY=e=>!e.hidden,tQ=e=>{let t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?(0,s.Mi)((0,s.aZ)(e.nodeLookup,{filter:tY}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}};function tU({style:e,className:t,nodeStrokeColor:n,nodeColor:o,nodeClassName:r="",nodeBorderRadius:d=5,nodeStrokeWidth:u,nodeComponent:g,bgColor:f,maskColor:p,maskStrokeColor:y,maskStrokeWidth:x,position:b="bottom-right",onClick:v,onNodeClick:w,pannable:S=!1,zoomable:C=!1,ariaLabel:E,inversePan:N,zoomStep:M=1,offsetScale:P=5}){let j=h(),_=(0,i.useRef)(null),{boundingRect:D,viewBB:A,rfId:R,panZoom:I,translateExtent:O,flowWidth:L,flowHeight:z,ariaLabelConfig:$}=m(tQ,c.x),B=e?.width??200,V=e?.height??150,H=Math.max(D.width/B,D.height/V),F=H*B,T=H*V,Z=P*H,X=D.x-(F-D.width)/2-Z,W=D.y-(T-D.height)/2-Z,K=F+2*Z,Y=T+2*Z,Q=`react-flow__minimap-desc-${R}`,U=(0,i.useRef)(0),q=(0,i.useRef)();U.current=H,(0,i.useEffect)(()=>{if(_.current&&I)return q.current=(0,s.di)({domNode:_.current,panZoom:I,getTransform:()=>j.getState().transform,getViewScale:()=>U.current}),()=>{q.current?.destroy()}},[I]),(0,i.useEffect)(()=>{q.current?.update({translateExtent:O,width:L,height:z,inversePan:N,pannable:S,zoomStep:M,zoomable:C})},[S,C,N,M,O,L,z]);let G=v?e=>{let[t,n]=q.current?.pointer(e)||[0,0];v(e,{x:t,y:n})}:void 0,J=w?(0,i.useCallback)((e,t)=>{w(e,j.getState().nodeLookup.get(t).internals.userNode)},[]):void 0,ee=E??$["minimap.ariaLabel"];return(0,a.jsx)(k,{position:b,style:{...e,"--xy-minimap-background-color-props":"string"==typeof f?f:void 0,"--xy-minimap-mask-background-color-props":"string"==typeof p?p:void 0,"--xy-minimap-mask-stroke-color-props":"string"==typeof y?y:void 0,"--xy-minimap-mask-stroke-width-props":"number"==typeof x?x*H:void 0,"--xy-minimap-node-background-color-props":"string"==typeof o?o:void 0,"--xy-minimap-node-stroke-color-props":"string"==typeof n?n:void 0,"--xy-minimap-node-stroke-width-props":"number"==typeof u?u:void 0},className:(0,l.A)(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:(0,a.jsxs)("svg",{width:B,height:V,viewBox:`${X} ${W} ${K} ${Y}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":Q,ref:_,onClick:G,children:[ee&&(0,a.jsx)("title",{id:Q,children:ee}),(0,a.jsx)(tK,{onClick:J,nodeColor:o,nodeStrokeColor:n,nodeBorderRadius:d,nodeClassName:r,nodeStrokeWidth:u,nodeComponent:g}),(0,a.jsx)("path",{className:"react-flow__minimap-mask",d:`M${X-Z},${W-Z}h${K+2*Z}v${Y+2*Z}h${-K-2*Z}z
2
- M${A.x},${A.y}h${A.width}v${A.height}h${-A.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}tU.displayName="MiniMap";let tq=(0,i.memo)(tU);s.xN.Line,s.xN.Handle}}]);