@worldresources/wri-design-systems 2.201.0 → 2.201.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +299 -299
- package/dist/index.d.ts +2 -1
- package/dist/index.esm.js +299 -299
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -180,11 +180,11 @@
|
|
|
180
180
|
font-weight: 400;
|
|
181
181
|
color: ${w("neutral",700)};
|
|
182
182
|
}
|
|
183
|
-
`,xm=({item:t,isChecked:n
|
|
183
|
+
`,xm=({item:t,isChecked:n,labels:o})=>{return r.jsxs(r.Fragment,{children:[t.startIcon,r.jsxs("div",{css:(s=!!t.startIcon,a=!!t.endIcon,i.css`
|
|
184
184
|
width: 100%;
|
|
185
185
|
margin-left: ${s?k(200):"0"};
|
|
186
186
|
margin-right: ${a?k(200):"0"};
|
|
187
|
-
`),children:[r.jsxs("div",{css:ym(n),children:[r.jsx("p",{className:"ds-menu-item-label",children:t.label}),t.command?r.jsx(e.Menu.ItemCommand,{"aria-label":`${o.shortcutPrefix} ${t.command}`,children:t.command}):null]}),t.caption?r.jsx("p",{className:"ds-menu-item-caption",children:t.caption}):null]}),n?r.jsx(Rf,{}):t.endIcon]})
|
|
187
|
+
`),children:[r.jsxs("div",{css:ym(n),children:[r.jsx("p",{className:"ds-menu-item-label",children:t.label}),t.command?r.jsx(e.Menu.ItemCommand,{"aria-label":`${o.shortcutPrefix} ${t.command}`,children:t.command}):null]}),t.caption?r.jsx("p",{className:"ds-menu-item-caption",children:t.caption}):null]}),n?r.jsx(Rf,{}):t.endIcon]});var s,a},wm=(e,t,n)=>e.children?e.children:e.link?r.jsx("a",{href:e.link,"aria-disabled":e.disabled||void 0,tabIndex:e.disabled?-1:void 0,onClick:t=>{e.disabled&&t.preventDefault()},style:{textDecoration:"none",color:"inherit"},children:r.jsx(xm,{item:e,isChecked:t,labels:n})}):r.jsx(xm,{item:e,isChecked:t,labels:n}),Cm=({item:t,isChecked:n=!1,labels:o})=>r.jsx(e.Menu.Item,{css:bm,value:t.value||t.label||"",disabled:t.disabled,role:"menuitem","aria-label":t.label,asChild:!!t.link&&!t.children,children:wm(t,n,o)}),km=(e,t)=>i.css`
|
|
188
188
|
display: flex;
|
|
189
189
|
align-items: center;
|
|
190
190
|
justify-content: center;
|
|
@@ -208,7 +208,7 @@
|
|
|
208
208
|
outline-style: solid;
|
|
209
209
|
outline-width: ${j(200)};
|
|
210
210
|
}
|
|
211
|
-
`,
|
|
211
|
+
`,Sm=i.css`
|
|
212
212
|
position: absolute;
|
|
213
213
|
left: 1rem;
|
|
214
214
|
width: 1rem;
|
|
@@ -236,7 +236,7 @@
|
|
|
236
236
|
border-bottom: ${j(100)} solid
|
|
237
237
|
${w("neutral",600)};
|
|
238
238
|
}
|
|
239
|
-
|
|
239
|
+
`,$m=(e="14rem")=>i.css`
|
|
240
240
|
width: ${"content"===e?"max-content":e};
|
|
241
241
|
border: ${j(100)} solid ${w("neutral",600)};
|
|
242
242
|
box-shadow: 0 0.25rem 0.375rem -0.25rem #0000001a;
|
|
@@ -245,7 +245,7 @@
|
|
|
245
245
|
display: flex;
|
|
246
246
|
flex-direction: column;
|
|
247
247
|
gap: ${k(200)};
|
|
248
|
-
`,
|
|
248
|
+
`,jm=i.css`
|
|
249
249
|
display: flex;
|
|
250
250
|
justify-content: space-between;
|
|
251
251
|
align-items: center;
|
|
@@ -295,16 +295,16 @@
|
|
|
295
295
|
box-shadow: none;
|
|
296
296
|
}
|
|
297
297
|
}
|
|
298
|
-
|
|
298
|
+
`,Mm=i.css`
|
|
299
299
|
font-size: ${C(300)};
|
|
300
300
|
line-height: ${S(500)};
|
|
301
301
|
font-weight: 700;
|
|
302
302
|
color: ${w("neutral",900)};
|
|
303
|
-
`,
|
|
303
|
+
`,Em=({theme:t="light",label:o,hideArrow:i=!1,fontSize:s,items:a,groups:l,onSelect:c,customTrigger:d,selectionMode:u,defaultSelectedValues:h=[],menuWidth:p="14rem",labels:f})=>{const m=Mf("Menu",f),[g,v]=n.useState(!1),[b,y]=n.useState(new Set(h)),x=n.useRef(null);return n.useEffect((()=>{if(!g||!x.current)return;const e=new window.IntersectionObserver((([e])=>{e.isIntersecting||v(!1)}),{threshold:.01});return e.observe(x.current),()=>{e.disconnect()}}),[g]),r.jsxs(e.Menu.Root,{closeOnSelect:"multiple"!==u,onSelect:({value:e})=>{y((t=>{const n=new Set(t);return"radio"===u?(n.clear(),n.add(e)):n.has(e)?n.delete(e):n.add(e),n})),c&&c(e)},onOpenChange:({open:e})=>v(e),open:g,children:[r.jsx(e.Menu.Trigger,{css:km(t,s),asChild:!0,children:d||r.jsxs("button",{type:"button",ref:x,children:[o,r.jsx(If,{marginLeft:"0.375rem",rotate:g?"180":"0",height:"0.875rem",width:"0.875rem"})]})}),r.jsx(e.Portal,{children:r.jsx(e.Menu.Positioner,{children:r.jsxs(e.Menu.Content,{css:$m(p),role:"menu","aria-label":o||m.menuAriaLabel,children:[i?null:r.jsx("div",{css:Sm}),a?.map(((t,o)=>{if(t.submenu){const[i,s]=n.useState(!1);return r.jsxs(e.Menu.Root,{positioning:{placement:"right-start",gutter:2},onSelect:({value:e})=>c&&c(e),onOpenChange:({open:e})=>s(e),open:i,children:[r.jsxs(e.Menu.TriggerItem,{css:jm,role:"menuitem","aria-haspopup":"true","aria-expanded":i?"true":"false",children:[t.label,r.jsx(If,{rotate:"270",color:"var(--chakra-colors-neutral-700)"})]}),r.jsx(e.Portal,{children:r.jsx(e.Menu.Positioner,{children:r.jsx(e.Menu.Content,{css:$m(t.menuWidth),role:"menu","aria-label":m.submenuAriaLabel(t.label||m.menuAriaLabel),children:t.submenu.map(((e,t)=>r.jsx(Cm,{item:e,labels:m},e.value)))})})})]},`${t.value}-${o}`)}return r.jsx(Cm,{item:t,labels:m,isChecked:!!u&&b.has(t.value||t.label||"")},`${t.value}-${o}`)})),l?.map(((t,o)=>r.jsxs(n.Fragment,{children:[r.jsxs(e.Menu.ItemGroup,{role:"group","aria-labelledby":`group-${o}`,children:[r.jsx(e.Menu.ItemGroupLabel,{id:`group-${o}`,css:Mm,children:t.title}),t.items?.map((e=>r.jsx(Cm,{item:e,labels:m,isChecked:!!u&&b.has(e.value||e.label||"")},e.value)))]}),o!==l.length-1?r.jsx(e.Menu.Separator,{borderColor:"var(--chakra-colors-neutral-300)"}):null]},t.title)))]})})})]})},Tm=i.css`
|
|
304
304
|
&:focus-visible {
|
|
305
305
|
outline: none;
|
|
306
306
|
}
|
|
307
|
-
`,
|
|
307
|
+
`,Om=e=>i.css`
|
|
308
308
|
background-color: ${w("neutral",800)};
|
|
309
309
|
border-radius: ${$(300)};
|
|
310
310
|
border: ${j(100)} solid ${w("neutral",800)};
|
|
@@ -320,7 +320,7 @@
|
|
|
320
320
|
}
|
|
321
321
|
|
|
322
322
|
${"text"===e&&`\n background-color: transparent;\n border: none;\n box-shadow: none;\n color: ${w("neutral",800)};\n font-size: ${C(400)};\n line-height: ${S(600)};\n text-shadow: 0 0 ${j(100)} ${w("neutral",100)};\n `}
|
|
323
|
-
`,Tm=({children:t,content:o,showArrow:i=!0,disabled:s,position:a="bottom",variant:l="pill",portalRef:c,openDelay:d=0,closeDelay:u=0})=>{const[h,p]=n.useState(!1);return s?t:r.jsxs(e.Tooltip.Root,{positioning:{placement:a,offset:"pill"===l?void 0:{mainAxis:0,crossAxis:0}},openDelay:d,closeDelay:u,open:h,onOpenChange:({open:e})=>p(e),children:[r.jsx(e.Tooltip.Trigger,{tabIndex:0,onClick:()=>p(!0),css:Mm,children:t}),r.jsx(e.Portal,{disabled:s,container:c,children:r.jsx(e.Tooltip.Positioner,{children:r.jsxs(e.Tooltip.Content,{css:Em(l),children:[i&&"pill"===l?r.jsx(e.Tooltip.Arrow,{children:r.jsx(e.Tooltip.ArrowTip,{})}):null,o]})})})]})},Om=e=>{const{icon:n,label:r,active:o,...i}=e;return t.jsx(Tm,{content:r,children:t.jsx(Of,{icon:t.jsx("span",{"data-rte-icon":"true",children:n}),"aria-label":r,"aria-pressed":o,onMouseDown:e=>{e.preventDefault()},...i})})};function Lm(e){const{label:n,icon:r,isDisabled:o,isActive:i,command:s}=e,a=e=>{const{editor:a,disabled:l}=xf();if(!a)return null;const{label:c,icon:d,...u}=e,h=c||n,p=l||!!o&&o(a),f=!!i&&i(a);return t.jsx(Om,{label:h,icon:d||t.jsx(r,{}),active:f,onClick:()=>s(a),disabled:p,...u})};return a.displayName=`BooleanControl(${n})`,a}function Am(n){const{label:r,options:o,getValue:i,command:s,isDisabled:a}=n,l=({label:n}={})=>{const{editor:l,disabled:c}=xf();if(!l)return null;const d=n||r,u=i(l),h=c||!!a&&a(l),p=o.find((e=>e.value===u));return t.jsx(jm,{label:d,hideArrow:!0,items:o.map((e=>({label:e.label,value:e.value,disabled:h}))),onSelect:e=>{h||s(l,e)},customTrigger:t.jsx(e.Box,{css:{"& button":{fontWeight:"normal"},'&[data-part="trigger"]':{padding:0}},children:t.jsx(Ef,{variant:"secondary",size:"small",disabled:h,label:p?.label||d,"aria-label":`${d}: ${p?.label||d}`,rightIcon:t.jsx(If,{width:"0.875rem",height:"0.875rem"}),borderColor:w("neutral",400)})})})};return l.displayName=`OptionControl(${r})`,l}const Rm=Am({label:"Text Type",options:[{value:"normalText",label:"Normal text"},{value:"heading1",label:"Heading 1"},{value:"heading2",label:"Heading 2"},{value:"heading3",label:"Heading 3"},{value:"blockquote",label:"Quote"},{value:"divider",label:"Divider"}],getValue:e=>e.isActive("heading",{level:1})?"heading1":e.isActive("heading",{level:2})?"heading2":e.isActive("heading",{level:3})?"heading3":e.isActive("blockquote")?"blockquote":"normalText",command:(e,t)=>{"normalText"!==t?"heading1"!==t?"heading2"!==t?"heading3"!==t?"blockquote"!==t?"divider"===t&&e.chain().focus().setHorizontalRule().run():e.isActive("blockquote")||e.chain().focus().toggleBlockquote().run():e.chain().focus().setHeading({level:3}).run():e.chain().focus().setHeading({level:2}).run():e.chain().focus().setHeading({level:1}).run():e.chain().focus().setParagraph().run()}}),Nm=Am({label:"Font Size",options:[{value:"12px",label:"12px"},{value:"14px",label:"14px"},{value:"16px",label:"16px"},{value:"18px",label:"18px"}],getValue:e=>e.getAttributes("textStyle")?.fontSize||"16px",command:(e,t)=>{e.chain().focus().setFontSize(t).run()}}),Dm=Lm({label:"Bold",icon:n=>t.jsx(e.Icon,{...n,children:t.jsx("svg",{width:"11.2552",height:"14",viewBox:"0 0 11.2552 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M7.19444 14H0V0H6.61111C7.39057 4.63933e-05 8.15373 0.223185 8.81044 0.643056C9.46714 1.06293 9.98996 1.66199 10.3171 2.36946C10.6443 3.07694 10.7621 3.86327 10.6567 4.63557C10.5513 5.40787 10.227 6.13386 9.72222 6.72778C10.3816 7.25508 10.8612 7.97379 11.0952 8.78497C11.3292 9.59616 11.3061 10.4599 11.0289 11.2574C10.7517 12.0548 10.2341 12.7468 9.54742 13.2379C8.86074 13.7291 8.03869 13.9953 7.19444 14ZM2.33333 11.6667H7.17889C7.4087 11.6667 7.63626 11.6214 7.84858 11.5335C8.0609 11.4455 8.25382 11.3166 8.41633 11.1541C8.57883 10.9916 8.70773 10.7987 8.79568 10.5864C8.88362 10.374 8.92889 10.1465 8.92889 9.91667C8.92889 9.68685 8.88362 9.45929 8.79568 9.24697C8.70773 9.03465 8.57883 8.84173 8.41633 8.67923C8.25382 8.51673 8.0609 8.38782 7.84858 8.29988C7.63626 8.21193 7.4087 8.16667 7.17889 8.16667H2.33333V11.6667ZM2.33333 5.83333H6.61111C6.84092 5.83333 7.06849 5.78807 7.28081 5.70012C7.49313 5.61218 7.68604 5.48327 7.84855 5.32077C8.01105 5.15827 8.13995 4.96535 8.2279 4.75303C8.31585 4.54071 8.36111 4.31315 8.36111 4.08333C8.36111 3.85352 8.31585 3.62596 8.2279 3.41364C8.13995 3.20132 8.01105 3.0084 7.84855 2.8459C7.68604 2.68339 7.49313 2.55449 7.28081 2.46654C7.06849 2.3786 6.84092 2.33333 6.61111 2.33333H2.33333V5.83333Z",fill:"black",stroke:"none"})})}),command:e=>e.chain().focus().toggleBold().run(),isActive:e=>e.isActive("bold")}),Im=Lm({label:"Italic",icon:n=>t.jsx(e.Icon,{...n,children:t.jsx("svg",{width:"13",height:"13",viewBox:"0 0 13 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M13 1.44444V0H3.61111V1.44444H7.32333L4.16722 11.5556H0V13H9.38889V11.5556H5.67667L8.83278 1.44444H13Z",fill:"black",stroke:"none"})})}),command:e=>e.chain().focus().toggleItalic().run(),isActive:e=>e.isActive("italic")}),Pm=Lm({label:"Underline",icon:n=>t.jsx(e.Icon,{...n,children:t.jsx("svg",{width:"14.6087",height:"14",viewBox:"0 0 14.6087 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M0 12.7826H14.6087V14H0V12.7826ZM7.30435 10.9565C6.1743 10.9565 5.09053 10.5076 4.29146 9.70854C3.49239 8.90947 3.04348 7.8257 3.04348 6.69565V0H4.26087V6.69565C4.26087 7.50283 4.58152 8.27695 5.15228 8.84772C5.72305 9.41848 6.49717 9.73913 7.30435 9.73913C8.11153 9.73913 8.88565 9.41848 9.45641 8.84772C10.0272 8.27695 10.3478 7.50283 10.3478 6.69565V0H11.5652V6.69565C11.5652 7.8257 11.1163 8.90947 10.3172 9.70854C9.51817 10.5076 8.4344 10.9565 7.30435 10.9565V10.9565Z",fill:"black",stroke:"none"})})}),command:e=>e.chain().focus().toggleUnderline().run(),isActive:e=>e.isActive("underline")}),zm=Lm({label:"Strikethrough",icon:n=>t.jsx(e.Icon,{...n,children:t.jsx("svg",{width:"16",height:"13.3507",viewBox:"0 0 16 13.3507",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M16 6.01707H9.304C9.00798 5.93748 8.7106 5.86302 8.412 5.79374C6.54 5.35107 5.48133 5.02707 5.48133 3.51174C5.46613 3.25015 5.50486 2.98823 5.59512 2.74224C5.68537 2.49624 5.82523 2.27143 6.006 2.08174C6.57226 1.61607 7.28154 1.35948 8.01467 1.35507C9.90133 1.30841 10.7713 1.94841 11.4827 2.92174L12.5593 2.13507C12.0554 1.41131 11.3683 0.834307 10.5683 0.463013C9.76831 0.0917179 8.8841 -0.0605588 8.006 0.0217402C6.92734 0.0286269 5.88679 0.421436 5.07267 1.12907C4.7641 1.44207 4.52292 1.81496 4.364 2.22475C4.20509 2.63454 4.1318 3.07254 4.14867 3.51174C4.11943 3.99233 4.20971 4.47268 4.41143 4.90986C4.61316 5.34704 4.92004 5.72744 5.30467 6.01707H0V7.35041H9.10133C10.4127 7.73041 11.1967 8.22507 11.2167 9.58907C11.2383 9.88044 11.1984 10.1731 11.0993 10.448C11.0003 10.7229 10.8445 10.9738 10.642 11.1844C9.93654 11.7405 9.0601 12.0348 8.162 12.0171C7.49168 11.9977 6.83454 11.8261 6.24031 11.5152C5.64608 11.2044 5.1303 10.7626 4.732 10.2231L3.71 11.0791C4.22782 11.7691 4.89593 12.3323 5.6637 12.7258C6.43148 13.1194 7.27876 13.3329 8.14133 13.3504H8.208C9.43919 13.3645 10.6341 12.934 11.5733 12.1377C11.9067 11.8017 12.1658 11.3994 12.334 10.957C12.5023 10.5145 12.5758 10.0417 12.55 9.56907C12.5749 8.76057 12.3021 7.97106 11.7833 7.35041H16V6.01707Z",fill:"black",stroke:"none"})})}),command:e=>e.chain().focus().toggleStrike().run(),isActive:e=>e.isActive("strike")});Lm({label:"Code",icon:n=>t.jsx(e.Icon,{...n,children:t.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("path",{d:"m16 18 6-6-6-6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),t.jsx("path",{d:"m8 6-6 6 6 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}),command:e=>e.chain().focus().toggleCode().run(),isActive:e=>e.isActive("code")});const Vm=Lm({label:"Bullet List",icon:n=>t.jsx(e.Icon,{...n,children:t.jsxs("svg",{width:"16",height:"12.3077",viewBox:"0 0 16 12.3077",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("path",{d:"M1.84615 3.69231C2.86576 3.69231 3.69231 2.86576 3.69231 1.84615C3.69231 0.826551 2.86576 0 1.84615 0C0.826551 0 0 0.826551 0 1.84615C0 2.86576 0.826551 3.69231 1.84615 3.69231Z",fill:"black",stroke:"none"}),t.jsx("path",{d:"M1.84615 12.3077C2.86576 12.3077 3.69231 11.4811 3.69231 10.4615C3.69231 9.44194 2.86576 8.61538 1.84615 8.61538C0.826551 8.61538 0 9.44194 0 10.4615C0 11.4811 0.826551 12.3077 1.84615 12.3077Z",fill:"black",stroke:"none"}),t.jsx("path",{d:"M7.38462 9.84615H16V11.0769H7.38462V9.84615ZM7.38462 1.23077H16V2.46154H7.38462V1.23077Z",fill:"black",stroke:"none"})]})}),command:e=>e.chain().focus().toggleBulletList().run(),isActive:e=>e.isActive("bulletList")}),Bm=Lm({label:"Ordered List",icon:n=>t.jsx(e.Icon,{...n,children:t.jsx("svg",{width:"16",height:"15",viewBox:"0 0 16 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M7.38462 11.25H16V12.5H7.38462V11.25ZM7.38462 2.5H16V3.75H7.38462V2.5ZM2.46154 5V0H1.23077V0.625H0V1.875H1.23077V5H0V6.25H3.69231V5H2.46154ZM3.69231 15H0V12.5C0 12.1685 0.12967 11.8505 0.360484 11.6161C0.591298 11.3817 0.904349 11.25 1.23077 11.25H2.46154V10H0V8.75H2.46154C2.78796 8.75 3.10101 8.8817 3.33182 9.11612C3.56264 9.35054 3.69231 9.66848 3.69231 10V11.25C3.69231 11.5815 3.56264 11.8995 3.33182 12.1339C3.10101 12.3683 2.78796 12.5 2.46154 12.5H1.23077V13.75H3.69231V15Z",fill:"black",stroke:"none"})})}),command:e=>e.chain().focus().toggleOrderedList().run(),isActive:e=>e.isActive("orderedList")}),Hm=Lm({label:"Image",icon:n=>t.jsx(e.Icon,{...n,children:t.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M1.77778 16C1.28889 16 0.87037 15.8259 0.522222 15.4778C0.174074 15.1296 0 14.7111 0 14.2222V1.77778C0 1.28889 0.174074 0.87037 0.522222 0.522222C0.87037 0.174074 1.28889 0 1.77778 0H14.2222C14.7111 0 15.1296 0.174074 15.4778 0.522222C15.8259 0.87037 16 1.28889 16 1.77778V14.2222C16 14.7111 15.8259 15.1296 15.4778 15.4778C15.1296 15.8259 14.7111 16 14.2222 16H1.77778ZM2.66667 12.4444H13.3333L10 8L7.33333 11.5556L5.33333 8.88889L2.66667 12.4444Z",fill:"black",stroke:"none"})})}),command:e=>{if("undefined"==typeof document)return;const t=document.createElement("input");t.type="file",t.accept="image/*",t.onchange=()=>{const n=t.files?.[0];if(!n)return;const r=new FileReader;r.onload=()=>{"string"==typeof r.result&&e.chain().focus().insertContent({type:"image",attrs:{src:r.result,alt:n.name}}).run()},r.readAsDataURL(n)},t.click()}}),_m=Lm({label:"Undo",icon:n=>t.jsx(e.Icon,{...n,children:t.jsx("svg",{width:"16",height:"14",viewBox:"0 0 16 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M10.6667 3.33333H2.54333L4.93467 0.942667L4 0L0 4L4 8L4.93467 7.05667L2.54533 4.66667H10.6667C11.7275 4.66667 12.7449 5.08809 13.4951 5.83824C14.2452 6.58839 14.6667 7.6058 14.6667 8.66667C14.6667 9.72753 14.2452 10.7449 13.4951 11.4951C12.7449 12.2452 11.7275 12.6667 10.6667 12.6667H5.33333V14H10.6667C12.0812 14 13.4377 13.4381 14.4379 12.4379C15.4381 11.4377 16 10.0812 16 8.66667C16 7.25218 15.4381 5.89562 14.4379 4.89543C13.4377 3.89524 12.0812 3.33333 10.6667 3.33333Z",fill:"black",stroke:"none"})})}),command:e=>e.chain().focus().undo().run(),isDisabled:e=>!e.can().undo()}),Fm=Lm({label:"Redo",icon:n=>t.jsx(e.Icon,{...n,children:t.jsx("svg",{width:"16",height:"14",viewBox:"0 0 16 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M5.33333 3.33333H13.4567L11.0653 0.942667L12 0L16 4L12 8L11.0653 7.05667L13.4547 4.66667H5.33333C4.27247 4.66667 3.25505 5.08809 2.50491 5.83824C1.75476 6.58839 1.33333 7.6058 1.33333 8.66667C1.33333 9.72753 1.75476 10.7449 2.50491 11.4951C3.25505 12.2452 4.27247 12.6667 5.33333 12.6667H10.6667V14H5.33333C3.91885 14 2.56229 13.4381 1.5621 12.4379C0.561903 11.4377 0 10.0812 0 8.66667C0 7.25218 0.561903 5.89562 1.5621 4.89543C2.56229 3.89524 3.91885 3.33333 5.33333 3.33333V3.33333Z",fill:"black",stroke:"none"})})}),command:e=>e.chain().focus().redo().run(),isDisabled:e=>!e.can().redo()}),qm={left:fm,center:mm,right:gm,justify:vm},Wm=n=>{const{editor:r,disabled:o}=xf();if(!r)return null;const{label:i="Alignment",alignLeftLabel:s="Align left",alignCenterLabel:a="Align center",alignRightLabel:l="Align right",alignJustifyLabel:c="Justify",...d}=n,u=(e=>e.isActive({textAlign:"center"})?"center":e.isActive({textAlign:"right"})?"right":e.isActive({textAlign:"justify"})?"justify":"left")(r),h=qm[u],p=[{label:s,value:"left",startIcon:t.jsx(fm,{})},{label:a,value:"center",startIcon:t.jsx(mm,{})},{label:l,value:"right",startIcon:t.jsx(gm,{})},{label:c,value:"justify",startIcon:t.jsx(vm,{})}],f=p.find((e=>e.value===u));return t.jsx(jm,{label:i,hideArrow:!0,items:p.map((e=>({...e,disabled:o}))),onSelect:e=>{o||r.chain().focus().setTextAlign(e).run()},customTrigger:t.jsx(e.Box,{css:{"& button":{fontWeight:"normal"},'&[data-part="trigger"]':{padding:0}},children:t.jsx(Ef,{variant:"secondary",size:"small",disabled:o,label:"","aria-label":`${i}: ${f?.label||i}`,leftIcon:t.jsx(e.Box,{display:"inline-flex",marginRight:k(200),children:t.jsx(h,{width:"0.875rem",height:"0.875rem"})}),rightIcon:t.jsx(If,{width:"0.875rem",height:"0.875rem"}),borderColor:w("neutral",400),...d})})})},Um=(e,t)=>i.css`
|
|
323
|
+
`,Lm=({children:t,content:o,showArrow:i=!0,disabled:s,position:a="bottom",variant:l="pill",portalRef:c,openDelay:d=0,closeDelay:u=0})=>{const[h,p]=n.useState(!1);return s?t:r.jsxs(e.Tooltip.Root,{positioning:{placement:a,offset:"pill"===l?void 0:{mainAxis:0,crossAxis:0}},openDelay:d,closeDelay:u,open:h,onOpenChange:({open:e})=>p(e),children:[r.jsx(e.Tooltip.Trigger,{tabIndex:0,onClick:()=>p(!0),css:Tm,children:t}),r.jsx(e.Portal,{disabled:s,container:c,children:r.jsx(e.Tooltip.Positioner,{children:r.jsxs(e.Tooltip.Content,{css:Om(l),children:[i&&"pill"===l?r.jsx(e.Tooltip.Arrow,{children:r.jsx(e.Tooltip.ArrowTip,{})}):null,o]})})})]})},Am=e=>{const{icon:n,label:r,active:o,...i}=e;return t.jsx(Lm,{content:r,children:t.jsx(Of,{icon:t.jsx("span",{"data-rte-icon":"true",children:n}),"aria-label":r,"aria-pressed":o,onMouseDown:e=>{e.preventDefault()},...i})})};function Rm(e){const{label:n,icon:r,isDisabled:o,isActive:i,command:s}=e,a=e=>{const{editor:a,disabled:l}=xf();if(!a)return null;const{label:c,icon:d,...u}=e,h=c||n,p=l||!!o&&o(a),f=!!i&&i(a);return t.jsx(Am,{label:h,icon:d||t.jsx(r,{}),active:f,onClick:()=>s(a),disabled:p,...u})};return a.displayName=`BooleanControl(${n})`,a}function Nm(n){const{label:r,options:o,getValue:i,command:s,isDisabled:a}=n,l=({label:n}={})=>{const{editor:l,disabled:c}=xf();if(!l)return null;const d=n||r,u=i(l),h=c||!!a&&a(l),p=o.find((e=>e.value===u));return t.jsx(Em,{label:d,hideArrow:!0,items:o.map((e=>({label:e.label,value:e.value,disabled:h}))),onSelect:e=>{h||s(l,e)},customTrigger:t.jsx(e.Box,{css:{"& button":{fontWeight:"normal"},'&[data-part="trigger"]':{padding:0}},children:t.jsx(Ef,{variant:"secondary",size:"small",disabled:h,label:p?.label||d,"aria-label":`${d}: ${p?.label||d}`,rightIcon:t.jsx(If,{width:"0.875rem",height:"0.875rem"}),borderColor:w("neutral",400)})})})};return l.displayName=`OptionControl(${r})`,l}const Dm=Nm({label:"Text Type",options:[{value:"normalText",label:"Normal text"},{value:"heading1",label:"Heading 1"},{value:"heading2",label:"Heading 2"},{value:"heading3",label:"Heading 3"},{value:"blockquote",label:"Quote"},{value:"divider",label:"Divider"}],getValue:e=>e.isActive("heading",{level:1})?"heading1":e.isActive("heading",{level:2})?"heading2":e.isActive("heading",{level:3})?"heading3":e.isActive("blockquote")?"blockquote":"normalText",command:(e,t)=>{"normalText"!==t?"heading1"!==t?"heading2"!==t?"heading3"!==t?"blockquote"!==t?"divider"===t&&e.chain().focus().setHorizontalRule().run():e.isActive("blockquote")||e.chain().focus().toggleBlockquote().run():e.chain().focus().setHeading({level:3}).run():e.chain().focus().setHeading({level:2}).run():e.chain().focus().setHeading({level:1}).run():e.chain().focus().setParagraph().run()}}),Im=Nm({label:"Font Size",options:[{value:"12px",label:"12px"},{value:"14px",label:"14px"},{value:"16px",label:"16px"},{value:"18px",label:"18px"}],getValue:e=>e.getAttributes("textStyle")?.fontSize||"16px",command:(e,t)=>{e.chain().focus().setFontSize(t).run()}}),Pm=Rm({label:"Bold",icon:n=>t.jsx(e.Icon,{...n,children:t.jsx("svg",{width:"11.2552",height:"14",viewBox:"0 0 11.2552 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M7.19444 14H0V0H6.61111C7.39057 4.63933e-05 8.15373 0.223185 8.81044 0.643056C9.46714 1.06293 9.98996 1.66199 10.3171 2.36946C10.6443 3.07694 10.7621 3.86327 10.6567 4.63557C10.5513 5.40787 10.227 6.13386 9.72222 6.72778C10.3816 7.25508 10.8612 7.97379 11.0952 8.78497C11.3292 9.59616 11.3061 10.4599 11.0289 11.2574C10.7517 12.0548 10.2341 12.7468 9.54742 13.2379C8.86074 13.7291 8.03869 13.9953 7.19444 14ZM2.33333 11.6667H7.17889C7.4087 11.6667 7.63626 11.6214 7.84858 11.5335C8.0609 11.4455 8.25382 11.3166 8.41633 11.1541C8.57883 10.9916 8.70773 10.7987 8.79568 10.5864C8.88362 10.374 8.92889 10.1465 8.92889 9.91667C8.92889 9.68685 8.88362 9.45929 8.79568 9.24697C8.70773 9.03465 8.57883 8.84173 8.41633 8.67923C8.25382 8.51673 8.0609 8.38782 7.84858 8.29988C7.63626 8.21193 7.4087 8.16667 7.17889 8.16667H2.33333V11.6667ZM2.33333 5.83333H6.61111C6.84092 5.83333 7.06849 5.78807 7.28081 5.70012C7.49313 5.61218 7.68604 5.48327 7.84855 5.32077C8.01105 5.15827 8.13995 4.96535 8.2279 4.75303C8.31585 4.54071 8.36111 4.31315 8.36111 4.08333C8.36111 3.85352 8.31585 3.62596 8.2279 3.41364C8.13995 3.20132 8.01105 3.0084 7.84855 2.8459C7.68604 2.68339 7.49313 2.55449 7.28081 2.46654C7.06849 2.3786 6.84092 2.33333 6.61111 2.33333H2.33333V5.83333Z",fill:"black",stroke:"none"})})}),command:e=>e.chain().focus().toggleBold().run(),isActive:e=>e.isActive("bold")}),zm=Rm({label:"Italic",icon:n=>t.jsx(e.Icon,{...n,children:t.jsx("svg",{width:"13",height:"13",viewBox:"0 0 13 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M13 1.44444V0H3.61111V1.44444H7.32333L4.16722 11.5556H0V13H9.38889V11.5556H5.67667L8.83278 1.44444H13Z",fill:"black",stroke:"none"})})}),command:e=>e.chain().focus().toggleItalic().run(),isActive:e=>e.isActive("italic")}),Vm=Rm({label:"Underline",icon:n=>t.jsx(e.Icon,{...n,children:t.jsx("svg",{width:"14.6087",height:"14",viewBox:"0 0 14.6087 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M0 12.7826H14.6087V14H0V12.7826ZM7.30435 10.9565C6.1743 10.9565 5.09053 10.5076 4.29146 9.70854C3.49239 8.90947 3.04348 7.8257 3.04348 6.69565V0H4.26087V6.69565C4.26087 7.50283 4.58152 8.27695 5.15228 8.84772C5.72305 9.41848 6.49717 9.73913 7.30435 9.73913C8.11153 9.73913 8.88565 9.41848 9.45641 8.84772C10.0272 8.27695 10.3478 7.50283 10.3478 6.69565V0H11.5652V6.69565C11.5652 7.8257 11.1163 8.90947 10.3172 9.70854C9.51817 10.5076 8.4344 10.9565 7.30435 10.9565V10.9565Z",fill:"black",stroke:"none"})})}),command:e=>e.chain().focus().toggleUnderline().run(),isActive:e=>e.isActive("underline")}),Bm=Rm({label:"Strikethrough",icon:n=>t.jsx(e.Icon,{...n,children:t.jsx("svg",{width:"16",height:"13.3507",viewBox:"0 0 16 13.3507",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M16 6.01707H9.304C9.00798 5.93748 8.7106 5.86302 8.412 5.79374C6.54 5.35107 5.48133 5.02707 5.48133 3.51174C5.46613 3.25015 5.50486 2.98823 5.59512 2.74224C5.68537 2.49624 5.82523 2.27143 6.006 2.08174C6.57226 1.61607 7.28154 1.35948 8.01467 1.35507C9.90133 1.30841 10.7713 1.94841 11.4827 2.92174L12.5593 2.13507C12.0554 1.41131 11.3683 0.834307 10.5683 0.463013C9.76831 0.0917179 8.8841 -0.0605588 8.006 0.0217402C6.92734 0.0286269 5.88679 0.421436 5.07267 1.12907C4.7641 1.44207 4.52292 1.81496 4.364 2.22475C4.20509 2.63454 4.1318 3.07254 4.14867 3.51174C4.11943 3.99233 4.20971 4.47268 4.41143 4.90986C4.61316 5.34704 4.92004 5.72744 5.30467 6.01707H0V7.35041H9.10133C10.4127 7.73041 11.1967 8.22507 11.2167 9.58907C11.2383 9.88044 11.1984 10.1731 11.0993 10.448C11.0003 10.7229 10.8445 10.9738 10.642 11.1844C9.93654 11.7405 9.0601 12.0348 8.162 12.0171C7.49168 11.9977 6.83454 11.8261 6.24031 11.5152C5.64608 11.2044 5.1303 10.7626 4.732 10.2231L3.71 11.0791C4.22782 11.7691 4.89593 12.3323 5.6637 12.7258C6.43148 13.1194 7.27876 13.3329 8.14133 13.3504H8.208C9.43919 13.3645 10.6341 12.934 11.5733 12.1377C11.9067 11.8017 12.1658 11.3994 12.334 10.957C12.5023 10.5145 12.5758 10.0417 12.55 9.56907C12.5749 8.76057 12.3021 7.97106 11.7833 7.35041H16V6.01707Z",fill:"black",stroke:"none"})})}),command:e=>e.chain().focus().toggleStrike().run(),isActive:e=>e.isActive("strike")});Rm({label:"Code",icon:n=>t.jsx(e.Icon,{...n,children:t.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("path",{d:"m16 18 6-6-6-6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),t.jsx("path",{d:"m8 6-6 6 6 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}),command:e=>e.chain().focus().toggleCode().run(),isActive:e=>e.isActive("code")});const Hm=Rm({label:"Bullet List",icon:n=>t.jsx(e.Icon,{...n,children:t.jsxs("svg",{width:"16",height:"12.3077",viewBox:"0 0 16 12.3077",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("path",{d:"M1.84615 3.69231C2.86576 3.69231 3.69231 2.86576 3.69231 1.84615C3.69231 0.826551 2.86576 0 1.84615 0C0.826551 0 0 0.826551 0 1.84615C0 2.86576 0.826551 3.69231 1.84615 3.69231Z",fill:"black",stroke:"none"}),t.jsx("path",{d:"M1.84615 12.3077C2.86576 12.3077 3.69231 11.4811 3.69231 10.4615C3.69231 9.44194 2.86576 8.61538 1.84615 8.61538C0.826551 8.61538 0 9.44194 0 10.4615C0 11.4811 0.826551 12.3077 1.84615 12.3077Z",fill:"black",stroke:"none"}),t.jsx("path",{d:"M7.38462 9.84615H16V11.0769H7.38462V9.84615ZM7.38462 1.23077H16V2.46154H7.38462V1.23077Z",fill:"black",stroke:"none"})]})}),command:e=>e.chain().focus().toggleBulletList().run(),isActive:e=>e.isActive("bulletList")}),_m=Rm({label:"Ordered List",icon:n=>t.jsx(e.Icon,{...n,children:t.jsx("svg",{width:"16",height:"15",viewBox:"0 0 16 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M7.38462 11.25H16V12.5H7.38462V11.25ZM7.38462 2.5H16V3.75H7.38462V2.5ZM2.46154 5V0H1.23077V0.625H0V1.875H1.23077V5H0V6.25H3.69231V5H2.46154ZM3.69231 15H0V12.5C0 12.1685 0.12967 11.8505 0.360484 11.6161C0.591298 11.3817 0.904349 11.25 1.23077 11.25H2.46154V10H0V8.75H2.46154C2.78796 8.75 3.10101 8.8817 3.33182 9.11612C3.56264 9.35054 3.69231 9.66848 3.69231 10V11.25C3.69231 11.5815 3.56264 11.8995 3.33182 12.1339C3.10101 12.3683 2.78796 12.5 2.46154 12.5H1.23077V13.75H3.69231V15Z",fill:"black",stroke:"none"})})}),command:e=>e.chain().focus().toggleOrderedList().run(),isActive:e=>e.isActive("orderedList")}),Fm=Rm({label:"Image",icon:n=>t.jsx(e.Icon,{...n,children:t.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M1.77778 16C1.28889 16 0.87037 15.8259 0.522222 15.4778C0.174074 15.1296 0 14.7111 0 14.2222V1.77778C0 1.28889 0.174074 0.87037 0.522222 0.522222C0.87037 0.174074 1.28889 0 1.77778 0H14.2222C14.7111 0 15.1296 0.174074 15.4778 0.522222C15.8259 0.87037 16 1.28889 16 1.77778V14.2222C16 14.7111 15.8259 15.1296 15.4778 15.4778C15.1296 15.8259 14.7111 16 14.2222 16H1.77778ZM2.66667 12.4444H13.3333L10 8L7.33333 11.5556L5.33333 8.88889L2.66667 12.4444Z",fill:"black",stroke:"none"})})}),command:e=>{if("undefined"==typeof document)return;const t=document.createElement("input");t.type="file",t.accept="image/*",t.onchange=()=>{const n=t.files?.[0];if(!n)return;const r=new FileReader;r.onload=()=>{"string"==typeof r.result&&e.chain().focus().insertContent({type:"image",attrs:{src:r.result,alt:n.name}}).run()},r.readAsDataURL(n)},t.click()}}),qm=Rm({label:"Undo",icon:n=>t.jsx(e.Icon,{...n,children:t.jsx("svg",{width:"16",height:"14",viewBox:"0 0 16 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M10.6667 3.33333H2.54333L4.93467 0.942667L4 0L0 4L4 8L4.93467 7.05667L2.54533 4.66667H10.6667C11.7275 4.66667 12.7449 5.08809 13.4951 5.83824C14.2452 6.58839 14.6667 7.6058 14.6667 8.66667C14.6667 9.72753 14.2452 10.7449 13.4951 11.4951C12.7449 12.2452 11.7275 12.6667 10.6667 12.6667H5.33333V14H10.6667C12.0812 14 13.4377 13.4381 14.4379 12.4379C15.4381 11.4377 16 10.0812 16 8.66667C16 7.25218 15.4381 5.89562 14.4379 4.89543C13.4377 3.89524 12.0812 3.33333 10.6667 3.33333Z",fill:"black",stroke:"none"})})}),command:e=>e.chain().focus().undo().run(),isDisabled:e=>!e.can().undo()}),Wm=Rm({label:"Redo",icon:n=>t.jsx(e.Icon,{...n,children:t.jsx("svg",{width:"16",height:"14",viewBox:"0 0 16 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M5.33333 3.33333H13.4567L11.0653 0.942667L12 0L16 4L12 8L11.0653 7.05667L13.4547 4.66667H5.33333C4.27247 4.66667 3.25505 5.08809 2.50491 5.83824C1.75476 6.58839 1.33333 7.6058 1.33333 8.66667C1.33333 9.72753 1.75476 10.7449 2.50491 11.4951C3.25505 12.2452 4.27247 12.6667 5.33333 12.6667H10.6667V14H5.33333C3.91885 14 2.56229 13.4381 1.5621 12.4379C0.561903 11.4377 0 10.0812 0 8.66667C0 7.25218 0.561903 5.89562 1.5621 4.89543C2.56229 3.89524 3.91885 3.33333 5.33333 3.33333V3.33333Z",fill:"black",stroke:"none"})})}),command:e=>e.chain().focus().redo().run(),isDisabled:e=>!e.can().redo()}),Um={left:fm,center:mm,right:gm,justify:vm},Km=n=>{const{editor:r,disabled:o}=xf();if(!r)return null;const{label:i="Alignment",alignLeftLabel:s="Align left",alignCenterLabel:a="Align center",alignRightLabel:l="Align right",alignJustifyLabel:c="Justify",...d}=n,u=(e=>e.isActive({textAlign:"center"})?"center":e.isActive({textAlign:"right"})?"right":e.isActive({textAlign:"justify"})?"justify":"left")(r),h=Um[u],p=[{label:s,value:"left",startIcon:t.jsx(fm,{})},{label:a,value:"center",startIcon:t.jsx(mm,{})},{label:l,value:"right",startIcon:t.jsx(gm,{})},{label:c,value:"justify",startIcon:t.jsx(vm,{})}],f=p.find((e=>e.value===u));return t.jsx(Em,{label:i,hideArrow:!0,items:p.map((e=>({...e,disabled:o}))),onSelect:e=>{o||r.chain().focus().setTextAlign(e).run()},customTrigger:t.jsx(e.Box,{css:{"& button":{fontWeight:"normal"},'&[data-part="trigger"]':{padding:0}},children:t.jsx(Ef,{variant:"secondary",size:"small",disabled:o,label:"","aria-label":`${i}: ${f?.label||i}`,leftIcon:t.jsx(e.Box,{display:"inline-flex",marginRight:k(200),children:t.jsx(h,{width:"0.875rem",height:"0.875rem"})}),rightIcon:t.jsx(If,{width:"0.875rem",height:"0.875rem"}),borderColor:w("neutral",400),...d})})})},Gm=(e,t)=>i.css`
|
|
324
324
|
position: relative;
|
|
325
325
|
height: 100%;
|
|
326
326
|
width: 100%;
|
|
@@ -329,14 +329,14 @@
|
|
|
329
329
|
align-items: flex-start;
|
|
330
330
|
gap: ${k("small"===e?300:400)};
|
|
331
331
|
margin-bottom: ${t?"0":k(500)};
|
|
332
|
-
`,
|
|
332
|
+
`,Zm=i.css`
|
|
333
333
|
width: 0.1875rem;
|
|
334
334
|
height: 100%;
|
|
335
335
|
background-color: ${w("error",900)};
|
|
336
336
|
position: absolute;
|
|
337
337
|
top: 0;
|
|
338
338
|
left: 0;
|
|
339
|
-
`,
|
|
339
|
+
`,Jm=(e,t)=>i.css`
|
|
340
340
|
color: ${w("neutral",t?600:900)};
|
|
341
341
|
font-size: ${C("small"===e?300:400)};
|
|
342
342
|
font-weight: 400;
|
|
@@ -358,7 +358,7 @@
|
|
|
358
358
|
margin-top: ${k(100)};
|
|
359
359
|
color: ${t?w("neutral",600):w("error",500)};
|
|
360
360
|
}
|
|
361
|
-
`,
|
|
361
|
+
`,Xm=(e,t)=>i.css`
|
|
362
362
|
color: ${w("neutral",t?600:700)};
|
|
363
363
|
font-size: ${C("small"===e?200:300)};
|
|
364
364
|
font-weight: 400;
|
|
@@ -367,13 +367,13 @@
|
|
|
367
367
|
&:first-letter {
|
|
368
368
|
text-transform: uppercase;
|
|
369
369
|
}
|
|
370
|
-
`,
|
|
370
|
+
`,Ym=e=>i.css`
|
|
371
371
|
color: ${w("error",900)};
|
|
372
372
|
font-size: ${C("small"===e?200:300)};
|
|
373
373
|
font-weight: 700;
|
|
374
374
|
line-height: ${S("small"===e?400:500)};
|
|
375
375
|
margin-top: ${k(50)};
|
|
376
|
-
`,
|
|
376
|
+
`,Qm=(e,t,n)=>i.css`
|
|
377
377
|
height: ${k("small"===e?700:1e3)};
|
|
378
378
|
width: 100%;
|
|
379
379
|
border-radius: ${$(300)};
|
|
@@ -404,7 +404,7 @@
|
|
|
404
404
|
}
|
|
405
405
|
|
|
406
406
|
${t||n?`\n border: ${j(100)} solid ${w("neutral",700)};\n `:""}
|
|
407
|
-
`,
|
|
407
|
+
`,eg=({label:t,caption:o,placeholder:i,errorMessage:s,required:a,disabled:l,size:c="default",showOptionalLabel:d=!0,noMarginBottom:u=!1,defaultValue:h="",onChange:p,labels:f,...m})=>{const g=Mf("TextInput",f),[v,b]=n.useState(h);return r.jsxs("div",{css:Gm(c,u),className:"ds-text-input-container",children:[s?r.jsx("div",{css:Zm}):null,r.jsxs(e.Field.Root,{required:a,invalid:!!s,gap:"0",style:{marginLeft:s?"1.1875rem":"0px"},children:[t?r.jsxs(e.Field.Label,{css:Jm(c,l),"aria-label":t,children:[r.jsx(e.Field.RequiredIndicator,{"aria-label":g.requiredSymbolLabel}),t,!a&&d?r.jsx("span",{children:g.optionalSuffix}):null]}):null,o?r.jsx(e.Field.HelperText,{css:Xm(c,l),"aria-label":o,children:o}):null,s?r.jsx(e.Field.ErrorText,{css:Ym(c),"aria-label":s,children:s}):null,r.jsx(e.Input,{placeholder:i,disabled:l,css:Qm(c,v,h),onChange:e=>{b(e.target.value),p&&p(e)},value:v,_placeholder:{color:"var(--chakra-colors-neutral-500)"},...m})]})]})};const tg=n=>{const{editor:r,disabled:o}=xf(),[i,s]=l.useState(!1),[a,c]=l.useState(""),[d,u]=l.useState(""),[h,p]=l.useState(""),f=l.useRef(null);if(l.useEffect((()=>{o&&s(!1)}),[o]),!r)return null;const{label:m="Link",urlPlaceholder:g="http://example.org",labelPlaceholder:v="Label (optional)",labelInputAriaLabel:b="Link label",applyLabel:y="Apply",removeLabel:x="Remove",invalidUrlMessage:C="Please enter a valid URL",...S}=n,$=r.isActive("link"),j=()=>f.current?r.chain().focus().setTextSelection({from:f.current.from,to:f.current.to}):r.chain().focus();return t.jsxs(e.Popover.Root,{open:i,onOpenChange:({open:e})=>{o?s(!1):(s(e),e&&(()=>{const{from:e,to:t,empty:n}=r.state.selection,o=r.state.doc.textBetween(e,t," ").trim();f.current={from:e,to:t,empty:n,selectedText:o};const i=r.getAttributes("link")?.href||o||"";c(i||"http://"),u(o),p("")})())},positioning:{placement:"bottom-start"},children:[t.jsx(e.Popover.Trigger,{asChild:!0,children:t.jsx(e.Box,{children:t.jsx(Lm,{content:m,children:t.jsx(Of,{icon:t.jsx("span",{"data-rte-icon":"true",children:t.jsx(pm,{})}),"aria-label":m,"aria-pressed":$||i,disabled:o,onMouseDown:e=>{e.preventDefault()},onClick:()=>{o||s((e=>!e))},...S})})})}),t.jsx(e.Popover.Positioner,{children:t.jsx(e.Popover.Content,{css:{padding:k(300),borderColor:w("neutral",300),width:`calc(( ${k(2800)} + ${k(2e3)} ) * 2)`,maxWidth:"90vw"},children:t.jsx(e.Popover.Body,{children:t.jsxs(e.Box,{css:{display:"flex",flexDirection:"column",gap:k(300)},children:[t.jsx(eg,{"aria-label":m,placeholder:g,disabled:o,noMarginBottom:!0,value:a,onChange:e=>{c(e.target.value),h&&p("")}}),t.jsx(eg,{"aria-label":b,placeholder:v,disabled:o,noMarginBottom:!0,value:d,onChange:e=>{u(e.target.value)}}),h?t.jsx(e.Text,{css:{color:w("error",700)},children:h}):null,t.jsxs(e.Box,{css:{display:"flex",gap:k(200),justifyContent:"flex-end"},children:[$?t.jsx(Ef,{variant:"borderless",size:"small",label:x,disabled:o,onMouseDown:e=>e.preventDefault(),onClick:()=>{j().unsetLink().run(),s(!1)}}):null,t.jsx(Ef,{variant:"secondary",size:"small",label:y,disabled:o,onMouseDown:e=>e.preventDefault(),onClick:()=>{const e=function(e){const t=e.trim();return t?/^(https?:\/\/|mailto:|tel:)/i.test(t)?t:`http://${t}`:""}(a),t=d.trim();if(!e||!function(e){if(/^(mailto:|tel:)/i.test(e))return!0;try{const t=new URL(e);return"http:"===t.protocol||"https:"===t.protocol}catch{return!1}}(e))return void p(C);const n=j(),r=f.current;if(r?.empty){const r=t||e;n.insertContent({type:"text",text:r,marks:[{type:"link",attrs:{href:e}}]}).run()}else t&&t!==r?.selectedText?n.insertContent({type:"text",text:t,marks:[{type:"link",attrs:{href:e}}]}).run():n.extendMarkRange("link").setLink({href:e}).run();s(!1)}})]})]})})})})]})},ng=l.forwardRef(((n,r)=>{const{editor:o,children:i,css:s,disabled:a,...c}=n,d=l.useMemo((()=>({editor:o,disabled:Boolean(a)})),[o,a]);return t.jsx(yf.Provider,{value:d,children:t.jsx(e.Box,{ref:r,"data-disabled":a||void 0,css:[wf,s],...c,children:i})})})),rg={fixed:{bg:"bg",roundedTop:"l2",borderBottomWidth:"1px",p:"3"},floating:{bg:"bg.panel",roundedTop:"l2",shadow:"sm",p:"3"}},og={Root:ng,Toolbar:l.forwardRef(((n,r)=>{const{variant:o="fixed",css:i,...s}=n;return t.jsx(e.HStack,{ref:r,flexWrap:"wrap",separator:t.jsx(e.StackSeparator,{h:"5",alignSelf:"center"}),css:[rg[o],i],...s})})),Content:l.forwardRef(((e,n)=>{const{editor:r}=xf();return r?t.jsx(sf,{editor:r,innerRef:n,...e}):null})),ControlGroup:l.forwardRef(((n,r)=>t.jsx(e.HStack,{ref:r,gap:"2",...n})))},ig=["undo","redo","textType","alignment","fontSize","bold","italic","underline","strikethrough","bulletList","orderedList","link","image"],sg={Google:({ariaLabel:e,size:n="default",onClick:r})=>t.jsx(Ef,{label:"Google",leftIcon:t.jsx(om,{}),"aria-label":e||"Google Login",variant:"secondary",size:n,onClick:r}),Facebook:({ariaLabel:e,size:n="default",onClick:r})=>t.jsx(Ef,{label:"Facebook",leftIcon:t.jsx(im,{}),"aria-label":e||"Facebook Login",variant:"secondary",size:n,onClick:r}),X:({ariaLabel:e,size:n="default",onClick:r})=>t.jsx(Ef,{label:"X",leftIcon:t.jsx(sm,{}),"aria-label":e||"X Login",variant:"secondary",size:n,onClick:r}),Microsoft:({ariaLabel:e,size:n="default",onClick:r})=>t.jsx(Ef,{label:"Microsoft",leftIcon:t.jsx(am,{}),"aria-label":e||"Microsoft Login",variant:"secondary",size:n,onClick:r})},ag=i.css`
|
|
408
408
|
width: ${k(500)} !important;
|
|
409
409
|
padding: 0 !important;
|
|
410
410
|
min-width: ${k(500)} !important;
|
|
@@ -450,13 +450,13 @@
|
|
|
450
450
|
}
|
|
451
451
|
}
|
|
452
452
|
}
|
|
453
|
-
`,
|
|
453
|
+
`,lg=({disabled:e,labels:t,...n})=>{const o=Mf("CloseButton",t);return r.jsx(Of,{css:ag,icon:r.jsx(zf,{}),"aria-label":n["aria-label"]||o.closeLabel,disabled:e,...n})},cg=i.css`
|
|
454
454
|
position: relative;
|
|
455
|
-
`,
|
|
455
|
+
`,dg=i.css`
|
|
456
456
|
padding: ${k(100)};
|
|
457
457
|
background: rgba(0, 0, 0, 0);
|
|
458
458
|
border: none;
|
|
459
|
-
`,
|
|
459
|
+
`,ug=({isExpanded:t,ariaLabel:n,icon:o,label:s,tooltip:a,disabled:l,onClick:c,showGap:d,vertical:u})=>{return r.jsx(e.Button,{className:"toolbar-item-button",css:(h=t,i.css`
|
|
460
460
|
display: flex;
|
|
461
461
|
align-items: center;
|
|
462
462
|
justify-content: ${h?"space-between":"center"};
|
|
@@ -512,18 +512,18 @@
|
|
|
512
512
|
}
|
|
513
513
|
}
|
|
514
514
|
}
|
|
515
|
-
`),"aria-label":n,disabled:l,onClick:c,mr:d&&!u?"1rem":"0",mb:d&&u?"1rem":"0",children:r.jsxs(e.Box,{display:"flex",overflow:"hidden",style:{justifyContent:"flex-end",alignItems:"center"},whiteSpace:"nowrap",transition:"max-width 0.3s ease, opacity 0.2s ease, margin-left 0.3s ease",maxWidth:t?"9.375rem":"2rem",padding:"0.5rem",margin:t?"0.5rem":"0",children:[o&&r.jsx(e.Box,{as:"span",mr:o&&t?"0.5rem":"0px",children:r.jsx(
|
|
515
|
+
`),"aria-label":n,disabled:l,onClick:c,mr:d&&!u?"1rem":"0",mb:d&&u?"1rem":"0",children:r.jsxs(e.Box,{display:"flex",overflow:"hidden",style:{justifyContent:"flex-end",alignItems:"center"},whiteSpace:"nowrap",transition:"max-width 0.3s ease, opacity 0.2s ease, margin-left 0.3s ease",maxWidth:t?"9.375rem":"2rem",padding:"0.5rem",margin:t?"0.5rem":"0",children:[o&&r.jsx(e.Box,{as:"span",mr:o&&t?"0.5rem":"0px",children:r.jsx(Lm,{content:a,disabled:!a,children:o})}),s&&r.jsx(e.Box,{"aria-hidden":!t,overflow:"hidden",maxWidth:t?"9.375rem":"0px",whiteSpace:"nowrap",transition:"max-width 0.3s ease, opacity 0.2s ease, margin-left 0.3s ease",children:r.jsx(Lm,{content:a,disabled:!a,children:s})})]})});var h},hg=e=>{const t=u(e),n=parseFloat(getComputedStyle(document.documentElement).fontSize)||16;return t.endsWith("px")?parseFloat(t)/n:(t.endsWith("rem"),parseFloat(t))};const pg=({items:t,vertical:o=!1,expanded:i=!1,showExpandedToggle:s,autoCollapse:a=!1,ariaLabel:l,defaultGaps:c,labels:d})=>{const u=Mf("Toolbar",d),[h,p]=n.useState(i),{containerRef:f,visibleNumberOfItems:m,shouldForceCollapse:g}=function({itemsCount:e,isExpanded:t,isVertical:r,collapsedWidth:o,expandedLabelWidth:i,gap:s=0,showExpandedToggle:a,autoCollapse:l}){const c=n.useRef(null),[d,u]=n.useState(0),[h,p]=n.useState(e),[f,m]=n.useState(!1);return n.useEffect((()=>{if(!c.current)return;const e=new ResizeObserver((e=>{const t=e[0],n=parseFloat(getComputedStyle(document.documentElement).fontSize)||16;u(t.contentRect.width/n)}));return e.observe(c.current),()=>e.disconnect()}),[]),n.useEffect((()=>{if(0===d)return;if(!l)return m(!1),void p(e);const n=hg(o),c=hg(i),u=hg(s),h=d-(a?n+u:0),f=n+u;m(e*(t?c+u:f)-u>h),e>1&&!r&&p(Math.floor(h/f))}),[d,e,t,r,o,i,s,a,l]),{containerRef:c,visibleNumberOfItems:h,shouldForceCollapse:f}}({itemsCount:t.length,isExpanded:h,isVertical:o,collapsedWidth:"3rem",expandedLabelWidth:"6.25rem",gap:"1rem",showExpandedToggle:s,autoCollapse:a});n.useEffect((()=>{p(i)}),[i]);const v=t.slice(0,m),b=t.slice(m,t.length),y=b.map((e=>({label:e.label,startIcon:e.icon,disabled:e.disabled,onClick:e.onClick,itemAriaLabel:e.ariaLabel}))),x=r.jsx("div",{style:{position:"relative",display:"flex",width:"3rem"},children:r.jsx(ug,{isExpanded:h,ariaLabel:h?u.collapseAriaLabel:u.expandAriaLabel,icon:r.jsx(Vf,{}),showGap:!1,vertical:o})}),[w,C]=n.useState(!1);return r.jsx("div",{role:"toolbar","aria-label":l,css:cg,children:r.jsxs(e.Group,{ref:f,orientation:o?"vertical":"horizontal",attached:!0,display:"grid",borderCollapse:"collapse",gridAutoFlow:o||1===t.length?"row":"column",children:[v.map((e=>{const t=c&&!1!==e.gap||!c&&!0===e.gap;return r.jsx(ug,{isExpanded:h&&!g,ariaLabel:e.ariaLabel,icon:e.icon,label:e.label,tooltip:e.tooltip,disabled:e.disabled,onClick:e.onClick,showGap:t,vertical:o},e.ariaLabel)})),g&&y.length>1&&r.jsxs(e.Menu.Root,{onSelect:({value:e})=>(e=>{const t=b.find((t=>t.label===e));t&&t.onClick&&t.onClick()})(e),onOpenChange:({open:e})=>C(e),open:w,children:[r.jsx(e.Menu.Trigger,{asChild:!0,children:x}),r.jsx(e.Portal,{children:r.jsx(e.Menu.Positioner,{children:r.jsx(e.Menu.Content,{style:{minWidth:0,padding:0},children:y.map((({label:t,startIcon:n,onClick:i,itemAriaLabel:s},a)=>r.jsx(e.Menu.Item,{css:dg,value:t||l||a.toString(),role:"menuitem",children:r.jsx(ug,{isExpanded:!1,icon:n,ariaLabel:s,label:"",onClick:i,showGap:!1,vertical:o})})))})})})]}),s&&!a&&!g&&r.jsx(ug,{isExpanded:h,ariaLabel:h?u.collapseAriaLabel:u.expandAriaLabel,icon:h?r.jsx(dm,{}):r.jsx(um,{}),label:h?u.collapseLabel:u.expandLabel,onClick:()=>p(!h),showGap:!1,vertical:o})]})})},fg=i.css`
|
|
516
516
|
width: 100%;
|
|
517
517
|
max-width: 12.5rem;
|
|
518
518
|
border: ${j(100)} solid ${w("neutral",600)};
|
|
519
519
|
border-radius: ${$(300)};
|
|
520
520
|
padding: ${k(200)};
|
|
521
|
-
`,
|
|
521
|
+
`,mg=e=>i.css`
|
|
522
522
|
&[data-state='open'] {
|
|
523
523
|
background-color: ${"primary"===e?w("primary",600):w("neutral",200)} !important;
|
|
524
524
|
border: ${j(100)} solid ${w("primary",800)} !important;
|
|
525
525
|
}
|
|
526
|
-
`,
|
|
526
|
+
`,gg=e=>i.css`
|
|
527
527
|
font-size: ${C("small"===e?300:400)};
|
|
528
528
|
line-height: ${S("small"===e?500:600)};
|
|
529
529
|
color: ${w("neutral",800)};
|
|
@@ -533,33 +533,33 @@
|
|
|
533
533
|
&[data-highlighted] {
|
|
534
534
|
background-color: ${w("neutral",200)};
|
|
535
535
|
}
|
|
536
|
-
`,
|
|
536
|
+
`,vg=i.css`
|
|
537
537
|
&:focus-visible {
|
|
538
538
|
outline-color: ${w("primary",700)};
|
|
539
539
|
}
|
|
540
|
-
`,
|
|
540
|
+
`,bg={padding:k(300)},yg=n.forwardRef(((t,n)=>{const{portalled:o=!0,portalRef:i,...s}=t;return r.jsx(e.Portal,{disabled:!o,container:i,children:r.jsx(e.Menu.Positioner,{children:r.jsx(e.Menu.Content,{css:fg,ref:n,...s})})})})),xg=i.css`
|
|
541
541
|
position: relative;
|
|
542
542
|
width: 100%;
|
|
543
543
|
padding-left: 1.1875rem;
|
|
544
|
-
`,
|
|
544
|
+
`,wg=i.css`
|
|
545
545
|
font-size: ${C(400)};
|
|
546
546
|
line-height: ${S(600)};
|
|
547
547
|
margin-bottom: ${k(100)};
|
|
548
548
|
color: ${w("neutral",900)};
|
|
549
|
-
`,
|
|
549
|
+
`,Cg=i.css`
|
|
550
550
|
width: 0.1875rem;
|
|
551
551
|
height: 100%;
|
|
552
552
|
background-color: ${w("error",900)};
|
|
553
553
|
position: absolute;
|
|
554
554
|
top: 0;
|
|
555
555
|
left: 0;
|
|
556
|
-
`,
|
|
556
|
+
`,kg=i.css`
|
|
557
557
|
font-size: ${C(300)};
|
|
558
558
|
line-height: ${S(500)};
|
|
559
559
|
font-weight: 700;
|
|
560
560
|
color: ${w("error",900)};
|
|
561
561
|
margin-bottom: ${k(200)};
|
|
562
|
-
`,
|
|
562
|
+
`,Sg=i.css`
|
|
563
563
|
.chakra-checkbox__control {
|
|
564
564
|
width: ${k(500)};
|
|
565
565
|
height: ${k(500)};
|
|
@@ -640,7 +640,7 @@
|
|
|
640
640
|
cursor: not-allowed;
|
|
641
641
|
}
|
|
642
642
|
}
|
|
643
|
-
|
|
643
|
+
`,$g=({name:t,value:n,checked:o,defaultChecked:i,disabled:s,indeterminate:a,onCheckedChange:l,children:c,...d})=>r.jsxs(e.Checkbox.Root,{css:Sg,name:t,value:n,checked:a?"indeterminate":o,defaultChecked:i,disabled:s,onCheckedChange:l,gap:c?"0.625rem":"0",...d,children:[r.jsx(e.Checkbox.HiddenInput,{}),r.jsx(e.Checkbox.Control,{children:a?r.jsx(Nf,{}):r.jsx(Rf,{})}),r.jsx(e.Checkbox.Label,{children:c})]}),jg=i.css`
|
|
644
644
|
width: 15.0625rem;
|
|
645
645
|
min-height: 4.375rem;
|
|
646
646
|
padding: ${k(300)};
|
|
@@ -681,7 +681,7 @@
|
|
|
681
681
|
color: ${w("neutral",600)};
|
|
682
682
|
cursor: not-allowed;
|
|
683
683
|
}
|
|
684
|
-
|
|
684
|
+
`,Mg=i.css`
|
|
685
685
|
width: 100%;
|
|
686
686
|
padding: 0;
|
|
687
687
|
display: flex;
|
|
@@ -691,25 +691,25 @@
|
|
|
691
691
|
&[data-disabled] {
|
|
692
692
|
background-color: ${w("neutral",100)};
|
|
693
693
|
}
|
|
694
|
-
`,
|
|
694
|
+
`,Eg=i.css`
|
|
695
695
|
svg {
|
|
696
696
|
height: 2rem;
|
|
697
697
|
width: 2rem;
|
|
698
698
|
}
|
|
699
|
-
`,
|
|
699
|
+
`,Tg=(e,t)=>i.css`
|
|
700
700
|
font-size: ${C(400)};
|
|
701
701
|
line-height: ${S(600)};
|
|
702
702
|
font-weight: 400;
|
|
703
703
|
color: ${w("neutral",t?600:900)};
|
|
704
704
|
text-align: ${"centered"===e?"center":"left"};
|
|
705
705
|
display: block;
|
|
706
|
-
`,
|
|
706
|
+
`,Og=(e,t)=>i.css`
|
|
707
707
|
font-size: ${C(300)};
|
|
708
708
|
line-height: ${S(500)};
|
|
709
709
|
font-weight: 400;
|
|
710
710
|
color: ${w("neutral",t?600:700)};
|
|
711
711
|
text-align: ${"centered"===e?"center":"left"};
|
|
712
|
-
`,
|
|
712
|
+
`,Lg=e=>i.css`
|
|
713
713
|
position: ${"centered"===e?"absolute":"relative"};
|
|
714
714
|
top: 0;
|
|
715
715
|
right: 0;
|
|
@@ -735,7 +735,7 @@
|
|
|
735
735
|
border: ${j(100)} solid ${w("neutral",400)};
|
|
736
736
|
cursor: not-allowed;
|
|
737
737
|
}
|
|
738
|
-
`,
|
|
738
|
+
`,Ag=i.css`
|
|
739
739
|
width: 100%;
|
|
740
740
|
padding: 0;
|
|
741
741
|
display: flex;
|
|
@@ -745,31 +745,31 @@
|
|
|
745
745
|
&[data-disabled] {
|
|
746
746
|
background-color: ${w("neutral",100)};
|
|
747
747
|
}
|
|
748
|
-
`,
|
|
748
|
+
`,Rg=e=>i.css`
|
|
749
749
|
width: 100%;
|
|
750
750
|
display: flex;
|
|
751
751
|
flex-direction: ${"centered"===e?"column":"row"};
|
|
752
752
|
align-items: center;
|
|
753
753
|
gap: ${k(300)};
|
|
754
|
-
`,
|
|
754
|
+
`,Ng=i.css`
|
|
755
755
|
svg {
|
|
756
756
|
height: 2rem;
|
|
757
757
|
width: 2rem;
|
|
758
758
|
color: ${w("neutral",400)};
|
|
759
759
|
}
|
|
760
|
-
`,
|
|
760
|
+
`,Dg=(e,t)=>i.css`
|
|
761
761
|
font-size: ${C(400)};
|
|
762
762
|
line-height: ${S(600)};
|
|
763
763
|
font-weight: 400;
|
|
764
764
|
color: ${w("neutral",t?600:900)};
|
|
765
765
|
text-align: ${"centered"===e?"center":"left"};
|
|
766
|
-
`,
|
|
766
|
+
`,Ig=(e,t)=>i.css`
|
|
767
767
|
font-size: ${C(300)};
|
|
768
768
|
line-height: ${S(500)};
|
|
769
769
|
font-weight: 400;
|
|
770
770
|
color: ${w("neutral",t?600:700)};
|
|
771
771
|
text-align: ${"centered"===e?"center":"left"};
|
|
772
|
-
`,
|
|
772
|
+
`,Pg=e=>i.css`
|
|
773
773
|
position: ${"centered"===e?"absolute":"relative"};
|
|
774
774
|
top: 0;
|
|
775
775
|
right: 0;
|
|
@@ -800,7 +800,7 @@
|
|
|
800
800
|
border: ${j(100)} solid ${w("neutral",400)};
|
|
801
801
|
cursor: not-allowed;
|
|
802
802
|
}
|
|
803
|
-
`,
|
|
803
|
+
`,zg=i.css`
|
|
804
804
|
.ds-radio-item-indicator {
|
|
805
805
|
width: ${k(500)};
|
|
806
806
|
height: ${k(500)};
|
|
@@ -869,21 +869,21 @@
|
|
|
869
869
|
}
|
|
870
870
|
}
|
|
871
871
|
}
|
|
872
|
-
`,
|
|
872
|
+
`,Vg=i.css`
|
|
873
873
|
cursor: pointer;
|
|
874
874
|
|
|
875
875
|
&[data-disabled] {
|
|
876
876
|
color: ${w("neutral",500)};
|
|
877
877
|
cursor: not-allowed;
|
|
878
878
|
}
|
|
879
|
-
`,
|
|
879
|
+
`,Bg=i.css`
|
|
880
880
|
margin: 0 !important;
|
|
881
881
|
width: ${k(500)} !important;
|
|
882
882
|
height: ${k(500)} !important;
|
|
883
|
-
`,
|
|
883
|
+
`,Hg=({children:t,value:n,disabled:o,...i})=>r.jsxs(e.RadioGroup.Item,{css:zg,value:n,disabled:o,...i,children:[r.jsx(e.RadioGroup.ItemHiddenInput,{css:Bg}),r.jsx(e.RadioGroup.ItemIndicator,{className:"ds-radio-item-indicator"}),t?r.jsx(e.RadioGroup.ItemText,{css:Vg,children:t}):null]}),_g=({children:n,horizontal:r=!1,name:o,value:i="",onChange:s,customGap:a,...l})=>{let c=r?"1.25rem":"0.5rem";return c=a||c,t.jsx(e.RadioGroup.Root,{onValueChange:e=>{s&&s(o,e.value||"")},value:i,...l,children:t.jsx(e.HStack,{gap:c,flexDirection:r?"row":"column",alignItems:"flex-start",flexWrap:"wrap",children:n})})},Fg=i.css`
|
|
884
884
|
height: 3.75rem;
|
|
885
885
|
padding: ${k(1e3)} ${k(300)};
|
|
886
|
-
`,
|
|
886
|
+
`,qg=i.css`
|
|
887
887
|
height: ${k(500)};
|
|
888
888
|
width: ${k(500)};
|
|
889
889
|
background-color: ${w("primary",500)};
|
|
@@ -931,7 +931,7 @@
|
|
|
931
931
|
outline: none;
|
|
932
932
|
cursor: not-allowed;
|
|
933
933
|
}
|
|
934
|
-
`,
|
|
934
|
+
`,Wg=i.css`
|
|
935
935
|
font-size: ${C(300)};
|
|
936
936
|
line-height: ${S(500)};
|
|
937
937
|
color: ${w("neutral",800)};
|
|
@@ -945,11 +945,11 @@
|
|
|
945
945
|
align-items: center;
|
|
946
946
|
position: relative;
|
|
947
947
|
top: -1.875rem;
|
|
948
|
-
`,
|
|
948
|
+
`,Ug=i.css`
|
|
949
949
|
background-color: ${w("neutral",300)};
|
|
950
950
|
border: none;
|
|
951
951
|
box-shadow: none;
|
|
952
|
-
`,
|
|
952
|
+
`,Kg=i.css`
|
|
953
953
|
background-color: ${w("primary",500)};
|
|
954
954
|
border: ${j(100)} solid ${w("primary",700)};
|
|
955
955
|
border-radius: ${$(500)};
|
|
@@ -962,7 +962,7 @@
|
|
|
962
962
|
background-color: ${w("neutral",400)};
|
|
963
963
|
border: none;
|
|
964
964
|
}
|
|
965
|
-
`,
|
|
965
|
+
`,Gg=(e,t)=>i.css`
|
|
966
966
|
font-size: ${C(200)};
|
|
967
967
|
line-height: ${S(400)};
|
|
968
968
|
color: ${w("neutral",800)};
|
|
@@ -997,7 +997,7 @@
|
|
|
997
997
|
}
|
|
998
998
|
|
|
999
999
|
${t?`\n --ty: -0.375rem !important;\n\n .chakra-slider__markerIndicator {\n height: 1rem;\n width: 0.25rem;\n background-color: ${w("primary",700)} !important;\n }\n\n &[data-disabled] {\n .chakra-slider__markerIndicator {\n background-color: ${w("neutral",400)} !important;\n }\n }\n `:""};
|
|
1000
|
-
`,
|
|
1000
|
+
`,Zg=t=>{const{value:n}=t;return r.jsx(e.For,{each:n,children:(t,n)=>r.jsxs(e.Slider.Thumb,{css:qg,index:n,children:[r.jsx("div",{css:Wg,className:"ds-slider-value-preview",children:t}),r.jsx(e.Slider.HiddenInput,{})]},n)})},Jg=n.forwardRef(((t,n)=>{const{marks:o,isCentred:i}=t;return o?.length?r.jsx(e.Slider.MarkerGroup,{ref:n,children:o.map(((t,n)=>{const o="number"==typeof t?t:t.value,s="number"==typeof t?void 0:t.label,a=i&&1===n;return r.jsxs(e.Slider.Marker,{css:Gg(i,a),value:o,children:[r.jsx(e.Slider.MarkerIndicator,{}),r.jsx("p",{children:s})]},o)}))}):null})),Xg=n.forwardRef(((t,o)=>{const{marks:i,onValueChange:s,isCentred:a,value:l,...c}=t,[d,u]=n.useState(l||[0]);n.useEffect((()=>{u(l||[0])}),[l]);let h=i?.map((e=>"number"==typeof e?{value:e,label:void 0}:e));if(a){const e=c.min||0,t=c.max||100;h=[e,(e+t)/2,t].map((e=>({value:e,label:void 0})))}const p=!!h?.some((e=>e.label));return r.jsx(e.Slider.Root,{css:Fg,ref:o,thumbAlignment:"center",onValueChange:e=>{u(e.value),s&&s(e)},origin:a?"center":"start",value:d,...c,children:r.jsxs(e.Slider.Control,{"data-has-mark-label":p||void 0,children:[r.jsx(e.Slider.Track,{css:Ug,children:r.jsx(e.Slider.Range,{css:Kg})}),r.jsx(Zg,{value:d}),r.jsx(Jg,{marks:h,isCentred:a})]})})})),Yg=i.css`
|
|
1001
1001
|
--switch-height: 1.5rem;
|
|
1002
1002
|
--switch-width: 2.5rem;
|
|
1003
1003
|
|
|
@@ -1097,14 +1097,14 @@
|
|
|
1097
1097
|
cursor: not-allowed;
|
|
1098
1098
|
}
|
|
1099
1099
|
}
|
|
1100
|
-
`,
|
|
1100
|
+
`,Qg=({name:t,defaultChecked:n=!1,onChange:o,disabled:i=!1,isLabelOnLeft:s=!1,children:a,labels:l,...c})=>{const d=Mf("Switch",l);return r.jsx("div",{style:{display:"flex",alignItems:"center"},children:r.jsxs(e.Switch.Root,{css:Yg,id:t,name:t,"aria-label":c["aria-label"]||d.defaultAriaLabel(t),defaultChecked:n,onCheckedChange:({checked:e})=>{o&&o(t,e)},disabled:i,...c,children:[s&&null!=a?r.jsx(e.Switch.Label,{children:a}):null,r.jsx(e.Switch.HiddenInput,{style:{width:"2.625rem",height:"1.625rem"}}),r.jsx("div",{className:"chakra-switch__control-container",children:r.jsx(e.Switch.Control,{children:r.jsx(e.Switch.Thumb,{children:r.jsx(e.Switch.ThumbIndicator,{display:"flex",children:r.jsx(Rf,{})})})})}),s||null==a?null:r.jsx(e.Switch.Label,{children:a})]})})},ev=i.css`
|
|
1101
1101
|
position: relative;
|
|
1102
1102
|
height: 100%;
|
|
1103
1103
|
width: 100%;
|
|
1104
1104
|
&:focus-visible {
|
|
1105
1105
|
outline-color: ${w("primary",700)};
|
|
1106
1106
|
}
|
|
1107
|
-
`,
|
|
1107
|
+
`,tv=i.css`
|
|
1108
1108
|
font-size: ${C(400)};
|
|
1109
1109
|
line-height: ${S(600)};
|
|
1110
1110
|
color: ${w("neutral",900)};
|
|
@@ -1114,12 +1114,12 @@
|
|
|
1114
1114
|
color: ${w("error",500)};
|
|
1115
1115
|
margin-right: 0.1875rem;
|
|
1116
1116
|
}
|
|
1117
|
-
`,
|
|
1117
|
+
`,nv=i.css`
|
|
1118
1118
|
font-size: ${C(300)};
|
|
1119
1119
|
line-height: ${S(500)};
|
|
1120
1120
|
color: ${w("neutral",700)};
|
|
1121
1121
|
text-align: left;
|
|
1122
|
-
`,
|
|
1122
|
+
`,rv=(e,t)=>i.css`
|
|
1123
1123
|
margin-top: ${k(300)};
|
|
1124
1124
|
display: flex;
|
|
1125
1125
|
flex-direction: ${e?"row":"column"};
|
|
@@ -1131,23 +1131,23 @@
|
|
|
1131
1131
|
transition:
|
|
1132
1132
|
max-height 250ms ease,
|
|
1133
1133
|
opacity 200ms ease;
|
|
1134
|
-
`,
|
|
1134
|
+
`,ov=i.css`
|
|
1135
1135
|
width: 0.1875rem;
|
|
1136
1136
|
height: 100%;
|
|
1137
1137
|
background-color: ${w("error",900)};
|
|
1138
1138
|
position: absolute;
|
|
1139
1139
|
top: 0;
|
|
1140
1140
|
left: 0;
|
|
1141
|
-
`,
|
|
1141
|
+
`,iv=i.css`
|
|
1142
1142
|
font-size: ${C(300)};
|
|
1143
1143
|
line-height: ${S(500)};
|
|
1144
1144
|
font-weight: 700;
|
|
1145
1145
|
color: ${w("error",900)};
|
|
1146
1146
|
text-align: left;
|
|
1147
|
-
`,
|
|
1147
|
+
`,sv=i.css`
|
|
1148
1148
|
color: ${w("neutral",700)};
|
|
1149
1149
|
margin-left: ${k(100)};
|
|
1150
|
-
`,
|
|
1150
|
+
`,av=i.css`
|
|
1151
1151
|
color: ${w("neutral",700)};
|
|
1152
1152
|
display: flex;
|
|
1153
1153
|
align-items: center;
|
|
@@ -1159,11 +1159,11 @@
|
|
|
1159
1159
|
> span {
|
|
1160
1160
|
margin-left: 0.375rem;
|
|
1161
1161
|
}
|
|
1162
|
-
`,
|
|
1162
|
+
`,lv=i.css`
|
|
1163
1163
|
width: 100%;
|
|
1164
1164
|
max-width: 23.125rem;
|
|
1165
1165
|
position: relative;
|
|
1166
|
-
`,
|
|
1166
|
+
`,cv=e=>i.css`
|
|
1167
1167
|
font-size: ${C(400)};
|
|
1168
1168
|
line-height: ${S(600)};
|
|
1169
1169
|
font-weight: 400;
|
|
@@ -1174,26 +1174,26 @@
|
|
|
1174
1174
|
color: ${e?w("neutral",600):w("error",500)};
|
|
1175
1175
|
margin-right: 0.1875rem;
|
|
1176
1176
|
}
|
|
1177
|
-
`,
|
|
1177
|
+
`,dv=e=>i.css`
|
|
1178
1178
|
font-size: ${C(300)};
|
|
1179
1179
|
line-height: ${S(500)};
|
|
1180
1180
|
font-weight: 400;
|
|
1181
1181
|
color: ${w("neutral",e?600:700)};
|
|
1182
1182
|
text-align: left;
|
|
1183
|
-
`,
|
|
1183
|
+
`,uv=i.css`
|
|
1184
1184
|
width: 0.1875rem;
|
|
1185
1185
|
height: 100%;
|
|
1186
1186
|
background-color: ${w("error",900)};
|
|
1187
1187
|
position: absolute;
|
|
1188
1188
|
top: 0;
|
|
1189
1189
|
left: 0;
|
|
1190
|
-
`,
|
|
1190
|
+
`,hv=i.css`
|
|
1191
1191
|
font-size: ${C(300)};
|
|
1192
1192
|
line-height: ${S(500)};
|
|
1193
1193
|
font-weight: 700;
|
|
1194
1194
|
color: ${w("error",900)};
|
|
1195
1195
|
text-align: left;
|
|
1196
|
-
`,
|
|
1196
|
+
`,pv=(e,t)=>i.css`
|
|
1197
1197
|
width: 100%;
|
|
1198
1198
|
margin-top: ${k(200)};
|
|
1199
1199
|
|
|
@@ -1229,7 +1229,7 @@
|
|
|
1229
1229
|
padding: 0 ${k(100)};
|
|
1230
1230
|
}
|
|
1231
1231
|
}
|
|
1232
|
-
`,
|
|
1232
|
+
`,fv=l.forwardRef(((n,r)=>{const{children:o,...i}=n,{"aria-label":s,...a}=i;return t.jsxs(e.Select.Control,{...a,children:[t.jsx(e.Select.Trigger,{ref:r,"aria-label":s,children:o}),t.jsx(e.Select.IndicatorGroup,{children:t.jsx(e.Select.Indicator,{children:t.jsx(If,{})})})]})})),mv=l.forwardRef(((n,r)=>{const{...o}=n;return t.jsx(e.Portal,{children:t.jsx(e.Select.Positioner,{children:t.jsx(e.Select.Content,{...o,ref:r})})})})),gv=l.forwardRef(((n,r)=>{const{item:o,children:i,...s}=n;return t.jsx(e.Select.Item,{item:o,...s,ref:r,children:i},o.value)})),vv=l.forwardRef(((n,r)=>{const{children:o,...i}=n;return t.jsx(e.Select.ValueText,{...i,ref:r,children:t.jsx(e.Select.Context,{children:e=>{const t=e.selectedItems;return 0===t.length?n.placeholder:o?o(t):1===t.length?e.collection.stringifyItem(t[0]):`${t.length} selected`}})})})),bv=l.forwardRef(((n,r)=>t.jsx(e.Select.Root,{...n,ref:r,positioning:{sameWidth:!0,...n.positioning},children:n.asChild?n.children:t.jsxs(t.Fragment,{children:[t.jsx(e.Select.HiddenSelect,{}),n.children]})})));l.forwardRef(((n,r)=>{const{children:o,label:i,...s}=n;return t.jsxs(e.Select.ItemGroup,{...s,ref:r,children:[t.jsx(e.Select.ItemGroupLabel,{children:i}),o]})}));const yv=e.Select.Label;e.Select.ItemText;const xv=e=>i.css`
|
|
1233
1233
|
position: relative;
|
|
1234
1234
|
height: 100%;
|
|
1235
1235
|
width: 100%;
|
|
@@ -1241,14 +1241,14 @@
|
|
|
1241
1241
|
&:focus-visible {
|
|
1242
1242
|
outline-color: ${w("primary",700)};
|
|
1243
1243
|
}
|
|
1244
|
-
`,
|
|
1244
|
+
`,wv=i.css`
|
|
1245
1245
|
width: 0.1875rem;
|
|
1246
1246
|
height: 100%;
|
|
1247
1247
|
background-color: ${w("error",900)};
|
|
1248
1248
|
position: absolute;
|
|
1249
1249
|
top: 0;
|
|
1250
1250
|
left: 0;
|
|
1251
|
-
`,
|
|
1251
|
+
`,Cv=e=>i.css`
|
|
1252
1252
|
font-size: ${C("small"===e?300:400)};
|
|
1253
1253
|
line-height: ${S("small"===e?500:600)};
|
|
1254
1254
|
font-weight: 400;
|
|
@@ -1267,7 +1267,7 @@
|
|
|
1267
1267
|
color: ${w("neutral",600)};
|
|
1268
1268
|
}
|
|
1269
1269
|
}
|
|
1270
|
-
`,
|
|
1270
|
+
`,kv=(e,t)=>i.css`
|
|
1271
1271
|
font-size: ${C("small"===e?200:300)};
|
|
1272
1272
|
line-height: ${S("small"===e?400:500)};
|
|
1273
1273
|
font-weight: 400;
|
|
@@ -1275,7 +1275,7 @@
|
|
|
1275
1275
|
text-align: left;
|
|
1276
1276
|
|
|
1277
1277
|
${t?`color: ${w("neutral",600)} !important;`:""}
|
|
1278
|
-
`,
|
|
1278
|
+
`,Sv=(e,t,n,r)=>i.css`
|
|
1279
1279
|
.chakra-select__trigger {
|
|
1280
1280
|
min-height: ${k("small"===e?800:1e3)};
|
|
1281
1281
|
border-radius: ${$(300)};
|
|
@@ -1333,40 +1333,40 @@
|
|
|
1333
1333
|
}
|
|
1334
1334
|
}
|
|
1335
1335
|
}
|
|
1336
|
-
|
|
1336
|
+
`,$v=i.css`
|
|
1337
1337
|
margin-top: -${k(200)};
|
|
1338
1338
|
border-radius: ${$(300)};
|
|
1339
1339
|
border: ${j(100)} solid ${w("neutral",400)};
|
|
1340
1340
|
border-top-left-radius: 0;
|
|
1341
1341
|
border-top-right-radius: 0;
|
|
1342
1342
|
border-top: none;
|
|
1343
|
-
`,
|
|
1343
|
+
`,jv=i.css`
|
|
1344
1344
|
align-items: flex-start;
|
|
1345
1345
|
&[data-highlighted] {
|
|
1346
1346
|
background-color: ${w("neutral",200)};
|
|
1347
1347
|
cursor: pointer;
|
|
1348
1348
|
}
|
|
1349
|
-
|
|
1349
|
+
`,Mv=(e,t)=>i.css`
|
|
1350
1350
|
font-size: ${C("small"===e?300:400)};
|
|
1351
1351
|
line-height: ${S("small"===e?500:600)};
|
|
1352
1352
|
color: ${w("neutral",800)};
|
|
1353
1353
|
text-align: left;
|
|
1354
1354
|
|
|
1355
1355
|
${t?`color: ${w("neutral",600)} !important;`:""}
|
|
1356
|
-
`,
|
|
1356
|
+
`,Ev=(e,t)=>i.css`
|
|
1357
1357
|
font-size: ${C("small"===e?300:400)};
|
|
1358
1358
|
line-height: ${S("small"===e?500:600)};
|
|
1359
1359
|
color: ${w("neutral",700)};
|
|
1360
1360
|
text-align: left;
|
|
1361
1361
|
|
|
1362
1362
|
${t?`color: ${w("neutral",600)} !important;`:""}
|
|
1363
|
-
`,
|
|
1363
|
+
`,Tv=e=>i.css`
|
|
1364
1364
|
font-size: ${C("small"===e?200:300)};
|
|
1365
1365
|
line-height: ${S("small"===e?400:500)};
|
|
1366
1366
|
font-weight: 700;
|
|
1367
1367
|
color: ${w("error",900)};
|
|
1368
1368
|
text-align: left;
|
|
1369
|
-
`,
|
|
1369
|
+
`,Ov=e=>i.css`
|
|
1370
1370
|
max-width: 100%;
|
|
1371
1371
|
display: flex;
|
|
1372
1372
|
justify-content: center;
|
|
@@ -1439,28 +1439,28 @@
|
|
|
1439
1439
|
background-color: ${w("neutral",300)};
|
|
1440
1440
|
color: ${w("neutral",600)};
|
|
1441
1441
|
}
|
|
1442
|
-
`,
|
|
1442
|
+
`,Lv=i.css`
|
|
1443
1443
|
background-color: ${w("neutral",100)};
|
|
1444
1444
|
border: ${j(100)} solid ${w("neutral",300)};
|
|
1445
|
-
`,
|
|
1445
|
+
`,Av=i.css`
|
|
1446
1446
|
background-color: ${w("neutral",200)};
|
|
1447
1447
|
border: ${j(100)} solid ${w("neutral",400)};
|
|
1448
|
-
`,
|
|
1448
|
+
`,Rv=i.css`
|
|
1449
1449
|
background-color: ${w("success",100)};
|
|
1450
1450
|
border: ${j(100)} solid ${w("success",300)};
|
|
1451
1451
|
color: ${w("success",900)};
|
|
1452
|
-
`,
|
|
1452
|
+
`,Nv=i.css`
|
|
1453
1453
|
background-color: ${w("warning",100)};
|
|
1454
1454
|
border: ${j(100)} solid ${w("warning",300)};
|
|
1455
1455
|
color: ${w("warning",900)};
|
|
1456
|
-
`,
|
|
1456
|
+
`,Dv=i.css`
|
|
1457
1457
|
background-color: ${w("error",100)};
|
|
1458
1458
|
border: ${j(100)} solid ${w("error",300)};
|
|
1459
1459
|
color: ${w("error",900)};
|
|
1460
|
-
`,
|
|
1460
|
+
`,Iv=({label:t,size:n="default",variant:o,disabled:i,icon:s,onClose:a,closable:l,labels:c,...d})=>{const u=Mf("Tag",c);let h=Lv;return"info-grey"===o?h=Av:"success"===o?h=Rv:"warning"===o?h=Nv:"error"===o&&(h=Dv),r.jsxs(e.Tag.Root,{css:[Ov(n),h],"data-disabled":i,...d,children:[s?r.jsx(e.Tag.StartElement,{"aria-hidden":"true",children:s}):null,r.jsx(e.Tag.Label,{"aria-label":t,children:t}),l&&!i&&"small"!==n?r.jsx(e.Tag.EndElement,{children:r.jsx("div",{className:"chakra-tag__closeTrigger",role:"button",tabIndex:0,onClick:a,onKeyDown:e=>{!a||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),a())},"aria-label":u.closeButtonAriaLabel(t),children:r.jsx(zf,{})})}):null]})},Pv=({placeholder:t,size:n,disabled:o})=>r.jsx(vv,{placeholder:t,children:t=>{const{label:i,caption:s}=t[0];return r.jsxs(e.HStack,{flexDirection:"column",alignItems:"flex-start",children:[r.jsx("p",{css:Mv(n,o),children:i}),s?r.jsx("p",{css:Ev(n,o),children:s}):null]})}}),zv=({placeholder:t,removeItem:n,disabled:o})=>r.jsx(vv,{placeholder:t,children:t=>t.map((t=>r.jsx(e.HStack,{flexDirection:"row",alignItems:"flex-start",children:r.jsx(Iv,{label:t.label,variant:"info-grey",disabled:o,onClose:()=>n(t.value),closable:!0},t.value)},t.value)))}),Vv=({label:t,caption:o,placeholder:i="",items:s,size:a="default",required:l,disabled:c,onChange:d,errorMessage:u,multiple:h,labels:p,...f})=>{const m=Mf("Select",p),[g,v]=n.useState(f.defaultValue||[]),b=(t=>e.createListCollection({items:t}))(s),y=e=>{v(e),d&&d(e)},x=`${t||m.defaultAriaLabel}${l?m.requiredSuffix:""}${o?` ${o}.`:""}${c?m.disabledSuffix:""}`.trim();return r.jsxs(e.Group,{css:xv(a),style:f.style,className:"ds-select-input-container",tabIndex:c?0:void 0,"aria-disabled":c,"aria-label":c?x:void 0,children:[u?r.jsx("div",{css:wv}):null,r.jsxs(bv,{css:{},collection:b,disabled:c,required:l,multiple:h,"aria-label":f["aria-label"]||t,value:g,onValueChange:e=>y(e.value),style:{marginLeft:u?"1.1875rem":"0px"},...f,children:[t?r.jsxs(yv,{css:Cv(a),children:[l?r.jsx("span",{children:"*"}):null,t]}):null,o?r.jsx("p",{css:kv(a,c),children:o}):null,u&&r.jsx("p",{css:Tv(a),children:u}),r.jsx(fv,{css:Sv(a,g.length>0,!!u,h),"aria-label":f["aria-label"]||t||m.defaultAriaLabel,children:h?r.jsx(zv,{placeholder:i,disabled:c,removeItem:e=>{const t=g.filter((t=>t!==e));y(t)}}):r.jsx(Pv,{placeholder:i,size:a,disabled:c})}),r.jsx(mv,{css:$v,children:b.items.map((t=>r.jsxs(gv,{css:jv,item:t,children:[r.jsxs(e.Box,{children:[r.jsx("p",{css:Mv(a),children:t.label}),r.jsx("p",{css:Ev(a),children:t.caption})]}),h?r.jsx($g,{checked:g.some((e=>e===t.value)),"aria-label":`Select ${t.label}`}):null]},t.value)))})]})]})},Bv=i.css`
|
|
1461
1461
|
width: 100%;
|
|
1462
1462
|
max-width: 30.375rem;
|
|
1463
|
-
`,
|
|
1463
|
+
`,Hv=i.css`
|
|
1464
1464
|
font-size: ${C(400)};
|
|
1465
1465
|
line-height: ${S(600)};
|
|
1466
1466
|
font-weight: 400;
|
|
@@ -1471,13 +1471,13 @@
|
|
|
1471
1471
|
color: ${w("error",500)};
|
|
1472
1472
|
margin-right: 0.1875rem;
|
|
1473
1473
|
}
|
|
1474
|
-
`,
|
|
1474
|
+
`,_v=i.css`
|
|
1475
1475
|
font-size: ${C(300)};
|
|
1476
1476
|
line-height: ${S(500)};
|
|
1477
1477
|
font-weight: 400;
|
|
1478
1478
|
color: ${w("neutral",700)};
|
|
1479
1479
|
text-align: left;
|
|
1480
|
-
`,
|
|
1480
|
+
`,Fv=i.css`
|
|
1481
1481
|
display: flex;
|
|
1482
1482
|
align-items: center;
|
|
1483
1483
|
justify-content: space-between;
|
|
@@ -1495,9 +1495,9 @@
|
|
|
1495
1495
|
button {
|
|
1496
1496
|
min-width: 6.125rem;
|
|
1497
1497
|
}
|
|
1498
|
-
`,
|
|
1498
|
+
`,qv=i.css`
|
|
1499
1499
|
margin-top: ${k(300)};
|
|
1500
|
-
`,
|
|
1500
|
+
`,Wv=e=>i.css`
|
|
1501
1501
|
height: ${k(200)};
|
|
1502
1502
|
width: 100%;
|
|
1503
1503
|
background-color: ${w("neutral",300)};
|
|
@@ -1511,7 +1511,7 @@
|
|
|
1511
1511
|
background-color: ${w("medium"===e?"warning":"strong"===e||"very-strong"===e?"success":"error",900)};
|
|
1512
1512
|
border-radius: ${$(500)};
|
|
1513
1513
|
}
|
|
1514
|
-
`,
|
|
1514
|
+
`,Uv=e=>i.css`
|
|
1515
1515
|
display: flex;
|
|
1516
1516
|
align-items: center;
|
|
1517
1517
|
gap: ${k(100)};
|
|
@@ -1528,13 +1528,13 @@
|
|
|
1528
1528
|
justify-content: center;
|
|
1529
1529
|
align-items: center;
|
|
1530
1530
|
}
|
|
1531
|
-
`,
|
|
1531
|
+
`,Kv=i.css`
|
|
1532
1532
|
position: relative;
|
|
1533
1533
|
height: 100%;
|
|
1534
1534
|
&:focus-visible {
|
|
1535
1535
|
outline-color: ${w("primary",700)};
|
|
1536
1536
|
}
|
|
1537
|
-
`,
|
|
1537
|
+
`,Gv=i.css`
|
|
1538
1538
|
font-size: ${C(400)};
|
|
1539
1539
|
line-height: ${S(600)};
|
|
1540
1540
|
color: ${w("neutral",900)};
|
|
@@ -1544,27 +1544,27 @@
|
|
|
1544
1544
|
color: ${w("error",500)};
|
|
1545
1545
|
margin-right: 0.1875rem;
|
|
1546
1546
|
}
|
|
1547
|
-
`,
|
|
1547
|
+
`,Zv=i.css`
|
|
1548
1548
|
font-size: ${C(300)};
|
|
1549
1549
|
line-height: ${S(500)};
|
|
1550
1550
|
color: ${w("neutral",700)};
|
|
1551
1551
|
text-align: left;
|
|
1552
|
-
`,
|
|
1552
|
+
`,Jv=i.css`
|
|
1553
1553
|
margin-top: ${k(300)};
|
|
1554
|
-
`,
|
|
1554
|
+
`,Xv=i.css`
|
|
1555
1555
|
width: 0.1875rem;
|
|
1556
1556
|
height: 100%;
|
|
1557
1557
|
background-color: ${w("error",900)};
|
|
1558
1558
|
position: absolute;
|
|
1559
1559
|
top: 0;
|
|
1560
1560
|
left: 0;
|
|
1561
|
-
`,
|
|
1561
|
+
`,Yv=i.css`
|
|
1562
1562
|
font-size: ${C(300)};
|
|
1563
1563
|
line-height: ${S(500)};
|
|
1564
1564
|
font-weight: 700;
|
|
1565
1565
|
color: ${w("error",900)};
|
|
1566
1566
|
text-align: left;
|
|
1567
|
-
`,
|
|
1567
|
+
`,Qv=i.css`
|
|
1568
1568
|
height: 100%;
|
|
1569
1569
|
min-height: 3rem;
|
|
1570
1570
|
width: 100%;
|
|
@@ -1573,7 +1573,7 @@
|
|
|
1573
1573
|
border-radius: ${$(300)};
|
|
1574
1574
|
background-color: ${w("neutral",100)};
|
|
1575
1575
|
padding: ${k(300)};
|
|
1576
|
-
`,
|
|
1576
|
+
`,eb=e=>i.css`
|
|
1577
1577
|
font-size: ${C("small"===e?300:400)};
|
|
1578
1578
|
line-height: ${S("small"===e?500:600)};
|
|
1579
1579
|
font-weight: 400;
|
|
@@ -1584,13 +1584,13 @@
|
|
|
1584
1584
|
color: ${w("error",500)};
|
|
1585
1585
|
margin-right: 0.1875rem;
|
|
1586
1586
|
}
|
|
1587
|
-
`,
|
|
1587
|
+
`,tb=e=>i.css`
|
|
1588
1588
|
font-size: ${C("small"===e?200:300)};
|
|
1589
1589
|
line-height: ${S("small"===e?400:500)};
|
|
1590
1590
|
font-weight: 400;
|
|
1591
1591
|
color: ${w("neutral",700)};
|
|
1592
1592
|
text-align: left;
|
|
1593
|
-
`,
|
|
1593
|
+
`,nb=i.css`
|
|
1594
1594
|
display: flex;
|
|
1595
1595
|
align-items: center;
|
|
1596
1596
|
gap: ${k(300)};
|
|
@@ -1611,7 +1611,7 @@
|
|
|
1611
1611
|
margin-top: 1.125rem;
|
|
1612
1612
|
width: 100%;
|
|
1613
1613
|
}
|
|
1614
|
-
`,
|
|
1614
|
+
`,rb=e=>i.css`
|
|
1615
1615
|
position: relative;
|
|
1616
1616
|
height: 100%;
|
|
1617
1617
|
width: 100%;
|
|
@@ -1620,14 +1620,14 @@
|
|
|
1620
1620
|
align-items: flex-start;
|
|
1621
1621
|
gap: ${k("small"===e?300:400)};
|
|
1622
1622
|
margin-bottom: ${k(400)};
|
|
1623
|
-
`,
|
|
1623
|
+
`,ob=i.css`
|
|
1624
1624
|
width: 0.1875rem;
|
|
1625
1625
|
height: 100%;
|
|
1626
1626
|
background-color: ${w("error",900)};
|
|
1627
1627
|
position: absolute;
|
|
1628
1628
|
top: 0;
|
|
1629
1629
|
left: 0;
|
|
1630
|
-
`,
|
|
1630
|
+
`,ib=(e,t)=>i.css`
|
|
1631
1631
|
color: ${w("neutral",t?600:900)};
|
|
1632
1632
|
font-size: ${C("small"===e?300:400)};
|
|
1633
1633
|
font-weight: 400;
|
|
@@ -1641,24 +1641,24 @@
|
|
|
1641
1641
|
.chakra-field__requiredIndicator {
|
|
1642
1642
|
color: ${t?w("neutral",600):w("error",500)};
|
|
1643
1643
|
}
|
|
1644
|
-
`,
|
|
1644
|
+
`,sb=(e,t)=>i.css`
|
|
1645
1645
|
color: ${w("neutral",t?600:700)};
|
|
1646
1646
|
font-size: ${C("small"===e?200:300)};
|
|
1647
1647
|
font-weight: 400;
|
|
1648
1648
|
line-height: ${S("small"===e?400:500)};
|
|
1649
|
-
`,
|
|
1649
|
+
`,ab=i.css`
|
|
1650
1650
|
color: ${w("neutral",600)};
|
|
1651
1651
|
font-size: ${C(200)};
|
|
1652
1652
|
font-weight: 400;
|
|
1653
1653
|
line-height: ${S(400)};
|
|
1654
1654
|
margin-top: ${k(200)};
|
|
1655
|
-
`,
|
|
1655
|
+
`,lb=i.css`
|
|
1656
1656
|
color: ${w("error",900)};
|
|
1657
1657
|
font-size: ${C(300)};
|
|
1658
1658
|
font-weight: 700;
|
|
1659
1659
|
line-height: ${S(500)};
|
|
1660
1660
|
margin-top: ${k(50)};
|
|
1661
|
-
`,
|
|
1661
|
+
`,cb=(e,t,n)=>i.css`
|
|
1662
1662
|
height: 6.5rem;
|
|
1663
1663
|
width: 100%;
|
|
1664
1664
|
border-radius: ${$(300)};
|
|
@@ -1696,7 +1696,7 @@
|
|
|
1696
1696
|
}
|
|
1697
1697
|
|
|
1698
1698
|
${t||n?`\n border: ${j(100)} solid ${w("neutral",700)};\n `:""}
|
|
1699
|
-
`,
|
|
1699
|
+
`,db=(e,t)=>i.css`
|
|
1700
1700
|
height: ${e};
|
|
1701
1701
|
width: ${t};
|
|
1702
1702
|
border: ${j(100)} solid ${w("neutral",300)};
|
|
@@ -1710,7 +1710,7 @@
|
|
|
1710
1710
|
height: 100%;
|
|
1711
1711
|
overflow-y: scroll;
|
|
1712
1712
|
}
|
|
1713
|
-
`,
|
|
1713
|
+
`,ub=i.css`
|
|
1714
1714
|
padding: ${k(400)} ${k(300)};
|
|
1715
1715
|
border-bottom: ${j(100)} solid
|
|
1716
1716
|
${w("neutral",300)};
|
|
@@ -1734,17 +1734,17 @@
|
|
|
1734
1734
|
color: ${w("neutral",700)};
|
|
1735
1735
|
text-align: left;
|
|
1736
1736
|
}
|
|
1737
|
-
`,
|
|
1737
|
+
`,hb=i.css``,pb=i.css`
|
|
1738
1738
|
display: flex;
|
|
1739
1739
|
flex-direction: column;
|
|
1740
1740
|
gap: ${k(300)};
|
|
1741
1741
|
padding: ${k(300)};
|
|
1742
1742
|
border-bottom: ${j(100)} solid
|
|
1743
1743
|
${w("neutral",300)};
|
|
1744
|
-
`,
|
|
1744
|
+
`,fb=i.css`
|
|
1745
1745
|
padding-top: ${k(300)};
|
|
1746
1746
|
padding-left: ${k(200)};
|
|
1747
|
-
`,
|
|
1747
|
+
`,mb=i.css``,gb=e=>i.css`
|
|
1748
1748
|
display: flex;
|
|
1749
1749
|
gap: ${k(300)};
|
|
1750
1750
|
padding: ${k(300)} ${k(200)};
|
|
@@ -1769,7 +1769,7 @@
|
|
|
1769
1769
|
background-color: ${w("primary",100)};
|
|
1770
1770
|
width: 99.8%;
|
|
1771
1771
|
}
|
|
1772
|
-
`,
|
|
1772
|
+
`,vb=i.css`
|
|
1773
1773
|
width: 100%;
|
|
1774
1774
|
max-width: calc(100% - 2.75rem);
|
|
1775
1775
|
|
|
@@ -1800,7 +1800,7 @@
|
|
|
1800
1800
|
.ds-base-map-children {
|
|
1801
1801
|
margin-top: 0.625rem;
|
|
1802
1802
|
}
|
|
1803
|
-
`,
|
|
1803
|
+
`,bb=(e,t,n,r,o,s="icon")=>{let a="1rem",l=`${j(300)} solid ${w("neutral",100)}`;if("cluster"===s){const e=1.75,t=6,n=.03125;if(l=`${j(300)} solid ${w("neutral",100)}`,void 0!==o&&o>1){const r=e+(o-1)*n;a=`${Math.min(r,t)}rem`}else a=`${e}rem`}else"simple-pin"===s?(l=`${j(300)} solid ${w("error",500)}`,a="1.5rem"):n&&(a="1.75rem",l=`${j(200)} solid ${w("neutral",100)}`);return i.css`
|
|
1804
1804
|
text-overflow: ellipsis;
|
|
1805
1805
|
height: ${a};
|
|
1806
1806
|
width: ${a};
|
|
@@ -1841,14 +1841,14 @@
|
|
|
1841
1841
|
height: 0.875rem;
|
|
1842
1842
|
width: 0.875rem;
|
|
1843
1843
|
}
|
|
1844
|
-
`},
|
|
1844
|
+
`},yb=n.forwardRef((({ariaLabel:e,icon:t,backgroundColor:n,onClick:o,showFocusState:s,count:a,mode:l,variant:c="icon",labels:d},u)=>{const h=Mf("MapMarker",d),p=a?(f=a)>=1e8?"99M+":f>=1e6?`${(f/1e6).toFixed(0)}M`:f>=1e5?`${(f/1e3).toFixed(0)}K`:f.toString():void 0;var f;return r.jsx("div",{css:s?i.css`
|
|
1845
1845
|
outline: ${j(200)} solid ${w("primary",700)};
|
|
1846
1846
|
outline-offset: ${k(50)};
|
|
1847
1847
|
border-radius: 50%;
|
|
1848
1848
|
box-shadow:
|
|
1849
1849
|
0 0 0 0.125rem ${w("neutral",100)},
|
|
1850
1850
|
rgba(0, 0, 0, 0.05) 0 0.125rem 0.125rem 0.25rem;
|
|
1851
|
-
`:"",children:r.jsxs("button",{type:"button",css:gb(n,!!o,!!t,l,a,c),"aria-label":e||(a?h.clusterAriaLabel(a):"simple-pin"===c?h.pinAriaLabel:h.pointAriaLabel),ref:u,onClick:o,children:["cluster"===c&&p,"icon"===c&&t]})})})),bb={Paper:({ariaLabel:e,onClick:n,triggerRef:r,showFocusState:o})=>t.jsx(vb,{ariaLabel:e||"paper icon",icon:t.jsx(tm,{color:"#79022C"}),backgroundColor:"#FFBCD4",onClick:n,ref:r,showFocusState:o}),Drop:({ariaLabel:e,onClick:n,triggerRef:r,showFocusState:o})=>t.jsx(vb,{ariaLabel:e||"drop icon",icon:t.jsx(nm,{color:"#7D2A03"}),backgroundColor:"#F3A078",onClick:n,ref:r,showFocusState:o}),Plant:({ariaLabel:e,onClick:n,triggerRef:r,showFocusState:o})=>t.jsx(vb,{ariaLabel:e||"plant icon",icon:t.jsx(rm,{color:"#3B6402"}),backgroundColor:"#B7E578",onClick:n,ref:r,showFocusState:o}),Point:({ariaLabel:e,onClick:n,triggerRef:r,showFocusState:o})=>t.jsx(vb,{ariaLabel:e||"point icon",backgroundColor:w("primary",500),onClick:n,ref:r,showFocusState:o})};function yb(){return"undefined"!=typeof window}function xb(e){return kb(e)?(e.nodeName||"").toLowerCase():"#document"}function wb(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Cb(e){var t;return null==(t=(kb(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function kb(e){return!!yb()&&(e instanceof Node||e instanceof wb(e).Node)}function Sb(e){return!!yb()&&(e instanceof Element||e instanceof wb(e).Element)}function $b(e){return!!yb()&&(e instanceof HTMLElement||e instanceof wb(e).HTMLElement)}function jb(e){return!(!yb()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof wb(e).ShadowRoot)}const Mb=new Set(["inline","contents"]);function Eb(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Bb(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Mb.has(o)}const Tb=new Set(["table","td","th"]);function Ob(e){return Tb.has(xb(e))}const Lb=[":popover-open",":modal"];function Ab(e){return Lb.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}const Rb=["transform","translate","scale","rotate","perspective"],Nb=["transform","translate","scale","rotate","perspective","filter"],Db=["paint","layout","strict","content"];function Ib(e){const t=Pb(),n=Sb(e)?Bb(e):e;return Rb.some((e=>!!n[e]&&"none"!==n[e]))||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||Nb.some((e=>(n.willChange||"").includes(e)))||Db.some((e=>(n.contain||"").includes(e)))}function Pb(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const zb=new Set(["html","body","#document"]);function Vb(e){return zb.has(xb(e))}function Bb(e){return wb(e).getComputedStyle(e)}function Hb(e){return Sb(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function _b(e){if("html"===xb(e))return e;const t=e.assignedSlot||e.parentNode||jb(e)&&e.host||Cb(e);return jb(t)?t.host:t}function Fb(e){const t=_b(e);return Vb(t)?e.ownerDocument?e.ownerDocument.body:e.body:$b(t)&&Eb(t)?t:Fb(t)}function qb(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=Fb(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),s=wb(o);if(i){const e=Wb(s);return t.concat(s,s.visualViewport||[],Eb(o)?o:[],e&&n?qb(e):[])}return t.concat(o,qb(o,[],n))}function Wb(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Ub=Math.min,Kb=Math.max,Gb=Math.round,Zb=Math.floor,Jb=e=>({x:e,y:e}),Xb={left:"right",right:"left",bottom:"top",top:"bottom"},Yb={start:"end",end:"start"};function Qb(e,t,n){return Kb(e,Ub(t,n))}function ey(e,t){return"function"==typeof e?e(t):e}function ty(e){return e.split("-")[0]}function ny(e){return e.split("-")[1]}function ry(e){return"x"===e?"y":"x"}function oy(e){return"y"===e?"height":"width"}const iy=new Set(["top","bottom"]);function sy(e){return iy.has(ty(e))?"y":"x"}function ay(e){return ry(sy(e))}function ly(e){return e.replace(/start|end/g,(e=>Yb[e]))}const cy=["left","right"],dy=["right","left"],uy=["top","bottom"],hy=["bottom","top"];function py(e,t,n,r){const o=ny(e);let i=function(e,t,n){switch(e){case"top":case"bottom":return n?t?dy:cy:t?cy:dy;case"left":case"right":return t?uy:hy;default:return[]}}(ty(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(ly)))),i}function fy(e){return e.replace(/left|right|bottom|top/g,(e=>Xb[e]))}function my(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function gy(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}const vy="data-floating-ui-focusable";function by(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&jb(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function yy(e){return"composedPath"in e?e.composedPath()[0]:e.target}function xy(e,t){if(null==t)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return null!=n.target&&t.contains(n.target)}function wy(e){return(null==e?void 0:e.ownerDocument)||document}function Cy(e,t,n){void 0===n&&(n=!0);return e.filter((e=>{var r;return e.parentId===t&&(!n||(null==(r=e.context)?void 0:r.open))})).flatMap((t=>[t,...Cy(e,t.id,n)]))}var ky="undefined"!=typeof document?n.useLayoutEffect:function(){};const Sy={...l}.useInsertionEffect||(e=>e());function $y(e){const t=l.useRef((()=>{if("production"!==process.env.NODE_ENV)throw new Error("Cannot call an event handler while rendering.")}));return Sy((()=>{t.current=e})),l.useCallback((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}function jy(e,t,n){let{reference:r,floating:o}=e;const i=sy(t),s=ay(t),a=oy(s),l=ty(t),c="y"===i,d=r.x+r.width/2-o.width/2,u=r.y+r.height/2-o.height/2,h=r[a]/2-o[a]/2;let p;switch(l){case"top":p={x:d,y:r.y-o.height};break;case"bottom":p={x:d,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:u};break;case"left":p={x:r.x-o.width,y:u};break;default:p={x:r.x,y:r.y}}switch(ny(t)){case"start":p[s]-=h*(n&&c?-1:1);break;case"end":p[s]+=h*(n&&c?-1:1)}return p}async function My(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:h=!1,padding:p=0}=ey(t,e),f=my(p),m=a[h?"floating"===u?"reference":"floating":u],g=gy(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(a.floating)),boundary:c,rootBoundary:d,strategy:l})),v="floating"===u?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,b=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),y=await(null==i.isElement?void 0:i.isElement(b))&&await(null==i.getScale?void 0:i.getScale(b))||{x:1,y:1},x=gy(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:b,strategy:l}):v);return{top:(g.top-x.top+f.top)/y.y,bottom:(x.bottom-g.bottom+f.bottom)/y.y,left:(g.left-x.left+f.left)/y.x,right:(x.right-g.right+f.right)/y.x}}const Ey=new Set(["left","top"]);function Ty(e){const t=Bb(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=$b(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=Gb(n)!==i||Gb(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function Oy(e){return Sb(e)?e:e.contextElement}function Ly(e){const t=Oy(e);if(!$b(t))return Jb(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Ty(t);let s=(i?Gb(n.width):n.width)/r,a=(i?Gb(n.height):n.height)/o;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const Ay=Jb(0);function Ry(e){const t=wb(e);return Pb()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Ay}function Ny(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=Oy(e);let s=Jb(1);t&&(r?Sb(r)&&(s=Ly(r)):s=Ly(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==wb(e))&&t}(i,n,r)?Ry(i):Jb(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,d=o.width/s.x,u=o.height/s.y;if(i){const e=wb(i),t=r&&Sb(r)?wb(r):r;let n=e,o=Wb(n);for(;o&&r&&t!==n;){const e=Ly(o),t=o.getBoundingClientRect(),r=Bb(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,s=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,d*=e.x,u*=e.y,l+=i,c+=s,n=wb(o),o=Wb(n)}}return gy({width:d,height:u,x:l,y:c})}function Dy(e,t){const n=Hb(e).scrollLeft;return t?t.left+n:Ny(Cb(e)).left+n}function Iy(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Dy(e,n),y:n.top+t.scrollTop}}const Py=new Set(["absolute","fixed"]);function zy(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=wb(e),r=Cb(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const e=Pb();(!e||e&&"fixed"===t)&&(a=o.offsetLeft,l=o.offsetTop)}const c=Dy(r);if(c<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,s=Math.abs(r.clientWidth-t.clientWidth-o);s<=25&&(i-=s)}else c<=25&&(i+=c);return{width:i,height:s,x:a,y:l}}(e,n);else if("document"===t)r=function(e){const t=Cb(e),n=Hb(e),r=e.ownerDocument.body,o=Kb(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Kb(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Dy(e);const a=-n.scrollTop;return"rtl"===Bb(r).direction&&(s+=Kb(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}(Cb(e));else if(Sb(t))r=function(e,t){const n=Ny(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=$b(e)?Ly(e):Jb(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=Ry(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return gy(r)}function Vy(e,t){const n=_b(e);return!(n===t||!Sb(n)||Vb(n))&&("fixed"===Bb(n).position||Vy(n,t))}function By(e,t,n){const r=$b(t),o=Cb(t),i="fixed"===n,s=Ny(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=Jb(0);function c(){l.x=Dy(o)}if(r||!r&&!i)if(("body"!==xb(t)||Eb(o))&&(a=Hb(t)),r){const e=Ny(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&c();i&&!r&&o&&c();const d=!o||r||i?Jb(0):Iy(o,a);return{x:s.left+a.scrollLeft-l.x-d.x,y:s.top+a.scrollTop-l.y-d.y,width:s.width,height:s.height}}function Hy(e){return"static"===Bb(e).position}function _y(e,t){if(!$b(e)||"fixed"===Bb(e).position)return null;if(t)return t(e);let n=e.offsetParent;return Cb(e)===n&&(n=n.ownerDocument.body),n}function Fy(e,t){const n=wb(e);if(Ab(e))return n;if(!$b(e)){let t=_b(e);for(;t&&!Vb(t);){if(Sb(t)&&!Hy(t))return t;t=_b(t)}return n}let r=_y(e,t);for(;r&&Ob(r)&&Hy(r);)r=_y(r,t);return r&&Vb(r)&&Hy(r)&&!Ib(r)?n:r||function(e){let t=_b(e);for(;$b(t)&&!Vb(t);){if(Ib(t))return t;if(Ab(t))return null;t=_b(t)}return null}(e)||n}const qy={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,s=Cb(r),a=!!t&&Ab(t.floating);if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=Jb(1);const d=Jb(0),u=$b(r);if((u||!u&&!i)&&(("body"!==xb(r)||Eb(s))&&(l=Hb(r)),$b(r))){const e=Ny(r);c=Ly(r),d.x=e.x+r.clientLeft,d.y=e.y+r.clientTop}const h=!s||u||i?Jb(0):Iy(s,l);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+d.x+h.x,y:n.y*c.y-l.scrollTop*c.y+d.y+h.y}},getDocumentElement:Cb,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i="clippingAncestors"===n?Ab(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=qb(e,[],!1).filter((e=>Sb(e)&&"body"!==xb(e))),o=null;const i="fixed"===Bb(e).position;let s=i?_b(e):e;for(;Sb(s)&&!Vb(s);){const t=Bb(s),n=Ib(s);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&Py.has(o.position)||Eb(s)&&!n&&Vy(e,s))?r=r.filter((e=>e!==s)):o=t,s=_b(s)}return t.set(e,r),r}(t,this._c):[].concat(n),s=[...i,r],a=s[0],l=s.reduce(((e,n)=>{const r=zy(t,n,o);return e.top=Kb(r.top,e.top),e.right=Ub(r.right,e.right),e.bottom=Ub(r.bottom,e.bottom),e.left=Kb(r.left,e.left),e}),zy(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:Fy,getElementRects:async function(e){const t=this.getOffsetParent||Fy,n=this.getDimensions,r=await n(e.floating);return{reference:By(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=Ty(e);return{width:t,height:n}},getScale:Ly,isElement:Sb,isRTL:function(e){return"rtl"===Bb(e).direction}};function Wy(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Uy(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=Oy(e),d=o||i?[...c?qb(c):[],...qb(t)]:[];d.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const u=c&&a?function(e,t){let n,r=null;const o=Cb(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function s(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),i();const c=e.getBoundingClientRect(),{left:d,top:u,width:h,height:p}=c;if(a||t(),!h||!p)return;const f={rootMargin:-Zb(u)+"px "+-Zb(o.clientWidth-(d+h))+"px "+-Zb(o.clientHeight-(u+p))+"px "+-Zb(d)+"px",threshold:Kb(0,Ub(1,l))||1};let m=!0;function g(t){const r=t[0].intersectionRatio;if(r!==l){if(!m)return s();r?s(!1,r):n=setTimeout((()=>{s(!1,1e-7)}),1e3)}1!==r||Wy(c,e.getBoundingClientRect())||s(),m=!1}try{r=new IntersectionObserver(g,{...f,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(g,f)}r.observe(e)}(!0),i}(c,n):null;let h,p=-1,f=null;s&&(f=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var e;null==(e=f)||e.observe(t)}))),n()})),c&&!l&&f.observe(c),f.observe(t));let m=l?Ny(e):null;return l&&function t(){const r=Ny(e);m&&!Wy(m,r)&&n();m=r,h=requestAnimationFrame(t)}(),n(),()=>{var e;d.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==u||u(),null==(e=f)||e.disconnect(),f=null,l&&cancelAnimationFrame(h)}}const Ky=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),s=ty(n),a=ny(n),l="y"===sy(n),c=Ey.has(s)?-1:1,d=i&&l?-1:1,u=ey(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:f}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a&&"number"==typeof f&&(p="end"===a?-1*f:f),l?{x:p*d,y:h*c}:{x:h*c,y:p*d}}(t,e);return s===(null==(n=a.offset)?void 0:n.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},Gy=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=ey(e,t),c={x:n,y:r},d=await My(t,l),u=sy(ty(o)),h=ry(u);let p=c[h],f=c[u];if(i){const e="y"===h?"bottom":"right";p=Qb(p+d["y"===h?"top":"left"],p,p-d[e])}if(s){const e="y"===u?"bottom":"right";f=Qb(f+d["y"===u?"top":"left"],f,f-d[e])}const m=a.fn({...t,[h]:p,[u]:f});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[h]:i,[u]:s}}}}}},Zy=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:m=!0,...g}=ey(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const v=ty(o),b=sy(a),y=ty(a)===a,x=await(null==l.isRTL?void 0:l.isRTL(c.floating)),w=h||(y||!m?[fy(a)]:function(e){const t=fy(e);return[ly(e),t,ly(t)]}(a)),C="none"!==f;!h&&C&&w.push(...py(a,m,f,x));const k=[a,...w],S=await My(t,g),$=[];let j=(null==(r=i.flip)?void 0:r.overflows)||[];if(d&&$.push(S[v]),u){const e=function(e,t,n){void 0===n&&(n=!1);const r=ny(e),o=ay(e),i=oy(o);let s="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=fy(s)),[s,fy(s)]}(o,s,x);$.push(S[e[0]],S[e[1]])}if(j=[...j,{placement:o,overflows:$}],!$.every((e=>e<=0))){var M,E;const e=((null==(M=i.flip)?void 0:M.index)||0)+1,t=k[e];if(t){if(!("alignment"===u&&b!==sy(t))||j.every((e=>sy(e.placement)!==b||e.overflows[0]>0)))return{data:{index:e,overflows:j},reset:{placement:t}}}let n=null==(E=j.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:E.placement;if(!n)switch(p){case"bestFit":{var T;const e=null==(T=j.filter((e=>{if(C){const t=sy(e.placement);return t===b||"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:T[0];e&&(n=e);break}case"initialPlacement":n=a}if(o!==n)return{reset:{placement:n}}}return{}}}},Jy=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:c,padding:d=0}=ey(e,t)||{};if(null==c)return{};const u=my(d),h={x:n,y:r},p=ay(o),f=oy(p),m=await s.getDimensions(c),g="y"===p,v=g?"top":"left",b=g?"bottom":"right",y=g?"clientHeight":"clientWidth",x=i.reference[f]+i.reference[p]-h[p]-i.floating[f],w=h[p]-i.reference[p],C=await(null==s.getOffsetParent?void 0:s.getOffsetParent(c));let k=C?C[y]:0;k&&await(null==s.isElement?void 0:s.isElement(C))||(k=a.floating[y]||i.floating[f]);const S=x/2-w/2,$=k/2-m[f]/2-1,j=Ub(u[v],$),M=Ub(u[b],$),E=j,T=k-m[f]-M,O=k/2-m[f]/2+S,L=Qb(E,O,T),A=!l.arrow&&null!=ny(o)&&O!==L&&i.reference[f]/2-(O<E?j:M)-m[f]/2<0,R=A?O<E?O-E:O-T:0;return{[p]:h[p]+R,data:{[p]:L,centerOffset:O-L-R,...A&&{alignmentOffset:R}},reset:A}}}),Xy=(e,t,n)=>{const r=new Map,o={platform:qy,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:u}=jy(c,r,l),h=r,p={},f=0;for(let n=0;n<a.length;n++){const{name:i,fn:m}=a[n],{x:g,y:v,data:b,reset:y}=await m({x:d,y:u,initialPlacement:r,placement:h,strategy:o,middlewareData:p,rects:c,platform:s,elements:{reference:e,floating:t}});d=null!=g?g:d,u=null!=v?v:u,p={...p,[i]:{...p[i],...b}},y&&f<=50&&(f++,"object"==typeof y&&(y.placement&&(h=y.placement),y.rects&&(c=!0===y.rects?await s.getElementRects({reference:e,floating:t,strategy:o}):y.rects),({x:d,y:u}=jy(c,h,l))),n=-1)}return{x:d,y:u,placement:h,strategy:o,middlewareData:p}})(e,t,{...o,platform:i})};var Yy="undefined"!=typeof document?n.useLayoutEffect:function(){};function Qy(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!Qy(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!Qy(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function ex(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function tx(e,t){const n=ex(e);return Math.round(t*n)/n}function nx(e){const t=l.useRef(e);return Yy((()=>{t.current=e})),t}const rx=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?Jy({element:n.current,padding:r}).fn(t):{}:n?Jy({element:n,padding:r}).fn(t):{};var o}}),ox=(e,t)=>({...Ky(e),options:[e,t]}),ix=(e,t)=>({...Gy(e),options:[e,t]}),sx=(e,t)=>({...rx(e),options:[e,t]}),ax="data-floating-ui-focusable",lx="active",cx="selected",dx={...l};let ux=!1,hx=0;const px=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+hx++;const fx=dx.useId||function(){const[e,t]=l.useState((()=>ux?px():void 0));return ky((()=>{null==e&&t(px())}),[]),l.useEffect((()=>{ux=!0}),[]),e};let mx;"production"!==process.env.NODE_ENV&&(mx=new Set);const gx=l.createContext(null),vx=l.createContext(null),bx=()=>{var e;return(null==(e=l.useContext(gx))?void 0:e.id)||null},yx=()=>l.useContext(vx);const xx={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},wx={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Cx=e=>{var t,n;return{escapeKey:"boolean"==typeof e?e:null!=(t=null==e?void 0:e.escapeKey)&&t,outsidePress:"boolean"==typeof e?e:null==(n=null==e?void 0:e.outsidePress)||n}};function kx(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=fx(),i=l.useRef({}),[s]=l.useState((()=>function(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach((e=>e(n)))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;null==(r=e.get(t))||r.delete(n)}}}())),a=null!=bx();if("production"!==process.env.NODE_ENV){const e=r.reference;e&&!Sb(e)&&function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");var i;null!=(e=mx)&&e.has(o)||(null==(i=mx)||i.add(o),console.error(o))}("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[c,d]=l.useState(r.reference),u=$y(((e,t,r)=>{i.current.openEvent=e?t:void 0,s.emit("openchange",{open:e,event:t,reason:r,nested:a}),null==n||n(e,t,r)})),h=l.useMemo((()=>({setPositionReference:d})),[]),p=l.useMemo((()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference})),[c,r.reference,r.floating]);return l.useMemo((()=>({dataRef:i,open:t,onOpenChange:u,elements:p,events:s,floatingId:o,refs:h})),[t,u,p,s,o,h])}function Sx(e){void 0===e&&(e={});const{nodeId:t}=e,n=kx({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,s]=l.useState(null),[a,d]=l.useState(null),u=(null==o?void 0:o.domReference)||i,h=l.useRef(null),p=yx();ky((()=>{u&&(h.current=u)}),[u]);const f=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:d,open:u}=e,[h,p]=l.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,m]=l.useState(r);Qy(f,r)||m(r);const[g,v]=l.useState(null),[b,y]=l.useState(null),x=l.useCallback((e=>{e!==S.current&&(S.current=e,v(e))}),[]),w=l.useCallback((e=>{e!==$.current&&($.current=e,y(e))}),[]),C=i||g,k=s||b,S=l.useRef(null),$=l.useRef(null),j=l.useRef(h),M=null!=d,E=nx(d),T=nx(o),O=nx(u),L=l.useCallback((()=>{if(!S.current||!$.current)return;const e={placement:t,strategy:n,middleware:f};T.current&&(e.platform=T.current),Xy(S.current,$.current,e).then((e=>{const t={...e,isPositioned:!1!==O.current};A.current&&!Qy(j.current,t)&&(j.current=t,c.flushSync((()=>{p(t)})))}))}),[f,t,n,T,O]);Yy((()=>{!1===u&&j.current.isPositioned&&(j.current.isPositioned=!1,p((e=>({...e,isPositioned:!1}))))}),[u]);const A=l.useRef(!1);Yy((()=>(A.current=!0,()=>{A.current=!1})),[]),Yy((()=>{if(C&&(S.current=C),k&&($.current=k),C&&k){if(E.current)return E.current(C,k,L);L()}}),[C,k,L,E,M]);const R=l.useMemo((()=>({reference:S,floating:$,setReference:x,setFloating:w})),[x,w]),N=l.useMemo((()=>({reference:C,floating:k})),[C,k]),D=l.useMemo((()=>{const e={position:n,left:0,top:0};if(!N.floating)return e;const t=tx(N.floating,h.x),r=tx(N.floating,h.y);return a?{...e,transform:"translate("+t+"px, "+r+"px)",...ex(N.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,a,N.floating,h.x,h.y]);return l.useMemo((()=>({...h,update:L,refs:R,elements:N,floatingStyles:D})),[h,L,R,N,D])}({...e,elements:{...o,...a&&{reference:a}}}),m=l.useCallback((e=>{const t=Sb(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;d(t),f.refs.setReference(t)}),[f.refs]),g=l.useCallback((e=>{(Sb(e)||null===e)&&(h.current=e,s(e)),(Sb(f.refs.reference.current)||null===f.refs.reference.current||null!==e&&!Sb(e))&&f.refs.setReference(e)}),[f.refs]),v=l.useMemo((()=>({...f.refs,setReference:g,setPositionReference:m,domReference:h})),[f.refs,g,m]),b=l.useMemo((()=>({...f.elements,domReference:u})),[f.elements,u]),y=l.useMemo((()=>({...f,...r,refs:v,elements:b,nodeId:t})),[f,v,b,t,r]);return ky((()=>{r.dataRef.current.floatingContext=y;const e=null==p?void 0:p.nodesRef.current.find((e=>e.id===t));e&&(e.context=y)})),l.useMemo((()=>({...f,context:y,refs:v,elements:b})),[f,v,b,y])}function $x(e,t,n){const r=new Map,o="item"===n;let i=e;if(o&&e){const{[lx]:t,[cx]:n,...r}=e;i=r}return{..."floating"===n&&{tabIndex:-1,[ax]:""},...i,...t.map((t=>{const r=t?t[n]:null;return"function"==typeof r?e?r(e):null:r})).concat(e).reduce(((e,t)=>t?(Object.entries(t).forEach((t=>{let[n,i]=t;var s;o&&[lx,cx].includes(n)||(0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof i&&(null==(s=r.get(n))||s.push(i),e[n]=function(){for(var e,t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return null==(e=r.get(n))?void 0:e.map((e=>e(...o))).find((e=>void 0!==e))})):e[n]=i)})),e):e),{})}}const jx=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Mx(e,t){var n,r;void 0===t&&(t={});const{open:o,elements:i,floatingId:s}=e,{enabled:a=!0,role:c="dialog"}=t,d=fx(),u=(null==(n=i.domReference)?void 0:n.id)||d,h=l.useMemo((()=>{var e,t;return(null==(e=(t=i.floating)?t.hasAttribute(vy)?t:t.querySelector("["+vy+"]")||t:null)?void 0:e.id)||s}),[i.floating,s]),p=null!=(r=jx.get(c))?r:c,f=null!=bx(),m=l.useMemo((()=>"tooltip"===p||"label"===c?{["aria-"+("label"===c?"labelledby":"describedby")]:o?h:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":"alertdialog"===p?"dialog":p,"aria-controls":o?h:void 0,..."listbox"===p&&{role:"combobox"},..."menu"===p&&{id:u},..."menu"===p&&f&&{role:"menuitem"},..."select"===c&&{"aria-autocomplete":"none"},..."combobox"===c&&{"aria-autocomplete":"list"}}),[p,h,f,o,u,c]),g=l.useMemo((()=>{const e={id:h,...p&&{role:p}};return"tooltip"===p||"label"===c?e:{...e,..."menu"===p&&{"aria-labelledby":u}}}),[p,h,u,c]),v=l.useCallback((e=>{let{active:t,selected:n}=e;const r={role:"option",...t&&{id:h+"-fui-option"}};switch(c){case"select":case"combobox":return{...r,"aria-selected":n}}return{}}),[h,c]);return l.useMemo((()=>a?{reference:m,floating:g,item:v}:{}),[a,m,g,v])}const Ex=i.css`
|
|
1851
|
+
`:"",children:r.jsxs("button",{type:"button",css:bb(n,!!o,!!t,l,a,c),"aria-label":e||(a?h.clusterAriaLabel(a):"simple-pin"===c?h.pinAriaLabel:h.pointAriaLabel),ref:u,onClick:o,children:["cluster"===c&&p,"icon"===c&&t]})})})),xb={Paper:({ariaLabel:e,onClick:n,triggerRef:r,showFocusState:o})=>t.jsx(yb,{ariaLabel:e||"paper icon",icon:t.jsx(tm,{color:"#79022C"}),backgroundColor:"#FFBCD4",onClick:n,ref:r,showFocusState:o}),Drop:({ariaLabel:e,onClick:n,triggerRef:r,showFocusState:o})=>t.jsx(yb,{ariaLabel:e||"drop icon",icon:t.jsx(nm,{color:"#7D2A03"}),backgroundColor:"#F3A078",onClick:n,ref:r,showFocusState:o}),Plant:({ariaLabel:e,onClick:n,triggerRef:r,showFocusState:o})=>t.jsx(yb,{ariaLabel:e||"plant icon",icon:t.jsx(rm,{color:"#3B6402"}),backgroundColor:"#B7E578",onClick:n,ref:r,showFocusState:o}),Point:({ariaLabel:e,onClick:n,triggerRef:r,showFocusState:o})=>t.jsx(yb,{ariaLabel:e||"point icon",backgroundColor:w("primary",500),onClick:n,ref:r,showFocusState:o})};function wb(){return"undefined"!=typeof window}function Cb(e){return $b(e)?(e.nodeName||"").toLowerCase():"#document"}function kb(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Sb(e){var t;return null==(t=($b(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function $b(e){return!!wb()&&(e instanceof Node||e instanceof kb(e).Node)}function jb(e){return!!wb()&&(e instanceof Element||e instanceof kb(e).Element)}function Mb(e){return!!wb()&&(e instanceof HTMLElement||e instanceof kb(e).HTMLElement)}function Eb(e){return!(!wb()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof kb(e).ShadowRoot)}const Tb=new Set(["inline","contents"]);function Ob(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=_b(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Tb.has(o)}const Lb=new Set(["table","td","th"]);function Ab(e){return Lb.has(Cb(e))}const Rb=[":popover-open",":modal"];function Nb(e){return Rb.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}const Db=["transform","translate","scale","rotate","perspective"],Ib=["transform","translate","scale","rotate","perspective","filter"],Pb=["paint","layout","strict","content"];function zb(e){const t=Vb(),n=jb(e)?_b(e):e;return Db.some((e=>!!n[e]&&"none"!==n[e]))||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||Ib.some((e=>(n.willChange||"").includes(e)))||Pb.some((e=>(n.contain||"").includes(e)))}function Vb(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const Bb=new Set(["html","body","#document"]);function Hb(e){return Bb.has(Cb(e))}function _b(e){return kb(e).getComputedStyle(e)}function Fb(e){return jb(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function qb(e){if("html"===Cb(e))return e;const t=e.assignedSlot||e.parentNode||Eb(e)&&e.host||Sb(e);return Eb(t)?t.host:t}function Wb(e){const t=qb(e);return Hb(t)?e.ownerDocument?e.ownerDocument.body:e.body:Mb(t)&&Ob(t)?t:Wb(t)}function Ub(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=Wb(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),s=kb(o);if(i){const e=Kb(s);return t.concat(s,s.visualViewport||[],Ob(o)?o:[],e&&n?Ub(e):[])}return t.concat(o,Ub(o,[],n))}function Kb(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Gb=Math.min,Zb=Math.max,Jb=Math.round,Xb=Math.floor,Yb=e=>({x:e,y:e}),Qb={left:"right",right:"left",bottom:"top",top:"bottom"},ey={start:"end",end:"start"};function ty(e,t,n){return Zb(e,Gb(t,n))}function ny(e,t){return"function"==typeof e?e(t):e}function ry(e){return e.split("-")[0]}function oy(e){return e.split("-")[1]}function iy(e){return"x"===e?"y":"x"}function sy(e){return"y"===e?"height":"width"}const ay=new Set(["top","bottom"]);function ly(e){return ay.has(ry(e))?"y":"x"}function cy(e){return iy(ly(e))}function dy(e){return e.replace(/start|end/g,(e=>ey[e]))}const uy=["left","right"],hy=["right","left"],py=["top","bottom"],fy=["bottom","top"];function my(e,t,n,r){const o=oy(e);let i=function(e,t,n){switch(e){case"top":case"bottom":return n?t?hy:uy:t?uy:hy;case"left":case"right":return t?py:fy;default:return[]}}(ry(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(dy)))),i}function gy(e){return e.replace(/left|right|bottom|top/g,(e=>Qb[e]))}function vy(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function by(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}const yy="data-floating-ui-focusable";function xy(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Eb(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function wy(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Cy(e,t){if(null==t)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return null!=n.target&&t.contains(n.target)}function ky(e){return(null==e?void 0:e.ownerDocument)||document}function Sy(e,t,n){void 0===n&&(n=!0);return e.filter((e=>{var r;return e.parentId===t&&(!n||(null==(r=e.context)?void 0:r.open))})).flatMap((t=>[t,...Sy(e,t.id,n)]))}var $y="undefined"!=typeof document?n.useLayoutEffect:function(){};const jy={...l}.useInsertionEffect||(e=>e());function My(e){const t=l.useRef((()=>{if("production"!==process.env.NODE_ENV)throw new Error("Cannot call an event handler while rendering.")}));return jy((()=>{t.current=e})),l.useCallback((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}function Ey(e,t,n){let{reference:r,floating:o}=e;const i=ly(t),s=cy(t),a=sy(s),l=ry(t),c="y"===i,d=r.x+r.width/2-o.width/2,u=r.y+r.height/2-o.height/2,h=r[a]/2-o[a]/2;let p;switch(l){case"top":p={x:d,y:r.y-o.height};break;case"bottom":p={x:d,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:u};break;case"left":p={x:r.x-o.width,y:u};break;default:p={x:r.x,y:r.y}}switch(oy(t)){case"start":p[s]-=h*(n&&c?-1:1);break;case"end":p[s]+=h*(n&&c?-1:1)}return p}async function Ty(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:h=!1,padding:p=0}=ny(t,e),f=vy(p),m=a[h?"floating"===u?"reference":"floating":u],g=by(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(a.floating)),boundary:c,rootBoundary:d,strategy:l})),v="floating"===u?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,b=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),y=await(null==i.isElement?void 0:i.isElement(b))&&await(null==i.getScale?void 0:i.getScale(b))||{x:1,y:1},x=by(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:b,strategy:l}):v);return{top:(g.top-x.top+f.top)/y.y,bottom:(x.bottom-g.bottom+f.bottom)/y.y,left:(g.left-x.left+f.left)/y.x,right:(x.right-g.right+f.right)/y.x}}const Oy=new Set(["left","top"]);function Ly(e){const t=_b(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Mb(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=Jb(n)!==i||Jb(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function Ay(e){return jb(e)?e:e.contextElement}function Ry(e){const t=Ay(e);if(!Mb(t))return Yb(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Ly(t);let s=(i?Jb(n.width):n.width)/r,a=(i?Jb(n.height):n.height)/o;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const Ny=Yb(0);function Dy(e){const t=kb(e);return Vb()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Ny}function Iy(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=Ay(e);let s=Yb(1);t&&(r?jb(r)&&(s=Ry(r)):s=Ry(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==kb(e))&&t}(i,n,r)?Dy(i):Yb(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,d=o.width/s.x,u=o.height/s.y;if(i){const e=kb(i),t=r&&jb(r)?kb(r):r;let n=e,o=Kb(n);for(;o&&r&&t!==n;){const e=Ry(o),t=o.getBoundingClientRect(),r=_b(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,s=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,d*=e.x,u*=e.y,l+=i,c+=s,n=kb(o),o=Kb(n)}}return by({width:d,height:u,x:l,y:c})}function Py(e,t){const n=Fb(e).scrollLeft;return t?t.left+n:Iy(Sb(e)).left+n}function zy(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Py(e,n),y:n.top+t.scrollTop}}const Vy=new Set(["absolute","fixed"]);function By(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=kb(e),r=Sb(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const e=Vb();(!e||e&&"fixed"===t)&&(a=o.offsetLeft,l=o.offsetTop)}const c=Py(r);if(c<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,s=Math.abs(r.clientWidth-t.clientWidth-o);s<=25&&(i-=s)}else c<=25&&(i+=c);return{width:i,height:s,x:a,y:l}}(e,n);else if("document"===t)r=function(e){const t=Sb(e),n=Fb(e),r=e.ownerDocument.body,o=Zb(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Zb(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Py(e);const a=-n.scrollTop;return"rtl"===_b(r).direction&&(s+=Zb(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}(Sb(e));else if(jb(t))r=function(e,t){const n=Iy(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Mb(e)?Ry(e):Yb(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=Dy(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return by(r)}function Hy(e,t){const n=qb(e);return!(n===t||!jb(n)||Hb(n))&&("fixed"===_b(n).position||Hy(n,t))}function _y(e,t,n){const r=Mb(t),o=Sb(t),i="fixed"===n,s=Iy(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=Yb(0);function c(){l.x=Py(o)}if(r||!r&&!i)if(("body"!==Cb(t)||Ob(o))&&(a=Fb(t)),r){const e=Iy(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&c();i&&!r&&o&&c();const d=!o||r||i?Yb(0):zy(o,a);return{x:s.left+a.scrollLeft-l.x-d.x,y:s.top+a.scrollTop-l.y-d.y,width:s.width,height:s.height}}function Fy(e){return"static"===_b(e).position}function qy(e,t){if(!Mb(e)||"fixed"===_b(e).position)return null;if(t)return t(e);let n=e.offsetParent;return Sb(e)===n&&(n=n.ownerDocument.body),n}function Wy(e,t){const n=kb(e);if(Nb(e))return n;if(!Mb(e)){let t=qb(e);for(;t&&!Hb(t);){if(jb(t)&&!Fy(t))return t;t=qb(t)}return n}let r=qy(e,t);for(;r&&Ab(r)&&Fy(r);)r=qy(r,t);return r&&Hb(r)&&Fy(r)&&!zb(r)?n:r||function(e){let t=qb(e);for(;Mb(t)&&!Hb(t);){if(zb(t))return t;if(Nb(t))return null;t=qb(t)}return null}(e)||n}const Uy={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,s=Sb(r),a=!!t&&Nb(t.floating);if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=Yb(1);const d=Yb(0),u=Mb(r);if((u||!u&&!i)&&(("body"!==Cb(r)||Ob(s))&&(l=Fb(r)),Mb(r))){const e=Iy(r);c=Ry(r),d.x=e.x+r.clientLeft,d.y=e.y+r.clientTop}const h=!s||u||i?Yb(0):zy(s,l);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+d.x+h.x,y:n.y*c.y-l.scrollTop*c.y+d.y+h.y}},getDocumentElement:Sb,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i="clippingAncestors"===n?Nb(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=Ub(e,[],!1).filter((e=>jb(e)&&"body"!==Cb(e))),o=null;const i="fixed"===_b(e).position;let s=i?qb(e):e;for(;jb(s)&&!Hb(s);){const t=_b(s),n=zb(s);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&Vy.has(o.position)||Ob(s)&&!n&&Hy(e,s))?r=r.filter((e=>e!==s)):o=t,s=qb(s)}return t.set(e,r),r}(t,this._c):[].concat(n),s=[...i,r],a=s[0],l=s.reduce(((e,n)=>{const r=By(t,n,o);return e.top=Zb(r.top,e.top),e.right=Gb(r.right,e.right),e.bottom=Gb(r.bottom,e.bottom),e.left=Zb(r.left,e.left),e}),By(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:Wy,getElementRects:async function(e){const t=this.getOffsetParent||Wy,n=this.getDimensions,r=await n(e.floating);return{reference:_y(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=Ly(e);return{width:t,height:n}},getScale:Ry,isElement:jb,isRTL:function(e){return"rtl"===_b(e).direction}};function Ky(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Gy(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=Ay(e),d=o||i?[...c?Ub(c):[],...Ub(t)]:[];d.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const u=c&&a?function(e,t){let n,r=null;const o=Sb(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function s(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),i();const c=e.getBoundingClientRect(),{left:d,top:u,width:h,height:p}=c;if(a||t(),!h||!p)return;const f={rootMargin:-Xb(u)+"px "+-Xb(o.clientWidth-(d+h))+"px "+-Xb(o.clientHeight-(u+p))+"px "+-Xb(d)+"px",threshold:Zb(0,Gb(1,l))||1};let m=!0;function g(t){const r=t[0].intersectionRatio;if(r!==l){if(!m)return s();r?s(!1,r):n=setTimeout((()=>{s(!1,1e-7)}),1e3)}1!==r||Ky(c,e.getBoundingClientRect())||s(),m=!1}try{r=new IntersectionObserver(g,{...f,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(g,f)}r.observe(e)}(!0),i}(c,n):null;let h,p=-1,f=null;s&&(f=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var e;null==(e=f)||e.observe(t)}))),n()})),c&&!l&&f.observe(c),f.observe(t));let m=l?Iy(e):null;return l&&function t(){const r=Iy(e);m&&!Ky(m,r)&&n();m=r,h=requestAnimationFrame(t)}(),n(),()=>{var e;d.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==u||u(),null==(e=f)||e.disconnect(),f=null,l&&cancelAnimationFrame(h)}}const Zy=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),s=ry(n),a=oy(n),l="y"===ly(n),c=Oy.has(s)?-1:1,d=i&&l?-1:1,u=ny(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:f}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a&&"number"==typeof f&&(p="end"===a?-1*f:f),l?{x:p*d,y:h*c}:{x:h*c,y:p*d}}(t,e);return s===(null==(n=a.offset)?void 0:n.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},Jy=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=ny(e,t),c={x:n,y:r},d=await Ty(t,l),u=ly(ry(o)),h=iy(u);let p=c[h],f=c[u];if(i){const e="y"===h?"bottom":"right";p=ty(p+d["y"===h?"top":"left"],p,p-d[e])}if(s){const e="y"===u?"bottom":"right";f=ty(f+d["y"===u?"top":"left"],f,f-d[e])}const m=a.fn({...t,[h]:p,[u]:f});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[h]:i,[u]:s}}}}}},Xy=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:m=!0,...g}=ny(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const v=ry(o),b=ly(a),y=ry(a)===a,x=await(null==l.isRTL?void 0:l.isRTL(c.floating)),w=h||(y||!m?[gy(a)]:function(e){const t=gy(e);return[dy(e),t,dy(t)]}(a)),C="none"!==f;!h&&C&&w.push(...my(a,m,f,x));const k=[a,...w],S=await Ty(t,g),$=[];let j=(null==(r=i.flip)?void 0:r.overflows)||[];if(d&&$.push(S[v]),u){const e=function(e,t,n){void 0===n&&(n=!1);const r=oy(e),o=cy(e),i=sy(o);let s="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=gy(s)),[s,gy(s)]}(o,s,x);$.push(S[e[0]],S[e[1]])}if(j=[...j,{placement:o,overflows:$}],!$.every((e=>e<=0))){var M,E;const e=((null==(M=i.flip)?void 0:M.index)||0)+1,t=k[e];if(t){if(!("alignment"===u&&b!==ly(t))||j.every((e=>ly(e.placement)!==b||e.overflows[0]>0)))return{data:{index:e,overflows:j},reset:{placement:t}}}let n=null==(E=j.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:E.placement;if(!n)switch(p){case"bestFit":{var T;const e=null==(T=j.filter((e=>{if(C){const t=ly(e.placement);return t===b||"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:T[0];e&&(n=e);break}case"initialPlacement":n=a}if(o!==n)return{reset:{placement:n}}}return{}}}},Yy=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:c,padding:d=0}=ny(e,t)||{};if(null==c)return{};const u=vy(d),h={x:n,y:r},p=cy(o),f=sy(p),m=await s.getDimensions(c),g="y"===p,v=g?"top":"left",b=g?"bottom":"right",y=g?"clientHeight":"clientWidth",x=i.reference[f]+i.reference[p]-h[p]-i.floating[f],w=h[p]-i.reference[p],C=await(null==s.getOffsetParent?void 0:s.getOffsetParent(c));let k=C?C[y]:0;k&&await(null==s.isElement?void 0:s.isElement(C))||(k=a.floating[y]||i.floating[f]);const S=x/2-w/2,$=k/2-m[f]/2-1,j=Gb(u[v],$),M=Gb(u[b],$),E=j,T=k-m[f]-M,O=k/2-m[f]/2+S,L=ty(E,O,T),A=!l.arrow&&null!=oy(o)&&O!==L&&i.reference[f]/2-(O<E?j:M)-m[f]/2<0,R=A?O<E?O-E:O-T:0;return{[p]:h[p]+R,data:{[p]:L,centerOffset:O-L-R,...A&&{alignmentOffset:R}},reset:A}}}),Qy=(e,t,n)=>{const r=new Map,o={platform:Uy,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:u}=Ey(c,r,l),h=r,p={},f=0;for(let n=0;n<a.length;n++){const{name:i,fn:m}=a[n],{x:g,y:v,data:b,reset:y}=await m({x:d,y:u,initialPlacement:r,placement:h,strategy:o,middlewareData:p,rects:c,platform:s,elements:{reference:e,floating:t}});d=null!=g?g:d,u=null!=v?v:u,p={...p,[i]:{...p[i],...b}},y&&f<=50&&(f++,"object"==typeof y&&(y.placement&&(h=y.placement),y.rects&&(c=!0===y.rects?await s.getElementRects({reference:e,floating:t,strategy:o}):y.rects),({x:d,y:u}=Ey(c,h,l))),n=-1)}return{x:d,y:u,placement:h,strategy:o,middlewareData:p}})(e,t,{...o,platform:i})};var ex="undefined"!=typeof document?n.useLayoutEffect:function(){};function tx(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!tx(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!tx(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function nx(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function rx(e,t){const n=nx(e);return Math.round(t*n)/n}function ox(e){const t=l.useRef(e);return ex((()=>{t.current=e})),t}const ix=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?Yy({element:n.current,padding:r}).fn(t):{}:n?Yy({element:n,padding:r}).fn(t):{};var o}}),sx=(e,t)=>({...Zy(e),options:[e,t]}),ax=(e,t)=>({...Jy(e),options:[e,t]}),lx=(e,t)=>({...ix(e),options:[e,t]}),cx="data-floating-ui-focusable",dx="active",ux="selected",hx={...l};let px=!1,fx=0;const mx=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+fx++;const gx=hx.useId||function(){const[e,t]=l.useState((()=>px?mx():void 0));return $y((()=>{null==e&&t(mx())}),[]),l.useEffect((()=>{px=!0}),[]),e};let vx;"production"!==process.env.NODE_ENV&&(vx=new Set);const bx=l.createContext(null),yx=l.createContext(null),xx=()=>{var e;return(null==(e=l.useContext(bx))?void 0:e.id)||null},wx=()=>l.useContext(yx);const Cx={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},kx={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Sx=e=>{var t,n;return{escapeKey:"boolean"==typeof e?e:null!=(t=null==e?void 0:e.escapeKey)&&t,outsidePress:"boolean"==typeof e?e:null==(n=null==e?void 0:e.outsidePress)||n}};function $x(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=gx(),i=l.useRef({}),[s]=l.useState((()=>function(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach((e=>e(n)))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;null==(r=e.get(t))||r.delete(n)}}}())),a=null!=xx();if("production"!==process.env.NODE_ENV){const e=r.reference;e&&!jb(e)&&function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");var i;null!=(e=vx)&&e.has(o)||(null==(i=vx)||i.add(o),console.error(o))}("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[c,d]=l.useState(r.reference),u=My(((e,t,r)=>{i.current.openEvent=e?t:void 0,s.emit("openchange",{open:e,event:t,reason:r,nested:a}),null==n||n(e,t,r)})),h=l.useMemo((()=>({setPositionReference:d})),[]),p=l.useMemo((()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference})),[c,r.reference,r.floating]);return l.useMemo((()=>({dataRef:i,open:t,onOpenChange:u,elements:p,events:s,floatingId:o,refs:h})),[t,u,p,s,o,h])}function jx(e){void 0===e&&(e={});const{nodeId:t}=e,n=$x({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,s]=l.useState(null),[a,d]=l.useState(null),u=(null==o?void 0:o.domReference)||i,h=l.useRef(null),p=wx();$y((()=>{u&&(h.current=u)}),[u]);const f=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:d,open:u}=e,[h,p]=l.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,m]=l.useState(r);tx(f,r)||m(r);const[g,v]=l.useState(null),[b,y]=l.useState(null),x=l.useCallback((e=>{e!==S.current&&(S.current=e,v(e))}),[]),w=l.useCallback((e=>{e!==$.current&&($.current=e,y(e))}),[]),C=i||g,k=s||b,S=l.useRef(null),$=l.useRef(null),j=l.useRef(h),M=null!=d,E=ox(d),T=ox(o),O=ox(u),L=l.useCallback((()=>{if(!S.current||!$.current)return;const e={placement:t,strategy:n,middleware:f};T.current&&(e.platform=T.current),Qy(S.current,$.current,e).then((e=>{const t={...e,isPositioned:!1!==O.current};A.current&&!tx(j.current,t)&&(j.current=t,c.flushSync((()=>{p(t)})))}))}),[f,t,n,T,O]);ex((()=>{!1===u&&j.current.isPositioned&&(j.current.isPositioned=!1,p((e=>({...e,isPositioned:!1}))))}),[u]);const A=l.useRef(!1);ex((()=>(A.current=!0,()=>{A.current=!1})),[]),ex((()=>{if(C&&(S.current=C),k&&($.current=k),C&&k){if(E.current)return E.current(C,k,L);L()}}),[C,k,L,E,M]);const R=l.useMemo((()=>({reference:S,floating:$,setReference:x,setFloating:w})),[x,w]),N=l.useMemo((()=>({reference:C,floating:k})),[C,k]),D=l.useMemo((()=>{const e={position:n,left:0,top:0};if(!N.floating)return e;const t=rx(N.floating,h.x),r=rx(N.floating,h.y);return a?{...e,transform:"translate("+t+"px, "+r+"px)",...nx(N.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,a,N.floating,h.x,h.y]);return l.useMemo((()=>({...h,update:L,refs:R,elements:N,floatingStyles:D})),[h,L,R,N,D])}({...e,elements:{...o,...a&&{reference:a}}}),m=l.useCallback((e=>{const t=jb(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;d(t),f.refs.setReference(t)}),[f.refs]),g=l.useCallback((e=>{(jb(e)||null===e)&&(h.current=e,s(e)),(jb(f.refs.reference.current)||null===f.refs.reference.current||null!==e&&!jb(e))&&f.refs.setReference(e)}),[f.refs]),v=l.useMemo((()=>({...f.refs,setReference:g,setPositionReference:m,domReference:h})),[f.refs,g,m]),b=l.useMemo((()=>({...f.elements,domReference:u})),[f.elements,u]),y=l.useMemo((()=>({...f,...r,refs:v,elements:b,nodeId:t})),[f,v,b,t,r]);return $y((()=>{r.dataRef.current.floatingContext=y;const e=null==p?void 0:p.nodesRef.current.find((e=>e.id===t));e&&(e.context=y)})),l.useMemo((()=>({...f,context:y,refs:v,elements:b})),[f,v,b,y])}function Mx(e,t,n){const r=new Map,o="item"===n;let i=e;if(o&&e){const{[dx]:t,[ux]:n,...r}=e;i=r}return{..."floating"===n&&{tabIndex:-1,[cx]:""},...i,...t.map((t=>{const r=t?t[n]:null;return"function"==typeof r?e?r(e):null:r})).concat(e).reduce(((e,t)=>t?(Object.entries(t).forEach((t=>{let[n,i]=t;var s;o&&[dx,ux].includes(n)||(0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof i&&(null==(s=r.get(n))||s.push(i),e[n]=function(){for(var e,t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return null==(e=r.get(n))?void 0:e.map((e=>e(...o))).find((e=>void 0!==e))})):e[n]=i)})),e):e),{})}}const Ex=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Tx(e,t){var n,r;void 0===t&&(t={});const{open:o,elements:i,floatingId:s}=e,{enabled:a=!0,role:c="dialog"}=t,d=gx(),u=(null==(n=i.domReference)?void 0:n.id)||d,h=l.useMemo((()=>{var e,t;return(null==(e=(t=i.floating)?t.hasAttribute(yy)?t:t.querySelector("["+yy+"]")||t:null)?void 0:e.id)||s}),[i.floating,s]),p=null!=(r=Ex.get(c))?r:c,f=null!=xx(),m=l.useMemo((()=>"tooltip"===p||"label"===c?{["aria-"+("label"===c?"labelledby":"describedby")]:o?h:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":"alertdialog"===p?"dialog":p,"aria-controls":o?h:void 0,..."listbox"===p&&{role:"combobox"},..."menu"===p&&{id:u},..."menu"===p&&f&&{role:"menuitem"},..."select"===c&&{"aria-autocomplete":"none"},..."combobox"===c&&{"aria-autocomplete":"list"}}),[p,h,f,o,u,c]),g=l.useMemo((()=>{const e={id:h,...p&&{role:p}};return"tooltip"===p||"label"===c?e:{...e,..."menu"===p&&{"aria-labelledby":u}}}),[p,h,u,c]),v=l.useCallback((e=>{let{active:t,selected:n}=e;const r={role:"option",...t&&{id:h+"-fui-option"}};switch(c){case"select":case"combobox":return{...r,"aria-selected":n}}return{}}),[h,c]);return l.useMemo((()=>a?{reference:m,floating:g,item:v}:{}),[a,m,g,v])}const Ox=i.css`
|
|
1852
1852
|
height: auto;
|
|
1853
1853
|
max-height: 32rem;
|
|
1854
1854
|
width: 100%;
|
|
@@ -1862,7 +1862,7 @@
|
|
|
1862
1862
|
0 0.25rem 0.375rem -0.25rem #0000001a,
|
|
1863
1863
|
0 0.625rem 0.9375rem -0.1875rem #0000001a;
|
|
1864
1864
|
outline: 0;
|
|
1865
|
-
`,
|
|
1865
|
+
`,Lx=i.css`
|
|
1866
1866
|
display: flex;
|
|
1867
1867
|
align-items: flex-start;
|
|
1868
1868
|
justify-content: space-between;
|
|
@@ -1875,7 +1875,7 @@
|
|
|
1875
1875
|
.ds-map-pop-up-close-button {
|
|
1876
1876
|
margin-top: ${k(100)};
|
|
1877
1877
|
}
|
|
1878
|
-
`,
|
|
1878
|
+
`,Ax=i.css`
|
|
1879
1879
|
height: 100%;
|
|
1880
1880
|
max-height: 25rem;
|
|
1881
1881
|
overflow-y: auto;
|
|
@@ -1883,12 +1883,12 @@
|
|
|
1883
1883
|
&:focus-visible {
|
|
1884
1884
|
outline-color: ${w("primary",700)};
|
|
1885
1885
|
}
|
|
1886
|
-
`,
|
|
1886
|
+
`,Rx=i.css`
|
|
1887
1887
|
padding: ${k(200)} ${k(300)};
|
|
1888
1888
|
border-top: ${j(100)} solid
|
|
1889
1889
|
${w("neutral",300)};
|
|
1890
1890
|
min-height: 2.75rem;
|
|
1891
|
-
`,
|
|
1891
|
+
`,Nx=(e,t,n,r,o,s)=>i.css`
|
|
1892
1892
|
height: ${e}px;
|
|
1893
1893
|
width: ${t}px;
|
|
1894
1894
|
position: absolute;
|
|
@@ -1897,15 +1897,15 @@
|
|
|
1897
1897
|
${`${o}: -${s-1}px`};
|
|
1898
1898
|
background-color: ${w("neutral",100)};
|
|
1899
1899
|
border: ${j(100)} solid ${w("neutral",300)};
|
|
1900
|
-
`,
|
|
1900
|
+
`,Dx=i.css`
|
|
1901
1901
|
background-color: ${w("neutral",100)};
|
|
1902
|
-
`,
|
|
1902
|
+
`,Ix=i.css`
|
|
1903
1903
|
padding: ${k(400)} ${k(400)} 0
|
|
1904
1904
|
${k(400)};
|
|
1905
1905
|
&:focus-visible {
|
|
1906
1906
|
outline-color: ${w("primary",700)};
|
|
1907
1907
|
}
|
|
1908
|
-
`,
|
|
1908
|
+
`,Px=i.css`
|
|
1909
1909
|
font-size: ${C(400)};
|
|
1910
1910
|
font-weight: 700;
|
|
1911
1911
|
line-height: ${S(600)};
|
|
@@ -1915,14 +1915,14 @@
|
|
|
1915
1915
|
align-items: center;
|
|
1916
1916
|
text-align: left;
|
|
1917
1917
|
gap: 0.625rem;
|
|
1918
|
-
`,
|
|
1918
|
+
`,zx=i.css`
|
|
1919
1919
|
font-size: ${C(200)};
|
|
1920
1920
|
font-weight: 400;
|
|
1921
1921
|
line-height: ${S(400)};
|
|
1922
1922
|
text-align: left;
|
|
1923
1923
|
color: ${w("neutral",700)};
|
|
1924
1924
|
margin-bottom: ${k(200)};
|
|
1925
|
-
`,
|
|
1925
|
+
`,Vx=i.css`
|
|
1926
1926
|
width: 100%;
|
|
1927
1927
|
padding: ${k(400)} 0;
|
|
1928
1928
|
border-bottom: ${j(100)} solid
|
|
@@ -1931,32 +1931,32 @@
|
|
|
1931
1931
|
&:last-of-type {
|
|
1932
1932
|
border-bottom: none;
|
|
1933
1933
|
}
|
|
1934
|
-
`,
|
|
1934
|
+
`,Bx=i.css`
|
|
1935
1935
|
display: flex;
|
|
1936
1936
|
align-items: flex-start;
|
|
1937
1937
|
justify-content: space-between;
|
|
1938
|
-
`,
|
|
1938
|
+
`,Hx=i.css`
|
|
1939
1939
|
display: flex;
|
|
1940
1940
|
flex-direction: column;
|
|
1941
|
-
`,
|
|
1941
|
+
`,_x=e=>i.css`
|
|
1942
1942
|
font-size: ${C(400)};
|
|
1943
1943
|
font-weight: 400;
|
|
1944
1944
|
line-height: ${S(600)};
|
|
1945
1945
|
text-align: left;
|
|
1946
1946
|
color: ${w("neutral",e?500:800)};
|
|
1947
|
-
`,
|
|
1947
|
+
`,Fx=e=>i.css`
|
|
1948
1948
|
font-size: ${C(300)};
|
|
1949
1949
|
font-weight: 400;
|
|
1950
1950
|
line-height: ${S(500)};
|
|
1951
1951
|
text-align: left;
|
|
1952
1952
|
color: ${w("neutral",e?500:700)};
|
|
1953
|
-
`,
|
|
1953
|
+
`,qx=({name:t,label:n,caption:o,showInfoButton:i=!0,infoButtonLabel:s,variant:a="switch",disabled:l,onInfoClick:c,isDefaultSelected:d=!1,onChange:u,labels:h})=>{const p=Mf("LayerItem",h),f="switch"===a;return r.jsxs("div",{css:Vx,children:[f?r.jsxs("div",{css:Bx,children:[r.jsxs("div",{css:Hx,children:[r.jsx("p",{css:_x(l),"aria-label":n,"aria-disabled":l,children:n}),r.jsx("p",{"aria-label":o,css:Fx(l),children:o})]}),r.jsx(Qg,{"aria-label":`${n}, ${o}`,name:t,disabled:l,defaultChecked:d,onChange:u})]}):r.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[r.jsx(Hg,{value:t,disabled:l,fontSize:"1rem",color:"var(--chakra-colors-neutral-800)",children:n}),r.jsx("p",{style:{marginLeft:"1.75rem"},css:Fx(l),children:o})]}),i?r.jsx(e.Box,{display:"flex",justifyContent:"flex-start",marginTop:"0.5rem",marginLeft:f?0:"1.75rem",children:r.jsx(Ef,{variant:"secondary",label:s??p.aboutDataLabel,rightIcon:r.jsx(Df,{}),size:"small",onClick:c,disabled:l})}):null]})},Wx=i.css`
|
|
1954
1954
|
margin-bottom: ${k(400)};
|
|
1955
1955
|
border: ${j(100)} solid ${w("neutral",300)};
|
|
1956
1956
|
border-radius: ${$(300)};
|
|
1957
1957
|
box-shadow: 0 1px 0.125rem 0 #0000000d;
|
|
1958
1958
|
background-color: ${w("neutral",100)};
|
|
1959
|
-
`,
|
|
1959
|
+
`,Ux=i.css`
|
|
1960
1960
|
padding: 0.375rem ${k(200)};
|
|
1961
1961
|
align-items: center;
|
|
1962
1962
|
background-color: ${w("neutral",100)};
|
|
@@ -1980,12 +1980,12 @@
|
|
|
1980
1980
|
0 0 0 0.125rem ${w("neutral",100)},
|
|
1981
1981
|
rgba(0, 0, 0, 0.05) 0 0.125rem 0.125rem 0.25rem;
|
|
1982
1982
|
}
|
|
1983
|
-
`,
|
|
1983
|
+
`,Kx=i.css`
|
|
1984
1984
|
font-size: ${C(200)};
|
|
1985
1985
|
font-weight: 700;
|
|
1986
1986
|
line-height: ${S(400)};
|
|
1987
1987
|
color: ${w("neutral",800)};
|
|
1988
|
-
`,
|
|
1988
|
+
`,Gx=i.css`
|
|
1989
1989
|
padding: ${k(300)} ${k(200)};
|
|
1990
1990
|
display: flex;
|
|
1991
1991
|
flex-direction: column;
|
|
@@ -2002,7 +2002,7 @@
|
|
|
2002
2002
|
margin-bottom: 0;
|
|
2003
2003
|
}
|
|
2004
2004
|
}
|
|
2005
|
-
`,
|
|
2005
|
+
`,Zx=i.css`
|
|
2006
2006
|
padding: ${k(300)};
|
|
2007
2007
|
padding-bottom: ${k(500)};
|
|
2008
2008
|
display: flex;
|
|
@@ -2010,7 +2010,7 @@
|
|
|
2010
2010
|
border-bottom: ${j(100)} solid
|
|
2011
2011
|
${w("neutral",300)};
|
|
2012
2012
|
background-color: ${w("neutral",100)};
|
|
2013
|
-
`,
|
|
2013
|
+
`,Jx=i.css`
|
|
2014
2014
|
display: flex;
|
|
2015
2015
|
flex-direction: column;
|
|
2016
2016
|
|
|
@@ -2019,44 +2019,44 @@
|
|
|
2019
2019
|
fill: ${w("neutral",700)} !important;
|
|
2020
2020
|
}
|
|
2021
2021
|
}
|
|
2022
|
-
`,
|
|
2022
|
+
`,Xx=i.css`
|
|
2023
2023
|
display: flex;
|
|
2024
2024
|
align-items: flex-start;
|
|
2025
2025
|
justify-content: space-between;
|
|
2026
2026
|
gap: ${k(300)};
|
|
2027
2027
|
margin-bottom: ${k(400)};
|
|
2028
|
-
`,
|
|
2028
|
+
`,Yx=i.css`
|
|
2029
2029
|
font-size: ${C(400)};
|
|
2030
2030
|
line-height: ${S(600)};
|
|
2031
2031
|
font-weight: 400;
|
|
2032
2032
|
text-align: left;
|
|
2033
2033
|
color: ${w("neutral",900)};
|
|
2034
|
-
`,
|
|
2034
|
+
`,Qx=i.css`
|
|
2035
2035
|
font-size: ${C(300)};
|
|
2036
2036
|
line-height: ${S(500)};
|
|
2037
2037
|
font-weight: 400;
|
|
2038
2038
|
text-align: left;
|
|
2039
2039
|
color: ${w("neutral",700)};
|
|
2040
|
-
`,
|
|
2040
|
+
`,ew=i.css`
|
|
2041
2041
|
display: flex;
|
|
2042
2042
|
justify-content: space-between;
|
|
2043
2043
|
|
|
2044
2044
|
button {
|
|
2045
2045
|
width: 46%;
|
|
2046
2046
|
}
|
|
2047
|
-
`,
|
|
2047
|
+
`,tw=i.css`
|
|
2048
2048
|
width: 14.625rem;
|
|
2049
2049
|
border: ${j(100)} solid ${w("neutral",600)};
|
|
2050
2050
|
border-radius: ${$(300)};
|
|
2051
|
-
`,
|
|
2051
|
+
`,nw=i.css`
|
|
2052
2052
|
padding: ${k(300)};
|
|
2053
|
-
`,
|
|
2053
|
+
`,rw=i.css`
|
|
2054
2054
|
font-size: ${C(300)};
|
|
2055
2055
|
line-height: ${S(500)};
|
|
2056
2056
|
font-weight: 400;
|
|
2057
2057
|
text-align: left;
|
|
2058
2058
|
color: ${w("neutral",900)};
|
|
2059
|
-
`,
|
|
2059
|
+
`,ow=i.css`
|
|
2060
2060
|
display: flex;
|
|
2061
2061
|
align-items: center;
|
|
2062
2062
|
gap: ${k(300)};
|
|
@@ -2077,20 +2077,20 @@
|
|
|
2077
2077
|
margin-top: 1.125rem;
|
|
2078
2078
|
width: 100%;
|
|
2079
2079
|
}
|
|
2080
|
-
`,
|
|
2080
|
+
`,iw=({defaultValue:t,onOpacityChanged:o,labels:i})=>{const s=Mf("OpacityControl",i),[a,l]=n.useState(t);return r.jsxs(e.Popover.Root,{positioning:{placement:"bottom-end"},children:[r.jsx(e.Popover.Trigger,{asChild:!0,children:r.jsx(Ef,{label:s.opacityButtonLabel,size:"small",variant:"secondary",leftIcon:r.jsx(Df,{})})}),r.jsx(e.Popover.Positioner,{children:r.jsx(e.Popover.Content,{css:tw,children:r.jsxs(e.Popover.Body,{css:nw,children:[r.jsx("p",{css:rw,children:s.opacityHeading}),r.jsxs("div",{css:ow,children:[r.jsxs("div",{style:{position:"relative"},children:[r.jsx(eg,{"aria-label":s.opacityAriaLabel,min:"0",max:"100",value:a,onChange:e=>{const t=e.target.value||"0";let n=parseInt(t,10);n=Number.isNaN(n)?0:n,n=n<0?0:n,n=n>100?100:n,l(n),o&&o(n)},className:"ds-opacity-control-text-input",onClick:e=>e.target.select()}),r.jsx("p",{style:{position:"absolute",top:"1.15625rem",right:"0.3125rem"},children:s.percentSuffix})]}),r.jsx(Xg,{min:0,max:100,value:[a],onValueChangeEnd:({value:e})=>{l(e[0]),o&&o(e[0])}})]})]})})})]})},sw=e=>i.css`
|
|
2081
2081
|
width: ${k(500)};
|
|
2082
2082
|
height: ${k(500)};
|
|
2083
2083
|
border-radius: 50%;
|
|
2084
2084
|
background-color: ${e};
|
|
2085
2085
|
border: ${j(100)} solid ${w("neutral",400)};
|
|
2086
|
-
`,
|
|
2086
|
+
`,aw=e=>i.css`
|
|
2087
2087
|
width: ${k(500)};
|
|
2088
2088
|
height: ${k(200)};
|
|
2089
2089
|
border-radius: ${$(200)};
|
|
2090
2090
|
background-color: ${e};
|
|
2091
2091
|
border: ${j(100)} solid ${w("neutral",400)};
|
|
2092
2092
|
margin-top: 0.375rem;
|
|
2093
|
-
`,
|
|
2093
|
+
`,lw=e=>i.css`
|
|
2094
2094
|
width: ${k(500)};
|
|
2095
2095
|
height: ${k(500)};
|
|
2096
2096
|
border-radius: 50%;
|
|
@@ -2103,26 +2103,26 @@
|
|
|
2103
2103
|
width: 0.625rem;
|
|
2104
2104
|
height: 0.625rem;
|
|
2105
2105
|
}
|
|
2106
|
-
`,
|
|
2106
|
+
`,cw=i.css`
|
|
2107
2107
|
width: 100%;
|
|
2108
2108
|
display: flex;
|
|
2109
2109
|
justify-content: space-between;
|
|
2110
2110
|
gap: ${k(200)};
|
|
2111
2111
|
margin-bottom: ${k(400)};
|
|
2112
|
-
`,
|
|
2112
|
+
`,dw=i.css`
|
|
2113
2113
|
display: flex;
|
|
2114
2114
|
gap: ${k(200)};
|
|
2115
|
-
`,
|
|
2115
|
+
`,uw=i.css`
|
|
2116
2116
|
font-size: ${C(300)};
|
|
2117
2117
|
line-height: ${S(500)};
|
|
2118
2118
|
font-weight: 400;
|
|
2119
2119
|
color: ${w("neutral",800)};
|
|
2120
|
-
`,
|
|
2120
|
+
`,hw=i.css`
|
|
2121
2121
|
font-size: ${C(200)};
|
|
2122
2122
|
line-height: ${S(400)};
|
|
2123
2123
|
font-weight: 400;
|
|
2124
2124
|
color: ${w("neutral",700)};
|
|
2125
|
-
`,
|
|
2125
|
+
`,pw=i.css`
|
|
2126
2126
|
button {
|
|
2127
2127
|
height: 1.5625rem;
|
|
2128
2128
|
font-size: ${C(200)};
|
|
@@ -2131,12 +2131,12 @@
|
|
|
2131
2131
|
color: ${w("neutral",600)};
|
|
2132
2132
|
padding: 0 0.625rem;
|
|
2133
2133
|
}
|
|
2134
|
-
`,
|
|
2134
|
+
`,fw=i.css`
|
|
2135
2135
|
width: 100%;
|
|
2136
2136
|
display: flex;
|
|
2137
2137
|
flex-direction: column;
|
|
2138
2138
|
margin-bottom: ${k(400)};
|
|
2139
|
-
`,
|
|
2139
|
+
`,mw=i.css`
|
|
2140
2140
|
height: ${k(500)};
|
|
2141
2141
|
width: 100%;
|
|
2142
2142
|
margin-bottom: ${k(200)};
|
|
@@ -2154,27 +2154,27 @@
|
|
|
2154
2154
|
border-top-right-radius: 0.1875rem;
|
|
2155
2155
|
border-bottom-right-radius: 0.1875rem;
|
|
2156
2156
|
}
|
|
2157
|
-
`,
|
|
2157
|
+
`,gw=i.css`
|
|
2158
2158
|
display: flex;
|
|
2159
2159
|
justify-content: space-between;
|
|
2160
2160
|
align-items: flex-start;
|
|
2161
|
-
`,
|
|
2161
|
+
`,vw=i.css`
|
|
2162
2162
|
width: 100%;
|
|
2163
2163
|
font-size: ${C(200)};
|
|
2164
2164
|
line-height: ${S(400)};
|
|
2165
2165
|
font-weight: 400;
|
|
2166
2166
|
color: ${w("neutral",800)};
|
|
2167
2167
|
text-align: center;
|
|
2168
|
-
`,
|
|
2168
|
+
`,bw=i.css`
|
|
2169
2169
|
font-size: ${C(200)};
|
|
2170
2170
|
line-height: ${S(400)};
|
|
2171
2171
|
font-weight: 400;
|
|
2172
2172
|
color: ${w("neutral",700)};
|
|
2173
2173
|
text-align: center;
|
|
2174
|
-
`,
|
|
2174
|
+
`,yw=e=>{const t=e.map(((t,n)=>`${n/(e.length-1)*100}%`));return`linear-gradient(to right, ${e.map(((e,n)=>`${e} ${t[n]}`)).join(", ")})`},xw=i.css`
|
|
2175
2175
|
display: flex;
|
|
2176
2176
|
flex-direction: column;
|
|
2177
|
-
`,
|
|
2177
|
+
`,ww=e=>i.css`
|
|
2178
2178
|
display: flex;
|
|
2179
2179
|
gap: ${k(400)};
|
|
2180
2180
|
align-items: center;
|
|
@@ -2183,41 +2183,41 @@
|
|
|
2183
2183
|
.ds-select-input-container {
|
|
2184
2184
|
margin-bottom: 0rem;
|
|
2185
2185
|
}
|
|
2186
|
-
`,
|
|
2186
|
+
`,Cw=i.css`
|
|
2187
2187
|
font-size: ${C(500)};
|
|
2188
2188
|
line-height: ${S(700)};
|
|
2189
2189
|
font-weight: 400;
|
|
2190
2190
|
color: ${w("neutral",700)};
|
|
2191
|
-
`,
|
|
2191
|
+
`,kw=({pageSize:e,currentPage:t,totalItems:n,onPageSizeChange:o,showItemCountText:i,labels:s})=>{const a=Mf("ItemCount",s),l=0===n?0:(t-1)*e+1,c=0===n?0:Math.min(l+e-1,n);return r.jsxs("div",{css:xw,children:[r.jsxs("div",{css:ww(i),children:[r.jsx("div",{style:{width:"5rem"},children:r.jsx(Vv,{defaultValue:[`${e}`],items:[{label:"10",value:"10"},{label:"20",value:"20"},{label:"50",value:"50"},{label:"100",value:"100"}],onChange:e=>{o&&o(parseInt(e[0],10))},required:!0})}),r.jsx("p",{css:Cw,children:a.perPageLabel})]}),i?r.jsx("p",{css:Cw,children:a.showingLabel(l,c,n)}):null]})},Sw=e=>i.css`
|
|
2192
2192
|
border: ${j(100)} solid ${w("neutral",300)};
|
|
2193
2193
|
${e?"border: none;":""}
|
|
2194
|
-
|
|
2194
|
+
`,$w=e=>i.css`
|
|
2195
2195
|
color: ${w("neutral",e?400:700)};
|
|
2196
2196
|
line-height: ${S(500)};
|
|
2197
2197
|
white-space: nowrap;
|
|
2198
2198
|
overflow: hidden;
|
|
2199
2199
|
text-overflow: ellipsis;
|
|
2200
|
-
`,
|
|
2200
|
+
`,jw=i.css`
|
|
2201
2201
|
font-weight: 400;
|
|
2202
2202
|
color: ${w("neutral",700)};
|
|
2203
2203
|
white-space: nowrap;
|
|
2204
2204
|
overflow: hidden;
|
|
2205
2205
|
text-overflow: ellipsis;
|
|
2206
|
-
|
|
2206
|
+
`,Mw=i.css`
|
|
2207
2207
|
color: ${w("neutral",700)};
|
|
2208
2208
|
text-align: right;
|
|
2209
2209
|
font-weight: 700;
|
|
2210
2210
|
white-space: nowrap;
|
|
2211
2211
|
overflow: hidden;
|
|
2212
2212
|
text-overflow: ellipsis;
|
|
2213
|
-
`,
|
|
2213
|
+
`,Ew=e=>i.css`
|
|
2214
2214
|
width: ${k(400)};
|
|
2215
2215
|
height: ${k(400)};
|
|
2216
2216
|
|
|
2217
2217
|
path {
|
|
2218
2218
|
fill: ${w("neutral",e?400:700)};
|
|
2219
2219
|
}
|
|
2220
|
-
`,
|
|
2220
|
+
`,Tw=i.css`
|
|
2221
2221
|
display: flex;
|
|
2222
2222
|
align-items: center;
|
|
2223
2223
|
justify-content: space-between;
|
|
@@ -2227,7 +2227,7 @@
|
|
|
2227
2227
|
${w("neutral",200)};
|
|
2228
2228
|
width: 100%;
|
|
2229
2229
|
text-align: left;
|
|
2230
|
-
`,
|
|
2230
|
+
`,Ow=i.css`
|
|
2231
2231
|
display: flex;
|
|
2232
2232
|
align-items: center;
|
|
2233
2233
|
justify-content: space-between;
|
|
@@ -2263,19 +2263,19 @@
|
|
|
2263
2263
|
&:disabled {
|
|
2264
2264
|
background-color: ${w("neutral",200)};
|
|
2265
2265
|
}
|
|
2266
|
-
`,
|
|
2266
|
+
`,Lw=({id:t,label:n,caption:o,icon:i,value:s,variant:a="data",onItemClick:l,isExpanded:c=!1,ariaLabel:d,disabled:u=!1,isHighlighted:h=!1})=>{const p=("navigation"===a||"select"===a)&&!!l,f=p?e.chakra.button:e.chakra.div,m=d||("data"===a&&s?`${n}, ${s}`:n);return r.jsxs(f,{id:t,css:["data"===a?Tw:Ow,h&&{backgroundColor:w("neutral",200)}],onClick:p?l:void 0,tabIndex:p?0:void 0,onKeyDown:e=>{p&&("Enter"!==e.key&&" "!==e.key||(e.preventDefault(),l?.()))},role:p?"button":void 0,"aria-expanded":p?c:void 0,"aria-label":m,disabled:u,"data-selected":h||void 0,"data-highlighted":h||void 0,children:[r.jsxs(e.Flex,{gap:3,flex:"1",overflow:"hidden",children:[i,r.jsxs(e.Box,{flex:"1",minWidth:0,children:[r.jsx(e.Text,{fontWeight:"data"===a?"400":"700",css:$w(u),children:n}),o&&r.jsx(e.Text,{css:jw,children:o})]})]}),"data"===a&&s&&r.jsx(e.Text,{css:Mw,children:s}),"navigation"===a&&r.jsx(e.Icon,{as:Pf,boxSize:4,"aria-hidden":"true",css:Ew(u)})]})},Aw=({items:t,noBorder:n,highlightedIndex:o})=>r.jsx(e.Box,{css:Sw(n),children:t.map(((e,t)=>r.jsx(Lw,{id:e.id,icon:e.icon,label:e.label,caption:e.caption,value:e.value,variant:e.variant??"data",onItemClick:e.onItemClick,isHighlighted:t===o},e.id??e.label)))}),Rw=i.css`
|
|
2267
2267
|
background: transparent;
|
|
2268
2268
|
svg {
|
|
2269
2269
|
path {
|
|
2270
2270
|
fill: ${w("primary",500)};
|
|
2271
2271
|
}
|
|
2272
2272
|
}
|
|
2273
|
-
`,
|
|
2273
|
+
`,Nw=i.css`
|
|
2274
2274
|
font-size: ${C(400)};
|
|
2275
2275
|
line-height: ${S(600)};
|
|
2276
2276
|
font-weight: 700;
|
|
2277
2277
|
color: ${w("neutral",900)};
|
|
2278
|
-
`,
|
|
2278
|
+
`,Dw=i.css`
|
|
2279
2279
|
span {
|
|
2280
2280
|
height: ${k(500)};
|
|
2281
2281
|
width: ${k(500)};
|
|
@@ -2285,7 +2285,7 @@
|
|
|
2285
2285
|
background-color: transparent;
|
|
2286
2286
|
}
|
|
2287
2287
|
}
|
|
2288
|
-
`,
|
|
2288
|
+
`,Iw=i.css`
|
|
2289
2289
|
font-size: ${C(400)};
|
|
2290
2290
|
line-height: ${S(600)};
|
|
2291
2291
|
font-weight: 400;
|
|
@@ -2295,7 +2295,7 @@
|
|
|
2295
2295
|
color: ${w("neutral",900)};
|
|
2296
2296
|
font-weight: 700;
|
|
2297
2297
|
}
|
|
2298
|
-
`,
|
|
2298
|
+
`,Pw=({totalItems:t,pageSize:n,currentPage:o,variant:i="default",onPageChange:s,labels:a})=>{const l=Mf("Pagination",a),c="compact"===i||"compact-with-buttons"===i,d="compact-with-buttons"===i;return r.jsx("div",{"aria-label":l.paginationLabel,children:r.jsx(e.Pagination.Root,{count:t,pageSize:n,defaultPage:o,onPageChange:e=>s&&s(e.page),siblingCount:1,children:r.jsxs(e.ButtonGroup,{gap:"2",size:"sm",variant:"ghost",css:Dw,children:[r.jsx(e.Pagination.PrevTrigger,{asChild:!0,children:d?r.jsx(Ef,{variant:"secondary",label:l.previousLabel,size:"small",leftIcon:r.jsx(If,{style:{rotate:"90deg"},color:"var(--chakra-colors-primary-500)"})}):r.jsx(Of,{css:Rw,style:{rotate:"90deg"},icon:r.jsx(If,{}),"aria-label":l.previousPageLabel})}),c?r.jsx(e.Pagination.PageText,{css:Nw}):r.jsx(e.Pagination.Items,{render:e=>r.jsx(Of,{css:Iw,"aria-label":l.pageLabel(e.value),icon:r.jsx("p",{children:e.value})})}),r.jsx(e.Pagination.NextTrigger,{asChild:!0,children:d?r.jsx(Ef,{variant:"secondary",label:l.nextLabel,size:"small",rightIcon:r.jsx(If,{style:{rotate:"270deg"},color:"var(--chakra-colors-primary-500)"})}):r.jsx(Of,{css:Rw,style:{rotate:"270deg"},icon:r.jsx(If,{}),"aria-label":l.nextPageLabel})})]})})})},zw=(e,t)=>i.css`
|
|
2299
2299
|
border: ${"full-width"===e?"none":`${j(100)} solid ${w("neutral",300)}`};
|
|
2300
2300
|
border-radius: ${$(200)};
|
|
2301
2301
|
box-shadow: ${"full-width"===e?"none":`0 0 0 0.0625rem ${w("neutral",300)}`};
|
|
@@ -2353,7 +2353,7 @@
|
|
|
2353
2353
|
[data-sticky-last='true'] {
|
|
2354
2354
|
border-inline-end: 0.0625rem solid ${w("neutral",400)};
|
|
2355
2355
|
}
|
|
2356
|
-
`,
|
|
2356
|
+
`,Vw=e=>i.css`
|
|
2357
2357
|
tr {
|
|
2358
2358
|
background-color: ${w("neutral","full-width"===e?100:200)};
|
|
2359
2359
|
|
|
@@ -2362,14 +2362,14 @@
|
|
|
2362
2362
|
box-shadow: inset 0 -0.0625rem 0 ${w("neutral",300)};
|
|
2363
2363
|
}
|
|
2364
2364
|
}
|
|
2365
|
-
`,
|
|
2365
|
+
`,Bw=i.css`
|
|
2366
2366
|
font-size: ${C(400)};
|
|
2367
2367
|
line-height: ${S(600)};
|
|
2368
2368
|
font-weight: 700;
|
|
2369
2369
|
color: ${w("neutral",800)};
|
|
2370
2370
|
display: flex;
|
|
2371
2371
|
align-items: center;
|
|
2372
|
-
`,
|
|
2372
|
+
`,Hw=i.css`
|
|
2373
2373
|
height: ${S(600)};
|
|
2374
2374
|
width: 0.625rem;
|
|
2375
2375
|
display: flex;
|
|
@@ -2391,19 +2391,19 @@
|
|
|
2391
2391
|
}
|
|
2392
2392
|
}
|
|
2393
2393
|
}
|
|
2394
|
-
`,
|
|
2394
|
+
`,_w=e=>i.css`
|
|
2395
2395
|
svg {
|
|
2396
2396
|
path {
|
|
2397
2397
|
fill: ${w("accessible",e?"controls-on-neutral-lights":100)} !important;
|
|
2398
2398
|
}
|
|
2399
2399
|
}
|
|
2400
|
-
`,
|
|
2400
|
+
`,Fw=i.css`
|
|
2401
2401
|
margin-top: ${k(300)};
|
|
2402
2402
|
display: flex;
|
|
2403
2403
|
justify-content: space-between;
|
|
2404
|
-
`,
|
|
2404
|
+
`,qw=i.css`
|
|
2405
2405
|
margin-top: 0.5625rem;
|
|
2406
|
-
`,
|
|
2406
|
+
`,Ww=e=>i.css`
|
|
2407
2407
|
tr {
|
|
2408
2408
|
height: ${k(1200)};
|
|
2409
2409
|
|
|
@@ -2430,18 +2430,18 @@
|
|
|
2430
2430
|
}
|
|
2431
2431
|
}
|
|
2432
2432
|
}
|
|
2433
|
-
`,
|
|
2433
|
+
`,Uw=e=>i.css`
|
|
2434
2434
|
overflow: auto;
|
|
2435
2435
|
height: ${e};
|
|
2436
2436
|
width: 100%;
|
|
2437
|
-
`,
|
|
2437
|
+
`,Kw=i.css`
|
|
2438
2438
|
height: 30rem;
|
|
2439
2439
|
display: flex;
|
|
2440
2440
|
align-items: center;
|
|
2441
2441
|
justify-content: center;
|
|
2442
|
-
`,
|
|
2442
|
+
`,Gw="__checkbox__",Zw=(e,t)=>{const n=e[t]?.width;return n?{width:n,minWidth:n}:{}},Jw=(e,t,n)=>{const r=e[t];return void 0===r?{}:{"data-sticky":"start","data-sticky-last":t===n?"true":void 0,left:`${r}px`}},Xw=(e,t,n)=>{if(n||!t.key)return e;const{key:r,order:o}=t,i="asc"===o;return[...e].sort(((e,t)=>((e,t,n)=>{if(null==e&&null==t)return 0;if(null==e)return 1;if(null==t)return-1;if("string"==typeof e&&"string"==typeof t)return n?e.localeCompare(t):t.localeCompare(e);if("number"==typeof e&&"number"==typeof t)return n?e-t:t-e;const r=String(e),o=String(t);return n?r.localeCompare(o):o.localeCompare(r)})(e?.[r],t?.[r],i)))},Yw=e.Table.Row,Qw=e.Table.Cell,eC=i.css`
|
|
2443
2443
|
border: ${j(100)} solid ${w("neutral",300)};
|
|
2444
|
-
`,
|
|
2444
|
+
`,tC=i.css`
|
|
2445
2445
|
padding: ${k(400)};
|
|
2446
2446
|
cursor: pointer;
|
|
2447
2447
|
&:focus-visible {
|
|
@@ -2456,9 +2456,9 @@
|
|
|
2456
2456
|
transparent
|
|
2457
2457
|
);
|
|
2458
2458
|
}
|
|
2459
|
-
`,
|
|
2459
|
+
`,nC=i.css`
|
|
2460
2460
|
border: ${j(100)} solid ${w("neutral",300)};
|
|
2461
|
-
`,
|
|
2461
|
+
`,rC=i.css`
|
|
2462
2462
|
padding: ${k(400)};
|
|
2463
2463
|
cursor: pointer;
|
|
2464
2464
|
border-bottom: ${j(100)} solid
|
|
@@ -2480,7 +2480,7 @@
|
|
|
2480
2480
|
transparent
|
|
2481
2481
|
);
|
|
2482
2482
|
}
|
|
2483
|
-
`,
|
|
2483
|
+
`,oC=i.css`
|
|
2484
2484
|
.item-content-open > * {
|
|
2485
2485
|
max-height: auto;
|
|
2486
2486
|
|
|
@@ -2501,10 +2501,10 @@
|
|
|
2501
2501
|
padding-bottom 0.2s ease,
|
|
2502
2502
|
padding-top 0.2s ease;
|
|
2503
2503
|
}
|
|
2504
|
-
`,
|
|
2504
|
+
`,iC=i.css`
|
|
2505
2505
|
border-top: ${j(100)} solid
|
|
2506
2506
|
${w("neutral",300)};
|
|
2507
|
-
`;var
|
|
2507
|
+
`;var sC,aC={exports:{}},lC={},cC={exports:{}},dC={exports:{}},uC={};var hC,pC,fC,mC,gC,vC,bC,yC,xC,wC,CC,kC,SC,$C={};
|
|
2508
2508
|
/** @license React v16.13.1
|
|
2509
2509
|
* react-is.development.js
|
|
2510
2510
|
*
|
|
@@ -2512,7 +2512,7 @@
|
|
|
2512
2512
|
*
|
|
2513
2513
|
* This source code is licensed under the MIT license found in the
|
|
2514
2514
|
* LICENSE file in the root directory of this source tree.
|
|
2515
|
-
*/function SC(){return uC||(uC=1,"production"===process.env.NODE_ENV?lC.exports=function(){if(oC)return cC;oC=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function y(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case t:switch(e=e.type){case l:case c:case r:case i:case o:case u:return e;default:switch(e=e&&e.$$typeof){case a:case d:case f:case p:case s:return e;default:return h}}case n:return h}}}function x(e){return y(e)===c}return cC.AsyncMode=l,cC.ConcurrentMode=c,cC.ContextConsumer=a,cC.ContextProvider=s,cC.Element=t,cC.ForwardRef=d,cC.Fragment=r,cC.Lazy=f,cC.Memo=p,cC.Portal=n,cC.Profiler=i,cC.StrictMode=o,cC.Suspense=u,cC.isAsyncMode=function(e){return x(e)||y(e)===l},cC.isConcurrentMode=x,cC.isContextConsumer=function(e){return y(e)===a},cC.isContextProvider=function(e){return y(e)===s},cC.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},cC.isForwardRef=function(e){return y(e)===d},cC.isFragment=function(e){return y(e)===r},cC.isLazy=function(e){return y(e)===f},cC.isMemo=function(e){return y(e)===p},cC.isPortal=function(e){return y(e)===n},cC.isProfiler=function(e){return y(e)===i},cC.isStrictMode=function(e){return y(e)===o},cC.isSuspense=function(e){return y(e)===u},cC.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===i||e===o||e===u||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===p||e.$$typeof===s||e.$$typeof===a||e.$$typeof===d||e.$$typeof===g||e.$$typeof===v||e.$$typeof===b||e.$$typeof===m)},cC.typeOf=y,cC}():lC.exports=(dC||(dC=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function y(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case t:var m=e.type;switch(m){case l:case c:case r:case i:case o:case u:return m;default:var g=m&&m.$$typeof;switch(g){case a:case d:case f:case p:case s:return g;default:return h}}case n:return h}}}var x=l,w=c,C=a,k=s,S=t,$=d,j=r,M=f,E=p,T=n,O=i,L=o,A=u,R=!1;function N(e){return y(e)===c}kC.AsyncMode=x,kC.ConcurrentMode=w,kC.ContextConsumer=C,kC.ContextProvider=k,kC.Element=S,kC.ForwardRef=$,kC.Fragment=j,kC.Lazy=M,kC.Memo=E,kC.Portal=T,kC.Profiler=O,kC.StrictMode=L,kC.Suspense=A,kC.isAsyncMode=function(e){return R||(R=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),N(e)||y(e)===l},kC.isConcurrentMode=N,kC.isContextConsumer=function(e){return y(e)===a},kC.isContextProvider=function(e){return y(e)===s},kC.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},kC.isForwardRef=function(e){return y(e)===d},kC.isFragment=function(e){return y(e)===r},kC.isLazy=function(e){return y(e)===f},kC.isMemo=function(e){return y(e)===p},kC.isPortal=function(e){return y(e)===n},kC.isProfiler=function(e){return y(e)===i},kC.isStrictMode=function(e){return y(e)===o},kC.isSuspense=function(e){return y(e)===u},kC.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===i||e===o||e===u||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===p||e.$$typeof===s||e.$$typeof===a||e.$$typeof===d||e.$$typeof===g||e.$$typeof===v||e.$$typeof===b||e.$$typeof===m)},kC.typeOf=y}()),kC)),lC.exports}function $C(){if(pC)return hC;pC=1;return hC="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function jC(){return mC?fC:(mC=1,fC=Function.call.bind(Object.prototype.hasOwnProperty))}function MC(){if(yC)return bC;yC=1;var e=SC(),t=s,n=$C(),r=jC(),o=function(){if(vC)return gC;vC=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=$C(),n={},r=jC();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function o(o,i,s,a,l){if("production"!==process.env.NODE_ENV)for(var c in o)if(r(o,c)){var d;try{if("function"!=typeof o[c]){var u=Error((a||"React class")+": "+s+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw u.name="Invariant Violation",u}d=o[c](i,c,a,s,null,t)}catch(e){d=e}if(!d||d instanceof Error||e((a||"React class")+": type specification of "+s+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var h=l?l():"";e("Failed "+s+" type: "+d.message+(null!=h?h:""))}}}return o.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(n={})},gC=o}(),i=function(){};function a(){return null}return"production"!==process.env.NODE_ENV&&(i=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),bC=function(s,l){var c="function"==typeof Symbol&&Symbol.iterator;var d="<<anonymous>>",u={array:m("array"),bigint:m("bigint"),bool:m("boolean"),func:m("function"),number:m("number"),object:m("object"),string:m("string"),symbol:m("symbol"),any:f(a),arrayOf:function(e){return f((function(t,r,o,i,s){if("function"!=typeof e)return new p("Property `"+s+"` of component `"+o+"` has invalid PropType notation inside arrayOf.");var a=t[r];if(!Array.isArray(a))return new p("Invalid "+i+" `"+s+"` of type `"+b(a)+"` supplied to `"+o+"`, expected an array.");for(var l=0;l<a.length;l++){var c=e(a,l,o,i,s+"["+l+"]",n);if(c instanceof Error)return c}return null}))},element:f((function(e,t,n,r,o){var i=e[t];return s(i)?null:new p("Invalid "+r+" `"+o+"` of type `"+b(i)+"` supplied to `"+n+"`, expected a single ReactElement.")})),elementType:f((function(t,n,r,o,i){var s=t[n];return e.isValidElementType(s)?null:new p("Invalid "+o+" `"+i+"` of type `"+b(s)+"` supplied to `"+r+"`, expected a single ReactElement type.")})),instanceOf:function(e){return f((function(t,n,r,o,i){if(!(t[n]instanceof e)){var s=e.name||d;return new p("Invalid "+o+" `"+i+"` of type `"+(((a=t[n]).constructor&&a.constructor.name?a.constructor.name:d)+"` supplied to `")+r+"`, expected instance of `"+s+"`.")}var a;return null}))},node:f((function(e,t,n,r,o){return v(e[t])?null:new p("Invalid "+r+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.")})),objectOf:function(e){return f((function(t,o,i,s,a){if("function"!=typeof e)return new p("Property `"+a+"` of component `"+i+"` has invalid PropType notation inside objectOf.");var l=t[o],c=b(l);if("object"!==c)return new p("Invalid "+s+" `"+a+"` of type `"+c+"` supplied to `"+i+"`, expected an object.");for(var d in l)if(r(l,d)){var u=e(l,d,i,s,a+"."+d,n);if(u instanceof Error)return u}return null}))},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&i(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),a;return f((function(t,n,r,o,i){for(var s=t[n],a=0;a<e.length;a++)if(h(s,e[a]))return null;var l=JSON.stringify(e,(function(e,t){return"symbol"===y(t)?String(t):t}));return new p("Invalid "+o+" `"+i+"` of value `"+String(s)+"` supplied to `"+r+"`, expected one of "+l+".")}))},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var t=0;t<e.length;t++){var o=e[t];if("function"!=typeof o)return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+x(o)+" at index "+t+"."),a}return f((function(t,o,i,s,a){for(var l=[],c=0;c<e.length;c++){var d=(0,e[c])(t,o,i,s,a,n);if(null==d)return null;d.data&&r(d.data,"expectedType")&&l.push(d.data.expectedType)}return new p("Invalid "+s+" `"+a+"` supplied to `"+i+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")}))},shape:function(e){return f((function(t,r,o,i,s){var a=t[r],l=b(a);if("object"!==l)return new p("Invalid "+i+" `"+s+"` of type `"+l+"` supplied to `"+o+"`, expected `object`.");for(var c in e){var d=e[c];if("function"!=typeof d)return g(o,i,s,c,y(d));var u=d(a,c,o,i,s+"."+c,n);if(u)return u}return null}))},exact:function(e){return f((function(o,i,s,a,l){var c=o[i],d=b(c);if("object"!==d)return new p("Invalid "+a+" `"+l+"` of type `"+d+"` supplied to `"+s+"`, expected `object`.");var u=t({},o[i],e);for(var h in u){var f=e[h];if(r(e,h)&&"function"!=typeof f)return g(s,a,l,h,y(f));if(!f)return new p("Invalid "+a+" `"+l+"` key `"+h+"` supplied to `"+s+"`.\nBad object: "+JSON.stringify(o[i],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var m=f(c,h,s,a,l+"."+h,n);if(m)return m}return null}))}};function h(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function p(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function f(e){if("production"!==process.env.NODE_ENV)var t={},r=0;function o(o,s,a,c,u,h,f){if(c=c||d,h=h||a,f!==n){if(l){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var g=c+":"+a;!t[g]&&r<3&&(i("You are manually calling a React.PropTypes validation function for the `"+h+"` prop on `"+c+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[g]=!0,r++)}}return null==s[a]?o?null===s[a]?new p("The "+u+" `"+h+"` is marked as required in `"+c+"`, but its value is `null`."):new p("The "+u+" `"+h+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(s,a,c,u,h)}var s=o.bind(null,!1);return s.isRequired=o.bind(null,!0),s}function m(e){return f((function(t,n,r,o,i,s){var a=t[n];return b(a)!==e?new p("Invalid "+o+" `"+i+"` of type `"+y(a)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null}))}function g(e,t,n,r,o){return new p((e||"React class")+": "+t+" type `"+n+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+o+"`.")}function v(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(v);if(null===e||s(e))return!0;var t=function(e){var t=e&&(c&&e[c]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(!t)return!1;var n,r=t.call(e);if(t!==e.entries){for(;!(n=r.next()).done;)if(!v(n.value))return!1}else for(;!(n=r.next()).done;){var o=n.value;if(o&&!v(o[1]))return!1}return!0;default:return!1}}function b(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function y(e){if(null==e)return""+e;var t=b(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function x(e){var t=y(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return p.prototype=Error.prototype,u.checkPropTypes=o,u.resetWarningCache=o.resetWarningCache,u.PropTypes=u,u},bC}function EC(){if(CC)return aC.exports;if(CC=1,"production"!==process.env.NODE_ENV){var e=SC();aC.exports=MC()(e.isElement,!0)}else aC.exports=function(){if(wC)return xC;wC=1;var e=$C();function t(){}function n(){}return n.resetWarningCache=t,xC=function(){function r(t,n,r,o,i,s){if(s!==e){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function o(){return r}r.isRequired=r;var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},xC}()();return aC.exports}var TC,OC={exports:{}};var LC,AC={},RC={};function NC(){if(LC)return RC;return LC=1,Object.defineProperty(RC,"__esModule",{value:!0}),RC.dontSetMe=function(e,t,n){if(e[t])return new Error(`Invalid prop ${t} passed to ${n} - do not set this, set it on the child.`)},RC.findInArray=function(e,t){for(let n=0,r=e.length;n<r;n++)if(t.apply(t,[e[n],n,e]))return e[n]},RC.int=function(e){return parseInt(e,10)},RC.isFunction=function(e){return"function"==typeof e||"[object Function]"===Object.prototype.toString.call(e)},RC.isNum=function(e){return"number"==typeof e&&!isNaN(e)},RC}var DC,IC,PC={};function zC(){if(IC)return AC;IC=1,Object.defineProperty(AC,"__esModule",{value:!0}),AC.addClassName=s,AC.addEvent=function(e,t,n,r){if(!e)return;const o={capture:!0,...r};e.addEventListener?e.addEventListener(t,n,o):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n},AC.addUserSelectStyles=function(e){if(!e)return;let t=e.getElementById("react-draggable-style-el");t||(t=e.createElement("style"),t.type="text/css",t.id="react-draggable-style-el",t.innerHTML=".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n",t.innerHTML+=".react-draggable-transparent-selection *::selection {all: inherit;}\n",e.getElementsByTagName("head")[0].appendChild(t));e.body&&s(e.body,"react-draggable-transparent-selection")},AC.createCSSTransform=function(e,n){const r=o(e,n,"px");return{[(0,t.browserPrefixToKey)("transform",t.default)]:r}},AC.createSVGTransform=function(e,t){return o(e,t,"")},AC.getTouch=function(t,n){return t.targetTouches&&(0,e.findInArray)(t.targetTouches,(e=>n===e.identifier))||t.changedTouches&&(0,e.findInArray)(t.changedTouches,(e=>n===e.identifier))},AC.getTouchIdentifier=function(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier},AC.getTranslation=o,AC.innerHeight=function(t){let n=t.clientHeight;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n-=(0,e.int)(r.paddingTop),n-=(0,e.int)(r.paddingBottom),n},AC.innerWidth=function(t){let n=t.clientWidth;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n-=(0,e.int)(r.paddingLeft),n-=(0,e.int)(r.paddingRight),n},AC.matchesSelector=r,AC.matchesSelectorAndParentsTo=function(e,t,n){let o=e;do{if(r(o,t))return!0;if(o===n)return!1;o=o.parentNode}while(o);return!1},AC.offsetXYFromParent=function(e,t,n){const r=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect(),o=(e.clientX+t.scrollLeft-r.left)/n,i=(e.clientY+t.scrollTop-r.top)/n;return{x:o,y:i}},AC.outerHeight=function(t){let n=t.clientHeight;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n+=(0,e.int)(r.borderTopWidth),n+=(0,e.int)(r.borderBottomWidth),n},AC.outerWidth=function(t){let n=t.clientWidth;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n+=(0,e.int)(r.borderLeftWidth),n+=(0,e.int)(r.borderRightWidth),n},AC.removeClassName=a,AC.removeEvent=function(e,t,n,r){if(!e)return;const o={capture:!0,...r};e.removeEventListener?e.removeEventListener(t,n,o):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null},AC.scheduleRemoveUserSelectStyles=function(e){window.requestAnimationFrame?window.requestAnimationFrame((()=>{i(e)})):i(e)};var e=NC(),t=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,r=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var o,i,s={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return s;if(o=t?r:n){if(o.has(e))return o.get(e);o.set(e,s)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(i.get||i.set)?o(s,t,i):s[t]=e[t]);return s}(e,t)}(function(){if(DC)return PC;DC=1,Object.defineProperty(PC,"__esModule",{value:!0}),PC.browserPrefixToKey=n,PC.browserPrefixToStyle=function(e,t){return t?`-${t.toLowerCase()}-${e}`:e},PC.default=void 0,PC.getPrefix=t;const e=["Moz","Webkit","O","ms"];function t(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"==typeof window)return"";const r=window.document?.documentElement?.style;if(!r)return"";if(t in r)return"";for(let o=0;o<e.length;o++)if(n(t,e[o])in r)return e[o];return""}function n(e,t){return t?`${t}${function(e){let t="",n=!0;for(let r=0;r<e.length;r++)n?(t+=e[r].toUpperCase(),n=!1):"-"===e[r]?n=!0:t+=e[r];return t}(e)}`:e}return PC.default=t(),PC}());let n="";function r(t,r){return n||(n=(0,e.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],(function(n){return(0,e.isFunction)(t[n])}))),!!(0,e.isFunction)(t[n])&&t[n](r)}function o(e,t,n){let{x:r,y:o}=e,i=`translate(${r}${n},${o}${n})`;if(t){i=`translate(${`${"string"==typeof t.x?t.x:t.x+n}`}, ${`${"string"==typeof t.y?t.y:t.y+n}`})`+i}return i}function i(e){if(e)try{if(e.body&&a(e.body,"react-draggable-transparent-selection"),e.selection)e.selection.empty();else{const t=(e.defaultView||window).getSelection();t&&"Caret"!==t.type&&t.removeAllRanges()}}catch(e){}}function s(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp(`(?:^|\\s)${t}(?!\\S)`))||(e.className+=` ${t}`)}function a(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp(`(?:^|\\s)${t}(?!\\S)`,"g"),"")}return AC}var VC,BC={};function HC(){if(VC)return BC;VC=1,Object.defineProperty(BC,"__esModule",{value:!0}),BC.canDragX=function(e){return"both"===e.props.axis||"x"===e.props.axis},BC.canDragY=function(e){return"both"===e.props.axis||"y"===e.props.axis},BC.createCoreData=function(t,r,o){const i=!(0,e.isNum)(t.lastX),s=n(t);return i?{node:s,deltaX:0,deltaY:0,lastX:r,lastY:o,x:r,y:o}:{node:s,deltaX:r-t.lastX,deltaY:o-t.lastY,lastX:t.lastX,lastY:t.lastY,x:r,y:o}},BC.createDraggableData=function(e,t){const n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}},BC.getBoundPosition=function(r,o,i){if(!r.props.bounds)return[o,i];let{bounds:s}=r.props;s="string"==typeof s?s:function(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}(s);const a=n(r);if("string"==typeof s){const{ownerDocument:n}=a,r=n.defaultView;let o;if("parent"===s)o=a.parentNode;else{o=a.getRootNode().querySelector(s)}if(!(o instanceof r.HTMLElement))throw new Error('Bounds selector "'+s+'" could not find an element.');const i=o,l=r.getComputedStyle(a),c=r.getComputedStyle(i);s={left:-a.offsetLeft+(0,e.int)(c.paddingLeft)+(0,e.int)(l.marginLeft),top:-a.offsetTop+(0,e.int)(c.paddingTop)+(0,e.int)(l.marginTop),right:(0,t.innerWidth)(i)-(0,t.outerWidth)(a)-a.offsetLeft+(0,e.int)(c.paddingRight)-(0,e.int)(l.marginRight),bottom:(0,t.innerHeight)(i)-(0,t.outerHeight)(a)-a.offsetTop+(0,e.int)(c.paddingBottom)-(0,e.int)(l.marginBottom)}}(0,e.isNum)(s.right)&&(o=Math.min(o,s.right));(0,e.isNum)(s.bottom)&&(i=Math.min(i,s.bottom));(0,e.isNum)(s.left)&&(o=Math.max(o,s.left));(0,e.isNum)(s.top)&&(i=Math.max(i,s.top));return[o,i]},BC.getControlPosition=function(e,r,o){const i="number"==typeof r?(0,t.getTouch)(e,r):null;if("number"==typeof r&&!i)return null;const s=n(o),a=o.props.offsetParent||s.offsetParent||s.ownerDocument.body;return(0,t.offsetXYFromParent)(i||e,a,o.props.scale)},BC.snapToGrid=function(e,t,n){const r=Math.round(t/e[0])*e[0],o=Math.round(n/e[1])*e[1];return[r,o]};var e=NC(),t=zC();function n(e){const t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}return BC}var _C,FC,qC,WC,UC={},KC={};function GC(){if(_C)return KC;return _C=1,Object.defineProperty(KC,"__esModule",{value:!0}),KC.default=function(){},KC}function ZC(){if(FC)return UC;FC=1,Object.defineProperty(UC,"__esModule",{value:!0}),UC.default=void 0;var e=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,r=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var o,i,s={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return s;if(o=t?r:n){if(o.has(e))return o.get(e);o.set(e,s)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(i.get||i.set)?o(s,t,i):s[t]=e[t]);return s}(e,t)}(n),t=c(EC()),r=c(o),i=zC(),s=HC(),a=NC(),l=c(GC());function c(e){return e&&e.__esModule?e:{default:e}}function d(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const u={start:"touchstart",move:"touchmove",stop:"touchend"},h={start:"mousedown",move:"mousemove",stop:"mouseup"};let p=h,f=class extends e.Component{constructor(){super(...arguments),d(this,"dragging",!1),d(this,"lastX",NaN),d(this,"lastY",NaN),d(this,"touchIdentifier",null),d(this,"mounted",!1),d(this,"handleDragStart",(e=>{if(this.props.onMouseDown(e),!this.props.allowAnyClick&&"number"==typeof e.button&&0!==e.button)return!1;const t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:n}=t;if(this.props.disabled||!(e.target instanceof n.defaultView.Node)||this.props.handle&&!(0,i.matchesSelectorAndParentsTo)(e.target,this.props.handle,t)||this.props.cancel&&(0,i.matchesSelectorAndParentsTo)(e.target,this.props.cancel,t))return;"touchstart"!==e.type||this.props.allowMobileScroll||e.preventDefault();const r=(0,i.getTouchIdentifier)(e);this.touchIdentifier=r;const o=(0,s.getControlPosition)(e,r,this);if(null==o)return;const{x:a,y:c}=o,d=(0,s.createCoreData)(this,a,c);(0,l.default)("DraggableCore: handleDragStart: %j",d),(0,l.default)("calling",this.props.onStart);!1!==this.props.onStart(e,d)&&!1!==this.mounted&&(this.props.enableUserSelectHack&&(0,i.addUserSelectStyles)(n),this.dragging=!0,this.lastX=a,this.lastY=c,(0,i.addEvent)(n,p.move,this.handleDrag),(0,i.addEvent)(n,p.stop,this.handleDragStop))})),d(this,"handleDrag",(e=>{const t=(0,s.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX,t=r-this.lastY;if([e,t]=(0,s.snapToGrid)(this.props.grid,e,t),!e&&!t)return;n=this.lastX+e,r=this.lastY+t}const o=(0,s.createCoreData)(this,n,r);(0,l.default)("DraggableCore: handleDrag: %j",o);if(!1!==this.props.onDrag(e,o)&&!1!==this.mounted)this.lastX=n,this.lastY=r;else try{this.handleDragStop(new MouseEvent("mouseup"))}catch(e){const t=document.createEvent("MouseEvents");t.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(t)}})),d(this,"handleDragStop",(e=>{if(!this.dragging)return;const t=(0,s.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX||0,t=r-this.lastY||0;[e,t]=(0,s.snapToGrid)(this.props.grid,e,t),n=this.lastX+e,r=this.lastY+t}const o=(0,s.createCoreData)(this,n,r);if(!1===this.props.onStop(e,o)||!1===this.mounted)return!1;const a=this.findDOMNode();a&&this.props.enableUserSelectHack&&(0,i.scheduleRemoveUserSelectStyles)(a.ownerDocument),(0,l.default)("DraggableCore: handleDragStop: %j",o),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,a&&((0,l.default)("DraggableCore: Removing handlers"),(0,i.removeEvent)(a.ownerDocument,p.move,this.handleDrag),(0,i.removeEvent)(a.ownerDocument,p.stop,this.handleDragStop))})),d(this,"onMouseDown",(e=>(p=h,this.handleDragStart(e)))),d(this,"onMouseUp",(e=>(p=h,this.handleDragStop(e)))),d(this,"onTouchStart",(e=>(p=u,this.handleDragStart(e)))),d(this,"onTouchEnd",(e=>(p=u,this.handleDragStop(e))))}componentDidMount(){this.mounted=!0;const e=this.findDOMNode();e&&(0,i.addEvent)(e,u.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const e=this.findDOMNode();if(e){const{ownerDocument:t}=e;(0,i.removeEvent)(t,h.move,this.handleDrag),(0,i.removeEvent)(t,u.move,this.handleDrag),(0,i.removeEvent)(t,h.stop,this.handleDragStop),(0,i.removeEvent)(t,u.stop,this.handleDragStop),(0,i.removeEvent)(e,u.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,i.scheduleRemoveUserSelectStyles)(t)}}findDOMNode(){return this.props?.nodeRef?this.props?.nodeRef?.current:r.default.findDOMNode(this)}render(){return e.cloneElement(e.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};return UC.default=f,d(f,"displayName","DraggableCore"),d(f,"propTypes",{allowAnyClick:t.default.bool,allowMobileScroll:t.default.bool,children:t.default.node.isRequired,disabled:t.default.bool,enableUserSelectHack:t.default.bool,offsetParent:function(e,t){if(e[t]&&1!==e[t].nodeType)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:t.default.arrayOf(t.default.number),handle:t.default.string,cancel:t.default.string,nodeRef:t.default.object,onStart:t.default.func,onDrag:t.default.func,onStop:t.default.func,onMouseDown:t.default.func,scale:t.default.number,className:a.dontSetMe,style:a.dontSetMe,transform:a.dontSetMe}),d(f,"defaultProps",{allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),UC}function JC(){return qC||(qC=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return d.default}}),e.default=void 0;var t=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,r=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var o,i,s={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return s;if(o=t?r:n){if(o.has(e))return o.get(e);o.set(e,s)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(i.get||i.set)?o(s,t,i):s[t]=e[t]);return s}(e,t)}(n),r=h(EC()),i=h(o),s=function(){if(TC)return OC.exports;function e(t){var n,r,o="";if("string"==typeof t||"number"==typeof t)o+=t;else if("object"==typeof t)if(Array.isArray(t)){var i=t.length;for(n=0;n<i;n++)t[n]&&(r=e(t[n]))&&(o&&(o+=" "),o+=r)}else for(r in t)t[r]&&(o&&(o+=" "),o+=r);return o}function t(){for(var t,n,r=0,o="",i=arguments.length;r<i;r++)(t=arguments[r])&&(n=e(t))&&(o&&(o+=" "),o+=n);return o}return TC=1,OC.exports=t,OC.exports.clsx=t,OC.exports}(),a=zC(),l=HC(),c=NC(),d=h(ZC()),u=h(GC());function h(e){return e&&e.__esModule?e:{default:e}}function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p.apply(null,arguments)}function f(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class m extends t.Component{static getDerivedStateFromProps(e,t){let{position:n}=e,{prevPropsPosition:r}=t;return!n||r&&n.x===r.x&&n.y===r.y?null:((0,u.default)("Draggable: getDerivedStateFromProps %j",{position:n,prevPropsPosition:r}),{x:n.x,y:n.y,prevPropsPosition:{...n}})}constructor(e){super(e),f(this,"onDragStart",((e,t)=>{(0,u.default)("Draggable: onDragStart: %j",t);if(!1===this.props.onStart(e,(0,l.createDraggableData)(this,t)))return!1;this.setState({dragging:!0,dragged:!0})})),f(this,"onDrag",((e,t)=>{if(!this.state.dragging)return!1;(0,u.default)("Draggable: onDrag: %j",t);const n=(0,l.createDraggableData)(this,t),r={x:n.x,y:n.y,slackX:0,slackY:0};if(this.props.bounds){const{x:e,y:t}=r;r.x+=this.state.slackX,r.y+=this.state.slackY;const[o,i]=(0,l.getBoundPosition)(this,r.x,r.y);r.x=o,r.y=i,r.slackX=this.state.slackX+(e-r.x),r.slackY=this.state.slackY+(t-r.y),n.x=r.x,n.y=r.y,n.deltaX=r.x-this.state.x,n.deltaY=r.y-this.state.y}if(!1===this.props.onDrag(e,n))return!1;this.setState(r)})),f(this,"onDragStop",((e,t)=>{if(!this.state.dragging)return!1;if(!1===this.props.onStop(e,(0,l.createDraggableData)(this,t)))return!1;(0,u.default)("Draggable: onDragStop: %j",t);const n={dragging:!1,slackX:0,slackY:0};if(Boolean(this.props.position)){const{x:e,y:t}=this.props.position;n.x=e,n.y=t}this.setState(n)})),this.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:{...e.position},slackX:0,slackY:0,isElementSVG:!1},!e.position||e.onDrag||e.onStop||console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){void 0!==window.SVGElement&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.state.dragging&&this.setState({dragging:!1})}findDOMNode(){return this.props?.nodeRef?.current??i.default.findDOMNode(this)}render(){const{axis:e,bounds:n,children:r,defaultPosition:o,defaultClassName:i,defaultClassNameDragging:c,defaultClassNameDragged:u,position:h,positionOffset:f,scale:m,...g}=this.props;let v={},b=null;const y=!Boolean(h)||this.state.dragging,x=h||o,w={x:(0,l.canDragX)(this)&&y?this.state.x:x.x,y:(0,l.canDragY)(this)&&y?this.state.y:x.y};this.state.isElementSVG?b=(0,a.createSVGTransform)(w,f):v=(0,a.createCSSTransform)(w,f);const C=(0,s.clsx)(r.props.className||"",i,{[c]:this.state.dragging,[u]:this.state.dragged});return t.createElement(d.default,p({},g,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),t.cloneElement(t.Children.only(r),{className:C,style:{...r.props.style,...v},transform:b}))}}e.default=m,f(m,"displayName","Draggable"),f(m,"propTypes",{...d.default.propTypes,axis:r.default.oneOf(["both","x","y","none"]),bounds:r.default.oneOfType([r.default.shape({left:r.default.number,right:r.default.number,top:r.default.number,bottom:r.default.number}),r.default.string,r.default.oneOf([!1])]),defaultClassName:r.default.string,defaultClassNameDragging:r.default.string,defaultClassNameDragged:r.default.string,defaultPosition:r.default.shape({x:r.default.number,y:r.default.number}),positionOffset:r.default.shape({x:r.default.oneOfType([r.default.number,r.default.string]),y:r.default.oneOfType([r.default.number,r.default.string])}),position:r.default.shape({x:r.default.number,y:r.default.number}),className:c.dontSetMe,style:c.dontSetMe,transform:c.dontSetMe}),f(m,"defaultProps",{...d.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})}(sC)),sC}var XC=function(){if(WC)return iC.exports;WC=1;const{default:e,DraggableCore:t}=JC();return iC.exports=e,iC.exports.default=e,iC.exports.DraggableCore=t,iC.exports}(),YC=lp(XC);const QC=(e="medium",t,n,r)=>{const o=t?u(t):{xsmall:"15rem",small:"20rem",medium:"30rem",large:"40rem",xlarge:"60rem","full-width":"90%"}[e]||"15rem",s=r?u(r):{xsmall:"35rem",small:"45rem",medium:"45rem",large:"45rem",xlarge:"45rem","full-width":"unset"}[e]||"35rem",a="unset"===s?"80vh":`min(${s}, 80vh)`;let l="auto";return n?l=u(n):"full-width"===e&&(l="90%"),i.css`
|
|
2515
|
+
*/function jC(){return pC||(pC=1,"production"===process.env.NODE_ENV?dC.exports=function(){if(sC)return uC;sC=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function y(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case t:switch(e=e.type){case l:case c:case r:case i:case o:case u:return e;default:switch(e=e&&e.$$typeof){case a:case d:case f:case p:case s:return e;default:return h}}case n:return h}}}function x(e){return y(e)===c}return uC.AsyncMode=l,uC.ConcurrentMode=c,uC.ContextConsumer=a,uC.ContextProvider=s,uC.Element=t,uC.ForwardRef=d,uC.Fragment=r,uC.Lazy=f,uC.Memo=p,uC.Portal=n,uC.Profiler=i,uC.StrictMode=o,uC.Suspense=u,uC.isAsyncMode=function(e){return x(e)||y(e)===l},uC.isConcurrentMode=x,uC.isContextConsumer=function(e){return y(e)===a},uC.isContextProvider=function(e){return y(e)===s},uC.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},uC.isForwardRef=function(e){return y(e)===d},uC.isFragment=function(e){return y(e)===r},uC.isLazy=function(e){return y(e)===f},uC.isMemo=function(e){return y(e)===p},uC.isPortal=function(e){return y(e)===n},uC.isProfiler=function(e){return y(e)===i},uC.isStrictMode=function(e){return y(e)===o},uC.isSuspense=function(e){return y(e)===u},uC.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===i||e===o||e===u||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===p||e.$$typeof===s||e.$$typeof===a||e.$$typeof===d||e.$$typeof===g||e.$$typeof===v||e.$$typeof===b||e.$$typeof===m)},uC.typeOf=y,uC}():dC.exports=(hC||(hC=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function y(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case t:var m=e.type;switch(m){case l:case c:case r:case i:case o:case u:return m;default:var g=m&&m.$$typeof;switch(g){case a:case d:case f:case p:case s:return g;default:return h}}case n:return h}}}var x=l,w=c,C=a,k=s,S=t,$=d,j=r,M=f,E=p,T=n,O=i,L=o,A=u,R=!1;function N(e){return y(e)===c}$C.AsyncMode=x,$C.ConcurrentMode=w,$C.ContextConsumer=C,$C.ContextProvider=k,$C.Element=S,$C.ForwardRef=$,$C.Fragment=j,$C.Lazy=M,$C.Memo=E,$C.Portal=T,$C.Profiler=O,$C.StrictMode=L,$C.Suspense=A,$C.isAsyncMode=function(e){return R||(R=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),N(e)||y(e)===l},$C.isConcurrentMode=N,$C.isContextConsumer=function(e){return y(e)===a},$C.isContextProvider=function(e){return y(e)===s},$C.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},$C.isForwardRef=function(e){return y(e)===d},$C.isFragment=function(e){return y(e)===r},$C.isLazy=function(e){return y(e)===f},$C.isMemo=function(e){return y(e)===p},$C.isPortal=function(e){return y(e)===n},$C.isProfiler=function(e){return y(e)===i},$C.isStrictMode=function(e){return y(e)===o},$C.isSuspense=function(e){return y(e)===u},$C.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===i||e===o||e===u||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===p||e.$$typeof===s||e.$$typeof===a||e.$$typeof===d||e.$$typeof===g||e.$$typeof===v||e.$$typeof===b||e.$$typeof===m)},$C.typeOf=y}()),$C)),dC.exports}function MC(){if(mC)return fC;mC=1;return fC="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function EC(){return vC?gC:(vC=1,gC=Function.call.bind(Object.prototype.hasOwnProperty))}function TC(){if(wC)return xC;wC=1;var e=jC(),t=s,n=MC(),r=EC(),o=function(){if(yC)return bC;yC=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=MC(),n={},r=EC();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function o(o,i,s,a,l){if("production"!==process.env.NODE_ENV)for(var c in o)if(r(o,c)){var d;try{if("function"!=typeof o[c]){var u=Error((a||"React class")+": "+s+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw u.name="Invariant Violation",u}d=o[c](i,c,a,s,null,t)}catch(e){d=e}if(!d||d instanceof Error||e((a||"React class")+": type specification of "+s+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var h=l?l():"";e("Failed "+s+" type: "+d.message+(null!=h?h:""))}}}return o.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(n={})},bC=o}(),i=function(){};function a(){return null}return"production"!==process.env.NODE_ENV&&(i=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),xC=function(s,l){var c="function"==typeof Symbol&&Symbol.iterator;var d="<<anonymous>>",u={array:m("array"),bigint:m("bigint"),bool:m("boolean"),func:m("function"),number:m("number"),object:m("object"),string:m("string"),symbol:m("symbol"),any:f(a),arrayOf:function(e){return f((function(t,r,o,i,s){if("function"!=typeof e)return new p("Property `"+s+"` of component `"+o+"` has invalid PropType notation inside arrayOf.");var a=t[r];if(!Array.isArray(a))return new p("Invalid "+i+" `"+s+"` of type `"+b(a)+"` supplied to `"+o+"`, expected an array.");for(var l=0;l<a.length;l++){var c=e(a,l,o,i,s+"["+l+"]",n);if(c instanceof Error)return c}return null}))},element:f((function(e,t,n,r,o){var i=e[t];return s(i)?null:new p("Invalid "+r+" `"+o+"` of type `"+b(i)+"` supplied to `"+n+"`, expected a single ReactElement.")})),elementType:f((function(t,n,r,o,i){var s=t[n];return e.isValidElementType(s)?null:new p("Invalid "+o+" `"+i+"` of type `"+b(s)+"` supplied to `"+r+"`, expected a single ReactElement type.")})),instanceOf:function(e){return f((function(t,n,r,o,i){if(!(t[n]instanceof e)){var s=e.name||d;return new p("Invalid "+o+" `"+i+"` of type `"+(((a=t[n]).constructor&&a.constructor.name?a.constructor.name:d)+"` supplied to `")+r+"`, expected instance of `"+s+"`.")}var a;return null}))},node:f((function(e,t,n,r,o){return v(e[t])?null:new p("Invalid "+r+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.")})),objectOf:function(e){return f((function(t,o,i,s,a){if("function"!=typeof e)return new p("Property `"+a+"` of component `"+i+"` has invalid PropType notation inside objectOf.");var l=t[o],c=b(l);if("object"!==c)return new p("Invalid "+s+" `"+a+"` of type `"+c+"` supplied to `"+i+"`, expected an object.");for(var d in l)if(r(l,d)){var u=e(l,d,i,s,a+"."+d,n);if(u instanceof Error)return u}return null}))},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&i(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),a;return f((function(t,n,r,o,i){for(var s=t[n],a=0;a<e.length;a++)if(h(s,e[a]))return null;var l=JSON.stringify(e,(function(e,t){return"symbol"===y(t)?String(t):t}));return new p("Invalid "+o+" `"+i+"` of value `"+String(s)+"` supplied to `"+r+"`, expected one of "+l+".")}))},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var t=0;t<e.length;t++){var o=e[t];if("function"!=typeof o)return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+x(o)+" at index "+t+"."),a}return f((function(t,o,i,s,a){for(var l=[],c=0;c<e.length;c++){var d=(0,e[c])(t,o,i,s,a,n);if(null==d)return null;d.data&&r(d.data,"expectedType")&&l.push(d.data.expectedType)}return new p("Invalid "+s+" `"+a+"` supplied to `"+i+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")}))},shape:function(e){return f((function(t,r,o,i,s){var a=t[r],l=b(a);if("object"!==l)return new p("Invalid "+i+" `"+s+"` of type `"+l+"` supplied to `"+o+"`, expected `object`.");for(var c in e){var d=e[c];if("function"!=typeof d)return g(o,i,s,c,y(d));var u=d(a,c,o,i,s+"."+c,n);if(u)return u}return null}))},exact:function(e){return f((function(o,i,s,a,l){var c=o[i],d=b(c);if("object"!==d)return new p("Invalid "+a+" `"+l+"` of type `"+d+"` supplied to `"+s+"`, expected `object`.");var u=t({},o[i],e);for(var h in u){var f=e[h];if(r(e,h)&&"function"!=typeof f)return g(s,a,l,h,y(f));if(!f)return new p("Invalid "+a+" `"+l+"` key `"+h+"` supplied to `"+s+"`.\nBad object: "+JSON.stringify(o[i],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var m=f(c,h,s,a,l+"."+h,n);if(m)return m}return null}))}};function h(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function p(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function f(e){if("production"!==process.env.NODE_ENV)var t={},r=0;function o(o,s,a,c,u,h,f){if(c=c||d,h=h||a,f!==n){if(l){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var g=c+":"+a;!t[g]&&r<3&&(i("You are manually calling a React.PropTypes validation function for the `"+h+"` prop on `"+c+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[g]=!0,r++)}}return null==s[a]?o?null===s[a]?new p("The "+u+" `"+h+"` is marked as required in `"+c+"`, but its value is `null`."):new p("The "+u+" `"+h+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(s,a,c,u,h)}var s=o.bind(null,!1);return s.isRequired=o.bind(null,!0),s}function m(e){return f((function(t,n,r,o,i,s){var a=t[n];return b(a)!==e?new p("Invalid "+o+" `"+i+"` of type `"+y(a)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null}))}function g(e,t,n,r,o){return new p((e||"React class")+": "+t+" type `"+n+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+o+"`.")}function v(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(v);if(null===e||s(e))return!0;var t=function(e){var t=e&&(c&&e[c]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(!t)return!1;var n,r=t.call(e);if(t!==e.entries){for(;!(n=r.next()).done;)if(!v(n.value))return!1}else for(;!(n=r.next()).done;){var o=n.value;if(o&&!v(o[1]))return!1}return!0;default:return!1}}function b(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function y(e){if(null==e)return""+e;var t=b(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function x(e){var t=y(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return p.prototype=Error.prototype,u.checkPropTypes=o,u.resetWarningCache=o.resetWarningCache,u.PropTypes=u,u},xC}function OC(){if(SC)return cC.exports;if(SC=1,"production"!==process.env.NODE_ENV){var e=jC();cC.exports=TC()(e.isElement,!0)}else cC.exports=function(){if(kC)return CC;kC=1;var e=MC();function t(){}function n(){}return n.resetWarningCache=t,CC=function(){function r(t,n,r,o,i,s){if(s!==e){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function o(){return r}r.isRequired=r;var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},CC}()();return cC.exports}var LC,AC={exports:{}};var RC,NC={},DC={};function IC(){if(RC)return DC;return RC=1,Object.defineProperty(DC,"__esModule",{value:!0}),DC.dontSetMe=function(e,t,n){if(e[t])return new Error(`Invalid prop ${t} passed to ${n} - do not set this, set it on the child.`)},DC.findInArray=function(e,t){for(let n=0,r=e.length;n<r;n++)if(t.apply(t,[e[n],n,e]))return e[n]},DC.int=function(e){return parseInt(e,10)},DC.isFunction=function(e){return"function"==typeof e||"[object Function]"===Object.prototype.toString.call(e)},DC.isNum=function(e){return"number"==typeof e&&!isNaN(e)},DC}var PC,zC,VC={};function BC(){if(zC)return NC;zC=1,Object.defineProperty(NC,"__esModule",{value:!0}),NC.addClassName=s,NC.addEvent=function(e,t,n,r){if(!e)return;const o={capture:!0,...r};e.addEventListener?e.addEventListener(t,n,o):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n},NC.addUserSelectStyles=function(e){if(!e)return;let t=e.getElementById("react-draggable-style-el");t||(t=e.createElement("style"),t.type="text/css",t.id="react-draggable-style-el",t.innerHTML=".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n",t.innerHTML+=".react-draggable-transparent-selection *::selection {all: inherit;}\n",e.getElementsByTagName("head")[0].appendChild(t));e.body&&s(e.body,"react-draggable-transparent-selection")},NC.createCSSTransform=function(e,n){const r=o(e,n,"px");return{[(0,t.browserPrefixToKey)("transform",t.default)]:r}},NC.createSVGTransform=function(e,t){return o(e,t,"")},NC.getTouch=function(t,n){return t.targetTouches&&(0,e.findInArray)(t.targetTouches,(e=>n===e.identifier))||t.changedTouches&&(0,e.findInArray)(t.changedTouches,(e=>n===e.identifier))},NC.getTouchIdentifier=function(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier},NC.getTranslation=o,NC.innerHeight=function(t){let n=t.clientHeight;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n-=(0,e.int)(r.paddingTop),n-=(0,e.int)(r.paddingBottom),n},NC.innerWidth=function(t){let n=t.clientWidth;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n-=(0,e.int)(r.paddingLeft),n-=(0,e.int)(r.paddingRight),n},NC.matchesSelector=r,NC.matchesSelectorAndParentsTo=function(e,t,n){let o=e;do{if(r(o,t))return!0;if(o===n)return!1;o=o.parentNode}while(o);return!1},NC.offsetXYFromParent=function(e,t,n){const r=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect(),o=(e.clientX+t.scrollLeft-r.left)/n,i=(e.clientY+t.scrollTop-r.top)/n;return{x:o,y:i}},NC.outerHeight=function(t){let n=t.clientHeight;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n+=(0,e.int)(r.borderTopWidth),n+=(0,e.int)(r.borderBottomWidth),n},NC.outerWidth=function(t){let n=t.clientWidth;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n+=(0,e.int)(r.borderLeftWidth),n+=(0,e.int)(r.borderRightWidth),n},NC.removeClassName=a,NC.removeEvent=function(e,t,n,r){if(!e)return;const o={capture:!0,...r};e.removeEventListener?e.removeEventListener(t,n,o):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null},NC.scheduleRemoveUserSelectStyles=function(e){window.requestAnimationFrame?window.requestAnimationFrame((()=>{i(e)})):i(e)};var e=IC(),t=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,r=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var o,i,s={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return s;if(o=t?r:n){if(o.has(e))return o.get(e);o.set(e,s)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(i.get||i.set)?o(s,t,i):s[t]=e[t]);return s}(e,t)}(function(){if(PC)return VC;PC=1,Object.defineProperty(VC,"__esModule",{value:!0}),VC.browserPrefixToKey=n,VC.browserPrefixToStyle=function(e,t){return t?`-${t.toLowerCase()}-${e}`:e},VC.default=void 0,VC.getPrefix=t;const e=["Moz","Webkit","O","ms"];function t(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"==typeof window)return"";const r=window.document?.documentElement?.style;if(!r)return"";if(t in r)return"";for(let o=0;o<e.length;o++)if(n(t,e[o])in r)return e[o];return""}function n(e,t){return t?`${t}${function(e){let t="",n=!0;for(let r=0;r<e.length;r++)n?(t+=e[r].toUpperCase(),n=!1):"-"===e[r]?n=!0:t+=e[r];return t}(e)}`:e}return VC.default=t(),VC}());let n="";function r(t,r){return n||(n=(0,e.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],(function(n){return(0,e.isFunction)(t[n])}))),!!(0,e.isFunction)(t[n])&&t[n](r)}function o(e,t,n){let{x:r,y:o}=e,i=`translate(${r}${n},${o}${n})`;if(t){i=`translate(${`${"string"==typeof t.x?t.x:t.x+n}`}, ${`${"string"==typeof t.y?t.y:t.y+n}`})`+i}return i}function i(e){if(e)try{if(e.body&&a(e.body,"react-draggable-transparent-selection"),e.selection)e.selection.empty();else{const t=(e.defaultView||window).getSelection();t&&"Caret"!==t.type&&t.removeAllRanges()}}catch(e){}}function s(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp(`(?:^|\\s)${t}(?!\\S)`))||(e.className+=` ${t}`)}function a(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp(`(?:^|\\s)${t}(?!\\S)`,"g"),"")}return NC}var HC,_C={};function FC(){if(HC)return _C;HC=1,Object.defineProperty(_C,"__esModule",{value:!0}),_C.canDragX=function(e){return"both"===e.props.axis||"x"===e.props.axis},_C.canDragY=function(e){return"both"===e.props.axis||"y"===e.props.axis},_C.createCoreData=function(t,r,o){const i=!(0,e.isNum)(t.lastX),s=n(t);return i?{node:s,deltaX:0,deltaY:0,lastX:r,lastY:o,x:r,y:o}:{node:s,deltaX:r-t.lastX,deltaY:o-t.lastY,lastX:t.lastX,lastY:t.lastY,x:r,y:o}},_C.createDraggableData=function(e,t){const n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}},_C.getBoundPosition=function(r,o,i){if(!r.props.bounds)return[o,i];let{bounds:s}=r.props;s="string"==typeof s?s:function(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}(s);const a=n(r);if("string"==typeof s){const{ownerDocument:n}=a,r=n.defaultView;let o;if("parent"===s)o=a.parentNode;else{o=a.getRootNode().querySelector(s)}if(!(o instanceof r.HTMLElement))throw new Error('Bounds selector "'+s+'" could not find an element.');const i=o,l=r.getComputedStyle(a),c=r.getComputedStyle(i);s={left:-a.offsetLeft+(0,e.int)(c.paddingLeft)+(0,e.int)(l.marginLeft),top:-a.offsetTop+(0,e.int)(c.paddingTop)+(0,e.int)(l.marginTop),right:(0,t.innerWidth)(i)-(0,t.outerWidth)(a)-a.offsetLeft+(0,e.int)(c.paddingRight)-(0,e.int)(l.marginRight),bottom:(0,t.innerHeight)(i)-(0,t.outerHeight)(a)-a.offsetTop+(0,e.int)(c.paddingBottom)-(0,e.int)(l.marginBottom)}}(0,e.isNum)(s.right)&&(o=Math.min(o,s.right));(0,e.isNum)(s.bottom)&&(i=Math.min(i,s.bottom));(0,e.isNum)(s.left)&&(o=Math.max(o,s.left));(0,e.isNum)(s.top)&&(i=Math.max(i,s.top));return[o,i]},_C.getControlPosition=function(e,r,o){const i="number"==typeof r?(0,t.getTouch)(e,r):null;if("number"==typeof r&&!i)return null;const s=n(o),a=o.props.offsetParent||s.offsetParent||s.ownerDocument.body;return(0,t.offsetXYFromParent)(i||e,a,o.props.scale)},_C.snapToGrid=function(e,t,n){const r=Math.round(t/e[0])*e[0],o=Math.round(n/e[1])*e[1];return[r,o]};var e=IC(),t=BC();function n(e){const t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}return _C}var qC,WC,UC,KC,GC={},ZC={};function JC(){if(qC)return ZC;return qC=1,Object.defineProperty(ZC,"__esModule",{value:!0}),ZC.default=function(){},ZC}function XC(){if(WC)return GC;WC=1,Object.defineProperty(GC,"__esModule",{value:!0}),GC.default=void 0;var e=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,r=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var o,i,s={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return s;if(o=t?r:n){if(o.has(e))return o.get(e);o.set(e,s)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(i.get||i.set)?o(s,t,i):s[t]=e[t]);return s}(e,t)}(n),t=c(OC()),r=c(o),i=BC(),s=FC(),a=IC(),l=c(JC());function c(e){return e&&e.__esModule?e:{default:e}}function d(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const u={start:"touchstart",move:"touchmove",stop:"touchend"},h={start:"mousedown",move:"mousemove",stop:"mouseup"};let p=h,f=class extends e.Component{constructor(){super(...arguments),d(this,"dragging",!1),d(this,"lastX",NaN),d(this,"lastY",NaN),d(this,"touchIdentifier",null),d(this,"mounted",!1),d(this,"handleDragStart",(e=>{if(this.props.onMouseDown(e),!this.props.allowAnyClick&&"number"==typeof e.button&&0!==e.button)return!1;const t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:n}=t;if(this.props.disabled||!(e.target instanceof n.defaultView.Node)||this.props.handle&&!(0,i.matchesSelectorAndParentsTo)(e.target,this.props.handle,t)||this.props.cancel&&(0,i.matchesSelectorAndParentsTo)(e.target,this.props.cancel,t))return;"touchstart"!==e.type||this.props.allowMobileScroll||e.preventDefault();const r=(0,i.getTouchIdentifier)(e);this.touchIdentifier=r;const o=(0,s.getControlPosition)(e,r,this);if(null==o)return;const{x:a,y:c}=o,d=(0,s.createCoreData)(this,a,c);(0,l.default)("DraggableCore: handleDragStart: %j",d),(0,l.default)("calling",this.props.onStart);!1!==this.props.onStart(e,d)&&!1!==this.mounted&&(this.props.enableUserSelectHack&&(0,i.addUserSelectStyles)(n),this.dragging=!0,this.lastX=a,this.lastY=c,(0,i.addEvent)(n,p.move,this.handleDrag),(0,i.addEvent)(n,p.stop,this.handleDragStop))})),d(this,"handleDrag",(e=>{const t=(0,s.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX,t=r-this.lastY;if([e,t]=(0,s.snapToGrid)(this.props.grid,e,t),!e&&!t)return;n=this.lastX+e,r=this.lastY+t}const o=(0,s.createCoreData)(this,n,r);(0,l.default)("DraggableCore: handleDrag: %j",o);if(!1!==this.props.onDrag(e,o)&&!1!==this.mounted)this.lastX=n,this.lastY=r;else try{this.handleDragStop(new MouseEvent("mouseup"))}catch(e){const t=document.createEvent("MouseEvents");t.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(t)}})),d(this,"handleDragStop",(e=>{if(!this.dragging)return;const t=(0,s.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX||0,t=r-this.lastY||0;[e,t]=(0,s.snapToGrid)(this.props.grid,e,t),n=this.lastX+e,r=this.lastY+t}const o=(0,s.createCoreData)(this,n,r);if(!1===this.props.onStop(e,o)||!1===this.mounted)return!1;const a=this.findDOMNode();a&&this.props.enableUserSelectHack&&(0,i.scheduleRemoveUserSelectStyles)(a.ownerDocument),(0,l.default)("DraggableCore: handleDragStop: %j",o),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,a&&((0,l.default)("DraggableCore: Removing handlers"),(0,i.removeEvent)(a.ownerDocument,p.move,this.handleDrag),(0,i.removeEvent)(a.ownerDocument,p.stop,this.handleDragStop))})),d(this,"onMouseDown",(e=>(p=h,this.handleDragStart(e)))),d(this,"onMouseUp",(e=>(p=h,this.handleDragStop(e)))),d(this,"onTouchStart",(e=>(p=u,this.handleDragStart(e)))),d(this,"onTouchEnd",(e=>(p=u,this.handleDragStop(e))))}componentDidMount(){this.mounted=!0;const e=this.findDOMNode();e&&(0,i.addEvent)(e,u.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const e=this.findDOMNode();if(e){const{ownerDocument:t}=e;(0,i.removeEvent)(t,h.move,this.handleDrag),(0,i.removeEvent)(t,u.move,this.handleDrag),(0,i.removeEvent)(t,h.stop,this.handleDragStop),(0,i.removeEvent)(t,u.stop,this.handleDragStop),(0,i.removeEvent)(e,u.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,i.scheduleRemoveUserSelectStyles)(t)}}findDOMNode(){return this.props?.nodeRef?this.props?.nodeRef?.current:r.default.findDOMNode(this)}render(){return e.cloneElement(e.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};return GC.default=f,d(f,"displayName","DraggableCore"),d(f,"propTypes",{allowAnyClick:t.default.bool,allowMobileScroll:t.default.bool,children:t.default.node.isRequired,disabled:t.default.bool,enableUserSelectHack:t.default.bool,offsetParent:function(e,t){if(e[t]&&1!==e[t].nodeType)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:t.default.arrayOf(t.default.number),handle:t.default.string,cancel:t.default.string,nodeRef:t.default.object,onStart:t.default.func,onDrag:t.default.func,onStop:t.default.func,onMouseDown:t.default.func,scale:t.default.number,className:a.dontSetMe,style:a.dontSetMe,transform:a.dontSetMe}),d(f,"defaultProps",{allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),GC}function YC(){return UC||(UC=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return d.default}}),e.default=void 0;var t=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,r=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var o,i,s={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return s;if(o=t?r:n){if(o.has(e))return o.get(e);o.set(e,s)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(i.get||i.set)?o(s,t,i):s[t]=e[t]);return s}(e,t)}(n),r=h(OC()),i=h(o),s=function(){if(LC)return AC.exports;function e(t){var n,r,o="";if("string"==typeof t||"number"==typeof t)o+=t;else if("object"==typeof t)if(Array.isArray(t)){var i=t.length;for(n=0;n<i;n++)t[n]&&(r=e(t[n]))&&(o&&(o+=" "),o+=r)}else for(r in t)t[r]&&(o&&(o+=" "),o+=r);return o}function t(){for(var t,n,r=0,o="",i=arguments.length;r<i;r++)(t=arguments[r])&&(n=e(t))&&(o&&(o+=" "),o+=n);return o}return LC=1,AC.exports=t,AC.exports.clsx=t,AC.exports}(),a=BC(),l=FC(),c=IC(),d=h(XC()),u=h(JC());function h(e){return e&&e.__esModule?e:{default:e}}function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p.apply(null,arguments)}function f(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class m extends t.Component{static getDerivedStateFromProps(e,t){let{position:n}=e,{prevPropsPosition:r}=t;return!n||r&&n.x===r.x&&n.y===r.y?null:((0,u.default)("Draggable: getDerivedStateFromProps %j",{position:n,prevPropsPosition:r}),{x:n.x,y:n.y,prevPropsPosition:{...n}})}constructor(e){super(e),f(this,"onDragStart",((e,t)=>{(0,u.default)("Draggable: onDragStart: %j",t);if(!1===this.props.onStart(e,(0,l.createDraggableData)(this,t)))return!1;this.setState({dragging:!0,dragged:!0})})),f(this,"onDrag",((e,t)=>{if(!this.state.dragging)return!1;(0,u.default)("Draggable: onDrag: %j",t);const n=(0,l.createDraggableData)(this,t),r={x:n.x,y:n.y,slackX:0,slackY:0};if(this.props.bounds){const{x:e,y:t}=r;r.x+=this.state.slackX,r.y+=this.state.slackY;const[o,i]=(0,l.getBoundPosition)(this,r.x,r.y);r.x=o,r.y=i,r.slackX=this.state.slackX+(e-r.x),r.slackY=this.state.slackY+(t-r.y),n.x=r.x,n.y=r.y,n.deltaX=r.x-this.state.x,n.deltaY=r.y-this.state.y}if(!1===this.props.onDrag(e,n))return!1;this.setState(r)})),f(this,"onDragStop",((e,t)=>{if(!this.state.dragging)return!1;if(!1===this.props.onStop(e,(0,l.createDraggableData)(this,t)))return!1;(0,u.default)("Draggable: onDragStop: %j",t);const n={dragging:!1,slackX:0,slackY:0};if(Boolean(this.props.position)){const{x:e,y:t}=this.props.position;n.x=e,n.y=t}this.setState(n)})),this.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:{...e.position},slackX:0,slackY:0,isElementSVG:!1},!e.position||e.onDrag||e.onStop||console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){void 0!==window.SVGElement&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.state.dragging&&this.setState({dragging:!1})}findDOMNode(){return this.props?.nodeRef?.current??i.default.findDOMNode(this)}render(){const{axis:e,bounds:n,children:r,defaultPosition:o,defaultClassName:i,defaultClassNameDragging:c,defaultClassNameDragged:u,position:h,positionOffset:f,scale:m,...g}=this.props;let v={},b=null;const y=!Boolean(h)||this.state.dragging,x=h||o,w={x:(0,l.canDragX)(this)&&y?this.state.x:x.x,y:(0,l.canDragY)(this)&&y?this.state.y:x.y};this.state.isElementSVG?b=(0,a.createSVGTransform)(w,f):v=(0,a.createCSSTransform)(w,f);const C=(0,s.clsx)(r.props.className||"",i,{[c]:this.state.dragging,[u]:this.state.dragged});return t.createElement(d.default,p({},g,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),t.cloneElement(t.Children.only(r),{className:C,style:{...r.props.style,...v},transform:b}))}}e.default=m,f(m,"displayName","Draggable"),f(m,"propTypes",{...d.default.propTypes,axis:r.default.oneOf(["both","x","y","none"]),bounds:r.default.oneOfType([r.default.shape({left:r.default.number,right:r.default.number,top:r.default.number,bottom:r.default.number}),r.default.string,r.default.oneOf([!1])]),defaultClassName:r.default.string,defaultClassNameDragging:r.default.string,defaultClassNameDragged:r.default.string,defaultPosition:r.default.shape({x:r.default.number,y:r.default.number}),positionOffset:r.default.shape({x:r.default.oneOfType([r.default.number,r.default.string]),y:r.default.oneOfType([r.default.number,r.default.string])}),position:r.default.shape({x:r.default.number,y:r.default.number}),className:c.dontSetMe,style:c.dontSetMe,transform:c.dontSetMe}),f(m,"defaultProps",{...d.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})}(lC)),lC}var QC=function(){if(KC)return aC.exports;KC=1;const{default:e,DraggableCore:t}=YC();return aC.exports=e,aC.exports.default=e,aC.exports.DraggableCore=t,aC.exports}(),ek=lp(QC);const tk=(e="medium",t,n,r)=>{const o=t?u(t):{xsmall:"15rem",small:"20rem",medium:"30rem",large:"40rem",xlarge:"60rem","full-width":"90%"}[e]||"15rem",s=r?u(r):{xsmall:"35rem",small:"45rem",medium:"45rem",large:"45rem",xlarge:"45rem","full-width":"unset"}[e]||"35rem",a="unset"===s?"80vh":`min(${s}, 80vh)`;let l="auto";return n?l=u(n):"full-width"===e&&(l="90%"),i.css`
|
|
2516
2516
|
max-width: 100%;
|
|
2517
2517
|
width: ${o};
|
|
2518
2518
|
height: ${l};
|
|
@@ -2522,7 +2522,7 @@
|
|
|
2522
2522
|
border-radius: ${$(300)};
|
|
2523
2523
|
box-shadow: 0 0.25rem 0.375rem -0.25rem #0000001a;
|
|
2524
2524
|
box-shadow: 0 0.625rem 0.9375rem -0.1875rem #0000001a;
|
|
2525
|
-
`},
|
|
2525
|
+
`},nk=i.css`
|
|
2526
2526
|
height: 100%;
|
|
2527
2527
|
min-height: ${k(1e3)};
|
|
2528
2528
|
display: flex;
|
|
@@ -2531,29 +2531,29 @@
|
|
|
2531
2531
|
padding: ${k(200)};
|
|
2532
2532
|
border-bottom: ${j(100)} solid
|
|
2533
2533
|
${w("neutral",300)};
|
|
2534
|
-
`,
|
|
2534
|
+
`,rk=i.css`
|
|
2535
2535
|
top: ${k(300)};
|
|
2536
|
-
`,
|
|
2536
|
+
`,ok=i.css`
|
|
2537
2537
|
padding: ${k(300)};
|
|
2538
|
-
`,
|
|
2538
|
+
`,ik=e=>i.css`
|
|
2539
2539
|
height: 100%;
|
|
2540
2540
|
width: ${e||"20rem"};
|
|
2541
2541
|
background-color: ${w("neutral",100)};
|
|
2542
2542
|
box-shadow: 0 0.0625rem 0.125rem -0.0625rem #0000001a;
|
|
2543
2543
|
box-shadow: 0 0.0625rem 0.1875rem 0 #0000001a;
|
|
2544
2544
|
position: relative;
|
|
2545
|
-
`,
|
|
2545
|
+
`,sk=i.css`
|
|
2546
2546
|
border-right: ${j(100)} solid
|
|
2547
2547
|
${w("neutral",300)};
|
|
2548
|
-
`,
|
|
2548
|
+
`,ak=i.css`
|
|
2549
2549
|
border: ${j(100)} solid ${w("neutral",300)};
|
|
2550
2550
|
border-radius: ${$(300)};
|
|
2551
|
-
`,
|
|
2551
|
+
`,lk=i.css`
|
|
2552
2552
|
min-height: ${k(1200)};
|
|
2553
2553
|
width: 100%;
|
|
2554
2554
|
border-bottom: ${j(100)} solid
|
|
2555
2555
|
${w("neutral",300)};
|
|
2556
|
-
`,
|
|
2556
|
+
`,ck=(e,t)=>i.css`
|
|
2557
2557
|
height: ${((e,t)=>e&&t?`calc(100% - ${(e+t)/16}rem)`:e?`calc(100% - ${e/16}rem)`:t?`calc(100% - ${t/16}rem)`:"100%")(e,t)};
|
|
2558
2558
|
width: 100%;
|
|
2559
2559
|
overflow-y: auto;
|
|
@@ -2561,7 +2561,7 @@
|
|
|
2561
2561
|
&:focus-visible {
|
|
2562
2562
|
outline-color: ${w("primary",700)};
|
|
2563
2563
|
}
|
|
2564
|
-
`,
|
|
2564
|
+
`,dk=i.css`
|
|
2565
2565
|
min-height: ${k(1600)};
|
|
2566
2566
|
width: 100%;
|
|
2567
2567
|
display: flex;
|
|
@@ -2572,7 +2572,7 @@
|
|
|
2572
2572
|
left: 0;
|
|
2573
2573
|
border-top: ${j(100)} solid
|
|
2574
2574
|
${w("neutral",300)};
|
|
2575
|
-
`;var
|
|
2575
|
+
`;var uk,hk;!function(){if(hk)return uk;hk=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=function(e,t){var n=arguments.length;t=new Array(n>1?n-1:0);for(var r=1;r<n;r++)t[r-1]=arguments[r];var o=0,i="Warning: "+e.replace(/%s/g,(function(){return t[o++]}));"undefined"!=typeof console&&console.error(i);try{throw new Error(i)}catch(e){}};e=function(e,n,r){var o=arguments.length;r=new Array(o>2?o-2:0);for(var i=2;i<o;i++)r[i-2]=arguments[i];if(void 0===n)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");e||t.apply(null,[n].concat(r))}}uk=e}();var pk=fk()?n.useLayoutEffect:n.useEffect;"production"!==process.env.NODE_ENV&&("undefined"!=typeof process?process:{env:{NODE_ENV:"development"}}).env;function fk(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}process.env.NODE_ENV,process.env.NODE_ENV,process.env.NODE_ENV;var mk=function(e){var t,r=e.children,i=e.type,s=void 0===i?"reach-portal":i,a=n.useRef(null),l=n.useRef(null),c=(t=n.useState(Object.create(null))[1],n.useCallback((function(){t(Object.create(null))}),[]));return pk((function(){if(a.current){var e=a.current.ownerDocument;return l.current=null==e?void 0:e.createElement(s),e.body.appendChild(l.current),c(),function(){l.current&&l.current.ownerDocument&&l.current.ownerDocument.body.removeChild(l.current)}}}),[s,c]),l.current?o.createPortal(r,l.current):n.createElement("span",{ref:a})};"production"!==process.env.NODE_ENV&&(mk.displayName="Portal");
|
|
2576
2576
|
/*! *****************************************************************************
|
|
2577
2577
|
Copyright (c) Microsoft Corporation.
|
|
2578
2578
|
|
|
@@ -2586,16 +2586,16 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
2586
2586
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
2587
2587
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
2588
2588
|
PERFORMANCE OF THIS SOFTWARE.
|
|
2589
|
-
***************************************************************************** */var fk,mk,gk=function(){return gk=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},gk.apply(this,arguments)};function vk(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function bk(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function yk(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s}function xk(e,t,n){if(2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}!function(e){e.Start="xstate.start",e.Stop="xstate.stop",e.Raise="xstate.raise",e.Send="xstate.send",e.Cancel="xstate.cancel",e.NullEvent="",e.Assign="xstate.assign",e.After="xstate.after",e.DoneState="done.state",e.DoneInvoke="done.invoke",e.Log="xstate.log",e.Init="xstate.init",e.Invoke="xstate.invoke",e.ErrorExecution="error.execution",e.ErrorCommunication="error.communication",e.ErrorPlatform="error.platform",e.ErrorCustom="xstate.error",e.Update="xstate.update",e.Pure="xstate.pure",e.Choose="xstate.choose"}(fk||(fk={})),function(e){e.Parent="#_parent",e.Internal="#_internal"}(mk||(mk={}));var wk=fk.Start,Ck=fk.Stop,kk=fk.Raise,Sk=fk.Send,$k=fk.Cancel,jk=fk.NullEvent,Mk=fk.Assign;fk.After,fk.DoneState;var Ek=fk.Log,Tk=fk.Init,Ok=fk.Invoke;fk.ErrorExecution;var Lk,Ak=fk.ErrorPlatform,Rk=fk.ErrorCustom,Nk=fk.Update,Dk=fk.Choose,Ik=fk.Pure,Pk={},zk="xstate.guard",Vk="production"===process.env.NODE_ENV;function Bk(e,t,n){void 0===n&&(n=".");var r=Fk(e,n),o=Fk(t,n);return iS(o)?!!iS(r)&&o===r:iS(r)?r in o:Object.keys(r).every((function(e){return e in o&&Bk(r[e],o[e])}))}function Hk(e){try{return iS(e)||"number"==typeof e?"".concat(e):e.type}catch(e){throw new Error("Events must be strings or objects with a string event.type property.")}}function _k(e,t){try{return rS(e)?e:e.toString().split(t)}catch(t){throw new Error("'".concat(e,"' is not a valid state path."))}}function Fk(e,t){return"object"==typeof(n=e)&&"value"in n&&"context"in n&&"event"in n&&"_event"in n?e.value:rS(e)?qk(e):"string"!=typeof e?e:qk(_k(e,t));var n}function qk(e){if(1===e.length)return e[0];for(var t={},n=t,r=0;r<e.length-1;r++)r===e.length-2?n[e[r]]=e[r+1]:(n[e[r]]={},n=n[e[r]]);return t}function Wk(e,t){for(var n={},r=Object.keys(e),o=0;o<r.length;o++){var i=r[o];n[i]=t(e[i],i,e,o)}return n}function Uk(e,t,n){var r,o,i={};try{for(var s=bk(Object.keys(e)),a=s.next();!a.done;a=s.next()){var l=a.value,c=e[l];n(c)&&(i[l]=t(c,l,e))}}catch(e){r={error:e}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}return i}var Kk=function(e){return function(t){var n,r,o=t;try{for(var i=bk(e),s=i.next();!s.done;s=i.next()){o=o[s.value]}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return o}};function Gk(e){return e?iS(e)?[[e]]:Zk(Object.keys(e).map((function(t){var n=e[t];return"string"==typeof n||n&&Object.keys(n).length?Gk(e[t]).map((function(e){return[t].concat(e)})):[[t]]}))):[[]]}function Zk(e){var t;return(t=[]).concat.apply(t,xk([],yk(e),!1))}function Jk(e){return rS(e)?e:[e]}function Xk(e){return void 0===e?[]:Jk(e)}function Yk(e,t,n){var r,o;if(oS(e))return e(t,n.data);var i={};try{for(var s=bk(Object.keys(e)),a=s.next();!a.done;a=s.next()){var l=a.value,c=e[l];oS(c)?i[l]=c(t,n.data):i[l]=c}}catch(e){r={error:e}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}return i}function Qk(e){return e instanceof Promise||!(null===e||!oS(e)&&"object"!=typeof e||!oS(e.then))}function eS(e,t){return Wk(e.states,(function(e,n){if(e){var r=(iS(t)?void 0:t[n])||(e?e.current:void 0);if(r)return{current:r,states:eS(e,r)}}}))}function tS(e,t,n,r){Vk||nS(!!e,"Attempting to update undefined context");var o=e?n.reduce((function(e,n){var o,i,s=n.assignment,a={state:r,action:n,_event:t},l={};if(oS(s))l=s(e,t.data,a);else try{for(var c=bk(Object.keys(s)),d=c.next();!d.done;d=c.next()){var u=d.value,h=s[u];l[u]=oS(h)?h(e,t.data,a):h}}catch(e){o={error:e}}finally{try{d&&!d.done&&(i=c.return)&&i.call(c)}finally{if(o)throw o.error}}return Object.assign({},e,l)}),e):e;return o}var nS=function(){};function rS(e){return Array.isArray(e)}function oS(e){return"function"==typeof e}function iS(e){return"string"==typeof e}function sS(e,t){if(e)return iS(e)?{type:zk,name:e,predicate:t?t[e]:void 0}:oS(e)?{type:zk,name:e.name,predicate:e}:e}Vk||(nS=function(e,t){var n=e instanceof Error?e:void 0;if((n||!e)&&void 0!==console){var r=["Warning: ".concat(t)];n&&r.push(n),console.warn.apply(console,r)}});var aS=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}();function lS(e){return!!e&&"__xstatenode"in e}function cS(e,t){return iS(e)||"number"==typeof e?gk({type:e},t):e}function dS(e,t){if(!iS(e)&&"$$type"in e&&"scxml"===e.$$type)return e;var n=cS(e);return gk({name:n.type,data:n,$$type:"scxml",type:"external"},t)}function uS(e,t){return Jk(t).map((function(t){return void 0===t||"string"==typeof t||lS(t)?{target:t,event:e}:gk(gk({},t),{event:e})}))}function hS(e,t,n,r,o){var i=e.options.guards,s={state:o,cond:t,_event:r};if(t.type===zk)return((null==i?void 0:i[t.name])||t.predicate)(n,r.data,s);var a=null==i?void 0:i[t.type];if(!a)throw new Error("Guard '".concat(t.type,"' is not implemented on machine '").concat(e.id,"'."));return a(n,r.data,s)}function pS(e){return"string"==typeof e?{type:e}:e}function fS(e,t,n){var r=function(){},o="object"==typeof e,i=o?e:null;return{next:((o?e.next:e)||r).bind(i),error:((o?e.error:t)||r).bind(i),complete:((o?e.complete:n)||r).bind(i)}}function mS(e,t){return"".concat(e,":invocation[").concat(t,"]")}function gS(e){return(e.type===kk||e.type===Sk&&e.to===mk.Internal)&&"number"!=typeof e.delay}(Lk={})[aS]=function(){return this},Lk[Symbol.observable]=function(){return this};var vS=dS({type:Tk});function bS(e,t){return t&&t[e]||void 0}function yS(e,t){var n;if(iS(e)||"number"==typeof e)n=oS(r=bS(e,t))?{type:e,exec:r}:r||{type:e,exec:void 0};else if(oS(e))n={type:e.name||e.toString(),exec:e};else{var r;if(oS(r=bS(e.type,t)))n=gk(gk({},e),{exec:r});else if(r){var o=r.type||e.type;n=gk(gk(gk({},r),e),{type:o})}else n=e}return n}var xS=function(e,t){return e?(rS(e)?e:[e]).map((function(e){return yS(e,t)})):[]};function wS(e){var t=yS(e);return gk(gk({id:iS(e)?e:t.id},t),{type:t.type})}function CS(e,t){var n="".concat(fk.DoneState,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function kS(e,t){var n="".concat(fk.DoneInvoke,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function SS(e,t){var n="".concat(fk.ErrorPlatform,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function $S(e,t,n,r,o,i,s){void 0===s&&(s=!1);var a=s?[]:function(e){var t,n,r=[];try{for(var o=bk(e),i=o.next();!i.done;i=o.next())for(var s=i.value,a=0;a<s.actions.length;)s.actions[a].type!==Mk?a++:(r.push(s.actions[a]),s.actions.splice(a,1))}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}(o),l=a.length?tS(n,r,a,t):n,c=s?[n]:void 0,d=[];function u(o,a){var u;switch(a.type){case kk:var h=function(e,t,n,r){var o,i={_event:n},s=dS(oS(e.event)?e.event(t,n.data,i):e.event);if(iS(e.delay)){var a=r&&r[e.delay];o=oS(a)?a(t,n.data,i):a}else o=oS(e.delay)?e.delay(t,n.data,i):e.delay;return gk(gk({},e),{type:kk,_event:s,delay:o})}(a,l,r,e.options.delays);return i&&"number"==typeof h.delay&&i(h,l,r),h;case Sk:var p=function(e,t,n,r){var o,i={_event:n},s=dS(oS(e.event)?e.event(t,n.data,i):e.event);if(iS(e.delay)){var a=r&&r[e.delay];o=oS(a)?a(t,n.data,i):a}else o=oS(e.delay)?e.delay(t,n.data,i):e.delay;var l=oS(e.to)?e.to(t,n.data,i):e.to;return gk(gk({},e),{to:l,_event:s,event:s.data,delay:o})}(a,l,r,e.options.delays);if(!Vk){var f=a.delay;nS(!iS(f)||"number"==typeof p.delay,"No delay reference for delay expression '".concat(f,"' was found on machine '").concat(e.id,"'"))}return i&&p.to!==mk.Internal&&("entry"===o?d.push(p):i(p,l,r)),p;case Ek:var m=function(e,t,n){return gk(gk({},e),{value:iS(e.expr)?e.expr:e.expr(t,n.data,{_event:n})})}(a,l,r);return null==i||i(m,l,r),m;case Dk:if(!(y=null===(u=a.conds.find((function(n){var o=sS(n.cond,e.options.guards);return!o||hS(e,o,l,r,i?void 0:t)})))||void 0===u?void 0:u.actions))return[];var g=yk($S(e,t,l,r,[{type:o,actions:xS(Xk(y),e.options.actions)}],i,s),2),v=g[0],b=g[1];return l=b,null==c||c.push(l),v;case Ik:var y;if(!(y=a.get(l,r.data)))return[];var x=yk($S(e,t,l,r,[{type:o,actions:xS(Xk(y),e.options.actions)}],i,s),2),w=x[0],C=x[1];return l=C,null==c||c.push(l),w;case Ck:m=function(e,t,n){var r=oS(e.activity)?e.activity(t,n.data):e.activity,o="string"==typeof r?{id:r}:r;return{type:fk.Stop,activity:o}}(a,l,r);return null==i||i(m,n,r),m;case Mk:l=tS(l,r,[a],i?void 0:t),null==c||c.push(l);break;default:var k=yS(a,e.options.actions),S=k.exec;if(i)i(k,l,r);else if(S&&c){var $=c.length-1,j=gk(gk({},k),{exec:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];S.apply(void 0,xk([c[$]],yk(t),!1))}});k=j}return k}}var h=Zk(o.map((function(e){var t,n,o=[];try{for(var s=bk(e.actions),a=s.next();!a.done;a=s.next()){var c=a.value,h=u(e.type,c);h&&(o=o.concat(h))}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return d.forEach((function(e){i(e,l,r)})),d.length=0,o})));return[h,l]}var jS=function(e,t){return t(e)};function MS(e){var t;return(t={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:e}}})[aS]=function(){return this},t}function ES(e,t,n){var r=MS(t);if(r.deferred=!0,lS(e)){var o=r.state=jS(void 0,(function(){return(n?e.withContext(n):e).initialState}));r.getSnapshot=function(){return o}}return r}var TS=function(e){return"atomic"===e.type||"final"===e.type};function OS(e){return Object.keys(e.states).map((function(t){return e.states[t]}))}function LS(e){return OS(e).filter((function(e){return"history"!==e.type}))}function AS(e){var t=[e];return TS(e)?t:t.concat(Zk(LS(e).map(AS)))}function RS(e,t){var n,r,o,i,s,a,l,c,d=DS(new Set(e)),u=new Set(t);try{for(var h=bk(u),p=h.next();!p.done;p=h.next())for(var f=(k=p.value).parent;f&&!u.has(f);)u.add(f),f=f.parent}catch(e){n={error:e}}finally{try{p&&!p.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}var m=DS(u);try{for(var g=bk(u),v=g.next();!v.done;v=g.next()){if("compound"!==(k=v.value).type||m.get(k)&&m.get(k).length){if("parallel"===k.type)try{for(var b=(s=void 0,bk(LS(k))),y=b.next();!y.done;y=b.next()){var x=y.value;u.has(x)||(u.add(x),d.get(x)?d.get(x).forEach((function(e){return u.add(e)})):x.initialStateNodes.forEach((function(e){return u.add(e)})))}}catch(e){s={error:e}}finally{try{y&&!y.done&&(a=b.return)&&a.call(b)}finally{if(s)throw s.error}}}else d.get(k)?d.get(k).forEach((function(e){return u.add(e)})):k.initialStateNodes.forEach((function(e){return u.add(e)}))}}catch(e){o={error:e}}finally{try{v&&!v.done&&(i=g.return)&&i.call(g)}finally{if(o)throw o.error}}try{for(var w=bk(u),C=w.next();!C.done;C=w.next()){var k;for(f=(k=C.value).parent;f&&!u.has(f);)u.add(f),f=f.parent}}catch(e){l={error:e}}finally{try{C&&!C.done&&(c=w.return)&&c.call(w)}finally{if(l)throw l.error}}return u}function NS(e,t){var n=t.get(e);if(!n)return{};if("compound"===e.type){var r=n[0];if(!r)return{};if(TS(r))return r.key}var o={};return n.forEach((function(e){o[e.key]=NS(e,t)})),o}function DS(e){var t,n,r=new Map;try{for(var o=bk(e),i=o.next();!i.done;i=o.next()){var s=i.value;r.has(s)||r.set(s,[]),s.parent&&(r.has(s.parent)||r.set(s.parent,[]),r.get(s.parent).push(s))}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}function IS(e,t){return NS(e,DS(RS([e],t)))}function PS(e,t){return Array.isArray(e)?e.some((function(e){return e===t})):e instanceof Set&&e.has(t)}function zS(e,t){return"compound"===t.type?LS(t).some((function(t){return"final"===t.type&&PS(e,t)})):"parallel"===t.type&&LS(t).every((function(t){return zS(e,t)}))}function VS(e){return new Set(Zk(e.map((function(e){return e.tags}))))}function BS(e,t){if(e===t)return!0;if(void 0===e||void 0===t)return!1;if(iS(e)||iS(t))return e===t;var n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every((function(n){return BS(e[n],t[n])}))}var HS=function(){function e(e){var t,n,r=this;this.actions=[],this.activities=Pk,this.meta={},this.events=[],this.value=e.value,this.context=e.context,this._event=e._event,this._sessionid=e._sessionid,this.event=this._event.data,this.historyValue=e.historyValue,this.history=e.history,this.actions=e.actions||[],this.activities=e.activities||Pk,this.meta=(void 0===(n=e.configuration)&&(n=[]),n.reduce((function(e,t){return void 0!==t.meta&&(e[t.id]=t.meta),e}),{})),this.events=e.events||[],this.matches=this.matches.bind(this),this.toStrings=this.toStrings.bind(this),this.configuration=e.configuration,this.transitions=e.transitions,this.children=e.children,this.done=!!e.done,this.tags=null!==(t=Array.isArray(e.tags)?new Set(e.tags):e.tags)&&void 0!==t?t:new Set,this.machine=e.machine,Object.defineProperty(this,"nextEvents",{get:function(){return function(e){return xk([],yk(new Set(Zk(xk([],yk(e.map((function(e){return e.ownEvents}))),!1)))),!1)}(r.configuration)}})}return e.from=function(t,n){return t instanceof e?t.context!==n?new e({value:t.value,context:n,_event:t._event,_sessionid:null,historyValue:t.historyValue,history:t.history,actions:[],activities:t.activities,events:[],configuration:[],transitions:[],children:{}}):t:new e({value:t,context:n,_event:vS,_sessionid:null,historyValue:void 0,history:void 0,actions:[],activities:void 0,events:[],configuration:[],transitions:[],children:{}})},e.create=function(t){return new e(t)},e.inert=function(t,n){if(t instanceof e){if(!t.actions.length)return t;var r=vS;return new e({value:t.value,context:n,_event:r,_sessionid:null,historyValue:t.historyValue,history:t.history,activities:t.activities,configuration:t.configuration,transitions:[],children:{}})}return e.from(t,n)},e.prototype.toStrings=function(e,t){var n=this;if(void 0===e&&(e=this.value),void 0===t&&(t="."),iS(e))return[e];var r=Object.keys(e);return r.concat.apply(r,xk([],yk(r.map((function(r){return n.toStrings(e[r],t).map((function(e){return r+t+e}))}))),!1))},e.prototype.toJSON=function(){var e=this;e.configuration,e.transitions;var t=e.tags;e.machine;var n=vk(e,["configuration","transitions","tags","machine"]);return gk(gk({},n),{tags:Array.from(t)})},e.prototype.matches=function(e){return Bk(e,this.value)},e.prototype.hasTag=function(e){return this.tags.has(e)},e.prototype.can=function(e){var t;Vk&&nS(!!this.machine,"state.can(...) used outside of a machine-created State object; this will always return false.");var n=null===(t=this.machine)||void 0===t?void 0:t.getTransitionData(this,e);return!!(null==n?void 0:n.transitions.length)&&n.transitions.some((function(e){return void 0!==e.target||e.actions.length}))},e}(),_S={deferEvents:!1},FS=function(){function e(e){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=gk(gk({},_S),e)}return e.prototype.initialize=function(e){if(this.initialized=!0,e){if(!this.options.deferEvents)return void this.schedule(e);this.process(e)}this.flushEvents()},e.prototype.schedule=function(e){if(this.initialized&&!this.processingEvent){if(0!==this.queue.length)throw new Error("Event queue should be empty when it is not processing events");this.process(e),this.flushEvents()}else this.queue.push(e)},e.prototype.clear=function(){this.queue=[]},e.prototype.flushEvents=function(){for(var e=this.queue.shift();e;)this.process(e),e=this.queue.shift()},e.prototype.process=function(e){this.processingEvent=!0;try{e()}catch(e){throw this.clear(),e}finally{this.processingEvent=!1}},e}(),qS=new Map,WS=0,US=function(){return"x:".concat(WS++)},KS=function(e,t){return qS.set(e,t),e},GS=function(e){return qS.get(e)},ZS=function(e){qS.delete(e)};function JS(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void(Vk||console.warn("XState could not find a global object in this environment. Please let the maintainers know and raise an issue here: https://github.com/statelyai/xstate/issues"))}function XS(e){if(JS()){var t=function(){var e=JS();if(e&&"__xstate__"in e)return e.__xstate__}();t&&t.register(e)}}function YS(e,t){void 0===t&&(t={});var n=e.initialState,r=new Set,o=[],i=!1,s=function(e){var t;return gk(((t={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}})[aS]=function(){return this},t),e)}({id:t.id,send:function(t){o.push(t),function(){if(!i){for(i=!0;o.length>0;){var t=o.shift();n=e.transition(n,t,a),r.forEach((function(e){return e.next(n)}))}i=!1}}()},getSnapshot:function(){return n},subscribe:function(e,t,o){var i=fS(e,t,o);return r.add(i),i.next(n),{unsubscribe:function(){r.delete(i)}}}}),a={parent:t.parent,self:s,id:t.id||"anonymous",observers:r};return n=e.start?e.start(a):n,s}var QS,e$={sync:!1,autoForward:!1};!function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(QS||(QS={}));var t$=function(){function e(t,n){void 0===n&&(n=e.defaultOptions);var r=this;this.machine=t,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=QS.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(e,t){if(rS(e))return r.batch(e),r.state;var n=dS(cS(e,t));if(r.status===QS.Stopped)return Vk||nS(!1,'Event "'.concat(n.name,'" was sent to stopped service "').concat(r.machine.id,'". This service has already reached its final state, and will not transition.\nEvent: ').concat(JSON.stringify(n.data))),r.state;if(r.status!==QS.Running&&!r.options.deferEvents)throw new Error('Event "'.concat(n.name,'" was sent to uninitialized service "').concat(r.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.\nEvent: ').concat(JSON.stringify(n.data)));return r.scheduler.schedule((function(){r.forward(n);var e=r._nextState(n);r.update(e,n)})),r._state},this.sendTo=function(e,t,n){var o,i=r.parent&&(t===mk.Parent||r.parent.id===t),s=i?r.parent:iS(t)?t===mk.Internal?r:r.children.get(t)||GS(t):(o=t)&&"function"==typeof o.send?t:void 0;if(s)if("machine"in s){if(r.status!==QS.Stopped||r.parent!==s||r.state.done){var a=gk(gk({},e),{name:e.name===Rk?"".concat(SS(r.id)):e.name,origin:r.sessionId});!n&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([s,a]):s.send(a)}}else!n&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([s,e.data]):s.send(e.data);else{if(!i)throw new Error("Unable to send event to child '".concat(t,"' from service '").concat(r.id,"'."));Vk||nS(!1,"Service '".concat(r.id,"' has no parent: unable to send event ").concat(e.type))}},this._exec=function(e,t,n,o){void 0===o&&(o=r.machine.options.actions);var i=e.exec||bS(e.type,o),s=oS(i)?i:i?i.exec:e.exec;if(s)try{return s(t,n.data,r.machine.config.predictableActionArguments?{action:e,_event:n}:{action:e,state:r.state,_event:n})}catch(e){throw r.parent&&r.parent.send({type:"xstate.error",data:e}),e}switch(e.type){case kk:var a=e;r.defer(a);break;case Sk:var l=e;if("number"==typeof l.delay)return void r.defer(l);l.to?r.sendTo(l._event,l.to,n===vS):r.send(l._event);break;case $k:r.cancel(e.sendId);break;case wk:if(r.status!==QS.Running)return;var c=e.activity;if(!r.machine.config.predictableActionArguments&&!r.state.activities[c.id||c.type])break;if(c.type===fk.Invoke){var d=pS(c.src),u=r.machine.options.services?r.machine.options.services[d.type]:void 0,h=c.id,p=c.data;Vk||nS(!("forward"in c),"`forward` property is deprecated (found in invocation of '".concat(c.src,"' in in machine '").concat(r.machine.id,"'). ")+"Please use `autoForward` instead.");var f="autoForward"in c?c.autoForward:!!c.forward;if(!u)return void(Vk||nS(!1,"No service found for invocation '".concat(c.src,"' in machine '").concat(r.machine.id,"'.")));var m=p?Yk(p,t,n):void 0;if("string"==typeof u)return;var g=oS(u)?u(t,n.data,{data:m,src:d,meta:c.meta}):u;if(!g)return;var v=void 0;lS(g)&&(g=m?g.withContext(m):g,v={autoForward:f}),r.spawn(g,h,v)}else r.spawnActivity(c);break;case Ck:r.stopChild(e.activity.id);break;case Ek:var b=e,y=b.label,x=b.value;y?r.logger(y,x):r.logger(x);break;default:Vk||nS(!1,"No implementation found for action type '".concat(e.type,"'"))}};var o=gk(gk({},e.defaultOptions),n),i=o.clock,s=o.logger,a=o.parent,l=o.id,c=void 0!==l?l:t.id;this.id=c,this.logger=s,this.clock=i,this.parent=a,this.options=o,this.scheduler=new FS({deferEvents:this.options.deferEvents}),this.sessionId=US()}return Object.defineProperty(e.prototype,"initialState",{get:function(){var e=this;return this._initialState?this._initialState:jS(this,(function(){return e._initialState=e.machine.initialState,e._initialState}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return Vk||nS(this.status!==QS.NotStarted,"Attempted to read state from uninitialized service '".concat(this.id,"'. Make sure the service is started first.")),this._state},enumerable:!1,configurable:!0}),e.prototype.execute=function(e,t){var n,r;try{for(var o=bk(e.actions),i=o.next();!i.done;i=o.next()){var s=i.value;this.exec(s,e,t)}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},e.prototype.update=function(e,t){var n,r,o,i,s,a,l,c,d=this;if(e._sessionid=this.sessionId,this._state=e,this.machine.config.predictableActionArguments&&t!==vS||!this.options.execute)for(var u=void 0;u=this._outgoingQueue.shift();)u[0].send(u[1]);else this.execute(this.state);if(this.children.forEach((function(e){d.state.children[e.id]=e})),this.devTools&&this.devTools.send(t.data,e),e.event)try{for(var h=bk(this.eventListeners),p=h.next();!p.done;p=h.next()){(0,p.value)(e.event)}}catch(e){n={error:e}}finally{try{p&&!p.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}try{for(var f=bk(this.listeners),m=f.next();!m.done;m=f.next()){(0,m.value)(e,e.event)}}catch(e){o={error:e}}finally{try{m&&!m.done&&(i=f.return)&&i.call(f)}finally{if(o)throw o.error}}try{for(var g=bk(this.contextListeners),v=g.next();!v.done;v=g.next()){(0,v.value)(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(e){s={error:e}}finally{try{v&&!v.done&&(a=g.return)&&a.call(g)}finally{if(s)throw s.error}}if(this.state.done){var b=e.configuration.find((function(e){return"final"===e.type&&e.parent===d.machine})),y=b&&b.doneData?Yk(b.doneData,e.context,t):void 0;this._doneEvent=kS(this.id,y);try{for(var x=bk(this.doneListeners),w=x.next();!w.done;w=x.next()){(0,w.value)(this._doneEvent)}}catch(e){l={error:e}}finally{try{w&&!w.done&&(c=x.return)&&c.call(x)}finally{if(l)throw l.error}}this._stop(),this._stopChildren(),ZS(this.sessionId)}},e.prototype.onTransition=function(e){return this.listeners.add(e),this.status===QS.Running&&e(this.state,this.state.event),this},e.prototype.subscribe=function(e,t,n){var r=this,o=fS(e,t,n);this.listeners.add(o.next),this.status!==QS.NotStarted&&o.next(this.state);var i=function(){r.doneListeners.delete(i),r.stopListeners.delete(i),o.complete()};return this.status===QS.Stopped?o.complete():(this.onDone(i),this.onStop(i)),{unsubscribe:function(){r.listeners.delete(o.next),r.doneListeners.delete(i),r.stopListeners.delete(i)}}},e.prototype.onEvent=function(e){return this.eventListeners.add(e),this},e.prototype.onSend=function(e){return this.sendListeners.add(e),this},e.prototype.onChange=function(e){return this.contextListeners.add(e),this},e.prototype.onStop=function(e){return this.stopListeners.add(e),this},e.prototype.onDone=function(e){return this.status===QS.Stopped&&this._doneEvent?e(this._doneEvent):this.doneListeners.add(e),this},e.prototype.off=function(e){return this.listeners.delete(e),this.eventListeners.delete(e),this.sendListeners.delete(e),this.stopListeners.delete(e),this.doneListeners.delete(e),this.contextListeners.delete(e),this},e.prototype.start=function(e){var t=this;if(this.status===QS.Running)return this;this.machine._init(),KS(this.sessionId,this),this.initialized=!0,this.status=QS.Running;var n=void 0===e?this.initialState:jS(this,(function(){return"object"==typeof(n=e)&&null!==n&&"value"in n&&"_event"in n?t.machine.resolveState(e):t.machine.resolveState(HS.from(e,t.machine.context));var n}));return this.options.devTools&&this.attachDev(),this.scheduler.initialize((function(){t.update(n,vS)})),this},e.prototype._stopChildren=function(){this.children.forEach((function(e){oS(e.stop)&&e.stop()})),this.children.clear()},e.prototype._stop=function(){var e,t,n,r,o,i,s,a,l,c;try{for(var d=bk(this.listeners),u=d.next();!u.done;u=d.next()){var h=u.value;this.listeners.delete(h)}}catch(t){e={error:t}}finally{try{u&&!u.done&&(t=d.return)&&t.call(d)}finally{if(e)throw e.error}}try{for(var p=bk(this.stopListeners),f=p.next();!f.done;f=p.next()){(h=f.value)(),this.stopListeners.delete(h)}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=p.return)&&r.call(p)}finally{if(n)throw n.error}}try{for(var m=bk(this.contextListeners),g=m.next();!g.done;g=m.next()){h=g.value;this.contextListeners.delete(h)}}catch(e){o={error:e}}finally{try{g&&!g.done&&(i=m.return)&&i.call(m)}finally{if(o)throw o.error}}try{for(var v=bk(this.doneListeners),b=v.next();!b.done;b=v.next()){h=b.value;this.doneListeners.delete(h)}}catch(e){s={error:e}}finally{try{b&&!b.done&&(a=v.return)&&a.call(v)}finally{if(s)throw s.error}}if(!this.initialized)return this;this.initialized=!1,this.status=QS.Stopped,this._initialState=void 0;try{for(var y=bk(Object.keys(this.delayedEventsMap)),x=y.next();!x.done;x=y.next()){var w=x.value;this.clock.clearTimeout(this.delayedEventsMap[w])}}catch(e){l={error:e}}finally{try{x&&!x.done&&(c=y.return)&&c.call(y)}finally{if(l)throw l.error}}this.scheduler.clear(),this.scheduler=new FS({deferEvents:this.options.deferEvents})},e.prototype.stop=function(){var e=this,t=this.scheduler;return this._stop(),t.schedule((function(){var t;if(!(null===(t=e._state)||void 0===t?void 0:t.done)){var n=dS({type:"xstate.stop"}),r=jS(e,(function(){var t=Zk(xk([],yk(e.state.configuration),!1).sort((function(e,t){return t.order-e.order})).map((function(t){return xS(t.onExit,e.machine.options.actions)}))),r=yk($S(e.machine,e.state,e.state.context,n,[{type:"exit",actions:t}],e.machine.config.predictableActionArguments?e._exec:void 0,e.machine.config.predictableActionArguments||e.machine.config.preserveActionOrder),2),o=r[0],i=r[1],s=new HS({value:e.state.value,context:i,_event:n,_sessionid:e.sessionId,historyValue:void 0,history:e.state,actions:o.filter((function(e){return!gS(e)})),activities:{},events:[],configuration:[],transitions:[],children:{},done:e.state.done,tags:e.state.tags,machine:e.machine});return s.changed=!0,s}));e.update(r,n),e._stopChildren(),ZS(e.sessionId)}})),this},e.prototype.batch=function(e){var t=this;if(this.status===QS.NotStarted&&this.options.deferEvents)Vk||nS(!1,"".concat(e.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'" and are deferred. Make sure .start() is called for this service.\nEvent: ').concat(JSON.stringify(event)));else if(this.status!==QS.Running)throw new Error("".concat(e.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.'));if(e.length){var n=!!this.machine.config.predictableActionArguments&&this._exec;this.scheduler.schedule((function(){var r,o,i=t.state,s=!1,a=[],l=function(e){var r=dS(e);t.forward(r),i=jS(t,(function(){return t.machine.transition(i,r,void 0,n||void 0)})),a.push.apply(a,xk([],yk(t.machine.config.predictableActionArguments?i.actions:i.actions.map((function(e){return function(e,t){var n=e.exec;return gk(gk({},e),{exec:void 0!==n?function(){return n(t.context,t.event,{action:e,state:t,_event:t._event})}:void 0})}(e,i)}))),!1)),s=s||!!i.changed};try{for(var c=bk(e),d=c.next();!d.done;d=c.next()){l(d.value)}}catch(e){r={error:e}}finally{try{d&&!d.done&&(o=c.return)&&o.call(c)}finally{if(r)throw r.error}}i.changed=s,i.actions=a,t.update(i,dS(e[e.length-1]))}))}},e.prototype.sender=function(e){return this.send.bind(this,e)},e.prototype._nextState=function(e,t){var n=this;void 0===t&&(t=!!this.machine.config.predictableActionArguments&&this._exec);var r=dS(e);if(0===r.name.indexOf(Ak)&&!this.state.nextEvents.some((function(e){return 0===e.indexOf(Ak)})))throw r.data.data;return jS(this,(function(){return n.machine.transition(n.state,r,void 0,t||void 0)}))},e.prototype.nextState=function(e){return this._nextState(e,!1)},e.prototype.forward=function(e){var t,n;try{for(var r=bk(this.forwardTo),o=r.next();!o.done;o=r.next()){var i=o.value,s=this.children.get(i);if(!s)throw new Error("Unable to forward event '".concat(e,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(i,"'."));s.send(e)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},e.prototype.defer=function(e){var t=this,n=this.clock.setTimeout((function(){"to"in e&&e.to?t.sendTo(e._event,e.to,!0):t.send(e._event)}),e.delay);e.id&&(this.delayedEventsMap[e.id]=n)},e.prototype.cancel=function(e){this.clock.clearTimeout(this.delayedEventsMap[e]),delete this.delayedEventsMap[e]},e.prototype.exec=function(e,t,n){void 0===n&&(n=this.machine.options.actions),this._exec(e,t.context,t._event,n)},e.prototype.removeChild=function(e){var t;this.children.delete(e),this.forwardTo.delete(e),null===(t=this.state)||void 0===t||delete t.children[e]},e.prototype.stopChild=function(e){var t=this.children.get(e);t&&(this.removeChild(e),oS(t.stop)&&t.stop())},e.prototype.spawn=function(e,t,n){if(this.status!==QS.Running)return ES(e,t);if(Qk(e))return this.spawnPromise(Promise.resolve(e),t);if(oS(e))return this.spawnCallback(e,t);if(function(e){try{return"function"==typeof e.send}catch(e){return!1}}(o=e)&&"id"in o)return this.spawnActor(e,t);if(function(e){try{return"subscribe"in e&&oS(e.subscribe)}catch(e){return!1}}(e))return this.spawnObservable(e,t);if(lS(e))return this.spawnMachine(e,gk(gk({},n),{id:t}));if(null!==(r=e)&&"object"==typeof r&&"transition"in r&&"function"==typeof r.transition)return this.spawnBehavior(e,t);throw new Error('Unable to spawn entity "'.concat(t,'" of type "').concat(typeof e,'".'));var r,o},e.prototype.spawnMachine=function(t,n){var r=this;void 0===n&&(n={});var o=new e(t,gk(gk({},this.options),{parent:this,id:n.id||t.id})),i=gk(gk({},e$),n);i.sync&&o.onTransition((function(e){r.send(Nk,{state:e,id:o.id})}));var s=o;return this.children.set(o.id,s),i.autoForward&&this.forwardTo.add(o.id),o.onDone((function(e){r.removeChild(o.id),r.send(dS(e,{origin:o.id}))})).start(),s},e.prototype.spawnBehavior=function(e,t){var n=YS(e,{id:t,parent:this});return this.children.set(t,n),n},e.prototype.spawnPromise=function(e,t){var n,r,o=this,i=!1;e.then((function(e){i||(r=e,o.removeChild(t),o.send(dS(kS(t,e),{origin:t})))}),(function(e){if(!i){o.removeChild(t);var n=SS(t,e);try{o.send(dS(n,{origin:t}))}catch(r){!function(e,t,n){if(!Vk){var r=e.stack?" Stacktrace was '".concat(e.stack,"'"):"";if(e===t)console.error("Missing onError handler for invocation '".concat(n,"', error was '").concat(e,"'.").concat(r));else{var o=t.stack?" Stacktrace was '".concat(t.stack,"'"):"";console.error("Missing onError handler and/or unhandled exception/promise rejection for invocation '".concat(n,"'. ")+"Original error: '".concat(e,"'. ").concat(r," Current error is '").concat(t,"'.").concat(o))}}}(e,r,t),o.devTools&&o.devTools.send(n,o.state),o.machine.strict&&o.stop()}}}));var s=((n={id:t,send:function(){},subscribe:function(t,n,r){var o=fS(t,n,r),i=!1;return e.then((function(e){i||(o.next(e),i||o.complete())}),(function(e){i||o.error(e)})),{unsubscribe:function(){return i=!0}}},stop:function(){i=!0},toJSON:function(){return{id:t}},getSnapshot:function(){return r}})[aS]=function(){return this},n);return this.children.set(t,s),s},e.prototype.spawnCallback=function(e,t){var n,r,o,i=this,s=!1,a=new Set,l=new Set;try{o=e((function(e){r=e,l.forEach((function(t){return t(e)})),s||i.send(dS(e,{origin:t}))}),(function(e){a.add(e)}))}catch(e){this.send(SS(t,e))}if(Qk(o))return this.spawnPromise(o,t);var c=((n={id:t,send:function(e){return a.forEach((function(t){return t(e)}))},subscribe:function(e){var t=fS(e);return l.add(t.next),{unsubscribe:function(){l.delete(t.next)}}},stop:function(){s=!0,oS(o)&&o()},toJSON:function(){return{id:t}},getSnapshot:function(){return r}})[aS]=function(){return this},n);return this.children.set(t,c),c},e.prototype.spawnObservable=function(e,t){var n,r,o=this,i=e.subscribe((function(e){r=e,o.send(dS(e,{origin:t}))}),(function(e){o.removeChild(t),o.send(dS(SS(t,e),{origin:t}))}),(function(){o.removeChild(t),o.send(dS(kS(t),{origin:t}))})),s=((n={id:t,send:function(){},subscribe:function(t,n,r){return e.subscribe(t,n,r)},stop:function(){return i.unsubscribe()},getSnapshot:function(){return r},toJSON:function(){return{id:t}}})[aS]=function(){return this},n);return this.children.set(t,s),s},e.prototype.spawnActor=function(e,t){return this.children.set(t,e),e},e.prototype.spawnActivity=function(e){var t=this.machine.options&&this.machine.options.activities?this.machine.options.activities[e.type]:void 0;if(t){var n=t(this.state.context,e);this.spawnEffect(e.id,n)}else Vk||nS(!1,"No implementation found for activity '".concat(e.type,"'"))},e.prototype.spawnEffect=function(e,t){var n;this.children.set(e,((n={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:t||void 0,getSnapshot:function(){},toJSON:function(){return{id:e}}})[aS]=function(){return this},n))},e.prototype.attachDev=function(){var e=JS();if(this.options.devTools&&e){if(e.__REDUX_DEVTOOLS_EXTENSION__){var t="object"==typeof this.options.devTools?this.options.devTools:void 0;this.devTools=e.__REDUX_DEVTOOLS_EXTENSION__.connect(gk(gk({name:this.id,autoPause:!0,stateSanitizer:function(e){return{value:e.value,context:e.context,actions:e.actions}}},t),{features:gk({jump:!1,skip:!1},t?t.features:void 0)}),this.machine),this.devTools.init(this.state)}XS(this)}},e.prototype.toJSON=function(){return{id:this.id}},e.prototype[aS]=function(){return this},e.prototype.getSnapshot=function(){return this.status===QS.NotStarted?this.initialState:this._state},e.defaultOptions={execute:!0,deferEvents:!0,clock:{setTimeout:function(e,t){return setTimeout(e,t)},clearTimeout:function(e){return clearTimeout(e)}},logger:console.log.bind(console),devTools:!1},e.interpret=n$,e}();function n$(e,t){return new t$(e,t)}function r$(e){if("string"==typeof e){var t={type:e,toString:function(){return e}};return t}return e}function o$(e){return gk(gk({type:Ok},e),{toJSON:function(){e.onDone,e.onError;var t=vk(e,["onDone","onError"]);return gk(gk({},t),{type:Ok,src:r$(e.src)})}})}var i$="",s$="*",a$={},l$=function(e){return"#"===e[0]},c$=function(){function e(t,n,r,o){void 0===r&&(r="context"in t?t.context:void 0);var i,s=this;this.config=t,this._context=r,this.order=-1,this.__xstatenode=!0,this.__cache={events:void 0,relativeValue:new Map,initialStateValue:void 0,initialState:void 0,on:void 0,transitions:void 0,candidates:{},delayedTransitions:void 0},this.idMap={},this.tags=[],this.options=Object.assign({actions:{},guards:{},services:{},activities:{},delays:{}},n),this.parent=null==o?void 0:o.parent,this.key=this.config.key||(null==o?void 0:o.key)||this.config.id||"(machine)",this.machine=this.parent?this.parent.machine:this,this.path=this.parent?this.parent.path.concat(this.key):[],this.delimiter=this.config.delimiter||(this.parent?this.parent.delimiter:"."),this.id=this.config.id||xk([this.machine.key],yk(this.path),!1).join(this.delimiter),this.version=this.parent?this.parent.version:this.config.version,this.type=this.config.type||(this.config.parallel?"parallel":this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.schema=this.parent?this.machine.schema:null!==(i=this.config.schema)&&void 0!==i?i:{},this.description=this.config.description,Vk||nS(!("parallel"in this.config),'The "parallel" property is deprecated and will be removed in version 4.1. '.concat(this.config.parallel?"Replace with `type: 'parallel'`":"Use `type: '".concat(this.type,"'`")," in the config for state node '").concat(this.id,"' instead.")),this.initial=this.config.initial,this.states=this.config.states?Wk(this.config.states,(function(t,n){var r,o=new e(t,{},void 0,{parent:s,key:n});return Object.assign(s.idMap,gk(((r={})[o.id]=o,r),o.idMap)),o})):a$;var a=0;!function e(t){var n,r;t.order=a++;try{for(var o=bk(OS(t)),i=o.next();!i.done;i=o.next()){e(i.value)}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}(this),this.history=!0===this.config.history?"shallow":this.config.history||!1,this._transient=!!this.config.always||!!this.config.on&&(Array.isArray(this.config.on)?this.config.on.some((function(e){return e.event===i$})):i$ in this.config.on),this.strict=!!this.config.strict,this.onEntry=Xk(this.config.entry||this.config.onEntry).map((function(e){return yS(e)})),this.onExit=Xk(this.config.exit||this.config.onExit).map((function(e){return yS(e)})),this.meta=this.config.meta,this.doneData="final"===this.type?this.config.data:void 0,this.invoke=Xk(this.config.invoke).map((function(e,t){var n,r;if(lS(e)){var o=mS(s.id,t);return s.machine.options.services=gk(((n={})[o]=e,n),s.machine.options.services),o$({src:o,id:o})}if(iS(e.src)){o=e.id||mS(s.id,t);return o$(gk(gk({},e),{id:o,src:e.src}))}if(lS(e.src)||oS(e.src)){o=e.id||mS(s.id,t);return s.machine.options.services=gk(((r={})[o]=e.src,r),s.machine.options.services),o$(gk(gk({id:o},e),{src:o}))}var i=e.src;return o$(gk(gk({id:mS(s.id,t)},e),{src:i}))})),this.activities=Xk(this.config.activities).concat(this.invoke).map((function(e){return wS(e)})),this.transition=this.transition.bind(this),this.tags=Xk(this.config.tags)}return e.prototype._init=function(){this.__cache.transitions||AS(this).forEach((function(e){return e.on}))},e.prototype.withConfig=function(t,n){var r=this.options,o=r.actions,i=r.activities,s=r.guards,a=r.services,l=r.delays;return new e(this.config,{actions:gk(gk({},o),t.actions),activities:gk(gk({},i),t.activities),guards:gk(gk({},s),t.guards),services:gk(gk({},a),t.services),delays:gk(gk({},l),t.delays)},null!=n?n:this.context)},e.prototype.withContext=function(t){return new e(this.config,this.options,t)},Object.defineProperty(e.prototype,"context",{get:function(){return oS(this._context)?this._context():this._context},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"definition",{get:function(){return{id:this.id,key:this.key,version:this.version,context:this.context,type:this.type,initial:this.initial,history:this.history,states:Wk(this.states,(function(e){return e.definition})),on:this.on,transitions:this.transitions,entry:this.onEntry,exit:this.onExit,activities:this.activities||[],meta:this.meta,order:this.order||-1,data:this.doneData,invoke:this.invoke,description:this.description,tags:this.tags}},enumerable:!1,configurable:!0}),e.prototype.toJSON=function(){return this.definition},Object.defineProperty(e.prototype,"on",{get:function(){if(this.__cache.on)return this.__cache.on;var e=this.transitions;return this.__cache.on=e.reduce((function(e,t){return e[t.eventType]=e[t.eventType]||[],e[t.eventType].push(t),e}),{})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:!1,configurable:!0}),e.prototype.getCandidates=function(e){if(this.__cache.candidates[e])return this.__cache.candidates[e];var t=e===i$,n=this.transitions.filter((function(n){var r=n.eventType===e;return t?r:r||n.eventType===s$}));return this.__cache.candidates[e]=n,n},e.prototype.getDelayedTransitions=function(){var e=this,t=this.config.after;if(!t)return[];var n=function(t,n){var r=function(e,t){var n=t?"#".concat(t):"";return"".concat(fk.After,"(").concat(e,")").concat(n)}(oS(t)?"".concat(e.id,":delay[").concat(n,"]"):t,e.id);return e.onEntry.push(function(e,t){return{to:t?t.to:void 0,type:Sk,event:oS(e)?e:cS(e),delay:t?t.delay:void 0,id:t&&void 0!==t.id?t.id:oS(e)?e.name:Hk(e)}}(r,{delay:t})),e.onExit.push({type:$k,sendId:r}),r},r=rS(t)?t.map((function(e,t){var r=n(e.delay,t);return gk(gk({},e),{event:r})})):Zk(Object.keys(t).map((function(e,r){var o=t[e],i=iS(o)?{target:o}:o,s=isNaN(+e)?e:+e,a=n(s,r);return Xk(i).map((function(e){return gk(gk({},e),{event:a,delay:s})}))})));return r.map((function(t){var n=t.delay;return gk(gk({},e.formatTransition(t)),{delay:n})}))},e.prototype.getStateNodes=function(e){var t,n=this;if(!e)return[];var r=e instanceof HS?e.value:Fk(e,this.delimiter);if(iS(r)){var o=this.getStateNode(r).initial;return void 0!==o?this.getStateNodes(((t={})[r]=o,t)):[this,this.states[r]]}var i=Object.keys(r),s=[this];return s.push.apply(s,xk([],yk(Zk(i.map((function(e){return n.getStateNode(e).getStateNodes(r[e])})))),!1)),s},e.prototype.handles=function(e){var t=Hk(e);return this.events.includes(t)},e.prototype.resolveState=function(e){var t=e instanceof HS?e:HS.create(e),n=Array.from(RS([],this.getStateNodes(t.value)));return new HS(gk(gk({},t),{value:this.resolve(t.value),configuration:n,done:zS(n,this),tags:VS(n),machine:this.machine}))},e.prototype.transitionLeafNode=function(e,t,n){var r=this.getStateNode(e).next(t,n);return r&&r.transitions.length?r:this.next(t,n)},e.prototype.transitionCompoundNode=function(e,t,n){var r=Object.keys(e),o=this.getStateNode(r[0])._transition(e[r[0]],t,n);return o&&o.transitions.length?o:this.next(t,n)},e.prototype.transitionParallelNode=function(e,t,n){var r,o,i={};try{for(var s=bk(Object.keys(e)),a=s.next();!a.done;a=s.next()){var l=a.value,c=e[l];if(c){var d=this.getStateNode(l)._transition(c,t,n);d&&(i[l]=d)}}}catch(e){r={error:e}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}var u=Object.keys(i).map((function(e){return i[e]})),h=Zk(u.map((function(e){return e.transitions})));if(!u.some((function(e){return e.transitions.length>0})))return this.next(t,n);var p=Zk(Object.keys(i).map((function(e){return i[e].configuration})));return{transitions:h,exitSet:Zk(u.map((function(e){return e.exitSet}))),configuration:p,source:t,actions:Zk(Object.keys(i).map((function(e){return i[e].actions})))}},e.prototype._transition=function(e,t,n){return iS(e)?this.transitionLeafNode(e,t,n):1===Object.keys(e).length?this.transitionCompoundNode(e,t,n):this.transitionParallelNode(e,t,n)},e.prototype.getTransitionData=function(e,t){return this._transition(e.value,e,dS(t))},e.prototype.next=function(e,t){var n,r,o,i=this,s=t.name,a=[],l=[];try{for(var c=bk(this.getCandidates(s)),d=c.next();!d.done;d=c.next()){var u=d.value,h=u.cond,p=u.in,f=e.context,m=!p||(iS(p)&&l$(p)?e.matches(Fk(this.getStateNodeById(p).path,this.delimiter)):Bk(Fk(p,this.delimiter),Kk(this.path.slice(0,-2))(e.value))),g=!1;try{g=!h||hS(this.machine,h,f,t,e)}catch(e){throw new Error("Unable to evaluate guard '".concat(h.name||h.type,"' in transition for event '").concat(s,"' in state node '").concat(this.id,"':\n").concat(e.message))}if(g&&m){void 0!==u.target&&(l=u.target),a.push.apply(a,xk([],yk(u.actions),!1)),o=u;break}}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}if(o){if(!l.length)return{transitions:[o],exitSet:[],configuration:e.value?[this]:[],source:e,actions:a};var v=Zk(l.map((function(t){return i.getRelativeStateNodes(t,e.historyValue)})));return{transitions:[o],exitSet:!!o.internal?[]:Zk(l.map((function(e){return i.getPotentiallyReenteringNodes(e)}))),configuration:v,source:e,actions:a}}},e.prototype.getPotentiallyReenteringNodes=function(e){if(this.order<e.order)return[this];for(var t=[],n=this,r=e;n&&n!==r;)t.push(n),n=n.parent;return n!==r?[]:(t.push(r),t)},e.prototype.getActions=function(e,t,n,r,o,i,s){var a,l,c,d,u=this,h=i?RS([],this.getStateNodes(i.value)):[],p=new Set;try{for(var f=bk(Array.from(e).sort((function(e,t){return e.order-t.order}))),m=f.next();!m.done;m=f.next()){(!PS(h,b=m.value)||PS(n.exitSet,b)||b.parent&&p.has(b.parent))&&p.add(b)}}catch(e){a={error:e}}finally{try{m&&!m.done&&(l=f.return)&&l.call(f)}finally{if(a)throw a.error}}try{for(var g=bk(h),v=g.next();!v.done;v=g.next()){var b;PS(e,b=v.value)&&!PS(n.exitSet,b.parent)||n.exitSet.push(b)}}catch(e){c={error:e}}finally{try{v&&!v.done&&(d=g.return)&&d.call(g)}finally{if(c)throw c.error}}n.exitSet.sort((function(e,t){return t.order-e.order}));var y=Array.from(p).sort((function(e,t){return e.order-t.order})),x=new Set(n.exitSet),w=Zk(y.map((function(e){var t=[];if("final"!==e.type)return t;var i=e.parent;if(!i.parent)return t;t.push(CS(e.id,e.doneData),CS(i.id,e.doneData?Yk(e.doneData,r,o):void 0));var s=i.parent;return"parallel"===s.type&&LS(s).every((function(e){return zS(n.configuration,e)}))&&t.push(CS(s.id)),t}))),C=y.map((function(e){var t=e.onEntry,n=e.activities.map((function(e){return function(e){var t=wS(e);return{type:fk.Start,activity:t,exec:void 0}}(e)}));return{type:"entry",actions:xS(s?xk(xk([],yk(t),!1),yk(n),!1):xk(xk([],yk(n),!1),yk(t),!1),u.machine.options.actions)}})).concat({type:"state_done",actions:w.map((function(e){return function(e,t){return{type:kk,event:"function"==typeof e?e:cS(e),delay:t?t.delay:void 0,id:null==t?void 0:t.id}}(e)}))}),k=Array.from(x).map((function(e){return{type:"exit",actions:xS(xk(xk([],yk(e.onExit),!1),yk(e.activities.map((function(e){return function(e){var t=oS(e)?e:wS(e);return{type:fk.Stop,activity:t,exec:void 0}}(e)}))),!1),u.machine.options.actions)}})).concat({type:"transition",actions:xS(n.actions,this.machine.options.actions)}).concat(C);if(t){var S=xS(Zk(xk([],yk(e),!1).sort((function(e,t){return t.order-e.order})).map((function(e){return e.onExit}))),this.machine.options.actions).filter((function(e){return!gS(e)}));return k.concat({type:"stop",actions:S})}return k},e.prototype.transition=function(e,t,n,r){void 0===e&&(e=this.initialState);var o,i,s=dS(t);if(e instanceof HS)o=void 0===n?e:this.resolveState(HS.from(e,n));else{var a=iS(e)?this.resolve(qk(this.getResolvedPath(e))):this.resolve(e),l=null!=n?n:this.machine.context;o=this.resolveState(HS.from(a,l))}if(!Vk&&s.name===s$)throw new Error("An event cannot have the wildcard type ('".concat(s$,"')"));if(this.strict&&!this.events.includes(s.name)&&(i=s.name,!/^(done|error)\./.test(i)))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(s.name,"'"));var c=this._transition(o.value,o,s)||{transitions:[],configuration:[],exitSet:[],source:o,actions:[]},d=RS([],this.getStateNodes(o.value)),u=c.configuration.length?RS(d,c.configuration):d;return c.configuration=xk([],yk(u),!1),this.resolveTransition(c,o,o.context,r,s)},e.prototype.resolveRaisedTransition=function(e,t,n,r){var o,i=e.actions;return(e=this.transition(e,t,void 0,r))._event=n,e.event=n.data,(o=e.actions).unshift.apply(o,xk([],yk(i),!1)),e},e.prototype.resolveTransition=function(e,t,n,r,o){var i,s,a,l,c=this;void 0===o&&(o=vS);var d=e.configuration,u=!t||e.transitions.length>0,h=u?e.configuration:t?t.configuration:[],p=zS(h,this),f=u?IS(this.machine,d):void 0,m=t?t.historyValue?t.historyValue:e.source?this.machine.historyValue(t.value):void 0:void 0,g=this.getActions(new Set(h),p,e,n,o,t,r),v=t?gk({},t.activities):{};try{for(var b=bk(g),y=b.next();!y.done;y=b.next()){var x=y.value;try{for(var w=(a=void 0,bk(x.actions)),C=w.next();!C.done;C=w.next()){var k=C.value;k.type===wk?v[k.activity.id||k.activity.type]=k:k.type===Ck&&(v[k.activity.id||k.activity.type]=!1)}}catch(e){a={error:e}}finally{try{C&&!C.done&&(l=w.return)&&l.call(w)}finally{if(a)throw a.error}}}}catch(e){i={error:e}}finally{try{y&&!y.done&&(s=b.return)&&s.call(b)}finally{if(i)throw i.error}}var S,$,j=yk($S(this,t,n,o,g,r,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),M=j[0],E=j[1],T=yk(function(e,t){var n,r,o=yk([[],[]],2),i=o[0],s=o[1];try{for(var a=bk(e),l=a.next();!l.done;l=a.next()){var c=l.value;t(c)?i.push(c):s.push(c)}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return[i,s]}(M,gS),2),O=T[0],L=T[1],A=M.filter((function(e){var t;return e.type===wk&&(null===(t=e.activity)||void 0===t?void 0:t.type)===Ok})),R=A.reduce((function(e,t){return e[t.activity.id]=function(e,t,n,r){var o,i=pS(e.src),s=null===(o=null==t?void 0:t.options.services)||void 0===o?void 0:o[i.type],a=e.data?Yk(e.data,n,r):void 0,l=s?ES(s,e.id,a):MS(e.id);return l.meta=e,l}(t.activity,c.machine,E,o),e}),t?gk({},t.children):{}),N=new HS({value:f||t.value,context:E,_event:o,_sessionid:t?t._sessionid:null,historyValue:f?m?(S=m,$=f,{current:$,states:eS(S,$)}):void 0:t?t.historyValue:void 0,history:!f||e.source?t:void 0,actions:f?L:[],activities:f?v:t?t.activities:{},events:[],configuration:h,transitions:e.transitions,children:R,done:p,tags:VS(h),machine:this}),D=n!==E;N.changed=o.name===Nk||D;var I=N.history;I&&delete I.history;var P=!p&&(this._transient||d.some((function(e){return e._transient})));if(!(u||P&&o.name!==i$))return N;var z=N;if(!p)for(P&&(z=this.resolveRaisedTransition(z,{type:jk},o,r));O.length;){var V=O.shift();z=this.resolveRaisedTransition(z,V._event,o,r)}var B=z.changed||(I?!!z.actions.length||D||typeof I.value!=typeof z.value||!BS(z.value,I.value):void 0);return z.changed=B,z.history=I,z},e.prototype.getStateNode=function(e){if(l$(e))return this.machine.getStateNodeById(e);if(!this.states)throw new Error("Unable to retrieve child state '".concat(e,"' from '").concat(this.id,"'; no child states exist."));var t=this.states[e];if(!t)throw new Error("Child state '".concat(e,"' does not exist on '").concat(this.id,"'"));return t},e.prototype.getStateNodeById=function(e){var t=l$(e)?e.slice(1):e;if(t===this.id)return this;var n=this.machine.idMap[t];if(!n)throw new Error("Child state node '#".concat(t,"' does not exist on machine '").concat(this.id,"'"));return n},e.prototype.getStateNodeByPath=function(e){if("string"==typeof e&&l$(e))try{return this.getStateNodeById(e.slice(1))}catch(e){}for(var t=_k(e,this.delimiter).slice(),n=this;t.length;){var r=t.shift();if(!r.length)break;n=n.getStateNode(r)}return n},e.prototype.resolve=function(e){var t,n=this;if(!e)return this.initialStateValue||a$;switch(this.type){case"parallel":return Wk(this.initialStateValue,(function(t,r){return t?n.getStateNode(r).resolve(e[r]||t):a$}));case"compound":if(iS(e)){var r=this.getStateNode(e);return"parallel"===r.type||"compound"===r.type?((t={})[e]=r.initialStateValue,t):e}return Object.keys(e).length?Wk(e,(function(e,t){return e?n.getStateNode(t).resolve(e):a$})):this.initialStateValue||{};default:return e||a$}},e.prototype.getResolvedPath=function(e){if(l$(e)){var t=this.machine.idMap[e.slice(1)];if(!t)throw new Error("Unable to find state node '".concat(e,"'"));return t.path}return _k(e,this.delimiter)},Object.defineProperty(e.prototype,"initialStateValue",{get:function(){var e,t;if(this.__cache.initialStateValue)return this.__cache.initialStateValue;if("parallel"===this.type)t=Uk(this.states,(function(e){return e.initialStateValue||a$}),(function(e){return!("history"===e.type)}));else if(void 0!==this.initial){if(!this.states[this.initial])throw new Error("Initial state '".concat(this.initial,"' not found on '").concat(this.key,"'"));t=TS(this.states[this.initial])?this.initial:((e={})[this.initial]=this.states[this.initial].initialStateValue,e)}else t={};return this.__cache.initialStateValue=t,this.__cache.initialStateValue},enumerable:!1,configurable:!0}),e.prototype.getInitialState=function(e,t){this._init();var n=this.getStateNodes(e);return this.resolveTransition({configuration:n,exitSet:[],transitions:[],source:void 0,actions:[]},void 0,null!=t?t:this.machine.context,void 0)},Object.defineProperty(e.prototype,"initialState",{get:function(){var e=this.initialStateValue;if(!e)throw new Error("Cannot retrieve initial state from simple state '".concat(this.id,"'."));return this.getInitialState(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){var e;if("history"===this.type){var t=this.config;e=iS(t.target)&&l$(t.target)?qk(this.machine.getStateNodeById(t.target).path.slice(this.path.length-1)):t.target}return e},enumerable:!1,configurable:!0}),e.prototype.getRelativeStateNodes=function(e,t,n){return void 0===n&&(n=!0),n?"history"===e.type?e.resolveHistory(t):e.initialStateNodes:[e]},Object.defineProperty(e.prototype,"initialStateNodes",{get:function(){var e=this;return TS(this)?[this]:"compound"!==this.type||this.initial?Zk(Gk(this.initialStateValue).map((function(t){return e.getFromRelativePath(t)}))):(Vk||nS(!1,"Compound state node '".concat(this.id,"' has no initial state.")),[this])},enumerable:!1,configurable:!0}),e.prototype.getFromRelativePath=function(e){if(!e.length)return[this];var t=yk(e),n=t[0],r=t.slice(1);if(!this.states)throw new Error("Cannot retrieve subPath '".concat(n,"' from node with no states"));var o=this.getStateNode(n);if("history"===o.type)return o.resolveHistory();if(!this.states[n])throw new Error("Child state '".concat(n,"' does not exist on '").concat(this.id,"'"));return this.states[n].getFromRelativePath(r)},e.prototype.historyValue=function(e){if(Object.keys(this.states).length)return{current:e||this.initialStateValue,states:Uk(this.states,(function(t,n){if(!e)return t.historyValue();var r=iS(e)?void 0:e[n];return t.historyValue(r||t.initialStateValue)}),(function(e){return!e.history}))}},e.prototype.resolveHistory=function(e){var t=this;if("history"!==this.type)return[this];var n=this.parent;if(!e){var r=this.target;return r?Zk(Gk(r).map((function(e){return n.getFromRelativePath(e)}))):n.initialStateNodes}var o,i,s=(o=n.path,i="states",function(e){var t,n,r=e;try{for(var s=bk(o),a=s.next();!a.done;a=s.next()){var l=a.value;r=r[i][l]}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return r})(e).current;return iS(s)?[n.getStateNode(s)]:Zk(Gk(s).map((function(e){return"deep"===t.history?n.getFromRelativePath(e):[n.states[e[0]]]})))},Object.defineProperty(e.prototype,"stateIds",{get:function(){var e=this,t=Zk(Object.keys(this.states).map((function(t){return e.states[t].stateIds})));return[this.id].concat(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"events",{get:function(){var e,t,n,r;if(this.__cache.events)return this.__cache.events;var o=this.states,i=new Set(this.ownEvents);if(o)try{for(var s=bk(Object.keys(o)),a=s.next();!a.done;a=s.next()){var l=o[a.value];if(l.states)try{for(var c=(n=void 0,bk(l.events)),d=c.next();!d.done;d=c.next()){var u=d.value;i.add("".concat(u))}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}return this.__cache.events=Array.from(i)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ownEvents",{get:function(){var e=new Set(this.transitions.filter((function(e){return!(!e.target&&!e.actions.length&&e.internal)})).map((function(e){return e.eventType})));return Array.from(e)},enumerable:!1,configurable:!0}),e.prototype.resolveTarget=function(e){var t=this;if(void 0!==e)return e.map((function(e){if(!iS(e))return e;var n=e[0]===t.delimiter;if(n&&!t.parent)return t.getStateNodeByPath(e.slice(1));var r=n?t.key+e:e;if(!t.parent)return t.getStateNodeByPath(r);try{return t.parent.getStateNodeByPath(r)}catch(e){throw new Error("Invalid transition definition for state node '".concat(t.id,"':\n").concat(e.message))}}))},e.prototype.formatTransition=function(e){var t=this,n=function(e){if(void 0!==e&&""!==e)return Xk(e)}(e.target),r="internal"in e?e.internal:!n||n.some((function(e){return iS(e)&&e[0]===t.delimiter})),o=this.machine.options.guards,i=this.resolveTarget(n),s=gk(gk({},e),{actions:xS(Xk(e.actions)),cond:sS(e.cond,o),target:i,source:this,internal:r,eventType:e.event,toJSON:function(){return gk(gk({},s),{target:s.target?s.target.map((function(e){return"#".concat(e.id)})):void 0,source:"#".concat(t.id)})}});return s},e.prototype.formatTransitions=function(){var e,t,n,r=this;if(this.config.on)if(Array.isArray(this.config.on))n=this.config.on;else{var o=this.config.on,i=s$,s=o[i],a=void 0===s?[]:s,l=vk(o,["*"]);n=Zk(Object.keys(l).map((function(e){Vk||e!==i$||nS(!1,"Empty string transition configs (e.g., `{ on: { '': ... }}`) for transient transitions are deprecated. Specify the transition in the `{ always: ... }` property instead. "+'Please check the `on` configuration for "#'.concat(r.id,'".'));var t=uS(e,l[e]);return Vk||function(e,t,n){var r=n.slice(0,-1).some((function(e){return!("cond"in e)&&!("in"in e)&&(iS(e.target)||lS(e.target))})),o=t===i$?"the transient event":"event '".concat(t,"'");nS(!r,"One or more transitions for ".concat(o," on state '").concat(e.id,"' are unreachable. ")+"Make sure that the default transition is the last one defined.")}(r,e,t),t})).concat(uS(s$,a)))}else n=[];var c=this.config.always?uS("",this.config.always):[],d=this.config.onDone?uS(String(CS(this.id)),this.config.onDone):[];Vk||nS(!(this.config.onDone&&!this.parent),'Root nodes cannot have an ".onDone" transition. Please check the config of "'.concat(this.id,'".'));var u=Zk(this.invoke.map((function(e){var t=[];return e.onDone&&t.push.apply(t,xk([],yk(uS(String(kS(e.id)),e.onDone)),!1)),e.onError&&t.push.apply(t,xk([],yk(uS(String(SS(e.id)),e.onError)),!1)),t}))),h=this.after,p=Zk(xk(xk(xk(xk([],yk(d),!1),yk(u),!1),yk(n),!1),yk(c),!1).map((function(e){return Xk(e).map((function(e){return r.formatTransition(e)}))})));try{for(var f=bk(h),m=f.next();!m.done;m=f.next()){var g=m.value;p.push(g)}}catch(t){e={error:t}}finally{try{m&&!m.done&&(t=f.return)&&t.call(f)}finally{if(e)throw e.error}}return p},e}();var d$,u$=function(e){return{type:Mk,assignment:e}};!function(e){e[e.Effect=1]="Effect",e[e.LayoutEffect=2]="LayoutEffect"}(d$||(d$={}));var h$="undefined"!=typeof document?n.useLayoutEffect:function(){};function p$(e){var t=l.useRef();return t.current||(t.current={v:e()}),t.current.v}var f$=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s},m$=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};var g$=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s},v$=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};function b$(e,t){(0,e.exec)(t.context,t._event.data,{action:e,state:t,_event:t._event})()}function y$(e){var t=n.useRef([]),r=n.useRef([]);h$((function(){var n=e.subscribe((function(e){var n,o;if(e.actions.length){var i=e.actions.filter((function(e){return"function"==typeof e.exec&&"__effect"in e.exec})),s=g$(function(e,t){var n,r,o=f$([[],[]],2),i=o[0],s=o[1];try{for(var a=m$(e),l=a.next();!l.done;l=a.next()){var c=l.value;t(c)?i.push(c):s.push(c)}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return[i,s]}(i,(function(e){return e.exec.__effect===d$.Effect})),2),a=s[0],l=s[1];(n=t.current).push.apply(n,v$([],g$(a.map((function(t){return[t,e]}))),!1)),(o=r.current).push.apply(o,v$([],g$(l.map((function(t){return[t,e]}))),!1))}}));return function(){n.unsubscribe()}}),[]),h$((function(){for(;r.current.length;){var e=g$(r.current.shift(),2);b$(e[0],e[1])}})),n.useEffect((function(){for(;t.current.length;){var e=g$(t.current.shift(),2);b$(e[0],e[1])}}))}var x$=function(){return x$=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},x$.apply(this,arguments)},w$=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},C$=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s};var k$=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s};function S$(e,t){void 0===t&&(t={});var r=n.useCallback((function(e){var t=void 0===e.changed&&Object.keys(e.children).length;(e.changed||t)&&a(e)}),[]),o=function(e,t,r){void 0===t&&(t={});var o=p$((function(){return"function"==typeof e?e():e}));if("production"!==process.env.NODE_ENV&&"function"!=typeof e){var i=C$(n.useState(o),1)[0];e!==i&&console.warn("Machine given to `useMachine` has changed between renders. This is not supported and might lead to unexpected results.\nPlease make sure that you pass the same Machine as argument each time.")}var s=t.context,a=t.guards,l=t.actions,c=t.activities,d=t.services,u=t.delays,h=t.state,p=w$(t,["context","guards","actions","activities","services","delays","state"]),f=p$((function(){var e={context:s,guards:a,actions:l,activities:c,services:d,delays:u};return n$(o.withConfig(e,(function(){return x$(x$({},o.context),s)})),x$({deferEvents:!0},p))}));return h$((function(){var e;return r&&(e=f.subscribe(function(e){if("object"==typeof e)return e;var t=function(){};return{next:e,error:void 0||t,complete:void 0||t}}(r))),function(){null==e||e.unsubscribe()}}),[r]),h$((function(){return f.start(h?HS.create(h):void 0),function(){f.stop()}}),[]),h$((function(){Object.assign(f.machine.options.actions,l),Object.assign(f.machine.options.guards,a),Object.assign(f.machine.options.activities,c),Object.assign(f.machine.options.services,d),Object.assign(f.machine.options.delays,u)}),[l,a,c,d,u]),y$(f),f}(e,t,r),i=k$(n.useState((function(){var e=o.machine.initialState;return t.state?HS.create(t.state):e})),2),s=i[0],a=i[1];return[s,o.send,o]}function $$(){return $$=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$$.apply(null,arguments)}function j$(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}const M$={arr:Array.isArray,obj:e=>"[object Object]"===Object.prototype.toString.call(e),fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,und:e=>void 0===e,nul:e=>null===e,set:e=>e instanceof Set,map:e=>e instanceof Map,equ(e,t){if(typeof e!=typeof t)return!1;if(M$.str(e)||M$.num(e))return e===t;if(M$.obj(e)&&M$.obj(t)&&Object.keys(e).length+Object.keys(t).length===0)return!0;let n;for(n in e)if(!(n in t))return!1;for(n in t)if(e[n]!==t[n])return!1;return!M$.und(n)||e===t}};function E$(e,t){return M$.und(e)||M$.nul(e)?t:e}function T$(e){return M$.und(e)?[]:M$.arr(e)?e:[e]}function O$(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return M$.fun(e)?e(...n):e}function L$(e){const t=function(e){return e.to,e.from,e.config,e.onStart,e.onRest,e.onFrame,e.children,e.reset,e.reverse,e.force,e.immediate,e.delay,e.attach,e.destroyed,e.interpolateTo,e.ref,e.lazy,j$(e,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}(e);if(M$.und(t))return $$({to:t},e);const n=Object.keys(e).reduce(((n,r)=>M$.und(t[r])?$$({},n,{[r]:e[r]}):n),{});return $$({to:t},n)}class A${constructor(){this.payload=void 0,this.children=[]}getAnimatedValue(){return this.getValue()}getPayload(){return this.payload||this}attach(){}detach(){}getChildren(){return this.children}addChild(e){0===this.children.length&&this.attach(),this.children.push(e)}removeChild(e){const t=this.children.indexOf(e);this.children.splice(t,1),0===this.children.length&&this.detach()}}class R$ extends A${constructor(){super(...arguments),this.payload=[],this.attach=()=>this.payload.forEach((e=>e instanceof A$&&e.addChild(this))),this.detach=()=>this.payload.forEach((e=>e instanceof A$&&e.removeChild(this)))}}class N$ extends A${constructor(){super(...arguments),this.payload={},this.attach=()=>Object.values(this.payload).forEach((e=>e instanceof A$&&e.addChild(this))),this.detach=()=>Object.values(this.payload).forEach((e=>e instanceof A$&&e.removeChild(this)))}getValue(e){void 0===e&&(e=!1);const t={};for(const n in this.payload){const r=this.payload[n];(!e||r instanceof A$)&&(t[n]=r instanceof A$?r[e?"getAnimatedValue":"getValue"]():r)}return t}getAnimatedValue(){return this.getValue(!0)}}let D$,I$;let P$,z$=e=>"undefined"!=typeof window?window.requestAnimationFrame(e):-1;let V$,B$=()=>Date.now();class H$ extends N${constructor(e,t){super(),this.update=void 0,this.payload=e.style?$$({},e,{style:V$(e.style)}):e,this.update=t,this.attach()}}let _$=!1;const F$=new Set,q$=()=>{if(!_$)return!1;let e=B$();for(let t of F$){let n=!1;for(let r=0;r<t.configs.length;r++){let o,i,s=t.configs[r];for(let t=0;t<s.animatedValues.length;t++){let r=s.animatedValues[t];if(r.done)continue;let a=s.fromValues[t],l=s.toValues[t],c=r.lastPosition,d=l instanceof A$,u=Array.isArray(s.initialVelocity)?s.initialVelocity[t]:s.initialVelocity;if(d&&(l=l.getValue()),s.immediate)r.setValue(l),r.done=!0;else if("string"!=typeof a&&"string"!=typeof l){if(void 0!==s.duration)c=a+s.easing((e-r.startTime)/s.duration)*(l-a),o=e>=r.startTime+s.duration;else if(s.decay)c=a+u/(1-.998)*(1-Math.exp(-.0020000000000000018*(e-r.startTime))),o=Math.abs(r.lastPosition-c)<.1,o&&(l=c);else{i=void 0!==r.lastTime?r.lastTime:e,u=void 0!==r.lastVelocity?r.lastVelocity:s.initialVelocity,e>i+64&&(i=e);let t=Math.floor(e-i);for(let e=0;e<t;++e){u+=1*((-s.tension*(c-l)+-s.friction*u)/s.mass)/1e3,c+=1*u/1e3}let n=!(!s.clamp||0===s.tension)&&(a<l?c>l:c<l),d=Math.abs(u)<=s.precision,h=0===s.tension||Math.abs(l-c)<=s.precision;o=n||d&&h,r.lastVelocity=u,r.lastTime=e}d&&!s.toValues[t].done&&(o=!1),o?(r.value!==l&&(c=l),r.done=!0):n=!0,r.setValue(c),r.lastPosition=c}else r.setValue(l),r.done=!0}t.props.onFrame&&(t.values[s.name]=s.interpolation.getValue())}t.props.onFrame&&t.props.onFrame(t.values),n||(F$.delete(t),t.stop(!0))}return F$.size?z$(q$):_$=!1,_$};function W$(e,t,n){if("function"==typeof e)return e;if(Array.isArray(e))return W$({range:e,output:t,extrapolate:n});if(P$&&"string"==typeof e.output[0])return P$(e);const r=e,o=r.output,i=r.range||[0,1],s=r.extrapolateLeft||r.extrapolate||"extend",a=r.extrapolateRight||r.extrapolate||"extend",l=r.easing||(e=>e);return e=>{const t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,i);return function(e,t,n,r,o,i,s,a,l){let c=l?l(e):e;if(c<t){if("identity"===s)return c;"clamp"===s&&(c=t)}if(c>n){if("identity"===a)return c;"clamp"===a&&(c=n)}if(r===o)return r;if(t===n)return e<=t?r:o;t===-1/0?c=-c:n===1/0?c-=t:c=(c-t)/(n-t);c=i(c),r===-1/0?c=-c:o===1/0?c+=r:c=c*(o-r)+r;return c}(e,i[t],i[t+1],o[t],o[t+1],l,s,a,r.map)}}class U$ extends R${constructor(e,t,n,r){super(),this.calc=void 0,this.payload=e instanceof R$&&!(e instanceof U$)?e.getPayload():Array.isArray(e)?e:[e],this.calc=W$(t,n,r)}getValue(){return this.calc(...this.payload.map((e=>e.getValue())))}updateConfig(e,t,n){this.calc=W$(e,t,n)}interpolate(e,t,n){return new U$(this,e,t,n)}}const K$=(e,t,n)=>e&&new U$(e,t,n);function G$(e,t){"update"in e?t.add(e):e.getChildren().forEach((e=>G$(e,t)))}class Z$ extends A${constructor(e){var t;super(),t=this,this.animatedStyles=new Set,this.value=void 0,this.startPosition=void 0,this.lastPosition=void 0,this.lastVelocity=void 0,this.startTime=void 0,this.lastTime=void 0,this.done=!1,this.setValue=function(e,n){void 0===n&&(n=!0),t.value=e,n&&t.flush()},this.value=e,this.startPosition=e,this.lastPosition=e}flush(){0===this.animatedStyles.size&&G$(this,this.animatedStyles),this.animatedStyles.forEach((e=>e.update()))}clearStyles(){this.animatedStyles.clear()}getValue(){return this.value}interpolate(e,t,n){return new U$(this,e,t,n)}}class J$ extends R${constructor(e){super(),this.payload=e.map((e=>new Z$(e)))}setValue(e,t){void 0===t&&(t=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach(((e,n)=>this.payload[n].setValue(e,t))):this.payload.forEach((n=>n.setValue(e,t)))}getValue(){return this.payload.map((e=>e.getValue()))}interpolate(e,t){return new U$(this,e,t)}}let X$=0,Y$=class{constructor(){this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=()=>this.interpolations,this.id=X$++}update(e){if(!e)return this;const t=L$(e),n=t.delay,r=void 0===n?0:n,o=t.to,i=j$(t,["delay","to"]);if(M$.arr(o)||M$.fun(o))this.queue.push($$({},i,{delay:r,to:o}));else if(o){let e={};Object.entries(o).forEach((t=>{let n=t[0],o=t[1];const s=$$({to:{[n]:o},delay:O$(r,n)},i),a=e[s.delay]&&e[s.delay].to;e[s.delay]=$$({},e[s.delay],s,{to:$$({},a,s.to)})})),this.queue=Object.values(e)}return this.queue=this.queue.sort(((e,t)=>e.delay-t.delay)),this.diff(i),this}start(e){if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((e=>{let t=e.from,n=void 0===t?{}:t,r=e.to,o=void 0===r?{}:r;M$.obj(n)&&(this.merged=$$({},n,this.merged)),M$.obj(o)&&(this.merged=$$({},this.merged,o))}));const t=this.local=++this.guid,n=this.localQueue=this.queue;this.queue=[],n.forEach(((r,o)=>{let i=r.delay,s=j$(r,["delay"]);const a=r=>{o===n.length-1&&t===this.guid&&r&&(this.idle=!0,this.props.onRest&&this.props.onRest(this.merged)),e&&e()};let l=M$.arr(s.to)||M$.fun(s.to);i?setTimeout((()=>{t===this.guid&&(l?this.runAsync(s,a):this.diff(s).start(a))}),i):l?this.runAsync(s,a):this.diff(s).start(a)}))}else M$.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),t=this,F$.has(t)||F$.add(t),_$||(_$=!0,z$(q$));var t;return this}stop(e){return this.listeners.forEach((t=>t(e))),this.listeners=[],this}pause(e){var t;return this.stop(!0),e&&(t=this,F$.has(t)&&F$.delete(t)),this}runAsync(e,t){var n=this;e.delay;let r=j$(e,["delay"]);const o=this.local;let i=Promise.resolve(void 0);if(M$.arr(r.to))for(let e=0;e<r.to.length;e++){const t=e,n=$$({},r,L$(r.to[t]));M$.arr(n.config)&&(n.config=n.config[t]),i=i.then((()=>{if(o===this.guid)return new Promise((e=>this.diff(n).start(e)))}))}else if(M$.fun(r.to)){let e,t=0;i=i.then((()=>r.to((n=>{const i=$$({},r,L$(n));if(M$.arr(i.config)&&(i.config=i.config[t]),t++,o===this.guid)return e=new Promise((e=>this.diff(i).start(e)))}),(function(e){return void 0===e&&(e=!0),n.stop(e)})).then((()=>e))))}i.then(t)}diff(e){this.props=$$({},this.props,e);let t=this.props,n=t.from,r=void 0===n?{}:n,o=t.to,i=void 0===o?{}:o,s=t.config,a=void 0===s?{}:s,l=t.reverse,c=t.attach,d=t.reset,u=t.immediate;if(l){var h=[i,r];r=h[0],i=h[1]}this.merged=$$({},r,this.merged,i),this.hasChanged=!1;let p=c&&c(this);if(this.animations=Object.entries(this.merged).reduce(((e,t)=>{let n=t[0],o=t[1],i=e[n]||{};const s=M$.num(o),l=M$.str(o)&&!o.startsWith("#")&&!/\d/.test(o)&&!I$[o],c=M$.arr(o),h=!s&&!c&&!l;let f=M$.und(r[n])?o:r[n],m=s||c||l?o:1,g=O$(a,n);p&&(m=p.animations[n].parent);let v,b=i.parent,y=i.interpolation,x=T$(p?m.getPayload():m),w=o;h&&(w=P$({range:[0,1],output:[o,o]})(1));let C=y&&y.getValue();const k=!M$.und(b)&&i.animatedValues.some((e=>!e.done)),S=!M$.equ(w,C),$=!M$.equ(w,i.previous),j=!M$.equ(g,i.config);if(d||$&&S||j){if(s||l)b=y=i.parent||new Z$(f);else if(c)b=y=i.parent||new J$(f);else if(h){let e=i.interpolation&&i.interpolation.calc(i.parent.value);e=void 0===e||d?f:e,i.parent?(b=i.parent,b.setValue(0,!1)):b=new Z$(0);const t={output:[e,o]};i.interpolation?(y=i.interpolation,i.interpolation.updateConfig(t)):y=b.interpolate(t)}return x=T$(p?m.getPayload():m),v=T$(b.getPayload()),d&&!h&&b.setValue(f,!1),this.hasChanged=!0,v.forEach((e=>{e.startPosition=e.value,e.lastPosition=e.value,e.lastVelocity=k?e.lastVelocity:void 0,e.lastTime=k?e.lastTime:void 0,e.startTime=B$(),e.done=!1,e.animatedStyles.clear()})),O$(u,n)&&b.setValue(h?m:o,!1),$$({},e,{[n]:$$({},i,{name:n,parent:b,interpolation:y,animatedValues:v,toValues:x,previous:w,config:g,fromValues:T$(b.getValue()),immediate:O$(u,n),initialVelocity:E$(g.velocity,0),clamp:E$(g.clamp,!1),precision:E$(g.precision,.01),tension:E$(g.tension,170),friction:E$(g.friction,26),mass:E$(g.mass,1),duration:g.duration,easing:E$(g.easing,(e=>e)),decay:g.decay})})}return S?e:(h&&(b.setValue(1,!1),y.updateConfig({output:[w,w]})),b.done=!0,this.hasChanged=!0,$$({},e,{[n]:$$({},e[n],{previous:w})}))}),this.animations),this.hasChanged){this.configs=Object.values(this.animations),this.values={},this.interpolations={};for(let e in this.animations)this.interpolations[e]=this.animations[e].interpolation,this.values[e]=this.animations[e].interpolation.getValue()}return this}destroy(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0}};const Q$=e=>{const t=M$.fun(e),r=((e,t)=>{const r=n.useRef(!1),o=n.useRef(),i=M$.fun(t),s=n.useMemo((()=>{let n;return o.current&&(o.current.map((e=>e.destroy())),o.current=void 0),[new Array(e).fill().map(((e,r)=>{const o=new Y$,s=i?O$(t,r,o):t[r];return 0===r&&(n=s.ref),o.update(s),n||o.start(),o})),n]}),[e]),a=s[0],l=s[1];o.current=a,n.useImperativeHandle(l,(()=>({start:()=>Promise.all(o.current.map((e=>new Promise((t=>e.start(t)))))),stop:e=>o.current.forEach((t=>t.stop(e))),get controllers(){return o.current}})));const c=n.useMemo((()=>e=>o.current.map(((t,n)=>{t.update(i?O$(e,n,t):e[n]),l||t.start()}))),[e]);n.useEffect((()=>{r.current?i||c(t):l||o.current.forEach((e=>e.start()))})),n.useEffect((()=>(r.current=!0,()=>o.current.forEach((e=>e.destroy())))),[]);const d=o.current.map((e=>e.getValues()));return i?[d,c,e=>o.current.forEach((t=>t.pause(e)))]:d})(1,t?e:[e]),o=r[0],i=r[1],s=r[2];return t?[o[0],i,s]:o};class ej extends N${constructor(e){void 0===e&&(e={}),super(),!e.transform||e.transform instanceof A$||(e=D$.transform(e)),this.payload=e}}const tj={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},nj="[-+]?\\d*\\.?\\d+",rj=nj+"%";function oj(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"\\(\\s*("+t.join(")\\s*,\\s*(")+")\\s*\\)"}const ij=new RegExp("rgb"+oj(nj,nj,nj)),sj=new RegExp("rgba"+oj(nj,nj,nj,nj)),aj=new RegExp("hsl"+oj(nj,rj,rj)),lj=new RegExp("hsla"+oj(nj,rj,rj,nj)),cj=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,dj=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,uj=/^#([0-9a-fA-F]{6})$/,hj=/^#([0-9a-fA-F]{8})$/;function pj(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function fj(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,i=pj(o,r,e+1/3),s=pj(o,r,e),a=pj(o,r,e-1/3);return Math.round(255*i)<<24|Math.round(255*s)<<16|Math.round(255*a)<<8}function mj(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function gj(e){return(parseFloat(e)%360+360)%360/360}function vj(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function bj(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function yj(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=uj.exec(e))?parseInt(t[1]+"ff",16)>>>0:tj.hasOwnProperty(e)?tj[e]:(t=ij.exec(e))?(mj(t[1])<<24|mj(t[2])<<16|mj(t[3])<<8|255)>>>0:(t=sj.exec(e))?(mj(t[1])<<24|mj(t[2])<<16|mj(t[3])<<8|vj(t[4]))>>>0:(t=cj.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=hj.exec(e))?parseInt(t[1],16)>>>0:(t=dj.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=aj.exec(e))?(255|fj(gj(t[1]),bj(t[2]),bj(t[3])))>>>0:(t=lj.exec(e))?(fj(gj(t[1]),bj(t[2]),bj(t[3]))|vj(t[4]))>>>0:null}(e);return null===t?e:(t=t||0,`rgba(${(4278190080&t)>>>24}, ${(16711680&t)>>>16}, ${(65280&t)>>>8}, ${(255&t)/255})`)}const xj=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,wj=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Cj=new RegExp(`(${Object.keys(tj).join("|")})`,"g");let kj={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};const Sj=["Webkit","Ms","Moz","O"];function $j(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||kj.hasOwnProperty(e)&&kj[e]?(""+t).trim():t+"px"}kj=Object.keys(kj).reduce(((e,t)=>(Sj.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),kj);const jj={};var Mj,Ej;Mj=e=>new ej(e),V$=Mj,Ej=e=>{const t=e.output.map((e=>e.replace(wj,yj))).map((e=>e.replace(Cj,yj))),n=t[0].match(xj).map((()=>[]));t.forEach((e=>{e.match(xj).forEach(((e,t)=>n[t].push(+e)))}));const r=t[0].match(xj).map(((t,r)=>W$($$({},e,{output:n[r]}))));return e=>{let n=0;return t[0].replace(xj,(()=>r[n++](e))).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,((e,t,n,r,o)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${o})`))}},P$=Ej,I$=tj,function(e,t){D$={fn:e,transform:t}}(((e,t)=>{if(!e.nodeType||void 0===e.setAttribute)return!1;{const o=t.style,i=t.children,s=t.scrollTop,a=t.scrollLeft,l=j$(t,["style","children","scrollTop","scrollLeft"]),c="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;void 0!==s&&(e.scrollTop=s),void 0!==a&&(e.scrollLeft=a),void 0!==i&&(e.textContent=i);for(let t in o)if(o.hasOwnProperty(t)){var n=0===t.indexOf("--"),r=$j(t,o[t],n);"float"===t&&(t="cssFloat"),n?e.style.setProperty(t,r):e.style[t]=r}for(let t in l){const n=c?t:jj[t]||(jj[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())));void 0!==e.getAttribute(n)&&e.setAttribute(n,l[t])}}}),(e=>e));var Tj;const Oj=(Tj=e=>n.forwardRef(((t,r)=>{const o=function(){const e=n.useState(!1)[1];return n.useCallback((()=>e((e=>!e))),[])}(),i=n.useRef(!0),s=n.useRef(null),a=n.useRef(null),l=n.useCallback((e=>{const t=s.current;s.current=new H$(e,(()=>{let e=!1;a.current&&(e=D$.fn(a.current,s.current.getAnimatedValue())),a.current&&!1!==e||o()})),t&&t.detach()}),[]);n.useEffect((()=>()=>{i.current=!1,s.current&&s.current.detach()}),[]),n.useImperativeHandle(r,(()=>(e=>e.current)(a))),l(t);const c=s.current.getValue();c.scrollTop,c.scrollLeft;const d=j$(c,["scrollTop","scrollLeft"]),u=(h=e,!M$.fun(h)||h.prototype instanceof n.Component?e=>a.current=function(e,t){return t&&(M$.fun(t)?t(e):M$.obj(t)&&(t.current=e)),e}(e,r):void 0);var h;return n.createElement(e,$$({},d,{ref:u}))})),e=>(M$.arr(e)?e:Object.keys(e)).reduce(((e,t)=>{const n=t;return e[n]=Tj(n),e}),Tj))(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]);function Lj(e,t){return e.map((function(e,n){return e+t[n]}))}function Aj(e,t){return e.map((function(e,n){return e-t[n]}))}function Rj(e){return Math.hypot.apply(Math,e)}function Nj(e){return Math.sign?Math.sign(e):Number(e>0)-Number(e<0)||+e}function Dj(e,t,n){return 0===t||Math.abs(t)===1/0?function(e,t){return Math.pow(e,5*t)}(e,n):e*t*n/(t+n*e)}function Ij(e,t,n,r){return void 0===r&&(r=.15),0===r?function(e,t,n){return Math.max(t,Math.min(e,n))}(e,t,n):e<t?-Dj(t-e,n-t,r)+t:e>n?+Dj(e-n,n-t,r)+n:e}function Pj(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}function zj(){return zj=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zj.apply(this,arguments)}function Vj(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Bj(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Hj(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _j(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Hj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Hj(e,t):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function Fj(){}function qj(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?Fj:1===t.length?t[0]:function(){for(var e,n,r=_j(t);!(n=r()).done;){e=n.value.apply(this,arguments)||e}return e}}function Wj(e,t){if(void 0===e){if(void 0===t)throw new Error("Must define fallback value if undefined is expected");e=t}return Array.isArray(e)?e:[e,e]}function Uj(e){if("function"==typeof e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.apply(void 0,n)}return e}function Kj(e,t){void 0===e&&(e={});for(var n={},r=0,o=Object.entries(t);r<o.length;r++){var i=o[r],s=i[0],a=i[1];switch(typeof a){case"function":n[s]=a.call(n,e[s],s,e);break;case"object":n[s]=Kj(e[s],a);break;case"boolean":a&&(n[s]=e[s])}}return n}var Gj=zj({},{threshold:function(e){return void 0===e&&(e=0),Wj(e)},rubberband:function(e){switch(void 0===e&&(e=0),e){case!0:return Wj(.15);case!1:return Wj(0);default:return Wj(e)}},enabled:function(e){return void 0===e&&(e=!0),e},triggerAllEvents:function(e){return void 0===e&&(e=!1),e},initial:function(e){return void 0===e&&(e=0),"function"==typeof e?e:Wj(e)}},{axis:!0,lockDirection:function(e){return void 0===e&&(e=!1),e},bounds:function(e){if(void 0===e&&(e={}),"function"==typeof e)return function(t){return Gj.bounds(e(t))};var t=e,n=t.left,r=void 0===n?-1/0:n,o=t.right,i=void 0===o?1/0:o,s=t.top,a=void 0===s?-1/0:s,l=t.bottom;return[[r,i],[a,void 0===l?1/0:l]]}}),Zj="undefined"!=typeof window&&window.document&&window.document.createElement,Jj={enabled:function(e){return void 0===e&&(e=!0),e},domTarget:!0,window:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e){return void 0===e&&(e=Zj?window:void 0),e})),eventOptions:function(e){var t=void 0===e?{}:e,n=t.passive,r=void 0===n||n,o=t.capture;return{passive:r,capture:void 0!==o&&o}}},Xj=zj({},Gj,{threshold:function(e,t,n){var r=n.filterTaps,o=void 0!==r&&r,i=n.lockDirection,s=void 0!==i&&i,a=n.axis,l=Wj(e,o?3:s||(void 0===a?void 0:a)?1:0);return this.filterTaps=o||l[0]+l[1]>0,l},swipeVelocity:function(e){return void 0===e&&(e=.5),Wj(e)},swipeDistance:function(e){return void 0===e&&(e=60),Wj(e)},delay:function(e){switch(void 0===e&&(e=0),e){case!0:return 180;case!1:return 0;default:return e}}});function Yj(e){var t=e.domTarget,n=e.eventOptions,r=e.window,o=e.enabled,i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,["domTarget","eventOptions","window","enabled"]),s=function(e){return void 0===e&&(e={}),Kj(e,Jj)}({domTarget:t,eventOptions:n,window:r,enabled:o});return s.drag=function(e){return void 0===e&&(e={}),Kj(e,Xj)}(i),s}function Qj(e){return zj({_active:!1,_blocked:!1,_intentional:[!1,!1],_movement:[0,0],_initial:[0,0],_bounds:[[-1/0,1/0],[-1/0,1/0]],_lastEventType:void 0,event:void 0,intentional:!1,values:[0,0],velocities:[0,0],delta:[0,0],movement:[0,0],offset:[0,0],lastOffset:[0,0],direction:[0,0],initial:[0,0],previous:[0,0],first:!1,last:!1,active:!1,timeStamp:0,startTime:0,elapsedTime:0,cancel:Fj,canceled:!1,memo:void 0,args:void 0},e)}function eM(){return{shared:{hovering:!1,scrolling:!1,wheeling:!1,dragging:!1,moving:!1,pinching:!1,touches:0,buttons:0,down:!1,shiftKey:!1,altKey:!1,metaKey:!1,ctrlKey:!1},drag:Qj({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0,_isTap:!0,_delayedEvent:!1,_pointerId:void 0,tap:!1,swipe:[0,0]}),pinch:Qj({da:[0,0],vdva:[0,0],origin:void 0,turns:0}),wheel:Qj({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),move:Qj({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),scroll:Qj({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0})}}var tM=new Map,nM=function(){function e(e,t){var n=this;void 0===t&&(t=[]),this.controller=e,this.args=t,this.debounced=!0,this.setTimeout=function(e,t){var r;void 0===t&&(t=140),clearTimeout(n.controller.timeouts[n.stateKey]);for(var o=arguments.length,i=new Array(o>2?o-2:0),s=2;s<o;s++)i[s-2]=arguments[s];n.controller.timeouts[n.stateKey]=(r=window).setTimeout.apply(r,[e,t].concat(i))},this.clearTimeout=function(){clearTimeout(n.controller.timeouts[n.stateKey])},this.fireGestureHandler=function(e){if(void 0===e&&(e=!1),n.state._blocked)return n.debounced||(n.state._active=!1,n.clean()),null;if(!e&&!n.state.intentional&&!n.config.triggerAllEvents)return null;if(n.state.intentional){var t=n.state.active,r=n.state._active;n.state.active=r,n.state.first=r&&!t,n.state.last=t&&!r,n.controller.state.shared[n.ingKey]=r}var o=zj({},n.controller.state.shared,n.state,n.mapStateValues(n.state)),i=n.handler(o);return n.state.memo=void 0!==i?i:n.state.memo,n.state._active||n.clean(),o}}var t=e.prototype;return t.updateSharedState=function(e){Object.assign(this.controller.state.shared,e)},t.updateGestureState=function(e){Object.assign(this.state,e)},t.checkIntentionality=function(e,t){return{_intentional:e,_blocked:!1}},t.getMovement=function(e){var t=this.config,n=t.initial,r=t.bounds,o=t.rubberband,i=t.threshold,s=this.state,a=s._bounds,l=s._initial,c=s._active,d=s._intentional,u=s.lastOffset,h=s.movement,p=this.getInternalMovement(e,this.state),f=!1===d[0]?rM(p[0],i[0]):d[0],m=!1===d[1]?rM(p[1],i[1]):d[1],g=this.checkIntentionality([f,m],p);if(g._blocked)return zj({},g,{_movement:p,delta:[0,0]});var v,b,y,x,w=g._intentional,C=p;(!1!==w[0]&&!1===d[0]&&(b=Uj(n,this.state),v=Uj(r,this.state),l[0]=b[0],a[0]=v[0]),!1!==w[1]&&!1===d[1])&&(b=null!=(y=b)?y:Uj(n,this.state),v=null!=(x=v)?x:Uj(r,this.state),l[1]=b[1],a[1]=v[1]);var k=[!1!==w[0]?p[0]-w[0]:l[0],!1!==w[1]?p[1]-w[1]:l[1]],S=Lj(k,u),$=c?o:[0,0];return k=oM(a,Lj(k,l),$),zj({},g,{intentional:!1!==w[0]||!1!==w[1],_initial:l,_movement:C,movement:k,values:e,offset:oM(a,S,$),delta:Aj(k,h)})},t.clean=function(){this.clearTimeout()},Pj(e,[{key:"config",get:function(){return this.controller.config[this.stateKey]}},{key:"enabled",get:function(){return this.controller.config.enabled&&this.config.enabled}},{key:"state",get:function(){return this.controller.state[this.stateKey]}},{key:"handler",get:function(){return this.controller.handlers[this.stateKey]}}]),e}();function rM(e,t){return Math.abs(e)>=t&&Nj(e)*t}function oM(e,t,n){var r=t[0],o=t[1],i=n[0],s=n[1],a=e[0],l=a[0],c=a[1],d=e[1],u=d[0],h=d[1];return[Ij(r,l,c,i),Ij(o,u,h,s)]}function iM(e,t,n){var r=e.state,o=e.args,i=t.timeStamp,s=t.type,a=r.values;return{_lastEventType:s,event:t,timeStamp:i,elapsedTime:n?0:i-r.startTime,args:o,previous:a}}function sM(e,t){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return e.call.apply(e,[this,zj({},t,{event:n})].concat(o))}}var aM=function(e){var t=this;this.classes=e,this.bind=function(){for(var e={},n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];for(var i,s=_j(t.classes);!(i=s()).done;){new(0,i.value)(t,r).addBindings(e)}for(var a=0,l=Object.entries(t.nativeRefs);a<l.length;a++){var c=l[a];dM(e,c[0],sM(c[1],zj({},t.state.shared,{args:r})))}return t.config.domTarget?function(e,t){var n=e.config,r=e.domListeners,o=cM(n);if(!o)throw new Error("domTarget must be defined");var i=n.eventOptions;hM(o,lM(r),i);for(var s=0,a=Object.entries(t);s<a.length;s++){var l=a[s],c=l[0],d=l[1],u=c.slice(2).toLowerCase();r.push([u,qj.apply(void 0,d)])}uM(o,r,i)}(t,e):function(e,t){for(var n=e.config,r={},o=n.eventOptions.capture?"Capture":"",i=0,s=Object.entries(t);i<s.length;i++){var a=s[i],l=a[0],c=a[1],d=Array.isArray(c)?c:[c];r[l+o]=qj.apply(void 0,d)}return r}(t,e)},this.effect=function(){return t.config.domTarget&&t.bind(),t.clean},this.clean=function(){var e=cM(t.config),n=t.config.eventOptions;e&&hM(e,lM(t.domListeners),n),Object.values(t.timeouts).forEach(clearTimeout),function(e){var t=e.config,n=t.window,r=t.eventOptions,o=e.windowListeners;if(!n)return;for(var i in o){hM(n,o[i],r)}e.windowListeners={}}(t)},this.state=eM(),this.timeouts={},this.domListeners=[],this.windowListeners={}};function lM(e){return void 0===e&&(e=[]),e.splice(0,e.length)}function cM(e){var t=e.domTarget;return t&&"current"in t?t.current:t}function dM(e,t,n){e[t]||(e[t]=[]),e[t].push(n)}function uM(e,t,n){void 0===t&&(t=[]),void 0===n&&(n={});for(var r,o=_j(t);!(r=o()).done;){var i=r.value,s=i[0],a=i[1];e.addEventListener(s,a,n)}}function hM(e,t,n){void 0===t&&(t=[]),void 0===n&&(n={});for(var r,o=_j(t);!(r=o()).done;){var i=r.value,s=i[0],a=i[1];e.removeEventListener(s,a,n)}}function pM(e,t,r){void 0===r&&(r={});var o=function(e){var t=new Set;e.drag&&t.add(tM.get("drag"));e.wheel&&t.add(tM.get("wheel"));e.scroll&&t.add(tM.get("scroll"));e.move&&t.add(tM.get("move"));e.pinch&&t.add(tM.get("pinch"));e.hover&&t.add(tM.get("hover"));return t}(e),i=n.useMemo((function(){return new aM(o)}),[]);return i.config=t,i.handlers=e,i.nativeRefs=r,n.useEffect(i.effect,[]),i.config.domTarget?fM:i.bind}function fM(){"development"===process.env.NODE_ENV&&console.warn("Deprecation notice: When the `domTarget` option is specified, you don't need to write `useEffect(bind, [bind])` anymore: event binding is now made handled internally to this lib.\n\nNext version won't return anything when `domTarget` is provided, therefore your code will break if you try to call `useEffect`.")}var mM=function(e){function t(){return e.apply(this,arguments)||this}Vj(t,e);var n=t.prototype;return n.getInternalMovement=function(e,t){return Aj(e,t.initial)},n.checkIntentionality=function(e,t){if(!1===e[0]&&!1===e[1])return{_intentional:e,axis:this.state.axis};var n=t.map(Math.abs),r=n[0],o=n[1],i=this.state.axis||(r>o?"x":r<o?"y":void 0);return this.config.axis||this.config.lockDirection?i?this.config.axis&&i!==this.config.axis?{_intentional:e,_blocked:!0,axis:i}:(e["x"===i?1:0]=!1,{_intentional:e,_blocked:!1,axis:i}):{_intentional:[!1,!1],_blocked:!1,axis:i}:{_intentional:e,_blocked:!1,axis:i}},n.getKinematics=function(e,t){var n=this.getMovement(e);if(!n._blocked){var r=t.timeStamp-this.state.timeStamp;Object.assign(n,function(e,t,n){var r=Rj(t),o=0===r?0:1/r,i=0===n?0:1/n,s=i*r,a=t.map((function(e){return i*e})),l=t.map((function(e){return o*e}));return{velocities:a,velocity:s,distance:Rj(e),direction:l}}(n.movement,n.delta,r))}return n},n.mapStateValues=function(e){return{xy:e.values,vxvy:e.velocities}},t}(nM);function gM(e){if("touches"in e){var t=e.targetTouches,n=e.changedTouches;return t.length>0?t:n}return null}function vM(e){var t="buttons"in e?e.buttons:0,n=gM(e),r=n&&n.length||0;return{touches:r,down:r>0||t>0,buttons:t,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,ctrlKey:e.ctrlKey}}function bM(e){var t=gM(e),n=t?t[0]:e;return[n.clientX,n.clientY]}var yM=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).ingKey="dragging",t.stateKey="drag",t.onDragStart=function(e){t.enabled&&!t.state._active&&(!function(e,t,n){var r=e.config,o=e.windowListeners;void 0===n&&(n=[]),r.window&&(hM(r.window,o[t],r.eventOptions),uM(r.window,o[t]=n,r.eventOptions))}(t.controller,t.stateKey,[["pointermove",t.onDragChange],["pointerup",t.onDragEnd],["pointercancel",t.onDragEnd]]),t.updateGestureState({_pointerId:e.pointerId}),t.config.delay>0?(t.state._delayedEvent=!0,"persist"in e&&"function"==typeof e.persist&&e.persist(),t.setTimeout(t.startDrag.bind(Bj(t)),t.config.delay,e)):t.startDrag(e))},t.onDragChange=function(e){if(!t.state.canceled&&e.pointerId===t.state._pointerId)if(t.state._active){var n=vM(e);if(n.down){t.updateSharedState(n);var r=bM(e),o=t.getKinematics(r,e),i=iM(Bj(t),e),s=t.state._isTap,a=Rj(o._movement);s&&a>=3&&(s=!1),t.updateGestureState(zj({},i,o,{_isTap:s})),t.fireGestureHandler()}else t.onDragEnd(e)}else t.state._delayedEvent&&(t.clearTimeout(),t.startDrag(e))},t.onDragEnd=function(e){if(e.pointerId===t.state._pointerId){t.state._active=!1,t.updateSharedState({down:!1,buttons:0,touches:0});var n=t.state._isTap,r=t.state.velocities,o=r[0],i=r[1],s=t.state.movement,a=s[0],l=s[1],c=t.state._intentional,d=c[0],u=c[1],h=t.config.swipeVelocity,p=h[0],f=h[1],m=t.config.swipeDistance,g=m[0],v=m[1],b=zj({},iM(Bj(t),e),t.getMovement(t.state.values)),y=[0,0];b.elapsedTime<220&&(!1!==d&&Math.abs(o)>p&&Math.abs(a)>g&&(y[0]=Nj(o)),!1!==u&&Math.abs(i)>f&&Math.abs(l)>v&&(y[1]=Nj(i))),t.updateGestureState(zj({},b,{tap:n,swipe:y})),t.fireGestureHandler(!0===n)}},t.clean=function(){e.prototype.clean.call(Bj(t)),t.state._delayedEvent=!1,function(e,t){var n=e.config,r=e.windowListeners;n.window&&(hM(n.window,r[t],n.eventOptions),delete r[t])}(t.controller,t.stateKey)},t.onCancel=function(){t.state.canceled||(t.updateGestureState({canceled:!0}),t.state._active=!1,t.updateSharedState({down:!1,buttons:0,touches:0}),requestAnimationFrame((function(){return t.fireGestureHandler()})))},t.onClick=function(e){t.state._isTap||e.stopPropagation()},t}Vj(t,e);var n=t.prototype;return n.startDrag=function(e){var t=bM(e);this.updateSharedState(vM(e)),this.updateGestureState(zj({},function(e,t,n){var r=e.state.offset,o=n.timeStamp;return zj({},eM()[e.stateKey],{_active:!0,values:t,initial:t,offset:r,lastOffset:r,startTime:o})}(this,t,e),iM(this,e,!0),{_pointerId:e.pointerId,cancel:this.onCancel})),this.updateGestureState(this.getMovement(t)),this.fireGestureHandler()},n.addBindings=function(e){(dM(e,"onPointerDown",this.onDragStart),this.config.filterTaps)&&dM(e,this.controller.config.eventOptions.capture?"onClick":"onClickCapture",this.onClick)},t}(mM);function xM(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;var n,r,o,i;if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!xM(e[r],t[r]))return!1;return!0}if("function"==typeof Map&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;for(i=e.entries();!(r=i.next()).done;)if(!xM(r.value[1],t.get(r.value[0])))return!1;return!0}if("function"==typeof Set&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if((n=(o=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;if("undefined"!=typeof Element&&e instanceof Element)return!1;for(r=n;0!=r--;)if(!("_owner"===o[r]&&e.$$typeof||xM(e[o[r]],t[o[r]])))return!1;return!0}return e!=e&&t!=t}function wM(e,t){try{return xM(e,t)}catch(e){if((e.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw e}}function CM(e,t){void 0===t&&(t={}),tM.set("drag",yM);var r=n.useRef();return r.current||(r.current=function(e,t){var n,r,o=[],i=!1;return function(){for(var s=arguments.length,a=new Array(s),l=0;l<s;l++)a[l]=arguments[l];return i&&n===this&&t(a,o)||(r=e.apply(this,a),i=!0,n=this,o=a),r}}(Yj,wM)),pM({drag:e},r.current(t))}
|
|
2589
|
+
***************************************************************************** */var gk,vk,bk=function(){return bk=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},bk.apply(this,arguments)};function yk(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function xk(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function wk(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s}function Ck(e,t,n){if(2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}!function(e){e.Start="xstate.start",e.Stop="xstate.stop",e.Raise="xstate.raise",e.Send="xstate.send",e.Cancel="xstate.cancel",e.NullEvent="",e.Assign="xstate.assign",e.After="xstate.after",e.DoneState="done.state",e.DoneInvoke="done.invoke",e.Log="xstate.log",e.Init="xstate.init",e.Invoke="xstate.invoke",e.ErrorExecution="error.execution",e.ErrorCommunication="error.communication",e.ErrorPlatform="error.platform",e.ErrorCustom="xstate.error",e.Update="xstate.update",e.Pure="xstate.pure",e.Choose="xstate.choose"}(gk||(gk={})),function(e){e.Parent="#_parent",e.Internal="#_internal"}(vk||(vk={}));var kk=gk.Start,Sk=gk.Stop,$k=gk.Raise,jk=gk.Send,Mk=gk.Cancel,Ek=gk.NullEvent,Tk=gk.Assign;gk.After,gk.DoneState;var Ok=gk.Log,Lk=gk.Init,Ak=gk.Invoke;gk.ErrorExecution;var Rk,Nk=gk.ErrorPlatform,Dk=gk.ErrorCustom,Ik=gk.Update,Pk=gk.Choose,zk=gk.Pure,Vk={},Bk="xstate.guard",Hk="production"===process.env.NODE_ENV;function _k(e,t,n){void 0===n&&(n=".");var r=Wk(e,n),o=Wk(t,n);return aS(o)?!!aS(r)&&o===r:aS(r)?r in o:Object.keys(r).every((function(e){return e in o&&_k(r[e],o[e])}))}function Fk(e){try{return aS(e)||"number"==typeof e?"".concat(e):e.type}catch(e){throw new Error("Events must be strings or objects with a string event.type property.")}}function qk(e,t){try{return iS(e)?e:e.toString().split(t)}catch(t){throw new Error("'".concat(e,"' is not a valid state path."))}}function Wk(e,t){return"object"==typeof(n=e)&&"value"in n&&"context"in n&&"event"in n&&"_event"in n?e.value:iS(e)?Uk(e):"string"!=typeof e?e:Uk(qk(e,t));var n}function Uk(e){if(1===e.length)return e[0];for(var t={},n=t,r=0;r<e.length-1;r++)r===e.length-2?n[e[r]]=e[r+1]:(n[e[r]]={},n=n[e[r]]);return t}function Kk(e,t){for(var n={},r=Object.keys(e),o=0;o<r.length;o++){var i=r[o];n[i]=t(e[i],i,e,o)}return n}function Gk(e,t,n){var r,o,i={};try{for(var s=xk(Object.keys(e)),a=s.next();!a.done;a=s.next()){var l=a.value,c=e[l];n(c)&&(i[l]=t(c,l,e))}}catch(e){r={error:e}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}return i}var Zk=function(e){return function(t){var n,r,o=t;try{for(var i=xk(e),s=i.next();!s.done;s=i.next()){o=o[s.value]}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return o}};function Jk(e){return e?aS(e)?[[e]]:Xk(Object.keys(e).map((function(t){var n=e[t];return"string"==typeof n||n&&Object.keys(n).length?Jk(e[t]).map((function(e){return[t].concat(e)})):[[t]]}))):[[]]}function Xk(e){var t;return(t=[]).concat.apply(t,Ck([],wk(e),!1))}function Yk(e){return iS(e)?e:[e]}function Qk(e){return void 0===e?[]:Yk(e)}function eS(e,t,n){var r,o;if(sS(e))return e(t,n.data);var i={};try{for(var s=xk(Object.keys(e)),a=s.next();!a.done;a=s.next()){var l=a.value,c=e[l];sS(c)?i[l]=c(t,n.data):i[l]=c}}catch(e){r={error:e}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}return i}function tS(e){return e instanceof Promise||!(null===e||!sS(e)&&"object"!=typeof e||!sS(e.then))}function nS(e,t){return Kk(e.states,(function(e,n){if(e){var r=(aS(t)?void 0:t[n])||(e?e.current:void 0);if(r)return{current:r,states:nS(e,r)}}}))}function rS(e,t,n,r){Hk||oS(!!e,"Attempting to update undefined context");var o=e?n.reduce((function(e,n){var o,i,s=n.assignment,a={state:r,action:n,_event:t},l={};if(sS(s))l=s(e,t.data,a);else try{for(var c=xk(Object.keys(s)),d=c.next();!d.done;d=c.next()){var u=d.value,h=s[u];l[u]=sS(h)?h(e,t.data,a):h}}catch(e){o={error:e}}finally{try{d&&!d.done&&(i=c.return)&&i.call(c)}finally{if(o)throw o.error}}return Object.assign({},e,l)}),e):e;return o}var oS=function(){};function iS(e){return Array.isArray(e)}function sS(e){return"function"==typeof e}function aS(e){return"string"==typeof e}function lS(e,t){if(e)return aS(e)?{type:Bk,name:e,predicate:t?t[e]:void 0}:sS(e)?{type:Bk,name:e.name,predicate:e}:e}Hk||(oS=function(e,t){var n=e instanceof Error?e:void 0;if((n||!e)&&void 0!==console){var r=["Warning: ".concat(t)];n&&r.push(n),console.warn.apply(console,r)}});var cS=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}();function dS(e){return!!e&&"__xstatenode"in e}function uS(e,t){return aS(e)||"number"==typeof e?bk({type:e},t):e}function hS(e,t){if(!aS(e)&&"$$type"in e&&"scxml"===e.$$type)return e;var n=uS(e);return bk({name:n.type,data:n,$$type:"scxml",type:"external"},t)}function pS(e,t){return Yk(t).map((function(t){return void 0===t||"string"==typeof t||dS(t)?{target:t,event:e}:bk(bk({},t),{event:e})}))}function fS(e,t,n,r,o){var i=e.options.guards,s={state:o,cond:t,_event:r};if(t.type===Bk)return((null==i?void 0:i[t.name])||t.predicate)(n,r.data,s);var a=null==i?void 0:i[t.type];if(!a)throw new Error("Guard '".concat(t.type,"' is not implemented on machine '").concat(e.id,"'."));return a(n,r.data,s)}function mS(e){return"string"==typeof e?{type:e}:e}function gS(e,t,n){var r=function(){},o="object"==typeof e,i=o?e:null;return{next:((o?e.next:e)||r).bind(i),error:((o?e.error:t)||r).bind(i),complete:((o?e.complete:n)||r).bind(i)}}function vS(e,t){return"".concat(e,":invocation[").concat(t,"]")}function bS(e){return(e.type===$k||e.type===jk&&e.to===vk.Internal)&&"number"!=typeof e.delay}(Rk={})[cS]=function(){return this},Rk[Symbol.observable]=function(){return this};var yS=hS({type:Lk});function xS(e,t){return t&&t[e]||void 0}function wS(e,t){var n;if(aS(e)||"number"==typeof e)n=sS(r=xS(e,t))?{type:e,exec:r}:r||{type:e,exec:void 0};else if(sS(e))n={type:e.name||e.toString(),exec:e};else{var r;if(sS(r=xS(e.type,t)))n=bk(bk({},e),{exec:r});else if(r){var o=r.type||e.type;n=bk(bk(bk({},r),e),{type:o})}else n=e}return n}var CS=function(e,t){return e?(iS(e)?e:[e]).map((function(e){return wS(e,t)})):[]};function kS(e){var t=wS(e);return bk(bk({id:aS(e)?e:t.id},t),{type:t.type})}function SS(e,t){var n="".concat(gk.DoneState,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function $S(e,t){var n="".concat(gk.DoneInvoke,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function jS(e,t){var n="".concat(gk.ErrorPlatform,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function MS(e,t,n,r,o,i,s){void 0===s&&(s=!1);var a=s?[]:function(e){var t,n,r=[];try{for(var o=xk(e),i=o.next();!i.done;i=o.next())for(var s=i.value,a=0;a<s.actions.length;)s.actions[a].type!==Tk?a++:(r.push(s.actions[a]),s.actions.splice(a,1))}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}(o),l=a.length?rS(n,r,a,t):n,c=s?[n]:void 0,d=[];function u(o,a){var u;switch(a.type){case $k:var h=function(e,t,n,r){var o,i={_event:n},s=hS(sS(e.event)?e.event(t,n.data,i):e.event);if(aS(e.delay)){var a=r&&r[e.delay];o=sS(a)?a(t,n.data,i):a}else o=sS(e.delay)?e.delay(t,n.data,i):e.delay;return bk(bk({},e),{type:$k,_event:s,delay:o})}(a,l,r,e.options.delays);return i&&"number"==typeof h.delay&&i(h,l,r),h;case jk:var p=function(e,t,n,r){var o,i={_event:n},s=hS(sS(e.event)?e.event(t,n.data,i):e.event);if(aS(e.delay)){var a=r&&r[e.delay];o=sS(a)?a(t,n.data,i):a}else o=sS(e.delay)?e.delay(t,n.data,i):e.delay;var l=sS(e.to)?e.to(t,n.data,i):e.to;return bk(bk({},e),{to:l,_event:s,event:s.data,delay:o})}(a,l,r,e.options.delays);if(!Hk){var f=a.delay;oS(!aS(f)||"number"==typeof p.delay,"No delay reference for delay expression '".concat(f,"' was found on machine '").concat(e.id,"'"))}return i&&p.to!==vk.Internal&&("entry"===o?d.push(p):i(p,l,r)),p;case Ok:var m=function(e,t,n){return bk(bk({},e),{value:aS(e.expr)?e.expr:e.expr(t,n.data,{_event:n})})}(a,l,r);return null==i||i(m,l,r),m;case Pk:if(!(y=null===(u=a.conds.find((function(n){var o=lS(n.cond,e.options.guards);return!o||fS(e,o,l,r,i?void 0:t)})))||void 0===u?void 0:u.actions))return[];var g=wk(MS(e,t,l,r,[{type:o,actions:CS(Qk(y),e.options.actions)}],i,s),2),v=g[0],b=g[1];return l=b,null==c||c.push(l),v;case zk:var y;if(!(y=a.get(l,r.data)))return[];var x=wk(MS(e,t,l,r,[{type:o,actions:CS(Qk(y),e.options.actions)}],i,s),2),w=x[0],C=x[1];return l=C,null==c||c.push(l),w;case Sk:m=function(e,t,n){var r=sS(e.activity)?e.activity(t,n.data):e.activity,o="string"==typeof r?{id:r}:r;return{type:gk.Stop,activity:o}}(a,l,r);return null==i||i(m,n,r),m;case Tk:l=rS(l,r,[a],i?void 0:t),null==c||c.push(l);break;default:var k=wS(a,e.options.actions),S=k.exec;if(i)i(k,l,r);else if(S&&c){var $=c.length-1,j=bk(bk({},k),{exec:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];S.apply(void 0,Ck([c[$]],wk(t),!1))}});k=j}return k}}var h=Xk(o.map((function(e){var t,n,o=[];try{for(var s=xk(e.actions),a=s.next();!a.done;a=s.next()){var c=a.value,h=u(e.type,c);h&&(o=o.concat(h))}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return d.forEach((function(e){i(e,l,r)})),d.length=0,o})));return[h,l]}var ES=function(e,t){return t(e)};function TS(e){var t;return(t={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:e}}})[cS]=function(){return this},t}function OS(e,t,n){var r=TS(t);if(r.deferred=!0,dS(e)){var o=r.state=ES(void 0,(function(){return(n?e.withContext(n):e).initialState}));r.getSnapshot=function(){return o}}return r}var LS=function(e){return"atomic"===e.type||"final"===e.type};function AS(e){return Object.keys(e.states).map((function(t){return e.states[t]}))}function RS(e){return AS(e).filter((function(e){return"history"!==e.type}))}function NS(e){var t=[e];return LS(e)?t:t.concat(Xk(RS(e).map(NS)))}function DS(e,t){var n,r,o,i,s,a,l,c,d=PS(new Set(e)),u=new Set(t);try{for(var h=xk(u),p=h.next();!p.done;p=h.next())for(var f=(k=p.value).parent;f&&!u.has(f);)u.add(f),f=f.parent}catch(e){n={error:e}}finally{try{p&&!p.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}var m=PS(u);try{for(var g=xk(u),v=g.next();!v.done;v=g.next()){if("compound"!==(k=v.value).type||m.get(k)&&m.get(k).length){if("parallel"===k.type)try{for(var b=(s=void 0,xk(RS(k))),y=b.next();!y.done;y=b.next()){var x=y.value;u.has(x)||(u.add(x),d.get(x)?d.get(x).forEach((function(e){return u.add(e)})):x.initialStateNodes.forEach((function(e){return u.add(e)})))}}catch(e){s={error:e}}finally{try{y&&!y.done&&(a=b.return)&&a.call(b)}finally{if(s)throw s.error}}}else d.get(k)?d.get(k).forEach((function(e){return u.add(e)})):k.initialStateNodes.forEach((function(e){return u.add(e)}))}}catch(e){o={error:e}}finally{try{v&&!v.done&&(i=g.return)&&i.call(g)}finally{if(o)throw o.error}}try{for(var w=xk(u),C=w.next();!C.done;C=w.next()){var k;for(f=(k=C.value).parent;f&&!u.has(f);)u.add(f),f=f.parent}}catch(e){l={error:e}}finally{try{C&&!C.done&&(c=w.return)&&c.call(w)}finally{if(l)throw l.error}}return u}function IS(e,t){var n=t.get(e);if(!n)return{};if("compound"===e.type){var r=n[0];if(!r)return{};if(LS(r))return r.key}var o={};return n.forEach((function(e){o[e.key]=IS(e,t)})),o}function PS(e){var t,n,r=new Map;try{for(var o=xk(e),i=o.next();!i.done;i=o.next()){var s=i.value;r.has(s)||r.set(s,[]),s.parent&&(r.has(s.parent)||r.set(s.parent,[]),r.get(s.parent).push(s))}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}function zS(e,t){return IS(e,PS(DS([e],t)))}function VS(e,t){return Array.isArray(e)?e.some((function(e){return e===t})):e instanceof Set&&e.has(t)}function BS(e,t){return"compound"===t.type?RS(t).some((function(t){return"final"===t.type&&VS(e,t)})):"parallel"===t.type&&RS(t).every((function(t){return BS(e,t)}))}function HS(e){return new Set(Xk(e.map((function(e){return e.tags}))))}function _S(e,t){if(e===t)return!0;if(void 0===e||void 0===t)return!1;if(aS(e)||aS(t))return e===t;var n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every((function(n){return _S(e[n],t[n])}))}var FS=function(){function e(e){var t,n,r=this;this.actions=[],this.activities=Vk,this.meta={},this.events=[],this.value=e.value,this.context=e.context,this._event=e._event,this._sessionid=e._sessionid,this.event=this._event.data,this.historyValue=e.historyValue,this.history=e.history,this.actions=e.actions||[],this.activities=e.activities||Vk,this.meta=(void 0===(n=e.configuration)&&(n=[]),n.reduce((function(e,t){return void 0!==t.meta&&(e[t.id]=t.meta),e}),{})),this.events=e.events||[],this.matches=this.matches.bind(this),this.toStrings=this.toStrings.bind(this),this.configuration=e.configuration,this.transitions=e.transitions,this.children=e.children,this.done=!!e.done,this.tags=null!==(t=Array.isArray(e.tags)?new Set(e.tags):e.tags)&&void 0!==t?t:new Set,this.machine=e.machine,Object.defineProperty(this,"nextEvents",{get:function(){return function(e){return Ck([],wk(new Set(Xk(Ck([],wk(e.map((function(e){return e.ownEvents}))),!1)))),!1)}(r.configuration)}})}return e.from=function(t,n){return t instanceof e?t.context!==n?new e({value:t.value,context:n,_event:t._event,_sessionid:null,historyValue:t.historyValue,history:t.history,actions:[],activities:t.activities,events:[],configuration:[],transitions:[],children:{}}):t:new e({value:t,context:n,_event:yS,_sessionid:null,historyValue:void 0,history:void 0,actions:[],activities:void 0,events:[],configuration:[],transitions:[],children:{}})},e.create=function(t){return new e(t)},e.inert=function(t,n){if(t instanceof e){if(!t.actions.length)return t;var r=yS;return new e({value:t.value,context:n,_event:r,_sessionid:null,historyValue:t.historyValue,history:t.history,activities:t.activities,configuration:t.configuration,transitions:[],children:{}})}return e.from(t,n)},e.prototype.toStrings=function(e,t){var n=this;if(void 0===e&&(e=this.value),void 0===t&&(t="."),aS(e))return[e];var r=Object.keys(e);return r.concat.apply(r,Ck([],wk(r.map((function(r){return n.toStrings(e[r],t).map((function(e){return r+t+e}))}))),!1))},e.prototype.toJSON=function(){var e=this;e.configuration,e.transitions;var t=e.tags;e.machine;var n=yk(e,["configuration","transitions","tags","machine"]);return bk(bk({},n),{tags:Array.from(t)})},e.prototype.matches=function(e){return _k(e,this.value)},e.prototype.hasTag=function(e){return this.tags.has(e)},e.prototype.can=function(e){var t;Hk&&oS(!!this.machine,"state.can(...) used outside of a machine-created State object; this will always return false.");var n=null===(t=this.machine)||void 0===t?void 0:t.getTransitionData(this,e);return!!(null==n?void 0:n.transitions.length)&&n.transitions.some((function(e){return void 0!==e.target||e.actions.length}))},e}(),qS={deferEvents:!1},WS=function(){function e(e){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=bk(bk({},qS),e)}return e.prototype.initialize=function(e){if(this.initialized=!0,e){if(!this.options.deferEvents)return void this.schedule(e);this.process(e)}this.flushEvents()},e.prototype.schedule=function(e){if(this.initialized&&!this.processingEvent){if(0!==this.queue.length)throw new Error("Event queue should be empty when it is not processing events");this.process(e),this.flushEvents()}else this.queue.push(e)},e.prototype.clear=function(){this.queue=[]},e.prototype.flushEvents=function(){for(var e=this.queue.shift();e;)this.process(e),e=this.queue.shift()},e.prototype.process=function(e){this.processingEvent=!0;try{e()}catch(e){throw this.clear(),e}finally{this.processingEvent=!1}},e}(),US=new Map,KS=0,GS=function(){return"x:".concat(KS++)},ZS=function(e,t){return US.set(e,t),e},JS=function(e){return US.get(e)},XS=function(e){US.delete(e)};function YS(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void(Hk||console.warn("XState could not find a global object in this environment. Please let the maintainers know and raise an issue here: https://github.com/statelyai/xstate/issues"))}function QS(e){if(YS()){var t=function(){var e=YS();if(e&&"__xstate__"in e)return e.__xstate__}();t&&t.register(e)}}function e$(e,t){void 0===t&&(t={});var n=e.initialState,r=new Set,o=[],i=!1,s=function(e){var t;return bk(((t={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}})[cS]=function(){return this},t),e)}({id:t.id,send:function(t){o.push(t),function(){if(!i){for(i=!0;o.length>0;){var t=o.shift();n=e.transition(n,t,a),r.forEach((function(e){return e.next(n)}))}i=!1}}()},getSnapshot:function(){return n},subscribe:function(e,t,o){var i=gS(e,t,o);return r.add(i),i.next(n),{unsubscribe:function(){r.delete(i)}}}}),a={parent:t.parent,self:s,id:t.id||"anonymous",observers:r};return n=e.start?e.start(a):n,s}var t$,n$={sync:!1,autoForward:!1};!function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(t$||(t$={}));var r$=function(){function e(t,n){void 0===n&&(n=e.defaultOptions);var r=this;this.machine=t,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=t$.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(e,t){if(iS(e))return r.batch(e),r.state;var n=hS(uS(e,t));if(r.status===t$.Stopped)return Hk||oS(!1,'Event "'.concat(n.name,'" was sent to stopped service "').concat(r.machine.id,'". This service has already reached its final state, and will not transition.\nEvent: ').concat(JSON.stringify(n.data))),r.state;if(r.status!==t$.Running&&!r.options.deferEvents)throw new Error('Event "'.concat(n.name,'" was sent to uninitialized service "').concat(r.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.\nEvent: ').concat(JSON.stringify(n.data)));return r.scheduler.schedule((function(){r.forward(n);var e=r._nextState(n);r.update(e,n)})),r._state},this.sendTo=function(e,t,n){var o,i=r.parent&&(t===vk.Parent||r.parent.id===t),s=i?r.parent:aS(t)?t===vk.Internal?r:r.children.get(t)||JS(t):(o=t)&&"function"==typeof o.send?t:void 0;if(s)if("machine"in s){if(r.status!==t$.Stopped||r.parent!==s||r.state.done){var a=bk(bk({},e),{name:e.name===Dk?"".concat(jS(r.id)):e.name,origin:r.sessionId});!n&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([s,a]):s.send(a)}}else!n&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([s,e.data]):s.send(e.data);else{if(!i)throw new Error("Unable to send event to child '".concat(t,"' from service '").concat(r.id,"'."));Hk||oS(!1,"Service '".concat(r.id,"' has no parent: unable to send event ").concat(e.type))}},this._exec=function(e,t,n,o){void 0===o&&(o=r.machine.options.actions);var i=e.exec||xS(e.type,o),s=sS(i)?i:i?i.exec:e.exec;if(s)try{return s(t,n.data,r.machine.config.predictableActionArguments?{action:e,_event:n}:{action:e,state:r.state,_event:n})}catch(e){throw r.parent&&r.parent.send({type:"xstate.error",data:e}),e}switch(e.type){case $k:var a=e;r.defer(a);break;case jk:var l=e;if("number"==typeof l.delay)return void r.defer(l);l.to?r.sendTo(l._event,l.to,n===yS):r.send(l._event);break;case Mk:r.cancel(e.sendId);break;case kk:if(r.status!==t$.Running)return;var c=e.activity;if(!r.machine.config.predictableActionArguments&&!r.state.activities[c.id||c.type])break;if(c.type===gk.Invoke){var d=mS(c.src),u=r.machine.options.services?r.machine.options.services[d.type]:void 0,h=c.id,p=c.data;Hk||oS(!("forward"in c),"`forward` property is deprecated (found in invocation of '".concat(c.src,"' in in machine '").concat(r.machine.id,"'). ")+"Please use `autoForward` instead.");var f="autoForward"in c?c.autoForward:!!c.forward;if(!u)return void(Hk||oS(!1,"No service found for invocation '".concat(c.src,"' in machine '").concat(r.machine.id,"'.")));var m=p?eS(p,t,n):void 0;if("string"==typeof u)return;var g=sS(u)?u(t,n.data,{data:m,src:d,meta:c.meta}):u;if(!g)return;var v=void 0;dS(g)&&(g=m?g.withContext(m):g,v={autoForward:f}),r.spawn(g,h,v)}else r.spawnActivity(c);break;case Sk:r.stopChild(e.activity.id);break;case Ok:var b=e,y=b.label,x=b.value;y?r.logger(y,x):r.logger(x);break;default:Hk||oS(!1,"No implementation found for action type '".concat(e.type,"'"))}};var o=bk(bk({},e.defaultOptions),n),i=o.clock,s=o.logger,a=o.parent,l=o.id,c=void 0!==l?l:t.id;this.id=c,this.logger=s,this.clock=i,this.parent=a,this.options=o,this.scheduler=new WS({deferEvents:this.options.deferEvents}),this.sessionId=GS()}return Object.defineProperty(e.prototype,"initialState",{get:function(){var e=this;return this._initialState?this._initialState:ES(this,(function(){return e._initialState=e.machine.initialState,e._initialState}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return Hk||oS(this.status!==t$.NotStarted,"Attempted to read state from uninitialized service '".concat(this.id,"'. Make sure the service is started first.")),this._state},enumerable:!1,configurable:!0}),e.prototype.execute=function(e,t){var n,r;try{for(var o=xk(e.actions),i=o.next();!i.done;i=o.next()){var s=i.value;this.exec(s,e,t)}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},e.prototype.update=function(e,t){var n,r,o,i,s,a,l,c,d=this;if(e._sessionid=this.sessionId,this._state=e,this.machine.config.predictableActionArguments&&t!==yS||!this.options.execute)for(var u=void 0;u=this._outgoingQueue.shift();)u[0].send(u[1]);else this.execute(this.state);if(this.children.forEach((function(e){d.state.children[e.id]=e})),this.devTools&&this.devTools.send(t.data,e),e.event)try{for(var h=xk(this.eventListeners),p=h.next();!p.done;p=h.next()){(0,p.value)(e.event)}}catch(e){n={error:e}}finally{try{p&&!p.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}try{for(var f=xk(this.listeners),m=f.next();!m.done;m=f.next()){(0,m.value)(e,e.event)}}catch(e){o={error:e}}finally{try{m&&!m.done&&(i=f.return)&&i.call(f)}finally{if(o)throw o.error}}try{for(var g=xk(this.contextListeners),v=g.next();!v.done;v=g.next()){(0,v.value)(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(e){s={error:e}}finally{try{v&&!v.done&&(a=g.return)&&a.call(g)}finally{if(s)throw s.error}}if(this.state.done){var b=e.configuration.find((function(e){return"final"===e.type&&e.parent===d.machine})),y=b&&b.doneData?eS(b.doneData,e.context,t):void 0;this._doneEvent=$S(this.id,y);try{for(var x=xk(this.doneListeners),w=x.next();!w.done;w=x.next()){(0,w.value)(this._doneEvent)}}catch(e){l={error:e}}finally{try{w&&!w.done&&(c=x.return)&&c.call(x)}finally{if(l)throw l.error}}this._stop(),this._stopChildren(),XS(this.sessionId)}},e.prototype.onTransition=function(e){return this.listeners.add(e),this.status===t$.Running&&e(this.state,this.state.event),this},e.prototype.subscribe=function(e,t,n){var r=this,o=gS(e,t,n);this.listeners.add(o.next),this.status!==t$.NotStarted&&o.next(this.state);var i=function(){r.doneListeners.delete(i),r.stopListeners.delete(i),o.complete()};return this.status===t$.Stopped?o.complete():(this.onDone(i),this.onStop(i)),{unsubscribe:function(){r.listeners.delete(o.next),r.doneListeners.delete(i),r.stopListeners.delete(i)}}},e.prototype.onEvent=function(e){return this.eventListeners.add(e),this},e.prototype.onSend=function(e){return this.sendListeners.add(e),this},e.prototype.onChange=function(e){return this.contextListeners.add(e),this},e.prototype.onStop=function(e){return this.stopListeners.add(e),this},e.prototype.onDone=function(e){return this.status===t$.Stopped&&this._doneEvent?e(this._doneEvent):this.doneListeners.add(e),this},e.prototype.off=function(e){return this.listeners.delete(e),this.eventListeners.delete(e),this.sendListeners.delete(e),this.stopListeners.delete(e),this.doneListeners.delete(e),this.contextListeners.delete(e),this},e.prototype.start=function(e){var t=this;if(this.status===t$.Running)return this;this.machine._init(),ZS(this.sessionId,this),this.initialized=!0,this.status=t$.Running;var n=void 0===e?this.initialState:ES(this,(function(){return"object"==typeof(n=e)&&null!==n&&"value"in n&&"_event"in n?t.machine.resolveState(e):t.machine.resolveState(FS.from(e,t.machine.context));var n}));return this.options.devTools&&this.attachDev(),this.scheduler.initialize((function(){t.update(n,yS)})),this},e.prototype._stopChildren=function(){this.children.forEach((function(e){sS(e.stop)&&e.stop()})),this.children.clear()},e.prototype._stop=function(){var e,t,n,r,o,i,s,a,l,c;try{for(var d=xk(this.listeners),u=d.next();!u.done;u=d.next()){var h=u.value;this.listeners.delete(h)}}catch(t){e={error:t}}finally{try{u&&!u.done&&(t=d.return)&&t.call(d)}finally{if(e)throw e.error}}try{for(var p=xk(this.stopListeners),f=p.next();!f.done;f=p.next()){(h=f.value)(),this.stopListeners.delete(h)}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=p.return)&&r.call(p)}finally{if(n)throw n.error}}try{for(var m=xk(this.contextListeners),g=m.next();!g.done;g=m.next()){h=g.value;this.contextListeners.delete(h)}}catch(e){o={error:e}}finally{try{g&&!g.done&&(i=m.return)&&i.call(m)}finally{if(o)throw o.error}}try{for(var v=xk(this.doneListeners),b=v.next();!b.done;b=v.next()){h=b.value;this.doneListeners.delete(h)}}catch(e){s={error:e}}finally{try{b&&!b.done&&(a=v.return)&&a.call(v)}finally{if(s)throw s.error}}if(!this.initialized)return this;this.initialized=!1,this.status=t$.Stopped,this._initialState=void 0;try{for(var y=xk(Object.keys(this.delayedEventsMap)),x=y.next();!x.done;x=y.next()){var w=x.value;this.clock.clearTimeout(this.delayedEventsMap[w])}}catch(e){l={error:e}}finally{try{x&&!x.done&&(c=y.return)&&c.call(y)}finally{if(l)throw l.error}}this.scheduler.clear(),this.scheduler=new WS({deferEvents:this.options.deferEvents})},e.prototype.stop=function(){var e=this,t=this.scheduler;return this._stop(),t.schedule((function(){var t;if(!(null===(t=e._state)||void 0===t?void 0:t.done)){var n=hS({type:"xstate.stop"}),r=ES(e,(function(){var t=Xk(Ck([],wk(e.state.configuration),!1).sort((function(e,t){return t.order-e.order})).map((function(t){return CS(t.onExit,e.machine.options.actions)}))),r=wk(MS(e.machine,e.state,e.state.context,n,[{type:"exit",actions:t}],e.machine.config.predictableActionArguments?e._exec:void 0,e.machine.config.predictableActionArguments||e.machine.config.preserveActionOrder),2),o=r[0],i=r[1],s=new FS({value:e.state.value,context:i,_event:n,_sessionid:e.sessionId,historyValue:void 0,history:e.state,actions:o.filter((function(e){return!bS(e)})),activities:{},events:[],configuration:[],transitions:[],children:{},done:e.state.done,tags:e.state.tags,machine:e.machine});return s.changed=!0,s}));e.update(r,n),e._stopChildren(),XS(e.sessionId)}})),this},e.prototype.batch=function(e){var t=this;if(this.status===t$.NotStarted&&this.options.deferEvents)Hk||oS(!1,"".concat(e.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'" and are deferred. Make sure .start() is called for this service.\nEvent: ').concat(JSON.stringify(event)));else if(this.status!==t$.Running)throw new Error("".concat(e.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.'));if(e.length){var n=!!this.machine.config.predictableActionArguments&&this._exec;this.scheduler.schedule((function(){var r,o,i=t.state,s=!1,a=[],l=function(e){var r=hS(e);t.forward(r),i=ES(t,(function(){return t.machine.transition(i,r,void 0,n||void 0)})),a.push.apply(a,Ck([],wk(t.machine.config.predictableActionArguments?i.actions:i.actions.map((function(e){return function(e,t){var n=e.exec;return bk(bk({},e),{exec:void 0!==n?function(){return n(t.context,t.event,{action:e,state:t,_event:t._event})}:void 0})}(e,i)}))),!1)),s=s||!!i.changed};try{for(var c=xk(e),d=c.next();!d.done;d=c.next()){l(d.value)}}catch(e){r={error:e}}finally{try{d&&!d.done&&(o=c.return)&&o.call(c)}finally{if(r)throw r.error}}i.changed=s,i.actions=a,t.update(i,hS(e[e.length-1]))}))}},e.prototype.sender=function(e){return this.send.bind(this,e)},e.prototype._nextState=function(e,t){var n=this;void 0===t&&(t=!!this.machine.config.predictableActionArguments&&this._exec);var r=hS(e);if(0===r.name.indexOf(Nk)&&!this.state.nextEvents.some((function(e){return 0===e.indexOf(Nk)})))throw r.data.data;return ES(this,(function(){return n.machine.transition(n.state,r,void 0,t||void 0)}))},e.prototype.nextState=function(e){return this._nextState(e,!1)},e.prototype.forward=function(e){var t,n;try{for(var r=xk(this.forwardTo),o=r.next();!o.done;o=r.next()){var i=o.value,s=this.children.get(i);if(!s)throw new Error("Unable to forward event '".concat(e,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(i,"'."));s.send(e)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},e.prototype.defer=function(e){var t=this,n=this.clock.setTimeout((function(){"to"in e&&e.to?t.sendTo(e._event,e.to,!0):t.send(e._event)}),e.delay);e.id&&(this.delayedEventsMap[e.id]=n)},e.prototype.cancel=function(e){this.clock.clearTimeout(this.delayedEventsMap[e]),delete this.delayedEventsMap[e]},e.prototype.exec=function(e,t,n){void 0===n&&(n=this.machine.options.actions),this._exec(e,t.context,t._event,n)},e.prototype.removeChild=function(e){var t;this.children.delete(e),this.forwardTo.delete(e),null===(t=this.state)||void 0===t||delete t.children[e]},e.prototype.stopChild=function(e){var t=this.children.get(e);t&&(this.removeChild(e),sS(t.stop)&&t.stop())},e.prototype.spawn=function(e,t,n){if(this.status!==t$.Running)return OS(e,t);if(tS(e))return this.spawnPromise(Promise.resolve(e),t);if(sS(e))return this.spawnCallback(e,t);if(function(e){try{return"function"==typeof e.send}catch(e){return!1}}(o=e)&&"id"in o)return this.spawnActor(e,t);if(function(e){try{return"subscribe"in e&&sS(e.subscribe)}catch(e){return!1}}(e))return this.spawnObservable(e,t);if(dS(e))return this.spawnMachine(e,bk(bk({},n),{id:t}));if(null!==(r=e)&&"object"==typeof r&&"transition"in r&&"function"==typeof r.transition)return this.spawnBehavior(e,t);throw new Error('Unable to spawn entity "'.concat(t,'" of type "').concat(typeof e,'".'));var r,o},e.prototype.spawnMachine=function(t,n){var r=this;void 0===n&&(n={});var o=new e(t,bk(bk({},this.options),{parent:this,id:n.id||t.id})),i=bk(bk({},n$),n);i.sync&&o.onTransition((function(e){r.send(Ik,{state:e,id:o.id})}));var s=o;return this.children.set(o.id,s),i.autoForward&&this.forwardTo.add(o.id),o.onDone((function(e){r.removeChild(o.id),r.send(hS(e,{origin:o.id}))})).start(),s},e.prototype.spawnBehavior=function(e,t){var n=e$(e,{id:t,parent:this});return this.children.set(t,n),n},e.prototype.spawnPromise=function(e,t){var n,r,o=this,i=!1;e.then((function(e){i||(r=e,o.removeChild(t),o.send(hS($S(t,e),{origin:t})))}),(function(e){if(!i){o.removeChild(t);var n=jS(t,e);try{o.send(hS(n,{origin:t}))}catch(r){!function(e,t,n){if(!Hk){var r=e.stack?" Stacktrace was '".concat(e.stack,"'"):"";if(e===t)console.error("Missing onError handler for invocation '".concat(n,"', error was '").concat(e,"'.").concat(r));else{var o=t.stack?" Stacktrace was '".concat(t.stack,"'"):"";console.error("Missing onError handler and/or unhandled exception/promise rejection for invocation '".concat(n,"'. ")+"Original error: '".concat(e,"'. ").concat(r," Current error is '").concat(t,"'.").concat(o))}}}(e,r,t),o.devTools&&o.devTools.send(n,o.state),o.machine.strict&&o.stop()}}}));var s=((n={id:t,send:function(){},subscribe:function(t,n,r){var o=gS(t,n,r),i=!1;return e.then((function(e){i||(o.next(e),i||o.complete())}),(function(e){i||o.error(e)})),{unsubscribe:function(){return i=!0}}},stop:function(){i=!0},toJSON:function(){return{id:t}},getSnapshot:function(){return r}})[cS]=function(){return this},n);return this.children.set(t,s),s},e.prototype.spawnCallback=function(e,t){var n,r,o,i=this,s=!1,a=new Set,l=new Set;try{o=e((function(e){r=e,l.forEach((function(t){return t(e)})),s||i.send(hS(e,{origin:t}))}),(function(e){a.add(e)}))}catch(e){this.send(jS(t,e))}if(tS(o))return this.spawnPromise(o,t);var c=((n={id:t,send:function(e){return a.forEach((function(t){return t(e)}))},subscribe:function(e){var t=gS(e);return l.add(t.next),{unsubscribe:function(){l.delete(t.next)}}},stop:function(){s=!0,sS(o)&&o()},toJSON:function(){return{id:t}},getSnapshot:function(){return r}})[cS]=function(){return this},n);return this.children.set(t,c),c},e.prototype.spawnObservable=function(e,t){var n,r,o=this,i=e.subscribe((function(e){r=e,o.send(hS(e,{origin:t}))}),(function(e){o.removeChild(t),o.send(hS(jS(t,e),{origin:t}))}),(function(){o.removeChild(t),o.send(hS($S(t),{origin:t}))})),s=((n={id:t,send:function(){},subscribe:function(t,n,r){return e.subscribe(t,n,r)},stop:function(){return i.unsubscribe()},getSnapshot:function(){return r},toJSON:function(){return{id:t}}})[cS]=function(){return this},n);return this.children.set(t,s),s},e.prototype.spawnActor=function(e,t){return this.children.set(t,e),e},e.prototype.spawnActivity=function(e){var t=this.machine.options&&this.machine.options.activities?this.machine.options.activities[e.type]:void 0;if(t){var n=t(this.state.context,e);this.spawnEffect(e.id,n)}else Hk||oS(!1,"No implementation found for activity '".concat(e.type,"'"))},e.prototype.spawnEffect=function(e,t){var n;this.children.set(e,((n={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:t||void 0,getSnapshot:function(){},toJSON:function(){return{id:e}}})[cS]=function(){return this},n))},e.prototype.attachDev=function(){var e=YS();if(this.options.devTools&&e){if(e.__REDUX_DEVTOOLS_EXTENSION__){var t="object"==typeof this.options.devTools?this.options.devTools:void 0;this.devTools=e.__REDUX_DEVTOOLS_EXTENSION__.connect(bk(bk({name:this.id,autoPause:!0,stateSanitizer:function(e){return{value:e.value,context:e.context,actions:e.actions}}},t),{features:bk({jump:!1,skip:!1},t?t.features:void 0)}),this.machine),this.devTools.init(this.state)}QS(this)}},e.prototype.toJSON=function(){return{id:this.id}},e.prototype[cS]=function(){return this},e.prototype.getSnapshot=function(){return this.status===t$.NotStarted?this.initialState:this._state},e.defaultOptions={execute:!0,deferEvents:!0,clock:{setTimeout:function(e,t){return setTimeout(e,t)},clearTimeout:function(e){return clearTimeout(e)}},logger:console.log.bind(console),devTools:!1},e.interpret=o$,e}();function o$(e,t){return new r$(e,t)}function i$(e){if("string"==typeof e){var t={type:e,toString:function(){return e}};return t}return e}function s$(e){return bk(bk({type:Ak},e),{toJSON:function(){e.onDone,e.onError;var t=yk(e,["onDone","onError"]);return bk(bk({},t),{type:Ak,src:i$(e.src)})}})}var a$="",l$="*",c$={},d$=function(e){return"#"===e[0]},u$=function(){function e(t,n,r,o){void 0===r&&(r="context"in t?t.context:void 0);var i,s=this;this.config=t,this._context=r,this.order=-1,this.__xstatenode=!0,this.__cache={events:void 0,relativeValue:new Map,initialStateValue:void 0,initialState:void 0,on:void 0,transitions:void 0,candidates:{},delayedTransitions:void 0},this.idMap={},this.tags=[],this.options=Object.assign({actions:{},guards:{},services:{},activities:{},delays:{}},n),this.parent=null==o?void 0:o.parent,this.key=this.config.key||(null==o?void 0:o.key)||this.config.id||"(machine)",this.machine=this.parent?this.parent.machine:this,this.path=this.parent?this.parent.path.concat(this.key):[],this.delimiter=this.config.delimiter||(this.parent?this.parent.delimiter:"."),this.id=this.config.id||Ck([this.machine.key],wk(this.path),!1).join(this.delimiter),this.version=this.parent?this.parent.version:this.config.version,this.type=this.config.type||(this.config.parallel?"parallel":this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.schema=this.parent?this.machine.schema:null!==(i=this.config.schema)&&void 0!==i?i:{},this.description=this.config.description,Hk||oS(!("parallel"in this.config),'The "parallel" property is deprecated and will be removed in version 4.1. '.concat(this.config.parallel?"Replace with `type: 'parallel'`":"Use `type: '".concat(this.type,"'`")," in the config for state node '").concat(this.id,"' instead.")),this.initial=this.config.initial,this.states=this.config.states?Kk(this.config.states,(function(t,n){var r,o=new e(t,{},void 0,{parent:s,key:n});return Object.assign(s.idMap,bk(((r={})[o.id]=o,r),o.idMap)),o})):c$;var a=0;!function e(t){var n,r;t.order=a++;try{for(var o=xk(AS(t)),i=o.next();!i.done;i=o.next()){e(i.value)}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}(this),this.history=!0===this.config.history?"shallow":this.config.history||!1,this._transient=!!this.config.always||!!this.config.on&&(Array.isArray(this.config.on)?this.config.on.some((function(e){return e.event===a$})):a$ in this.config.on),this.strict=!!this.config.strict,this.onEntry=Qk(this.config.entry||this.config.onEntry).map((function(e){return wS(e)})),this.onExit=Qk(this.config.exit||this.config.onExit).map((function(e){return wS(e)})),this.meta=this.config.meta,this.doneData="final"===this.type?this.config.data:void 0,this.invoke=Qk(this.config.invoke).map((function(e,t){var n,r;if(dS(e)){var o=vS(s.id,t);return s.machine.options.services=bk(((n={})[o]=e,n),s.machine.options.services),s$({src:o,id:o})}if(aS(e.src)){o=e.id||vS(s.id,t);return s$(bk(bk({},e),{id:o,src:e.src}))}if(dS(e.src)||sS(e.src)){o=e.id||vS(s.id,t);return s.machine.options.services=bk(((r={})[o]=e.src,r),s.machine.options.services),s$(bk(bk({id:o},e),{src:o}))}var i=e.src;return s$(bk(bk({id:vS(s.id,t)},e),{src:i}))})),this.activities=Qk(this.config.activities).concat(this.invoke).map((function(e){return kS(e)})),this.transition=this.transition.bind(this),this.tags=Qk(this.config.tags)}return e.prototype._init=function(){this.__cache.transitions||NS(this).forEach((function(e){return e.on}))},e.prototype.withConfig=function(t,n){var r=this.options,o=r.actions,i=r.activities,s=r.guards,a=r.services,l=r.delays;return new e(this.config,{actions:bk(bk({},o),t.actions),activities:bk(bk({},i),t.activities),guards:bk(bk({},s),t.guards),services:bk(bk({},a),t.services),delays:bk(bk({},l),t.delays)},null!=n?n:this.context)},e.prototype.withContext=function(t){return new e(this.config,this.options,t)},Object.defineProperty(e.prototype,"context",{get:function(){return sS(this._context)?this._context():this._context},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"definition",{get:function(){return{id:this.id,key:this.key,version:this.version,context:this.context,type:this.type,initial:this.initial,history:this.history,states:Kk(this.states,(function(e){return e.definition})),on:this.on,transitions:this.transitions,entry:this.onEntry,exit:this.onExit,activities:this.activities||[],meta:this.meta,order:this.order||-1,data:this.doneData,invoke:this.invoke,description:this.description,tags:this.tags}},enumerable:!1,configurable:!0}),e.prototype.toJSON=function(){return this.definition},Object.defineProperty(e.prototype,"on",{get:function(){if(this.__cache.on)return this.__cache.on;var e=this.transitions;return this.__cache.on=e.reduce((function(e,t){return e[t.eventType]=e[t.eventType]||[],e[t.eventType].push(t),e}),{})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:!1,configurable:!0}),e.prototype.getCandidates=function(e){if(this.__cache.candidates[e])return this.__cache.candidates[e];var t=e===a$,n=this.transitions.filter((function(n){var r=n.eventType===e;return t?r:r||n.eventType===l$}));return this.__cache.candidates[e]=n,n},e.prototype.getDelayedTransitions=function(){var e=this,t=this.config.after;if(!t)return[];var n=function(t,n){var r=function(e,t){var n=t?"#".concat(t):"";return"".concat(gk.After,"(").concat(e,")").concat(n)}(sS(t)?"".concat(e.id,":delay[").concat(n,"]"):t,e.id);return e.onEntry.push(function(e,t){return{to:t?t.to:void 0,type:jk,event:sS(e)?e:uS(e),delay:t?t.delay:void 0,id:t&&void 0!==t.id?t.id:sS(e)?e.name:Fk(e)}}(r,{delay:t})),e.onExit.push({type:Mk,sendId:r}),r},r=iS(t)?t.map((function(e,t){var r=n(e.delay,t);return bk(bk({},e),{event:r})})):Xk(Object.keys(t).map((function(e,r){var o=t[e],i=aS(o)?{target:o}:o,s=isNaN(+e)?e:+e,a=n(s,r);return Qk(i).map((function(e){return bk(bk({},e),{event:a,delay:s})}))})));return r.map((function(t){var n=t.delay;return bk(bk({},e.formatTransition(t)),{delay:n})}))},e.prototype.getStateNodes=function(e){var t,n=this;if(!e)return[];var r=e instanceof FS?e.value:Wk(e,this.delimiter);if(aS(r)){var o=this.getStateNode(r).initial;return void 0!==o?this.getStateNodes(((t={})[r]=o,t)):[this,this.states[r]]}var i=Object.keys(r),s=[this];return s.push.apply(s,Ck([],wk(Xk(i.map((function(e){return n.getStateNode(e).getStateNodes(r[e])})))),!1)),s},e.prototype.handles=function(e){var t=Fk(e);return this.events.includes(t)},e.prototype.resolveState=function(e){var t=e instanceof FS?e:FS.create(e),n=Array.from(DS([],this.getStateNodes(t.value)));return new FS(bk(bk({},t),{value:this.resolve(t.value),configuration:n,done:BS(n,this),tags:HS(n),machine:this.machine}))},e.prototype.transitionLeafNode=function(e,t,n){var r=this.getStateNode(e).next(t,n);return r&&r.transitions.length?r:this.next(t,n)},e.prototype.transitionCompoundNode=function(e,t,n){var r=Object.keys(e),o=this.getStateNode(r[0])._transition(e[r[0]],t,n);return o&&o.transitions.length?o:this.next(t,n)},e.prototype.transitionParallelNode=function(e,t,n){var r,o,i={};try{for(var s=xk(Object.keys(e)),a=s.next();!a.done;a=s.next()){var l=a.value,c=e[l];if(c){var d=this.getStateNode(l)._transition(c,t,n);d&&(i[l]=d)}}}catch(e){r={error:e}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}var u=Object.keys(i).map((function(e){return i[e]})),h=Xk(u.map((function(e){return e.transitions})));if(!u.some((function(e){return e.transitions.length>0})))return this.next(t,n);var p=Xk(Object.keys(i).map((function(e){return i[e].configuration})));return{transitions:h,exitSet:Xk(u.map((function(e){return e.exitSet}))),configuration:p,source:t,actions:Xk(Object.keys(i).map((function(e){return i[e].actions})))}},e.prototype._transition=function(e,t,n){return aS(e)?this.transitionLeafNode(e,t,n):1===Object.keys(e).length?this.transitionCompoundNode(e,t,n):this.transitionParallelNode(e,t,n)},e.prototype.getTransitionData=function(e,t){return this._transition(e.value,e,hS(t))},e.prototype.next=function(e,t){var n,r,o,i=this,s=t.name,a=[],l=[];try{for(var c=xk(this.getCandidates(s)),d=c.next();!d.done;d=c.next()){var u=d.value,h=u.cond,p=u.in,f=e.context,m=!p||(aS(p)&&d$(p)?e.matches(Wk(this.getStateNodeById(p).path,this.delimiter)):_k(Wk(p,this.delimiter),Zk(this.path.slice(0,-2))(e.value))),g=!1;try{g=!h||fS(this.machine,h,f,t,e)}catch(e){throw new Error("Unable to evaluate guard '".concat(h.name||h.type,"' in transition for event '").concat(s,"' in state node '").concat(this.id,"':\n").concat(e.message))}if(g&&m){void 0!==u.target&&(l=u.target),a.push.apply(a,Ck([],wk(u.actions),!1)),o=u;break}}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}if(o){if(!l.length)return{transitions:[o],exitSet:[],configuration:e.value?[this]:[],source:e,actions:a};var v=Xk(l.map((function(t){return i.getRelativeStateNodes(t,e.historyValue)})));return{transitions:[o],exitSet:!!o.internal?[]:Xk(l.map((function(e){return i.getPotentiallyReenteringNodes(e)}))),configuration:v,source:e,actions:a}}},e.prototype.getPotentiallyReenteringNodes=function(e){if(this.order<e.order)return[this];for(var t=[],n=this,r=e;n&&n!==r;)t.push(n),n=n.parent;return n!==r?[]:(t.push(r),t)},e.prototype.getActions=function(e,t,n,r,o,i,s){var a,l,c,d,u=this,h=i?DS([],this.getStateNodes(i.value)):[],p=new Set;try{for(var f=xk(Array.from(e).sort((function(e,t){return e.order-t.order}))),m=f.next();!m.done;m=f.next()){(!VS(h,b=m.value)||VS(n.exitSet,b)||b.parent&&p.has(b.parent))&&p.add(b)}}catch(e){a={error:e}}finally{try{m&&!m.done&&(l=f.return)&&l.call(f)}finally{if(a)throw a.error}}try{for(var g=xk(h),v=g.next();!v.done;v=g.next()){var b;VS(e,b=v.value)&&!VS(n.exitSet,b.parent)||n.exitSet.push(b)}}catch(e){c={error:e}}finally{try{v&&!v.done&&(d=g.return)&&d.call(g)}finally{if(c)throw c.error}}n.exitSet.sort((function(e,t){return t.order-e.order}));var y=Array.from(p).sort((function(e,t){return e.order-t.order})),x=new Set(n.exitSet),w=Xk(y.map((function(e){var t=[];if("final"!==e.type)return t;var i=e.parent;if(!i.parent)return t;t.push(SS(e.id,e.doneData),SS(i.id,e.doneData?eS(e.doneData,r,o):void 0));var s=i.parent;return"parallel"===s.type&&RS(s).every((function(e){return BS(n.configuration,e)}))&&t.push(SS(s.id)),t}))),C=y.map((function(e){var t=e.onEntry,n=e.activities.map((function(e){return function(e){var t=kS(e);return{type:gk.Start,activity:t,exec:void 0}}(e)}));return{type:"entry",actions:CS(s?Ck(Ck([],wk(t),!1),wk(n),!1):Ck(Ck([],wk(n),!1),wk(t),!1),u.machine.options.actions)}})).concat({type:"state_done",actions:w.map((function(e){return function(e,t){return{type:$k,event:"function"==typeof e?e:uS(e),delay:t?t.delay:void 0,id:null==t?void 0:t.id}}(e)}))}),k=Array.from(x).map((function(e){return{type:"exit",actions:CS(Ck(Ck([],wk(e.onExit),!1),wk(e.activities.map((function(e){return function(e){var t=sS(e)?e:kS(e);return{type:gk.Stop,activity:t,exec:void 0}}(e)}))),!1),u.machine.options.actions)}})).concat({type:"transition",actions:CS(n.actions,this.machine.options.actions)}).concat(C);if(t){var S=CS(Xk(Ck([],wk(e),!1).sort((function(e,t){return t.order-e.order})).map((function(e){return e.onExit}))),this.machine.options.actions).filter((function(e){return!bS(e)}));return k.concat({type:"stop",actions:S})}return k},e.prototype.transition=function(e,t,n,r){void 0===e&&(e=this.initialState);var o,i,s=hS(t);if(e instanceof FS)o=void 0===n?e:this.resolveState(FS.from(e,n));else{var a=aS(e)?this.resolve(Uk(this.getResolvedPath(e))):this.resolve(e),l=null!=n?n:this.machine.context;o=this.resolveState(FS.from(a,l))}if(!Hk&&s.name===l$)throw new Error("An event cannot have the wildcard type ('".concat(l$,"')"));if(this.strict&&!this.events.includes(s.name)&&(i=s.name,!/^(done|error)\./.test(i)))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(s.name,"'"));var c=this._transition(o.value,o,s)||{transitions:[],configuration:[],exitSet:[],source:o,actions:[]},d=DS([],this.getStateNodes(o.value)),u=c.configuration.length?DS(d,c.configuration):d;return c.configuration=Ck([],wk(u),!1),this.resolveTransition(c,o,o.context,r,s)},e.prototype.resolveRaisedTransition=function(e,t,n,r){var o,i=e.actions;return(e=this.transition(e,t,void 0,r))._event=n,e.event=n.data,(o=e.actions).unshift.apply(o,Ck([],wk(i),!1)),e},e.prototype.resolveTransition=function(e,t,n,r,o){var i,s,a,l,c=this;void 0===o&&(o=yS);var d=e.configuration,u=!t||e.transitions.length>0,h=u?e.configuration:t?t.configuration:[],p=BS(h,this),f=u?zS(this.machine,d):void 0,m=t?t.historyValue?t.historyValue:e.source?this.machine.historyValue(t.value):void 0:void 0,g=this.getActions(new Set(h),p,e,n,o,t,r),v=t?bk({},t.activities):{};try{for(var b=xk(g),y=b.next();!y.done;y=b.next()){var x=y.value;try{for(var w=(a=void 0,xk(x.actions)),C=w.next();!C.done;C=w.next()){var k=C.value;k.type===kk?v[k.activity.id||k.activity.type]=k:k.type===Sk&&(v[k.activity.id||k.activity.type]=!1)}}catch(e){a={error:e}}finally{try{C&&!C.done&&(l=w.return)&&l.call(w)}finally{if(a)throw a.error}}}}catch(e){i={error:e}}finally{try{y&&!y.done&&(s=b.return)&&s.call(b)}finally{if(i)throw i.error}}var S,$,j=wk(MS(this,t,n,o,g,r,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),M=j[0],E=j[1],T=wk(function(e,t){var n,r,o=wk([[],[]],2),i=o[0],s=o[1];try{for(var a=xk(e),l=a.next();!l.done;l=a.next()){var c=l.value;t(c)?i.push(c):s.push(c)}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return[i,s]}(M,bS),2),O=T[0],L=T[1],A=M.filter((function(e){var t;return e.type===kk&&(null===(t=e.activity)||void 0===t?void 0:t.type)===Ak})),R=A.reduce((function(e,t){return e[t.activity.id]=function(e,t,n,r){var o,i=mS(e.src),s=null===(o=null==t?void 0:t.options.services)||void 0===o?void 0:o[i.type],a=e.data?eS(e.data,n,r):void 0,l=s?OS(s,e.id,a):TS(e.id);return l.meta=e,l}(t.activity,c.machine,E,o),e}),t?bk({},t.children):{}),N=new FS({value:f||t.value,context:E,_event:o,_sessionid:t?t._sessionid:null,historyValue:f?m?(S=m,$=f,{current:$,states:nS(S,$)}):void 0:t?t.historyValue:void 0,history:!f||e.source?t:void 0,actions:f?L:[],activities:f?v:t?t.activities:{},events:[],configuration:h,transitions:e.transitions,children:R,done:p,tags:HS(h),machine:this}),D=n!==E;N.changed=o.name===Ik||D;var I=N.history;I&&delete I.history;var P=!p&&(this._transient||d.some((function(e){return e._transient})));if(!(u||P&&o.name!==a$))return N;var z=N;if(!p)for(P&&(z=this.resolveRaisedTransition(z,{type:Ek},o,r));O.length;){var V=O.shift();z=this.resolveRaisedTransition(z,V._event,o,r)}var B=z.changed||(I?!!z.actions.length||D||typeof I.value!=typeof z.value||!_S(z.value,I.value):void 0);return z.changed=B,z.history=I,z},e.prototype.getStateNode=function(e){if(d$(e))return this.machine.getStateNodeById(e);if(!this.states)throw new Error("Unable to retrieve child state '".concat(e,"' from '").concat(this.id,"'; no child states exist."));var t=this.states[e];if(!t)throw new Error("Child state '".concat(e,"' does not exist on '").concat(this.id,"'"));return t},e.prototype.getStateNodeById=function(e){var t=d$(e)?e.slice(1):e;if(t===this.id)return this;var n=this.machine.idMap[t];if(!n)throw new Error("Child state node '#".concat(t,"' does not exist on machine '").concat(this.id,"'"));return n},e.prototype.getStateNodeByPath=function(e){if("string"==typeof e&&d$(e))try{return this.getStateNodeById(e.slice(1))}catch(e){}for(var t=qk(e,this.delimiter).slice(),n=this;t.length;){var r=t.shift();if(!r.length)break;n=n.getStateNode(r)}return n},e.prototype.resolve=function(e){var t,n=this;if(!e)return this.initialStateValue||c$;switch(this.type){case"parallel":return Kk(this.initialStateValue,(function(t,r){return t?n.getStateNode(r).resolve(e[r]||t):c$}));case"compound":if(aS(e)){var r=this.getStateNode(e);return"parallel"===r.type||"compound"===r.type?((t={})[e]=r.initialStateValue,t):e}return Object.keys(e).length?Kk(e,(function(e,t){return e?n.getStateNode(t).resolve(e):c$})):this.initialStateValue||{};default:return e||c$}},e.prototype.getResolvedPath=function(e){if(d$(e)){var t=this.machine.idMap[e.slice(1)];if(!t)throw new Error("Unable to find state node '".concat(e,"'"));return t.path}return qk(e,this.delimiter)},Object.defineProperty(e.prototype,"initialStateValue",{get:function(){var e,t;if(this.__cache.initialStateValue)return this.__cache.initialStateValue;if("parallel"===this.type)t=Gk(this.states,(function(e){return e.initialStateValue||c$}),(function(e){return!("history"===e.type)}));else if(void 0!==this.initial){if(!this.states[this.initial])throw new Error("Initial state '".concat(this.initial,"' not found on '").concat(this.key,"'"));t=LS(this.states[this.initial])?this.initial:((e={})[this.initial]=this.states[this.initial].initialStateValue,e)}else t={};return this.__cache.initialStateValue=t,this.__cache.initialStateValue},enumerable:!1,configurable:!0}),e.prototype.getInitialState=function(e,t){this._init();var n=this.getStateNodes(e);return this.resolveTransition({configuration:n,exitSet:[],transitions:[],source:void 0,actions:[]},void 0,null!=t?t:this.machine.context,void 0)},Object.defineProperty(e.prototype,"initialState",{get:function(){var e=this.initialStateValue;if(!e)throw new Error("Cannot retrieve initial state from simple state '".concat(this.id,"'."));return this.getInitialState(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){var e;if("history"===this.type){var t=this.config;e=aS(t.target)&&d$(t.target)?Uk(this.machine.getStateNodeById(t.target).path.slice(this.path.length-1)):t.target}return e},enumerable:!1,configurable:!0}),e.prototype.getRelativeStateNodes=function(e,t,n){return void 0===n&&(n=!0),n?"history"===e.type?e.resolveHistory(t):e.initialStateNodes:[e]},Object.defineProperty(e.prototype,"initialStateNodes",{get:function(){var e=this;return LS(this)?[this]:"compound"!==this.type||this.initial?Xk(Jk(this.initialStateValue).map((function(t){return e.getFromRelativePath(t)}))):(Hk||oS(!1,"Compound state node '".concat(this.id,"' has no initial state.")),[this])},enumerable:!1,configurable:!0}),e.prototype.getFromRelativePath=function(e){if(!e.length)return[this];var t=wk(e),n=t[0],r=t.slice(1);if(!this.states)throw new Error("Cannot retrieve subPath '".concat(n,"' from node with no states"));var o=this.getStateNode(n);if("history"===o.type)return o.resolveHistory();if(!this.states[n])throw new Error("Child state '".concat(n,"' does not exist on '").concat(this.id,"'"));return this.states[n].getFromRelativePath(r)},e.prototype.historyValue=function(e){if(Object.keys(this.states).length)return{current:e||this.initialStateValue,states:Gk(this.states,(function(t,n){if(!e)return t.historyValue();var r=aS(e)?void 0:e[n];return t.historyValue(r||t.initialStateValue)}),(function(e){return!e.history}))}},e.prototype.resolveHistory=function(e){var t=this;if("history"!==this.type)return[this];var n=this.parent;if(!e){var r=this.target;return r?Xk(Jk(r).map((function(e){return n.getFromRelativePath(e)}))):n.initialStateNodes}var o,i,s=(o=n.path,i="states",function(e){var t,n,r=e;try{for(var s=xk(o),a=s.next();!a.done;a=s.next()){var l=a.value;r=r[i][l]}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return r})(e).current;return aS(s)?[n.getStateNode(s)]:Xk(Jk(s).map((function(e){return"deep"===t.history?n.getFromRelativePath(e):[n.states[e[0]]]})))},Object.defineProperty(e.prototype,"stateIds",{get:function(){var e=this,t=Xk(Object.keys(this.states).map((function(t){return e.states[t].stateIds})));return[this.id].concat(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"events",{get:function(){var e,t,n,r;if(this.__cache.events)return this.__cache.events;var o=this.states,i=new Set(this.ownEvents);if(o)try{for(var s=xk(Object.keys(o)),a=s.next();!a.done;a=s.next()){var l=o[a.value];if(l.states)try{for(var c=(n=void 0,xk(l.events)),d=c.next();!d.done;d=c.next()){var u=d.value;i.add("".concat(u))}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}return this.__cache.events=Array.from(i)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ownEvents",{get:function(){var e=new Set(this.transitions.filter((function(e){return!(!e.target&&!e.actions.length&&e.internal)})).map((function(e){return e.eventType})));return Array.from(e)},enumerable:!1,configurable:!0}),e.prototype.resolveTarget=function(e){var t=this;if(void 0!==e)return e.map((function(e){if(!aS(e))return e;var n=e[0]===t.delimiter;if(n&&!t.parent)return t.getStateNodeByPath(e.slice(1));var r=n?t.key+e:e;if(!t.parent)return t.getStateNodeByPath(r);try{return t.parent.getStateNodeByPath(r)}catch(e){throw new Error("Invalid transition definition for state node '".concat(t.id,"':\n").concat(e.message))}}))},e.prototype.formatTransition=function(e){var t=this,n=function(e){if(void 0!==e&&""!==e)return Qk(e)}(e.target),r="internal"in e?e.internal:!n||n.some((function(e){return aS(e)&&e[0]===t.delimiter})),o=this.machine.options.guards,i=this.resolveTarget(n),s=bk(bk({},e),{actions:CS(Qk(e.actions)),cond:lS(e.cond,o),target:i,source:this,internal:r,eventType:e.event,toJSON:function(){return bk(bk({},s),{target:s.target?s.target.map((function(e){return"#".concat(e.id)})):void 0,source:"#".concat(t.id)})}});return s},e.prototype.formatTransitions=function(){var e,t,n,r=this;if(this.config.on)if(Array.isArray(this.config.on))n=this.config.on;else{var o=this.config.on,i=l$,s=o[i],a=void 0===s?[]:s,l=yk(o,["*"]);n=Xk(Object.keys(l).map((function(e){Hk||e!==a$||oS(!1,"Empty string transition configs (e.g., `{ on: { '': ... }}`) for transient transitions are deprecated. Specify the transition in the `{ always: ... }` property instead. "+'Please check the `on` configuration for "#'.concat(r.id,'".'));var t=pS(e,l[e]);return Hk||function(e,t,n){var r=n.slice(0,-1).some((function(e){return!("cond"in e)&&!("in"in e)&&(aS(e.target)||dS(e.target))})),o=t===a$?"the transient event":"event '".concat(t,"'");oS(!r,"One or more transitions for ".concat(o," on state '").concat(e.id,"' are unreachable. ")+"Make sure that the default transition is the last one defined.")}(r,e,t),t})).concat(pS(l$,a)))}else n=[];var c=this.config.always?pS("",this.config.always):[],d=this.config.onDone?pS(String(SS(this.id)),this.config.onDone):[];Hk||oS(!(this.config.onDone&&!this.parent),'Root nodes cannot have an ".onDone" transition. Please check the config of "'.concat(this.id,'".'));var u=Xk(this.invoke.map((function(e){var t=[];return e.onDone&&t.push.apply(t,Ck([],wk(pS(String($S(e.id)),e.onDone)),!1)),e.onError&&t.push.apply(t,Ck([],wk(pS(String(jS(e.id)),e.onError)),!1)),t}))),h=this.after,p=Xk(Ck(Ck(Ck(Ck([],wk(d),!1),wk(u),!1),wk(n),!1),wk(c),!1).map((function(e){return Qk(e).map((function(e){return r.formatTransition(e)}))})));try{for(var f=xk(h),m=f.next();!m.done;m=f.next()){var g=m.value;p.push(g)}}catch(t){e={error:t}}finally{try{m&&!m.done&&(t=f.return)&&t.call(f)}finally{if(e)throw e.error}}return p},e}();var h$,p$=function(e){return{type:Tk,assignment:e}};!function(e){e[e.Effect=1]="Effect",e[e.LayoutEffect=2]="LayoutEffect"}(h$||(h$={}));var f$="undefined"!=typeof document?n.useLayoutEffect:function(){};function m$(e){var t=l.useRef();return t.current||(t.current={v:e()}),t.current.v}var g$=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s},v$=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};var b$=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s},y$=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};function x$(e,t){(0,e.exec)(t.context,t._event.data,{action:e,state:t,_event:t._event})()}function w$(e){var t=n.useRef([]),r=n.useRef([]);f$((function(){var n=e.subscribe((function(e){var n,o;if(e.actions.length){var i=e.actions.filter((function(e){return"function"==typeof e.exec&&"__effect"in e.exec})),s=b$(function(e,t){var n,r,o=g$([[],[]],2),i=o[0],s=o[1];try{for(var a=v$(e),l=a.next();!l.done;l=a.next()){var c=l.value;t(c)?i.push(c):s.push(c)}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return[i,s]}(i,(function(e){return e.exec.__effect===h$.Effect})),2),a=s[0],l=s[1];(n=t.current).push.apply(n,y$([],b$(a.map((function(t){return[t,e]}))),!1)),(o=r.current).push.apply(o,y$([],b$(l.map((function(t){return[t,e]}))),!1))}}));return function(){n.unsubscribe()}}),[]),f$((function(){for(;r.current.length;){var e=b$(r.current.shift(),2);x$(e[0],e[1])}})),n.useEffect((function(){for(;t.current.length;){var e=b$(t.current.shift(),2);x$(e[0],e[1])}}))}var C$=function(){return C$=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},C$.apply(this,arguments)},k$=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},S$=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s};var $$=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s};function j$(e,t){void 0===t&&(t={});var r=n.useCallback((function(e){var t=void 0===e.changed&&Object.keys(e.children).length;(e.changed||t)&&a(e)}),[]),o=function(e,t,r){void 0===t&&(t={});var o=m$((function(){return"function"==typeof e?e():e}));if("production"!==process.env.NODE_ENV&&"function"!=typeof e){var i=S$(n.useState(o),1)[0];e!==i&&console.warn("Machine given to `useMachine` has changed between renders. This is not supported and might lead to unexpected results.\nPlease make sure that you pass the same Machine as argument each time.")}var s=t.context,a=t.guards,l=t.actions,c=t.activities,d=t.services,u=t.delays,h=t.state,p=k$(t,["context","guards","actions","activities","services","delays","state"]),f=m$((function(){var e={context:s,guards:a,actions:l,activities:c,services:d,delays:u};return o$(o.withConfig(e,(function(){return C$(C$({},o.context),s)})),C$({deferEvents:!0},p))}));return f$((function(){var e;return r&&(e=f.subscribe(function(e){if("object"==typeof e)return e;var t=function(){};return{next:e,error:void 0||t,complete:void 0||t}}(r))),function(){null==e||e.unsubscribe()}}),[r]),f$((function(){return f.start(h?FS.create(h):void 0),function(){f.stop()}}),[]),f$((function(){Object.assign(f.machine.options.actions,l),Object.assign(f.machine.options.guards,a),Object.assign(f.machine.options.activities,c),Object.assign(f.machine.options.services,d),Object.assign(f.machine.options.delays,u)}),[l,a,c,d,u]),w$(f),f}(e,t,r),i=$$(n.useState((function(){var e=o.machine.initialState;return t.state?FS.create(t.state):e})),2),s=i[0],a=i[1];return[s,o.send,o]}function M$(){return M$=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},M$.apply(null,arguments)}function E$(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}const T$={arr:Array.isArray,obj:e=>"[object Object]"===Object.prototype.toString.call(e),fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,und:e=>void 0===e,nul:e=>null===e,set:e=>e instanceof Set,map:e=>e instanceof Map,equ(e,t){if(typeof e!=typeof t)return!1;if(T$.str(e)||T$.num(e))return e===t;if(T$.obj(e)&&T$.obj(t)&&Object.keys(e).length+Object.keys(t).length===0)return!0;let n;for(n in e)if(!(n in t))return!1;for(n in t)if(e[n]!==t[n])return!1;return!T$.und(n)||e===t}};function O$(e,t){return T$.und(e)||T$.nul(e)?t:e}function L$(e){return T$.und(e)?[]:T$.arr(e)?e:[e]}function A$(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return T$.fun(e)?e(...n):e}function R$(e){const t=function(e){return e.to,e.from,e.config,e.onStart,e.onRest,e.onFrame,e.children,e.reset,e.reverse,e.force,e.immediate,e.delay,e.attach,e.destroyed,e.interpolateTo,e.ref,e.lazy,E$(e,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}(e);if(T$.und(t))return M$({to:t},e);const n=Object.keys(e).reduce(((n,r)=>T$.und(t[r])?M$({},n,{[r]:e[r]}):n),{});return M$({to:t},n)}class N${constructor(){this.payload=void 0,this.children=[]}getAnimatedValue(){return this.getValue()}getPayload(){return this.payload||this}attach(){}detach(){}getChildren(){return this.children}addChild(e){0===this.children.length&&this.attach(),this.children.push(e)}removeChild(e){const t=this.children.indexOf(e);this.children.splice(t,1),0===this.children.length&&this.detach()}}class D$ extends N${constructor(){super(...arguments),this.payload=[],this.attach=()=>this.payload.forEach((e=>e instanceof N$&&e.addChild(this))),this.detach=()=>this.payload.forEach((e=>e instanceof N$&&e.removeChild(this)))}}class I$ extends N${constructor(){super(...arguments),this.payload={},this.attach=()=>Object.values(this.payload).forEach((e=>e instanceof N$&&e.addChild(this))),this.detach=()=>Object.values(this.payload).forEach((e=>e instanceof N$&&e.removeChild(this)))}getValue(e){void 0===e&&(e=!1);const t={};for(const n in this.payload){const r=this.payload[n];(!e||r instanceof N$)&&(t[n]=r instanceof N$?r[e?"getAnimatedValue":"getValue"]():r)}return t}getAnimatedValue(){return this.getValue(!0)}}let P$,z$;let V$,B$=e=>"undefined"!=typeof window?window.requestAnimationFrame(e):-1;let H$,_$=()=>Date.now();class F$ extends I${constructor(e,t){super(),this.update=void 0,this.payload=e.style?M$({},e,{style:H$(e.style)}):e,this.update=t,this.attach()}}let q$=!1;const W$=new Set,U$=()=>{if(!q$)return!1;let e=_$();for(let t of W$){let n=!1;for(let r=0;r<t.configs.length;r++){let o,i,s=t.configs[r];for(let t=0;t<s.animatedValues.length;t++){let r=s.animatedValues[t];if(r.done)continue;let a=s.fromValues[t],l=s.toValues[t],c=r.lastPosition,d=l instanceof N$,u=Array.isArray(s.initialVelocity)?s.initialVelocity[t]:s.initialVelocity;if(d&&(l=l.getValue()),s.immediate)r.setValue(l),r.done=!0;else if("string"!=typeof a&&"string"!=typeof l){if(void 0!==s.duration)c=a+s.easing((e-r.startTime)/s.duration)*(l-a),o=e>=r.startTime+s.duration;else if(s.decay)c=a+u/(1-.998)*(1-Math.exp(-.0020000000000000018*(e-r.startTime))),o=Math.abs(r.lastPosition-c)<.1,o&&(l=c);else{i=void 0!==r.lastTime?r.lastTime:e,u=void 0!==r.lastVelocity?r.lastVelocity:s.initialVelocity,e>i+64&&(i=e);let t=Math.floor(e-i);for(let e=0;e<t;++e){u+=1*((-s.tension*(c-l)+-s.friction*u)/s.mass)/1e3,c+=1*u/1e3}let n=!(!s.clamp||0===s.tension)&&(a<l?c>l:c<l),d=Math.abs(u)<=s.precision,h=0===s.tension||Math.abs(l-c)<=s.precision;o=n||d&&h,r.lastVelocity=u,r.lastTime=e}d&&!s.toValues[t].done&&(o=!1),o?(r.value!==l&&(c=l),r.done=!0):n=!0,r.setValue(c),r.lastPosition=c}else r.setValue(l),r.done=!0}t.props.onFrame&&(t.values[s.name]=s.interpolation.getValue())}t.props.onFrame&&t.props.onFrame(t.values),n||(W$.delete(t),t.stop(!0))}return W$.size?B$(U$):q$=!1,q$};function K$(e,t,n){if("function"==typeof e)return e;if(Array.isArray(e))return K$({range:e,output:t,extrapolate:n});if(V$&&"string"==typeof e.output[0])return V$(e);const r=e,o=r.output,i=r.range||[0,1],s=r.extrapolateLeft||r.extrapolate||"extend",a=r.extrapolateRight||r.extrapolate||"extend",l=r.easing||(e=>e);return e=>{const t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,i);return function(e,t,n,r,o,i,s,a,l){let c=l?l(e):e;if(c<t){if("identity"===s)return c;"clamp"===s&&(c=t)}if(c>n){if("identity"===a)return c;"clamp"===a&&(c=n)}if(r===o)return r;if(t===n)return e<=t?r:o;t===-1/0?c=-c:n===1/0?c-=t:c=(c-t)/(n-t);c=i(c),r===-1/0?c=-c:o===1/0?c+=r:c=c*(o-r)+r;return c}(e,i[t],i[t+1],o[t],o[t+1],l,s,a,r.map)}}class G$ extends D${constructor(e,t,n,r){super(),this.calc=void 0,this.payload=e instanceof D$&&!(e instanceof G$)?e.getPayload():Array.isArray(e)?e:[e],this.calc=K$(t,n,r)}getValue(){return this.calc(...this.payload.map((e=>e.getValue())))}updateConfig(e,t,n){this.calc=K$(e,t,n)}interpolate(e,t,n){return new G$(this,e,t,n)}}const Z$=(e,t,n)=>e&&new G$(e,t,n);function J$(e,t){"update"in e?t.add(e):e.getChildren().forEach((e=>J$(e,t)))}class X$ extends N${constructor(e){var t;super(),t=this,this.animatedStyles=new Set,this.value=void 0,this.startPosition=void 0,this.lastPosition=void 0,this.lastVelocity=void 0,this.startTime=void 0,this.lastTime=void 0,this.done=!1,this.setValue=function(e,n){void 0===n&&(n=!0),t.value=e,n&&t.flush()},this.value=e,this.startPosition=e,this.lastPosition=e}flush(){0===this.animatedStyles.size&&J$(this,this.animatedStyles),this.animatedStyles.forEach((e=>e.update()))}clearStyles(){this.animatedStyles.clear()}getValue(){return this.value}interpolate(e,t,n){return new G$(this,e,t,n)}}class Y$ extends D${constructor(e){super(),this.payload=e.map((e=>new X$(e)))}setValue(e,t){void 0===t&&(t=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach(((e,n)=>this.payload[n].setValue(e,t))):this.payload.forEach((n=>n.setValue(e,t)))}getValue(){return this.payload.map((e=>e.getValue()))}interpolate(e,t){return new G$(this,e,t)}}let Q$=0,ej=class{constructor(){this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=()=>this.interpolations,this.id=Q$++}update(e){if(!e)return this;const t=R$(e),n=t.delay,r=void 0===n?0:n,o=t.to,i=E$(t,["delay","to"]);if(T$.arr(o)||T$.fun(o))this.queue.push(M$({},i,{delay:r,to:o}));else if(o){let e={};Object.entries(o).forEach((t=>{let n=t[0],o=t[1];const s=M$({to:{[n]:o},delay:A$(r,n)},i),a=e[s.delay]&&e[s.delay].to;e[s.delay]=M$({},e[s.delay],s,{to:M$({},a,s.to)})})),this.queue=Object.values(e)}return this.queue=this.queue.sort(((e,t)=>e.delay-t.delay)),this.diff(i),this}start(e){if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((e=>{let t=e.from,n=void 0===t?{}:t,r=e.to,o=void 0===r?{}:r;T$.obj(n)&&(this.merged=M$({},n,this.merged)),T$.obj(o)&&(this.merged=M$({},this.merged,o))}));const t=this.local=++this.guid,n=this.localQueue=this.queue;this.queue=[],n.forEach(((r,o)=>{let i=r.delay,s=E$(r,["delay"]);const a=r=>{o===n.length-1&&t===this.guid&&r&&(this.idle=!0,this.props.onRest&&this.props.onRest(this.merged)),e&&e()};let l=T$.arr(s.to)||T$.fun(s.to);i?setTimeout((()=>{t===this.guid&&(l?this.runAsync(s,a):this.diff(s).start(a))}),i):l?this.runAsync(s,a):this.diff(s).start(a)}))}else T$.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),t=this,W$.has(t)||W$.add(t),q$||(q$=!0,B$(U$));var t;return this}stop(e){return this.listeners.forEach((t=>t(e))),this.listeners=[],this}pause(e){var t;return this.stop(!0),e&&(t=this,W$.has(t)&&W$.delete(t)),this}runAsync(e,t){var n=this;e.delay;let r=E$(e,["delay"]);const o=this.local;let i=Promise.resolve(void 0);if(T$.arr(r.to))for(let e=0;e<r.to.length;e++){const t=e,n=M$({},r,R$(r.to[t]));T$.arr(n.config)&&(n.config=n.config[t]),i=i.then((()=>{if(o===this.guid)return new Promise((e=>this.diff(n).start(e)))}))}else if(T$.fun(r.to)){let e,t=0;i=i.then((()=>r.to((n=>{const i=M$({},r,R$(n));if(T$.arr(i.config)&&(i.config=i.config[t]),t++,o===this.guid)return e=new Promise((e=>this.diff(i).start(e)))}),(function(e){return void 0===e&&(e=!0),n.stop(e)})).then((()=>e))))}i.then(t)}diff(e){this.props=M$({},this.props,e);let t=this.props,n=t.from,r=void 0===n?{}:n,o=t.to,i=void 0===o?{}:o,s=t.config,a=void 0===s?{}:s,l=t.reverse,c=t.attach,d=t.reset,u=t.immediate;if(l){var h=[i,r];r=h[0],i=h[1]}this.merged=M$({},r,this.merged,i),this.hasChanged=!1;let p=c&&c(this);if(this.animations=Object.entries(this.merged).reduce(((e,t)=>{let n=t[0],o=t[1],i=e[n]||{};const s=T$.num(o),l=T$.str(o)&&!o.startsWith("#")&&!/\d/.test(o)&&!z$[o],c=T$.arr(o),h=!s&&!c&&!l;let f=T$.und(r[n])?o:r[n],m=s||c||l?o:1,g=A$(a,n);p&&(m=p.animations[n].parent);let v,b=i.parent,y=i.interpolation,x=L$(p?m.getPayload():m),w=o;h&&(w=V$({range:[0,1],output:[o,o]})(1));let C=y&&y.getValue();const k=!T$.und(b)&&i.animatedValues.some((e=>!e.done)),S=!T$.equ(w,C),$=!T$.equ(w,i.previous),j=!T$.equ(g,i.config);if(d||$&&S||j){if(s||l)b=y=i.parent||new X$(f);else if(c)b=y=i.parent||new Y$(f);else if(h){let e=i.interpolation&&i.interpolation.calc(i.parent.value);e=void 0===e||d?f:e,i.parent?(b=i.parent,b.setValue(0,!1)):b=new X$(0);const t={output:[e,o]};i.interpolation?(y=i.interpolation,i.interpolation.updateConfig(t)):y=b.interpolate(t)}return x=L$(p?m.getPayload():m),v=L$(b.getPayload()),d&&!h&&b.setValue(f,!1),this.hasChanged=!0,v.forEach((e=>{e.startPosition=e.value,e.lastPosition=e.value,e.lastVelocity=k?e.lastVelocity:void 0,e.lastTime=k?e.lastTime:void 0,e.startTime=_$(),e.done=!1,e.animatedStyles.clear()})),A$(u,n)&&b.setValue(h?m:o,!1),M$({},e,{[n]:M$({},i,{name:n,parent:b,interpolation:y,animatedValues:v,toValues:x,previous:w,config:g,fromValues:L$(b.getValue()),immediate:A$(u,n),initialVelocity:O$(g.velocity,0),clamp:O$(g.clamp,!1),precision:O$(g.precision,.01),tension:O$(g.tension,170),friction:O$(g.friction,26),mass:O$(g.mass,1),duration:g.duration,easing:O$(g.easing,(e=>e)),decay:g.decay})})}return S?e:(h&&(b.setValue(1,!1),y.updateConfig({output:[w,w]})),b.done=!0,this.hasChanged=!0,M$({},e,{[n]:M$({},e[n],{previous:w})}))}),this.animations),this.hasChanged){this.configs=Object.values(this.animations),this.values={},this.interpolations={};for(let e in this.animations)this.interpolations[e]=this.animations[e].interpolation,this.values[e]=this.animations[e].interpolation.getValue()}return this}destroy(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0}};const tj=e=>{const t=T$.fun(e),r=((e,t)=>{const r=n.useRef(!1),o=n.useRef(),i=T$.fun(t),s=n.useMemo((()=>{let n;return o.current&&(o.current.map((e=>e.destroy())),o.current=void 0),[new Array(e).fill().map(((e,r)=>{const o=new ej,s=i?A$(t,r,o):t[r];return 0===r&&(n=s.ref),o.update(s),n||o.start(),o})),n]}),[e]),a=s[0],l=s[1];o.current=a,n.useImperativeHandle(l,(()=>({start:()=>Promise.all(o.current.map((e=>new Promise((t=>e.start(t)))))),stop:e=>o.current.forEach((t=>t.stop(e))),get controllers(){return o.current}})));const c=n.useMemo((()=>e=>o.current.map(((t,n)=>{t.update(i?A$(e,n,t):e[n]),l||t.start()}))),[e]);n.useEffect((()=>{r.current?i||c(t):l||o.current.forEach((e=>e.start()))})),n.useEffect((()=>(r.current=!0,()=>o.current.forEach((e=>e.destroy())))),[]);const d=o.current.map((e=>e.getValues()));return i?[d,c,e=>o.current.forEach((t=>t.pause(e)))]:d})(1,t?e:[e]),o=r[0],i=r[1],s=r[2];return t?[o[0],i,s]:o};class nj extends I${constructor(e){void 0===e&&(e={}),super(),!e.transform||e.transform instanceof N$||(e=P$.transform(e)),this.payload=e}}const rj={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},oj="[-+]?\\d*\\.?\\d+",ij=oj+"%";function sj(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"\\(\\s*("+t.join(")\\s*,\\s*(")+")\\s*\\)"}const aj=new RegExp("rgb"+sj(oj,oj,oj)),lj=new RegExp("rgba"+sj(oj,oj,oj,oj)),cj=new RegExp("hsl"+sj(oj,ij,ij)),dj=new RegExp("hsla"+sj(oj,ij,ij,oj)),uj=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hj=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,pj=/^#([0-9a-fA-F]{6})$/,fj=/^#([0-9a-fA-F]{8})$/;function mj(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function gj(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,i=mj(o,r,e+1/3),s=mj(o,r,e),a=mj(o,r,e-1/3);return Math.round(255*i)<<24|Math.round(255*s)<<16|Math.round(255*a)<<8}function vj(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function bj(e){return(parseFloat(e)%360+360)%360/360}function yj(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function xj(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function wj(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=pj.exec(e))?parseInt(t[1]+"ff",16)>>>0:rj.hasOwnProperty(e)?rj[e]:(t=aj.exec(e))?(vj(t[1])<<24|vj(t[2])<<16|vj(t[3])<<8|255)>>>0:(t=lj.exec(e))?(vj(t[1])<<24|vj(t[2])<<16|vj(t[3])<<8|yj(t[4]))>>>0:(t=uj.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=fj.exec(e))?parseInt(t[1],16)>>>0:(t=hj.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=cj.exec(e))?(255|gj(bj(t[1]),xj(t[2]),xj(t[3])))>>>0:(t=dj.exec(e))?(gj(bj(t[1]),xj(t[2]),xj(t[3]))|yj(t[4]))>>>0:null}(e);return null===t?e:(t=t||0,`rgba(${(4278190080&t)>>>24}, ${(16711680&t)>>>16}, ${(65280&t)>>>8}, ${(255&t)/255})`)}const Cj=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,kj=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Sj=new RegExp(`(${Object.keys(rj).join("|")})`,"g");let $j={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};const jj=["Webkit","Ms","Moz","O"];function Mj(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||$j.hasOwnProperty(e)&&$j[e]?(""+t).trim():t+"px"}$j=Object.keys($j).reduce(((e,t)=>(jj.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),$j);const Ej={};var Tj,Oj;Tj=e=>new nj(e),H$=Tj,Oj=e=>{const t=e.output.map((e=>e.replace(kj,wj))).map((e=>e.replace(Sj,wj))),n=t[0].match(Cj).map((()=>[]));t.forEach((e=>{e.match(Cj).forEach(((e,t)=>n[t].push(+e)))}));const r=t[0].match(Cj).map(((t,r)=>K$(M$({},e,{output:n[r]}))));return e=>{let n=0;return t[0].replace(Cj,(()=>r[n++](e))).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,((e,t,n,r,o)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${o})`))}},V$=Oj,z$=rj,function(e,t){P$={fn:e,transform:t}}(((e,t)=>{if(!e.nodeType||void 0===e.setAttribute)return!1;{const o=t.style,i=t.children,s=t.scrollTop,a=t.scrollLeft,l=E$(t,["style","children","scrollTop","scrollLeft"]),c="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;void 0!==s&&(e.scrollTop=s),void 0!==a&&(e.scrollLeft=a),void 0!==i&&(e.textContent=i);for(let t in o)if(o.hasOwnProperty(t)){var n=0===t.indexOf("--"),r=Mj(t,o[t],n);"float"===t&&(t="cssFloat"),n?e.style.setProperty(t,r):e.style[t]=r}for(let t in l){const n=c?t:Ej[t]||(Ej[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())));void 0!==e.getAttribute(n)&&e.setAttribute(n,l[t])}}}),(e=>e));var Lj;const Aj=(Lj=e=>n.forwardRef(((t,r)=>{const o=function(){const e=n.useState(!1)[1];return n.useCallback((()=>e((e=>!e))),[])}(),i=n.useRef(!0),s=n.useRef(null),a=n.useRef(null),l=n.useCallback((e=>{const t=s.current;s.current=new F$(e,(()=>{let e=!1;a.current&&(e=P$.fn(a.current,s.current.getAnimatedValue())),a.current&&!1!==e||o()})),t&&t.detach()}),[]);n.useEffect((()=>()=>{i.current=!1,s.current&&s.current.detach()}),[]),n.useImperativeHandle(r,(()=>(e=>e.current)(a))),l(t);const c=s.current.getValue();c.scrollTop,c.scrollLeft;const d=E$(c,["scrollTop","scrollLeft"]),u=(h=e,!T$.fun(h)||h.prototype instanceof n.Component?e=>a.current=function(e,t){return t&&(T$.fun(t)?t(e):T$.obj(t)&&(t.current=e)),e}(e,r):void 0);var h;return n.createElement(e,M$({},d,{ref:u}))})),e=>(T$.arr(e)?e:Object.keys(e)).reduce(((e,t)=>{const n=t;return e[n]=Lj(n),e}),Lj))(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]);function Rj(e,t){return e.map((function(e,n){return e+t[n]}))}function Nj(e,t){return e.map((function(e,n){return e-t[n]}))}function Dj(e){return Math.hypot.apply(Math,e)}function Ij(e){return Math.sign?Math.sign(e):Number(e>0)-Number(e<0)||+e}function Pj(e,t,n){return 0===t||Math.abs(t)===1/0?function(e,t){return Math.pow(e,5*t)}(e,n):e*t*n/(t+n*e)}function zj(e,t,n,r){return void 0===r&&(r=.15),0===r?function(e,t,n){return Math.max(t,Math.min(e,n))}(e,t,n):e<t?-Pj(t-e,n-t,r)+t:e>n?+Pj(e-n,n-t,r)+n:e}function Vj(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}function Bj(){return Bj=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Bj.apply(this,arguments)}function Hj(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function _j(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Fj(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function qj(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Fj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Fj(e,t):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function Wj(){}function Uj(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?Wj:1===t.length?t[0]:function(){for(var e,n,r=qj(t);!(n=r()).done;){e=n.value.apply(this,arguments)||e}return e}}function Kj(e,t){if(void 0===e){if(void 0===t)throw new Error("Must define fallback value if undefined is expected");e=t}return Array.isArray(e)?e:[e,e]}function Gj(e){if("function"==typeof e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.apply(void 0,n)}return e}function Zj(e,t){void 0===e&&(e={});for(var n={},r=0,o=Object.entries(t);r<o.length;r++){var i=o[r],s=i[0],a=i[1];switch(typeof a){case"function":n[s]=a.call(n,e[s],s,e);break;case"object":n[s]=Zj(e[s],a);break;case"boolean":a&&(n[s]=e[s])}}return n}var Jj=Bj({},{threshold:function(e){return void 0===e&&(e=0),Kj(e)},rubberband:function(e){switch(void 0===e&&(e=0),e){case!0:return Kj(.15);case!1:return Kj(0);default:return Kj(e)}},enabled:function(e){return void 0===e&&(e=!0),e},triggerAllEvents:function(e){return void 0===e&&(e=!1),e},initial:function(e){return void 0===e&&(e=0),"function"==typeof e?e:Kj(e)}},{axis:!0,lockDirection:function(e){return void 0===e&&(e=!1),e},bounds:function(e){if(void 0===e&&(e={}),"function"==typeof e)return function(t){return Jj.bounds(e(t))};var t=e,n=t.left,r=void 0===n?-1/0:n,o=t.right,i=void 0===o?1/0:o,s=t.top,a=void 0===s?-1/0:s,l=t.bottom;return[[r,i],[a,void 0===l?1/0:l]]}}),Xj="undefined"!=typeof window&&window.document&&window.document.createElement,Yj={enabled:function(e){return void 0===e&&(e=!0),e},domTarget:!0,window:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e){return void 0===e&&(e=Xj?window:void 0),e})),eventOptions:function(e){var t=void 0===e?{}:e,n=t.passive,r=void 0===n||n,o=t.capture;return{passive:r,capture:void 0!==o&&o}}},Qj=Bj({},Jj,{threshold:function(e,t,n){var r=n.filterTaps,o=void 0!==r&&r,i=n.lockDirection,s=void 0!==i&&i,a=n.axis,l=Kj(e,o?3:s||(void 0===a?void 0:a)?1:0);return this.filterTaps=o||l[0]+l[1]>0,l},swipeVelocity:function(e){return void 0===e&&(e=.5),Kj(e)},swipeDistance:function(e){return void 0===e&&(e=60),Kj(e)},delay:function(e){switch(void 0===e&&(e=0),e){case!0:return 180;case!1:return 0;default:return e}}});function eM(e){var t=e.domTarget,n=e.eventOptions,r=e.window,o=e.enabled,i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,["domTarget","eventOptions","window","enabled"]),s=function(e){return void 0===e&&(e={}),Zj(e,Yj)}({domTarget:t,eventOptions:n,window:r,enabled:o});return s.drag=function(e){return void 0===e&&(e={}),Zj(e,Qj)}(i),s}function tM(e){return Bj({_active:!1,_blocked:!1,_intentional:[!1,!1],_movement:[0,0],_initial:[0,0],_bounds:[[-1/0,1/0],[-1/0,1/0]],_lastEventType:void 0,event:void 0,intentional:!1,values:[0,0],velocities:[0,0],delta:[0,0],movement:[0,0],offset:[0,0],lastOffset:[0,0],direction:[0,0],initial:[0,0],previous:[0,0],first:!1,last:!1,active:!1,timeStamp:0,startTime:0,elapsedTime:0,cancel:Wj,canceled:!1,memo:void 0,args:void 0},e)}function nM(){return{shared:{hovering:!1,scrolling:!1,wheeling:!1,dragging:!1,moving:!1,pinching:!1,touches:0,buttons:0,down:!1,shiftKey:!1,altKey:!1,metaKey:!1,ctrlKey:!1},drag:tM({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0,_isTap:!0,_delayedEvent:!1,_pointerId:void 0,tap:!1,swipe:[0,0]}),pinch:tM({da:[0,0],vdva:[0,0],origin:void 0,turns:0}),wheel:tM({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),move:tM({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),scroll:tM({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0})}}var rM=new Map,oM=function(){function e(e,t){var n=this;void 0===t&&(t=[]),this.controller=e,this.args=t,this.debounced=!0,this.setTimeout=function(e,t){var r;void 0===t&&(t=140),clearTimeout(n.controller.timeouts[n.stateKey]);for(var o=arguments.length,i=new Array(o>2?o-2:0),s=2;s<o;s++)i[s-2]=arguments[s];n.controller.timeouts[n.stateKey]=(r=window).setTimeout.apply(r,[e,t].concat(i))},this.clearTimeout=function(){clearTimeout(n.controller.timeouts[n.stateKey])},this.fireGestureHandler=function(e){if(void 0===e&&(e=!1),n.state._blocked)return n.debounced||(n.state._active=!1,n.clean()),null;if(!e&&!n.state.intentional&&!n.config.triggerAllEvents)return null;if(n.state.intentional){var t=n.state.active,r=n.state._active;n.state.active=r,n.state.first=r&&!t,n.state.last=t&&!r,n.controller.state.shared[n.ingKey]=r}var o=Bj({},n.controller.state.shared,n.state,n.mapStateValues(n.state)),i=n.handler(o);return n.state.memo=void 0!==i?i:n.state.memo,n.state._active||n.clean(),o}}var t=e.prototype;return t.updateSharedState=function(e){Object.assign(this.controller.state.shared,e)},t.updateGestureState=function(e){Object.assign(this.state,e)},t.checkIntentionality=function(e,t){return{_intentional:e,_blocked:!1}},t.getMovement=function(e){var t=this.config,n=t.initial,r=t.bounds,o=t.rubberband,i=t.threshold,s=this.state,a=s._bounds,l=s._initial,c=s._active,d=s._intentional,u=s.lastOffset,h=s.movement,p=this.getInternalMovement(e,this.state),f=!1===d[0]?iM(p[0],i[0]):d[0],m=!1===d[1]?iM(p[1],i[1]):d[1],g=this.checkIntentionality([f,m],p);if(g._blocked)return Bj({},g,{_movement:p,delta:[0,0]});var v,b,y,x,w=g._intentional,C=p;(!1!==w[0]&&!1===d[0]&&(b=Gj(n,this.state),v=Gj(r,this.state),l[0]=b[0],a[0]=v[0]),!1!==w[1]&&!1===d[1])&&(b=null!=(y=b)?y:Gj(n,this.state),v=null!=(x=v)?x:Gj(r,this.state),l[1]=b[1],a[1]=v[1]);var k=[!1!==w[0]?p[0]-w[0]:l[0],!1!==w[1]?p[1]-w[1]:l[1]],S=Rj(k,u),$=c?o:[0,0];return k=sM(a,Rj(k,l),$),Bj({},g,{intentional:!1!==w[0]||!1!==w[1],_initial:l,_movement:C,movement:k,values:e,offset:sM(a,S,$),delta:Nj(k,h)})},t.clean=function(){this.clearTimeout()},Vj(e,[{key:"config",get:function(){return this.controller.config[this.stateKey]}},{key:"enabled",get:function(){return this.controller.config.enabled&&this.config.enabled}},{key:"state",get:function(){return this.controller.state[this.stateKey]}},{key:"handler",get:function(){return this.controller.handlers[this.stateKey]}}]),e}();function iM(e,t){return Math.abs(e)>=t&&Ij(e)*t}function sM(e,t,n){var r=t[0],o=t[1],i=n[0],s=n[1],a=e[0],l=a[0],c=a[1],d=e[1],u=d[0],h=d[1];return[zj(r,l,c,i),zj(o,u,h,s)]}function aM(e,t,n){var r=e.state,o=e.args,i=t.timeStamp,s=t.type,a=r.values;return{_lastEventType:s,event:t,timeStamp:i,elapsedTime:n?0:i-r.startTime,args:o,previous:a}}function lM(e,t){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return e.call.apply(e,[this,Bj({},t,{event:n})].concat(o))}}var cM=function(e){var t=this;this.classes=e,this.bind=function(){for(var e={},n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];for(var i,s=qj(t.classes);!(i=s()).done;){new(0,i.value)(t,r).addBindings(e)}for(var a=0,l=Object.entries(t.nativeRefs);a<l.length;a++){var c=l[a];hM(e,c[0],lM(c[1],Bj({},t.state.shared,{args:r})))}return t.config.domTarget?function(e,t){var n=e.config,r=e.domListeners,o=uM(n);if(!o)throw new Error("domTarget must be defined");var i=n.eventOptions;fM(o,dM(r),i);for(var s=0,a=Object.entries(t);s<a.length;s++){var l=a[s],c=l[0],d=l[1],u=c.slice(2).toLowerCase();r.push([u,Uj.apply(void 0,d)])}pM(o,r,i)}(t,e):function(e,t){for(var n=e.config,r={},o=n.eventOptions.capture?"Capture":"",i=0,s=Object.entries(t);i<s.length;i++){var a=s[i],l=a[0],c=a[1],d=Array.isArray(c)?c:[c];r[l+o]=Uj.apply(void 0,d)}return r}(t,e)},this.effect=function(){return t.config.domTarget&&t.bind(),t.clean},this.clean=function(){var e=uM(t.config),n=t.config.eventOptions;e&&fM(e,dM(t.domListeners),n),Object.values(t.timeouts).forEach(clearTimeout),function(e){var t=e.config,n=t.window,r=t.eventOptions,o=e.windowListeners;if(!n)return;for(var i in o){fM(n,o[i],r)}e.windowListeners={}}(t)},this.state=nM(),this.timeouts={},this.domListeners=[],this.windowListeners={}};function dM(e){return void 0===e&&(e=[]),e.splice(0,e.length)}function uM(e){var t=e.domTarget;return t&&"current"in t?t.current:t}function hM(e,t,n){e[t]||(e[t]=[]),e[t].push(n)}function pM(e,t,n){void 0===t&&(t=[]),void 0===n&&(n={});for(var r,o=qj(t);!(r=o()).done;){var i=r.value,s=i[0],a=i[1];e.addEventListener(s,a,n)}}function fM(e,t,n){void 0===t&&(t=[]),void 0===n&&(n={});for(var r,o=qj(t);!(r=o()).done;){var i=r.value,s=i[0],a=i[1];e.removeEventListener(s,a,n)}}function mM(e,t,r){void 0===r&&(r={});var o=function(e){var t=new Set;e.drag&&t.add(rM.get("drag"));e.wheel&&t.add(rM.get("wheel"));e.scroll&&t.add(rM.get("scroll"));e.move&&t.add(rM.get("move"));e.pinch&&t.add(rM.get("pinch"));e.hover&&t.add(rM.get("hover"));return t}(e),i=n.useMemo((function(){return new cM(o)}),[]);return i.config=t,i.handlers=e,i.nativeRefs=r,n.useEffect(i.effect,[]),i.config.domTarget?gM:i.bind}function gM(){"development"===process.env.NODE_ENV&&console.warn("Deprecation notice: When the `domTarget` option is specified, you don't need to write `useEffect(bind, [bind])` anymore: event binding is now made handled internally to this lib.\n\nNext version won't return anything when `domTarget` is provided, therefore your code will break if you try to call `useEffect`.")}var vM=function(e){function t(){return e.apply(this,arguments)||this}Hj(t,e);var n=t.prototype;return n.getInternalMovement=function(e,t){return Nj(e,t.initial)},n.checkIntentionality=function(e,t){if(!1===e[0]&&!1===e[1])return{_intentional:e,axis:this.state.axis};var n=t.map(Math.abs),r=n[0],o=n[1],i=this.state.axis||(r>o?"x":r<o?"y":void 0);return this.config.axis||this.config.lockDirection?i?this.config.axis&&i!==this.config.axis?{_intentional:e,_blocked:!0,axis:i}:(e["x"===i?1:0]=!1,{_intentional:e,_blocked:!1,axis:i}):{_intentional:[!1,!1],_blocked:!1,axis:i}:{_intentional:e,_blocked:!1,axis:i}},n.getKinematics=function(e,t){var n=this.getMovement(e);if(!n._blocked){var r=t.timeStamp-this.state.timeStamp;Object.assign(n,function(e,t,n){var r=Dj(t),o=0===r?0:1/r,i=0===n?0:1/n,s=i*r,a=t.map((function(e){return i*e})),l=t.map((function(e){return o*e}));return{velocities:a,velocity:s,distance:Dj(e),direction:l}}(n.movement,n.delta,r))}return n},n.mapStateValues=function(e){return{xy:e.values,vxvy:e.velocities}},t}(oM);function bM(e){if("touches"in e){var t=e.targetTouches,n=e.changedTouches;return t.length>0?t:n}return null}function yM(e){var t="buttons"in e?e.buttons:0,n=bM(e),r=n&&n.length||0;return{touches:r,down:r>0||t>0,buttons:t,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,ctrlKey:e.ctrlKey}}function xM(e){var t=bM(e),n=t?t[0]:e;return[n.clientX,n.clientY]}var wM=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).ingKey="dragging",t.stateKey="drag",t.onDragStart=function(e){t.enabled&&!t.state._active&&(!function(e,t,n){var r=e.config,o=e.windowListeners;void 0===n&&(n=[]),r.window&&(fM(r.window,o[t],r.eventOptions),pM(r.window,o[t]=n,r.eventOptions))}(t.controller,t.stateKey,[["pointermove",t.onDragChange],["pointerup",t.onDragEnd],["pointercancel",t.onDragEnd]]),t.updateGestureState({_pointerId:e.pointerId}),t.config.delay>0?(t.state._delayedEvent=!0,"persist"in e&&"function"==typeof e.persist&&e.persist(),t.setTimeout(t.startDrag.bind(_j(t)),t.config.delay,e)):t.startDrag(e))},t.onDragChange=function(e){if(!t.state.canceled&&e.pointerId===t.state._pointerId)if(t.state._active){var n=yM(e);if(n.down){t.updateSharedState(n);var r=xM(e),o=t.getKinematics(r,e),i=aM(_j(t),e),s=t.state._isTap,a=Dj(o._movement);s&&a>=3&&(s=!1),t.updateGestureState(Bj({},i,o,{_isTap:s})),t.fireGestureHandler()}else t.onDragEnd(e)}else t.state._delayedEvent&&(t.clearTimeout(),t.startDrag(e))},t.onDragEnd=function(e){if(e.pointerId===t.state._pointerId){t.state._active=!1,t.updateSharedState({down:!1,buttons:0,touches:0});var n=t.state._isTap,r=t.state.velocities,o=r[0],i=r[1],s=t.state.movement,a=s[0],l=s[1],c=t.state._intentional,d=c[0],u=c[1],h=t.config.swipeVelocity,p=h[0],f=h[1],m=t.config.swipeDistance,g=m[0],v=m[1],b=Bj({},aM(_j(t),e),t.getMovement(t.state.values)),y=[0,0];b.elapsedTime<220&&(!1!==d&&Math.abs(o)>p&&Math.abs(a)>g&&(y[0]=Ij(o)),!1!==u&&Math.abs(i)>f&&Math.abs(l)>v&&(y[1]=Ij(i))),t.updateGestureState(Bj({},b,{tap:n,swipe:y})),t.fireGestureHandler(!0===n)}},t.clean=function(){e.prototype.clean.call(_j(t)),t.state._delayedEvent=!1,function(e,t){var n=e.config,r=e.windowListeners;n.window&&(fM(n.window,r[t],n.eventOptions),delete r[t])}(t.controller,t.stateKey)},t.onCancel=function(){t.state.canceled||(t.updateGestureState({canceled:!0}),t.state._active=!1,t.updateSharedState({down:!1,buttons:0,touches:0}),requestAnimationFrame((function(){return t.fireGestureHandler()})))},t.onClick=function(e){t.state._isTap||e.stopPropagation()},t}Hj(t,e);var n=t.prototype;return n.startDrag=function(e){var t=xM(e);this.updateSharedState(yM(e)),this.updateGestureState(Bj({},function(e,t,n){var r=e.state.offset,o=n.timeStamp;return Bj({},nM()[e.stateKey],{_active:!0,values:t,initial:t,offset:r,lastOffset:r,startTime:o})}(this,t,e),aM(this,e,!0),{_pointerId:e.pointerId,cancel:this.onCancel})),this.updateGestureState(this.getMovement(t)),this.fireGestureHandler()},n.addBindings=function(e){(hM(e,"onPointerDown",this.onDragStart),this.config.filterTaps)&&hM(e,this.controller.config.eventOptions.capture?"onClick":"onClickCapture",this.onClick)},t}(vM);function CM(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;var n,r,o,i;if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!CM(e[r],t[r]))return!1;return!0}if("function"==typeof Map&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;for(i=e.entries();!(r=i.next()).done;)if(!CM(r.value[1],t.get(r.value[0])))return!1;return!0}if("function"==typeof Set&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if((n=(o=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;if("undefined"!=typeof Element&&e instanceof Element)return!1;for(r=n;0!=r--;)if(!("_owner"===o[r]&&e.$$typeof||CM(e[o[r]],t[o[r]])))return!1;return!0}return e!=e&&t!=t}function kM(e,t){try{return CM(e,t)}catch(e){if((e.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw e}}function SM(e,t){void 0===t&&(t={}),rM.set("drag",wM);var r=n.useRef();return r.current||(r.current=function(e,t){var n,r,o=[],i=!1;return function(){for(var s=arguments.length,a=new Array(s),l=0;l<s;l++)a[l]=arguments[l];return i&&n===this&&t(a,o)||(r=e.apply(this,a),i=!0,n=this,o=a),r}}(eM,kM)),mM({drag:e},r.current(t))}
|
|
2590
2590
|
/*!
|
|
2591
2591
|
* tabbable 5.3.3
|
|
2592
2592
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
2593
|
-
*/var
|
|
2593
|
+
*/var $M=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],jM=$M.join(","),MM="undefined"==typeof Element,EM=MM?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,TM=!MM&&Element.prototype.getRootNode?function(e){return e.getRootNode()}:function(e){return e.ownerDocument},OM=function(e,t,n){var r=Array.prototype.slice.apply(e.querySelectorAll(jM));return t&&EM.call(e,jM)&&r.unshift(e),r=r.filter(n)},LM=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var s=i.shift();if("SLOT"===s.tagName){var a=s.assignedElements(),l=e(a.length?a:s.children,!0,r);r.flatten?o.push.apply(o,l):o.push({scope:s,candidates:l})}else{EM.call(s,jM)&&r.filter(s)&&(n||!t.includes(s))&&o.push(s);var c=s.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(s),d=!r.shadowRootFilter||r.shadowRootFilter(s);if(c&&d){var u=e(!0===c?s.children:c.children,!0,r);r.flatten?o.push.apply(o,u):o.push({scope:s,candidates:u})}else i.unshift.apply(i,s.children)}}return o},AM=function(e,t){return e.tabIndex<0&&(t||/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||e.isContentEditable)&&isNaN(parseInt(e.getAttribute("tabindex"),10))?0:e.tabIndex},RM=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},NM=function(e){return"INPUT"===e.tagName},DM=function(e){return function(e){return NM(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||TM(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var o=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!o||o===e}(e)},IM=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},PM=function(e,t){return!(t.disabled||function(e){return NM(e)&&"hidden"===e.type}(t)||function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var o=EM.call(e,"details>summary:first-of-type")?e.parentElement:e;if(EM.call(o,"details:not([open]) *"))return!0;var i=TM(e).host,s=(null==i?void 0:i.ownerDocument.contains(i))||e.ownerDocument.contains(e);if(n&&"full"!==n){if("non-zero-area"===n)return IM(e)}else{if("function"==typeof r){for(var a=e;e;){var l=e.parentElement,c=TM(e);if(l&&!l.shadowRoot&&!0===r(l))return IM(e);e=e.assignedSlot?e.assignedSlot:l||c===e.ownerDocument?l:c.host}e=a}if(s)return!e.getClientRects().length}return!1}(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!EM.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},zM=function(e,t){return!(DM(t)||AM(t)<0||!PM(e,t))},VM=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},BM=function e(t){var n=[],r=[];return t.forEach((function(t,o){var i=!!t.scope,s=i?t.scope:t,a=AM(s,i),l=i?e(t.candidates):s;0===a?i?n.push.apply(n,l):n.push(s):r.push({documentOrder:o,tabIndex:a,item:t,isScope:i,content:l})})),r.sort(RM).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},HM=function(e,t){var n;return n=(t=t||{}).getShadowRoot?LM([e],t.includeContainer,{filter:zM.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:VM}):OM(e,t.includeContainer,zM.bind(null,t)),BM(n)},_M=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==EM.call(e,jM)&&zM(t,e)},FM=$M.concat("iframe").join(","),qM=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==EM.call(e,FM)&&PM(t,e)};
|
|
2594
2594
|
/*!
|
|
2595
2595
|
* focus-trap 6.9.4
|
|
2596
2596
|
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
|
|
2597
2597
|
*/
|
|
2598
|
-
function FM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function qM(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?FM(Object(n),!0).forEach((function(t){WM(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FM(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function WM(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var UM,KM=(UM=[],{activateTrap:function(e){if(UM.length>0){var t=UM[UM.length-1];t!==e&&t.pause()}var n=UM.indexOf(e);-1===n||UM.splice(n,1),UM.push(e)},deactivateTrap:function(e){var t=UM.indexOf(e);-1!==t&&UM.splice(t,1),UM.length>0&&UM[UM.length-1].unpause()}}),GM=function(e){return setTimeout(e,0)},ZM=function(e,t){var n=-1;return e.every((function(e,r){return!t(e)||(n=r,!1)})),n},JM=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return"function"==typeof e?e.apply(void 0,n):e},XM=function(e){return e.target.shadowRoot&&"function"==typeof e.composedPath?e.composedPath()[0]:e.target},YM=function(e,t){var n,r=(null==t?void 0:t.document)||document,o=qM({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},t),i={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},s=function(e,t,n){return e&&void 0!==e[t]?e[t]:o[n||t]},a=function(e){return i.containerGroups.findIndex((function(t){var n=t.container,r=t.tabbableNodes;return n.contains(e)||r.find((function(t){return t===e}))}))},l=function(e){var t=o[e];if("function"==typeof t){for(var n=arguments.length,i=new Array(n>1?n-1:0),s=1;s<n;s++)i[s-1]=arguments[s];t=t.apply(void 0,i)}if(!0===t&&(t=void 0),!t){if(void 0===t||!1===t)return t;throw new Error("`".concat(e,"` was specified but was not a node, or did not return a node"))}var a=t;if("string"==typeof t&&!(a=r.querySelector(t)))throw new Error("`".concat(e,"` as selector refers to no known node"));return a},c=function(){var e=l("initialFocus");if(!1===e)return!1;if(void 0===e)if(a(r.activeElement)>=0)e=r.activeElement;else{var t=i.tabbableGroups[0];e=t&&t.firstTabbableNode||l("fallbackFocus")}if(!e)throw new Error("Your focus-trap needs to have at least one focusable element");return e},d=function(){if(i.containerGroups=i.containers.map((function(e){var t,n,r=VM(e,o.tabbableOptions),i=(t=e,(n=(n=o.tabbableOptions)||{}).getShadowRoot?TM([t],n.includeContainer,{filter:DM.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):EM(t,n.includeContainer,DM.bind(null,n)));return{container:e,tabbableNodes:r,focusableNodes:i,firstTabbableNode:r.length>0?r[0]:null,lastTabbableNode:r.length>0?r[r.length-1]:null,nextTabbableNode:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=i.findIndex((function(t){return t===e}));if(!(n<0))return t?i.slice(n+1).find((function(e){return BM(e,o.tabbableOptions)})):i.slice(0,n).reverse().find((function(e){return BM(e,o.tabbableOptions)}))}}})),i.tabbableGroups=i.containerGroups.filter((function(e){return e.tabbableNodes.length>0})),i.tabbableGroups.length<=0&&!l("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},u=function e(t){!1!==t&&t!==r.activeElement&&(t&&t.focus?(t.focus({preventScroll:!!o.preventScroll}),i.mostRecentlyFocusedNode=t,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(t)&&t.select()):e(c()))},h=function(e){var t=l("setReturnFocus",e);return t||!1!==t&&e},p=function(e){var t=XM(e);a(t)>=0||(JM(o.clickOutsideDeactivates,e)?n.deactivate({returnFocus:o.returnFocusOnDeactivate&&!_M(t,o.tabbableOptions)}):JM(o.allowOutsideClick,e)||e.preventDefault())},f=function(e){var t=XM(e),n=a(t)>=0;n||t instanceof Document?n&&(i.mostRecentlyFocusedNode=t):(e.stopImmediatePropagation(),u(i.mostRecentlyFocusedNode||c()))},m=function(e){if(function(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}(e)&&!1!==JM(o.escapeDeactivates,e))return e.preventDefault(),void n.deactivate();(function(e){return"Tab"===e.key||9===e.keyCode})(e)&&function(e){var t=XM(e);d();var n=null;if(i.tabbableGroups.length>0){var r=a(t),s=r>=0?i.containerGroups[r]:void 0;if(r<0)n=e.shiftKey?i.tabbableGroups[i.tabbableGroups.length-1].lastTabbableNode:i.tabbableGroups[0].firstTabbableNode;else if(e.shiftKey){var c=ZM(i.tabbableGroups,(function(e){var n=e.firstTabbableNode;return t===n}));if(c<0&&(s.container===t||_M(t,o.tabbableOptions)&&!BM(t,o.tabbableOptions)&&!s.nextTabbableNode(t,!1))&&(c=r),c>=0){var h=0===c?i.tabbableGroups.length-1:c-1;n=i.tabbableGroups[h].lastTabbableNode}}else{var p=ZM(i.tabbableGroups,(function(e){var n=e.lastTabbableNode;return t===n}));if(p<0&&(s.container===t||_M(t,o.tabbableOptions)&&!BM(t,o.tabbableOptions)&&!s.nextTabbableNode(t))&&(p=r),p>=0){var f=p===i.tabbableGroups.length-1?0:p+1;n=i.tabbableGroups[f].firstTabbableNode}}}else n=l("fallbackFocus");n&&(e.preventDefault(),u(n))}(e)},g=function(e){var t=XM(e);a(t)>=0||JM(o.clickOutsideDeactivates,e)||JM(o.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},v=function(){if(i.active)return KM.activateTrap(n),i.delayInitialFocusTimer=o.delayInitialFocus?GM((function(){u(c())})):u(c()),r.addEventListener("focusin",f,!0),r.addEventListener("mousedown",p,{capture:!0,passive:!1}),r.addEventListener("touchstart",p,{capture:!0,passive:!1}),r.addEventListener("click",g,{capture:!0,passive:!1}),r.addEventListener("keydown",m,{capture:!0,passive:!1}),n},b=function(){if(i.active)return r.removeEventListener("focusin",f,!0),r.removeEventListener("mousedown",p,!0),r.removeEventListener("touchstart",p,!0),r.removeEventListener("click",g,!0),r.removeEventListener("keydown",m,!0),n};return(n={get active(){return i.active},get paused(){return i.paused},activate:function(e){if(i.active)return this;var t=s(e,"onActivate"),n=s(e,"onPostActivate"),o=s(e,"checkCanFocusTrap");o||d(),i.active=!0,i.paused=!1,i.nodeFocusedBeforeActivation=r.activeElement,t&&t();var a=function(){o&&d(),v(),n&&n()};return o?(o(i.containers.concat()).then(a,a),this):(a(),this)},deactivate:function(e){if(!i.active)return this;var t=qM({onDeactivate:o.onDeactivate,onPostDeactivate:o.onPostDeactivate,checkCanReturnFocus:o.checkCanReturnFocus},e);clearTimeout(i.delayInitialFocusTimer),i.delayInitialFocusTimer=void 0,b(),i.active=!1,i.paused=!1,KM.deactivateTrap(n);var r=s(t,"onDeactivate"),a=s(t,"onPostDeactivate"),l=s(t,"checkCanReturnFocus"),c=s(t,"returnFocus","returnFocusOnDeactivate");r&&r();var d=function(){GM((function(){c&&u(h(i.nodeFocusedBeforeActivation)),a&&a()}))};return c&&l?(l(h(i.nodeFocusedBeforeActivation)).then(d,d),this):(d(),this)},pause:function(){return i.paused||!i.active||(i.paused=!0,b()),this},unpause:function(){return i.paused&&i.active?(i.paused=!1,d(),v(),this):this},updateContainerElements:function(e){var t=[].concat(e).filter(Boolean);return i.containers=t.map((function(e){return"string"==typeof e?r.querySelector(e):e})),i.active&&d(),this}}).updateContainerElements(e),n};var QM=!1;if("undefined"!=typeof window){var eE={get passive(){QM=!0}};window.addEventListener("testPassive",null,eE),window.removeEventListener("testPassive",null,eE)}var tE,nE="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1),rE=[],oE=!1,iE=-1,sE=void 0,aE=void 0,lE=function(e){return rE.some((function(t){return!(!t.options.allowTouchMove||!t.options.allowTouchMove(e))}))},cE=function(e){var t=e||window.event;return!!lE(t.target)||(t.touches.length>1||(t.preventDefault&&t.preventDefault(),!1))},dE=function(e,t){if(e){if(!rE.some((function(t){return t.targetElement===e}))){var n={targetElement:e,options:t||{}};rE=[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(rE),[n]),nE?(e.ontouchstart=function(e){1===e.targetTouches.length&&(iE=e.targetTouches[0].clientY)},e.ontouchmove=function(t){1===t.targetTouches.length&&function(e,t){var n=e.targetTouches[0].clientY-iE;!lE(e.target)&&(t&&0===t.scrollTop&&n>0||function(e){return!!e&&e.scrollHeight-e.scrollTop<=e.clientHeight}(t)&&n<0?cE(e):e.stopPropagation())}(t,e)},oE||(document.addEventListener("touchmove",cE,QM?{passive:!1}:void 0),oE=!0)):function(e){if(void 0===aE){var t=!!e&&!0===e.reserveScrollBarGap,n=window.innerWidth-document.documentElement.clientWidth;t&&n>0&&(aE=document.body.style.paddingRight,document.body.style.paddingRight=n+"px")}void 0===sE&&(sE=document.body.style.overflow,document.body.style.overflow="hidden")}(t)}}else console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.")},uE=function(e){e?(rE=rE.filter((function(t){return t.targetElement!==e})),nE?(e.ontouchstart=null,e.ontouchmove=null,oE&&0===rE.length&&(document.removeEventListener("touchmove",cE,QM?{passive:!1}:void 0),oE=!1)):rE.length||(void 0!==aE&&(document.body.style.paddingRight=aE,aE=void 0),void 0!==sE&&(document.body.style.overflow=sE,sE=void 0))):console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.")},hE=[],pE="ResizeObserver loop completed with undelivered notifications.";!function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(tE||(tE={}));var fE,mE=function(e){return Object.freeze(e)},gE=function(e,t){this.inlineSize=e,this.blockSize=t,mE(this)},vE=function(){function e(e,t,n,r){return this.x=e,this.y=t,this.width=n,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,mE(this)}return e.prototype.toJSON=function(){var e=this;return{x:e.x,y:e.y,top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),bE=function(e){return e instanceof SVGElement&&"getBBox"in e},yE=function(e){if(bE(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var o=e,i=o.offsetWidth,s=o.offsetHeight;return!(i||s||e.getClientRects().length)},xE=function(e){var t;if(e instanceof Element)return!0;var n=null===(t=null==e?void 0:e.ownerDocument)||void 0===t?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},wE="undefined"!=typeof window?window:{},CE=new WeakMap,kE=/auto|scroll/,SE=/^tb|vertical/,$E=/msie|trident/i.test(wE.navigator&&wE.navigator.userAgent),jE=function(e){return parseFloat(e||"0")},ME=function(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=!1),new gE((n?t:e)||0,(n?e:t)||0)},EE=mE({devicePixelContentBoxSize:ME(),borderBoxSize:ME(),contentBoxSize:ME(),contentRect:new vE(0,0,0,0)}),TE=function(e,t){if(void 0===t&&(t=!1),CE.has(e)&&!t)return CE.get(e);if(yE(e))return CE.set(e,EE),EE;var n=getComputedStyle(e),r=bE(e)&&e.ownerSVGElement&&e.getBBox(),o=!$E&&"border-box"===n.boxSizing,i=SE.test(n.writingMode||""),s=!r&&kE.test(n.overflowY||""),a=!r&&kE.test(n.overflowX||""),l=r?0:jE(n.paddingTop),c=r?0:jE(n.paddingRight),d=r?0:jE(n.paddingBottom),u=r?0:jE(n.paddingLeft),h=r?0:jE(n.borderTopWidth),p=r?0:jE(n.borderRightWidth),f=r?0:jE(n.borderBottomWidth),m=u+c,g=l+d,v=(r?0:jE(n.borderLeftWidth))+p,b=h+f,y=a?e.offsetHeight-b-e.clientHeight:0,x=s?e.offsetWidth-v-e.clientWidth:0,w=o?m+v:0,C=o?g+b:0,k=r?r.width:jE(n.width)-w-x,S=r?r.height:jE(n.height)-C-y,$=k+m+x+v,j=S+g+y+b,M=mE({devicePixelContentBoxSize:ME(Math.round(k*devicePixelRatio),Math.round(S*devicePixelRatio),i),borderBoxSize:ME($,j,i),contentBoxSize:ME(k,S,i),contentRect:new vE(u,l,k,S)});return CE.set(e,M),M},OE=function(e,t,n){var r=TE(e,n),o=r.borderBoxSize,i=r.contentBoxSize,s=r.devicePixelContentBoxSize;switch(t){case tE.DEVICE_PIXEL_CONTENT_BOX:return s;case tE.BORDER_BOX:return o;default:return i}},LE=function(e){var t=TE(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=mE([t.borderBoxSize]),this.contentBoxSize=mE([t.contentBoxSize]),this.devicePixelContentBoxSize=mE([t.devicePixelContentBoxSize])},AE=function(e){if(yE(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},RE=function(){var e=1/0,t=[];hE.forEach((function(n){if(0!==n.activeTargets.length){var r=[];n.activeTargets.forEach((function(t){var n=new LE(t.target),o=AE(t.target);r.push(n),t.lastReportedSize=OE(t.target,t.observedBox),o<e&&(e=o)})),t.push((function(){n.callback.call(n.observer,r,n.observer)})),n.activeTargets.splice(0,n.activeTargets.length)}}));for(var n=0,r=t;n<r.length;n++){(0,r[n])()}return e},NE=function(e){hE.forEach((function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach((function(n){n.isActive()&&(AE(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))}))}))},DE=function(){var e=0;for(NE(e);hE.some((function(e){return e.activeTargets.length>0}));)e=RE(),NE(e);return hE.some((function(e){return e.skippedTargets.length>0}))&&function(){var e;"function"==typeof ErrorEvent?e=new ErrorEvent("error",{message:pE}):((e=document.createEvent("Event")).initEvent("error",!1,!1),e.message=pE),window.dispatchEvent(e)}(),e>0},IE=[],PE=function(e){if(!fE){var t=0,n=document.createTextNode("");new MutationObserver((function(){return IE.splice(0).forEach((function(e){return e()}))})).observe(n,{characterData:!0}),fE=function(){n.textContent="".concat(t?t--:t++)}}IE.push(e),fE()},zE=0,VE={attributes:!0,characterData:!0,childList:!0,subtree:!0},BE=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],HE=function(e){return void 0===e&&(e=0),Date.now()+e},_E=!1,FE=new(function(){function e(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return e.prototype.run=function(e){var t=this;if(void 0===e&&(e=250),!_E){_E=!0;var n,r=HE(e);n=function(){var n=!1;try{n=DE()}finally{if(_E=!1,e=r-HE(),!zE)return;n?t.run(1e3):e>0?t.run(e):t.start()}},PE((function(){requestAnimationFrame(n)}))}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var e=this,t=function(){return e.observer&&e.observer.observe(document.body,VE)};document.body?t():wE.addEventListener("DOMContentLoaded",t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),BE.forEach((function(t){return wE.addEventListener(t,e.listener,!0)})))},e.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),BE.forEach((function(t){return wE.removeEventListener(t,e.listener,!0)})),this.stopped=!0)},e}()),qE=function(e){!zE&&e>0&&FE.start(),!(zE+=e)&&FE.stop()},WE=function(){function e(e,t){this.target=e,this.observedBox=t||tE.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e=OE(this.target,this.observedBox,!0);return function(e){return!bE(e)&&!function(e){switch(e.tagName){case"INPUT":if("image"!==e.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(e)&&"inline"===getComputedStyle(e).display}(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},e}(),UE=function(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t},KE=new WeakMap,GE=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},ZE=function(){function e(){}return e.connect=function(e,t){var n=new UE(e,t);KE.set(e,n)},e.observe=function(e,t,n){var r=KE.get(e),o=0===r.observationTargets.length;GE(r.observationTargets,t)<0&&(o&&hE.push(r),r.observationTargets.push(new WE(t,n&&n.box)),qE(1),FE.schedule())},e.unobserve=function(e,t){var n=KE.get(e),r=GE(n.observationTargets,t),o=1===n.observationTargets.length;r>=0&&(o&&hE.splice(hE.indexOf(n),1),n.observationTargets.splice(r,1),qE(-1))},e.disconnect=function(e){var t=this,n=KE.get(e);n.observationTargets.slice().forEach((function(n){return t.unobserve(e,n.target)})),n.activeTargets.splice(0,n.activeTargets.length)},e}(),JE=function(){function e(e){if(0===arguments.length)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof e)throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");ZE.connect(this,e)}return e.prototype.observe=function(e,t){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!xE(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");ZE.observe(this,e,t)},e.prototype.unobserve=function(e){if(0===arguments.length)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!xE(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");ZE.unobserve(this,e)},e.prototype.disconnect=function(){ZE.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();function XE(){return XE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},XE.apply(this,arguments)}function YE(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(o[n]=e[n]);return o}var QE="undefined"!=typeof window?n.useLayoutEffect:n.useEffect;function eT(e,t,n){return t=(t=+t)==t?t:0,n=(n=+n)==n?n:0,(e=+e)==e&&(e=(e=e<=n?e:n)>=t?e:t),e}function tT(e){var t=Math.round(e);if(Number.isNaN(e))throw new TypeError("Found a NaN! Check your snapPoints / defaultSnap / snapTo ");return t}var nT={box:"border-box"};function rT(e,t){var r=t.label,o=t.enabled,i=t.resizeSourceRef,s=n.useState(0),a=s[0],l=s[1];n.useDebugValue(r+": "+a);var c=n.useCallback((function(e){l(e[0].borderBoxSize[0].blockSize),i.current="element"}),[i]);return QE((function(){if(e.current&&o){var t=new JE(c);return t.observe(e.current,nT),function(){t.disconnect()}}}),[e,c,o]),o?a:0}function oT(e){return void 0===e&&(e=1e3),new Promise((function(t){return setTimeout(t,e)}))}var iT={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},sT={RESIZE:{target:"#overlay.resizing",actions:"onOpenEnd"}},aT=function(e,t,n){return void 0===n&&(n=e.context),new c$(e,t,n)}({id:"overlay",initial:"closed",context:{initialState:"CLOSED"},states:{closed:{on:{OPEN:"opening",CLOSE:void 0}},opening:{initial:"start",states:{start:{invoke:{src:"onOpenStart",onDone:"transition"}},transition:{always:[{target:"immediately",cond:"initiallyOpen"},{target:"smoothly",cond:"initiallyClosed"}]},immediately:{initial:"open",states:{open:{invoke:{src:"openImmediately",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"#overlay.opening.end"},on:XE({},iT,sT)}}},smoothly:{initial:"visuallyHidden",states:{visuallyHidden:{invoke:{src:"renderVisuallyHidden",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"open"}},open:{invoke:{src:"openSmoothly",onDone:"#overlay.opening.end"},on:XE({},iT,sT)}}},end:{invoke:{src:"onOpenEnd",onDone:"done"},on:{CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:XE({},{CLOSE:{target:"#overlay.closing",actions:"onOpenCancel"}}),onDone:"open"},open:{on:{DRAG:"#overlay.dragging",SNAP:"snapping",RESIZE:"resizing"}},dragging:{on:{SNAP:"snapping"}},snapping:{initial:"start",states:{start:{invoke:{src:"onSnapStart",onDone:"snappingSmoothly"},entry:[u$({y:function(e,t){return t.payload.y},velocity:function(e,t){return t.payload.velocity},snapSource:function(e,t){var n=t.payload.source;return void 0===n?"custom":n}})]},snappingSmoothly:{invoke:{src:"snapSmoothly",onDone:"end"}},end:{invoke:{src:"onSnapEnd",onDone:"done"},on:{RESIZE:"#overlay.resizing",SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{SNAP:{target:"snapping",actions:"onSnapEnd"},RESIZE:{target:"#overlay.resizing",actions:"onSnapCancel"},DRAG:{target:"#overlay.dragging",actions:"onSnapCancel"},CLOSE:{target:"#overlay.closing",actions:"onSnapCancel"}},onDone:"open"},resizing:{initial:"start",states:{start:{invoke:{src:"onResizeStart",onDone:"resizingSmoothly"}},resizingSmoothly:{invoke:{src:"resizeSmoothly",onDone:"end"}},end:{invoke:{src:"onResizeEnd",onDone:"done"},on:{SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{RESIZE:{target:"resizing",actions:"onResizeEnd"},SNAP:{target:"snapping",actions:"onResizeCancel"},DRAG:{target:"#overlay.dragging",actions:"onResizeCancel"},CLOSE:{target:"#overlay.closing",actions:"onResizeCancel"}},onDone:"open"},closing:{initial:"start",states:{start:{invoke:{src:"onCloseStart",onDone:"deactivating"},on:{OPEN:{target:"#overlay.open",actions:"onCloseCancel"}}},deactivating:{invoke:{src:"deactivate",onDone:"closingSmoothly"}},closingSmoothly:{invoke:{src:"closeSmoothly",onDone:"end"}},end:{invoke:{src:"onCloseEnd",onDone:"done"},on:{OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}}},done:{type:"final"}},on:{CLOSE:void 0,OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}},onDone:"closed"}},on:{CLOSE:"closing"}},{actions:{onOpenCancel:function(e,t){},onSnapCancel:function(e,t){},onResizeCancel:function(e,t){},onCloseCancel:function(e,t){},onOpenEnd:function(e,t){},onSnapEnd:function(e,t){},onRezizeEnd:function(e,t){}},services:{onSnapStart:function(){try{return Promise.resolve(oT()).then((function(){}))}catch(e){return Promise.reject(e)}},onOpenStart:function(){try{return Promise.resolve(oT()).then((function(){}))}catch(e){return Promise.reject(e)}},onCloseStart:function(){try{return Promise.resolve(oT()).then((function(){}))}catch(e){return Promise.reject(e)}},onResizeStart:function(){try{return Promise.resolve(oT()).then((function(){}))}catch(e){return Promise.reject(e)}},onSnapEnd:function(){try{return Promise.resolve(oT()).then((function(){}))}catch(e){return Promise.reject(e)}},onOpenEnd:function(){try{return Promise.resolve(oT()).then((function(){}))}catch(e){return Promise.reject(e)}},onCloseEnd:function(){try{return Promise.resolve(oT()).then((function(){}))}catch(e){return Promise.reject(e)}},onResizeEnd:function(){try{return Promise.resolve(oT()).then((function(){}))}catch(e){return Promise.reject(e)}},renderVisuallyHidden:function(e,t){try{return Promise.resolve(oT()).then((function(){}))}catch(e){return Promise.reject(e)}},activate:function(e,t){try{return Promise.resolve(oT()).then((function(){}))}catch(e){return Promise.reject(e)}},deactivate:function(e,t){try{return Promise.resolve(oT()).then((function(){}))}catch(e){return Promise.reject(e)}},openSmoothly:function(e,t){try{return Promise.resolve(oT()).then((function(){}))}catch(e){return Promise.reject(e)}},openImmediately:function(e,t){try{return Promise.resolve(oT()).then((function(){}))}catch(e){return Promise.reject(e)}},snapSmoothly:function(e,t){try{return Promise.resolve(oT()).then((function(){}))}catch(e){return Promise.reject(e)}},resizeSmoothly:function(e,t){try{return Promise.resolve(oT()).then((function(){}))}catch(e){return Promise.reject(e)}},closeSmoothly:function(e,t){try{return Promise.resolve(oT()).then((function(){}))}catch(e){return Promise.reject(e)}}},guards:{initiallyClosed:function(e){return"CLOSED"===e.initialState},initiallyOpen:function(e){return"OPEN"===e.initialState}}}),lT=["children","sibling","className","footer","header","open","initialState","lastSnapRef","initialFocusRef","onDismiss","maxHeight","defaultSnap","snapPoints","blocking","scrollLocking","style","onSpringStart","onSpringCancel","onSpringEnd","reserveScrollBarGap","expandOnContentDrag"],cT=["velocity"],dT=["onRest","config"],uT={tension:170,friction:26},hT=uT.tension,pT=uT.friction,fT=n.forwardRef((function(e,t){var r=e.children,o=e.sibling,i=e.className,s=e.footer,a=e.header,l=e.open,c=e.initialState,d=e.lastSnapRef,u=e.initialFocusRef,h=e.onDismiss,p=e.maxHeight,f=e.defaultSnap,m=void 0===f?gT:f,g=e.snapPoints,v=void 0===g?vT:g,b=e.blocking,y=void 0===b||b,x=e.scrollLocking,w=void 0===x||x,C=e.style,k=e.onSpringStart,S=e.onSpringCancel,$=e.onSpringEnd,j=e.reserveScrollBarGap,M=void 0===j?y:j,E=e.expandOnContentDrag,T=void 0!==E&&E,O=YE(e,lT),L=function(){var e=n.useState(!1),t=e[0],r=e[1],o=n.useState({}),i=o[0],s=o[1],a=n.useCallback((function(e){return s((function(t){var n;return XE({},t,((n={})[e]=!1,n))})),function(){s((function(t){var n;return XE({},t,((n={})[e]=!0,n))}))}}),[]);return n.useEffect((function(){var e=Object.values(i);0!==e.length&&e.every(Boolean)&&r(!0)}),[i]),{ready:t,registerReady:a}}(),A=L.ready,R=L.registerReady,N=n.useRef(!1),D=n.useRef(k),I=n.useRef(S),P=n.useRef($);n.useEffect((function(){D.current=k,I.current=S,P.current=$}),[S,k,$]);var z,V,B=Q$((function(){return{y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}})),H=B[0],_=B[1],F=n.useRef(null),q=n.useRef(null),W=n.useRef(null),U=n.useRef(null),K=n.useRef(null),G=n.useRef(null),Z=n.useRef(0),J=n.useRef(),X=n.useRef(!1),Y=(z=n.useMemo((function(){return"undefined"!=typeof window?window.matchMedia("(prefers-reduced-motion: reduce)"):null}),[]),V=n.useRef(null==z?void 0:z.matches),n.useDebugValue(V.current?"reduce":"no-preference"),n.useEffect((function(){var e=function(e){V.current=e.matches};return null==z||z.addListener(e),function(){return null==z?void 0:z.removeListener(e)}}),[z]),V),Q=function(e){var t=e.targetRef,r=e.enabled,o=e.reserveScrollBarGap,i=n.useRef({activate:function(){throw new TypeError("Tried to activate scroll lock too early")},deactivate:function(){}});return n.useDebugValue(r?"Enabled":"Disabled"),n.useEffect((function(){if(!r)return i.current.deactivate(),void(i.current={activate:function(){},deactivate:function(){}});var e=t.current,n=!1;i.current={activate:function(){n||(n=!0,dE(e,{allowTouchMove:function(e){return e.closest("[data-body-scroll-lock-ignore]")},reserveScrollBarGap:o}))},deactivate:function(){n&&(n=!1,uE(e))}}}),[r,t,o]),i}({targetRef:q,enabled:A&&w,reserveScrollBarGap:M}),ee=function(e){var t=e.targetRef,r=e.enabled,o=n.useRef({activate:function(){throw new TypeError("Tried to activate aria hider too early")},deactivate:function(){}});return n.useDebugValue(r?"Enabled":"Disabled"),n.useEffect((function(){if(!r)return o.current.deactivate(),void(o.current={activate:function(){},deactivate:function(){}});var e=t.current,n=!1,i=[],s=[];o.current={activate:function(){if(!n){n=!0;var t=e.parentNode;document.querySelectorAll("body > *").forEach((function(e){if(e!==t){var n=e.getAttribute("aria-hidden");null!==n&&"false"!==n||(i.push(n),s.push(e),e.setAttribute("aria-hidden","true"))}}))}},deactivate:function(){n&&(n=!1,s.forEach((function(e,t){var n=i[t];null===n?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",n)})),i=[],s=[])}}}),[t,r]),o}({targetRef:F,enabled:A&&y}),te=function(e){var t=e.targetRef,r=e.fallbackRef,o=e.initialFocusRef,i=e.enabled,s=n.useRef({activate:function(){throw new TypeError("Tried to activate focus trap too early")},deactivate:function(){}});return n.useDebugValue(i?"Enabled":"Disabled"),n.useEffect((function(){if(!i)return s.current.deactivate(),void(s.current={activate:function(){},deactivate:function(){}});var e=r.current,n=YM(t.current,{onActivate:void 0,initialFocus:o?function(){return(null==o?void 0:o.current)||e}:void 0,fallbackFocus:e,escapeDeactivates:!1,clickOutsideDeactivates:!1}),a=!1;s.current={activate:function(){try{return a?Promise.resolve():(a=!0,Promise.resolve(n.activate()).then((function(){return Promise.resolve(new Promise((function(e){return setTimeout((function(){return e(void 0)}),0)}))).then((function(){}))})))}catch(e){return Promise.reject(e)}},deactivate:function(){a&&(a=!1,n.deactivate())}}}),[i,r,o,t]),s}({targetRef:F,fallbackRef:G,initialFocusRef:u||void 0,enabled:A&&y&&!1!==u}),ne=function(e){var t=e.getSnapPoints,r=e.heightRef,o=e.lastSnapRef,i=e.ready,s=function(e){var t=e.contentRef,r=e.controlledMaxHeight,o=e.footerEnabled,i=e.footerRef,s=e.headerEnabled,a=e.headerRef,l=e.registerReady,c=e.resizeSourceRef,d=n.useMemo((function(){return l("contentHeight")}),[l]),u=function(e,t,r){var o=n.useMemo((function(){return t("maxHeight")}),[t]),i=n.useState((function(){return tT(e)||"undefined"!=typeof window?window.innerHeight:0})),s=i[0],a=i[1],l=s>0,c=n.useRef(0);return n.useDebugValue(e?"controlled":"auto"),n.useEffect((function(){l&&o()}),[l,o]),QE((function(){if(e)return a(tT(e)),void(r.current="maxheightprop");var t=function(){c.current||(c.current=requestAnimationFrame((function(){a(window.innerHeight),r.current="window",c.current=0})))};return window.addEventListener("resize",t),a(window.innerHeight),r.current="window",o(),function(){window.removeEventListener("resize",t),cancelAnimationFrame(c.current)}}),[e,o,r]),s}(r,l,c),h=rT(a,{label:"headerHeight",enabled:s,resizeSourceRef:c}),p=rT(t,{label:"contentHeight",enabled:!0,resizeSourceRef:c}),f=rT(i,{label:"footerHeight",enabled:o,resizeSourceRef:c}),m=Math.min(u-h-f,p)+h+f;n.useDebugValue("minHeight: "+m);var g=p>0;return n.useEffect((function(){g&&d()}),[g,d]),{maxHeight:u,minHeight:m,headerHeight:h,footerHeight:f}}({contentRef:e.contentRef,controlledMaxHeight:e.controlledMaxHeight,footerEnabled:e.footerEnabled,footerRef:e.footerRef,headerEnabled:e.headerEnabled,headerRef:e.headerRef,registerReady:e.registerReady,resizeSourceRef:e.resizeSourceRef}),a=s.maxHeight,l=s.minHeight,c=s.headerHeight,d=s.footerHeight,u=function(e,t){var n=[].concat(e).map(tT).reduce((function(e,n){return e.add(eT(n,0,t)),e}),new Set),r=Array.from(n),o=Math.min.apply(Math,r);if(Number.isNaN(o))throw new TypeError("minSnap is NaN");var i=Math.max.apply(Math,r);if(Number.isNaN(i))throw new TypeError("maxSnap is NaN");return{snapPoints:r,minSnap:o,maxSnap:i}}(i?t({height:r.current,footerHeight:d,headerHeight:c,minHeight:l,maxHeight:a}):[0],a),h=u.snapPoints,p=u.minSnap,f=u.maxSnap;return n.useDebugValue("minSnap: "+p+", maxSnap:"+f),{minSnap:p,maxSnap:f,findSnap:function(e){var t=tT("function"==typeof e?e({footerHeight:d,headerHeight:c,height:r.current,minHeight:l,maxHeight:a,snapPoints:h,lastSnap:o.current}):e);return h.reduce((function(e,n){return Math.abs(n-t)<Math.abs(e-t)?n:e}),p)},maxHeight:a}}({contentRef:W,controlledMaxHeight:p,footerEnabled:!!s,footerRef:K,getSnapPoints:v,headerEnabled:!1!==a,headerRef:U,heightRef:Z,lastSnapRef:d,ready:A,registerReady:R,resizeSourceRef:J}),re=ne.minSnap,oe=ne.maxSnap,ie=ne.maxHeight,se=ne.findSnap,ae=n.useRef(ie),le=n.useRef(re),ce=n.useRef(oe),de=n.useRef(se),ue=n.useRef(0);QE((function(){ae.current=ie,ce.current=oe,le.current=re,de.current=se,ue.current=se(m)}),[se,m,ie,oe,re]);var he=n.useCallback((function(e){var t=e.onRest,n=e.config,r=(n=void 0===n?{}:n).velocity,o=void 0===r?1:r,i=YE(n,cT),s=YE(e,dT);return new Promise((function(e){return _(XE({},s,{config:XE({velocity:o},i,{mass:1,tension:hT,friction:Math.max(pT,pT+(pT-pT*o))}),onRest:function(){var n=[].slice.call(arguments);e.apply(void 0,n),null==t||t.apply(void 0,n)}}))}))}),[_]),pe=S$(aT,{devTools:!1,actions:{onOpenCancel:n.useCallback((function(){return null==I.current?void 0:I.current({type:"OPEN"})}),[]),onSnapCancel:n.useCallback((function(e){return null==I.current?void 0:I.current({type:"SNAP",source:e.snapSource})}),[]),onCloseCancel:n.useCallback((function(){return null==I.current?void 0:I.current({type:"CLOSE"})}),[]),onResizeCancel:n.useCallback((function(){return null==I.current?void 0:I.current({type:"RESIZE",source:J.current})}),[]),onOpenEnd:n.useCallback((function(){return null==P.current?void 0:P.current({type:"OPEN"})}),[]),onSnapEnd:n.useCallback((function(e,t){return null==P.current?void 0:P.current({type:"SNAP",source:e.snapSource})}),[]),onResizeEnd:n.useCallback((function(){return null==P.current?void 0:P.current({type:"RESIZE",source:J.current})}),[])},context:{initialState:c},services:{onSnapStart:n.useCallback((function(e,t){try{return Promise.resolve(null==D.current?void 0:D.current({type:"SNAP",source:t.payload.source||"custom"}))}catch(e){return Promise.reject(e)}}),[]),onOpenStart:n.useCallback((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"OPEN"}))}catch(e){return Promise.reject(e)}}),[]),onCloseStart:n.useCallback((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"CLOSE"}))}catch(e){return Promise.reject(e)}}),[]),onResizeStart:n.useCallback((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"RESIZE",source:J.current}))}catch(e){return Promise.reject(e)}}),[]),onSnapEnd:n.useCallback((function(e,t){try{return Promise.resolve(null==P.current?void 0:P.current({type:"SNAP",source:e.snapSource}))}catch(e){return Promise.reject(e)}}),[]),onOpenEnd:n.useCallback((function(){try{return Promise.resolve(null==P.current?void 0:P.current({type:"OPEN"}))}catch(e){return Promise.reject(e)}}),[]),onCloseEnd:n.useCallback((function(){try{return Promise.resolve(null==P.current?void 0:P.current({type:"CLOSE"}))}catch(e){return Promise.reject(e)}}),[]),onResizeEnd:n.useCallback((function(){try{return Promise.resolve(null==P.current?void 0:P.current({type:"RESIZE",source:J.current}))}catch(e){return Promise.reject(e)}}),[]),renderVisuallyHidden:n.useCallback((function(e,t){try{return Promise.resolve(he({y:ue.current,ready:0,maxHeight:ae.current,maxSnap:ce.current,minSnap:ue.current,immediate:!0})).then((function(){}))}catch(e){return Promise.reject(e)}}),[he]),activate:n.useCallback((function(e,t){try{return N.current=!0,Promise.resolve(Promise.all([Q.current.activate(),te.current.activate(),ee.current.activate()])).then((function(){}))}catch(e){return Promise.reject(e)}}),[ee,te,Q]),deactivate:n.useCallback((function(){try{return Q.current.deactivate(),te.current.deactivate(),ee.current.deactivate(),N.current=!1,Promise.resolve()}catch(e){return Promise.reject(e)}}),[ee,te,Q]),openImmediately:n.useCallback((function(){try{return Z.current=ue.current,Promise.resolve(he({y:ue.current,ready:1,maxHeight:ae.current,maxSnap:ce.current,minSnap:ue.current,immediate:!0})).then((function(){}))}catch(e){return Promise.reject(e)}}),[he]),openSmoothly:n.useCallback((function(){try{return Promise.resolve(he({y:0,ready:1,maxHeight:ae.current,maxSnap:ce.current,minSnap:ue.current,immediate:!0})).then((function(){return Z.current=ue.current,Promise.resolve(he({y:ue.current,ready:1,maxHeight:ae.current,maxSnap:ce.current,minSnap:ue.current,immediate:Y.current})).then((function(){}))}))}catch(e){return Promise.reject(e)}}),[he,Y]),snapSmoothly:n.useCallback((function(e,t){try{var n=de.current(e.y);return Z.current=n,d.current=n,Promise.resolve(he({y:n,ready:1,maxHeight:ae.current,maxSnap:ce.current,minSnap:le.current,immediate:Y.current,config:{velocity:e.velocity}})).then((function(){}))}catch(e){return Promise.reject(e)}}),[he,d,Y]),resizeSmoothly:n.useCallback((function(){try{var e=de.current(Z.current);return Z.current=e,d.current=e,Promise.resolve(he({y:e,ready:1,maxHeight:ae.current,maxSnap:ce.current,minSnap:le.current,immediate:"element"!==J.current||Y.current})).then((function(){}))}catch(e){return Promise.reject(e)}}),[he,d,Y]),closeSmoothly:n.useCallback((function(e,t){try{return he({minSnap:Z.current,immediate:!0}),Z.current=0,Promise.resolve(he({y:0,maxHeight:ae.current,maxSnap:ce.current,immediate:Y.current})).then((function(){return Promise.resolve(he({ready:0,immediate:!0})).then((function(){}))}))}catch(e){return Promise.reject(e)}}),[he,Y])}}),fe=pe[0],me=pe[1];n.useEffect((function(){A&&me(l?"OPEN":"CLOSE")}),[l,me,A]),QE((function(){(ie||oe||re)&&me("RESIZE")}),[ie,oe,re,me]),n.useEffect((function(){return function(){Q.current.deactivate(),te.current.deactivate(),ee.current.deactivate()}}),[ee,te,Q]),n.useImperativeHandle(t,(function(){return{snapTo:function(e,t){var n=void 0===t?{}:t,r=n.velocity,o=void 0===r?1:r,i=n.source,s=void 0===i?"custom":i;me("SNAP",{payload:{y:de.current(e),velocity:o,source:s}})},get height(){return Z.current}}}),[me]),n.useEffect((function(){var e=q.current,t=function(e){X.current&&e.preventDefault()},n=function(t){e.scrollTop<0&&(requestAnimationFrame((function(){e.style.overflow="hidden",e.scrollTop=0,e.style.removeProperty("overflow")})),t.preventDefault())};return T&&(e.addEventListener("scroll",t),e.addEventListener("touchmove",t),e.addEventListener("touchstart",n)),function(){e.removeEventListener("scroll",t),e.removeEventListener("touchmove",t),e.removeEventListener("touchstart",n)}}),[T,q]);var ge=CM((function(e){var t=e.args,n=(t=void 0===t?[]:t)[0],r=(n=void 0===n?{}:n).closeOnTap,o=void 0!==r&&r,i=n.isContentDragging,s=void 0!==i&&i,a=e.cancel,l=e.direction[1],c=e.down,d=e.first,u=e.last,p=e.memo,f=void 0===p?H.y.getValue():p,m=e.tap,g=e.velocity,v=-1*e.movement[1];if(!N.current)return a(),f;if(h&&o&&m)return a(),setTimeout((function(){return h()}),0),f;if(m)return f;var b=f+v,y=v*g,x=Math.max(le.current,Math.min(ce.current,b+2*y));if(!c&&h&&l>0&&b+y<le.current/2)return a(),h(),f;var w=c?h||le.current!==ce.current?Ij(b,h?0:le.current,ce.current,.55):b<le.current?Ij(b,le.current,2*ce.current,.55):Ij(b,le.current/2,ce.current,.55):x;return T&&s?(w>=ce.current&&(w=ce.current),f===ce.current&&q.current.scrollTop>0&&(w=ce.current),X.current=w<ce.current):X.current=!1,d&&me("DRAG"),u?(me("SNAP",{payload:{y:w,velocity:g>.05?g:1,source:"dragging"}}),f):(_({y:w,ready:1,maxHeight:ae.current,maxSnap:ce.current,minSnap:le.current,immediate:!0,config:{velocity:g}}),f)}),{filterTaps:!0});if(Number.isNaN(ce.current))throw new TypeError("maxSnapRef is NaN!!");if(Number.isNaN(le.current))throw new TypeError("minSnapRef is NaN!!");var ve=function(e){var t,n=e.spring,r=K$([n.y,n.maxHeight],(function(e,t){return Math.round(eT(t-e,0,16))+"px"})),o=K$([n.y,n.minSnap,n.maxSnap],(function(e,t,n){return eT(e,t,n)+"px"})),i=K$([n.y,n.minSnap,n.maxSnap],(function(e,t,n){return e<t?t-e+"px":e>n?n-e+"px":"0px"})),s=K$([n.y,n.maxSnap],(function(e,t){return e>=t?Math.ceil(e-t):0})),a=K$([n.y,n.minSnap],(function(e,t){if(!t)return 0;var n=Math.max(t/2-45,0);return eT((e-n)*(1/(Math.min(t/2+45,t)-n)+0),0,1)})),l=K$([n.y,n.minSnap],(function(e,t){return t?eT(e/t,0,1):0}));return(t={})["--rsbs-content-opacity"]=a,t["--rsbs-backdrop-opacity"]=l,t["--rsbs-antigap-scale-y"]=s,t["--rsbs-overlay-translate-y"]=i,t["--rsbs-overlay-rounded"]=r,t["--rsbs-overlay-h"]=o,t}({spring:H});return n.createElement(Oj.div,XE({},O,{"data-rsbs-root":!0,"data-rsbs-state":mT.find(fe.matches),"data-rsbs-is-blocking":y,"data-rsbs-is-dismissable":!!h,"data-rsbs-has-header":!!a,"data-rsbs-has-footer":!!s,className:i,ref:F,style:XE({},ve,C,{opacity:H.ready})}),o,y&&n.createElement("div",XE({key:"backdrop","data-rsbs-backdrop":!0},ge({closeOnTap:!0}))),n.createElement("div",{key:"overlay","aria-modal":"true",role:"dialog","data-rsbs-overlay":!0,tabIndex:-1,ref:G,onKeyDown:function(e){"Escape"===e.key&&(e.stopPropagation(),h&&h())}},!1!==a&&n.createElement("div",XE({key:"header","data-rsbs-header":!0,ref:U},ge()),a),n.createElement("div",XE({key:"scroll","data-rsbs-scroll":!0,ref:q},T?ge({isContentDragging:!0}):{}),n.createElement("div",{"data-rsbs-content":!0,ref:W},r)),s&&n.createElement("div",XE({key:"footer",ref:K,"data-rsbs-footer":!0},ge()),s)))})),mT=["closed","opening","open","closing","dragging","snapping","resizing"];function gT(e){var t=e.lastSnap;return null!=t?t:Math.min.apply(Math,e.snapPoints)}function vT(e){return e.minHeight}var bT=["onSpringStart","onSpringEnd","skipInitialTransition"],yT=n.forwardRef((function(e,t){var r=e.onSpringStart,o=e.onSpringEnd,i=e.skipInitialTransition,s=YE(e,bT),a=n.useState(!1),l=a[0],c=a[1],d=n.useRef(),u=n.useRef(null),h=n.useRef(i&&s.open?"OPEN":"CLOSED");QE((function(){if(s.open)return cancelAnimationFrame(d.current),c(!0),function(){h.current="CLOSED"}}),[s.open]);var p=n.useCallback((function(e){return Promise.resolve(null==r?void 0:r(e)).then((function(){"OPEN"===e.type&&cancelAnimationFrame(d.current)}))}),[r]),f=n.useCallback((function(e){return Promise.resolve(null==o?void 0:o(e)).then((function(){"CLOSE"===e.type&&(d.current=requestAnimationFrame((function(){return c(!1)})))}))}),[o]);return l?n.createElement(pk,{"data-rsbs-portal":!0},n.createElement(fT,XE({},s,{lastSnapRef:u,ref:t,initialState:h.current,onSpringStart:p,onSpringEnd:f}))):null}));const xT=i.css`
|
|
2598
|
+
function WM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function UM(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?WM(Object(n),!0).forEach((function(t){KM(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WM(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function KM(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var GM,ZM=(GM=[],{activateTrap:function(e){if(GM.length>0){var t=GM[GM.length-1];t!==e&&t.pause()}var n=GM.indexOf(e);-1===n||GM.splice(n,1),GM.push(e)},deactivateTrap:function(e){var t=GM.indexOf(e);-1!==t&&GM.splice(t,1),GM.length>0&&GM[GM.length-1].unpause()}}),JM=function(e){return setTimeout(e,0)},XM=function(e,t){var n=-1;return e.every((function(e,r){return!t(e)||(n=r,!1)})),n},YM=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return"function"==typeof e?e.apply(void 0,n):e},QM=function(e){return e.target.shadowRoot&&"function"==typeof e.composedPath?e.composedPath()[0]:e.target},eE=function(e,t){var n,r=(null==t?void 0:t.document)||document,o=UM({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},t),i={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},s=function(e,t,n){return e&&void 0!==e[t]?e[t]:o[n||t]},a=function(e){return i.containerGroups.findIndex((function(t){var n=t.container,r=t.tabbableNodes;return n.contains(e)||r.find((function(t){return t===e}))}))},l=function(e){var t=o[e];if("function"==typeof t){for(var n=arguments.length,i=new Array(n>1?n-1:0),s=1;s<n;s++)i[s-1]=arguments[s];t=t.apply(void 0,i)}if(!0===t&&(t=void 0),!t){if(void 0===t||!1===t)return t;throw new Error("`".concat(e,"` was specified but was not a node, or did not return a node"))}var a=t;if("string"==typeof t&&!(a=r.querySelector(t)))throw new Error("`".concat(e,"` as selector refers to no known node"));return a},c=function(){var e=l("initialFocus");if(!1===e)return!1;if(void 0===e)if(a(r.activeElement)>=0)e=r.activeElement;else{var t=i.tabbableGroups[0];e=t&&t.firstTabbableNode||l("fallbackFocus")}if(!e)throw new Error("Your focus-trap needs to have at least one focusable element");return e},d=function(){if(i.containerGroups=i.containers.map((function(e){var t,n,r=HM(e,o.tabbableOptions),i=(t=e,(n=(n=o.tabbableOptions)||{}).getShadowRoot?LM([t],n.includeContainer,{filter:PM.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):OM(t,n.includeContainer,PM.bind(null,n)));return{container:e,tabbableNodes:r,focusableNodes:i,firstTabbableNode:r.length>0?r[0]:null,lastTabbableNode:r.length>0?r[r.length-1]:null,nextTabbableNode:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=i.findIndex((function(t){return t===e}));if(!(n<0))return t?i.slice(n+1).find((function(e){return _M(e,o.tabbableOptions)})):i.slice(0,n).reverse().find((function(e){return _M(e,o.tabbableOptions)}))}}})),i.tabbableGroups=i.containerGroups.filter((function(e){return e.tabbableNodes.length>0})),i.tabbableGroups.length<=0&&!l("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},u=function e(t){!1!==t&&t!==r.activeElement&&(t&&t.focus?(t.focus({preventScroll:!!o.preventScroll}),i.mostRecentlyFocusedNode=t,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(t)&&t.select()):e(c()))},h=function(e){var t=l("setReturnFocus",e);return t||!1!==t&&e},p=function(e){var t=QM(e);a(t)>=0||(YM(o.clickOutsideDeactivates,e)?n.deactivate({returnFocus:o.returnFocusOnDeactivate&&!qM(t,o.tabbableOptions)}):YM(o.allowOutsideClick,e)||e.preventDefault())},f=function(e){var t=QM(e),n=a(t)>=0;n||t instanceof Document?n&&(i.mostRecentlyFocusedNode=t):(e.stopImmediatePropagation(),u(i.mostRecentlyFocusedNode||c()))},m=function(e){if(function(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}(e)&&!1!==YM(o.escapeDeactivates,e))return e.preventDefault(),void n.deactivate();(function(e){return"Tab"===e.key||9===e.keyCode})(e)&&function(e){var t=QM(e);d();var n=null;if(i.tabbableGroups.length>0){var r=a(t),s=r>=0?i.containerGroups[r]:void 0;if(r<0)n=e.shiftKey?i.tabbableGroups[i.tabbableGroups.length-1].lastTabbableNode:i.tabbableGroups[0].firstTabbableNode;else if(e.shiftKey){var c=XM(i.tabbableGroups,(function(e){var n=e.firstTabbableNode;return t===n}));if(c<0&&(s.container===t||qM(t,o.tabbableOptions)&&!_M(t,o.tabbableOptions)&&!s.nextTabbableNode(t,!1))&&(c=r),c>=0){var h=0===c?i.tabbableGroups.length-1:c-1;n=i.tabbableGroups[h].lastTabbableNode}}else{var p=XM(i.tabbableGroups,(function(e){var n=e.lastTabbableNode;return t===n}));if(p<0&&(s.container===t||qM(t,o.tabbableOptions)&&!_M(t,o.tabbableOptions)&&!s.nextTabbableNode(t))&&(p=r),p>=0){var f=p===i.tabbableGroups.length-1?0:p+1;n=i.tabbableGroups[f].firstTabbableNode}}}else n=l("fallbackFocus");n&&(e.preventDefault(),u(n))}(e)},g=function(e){var t=QM(e);a(t)>=0||YM(o.clickOutsideDeactivates,e)||YM(o.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},v=function(){if(i.active)return ZM.activateTrap(n),i.delayInitialFocusTimer=o.delayInitialFocus?JM((function(){u(c())})):u(c()),r.addEventListener("focusin",f,!0),r.addEventListener("mousedown",p,{capture:!0,passive:!1}),r.addEventListener("touchstart",p,{capture:!0,passive:!1}),r.addEventListener("click",g,{capture:!0,passive:!1}),r.addEventListener("keydown",m,{capture:!0,passive:!1}),n},b=function(){if(i.active)return r.removeEventListener("focusin",f,!0),r.removeEventListener("mousedown",p,!0),r.removeEventListener("touchstart",p,!0),r.removeEventListener("click",g,!0),r.removeEventListener("keydown",m,!0),n};return(n={get active(){return i.active},get paused(){return i.paused},activate:function(e){if(i.active)return this;var t=s(e,"onActivate"),n=s(e,"onPostActivate"),o=s(e,"checkCanFocusTrap");o||d(),i.active=!0,i.paused=!1,i.nodeFocusedBeforeActivation=r.activeElement,t&&t();var a=function(){o&&d(),v(),n&&n()};return o?(o(i.containers.concat()).then(a,a),this):(a(),this)},deactivate:function(e){if(!i.active)return this;var t=UM({onDeactivate:o.onDeactivate,onPostDeactivate:o.onPostDeactivate,checkCanReturnFocus:o.checkCanReturnFocus},e);clearTimeout(i.delayInitialFocusTimer),i.delayInitialFocusTimer=void 0,b(),i.active=!1,i.paused=!1,ZM.deactivateTrap(n);var r=s(t,"onDeactivate"),a=s(t,"onPostDeactivate"),l=s(t,"checkCanReturnFocus"),c=s(t,"returnFocus","returnFocusOnDeactivate");r&&r();var d=function(){JM((function(){c&&u(h(i.nodeFocusedBeforeActivation)),a&&a()}))};return c&&l?(l(h(i.nodeFocusedBeforeActivation)).then(d,d),this):(d(),this)},pause:function(){return i.paused||!i.active||(i.paused=!0,b()),this},unpause:function(){return i.paused&&i.active?(i.paused=!1,d(),v(),this):this},updateContainerElements:function(e){var t=[].concat(e).filter(Boolean);return i.containers=t.map((function(e){return"string"==typeof e?r.querySelector(e):e})),i.active&&d(),this}}).updateContainerElements(e),n};var tE=!1;if("undefined"!=typeof window){var nE={get passive(){tE=!0}};window.addEventListener("testPassive",null,nE),window.removeEventListener("testPassive",null,nE)}var rE,oE="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1),iE=[],sE=!1,aE=-1,lE=void 0,cE=void 0,dE=function(e){return iE.some((function(t){return!(!t.options.allowTouchMove||!t.options.allowTouchMove(e))}))},uE=function(e){var t=e||window.event;return!!dE(t.target)||(t.touches.length>1||(t.preventDefault&&t.preventDefault(),!1))},hE=function(e,t){if(e){if(!iE.some((function(t){return t.targetElement===e}))){var n={targetElement:e,options:t||{}};iE=[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(iE),[n]),oE?(e.ontouchstart=function(e){1===e.targetTouches.length&&(aE=e.targetTouches[0].clientY)},e.ontouchmove=function(t){1===t.targetTouches.length&&function(e,t){var n=e.targetTouches[0].clientY-aE;!dE(e.target)&&(t&&0===t.scrollTop&&n>0||function(e){return!!e&&e.scrollHeight-e.scrollTop<=e.clientHeight}(t)&&n<0?uE(e):e.stopPropagation())}(t,e)},sE||(document.addEventListener("touchmove",uE,tE?{passive:!1}:void 0),sE=!0)):function(e){if(void 0===cE){var t=!!e&&!0===e.reserveScrollBarGap,n=window.innerWidth-document.documentElement.clientWidth;t&&n>0&&(cE=document.body.style.paddingRight,document.body.style.paddingRight=n+"px")}void 0===lE&&(lE=document.body.style.overflow,document.body.style.overflow="hidden")}(t)}}else console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.")},pE=function(e){e?(iE=iE.filter((function(t){return t.targetElement!==e})),oE?(e.ontouchstart=null,e.ontouchmove=null,sE&&0===iE.length&&(document.removeEventListener("touchmove",uE,tE?{passive:!1}:void 0),sE=!1)):iE.length||(void 0!==cE&&(document.body.style.paddingRight=cE,cE=void 0),void 0!==lE&&(document.body.style.overflow=lE,lE=void 0))):console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.")},fE=[],mE="ResizeObserver loop completed with undelivered notifications.";!function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(rE||(rE={}));var gE,vE=function(e){return Object.freeze(e)},bE=function(e,t){this.inlineSize=e,this.blockSize=t,vE(this)},yE=function(){function e(e,t,n,r){return this.x=e,this.y=t,this.width=n,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,vE(this)}return e.prototype.toJSON=function(){var e=this;return{x:e.x,y:e.y,top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),xE=function(e){return e instanceof SVGElement&&"getBBox"in e},wE=function(e){if(xE(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var o=e,i=o.offsetWidth,s=o.offsetHeight;return!(i||s||e.getClientRects().length)},CE=function(e){var t;if(e instanceof Element)return!0;var n=null===(t=null==e?void 0:e.ownerDocument)||void 0===t?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},kE="undefined"!=typeof window?window:{},SE=new WeakMap,$E=/auto|scroll/,jE=/^tb|vertical/,ME=/msie|trident/i.test(kE.navigator&&kE.navigator.userAgent),EE=function(e){return parseFloat(e||"0")},TE=function(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=!1),new bE((n?t:e)||0,(n?e:t)||0)},OE=vE({devicePixelContentBoxSize:TE(),borderBoxSize:TE(),contentBoxSize:TE(),contentRect:new yE(0,0,0,0)}),LE=function(e,t){if(void 0===t&&(t=!1),SE.has(e)&&!t)return SE.get(e);if(wE(e))return SE.set(e,OE),OE;var n=getComputedStyle(e),r=xE(e)&&e.ownerSVGElement&&e.getBBox(),o=!ME&&"border-box"===n.boxSizing,i=jE.test(n.writingMode||""),s=!r&&$E.test(n.overflowY||""),a=!r&&$E.test(n.overflowX||""),l=r?0:EE(n.paddingTop),c=r?0:EE(n.paddingRight),d=r?0:EE(n.paddingBottom),u=r?0:EE(n.paddingLeft),h=r?0:EE(n.borderTopWidth),p=r?0:EE(n.borderRightWidth),f=r?0:EE(n.borderBottomWidth),m=u+c,g=l+d,v=(r?0:EE(n.borderLeftWidth))+p,b=h+f,y=a?e.offsetHeight-b-e.clientHeight:0,x=s?e.offsetWidth-v-e.clientWidth:0,w=o?m+v:0,C=o?g+b:0,k=r?r.width:EE(n.width)-w-x,S=r?r.height:EE(n.height)-C-y,$=k+m+x+v,j=S+g+y+b,M=vE({devicePixelContentBoxSize:TE(Math.round(k*devicePixelRatio),Math.round(S*devicePixelRatio),i),borderBoxSize:TE($,j,i),contentBoxSize:TE(k,S,i),contentRect:new yE(u,l,k,S)});return SE.set(e,M),M},AE=function(e,t,n){var r=LE(e,n),o=r.borderBoxSize,i=r.contentBoxSize,s=r.devicePixelContentBoxSize;switch(t){case rE.DEVICE_PIXEL_CONTENT_BOX:return s;case rE.BORDER_BOX:return o;default:return i}},RE=function(e){var t=LE(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=vE([t.borderBoxSize]),this.contentBoxSize=vE([t.contentBoxSize]),this.devicePixelContentBoxSize=vE([t.devicePixelContentBoxSize])},NE=function(e){if(wE(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},DE=function(){var e=1/0,t=[];fE.forEach((function(n){if(0!==n.activeTargets.length){var r=[];n.activeTargets.forEach((function(t){var n=new RE(t.target),o=NE(t.target);r.push(n),t.lastReportedSize=AE(t.target,t.observedBox),o<e&&(e=o)})),t.push((function(){n.callback.call(n.observer,r,n.observer)})),n.activeTargets.splice(0,n.activeTargets.length)}}));for(var n=0,r=t;n<r.length;n++){(0,r[n])()}return e},IE=function(e){fE.forEach((function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach((function(n){n.isActive()&&(NE(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))}))}))},PE=function(){var e=0;for(IE(e);fE.some((function(e){return e.activeTargets.length>0}));)e=DE(),IE(e);return fE.some((function(e){return e.skippedTargets.length>0}))&&function(){var e;"function"==typeof ErrorEvent?e=new ErrorEvent("error",{message:mE}):((e=document.createEvent("Event")).initEvent("error",!1,!1),e.message=mE),window.dispatchEvent(e)}(),e>0},zE=[],VE=function(e){if(!gE){var t=0,n=document.createTextNode("");new MutationObserver((function(){return zE.splice(0).forEach((function(e){return e()}))})).observe(n,{characterData:!0}),gE=function(){n.textContent="".concat(t?t--:t++)}}zE.push(e),gE()},BE=0,HE={attributes:!0,characterData:!0,childList:!0,subtree:!0},_E=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],FE=function(e){return void 0===e&&(e=0),Date.now()+e},qE=!1,WE=new(function(){function e(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return e.prototype.run=function(e){var t=this;if(void 0===e&&(e=250),!qE){qE=!0;var n,r=FE(e);n=function(){var n=!1;try{n=PE()}finally{if(qE=!1,e=r-FE(),!BE)return;n?t.run(1e3):e>0?t.run(e):t.start()}},VE((function(){requestAnimationFrame(n)}))}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var e=this,t=function(){return e.observer&&e.observer.observe(document.body,HE)};document.body?t():kE.addEventListener("DOMContentLoaded",t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),_E.forEach((function(t){return kE.addEventListener(t,e.listener,!0)})))},e.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),_E.forEach((function(t){return kE.removeEventListener(t,e.listener,!0)})),this.stopped=!0)},e}()),UE=function(e){!BE&&e>0&&WE.start(),!(BE+=e)&&WE.stop()},KE=function(){function e(e,t){this.target=e,this.observedBox=t||rE.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e=AE(this.target,this.observedBox,!0);return function(e){return!xE(e)&&!function(e){switch(e.tagName){case"INPUT":if("image"!==e.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(e)&&"inline"===getComputedStyle(e).display}(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},e}(),GE=function(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t},ZE=new WeakMap,JE=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},XE=function(){function e(){}return e.connect=function(e,t){var n=new GE(e,t);ZE.set(e,n)},e.observe=function(e,t,n){var r=ZE.get(e),o=0===r.observationTargets.length;JE(r.observationTargets,t)<0&&(o&&fE.push(r),r.observationTargets.push(new KE(t,n&&n.box)),UE(1),WE.schedule())},e.unobserve=function(e,t){var n=ZE.get(e),r=JE(n.observationTargets,t),o=1===n.observationTargets.length;r>=0&&(o&&fE.splice(fE.indexOf(n),1),n.observationTargets.splice(r,1),UE(-1))},e.disconnect=function(e){var t=this,n=ZE.get(e);n.observationTargets.slice().forEach((function(n){return t.unobserve(e,n.target)})),n.activeTargets.splice(0,n.activeTargets.length)},e}(),YE=function(){function e(e){if(0===arguments.length)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof e)throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");XE.connect(this,e)}return e.prototype.observe=function(e,t){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!CE(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");XE.observe(this,e,t)},e.prototype.unobserve=function(e){if(0===arguments.length)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!CE(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");XE.unobserve(this,e)},e.prototype.disconnect=function(){XE.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();function QE(){return QE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},QE.apply(this,arguments)}function eT(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(o[n]=e[n]);return o}var tT="undefined"!=typeof window?n.useLayoutEffect:n.useEffect;function nT(e,t,n){return t=(t=+t)==t?t:0,n=(n=+n)==n?n:0,(e=+e)==e&&(e=(e=e<=n?e:n)>=t?e:t),e}function rT(e){var t=Math.round(e);if(Number.isNaN(e))throw new TypeError("Found a NaN! Check your snapPoints / defaultSnap / snapTo ");return t}var oT={box:"border-box"};function iT(e,t){var r=t.label,o=t.enabled,i=t.resizeSourceRef,s=n.useState(0),a=s[0],l=s[1];n.useDebugValue(r+": "+a);var c=n.useCallback((function(e){l(e[0].borderBoxSize[0].blockSize),i.current="element"}),[i]);return tT((function(){if(e.current&&o){var t=new YE(c);return t.observe(e.current,oT),function(){t.disconnect()}}}),[e,c,o]),o?a:0}function sT(e){return void 0===e&&(e=1e3),new Promise((function(t){return setTimeout(t,e)}))}var aT={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},lT={RESIZE:{target:"#overlay.resizing",actions:"onOpenEnd"}},cT=function(e,t,n){return void 0===n&&(n=e.context),new u$(e,t,n)}({id:"overlay",initial:"closed",context:{initialState:"CLOSED"},states:{closed:{on:{OPEN:"opening",CLOSE:void 0}},opening:{initial:"start",states:{start:{invoke:{src:"onOpenStart",onDone:"transition"}},transition:{always:[{target:"immediately",cond:"initiallyOpen"},{target:"smoothly",cond:"initiallyClosed"}]},immediately:{initial:"open",states:{open:{invoke:{src:"openImmediately",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"#overlay.opening.end"},on:QE({},aT,lT)}}},smoothly:{initial:"visuallyHidden",states:{visuallyHidden:{invoke:{src:"renderVisuallyHidden",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"open"}},open:{invoke:{src:"openSmoothly",onDone:"#overlay.opening.end"},on:QE({},aT,lT)}}},end:{invoke:{src:"onOpenEnd",onDone:"done"},on:{CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:QE({},{CLOSE:{target:"#overlay.closing",actions:"onOpenCancel"}}),onDone:"open"},open:{on:{DRAG:"#overlay.dragging",SNAP:"snapping",RESIZE:"resizing"}},dragging:{on:{SNAP:"snapping"}},snapping:{initial:"start",states:{start:{invoke:{src:"onSnapStart",onDone:"snappingSmoothly"},entry:[p$({y:function(e,t){return t.payload.y},velocity:function(e,t){return t.payload.velocity},snapSource:function(e,t){var n=t.payload.source;return void 0===n?"custom":n}})]},snappingSmoothly:{invoke:{src:"snapSmoothly",onDone:"end"}},end:{invoke:{src:"onSnapEnd",onDone:"done"},on:{RESIZE:"#overlay.resizing",SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{SNAP:{target:"snapping",actions:"onSnapEnd"},RESIZE:{target:"#overlay.resizing",actions:"onSnapCancel"},DRAG:{target:"#overlay.dragging",actions:"onSnapCancel"},CLOSE:{target:"#overlay.closing",actions:"onSnapCancel"}},onDone:"open"},resizing:{initial:"start",states:{start:{invoke:{src:"onResizeStart",onDone:"resizingSmoothly"}},resizingSmoothly:{invoke:{src:"resizeSmoothly",onDone:"end"}},end:{invoke:{src:"onResizeEnd",onDone:"done"},on:{SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{RESIZE:{target:"resizing",actions:"onResizeEnd"},SNAP:{target:"snapping",actions:"onResizeCancel"},DRAG:{target:"#overlay.dragging",actions:"onResizeCancel"},CLOSE:{target:"#overlay.closing",actions:"onResizeCancel"}},onDone:"open"},closing:{initial:"start",states:{start:{invoke:{src:"onCloseStart",onDone:"deactivating"},on:{OPEN:{target:"#overlay.open",actions:"onCloseCancel"}}},deactivating:{invoke:{src:"deactivate",onDone:"closingSmoothly"}},closingSmoothly:{invoke:{src:"closeSmoothly",onDone:"end"}},end:{invoke:{src:"onCloseEnd",onDone:"done"},on:{OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}}},done:{type:"final"}},on:{CLOSE:void 0,OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}},onDone:"closed"}},on:{CLOSE:"closing"}},{actions:{onOpenCancel:function(e,t){},onSnapCancel:function(e,t){},onResizeCancel:function(e,t){},onCloseCancel:function(e,t){},onOpenEnd:function(e,t){},onSnapEnd:function(e,t){},onRezizeEnd:function(e,t){}},services:{onSnapStart:function(){try{return Promise.resolve(sT()).then((function(){}))}catch(e){return Promise.reject(e)}},onOpenStart:function(){try{return Promise.resolve(sT()).then((function(){}))}catch(e){return Promise.reject(e)}},onCloseStart:function(){try{return Promise.resolve(sT()).then((function(){}))}catch(e){return Promise.reject(e)}},onResizeStart:function(){try{return Promise.resolve(sT()).then((function(){}))}catch(e){return Promise.reject(e)}},onSnapEnd:function(){try{return Promise.resolve(sT()).then((function(){}))}catch(e){return Promise.reject(e)}},onOpenEnd:function(){try{return Promise.resolve(sT()).then((function(){}))}catch(e){return Promise.reject(e)}},onCloseEnd:function(){try{return Promise.resolve(sT()).then((function(){}))}catch(e){return Promise.reject(e)}},onResizeEnd:function(){try{return Promise.resolve(sT()).then((function(){}))}catch(e){return Promise.reject(e)}},renderVisuallyHidden:function(e,t){try{return Promise.resolve(sT()).then((function(){}))}catch(e){return Promise.reject(e)}},activate:function(e,t){try{return Promise.resolve(sT()).then((function(){}))}catch(e){return Promise.reject(e)}},deactivate:function(e,t){try{return Promise.resolve(sT()).then((function(){}))}catch(e){return Promise.reject(e)}},openSmoothly:function(e,t){try{return Promise.resolve(sT()).then((function(){}))}catch(e){return Promise.reject(e)}},openImmediately:function(e,t){try{return Promise.resolve(sT()).then((function(){}))}catch(e){return Promise.reject(e)}},snapSmoothly:function(e,t){try{return Promise.resolve(sT()).then((function(){}))}catch(e){return Promise.reject(e)}},resizeSmoothly:function(e,t){try{return Promise.resolve(sT()).then((function(){}))}catch(e){return Promise.reject(e)}},closeSmoothly:function(e,t){try{return Promise.resolve(sT()).then((function(){}))}catch(e){return Promise.reject(e)}}},guards:{initiallyClosed:function(e){return"CLOSED"===e.initialState},initiallyOpen:function(e){return"OPEN"===e.initialState}}}),dT=["children","sibling","className","footer","header","open","initialState","lastSnapRef","initialFocusRef","onDismiss","maxHeight","defaultSnap","snapPoints","blocking","scrollLocking","style","onSpringStart","onSpringCancel","onSpringEnd","reserveScrollBarGap","expandOnContentDrag"],uT=["velocity"],hT=["onRest","config"],pT={tension:170,friction:26},fT=pT.tension,mT=pT.friction,gT=n.forwardRef((function(e,t){var r=e.children,o=e.sibling,i=e.className,s=e.footer,a=e.header,l=e.open,c=e.initialState,d=e.lastSnapRef,u=e.initialFocusRef,h=e.onDismiss,p=e.maxHeight,f=e.defaultSnap,m=void 0===f?bT:f,g=e.snapPoints,v=void 0===g?yT:g,b=e.blocking,y=void 0===b||b,x=e.scrollLocking,w=void 0===x||x,C=e.style,k=e.onSpringStart,S=e.onSpringCancel,$=e.onSpringEnd,j=e.reserveScrollBarGap,M=void 0===j?y:j,E=e.expandOnContentDrag,T=void 0!==E&&E,O=eT(e,dT),L=function(){var e=n.useState(!1),t=e[0],r=e[1],o=n.useState({}),i=o[0],s=o[1],a=n.useCallback((function(e){return s((function(t){var n;return QE({},t,((n={})[e]=!1,n))})),function(){s((function(t){var n;return QE({},t,((n={})[e]=!0,n))}))}}),[]);return n.useEffect((function(){var e=Object.values(i);0!==e.length&&e.every(Boolean)&&r(!0)}),[i]),{ready:t,registerReady:a}}(),A=L.ready,R=L.registerReady,N=n.useRef(!1),D=n.useRef(k),I=n.useRef(S),P=n.useRef($);n.useEffect((function(){D.current=k,I.current=S,P.current=$}),[S,k,$]);var z,V,B=tj((function(){return{y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}})),H=B[0],_=B[1],F=n.useRef(null),q=n.useRef(null),W=n.useRef(null),U=n.useRef(null),K=n.useRef(null),G=n.useRef(null),Z=n.useRef(0),J=n.useRef(),X=n.useRef(!1),Y=(z=n.useMemo((function(){return"undefined"!=typeof window?window.matchMedia("(prefers-reduced-motion: reduce)"):null}),[]),V=n.useRef(null==z?void 0:z.matches),n.useDebugValue(V.current?"reduce":"no-preference"),n.useEffect((function(){var e=function(e){V.current=e.matches};return null==z||z.addListener(e),function(){return null==z?void 0:z.removeListener(e)}}),[z]),V),Q=function(e){var t=e.targetRef,r=e.enabled,o=e.reserveScrollBarGap,i=n.useRef({activate:function(){throw new TypeError("Tried to activate scroll lock too early")},deactivate:function(){}});return n.useDebugValue(r?"Enabled":"Disabled"),n.useEffect((function(){if(!r)return i.current.deactivate(),void(i.current={activate:function(){},deactivate:function(){}});var e=t.current,n=!1;i.current={activate:function(){n||(n=!0,hE(e,{allowTouchMove:function(e){return e.closest("[data-body-scroll-lock-ignore]")},reserveScrollBarGap:o}))},deactivate:function(){n&&(n=!1,pE(e))}}}),[r,t,o]),i}({targetRef:q,enabled:A&&w,reserveScrollBarGap:M}),ee=function(e){var t=e.targetRef,r=e.enabled,o=n.useRef({activate:function(){throw new TypeError("Tried to activate aria hider too early")},deactivate:function(){}});return n.useDebugValue(r?"Enabled":"Disabled"),n.useEffect((function(){if(!r)return o.current.deactivate(),void(o.current={activate:function(){},deactivate:function(){}});var e=t.current,n=!1,i=[],s=[];o.current={activate:function(){if(!n){n=!0;var t=e.parentNode;document.querySelectorAll("body > *").forEach((function(e){if(e!==t){var n=e.getAttribute("aria-hidden");null!==n&&"false"!==n||(i.push(n),s.push(e),e.setAttribute("aria-hidden","true"))}}))}},deactivate:function(){n&&(n=!1,s.forEach((function(e,t){var n=i[t];null===n?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",n)})),i=[],s=[])}}}),[t,r]),o}({targetRef:F,enabled:A&&y}),te=function(e){var t=e.targetRef,r=e.fallbackRef,o=e.initialFocusRef,i=e.enabled,s=n.useRef({activate:function(){throw new TypeError("Tried to activate focus trap too early")},deactivate:function(){}});return n.useDebugValue(i?"Enabled":"Disabled"),n.useEffect((function(){if(!i)return s.current.deactivate(),void(s.current={activate:function(){},deactivate:function(){}});var e=r.current,n=eE(t.current,{onActivate:void 0,initialFocus:o?function(){return(null==o?void 0:o.current)||e}:void 0,fallbackFocus:e,escapeDeactivates:!1,clickOutsideDeactivates:!1}),a=!1;s.current={activate:function(){try{return a?Promise.resolve():(a=!0,Promise.resolve(n.activate()).then((function(){return Promise.resolve(new Promise((function(e){return setTimeout((function(){return e(void 0)}),0)}))).then((function(){}))})))}catch(e){return Promise.reject(e)}},deactivate:function(){a&&(a=!1,n.deactivate())}}}),[i,r,o,t]),s}({targetRef:F,fallbackRef:G,initialFocusRef:u||void 0,enabled:A&&y&&!1!==u}),ne=function(e){var t=e.getSnapPoints,r=e.heightRef,o=e.lastSnapRef,i=e.ready,s=function(e){var t=e.contentRef,r=e.controlledMaxHeight,o=e.footerEnabled,i=e.footerRef,s=e.headerEnabled,a=e.headerRef,l=e.registerReady,c=e.resizeSourceRef,d=n.useMemo((function(){return l("contentHeight")}),[l]),u=function(e,t,r){var o=n.useMemo((function(){return t("maxHeight")}),[t]),i=n.useState((function(){return rT(e)||"undefined"!=typeof window?window.innerHeight:0})),s=i[0],a=i[1],l=s>0,c=n.useRef(0);return n.useDebugValue(e?"controlled":"auto"),n.useEffect((function(){l&&o()}),[l,o]),tT((function(){if(e)return a(rT(e)),void(r.current="maxheightprop");var t=function(){c.current||(c.current=requestAnimationFrame((function(){a(window.innerHeight),r.current="window",c.current=0})))};return window.addEventListener("resize",t),a(window.innerHeight),r.current="window",o(),function(){window.removeEventListener("resize",t),cancelAnimationFrame(c.current)}}),[e,o,r]),s}(r,l,c),h=iT(a,{label:"headerHeight",enabled:s,resizeSourceRef:c}),p=iT(t,{label:"contentHeight",enabled:!0,resizeSourceRef:c}),f=iT(i,{label:"footerHeight",enabled:o,resizeSourceRef:c}),m=Math.min(u-h-f,p)+h+f;n.useDebugValue("minHeight: "+m);var g=p>0;return n.useEffect((function(){g&&d()}),[g,d]),{maxHeight:u,minHeight:m,headerHeight:h,footerHeight:f}}({contentRef:e.contentRef,controlledMaxHeight:e.controlledMaxHeight,footerEnabled:e.footerEnabled,footerRef:e.footerRef,headerEnabled:e.headerEnabled,headerRef:e.headerRef,registerReady:e.registerReady,resizeSourceRef:e.resizeSourceRef}),a=s.maxHeight,l=s.minHeight,c=s.headerHeight,d=s.footerHeight,u=function(e,t){var n=[].concat(e).map(rT).reduce((function(e,n){return e.add(nT(n,0,t)),e}),new Set),r=Array.from(n),o=Math.min.apply(Math,r);if(Number.isNaN(o))throw new TypeError("minSnap is NaN");var i=Math.max.apply(Math,r);if(Number.isNaN(i))throw new TypeError("maxSnap is NaN");return{snapPoints:r,minSnap:o,maxSnap:i}}(i?t({height:r.current,footerHeight:d,headerHeight:c,minHeight:l,maxHeight:a}):[0],a),h=u.snapPoints,p=u.minSnap,f=u.maxSnap;return n.useDebugValue("minSnap: "+p+", maxSnap:"+f),{minSnap:p,maxSnap:f,findSnap:function(e){var t=rT("function"==typeof e?e({footerHeight:d,headerHeight:c,height:r.current,minHeight:l,maxHeight:a,snapPoints:h,lastSnap:o.current}):e);return h.reduce((function(e,n){return Math.abs(n-t)<Math.abs(e-t)?n:e}),p)},maxHeight:a}}({contentRef:W,controlledMaxHeight:p,footerEnabled:!!s,footerRef:K,getSnapPoints:v,headerEnabled:!1!==a,headerRef:U,heightRef:Z,lastSnapRef:d,ready:A,registerReady:R,resizeSourceRef:J}),re=ne.minSnap,oe=ne.maxSnap,ie=ne.maxHeight,se=ne.findSnap,ae=n.useRef(ie),le=n.useRef(re),ce=n.useRef(oe),de=n.useRef(se),ue=n.useRef(0);tT((function(){ae.current=ie,ce.current=oe,le.current=re,de.current=se,ue.current=se(m)}),[se,m,ie,oe,re]);var he=n.useCallback((function(e){var t=e.onRest,n=e.config,r=(n=void 0===n?{}:n).velocity,o=void 0===r?1:r,i=eT(n,uT),s=eT(e,hT);return new Promise((function(e){return _(QE({},s,{config:QE({velocity:o},i,{mass:1,tension:fT,friction:Math.max(mT,mT+(mT-mT*o))}),onRest:function(){var n=[].slice.call(arguments);e.apply(void 0,n),null==t||t.apply(void 0,n)}}))}))}),[_]),pe=j$(cT,{devTools:!1,actions:{onOpenCancel:n.useCallback((function(){return null==I.current?void 0:I.current({type:"OPEN"})}),[]),onSnapCancel:n.useCallback((function(e){return null==I.current?void 0:I.current({type:"SNAP",source:e.snapSource})}),[]),onCloseCancel:n.useCallback((function(){return null==I.current?void 0:I.current({type:"CLOSE"})}),[]),onResizeCancel:n.useCallback((function(){return null==I.current?void 0:I.current({type:"RESIZE",source:J.current})}),[]),onOpenEnd:n.useCallback((function(){return null==P.current?void 0:P.current({type:"OPEN"})}),[]),onSnapEnd:n.useCallback((function(e,t){return null==P.current?void 0:P.current({type:"SNAP",source:e.snapSource})}),[]),onResizeEnd:n.useCallback((function(){return null==P.current?void 0:P.current({type:"RESIZE",source:J.current})}),[])},context:{initialState:c},services:{onSnapStart:n.useCallback((function(e,t){try{return Promise.resolve(null==D.current?void 0:D.current({type:"SNAP",source:t.payload.source||"custom"}))}catch(e){return Promise.reject(e)}}),[]),onOpenStart:n.useCallback((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"OPEN"}))}catch(e){return Promise.reject(e)}}),[]),onCloseStart:n.useCallback((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"CLOSE"}))}catch(e){return Promise.reject(e)}}),[]),onResizeStart:n.useCallback((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"RESIZE",source:J.current}))}catch(e){return Promise.reject(e)}}),[]),onSnapEnd:n.useCallback((function(e,t){try{return Promise.resolve(null==P.current?void 0:P.current({type:"SNAP",source:e.snapSource}))}catch(e){return Promise.reject(e)}}),[]),onOpenEnd:n.useCallback((function(){try{return Promise.resolve(null==P.current?void 0:P.current({type:"OPEN"}))}catch(e){return Promise.reject(e)}}),[]),onCloseEnd:n.useCallback((function(){try{return Promise.resolve(null==P.current?void 0:P.current({type:"CLOSE"}))}catch(e){return Promise.reject(e)}}),[]),onResizeEnd:n.useCallback((function(){try{return Promise.resolve(null==P.current?void 0:P.current({type:"RESIZE",source:J.current}))}catch(e){return Promise.reject(e)}}),[]),renderVisuallyHidden:n.useCallback((function(e,t){try{return Promise.resolve(he({y:ue.current,ready:0,maxHeight:ae.current,maxSnap:ce.current,minSnap:ue.current,immediate:!0})).then((function(){}))}catch(e){return Promise.reject(e)}}),[he]),activate:n.useCallback((function(e,t){try{return N.current=!0,Promise.resolve(Promise.all([Q.current.activate(),te.current.activate(),ee.current.activate()])).then((function(){}))}catch(e){return Promise.reject(e)}}),[ee,te,Q]),deactivate:n.useCallback((function(){try{return Q.current.deactivate(),te.current.deactivate(),ee.current.deactivate(),N.current=!1,Promise.resolve()}catch(e){return Promise.reject(e)}}),[ee,te,Q]),openImmediately:n.useCallback((function(){try{return Z.current=ue.current,Promise.resolve(he({y:ue.current,ready:1,maxHeight:ae.current,maxSnap:ce.current,minSnap:ue.current,immediate:!0})).then((function(){}))}catch(e){return Promise.reject(e)}}),[he]),openSmoothly:n.useCallback((function(){try{return Promise.resolve(he({y:0,ready:1,maxHeight:ae.current,maxSnap:ce.current,minSnap:ue.current,immediate:!0})).then((function(){return Z.current=ue.current,Promise.resolve(he({y:ue.current,ready:1,maxHeight:ae.current,maxSnap:ce.current,minSnap:ue.current,immediate:Y.current})).then((function(){}))}))}catch(e){return Promise.reject(e)}}),[he,Y]),snapSmoothly:n.useCallback((function(e,t){try{var n=de.current(e.y);return Z.current=n,d.current=n,Promise.resolve(he({y:n,ready:1,maxHeight:ae.current,maxSnap:ce.current,minSnap:le.current,immediate:Y.current,config:{velocity:e.velocity}})).then((function(){}))}catch(e){return Promise.reject(e)}}),[he,d,Y]),resizeSmoothly:n.useCallback((function(){try{var e=de.current(Z.current);return Z.current=e,d.current=e,Promise.resolve(he({y:e,ready:1,maxHeight:ae.current,maxSnap:ce.current,minSnap:le.current,immediate:"element"!==J.current||Y.current})).then((function(){}))}catch(e){return Promise.reject(e)}}),[he,d,Y]),closeSmoothly:n.useCallback((function(e,t){try{return he({minSnap:Z.current,immediate:!0}),Z.current=0,Promise.resolve(he({y:0,maxHeight:ae.current,maxSnap:ce.current,immediate:Y.current})).then((function(){return Promise.resolve(he({ready:0,immediate:!0})).then((function(){}))}))}catch(e){return Promise.reject(e)}}),[he,Y])}}),fe=pe[0],me=pe[1];n.useEffect((function(){A&&me(l?"OPEN":"CLOSE")}),[l,me,A]),tT((function(){(ie||oe||re)&&me("RESIZE")}),[ie,oe,re,me]),n.useEffect((function(){return function(){Q.current.deactivate(),te.current.deactivate(),ee.current.deactivate()}}),[ee,te,Q]),n.useImperativeHandle(t,(function(){return{snapTo:function(e,t){var n=void 0===t?{}:t,r=n.velocity,o=void 0===r?1:r,i=n.source,s=void 0===i?"custom":i;me("SNAP",{payload:{y:de.current(e),velocity:o,source:s}})},get height(){return Z.current}}}),[me]),n.useEffect((function(){var e=q.current,t=function(e){X.current&&e.preventDefault()},n=function(t){e.scrollTop<0&&(requestAnimationFrame((function(){e.style.overflow="hidden",e.scrollTop=0,e.style.removeProperty("overflow")})),t.preventDefault())};return T&&(e.addEventListener("scroll",t),e.addEventListener("touchmove",t),e.addEventListener("touchstart",n)),function(){e.removeEventListener("scroll",t),e.removeEventListener("touchmove",t),e.removeEventListener("touchstart",n)}}),[T,q]);var ge=SM((function(e){var t=e.args,n=(t=void 0===t?[]:t)[0],r=(n=void 0===n?{}:n).closeOnTap,o=void 0!==r&&r,i=n.isContentDragging,s=void 0!==i&&i,a=e.cancel,l=e.direction[1],c=e.down,d=e.first,u=e.last,p=e.memo,f=void 0===p?H.y.getValue():p,m=e.tap,g=e.velocity,v=-1*e.movement[1];if(!N.current)return a(),f;if(h&&o&&m)return a(),setTimeout((function(){return h()}),0),f;if(m)return f;var b=f+v,y=v*g,x=Math.max(le.current,Math.min(ce.current,b+2*y));if(!c&&h&&l>0&&b+y<le.current/2)return a(),h(),f;var w=c?h||le.current!==ce.current?zj(b,h?0:le.current,ce.current,.55):b<le.current?zj(b,le.current,2*ce.current,.55):zj(b,le.current/2,ce.current,.55):x;return T&&s?(w>=ce.current&&(w=ce.current),f===ce.current&&q.current.scrollTop>0&&(w=ce.current),X.current=w<ce.current):X.current=!1,d&&me("DRAG"),u?(me("SNAP",{payload:{y:w,velocity:g>.05?g:1,source:"dragging"}}),f):(_({y:w,ready:1,maxHeight:ae.current,maxSnap:ce.current,minSnap:le.current,immediate:!0,config:{velocity:g}}),f)}),{filterTaps:!0});if(Number.isNaN(ce.current))throw new TypeError("maxSnapRef is NaN!!");if(Number.isNaN(le.current))throw new TypeError("minSnapRef is NaN!!");var ve=function(e){var t,n=e.spring,r=Z$([n.y,n.maxHeight],(function(e,t){return Math.round(nT(t-e,0,16))+"px"})),o=Z$([n.y,n.minSnap,n.maxSnap],(function(e,t,n){return nT(e,t,n)+"px"})),i=Z$([n.y,n.minSnap,n.maxSnap],(function(e,t,n){return e<t?t-e+"px":e>n?n-e+"px":"0px"})),s=Z$([n.y,n.maxSnap],(function(e,t){return e>=t?Math.ceil(e-t):0})),a=Z$([n.y,n.minSnap],(function(e,t){if(!t)return 0;var n=Math.max(t/2-45,0);return nT((e-n)*(1/(Math.min(t/2+45,t)-n)+0),0,1)})),l=Z$([n.y,n.minSnap],(function(e,t){return t?nT(e/t,0,1):0}));return(t={})["--rsbs-content-opacity"]=a,t["--rsbs-backdrop-opacity"]=l,t["--rsbs-antigap-scale-y"]=s,t["--rsbs-overlay-translate-y"]=i,t["--rsbs-overlay-rounded"]=r,t["--rsbs-overlay-h"]=o,t}({spring:H});return n.createElement(Aj.div,QE({},O,{"data-rsbs-root":!0,"data-rsbs-state":vT.find(fe.matches),"data-rsbs-is-blocking":y,"data-rsbs-is-dismissable":!!h,"data-rsbs-has-header":!!a,"data-rsbs-has-footer":!!s,className:i,ref:F,style:QE({},ve,C,{opacity:H.ready})}),o,y&&n.createElement("div",QE({key:"backdrop","data-rsbs-backdrop":!0},ge({closeOnTap:!0}))),n.createElement("div",{key:"overlay","aria-modal":"true",role:"dialog","data-rsbs-overlay":!0,tabIndex:-1,ref:G,onKeyDown:function(e){"Escape"===e.key&&(e.stopPropagation(),h&&h())}},!1!==a&&n.createElement("div",QE({key:"header","data-rsbs-header":!0,ref:U},ge()),a),n.createElement("div",QE({key:"scroll","data-rsbs-scroll":!0,ref:q},T?ge({isContentDragging:!0}):{}),n.createElement("div",{"data-rsbs-content":!0,ref:W},r)),s&&n.createElement("div",QE({key:"footer",ref:K,"data-rsbs-footer":!0},ge()),s)))})),vT=["closed","opening","open","closing","dragging","snapping","resizing"];function bT(e){var t=e.lastSnap;return null!=t?t:Math.min.apply(Math,e.snapPoints)}function yT(e){return e.minHeight}var xT=["onSpringStart","onSpringEnd","skipInitialTransition"],wT=n.forwardRef((function(e,t){var r=e.onSpringStart,o=e.onSpringEnd,i=e.skipInitialTransition,s=eT(e,xT),a=n.useState(!1),l=a[0],c=a[1],d=n.useRef(),u=n.useRef(null),h=n.useRef(i&&s.open?"OPEN":"CLOSED");tT((function(){if(s.open)return cancelAnimationFrame(d.current),c(!0),function(){h.current="CLOSED"}}),[s.open]);var p=n.useCallback((function(e){return Promise.resolve(null==r?void 0:r(e)).then((function(){"OPEN"===e.type&&cancelAnimationFrame(d.current)}))}),[r]),f=n.useCallback((function(e){return Promise.resolve(null==o?void 0:o(e)).then((function(){"CLOSE"===e.type&&(d.current=requestAnimationFrame((function(){return c(!1)})))}))}),[o]);return l?n.createElement(mk,{"data-rsbs-portal":!0},n.createElement(gT,QE({},s,{lastSnapRef:u,ref:t,initialState:h.current,onSpringStart:p,onSpringEnd:f}))):null}));const CT=i.css`
|
|
2599
2599
|
width: ${k(1e3)};
|
|
2600
2600
|
border-radius: ${$(300)};
|
|
2601
2601
|
background: transparent;
|
|
@@ -2609,7 +2609,7 @@ function FM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2609
2609
|
margin: 0;
|
|
2610
2610
|
background: ${w("neutral",300)};
|
|
2611
2611
|
}
|
|
2612
|
-
`,
|
|
2612
|
+
`,kT=(e,t)=>i.css`
|
|
2613
2613
|
[data-rsbs-overlay] {
|
|
2614
2614
|
border-top-left-radius: ${$(500)};
|
|
2615
2615
|
border-top-right-radius: ${$(500)};
|
|
@@ -2635,7 +2635,7 @@ function FM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2635
2635
|
padding: 0;
|
|
2636
2636
|
min-height: ${k(1600)};
|
|
2637
2637
|
}
|
|
2638
|
-
`;!function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}("[data-rsbs-overlay] {\n border-top-left-radius: 16px;\n border-top-left-radius: var(--rsbs-overlay-rounded,16px);\n border-top-right-radius: 16px;\n border-top-right-radius: var(--rsbs-overlay-rounded,16px);\n display: flex;\n background: #fff;\n background: var(--rsbs-bg,#fff);\n flex-direction: column;\n height: 0px;\n height: var(--rsbs-overlay-h,0px);\n transform: translate3d(0, 0px, 0);\n transform: translate3d(0, var(--rsbs-overlay-translate-y,0px), 0);\n will-change: height;\n}\n\n[data-rsbs-overlay]:focus {\n outline: none;\n}\n\n[data-rsbs-is-blocking='false'] [data-rsbs-overlay] {\n box-shadow: 0 -5px 60px 0 rgba(38, 89, 115, 0.11),\n 0 -1px 0 rgba(38, 89, 115, 0.05);\n}\n\n[data-rsbs-overlay],\n[data-rsbs-root]:after {\n max-width: auto;\n max-width: var(--rsbs-max-w,auto);\n margin-left: env(safe-area-inset-left);\n margin-left: var(--rsbs-ml,env(safe-area-inset-left));\n margin-right: env(safe-area-inset-right);\n margin-right: var(--rsbs-mr,env(safe-area-inset-right));\n}\n\n[data-rsbs-overlay],\n[data-rsbs-backdrop],\n[data-rsbs-root]:after {\n z-index: 3;\n -ms-scroll-chaining: none;\n overscroll-behavior: none;\n touch-action: none;\n position: fixed;\n right: 0;\n bottom: 0;\n left: 0;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n -webkit-touch-callout: none;\n}\n\n[data-rsbs-backdrop] {\n top: -60px;\n bottom: -60px;\n background-color: rgba(0, 0, 0, 0.6);\n background-color: var(--rsbs-backdrop-bg,rgba(0, 0, 0, 0.6));\n will-change: opacity;\n cursor: pointer;\n opacity: 1;\n}\n\n[data-rsbs-is-dismissable='false'] [data-rsbs-backdrop] {\n cursor: ns-resize;\n}\n\n[data-rsbs-root]:after {\n content: '';\n pointer-events: none;\n background: #fff;\n background: var(--rsbs-bg,#fff);\n height: 1px;\n transform-origin: bottom;\n transform: scale3d(1, 0, 1);\n transform: scale3d(1, var(--rsbs-antigap-scale-y,0), 1);\n will-change: transform;\n}\n\n[data-rsbs-footer],\n[data-rsbs-header] {\n flex-shrink: 0;\n cursor: ns-resize;\n padding: 16px;\n}\n\n[data-rsbs-header] {\n text-align: center;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n box-shadow: 0 1px 0\n rgba(46, 59, 66, calc(1 * 0.125));\n box-shadow: 0 1px 0\n rgba(46, 59, 66, calc(var(--rsbs-content-opacity,1) * 0.125));\n z-index: 1;\n padding-top: calc(20px + env(safe-area-inset-top));\n padding-bottom: 8px;\n}\n\n[data-rsbs-header]:before {\n position: absolute;\n content: '';\n display: block;\n width: 36px;\n height: 4px;\n top: calc(8px + env(safe-area-inset-top));\n left: 50%;\n transform: translateX(-50%);\n border-radius: 2px;\n background-color: hsla(0, 0%, 0%, 0.14);\n background-color: var(--rsbs-handle-bg,hsla(0, 0%, 0%, 0.14));\n}\n\n@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {\n [data-rsbs-header]:before {\n transform: translateX(-50%) scaleY(0.75);\n }\n}\n\n[data-rsbs-has-header='false'] [data-rsbs-header] {\n box-shadow: none;\n padding-top: calc(12px + env(safe-area-inset-top));\n}\n\n[data-rsbs-scroll] {\n flex-shrink: 1;\n flex-grow: 1;\n -webkit-tap-highlight-color: revert;\n -webkit-touch-callout: revert;\n -webkit-user-select: auto;\n -ms-user-select: auto;\n -moz-user-select: auto;\n user-select: auto;\n overflow: auto;\n -ms-scroll-chaining: none;\n overscroll-behavior: contain;\n -webkit-overflow-scrolling: touch;\n}\n\n[data-rsbs-scroll]:focus {\n outline: none;\n}\n\n[data-rsbs-has-footer='false'] [data-rsbs-content] {\n padding-bottom: env(safe-area-inset-bottom);\n}\n\n[data-rsbs-content] {\n /* The overflow hidden is to ensure any margin on child nodes are included when the resize observer is measuring the height */\n overflow: hidden;\n}\n\n[data-rsbs-footer] {\n box-shadow: 0 -1px 0 rgba(46, 59, 66, calc(1 * 0.125)),\n 0 2px 0 #fff;\n box-shadow: 0 -1px 0 rgba(46, 59, 66, calc(var(--rsbs-content-opacity,1) * 0.125)),\n 0 2px 0 var(--rsbs-bg,#fff);\n overflow: hidden;\n z-index: 1;\n padding-bottom: calc(16px + env(safe-area-inset-bottom));\n}\n\n[data-rsbs-is-dismissable='true'] [data-rsbs-header] > *, [data-rsbs-is-dismissable='true'] [data-rsbs-scroll] > *, [data-rsbs-is-dismissable='true'] [data-rsbs-footer] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-header] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-header] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-scroll] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-scroll] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-footer] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-footer] > * {\n opacity: 1;\n opacity: var(--rsbs-content-opacity,1);\n }\n\n[data-rsbs-is-dismissable='true'] [data-rsbs-backdrop], [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-backdrop], [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-backdrop] {\n opacity: 1;\n opacity: var(--rsbs-backdrop-opacity,1);\n }\n\n[data-rsbs-state='closed'],\n[data-rsbs-state='closing'] {\n /* Allows interactions on the rest of the page before the close transition is finished */\n pointer-events: none;\n}\n");const
|
|
2638
|
+
`;!function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}("[data-rsbs-overlay] {\n border-top-left-radius: 16px;\n border-top-left-radius: var(--rsbs-overlay-rounded,16px);\n border-top-right-radius: 16px;\n border-top-right-radius: var(--rsbs-overlay-rounded,16px);\n display: flex;\n background: #fff;\n background: var(--rsbs-bg,#fff);\n flex-direction: column;\n height: 0px;\n height: var(--rsbs-overlay-h,0px);\n transform: translate3d(0, 0px, 0);\n transform: translate3d(0, var(--rsbs-overlay-translate-y,0px), 0);\n will-change: height;\n}\n\n[data-rsbs-overlay]:focus {\n outline: none;\n}\n\n[data-rsbs-is-blocking='false'] [data-rsbs-overlay] {\n box-shadow: 0 -5px 60px 0 rgba(38, 89, 115, 0.11),\n 0 -1px 0 rgba(38, 89, 115, 0.05);\n}\n\n[data-rsbs-overlay],\n[data-rsbs-root]:after {\n max-width: auto;\n max-width: var(--rsbs-max-w,auto);\n margin-left: env(safe-area-inset-left);\n margin-left: var(--rsbs-ml,env(safe-area-inset-left));\n margin-right: env(safe-area-inset-right);\n margin-right: var(--rsbs-mr,env(safe-area-inset-right));\n}\n\n[data-rsbs-overlay],\n[data-rsbs-backdrop],\n[data-rsbs-root]:after {\n z-index: 3;\n -ms-scroll-chaining: none;\n overscroll-behavior: none;\n touch-action: none;\n position: fixed;\n right: 0;\n bottom: 0;\n left: 0;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n -webkit-touch-callout: none;\n}\n\n[data-rsbs-backdrop] {\n top: -60px;\n bottom: -60px;\n background-color: rgba(0, 0, 0, 0.6);\n background-color: var(--rsbs-backdrop-bg,rgba(0, 0, 0, 0.6));\n will-change: opacity;\n cursor: pointer;\n opacity: 1;\n}\n\n[data-rsbs-is-dismissable='false'] [data-rsbs-backdrop] {\n cursor: ns-resize;\n}\n\n[data-rsbs-root]:after {\n content: '';\n pointer-events: none;\n background: #fff;\n background: var(--rsbs-bg,#fff);\n height: 1px;\n transform-origin: bottom;\n transform: scale3d(1, 0, 1);\n transform: scale3d(1, var(--rsbs-antigap-scale-y,0), 1);\n will-change: transform;\n}\n\n[data-rsbs-footer],\n[data-rsbs-header] {\n flex-shrink: 0;\n cursor: ns-resize;\n padding: 16px;\n}\n\n[data-rsbs-header] {\n text-align: center;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n box-shadow: 0 1px 0\n rgba(46, 59, 66, calc(1 * 0.125));\n box-shadow: 0 1px 0\n rgba(46, 59, 66, calc(var(--rsbs-content-opacity,1) * 0.125));\n z-index: 1;\n padding-top: calc(20px + env(safe-area-inset-top));\n padding-bottom: 8px;\n}\n\n[data-rsbs-header]:before {\n position: absolute;\n content: '';\n display: block;\n width: 36px;\n height: 4px;\n top: calc(8px + env(safe-area-inset-top));\n left: 50%;\n transform: translateX(-50%);\n border-radius: 2px;\n background-color: hsla(0, 0%, 0%, 0.14);\n background-color: var(--rsbs-handle-bg,hsla(0, 0%, 0%, 0.14));\n}\n\n@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {\n [data-rsbs-header]:before {\n transform: translateX(-50%) scaleY(0.75);\n }\n}\n\n[data-rsbs-has-header='false'] [data-rsbs-header] {\n box-shadow: none;\n padding-top: calc(12px + env(safe-area-inset-top));\n}\n\n[data-rsbs-scroll] {\n flex-shrink: 1;\n flex-grow: 1;\n -webkit-tap-highlight-color: revert;\n -webkit-touch-callout: revert;\n -webkit-user-select: auto;\n -ms-user-select: auto;\n -moz-user-select: auto;\n user-select: auto;\n overflow: auto;\n -ms-scroll-chaining: none;\n overscroll-behavior: contain;\n -webkit-overflow-scrolling: touch;\n}\n\n[data-rsbs-scroll]:focus {\n outline: none;\n}\n\n[data-rsbs-has-footer='false'] [data-rsbs-content] {\n padding-bottom: env(safe-area-inset-bottom);\n}\n\n[data-rsbs-content] {\n /* The overflow hidden is to ensure any margin on child nodes are included when the resize observer is measuring the height */\n overflow: hidden;\n}\n\n[data-rsbs-footer] {\n box-shadow: 0 -1px 0 rgba(46, 59, 66, calc(1 * 0.125)),\n 0 2px 0 #fff;\n box-shadow: 0 -1px 0 rgba(46, 59, 66, calc(var(--rsbs-content-opacity,1) * 0.125)),\n 0 2px 0 var(--rsbs-bg,#fff);\n overflow: hidden;\n z-index: 1;\n padding-bottom: calc(16px + env(safe-area-inset-bottom));\n}\n\n[data-rsbs-is-dismissable='true'] [data-rsbs-header] > *, [data-rsbs-is-dismissable='true'] [data-rsbs-scroll] > *, [data-rsbs-is-dismissable='true'] [data-rsbs-footer] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-header] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-header] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-scroll] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-scroll] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-footer] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-footer] > * {\n opacity: 1;\n opacity: var(--rsbs-content-opacity,1);\n }\n\n[data-rsbs-is-dismissable='true'] [data-rsbs-backdrop], [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-backdrop], [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-backdrop] {\n opacity: 1;\n opacity: var(--rsbs-backdrop-opacity,1);\n }\n\n[data-rsbs-state='closed'],\n[data-rsbs-state='closing'] {\n /* Allows interactions on the rest of the page before the close transition is finished */\n pointer-events: none;\n}\n");const ST=(e,t)=>{let n=0,r=1/0;return t.forEach(((t,o)=>{const i=Math.abs(t-e);i<r&&(r=i,n=o)})),n},$T=(e,t)=>{let n="14.875rem";return"full-width"===e?n="100%":"large"===e&&(n="22.875rem"),i.css`
|
|
2639
2639
|
width: 100%;
|
|
2640
2640
|
max-width: ${n};
|
|
2641
2641
|
border-radius: ${$(300)};
|
|
@@ -2649,7 +2649,7 @@ function FM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2649
2649
|
button {
|
|
2650
2650
|
margin-left: ${t?0:k(600)};
|
|
2651
2651
|
}
|
|
2652
|
-
`},
|
|
2652
|
+
`},jT=i.css`
|
|
2653
2653
|
display: flex;
|
|
2654
2654
|
align-items: flex-start;
|
|
2655
2655
|
gap: ${k(200)};
|
|
@@ -2657,14 +2657,14 @@ function FM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2657
2657
|
svg {
|
|
2658
2658
|
margin-top: 0.1875rem;
|
|
2659
2659
|
}
|
|
2660
|
-
|
|
2660
|
+
`,MT=e=>i.css`
|
|
2661
2661
|
max-width: 45rem;
|
|
2662
2662
|
color: ${w("neutral",800)};
|
|
2663
2663
|
font-size: ${C("small"===e?300:500)};
|
|
2664
2664
|
line-height: ${S("small"===e?500:700)};
|
|
2665
2665
|
font-weight: 400;
|
|
2666
2666
|
text-align: left;
|
|
2667
|
-
`,
|
|
2667
|
+
`,ET=(e,t)=>i.css`
|
|
2668
2668
|
max-width: 45rem;
|
|
2669
2669
|
color: ${w("neutral",700)};
|
|
2670
2670
|
font-size: ${C("small"===e?200:400)};
|
|
@@ -2672,7 +2672,7 @@ function FM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2672
2672
|
font-weight: 400;
|
|
2673
2673
|
margin-left: ${t?k(600):"0"};
|
|
2674
2674
|
text-align: left;
|
|
2675
|
-
`,
|
|
2675
|
+
`,TT=(e,t)=>i.css`
|
|
2676
2676
|
max-width: 45rem;
|
|
2677
2677
|
color: ${w("neutral",700)};
|
|
2678
2678
|
font-size: ${C("small"===e?200:400)};
|
|
@@ -2680,15 +2680,15 @@ function FM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2680
2680
|
font-weight: 400;
|
|
2681
2681
|
margin-left: ${t?k(600):"0"};
|
|
2682
2682
|
text-align: left;
|
|
2683
|
-
`,
|
|
2683
|
+
`,OT=i.css`
|
|
2684
2684
|
background-color: ${w("neutral",100)};
|
|
2685
2685
|
border: ${j(100)} solid ${w("neutral",300)};
|
|
2686
2686
|
color: ${w("neutral",700)};
|
|
2687
|
-
`,
|
|
2687
|
+
`,LT=i.css`
|
|
2688
2688
|
background-color: ${w("neutral",200)};
|
|
2689
2689
|
border: ${j(100)} solid ${w("neutral",300)};
|
|
2690
2690
|
color: ${w("neutral",700)};
|
|
2691
|
-
`,
|
|
2691
|
+
`,AT=i.css`
|
|
2692
2692
|
background-color: ${w("success",100)};
|
|
2693
2693
|
border: ${j(100)} solid ${w("success",300)};
|
|
2694
2694
|
color: ${w("success",500)};
|
|
@@ -2696,7 +2696,7 @@ function FM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2696
2696
|
p {
|
|
2697
2697
|
color: ${w("success",900)};
|
|
2698
2698
|
}
|
|
2699
|
-
`,
|
|
2699
|
+
`,RT=i.css`
|
|
2700
2700
|
background-color: ${w("warning",100)};
|
|
2701
2701
|
border: ${j(100)} solid ${w("warning",300)};
|
|
2702
2702
|
color: ${w("warning",500)};
|
|
@@ -2704,7 +2704,7 @@ function FM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2704
2704
|
p {
|
|
2705
2705
|
color: ${w("warning",900)};
|
|
2706
2706
|
}
|
|
2707
|
-
`,
|
|
2707
|
+
`,NT=i.css`
|
|
2708
2708
|
background-color: ${w("error",100)};
|
|
2709
2709
|
border: ${j(100)} solid ${w("error",300)};
|
|
2710
2710
|
color: ${w("error",500)};
|
|
@@ -2712,52 +2712,52 @@ function FM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2712
2712
|
p {
|
|
2713
2713
|
color: ${w("error",900)};
|
|
2714
2714
|
}
|
|
2715
|
-
`,
|
|
2715
|
+
`,DT=({label:e,caption:t,variant:n,size:o="large",icon:i=r.jsx(Df,{height:"1rem",width:"1rem"}),onActionClick:s,actionLabel:a,isButtonRight:l,buttonLeftIcon:c,buttonRightIcon:d,labels:u})=>{const h=Mf("InlineMessage",u);let p=OT;"info-grey"===n?p=LT:"success"===n?p=AT:"warning"===n?p=RT:"error"===n&&(p=NT);const f="error"===n||"warning"===n?"alert":"status",m="alert"===f?"assertive":"polite";return r.jsxs("div",{css:[$T(o,l),p],role:f,"aria-live":m,"aria-roledescription":h.roleDescription,children:[r.jsxs("div",{children:[r.jsxs("div",{css:jT,children:[i,r.jsx("p",{css:MT(o),children:e})]}),t&&"string"==typeof t?r.jsx("p",{css:ET(o,!!i),children:t}):t?r.jsx("div",{css:TT(o,!!i),children:t}):null]}),a?r.jsx(Ef,{label:a,variant:"info-white"===n||"info-grey"===n?"primary":"secondary",size:"large"===o?"default":"small",onClick:s,leftIcon:c,rightIcon:d}):null]})},IT=i.css`
|
|
2716
2716
|
width: 100%;
|
|
2717
2717
|
min-height: calc(${k(1200)} * 12);
|
|
2718
2718
|
background-color: ${w("neutral",100)};
|
|
2719
2719
|
display: flex;
|
|
2720
2720
|
flex-direction: column;
|
|
2721
|
-
`,
|
|
2721
|
+
`,PT=i.css`
|
|
2722
2722
|
background-color: ${w("neutral",200)};
|
|
2723
2723
|
padding: ${k(300)};
|
|
2724
2724
|
display: flex;
|
|
2725
2725
|
align-items: center;
|
|
2726
2726
|
gap: ${k(300)};
|
|
2727
|
-
`,
|
|
2727
|
+
`,zT=i.css`
|
|
2728
2728
|
flex: 1;
|
|
2729
2729
|
|
|
2730
2730
|
.ds-text-input-container {
|
|
2731
2731
|
margin-bottom: 0;
|
|
2732
2732
|
}
|
|
2733
|
-
`,
|
|
2733
|
+
`,VT=i.css`
|
|
2734
2734
|
flex-shrink: 0;
|
|
2735
2735
|
color: ${w("neutral",700)};
|
|
2736
2736
|
font-size: ${C(400)};
|
|
2737
2737
|
font-style: normal;
|
|
2738
2738
|
font-weight: 400;
|
|
2739
|
-
`,
|
|
2739
|
+
`,BT=i.css`
|
|
2740
2740
|
flex: 1;
|
|
2741
2741
|
min-height: 0;
|
|
2742
2742
|
padding: ${k(400)};
|
|
2743
2743
|
display: flex;
|
|
2744
2744
|
flex-direction: column;
|
|
2745
2745
|
gap: ${k(300)};
|
|
2746
|
-
`,
|
|
2746
|
+
`,HT=i.css`
|
|
2747
2747
|
color: ${w("neutral",700)};
|
|
2748
2748
|
font-size: ${C(400)};
|
|
2749
2749
|
line-height: ${S(600)};
|
|
2750
2750
|
font-weight: 700;
|
|
2751
|
-
`,
|
|
2751
|
+
`,_T=i.css`
|
|
2752
2752
|
width: 100%;
|
|
2753
|
-
`,
|
|
2753
|
+
`,FT=i.css`
|
|
2754
2754
|
flex: 1;
|
|
2755
2755
|
min-height: 0;
|
|
2756
2756
|
overflow-y: auto;
|
|
2757
2757
|
display: flex;
|
|
2758
2758
|
flex-direction: column;
|
|
2759
2759
|
gap: ${k(200)};
|
|
2760
|
-
`,
|
|
2760
|
+
`,qT=i.css`
|
|
2761
2761
|
background-color: ${w("neutral",200)};
|
|
2762
2762
|
border: ${j(100)} solid ${w("neutral",300)};
|
|
2763
2763
|
border-radius: ${$(300)};
|
|
@@ -2783,13 +2783,13 @@ function FM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2783
2783
|
&:active {
|
|
2784
2784
|
background-color: ${w("neutral",300)};
|
|
2785
2785
|
}
|
|
2786
|
-
`,
|
|
2786
|
+
`,WT=i.css`
|
|
2787
2787
|
display: flex;
|
|
2788
2788
|
flex: 1;
|
|
2789
2789
|
min-width: 0;
|
|
2790
2790
|
flex-direction: column;
|
|
2791
2791
|
gap: ${k(50)};
|
|
2792
|
-
`,
|
|
2792
|
+
`,UT=i.css`
|
|
2793
2793
|
color: ${w("neutral",900)};
|
|
2794
2794
|
font-size: ${C(300)};
|
|
2795
2795
|
line-height: ${S(500)};
|
|
@@ -2797,7 +2797,7 @@ function FM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2797
2797
|
overflow: hidden;
|
|
2798
2798
|
text-overflow: ellipsis;
|
|
2799
2799
|
white-space: nowrap;
|
|
2800
|
-
`,
|
|
2800
|
+
`,KT=i.css`
|
|
2801
2801
|
color: ${w("neutral",700)};
|
|
2802
2802
|
font-size: ${C(300)};
|
|
2803
2803
|
line-height: ${S(500)};
|
|
@@ -2805,7 +2805,7 @@ function FM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2805
2805
|
overflow: hidden;
|
|
2806
2806
|
text-overflow: ellipsis;
|
|
2807
2807
|
white-space: nowrap;
|
|
2808
|
-
`,
|
|
2808
|
+
`,GT=e=>i.css`
|
|
2809
2809
|
a,
|
|
2810
2810
|
p {
|
|
2811
2811
|
font-size: ${C("small"===e?200:400)};
|
|
@@ -2837,19 +2837,19 @@ function FM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2837
2837
|
a:hover {
|
|
2838
2838
|
text-decoration: underline;
|
|
2839
2839
|
}
|
|
2840
|
-
`,
|
|
2840
|
+
`,ZT=e=>i.css`
|
|
2841
2841
|
svg {
|
|
2842
2842
|
height: ${k("small"===e?200:300)};
|
|
2843
2843
|
width: ${k("small"===e?200:300)};
|
|
2844
2844
|
color: ${w("neutral",600)};
|
|
2845
2845
|
}
|
|
2846
|
-
`,
|
|
2846
|
+
`,JT=i.css`
|
|
2847
2847
|
cursor: pointer;
|
|
2848
2848
|
color: ${w("neutral",600)};
|
|
2849
2849
|
display: flex;
|
|
2850
2850
|
justify-content: center;
|
|
2851
2851
|
align-items: center;
|
|
2852
|
-
`,
|
|
2852
|
+
`,XT=(e,t)=>i.css`
|
|
2853
2853
|
min-height: ${k(1400)};
|
|
2854
2854
|
width: 100vw;
|
|
2855
2855
|
position: ${e?"sticky":"absolute"};
|
|
@@ -2859,7 +2859,7 @@ function FM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2859
2859
|
border-top: ${j(100)} solid
|
|
2860
2860
|
${w("neutral",400)};
|
|
2861
2861
|
z-index: 101;
|
|
2862
|
-
`,
|
|
2862
|
+
`,YT=e=>i.css`
|
|
2863
2863
|
height: 100%;
|
|
2864
2864
|
width: 100%;
|
|
2865
2865
|
max-width: ${null!=e?u(e):"100%"};
|
|
@@ -2874,7 +2874,7 @@ function FM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2874
2874
|
flex-direction: column;
|
|
2875
2875
|
align-items: flex-start;
|
|
2876
2876
|
}
|
|
2877
|
-
`,
|
|
2877
|
+
`,QT=i.css`
|
|
2878
2878
|
display: flex;
|
|
2879
2879
|
align-items: center;
|
|
2880
2880
|
flex-wrap: wrap;
|
|
@@ -2887,7 +2887,7 @@ function FM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2887
2887
|
color: ${w("neutral",700)};
|
|
2888
2888
|
text-decoration: underline;
|
|
2889
2889
|
}
|
|
2890
|
-
`,
|
|
2890
|
+
`,eO=i.css`
|
|
2891
2891
|
width: 15rem;
|
|
2892
2892
|
font-size: ${C(300)};
|
|
2893
2893
|
line-height: ${S(500)};
|
|
@@ -2898,17 +2898,17 @@ function FM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2898
2898
|
@media screen and (max-width: 48rem) {
|
|
2899
2899
|
text-align: left;
|
|
2900
2900
|
}
|
|
2901
|
-
`,
|
|
2901
|
+
`,tO=i.css`
|
|
2902
2902
|
display: flex;
|
|
2903
2903
|
align-items: center;
|
|
2904
2904
|
gap: ${k(400)};
|
|
2905
|
-
`,
|
|
2905
|
+
`,nO=i.css`
|
|
2906
2906
|
width: 100%;
|
|
2907
2907
|
display: flex;
|
|
2908
2908
|
align-items: center;
|
|
2909
2909
|
height: ${k(1400)};
|
|
2910
2910
|
background-color: ${w("neutral",200)};
|
|
2911
|
-
`,
|
|
2911
|
+
`,rO=i.css`
|
|
2912
2912
|
height: ${k(1400)};
|
|
2913
2913
|
width: 99%;
|
|
2914
2914
|
background-color: ${w("neutral",200)};
|
|
@@ -3004,9 +3004,9 @@ function FM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3004
3004
|
opacity: 1;
|
|
3005
3005
|
}
|
|
3006
3006
|
}
|
|
3007
|
-
`,
|
|
3007
|
+
`,oO=i.css`
|
|
3008
3008
|
position: relative;
|
|
3009
|
-
`,
|
|
3009
|
+
`,iO=i.css`
|
|
3010
3010
|
position: absolute;
|
|
3011
3011
|
top: -0.3125rem;
|
|
3012
3012
|
right: -0.3125rem;
|
|
@@ -3021,7 +3021,7 @@ function FM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3021
3021
|
display: flex;
|
|
3022
3022
|
justify-content: center;
|
|
3023
3023
|
align-items: center;
|
|
3024
|
-
`,
|
|
3024
|
+
`,sO=(e,t)=>Math.max(0,e.findIndex((e=>e.value===t))),aO=(e,t,n,r,o)=>{let s="3rem";return e?s="6rem":o&&(s="1.75rem"),i.css`
|
|
3025
3025
|
max-height: ${s};
|
|
3026
3026
|
width: 100%;
|
|
3027
3027
|
background-color: ${n??w("neutral","dark"===r?800:100)};
|
|
@@ -3031,7 +3031,7 @@ function FM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3031
3031
|
z-index: 102;
|
|
3032
3032
|
border-bottom: ${j(100)} solid
|
|
3033
3033
|
${w("neutral",400)};
|
|
3034
|
-
`},
|
|
3034
|
+
`},lO=(e,t)=>i.css`
|
|
3035
3035
|
height: ${k(t?700:1200)};
|
|
3036
3036
|
width: 100%;
|
|
3037
3037
|
background-color: ${w("neutral","dark"===e?800:100)};
|
|
@@ -3042,7 +3042,7 @@ function FM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3042
3042
|
justify-content: flex-start;
|
|
3043
3043
|
gap: 0;
|
|
3044
3044
|
padding: ${t?0:`${k(200)} ${k(400)}`};
|
|
3045
|
-
`,
|
|
3045
|
+
`,cO=(e,t,n)=>i.css`
|
|
3046
3046
|
height: ${k(n?700:1200)};
|
|
3047
3047
|
width: 100%;
|
|
3048
3048
|
max-width: ${t?u(t):"100%"};
|
|
@@ -3053,13 +3053,13 @@ function FM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3053
3053
|
justify-content: space-between;
|
|
3054
3054
|
margin: 0 auto;
|
|
3055
3055
|
padding: ${n?0:`${k(200)} ${k(400)}`};
|
|
3056
|
-
`,
|
|
3056
|
+
`,dO=(e,t)=>i.css`
|
|
3057
3057
|
display: flex;
|
|
3058
3058
|
margin: ${t?"-0.0625rem":"0rem"};
|
|
3059
3059
|
justify-content: flex-start;
|
|
3060
3060
|
gap: ${k(300)};
|
|
3061
3061
|
color: ${w("neutral",e?100:900)};
|
|
3062
|
-
`,
|
|
3062
|
+
`,uO=i.css`
|
|
3063
3063
|
outline: none;
|
|
3064
3064
|
|
|
3065
3065
|
a {
|
|
@@ -3071,12 +3071,12 @@ function FM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3071
3071
|
outline-width: ${k(50)};
|
|
3072
3072
|
}
|
|
3073
3073
|
}
|
|
3074
|
-
`,
|
|
3074
|
+
`,hO=e=>i.css`
|
|
3075
3075
|
display: ${e?"none":"flex"};
|
|
3076
3076
|
align-items: center;
|
|
3077
3077
|
justify-content: flex-start;
|
|
3078
3078
|
gap: 0rem;
|
|
3079
|
-
`,
|
|
3079
|
+
`,pO=(e,t,n)=>i.css`
|
|
3080
3080
|
font-size: ${C(n?300:400)};
|
|
3081
3081
|
line-height: ${S(600)};
|
|
3082
3082
|
font-weight: 400;
|
|
@@ -3101,12 +3101,12 @@ function FM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3101
3101
|
font-weight: 700;
|
|
3102
3102
|
color: ${w("accessible","controls-on-neutral-lights")};
|
|
3103
3103
|
`:""}
|
|
3104
|
-
`,
|
|
3104
|
+
`,fO=e=>i.css`
|
|
3105
3105
|
height: ${k(e?700:1200)};
|
|
3106
3106
|
display: flex;
|
|
3107
3107
|
align-items: center;
|
|
3108
3108
|
justify-content: flex-end;
|
|
3109
|
-
`,
|
|
3109
|
+
`,mO=e=>i.css`
|
|
3110
3110
|
height: 100%;
|
|
3111
3111
|
font-size: ${C(400)};
|
|
3112
3112
|
line-height: ${S(600)};
|
|
@@ -3126,7 +3126,7 @@ function FM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3126
3126
|
}
|
|
3127
3127
|
}
|
|
3128
3128
|
`:""}
|
|
3129
|
-
`,
|
|
3129
|
+
`,gO=e=>i.css`
|
|
3130
3130
|
height: 100%;
|
|
3131
3131
|
display: flex;
|
|
3132
3132
|
align-items: center;
|
|
@@ -3135,7 +3135,7 @@ function FM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3135
3135
|
padding-left: ${k(400)};
|
|
3136
3136
|
border-left: ${j(100)} solid
|
|
3137
3137
|
${w("neutral",e?700:300)};
|
|
3138
|
-
`,
|
|
3138
|
+
`,vO=(e="light",t)=>i.css`
|
|
3139
3139
|
background-color: none;
|
|
3140
3140
|
border: none;
|
|
3141
3141
|
cursor: pointer;
|
|
@@ -3161,7 +3161,7 @@ function FM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3161
3161
|
outline-width: ${j(200)};
|
|
3162
3162
|
background-color: ${w("neutral",200)};
|
|
3163
3163
|
}
|
|
3164
|
-
`,
|
|
3164
|
+
`,bO=(e,t)=>i.css`
|
|
3165
3165
|
position: absolute;
|
|
3166
3166
|
top: ${k(t?700:1200)};
|
|
3167
3167
|
right: 0;
|
|
@@ -3176,10 +3176,10 @@ function FM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3176
3176
|
justify-content: flex-start;
|
|
3177
3177
|
gap: ${k(400)};
|
|
3178
3178
|
transition: width 0.5s ease-in-out;
|
|
3179
|
-
`,
|
|
3179
|
+
`,yO=i.css`
|
|
3180
3180
|
height: 100%;
|
|
3181
3181
|
width: 100%;
|
|
3182
|
-
`,
|
|
3182
|
+
`,xO=e=>i.css`
|
|
3183
3183
|
background-color: ${w("neutral","dark"===e?800:200)};
|
|
3184
3184
|
border-bottom: ${j(100)} solid
|
|
3185
3185
|
${w("neutral",300)};
|
|
@@ -3200,13 +3200,13 @@ function FM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3200
3200
|
margin-left: -${k(300)};
|
|
3201
3201
|
}
|
|
3202
3202
|
}
|
|
3203
|
-
`,
|
|
3203
|
+
`,wO=i.css`
|
|
3204
3204
|
background-color: ${w("neutral",100)};
|
|
3205
|
-
`,
|
|
3205
|
+
`,CO=i.css`
|
|
3206
3206
|
min-height: 100vh;
|
|
3207
3207
|
width: 100%;
|
|
3208
3208
|
overflow-y: scroll;
|
|
3209
|
-
`;i.css``;const
|
|
3209
|
+
`;i.css``;const kO=e=>i.css`
|
|
3210
3210
|
display: inline-block;
|
|
3211
3211
|
width: 100%;
|
|
3212
3212
|
padding: ${k(300)} ${k(400)};
|
|
@@ -3235,7 +3235,7 @@ function FM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3235
3235
|
outline-width: ${j(200)};
|
|
3236
3236
|
background-color: ${w("neutral",200)};
|
|
3237
3237
|
}
|
|
3238
|
-
`,
|
|
3238
|
+
`,SO=i.css`
|
|
3239
3239
|
width: 100%;
|
|
3240
3240
|
padding: ${k(300)} ${k(400)};
|
|
3241
3241
|
display: flex;
|
|
@@ -3259,7 +3259,7 @@ function FM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3259
3259
|
outline-width: ${j(200)};
|
|
3260
3260
|
background-color: ${w("neutral",200)};
|
|
3261
3261
|
}
|
|
3262
|
-
|
|
3262
|
+
`,$O=e=>i.css`
|
|
3263
3263
|
position: absolute;
|
|
3264
3264
|
top: 0rem;
|
|
3265
3265
|
right: 0;
|
|
@@ -3271,7 +3271,7 @@ function FM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3271
3271
|
align-items: flex-start;
|
|
3272
3272
|
justify-content: flex-start;
|
|
3273
3273
|
transition: width 0.5s ease-in-out;
|
|
3274
|
-
`,
|
|
3274
|
+
`,jO=i.css`
|
|
3275
3275
|
height: ${k(1200)};
|
|
3276
3276
|
width: 100%;
|
|
3277
3277
|
display: flex;
|
|
@@ -3283,7 +3283,7 @@ function FM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3283
3283
|
position: relative;
|
|
3284
3284
|
top: 0;
|
|
3285
3285
|
left: 0;
|
|
3286
|
-
|
|
3286
|
+
`,MO=i.css`
|
|
3287
3287
|
position: absolute;
|
|
3288
3288
|
bottom: 0;
|
|
3289
3289
|
left: 0;
|
|
@@ -3298,7 +3298,7 @@ function FM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3298
3298
|
button {
|
|
3299
3299
|
width: calc(48% - 1.5rem);
|
|
3300
3300
|
}
|
|
3301
|
-
`,
|
|
3301
|
+
`,EO=({theme:e="light",variant:t,navigationSection:o,utilitySection:i,actionsSection:s,linkRouter:a,isOpen:l,setIsOpen:c,pathname:d,resolvedLabels:u})=>{const h="condensed"===t,[p,f]=n.useState(void 0),[m,g]=n.useState(-1),v=n.useRef(null),b=n.useRef([]),y=a;return r.jsxs(r.Fragment,{children:[r.jsx("div",{css:bO(l,h),children:l&&r.jsxs("div",{css:yO,children:[r.jsxs("div",{style:{overflowY:"scroll",width:"100%",height:"100%",paddingBottom:"4.5rem"},children:[i?r.jsx("div",{css:xO(e),children:i?.map((e=>r.jsx("div",{className:"ds-utility-item",children:e})))}):null,o?r.jsx("div",{css:wO,children:o.map(((e,t)=>e.link?r.jsx(y,{to:e.link,href:e.link,onClick:()=>{f(void 0),g(-1),c(!1)},css:kO(d===e.link),children:e.label},e.label):r.jsxs("button",{css:SO,type:"button",ref:e=>{b.current[t]=e},onClick:()=>{e.items&&(f(e),g(t),setTimeout((()=>{v.current?.focus()}),100))},children:[e.label,e.items?r.jsx(If,{rotate:"270",color:"var(--chakra-colors-neutral-700)"}):null]},e.label)))}):null]}),s?r.jsx("div",{css:MO,children:s.map((e=>r.jsx(Ef,{...e,onClick:t=>{e?.onClick?.(t),f(void 0),g(-1),c(!1)}},e.ariaLabel)))}):null]})}),r.jsx("div",{css:$O(!!p?.items),children:p?.items?r.jsxs(r.Fragment,{children:[r.jsxs("div",{css:jO,children:[r.jsxs("button",{type:"button",onClick:()=>{f(void 0),g(-1),b.current[m]?.focus()},"aria-label":u.goBackLabel,css:vO(e),ref:v,children:[r.jsx(If,{rotate:"90",color:"var(--chakra-colors-neutral-700)"}),p?.label]}),r.jsxs("button",{type:"button",onClick:()=>{f(void 0),g(-1),c(!1)},"aria-label":u.closeMenuLabel,css:vO(e),children:[u.closeButtonText,r.jsx(zf,{height:"1rem",width:"1rem"})]})]}),r.jsx("div",{css:CO,children:p?.items?.map((e=>r.jsx(y,{to:e.link,href:e.link,css:kO(),onClick:()=>{f(void 0),g(-1),c(!1)},children:e.label},e.label)))})]}):null})]})},TO=1023,OO=i.css`
|
|
3302
3302
|
width: ${k(1600)};
|
|
3303
3303
|
height: 100%;
|
|
3304
3304
|
z-index: 100;
|
|
@@ -3308,7 +3308,7 @@ function FM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3308
3308
|
display: flex;
|
|
3309
3309
|
flex-direction: column;
|
|
3310
3310
|
justify-content: space-between;
|
|
3311
|
-
`,
|
|
3311
|
+
`,LO=i.css`
|
|
3312
3312
|
width: ${k(1600)};
|
|
3313
3313
|
height: ${k(1600)};
|
|
3314
3314
|
background-color: ${w("neutral",200)};
|
|
@@ -3399,7 +3399,7 @@ function FM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3399
3399
|
}
|
|
3400
3400
|
}
|
|
3401
3401
|
}
|
|
3402
|
-
`,
|
|
3402
|
+
`,AO=i.css`
|
|
3403
3403
|
display: flex;
|
|
3404
3404
|
justify-content: center;
|
|
3405
3405
|
align-items: center;
|
|
@@ -3412,7 +3412,7 @@ function FM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3412
3412
|
fill: ${w("neutral",600)};
|
|
3413
3413
|
}
|
|
3414
3414
|
}
|
|
3415
|
-
`,
|
|
3415
|
+
`,RO=i.css`
|
|
3416
3416
|
width: ${k(1600)};
|
|
3417
3417
|
height: ${k(1600)};
|
|
3418
3418
|
background-color: ${w("neutral",200)};
|
|
@@ -3450,7 +3450,7 @@ function FM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3450
3450
|
text-align: center;
|
|
3451
3451
|
color: ${w("neutral",600)};
|
|
3452
3452
|
}
|
|
3453
|
-
`,
|
|
3453
|
+
`,NO=i.css`
|
|
3454
3454
|
width: 20rem;
|
|
3455
3455
|
height: 100%;
|
|
3456
3456
|
z-index: 100;
|
|
@@ -3460,7 +3460,7 @@ function FM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3460
3460
|
overflow-x: hidden;
|
|
3461
3461
|
border-right: ${j(100)} solid
|
|
3462
3462
|
${w("neutral",300)};
|
|
3463
|
-
`,
|
|
3463
|
+
`,DO=e=>i.css`
|
|
3464
3464
|
width: 100%;
|
|
3465
3465
|
display: flex;
|
|
3466
3466
|
align-items: center;
|
|
@@ -3469,7 +3469,7 @@ function FM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3469
3469
|
${"view"===e&&`\n border: ${j(100)} solid ${w("neutral",400)};\n background-color: ${w("neutral",200)};\n border-radius: ${$(300)};\n padding: ${k(100)};\n `}
|
|
3470
3470
|
|
|
3471
3471
|
${"transparent"===e&&`\n border: none;\n background-color: transparent;\n border-radius: ${$(300)};\n padding: 0 ${k(400)};\n\n .chakra-tabs__list {\n gap: ${k(800)};\n }\n `}
|
|
3472
|
-
`,
|
|
3472
|
+
`,IO=i.css`
|
|
3473
3473
|
width: 99%;
|
|
3474
3474
|
height: ${k(1e3)};
|
|
3475
3475
|
padding: ${k(200)} ${k(400)};
|
|
@@ -3485,7 +3485,7 @@ function FM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3485
3485
|
&:focus-visible {
|
|
3486
3486
|
box-shadow: none;
|
|
3487
3487
|
}
|
|
3488
|
-
`,
|
|
3488
|
+
`,PO=i.css`
|
|
3489
3489
|
background-color: ${w("neutral",200)};
|
|
3490
3490
|
color: ${w("neutral",700)};
|
|
3491
3491
|
|
|
@@ -3542,11 +3542,11 @@ function FM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3542
3542
|
opacity: 1;
|
|
3543
3543
|
}
|
|
3544
3544
|
}
|
|
3545
|
-
`,
|
|
3545
|
+
`,zO=i.css`
|
|
3546
3546
|
width: ${k(100)};
|
|
3547
3547
|
height: ${k(600)};
|
|
3548
3548
|
background-color: ${w("neutral",400)};
|
|
3549
|
-
`,
|
|
3549
|
+
`,VO=i.css`
|
|
3550
3550
|
height: ${k(800)};
|
|
3551
3551
|
border-radius: ${$(200)};
|
|
3552
3552
|
background-color: ${w("neutral",200)};
|
|
@@ -3621,7 +3621,7 @@ function FM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3621
3621
|
opacity: 1;
|
|
3622
3622
|
}
|
|
3623
3623
|
}
|
|
3624
|
-
`,
|
|
3624
|
+
`,BO=i.css`
|
|
3625
3625
|
background-color: transparent;
|
|
3626
3626
|
color: ${w("neutral",600)};
|
|
3627
3627
|
width: auto;
|
|
@@ -3698,7 +3698,7 @@ function FM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3698
3698
|
}
|
|
3699
3699
|
}
|
|
3700
3700
|
}
|
|
3701
|
-
`,
|
|
3701
|
+
`,HO=(e,t)=>Math.max(0,e.findIndex((e=>e.value===t))),_O=e=>1===e?"none":2===e?"left":"right",FO=({text:e,query:n})=>{if(!n)return e;const r=new RegExp(`(${n})`,"ig"),o=e.split(r);return t.jsx(t.Fragment,{children:o.map((e=>r.test(e)?t.jsx("strong",{children:e},e):t.jsx("span",{children:e},e)))})},qO=({items:r,query:o,onSelect:i,highlightedIndex:s})=>{const a=n.useRef(null);return n.useEffect((()=>{if(!a.current)return;const e=a.current.children[s];e&&e.scrollIntoView({block:"nearest"})}),[s]),t.jsx(e.Box,{padding:"0.5rem",children:r.map(((n,r)=>t.jsx(e.Box,{ref:a,padding:"0.375rem 0.5rem",borderRadius:"md",cursor:"pointer",bg:r===s?"gray.100":void 0,_hover:{background:"gray.50"},onClick:()=>i(n.id||n.label),children:t.jsx(FO,{text:n.label,query:o})},n.id)))})},WO={small:k(400),medium:k(600),large:k(1e3),default:k(400)};function UO(e,t,n,r){const o=function(e,t){return null!=t&&""!==t?u(t):e&&WO[e]?WO[e]:WO.default}(e,t),s=n?w("neutral",200):w("primary",300),a=r??s,l=r&&n?"opacity: 0.7;":"",c=w("neutral",n?400:800);return i.css`
|
|
3702
3702
|
height: ${o};
|
|
3703
3703
|
width: ${o};
|
|
3704
3704
|
border-radius: 50%;
|
|
@@ -3733,17 +3733,17 @@ function FM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3733
3733
|
background-color: ${w("primary",500)};
|
|
3734
3734
|
}
|
|
3735
3735
|
}
|
|
3736
|
-
`}const
|
|
3736
|
+
`}const KO=e=>i.css`
|
|
3737
3737
|
width: ${e||k(400)};
|
|
3738
3738
|
position: absolute;
|
|
3739
3739
|
top: -${k(200)};
|
|
3740
3740
|
left: 0.9375rem;
|
|
3741
|
-
`,
|
|
3741
|
+
`,GO=i.css`
|
|
3742
3742
|
font-size: ${C(200)};
|
|
3743
3743
|
line-height: ${S(400)};
|
|
3744
3744
|
font-weight: 700;
|
|
3745
3745
|
color: ${w("primary",800)};
|
|
3746
|
-
`,
|
|
3746
|
+
`,ZO=n.forwardRef((({name:t,ariaLabel:n,size:o="medium",customSize:s,src:a,srcSet:l,onClick:c,notificationCount:d,disabled:u=!0,customBackgroundColor:h="",labels:p},f)=>{const m=Mf("Avatar",p),g=()=>{u||c?.()},v=(()=>{let e="";return d&&d>0&&(e=`${d>99?"99+":d}`),e})();let b="1rem";d&&d>99?b="1.75rem":d&&d>9&&(b="1.375rem");const y=!!a||!!l,x=c&&!u;return r.jsxs(e.Avatar.Root,{"aria-label":n||t,ref:f,css:UO(o,s,u,h),onClick:g,onKeyDown:e=>{u||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),g())},role:x?"button":"img",tabIndex:x?0:void 0,"aria-disabled":x?u:void 0,children:[y&&r.jsx(e.Avatar.Image,{src:a,srcSet:l,alt:n||t||"Avatar image"}),!y&&t&&r.jsx(e.Avatar.Fallback,{name:t,css:GO}),!y&&!t&&r.jsx(cm,{size:"100%",style:{padding:"15%",color:u?w("neutral",400):void 0}}),v.length>0?r.jsx("div",{css:KO(b),children:r.jsx("div",{css:i.css`
|
|
3747
3747
|
height: ${k(400)};
|
|
3748
3748
|
width: auto;
|
|
3749
3749
|
background-color: ${w("error",500)};
|
|
@@ -3756,16 +3756,16 @@ function FM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3756
3756
|
line-height: ${S(400)};
|
|
3757
3757
|
font-weight: 700;
|
|
3758
3758
|
color: ${w("error",100)};
|
|
3759
|
-
`,children:r.jsx("p",{"aria-label":m.unreadMessagesLabel(d||0),children:v})})}):null]})})),
|
|
3759
|
+
`,children:r.jsx("p",{"aria-label":m.unreadMessagesLabel(d||0),children:v})})}):null]})})),JO=i.css`
|
|
3760
3760
|
display: flex;
|
|
3761
3761
|
justify-content: flex-start;
|
|
3762
3762
|
align-items: center;
|
|
3763
3763
|
gap: ${k(200)};
|
|
3764
|
-
`,
|
|
3764
|
+
`,XO=e=>i.css`
|
|
3765
3765
|
width: ${e||k(400)};
|
|
3766
3766
|
position: relative;
|
|
3767
3767
|
display: flex;
|
|
3768
|
-
`,
|
|
3768
|
+
`,YO=i.css`
|
|
3769
3769
|
height: ${k(100)};
|
|
3770
3770
|
width: ${k(100)};
|
|
3771
3771
|
background-color: ${w("error",500)};
|
|
@@ -3773,7 +3773,7 @@ function FM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3773
3773
|
position: absolute;
|
|
3774
3774
|
top: 0rem;
|
|
3775
3775
|
right: 0rem;
|
|
3776
|
-
`,
|
|
3776
|
+
`,QO=i.css`
|
|
3777
3777
|
height: 0.625rem;
|
|
3778
3778
|
background-color: ${w("error",500)};
|
|
3779
3779
|
padding: 0 0.1875rem 0.0625rem 0.1875rem;
|
|
@@ -3784,12 +3784,12 @@ function FM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3784
3784
|
position: absolute;
|
|
3785
3785
|
top: -${k(50)};
|
|
3786
3786
|
left: 0.5625rem;
|
|
3787
|
-
`,
|
|
3787
|
+
`,eL=i.css`
|
|
3788
3788
|
font-size: ${C(200)};
|
|
3789
3789
|
line-height: ${S(400)};
|
|
3790
3790
|
font-weight: 700;
|
|
3791
3791
|
color: ${w("error",100)};
|
|
3792
|
-
`,
|
|
3792
|
+
`,tL=i.css`
|
|
3793
3793
|
height: ${k(400)};
|
|
3794
3794
|
min-width: ${k(400)};
|
|
3795
3795
|
background-color: ${w("error",500)};
|
|
@@ -3798,44 +3798,44 @@ function FM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3798
3798
|
justify-content: center;
|
|
3799
3799
|
align-items: center;
|
|
3800
3800
|
padding: 0rem ${k(100)} 0.0625rem ${k(100)};
|
|
3801
|
-
`,
|
|
3801
|
+
`,nL=i.css`
|
|
3802
3802
|
font-size: ${C(400)};
|
|
3803
3803
|
line-height: ${S(600)};
|
|
3804
3804
|
font-weight: 700;
|
|
3805
3805
|
color: ${w("error",100)};
|
|
3806
|
-
`,
|
|
3806
|
+
`,rL=e=>{let t="",n="",r="";return"success"===e?(t=w("success",100),n=w("success",500),r=w("success",300)):"warning"===e?(t=w("warning",100),n=w("warning",500),r=w("warning",300)):"error"===e?(t=w("error",100),n=w("error",500),r=w("error",300)):"information"===e?(t=w("secondary",100),n=w("secondary",500),r=w("secondary",200)):"general-grey"===e?(t=w("neutral",200),n=w("neutral",700),r=w("neutral",300)):(t=w("neutral",100),n=w("neutral",700),r=w("neutral",300)),i.css`
|
|
3807
3807
|
display: flex;
|
|
3808
3808
|
color: ${n};
|
|
3809
3809
|
align-items: center;
|
|
3810
3810
|
background-color: ${t};
|
|
3811
3811
|
border-bottom: ${j(100)} solid ${r};
|
|
3812
3812
|
border-radius: 0;
|
|
3813
|
-
`},
|
|
3813
|
+
`},oL=l.forwardRef((({title:t,children:n,icon:o,variant:i,onClose:s,labels:a},c)=>{const d=Mf("AlertBanner",a),[u,h]=l.useState(!0),p="success"===i?r.jsx(_f,{}):"warning"===i?r.jsx(Ff,{}):r.jsx(Df,{});return u?r.jsxs(e.Alert.Root,{css:rL(i),children:[r.jsx(e.Alert.Indicator,{children:o||p}),n?r.jsx(e.Alert.Content,{children:r.jsxs("div",{style:{display:"flex",gap:"0.75rem",alignItems:"center"},children:[r.jsx(e.Alert.Title,{children:t}),r.jsx(e.Alert.Description,{children:n})]})}):r.jsx(e.Alert.Title,{flex:"1",children:t}),r.jsx(e.CloseButton,{"aria-label":d.closeAlertLabel,pos:"absolute",insetEnd:"2",_hover:{bg:"gray.200"},onClick:()=>{h(!1),s?.()}})]}):null})),iL=i.css`
|
|
3814
3814
|
height: ${k(200)};
|
|
3815
3815
|
width: 100%;
|
|
3816
3816
|
background-color: ${w("neutral",300)};
|
|
3817
3817
|
display: flex;
|
|
3818
3818
|
align-items: center;
|
|
3819
3819
|
justify-content: flex-start;
|
|
3820
|
-
`,
|
|
3820
|
+
`,sL=e=>i.css`
|
|
3821
3821
|
height: 100%;
|
|
3822
3822
|
width: ${e}%;
|
|
3823
3823
|
background-color: ${w("primary",500)};
|
|
3824
3824
|
transition: width 0.5s ease-in-out;
|
|
3825
|
-
`,
|
|
3825
|
+
`,aL=i.css`
|
|
3826
3826
|
width: 100%;
|
|
3827
3827
|
display: flex;
|
|
3828
3828
|
align-items: center;
|
|
3829
3829
|
justify-content: space-between;
|
|
3830
3830
|
position: relative;
|
|
3831
|
-
`,
|
|
3831
|
+
`,lL=i.css`
|
|
3832
3832
|
height: 3.75rem;
|
|
3833
3833
|
width: ${k(2e3)};
|
|
3834
3834
|
display: flex;
|
|
3835
3835
|
flex-direction: column;
|
|
3836
3836
|
align-items: center;
|
|
3837
3837
|
justify-content: space-between;
|
|
3838
|
-
`,
|
|
3838
|
+
`,cL=(e,t)=>i.css`
|
|
3839
3839
|
height: ${k(800)};
|
|
3840
3840
|
width: ${k(800)};
|
|
3841
3841
|
display: flex;
|
|
@@ -3871,12 +3871,12 @@ function FM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3871
3871
|
}
|
|
3872
3872
|
|
|
3873
3873
|
${t?`\n background-color: ${w("neutral",300)};\n \n &:hover {\n background-color: ${w("neutral",300)};\n box-shadow: none;\n }\n `:""}
|
|
3874
|
-
`,
|
|
3874
|
+
`,dL=e=>i.css`
|
|
3875
3875
|
color: ${w("neutral",e?800:600)};
|
|
3876
3876
|
font-size: ${C(300)};
|
|
3877
3877
|
line-height: ${S(500)};
|
|
3878
3878
|
font-weight: 400;
|
|
3879
|
-
`,
|
|
3879
|
+
`,uL=i.css`
|
|
3880
3880
|
height: ${j(100)};
|
|
3881
3881
|
width: 100%;
|
|
3882
3882
|
padding: 0 1.875rem;
|
|
@@ -3884,25 +3884,25 @@ function FM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3884
3884
|
top: ${k(400)};
|
|
3885
3885
|
left: 0;
|
|
3886
3886
|
z-index: -1;
|
|
3887
|
-
`,
|
|
3887
|
+
`,hL=i.css`
|
|
3888
3888
|
height: ${j(100)};
|
|
3889
3889
|
width: 100%;
|
|
3890
3890
|
background-color: ${w("neutral",400)};
|
|
3891
|
-
`,
|
|
3891
|
+
`,pL=i.css`
|
|
3892
3892
|
font-size: ${C(500)};
|
|
3893
3893
|
line-height: ${S(700)};
|
|
3894
3894
|
font-weight: 400;
|
|
3895
3895
|
color: ${w("neutral",800)};
|
|
3896
|
-
`,
|
|
3896
|
+
`,fL=i.css`
|
|
3897
3897
|
font-size: ${C(400)};
|
|
3898
3898
|
line-height: ${S(600)};
|
|
3899
3899
|
font-weight: 400;
|
|
3900
3900
|
color: ${w("neutral",700)};
|
|
3901
|
-
`,
|
|
3901
|
+
`,mL=i.css`
|
|
3902
3902
|
padding: 0.375rem;
|
|
3903
|
-
`,
|
|
3903
|
+
`,gL=i.css`
|
|
3904
3904
|
padding: 0.375rem;
|
|
3905
|
-
`,
|
|
3905
|
+
`,vL={pauseOnPageIdle:!0,offsets:"1.5rem"},bL={"top-start":e.createToaster({placement:"top-start",...vL}),top:e.createToaster({placement:"top",...vL}),"top-end":e.createToaster({placement:"top-end",...vL}),"bottom-start":e.createToaster({placement:"bottom-start",...vL}),bottom:e.createToaster({placement:"bottom",...vL}),"bottom-end":e.createToaster({placement:"bottom-end",...vL})};exports.AlertBanner=oL,exports.AnalysisWidget=({children:t,header:o,footer:i,expanded:s=!0,collapsible:a=!0,actions:l,showFooterOnCollapsed:c=!1,labels:d})=>{Mf("AnalysisWidget",d);const u="analysis-widget-item",[h,p]=n.useState(s),f=`analysis-widget-header-${u}`;return r.jsx(e.Box,{as:"section","aria-labelledby":f,css:nC,children:r.jsxs(e.Accordion.Root,{multiple:!0,value:a?void 0:[u],defaultValue:s?[u]:[],children:[r.jsxs(e.Accordion.Item,{css:oC,value:u,children:[o&&r.jsx(e.Accordion.ItemTrigger,{id:f,"aria-expanded":h,css:rC,pointerEvents:a?"auto":"none",onClick:a?()=>{p(!h)}:void 0,children:r.jsxs(e.Flex,{gap:3,flex:"1",overflow:"hidden",alignItems:"top",justifyContent:"space-between",children:[o,l&&l.map((e=>r.jsx(Ef,{variant:"secondary",size:"small",label:e.label,onClick:t=>{e.onClick(),t.preventDefault(),t.stopPropagation()},leftIcon:e?.icon},e.label))),a&&r.jsx(e.Accordion.ItemIndicator,{height:"1rem",marginTop:"0.5rem",display:"flex",children:r.jsx(If,{"aria-hidden":"true",color:"var(--chakra-colors-neutral-700)",height:"1rem",width:"1rem"})})]})}),r.jsxs("div",{className:h?"item-content-open":"item-content-closed","aria-hidden":!h,children:[t,!c&&i&&r.jsx(e.Box,{css:iC,children:i})]})]}),c&&i&&r.jsx(e.Box,{css:iC,children:i})]})})},exports.Avatar=ZO,exports.Badge=({hasNotification:e,notificationCount:t,label:o,labels:i})=>{const s=Mf("Badge",i),[a,l]=n.useState(!1);n.useEffect((()=>{const e=()=>{window.innerWidth<1024?l(!0):l(!1)};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]);const c=(()=>{let e="";return t&&t>0&&(e=`${t>99?"99+":t}`),e})();let d="1rem";return t&&t>99?d="1.75rem":t&&t>9&&(d="1.375rem"),a?r.jsxs("div",{css:JO,role:"status","aria-live":"polite",children:[r.jsxs("div",{css:XO(),children:[r.jsx(Uf,{color:"currentColor",height:"1rem",width:"1rem"}),!e||t||o?null:r.jsx("div",{css:YO,"aria-hidden":!0})]}),o?r.jsx("p",{children:o}):null,c.length>0?r.jsx("div",{css:tL,children:r.jsx("p",{css:nL,"aria-label":s.unreadMessagesLabel(t||0),children:c})}):null]}):r.jsxs("div",{css:JO,role:"status","aria-live":"polite",children:[o?r.jsx("p",{children:o}):null,r.jsxs("div",{css:XO(d),children:[c.length>0?r.jsx("div",{css:QO,children:r.jsx("p",{css:eL,"aria-label":s.unreadMessagesLabel(t||0),children:c})}):null,e&&!t?r.jsx("div",{css:YO,"aria-hidden":!0}):null,r.jsx(Uf,{color:"currentColor",height:"1rem",width:"1rem"})]})]})},exports.BaseMap=({title:e,caption:t,additionalSettings:o,options:s,onOptionSelected:a,maxHeight:l="25rem",maxWidth:c="16.25rem",labels:d})=>{const u=Mf("BaseMap",d),h=n.useRef(null),p=n.useRef(null);return n.useEffect((()=>{const e=h.current,t=p.current;if(!e||!t)return;const n=()=>{e.focus()};if("undefined"!=typeof IntersectionObserver){let e=!1;const r=new IntersectionObserver((([t])=>{t?.isIntersecting?(e||n(),e=!0):e=!1}),{threshold:.01});return r.observe(t),()=>r.disconnect()}const r=window.setTimeout(n,0);return()=>window.clearTimeout(r)}),[]),r.jsx("div",{ref:p,css:db(l,c),children:r.jsxs("div",{className:"ds-base-map-scroll-content",children:[r.jsxs("div",{css:ub,children:[r.jsx("h2",{ref:h,className:"ds-base-map-header-title",tabIndex:-1,children:e}),r.jsx("p",{className:"ds-base-map-header-caption",children:t})]}),r.jsxs("div",{css:hb,children:[o?r.jsx("div",{css:pb,children:o.map((e=>r.jsxs("div",{children:[r.jsx($g,{css:{},checked:e.checked,onCheckedChange:({checked:t})=>e.onCheckedChange({checked:Boolean(t)}),children:e.label}),e.checked&&e.children?r.jsx("div",{css:fb,children:e.children}):null]},e.label)))}):null,s?r.jsx("div",{css:mb,children:s.map((e=>{return r.jsxs("div",{css:gb(e.active),role:"button","aria-label":`${e.label}${e.caption?`, ${e.caption}`:""}`,onClick:()=>a?.(e),tabIndex:0,onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),a?.(e))},children:[r.jsx("div",{css:(t=e.imageUrl,i.css`
|
|
3906
3906
|
height: ${k(800)};
|
|
3907
3907
|
width: ${k(800)};
|
|
3908
3908
|
border: ${j(100)} solid ${w("neutral",300)};
|
|
@@ -3910,23 +3910,23 @@ function FM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3910
3910
|
background-image: url(${t});
|
|
3911
3911
|
background-size: cover;
|
|
3912
3912
|
background-position: center;
|
|
3913
|
-
`)}),r.jsxs("div",{css:
|
|
3913
|
+
`)}),r.jsxs("div",{css:vb,children:[r.jsxs("div",{className:"ds-base-map-title-container",children:[r.jsx("p",{className:"ds-base-map-title",children:e.label}),e.active?r.jsx(Iv,{label:u.activeLabel,variant:"warning",size:"small",icon:r.jsx(Rf,{})}):null]}),r.jsx("p",{className:"ds-base-map-caption",children:e.caption}),e.active&&e.children?r.jsx("div",{className:"ds-base-map-children",children:e.children}):null]})]},e.label);var t}))}):null]})]})})},exports.Breadcrumb=({links:t,separator:o,maxItems:i=99,linkRouter:s,size:a="default"})=>{const[l,c]=n.useState(t.length>i);n.useEffect((()=>{c(t.length>i)}),[t.length]);const d=s;return r.jsx(e.Breadcrumb.Root,{children:r.jsx(e.Breadcrumb.List,{gap:"small"===a?"0.375rem":"0.625rem",children:l?r.jsxs(r.Fragment,{children:[r.jsx(e.Breadcrumb.Item,{css:GT(a),children:r.jsxs(d,{to:t[0].link,href:t[0].link,children:[t[0].icon,t[0].label]})}),r.jsx(e.Breadcrumb.Separator,{css:ZT(a),children:o||r.jsx(If,{rotate:"270"})}),r.jsx("li",{className:"chakra-breadcrumb__item",children:r.jsx("button",{css:JT,type:"button",onClick:()=>c(!1),children:"..."})}),r.jsx(e.Breadcrumb.Separator,{css:ZT(a),children:o||r.jsx(If,{rotate:"270"})}),r.jsx(e.Breadcrumb.Item,{css:GT(a),children:r.jsxs("p",{"aria-current":"page","aria-label":t[t.length-1].label,children:[t[t.length-1].icon,t[t.length-1].label]})})]}):t.map(((i,s)=>i?.label?r.jsxs(n.Fragment,{children:[r.jsx(e.Breadcrumb.Item,{css:GT(a),children:s<t.length-1?r.jsxs(d,{to:i.link,href:i.link,children:[i.icon,i.label]}):r.jsxs("p",{"aria-current":"page","aria-label":i.label,children:[i.label&&i.icon?i.icon:"",i.label]})}),s<t.length-1?r.jsx(e.Breadcrumb.Separator,{css:ZT(a),children:o||r.jsx(If,{rotate:"270"})}):null]},i.label):null))})})},exports.Button=Ef,exports.Checkbox=$g,exports.CheckboxList=({label:t,caption:o,checkboxes:s,defaultValues:a,onCheckedChange:l,errorMessage:c,horizontal:d,required:u,hideCheckedCounter:h=!1,hideExpandToggle:p=!1,labels:f})=>{const m=Mf("CheckboxList",f),g=Array.isArray(a)?a:[],v=n.useMemo((()=>new Set(g)),[g]),[b,y]=n.useState((()=>s.filter((e=>e.name)).reduce(((e,t)=>{const n=t.name;return e[n]="boolean"==typeof t.checked?t.checked:v.has(n),e}),{}))),[x,w]=n.useState(!0);n.useEffect((()=>{y((e=>{const t=s.filter((e=>e.name)).reduce(((t,n)=>{const r=n.name;return t[r]="boolean"==typeof n.checked?n.checked:e[r]??v.has(r),t}),{});return Object.keys(e).length===Object.keys(t).length&&Object.entries(t).every((([t,n])=>e[t]===n))?e:t}))}),[s,v]);const C="string"!=typeof t,k=s.filter((e=>e.name)).reduce(((e,t)=>{const n=t.name;return e[n]="boolean"==typeof t.checked?t.checked:!!b[n],e}),{}),S=s.length>0&&s.every((e=>e.name&&k[e.name])),$=s.some((e=>e.name&&k[e.name]))&&!S,j=s.length,M=`${s.filter((e=>e?.name&&k[e.name])).length} / ${j}`,E=o?`${o}.`:"",T=u?m.requiredLabel:m.optionalLabel,O=c?`${m.errorPrefix} ${c}.`:"",L=`${C?t.label:t}. ${E} ${T} ${O} `;return r.jsxs(e.Group,{css:ev,"aria-label":L,children:[c?r.jsx("div",{css:ov}):null,r.jsxs("div",{css:(A=!!c,i.css`
|
|
3914
3914
|
margin-left: ${A?"1.1875rem":"0"};
|
|
3915
3915
|
width: 100%;
|
|
3916
|
-
`),children:[r.jsx("div",{css:
|
|
3916
|
+
`),children:[r.jsx("div",{css:tv,children:"string"==typeof t?r.jsxs(r.Fragment,{children:[u&&r.jsx("span",{id:"required-symbol","aria-label":m.requiredSymbolLabel,children:"*"}),t]}):r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%"},children:[r.jsxs($g,{checked:S,indeterminate:$,onCheckedChange:e=>(e=>{const t=s.filter((e=>void 0!==e.name)).reduce(((t,n)=>(t[n.name]=e,t)),{});y(t),l?.(t)})(!!e.checked),children:[t.label," ",!h&&r.jsx("span",{"aria-hidden":"true",css:sv,children:M})]}),!p&&r.jsxs("button",{type:"button",onClick:()=>w((e=>!e)),"aria-expanded":x,"aria-controls":"checkbox-list",css:av,children:[x?m.hideLabel:m.expandLabel,r.jsx("span",{"aria-hidden":"true",children:x?r.jsx(If,{style:{transform:"rotate(180deg)"}}):r.jsx(If,{})})]})]})}),r.jsx("p",{css:nv,"aria-label":o,children:o}),c?r.jsx("p",{css:iv,"aria-label":c,children:c}):null,r.jsx("div",{id:"checkbox-list",css:rv(d,x),children:s.map((e=>{const{onCheckedChange:t,...n}=e;return r.jsx($g,{ms:C&&!d?"6":"",css:{},checked:!!e?.name&&!!k[e.name],onCheckedChange:({checked:n})=>{((e,t)=>{const n={...b};t&&(n[t]=e,y(n)),l&&l(n)})(n,e.name),t?.({checked:!!n})},...n},e.name)}))})]})]});var A},exports.CheckboxOptionCard=({defaultValue:t,items:n,onValueChange:o})=>r.jsx(e.CheckboxGroup,{defaultValue:t,onValueChange:o,children:r.jsx(e.HStack,{alignItems:"flex-start",flexWrap:"wrap",gap:"0.75rem",children:n.map((n=>{return r.jsxs(e.CheckboxCard.Root,{css:jg,defaultChecked:-1!==t?.indexOf(n.value),disabled:n.disabled,value:n.value,children:[r.jsx(e.CheckboxCard.HiddenInput,{}),r.jsxs(e.CheckboxCard.Control,{css:Mg,children:[r.jsxs(e.CheckboxCard.Content,{css:(s=n.variant,i.css`
|
|
3917
3917
|
width: 100%;
|
|
3918
3918
|
display: flex;
|
|
3919
3919
|
flex-direction: ${"centered"===s?"column":"row"};
|
|
3920
3920
|
align-items: center;
|
|
3921
3921
|
gap: ${k(300)};
|
|
3922
|
-
`),children:[r.jsx("div",{css:
|
|
3922
|
+
`),children:[r.jsx("div",{css:Eg,children:n.icon}),r.jsxs("div",{style:{width:"100%"},children:[r.jsx(e.CheckboxCard.Label,{css:Tg(n.variant,n.disabled),children:n.label}),n.caption?r.jsx(e.CheckboxCard.Description,{css:Og(n.variant,n.disabled),children:n.caption}):null]})]}),r.jsx(e.CheckboxCard.Indicator,{css:Lg(n.variant)})]}),n.children&&"expanded"===n.variant?r.jsx(e.CheckboxCard.Addon,{css:(o=n.disabled,i.css`
|
|
3923
3923
|
width: 100%;
|
|
3924
3924
|
border-color: ${w("neutral",300)};
|
|
3925
3925
|
margin-top: ${k(300)};
|
|
3926
3926
|
padding: 0;
|
|
3927
3927
|
padding-top: ${k(200)};
|
|
3928
3928
|
color: ${o?w("neutral",500):"inherit"};
|
|
3929
|
-
`),children:n.children}):null]},`${n.label}-${n.value}`);var o,s}))})}),exports.CloseButton=sg,exports.ClusterPoint=({onClick:e,triggerRef:n,showFocusState:r,count:o,mode:i,variant:s="cluster"})=>t.jsx(vb,{count:o,mode:i,onClick:e,ref:n,showFocusState:r,variant:s}),exports.Combobox=({label:t,required:o,caption:i,errorMessage:s,size:a,disabled:l,showOptionalLabel:c=!0,placeholder:d,labels:u,noMarginBottom:h,initialItems:p=[],multiple:f=!1,showSelectedItems:m=!1})=>{const[g,v]=n.useState([]),b=Mf("Combobox",u),{contains:y}=e.useFilter({sensitivity:"base"}),{collection:x,filter:w}=e.useListCollection({initialItems:p,filter:y});return r.jsxs("div",{css:Um(a,h),className:"ds-text-input-container",children:[s?r.jsx("div",{css:Km}):null,r.jsxs(e.Field.Root,{required:o,invalid:!!s,gap:"0",style:{marginLeft:s?"1.1875rem":"0px"},children:[t?r.jsxs(e.Field.Label,{css:Gm(a,l),"aria-label":t,children:[r.jsx(e.Field.RequiredIndicator,{"aria-label":b.requiredSymbolLabel}),t,!o&&c?r.jsx("span",{children:b.optionalSuffix}):null]}):null,i?r.jsx(e.Field.HelperText,{css:Zm(a,l),"aria-label":i,children:i}):null,s?r.jsx(e.Field.ErrorText,{css:Jm(a),"aria-label":s,children:s}):null,r.jsxs(e.Combobox.Root,{multiple:f,onValueChange:e=>{v(e.items.map((e=>({label:e.label,value:e.value}))))},value:g.map((e=>e.value)),collection:x,onInputValueChange:e=>w(e.inputValue),width:"20rem",size:"small"===a?"sm":"md",children:[r.jsxs(e.Combobox.Control,{children:[r.jsx(e.Combobox.Input,{placeholder:d,css:Xm(a),disabled:l,"aria-label":t||d||b.defaultInputAriaLabel}),r.jsxs(e.Combobox.IndicatorGroup,{children:[r.jsx(e.Combobox.ClearTrigger,{"aria-label":b.clearSelectionLabel}),r.jsx(e.Combobox.Trigger,{"aria-label":b.toggleOptionsLabel})]})]}),r.jsx(e.Portal,{children:r.jsx(e.Combobox.Positioner,{children:r.jsxs(e.Combobox.Content,{children:[r.jsx(e.Combobox.Empty,{children:b.noItemsFoundLabel}),x.items.map((t=>r.jsxs(e.Combobox.Item,{item:t,children:[t.label,r.jsx(e.Combobox.ItemIndicator,{})]},t.value)))]})})}),r.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",gap:"0.25rem",paddingTop:"0.5rem"},children:m&&g.map((e=>r.jsx(Nv,{label:e.label,variant:"info-white",onClose:()=>v((t=>t.filter((t=>t.value!==e.value)))),closable:!0},e.value)))})]})]})]})},exports.DesignSystemLocaleProvider=({labels:e,children:r})=>{const o=n.useMemo((()=>({labels:e})),[e]);return t.jsx(M.Provider,{value:o,children:r})},exports.ExtendableCard=({children:t,header:n,footer:o})=>r.jsx(e.Box,{css:Yw,children:r.jsx(e.Accordion.Root,{multiple:!0,children:r.jsxs(e.Accordion.Item,{value:"extendable-card-item",children:[r.jsxs(e.Accordion.ItemTrigger,{css:Qw,alignItems:"center",children:[r.jsx(e.Flex,{gap:3,flex:"1",overflow:"hidden",alignItems:"center",children:n}),r.jsx(e.Accordion.ItemIndicator,{children:r.jsx(If,{color:"var(--chakra-colors-neutral-700)",height:"1rem",width:"1rem"})})]}),r.jsxs(e.Accordion.ItemContent,{children:[t,o]})]})})}),exports.Footer=({children:e,label:t="© World Resources Institute",fixed:n,filled:o,maxWidth:i,additionalLogos:s})=>{const a=(new Date).getFullYear();return r.jsx("footer",{css:ZT(n,o),children:r.jsxs("div",{css:JT(i),children:[r.jsxs("div",{css:QT,children:[r.jsx(Wf,{height:"2rem",width:"5.6875rem"}),s&&s.map(((e,t)=>r.jsx("div",{children:e},t)))]}),r.jsx("div",{css:XT,children:e}),r.jsx("div",{children:r.jsxs("p",{css:YT,children:[t," ",a]})})]})})},exports.FormContainer=({label:e,error:t,children:o})=>{const i=n.useId(),s=e?`${i}-label`:void 0,a=t?`${i}-error`:void 0;return r.jsxs("div",{css:bg,role:"group","aria-labelledby":s,"aria-describedby":a,children:[t?r.jsx("div",{css:xg}):null,r.jsxs("div",{children:[e?r.jsx("p",{id:s,css:yg,children:e}):null,t?r.jsx("p",{id:a,css:wg,children:t}):null,o]})]})},exports.IconButton=Of,exports.InlineMessage=RT,exports.InputWithUnits=({label:t,caption:o,errorMessage:i,units:s,unitsPosition:a="end",defaultUnit:l="",defaultValue:c="",onChange:d,required:u,disabled:h})=>{const[p,f]=n.useState(c),[m,g]=n.useState(l?[l]:[s[0].value]),v=(e,t)=>{d&&d("end"===a?""+(t?`${p} ${e}`:`${e} ${m}`):""+(t?`${e} ${p}`:`${m} ${e}`))};return r.jsxs("div",{css:sv,children:[i?r.jsx("div",{css:cv}):null,r.jsxs("div",{style:{marginLeft:i?"1.1875rem":"0px"},children:[r.jsxs("p",{css:av(h),"aria-label":t,children:[u?r.jsx("span",{children:"*"}):null,t]}),r.jsx("p",{css:lv(h),"aria-label":o,children:o}),i?r.jsx("p",{css:dv,"aria-label":i,children:i}):null,r.jsxs(e.Group,{css:uv(!!i,a),attached:!0,children:["start"===a?r.jsx(Pv,{placeholder:"","aria-label":`${t} unit`,value:m,items:s,disabled:h,onChange:e=>{g(e),v(e?.[0],!0)}}):null,r.jsx(Ym,{type:"number","aria-label":`${t} value`,value:p,disabled:h,onChange:e=>{f(e.target.value),v(e.target.value)}}),"end"===a?r.jsx(Pv,{placeholder:"","aria-label":`${t} unit`,value:m,items:s,disabled:h,onChange:e=>{g(e),v(e?.[0],!0)}}):null]})]})]})},exports.ItemCount=ww,exports.LayerGroup=({label:t,caption:o,value:i,layerItems:s,onChangeForRadioVariant:a,labels:l})=>{const c=Mf("LayerGroup",l),[d,u]=n.useState({}),[h]=n.useState((e=>{const t=e.find((e=>"radio"===e.variant&&e.isDefaultSelected));return t?.name})(s));n.useEffect((()=>{let e={...d};s.forEach((n=>{n.isDefaultSelected&&(e={...e,["radio"===n.variant?t:n.name]:n.isDefaultSelected})})),u(e)}),[]);const p=(e,t,n,r)=>{const o={...d,[e]:t};u(o),n&&n(e,t,r)},f=Object.values(d).filter((e=>!0===e)).length,m=c.groupAriaLabel(t,f,o);return r.jsxs(e.Accordion.Item,{value:i,width:"100%",children:[r.jsxs(e.Accordion.ItemTrigger,{css:Nx,alignItems:"flex-start","aria-label":m,children:[r.jsxs(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:[r.jsxs("span",{css:Dx,children:[t,r.jsx(Nv,{label:c.activeTagLabel(f),size:"small",variant:f>0?"success":"info-grey"})]}),r.jsx("div",{css:Ix,children:o})]}),r.jsx(e.Accordion.ItemIndicator,{display:"flex",children:r.jsx(If,{color:"var(--chakra-colors-neutral-700)",height:"1rem",width:"1rem"})})]}),r.jsx(e.Accordion.ItemContent,{paddingLeft:"1rem",paddingRight:"1rem",children:r.jsx(Bg,{name:t,value:h,customGap:"0",onChange:(e,t)=>p(e,!!t,a,t),children:s.map((e=>r.jsx(_x,{...e,onChange:(t,n)=>p(t,n,e.onChange)},e.label)))})})]})},exports.LayerGroupContainer=({children:t,defaultValue:n,...o})=>r.jsx("div",{css:Rx,style:{width:"100%"},children:r.jsx(e.Accordion.Root,{css:{},defaultValue:n,multiple:!0,...o,children:t})}),exports.LayerItem=_x,exports.LayerParameters=({label:t,children:o,openedByDefault:i})=>r.jsx("div",{children:r.jsx(e.Accordion.Root,{defaultValue:i?[t]:[],multiple:!0,children:r.jsxs(e.Accordion.Item,{css:Fx,value:t,children:[r.jsxs(e.Accordion.ItemTrigger,{css:qx,children:[r.jsx(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:r.jsx("p",{css:Wx,children:t})}),r.jsx(e.Accordion.ItemIndicator,{display:"flex",children:r.jsx(If,{color:"var(--chakra-colors-neutral-700)",height:"1rem",width:"1rem"})})]}),r.jsx(e.Accordion.ItemContent,{css:Ux,children:n.Children.map(o,(e=>r.jsx("div",{className:"ds-layer-parameters-item-child",children:e})))})]})})}),exports.LegendItem=({layerName:e,dataUnit:t,onDrag:n,onUpClick:o,onDownClick:i,onRemoveClick:s,children:a,onInfoClick:l,onOpacityChanged:c,labels:d})=>{const u=Mf("LegendItem",d);return r.jsxs("div",{css:Kx,children:[r.jsx("div",{css:Gx,children:r.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"0.75rem"},children:[r.jsx(Of,{icon:r.jsx(If,{rotate:"180"}),"aria-label":u.upLabel,onClick:o}),r.jsx(Of,{icon:r.jsx(If,{}),"aria-label":u.downLabel,onClick:i})]})}),r.jsxs("div",{style:{width:"100%"},children:[r.jsxs("div",{css:Zx,children:[r.jsxs("div",{children:[r.jsx("h3",{css:Jx,children:e}),r.jsx("p",{css:Xx,children:t})]}),r.jsx(Ef,{label:u.removeLabel,size:"small",variant:"secondary",rightIcon:r.jsx(zf,{}),onClick:s})]}),a,r.jsxs("div",{css:Yx,children:[r.jsx(Ef,{label:u.aboutDataLabel,size:"small",variant:"secondary",leftIcon:r.jsx(Df,{}),onClick:l}),r.jsx(rw,{defaultValue:80,onOpacityChanged:c})]})]})]})},exports.List=Ow,exports.MapControlsToolbar=({onZoomInClick:e,onZoomOutClick:n,onExpandClick:r,onShareClick:o,onPrintClick:i,onSettingsClick:s,onQuestionClick:a,vertical:l,expanded:c,showExpandedToggle:d,ariaLabel:u,labels:h})=>{const p=Mf("MapControlsToolbar",h),f=[{icon:t.jsx(Kf,{}),label:p.zoomInLabel,ariaLabel:p.zoomInAriaLabel,onClick:e},{icon:t.jsx(Gf,{}),label:p.zoomOutLabel,ariaLabel:p.zoomOutAriaLabel,onClick:n,gap:!0},{icon:t.jsx(Zf,{}),label:p.expandLabel,ariaLabel:p.expandAriaLabel,onClick:r,gap:!0},{icon:t.jsx(Jf,{}),label:p.shareLabel,ariaLabel:p.shareAriaLabel,onClick:o,gap:!0},{icon:t.jsx(Xf,{}),label:p.printLabel,ariaLabel:p.printAriaLabel,onClick:i,gap:!0},{icon:t.jsx(Yf,{}),label:p.settingsLabel,ariaLabel:p.settingsAriaLabel,onClick:s,gap:!0},{icon:t.jsx(Qf,{}),label:p.helpLabel,ariaLabel:p.helpAriaLabel,onClick:a}];return t.jsx(ug,{items:f,vertical:l,expanded:c,showExpandedToggle:d,ariaLabel:u||p.toolbarAriaLabel})},exports.MapMarker=vb,exports.MapMarkers=bb,exports.MapPopUp=({open:e,onOpenChange:t,anchorRef:o,header:i,content:s,footer:a,placement:c="bottom",offset:d=30,closeOnEscape:u=!0,closeOnOutsideClick:h=!1,labels:p})=>{const f=Mf("MapPopUp",p),m=n.useRef(null),{refs:g,floatingStyles:v,context:b,middlewareData:y,placement:x}=Sx({open:e,onOpenChange:t,placement:c,whileElementsMounted:Uy,middleware:[ox(d),(w={fallbackAxisSideDirection:"start"},{...Zy(w),options:[w,C]}),ix({padding:8}),sx({element:m})]});var w,C;n.useEffect((()=>{o?.current&&g.setReference(o.current)}),[o,g]);const k=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:s=!0,escapeKey:a=!0,outsidePress:c=!0,outsidePressEvent:d="pointerdown",referencePress:u=!1,referencePressEvent:h="pointerdown",ancestorScroll:p=!1,bubbles:f,capture:m}=t,g=yx(),v=$y("function"==typeof c?c:()=>!1),b="function"==typeof c?v:c,y=l.useRef(!1),{escapeKey:x,outsidePress:w}=Cx(f),{escapeKey:C,outsidePress:k}=Cx(m),S=l.useRef(!1),$=$y((e=>{var t;if(!n||!s||!a||"Escape"!==e.key)return;if(S.current)return;const o=null==(t=i.current.floatingContext)?void 0:t.nodeId,l=g?Cy(g.nodesRef.current,o):[];if(!x&&(e.stopPropagation(),l.length>0)){let e=!0;if(l.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__escapeKeyBubbles||(e=!1)})),!e)return}r(!1,function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e,"escape-key")})),j=$y((e=>{var t;const n=()=>{var t;$(e),null==(t=yy(e))||t.removeEventListener("keydown",n)};null==(t=yy(e))||t.addEventListener("keydown",n)})),M=$y((e=>{var t;const n=i.current.insideReactTree;i.current.insideReactTree=!1;const s=y.current;if(y.current=!1,"click"===d&&s)return;if(n)return;if("function"==typeof b&&!b(e))return;const a=yy(e),l="[data-floating-ui-inert]",c=wy(o.floating).querySelectorAll(l);let u=Sb(a)?a:null;for(;u&&!Vb(u);){const e=_b(u);if(Vb(e)||!Sb(e))break;u=e}if(c.length&&Sb(a)&&!a.matches("html,body")&&!by(a,o.floating)&&Array.from(c).every((e=>!by(u,e))))return;if($b(a)&&O){const t=Vb(a),n=Bb(a),r=/auto|scroll/,o=t||r.test(n.overflowX),i=t||r.test(n.overflowY),s=o&&a.clientWidth>0&&a.scrollWidth>a.clientWidth,l=i&&a.clientHeight>0&&a.scrollHeight>a.clientHeight,c="rtl"===n.direction,d=l&&(c?e.offsetX<=a.offsetWidth-a.clientWidth:e.offsetX>a.clientWidth),u=s&&e.offsetY>a.clientHeight;if(d||u)return}const h=null==(t=i.current.floatingContext)?void 0:t.nodeId,p=g&&Cy(g.nodesRef.current,h).some((t=>{var n;return xy(e,null==(n=t.context)?void 0:n.elements.floating)}));if(xy(e,o.floating)||xy(e,o.domReference)||p)return;const f=g?Cy(g.nodesRef.current,h):[];if(f.length>0){let e=!0;if(f.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)})),!e)return}r(!1,e,"outside-press")})),E=$y((e=>{var t;const n=()=>{var t;M(e),null==(t=yy(e))||t.removeEventListener(d,n)};null==(t=yy(e))||t.addEventListener(d,n)}));l.useEffect((()=>{if(!n||!s)return;i.current.__escapeKeyBubbles=x,i.current.__outsidePressBubbles=w;let e=-1;function t(e){r(!1,e,"ancestor-scroll")}function l(){window.clearTimeout(e),S.current=!0}function c(){e=window.setTimeout((()=>{S.current=!1}),Pb()?5:0)}const u=wy(o.floating);a&&(u.addEventListener("keydown",C?j:$,C),u.addEventListener("compositionstart",l),u.addEventListener("compositionend",c)),b&&u.addEventListener(d,k?E:M,k);let h=[];return p&&(Sb(o.domReference)&&(h=qb(o.domReference)),Sb(o.floating)&&(h=h.concat(qb(o.floating))),!Sb(o.reference)&&o.reference&&o.reference.contextElement&&(h=h.concat(qb(o.reference.contextElement)))),h=h.filter((e=>{var t;return e!==(null==(t=u.defaultView)?void 0:t.visualViewport)})),h.forEach((e=>{e.addEventListener("scroll",t,{passive:!0})})),()=>{a&&(u.removeEventListener("keydown",C?j:$,C),u.removeEventListener("compositionstart",l),u.removeEventListener("compositionend",c)),b&&u.removeEventListener(d,k?E:M,k),h.forEach((e=>{e.removeEventListener("scroll",t)})),window.clearTimeout(e)}}),[i,o,a,b,d,n,r,p,s,x,w,$,C,j,M,k,E]),l.useEffect((()=>{i.current.insideReactTree=!1}),[i,b,d]);const T=l.useMemo((()=>({onKeyDown:$,...u&&{[xx[h]]:e=>{r(!1,e.nativeEvent,"reference-press")},..."click"!==h&&{onClick(e){r(!1,e.nativeEvent,"reference-press")}}}})),[$,r,u,h]),O=l.useMemo((()=>({onKeyDown:$,onMouseDown(){y.current=!0},onMouseUp(){y.current=!0},[wx[d]]:()=>{i.current.insideReactTree=!0}})),[$,d,i]);return l.useMemo((()=>s?{reference:T,floating:O}:{}),[s,T,O])}(b,{escapeKey:u,outsidePress:h}),S=Mx(b,{role:"dialog"}),{getFloatingProps:$}=function(e){void 0===e&&(e=[]);const t=e.map((e=>null==e?void 0:e.reference)),n=e.map((e=>null==e?void 0:e.floating)),r=e.map((e=>null==e?void 0:e.item)),o=l.useCallback((t=>$x(t,e,"reference")),t),i=l.useCallback((t=>$x(t,e,"floating")),n),s=l.useCallback((t=>$x(t,e,"item")),r);return l.useMemo((()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s})),[o,i,s])}([k,S]),{x:j,y:M}=y.arrow??{x:null,y:null},E={top:"bottom",right:"left",bottom:"top",left:"right"}[x.split("-")[0]];if(!e)return null;let T=d-1,O=4;return"left"!==E&&"right"!==E||(T=4,O=d-1),r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:g.setFloating,style:v,"aria-label":f.dialogAriaLabel,"aria-modal":!0,...$(),css:Ex,children:[r.jsxs("div",{css:Tx,children:[i,r.jsx(sg,{onClick:()=>t(!1),className:"ds-map-pop-up-close-button","aria-label":f.closeLabel})]}),r.jsx("div",{css:Ox,children:s}),a?r.jsx("div",{css:Lx,children:a}):null,r.jsx("div",{ref:m,css:Ax(T,O,j,M,E,d)})]}),r.jsx("div",{className:"fixed inset-0 z-[999] bg-black/20 backdrop-blur-[1px]",onClick:()=>h&&t(!1)})]})},exports.Menu=jm,exports.MobileSearch=({value:t,placeholder:o,showInfoMessage:i=!0,items:s=[],disabled:a,readOnly:l,id:c,name:d,autoFocus:u,autoComplete:h,onBlur:p,onFocus:f,onQueryChange:m,onCancel:g,onItemClick:v,onChange:b,labels:y})=>{const x=Mf("MobileSearch",y),[C,k]=n.useState(t??""),[S,$]=n.useState(!0),[j,M]=n.useState(!1),E=n.useRef(null),T="string"==typeof t,O=T?t:C;n.useEffect((()=>{T&&k(t)}),[T,t]),n.useEffect((()=>{m?.(O)}),[O,m]);const L=n.useMemo((()=>{const e=O.trim().toLowerCase();return e?s.filter((t=>`${t.id??""} ${t.label} ${t.caption??""}`.toLowerCase().includes(e))):s}),[s,O]),A=O.trim().length?x.matchingResultsTitle(L.length):x.recentSearchesTitle,R=O.length?r.jsx(sg,{onClick:()=>{T||k("");const e=E.current?.querySelector("input");e&&(e.value="",e.focus()),$(!0)}}):null;let N=w("neutral",500);return a?N=w("neutral",500):j&&(N=w("primary",700)),r.jsxs("div",{ref:E,css:NT,children:[r.jsxs("div",{css:DT,children:[r.jsx("div",{css:IT,children:r.jsx(e.InputGroup,{startElement:r.jsx(hm,{width:"1.25rem",height:"1.25rem",fill:N,"aria-hidden":"true"}),endElement:R,children:r.jsx(Ym,{label:"",value:O,placeholder:o??x.inputAriaLabel,onChange:e=>{T||k(e.target.value),$(!0),b?.(e)},onFocus:e=>{M(!0),$(!0),f?.(e)},onBlur:e=>{M(!1),p?.(e)},noMarginBottom:!0,type:"search","aria-label":o??x.inputAriaLabel,disabled:a,readOnly:l,id:c,name:d,autoFocus:u??!0,autoComplete:h,style:{paddingLeft:"2.5rem"}})})}),r.jsx(Ef,{css:PT,variant:"borderless",label:x.cancelLabel,onClick:()=>{T||k(""),$(!1);const e=E.current?.querySelector("input");e&&(e.value="",e.blur()),g?.()}})]}),S?r.jsxs("div",{css:zT,children:[r.jsx("h3",{css:VT,children:A}),i?r.jsx("div",{css:BT,children:r.jsx(RT,{label:x.infoLabel,variant:"info-white",size:"full-width"})}):null,r.jsx("ul",{css:HT,"aria-label":A,children:L.map((t=>r.jsx("li",{children:r.jsxs(e.chakra.button,{type:"button",css:_T,onClick:()=>(e=>{v?.(e)})(t),"aria-label":`${t.label}, ${t.caption??""}`,style:{width:"100%"},children:[t.icon??null,r.jsxs("div",{css:FT,children:[r.jsx("p",{css:qT,children:t.label}),r.jsx("p",{css:WT,children:t.caption})]})]})},t.id)))})]}):null]})},exports.MobileTabBar=({defaultValue:t,tabs:o,onTabClick:i,hideLabels:s,activationMode:a="manual",labels:l})=>{const c=Mf("MobileTabBar",l),d=o.length,[u,h]=n.useState((()=>oO(o,t)));return r.jsx("div",{css:eO,children:r.jsx(e.Tabs.Root,{width:"full",defaultValue:t||o?.[0]?.value,onValueChange:({value:e})=>(e=>{const t=oO(o,e);h(t),i&&i(e)})(e),activationMode:a,children:r.jsx(e.Tabs.List,{alignItems:"center",border:"none",children:o.map(((t,n)=>{const{label:o,icon:i,bagdeCount:a,"aria-label":l,"aria-describedby":h,disabled:p,...f}=t,m=`${t.value}-str-status`,g=u===n,v=[c.tabPositionStatus(n+1,d),g?c.selectedStatus:c.notSelectedStatus];p&&v.push(c.disabledStatus);const b=[h,m].filter(Boolean).join(" ")||void 0;return r.jsxs(e.Tabs.Trigger,{css:tO,"aria-label":l||o,"aria-disabled":!!p||void 0,"aria-describedby":b,disabled:p,...f,children:[r.jsxs("div",{css:nO,children:[i,a?r.jsx("div",{css:rO,className:"ds-badge-count",children:a}):null]}),s?null:r.jsx("p",{children:o}),r.jsx(e.VisuallyHidden,{id:m,children:v.join(", ")})]},t.value)}))})})})},exports.Modal=({header:t,content:o,footer:i,size:s="medium",width:a,height:l,maxHeight:c,draggable:d,blocking:u,open:h,onClose:p,labels:f,lazyMount:m,unmountOnExit:g,restoreFocus:v,modal:b,initialFocusEl:y,finalFocusEl:x})=>{const w=Mf("Modal",f),C=n.useRef(null);return h?r.jsx(e.Dialog.Root,{open:h,onOpenChange:p,placement:"center",scrollBehavior:"inside",closeOnInteractOutside:!d&&!u,preventScroll:!d&&!u,closeOnEscape:!u,defaultOpen:!0,lazyMount:m,unmountOnExit:g,restoreFocus:v,modal:b,initialFocusEl:y,finalFocusEl:x,children:r.jsxs(e.Portal,{children:[d?null:r.jsx(e.Dialog.Backdrop,{css:{background:"rgba(0, 0, 0, 0.64)"}}),r.jsx(YC,{disabled:!d,nodeRef:C,children:r.jsx(e.Dialog.Positioner,{ref:C,children:r.jsxs(e.Dialog.Content,{"aria-label":w.dialogAriaLabel,css:QC(s,a,l,c),children:[r.jsxs(e.Dialog.Header,{css:ek,children:[t,u?null:r.jsx(e.Dialog.CloseTrigger,{css:tk,asChild:!0,children:r.jsx(sg,{})})]}),r.jsx(e.Dialog.Body,{css:nk,children:o}),i?r.jsx(e.Dialog.Footer,{padding:"0.75rem",children:i}):null]})})})]})}):null},exports.MultiActionButton=({variant:t="primary",size:o="default",mainActionLabel:i,mainActionOnClick:s=()=>{},otherActions:a=[],disabled:l,mainActionLeftIcon:c,mainActionRightIcon:d,...u})=>{const[h,p]=n.useState(!1),f=l?`${i} action button with menu, disabled`:void 0;return r.jsxs(e.Group,{css:mg,attached:!0,tabIndex:l?0:void 0,"aria-disabled":l,"aria-label":f,role:"group",children:[r.jsx(Ef,{css:{},label:i,variant:t,size:o,onClick:s,disabled:l,leftIcon:c,rightIcon:d,...u}),r.jsxs(e.Menu.Root,{onOpenChange:({open:e})=>p(e),positioning:{placement:"bottom-end"},children:[r.jsx(e.Menu.Trigger,{css:pg(t),"data-group-item":!0,"data-last":!0,asChild:!0,children:r.jsx(Ef,{style:gg,"aria-label":`Open ${i} options`,"aria-haspopup":"menu","aria-expanded":h,variant:t,size:o,leftIcon:r.jsx(If,{"aria-hidden":"true",rotate:h?"180":"0",color:w("accessible","text-on-primary-mids")||w("primary",900)}),disabled:l})}),r.jsx(vg,{children:a.map((({label:t,value:n,onClick:i})=>r.jsx(e.Menu.Item,{css:fg(o),onClick:i,value:n,children:t},n)))})]})]})},exports.Navbar=({variant:e="default",theme:t="light",logo:o,linkRouter:i,pathname:s,navigationSection:a,utilitySection:l,actionsSection:c,maxWidth:d,fixed:u,onNavbarHeightChange:h,backgroundColor:p,labels:f})=>{const m=Mf("Navbar",f),g=n.useRef(null),v=n.useRef(null),b=n.useRef(null),[y,x]=n.useState(!1),[w,C]=n.useState(-1),[k,S]=n.useState("undefined"!=typeof window&&window?.innerWidth<=MO),[$,j]=n.useState(!1),M=i,E=n.useCallback((()=>{if(v.current&&g.current&&b.current){const e=g.current.getBoundingClientRect(),t=v.current.getBoundingClientRect(),n=b.current.getBoundingClientRect();t.width,e.width,window.innerWidth<=MO||window.innerWidth<=w?(h?.(96),x(!0)):window.innerWidth>MO&&window.innerWidth<=1440?e.right>=t.left?(h?.(96),x(!0),C(window.innerWidth)):window.innerWidth>w&&(h?.(48),x(!1),C(-1)):(h?.(48),x(!1),C(-1)),y&&(window.innerWidth<=MO||n.right>=t.left?(S(!0),h?.(48)):(S(!1),h?.(96)))}}),[w,y]);n.useEffect((()=>(E(),window.addEventListener("resize",E),()=>{window.removeEventListener("resize",E)})),[E]);const T="condensed"===e;return r.jsxs("nav",{css:iO(y&&!k,u,p,t,T),children:[r.jsxs("div",{css:aO(y&&!k,d,T),children:[r.jsxs("div",{css:lO(y&&!k||"dark"===t,T),ref:g,children:[o?r.jsx("div",{ref:b,css:cO,children:o}):null,r.jsx("div",{css:dO(y),children:a?.map((e=>e.link?r.jsx(M,{to:e.link,href:e.link,css:uO(s===e.link,t,T),children:e.label},e.label):r.jsx(jm,{theme:t,label:e.label,fontSize:T?"0.875rem":"1rem",items:e.items||[]},e.label)))})]}),r.jsx("div",{css:hO(T),ref:v,children:k?r.jsxs("button",{type:"button",onClick:()=>j(!$),"aria-label":$?m.closeMenuLabel:m.openMenuLabel,"aria-expanded":$,css:mO(t),children:[$?m.closeLabel:m.menuLabel,$?r.jsx(zf,{height:T?"0.75rem":"1rem",width:T?"0.75rem":"1rem"}):r.jsx(lm,{height:T?"0.75rem":"1rem",width:T?"0.75rem":"1rem"})]}):r.jsxs(r.Fragment,{children:[r.jsx("div",{css:hO(T),children:l?.map(((e,t)=>r.jsx("div",{css:pO(y),children:e},t)))}),c?.length?r.jsx("div",{css:fO(y),children:c.map((e=>r.jsx(Ef,{...e},e.ariaLabel)))}):null]})})]}),y&&!k?r.jsx("div",{css:sO(t,T),children:a?.map((e=>e.link?r.jsx(M,{to:e.link,href:e.link,css:uO(s===e.link,t,T),children:e.label},e.label):r.jsx(jm,{theme:t,label:e.label,fontSize:T?"0.875rem":"1rem",items:e.items||[]},e.label)))}):null,k?r.jsx(jO,{theme:t,variant:e,navigationSection:a,utilitySection:l,actionsSection:c,linkRouter:i,isOpen:$,setIsOpen:j,pathname:s,resolvedLabels:m}):null]})},exports.NavigationRail=({tabs:t=[],defaultValue:o,onTabClick:i,children:s,onOpenChange:a,labels:l})=>{const c=Mf("NavigationRail",l),[d,u]=n.useState(!1),[h,p]=n.useState(o||t?.[0]?.value),f=e=>{p(e),i&&i(e)},[m]=e.useMediaQuery(["(max-width: 48rem)"]);return m?r.jsxs(e.Tabs.Root,{defaultValue:h,onValueChange:({value:e})=>f(e),children:[r.jsx(e.Tabs.List,{style:{display:"flex",overflowX:"auto",whiteSpace:"nowrap",padding:"0.5rem",gap:"0.5rem"},children:t.map((t=>r.jsx(e.Tabs.Trigger,{value:t.value,css:{"--indicator-color":w("primary",500),flexShrink:0,padding:"0.625rem 1rem",color:w("neutral",600),"&[data-selected]":{color:w("neutral",800),fontWeight:600}},children:t.label},t.value)))}),t.map((t=>r.jsx(e.Tabs.Content,{value:t.value,children:s},t.value)))]}):r.jsxs("div",{style:{height:"calc(100vh - 3rem - 3.5rem)",position:"fixed",top:"3rem",left:0,display:"flex"},children:[r.jsxs("div",{css:EO,children:[r.jsx(e.Tabs.Root,{defaultValue:o||t?.[0]?.value,orientation:"horizontal",width:"full",onValueChange:({value:e})=>{f(e)},children:r.jsx(e.Tabs.List,{alignItems:"center",border:"none",style:{flexDirection:"column"},children:t.map((t=>r.jsx(e.Tabs.Trigger,{css:TO,"aria-label":t["aria-label"]||t.label,...t,children:r.jsxs(e.Box,{display:"flex",alignItems:"center",flexDirection:"column",gap:"0.3125rem",className:"ds-tab-label",children:[t.icon?r.jsx("div",{css:OO,children:t.icon}):null,r.jsx("p",{children:t.label})]})},t.label)))})}),s?r.jsx(e.Collapsible.Root,{onOpenChange:({open:e})=>{u(e),a&&a(!e)},children:r.jsxs(e.Collapsible.Trigger,{css:LO,children:[r.jsx("div",{css:OO,children:d?r.jsx(Af,{}):r.jsx(Lf,{})}),r.jsxs("div",{className:"ds-tab-label",children:[r.jsx("p",{children:d?c.showLabel:c.hideLabel}),r.jsx("p",{children:c.sidebarLabel})]})]})}):null]}),s?r.jsx(e.Collapsible.Root,{defaultOpen:!0,open:!d,children:r.jsx(e.Collapsible.Content,{height:"100%",children:r.jsx("div",{css:AO,role:"tabpanel","aria-labelledby":h,children:s})})}):null]})},exports.OptionCard=({defaultValue:t,items:n,onValueChange:o,variant:s,itemWidth:a,hideControl:l})=>r.jsx(e.RadioCard.Root,{defaultValue:t,onValueChange:o,children:r.jsx(e.HStack,{alignItems:"flex-start",flexWrap:"wrap",gap:"0.75rem",children:n?.map((t=>{return r.jsxs(e.RadioCard.Item,{css:(o=a,c=t.selectedColor,d=t.selectedBackgroundColor,i.css`
|
|
3929
|
+
`),children:n.children}):null]},`${n.label}-${n.value}`);var o,s}))})}),exports.CloseButton=lg,exports.ClusterPoint=({onClick:e,triggerRef:n,showFocusState:r,count:o,mode:i,variant:s="cluster"})=>t.jsx(yb,{count:o,mode:i,onClick:e,ref:n,showFocusState:r,variant:s}),exports.Combobox=({label:t,required:o,caption:i,errorMessage:s,size:a,disabled:l,showOptionalLabel:c=!0,placeholder:d,labels:u,noMarginBottom:h,initialItems:p=[],multiple:f=!1,showSelectedItems:m=!1})=>{const[g,v]=n.useState([]),b=Mf("Combobox",u),{contains:y}=e.useFilter({sensitivity:"base"}),{collection:x,filter:w}=e.useListCollection({initialItems:p,filter:y});return r.jsxs("div",{css:Gm(a,h),className:"ds-text-input-container",children:[s?r.jsx("div",{css:Zm}):null,r.jsxs(e.Field.Root,{required:o,invalid:!!s,gap:"0",style:{marginLeft:s?"1.1875rem":"0px"},children:[t?r.jsxs(e.Field.Label,{css:Jm(a,l),"aria-label":t,children:[r.jsx(e.Field.RequiredIndicator,{"aria-label":b.requiredSymbolLabel}),t,!o&&c?r.jsx("span",{children:b.optionalSuffix}):null]}):null,i?r.jsx(e.Field.HelperText,{css:Xm(a,l),"aria-label":i,children:i}):null,s?r.jsx(e.Field.ErrorText,{css:Ym(a),"aria-label":s,children:s}):null,r.jsxs(e.Combobox.Root,{multiple:f,onValueChange:e=>{v(e.items.map((e=>({label:e.label,value:e.value}))))},value:g.map((e=>e.value)),collection:x,onInputValueChange:e=>w(e.inputValue),width:"20rem",size:"small"===a?"sm":"md",children:[r.jsxs(e.Combobox.Control,{children:[r.jsx(e.Combobox.Input,{placeholder:d,css:Qm(a),disabled:l,"aria-label":t||d||b.defaultInputAriaLabel}),r.jsxs(e.Combobox.IndicatorGroup,{children:[r.jsx(e.Combobox.ClearTrigger,{"aria-label":b.clearSelectionLabel}),r.jsx(e.Combobox.Trigger,{"aria-label":b.toggleOptionsLabel})]})]}),r.jsx(e.Portal,{children:r.jsx(e.Combobox.Positioner,{children:r.jsxs(e.Combobox.Content,{children:[r.jsx(e.Combobox.Empty,{children:b.noItemsFoundLabel}),x.items.map((t=>r.jsxs(e.Combobox.Item,{item:t,children:[t.label,r.jsx(e.Combobox.ItemIndicator,{})]},t.value)))]})})}),r.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",gap:"0.25rem",paddingTop:"0.5rem"},children:m&&g.map((e=>r.jsx(Iv,{label:e.label,variant:"info-white",onClose:()=>v((t=>t.filter((t=>t.value!==e.value)))),closable:!0},e.value)))})]})]})]})},exports.DesignSystemLocaleProvider=({labels:e,children:r})=>{const o=n.useMemo((()=>({labels:e})),[e]);return t.jsx(M.Provider,{value:o,children:r})},exports.ExtendableCard=({children:t,header:n,footer:o})=>r.jsx(e.Box,{css:eC,children:r.jsx(e.Accordion.Root,{multiple:!0,children:r.jsxs(e.Accordion.Item,{value:"extendable-card-item",children:[r.jsxs(e.Accordion.ItemTrigger,{css:tC,alignItems:"center",children:[r.jsx(e.Flex,{gap:3,flex:"1",overflow:"hidden",alignItems:"center",children:n}),r.jsx(e.Accordion.ItemIndicator,{children:r.jsx(If,{color:"var(--chakra-colors-neutral-700)",height:"1rem",width:"1rem"})})]}),r.jsxs(e.Accordion.ItemContent,{children:[t,o]})]})})}),exports.Footer=({children:e,label:t="© World Resources Institute",fixed:n,filled:o,maxWidth:i,additionalLogos:s})=>{const a=(new Date).getFullYear();return r.jsx("footer",{css:XT(n,o),children:r.jsxs("div",{css:YT(i),children:[r.jsxs("div",{css:tO,children:[r.jsx(Wf,{height:"2rem",width:"5.6875rem"}),s&&s.map(((e,t)=>r.jsx("div",{children:e},t)))]}),r.jsx("div",{css:QT,children:e}),r.jsx("div",{children:r.jsxs("p",{css:eO,children:[t," ",a]})})]})})},exports.FormContainer=({label:e,error:t,children:o})=>{const i=n.useId(),s=e?`${i}-label`:void 0,a=t?`${i}-error`:void 0;return r.jsxs("div",{css:xg,role:"group","aria-labelledby":s,"aria-describedby":a,children:[t?r.jsx("div",{css:Cg}):null,r.jsxs("div",{children:[e?r.jsx("p",{id:s,css:wg,children:e}):null,t?r.jsx("p",{id:a,css:kg,children:t}):null,o]})]})},exports.IconButton=Of,exports.InlineMessage=DT,exports.InputWithUnits=({label:t,caption:o,errorMessage:i,units:s,unitsPosition:a="end",defaultUnit:l="",defaultValue:c="",onChange:d,required:u,disabled:h})=>{const[p,f]=n.useState(c),[m,g]=n.useState(l?[l]:[s[0].value]),v=(e,t)=>{d&&d("end"===a?""+(t?`${p} ${e}`:`${e} ${m}`):""+(t?`${e} ${p}`:`${m} ${e}`))};return r.jsxs("div",{css:lv,children:[i?r.jsx("div",{css:uv}):null,r.jsxs("div",{style:{marginLeft:i?"1.1875rem":"0px"},children:[r.jsxs("p",{css:cv(h),"aria-label":t,children:[u?r.jsx("span",{children:"*"}):null,t]}),r.jsx("p",{css:dv(h),"aria-label":o,children:o}),i?r.jsx("p",{css:hv,"aria-label":i,children:i}):null,r.jsxs(e.Group,{css:pv(!!i,a),attached:!0,children:["start"===a?r.jsx(Vv,{placeholder:"","aria-label":`${t} unit`,value:m,items:s,disabled:h,onChange:e=>{g(e),v(e?.[0],!0)}}):null,r.jsx(eg,{type:"number","aria-label":`${t} value`,value:p,disabled:h,onChange:e=>{f(e.target.value),v(e.target.value)}}),"end"===a?r.jsx(Vv,{placeholder:"","aria-label":`${t} unit`,value:m,items:s,disabled:h,onChange:e=>{g(e),v(e?.[0],!0)}}):null]})]})]})},exports.ItemCount=kw,exports.LayerGroup=({label:t,caption:o,value:i,layerItems:s,onChangeForRadioVariant:a,labels:l})=>{const c=Mf("LayerGroup",l),[d,u]=n.useState({}),[h]=n.useState((e=>{const t=e.find((e=>"radio"===e.variant&&e.isDefaultSelected));return t?.name})(s));n.useEffect((()=>{let e={...d};s.forEach((n=>{n.isDefaultSelected&&(e={...e,["radio"===n.variant?t:n.name]:n.isDefaultSelected})})),u(e)}),[]);const p=(e,t,n,r)=>{const o={...d,[e]:t};u(o),n&&n(e,t,r)},f=Object.values(d).filter((e=>!0===e)).length,m=c.groupAriaLabel(t,f,o);return r.jsxs(e.Accordion.Item,{value:i,width:"100%",children:[r.jsxs(e.Accordion.ItemTrigger,{css:Ix,alignItems:"flex-start","aria-label":m,children:[r.jsxs(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:[r.jsxs("span",{css:Px,children:[t,r.jsx(Iv,{label:c.activeTagLabel(f),size:"small",variant:f>0?"success":"info-grey"})]}),r.jsx("div",{css:zx,children:o})]}),r.jsx(e.Accordion.ItemIndicator,{display:"flex",children:r.jsx(If,{color:"var(--chakra-colors-neutral-700)",height:"1rem",width:"1rem"})})]}),r.jsx(e.Accordion.ItemContent,{paddingLeft:"1rem",paddingRight:"1rem",children:r.jsx(_g,{name:t,value:h,customGap:"0",onChange:(e,t)=>p(e,!!t,a,t),children:s.map((e=>r.jsx(qx,{...e,onChange:(t,n)=>p(t,n,e.onChange)},e.label)))})})]})},exports.LayerGroupContainer=({children:t,defaultValue:n,...o})=>r.jsx("div",{css:Dx,style:{width:"100%"},children:r.jsx(e.Accordion.Root,{css:{},defaultValue:n,multiple:!0,...o,children:t})}),exports.LayerItem=qx,exports.LayerParameters=({label:t,children:o,openedByDefault:i})=>r.jsx("div",{children:r.jsx(e.Accordion.Root,{defaultValue:i?[t]:[],multiple:!0,children:r.jsxs(e.Accordion.Item,{css:Wx,value:t,children:[r.jsxs(e.Accordion.ItemTrigger,{css:Ux,children:[r.jsx(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:r.jsx("p",{css:Kx,children:t})}),r.jsx(e.Accordion.ItemIndicator,{display:"flex",children:r.jsx(If,{color:"var(--chakra-colors-neutral-700)",height:"1rem",width:"1rem"})})]}),r.jsx(e.Accordion.ItemContent,{css:Gx,children:n.Children.map(o,(e=>r.jsx("div",{className:"ds-layer-parameters-item-child",children:e})))})]})})}),exports.LegendItem=({layerName:e,dataUnit:t,onDrag:n,onUpClick:o,onDownClick:i,onRemoveClick:s,children:a,onInfoClick:l,onOpacityChanged:c,labels:d})=>{const u=Mf("LegendItem",d);return r.jsxs("div",{css:Zx,children:[r.jsx("div",{css:Jx,children:r.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"0.75rem"},children:[r.jsx(Of,{icon:r.jsx(If,{rotate:"180"}),"aria-label":u.upLabel,onClick:o}),r.jsx(Of,{icon:r.jsx(If,{}),"aria-label":u.downLabel,onClick:i})]})}),r.jsxs("div",{style:{width:"100%"},children:[r.jsxs("div",{css:Xx,children:[r.jsxs("div",{children:[r.jsx("h3",{css:Yx,children:e}),r.jsx("p",{css:Qx,children:t})]}),r.jsx(Ef,{label:u.removeLabel,size:"small",variant:"secondary",rightIcon:r.jsx(zf,{}),onClick:s})]}),a,r.jsxs("div",{css:ew,children:[r.jsx(Ef,{label:u.aboutDataLabel,size:"small",variant:"secondary",leftIcon:r.jsx(Df,{}),onClick:l}),r.jsx(iw,{defaultValue:80,onOpacityChanged:c})]})]})]})},exports.List=Aw,exports.MapControlsToolbar=({onZoomInClick:e,onZoomOutClick:n,onExpandClick:r,onShareClick:o,onPrintClick:i,onSettingsClick:s,onQuestionClick:a,vertical:l,expanded:c,showExpandedToggle:d,ariaLabel:u,labels:h})=>{const p=Mf("MapControlsToolbar",h),f=[{icon:t.jsx(Kf,{}),label:p.zoomInLabel,ariaLabel:p.zoomInAriaLabel,onClick:e},{icon:t.jsx(Gf,{}),label:p.zoomOutLabel,ariaLabel:p.zoomOutAriaLabel,onClick:n,gap:!0},{icon:t.jsx(Zf,{}),label:p.expandLabel,ariaLabel:p.expandAriaLabel,onClick:r,gap:!0},{icon:t.jsx(Jf,{}),label:p.shareLabel,ariaLabel:p.shareAriaLabel,onClick:o,gap:!0},{icon:t.jsx(Xf,{}),label:p.printLabel,ariaLabel:p.printAriaLabel,onClick:i,gap:!0},{icon:t.jsx(Yf,{}),label:p.settingsLabel,ariaLabel:p.settingsAriaLabel,onClick:s,gap:!0},{icon:t.jsx(Qf,{}),label:p.helpLabel,ariaLabel:p.helpAriaLabel,onClick:a}];return t.jsx(pg,{items:f,vertical:l,expanded:c,showExpandedToggle:d,ariaLabel:u||p.toolbarAriaLabel})},exports.MapMarker=yb,exports.MapMarkers=xb,exports.MapPopUp=({open:e,onOpenChange:t,anchorRef:o,header:i,content:s,footer:a,placement:c="bottom",offset:d=30,closeOnEscape:u=!0,closeOnOutsideClick:h=!1,labels:p})=>{const f=Mf("MapPopUp",p),m=n.useRef(null),{refs:g,floatingStyles:v,context:b,middlewareData:y,placement:x}=jx({open:e,onOpenChange:t,placement:c,whileElementsMounted:Gy,middleware:[sx(d),(w={fallbackAxisSideDirection:"start"},{...Xy(w),options:[w,C]}),ax({padding:8}),lx({element:m})]});var w,C;n.useEffect((()=>{o?.current&&g.setReference(o.current)}),[o,g]);const k=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:s=!0,escapeKey:a=!0,outsidePress:c=!0,outsidePressEvent:d="pointerdown",referencePress:u=!1,referencePressEvent:h="pointerdown",ancestorScroll:p=!1,bubbles:f,capture:m}=t,g=wx(),v=My("function"==typeof c?c:()=>!1),b="function"==typeof c?v:c,y=l.useRef(!1),{escapeKey:x,outsidePress:w}=Sx(f),{escapeKey:C,outsidePress:k}=Sx(m),S=l.useRef(!1),$=My((e=>{var t;if(!n||!s||!a||"Escape"!==e.key)return;if(S.current)return;const o=null==(t=i.current.floatingContext)?void 0:t.nodeId,l=g?Sy(g.nodesRef.current,o):[];if(!x&&(e.stopPropagation(),l.length>0)){let e=!0;if(l.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__escapeKeyBubbles||(e=!1)})),!e)return}r(!1,function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e,"escape-key")})),j=My((e=>{var t;const n=()=>{var t;$(e),null==(t=wy(e))||t.removeEventListener("keydown",n)};null==(t=wy(e))||t.addEventListener("keydown",n)})),M=My((e=>{var t;const n=i.current.insideReactTree;i.current.insideReactTree=!1;const s=y.current;if(y.current=!1,"click"===d&&s)return;if(n)return;if("function"==typeof b&&!b(e))return;const a=wy(e),l="[data-floating-ui-inert]",c=ky(o.floating).querySelectorAll(l);let u=jb(a)?a:null;for(;u&&!Hb(u);){const e=qb(u);if(Hb(e)||!jb(e))break;u=e}if(c.length&&jb(a)&&!a.matches("html,body")&&!xy(a,o.floating)&&Array.from(c).every((e=>!xy(u,e))))return;if(Mb(a)&&O){const t=Hb(a),n=_b(a),r=/auto|scroll/,o=t||r.test(n.overflowX),i=t||r.test(n.overflowY),s=o&&a.clientWidth>0&&a.scrollWidth>a.clientWidth,l=i&&a.clientHeight>0&&a.scrollHeight>a.clientHeight,c="rtl"===n.direction,d=l&&(c?e.offsetX<=a.offsetWidth-a.clientWidth:e.offsetX>a.clientWidth),u=s&&e.offsetY>a.clientHeight;if(d||u)return}const h=null==(t=i.current.floatingContext)?void 0:t.nodeId,p=g&&Sy(g.nodesRef.current,h).some((t=>{var n;return Cy(e,null==(n=t.context)?void 0:n.elements.floating)}));if(Cy(e,o.floating)||Cy(e,o.domReference)||p)return;const f=g?Sy(g.nodesRef.current,h):[];if(f.length>0){let e=!0;if(f.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)})),!e)return}r(!1,e,"outside-press")})),E=My((e=>{var t;const n=()=>{var t;M(e),null==(t=wy(e))||t.removeEventListener(d,n)};null==(t=wy(e))||t.addEventListener(d,n)}));l.useEffect((()=>{if(!n||!s)return;i.current.__escapeKeyBubbles=x,i.current.__outsidePressBubbles=w;let e=-1;function t(e){r(!1,e,"ancestor-scroll")}function l(){window.clearTimeout(e),S.current=!0}function c(){e=window.setTimeout((()=>{S.current=!1}),Vb()?5:0)}const u=ky(o.floating);a&&(u.addEventListener("keydown",C?j:$,C),u.addEventListener("compositionstart",l),u.addEventListener("compositionend",c)),b&&u.addEventListener(d,k?E:M,k);let h=[];return p&&(jb(o.domReference)&&(h=Ub(o.domReference)),jb(o.floating)&&(h=h.concat(Ub(o.floating))),!jb(o.reference)&&o.reference&&o.reference.contextElement&&(h=h.concat(Ub(o.reference.contextElement)))),h=h.filter((e=>{var t;return e!==(null==(t=u.defaultView)?void 0:t.visualViewport)})),h.forEach((e=>{e.addEventListener("scroll",t,{passive:!0})})),()=>{a&&(u.removeEventListener("keydown",C?j:$,C),u.removeEventListener("compositionstart",l),u.removeEventListener("compositionend",c)),b&&u.removeEventListener(d,k?E:M,k),h.forEach((e=>{e.removeEventListener("scroll",t)})),window.clearTimeout(e)}}),[i,o,a,b,d,n,r,p,s,x,w,$,C,j,M,k,E]),l.useEffect((()=>{i.current.insideReactTree=!1}),[i,b,d]);const T=l.useMemo((()=>({onKeyDown:$,...u&&{[Cx[h]]:e=>{r(!1,e.nativeEvent,"reference-press")},..."click"!==h&&{onClick(e){r(!1,e.nativeEvent,"reference-press")}}}})),[$,r,u,h]),O=l.useMemo((()=>({onKeyDown:$,onMouseDown(){y.current=!0},onMouseUp(){y.current=!0},[kx[d]]:()=>{i.current.insideReactTree=!0}})),[$,d,i]);return l.useMemo((()=>s?{reference:T,floating:O}:{}),[s,T,O])}(b,{escapeKey:u,outsidePress:h}),S=Tx(b,{role:"dialog"}),{getFloatingProps:$}=function(e){void 0===e&&(e=[]);const t=e.map((e=>null==e?void 0:e.reference)),n=e.map((e=>null==e?void 0:e.floating)),r=e.map((e=>null==e?void 0:e.item)),o=l.useCallback((t=>Mx(t,e,"reference")),t),i=l.useCallback((t=>Mx(t,e,"floating")),n),s=l.useCallback((t=>Mx(t,e,"item")),r);return l.useMemo((()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s})),[o,i,s])}([k,S]),{x:j,y:M}=y.arrow??{x:null,y:null},E={top:"bottom",right:"left",bottom:"top",left:"right"}[x.split("-")[0]];if(!e)return null;let T=d-1,O=4;return"left"!==E&&"right"!==E||(T=4,O=d-1),r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:g.setFloating,style:v,"aria-label":f.dialogAriaLabel,"aria-modal":!0,...$(),css:Ox,children:[r.jsxs("div",{css:Lx,children:[i,r.jsx(lg,{onClick:()=>t(!1),className:"ds-map-pop-up-close-button","aria-label":f.closeLabel})]}),r.jsx("div",{css:Ax,children:s}),a?r.jsx("div",{css:Rx,children:a}):null,r.jsx("div",{ref:m,css:Nx(T,O,j,M,E,d)})]}),r.jsx("div",{className:"fixed inset-0 z-[999] bg-black/20 backdrop-blur-[1px]",onClick:()=>h&&t(!1)})]})},exports.Menu=Em,exports.MobileSearch=({value:t,placeholder:o,showInfoMessage:i=!0,items:s=[],disabled:a,readOnly:l,id:c,name:d,autoFocus:u,autoComplete:h,onBlur:p,onFocus:f,onQueryChange:m,onCancel:g,onItemClick:v,onChange:b,labels:y})=>{const x=Mf("MobileSearch",y),[C,k]=n.useState(t??""),[S,$]=n.useState(!0),[j,M]=n.useState(!1),E=n.useRef(null),T="string"==typeof t,O=T?t:C;n.useEffect((()=>{T&&k(t)}),[T,t]),n.useEffect((()=>{m?.(O)}),[O,m]);const L=n.useMemo((()=>{const e=O.trim().toLowerCase();return e?s.filter((t=>`${t.id??""} ${t.label} ${t.caption??""}`.toLowerCase().includes(e))):s}),[s,O]),A=O.trim().length?x.matchingResultsTitle(L.length):x.recentSearchesTitle,R=O.length?r.jsx(lg,{onClick:()=>{T||k("");const e=E.current?.querySelector("input");e&&(e.value="",e.focus()),$(!0)}}):null;let N=w("neutral",500);return a?N=w("neutral",500):j&&(N=w("primary",700)),r.jsxs("div",{ref:E,css:IT,children:[r.jsxs("div",{css:PT,children:[r.jsx("div",{css:zT,children:r.jsx(e.InputGroup,{startElement:r.jsx(hm,{width:"1.25rem",height:"1.25rem",fill:N,"aria-hidden":"true"}),endElement:R,children:r.jsx(eg,{label:"",value:O,placeholder:o??x.inputAriaLabel,onChange:e=>{T||k(e.target.value),$(!0),b?.(e)},onFocus:e=>{M(!0),$(!0),f?.(e)},onBlur:e=>{M(!1),p?.(e)},noMarginBottom:!0,type:"search","aria-label":o??x.inputAriaLabel,disabled:a,readOnly:l,id:c,name:d,autoFocus:u??!0,autoComplete:h,style:{paddingLeft:"2.5rem"}})})}),r.jsx(Ef,{css:VT,variant:"borderless",label:x.cancelLabel,onClick:()=>{T||k(""),$(!1);const e=E.current?.querySelector("input");e&&(e.value="",e.blur()),g?.()}})]}),S?r.jsxs("div",{css:BT,children:[r.jsx("h3",{css:HT,children:A}),i?r.jsx("div",{css:_T,children:r.jsx(DT,{label:x.infoLabel,variant:"info-white",size:"full-width"})}):null,r.jsx("ul",{css:FT,"aria-label":A,children:L.map((t=>r.jsx("li",{children:r.jsxs(e.chakra.button,{type:"button",css:qT,onClick:()=>(e=>{v?.(e)})(t),"aria-label":`${t.label}, ${t.caption??""}`,style:{width:"100%"},children:[t.icon??null,r.jsxs("div",{css:WT,children:[r.jsx("p",{css:UT,children:t.label}),r.jsx("p",{css:KT,children:t.caption})]})]})},t.id)))})]}):null]})},exports.MobileTabBar=({defaultValue:t,tabs:o,onTabClick:i,hideLabels:s,activationMode:a="manual",labels:l})=>{const c=Mf("MobileTabBar",l),d=o.length,[u,h]=n.useState((()=>sO(o,t)));return r.jsx("div",{css:nO,children:r.jsx(e.Tabs.Root,{width:"full",defaultValue:t||o?.[0]?.value,onValueChange:({value:e})=>(e=>{const t=sO(o,e);h(t),i&&i(e)})(e),activationMode:a,children:r.jsx(e.Tabs.List,{alignItems:"center",border:"none",children:o.map(((t,n)=>{const{label:o,icon:i,bagdeCount:a,"aria-label":l,"aria-describedby":h,disabled:p,...f}=t,m=`${t.value}-str-status`,g=u===n,v=[c.tabPositionStatus(n+1,d),g?c.selectedStatus:c.notSelectedStatus];p&&v.push(c.disabledStatus);const b=[h,m].filter(Boolean).join(" ")||void 0;return r.jsxs(e.Tabs.Trigger,{css:rO,"aria-label":l||o,"aria-disabled":!!p||void 0,"aria-describedby":b,disabled:p,...f,children:[r.jsxs("div",{css:oO,children:[i,a?r.jsx("div",{css:iO,className:"ds-badge-count",children:a}):null]}),s?null:r.jsx("p",{children:o}),r.jsx(e.VisuallyHidden,{id:m,children:v.join(", ")})]},t.value)}))})})})},exports.Modal=({header:t,content:o,footer:i,size:s="medium",width:a,height:l,maxHeight:c,draggable:d,blocking:u,open:h,onClose:p,labels:f,lazyMount:m,unmountOnExit:g,restoreFocus:v,modal:b,initialFocusEl:y,finalFocusEl:x,trapFocus:w})=>{const C=Mf("Modal",f),k=n.useRef(null);return h?r.jsx(e.Dialog.Root,{open:h,onOpenChange:p,placement:"center",scrollBehavior:"inside",closeOnInteractOutside:!d&&!u,preventScroll:!d&&!u,closeOnEscape:!u,defaultOpen:!0,trapFocus:w,lazyMount:m,unmountOnExit:g,restoreFocus:v,modal:b,initialFocusEl:y,finalFocusEl:x,children:r.jsxs(e.Portal,{children:[d?null:r.jsx(e.Dialog.Backdrop,{css:{background:"rgba(0, 0, 0, 0.64)"}}),r.jsx(ek,{disabled:!d,nodeRef:k,children:r.jsx(e.Dialog.Positioner,{ref:k,children:r.jsxs(e.Dialog.Content,{"aria-label":C.dialogAriaLabel,css:tk(s,a,l,c),children:[r.jsxs(e.Dialog.Header,{css:nk,children:[t,u?null:r.jsx(e.Dialog.CloseTrigger,{css:rk,asChild:!0,children:r.jsx(lg,{})})]}),r.jsx(e.Dialog.Body,{css:ok,children:o}),i?r.jsx(e.Dialog.Footer,{padding:"0.75rem",children:i}):null]})})})]})}):null},exports.MultiActionButton=({variant:t="primary",size:o="default",mainActionLabel:i,mainActionOnClick:s=()=>{},otherActions:a=[],disabled:l,mainActionLeftIcon:c,mainActionRightIcon:d,...u})=>{const[h,p]=n.useState(!1),f=l?`${i} action button with menu, disabled`:void 0;return r.jsxs(e.Group,{css:vg,attached:!0,tabIndex:l?0:void 0,"aria-disabled":l,"aria-label":f,role:"group",children:[r.jsx(Ef,{css:{},label:i,variant:t,size:o,onClick:s,disabled:l,leftIcon:c,rightIcon:d,...u}),r.jsxs(e.Menu.Root,{onOpenChange:({open:e})=>p(e),positioning:{placement:"bottom-end"},children:[r.jsx(e.Menu.Trigger,{css:mg(t),"data-group-item":!0,"data-last":!0,asChild:!0,children:r.jsx(Ef,{style:bg,"aria-label":`Open ${i} options`,"aria-haspopup":"menu","aria-expanded":h,variant:t,size:o,leftIcon:r.jsx(If,{"aria-hidden":"true",rotate:h?"180":"0",color:w("accessible","text-on-primary-mids")||w("primary",900)}),disabled:l})}),r.jsx(yg,{children:a.map((({label:t,value:n,onClick:i})=>r.jsx(e.Menu.Item,{css:gg(o),onClick:i,value:n,children:t},n)))})]})]})},exports.Navbar=({variant:e="default",theme:t="light",logo:o,linkRouter:i,pathname:s,navigationSection:a,utilitySection:l,actionsSection:c,maxWidth:d,fixed:u,onNavbarHeightChange:h,backgroundColor:p,labels:f})=>{const m=Mf("Navbar",f),g=n.useRef(null),v=n.useRef(null),b=n.useRef(null),[y,x]=n.useState(!1),[w,C]=n.useState(-1),[k,S]=n.useState("undefined"!=typeof window&&window?.innerWidth<=TO),[$,j]=n.useState(!1),M=i,E=n.useCallback((()=>{if(v.current&&g.current&&b.current){const e=g.current.getBoundingClientRect(),t=v.current.getBoundingClientRect(),n=b.current.getBoundingClientRect();t.width,e.width,window.innerWidth<=TO||window.innerWidth<=w?(h?.(96),x(!0)):window.innerWidth>TO&&window.innerWidth<=1440?e.right>=t.left?(h?.(96),x(!0),C(window.innerWidth)):window.innerWidth>w&&(h?.(48),x(!1),C(-1)):(h?.(48),x(!1),C(-1)),y&&(window.innerWidth<=TO||n.right>=t.left?(S(!0),h?.(48)):(S(!1),h?.(96)))}}),[w,y]);n.useEffect((()=>(E(),window.addEventListener("resize",E),()=>{window.removeEventListener("resize",E)})),[E]);const T="condensed"===e;return r.jsxs("nav",{css:aO(y&&!k,u,p,t,T),children:[r.jsxs("div",{css:cO(y&&!k,d,T),children:[r.jsxs("div",{css:dO(y&&!k||"dark"===t,T),ref:g,children:[o?r.jsx("div",{ref:b,css:uO,children:o}):null,r.jsx("div",{css:hO(y),children:a?.map((e=>e.link?r.jsx(M,{to:e.link,href:e.link,css:pO(s===e.link,t,T),children:e.label},e.label):r.jsx(Em,{theme:t,label:e.label,fontSize:T?"0.875rem":"1rem",items:e.items||[]},e.label)))})]}),r.jsx("div",{css:fO(T),ref:v,children:k?r.jsxs("button",{type:"button",onClick:()=>j(!$),"aria-label":$?m.closeMenuLabel:m.openMenuLabel,"aria-expanded":$,css:vO(t),children:[$?m.closeLabel:m.menuLabel,$?r.jsx(zf,{height:T?"0.75rem":"1rem",width:T?"0.75rem":"1rem"}):r.jsx(lm,{height:T?"0.75rem":"1rem",width:T?"0.75rem":"1rem"})]}):r.jsxs(r.Fragment,{children:[r.jsx("div",{css:fO(T),children:l?.map(((e,t)=>r.jsx("div",{css:mO(y),children:e},t)))}),c?.length?r.jsx("div",{css:gO(y),children:c.map((e=>r.jsx(Ef,{...e},e.ariaLabel)))}):null]})})]}),y&&!k?r.jsx("div",{css:lO(t,T),children:a?.map((e=>e.link?r.jsx(M,{to:e.link,href:e.link,css:pO(s===e.link,t,T),children:e.label},e.label):r.jsx(Em,{theme:t,label:e.label,fontSize:T?"0.875rem":"1rem",items:e.items||[]},e.label)))}):null,k?r.jsx(EO,{theme:t,variant:e,navigationSection:a,utilitySection:l,actionsSection:c,linkRouter:i,isOpen:$,setIsOpen:j,pathname:s,resolvedLabels:m}):null]})},exports.NavigationRail=({tabs:t=[],defaultValue:o,onTabClick:i,children:s,onOpenChange:a,labels:l})=>{const c=Mf("NavigationRail",l),[d,u]=n.useState(!1),[h,p]=n.useState(o||t?.[0]?.value),f=e=>{p(e),i&&i(e)},[m]=e.useMediaQuery(["(max-width: 48rem)"]);return m?r.jsxs(e.Tabs.Root,{defaultValue:h,onValueChange:({value:e})=>f(e),children:[r.jsx(e.Tabs.List,{style:{display:"flex",overflowX:"auto",whiteSpace:"nowrap",padding:"0.5rem",gap:"0.5rem"},children:t.map((t=>r.jsx(e.Tabs.Trigger,{value:t.value,css:{"--indicator-color":w("primary",500),flexShrink:0,padding:"0.625rem 1rem",color:w("neutral",600),"&[data-selected]":{color:w("neutral",800),fontWeight:600}},children:t.label},t.value)))}),t.map((t=>r.jsx(e.Tabs.Content,{value:t.value,children:s},t.value)))]}):r.jsxs("div",{style:{height:"calc(100vh - 3rem - 3.5rem)",position:"fixed",top:"3rem",left:0,display:"flex"},children:[r.jsxs("div",{css:OO,children:[r.jsx(e.Tabs.Root,{defaultValue:o||t?.[0]?.value,orientation:"horizontal",width:"full",onValueChange:({value:e})=>{f(e)},children:r.jsx(e.Tabs.List,{alignItems:"center",border:"none",style:{flexDirection:"column"},children:t.map((t=>r.jsx(e.Tabs.Trigger,{css:LO,"aria-label":t["aria-label"]||t.label,...t,children:r.jsxs(e.Box,{display:"flex",alignItems:"center",flexDirection:"column",gap:"0.3125rem",className:"ds-tab-label",children:[t.icon?r.jsx("div",{css:AO,children:t.icon}):null,r.jsx("p",{children:t.label})]})},t.label)))})}),s?r.jsx(e.Collapsible.Root,{onOpenChange:({open:e})=>{u(e),a&&a(!e)},children:r.jsxs(e.Collapsible.Trigger,{css:RO,children:[r.jsx("div",{css:AO,children:d?r.jsx(Af,{}):r.jsx(Lf,{})}),r.jsxs("div",{className:"ds-tab-label",children:[r.jsx("p",{children:d?c.showLabel:c.hideLabel}),r.jsx("p",{children:c.sidebarLabel})]})]})}):null]}),s?r.jsx(e.Collapsible.Root,{defaultOpen:!0,open:!d,children:r.jsx(e.Collapsible.Content,{height:"100%",children:r.jsx("div",{css:NO,role:"tabpanel","aria-labelledby":h,children:s})})}):null]})},exports.OptionCard=({defaultValue:t,items:n,onValueChange:o,variant:s,itemWidth:a,hideControl:l})=>r.jsx(e.RadioCard.Root,{defaultValue:t,onValueChange:o,children:r.jsx(e.HStack,{alignItems:"flex-start",flexWrap:"wrap",gap:"0.75rem",children:n?.map((t=>{return r.jsxs(e.RadioCard.Item,{css:(o=a,c=t.selectedColor,d=t.selectedBackgroundColor,i.css`
|
|
3930
3930
|
width: ${o||"15.0625rem"};
|
|
3931
3931
|
min-height: 4.375rem;
|
|
3932
3932
|
padding: ${k(300)};
|
|
@@ -3976,7 +3976,7 @@ function FM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3976
3976
|
color: ${w("neutral",400)};
|
|
3977
3977
|
}
|
|
3978
3978
|
}
|
|
3979
|
-
`),value:t.value,disabled:t.disabled,children:[r.jsx(e.RadioCard.ItemHiddenInput,{}),r.jsxs(e.RadioCard.ItemControl,{css:
|
|
3979
|
+
`),value:t.value,disabled:t.disabled,children:[r.jsx(e.RadioCard.ItemHiddenInput,{}),r.jsxs(e.RadioCard.ItemControl,{css:Ag,children:[r.jsxs("div",{css:Rg(s),children:[r.jsx("div",{css:Ng,className:"option-card-icon-container",children:t.icon}),r.jsxs("div",{style:{width:"100%"},children:[r.jsx("p",{css:Dg(s,t.disabled),"aria-label":t.label,"aria-disabled":t.disabled,children:t.label}),r.jsx("p",{css:Ig(s,t.disabled),"aria-label":t.caption,"aria-disabled":t.disabled,children:t.caption})]})]}),l?null:r.jsx(e.RadioCard.ItemIndicator,{css:Pg(s)})]}),t.children&&"expanded"===s?r.jsx(e.RadioCard.ItemAddon,{css:(n=t.disabled,i.css`
|
|
3980
3980
|
width: 100%;
|
|
3981
3981
|
border-top: ${j(100)} solid
|
|
3982
3982
|
${w("neutral",300)};
|
|
@@ -3984,7 +3984,7 @@ function FM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3984
3984
|
padding: 0;
|
|
3985
3985
|
padding-top: ${k(200)};
|
|
3986
3986
|
color: ${n?w("neutral",500):"inherit"};
|
|
3987
|
-
`),children:t.children}):null]},`${t.label}-${t.value}`);var n,o,c,d}))})}),exports.Pagination=
|
|
3987
|
+
`),children:t.children}):null]},`${t.label}-${t.value}`);var n,o,c,d}))})}),exports.Pagination=Pw,exports.Panel=({header:e,content:t,footer:o,variant:i="fixed",width:s})=>{const a=n.useId(),[l,c]=n.useState(void 0),[d,u]=n.useState(void 0),h=n.useRef(null),p=n.useRef(null);n.useEffect((()=>{c(h?.current?.getBoundingClientRect()?.height),u(p?.current?.getBoundingClientRect()?.height)}),[e,o]);return r.jsxs("div",{role:"region","aria-labelledby":e?a:void 0,css:[ik(s),"fixed"===i?sk:ak],children:[e?r.jsx("div",{id:a,css:lk,ref:h,children:e}):null,r.jsx("div",{css:ck(l,d),children:t}),o?r.jsx("div",{css:dk,ref:p,children:o}):null]})},exports.Password=({label:e,caption:t,required:o,disabledRules:s,onChange:a,minLength:l=8,hideValidations:c,labels:d})=>{const u=Mf("Password",d),[h,p]=n.useState(!1),[f,m]=n.useState(""),[g,v]=n.useState({strength:"very-weak",length:!1,uppercase:!1,lowercase:!1,numbers:!1,specialCharacters:!1}),b={"very-weak":u.strengthVeryWeak,weak:u.strengthWeak,medium:u.strengthMedium,strong:u.strengthStrong,"very-strong":u.strengthVeryStrong};return r.jsxs("div",{css:Bv,children:[r.jsxs("p",{css:Hv,"aria-label":e,children:[o?r.jsx("span",{children:"*"}):null,e]}),r.jsx("p",{css:_v,"aria-label":t,children:t}),r.jsxs("div",{css:Fv,children:[r.jsx(eg,{type:h?"text":"password","aria-label":e,value:f,"aria-describedby":"password-guidelines",onChange:e=>(e=>{const t={...g};let n=0,r=!1;t.length=e.length>=l,n+=e.length>=l?1:0,r=/[A-Z]/.test(e),n+=r?1:0,t.uppercase=r,r=/[a-z]/.test(e),n+=r?1:0,t.lowercase=r,r=/[0-9]/.test(e),n+=r?1:0,t.numbers=r,r=/[-'/`~!¡#*$@_%+=.,^&(){}[\]|;:“‘"<>?\\]/.test(e),n+=r?1:0,t.specialCharacters=r,t.strength="very-weak",e.length>=4&&n>=2&&(t.strength="weak"),e.length>=6&&n>=3&&(t.strength="medium"),e.length>=l&&n>=4&&(t.strength="strong"),e.length>=l+2&&n>=5&&(t.strength="very-strong"),m(e),v(t),a&&a({...t,password:e})})(e.target.value)}),r.jsx(Ef,{label:h?u.hideLabel:u.showLabel,variant:"secondary",leftIcon:h?r.jsx(Hf,{}):r.jsx(Bf,{}),"aria-label":h?u.hidePasswordLabel:u.showPasswordLabel,onClick:()=>p(!h),type:"button"})]}),f&&!c?r.jsxs("div",{id:"password-guidelines",css:qv,"aria-live":"polite",children:[r.jsxs("p",{css:(y=g.strength,i.css`
|
|
3988
3988
|
font-size: ${C(400)};
|
|
3989
3989
|
line-height: ${S(600)};
|
|
3990
3990
|
font-weight: 400;
|
|
@@ -3995,16 +3995,16 @@ function FM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3995
3995
|
font-weight: 700;
|
|
3996
3996
|
color: ${w("medium"===y?"warning":"strong"===y||"very-strong"===y?"success":"error",900)};
|
|
3997
3997
|
}
|
|
3998
|
-
`),"aria-live":"polite",role:"status",children:[u.strengthPrefix," ",r.jsx("span",{children:b[g.strength]})]}),r.jsx("div",{css:
|
|
3998
|
+
`),"aria-live":"polite",role:"status",children:[u.strengthPrefix," ",r.jsx("span",{children:b[g.strength]})]}),r.jsx("div",{css:Wv(g.strength),children:r.jsx("div",{})}),r.jsxs("div",{css:Uv(g.length),"aria-label":`${u.minLengthRule(l)}. ${g.length?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.length?r.jsx(Rf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(zf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.minLengthRule(l)})]}),s?.uppercase?null:r.jsxs("div",{css:Uv(g.uppercase),"aria-label":`${u.uppercaseRule}. ${g.uppercase?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.uppercase?r.jsx(Rf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(zf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.uppercaseRule})]}),s?.lowercase?null:r.jsxs("div",{css:Uv(g.lowercase),"aria-label":`${u.lowercaseRule}. ${g.lowercase?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.lowercase?r.jsx(Rf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(zf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.lowercaseRule})]}),s?.numbers?null:r.jsxs("div",{css:Uv(g.numbers),"aria-label":`${u.numberRule}. ${g.numbers?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.numbers?r.jsx(Rf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(zf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.numberRule})]}),s?.specialCharacters?null:r.jsxs("div",{css:Uv(g.specialCharacters),"aria-label":`${u.specialCharRule}. ${g.specialCharacters?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.specialCharacters?r.jsx(Rf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(zf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.specialCharRule})]})]}):null]});var y},exports.ProgressBar=({progress:e,labels:t})=>{const n=Mf("ProgressBar",t);let o=e;return o>100&&(o=100),o<0&&(o=0),r.jsx("div",{css:iL,role:"progressbar","aria-label":n.progressAriaLabel(o),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":o,children:r.jsx("div",{css:sL(o)})})},exports.QualitativeAttribute=({type:e,label:t,caption:o,color:i,onActionClick:s,showActionButton:a,pointIcon:l=r.jsx(em,{color:"#006D2C"}),ariaLabelType:c="",labels:d})=>{const u=Mf("QualitativeAttribute",d),[h,p]=n.useState(!0),f=n.useId(),m=n.useId(),g="raster"===e,v="line"===e,b="point"===e,y=n.useId(),x=n.useMemo((()=>{const e=h?u.visibleText:u.hiddenText;let n=c??`${c},`;return v&&(n=u.linePrefix),u.currentlyTemplate(String(t),o,n,e)}),[h,e,t,o,c,u]),w=h?u.hideLabel:u.showLabel;return r.jsxs("div",{css:cw,children:[r.jsx("p",{id:y,css:{position:"absolute",width:1,height:1,margin:-1,padding:0,border:0,clip:"rect(0 0 0 0)",overflow:"hidden"},children:x}),r.jsxs("div",{css:dw,children:[r.jsxs("div",{children:[g&&r.jsx("div",{css:sw(i)}),v&&r.jsx("div",{css:aw(i)}),b&&r.jsx("div",{css:lw(i),children:l})]}),r.jsxs("div",{children:[r.jsx("p",{id:f,css:uw,children:t}),o?r.jsx("p",{id:m,css:hw,children:o}):null]})]}),s&&a?r.jsx("div",{css:pw,children:r.jsx(Ef,{type:"button",variant:"borderless",label:String(w),rightIcon:h?r.jsx(Hf,{}):r.jsx(Bf,{}),"aria-pressed":h,"aria-labelledby":`${y} ${f}`,onClick:()=>{p((e=>!e)),s?.()}})}):null]})},exports.Radio=Hg,exports.RadioGroup=_g,exports.RadioList=({label:t,caption:n,name:o,radios:s,defaultValue:a,onCheckedChange:l,errorMessage:c,horizontal:d,variant:u="default",required:h,labels:p})=>{const f=Mf("RadioList",p),m=`${t}. ${n?`${n}.`:""} ${h?f.requiredLabel:f.optionalLabel} ${c?`${f.errorPrefix} ${c}.`:""} `;return r.jsxs(e.Group,{css:Kv,"aria-roledescription":"group","aria-label":m,children:[c?r.jsx("div",{css:Xv}):null,r.jsxs("div",{css:(g=!!c,i.css`
|
|
3999
3999
|
margin-left: ${g?"1.1875rem":"0"};
|
|
4000
|
-
`),children:[r.jsxs("p",{css:
|
|
4000
|
+
`),children:[r.jsxs("p",{css:Gv,"aria-label":t,children:[h&&r.jsx("span",{"aria-label":f.requiredSymbolLabel,children:"*"}),t]}),r.jsx("p",{css:Zv,"aria-label":n,children:n}),c?r.jsx("p",{css:Yv,"aria-label":c,children:c}):null,r.jsx("div",{css:Jv,children:r.jsx(_g,{name:o,value:a,onChange:l,horizontal:d&&"card"!==u,children:s.map((e=>r.jsx(Hg,{css:"card"===u?Qv:{},...e},e.value)))})})]})]});var g},exports.RichTextEditor=({defaultValue:e="",disabled:t=!1,ariaLabel:n,placeholder:o,minHeight:i,visibleControls:s=ig,onChange:a,labels:c})=>{const d=Mf("RichTextEditor",c),u=n||d.editorAriaLabel,h=o||d.placeholder,p=i,f=pf({extensions:[ap.configure({link:!1}),ru.configure({openOnClick:!0,autolink:!0,defaultProtocol:"https"}),oc,ip,qu.configure({placeholder:h,emptyEditorClass:"is-editor-empty"}),Wu,Uu,Ku.configure({types:["paragraph","heading"]}),th],content:e,editable:!t,shouldRerenderOnTransaction:!0,immediatelyRender:!1,onUpdate:({editor:e})=>{a?.(e.getHTML())},editorProps:{attributes:{"aria-label":u}}},[h,u]);return l.useEffect((()=>{f&&f.setEditable(!t)}),[f,t]),r.jsxs(og.Root,{editor:f,disabled:t,css:{"& .ProseMirror":{minHeight:p||0}},children:[r.jsx(og.Toolbar,{children:r.jsxs(og.ControlGroup,{children:[s.includes("undo")?r.jsx(qm,{label:d.undoTooltip}):null,s.includes("redo")?r.jsx(Wm,{label:d.redoTooltip}):null,s.includes("textType")?r.jsx(Dm,{label:d.textTypeTooltip}):null,s.includes("alignment")?r.jsx(Km,{label:d.alignmentTooltip,alignLeftLabel:d.alignLeftOptionLabel,alignCenterLabel:d.alignCenterOptionLabel,alignRightLabel:d.alignRightOptionLabel,alignJustifyLabel:d.alignJustifyOptionLabel}):null,s.includes("fontSize")?r.jsx(Im,{label:d.fontSizeTooltip}):null,s.includes("bold")?r.jsx(Pm,{label:d.boldTooltip,icon:r.jsx("strong",{css:{fontSize:C(600),lineHeight:1},children:d.boldIconText})}):null,s.includes("italic")?r.jsx(zm,{label:d.italicTooltip,icon:r.jsx("em",{css:{fontStyle:"italic",fontSize:C(600),lineHeight:1},children:d.italicIconText})}):null,s.includes("underline")?r.jsx(Vm,{label:d.underlineTooltip,icon:r.jsx("span",{css:{fontSize:C(600),lineHeight:1,textDecoration:"underline"},children:d.underlineIconText})}):null,s.includes("strikethrough")?r.jsx(Bm,{label:d.strikethroughTooltip,icon:r.jsx("span",{css:{fontSize:C(600),lineHeight:1,textDecoration:"line-through"},children:d.strikethroughIconText})}):null,s.includes("bulletList")?r.jsx(Hm,{label:d.bulletListTooltip}):null,s.includes("orderedList")?r.jsx(_m,{label:d.orderedListTooltip}):null,s.includes("link")?r.jsx(tg,{label:d.linkTooltip,urlPlaceholder:d.linkUrlPlaceholder,labelPlaceholder:d.linkLabelPlaceholder,labelInputAriaLabel:d.linkLabelAriaLabel,applyLabel:d.linkApplyLabel,removeLabel:d.linkRemoveLabel,invalidUrlMessage:d.linkInvalidUrlMessage}):null,s.includes("image")?r.jsx(Fm,{label:d.imageTooltip}):null]})}),r.jsx(og.Content,{})]})},exports.SSOButtons=sg,exports.ScaleBar=({colors:e,values:t,subLabels:n,isGradient:o})=>{return r.jsxs("div",{css:fw,children:[o?r.jsx("div",{css:(s=yw(e),i.css`
|
|
4001
4001
|
height: ${k(500)};
|
|
4002
4002
|
width: 100%;
|
|
4003
4003
|
margin-bottom: ${k(200)};
|
|
4004
4004
|
border: ${j(100)} solid ${w("neutral",300)};
|
|
4005
4005
|
border-radius: ${$(300)};
|
|
4006
4006
|
${s?`background: ${s};`:""}
|
|
4007
|
-
`)}):r.jsx("div",{css:pw,children:e?.map(((e,n)=>r.jsx("div",{"data-test":`${e}-${t?.[n]}`,style:{backgroundColor:e,width:"100%",height:"100%"}},`${e}-${t?.[n]}`)))}),r.jsx("div",{css:fw,children:t?.map((e=>r.jsx("div",{style:{width:o?"auto":`calc(100% / ${t.length})`,display:"flex",justifyContent:"center"},children:r.jsx("p",{css:mw,children:e})},e)))}),n&&n.length?r.jsx("div",{css:fw,children:n.map((e=>r.jsx("div",{style:{width:o?"auto":`calc(100% / ${t.length})`,display:"flex",justifyContent:"center"},children:r.jsx("p",{css:gw,style:{width:"100%"},children:e})},e)))}):null]});var s},exports.Search=({placeholder:t,disabled:o,size:i="default",options:s=[],resultsMaxHeight:a=50,isLoading:l=!1,displayResults:c="text",onSelect:d,onQueryChange:h,onClear:p,renderResults:f,labels:m})=>{const g=Mf("Search",m),[v,b]=n.useState(""),{open:y,onOpen:x,onClose:C}=e.useDisclosure(),[k,S]=n.useState(s),[$,j]=n.useState(-1),[M,E]=n.useState(!1),T=n.useRef(null),O=`search-results-${n.useId()}`,L=e=>{const t=s.find((t=>t.id===e||t.label===e));t&&(d?.(t),b(""),C())};n.useEffect((()=>{if(h?.(v),!v)return void S(s);const e=s.filter((e=>e.id?.toLowerCase().includes(v.toLowerCase())||e.label.toLowerCase().includes(v.toLowerCase())||e.caption?.toLowerCase().includes(v.toLowerCase()))).map((e=>({id:e.id,label:e.label,caption:e.caption,variant:"select",icon:e.icon,onItemClick:()=>L(e.id||e.label)})));S(e),x()}),[v]),n.useEffect((()=>{function e(e){y&&T.current&&!T.current.contains(e.target)&&C()}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}),[y]);const A=v.length?r.jsx(sg,{onClick:()=>{b(""),p?.()}}):null,R="none"!==c&&!!v.length&&k.length>0&&y;let N=w("neutral",500);o?N=w("neutral",500):M&&(N=w("primary",700));const D="small"===i?"1rem":"1.25rem",I=u(a);return r.jsxs("div",{ref:T,style:{position:"relative",width:"100%"},children:[r.jsx(e.InputGroup,{startElement:r.jsx(hm,{width:D,height:D,fill:N}),endElement:A,children:r.jsx(Ym,{autoComplete:"off",placeholder:t||g.filterPlaceholder,onChange:e=>{const{value:t}=e.target;b(t)},onFocus:()=>E(!0),onBlur:()=>E(!1),value:v,label:"",style:{paddingLeft:"2.5rem"},type:"search","aria-label":t||g.filterAriaLabel,"aria-expanded":R,"aria-controls":O,role:"combobox","aria-autocomplete":"list",disabled:o,size:i,noMarginBottom:!0,onKeyDown:e=>{if(R){if("ArrowDown"===e.key&&(e.preventDefault(),j((e=>Math.min(e+1,k.length-1)))),"ArrowUp"===e.key&&(e.preventDefault(),j((e=>Math.max(e-1,0)))),"Enter"===e.key&&(e.preventDefault(),$>=0)){const e=k[$];L(e.id||e.label)}"Escape"===e.key&&C()}}})}),(R||l&&!!v.length)&&"custom"===c&&f&&!l&&f({items:k,highlightedIndex:$,query:v,onSelect:L}),(R||l&&!!v.length)&&r.jsx(e.Portal,{container:T,children:r.jsxs(e.Box,{position:"absolute",width:"100%",backgroundColor:"white",border:"custom"===c?"none":"0.0625rem solid",borderColor:"gray.200",borderRadius:"md",zIndex:1e3,overflowY:"auto",maxHeight:I,children:[l&&r.jsx(e.Box,{padding:"1rem",children:r.jsx(e.Spinner,{})}),"text"===c&&!l&&r.jsx(_O,{highlightedIndex:$,items:k,query:v,onSelect:L}),"list"===c&&!l&&r.jsx(Ow,{items:k,highlightedIndex:$})]})})]})},exports.Select=Pv,exports.Sheet=({header:e,content:t,footer:o,open:i=!1,onClose:s,minimizedHeight:a,midHeight:l=200,maxFullHeight:c,defaultSnap:d="minimized",className:u,blocking:h,zIndex:p=1e3,labels:f})=>{const m=Mf("Sheet",f),g=n.useRef(null),v=n.useRef([]),[b,y]=n.useState(null),x=window.innerWidth>768,w=v.current;let C=m.expandSheetLabel;if(null!=b){const e=CT(b,w);e>0&&e<w.length-1?C=m.makeFullScreenLabel:e===w.length-1&&(C=m.expandedSheetLabel)}const k=!(null==b||!w.length||CT(b,w)!==w.length-1);return r.jsx(yT,{ref:g,css:wT(!!e,p),className:u,open:i,onDismiss:s,header:r.jsxs("div",{children:[r.jsx("button",{type:"button",disabled:k,"aria-label":C,css:xT,onKeyDown:e=>{if("Enter"!==e.key&&" "!==e.key)return;e.preventDefault();const t=w[w.length-1];if(x)return void g.current?.snapTo?.((()=>t));const n=b??w[0];let r=w.findIndex((e=>e>n));-1===r&&(r=w.length-1);const o=w[r];g.current?.snapTo?.((()=>o))},children:r.jsx("div",{})}),r.jsx("span",{"aria-live":"polite",style:{position:"absolute",width:1,height:1,overflow:"hidden",clip:"rect(0 0 0 0)"},children:C}),e]}),footer:o,snapPoints:({headerHeight:e,maxHeight:t,footerHeight:n})=>{const r=[20,a||e,l+(o?n:0),c||t-t/6];return v.current=r,r},onSpringEnd:()=>{const e=g.current?.height;e&&y(e)},defaultSnap:({headerHeight:e,maxHeight:t,footerHeight:n})=>{let r=20;return"minimized"===d?r=a||e:"mid"===d?r=l+(o?n:0):"full"===d&&(r=c||t-t/6),r},blocking:h,children:i?t:null})},exports.SimpleMapPin=({onClick:e,triggerRef:n,showFocusState:r,count:o,mode:i,variant:s="simple-pin"})=>t.jsx(vb,{count:o,mode:i,onClick:e,ref:n,showFocusState:r,variant:s}),exports.Slider=Zg,exports.SliderInput=({label:e,caption:t,size:o="default",sliderItem:i,required:s,onChange:a})=>{const[l,c]=n.useState(i.value||[]),d=(e,t)=>{const n=e.target.value,r=[...l];let o=n?parseInt(n,10):n;const s=i.min||0,a=i.max||100;o=Number.isNaN(o)?s:o,o=o<s?s:o,o=o>a?a:o,r[t]=o,c(r)},u=(e,t)=>{const n=e.target.value||"0",r=[...l];let o=parseInt(n,10);const s=i.min||0,d=i.max||100;if(o=Number.isNaN(o)?s:o,o=o<s?s:o,o=o>d?d:o,2===l?.length){o=Number.isNaN(o)?s:o;const e=l[0],n=l[1];0===t?(o=o<s?s:o,o=o>n?n:o):1===t&&(o=o<e?e:o,o=o>d?d:o)}r[t]=o,c(r),a&&a(r)};return r.jsxs("div",{children:[r.jsxs("p",{css:Yv(o),"aria-label":e,children:[s?r.jsx("span",{children:"*"}):null,e]}),t?r.jsx("p",{css:Qv(o),"aria-label":t,children:t}):null,r.jsxs("div",{css:eb,children:[i.step&&i.marks?r.jsx(Pv,{items:i.marks.map((e=>({label:`${e.label}`,value:`${e.value}`}))),placeholder:"",style:{width:"5.625rem"},value:[`${l?.[0]}`],onChange:e=>{const t=e.map((e=>parseInt(e,10)));c(t),a&&a(t)}}):r.jsx(Ym,{"aria-label":e,min:i.min,max:i.max,value:l?.[0],type:"number",onChange:e=>d(e,0),onBlur:e=>u(e,0),className:"ds-opacity-control-text-input",onClick:e=>e.target.select()}),r.jsx(Zg,{css:{},...i,value:l,"aria-label":2===l?.length?[`${e} minimum`,`${e} maximum`]:[e],onValueChangeEnd:e=>{c(e.value),a&&a(e.value)}}),2===l?.length?r.jsx(Ym,{"aria-label":e,min:i.min,max:i.max,value:l?.[1],type:"number",onChange:e=>d(e,1),onBlur:e=>u(e,1),className:"ds-opacity-control-text-input",onClick:e=>e.target.select()}):null]})]})},exports.StepProgressIndicator=({steps:e,currentStep:t,labels:n})=>{const o=Mf("StepProgressIndicator",n);return r.jsxs("div",{css:iL,children:[e.map(((e,n)=>r.jsxs("div",{css:sL,children:[r.jsx("button",{css:aL(t>=n+1,t<n+1),type:"button",onClick:e.onClick,"aria-current":t===n+1,"aria-disabled":t<n+1,disabled:t<n+1,"aria-label":o.currentStepLabel(n+1,e.label||"",t>n+1),"data-active":t>=n+1,children:t>n+1?r.jsx(Rf,{height:"1rem",width:"1rem"}):n+1}),e.label?r.jsx("p",{css:lL(t===n+1),children:e.label}):null]},`${e.label}-${n}`))),r.jsx("div",{css:cL,children:r.jsx("div",{css:dL})})]})},exports.Switch=Xg,exports.TabBar=({variant:t="panel",defaultValue:o,tabs:i,onTabClick:s,activationMode:a="manual"})=>{const[l,c]=n.useState(VO(i,o)||0);return r.jsx("div",{css:RO(t),children:r.jsx(e.Tabs.Root,{width:"full",defaultValue:o||i?.[0]?.value,onValueChange:({value:e})=>{return c(VO(i,t=e)),void(s&&s(t));var t},activationMode:a,children:r.jsx(e.Tabs.List,{alignItems:"center",border:"none",children:i.map(((o,i)=>r.jsxs(n.Fragment,{children:["view"===t&&1===i&&"left"===BO(l)?r.jsx("div",{css:IO}):null,r.jsx(e.Tabs.Trigger,{css:[NO,"view"===t&&PO,"panel"===t&&DO,"transparent"===t&&zO],"aria-label":o["aria-label"]||o.label,...o,children:r.jsxs(e.Box,{display:"flex",alignItems:"center",gap:"0.3125rem",children:[o.icon,o.label]})},o.label),"view"===t&&1===i&&"right"===BO(l)?r.jsx("div",{css:IO}):null]},o.label)))})})})},exports.Table=({columns:o,data:i=[],renderRow:s,striped:a,stickyHeader:l,pagination:c,selectable:d,selectedRows:u,variant:h="default",onSortColumn:p,onPageSizeChange:f,onPageChange:m,onAllItemsSelected:g,onRowSelected:v,loading:b,height:y,labels:x})=>{const C=Mf("Table",x),[k,S]=n.useState({key:"",order:""}),$=n.useRef({}),j=n.useRef(null),[M,E]=n.useState({}),[T,O]=n.useState([]),{totalItems:L=i.length,currentPage:A=1,pageSize:R=10,showItemCount:N,showItemCountText:D}=c||{},I=Boolean(p),P=n.useMemo((()=>Zw(i,k,I)),[i,I,k]),z=(e,t)=>{S({key:e,order:t}),p&&p({key:e,order:t})},V=u??T,B=P.length>0&&V.length===P.length,H=V.length>0&&V.length<P.length,_=n.useMemo((()=>(e=>e.reduce(((e,t)=>(e[t.key]=t,e)),{}))(o)),[o]),F=n.useMemo((()=>(e=>e.filter((e=>e.sticky)).map((e=>e.key)))(o)),[o]),q=(e=>e.length>0?e[e.length-1]:void 0)([...void 0!==M[Uw]?[Uw]:[],...F]),W=n.useCallback((()=>{const e=((e,t,n)=>{const r={};let o=0;const i=e.filter((e=>e.sticky));return n&&i.length>0&&(r[Uw]=0,o+=n.offsetWidth),i.forEach((e=>{r[e.key]=o,o+=t[e.key]?.offsetWidth||0})),r})(o,$.current,d?j.current:void 0);E(e)}),[o,d]);n.useEffect((()=>{W()}),[W,i.length]),n.useEffect((()=>{const e=()=>{W()};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[W]),n.useEffect((()=>{void 0===u&&O((e=>((e,t)=>{const n=e.filter((e=>t.some((t=>t.id===e.id)))),r=n.length===e.length&&n.every(((t,n)=>t.id===e[n]?.id));return r?e:n})(e,i)))}),[i,u]);const U=e=>Gw(M,e.key,q),K=e=>((e,t,n,r)=>({...Kw(e,n),...Gw(t,n,r)}))(_,M,e,q),G=e=>((e,t)=>e.some((e=>e.id===t.id)))(V,e),Z=(({columns:n,selectable:r,isRowSelected:o,onRowSelected:i,stickyOffsets:s={},lastStickyColumnKey:a,getSelectRowLabel:l})=>(c,d)=>{const{id:u,name:h}=c;return t.jsxs(e.Table.Row,{className:d?.className,children:[r?t.jsx(e.Table.Cell,{...Gw(s,Uw,a),children:t.jsx(kg,{name:`checkbox-${u}`,"aria-label":l(h,u),checked:o(c),onCheckedChange:({checked:e})=>{i(c,e)}})}):null,n.map((n=>t.jsx(e.Table.Cell,{...d?.getCellProps(n.key),children:n.cell?n.cell(c):c?.[n.key]},n.key)))]})})({columns:o,selectable:d,isRowSelected:G,onRowSelected:(e,t)=>{void 0===u&&O((n=>((e,t,n)=>n?e.some((e=>e.id===t.id))?e:[...e,t]:e.filter((e=>e.id!==t.id)))(n,e,t))),v&&v(e,t)},stickyOffsets:M,lastStickyColumnKey:q,getSelectRowLabel:(e,t)=>C.selectRowLabel(e,t)}),J=s||Z;return r.jsxs("div",{children:[r.jsx("div",{css:y?qw(y):void 0,children:r.jsxs(e.Table.Root,{css:Iw(h,l),striped:a,stickyHeader:l,interactive:!0,children:[r.jsx(e.Table.Header,{css:Pw(h),children:r.jsxs(e.Table.Row,{children:[d?r.jsx(e.Table.ColumnHeader,{ref:j,...Gw(M,Uw,q),children:r.jsx(kg,{name:"header-checkbox","aria-label":C.selectAllRowsLabel,checked:B,indeterminate:H,onCheckedChange:({checked:e})=>{void 0===u&&O(e?P:[]),g&&g(e)}})}):null,o.map((t=>{return r.jsx(e.Table.ColumnHeader,{ref:e=>{$.current[t.key]=e},...(n=t.key,Kw(_,n)),role:t.sortable?"columnheader":void 0,"aria-sort":t.sortable&&"asc"===k.order?"ascending":t.sortable&&"desc"===k.order?"descending":void 0,...U(t),children:r.jsxs("div",{css:zw,children:[t.label,t.sortable?r.jsxs("div",{css:Vw,children:[r.jsx(Of,{css:Bw(k.key===t.key&&"asc"===k.order),icon:r.jsx(If,{style:{transform:"rotate(180deg)"}}),onClick:()=>z(t.key,"asc"),"aria-label":C.ascendingLabel}),r.jsx(Of,{css:Bw(k.key===t.key&&"desc"===k.order),icon:r.jsx(If,{}),onClick:()=>z(t.key,"desc"),"aria-label":C.descendingLabel})]}):null]})},t.key);var n}))]})}),r.jsx(e.Table.Body,{css:Fw(a),children:P.map((e=>r.jsx(n.Fragment,{children:J(e,{className:G(e)?"selected":void 0,getCellProps:K})},e.id)))})]})}),b?r.jsx("div",{css:Ww,children:r.jsx(e.Spinner,{size:"lg",color:w("primary",500)})}):null,r.jsxs("div",{css:Hw,children:[r.jsx("div",{children:N?r.jsx(ww,{pageSize:R,currentPage:A,totalItems:L,onPageSizeChange:f,showItemCountText:D}):null}),c?r.jsx("div",{css:_w,children:r.jsx(Dw,{totalItems:L,pageSize:R,currentPage:A,onPageChange:m})}):null]})]})},exports.TableCell=Xw,exports.TableRow=Jw,exports.Tag=Nv,exports.TextInput=Ym,exports.Textarea=({label:t,caption:o,placeholder:i,errorMessage:s,required:a,disabled:l,size:c="default",showOptionalLabel:d=!0,defaultValue:u="",onChange:h,minLength:p,maxLength:f,labels:m,...g})=>{const v=Mf("Textarea",m),[b,y]=n.useState(u),[x,w]=n.useState(!1),[C,k]=n.useState(!1),[S,$]=n.useState(""),j=n.useId(),M=n.useId(),E=n.useId();n.useEffect((()=>{const{length:e}=u;p&&e<p&&e>0?(w(e<p),k(!1),$(v.enterAtLeastChars(p-e))):p&&0===e&&$(v.minChars(p)),f&&e>0?(w(!1),k(e>f),$(v.charsRemaining(f-e))):f&&0===e&&$(v.maxChars(f))}),[]);const T=!!s||x||C,O=[o?j:null,T?M:null,S?E:null].filter(Boolean).join(" ")||void 0;return r.jsxs("div",{css:tb(c),children:[T?r.jsx("div",{css:nb}):null,r.jsxs(e.Field.Root,{required:a,invalid:T,gap:"0",style:{marginLeft:T?"1.1875rem":"0px"},children:[t?r.jsxs(e.Field.Label,{css:rb(c,l),"aria-label":t,children:[r.jsx(e.Field.RequiredIndicator,{"aria-label":v.requiredSymbolLabel}),t,!a&&d?r.jsx("span",{children:v.optionalSuffix}):null]}):null,o?r.jsx(e.Field.HelperText,{id:j,css:ob(c,l),children:o}):null,s?r.jsx(e.Field.ErrorText,{id:M,css:sb,"aria-label":`${v.errorPrefix} ${s}`,"aria-live":"polite",children:s}):null,r.jsx(e.Textarea,{placeholder:i,disabled:l,css:ab(c,b,u),onChange:e=>{y(e.target.value);const{length:t}=e.target.value;p&&f?(w(t<p),k(t>f),$(v.charsRemaining(f-t))):p?(w(t<p),k(!1),$(t<p?v.enterAtLeastChars(p-t):"")):f&&(k(t>f),w(!1),$(v.charsRemaining(f-t))),h&&h(e)},value:b,"aria-label":t||i,"aria-describedby":O,_placeholder:{color:"var(--chakra-colors-neutral-500)"},...g}),x&&p?r.jsx(e.Field.ErrorText,{id:M,css:sb,style:{marginTop:"0.5rem",fontSize:"0.75rem",lineHeight:"1rem"},"aria-live":"polite",children:v.needMoreChars(p-b.length)}):null,C&&f?r.jsx(e.Field.ErrorText,{id:M,css:sb,style:{marginTop:"0.5rem",fontSize:"0.75rem",lineHeight:"1rem"},"aria-live":"polite",children:v.tooManyChars(b.length-f)}):null,!S||C||x?null:r.jsx(e.Field.HelperText,{id:E,css:ib,"aria-live":"polite",children:S})]})]})},exports.Toast=({labels:t})=>{const n=Mf("Toast",t);return Object.keys(gL).map((t=>r.jsx(e.Portal,{children:r.jsx(e.Toaster,{toaster:gL[t],insetInline:{mdDown:"4"},children:o=>{return r.jsxs(e.Toast.Root,{css:(s=o.meta?.maxWidth,i.css`
|
|
4007
|
+
`)}):r.jsx("div",{css:mw,children:e?.map(((e,n)=>r.jsx("div",{"data-test":`${e}-${t?.[n]}`,style:{backgroundColor:e,width:"100%",height:"100%"}},`${e}-${t?.[n]}`)))}),r.jsx("div",{css:gw,children:t?.map((e=>r.jsx("div",{style:{width:o?"auto":`calc(100% / ${t.length})`,display:"flex",justifyContent:"center"},children:r.jsx("p",{css:vw,children:e})},e)))}),n&&n.length?r.jsx("div",{css:gw,children:n.map((e=>r.jsx("div",{style:{width:o?"auto":`calc(100% / ${t.length})`,display:"flex",justifyContent:"center"},children:r.jsx("p",{css:bw,style:{width:"100%"},children:e})},e)))}):null]});var s},exports.Search=({placeholder:t,disabled:o,size:i="default",options:s=[],resultsMaxHeight:a=50,isLoading:l=!1,displayResults:c="text",onSelect:d,onQueryChange:h,onClear:p,renderResults:f,labels:m})=>{const g=Mf("Search",m),[v,b]=n.useState(""),{open:y,onOpen:x,onClose:C}=e.useDisclosure(),[k,S]=n.useState(s),[$,j]=n.useState(-1),[M,E]=n.useState(!1),T=n.useRef(null),O=`search-results-${n.useId()}`,L=e=>{const t=s.find((t=>t.id===e||t.label===e));t&&(d?.(t),b(""),C())};n.useEffect((()=>{if(h?.(v),!v)return void S(s);const e=s.filter((e=>e.id?.toLowerCase().includes(v.toLowerCase())||e.label.toLowerCase().includes(v.toLowerCase())||e.caption?.toLowerCase().includes(v.toLowerCase()))).map((e=>({id:e.id,label:e.label,caption:e.caption,variant:"select",icon:e.icon,onItemClick:()=>L(e.id||e.label)})));S(e),x()}),[v]),n.useEffect((()=>{function e(e){y&&T.current&&!T.current.contains(e.target)&&C()}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}),[y]);const A=v.length?r.jsx(lg,{onClick:()=>{b(""),p?.()}}):null,R="none"!==c&&!!v.length&&k.length>0&&y;let N=w("neutral",500);o?N=w("neutral",500):M&&(N=w("primary",700));const D="small"===i?"1rem":"1.25rem",I=u(a);return r.jsxs("div",{ref:T,style:{position:"relative",width:"100%"},children:[r.jsx(e.InputGroup,{startElement:r.jsx(hm,{width:D,height:D,fill:N}),endElement:A,children:r.jsx(eg,{autoComplete:"off",placeholder:t||g.filterPlaceholder,onChange:e=>{const{value:t}=e.target;b(t)},onFocus:()=>E(!0),onBlur:()=>E(!1),value:v,label:"",style:{paddingLeft:"2.5rem"},type:"search","aria-label":t||g.filterAriaLabel,"aria-expanded":R,"aria-controls":O,role:"combobox","aria-autocomplete":"list",disabled:o,size:i,noMarginBottom:!0,onKeyDown:e=>{if(R){if("ArrowDown"===e.key&&(e.preventDefault(),j((e=>Math.min(e+1,k.length-1)))),"ArrowUp"===e.key&&(e.preventDefault(),j((e=>Math.max(e-1,0)))),"Enter"===e.key&&(e.preventDefault(),$>=0)){const e=k[$];L(e.id||e.label)}"Escape"===e.key&&C()}}})}),(R||l&&!!v.length)&&"custom"===c&&f&&!l&&f({items:k,highlightedIndex:$,query:v,onSelect:L}),(R||l&&!!v.length)&&r.jsx(e.Portal,{container:T,children:r.jsxs(e.Box,{position:"absolute",width:"100%",backgroundColor:"white",border:"custom"===c?"none":"0.0625rem solid",borderColor:"gray.200",borderRadius:"md",zIndex:1e3,overflowY:"auto",maxHeight:I,children:[l&&r.jsx(e.Box,{padding:"1rem",children:r.jsx(e.Spinner,{})}),"text"===c&&!l&&r.jsx(qO,{highlightedIndex:$,items:k,query:v,onSelect:L}),"list"===c&&!l&&r.jsx(Aw,{items:k,highlightedIndex:$})]})})]})},exports.Select=Vv,exports.Sheet=({header:e,content:t,footer:o,open:i=!1,onClose:s,minimizedHeight:a,midHeight:l=200,maxFullHeight:c,defaultSnap:d="minimized",className:u,blocking:h,zIndex:p=1e3,labels:f})=>{const m=Mf("Sheet",f),g=n.useRef(null),v=n.useRef([]),[b,y]=n.useState(null),x=window.innerWidth>768,w=v.current;let C=m.expandSheetLabel;if(null!=b){const e=ST(b,w);e>0&&e<w.length-1?C=m.makeFullScreenLabel:e===w.length-1&&(C=m.expandedSheetLabel)}const k=!(null==b||!w.length||ST(b,w)!==w.length-1);return r.jsx(wT,{ref:g,css:kT(!!e,p),className:u,open:i,onDismiss:s,header:r.jsxs("div",{children:[r.jsx("button",{type:"button",disabled:k,"aria-label":C,css:CT,onKeyDown:e=>{if("Enter"!==e.key&&" "!==e.key)return;e.preventDefault();const t=w[w.length-1];if(x)return void g.current?.snapTo?.((()=>t));const n=b??w[0];let r=w.findIndex((e=>e>n));-1===r&&(r=w.length-1);const o=w[r];g.current?.snapTo?.((()=>o))},children:r.jsx("div",{})}),r.jsx("span",{"aria-live":"polite",style:{position:"absolute",width:1,height:1,overflow:"hidden",clip:"rect(0 0 0 0)"},children:C}),e]}),footer:o,snapPoints:({headerHeight:e,maxHeight:t,footerHeight:n})=>{const r=[20,a||e,l+(o?n:0),c||t-t/6];return v.current=r,r},onSpringEnd:()=>{const e=g.current?.height;e&&y(e)},defaultSnap:({headerHeight:e,maxHeight:t,footerHeight:n})=>{let r=20;return"minimized"===d?r=a||e:"mid"===d?r=l+(o?n:0):"full"===d&&(r=c||t-t/6),r},blocking:h,children:i?t:null})},exports.SimpleMapPin=({onClick:e,triggerRef:n,showFocusState:r,count:o,mode:i,variant:s="simple-pin"})=>t.jsx(yb,{count:o,mode:i,onClick:e,ref:n,showFocusState:r,variant:s}),exports.Slider=Xg,exports.SliderInput=({label:e,caption:t,size:o="default",sliderItem:i,required:s,onChange:a})=>{const[l,c]=n.useState(i.value||[]),d=(e,t)=>{const n=e.target.value,r=[...l];let o=n?parseInt(n,10):n;const s=i.min||0,a=i.max||100;o=Number.isNaN(o)?s:o,o=o<s?s:o,o=o>a?a:o,r[t]=o,c(r)},u=(e,t)=>{const n=e.target.value||"0",r=[...l];let o=parseInt(n,10);const s=i.min||0,d=i.max||100;if(o=Number.isNaN(o)?s:o,o=o<s?s:o,o=o>d?d:o,2===l?.length){o=Number.isNaN(o)?s:o;const e=l[0],n=l[1];0===t?(o=o<s?s:o,o=o>n?n:o):1===t&&(o=o<e?e:o,o=o>d?d:o)}r[t]=o,c(r),a&&a(r)};return r.jsxs("div",{children:[r.jsxs("p",{css:eb(o),"aria-label":e,children:[s?r.jsx("span",{children:"*"}):null,e]}),t?r.jsx("p",{css:tb(o),"aria-label":t,children:t}):null,r.jsxs("div",{css:nb,children:[i.step&&i.marks?r.jsx(Vv,{items:i.marks.map((e=>({label:`${e.label}`,value:`${e.value}`}))),placeholder:"",style:{width:"5.625rem"},value:[`${l?.[0]}`],onChange:e=>{const t=e.map((e=>parseInt(e,10)));c(t),a&&a(t)}}):r.jsx(eg,{"aria-label":e,min:i.min,max:i.max,value:l?.[0],type:"number",onChange:e=>d(e,0),onBlur:e=>u(e,0),className:"ds-opacity-control-text-input",onClick:e=>e.target.select()}),r.jsx(Xg,{css:{},...i,value:l,"aria-label":2===l?.length?[`${e} minimum`,`${e} maximum`]:[e],onValueChangeEnd:e=>{c(e.value),a&&a(e.value)}}),2===l?.length?r.jsx(eg,{"aria-label":e,min:i.min,max:i.max,value:l?.[1],type:"number",onChange:e=>d(e,1),onBlur:e=>u(e,1),className:"ds-opacity-control-text-input",onClick:e=>e.target.select()}):null]})]})},exports.StepProgressIndicator=({steps:e,currentStep:t,labels:n})=>{const o=Mf("StepProgressIndicator",n);return r.jsxs("div",{css:aL,children:[e.map(((e,n)=>r.jsxs("div",{css:lL,children:[r.jsx("button",{css:cL(t>=n+1,t<n+1),type:"button",onClick:e.onClick,"aria-current":t===n+1,"aria-disabled":t<n+1,disabled:t<n+1,"aria-label":o.currentStepLabel(n+1,e.label||"",t>n+1),"data-active":t>=n+1,children:t>n+1?r.jsx(Rf,{height:"1rem",width:"1rem"}):n+1}),e.label?r.jsx("p",{css:dL(t===n+1),children:e.label}):null]},`${e.label}-${n}`))),r.jsx("div",{css:uL,children:r.jsx("div",{css:hL})})]})},exports.Switch=Qg,exports.TabBar=({variant:t="panel",defaultValue:o,tabs:i,onTabClick:s,activationMode:a="manual"})=>{const[l,c]=n.useState(HO(i,o)||0);return r.jsx("div",{css:DO(t),children:r.jsx(e.Tabs.Root,{width:"full",defaultValue:o||i?.[0]?.value,onValueChange:({value:e})=>{return c(HO(i,t=e)),void(s&&s(t));var t},activationMode:a,children:r.jsx(e.Tabs.List,{alignItems:"center",border:"none",children:i.map(((o,i)=>r.jsxs(n.Fragment,{children:["view"===t&&1===i&&"left"===_O(l)?r.jsx("div",{css:zO}):null,r.jsx(e.Tabs.Trigger,{css:[IO,"view"===t&&VO,"panel"===t&&PO,"transparent"===t&&BO],"aria-label":o["aria-label"]||o.label,...o,children:r.jsxs(e.Box,{display:"flex",alignItems:"center",gap:"0.3125rem",children:[o.icon,o.label]})},o.label),"view"===t&&1===i&&"right"===_O(l)?r.jsx("div",{css:zO}):null]},o.label)))})})})},exports.Table=({columns:o,data:i=[],renderRow:s,striped:a,stickyHeader:l,pagination:c,selectable:d,selectedRows:u,variant:h="default",onSortColumn:p,onPageSizeChange:f,onPageChange:m,onAllItemsSelected:g,onRowSelected:v,loading:b,height:y,labels:x})=>{const C=Mf("Table",x),[k,S]=n.useState({key:"",order:""}),$=n.useRef({}),j=n.useRef(null),[M,E]=n.useState({}),[T,O]=n.useState([]),{totalItems:L=i.length,currentPage:A=1,pageSize:R=10,showItemCount:N,showItemCountText:D}=c||{},I=Boolean(p),P=n.useMemo((()=>Xw(i,k,I)),[i,I,k]),z=(e,t)=>{S({key:e,order:t}),p&&p({key:e,order:t})},V=u??T,B=P.length>0&&V.length===P.length,H=V.length>0&&V.length<P.length,_=n.useMemo((()=>(e=>e.reduce(((e,t)=>(e[t.key]=t,e)),{}))(o)),[o]),F=n.useMemo((()=>(e=>e.filter((e=>e.sticky)).map((e=>e.key)))(o)),[o]),q=(e=>e.length>0?e[e.length-1]:void 0)([...void 0!==M[Gw]?[Gw]:[],...F]),W=n.useCallback((()=>{const e=((e,t,n)=>{const r={};let o=0;const i=e.filter((e=>e.sticky));return n&&i.length>0&&(r[Gw]=0,o+=n.offsetWidth),i.forEach((e=>{r[e.key]=o,o+=t[e.key]?.offsetWidth||0})),r})(o,$.current,d?j.current:void 0);E(e)}),[o,d]);n.useEffect((()=>{W()}),[W,i.length]),n.useEffect((()=>{const e=()=>{W()};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[W]),n.useEffect((()=>{void 0===u&&O((e=>((e,t)=>{const n=e.filter((e=>t.some((t=>t.id===e.id)))),r=n.length===e.length&&n.every(((t,n)=>t.id===e[n]?.id));return r?e:n})(e,i)))}),[i,u]);const U=e=>Jw(M,e.key,q),K=e=>((e,t,n,r)=>({...Zw(e,n),...Jw(t,n,r)}))(_,M,e,q),G=e=>((e,t)=>e.some((e=>e.id===t.id)))(V,e),Z=(({columns:n,selectable:r,isRowSelected:o,onRowSelected:i,stickyOffsets:s={},lastStickyColumnKey:a,getSelectRowLabel:l})=>(c,d)=>{const{id:u,name:h}=c;return t.jsxs(e.Table.Row,{className:d?.className,children:[r?t.jsx(e.Table.Cell,{...Jw(s,Gw,a),children:t.jsx($g,{name:`checkbox-${u}`,"aria-label":l(h,u),checked:o(c),onCheckedChange:({checked:e})=>{i(c,e)}})}):null,n.map((n=>t.jsx(e.Table.Cell,{...d?.getCellProps(n.key),children:n.cell?n.cell(c):c?.[n.key]},n.key)))]})})({columns:o,selectable:d,isRowSelected:G,onRowSelected:(e,t)=>{void 0===u&&O((n=>((e,t,n)=>n?e.some((e=>e.id===t.id))?e:[...e,t]:e.filter((e=>e.id!==t.id)))(n,e,t))),v&&v(e,t)},stickyOffsets:M,lastStickyColumnKey:q,getSelectRowLabel:(e,t)=>C.selectRowLabel(e,t)}),J=s||Z;return r.jsxs("div",{children:[r.jsx("div",{css:y?Uw(y):void 0,children:r.jsxs(e.Table.Root,{css:zw(h,l),striped:a,stickyHeader:l,interactive:!0,children:[r.jsx(e.Table.Header,{css:Vw(h),children:r.jsxs(e.Table.Row,{children:[d?r.jsx(e.Table.ColumnHeader,{ref:j,...Jw(M,Gw,q),children:r.jsx($g,{name:"header-checkbox","aria-label":C.selectAllRowsLabel,checked:B,indeterminate:H,onCheckedChange:({checked:e})=>{void 0===u&&O(e?P:[]),g&&g(e)}})}):null,o.map((t=>{return r.jsx(e.Table.ColumnHeader,{ref:e=>{$.current[t.key]=e},...(n=t.key,Zw(_,n)),role:t.sortable?"columnheader":void 0,"aria-sort":t.sortable&&"asc"===k.order?"ascending":t.sortable&&"desc"===k.order?"descending":void 0,...U(t),children:r.jsxs("div",{css:Bw,children:[t.label,t.sortable?r.jsxs("div",{css:Hw,children:[r.jsx(Of,{css:_w(k.key===t.key&&"asc"===k.order),icon:r.jsx(If,{style:{transform:"rotate(180deg)"}}),onClick:()=>z(t.key,"asc"),"aria-label":C.ascendingLabel}),r.jsx(Of,{css:_w(k.key===t.key&&"desc"===k.order),icon:r.jsx(If,{}),onClick:()=>z(t.key,"desc"),"aria-label":C.descendingLabel})]}):null]})},t.key);var n}))]})}),r.jsx(e.Table.Body,{css:Ww(a),children:P.map((e=>r.jsx(n.Fragment,{children:J(e,{className:G(e)?"selected":void 0,getCellProps:K})},e.id)))})]})}),b?r.jsx("div",{css:Kw,children:r.jsx(e.Spinner,{size:"lg",color:w("primary",500)})}):null,r.jsxs("div",{css:Fw,children:[r.jsx("div",{children:N?r.jsx(kw,{pageSize:R,currentPage:A,totalItems:L,onPageSizeChange:f,showItemCountText:D}):null}),c?r.jsx("div",{css:qw,children:r.jsx(Pw,{totalItems:L,pageSize:R,currentPage:A,onPageChange:m})}):null]})]})},exports.TableCell=Qw,exports.TableRow=Yw,exports.Tag=Iv,exports.TextInput=eg,exports.Textarea=({label:t,caption:o,placeholder:i,errorMessage:s,required:a,disabled:l,size:c="default",showOptionalLabel:d=!0,defaultValue:u="",onChange:h,minLength:p,maxLength:f,labels:m,...g})=>{const v=Mf("Textarea",m),[b,y]=n.useState(u),[x,w]=n.useState(!1),[C,k]=n.useState(!1),[S,$]=n.useState(""),j=n.useId(),M=n.useId(),E=n.useId();n.useEffect((()=>{const{length:e}=u;p&&e<p&&e>0?(w(e<p),k(!1),$(v.enterAtLeastChars(p-e))):p&&0===e&&$(v.minChars(p)),f&&e>0?(w(!1),k(e>f),$(v.charsRemaining(f-e))):f&&0===e&&$(v.maxChars(f))}),[]);const T=!!s||x||C,O=[o?j:null,T?M:null,S?E:null].filter(Boolean).join(" ")||void 0;return r.jsxs("div",{css:rb(c),children:[T?r.jsx("div",{css:ob}):null,r.jsxs(e.Field.Root,{required:a,invalid:T,gap:"0",style:{marginLeft:T?"1.1875rem":"0px"},children:[t?r.jsxs(e.Field.Label,{css:ib(c,l),"aria-label":t,children:[r.jsx(e.Field.RequiredIndicator,{"aria-label":v.requiredSymbolLabel}),t,!a&&d?r.jsx("span",{children:v.optionalSuffix}):null]}):null,o?r.jsx(e.Field.HelperText,{id:j,css:sb(c,l),children:o}):null,s?r.jsx(e.Field.ErrorText,{id:M,css:lb,"aria-label":`${v.errorPrefix} ${s}`,"aria-live":"polite",children:s}):null,r.jsx(e.Textarea,{placeholder:i,disabled:l,css:cb(c,b,u),onChange:e=>{y(e.target.value);const{length:t}=e.target.value;p&&f?(w(t<p),k(t>f),$(v.charsRemaining(f-t))):p?(w(t<p),k(!1),$(t<p?v.enterAtLeastChars(p-t):"")):f&&(k(t>f),w(!1),$(v.charsRemaining(f-t))),h&&h(e)},value:b,"aria-label":t||i,"aria-describedby":O,_placeholder:{color:"var(--chakra-colors-neutral-500)"},...g}),x&&p?r.jsx(e.Field.ErrorText,{id:M,css:lb,style:{marginTop:"0.5rem",fontSize:"0.75rem",lineHeight:"1rem"},"aria-live":"polite",children:v.needMoreChars(p-b.length)}):null,C&&f?r.jsx(e.Field.ErrorText,{id:M,css:lb,style:{marginTop:"0.5rem",fontSize:"0.75rem",lineHeight:"1rem"},"aria-live":"polite",children:v.tooManyChars(b.length-f)}):null,!S||C||x?null:r.jsx(e.Field.HelperText,{id:E,css:ab,"aria-live":"polite",children:S})]})]})},exports.Toast=({labels:t})=>{const n=Mf("Toast",t);return Object.keys(bL).map((t=>r.jsx(e.Portal,{children:r.jsx(e.Toaster,{toaster:bL[t],insetInline:{mdDown:"4"},children:o=>{return r.jsxs(e.Toast.Root,{css:(s=o.meta?.maxWidth,i.css`
|
|
4008
4008
|
justify-content: space-between;
|
|
4009
4009
|
align-items: center;
|
|
4010
4010
|
gap: ${k(200)};
|
|
@@ -4048,4 +4048,4 @@ function FM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
4048
4048
|
color: ${w("error",900)};
|
|
4049
4049
|
}
|
|
4050
4050
|
}
|
|
4051
|
-
`),width:{md:"sm"},children:[r.jsxs(e.Stack,{flexDirection:"row",className:"ds-toast-icon-container",alignItems:o.description?"flex-start":"center",children:["info"===o.type?o.meta?.icon?o.meta.icon:r.jsx(Df,{color:"var(--chakra-colors-neutral-700)"}):null,"loading"===o.type?r.jsx(e.Spinner,{size:"lg",borderWidth:"0.1875rem",color:"var(--chakra-colors-primary-500)"}):null,"success"===o.type?o.meta?.icon?o.meta.icon:r.jsx(_f,{color:"var(--chakra-colors-success-500)"}):null,"warning"===o.type?o.meta?.icon?o.meta.icon:r.jsx(Ff,{color:"var(--chakra-colors-warning-500)"}):null,"error"===o.type?o.meta?.icon?o.meta.icon:r.jsx(qf,{color:"var(--chakra-colors-error-500)"}):null,r.jsxs(e.Stack,{gap:"1",flex:"1",maxWidth:"100%",children:[r.jsx(e.Toast.Title,{css:
|
|
4051
|
+
`),width:{md:"sm"},children:[r.jsxs(e.Stack,{flexDirection:"row",className:"ds-toast-icon-container",alignItems:o.description?"flex-start":"center",children:["info"===o.type?o.meta?.icon?o.meta.icon:r.jsx(Df,{color:"var(--chakra-colors-neutral-700)"}):null,"loading"===o.type?r.jsx(e.Spinner,{size:"lg",borderWidth:"0.1875rem",color:"var(--chakra-colors-primary-500)"}):null,"success"===o.type?o.meta?.icon?o.meta.icon:r.jsx(_f,{color:"var(--chakra-colors-success-500)"}):null,"warning"===o.type?o.meta?.icon?o.meta.icon:r.jsx(Ff,{color:"var(--chakra-colors-warning-500)"}):null,"error"===o.type?o.meta?.icon?o.meta.icon:r.jsx(qf,{color:"var(--chakra-colors-error-500)"}):null,r.jsxs(e.Stack,{gap:"1",flex:"1",maxWidth:"100%",children:[r.jsx(e.Toast.Title,{css:pL,"aria-label":`${o.title}`,children:o.title}),o.description?r.jsx(e.Toast.Title,{css:fL,"aria-label":`${o.description}`,children:o.description}):null]})]}),o.action||o.meta?.closable?r.jsxs(e.Stack,{flexDirection:"row",children:[o.action?r.jsx(Ef,{css:mL,label:o.action.label,size:"small",variant:"info"===o.type?"primary":"secondary",onClick:()=>{o?.action?.onClick&&o.action.onClick(),bL[t].dismiss()}}):null,o.meta?.closable?r.jsx(Ef,{css:gL,label:o.meta.closableLabel,"aria-label":o.meta?.closableLabel||n.dismissLabel,leftIcon:r.jsx(zf,{height:"0.625rem!",width:"0.625rem!"}),size:"small",variant:"secondary",onClick:()=>{o.meta?.onClose&&o.meta.onClose(),bL[t].dismiss()}}):null]}):null]});var s}})},t)))},exports.Toolbar=pg,exports.Tooltip=Lm,exports.closeToast=e=>{Object.values(bL).forEach((t=>{t.dismiss(e)}))},exports.designSystemStyles=x,exports.designSystemStylesForTailwind=y,exports.getThemedBorderWidth=j,exports.getThemedColor=w,exports.getThemedFontSize=C,exports.getThemedLineHeight=S,exports.getThemedRadius=$,exports.getThemedSpacing=k,exports.showToast=e=>{bL[e.placement].create({title:e.label,description:e.caption,duration:e.duration||5e3,meta:{closable:e.closable,icon:e.icon,closableLabel:e.closableLabel,onClose:e.onClose,maxWidth:e.maxWidth},...e})};
|