@yext/pages-components 1.1.10 → 1.1.11

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.
@@ -1,4 +1,4 @@
1
- import { g as C, j as o, c as j } from "./index-BdqMb-Um.js";
1
+ import { g as C, j as o, c as j } from "./index-DKVTGEU-.js";
2
2
  import { useState as w, useEffect as N, useRef as O } from "react";
3
3
  import { createPortal as D } from "react-dom";
4
4
  function z() {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-B42syM2P.cjs"),m=require("react"),N=require("react-dom");function S(){return i.getRuntime().name!=="browser"||window.hasOwnProperty("debuggerInitialized")?null:(window.debuggerInitialized=!0,N.createPortal(i.jsxRuntimeExports.jsx(k,{}),document.body))}const B=(e,n)=>{const s=e.dataset.yaAction,t=e.dataset.yaScopeoverride,r=e.dataset.yaEventname,c=t||n;return{action:s,originalEventName:c?`${c}_${r}`:r,scope:c}},C=(e,n)=>{const s=[];let t=e;for(;t!=null&&t.parentElement;)t=t.parentElement.closest(n),t&&s.push(t);return s},b={},R="YA_NO_SCOPE",w=(e,n,s,t)=>{b.hasOwnProperty(e)?b[e].events.map(r=>r.el).includes(t)||(b[e].events=[...b[e].events,{eventData:n,el:t}]):b[e]={scopeEl:s||t,events:[{eventData:n,el:t}]}};function k(){const[e,n]=m.useState(),[s,t]=m.useState([]),[r,c]=m.useState(!1),o=a=>{n(e===a?void 0:a)};return m.useEffect(()=>{let a=null;const d=()=>{a&&a.abort(),a=new AbortController;const l=a.signal;document.documentElement.classList.add("xYextDebug"),document.querySelectorAll("[data-ya-eventname]").forEach((u,j)=>{const p=u.closest("[data-ya-scope]"),v=p==null?void 0:p.dataset.yaScope,x=B(u,v);u.addEventListener("mouseenter",()=>{t([{elem:u,key:`${x.originalEventName}_${j}`,action:x.action,originalEventName:x.originalEventName,scope:x.scope}])},{signal:l}),u.addEventListener("mouseleave",()=>{t([])},{signal:l});const E=u.dataset.yaScopeoverride;E?w(E,x,p,u):[v,...C(u,"[data-ya-scope]").map(y=>y.dataset.yaScope)].forEach(y=>{w(y||R,x,p,u)})}),c(!0)};d();const g=new MutationObserver(d);return g.observe(document,{childList:!0,subtree:!0}),()=>{document.documentElement.classList.remove("xYextDebug"),g.disconnect(),a==null||a.abort()}},[]),r?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsxs("div",{className:"analytics-debugger",children:[i.jsxRuntimeExports.jsxs("div",{className:"analytics-debugger-toggles",children:[i.jsxRuntimeExports.jsx("button",{className:i.c("analytics-debugger-toggle",{"is-active":e==="Events"}),onClick:()=>o("Events"),children:"Events"}),i.jsxRuntimeExports.jsx("button",{className:i.c("analytics-debugger-toggle",{"is-active":e==="Scopes"}),onClick:()=>o("Scopes"),children:"Scopes"})]}),e&&i.jsxRuntimeExports.jsx("div",{className:"analytics-debugger-tabs",children:e==="Events"?i.jsxRuntimeExports.jsx(D,{data:b,setTooltips:t}):i.jsxRuntimeExports.jsx($,{data:b,setTooltips:t})})]}),i.jsxRuntimeExports.jsx(Y,{tooltips:s})]}):null}const O=()=>{const e={};return Object.values(b).forEach(n=>{n.events.forEach(s=>{const{originalEventName:t}=s.eventData;e[t]||(e[t]=[]),!e[t].find(r=>r.el===s.el)&&e[t].push(s)})}),e};function D(e){const{setTooltips:n}=e,[s,t]=m.useState([]),[r,c]=m.useState(""),o=(a,d)=>{s.forEach(l=>l.classList.remove("analytics-event-highlight"));const g=a.map(l=>(l.el.scrollIntoView({behavior:"smooth",block:"nearest"}),l.el.classList.add("analytics-event-highlight"),l.el));t(g),c(d),n(a.map((l,h)=>({elem:l.el,key:`${l.eventData.originalEventName}_${h}`,action:l.eventData.action,originalEventName:l.eventData.originalEventName,scope:l.eventData.scope})))};return i.jsxRuntimeExports.jsxs("div",{className:"analytics-debugger-tab",children:[i.jsxRuntimeExports.jsx("h2",{className:"analytics-debugger-tab-title",children:"Event Names"}),i.jsxRuntimeExports.jsx("ul",{className:"analytics-debugger-list",children:Object.entries(O()).map(([a,d],g)=>{const l=`${a}_${g}`;return i.jsxRuntimeExports.jsx("li",{className:"analytics-debugger-listItem",children:i.jsxRuntimeExports.jsx("button",{className:i.c("analytics-debugger-button",{"is-active":l===r}),onClick:()=>o(d,l),children:a})},l)})})]})}function $(e){const{data:n,setTooltips:s}=e,[t,r]=m.useState(""),c=o=>{const a=n[o];a.scopeEl&&(a.scopeEl.scrollIntoView({behavior:"smooth",block:"nearest"}),r(o),s(a.events.map((d,g)=>{const l=d.eventData;return{elem:d.el,key:`${l.originalEventName}_${g}`,action:l.action,originalEventName:l.originalEventName,scope:l.scope}})))};return i.jsxRuntimeExports.jsxs("div",{className:"analytics-debugger-tab",children:[i.jsxRuntimeExports.jsx("h2",{className:"analytics-debugger-tab-title",children:"Scope Names"}),i.jsxRuntimeExports.jsx("ul",{className:"analytics-debugger-list",children:Object.keys(n).map((o,a)=>{if(o!==R)return i.jsxRuntimeExports.jsx("li",{className:"analytics-debugger-listItem",children:i.jsxRuntimeExports.jsx("button",{className:i.c("analytics-debugger-button",{"is-active":o===t}),onClick:()=>c(o),children:o})},o+a)})})]})}function Y(e){const n=m.useRef({});return m.useEffect(()=>{if(n.current)for(const s of Object.values(n.current)){const t=Object.values(n.current).map(r=>r.el).filter(r=>r!==s.el);T(s,t),s.el.style.visibility="visible"}},[e.tooltips]),i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:e.tooltips.map(s=>i.jsxRuntimeExports.jsxs("div",{style:{visibility:"hidden"},className:"analytics-debugger-tooltip",ref:t=>{t?n.current[s.key]={el:t,tooltip:s}:delete n.current[s.key]},children:[i.jsxRuntimeExports.jsxs("span",{children:["Action: ",s.action]}),i.jsxRuntimeExports.jsx("br",{}),i.jsxRuntimeExports.jsxs("span",{children:["Scope: ",s.scope]}),i.jsxRuntimeExports.jsx("br",{}),i.jsxRuntimeExports.jsxs("span",{children:["Original Event Name: ",s.originalEventName]})]},s.key))})}function T(e,n){for(let s=0;s<9;s++){const t=I(e.tooltip.elem.getBoundingClientRect(),e.el,s);if(e.el.style.inset=`${t.top} auto auto ${t.left}`,!!L(e.el.getBoundingClientRect().left,e.el.getBoundingClientRect().top+window.scrollY,e.el.getBoundingClientRect().right,e.el.getBoundingClientRect().bottom+window.scrollY))continue;let c=!0;for(let o=0;o<n.length;o++){const a=n[o];A(e.el,a)&&(c=!1)}if(c)break}}function A(e,n){const s=e.getBoundingClientRect().top+window.scrollY,t=e.getBoundingClientRect().left,r=s+e.clientHeight,c=t+e.clientWidth,o=n.getBoundingClientRect().top+window.scrollY,a=n.getBoundingClientRect().left,d=o+n.clientHeight,g=a+n.clientWidth,l=(h,u,j,p,v,x,E,f)=>j<=v&&v<=E&&p<=x&&x<=f||j<=h&&h<=E&&p<=u&&u<=f||j<=h&&h<=E&&p<=x&&x<=f||j<=v&&v<=E&&p<=u&&u<=f;return l(t,s,a,o,c,r,g,d)||l(a,o,t,s,g,d,c,r)}function L(e,n,s,t){return e<0||s>window.innerWidth||n<0||t>document.documentElement.scrollHeight}function I(e,n,s){const t=n.clientHeight,r=n.clientWidth;let c,o;switch(s){case 0:{o=window.scrollY+e.top-t+"px",c=e.left-r+"px";break}case 1:{o=window.scrollY+e.top-t+"px",c=e.left+"px";break}case 2:{o=window.scrollY+e.top-t+"px",c=e.right+"px";break}case 3:{o=window.scrollY+e.top-t+"px",c=e.right-r+"px";break}case 4:{o=window.scrollY+e.bottom+"px",c=e.left-r+"px";break}case 5:{o=window.scrollY+e.bottom+"px",c=e.left+"px";break}case 6:{o=window.scrollY+e.bottom+"px",c=e.right-r+"px";break}case 7:{o=window.scrollY+e.bottom+"px",c=e.right+"px";break}default:o=0,c=0}return{top:o,left:c}}exports.AnalyticsDebuggerInternal=k;exports.default=S;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-BUNvw5E2.cjs"),m=require("react"),N=require("react-dom");function S(){return i.getRuntime().name!=="browser"||window.hasOwnProperty("debuggerInitialized")?null:(window.debuggerInitialized=!0,N.createPortal(i.jsxRuntimeExports.jsx(k,{}),document.body))}const B=(e,n)=>{const s=e.dataset.yaAction,t=e.dataset.yaScopeoverride,r=e.dataset.yaEventname,c=t||n;return{action:s,originalEventName:c?`${c}_${r}`:r,scope:c}},C=(e,n)=>{const s=[];let t=e;for(;t!=null&&t.parentElement;)t=t.parentElement.closest(n),t&&s.push(t);return s},b={},R="YA_NO_SCOPE",w=(e,n,s,t)=>{b.hasOwnProperty(e)?b[e].events.map(r=>r.el).includes(t)||(b[e].events=[...b[e].events,{eventData:n,el:t}]):b[e]={scopeEl:s||t,events:[{eventData:n,el:t}]}};function k(){const[e,n]=m.useState(),[s,t]=m.useState([]),[r,c]=m.useState(!1),o=a=>{n(e===a?void 0:a)};return m.useEffect(()=>{let a=null;const d=()=>{a&&a.abort(),a=new AbortController;const l=a.signal;document.documentElement.classList.add("xYextDebug"),document.querySelectorAll("[data-ya-eventname]").forEach((u,j)=>{const p=u.closest("[data-ya-scope]"),v=p==null?void 0:p.dataset.yaScope,x=B(u,v);u.addEventListener("mouseenter",()=>{t([{elem:u,key:`${x.originalEventName}_${j}`,action:x.action,originalEventName:x.originalEventName,scope:x.scope}])},{signal:l}),u.addEventListener("mouseleave",()=>{t([])},{signal:l});const E=u.dataset.yaScopeoverride;E?w(E,x,p,u):[v,...C(u,"[data-ya-scope]").map(y=>y.dataset.yaScope)].forEach(y=>{w(y||R,x,p,u)})}),c(!0)};d();const g=new MutationObserver(d);return g.observe(document,{childList:!0,subtree:!0}),()=>{document.documentElement.classList.remove("xYextDebug"),g.disconnect(),a==null||a.abort()}},[]),r?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsxs("div",{className:"analytics-debugger",children:[i.jsxRuntimeExports.jsxs("div",{className:"analytics-debugger-toggles",children:[i.jsxRuntimeExports.jsx("button",{className:i.c("analytics-debugger-toggle",{"is-active":e==="Events"}),onClick:()=>o("Events"),children:"Events"}),i.jsxRuntimeExports.jsx("button",{className:i.c("analytics-debugger-toggle",{"is-active":e==="Scopes"}),onClick:()=>o("Scopes"),children:"Scopes"})]}),e&&i.jsxRuntimeExports.jsx("div",{className:"analytics-debugger-tabs",children:e==="Events"?i.jsxRuntimeExports.jsx(D,{data:b,setTooltips:t}):i.jsxRuntimeExports.jsx($,{data:b,setTooltips:t})})]}),i.jsxRuntimeExports.jsx(Y,{tooltips:s})]}):null}const O=()=>{const e={};return Object.values(b).forEach(n=>{n.events.forEach(s=>{const{originalEventName:t}=s.eventData;e[t]||(e[t]=[]),!e[t].find(r=>r.el===s.el)&&e[t].push(s)})}),e};function D(e){const{setTooltips:n}=e,[s,t]=m.useState([]),[r,c]=m.useState(""),o=(a,d)=>{s.forEach(l=>l.classList.remove("analytics-event-highlight"));const g=a.map(l=>(l.el.scrollIntoView({behavior:"smooth",block:"nearest"}),l.el.classList.add("analytics-event-highlight"),l.el));t(g),c(d),n(a.map((l,h)=>({elem:l.el,key:`${l.eventData.originalEventName}_${h}`,action:l.eventData.action,originalEventName:l.eventData.originalEventName,scope:l.eventData.scope})))};return i.jsxRuntimeExports.jsxs("div",{className:"analytics-debugger-tab",children:[i.jsxRuntimeExports.jsx("h2",{className:"analytics-debugger-tab-title",children:"Event Names"}),i.jsxRuntimeExports.jsx("ul",{className:"analytics-debugger-list",children:Object.entries(O()).map(([a,d],g)=>{const l=`${a}_${g}`;return i.jsxRuntimeExports.jsx("li",{className:"analytics-debugger-listItem",children:i.jsxRuntimeExports.jsx("button",{className:i.c("analytics-debugger-button",{"is-active":l===r}),onClick:()=>o(d,l),children:a})},l)})})]})}function $(e){const{data:n,setTooltips:s}=e,[t,r]=m.useState(""),c=o=>{const a=n[o];a.scopeEl&&(a.scopeEl.scrollIntoView({behavior:"smooth",block:"nearest"}),r(o),s(a.events.map((d,g)=>{const l=d.eventData;return{elem:d.el,key:`${l.originalEventName}_${g}`,action:l.action,originalEventName:l.originalEventName,scope:l.scope}})))};return i.jsxRuntimeExports.jsxs("div",{className:"analytics-debugger-tab",children:[i.jsxRuntimeExports.jsx("h2",{className:"analytics-debugger-tab-title",children:"Scope Names"}),i.jsxRuntimeExports.jsx("ul",{className:"analytics-debugger-list",children:Object.keys(n).map((o,a)=>{if(o!==R)return i.jsxRuntimeExports.jsx("li",{className:"analytics-debugger-listItem",children:i.jsxRuntimeExports.jsx("button",{className:i.c("analytics-debugger-button",{"is-active":o===t}),onClick:()=>c(o),children:o})},o+a)})})]})}function Y(e){const n=m.useRef({});return m.useEffect(()=>{if(n.current)for(const s of Object.values(n.current)){const t=Object.values(n.current).map(r=>r.el).filter(r=>r!==s.el);T(s,t),s.el.style.visibility="visible"}},[e.tooltips]),i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:e.tooltips.map(s=>i.jsxRuntimeExports.jsxs("div",{style:{visibility:"hidden"},className:"analytics-debugger-tooltip",ref:t=>{t?n.current[s.key]={el:t,tooltip:s}:delete n.current[s.key]},children:[i.jsxRuntimeExports.jsxs("span",{children:["Action: ",s.action]}),i.jsxRuntimeExports.jsx("br",{}),i.jsxRuntimeExports.jsxs("span",{children:["Scope: ",s.scope]}),i.jsxRuntimeExports.jsx("br",{}),i.jsxRuntimeExports.jsxs("span",{children:["Original Event Name: ",s.originalEventName]})]},s.key))})}function T(e,n){for(let s=0;s<9;s++){const t=I(e.tooltip.elem.getBoundingClientRect(),e.el,s);if(e.el.style.inset=`${t.top} auto auto ${t.left}`,!!L(e.el.getBoundingClientRect().left,e.el.getBoundingClientRect().top+window.scrollY,e.el.getBoundingClientRect().right,e.el.getBoundingClientRect().bottom+window.scrollY))continue;let c=!0;for(let o=0;o<n.length;o++){const a=n[o];A(e.el,a)&&(c=!1)}if(c)break}}function A(e,n){const s=e.getBoundingClientRect().top+window.scrollY,t=e.getBoundingClientRect().left,r=s+e.clientHeight,c=t+e.clientWidth,o=n.getBoundingClientRect().top+window.scrollY,a=n.getBoundingClientRect().left,d=o+n.clientHeight,g=a+n.clientWidth,l=(h,u,j,p,v,x,E,f)=>j<=v&&v<=E&&p<=x&&x<=f||j<=h&&h<=E&&p<=u&&u<=f||j<=h&&h<=E&&p<=x&&x<=f||j<=v&&v<=E&&p<=u&&u<=f;return l(t,s,a,o,c,r,g,d)||l(a,o,t,s,g,d,c,r)}function L(e,n,s,t){return e<0||s>window.innerWidth||n<0||t>document.documentElement.scrollHeight}function I(e,n,s){const t=n.clientHeight,r=n.clientWidth;let c,o;switch(s){case 0:{o=window.scrollY+e.top-t+"px",c=e.left-r+"px";break}case 1:{o=window.scrollY+e.top-t+"px",c=e.left+"px";break}case 2:{o=window.scrollY+e.top-t+"px",c=e.right+"px";break}case 3:{o=window.scrollY+e.top-t+"px",c=e.right-r+"px";break}case 4:{o=window.scrollY+e.bottom+"px",c=e.left-r+"px";break}case 5:{o=window.scrollY+e.bottom+"px",c=e.left+"px";break}case 6:{o=window.scrollY+e.bottom+"px",c=e.right-r+"px";break}case 7:{o=window.scrollY+e.bottom+"px",c=e.right+"px";break}default:o=0,c=0}return{top:o,left:c}}exports.AnalyticsDebuggerInternal=k;exports.default=S;
@@ -1,5 +1,5 @@
1
1
  import zn from "react";
2
- import { n as cr, a as fr, b as Hn, m as K, d as D, s as In, p as Sn, r as Pe, e as De, f as Tn, h as vn, i as me, k as pr, l as hr, o as dr, q as ge, t as bn, u as mr, v as gr } from "./index-BdqMb-Um.js";
2
+ import { n as cr, a as fr, b as Hn, m as K, d as D, s as In, p as Sn, r as Pe, e as De, f as Tn, h as vn, i as me, k as pr, l as hr, o as dr, q as ge, t as bn, u as mr, v as gr } from "./index-DKVTGEU-.js";
3
3
  function yr(n) {
4
4
  const t = [];
5
5
  let e = -1;
@@ -29,11 +29,11 @@ React keys must be passed directly to JSX without using spread:
29
29
  let props = %s;
30
30
  <%s key={someKey} {...props} />`,sr,Zn,or,Zn),It[Zn+sr]=!0}}return pe===r?nn(an):Kt(an),an}}function bt(pe,Ze,lt){return Vt(pe,Ze,lt,!0)}function rn(pe,Ze,lt){return Vt(pe,Ze,lt,!1)}var Or=rn,_i=bt;jl.Fragment=r,jl.jsx=Or,jl.jsxs=_i}()),jl}process.env.NODE_ENV==="production"?zu.exports=oy():zu.exports=ly();var nt=zu.exports;function ay(e){switch(e){case"AD":case"AM":case"AT":case"AX":case"AZ":case"BA":case"BY":case"CY":case"CZ":case"DK":case"DZ":case"EC":case"EH":case"ET":case"FI":case"FR":case"GE":case"GF":case"GI":case"GP":case"GW":case"HT":case"KE":case"KV":case"KW":case"LA":case"LU":case"MC":case"MD":case"ME":case"MG":case"MK":case"MQ":case"MZ":case"NC":case"NL":case"NO":case"PL":case"PT":case"PY":case"RE":case"RS":case"SA":case"SE":case"SJ":case"SM":case"SN":case"TC":case"TJ":case"TM":case"TN":case"TZ":case"UY":case"VG":case"ZM":return[["line1"],["line2"],["postalCode","city"],["countryCode"]];case"AF":case"IR":return[["line1"],["line2"],["city"],["region"],["postalCode"],["countryCode"]];case"AG":case"AO":case"AW":case"BJ":case"BO":case"BS":case"BZ":case"CI":case"CW":case"DJ":case"FJ":case"GA":case"GH":case"GM":case"GY":case"JM":case"KI":case"LY":case"MW":case"NA":case"NR":case"PS":case"QA":case"RW":case"SC":case"SR":case"SX":case"TG":case"TT":case"UG":case"VU":return[["line1"],["line2"],["city"],["countryCode"]];case"AL":case"EE":case"IS":return[["line1"],["line2"],["postalCode","city"]];case"AR":return[["line1"],["line2"],["postalCode","city",",","region"],["countryCode"]];case"AS":case"BB":case"BD":case"BM":case"BN":case"BT":case"CR":case"DO":case"FK":case"FM":case"GR":case"GU":case"JO":case"KZ":case"LB":case"LK":case"LS":case"MA":case"MH":case"MM":case"MR":case"MT":case"MV":case"NG":case"PG":case"PK":case"PR":case"RO":case"SG":case"VC":case"WS":return[["line1"],["line2"],["city","postalCode"],["countryCode"]];case"AU":case"CA":case"SZ":case"US":case"VI":return[["line1"],["line2"],["city",",","region","postalCode"],["countryCode"]];case"BE":case"PE":return[["line1"],["line2"],["postalCode","sublocality","city"],["countryCode"]];case"BF":case"BI":case"BQ":case"BW":case"CF":case"CG":case"CM":case"DM":case"ER":case"GQ":case"KM":case"ML":case"SY":case"TD":case"ZW":return[["line1"],["line2"],["city"],["region"],["countryCode"]];case"BG":return[["line1"],["postalCode","region"],["countryCode"]];case"BH":return[["line1"],["line2"],["sublocality","city"],["countryCode"]];case"BR":return[["line1"],["line2"],["sublocality"],["city","region"],["postalCode"],["countryCode"]];case"CH":case"DE":case"GT":case"IT":case"LI":case"MY":case"NI":case"OM":case"SK":case"VA":return[["line1"],["line2"],["postalCode","city","region"],["countryCode"]];case"CL":case"PF":return[["line1"],["line2"],["city","postalCode","region"],["countryCode"]];case"CN":return[["region","city","sublocality"],["line1"],["line2"],["countryCode"]];case"CO":case"ID":case"IQ":case"KH":case"MP":case"NP":case"PW":case"UA":return[["line1"],["line2"],["city","region","postalCode"],["countryCode"]];case"EG":return[["line1"],["line2"],["sublocality","city","region","postalCode"],["countryCode"]];case"ES":case"IL":return[["line1"],["line2"],["city","postalCode"],["region"],["countryCode"]];case"GB":case"MN":case"ZA":return[["line1"],["line2"],["sublocality","city","postalCode"],["countryCode"]];case"GG":case"IM":case"JE":return[["line1"],["line2"],["sublocality"],["city"],["postalCode"],["countryCode"]];case"GN":return[["line1","line2","city"],["countryCode"]];case"HK":return[["line1"],["line2"],["sublocality"],["city"],["region"],["countryCode"]];case"HR":return[["line1"],["postalCode","city","region"],["countryCode"]];case"HU":case"SI":return[["postalCode","city"],["line1"],["line2"],["countryCode"]];case"IE":return[["line1"],["line2"],["sublocality"],["city","region","postalCode"],["countryCode"]];case"IN":case"VE":return[["line1"],["line2"],["city","postalCode"],["region"],["countryCode"]];case"JP":return[["line2"],["line1","sublocality"],["city","region"],["postalCode"],["countryCode"]];case"KR":return[["countryCode"],["region","city","sublocality","line1"],["line2"],["postalCode"]];case"KY":return[["line1"],["line2"],["postalCode"],["countryCode"]];case"LT":return[["line1"],["postalCode","city","sublocality","region"],["countryCode"]];case"LV":return[["line1"],["city",",","postalCode"],["countryCode"]];case"MO":return[["line1"],["line2"],["sublocality"],["city"],["countryCode"]];case"MU":return[["line1"],["line2"],["city"],["region","postalCode"],["countryCode"]];case"MX":return[["line1"],["line2"],["sublocality"],["postalCode","city",",","region"],["countryCode"]];case"NE":case"SD":return[["line1"],["line2"],["postalCode"],["city"],["region"],["countryCode"]];case"NZ":return[["line1"],["line2"],["sublocality"],["city"],["postalCode"],["countryCode"]];case"PH":case"TW":case"VN":return[["line1"],["line2"],["sublocality","city"],["region","postalCode"],["countryCode"]];case"RU":return[["line1"],["line2"],["city"],["postalCode"],["countryCode"]];case"SB":case"SL":case"ST":case"TL":case"TO":case"TV":return[["line1"],["line2"],["city",",","region"],["countryCode"]];case"TH":case"TR":return[["line1"],["line2"],["sublocality"],["postalCode","city"],["countryCode"]];case"UZ":return[["line1"],["line2"],["region","postalCode"],["countryCode"]]}return[["line1","line2"],["city","region","postalCode"],["countryCode"]]}const ap={GOOGLEMYBUSINESS:"GOOGLEMYBUSINESS"},Uu={GOOGLE:"google",APPLE:"apple",BING:"bing"},cy=(e,t)=>{const r={region:"localizedRegionName",countryCode:"localizedCountryName"}[e];return r&&t[r]},uy=(e,t=[],n,r={route:!1},l)=>{const d="Failed to construct query for maps service.";let f=e&&Tf([e.line1,e.line2,e.city,e.region,e.postalCode,e.countryCode]);switch(r.provider){case Uu.APPLE:{if(l!=null&&l.latitude&&(l!=null&&l.longitude))return Nf(`${l.latitude},${l.longitude}`,r.route);if(!f){console.warn(`${d} Check that you've provided a valid Yext Address.`);break}return Nf(f,r.route)}case Uu.BING:{if(l!=null&&l.latitude&&(l!=null&&l.longitude))return Cf(`${l.latitude},${l.longitude}`,r.route);if(f=e&&Tf([e.line1,e.city,e.region,e.postalCode]),!f){console.warn(`${d} Check that you've provided a valid Yext Address.`);break}return Cf(f,r.route)}default:{if(l!=null&&l.latitude&&(l!=null&&l.longitude))return Ef(`${l.latitude},${l.longitude}`,r.route);const p=t.find(_=>{var E;return((E=_==null?void 0:_.publisher)==null?void 0:E.toUpperCase())===ap.GOOGLEMYBUSINESS});if(p!=null&&p.listingUrl)return p.listingUrl;if(n)return dy(n,f,r.route);if(!f){console.warn(`${d} Check that you've provided a valid Yext Address, Yext ListingType, or Google Place ID.`);break}return Ef(f,r.route)}}},Nf=(e,t)=>t?`https://maps.apple.com/?daddr=${e}`:`https://maps.apple.com/?address=${e}`,Cf=(e,t)=>t?`https://bing.com/maps/default.aspx?rtp=adr.${e}`:`https://bing.com/maps/default.aspx?where1=${e}`,dy=(e,t,n)=>{const r=t?`&query=${t}`:"";return n?`https://maps.google.com/maps/dir/?api=1${r}&destination_place_id=${e}&destination=direct`:r?`https://maps.google.com/maps/search/?api=1${r}&query_place_id=${e}`:`https://maps.google.com/maps/dir/?api=1&destination_place_id=${e}&destination=direct`},Ef=(e,t)=>t?`https://maps.google.com/maps/dir/?api=1&destination=${e}`:`https://maps.google.com/maps/search/?api=1&query=${e}`,Tf=(e=[])=>{if(!e.length)return"";const t=e.filter(Boolean).join(", ");return encodeURI(t)},fy=({address:e,lines:t,separator:n=",",...r})=>{const l=(t||ay(e.countryCode)).map(d=>nt.jsx(hy,{address:e,line:d,separator:n},d.toString()));return rt.createElement("div",{...r,key:e.toString()},l)},hy=({address:e,line:t,separator:n})=>{const r=[];let l=0;for(const d of t){if(d===","){r.push(nt.jsx("span",{children:n},`separator-${l++}`));continue}const f=e[d];if(!f)continue;const p=cy(d,e);if(p){r.push(nt.jsxs(sy.Fragment,{children:[" ",nt.jsx("abbr",{title:p,children:f})]},d));continue}r.push(nt.jsx("span",{children:" "+f},d))}return nt.jsx("div",{className:"address-line",children:r})};var tl={};Object.defineProperty(tl,"__esModule",{value:!0});var gy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},py=typeof window<"u"&&typeof window.document<"u",my=typeof process<"u"&&process.versions!=null&&process.versions.node!=null,_y=(typeof self>"u"?"undefined":gy(self))==="object"&&self.constructor&&self.constructor.name==="DedicatedWorkerGlobalScope",yy=typeof window<"u"&&window.name==="nodejs"||typeof navigator<"u"&&(navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom")),Ny=typeof Deno<"u"&&typeof Deno.version<"u"&&typeof Deno.version.deno<"u",xf=tl.isBrowser=py;tl.isWebWorker=_y;var Cy=tl.isNode=my;tl.isJsDom=yy;var Ey=tl.isDeno=Ny;class Ty{constructor(){Ie(this,"name");Ie(this,"isServerSide");Ie(this,"version");var t;Ey?(this.name="deno",this.version="",xf&&(this.version=((t=window.Deno)==null?void 0:t.version.deno)||""),this.isServerSide=!0):Cy?(this.name="node",this.version=process.versions.node,this.isServerSide=!0):xf?(this.name="browser",this.version=navigator.userAgent,this.isServerSide=!1):(this.name="unknown",this.version="",this.isServerSide=!1)}getNodeMajorVersion(){if(this.name!=="node")throw new Error("Not running in Node.");return+this.version.split(".")[0]}}const Qo=()=>new Ty,xy=(...e)=>{var t;if(typeof window<"u"){if(window.IS_PRODUCTION)return!0;const n=(t=window.location)==null?void 0:t.hostname;return e==null?void 0:e.some(r=>r==null?void 0:r.includes(n))}return!1};function qc(e){if(!gd(e))throw new Error("Parameter was not an error")}function gd(e){return!!e&&typeof e=="object"&&vy(e)==="[object Error]"||e instanceof Error}function vy(e){return Object.prototype.toString.call(e)}const Sy="Layerr";let wy=Sy;function Oy(){return wy}function Dy(e){let t,n="";if(e.length===0)t={};else if(gd(e[0]))t={cause:e[0]},n=e.slice(1).join(" ")||"";else if(e[0]&&typeof e[0]=="object")t=Object.assign({},e[0]),n=e.slice(1).join(" ")||"";else if(typeof e[0]=="string")t={},n=n=e.join(" ")||"";else throw new Error("Invalid arguments passed to Layerr");return{options:t,shortMessage:n}}class Di extends Error{constructor(t,n){const r=[...arguments],{options:l,shortMessage:d}=Dy(r);let f=d;if(l.cause&&(f=`${f}: ${l.cause.message}`),super(f),this.message=f,l.name&&typeof l.name=="string"?this.name=l.name:this.name=Oy(),l.cause&&Object.defineProperty(this,"_cause",{value:l.cause}),Object.defineProperty(this,"_info",{value:{}}),l.info&&typeof l.info=="object"&&Object.assign(this._info,l.info),Error.captureStackTrace){const p=l.constructorOpt||this.constructor;Error.captureStackTrace(this,p)}}static cause(t){return qc(t),t._cause&&gd(t._cause)?t._cause:null}static fullStack(t){qc(t);const n=Di.cause(t);return n?`${t.stack}
31
31
  caused by: ${Di.fullStack(n)}`:t.stack??""}static info(t){qc(t);const n={},r=Di.cause(t);return r&&Object.assign(n,Di.info(r)),t._info&&Object.assign(n,t._info),n}toString(){let t=this.name||this.constructor.name||this.constructor.prototype.name;return this.message&&(t=`${t}: ${this.message}`),t}}const cp="0123456789ABCDEFGHJKMNPQRSTVWXYZ",ia=32,vf=0xffffffffffff,Ay=10,My=16,ea=Object.freeze({source:"ulid"});function Ry(e){const t=by(),n=t&&(t.crypto||t.msCrypto)||null;if(typeof(n==null?void 0:n.getRandomValues)=="function")return()=>{const r=new Uint8Array(1);return n.getRandomValues(r),r[0]/255};if(typeof(n==null?void 0:n.randomBytes)=="function")return()=>n.randomBytes(1).readUInt8()/255;throw new Di({info:{code:"PRNG_DETECT",...ea}},"Failed to find a reliable PRNG")}function by(){return ky()?self:typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:null}function Ly(e,t){let n="";for(;e>0;e--)n=Py(t)+n;return n}function Iy(e,t){if(isNaN(e))throw new Di({info:{code:"ENC_TIME_NAN",...ea}},`Time must be a number: ${e}`);if(e>vf)throw new Di({info:{code:"ENC_TIME_SIZE_EXCEED",...ea}},`Cannot encode a time larger than ${vf}: ${e}`);if(e<0)throw new Di({info:{code:"ENC_TIME_NEG",...ea}},`Time must be positive: ${e}`);if(Number.isInteger(e)===!1)throw new Di({info:{code:"ENC_TIME_TYPE",...ea}},`Time must be an integer: ${e}`);let n,r="";for(let l=t;l>0;l--)n=e%ia,r=cp.charAt(n)+r,e=(e-n)/ia;return r}function ky(){return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope}function Py(e){let t=Math.floor(e()*ia);return t===ia&&(t=ia-1),cp.charAt(t)}function $y(e,t){const n=Ry(),r=isNaN(e)?Date.now():e;return Iy(r,Ay)+Ly(My,n)}var Sf="yext_analytics_session_id";function Fy(){if(typeof window>"u")return null;try{var e=window.sessionStorage.getItem(Sf);return e||(e=$y(),window.sessionStorage.setItem(Sf,e)),e}catch(t){return console.warn(`Unable to use browser sessionStorage for sessionId.
32
- `,t),null}}const By="1.0.0",wf={version:By};function Hy(e,t,n){return n.debug?(up(!0,t,n),!0):navigator.sendBeacon(e,JSON.stringify(t))}function Wy(e,t,n){return n.debug?(up(!1,t,n),Promise.resolve(new Response)):fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),keepalive:!0})}function Ky(e,t){return!t&&!!navigator.userAgent&&navigator.userAgent.toLowerCase().includes("firefox")}function up(e,t,n){var r=e?"Beacon":"fetch()";console.log("[DEBUG] AnalyticsConfig object at time of call to report():",n),console.log("[DEBUG] The following EventPayload would be sent to the Yext Events API using ".concat(r,":"),t)}var Gu=function(){return Gu=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var l in t)Object.prototype.hasOwnProperty.call(t,l)&&(e[l]=t[l])}return e},Gu.apply(this,arguments)},Yu=function(e,t){if(!t||Object.keys(t).length===0)return e;if(!e||Object.keys(e).length===0)return t;var n=JSON.parse(JSON.stringify(e));for(var r in t)if(t.hasOwnProperty(r)){var l=t[r];l==null?delete n[r]:typeof l!="object"?n[r]=l:n[r]=Yu(n[r],l)}return Gu({},n)},zy="yextevents.com/accounts/me/events";function Uy(e,t){var n=e==="SANDBOX",r=t==null?void 0:t.toLowerCase();if(n&&r==="eu")throw new Error("Sandbox environment is not available in the EU region.");return"https://"+(n?"sbx.":"")+(r??"us")+"."+zy}var Gy=function(e,t,n,r){function l(d){return d instanceof n?d:new n(function(f){f(d)})}return new(n||(n=Promise))(function(d,f){function p(T){try{E(r.next(T))}catch(S){f(S)}}function _(T){try{E(r.throw(T))}catch(S){f(S)}}function E(T){T.done?d(T.value):l(T.value).then(p,_)}E((r=r.apply(e,t||[])).next())})},Yy=function(e,t){var n={label:0,sent:function(){if(d[0]&1)throw d[1];return d[1]},trys:[],ops:[]},r,l,d,f;return f={next:p(0),throw:p(1),return:p(2)},typeof Symbol=="function"&&(f[Symbol.iterator]=function(){return this}),f;function p(E){return function(T){return _([E,T])}}function _(E){if(r)throw new TypeError("Generator is already executing.");for(;f&&(f=0,E[0]&&(n=0)),n;)try{if(r=1,l&&(d=E[0]&2?l.return:E[0]?l.throw||((d=l.return)&&d.call(l),0):l.next)&&!(d=d.call(l,E[1])).done)return d;switch(l=0,d&&(E=[E[0]&2,d.value]),E[0]){case 0:case 1:d=E;break;case 4:return n.label++,{value:E[1],done:!1};case 5:n.label++,l=E[1],E=[0];continue;case 7:E=n.ops.pop(),n.trys.pop();continue;default:if(d=n.trys,!(d=d.length>0&&d[d.length-1])&&(E[0]===6||E[0]===2)){n=0;continue}if(E[0]===3&&(!d||E[1]>d[0]&&E[1]<d[3])){n.label=E[1];break}if(E[0]===6&&n.label<d[1]){n.label=d[1],d=E;break}if(d&&n.label<d[2]){n.label=d[2],n.ops.push(E);break}d[2]&&n.ops.pop(),n.trys.pop();continue}E=t.call(e,n)}catch(T){E=[6,T],l=0}finally{r=d=0}if(E[0]&5)throw E[1];return{value:E[0]?E[1]:void 0,done:!0}}},jy=function(){function e(t,n){if(t.authorizationType!=="apiKey"&&t.authorizationType!=="bearer")throw new Error("Authorization type must be either apiKey or bearer.");if(!t.authorization)throw new Error("Authorization must be provided.");this.config=t,this.payload=n}return e.prototype.with=function(t){var n=this.payload===void 0?t:Yu(this.payload,t);return new e(this.config,n)},e.prototype.report=function(t){var n;return Gy(this,void 0,void 0,function(){var r,l,d,f,p=this;return Yy(this,function(_){return r=Yu((n=this.payload)!==null&&n!==void 0?n:{},t??{}),this.config.sessionTrackingEnabled?r.sessionId||(r.sessionId=Fy()):r.sessionId=void 0,r.clientSdk?r.clientSdk.ANALYTICS=wf.version:r.clientSdk=(f={},f.ANALYTICS=wf.version,f),r.authorization=this.config.authorizationType==="apiKey"?"KEY "+this.config.authorization:"Bearer "+this.config.authorization,l=Ky(r,this.config.forceFetch),d=Uy(this.config.env,this.config.region),l?[2,new Promise(function(E,T){Hy(d,r,p.config)?E(""):T("Failed Beacon Call")})]:[2,Wy(d,r,this.config).then(function(E){return E}).catch(function(E){return E})]})})},e}();function Vy(e){return new jy(e)}function ju(e){return e?e.toLowerCase().trim().replace(/\s/g,""):""}function dp(e,t){return[e,t].filter(n=>!!n).map(n=>ju(n)).join("_")}const qy=e=>{switch(Math.floor(e/1e8%10)){case 0:return"US";case 1:return"EU";default:return""}},pd=rt.createContext(null),Zy=rt.lazy(()=>Promise.resolve().then(()=>require("./debugger-JEGpYpD-.cjs")));function Jy(e){const{children:t,apiKey:n,currency:r,templateData:l,requireOptIn:d,disableSessionTracking:f,enableDebugging:p,productionDomains:_}=e;if(!n)throw new Error("API Key is required for AnalyticsProvider");const E=rt.useRef(null),[T,S]=rt.useState(!1);rt.useEffect(()=>{S(!0)},[]),E.current===null&&(E.current=new fp(n,r,l,d,f,_,p??uc()));const w=E.current;return rt.useEffect(()=>(window.enableYextAnalytics=()=>{w.optIn()},()=>{delete window.enableYextAnalytics}),[w]),nt.jsxs(nt.Fragment,{children:[nt.jsx(pd.Provider,{value:w,children:t}),T&&(p||uc())&&Qo().name==="browser"?nt.jsx(rt.Suspense,{fallback:nt.jsx(nt.Fragment,{}),children:nt.jsx(Zy,{})}):null]})}function uc(){return Qo().name!=="browser"||typeof window===void 0?!1:!!new URL(window.location.href).searchParams.get("xYextDebug")}class fp{constructor(t,n,r,l,d,f,p=!1){Ie(this,"_optedIn");Ie(this,"_sessionTrackingEnabled");Ie(this,"_analyticsEventService");Ie(this,"_pageViewFired",!1);this.apiKey=t,this.defaultCurrency=n,this.templateData=r,this.productionDomains=f,this.enableDebugging=p,this._optedIn=!l,this._sessionTrackingEnabled=!d,this.makeReporter(),this.pageView()}makeReporter(){if(Qo().name!=="browser"||!this._optedIn)return;if(!xy(...this.productionDomains??[])&&!this.getDebugEnabled()){console.warn("Yext Analytics disabled for non-production domains");return}const t=qy(this.templateData.document.businessId),n={authorizationType:"apiKey",authorization:this.apiKey,env:"PRODUCTION",region:t||"US",sessionTrackingEnabled:this._sessionTrackingEnabled,debug:this.getDebugEnabled()},r={pages:{siteUid:this.templateData.document.siteId,template:this.templateData.document.__.name},entity:this.templateData.document.uid||void 0,pageUrl:document.URL,referrerUrl:document.referrer!==""?document.referrer:void 0};this._analyticsEventService=Vy(n).with(r)}canTrack(){return Qo().name==="browser"&&this._optedIn&&!!this._analyticsEventService}identify(t){this.canTrack()&&this._analyticsEventService&&(this._analyticsEventService=this._analyticsEventService.with({visitor:t}))}async optIn(){this._optedIn=!0,this.makeReporter(),this._pageViewFired||await this.pageView()}async pageView(){var t;if(!this.canTrack())return Promise.resolve(void 0);await((t=this._analyticsEventService)==null?void 0:t.report({action:"PAGE_VIEW"})),this._pageViewFired=!0}async track(t){var S;if(!this.canTrack())return Promise.resolve();const{action:n,scope:r,eventName:l,currency:d,amount:f,destinationUrl:p,customTags:_,customValues:E}=t;let T;f&&(T={amount:f,currency:d||this.defaultCurrency}),await((S=this._analyticsEventService)==null?void 0:S.report({action:n,pages:{scope:ju(r)||void 0,originalEventName:dp(r||"",ju(l)||"")},value:T,destinationUrl:p,customTags:_,customValues:E}))}getDebugEnabled(){return this.enableDebugging||uc()}}const Vu=rt.createContext({name:""}),md=()=>rt.useContext(Vu).name;function Xy(e){var f;const t=md(),[n]=rt.useState({name:dp(t,e.name)}),r=(f=nl())==null?void 0:f.getDebugEnabled(),[l,d]=rt.useState(!1);return rt.useEffect(()=>{d(!0)},[]),r&&l?nt.jsx("section",{"data-ya-scope":n.name,children:nt.jsx(Vu.Provider,{value:n,children:e.children})}):nt.jsx(Vu.Provider,{value:n,children:e.children})}function nl(){const e=rt.useContext(pd);if(!e)return e;Qo().name==="browser"&&!window.setAnalyticsOptIn&&(window.setAnalyticsOptIn=async()=>{await e.optIn()});const t=md();return{getDebugEnabled(){return e.getDebugEnabled()},identify(n){return e.identify(n)},optIn(){return e.optIn()},pageView(){return e.pageView()},track(n){return e.track({...n,scope:n.scope??t})}}}const Qy=()=>{var e;return(e=nl())==null?void 0:e.track},eN=()=>{var e;return(e=nl())==null?void 0:e.pageView},tN=()=>{var e;return(e=nl())==null?void 0:e.identify},Es={INTRINSIC:"intrinsic",FIXED:"fixed",ASPECT:"aspect",FILL:"fill"},nN=e=>{const t=e.protocol.slice(0,-1);if(t!=="http"&&t!=="https"){console.error(`Invalid scheme: ${e}`);return}const n=e.hostname;let r;if(n==="a.mktgcdn.com")r="us";else{if(n.replace("a.","").replace(".mktgcdn.com","")!=="eu"){console.error(`Invalid host: ${e}`);return}r="eu"}if(!e.pathname.startsWith("/f")){console.error(`Invalid path: ${e}`);return}const l=e.pathname.replace(/^\//,"").split("/");if(l.length<2||l.length>3){console.error(`Invalid path: ${e}`);return}let d;if(l[0]==="f")d="prod";else switch(l[0].replace("f-","")){case"sandbox":{d="sbx";break}case"qa":{d="qa";break}case"dev":{d="dev";break}default:{console.error(`Invalid path: ${e}`);return}}if(r==="eu"&&(d==="dev"||d==="sbx")){console.error(`Invalid path: ${e}`);return}let f;if(l.length===3&&(f=parseInt(l[1]),Number.isNaN(f))){console.error(`Invalid account id: ${e}`);return}const p=l[l.length-1].split("."),_=p.length===2?`.${p[1]}`:"",E=p[0];return{scheme:t,partition:r,env:d,accountId:f,contentHash:E,extension:_}},rN=(e,t,n)=>{const r=`https://dyn${e.partition==="us"?"":`.${e.partition}`}.mktgcdn.com`;let l="f";switch(e.env){case"prod":break;case"sbx":{l+="-sandbox";break}default:l+=`-${e.env.toString()}`}const d=e.accountId!==void 0?`${e.accountId}/`:"";return`${r}/${l}/${d}${e.contentHash}${e.extension}/width=${Math.round(t)},height=${Math.round(n)}`},iN=e=>{const t=e.protocol.slice(0,-1);if(t!=="http"&&t!=="https"){console.error(`Invalid scheme: ${e}`);return}if(e.hostname!=="a.mktgcdn.com"){console.error(`Invalid host: ${e}`);return}if(!e.pathname.startsWith("/p")){console.error(`Invalid path: ${e}`);return}const n=e.pathname.replace(/^\//,"").split("/");if(n.length<3||n.length>4){console.error(`Invalid path: ${e}`);return}let r;if(n[0]==="p")r="prod";else switch(n[0].replace("p-","")){case"sandbox":{r="sbx";break}case"qa":{r="qa";break}case"dev":{r="dev";break}default:{console.error(`Invalid path: ${e}`);return}}const l=n[1];let d;if(n.length===4){if(!n[2].includes(".")){console.error(`Invalid aspect ratio: ${e}`);return}if(d=parseFloat(n[2]),Number.isNaN(d)||n[2].split(".")[1].length!==4){console.error(`Invalid aspect ratio: ${e}`);return}}const f=n[n.length-1].split("."),p=f.length===2?`.${f[1]}`:"",_=f[0];return{scheme:t,env:r,contentHash:l,aspectRatio:d,name:_,extension:p}},sN=(e,t,n)=>{const r="https://dyn.mktgcdn.com";let l="p";switch(e.env){case"prod":break;case"sbx":{l+="-sandbox";break}default:l+=`-${e.env.toString()}`}return`${r}/${l}/${e.contentHash}/width=${Math.round(t)},height=${Math.round(n)}`},qu=(e,t,n)=>{if(!hp(e)){console.error(`Invalid image url: ${e}.`);return}const r=new URL(e);if(r.pathname.startsWith("/p")){const l=iN(r);if(l)return sN(l,t,n)}else if(r.pathname.startsWith("/f")){const l=nN(r);if(l)return rN(l,t,n)}return e},hp=e=>{let t;try{t=new URL(e)}catch{return!1}return t.protocol==="http:"||t.protocol==="https:"},oN=({image:e,className:t,width:n,height:r,aspectRatio:l,layout:d=Es.INTRINSIC,placeholder:f,imgOverrides:p,style:_={},loading:E="lazy"})=>{const T=rt.useRef(null),[S,w]=rt.useState(!1),O="image"in e?e.image:e;rt.useEffect(()=>{var ce;(ce=T.current)!=null&&ce.complete&&w(!0)},[]),lN(d,O.width,O.height,n,r,l);const m=Math.abs(O.width);m||console.warn("Invalid image width.");const v=Math.abs(O.height);if(v||console.warn("Invalid image height."),!hp(O.url))return console.error(`Invalid image url: ${O.url}`),nt.jsx(nt.Fragment,{children:f!=null&&f});const I=n&&n>0?n:void 0,G=r&&r>0?r:void 0,{src:k,imgStyle:P,widths:H}=aN(d,m,v,_,O.url,I,G,l),j=H.map(ce=>`${qu(O.url,ce,v/m*ce)} ${ce}w`).join(", "),re=[640,768,1024,1280,1536],te=H.map((ce,V)=>V===H.length-1?`${ce}px`:`(max-width: ${re[V]}px) ${ce}px`).join(", ");return nt.jsxs(nt.Fragment,{children:[!S&&f!=null&&f,nt.jsx("img",{ref:T,style:P,src:k,className:t,width:I,height:G,srcSet:j,sizes:te,loading:E,alt:O.alternateText||"",...p})]})},lN=(e,t,n,r,l,d)=>{if(t<0&&console.warn(`Invalid image width: ${t}.`),n<0&&console.warn(`Invalid image height: ${n}.`),e===Es.FIXED){if(!r&&!l){console.warn("Using fixed layout but neither width nor height is passed as props.");return}r&&r<0&&console.warn(`Using fixed layout but width is invalid: ${r}.`),l&&l<0&&console.warn(`Using fixed layout but height is invalid: ${l}.`);return}(r||l)&&console.warn("Width or height is passed in but layout is not fixed. These will have no impact. If you want to have a fixed height or width then set layout to fixed."),e===Es.ASPECT&&!d&&console.warn("Using aspect layout but aspectRatio is not passed as a prop.")},aN=(e,t,n,r,l,d,f,p)=>{let _=[100,320,640,960,1280,1920],E=qu(l,500,500);const T={...r};switch(T.objectFit=T.objectFit||"cover",T.objectPosition=T.objectPosition||"center",e){case Es.INTRINSIC:T.maxWidth=t,T.width="100%",T.aspectRatio=p?`${p}`:`${t} / ${n}`;break;case Es.FIXED:{const{fixedWidth:S,fixedHeight:w,fixedWidths:O}=cN(t,n,_,d,f);T.width=S,T.height=w,_=O,E=qu(l,S,w);break}case Es.ASPECT:T.aspectRatio=p?`${p}`:`${t} / ${n}`;break;case Es.FILL:T.width="100%",T.aspectRatio=p?`${p}`:`${t} / ${n}`;break;default:console.warn(`Unrecognized layout: ${e}.`);break}return{src:E,imgStyle:T,widths:_}},cN=(e,t,n,r,l)=>r&&l?{fixedWidth:r,fixedHeight:l,fixedWidths:[r]}:r?{fixedWidth:r,fixedHeight:r*t/e,fixedWidths:[r]}:l?{fixedWidth:l/t*e,fixedHeight:l,fixedWidths:[l/t*e]}:{fixedWidth:e,fixedHeight:t,fixedWidths:n};var gp={exports:{}};/*!
32
+ `,t),null}}const By="1.0.0",wf={version:By};function Hy(e,t,n){return n.debug?(up(!0,t,n),!0):navigator.sendBeacon(e,JSON.stringify(t))}function Wy(e,t,n){return n.debug?(up(!1,t,n),Promise.resolve(new Response)):fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),keepalive:!0})}function Ky(e,t){return!t&&!!navigator.userAgent&&navigator.userAgent.toLowerCase().includes("firefox")}function up(e,t,n){var r=e?"Beacon":"fetch()";console.log("[DEBUG] AnalyticsConfig object at time of call to report():",n),console.log("[DEBUG] The following EventPayload would be sent to the Yext Events API using ".concat(r,":"),t)}var Gu=function(){return Gu=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var l in t)Object.prototype.hasOwnProperty.call(t,l)&&(e[l]=t[l])}return e},Gu.apply(this,arguments)},Yu=function(e,t){if(!t||Object.keys(t).length===0)return e;if(!e||Object.keys(e).length===0)return t;var n=JSON.parse(JSON.stringify(e));for(var r in t)if(t.hasOwnProperty(r)){var l=t[r];l==null?delete n[r]:typeof l!="object"?n[r]=l:n[r]=Yu(n[r],l)}return Gu({},n)},zy="yextevents.com/accounts/me/events";function Uy(e,t){var n=e==="SANDBOX",r=t==null?void 0:t.toLowerCase();if(n&&r==="eu")throw new Error("Sandbox environment is not available in the EU region.");return"https://"+(n?"sbx.":"")+(r??"us")+"."+zy}var Gy=function(e,t,n,r){function l(d){return d instanceof n?d:new n(function(f){f(d)})}return new(n||(n=Promise))(function(d,f){function p(T){try{E(r.next(T))}catch(S){f(S)}}function _(T){try{E(r.throw(T))}catch(S){f(S)}}function E(T){T.done?d(T.value):l(T.value).then(p,_)}E((r=r.apply(e,t||[])).next())})},Yy=function(e,t){var n={label:0,sent:function(){if(d[0]&1)throw d[1];return d[1]},trys:[],ops:[]},r,l,d,f;return f={next:p(0),throw:p(1),return:p(2)},typeof Symbol=="function"&&(f[Symbol.iterator]=function(){return this}),f;function p(E){return function(T){return _([E,T])}}function _(E){if(r)throw new TypeError("Generator is already executing.");for(;f&&(f=0,E[0]&&(n=0)),n;)try{if(r=1,l&&(d=E[0]&2?l.return:E[0]?l.throw||((d=l.return)&&d.call(l),0):l.next)&&!(d=d.call(l,E[1])).done)return d;switch(l=0,d&&(E=[E[0]&2,d.value]),E[0]){case 0:case 1:d=E;break;case 4:return n.label++,{value:E[1],done:!1};case 5:n.label++,l=E[1],E=[0];continue;case 7:E=n.ops.pop(),n.trys.pop();continue;default:if(d=n.trys,!(d=d.length>0&&d[d.length-1])&&(E[0]===6||E[0]===2)){n=0;continue}if(E[0]===3&&(!d||E[1]>d[0]&&E[1]<d[3])){n.label=E[1];break}if(E[0]===6&&n.label<d[1]){n.label=d[1],d=E;break}if(d&&n.label<d[2]){n.label=d[2],n.ops.push(E);break}d[2]&&n.ops.pop(),n.trys.pop();continue}E=t.call(e,n)}catch(T){E=[6,T],l=0}finally{r=d=0}if(E[0]&5)throw E[1];return{value:E[0]?E[1]:void 0,done:!0}}},jy=function(){function e(t,n){if(t.authorizationType!=="apiKey"&&t.authorizationType!=="bearer")throw new Error("Authorization type must be either apiKey or bearer.");if(!t.authorization)throw new Error("Authorization must be provided.");this.config=t,this.payload=n}return e.prototype.with=function(t){var n=this.payload===void 0?t:Yu(this.payload,t);return new e(this.config,n)},e.prototype.report=function(t){var n;return Gy(this,void 0,void 0,function(){var r,l,d,f,p=this;return Yy(this,function(_){return r=Yu((n=this.payload)!==null&&n!==void 0?n:{},t??{}),this.config.sessionTrackingEnabled?r.sessionId||(r.sessionId=Fy()):r.sessionId=void 0,r.clientSdk?r.clientSdk.ANALYTICS=wf.version:r.clientSdk=(f={},f.ANALYTICS=wf.version,f),r.authorization=this.config.authorizationType==="apiKey"?"KEY "+this.config.authorization:"Bearer "+this.config.authorization,l=Ky(r,this.config.forceFetch),d=Uy(this.config.env,this.config.region),l?[2,new Promise(function(E,T){Hy(d,r,p.config)?E(""):T("Failed Beacon Call")})]:[2,Wy(d,r,this.config).then(function(E){return E}).catch(function(E){return E})]})})},e}();function Vy(e){return new jy(e)}function ju(e){return e?e.toLowerCase().trim().replace(/\s/g,""):""}function dp(e,t){return[e,t].filter(n=>!!n).map(n=>ju(n)).join("_")}const qy=e=>{switch(Math.floor(e/1e8%10)){case 0:return"US";case 1:return"EU";default:return""}},pd=rt.createContext(null),Zy=rt.lazy(()=>Promise.resolve().then(()=>require("./debugger-rbW480FR.cjs")));function Jy(e){const{children:t,apiKey:n,currency:r,templateData:l,requireOptIn:d,disableSessionTracking:f,enableDebugging:p,productionDomains:_}=e;if(!n)throw new Error("API Key is required for AnalyticsProvider");const E=rt.useRef(null),[T,S]=rt.useState(!1);rt.useEffect(()=>{S(!0)},[]),E.current===null&&(E.current=new fp(n,r,l,d,f,_,p??uc()));const w=E.current;return rt.useEffect(()=>(window.enableYextAnalytics=()=>{w.optIn()},()=>{delete window.enableYextAnalytics}),[w]),nt.jsxs(nt.Fragment,{children:[nt.jsx(pd.Provider,{value:w,children:t}),T&&(p||uc())&&Qo().name==="browser"?nt.jsx(rt.Suspense,{fallback:nt.jsx(nt.Fragment,{}),children:nt.jsx(Zy,{})}):null]})}function uc(){return Qo().name!=="browser"||typeof window===void 0?!1:!!new URL(window.location.href).searchParams.get("xYextDebug")}class fp{constructor(t,n,r,l,d,f,p=!1){Ie(this,"_optedIn");Ie(this,"_sessionTrackingEnabled");Ie(this,"_analyticsEventService");Ie(this,"_pageViewFired",!1);this.apiKey=t,this.defaultCurrency=n,this.templateData=r,this.productionDomains=f,this.enableDebugging=p,this._optedIn=!l,this._sessionTrackingEnabled=!d,this.makeReporter(),this.pageView()}makeReporter(){if(Qo().name!=="browser"||!this._optedIn)return;if(!xy(...this.productionDomains??[])&&!this.getDebugEnabled()){console.warn("Yext Analytics disabled for non-production domains");return}const t=qy(this.templateData.document.businessId),n={authorizationType:"apiKey",authorization:this.apiKey,env:"PRODUCTION",region:t||"US",sessionTrackingEnabled:this._sessionTrackingEnabled,debug:this.getDebugEnabled()},r={pages:{siteUid:this.templateData.document.siteId,template:this.templateData.document.__.name},entity:this.templateData.document.uid||void 0,pageUrl:document.URL,referrerUrl:document.referrer!==""?document.referrer:void 0};this._analyticsEventService=Vy(n).with(r)}canTrack(){return Qo().name==="browser"&&this._optedIn&&!!this._analyticsEventService}identify(t){this.canTrack()&&this._analyticsEventService&&(this._analyticsEventService=this._analyticsEventService.with({visitor:t}))}async optIn(){this._optedIn=!0,this.makeReporter(),this._pageViewFired||await this.pageView()}async pageView(){var t;if(!this.canTrack())return Promise.resolve(void 0);await((t=this._analyticsEventService)==null?void 0:t.report({action:"PAGE_VIEW"})),this._pageViewFired=!0}async track(t){var S;if(!this.canTrack())return Promise.resolve();const{action:n,scope:r,eventName:l,currency:d,amount:f,destinationUrl:p,customTags:_,customValues:E}=t;let T;f&&(T={amount:f,currency:d||this.defaultCurrency}),await((S=this._analyticsEventService)==null?void 0:S.report({action:n,pages:{scope:ju(r)||void 0,originalEventName:dp(r||"",ju(l)||"")},value:T,destinationUrl:p,customTags:_,customValues:E}))}getDebugEnabled(){return this.enableDebugging||uc()}}const Vu=rt.createContext({name:""}),md=()=>rt.useContext(Vu).name;function Xy(e){var f;const t=md(),[n]=rt.useState({name:dp(t,e.name)}),r=(f=nl())==null?void 0:f.getDebugEnabled(),[l,d]=rt.useState(!1);return rt.useEffect(()=>{d(!0)},[]),r&&l?nt.jsx("section",{"data-ya-scope":n.name,children:nt.jsx(Vu.Provider,{value:n,children:e.children})}):nt.jsx(Vu.Provider,{value:n,children:e.children})}function nl(){const e=rt.useContext(pd);if(!e)return e;Qo().name==="browser"&&!window.setAnalyticsOptIn&&(window.setAnalyticsOptIn=async()=>{await e.optIn()});const t=md();return{getDebugEnabled(){return e.getDebugEnabled()},identify(n){return e.identify(n)},optIn(){return e.optIn()},pageView(){return e.pageView()},track(n){return e.track({...n,scope:n.scope??t})}}}const Qy=()=>{var e;return(e=nl())==null?void 0:e.track},eN=()=>{var e;return(e=nl())==null?void 0:e.pageView},tN=()=>{var e;return(e=nl())==null?void 0:e.identify},Es={INTRINSIC:"intrinsic",FIXED:"fixed",ASPECT:"aspect",FILL:"fill"},nN=e=>{const t=e.protocol.slice(0,-1);if(t!=="http"&&t!=="https"){console.error(`Invalid scheme: ${e}`);return}const n=e.hostname;let r;if(n==="a.mktgcdn.com")r="us";else{if(n.replace("a.","").replace(".mktgcdn.com","")!=="eu"){console.error(`Invalid host: ${e}`);return}r="eu"}if(!e.pathname.startsWith("/f")){console.error(`Invalid path: ${e}`);return}const l=e.pathname.replace(/^\//,"").split("/");if(l.length<2||l.length>3){console.error(`Invalid path: ${e}`);return}let d;if(l[0]==="f")d="prod";else switch(l[0].replace("f-","")){case"sandbox":{d="sbx";break}case"qa":{d="qa";break}case"dev":{d="dev";break}default:{console.error(`Invalid path: ${e}`);return}}if(r==="eu"&&(d==="dev"||d==="sbx")){console.error(`Invalid path: ${e}`);return}let f;if(l.length===3&&(f=parseInt(l[1]),Number.isNaN(f))){console.error(`Invalid account id: ${e}`);return}const p=l[l.length-1].split("."),_=p.length===2?`.${p[1]}`:"",E=p[0];return{scheme:t,partition:r,env:d,accountId:f,contentHash:E,extension:_}},rN=(e,t,n)=>{const r=`https://dyn${e.partition==="us"?"":`.${e.partition}`}.mktgcdn.com`;let l="f";switch(e.env){case"prod":break;case"sbx":{l+="-sandbox";break}default:l+=`-${e.env.toString()}`}const d=e.accountId!==void 0?`${e.accountId}/`:"";return`${r}/${l}/${d}${e.contentHash}${e.extension}/width=${Math.round(t)},height=${Math.round(n)}`},iN=e=>{const t=e.protocol.slice(0,-1);if(t!=="http"&&t!=="https"){console.error(`Invalid scheme: ${e}`);return}if(e.hostname!=="a.mktgcdn.com"){console.error(`Invalid host: ${e}`);return}if(!e.pathname.startsWith("/p")){console.error(`Invalid path: ${e}`);return}const n=e.pathname.replace(/^\//,"").split("/");if(n.length<3||n.length>4){console.error(`Invalid path: ${e}`);return}let r;if(n[0]==="p")r="prod";else switch(n[0].replace("p-","")){case"sandbox":{r="sbx";break}case"qa":{r="qa";break}case"dev":{r="dev";break}default:{console.error(`Invalid path: ${e}`);return}}const l=n[1];let d;if(n.length===4){if(!n[2].includes(".")){console.error(`Invalid aspect ratio: ${e}`);return}if(d=parseFloat(n[2]),Number.isNaN(d)||n[2].split(".")[1].length!==4){console.error(`Invalid aspect ratio: ${e}`);return}}const f=n[n.length-1].split("."),p=f.length===2?`.${f[1]}`:"",_=f[0];return{scheme:t,env:r,contentHash:l,aspectRatio:d,name:_,extension:p}},sN=(e,t,n)=>{const r="https://dyn.mktgcdn.com";let l="p";switch(e.env){case"prod":break;case"sbx":{l+="-sandbox";break}default:l+=`-${e.env.toString()}`}return`${r}/${l}/${e.contentHash}/width=${Math.round(t)},height=${Math.round(n)}`},qu=(e,t,n)=>{if(!hp(e)){console.error(`Invalid image url: ${e}.`);return}const r=new URL(e);if(r.pathname.startsWith("/p")){const l=iN(r);if(l)return sN(l,t,n)}else if(r.pathname.startsWith("/f")){const l=nN(r);if(l)return rN(l,t,n)}return e},hp=e=>{let t;try{t=new URL(e)}catch{return!1}return t.protocol==="http:"||t.protocol==="https:"},oN=({image:e,className:t,width:n,height:r,aspectRatio:l,layout:d=Es.INTRINSIC,placeholder:f,imgOverrides:p,style:_={},loading:E="lazy"})=>{const T=rt.useRef(null),[S,w]=rt.useState(!1),O="image"in e?e.image:e;rt.useEffect(()=>{var ce;(ce=T.current)!=null&&ce.complete&&w(!0)},[]),lN(d,O.width,O.height,n,r,l);const m=Math.abs(O.width);m||console.warn("Invalid image width.");const v=Math.abs(O.height);if(v||console.warn("Invalid image height."),!hp(O.url))return console.error(`Invalid image url: ${O.url}`),nt.jsx(nt.Fragment,{children:f!=null&&f});const I=n&&n>0?n:void 0,G=r&&r>0?r:void 0,{src:k,imgStyle:P,widths:H}=aN(d,m,v,_,O.url,I,G,l),j=H.map(ce=>`${qu(O.url,ce,v/m*ce)} ${ce}w`).join(", "),re=[640,768,1024,1280,1536],te=H.map((ce,V)=>V===H.length-1?`${ce}px`:`(max-width: ${re[V]}px) ${ce}px`).join(", ");return nt.jsxs(nt.Fragment,{children:[!S&&f!=null&&f,nt.jsx("img",{ref:T,style:P,src:k,className:t,width:I,height:G,srcSet:j,sizes:te,loading:E,alt:O.alternateText||"",...p})]})},lN=(e,t,n,r,l,d)=>{if(t<0&&console.warn(`Invalid image width: ${t}.`),n<0&&console.warn(`Invalid image height: ${n}.`),e===Es.FIXED){if(!r&&!l){console.warn("Using fixed layout but neither width nor height is passed as props.");return}r&&r<0&&console.warn(`Using fixed layout but width is invalid: ${r}.`),l&&l<0&&console.warn(`Using fixed layout but height is invalid: ${l}.`);return}(r||l)&&console.warn("Width or height is passed in but layout is not fixed. These will have no impact. If you want to have a fixed height or width then set layout to fixed."),e===Es.ASPECT&&!d&&console.warn("Using aspect layout but aspectRatio is not passed as a prop.")},aN=(e,t,n,r,l,d,f,p)=>{let _=[100,320,640,960,1280,1920],E=qu(l,500,500);const T={...r};switch(T.objectFit=T.objectFit||"cover",T.objectPosition=T.objectPosition||"center",e){case Es.INTRINSIC:T.maxWidth=t,T.width="100%",T.aspectRatio=p?`${p}`:`${t} / ${n}`;break;case Es.FIXED:{const{fixedWidth:S,fixedHeight:w,fixedWidths:O}=cN(t,n,_,d,f);T.width=S,T.height=w,_=O,E=qu(l,S,w);break}case Es.ASPECT:T.aspectRatio=p?`${p}`:`${t} / ${n}`;break;case Es.FILL:T.width="100%",T.aspectRatio=p?`${p}`:`${t} / ${n}`;break;default:console.warn(`Unrecognized layout: ${e}.`);break}return{src:E,imgStyle:T,widths:_}},cN=(e,t,n,r,l)=>r&&l?{fixedWidth:r,fixedHeight:l,fixedWidths:[r]}:r?{fixedWidth:r,fixedHeight:r*t/e,fixedWidths:[r]}:l?{fixedWidth:l/t*e,fixedHeight:l,fixedWidths:[l/t*e]}:{fixedWidth:e,fixedHeight:t,fixedWidths:n};var gp={exports:{}};/*!
33
33
  Copyright (c) 2018 Jed Watson.
34
34
  Licensed under the MIT License (MIT), see
35
35
  http://jedwatson.github.io/classnames
36
- */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var d="",f=0;f<arguments.length;f++){var p=arguments[f];p&&(d=l(d,r(p)))}return d}function r(d){if(typeof d=="string"||typeof d=="number")return d;if(typeof d!="object")return"";if(Array.isArray(d))return n.apply(null,d);if(d.toString!==Object.prototype.toString&&!d.toString.toString().includes("[native code]"))return d.toString();var f="";for(var p in d)t.call(d,p)&&d[p]&&(f=l(f,p));return f}function l(d,f){return f?d?d+" "+f:d+f:d}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(gp);var uN=gp.exports;const lo=hd(uN),dN="phonecall",fN="drivingdirection",Of="calltoactionclick",hN="clicktowebsite",gN="other",Df="link",pN="cta",mN=e=>{const t=e.cta??{link:e.href};if(!t.link)throw e.cta?new Error("CTA's link is undefined"):new Error("Link's href is undefined");return t.linkType||(t.linkType=NN(t.link)),t.link=CN(t),t},_N=(e,t)=>{switch(e.linkType){case"EMAIL":return"CTA_CLICK";case"PHONE":return"TAP_TO_CALL";case"CLICK_TO_WEBSITE":return"WEBSITE";case"DRIVING_DIRECTIONS":return"DRIVING_DIRECTIONS";case"OTHER":return"CTA_CLICK";case"URL":return"LINK";default:return t?"CTA_CLICK":"LINK"}},yN=(e,t,n)=>{if(e)return e;if(t)switch(t){case"PHONE":return dN;case"EMAIL":return Of;case"URL":return Df;case"DRIVING_DIRECTIONS":return fN;case"CLICK_TO_WEBSITE":return hN;case"OTHER":return gN;default:return n?Of:Df}return pN},NN=e=>EN(e)?"EMAIL":e.startsWith("tel:")?"PHONE":"URL",CN=e=>e.linkType==="EMAIL"?e.link.startsWith("mailto:")?e.link:`mailto:${e.link}`:e.linkType==="PHONE"?e.link.startsWith("tel:")?e.link:`tel:${e.link}`:e.link,EN=e=>e.startsWith("mailto:")?!0:/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(e),pp=rt.forwardRef(function(t,n){const{children:r,onClick:l,className:d,eventName:f,scope:p,currency:_,amount:E,cta:T,obfuscate:S,customTags:w,customValues:O,...m}=t,v=mN(t),I=_N(v,!!T),G=yN(f,v.linkType,!!T),k=nl(),P=S||S!==!1&&v.linkType==="EMAIL",H=async te=>{const ce=te.currentTarget;let V="";if(P){te.preventDefault();const z=ce.href.split("/").at(-1);z&&(V=atob(z))}if(k!==null)try{await k.track({action:I,scope:p,eventName:G,currency:_,amount:E,destinationUrl:V||ce.href,customTags:w,customValues:O})}catch{console.error("Failed to report click Analytics Event")}l&&l(te),V&&(window.location.href=V)},j=P?"Obfuscated, set a label or child":v.link,re={className:lo("Link",d),href:P?btoa(v.link):v.link,onClick:H,rel:t.target&&!t.rel?"noopener":t.rel,ref:n};return k!=null&&k.getDebugEnabled()&&(re["data-ya-action"]=I,re["data-ya-scopeoverride"]=p,re["data-ya-eventname"]=G),nt.jsx("a",{...m,...re,suppressHydrationWarning:!0,children:r||v.label||j})});var Nn=(e=>(e.DEGREE="deg",e.KILOMETER="km",e.MILE="mi",e.RADIAN="r",e))(Nn||{}),Gr=(e=>(e.MERCATOR="mercator",e.SPHERICAL="spherical",e))(Gr||{});const Zc=3959,Jc=6371,TN=["latitude","lat"],xN=["longitude","lon","lng","long"];function Af(e,t){for(const n of t)if(e[n]||e[n]===0)return e[n]}function Mf(e){switch(typeof e){case"string":case"number":const t=Number.parseFloat(e);if(Number.isNaN(t))throw new Error(`'${e}' must be convertible to a Number'`);return t;default:throw new Error(`typeof '${e}' must be a number or a string that can be converted to a number, is '${typeof e}'`)}}function ro(e){return e*Math.PI/180}function Zi(e){return e/Math.PI*180}function vN(e,t){const n=ro(e.latitude),r=ro(t.latitude),l=r-n,d=ro(t.longitude-e.longitude),f=Math.pow(Math.sin(l/2),2)+Math.cos(n)*Math.cos(r)*Math.pow(Math.sin(d/2),2);return 2*Math.atan2(Math.sqrt(f),Math.sqrt(1-f))}function SN(e,t){const n=Math.tan(Math.PI/360*(e+90)),r=Math.tan(Math.PI/360*(t+90));return Math.log(r/n)}function wN(e,t){const r=Math.tan(Math.PI/360*(e+90))*Math.pow(Math.E,t);return Math.atan(r)*360/Math.PI-90}class dn{constructor(t,n){Ie(this,"_lat");Ie(this,"_lon");let r=t,l=n;this._lat=0,this._lon=0,typeof t=="object"?(r=Af(t,TN)??0,l=Af(t,xN)??0,this.latitude=typeof r=="function"?r():r,this.longitude=typeof l=="function"?l():l):typeof r=="number"&&typeof l=="number"&&(this.latitude=r,this.longitude=l)}get latitude(){return this._lat}set latitude(t){this._lat=Math.max(-90,Math.min(Mf(t),90))}get longitude(){return this._lon}set longitude(t){this._lon=Mf(t)}get normalLon(){return((this._lon+180)%360+360)%360-180}add(t,n,r=Nn.DEGREE,l=Gr.SPHERICAL){if(l===Gr.MERCATOR&&(r===Nn.DEGREE||r===Nn.RADIAN)){const d=r===Nn.DEGREE?ro(t):t,f=r===Nn.DEGREE?n:Zi(n);this.latitude=wN(this.latitude,d),this.longitude+=f}else switch(r){case Nn.DEGREE:this.latitude+=t,this.longitude+=n;break;case Nn.KILOMETER:this.latitude+=Zi(t)*Jc,this.longitude+=Zi(n)*Jc*Math.cos(ro(this.latitude));break;case Nn.MILE:this.latitude+=Zi(t)*Zc,this.longitude+=Zi(n)*Zc*Math.cos(ro(this.latitude));break;case Nn.RADIAN:this.latitude+=Zi(t),this.longitude+=Zi(n);break;default:throw new Error(`unit unhandled: ${String(r)}`)}}distanceTo(t,n=Nn.MILE,r=Gr.SPHERICAL){if(r===Gr.MERCATOR&&(n===Nn.DEGREE||n===Nn.RADIAN)){const l=SN(this.latitude,t.latitude),d=Math.abs(t.normalLon-this.normalLon),f=ro(Math.min(d,360-d)),p=Math.sqrt(Math.pow(l,2)+Math.pow(f,2));switch(n){case Nn.DEGREE:return Zi(p);case Nn.RADIAN:return p;default:throw new Error(`unit unhandled: ${String(n)}`)}}else{const l=vN(this,t);switch(n){case Nn.DEGREE:return Zi(l);case Nn.KILOMETER:return l*Jc;case Nn.MILE:return l*Zc;case Nn.RADIAN:return l;default:throw new Error(`unit unhandled: ${String(n)}`)}}}equals(t){return t&&t.latitude===this.latitude&&t.longitude===this.longitude}searchQueryString(){return`${this.latitude},${this.longitude}`}}function mp(e,t=()=>null){const n=document.createElement("script");n.async=!0,n.onload=t,n.src=e,document.head.appendChild(n)}var Sr=(e=>(e.UNDEFINED="undefined",e.NULL="object",e.BOOLEAN="boolean",e.NUMBER="number",e.BIGINT="bigint",e.STRING="string",e.SYMBOL="symbol",e.FUNCTION="function",e.OBJECT="object",e))(Sr||{});function kr(e,t){if(typeof t!="string")throw new Error("Assertion error: 'type' must be a string");if(typeof e!==t)throw new Error(`Expected an object of type '${t}' but received '${typeof e}'`)}function wr(e,t){let n;try{n=e instanceof t}catch{throw new Error("Assertion error: 'instanceClass' is not a valid constructor")}if(!n)throw new Error(`Expected an instance of '${t.name}' but received '${e.constructor.name}'`)}class _p{constructor(t,n){Ie(this,"providerMapClass");Ie(this,"wrapper");Ie(this,"controlEnabled");Ie(this,"panHandler");Ie(this,"panStartHandler");Ie(this,"providerOptions");wr(t,co),n&&wr(n,HTMLElement),this.providerMapClass=t.getMapClass(),this.wrapper=n,this.controlEnabled=!0,this.panHandler=()=>null,this.panStartHandler=()=>null,this.providerOptions={}}withControlEnabled(t){return this.controlEnabled=t,this}withPanHandler(t){return kr(t,Sr.FUNCTION),this.panHandler=t,this}withPanStartHandler(t){return kr(t,Sr.FUNCTION),this.panStartHandler=t,this}withProviderOptions(t){return this.providerOptions=t,this}build(){const t=this.providerMapClass;return new t(this)}}class rl{constructor(t){Ie(this,"_panHandler");Ie(this,"_panStartHandler");wr(t,_p),this._panHandler=t.panHandler,this._panStartHandler=t.panStartHandler}getCenter(){throw new Error("not implemented")}getZoom(){throw new Error("not implemented")}setCenter(t,n){throw new Error("not implemented")}setZoom(t,n){throw new Error("not implemented")}setZoomCenter(t,n,r){this.setZoom(t,r),this.setCenter(n,r)}}class yp{constructor(t){Ie(this,"providerPinClass");Ie(this,"clickHandler");Ie(this,"focusHandler");Ie(this,"hoverHandler");Ie(this,"icons");Ie(this,"hasPinUrl");wr(t,co),this.providerPinClass=t.getPinClass(),this.clickHandler=()=>null,this.focusHandler=n=>null,this.hoverHandler=n=>null,this.icons={},this.hasPinUrl=!1}withClickHandler(t){return kr(t,Sr.FUNCTION),this.clickHandler=t,this}withFocusHandler(t){return kr(t,Sr.FUNCTION),this.focusHandler=t,this}withHoverHandler(t){return kr(t,Sr.FUNCTION),this.hoverHandler=t,this}withIcons(t){return this.icons=t,this}withHasPinUrl(t){return this.hasPinUrl=t,this}build(){const t=this.providerPinClass;return new t(this)}}class _d{constructor(t){Ie(this,"_clickHandler");Ie(this,"_focusHandler");Ie(this,"_hoverHandler");Ie(this,"_icons");wr(t,yp),this._clickHandler=t.clickHandler,this._focusHandler=t.focusHandler,this._hoverHandler=t.hoverHandler,this._icons=t.icons}setCoordinate(t){throw new Error("not implemented")}setMap(t,n){throw new Error("not implemented")}setProperties(t){throw new Error("not implemented")}}const ON=Object.freeze({backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"contain",left:"0",outline:"none",pointerEvents:"auto",position:"absolute",top:"0"});class il extends _d{constructor(n){super(n);Ie(this,"_pinEl");Ie(this,"_pinAlt");Ie(this,"_wrapper");this._pinEl=n.hasPinUrl?document.createElement("div"):document.createElement("button"),Object.assign(this._pinEl.style,il.baseStyle),this._pinAlt=document.createElement("span"),this._pinAlt.classList.add("sr-only"),this._pinEl.appendChild(this._pinAlt),this._wrapper=document.createElement("div"),this._wrapper.style.pointerEvents="none",this._wrapper.appendChild(this._pinEl),this.addListeners()}static get baseStyle(){return ON}addListeners(){this._wrapper&&(this._wrapper.addEventListener("click",()=>this._clickHandler()),this._wrapper.addEventListener("focusin",()=>this._focusHandler(!0)),this._wrapper.addEventListener("focusout",()=>this._focusHandler(!1)),this._wrapper.addEventListener("mouseover",()=>this._hoverHandler(!0)),this._wrapper.addEventListener("mouseout",()=>this._hoverHandler(!1)))}getPinElement(){return this._pinEl}getWrapperElement(){return this._wrapper}setProperties(n){this.setElementProperties(n);const r=n.getClass(),l=n.getElement()||this._pinEl,d=n.getZIndex();l.style.pointerEvents="auto",this._wrapper&&(this._wrapper.style.zIndex=d.toString(),this._wrapper.setAttribute("class",r),l!==this._wrapper.children[0]&&(this._wrapper.children[0].style.pointerEvents="",this._wrapper.removeChild(this._wrapper.children[0]),this._wrapper.appendChild(l)))}setElementProperties(n){const r=n.getAnchorX(),l=n.getAnchorY(),d=n.getHeight(),f=this._icons[n.getIcon()],p=n.getSRText(),_=n.getWidth();Object.assign(this._pinEl.style,{backgroundImage:f?`url("${f}")`:"",height:d+"px",transform:`translate(${-100*r}%, ${-100*l}%)`,width:_+"px"}),this._pinAlt.innerText=p}}class ao{constructor(){Ie(this,"loadFunction");Ie(this,"mapClass");Ie(this,"pinClass");Ie(this,"providerName");this.loadFunction=(t,n,r,l)=>t(),this.mapClass=rl,this.pinClass=_d,this.providerName=""}withLoadFunction(t){return kr(t,Sr.FUNCTION),this.loadFunction=t,this}withMapClass(t){return this.mapClass=t,this}withPinClass(t){return this.pinClass=t,this}withProviderName(t){return this.providerName=t,this}build(){return new co(this)}}class co{constructor(t){Ie(this,"_loadFunction");Ie(this,"_mapClass");Ie(this,"_pinClass");Ie(this,"_providerName");Ie(this,"_loadPromise");Ie(this,"_resolveLoad");Ie(this,"_rejectLoad");Ie(this,"_apiKey");Ie(this,"_loadInvoked");Ie(this,"_loaded");Ie(this,"_options");wr(t,ao),this._loadFunction=t.loadFunction,this._mapClass=t.mapClass,this._pinClass=t.pinClass,this._providerName=t.providerName,this._loadPromise=new Promise((n,r)=>{this._resolveLoad=n,this._rejectLoad=r}),this._apiKey="",this._loadInvoked=!1,this._loaded=!1,this._options={}}get loaded(){return this._loaded}getMapClass(){return this._mapClass}getPinClass(){return this._pinClass}getProviderName(){return this._providerName}async load(t=this._apiKey,n=this._options){!this._loadInvoked&&this._resolveLoad&&this._rejectLoad&&(this._loadInvoked=!0,this._loadFunction(this._resolveLoad,this._rejectLoad,t,n)),await this.ready(),this._loaded=!0}async ready(){await this._loadPromise}setLoadOptions(t,n=null){this._loadInvoked||(this._apiKey=t,this._options=n||this._options)}}class DN extends rl{constructor(n){super(n);Ie(this,"map");Ie(this,"_moving");n.wrapper&&(this.map=new google.maps.Map(n.wrapper,{disableDefaultUI:!n.controlEnabled,fullscreenControl:!1,gestureHandling:n.controlEnabled?"auto":"none",mapTypeControl:!1,rotateControl:!1,scaleControl:!1,streetViewControl:!1,zoomControl:n.controlEnabled,zoomControlOptions:{position:google.maps.ControlPosition.RIGHT_TOP},...n.providerOptions}),this._moving=!1,google.maps.event.addListener(this.map,"bounds_changed",()=>{this._moving||(this._moving=!0,this._panStartHandler())}),google.maps.event.addListener(this.map,"idle",()=>{this._moving=!1,this._panHandler()}))}getCenter(){var n;return new dn(((n=this.map)==null?void 0:n.getCenter())??{lat:0,lng:0})}getZoom(){var n;return((n=this.map)==null?void 0:n.getZoom())??0}setCenter(n,r){var d,f;const l=new google.maps.LatLng(n.latitude,n.longitude);r?(d=this.map)==null||d.panTo(l):(f=this.map)==null||f.setCenter(l)}setZoom(n,r){var l;(l=this.map)==null||l.setZoom(Math.floor(n))}setZoomCenter(n,r,l){this.setCenter(r,l),this.setZoom(n,l)}}class AN extends il{constructor(n){super(n);Ie(this,"_latLng");Ie(this,"pin");this._wrapper&&(this._wrapper.style.position="absolute",google.maps.OverlayView.preventMapHitsAndGesturesFrom(this._wrapper));class r extends google.maps.OverlayView{constructor(f){super();Ie(this,"pin");this.pin=f}draw(){var p;const f=(p=this.getProjection())==null?void 0:p.fromLatLngToDivPixel(this.pin._latLng??null);f&&this.pin._wrapper&&(this.pin._wrapper.style.left=f.x+"px",this.pin._wrapper.style.top=f.y+"px")}onAdd(){var f;this.pin._wrapper&&((f=this.getPanes())==null||f.floatPane.appendChild(this.pin._wrapper))}onRemove(){var f,p;(p=(f=this.pin._wrapper)==null?void 0:f.parentNode)==null||p.removeChild(this.pin._wrapper)}}this.pin=new r(this)}setCoordinate(n){this._latLng=new google.maps.LatLng(n.latitude,n.longitude),this.pin.draw()}setMap(n,r){var d;const l=(d=n==null?void 0:n.getProviderMap())==null?void 0:d.map;this.pin.setMap(l??null)}}const Rf="GoogleMapsCallback_b7d77ff2",MN="https://maps.googleapis.com/maps/api/js";function RN(e,t,n,{autocomplete:r=!1,channel:l=window.location.hostname,client:d,language:f,region:p,libraries:_=[],loading:E="async",params:T={}}={}){window[Rf]=e,r&&_.push("geocoder","places");const S={callback:Rf,channel:l,libraries:_.join(","),...T};n&&(S.key=n),d&&(S.client=d),f&&(S.language=f),p&&(S.region=p),E&&(S.loading=E),mp(MN+"?"+Object.entries(S).map(([w,O])=>w+"="+O).join("&"))}const Np=new ao().withLoadFunction(RN).withMapClass(DN).withPinClass(AN).withProviderName("Google").build();class to{constructor(t,n){Ie(this,"_ne");Ie(this,"_sw");this._ne=new dn(n),this._sw=new dn(t)}static fit(t){const n=t.map(E=>E.latitude),r=Math.max(...n),l=Math.min(...n),d=t.map(E=>E.normalLon).sort((E,T)=>E-T),f=d.map((E,T)=>({distance:(T<d.length-1?d[T+1]:d[0]+360)-E,index:T})).reduce((E,T)=>T.distance>E.distance?T:E).index,p=d[f],_=d[(f+1)%d.length];return new this(new dn(l,_),new dn(r,p))}get ne(){return this._ne}set ne(t){this._ne=new dn(t)}get sw(){return this._sw}set sw(t){this._sw=new dn(t)}contains(t){const n=this._sw.latitude<=t.latitude&&t.latitude<=this._ne.latitude,r=this._ne.longitude-this._sw.longitude>=360,l=this._sw.normalLon<=this._ne.normalLon?this._sw.normalLon<=t.normalLon&&t.normalLon<=this._ne.normalLon:this._sw.normalLon<=t.normalLon||t.normalLon<=this._ne.normalLon;return n&&(r||l)}extend(t){if(this._ne.latitude=Math.max(this._ne.latitude,t.latitude),this._sw.latitude=Math.min(this._sw.latitude,t.latitude),!this.contains(t)){const n=((t.longitude-this._ne.longitude)%360+360)%360,r=((this._sw.longitude-t.longitude)%360+360)%360;n<r?this._ne.longitude+=n:this._sw.longitude-=r}}getCenter(t=Gr.SPHERICAL){const n=new dn(this._ne.latitude,this._sw.longitude),r=this._sw.distanceTo(n,Nn.DEGREE,t),l=(n.longitude+this._ne.longitude)/2+(this._ne.longitude<n.longitude?180:0);return n.add(-r/2,0,Nn.DEGREE,t),n.longitude=l,n}}class bN{constructor(){Ie(this,"_anchorX");Ie(this,"_anchorY");Ie(this,"_height");Ie(this,"_icon");Ie(this,"_srText");Ie(this,"_width");Ie(this,"_zIndex");Ie(this,"_class");Ie(this,"_element");this._anchorX=.5,this._anchorY=1,this._height=39,this._icon="default",this._srText="map pin",this._width=33,this._zIndex=0,this._class="",this._element=null}getAnchorX(){return this._anchorX}getAnchorY(){return this._anchorY}getClass(){return this._class}getElement(){return this._element}getHeight(){return this._height}getIcon(){return this._icon}getSRText(){return this._srText}getWidth(){return this._width}getZIndex(){return this._zIndex}setAnchorX(t){return this._anchorX=t,this}setAnchorY(t){return this._anchorY=t,this}setClass(t){return this._class=t,this}setElement(t){return this._element=t,this}setHeight(t){return this._height=t,this}setIcon(t){return this._icon=t,this}setSRText(t){return this._srText=t,this}setWidth(t){return this._width=t,this}setZIndex(t){return this._zIndex=t,this}}class yd{constructor(){Ie(this,"coordinate");Ie(this,"hideOffscreen");Ie(this,"icons");Ie(this,"propertiesForStatus");Ie(this,"provider");Ie(this,"type");Ie(this,"hasPinUrl");this.coordinate=new dn(0,0),this.hideOffscreen=!1,this.icons={},this.propertiesForStatus=t=>new bN,this.provider=null,this.type="",this.hasPinUrl=!1}withCoordinate(t){return this.coordinate=new dn(t),this}withHideOffscreen(t){return this.hideOffscreen=t,this}withIcon(t,n){return this.icons[t]=n,this}withPropertiesForStatus(t){return kr(t,Sr.FUNCTION),this.propertiesForStatus=t,this}withProvider(t){return t&&(wr(t,co),this.provider=t),this}withHasPinUrl(t){return this.hasPinUrl=t,this}withType(t){return this.type=t,this}build(){return new LN(this)}}class LN{constructor(t){Ie(this,"_coordinate");Ie(this,"_hideOffscreen");Ie(this,"_icons");Ie(this,"_propertiesForStatus");Ie(this,"_type");Ie(this,"_clickHandler");Ie(this,"_focusHandler");Ie(this,"_hoverHandler");Ie(this,"_hidden");Ie(this,"_cancelHiddenUpdater");Ie(this,"_map");Ie(this,"_pin");Ie(this,"_status");var n,r;if(wr(t,yd),t.provider&&wr(t.provider,co),!((n=t.provider)!=null&&n.loaded))throw new Error(`MapProvider '${(r=t.provider)==null?void 0:r.getProviderName()}' is not loaded. The MapProvider must be loaded before calling MapPin constructor.`);this._coordinate=t.coordinate,this._hideOffscreen=t.hideOffscreen,this._icons={...t.icons},this._propertiesForStatus=t.propertiesForStatus,this._type=t.type,this._clickHandler=()=>null,this._focusHandler=l=>this._hoverHandler(l),this._hoverHandler=l=>null,this._hidden=!1,this._cancelHiddenUpdater=()=>null,this._map=null,this._pin=new yp(t.provider).withIcons({...this._icons}).withClickHandler(()=>this._clickHandler()).withFocusHandler(l=>this._focusHandler(l)).withHoverHandler(l=>this._hoverHandler(l)).withHasPinUrl(t.hasPinUrl).build(),this._pin.setCoordinate(t.coordinate),this._status={},this.setStatus(this._status)}getCoordinate(){return this._coordinate}getIcon(t){return this._icons[t]}getMap(){return this._map}getProviderPin(){return this._pin}getType(){return this._type}remove(){this.setMap(null)}setClickHandler(t){kr(t,Sr.FUNCTION),this._clickHandler=t}setCoordinate(t){this._coordinate=new dn(t),this._pin.setCoordinate(this._coordinate),this._hideOffscreen&&this._hideIfOffscreen()}setFocusHandler(t){kr(t,Sr.FUNCTION),this._focusHandler=t}setHoverHandler(t){kr(t,Sr.FUNCTION),this._hoverHandler=t}setMap(t){if(t!==this._map&&(t!==null&&wr(t,Ep),this._pin.setMap(t,this._hidden?null:this._map),this._map=t,this._hidden=!1,this._cancelHiddenUpdater(),t&&this._hideOffscreen)){let n=!1;const r=new Promise(l=>{this._cancelHiddenUpdater=()=>{n=!0,l()}});(async()=>{for(;!n;)this._hideIfOffscreen(),await Promise.race([r,t.moving()]),await Promise.race([r,t.idle()])})()}}setStatus(t){Object.assign(this._status,t),this._pin.setProperties(this._propertiesForStatus(this._status))}_hideIfOffscreen(){if(this._map){const t=this._map.getBounds().contains(this._coordinate);this._hidden&&t?this._pin.setMap(this._map,null):!this._hidden&&!t&&this._pin.setMap(null,this._map),this._hidden=!t}}}const ms=.98;function qa(e,t){return Math.max(e instanceof Function?e():e||0,0)/t}class Cp{constructor(){Ie(this,"controlEnabled");Ie(this,"defaultCenter");Ie(this,"defaultZoom");Ie(this,"legendPins");Ie(this,"padding");Ie(this,"panHandler");Ie(this,"panStartHandler");Ie(this,"provider");Ie(this,"providerOptions");Ie(this,"singlePinZoom");Ie(this,"wrapper");this.controlEnabled=!0,this.defaultCenter=new dn(39.83,-98.58),this.defaultZoom=4,this.legendPins=[],this.padding={bottom:()=>50,left:()=>50,right:()=>50,top:()=>50},this.panHandler=(t,n)=>null,this.panStartHandler=t=>null,this.provider=null,this.providerOptions={},this.singlePinZoom=14,this.wrapper=null}withControlEnabled(t){return this.controlEnabled=t,this}withDefaultCenter(t){return this.defaultCenter=new dn(t),this}withDefaultZoom(t){return this.defaultZoom=t,this}withLegendPins(t){return this.legendPins=Array.from(t),this}withPadding(t){return this.padding=t,this}withPanHandler(t){return kr(t,Sr.FUNCTION),this.panHandler=t,this}withPanStartHandler(t){return kr(t,Sr.FUNCTION),this.panStartHandler=t,this}withProvider(t){return wr(t,co),this.provider=t,this}withProviderOptions(t){return this.providerOptions=t,this}withSinglePinZoom(t){return this.singlePinZoom=t,this}withWrapper(t){return t?(wr(t,HTMLElement),this.wrapper=t,this):this}build(){return new Ep(this)}}let Ep=class{constructor(t){Ie(this,"_defaultCenter");Ie(this,"_defaultZoom");Ie(this,"_legendPins");Ie(this,"_padding");Ie(this,"_provider");Ie(this,"_singlePinZoom");Ie(this,"_wrapper");Ie(this,"_cachedBounds");Ie(this,"_resolveIdle");Ie(this,"_resolveMoving");Ie(this,"_idlePromise");Ie(this,"_panHandlerRunning");Ie(this,"_panStartHandlerRunning");Ie(this,"_currentBounds");Ie(this,"_movingPromise");Ie(this,"_panHandler");Ie(this,"_panStartHandler");Ie(this,"_map");var n,r,l;if(wr(t,Cp),t.provider&&wr(t.provider,co),t.wrapper&&wr(t.wrapper,HTMLElement),!((n=t.provider)!=null&&n.loaded))throw new Error(`MapProvider '${(r=t.provider)==null?void 0:r.getProviderName()}' is not loaded. The MapProvider must be loaded before calling Map constructor.`);for(this._defaultCenter=t.defaultCenter,this._defaultZoom=t.defaultZoom,this._legendPins=t.legendPins,this._provider=t.provider,this._singlePinZoom=t.singlePinZoom,this._wrapper=t.wrapper,this._padding={},this.setPadding(t.padding),this._cachedBounds=null,this._resolveIdle=()=>null,this._resolveMoving=()=>null,this._idlePromise=Promise.resolve(),this._setIdle(),this.setPanHandler(t.panHandler),this.setPanStartHandler(t.panStartHandler);(l=this._wrapper)!=null&&l.lastChild;)this._wrapper.removeChild(this._wrapper.lastChild);this._panHandlerRunning=!1,this._panStartHandlerRunning=!1,this._map=new _p(t.provider,this._wrapper).withControlEnabled(t.controlEnabled).withPanHandler(()=>this.panHandler()).withPanStartHandler(()=>this.panStartHandler()).withProviderOptions(t.providerOptions).build(),this.setZoomCenter(this._defaultZoom,this._defaultCenter),this._currentBounds=this.getBounds()}fitCoordinates(t,n=!1,r=this._singlePinZoom){t.length?this.setBounds(to.fit(t),n,this._padding,r):this.setZoomCenter(this._defaultZoom,this._defaultCenter,n)}getBounds(){var t,n;if(!this._cachedBounds){const r=((t=this._wrapper)==null?void 0:t.offsetHeight)??0,l=((n=this._wrapper)==null?void 0:n.offsetWidth)??0,d=this.getZoom(),f=this.getCenter(),p=360/Math.pow(2,d+8),_=l*p,E=r*p;this._cachedBounds=new to(f,f),this._cachedBounds.ne.add(E/2,_/2,Nn.DEGREE,Gr.MERCATOR),this._cachedBounds.sw.add(-E/2,-_/2,Nn.DEGREE,Gr.MERCATOR),this.moving().then(()=>this._cachedBounds=null)}return new to(this._cachedBounds.sw,this._cachedBounds.ne)}getCenter(){return this._map.getCenter()}getProviderMap(){return this._map}getZoom(){return this._map.getZoom()}async idle(){await this._idlePromise}async moving(){await this._movingPromise}newPinOptions(){return new yd().withProvider(this._provider)}panHandler(){this._panHandlerRunning||(this._panHandlerRunning=!0,requestAnimationFrame(()=>{const t=this._currentBounds;this._currentBounds=this.getBounds(),this._panHandler&&this._panHandler(t,new to(new dn(this._currentBounds.sw),new dn(this._currentBounds.ne))),this._panHandlerRunning=!1}),this._setIdle())}panStartHandler(){this._panStartHandlerRunning||(this._panStartHandlerRunning=!0,requestAnimationFrame(()=>{this._panStartHandler&&this._panStartHandler(new to(new dn(this._currentBounds.sw),new dn(this._currentBounds.ne))),this._panStartHandlerRunning=!1}),this._setMoving())}setBounds({ne:t,sw:n},r=!1,l={},d=1/0){var z,q;const f=(z=this._wrapper)==null?void 0:z.offsetHeight,p=(q=this._wrapper)==null?void 0:q.offsetWidth;if(!f||!p)return;let _=qa(l.bottom,f),E=qa(l.left,p),T=qa(l.right,p),S=qa(l.top,f),w=E+T,O=_+S;w>ms&&(E*=ms/w,T*=ms/w,w=ms),O>ms&&(_*=ms/O,S*=ms/O,O=ms);const m=f*(1-O),v=p*(1-w),I=new to(n,t),G=new dn(I.ne.latitude,I.sw.longitude),k=I.sw.distanceTo(G,Nn.DEGREE,Gr.MERCATOR),P=(I.ne.longitude-G.longitude+360)%360;let H=Math.max(k,P*m/v)/(1-O),j=Math.max(P,k*v/m)/(1-w),re=Math.log2(p*360/j)-8;re>d&&(re=d,j=p*360/2**(re+8),H=j*f/p);const te=I.getCenter(Gr.MERCATOR),ce=(S-_)/2*H,V=(T-E)/2*j;te.add(ce,V,Nn.DEGREE,Gr.MERCATOR),this.setZoomCenter(re,te,r)}setCenter(t,n=!1){this._map.setCenter(new dn(t),n)}setPadding({bottom:t=this._padding.bottom,left:n=this._padding.left,right:r=this._padding.right,top:l=this._padding.top}){return this._padding={bottom:t,left:n,right:r,top:l},this}setPanHandler(t){kr(t,Sr.FUNCTION),this._panHandler=t}setPanStartHandler(t){kr(t,Sr.FUNCTION),this._panStartHandler=t}setZoom(t,n=!1){this._map.setZoom(t,n)}setZoomCenter(t,n,r=!1){this._map.setZoomCenter(t,n,r)}_setIdle(){this._resolveMoving(),this._movingPromise=new Promise(t=>this._resolveMoving=t),this._resolveIdle()}_setMoving(){this._resolveIdle(),this._idlePromise=new Promise(t=>this._resolveIdle=t),this._resolveMoving()}};const Nc=rt.createContext(null);function IN(){const e=rt.useContext(Nc);if(!e||e.map===void 0)throw new Error("Attempted to call useMapContext() outside of <Map>.");return e.map}const Tp=({apiKey:e,bounds:t,children:n,className:r,clientKey:l,controls:d=!0,defaultCenter:f={latitude:39.83,longitude:-98.58},defaultZoom:p=4,mapRef:_,padding:E={bottom:50,left:50,right:50,top:50},panHandler:T=()=>null,panStartHandler:S=()=>null,provider:w=Np,providerOptions:O={},singleZoom:m=14})=>{const v=rt.useRef(null),[I,G]=rt.useState(new dn(f)),[k,P]=rt.useState(!1),[H,j]=rt.useState(),[re,te]=rt.useState(p),ce=(V,z)=>{T(V,z),z&&G(z.getCenter())};return rt.useEffect(()=>{!k||!H||te(H.getZoom())},[I]),rt.useEffect(()=>{if(!t||!k||!H)return;const V=t.map(z=>new dn(z));H.fitCoordinates(V)},[JSON.stringify(t),H]),rt.useEffect(()=>{if(!k||H)return;const V=new Cp().withControlEnabled(d).withDefaultCenter(I).withDefaultZoom(re).withPadding(E).withPanHandler(ce).withPanStartHandler(S).withProvider(w).withProviderOptions(O).withSinglePinZoom(m).withWrapper(v.current).build();j(V),_&&(_.current=V)},[k]),rt.useEffect(()=>{k||H||!v.current||w.load(e,{...O,...l&&{client:l}}).then(()=>P(!0))},[]),nt.jsx("div",{className:lo({"is-loaded":k},r),id:"map",ref:v,"data-testid":"map",children:H&&nt.jsx(Nc.Provider,{value:{map:H,provider:w},children:n})})},kN=({count:e})=>nt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",children:nt.jsxs("g",{fill:"none",fillRule:"evenodd",children:[nt.jsx("circle",{fill:"red",fillRule:"nonzero",stroke:"white",cx:"11",cy:"11",r:"11"}),nt.jsx("text",{fill:"white",fontFamily:"Arial-BoldMT,Arial",fontSize:"12",fontWeight:"bold",children:nt.jsx("tspan",{x:"50%",y:"15",textAnchor:"middle",children:e})})]})}),Nd=rt.createContext(null);function PN(){const e=rt.useContext(Nd);if(!e)throw new Error("Attempted to call useClustererContext() outside of <Clusterer>.");return e}const $N=({clusterRadius:e=50,children:t,ClusterTemplate:n=kN})=>{const{map:r}=rt.useContext(Nc),[l,d]=rt.useState([]),[f,p]=rt.useState(),[_,E]=rt.useState([]),[T,S]=rt.useState([]);return rt.useEffect(()=>{p(FN(l,r.getZoom(),e))},[l,r.getZoom()]),rt.useEffect(()=>{S(()=>[]),E(()=>[]),(f==null?void 0:f.length)!==0&&(f==null||f.forEach(w=>{if(w.length===1){w[0].pin.setMap(r);return}if(w.length>1){const O=to.fit(w.map(v=>v.pin.getCoordinate())).getCenter(Gr.MERCATOR),m=`cluster-{${O._lat},${O._lon}}`;w.forEach(v=>v.pin.setMap(null)),E(v=>[...v,m]),S(v=>[...v,nt.jsx(Cd,{coordinate:O,id:m,onClick:()=>r.fitCoordinates(w.map(I=>I.pin.getCoordinate()),!0,1/0),children:nt.jsx(n,{count:w.length})},m)])}}))},[f]),nt.jsx(Nd.Provider,{value:{clusters:f??[],clusterIds:_,setPinStore:d},children:nt.jsxs(nt.Fragment,{children:[T.map((w,O)=>nt.jsx(rt.Fragment,{children:w},O)),t]})})},FN=(e,t,n)=>{const r=n*Math.PI/2**(t+7),l=e.map((p,_)=>[_]),d=[];e.forEach((p,_)=>{for(let E=_;E<e.length;E++)E!==_&&new dn(p.pin.getCoordinate()).distanceTo(new dn(e[E].pin.getCoordinate()),Nn.RADIAN,Gr.MERCATOR)<=r&&(l[_].push(E),l[E].push(_))});let f=1;for(;f;){f=0;let p;if(l.forEach((T,S)=>{T.length>f&&(f=T.length,p=S)}),!f)break;const _=l[p??0],E=[];l[p??0]=[];for(const T of _){const S=l[T];E.push(e[T]),l[T]=[],S.forEach(w=>l[w].splice(l[w].indexOf(T),1))}d.push(E)}return d},BN=nt.jsx("svg",{width:"30",height:"38",viewBox:"0 0 30 38",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:nt.jsx("path",{d:"M30 15.0882C30 23.4212 23.3333 30.7353 15 38C7.22222 31.2941 0 23.4212 0 15.0882C0 6.75523 6.71573 0 15 0C23.2843 0 30 6.75523 30 15.0882Z",fill:"red"})}),Cd=({children:e,coordinate:t,hideOffscreen:n=!1,id:r,icon:l=BN,onClick:d=()=>null,onFocus:f=()=>null,onHover:p=()=>null,zIndex:_,hasPinUrl:E=!1})=>{const{map:T,provider:S}=rt.useContext(Nc),w=rt.useContext(Nd),O=rt.useMemo(()=>new yd().withCoordinate(t).withHideOffscreen(n).withProvider(S).withHasPinUrl(E).build(),[]);rt.useEffect(()=>{if(_!==0&&!_)return;const v=O.getProviderPin().getWrapperElement();v&&(v.style.zIndex=_.toString())},[_]),rt.useEffect(()=>{O.setMap(T),O.setClickHandler(()=>d(r)),O.setFocusHandler(I=>f(I,r)),O.setHoverHandler(I=>p(I,r));const v=w==null?void 0:w.clusterIds.includes(r);return w&&!v&&w.setPinStore(I=>[...I,{pin:O,id:r}]),()=>{O.setMap(null),w&&w.setPinStore(I=>I.filter(G=>G.id!==r))}},[]);const m=e||l;if(m){const v=O.getProviderPin().getPinElement();return Object.assign(v.style,{height:"auto",width:"auto"}),fd.createPortal(m,v)}return null},HN=({children:e,coordinate:t,linkSameTab:n,pinUrl:r,onClick:l=()=>null,onHover:d=()=>null,onFocus:f=()=>null,...p})=>{var _;return nt.jsx(Tp,{bounds:[t],...p,children:nt.jsx(Cd,{coordinate:t,id:"location-map-marker",onClick:l,onHover:d,onFocus:f,hasPinUrl:((_=r||"")==null?void 0:_.length)>0,children:r?nt.jsx(pp,{href:r,target:n?"_self":"_blank","aria-label":"map-marker",children:e}):e||void 0})})};var Xc={},Vl={},bf;function WN(){if(bf)return Vl;bf=1;var e=rt;const t=e.createContext(null);function n(l,d){let f=null;l!=null&&(f=l[1]);function p(){return d??(f!=null?f.getTheme():null)}return{getTheme:p}}function r(){const l=e.useContext(t);if(l==null)throw Error("LexicalComposerContext.useLexicalComposerContext: cannot find a LexicalComposerContext");return l}return Vl.LexicalComposerContext=t,Vl.createLexicalComposerContext=n,Vl.useLexicalComposerContext=r,Vl}var ql={},Lf;function KN(){if(Lf)return ql;Lf=1;var e=rt;function t(r){let l=new URLSearchParams;l.append("code",r);for(let d=1;d<arguments.length;d++)l.append("v",arguments[d]);throw Error(`Minified Lexical error #${r}; visit https://lexical.dev/docs/error?${l} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let n=e.createContext(null);return ql.LexicalComposerContext=n,ql.createLexicalComposerContext=function(r,l){let d=null;return r!=null&&(d=r[1]),{getTheme:function(){return l??(d!=null?d.getTheme():null)}}},ql.useLexicalComposerContext=function(){let r=e.useContext(n);return r==null&&t(8),r},ql}var Qc,If;function qn(){return If||(If=1,Qc=process.env.NODE_ENV==="development"?WN():KN()),Qc}var He={},kf;function zN(){if(kf)return He;kf=1;function e(u){return{type:u}}const t=e("SELECTION_CHANGE_COMMAND"),n=e("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),r=e("CLICK_COMMAND"),l=e("DELETE_CHARACTER_COMMAND"),d=e("INSERT_LINE_BREAK_COMMAND"),f=e("INSERT_PARAGRAPH_COMMAND"),p=e("CONTROLLED_TEXT_INSERTION_COMMAND"),_=e("PASTE_COMMAND"),E=e("REMOVE_TEXT_COMMAND"),T=e("DELETE_WORD_COMMAND"),S=e("DELETE_LINE_COMMAND"),w=e("FORMAT_TEXT_COMMAND"),O=e("UNDO_COMMAND"),m=e("REDO_COMMAND"),v=e("KEYDOWN_COMMAND"),I=e("KEY_ARROW_RIGHT_COMMAND"),G=e("MOVE_TO_END"),k=e("KEY_ARROW_LEFT_COMMAND"),P=e("MOVE_TO_START"),H=e("KEY_ARROW_UP_COMMAND"),j=e("KEY_ARROW_DOWN_COMMAND"),re=e("KEY_ENTER_COMMAND"),te=e("KEY_SPACE_COMMAND"),ce=e("KEY_BACKSPACE_COMMAND"),V=e("KEY_ESCAPE_COMMAND"),z=e("KEY_DELETE_COMMAND"),q=e("KEY_TAB_COMMAND"),Te=e("INSERT_TAB_COMMAND"),Se=e("INDENT_CONTENT_COMMAND"),Ee=e("OUTDENT_CONTENT_COMMAND"),de=e("DROP_COMMAND"),K=e("FORMAT_ELEMENT_COMMAND"),D=e("DRAGSTART_COMMAND"),Z=e("DRAGOVER_COMMAND"),oe=e("DRAGEND_COMMAND"),Y=e("COPY_COMMAND"),W=e("CUT_COMMAND"),J=e("SELECT_ALL_COMMAND"),R=e("CLEAR_EDITOR_COMMAND"),U=e("CLEAR_HISTORY_COMMAND"),X=e("CAN_REDO_COMMAND"),fe=e("CAN_UNDO_COMMAND"),_e=e("FOCUS_COMMAND"),B=e("BLUR_COMMAND"),M=e("KEY_MODIFIER_COMMAND"),F=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",se=F&&"documentMode"in document?document.documentMode:null,ye=F&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),De=F&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),ee=F&&"InputEvent"in window&&!se?"getTargetRanges"in new window.InputEvent("input"):!1,ne=F&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),ue=F&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,be=F&&/Android/.test(navigator.userAgent),Ne=F&&/^(?=.*Chrome).*/i.test(navigator.userAgent),Re=F&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!Ne,ke=1,Fe=3,qe=0,Be=1,ut=2,At=0,Ut=1,tn=2,Oe=1,ie=2,le=4,ve=8,Le=16,Me=32,je=64,it=128,st=Oe|ie|le|ve|Le|Me|je|it,ot=1,St=2,Ge=1,ze=2,tt=3,yt=4,Nt=5,Et=6,gt=" ",mt=ne||ue||Re?gt:"​",$t=`
36
+ */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var d="",f=0;f<arguments.length;f++){var p=arguments[f];p&&(d=l(d,r(p)))}return d}function r(d){if(typeof d=="string"||typeof d=="number")return d;if(typeof d!="object")return"";if(Array.isArray(d))return n.apply(null,d);if(d.toString!==Object.prototype.toString&&!d.toString.toString().includes("[native code]"))return d.toString();var f="";for(var p in d)t.call(d,p)&&d[p]&&(f=l(f,p));return f}function l(d,f){return f?d?d+" "+f:d+f:d}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(gp);var uN=gp.exports;const lo=hd(uN),dN="phonecall",fN="drivingdirection",Of="calltoactionclick",hN="clicktowebsite",gN="other",Df="link",pN="cta",mN=e=>{const t={...e.cta??{link:e.href}};if(!t.link)throw e.cta?new Error("CTA's link is undefined"):new Error("Link's href is undefined");return t.linkType||(t.linkType=NN(t.link)),t.link=CN(t),t},_N=(e,t)=>{switch(e.linkType){case"EMAIL":return"CTA_CLICK";case"PHONE":return"TAP_TO_CALL";case"CLICK_TO_WEBSITE":return"WEBSITE";case"DRIVING_DIRECTIONS":return"DRIVING_DIRECTIONS";case"OTHER":return"CTA_CLICK";case"URL":return"LINK";default:return t?"CTA_CLICK":"LINK"}},yN=(e,t,n)=>{if(e)return e;if(t)switch(t){case"PHONE":return dN;case"EMAIL":return Of;case"URL":return Df;case"DRIVING_DIRECTIONS":return fN;case"CLICK_TO_WEBSITE":return hN;case"OTHER":return gN;default:return n?Of:Df}return pN},NN=e=>EN(e)?"EMAIL":e.startsWith("tel:")?"PHONE":"URL",CN=e=>e.linkType==="EMAIL"?e.link.startsWith("mailto:")?e.link:`mailto:${e.link}`:e.linkType==="PHONE"?e.link.startsWith("tel:")?e.link:`tel:${e.link}`:e.link,EN=e=>e.startsWith("mailto:")?!0:/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(e),pp=rt.forwardRef(function(t,n){const{children:r,onClick:l,className:d,eventName:f,scope:p,currency:_,amount:E,cta:T,obfuscate:S,customTags:w,customValues:O,...m}=t,v=mN(t),I=_N(v,!!T),G=yN(f,v.linkType,!!T),k=nl(),P=S||S!==!1&&v.linkType==="EMAIL",H=async te=>{const ce=te.currentTarget;let V="";if(P){te.preventDefault();const z=ce.href.split("/").at(-1);z&&(V=atob(z))}if(k!==null)try{await k.track({action:I,scope:p,eventName:G,currency:_,amount:E,destinationUrl:V||ce.href,customTags:w,customValues:O})}catch{console.error("Failed to report click Analytics Event")}l&&l(te),V&&(window.location.href=V)},j=P?"Obfuscated, set a label or child":v.link,re={className:lo("Link",d),href:P?btoa(v.link):v.link,onClick:H,rel:t.target&&!t.rel?"noopener":t.rel,ref:n};return k!=null&&k.getDebugEnabled()&&(re["data-ya-action"]=I,re["data-ya-scopeoverride"]=p,re["data-ya-eventname"]=G),nt.jsx("a",{...m,...re,suppressHydrationWarning:!0,children:r||v.label||j})});var Nn=(e=>(e.DEGREE="deg",e.KILOMETER="km",e.MILE="mi",e.RADIAN="r",e))(Nn||{}),Gr=(e=>(e.MERCATOR="mercator",e.SPHERICAL="spherical",e))(Gr||{});const Zc=3959,Jc=6371,TN=["latitude","lat"],xN=["longitude","lon","lng","long"];function Af(e,t){for(const n of t)if(e[n]||e[n]===0)return e[n]}function Mf(e){switch(typeof e){case"string":case"number":const t=Number.parseFloat(e);if(Number.isNaN(t))throw new Error(`'${e}' must be convertible to a Number'`);return t;default:throw new Error(`typeof '${e}' must be a number or a string that can be converted to a number, is '${typeof e}'`)}}function ro(e){return e*Math.PI/180}function Zi(e){return e/Math.PI*180}function vN(e,t){const n=ro(e.latitude),r=ro(t.latitude),l=r-n,d=ro(t.longitude-e.longitude),f=Math.pow(Math.sin(l/2),2)+Math.cos(n)*Math.cos(r)*Math.pow(Math.sin(d/2),2);return 2*Math.atan2(Math.sqrt(f),Math.sqrt(1-f))}function SN(e,t){const n=Math.tan(Math.PI/360*(e+90)),r=Math.tan(Math.PI/360*(t+90));return Math.log(r/n)}function wN(e,t){const r=Math.tan(Math.PI/360*(e+90))*Math.pow(Math.E,t);return Math.atan(r)*360/Math.PI-90}class dn{constructor(t,n){Ie(this,"_lat");Ie(this,"_lon");let r=t,l=n;this._lat=0,this._lon=0,typeof t=="object"?(r=Af(t,TN)??0,l=Af(t,xN)??0,this.latitude=typeof r=="function"?r():r,this.longitude=typeof l=="function"?l():l):typeof r=="number"&&typeof l=="number"&&(this.latitude=r,this.longitude=l)}get latitude(){return this._lat}set latitude(t){this._lat=Math.max(-90,Math.min(Mf(t),90))}get longitude(){return this._lon}set longitude(t){this._lon=Mf(t)}get normalLon(){return((this._lon+180)%360+360)%360-180}add(t,n,r=Nn.DEGREE,l=Gr.SPHERICAL){if(l===Gr.MERCATOR&&(r===Nn.DEGREE||r===Nn.RADIAN)){const d=r===Nn.DEGREE?ro(t):t,f=r===Nn.DEGREE?n:Zi(n);this.latitude=wN(this.latitude,d),this.longitude+=f}else switch(r){case Nn.DEGREE:this.latitude+=t,this.longitude+=n;break;case Nn.KILOMETER:this.latitude+=Zi(t)*Jc,this.longitude+=Zi(n)*Jc*Math.cos(ro(this.latitude));break;case Nn.MILE:this.latitude+=Zi(t)*Zc,this.longitude+=Zi(n)*Zc*Math.cos(ro(this.latitude));break;case Nn.RADIAN:this.latitude+=Zi(t),this.longitude+=Zi(n);break;default:throw new Error(`unit unhandled: ${String(r)}`)}}distanceTo(t,n=Nn.MILE,r=Gr.SPHERICAL){if(r===Gr.MERCATOR&&(n===Nn.DEGREE||n===Nn.RADIAN)){const l=SN(this.latitude,t.latitude),d=Math.abs(t.normalLon-this.normalLon),f=ro(Math.min(d,360-d)),p=Math.sqrt(Math.pow(l,2)+Math.pow(f,2));switch(n){case Nn.DEGREE:return Zi(p);case Nn.RADIAN:return p;default:throw new Error(`unit unhandled: ${String(n)}`)}}else{const l=vN(this,t);switch(n){case Nn.DEGREE:return Zi(l);case Nn.KILOMETER:return l*Jc;case Nn.MILE:return l*Zc;case Nn.RADIAN:return l;default:throw new Error(`unit unhandled: ${String(n)}`)}}}equals(t){return t&&t.latitude===this.latitude&&t.longitude===this.longitude}searchQueryString(){return`${this.latitude},${this.longitude}`}}function mp(e,t=()=>null){const n=document.createElement("script");n.async=!0,n.onload=t,n.src=e,document.head.appendChild(n)}var Sr=(e=>(e.UNDEFINED="undefined",e.NULL="object",e.BOOLEAN="boolean",e.NUMBER="number",e.BIGINT="bigint",e.STRING="string",e.SYMBOL="symbol",e.FUNCTION="function",e.OBJECT="object",e))(Sr||{});function kr(e,t){if(typeof t!="string")throw new Error("Assertion error: 'type' must be a string");if(typeof e!==t)throw new Error(`Expected an object of type '${t}' but received '${typeof e}'`)}function wr(e,t){let n;try{n=e instanceof t}catch{throw new Error("Assertion error: 'instanceClass' is not a valid constructor")}if(!n)throw new Error(`Expected an instance of '${t.name}' but received '${e.constructor.name}'`)}class _p{constructor(t,n){Ie(this,"providerMapClass");Ie(this,"wrapper");Ie(this,"controlEnabled");Ie(this,"panHandler");Ie(this,"panStartHandler");Ie(this,"providerOptions");wr(t,co),n&&wr(n,HTMLElement),this.providerMapClass=t.getMapClass(),this.wrapper=n,this.controlEnabled=!0,this.panHandler=()=>null,this.panStartHandler=()=>null,this.providerOptions={}}withControlEnabled(t){return this.controlEnabled=t,this}withPanHandler(t){return kr(t,Sr.FUNCTION),this.panHandler=t,this}withPanStartHandler(t){return kr(t,Sr.FUNCTION),this.panStartHandler=t,this}withProviderOptions(t){return this.providerOptions=t,this}build(){const t=this.providerMapClass;return new t(this)}}class rl{constructor(t){Ie(this,"_panHandler");Ie(this,"_panStartHandler");wr(t,_p),this._panHandler=t.panHandler,this._panStartHandler=t.panStartHandler}getCenter(){throw new Error("not implemented")}getZoom(){throw new Error("not implemented")}setCenter(t,n){throw new Error("not implemented")}setZoom(t,n){throw new Error("not implemented")}setZoomCenter(t,n,r){this.setZoom(t,r),this.setCenter(n,r)}}class yp{constructor(t){Ie(this,"providerPinClass");Ie(this,"clickHandler");Ie(this,"focusHandler");Ie(this,"hoverHandler");Ie(this,"icons");Ie(this,"hasPinUrl");wr(t,co),this.providerPinClass=t.getPinClass(),this.clickHandler=()=>null,this.focusHandler=n=>null,this.hoverHandler=n=>null,this.icons={},this.hasPinUrl=!1}withClickHandler(t){return kr(t,Sr.FUNCTION),this.clickHandler=t,this}withFocusHandler(t){return kr(t,Sr.FUNCTION),this.focusHandler=t,this}withHoverHandler(t){return kr(t,Sr.FUNCTION),this.hoverHandler=t,this}withIcons(t){return this.icons=t,this}withHasPinUrl(t){return this.hasPinUrl=t,this}build(){const t=this.providerPinClass;return new t(this)}}class _d{constructor(t){Ie(this,"_clickHandler");Ie(this,"_focusHandler");Ie(this,"_hoverHandler");Ie(this,"_icons");wr(t,yp),this._clickHandler=t.clickHandler,this._focusHandler=t.focusHandler,this._hoverHandler=t.hoverHandler,this._icons=t.icons}setCoordinate(t){throw new Error("not implemented")}setMap(t,n){throw new Error("not implemented")}setProperties(t){throw new Error("not implemented")}}const ON=Object.freeze({backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"contain",left:"0",outline:"none",pointerEvents:"auto",position:"absolute",top:"0"});class il extends _d{constructor(n){super(n);Ie(this,"_pinEl");Ie(this,"_pinAlt");Ie(this,"_wrapper");this._pinEl=n.hasPinUrl?document.createElement("div"):document.createElement("button"),Object.assign(this._pinEl.style,il.baseStyle),this._pinAlt=document.createElement("span"),this._pinAlt.classList.add("sr-only"),this._pinEl.appendChild(this._pinAlt),this._wrapper=document.createElement("div"),this._wrapper.style.pointerEvents="none",this._wrapper.appendChild(this._pinEl),this.addListeners()}static get baseStyle(){return ON}addListeners(){this._wrapper&&(this._wrapper.addEventListener("click",()=>this._clickHandler()),this._wrapper.addEventListener("focusin",()=>this._focusHandler(!0)),this._wrapper.addEventListener("focusout",()=>this._focusHandler(!1)),this._wrapper.addEventListener("mouseover",()=>this._hoverHandler(!0)),this._wrapper.addEventListener("mouseout",()=>this._hoverHandler(!1)))}getPinElement(){return this._pinEl}getWrapperElement(){return this._wrapper}setProperties(n){this.setElementProperties(n);const r=n.getClass(),l=n.getElement()||this._pinEl,d=n.getZIndex();l.style.pointerEvents="auto",this._wrapper&&(this._wrapper.style.zIndex=d.toString(),this._wrapper.setAttribute("class",r),l!==this._wrapper.children[0]&&(this._wrapper.children[0].style.pointerEvents="",this._wrapper.removeChild(this._wrapper.children[0]),this._wrapper.appendChild(l)))}setElementProperties(n){const r=n.getAnchorX(),l=n.getAnchorY(),d=n.getHeight(),f=this._icons[n.getIcon()],p=n.getSRText(),_=n.getWidth();Object.assign(this._pinEl.style,{backgroundImage:f?`url("${f}")`:"",height:d+"px",transform:`translate(${-100*r}%, ${-100*l}%)`,width:_+"px"}),this._pinAlt.innerText=p}}class ao{constructor(){Ie(this,"loadFunction");Ie(this,"mapClass");Ie(this,"pinClass");Ie(this,"providerName");this.loadFunction=(t,n,r,l)=>t(),this.mapClass=rl,this.pinClass=_d,this.providerName=""}withLoadFunction(t){return kr(t,Sr.FUNCTION),this.loadFunction=t,this}withMapClass(t){return this.mapClass=t,this}withPinClass(t){return this.pinClass=t,this}withProviderName(t){return this.providerName=t,this}build(){return new co(this)}}class co{constructor(t){Ie(this,"_loadFunction");Ie(this,"_mapClass");Ie(this,"_pinClass");Ie(this,"_providerName");Ie(this,"_loadPromise");Ie(this,"_resolveLoad");Ie(this,"_rejectLoad");Ie(this,"_apiKey");Ie(this,"_loadInvoked");Ie(this,"_loaded");Ie(this,"_options");wr(t,ao),this._loadFunction=t.loadFunction,this._mapClass=t.mapClass,this._pinClass=t.pinClass,this._providerName=t.providerName,this._loadPromise=new Promise((n,r)=>{this._resolveLoad=n,this._rejectLoad=r}),this._apiKey="",this._loadInvoked=!1,this._loaded=!1,this._options={}}get loaded(){return this._loaded}getMapClass(){return this._mapClass}getPinClass(){return this._pinClass}getProviderName(){return this._providerName}async load(t=this._apiKey,n=this._options){!this._loadInvoked&&this._resolveLoad&&this._rejectLoad&&(this._loadInvoked=!0,this._loadFunction(this._resolveLoad,this._rejectLoad,t,n)),await this.ready(),this._loaded=!0}async ready(){await this._loadPromise}setLoadOptions(t,n=null){this._loadInvoked||(this._apiKey=t,this._options=n||this._options)}}class DN extends rl{constructor(n){super(n);Ie(this,"map");Ie(this,"_moving");n.wrapper&&(this.map=new google.maps.Map(n.wrapper,{disableDefaultUI:!n.controlEnabled,fullscreenControl:!1,gestureHandling:n.controlEnabled?"auto":"none",mapTypeControl:!1,rotateControl:!1,scaleControl:!1,streetViewControl:!1,zoomControl:n.controlEnabled,zoomControlOptions:{position:google.maps.ControlPosition.RIGHT_TOP},...n.providerOptions}),this._moving=!1,google.maps.event.addListener(this.map,"bounds_changed",()=>{this._moving||(this._moving=!0,this._panStartHandler())}),google.maps.event.addListener(this.map,"idle",()=>{this._moving=!1,this._panHandler()}))}getCenter(){var n;return new dn(((n=this.map)==null?void 0:n.getCenter())??{lat:0,lng:0})}getZoom(){var n;return((n=this.map)==null?void 0:n.getZoom())??0}setCenter(n,r){var d,f;const l=new google.maps.LatLng(n.latitude,n.longitude);r?(d=this.map)==null||d.panTo(l):(f=this.map)==null||f.setCenter(l)}setZoom(n,r){var l;(l=this.map)==null||l.setZoom(Math.floor(n))}setZoomCenter(n,r,l){this.setCenter(r,l),this.setZoom(n,l)}}class AN extends il{constructor(n){super(n);Ie(this,"_latLng");Ie(this,"pin");this._wrapper&&(this._wrapper.style.position="absolute",google.maps.OverlayView.preventMapHitsAndGesturesFrom(this._wrapper));class r extends google.maps.OverlayView{constructor(f){super();Ie(this,"pin");this.pin=f}draw(){var p;const f=(p=this.getProjection())==null?void 0:p.fromLatLngToDivPixel(this.pin._latLng??null);f&&this.pin._wrapper&&(this.pin._wrapper.style.left=f.x+"px",this.pin._wrapper.style.top=f.y+"px")}onAdd(){var f;this.pin._wrapper&&((f=this.getPanes())==null||f.floatPane.appendChild(this.pin._wrapper))}onRemove(){var f,p;(p=(f=this.pin._wrapper)==null?void 0:f.parentNode)==null||p.removeChild(this.pin._wrapper)}}this.pin=new r(this)}setCoordinate(n){this._latLng=new google.maps.LatLng(n.latitude,n.longitude),this.pin.draw()}setMap(n,r){var d;const l=(d=n==null?void 0:n.getProviderMap())==null?void 0:d.map;this.pin.setMap(l??null)}}const Rf="GoogleMapsCallback_b7d77ff2",MN="https://maps.googleapis.com/maps/api/js";function RN(e,t,n,{autocomplete:r=!1,channel:l=window.location.hostname,client:d,language:f,region:p,libraries:_=[],loading:E="async",params:T={}}={}){window[Rf]=e,r&&_.push("geocoder","places");const S={callback:Rf,channel:l,libraries:_.join(","),...T};n&&(S.key=n),d&&(S.client=d),f&&(S.language=f),p&&(S.region=p),E&&(S.loading=E),mp(MN+"?"+Object.entries(S).map(([w,O])=>w+"="+O).join("&"))}const Np=new ao().withLoadFunction(RN).withMapClass(DN).withPinClass(AN).withProviderName("Google").build();class to{constructor(t,n){Ie(this,"_ne");Ie(this,"_sw");this._ne=new dn(n),this._sw=new dn(t)}static fit(t){const n=t.map(E=>E.latitude),r=Math.max(...n),l=Math.min(...n),d=t.map(E=>E.normalLon).sort((E,T)=>E-T),f=d.map((E,T)=>({distance:(T<d.length-1?d[T+1]:d[0]+360)-E,index:T})).reduce((E,T)=>T.distance>E.distance?T:E).index,p=d[f],_=d[(f+1)%d.length];return new this(new dn(l,_),new dn(r,p))}get ne(){return this._ne}set ne(t){this._ne=new dn(t)}get sw(){return this._sw}set sw(t){this._sw=new dn(t)}contains(t){const n=this._sw.latitude<=t.latitude&&t.latitude<=this._ne.latitude,r=this._ne.longitude-this._sw.longitude>=360,l=this._sw.normalLon<=this._ne.normalLon?this._sw.normalLon<=t.normalLon&&t.normalLon<=this._ne.normalLon:this._sw.normalLon<=t.normalLon||t.normalLon<=this._ne.normalLon;return n&&(r||l)}extend(t){if(this._ne.latitude=Math.max(this._ne.latitude,t.latitude),this._sw.latitude=Math.min(this._sw.latitude,t.latitude),!this.contains(t)){const n=((t.longitude-this._ne.longitude)%360+360)%360,r=((this._sw.longitude-t.longitude)%360+360)%360;n<r?this._ne.longitude+=n:this._sw.longitude-=r}}getCenter(t=Gr.SPHERICAL){const n=new dn(this._ne.latitude,this._sw.longitude),r=this._sw.distanceTo(n,Nn.DEGREE,t),l=(n.longitude+this._ne.longitude)/2+(this._ne.longitude<n.longitude?180:0);return n.add(-r/2,0,Nn.DEGREE,t),n.longitude=l,n}}class bN{constructor(){Ie(this,"_anchorX");Ie(this,"_anchorY");Ie(this,"_height");Ie(this,"_icon");Ie(this,"_srText");Ie(this,"_width");Ie(this,"_zIndex");Ie(this,"_class");Ie(this,"_element");this._anchorX=.5,this._anchorY=1,this._height=39,this._icon="default",this._srText="map pin",this._width=33,this._zIndex=0,this._class="",this._element=null}getAnchorX(){return this._anchorX}getAnchorY(){return this._anchorY}getClass(){return this._class}getElement(){return this._element}getHeight(){return this._height}getIcon(){return this._icon}getSRText(){return this._srText}getWidth(){return this._width}getZIndex(){return this._zIndex}setAnchorX(t){return this._anchorX=t,this}setAnchorY(t){return this._anchorY=t,this}setClass(t){return this._class=t,this}setElement(t){return this._element=t,this}setHeight(t){return this._height=t,this}setIcon(t){return this._icon=t,this}setSRText(t){return this._srText=t,this}setWidth(t){return this._width=t,this}setZIndex(t){return this._zIndex=t,this}}class yd{constructor(){Ie(this,"coordinate");Ie(this,"hideOffscreen");Ie(this,"icons");Ie(this,"propertiesForStatus");Ie(this,"provider");Ie(this,"type");Ie(this,"hasPinUrl");this.coordinate=new dn(0,0),this.hideOffscreen=!1,this.icons={},this.propertiesForStatus=t=>new bN,this.provider=null,this.type="",this.hasPinUrl=!1}withCoordinate(t){return this.coordinate=new dn(t),this}withHideOffscreen(t){return this.hideOffscreen=t,this}withIcon(t,n){return this.icons[t]=n,this}withPropertiesForStatus(t){return kr(t,Sr.FUNCTION),this.propertiesForStatus=t,this}withProvider(t){return t&&(wr(t,co),this.provider=t),this}withHasPinUrl(t){return this.hasPinUrl=t,this}withType(t){return this.type=t,this}build(){return new LN(this)}}class LN{constructor(t){Ie(this,"_coordinate");Ie(this,"_hideOffscreen");Ie(this,"_icons");Ie(this,"_propertiesForStatus");Ie(this,"_type");Ie(this,"_clickHandler");Ie(this,"_focusHandler");Ie(this,"_hoverHandler");Ie(this,"_hidden");Ie(this,"_cancelHiddenUpdater");Ie(this,"_map");Ie(this,"_pin");Ie(this,"_status");var n,r;if(wr(t,yd),t.provider&&wr(t.provider,co),!((n=t.provider)!=null&&n.loaded))throw new Error(`MapProvider '${(r=t.provider)==null?void 0:r.getProviderName()}' is not loaded. The MapProvider must be loaded before calling MapPin constructor.`);this._coordinate=t.coordinate,this._hideOffscreen=t.hideOffscreen,this._icons={...t.icons},this._propertiesForStatus=t.propertiesForStatus,this._type=t.type,this._clickHandler=()=>null,this._focusHandler=l=>this._hoverHandler(l),this._hoverHandler=l=>null,this._hidden=!1,this._cancelHiddenUpdater=()=>null,this._map=null,this._pin=new yp(t.provider).withIcons({...this._icons}).withClickHandler(()=>this._clickHandler()).withFocusHandler(l=>this._focusHandler(l)).withHoverHandler(l=>this._hoverHandler(l)).withHasPinUrl(t.hasPinUrl).build(),this._pin.setCoordinate(t.coordinate),this._status={},this.setStatus(this._status)}getCoordinate(){return this._coordinate}getIcon(t){return this._icons[t]}getMap(){return this._map}getProviderPin(){return this._pin}getType(){return this._type}remove(){this.setMap(null)}setClickHandler(t){kr(t,Sr.FUNCTION),this._clickHandler=t}setCoordinate(t){this._coordinate=new dn(t),this._pin.setCoordinate(this._coordinate),this._hideOffscreen&&this._hideIfOffscreen()}setFocusHandler(t){kr(t,Sr.FUNCTION),this._focusHandler=t}setHoverHandler(t){kr(t,Sr.FUNCTION),this._hoverHandler=t}setMap(t){if(t!==this._map&&(t!==null&&wr(t,Ep),this._pin.setMap(t,this._hidden?null:this._map),this._map=t,this._hidden=!1,this._cancelHiddenUpdater(),t&&this._hideOffscreen)){let n=!1;const r=new Promise(l=>{this._cancelHiddenUpdater=()=>{n=!0,l()}});(async()=>{for(;!n;)this._hideIfOffscreen(),await Promise.race([r,t.moving()]),await Promise.race([r,t.idle()])})()}}setStatus(t){Object.assign(this._status,t),this._pin.setProperties(this._propertiesForStatus(this._status))}_hideIfOffscreen(){if(this._map){const t=this._map.getBounds().contains(this._coordinate);this._hidden&&t?this._pin.setMap(this._map,null):!this._hidden&&!t&&this._pin.setMap(null,this._map),this._hidden=!t}}}const ms=.98;function qa(e,t){return Math.max(e instanceof Function?e():e||0,0)/t}class Cp{constructor(){Ie(this,"controlEnabled");Ie(this,"defaultCenter");Ie(this,"defaultZoom");Ie(this,"legendPins");Ie(this,"padding");Ie(this,"panHandler");Ie(this,"panStartHandler");Ie(this,"provider");Ie(this,"providerOptions");Ie(this,"singlePinZoom");Ie(this,"wrapper");this.controlEnabled=!0,this.defaultCenter=new dn(39.83,-98.58),this.defaultZoom=4,this.legendPins=[],this.padding={bottom:()=>50,left:()=>50,right:()=>50,top:()=>50},this.panHandler=(t,n)=>null,this.panStartHandler=t=>null,this.provider=null,this.providerOptions={},this.singlePinZoom=14,this.wrapper=null}withControlEnabled(t){return this.controlEnabled=t,this}withDefaultCenter(t){return this.defaultCenter=new dn(t),this}withDefaultZoom(t){return this.defaultZoom=t,this}withLegendPins(t){return this.legendPins=Array.from(t),this}withPadding(t){return this.padding=t,this}withPanHandler(t){return kr(t,Sr.FUNCTION),this.panHandler=t,this}withPanStartHandler(t){return kr(t,Sr.FUNCTION),this.panStartHandler=t,this}withProvider(t){return wr(t,co),this.provider=t,this}withProviderOptions(t){return this.providerOptions=t,this}withSinglePinZoom(t){return this.singlePinZoom=t,this}withWrapper(t){return t?(wr(t,HTMLElement),this.wrapper=t,this):this}build(){return new Ep(this)}}let Ep=class{constructor(t){Ie(this,"_defaultCenter");Ie(this,"_defaultZoom");Ie(this,"_legendPins");Ie(this,"_padding");Ie(this,"_provider");Ie(this,"_singlePinZoom");Ie(this,"_wrapper");Ie(this,"_cachedBounds");Ie(this,"_resolveIdle");Ie(this,"_resolveMoving");Ie(this,"_idlePromise");Ie(this,"_panHandlerRunning");Ie(this,"_panStartHandlerRunning");Ie(this,"_currentBounds");Ie(this,"_movingPromise");Ie(this,"_panHandler");Ie(this,"_panStartHandler");Ie(this,"_map");var n,r,l;if(wr(t,Cp),t.provider&&wr(t.provider,co),t.wrapper&&wr(t.wrapper,HTMLElement),!((n=t.provider)!=null&&n.loaded))throw new Error(`MapProvider '${(r=t.provider)==null?void 0:r.getProviderName()}' is not loaded. The MapProvider must be loaded before calling Map constructor.`);for(this._defaultCenter=t.defaultCenter,this._defaultZoom=t.defaultZoom,this._legendPins=t.legendPins,this._provider=t.provider,this._singlePinZoom=t.singlePinZoom,this._wrapper=t.wrapper,this._padding={},this.setPadding(t.padding),this._cachedBounds=null,this._resolveIdle=()=>null,this._resolveMoving=()=>null,this._idlePromise=Promise.resolve(),this._setIdle(),this.setPanHandler(t.panHandler),this.setPanStartHandler(t.panStartHandler);(l=this._wrapper)!=null&&l.lastChild;)this._wrapper.removeChild(this._wrapper.lastChild);this._panHandlerRunning=!1,this._panStartHandlerRunning=!1,this._map=new _p(t.provider,this._wrapper).withControlEnabled(t.controlEnabled).withPanHandler(()=>this.panHandler()).withPanStartHandler(()=>this.panStartHandler()).withProviderOptions(t.providerOptions).build(),this.setZoomCenter(this._defaultZoom,this._defaultCenter),this._currentBounds=this.getBounds()}fitCoordinates(t,n=!1,r=this._singlePinZoom){t.length?this.setBounds(to.fit(t),n,this._padding,r):this.setZoomCenter(this._defaultZoom,this._defaultCenter,n)}getBounds(){var t,n;if(!this._cachedBounds){const r=((t=this._wrapper)==null?void 0:t.offsetHeight)??0,l=((n=this._wrapper)==null?void 0:n.offsetWidth)??0,d=this.getZoom(),f=this.getCenter(),p=360/Math.pow(2,d+8),_=l*p,E=r*p;this._cachedBounds=new to(f,f),this._cachedBounds.ne.add(E/2,_/2,Nn.DEGREE,Gr.MERCATOR),this._cachedBounds.sw.add(-E/2,-_/2,Nn.DEGREE,Gr.MERCATOR),this.moving().then(()=>this._cachedBounds=null)}return new to(this._cachedBounds.sw,this._cachedBounds.ne)}getCenter(){return this._map.getCenter()}getProviderMap(){return this._map}getZoom(){return this._map.getZoom()}async idle(){await this._idlePromise}async moving(){await this._movingPromise}newPinOptions(){return new yd().withProvider(this._provider)}panHandler(){this._panHandlerRunning||(this._panHandlerRunning=!0,requestAnimationFrame(()=>{const t=this._currentBounds;this._currentBounds=this.getBounds(),this._panHandler&&this._panHandler(t,new to(new dn(this._currentBounds.sw),new dn(this._currentBounds.ne))),this._panHandlerRunning=!1}),this._setIdle())}panStartHandler(){this._panStartHandlerRunning||(this._panStartHandlerRunning=!0,requestAnimationFrame(()=>{this._panStartHandler&&this._panStartHandler(new to(new dn(this._currentBounds.sw),new dn(this._currentBounds.ne))),this._panStartHandlerRunning=!1}),this._setMoving())}setBounds({ne:t,sw:n},r=!1,l={},d=1/0){var z,q;const f=(z=this._wrapper)==null?void 0:z.offsetHeight,p=(q=this._wrapper)==null?void 0:q.offsetWidth;if(!f||!p)return;let _=qa(l.bottom,f),E=qa(l.left,p),T=qa(l.right,p),S=qa(l.top,f),w=E+T,O=_+S;w>ms&&(E*=ms/w,T*=ms/w,w=ms),O>ms&&(_*=ms/O,S*=ms/O,O=ms);const m=f*(1-O),v=p*(1-w),I=new to(n,t),G=new dn(I.ne.latitude,I.sw.longitude),k=I.sw.distanceTo(G,Nn.DEGREE,Gr.MERCATOR),P=(I.ne.longitude-G.longitude+360)%360;let H=Math.max(k,P*m/v)/(1-O),j=Math.max(P,k*v/m)/(1-w),re=Math.log2(p*360/j)-8;re>d&&(re=d,j=p*360/2**(re+8),H=j*f/p);const te=I.getCenter(Gr.MERCATOR),ce=(S-_)/2*H,V=(T-E)/2*j;te.add(ce,V,Nn.DEGREE,Gr.MERCATOR),this.setZoomCenter(re,te,r)}setCenter(t,n=!1){this._map.setCenter(new dn(t),n)}setPadding({bottom:t=this._padding.bottom,left:n=this._padding.left,right:r=this._padding.right,top:l=this._padding.top}){return this._padding={bottom:t,left:n,right:r,top:l},this}setPanHandler(t){kr(t,Sr.FUNCTION),this._panHandler=t}setPanStartHandler(t){kr(t,Sr.FUNCTION),this._panStartHandler=t}setZoom(t,n=!1){this._map.setZoom(t,n)}setZoomCenter(t,n,r=!1){this._map.setZoomCenter(t,n,r)}_setIdle(){this._resolveMoving(),this._movingPromise=new Promise(t=>this._resolveMoving=t),this._resolveIdle()}_setMoving(){this._resolveIdle(),this._idlePromise=new Promise(t=>this._resolveIdle=t),this._resolveMoving()}};const Nc=rt.createContext(null);function IN(){const e=rt.useContext(Nc);if(!e||e.map===void 0)throw new Error("Attempted to call useMapContext() outside of <Map>.");return e.map}const Tp=({apiKey:e,bounds:t,children:n,className:r,clientKey:l,controls:d=!0,defaultCenter:f={latitude:39.83,longitude:-98.58},defaultZoom:p=4,mapRef:_,padding:E={bottom:50,left:50,right:50,top:50},panHandler:T=()=>null,panStartHandler:S=()=>null,provider:w=Np,providerOptions:O={},singleZoom:m=14})=>{const v=rt.useRef(null),[I,G]=rt.useState(new dn(f)),[k,P]=rt.useState(!1),[H,j]=rt.useState(),[re,te]=rt.useState(p),ce=(V,z)=>{T(V,z),z&&G(z.getCenter())};return rt.useEffect(()=>{!k||!H||te(H.getZoom())},[I]),rt.useEffect(()=>{if(!t||!k||!H)return;const V=t.map(z=>new dn(z));H.fitCoordinates(V)},[JSON.stringify(t),H]),rt.useEffect(()=>{if(!k||H)return;const V=new Cp().withControlEnabled(d).withDefaultCenter(I).withDefaultZoom(re).withPadding(E).withPanHandler(ce).withPanStartHandler(S).withProvider(w).withProviderOptions(O).withSinglePinZoom(m).withWrapper(v.current).build();j(V),_&&(_.current=V)},[k]),rt.useEffect(()=>{k||H||!v.current||w.load(e,{...O,...l&&{client:l}}).then(()=>P(!0))},[]),nt.jsx("div",{className:lo({"is-loaded":k},r),id:"map",ref:v,"data-testid":"map",children:H&&nt.jsx(Nc.Provider,{value:{map:H,provider:w},children:n})})},kN=({count:e})=>nt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",children:nt.jsxs("g",{fill:"none",fillRule:"evenodd",children:[nt.jsx("circle",{fill:"red",fillRule:"nonzero",stroke:"white",cx:"11",cy:"11",r:"11"}),nt.jsx("text",{fill:"white",fontFamily:"Arial-BoldMT,Arial",fontSize:"12",fontWeight:"bold",children:nt.jsx("tspan",{x:"50%",y:"15",textAnchor:"middle",children:e})})]})}),Nd=rt.createContext(null);function PN(){const e=rt.useContext(Nd);if(!e)throw new Error("Attempted to call useClustererContext() outside of <Clusterer>.");return e}const $N=({clusterRadius:e=50,children:t,ClusterTemplate:n=kN})=>{const{map:r}=rt.useContext(Nc),[l,d]=rt.useState([]),[f,p]=rt.useState(),[_,E]=rt.useState([]),[T,S]=rt.useState([]);return rt.useEffect(()=>{p(FN(l,r.getZoom(),e))},[l,r.getZoom()]),rt.useEffect(()=>{S(()=>[]),E(()=>[]),(f==null?void 0:f.length)!==0&&(f==null||f.forEach(w=>{if(w.length===1){w[0].pin.setMap(r);return}if(w.length>1){const O=to.fit(w.map(v=>v.pin.getCoordinate())).getCenter(Gr.MERCATOR),m=`cluster-{${O._lat},${O._lon}}`;w.forEach(v=>v.pin.setMap(null)),E(v=>[...v,m]),S(v=>[...v,nt.jsx(Cd,{coordinate:O,id:m,onClick:()=>r.fitCoordinates(w.map(I=>I.pin.getCoordinate()),!0,1/0),children:nt.jsx(n,{count:w.length})},m)])}}))},[f]),nt.jsx(Nd.Provider,{value:{clusters:f??[],clusterIds:_,setPinStore:d},children:nt.jsxs(nt.Fragment,{children:[T.map((w,O)=>nt.jsx(rt.Fragment,{children:w},O)),t]})})},FN=(e,t,n)=>{const r=n*Math.PI/2**(t+7),l=e.map((p,_)=>[_]),d=[];e.forEach((p,_)=>{for(let E=_;E<e.length;E++)E!==_&&new dn(p.pin.getCoordinate()).distanceTo(new dn(e[E].pin.getCoordinate()),Nn.RADIAN,Gr.MERCATOR)<=r&&(l[_].push(E),l[E].push(_))});let f=1;for(;f;){f=0;let p;if(l.forEach((T,S)=>{T.length>f&&(f=T.length,p=S)}),!f)break;const _=l[p??0],E=[];l[p??0]=[];for(const T of _){const S=l[T];E.push(e[T]),l[T]=[],S.forEach(w=>l[w].splice(l[w].indexOf(T),1))}d.push(E)}return d},BN=nt.jsx("svg",{width:"30",height:"38",viewBox:"0 0 30 38",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:nt.jsx("path",{d:"M30 15.0882C30 23.4212 23.3333 30.7353 15 38C7.22222 31.2941 0 23.4212 0 15.0882C0 6.75523 6.71573 0 15 0C23.2843 0 30 6.75523 30 15.0882Z",fill:"red"})}),Cd=({children:e,coordinate:t,hideOffscreen:n=!1,id:r,icon:l=BN,onClick:d=()=>null,onFocus:f=()=>null,onHover:p=()=>null,zIndex:_,hasPinUrl:E=!1})=>{const{map:T,provider:S}=rt.useContext(Nc),w=rt.useContext(Nd),O=rt.useMemo(()=>new yd().withCoordinate(t).withHideOffscreen(n).withProvider(S).withHasPinUrl(E).build(),[]);rt.useEffect(()=>{if(_!==0&&!_)return;const v=O.getProviderPin().getWrapperElement();v&&(v.style.zIndex=_.toString())},[_]),rt.useEffect(()=>{O.setMap(T),O.setClickHandler(()=>d(r)),O.setFocusHandler(I=>f(I,r)),O.setHoverHandler(I=>p(I,r));const v=w==null?void 0:w.clusterIds.includes(r);return w&&!v&&w.setPinStore(I=>[...I,{pin:O,id:r}]),()=>{O.setMap(null),w&&w.setPinStore(I=>I.filter(G=>G.id!==r))}},[]);const m=e||l;if(m){const v=O.getProviderPin().getPinElement();return Object.assign(v.style,{height:"auto",width:"auto"}),fd.createPortal(m,v)}return null},HN=({children:e,coordinate:t,linkSameTab:n,pinUrl:r,onClick:l=()=>null,onHover:d=()=>null,onFocus:f=()=>null,...p})=>{var _;return nt.jsx(Tp,{bounds:[t],...p,children:nt.jsx(Cd,{coordinate:t,id:"location-map-marker",onClick:l,onHover:d,onFocus:f,hasPinUrl:((_=r||"")==null?void 0:_.length)>0,children:r?nt.jsx(pp,{href:r,target:n?"_self":"_blank","aria-label":"map-marker",children:e}):e||void 0})})};var Xc={},Vl={},bf;function WN(){if(bf)return Vl;bf=1;var e=rt;const t=e.createContext(null);function n(l,d){let f=null;l!=null&&(f=l[1]);function p(){return d??(f!=null?f.getTheme():null)}return{getTheme:p}}function r(){const l=e.useContext(t);if(l==null)throw Error("LexicalComposerContext.useLexicalComposerContext: cannot find a LexicalComposerContext");return l}return Vl.LexicalComposerContext=t,Vl.createLexicalComposerContext=n,Vl.useLexicalComposerContext=r,Vl}var ql={},Lf;function KN(){if(Lf)return ql;Lf=1;var e=rt;function t(r){let l=new URLSearchParams;l.append("code",r);for(let d=1;d<arguments.length;d++)l.append("v",arguments[d]);throw Error(`Minified Lexical error #${r}; visit https://lexical.dev/docs/error?${l} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let n=e.createContext(null);return ql.LexicalComposerContext=n,ql.createLexicalComposerContext=function(r,l){let d=null;return r!=null&&(d=r[1]),{getTheme:function(){return l??(d!=null?d.getTheme():null)}}},ql.useLexicalComposerContext=function(){let r=e.useContext(n);return r==null&&t(8),r},ql}var Qc,If;function qn(){return If||(If=1,Qc=process.env.NODE_ENV==="development"?WN():KN()),Qc}var He={},kf;function zN(){if(kf)return He;kf=1;function e(u){return{type:u}}const t=e("SELECTION_CHANGE_COMMAND"),n=e("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),r=e("CLICK_COMMAND"),l=e("DELETE_CHARACTER_COMMAND"),d=e("INSERT_LINE_BREAK_COMMAND"),f=e("INSERT_PARAGRAPH_COMMAND"),p=e("CONTROLLED_TEXT_INSERTION_COMMAND"),_=e("PASTE_COMMAND"),E=e("REMOVE_TEXT_COMMAND"),T=e("DELETE_WORD_COMMAND"),S=e("DELETE_LINE_COMMAND"),w=e("FORMAT_TEXT_COMMAND"),O=e("UNDO_COMMAND"),m=e("REDO_COMMAND"),v=e("KEYDOWN_COMMAND"),I=e("KEY_ARROW_RIGHT_COMMAND"),G=e("MOVE_TO_END"),k=e("KEY_ARROW_LEFT_COMMAND"),P=e("MOVE_TO_START"),H=e("KEY_ARROW_UP_COMMAND"),j=e("KEY_ARROW_DOWN_COMMAND"),re=e("KEY_ENTER_COMMAND"),te=e("KEY_SPACE_COMMAND"),ce=e("KEY_BACKSPACE_COMMAND"),V=e("KEY_ESCAPE_COMMAND"),z=e("KEY_DELETE_COMMAND"),q=e("KEY_TAB_COMMAND"),Te=e("INSERT_TAB_COMMAND"),Se=e("INDENT_CONTENT_COMMAND"),Ee=e("OUTDENT_CONTENT_COMMAND"),de=e("DROP_COMMAND"),K=e("FORMAT_ELEMENT_COMMAND"),D=e("DRAGSTART_COMMAND"),Z=e("DRAGOVER_COMMAND"),oe=e("DRAGEND_COMMAND"),Y=e("COPY_COMMAND"),W=e("CUT_COMMAND"),J=e("SELECT_ALL_COMMAND"),R=e("CLEAR_EDITOR_COMMAND"),U=e("CLEAR_HISTORY_COMMAND"),X=e("CAN_REDO_COMMAND"),fe=e("CAN_UNDO_COMMAND"),_e=e("FOCUS_COMMAND"),B=e("BLUR_COMMAND"),M=e("KEY_MODIFIER_COMMAND"),F=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",se=F&&"documentMode"in document?document.documentMode:null,ye=F&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),De=F&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),ee=F&&"InputEvent"in window&&!se?"getTargetRanges"in new window.InputEvent("input"):!1,ne=F&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),ue=F&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,be=F&&/Android/.test(navigator.userAgent),Ne=F&&/^(?=.*Chrome).*/i.test(navigator.userAgent),Re=F&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!Ne,ke=1,Fe=3,qe=0,Be=1,ut=2,At=0,Ut=1,tn=2,Oe=1,ie=2,le=4,ve=8,Le=16,Me=32,je=64,it=128,st=Oe|ie|le|ve|Le|Me|je|it,ot=1,St=2,Ge=1,ze=2,tt=3,yt=4,Nt=5,Et=6,gt=" ",mt=ne||ue||Re?gt:"​",$t=`
37
37
 
38
38
  `,Kt=De?gt:mt,nn="֑-߿יִ-﷽ﹰ-ﻼ",It="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿",Vt=new RegExp("^[^"+It+"]*["+nn+"]"),bt=new RegExp("^[^"+nn+"]*["+It+"]"),rn={bold:Oe,code:Le,highlight:it,italic:ie,strikethrough:le,subscript:Me,superscript:je,underline:ve},Or={directionless:ot,unmergeable:St},_i={center:ze,end:Et,justify:yt,left:Ge,right:tt,start:Nt},pe={[ze]:"center",[Et]:"end",[yt]:"justify",[Ge]:"left",[tt]:"right",[Nt]:"start"},Ze={normal:At,segmented:tn,token:Ut},lt={[At]:"normal",[tn]:"segmented",[Ut]:"token"},wt=100;let Gt=!1,Bt=0;function Pt(){return Gt}function kt(u){Bt=u.timeStamp}function Ht(u){Bt===0&&Co(u).addEventListener("textInput",kt,!0)}function on(u,s,c){return s.__lexicalLineBreak===u||u[`__lexicalKey_${c._key}`]!==void 0}function an(u){return u.getEditorState().read(()=>{const s=_n();return s!==null?s.clone():null})}function bn(u,s,c){const h=ar(c._window);let y=null,N=null;h!==null&&h.anchorNode===u&&(y=h.anchorOffset,N=h.focusOffset);const b=u.nodeValue;b!==null&&$r(s,b,y,N,!1)}function yr(u,s,c){if(Tt(u)){const h=u.anchor.getNode();if(h.is(c)&&u.format!==h.getFormat())return!1}return s.nodeType===Fe&&c.isAttached()}function Zn(u,s,c){Gt=!0;const h=performance.now()-Bt>wt;try{zr(u,()=>{const y=_n()||an(u),N=new Map,b=u.getRootElement(),$=u._editorState,ae=u._blockCursorElement;let he=!1,me="";for(let we=0;we<s.length;we++){const Ce=s[we],Ve=Ce.type,Ue=Ce.target;let $e=ii(Ue,$);if(!($e===null&&Ue!==b||An($e))){if(Ve==="characterData")h&&_t($e)&&yr(y,Ue,$e)&&bn(Ue,$e,u);else if(Ve==="childList"){he=!0;const Rt=Ce.addedNodes;for(let Zt=0;Zt<Rt.length;Zt++){const Wt=Rt[Zt],Dt=go(Wt),cn=Wt.parentNode;if(cn!=null&&Wt!==ae&&Dt===null&&(Wt.nodeName!=="BR"||!on(Wt,cn,u))){if(De){const ir=Wt.innerText||Wt.nodeValue;ir&&(me+=ir)}cn.removeChild(Wt)}}const Qe=Ce.removedNodes,ht=Qe.length;if(ht>0){let Zt=0;for(let Wt=0;Wt<ht;Wt++){const Dt=Qe[Wt];(Dt.nodeName==="BR"&&on(Dt,Ue,u)||ae===Dt)&&(Ue.appendChild(Dt),Zt++)}ht!==Zt&&(Ue===b&&($e=ml($)),N.set(Ue,$e))}}}}if(N.size>0)for(const[we,Ce]of N)if(et(Ce)){const Ve=Ce.getChildrenKeys();let Ue=we.firstChild;for(let $e=0;$e<Ve.length;$e++){const Rt=Ve[$e],Qe=u.getElementByKey(Rt);Qe!==null&&(Ue==null?(we.appendChild(Qe),Ue=Qe):Ue!==Qe&&we.replaceChild(Qe,Ue),Ue=Ue.nextSibling)}}else _t(Ce)&&Ce.markDirty();const xe=c.takeRecords();if(xe.length>0){for(let we=0;we<xe.length;we++){const Ce=xe[we],Ve=Ce.addedNodes,Ue=Ce.target;for(let $e=0;$e<Ve.length;$e++){const Rt=Ve[$e],Qe=Rt.parentNode;Qe!=null&&Rt.nodeName==="BR"&&!on(Rt,Ue,u)&&Qe.removeChild(Rt)}}c.takeRecords()}y!==null&&(he&&(y.dirty=!0,Cr(y)),De&&Ol(u)&&y.insertRawText(me))})}finally{Gt=!1}}function fn(u){const s=u._observer;if(s!==null){const c=s.takeRecords();Zn(u,c,s)}}function sr(u){Ht(u),u._observer=new MutationObserver((s,c)=>{Zn(u,s,c)})}function or(u,s){const c=u.__mode,h=u.__format,y=u.__style,N=s.__mode,b=s.__format,$=s.__style;return(c===null||c===N)&&(h===null||h===b)&&(y===null||y===$)}function Ai(u,s){const c=u.mergeWithSibling(s),h=xn()._normalizedNodes;return h.add(u.__key),h.add(s.__key),c}function Nr(u){let s=u;if(s.__text===""&&s.isSimpleText()&&!s.isUnmergeable()){s.remove();return}let c;for(;(c=s.getPreviousSibling())!==null&&_t(c)&&c.isSimpleText()&&!c.isUnmergeable();)if(c.__text==="")c.remove();else if(or(c,s)){s=Ai(c,s);break}else break;let h;for(;(h=s.getNextSibling())!==null&&_t(h)&&h.isSimpleText()&&!h.isUnmergeable();)if(h.__text==="")h.remove();else if(or(s,h)){s=Ai(s,h);break}else break}function ws(u){return fo(u.anchor),fo(u.focus),u}function fo(u){for(;u.type==="element";){const s=u.getNode(),c=u.offset;let h,y;if(c===s.getChildrenSize()?(h=s.getChildAtIndex(c-1),y=!0):(h=s.getChildAtIndex(c),y=!1),_t(h)){u.set(h.__key,y?h.getTextContentSize():0,"text");break}else if(!et(h))break;u.set(h.__key,y?h.getChildrenSize():0,"element")}}let dl=1;function jr(){return""+dl++}function ma(u,s){const c=u._nodes.get(s);if(c===void 0)throw Error(`registeredNode: Type ${s} not found`);return c}const ho=typeof queueMicrotask=="function"?queueMicrotask:u=>{Promise.resolve().then(u)};function rs(u){return An(ii(u))}function Os(u){const s=document.activeElement;if(s===null)return!1;const c=s.nodeName;return An(ii(u))&&(c==="INPUT"||c==="TEXTAREA"||s.contentEditable==="true"&&s.__lexicalEditor==null)}function is(u,s,c){const h=u.getRootElement();try{return h!==null&&h.contains(s)&&h.contains(c)&&s!==null&&!Os(s)&&fl(s)===u}catch{return!1}}function fl(u){let s=u;for(;s!=null;){const c=s.__lexicalEditor;if(c!=null)return c;s=No(s)}return null}function Ln(u){return Vt.test(u)?"rtl":bt.test(u)?"ltr":null}function zn(u){return u.isToken()||u.isSegmented()}function ri(u){return u.nodeType===Fe}function Pr(u){let s=u;for(;s!=null;){if(ri(s))return s;s=s.firstChild}return null}function Bn(u,s,c){const h=rn[s];if(c!==null&&(u&h)===(c&h))return u;let y=u^h;return s==="subscript"?y&=-65:s==="superscript"&&(y&=-33),y}function Ds(u){return _t(u)||ai(u)||An(u)}function hl(u,s){if(s!=null){u.__key=s;return}fr(),tf();const c=xn(),h=xi(),y=jr();h._nodeMap.set(y,u),et(u)?c._dirtyElements.set(y,!0):c._dirtyLeaves.add(y),c._cloneNotNeeded.add(y),c._dirtyType=Be,u.__key=y}function gl(u,s,c){let h=u;for(;h!==null;){if(c.has(h))return;const y=s.get(h);if(y===void 0)break;c.set(h,!1),h=y.__parent}}function Vr(u){const s=u.getParent();if(s!==null){const c=u.getWritable(),h=s.getWritable(),y=u.getPreviousSibling(),N=u.getNextSibling();if(y===null)if(N!==null){const b=N.getWritable();h.__first=N.__key,b.__prev=null}else h.__first=null;else{const b=y.getWritable();if(N!==null){const $=N.getWritable();$.__prev=b.__key,b.__next=$.__key}else b.__next=null;c.__prev=null}if(N===null)if(y!==null){const b=y.getWritable();h.__last=y.__key,b.__next=null}else h.__last=null;else{const b=N.getWritable();if(y!==null){const $=y.getWritable();$.__next=b.__key,b.__prev=$.__key}else b.__prev=null;c.__next=null}h.__size--,c.__parent=null}}function Mi(u){tf();const s=u.getLatest(),c=s.__parent,h=xi(),y=xn(),N=h._nodeMap,b=y._dirtyElements;c!==null&&gl(c,N,b);const $=s.__key;y._dirtyType=Be,et(u)?b.set($,!0):y._dirtyLeaves.add($)}function pl(u){const s=u.getPreviousSibling(),c=u.getNextSibling();s!==null&&Mi(s),c!==null&&Mi(c)}function vn(u){fr();const s=xn(),c=s._compositionKey;if(u!==c){if(s._compositionKey=u,c!==null){const h=Cn(c);h!==null&&h.getWritable()}if(u!==null){const h=Cn(u);h!==null&&h.getWritable()}}}function lr(){return Bo()?null:xn()._compositionKey}function Cn(u,s){const h=(s||xi())._nodeMap.get(u);return h===void 0?null:h}function go(u,s){const c=xn(),h=u[`__lexicalKey_${c._key}`];return h!==void 0?Cn(h,s):null}function ii(u,s){let c=u;for(;c!=null;){const h=go(c,s);if(h!==null)return h;c=No(c)}return null}function As(u){const s=u._decorators,c=Object.assign({},s);return u._pendingDecorators=c,c}function po(u){return u.read(()=>tr().getTextContent())}function Ri(u,s){zr(u,()=>{const c=xi();if(c.isEmpty())return;if(s==="root"){tr().markDirty();return}const h=c._nodeMap;for(const[,y]of h)y.markDirty()},u._pendingEditorState===null?{tag:"history-merge"}:void 0)}function tr(){return ml(xi())}function ml(u){return u._nodeMap.get("root")}function Cr(u){fr();const s=xi();if(u!==null){if(Object.isFrozen(u))throw Error("$setSelection called on frozen selection object. Ensure selection is cloned before passing in.");u.dirty=!0,u.setCachedNodes(null)}s._selection=u}function _l(){fr();const u=xn();fn(u)}function bi(u){const s=xn(),c=_a(u,s);if(c===null){const h=s.getRootElement();return u===h?Cn("root"):null}return Cn(c)}function yl(u,s){return s?u.getTextContentSize():0}function _a(u,s){let c=u;for(;c!=null;){const h=c[`__lexicalKey_${s._key}`];if(h!==void 0)return h;c=No(c)}return null}function Ms(u){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(u)}function Li(u){const s=[];let c=u;for(;c!==null;)s.push(c),c=c._parentEditor;return s}function Nl(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function mo(u){return u.nodeType===Fe?u.nodeValue:null}function Rs(u,s,c){const h=ar(s._window);if(h===null)return;const y=h.anchorNode;let{anchorOffset:N,focusOffset:b}=h;if(y!==null){let $=mo(y);const ae=ii(y);if($!==null&&_t(ae)){if($===mt&&c){const he=c.length;$=c,N=he,b=he}$!==null&&$r(ae,$,N,b,u)}}}function $r(u,s,c,h,y){let N=u;if(N.isAttached()&&(y||!N.isDirty())){const b=N.isComposing();let $=s;(b||y)&&s[s.length-1]===mt&&($=s.slice(0,-1));const ae=N.getTextContent();if(y||$!==ae){if($===""){if(vn(null),!ne&&!ue&&!Re){const Ue=xn();setTimeout(()=>{Ue.update(()=>{N.isAttached()&&N.remove()})},20)}else N.remove();return}const he=N.getParent(),me=Fo(),xe=N.getTextContentSize(),we=lr(),Ce=N.getKey();if(N.isToken()||we!==null&&Ce===we&&!b||Tt(me)&&(he!==null&&!he.canInsertTextBefore()&&me.anchor.offset===0||me.anchor.key===u.__key&&me.anchor.offset===0&&!N.canInsertTextBefore()&&!b||me.focus.key===u.__key&&me.focus.offset===xe&&!N.canInsertTextAfter()&&!b)){N.markDirty();return}const Ve=_n();if(!Tt(Ve)||c===null||h===null){N.setTextContent($);return}if(Ve.setTextNodeRange(N,c,N,h),N.isSegmented()){const Ue=N.getTextContent(),$e=Dn(Ue);N.replace($e),N=$e}N.setTextContent($)}}}function Cl(u){const s=u.getPreviousSibling();return(_t(s)||et(s)&&s.isInline())&&!s.canInsertTextAfter()}function bs(u,s){if(s.isSegmented())return!0;if(!u.isCollapsed())return!1;const c=u.anchor.offset,h=s.getParentOrThrow(),y=s.isToken();return c===0?!s.canInsertTextBefore()||!h.canInsertTextBefore()||y||Cl(s):c===s.getTextContentSize()?!s.canInsertTextAfter()||!h.canInsertTextAfter()||y:!1}function ya(u,s,c,h){return u===9&&!s&&!c&&!h}function Na(u,s,c,h){return u===66&&!s&&qr(c,h)}function ss(u,s,c,h){return u===73&&!s&&qr(c,h)}function Ls(u,s,c,h){return u===85&&!s&&qr(c,h)}function El(u,s){return Aa(u)&&!s}function Tl(u,s){return Aa(u)&&s}function Is(u,s){return ye&&s&&u===79}function ks(u,s,c){return Zr(u)&&(ye?s:c)}function Ca(u,s,c){return ki(u)&&(ye?s:c)}function Ea(u,s){return ye&&s&&Zr(u)}function Ta(u,s){return ye&&s&&ki(u)}function xa(u,s,c,h){return ye?s||c?!1:Zr(u)||u===72&&h:h||s||c?!1:Zr(u)}function Rc(u,s,c,h,y){return ye?c||h||y?!1:ki(u)||u===68&&s:s||h||y?!1:ki(u)}function bc(u,s,c,h){return u===90&&!s&&qr(c,h)}function va(u,s,c,h){return ye?u===90&&c&&s:u===89&&h||u===90&&h&&s}function Lc(u,s,c,h){return s?!1:u===67?ye?c:h:!1}function Ic(u,s,c,h){return s?!1:u===88?ye?c:h:!1}function Sa(u){return u===37}function wa(u){return u===39}function xl(u){return u===38}function kc(u){return u===40}function Pc(u,s,c,h){return Sa(u)&&!s&&!h&&!c}function Oa(u,s,c,h,y){return Sa(u)&&!h&&!c&&(s||y)}function os(u,s,c,h){return wa(u)&&!s&&!h&&!c}function Da(u,s,c,h,y){return wa(u)&&!h&&!c&&(s||y)}function $c(u,s,c){return xl(u)&&!s&&!c}function vl(u,s,c){return kc(u)&&!s&&!c}function Ps(u,s,c,h){return u||s||c||h}function Fc(u){return u===32}function qr(u,s){return ye?u:s}function Aa(u){return u===13}function Zr(u){return u===8}function Ii(u){return u===27}function ki(u){return u===46}function _o(u,s,c){return u===65&&qr(s,c)}function Sl(){const u=tr(),s=u.select(0,u.getChildrenSize());Cr(ws(s))}function Pi(u,s){u.__lexicalClassNameCache===void 0&&(u.__lexicalClassNameCache={});const c=u.__lexicalClassNameCache,h=c[s];if(h!==void 0)return h;const y=u[s];if(typeof y=="string"){const N=y.split(" ");return c[s]=N,N}return y}function ls(u,s,c,h,y){if(c.size===0)return;const N=h.__type,b=h.__key,$=s.get(N);if($===void 0)throw Error(`Type ${N} not in registeredNodes`);const ae=$.klass;let he=u.get(ae);he===void 0&&(he=new Map,u.set(ae,he));const me=he.get(b),xe=me==="destroyed"&&y==="created";(me===void 0||xe)&&he.set(b,xe?"updated":y)}function $i(u){const s=xi(),c=s._readOnly,h=u.getType(),y=s._nodeMap,N=[];for(const[,b]of y)b instanceof u&&b.__type===h&&(c||b.isAttached())&&N.push(b);return N}function Ma(u,s,c){const h=u.getParent();let y=c,N=u;return h!==null&&(s&&c===0?(y=N.getIndexWithinParent(),N=h):!s&&c===N.getChildrenSize()&&(y=N.getIndexWithinParent()+1,N=h)),N.getChildAtIndex(s?y-1:y)}function wl(u,s){const c=u.offset;if(u.type==="element"){const h=u.getNode();return Ma(h,s,c)}else{const h=u.getNode();if(s&&c===0||!s&&c===h.getTextContentSize()){const y=s?h.getPreviousSibling():h.getNextSibling();return y===null?Ma(h.getParentOrThrow(),s,h.getIndexWithinParent()+(s?0:1)):y}}return null}function Ol(u){const s=Co(u).event,c=s&&s.inputType;return c==="insertFromPaste"||c==="insertFromPasteAsQuotation"}function dt(u,s,c){return lf(u,s,c)}function yo(u){return!Ur(u)&&!u.isLastChild()&&!u.isInline()}function $s(u,s){const c=u._keyToDOMMap.get(s);if(c===void 0)throw Error(`Reconciliation: could not find DOM element for node key ${s}`);return c}function No(u){const s=u.assignedSlot||u.parentElement;return s!==null&&s.nodeType===11?s.host:s}function yi(u,s,c){const h=c.ownerDocument,y=h.defaultView;if(y===null)return;let{top:N,bottom:b}=s,$=0,ae=0,he=c;for(;he!==null;){const me=he===h.body;if(me)$=0,ae=Co(u).innerHeight;else{const we=he.getBoundingClientRect();$=we.top,ae=we.bottom}let xe=0;if(N<$?xe=-($-N):b>ae&&(xe=b-ae),xe!==0)if(me)y.scrollBy(0,xe);else{const we=he.scrollTop;he.scrollTop+=xe;const Ce=he.scrollTop-we;N-=Ce,b-=Ce}if(me)break;he=No(he)}}function Un(u){return xn()._updateTags.has(u)}function Ct(u){fr(),xn()._updateTags.add(u)}function as(u){const s=_n();if(!Tt(s)||!et(u))return s;const{anchor:c,focus:h}=s,y=c.getNode(),N=h.getNode();return Fi(y,u)&&c.set(u.__key,0,"element"),Fi(N,u)&&h.set(u.__key,0,"element"),s}function Fi(u,s){let c=u.getParent();for(;c!==null;){if(c.is(s))return!0;c=c.getParent()}return!1}function Ra(u){const s=u.ownerDocument;return s&&s.defaultView||null}function Co(u){const s=u._window;if(s===null)throw Error("window object not found");return s}function Fr(u){return et(u)&&u.isInline()||An(u)&&u.isInline()}function Eo(u){let s=u.getParentOrThrow();for(;s!==null;){if(si(s))return s;s=s.getParentOrThrow()}return s}function si(u){return Ur(u)||et(u)&&u.isShadowRoot()}function Dl(u){const s=u.constructor.clone(u);return hl(s,null),s}function Dr(u){const s=xn(),c=u.constructor.getType(),h=s._nodes.get(c);if(h===void 0)throw Error('$initializeNode failed. Ensure node has been registered to the editor. You can do this by passing the node class via the "nodes" array in the editor config.');const y=h.replace;if(y!==null){const N=y(u);if(!(N instanceof u.constructor))throw Error("$initializeNode failed. Ensure replacement node is a subclass of the original node.");return N}return u}function Fs(u,s){const c=u.getParent();if(Ur(c)&&!et(s)&&!An(s))throw Error("Only element or decorator nodes can be inserted in to the root node")}function To(u){const s=u.theme,c=document.createElement("div");c.contentEditable="false",c.setAttribute("data-lexical-cursor","true");let h=s.blockCursor;if(h!==void 0){if(typeof h=="string"){const y=h.split(" ");h=s.blockCursor=y}h!==void 0&&c.classList.add(...h)}return c}function Mt(u){return(An(u)||et(u)&&!u.canBeEmpty())&&!u.isInline()}function Bs(u,s,c){c.style.removeProperty("caret-color"),s._blockCursorElement=null;const h=u.parentElement;h!==null&&h.removeChild(u)}function Ni(u,s,c){let h=u._blockCursorElement;if(Tt(c)&&c.isCollapsed()&&c.anchor.type==="element"&&s.contains(document.activeElement)){const y=c.anchor,N=y.getNode(),b=y.offset,$=N.getChildrenSize();let ae=!1,he=null;if(b===$){const me=N.getChildAtIndex(b-1);Mt(me)&&(ae=!0)}else{const me=N.getChildAtIndex(b);if(Mt(me)){const xe=me.getPreviousSibling();(xe===null||Mt(xe))&&(ae=!0,he=u.getElementByKey(me.__key))}}if(ae){const me=u.getElementByKey(N.__key);h===null&&(u._blockCursorElement=h=To(u._config)),s.style.caretColor="transparent",he===null?me.appendChild(h):me.insertBefore(h,he);return}}h!==null&&Bs(h,u,s)}function ar(u){return F?(u||window).getSelection():null}function ba(u,s){let c=u.getChildAtIndex(s);if(c==null&&(c=u),si(u))throw Error("Can not call $splitNode() on root element");const h=b=>{const $=b.getParentOrThrow(),ae=si($),he=b===c&&!ae?b:Dl(b);if(ae){if(!(et(b)&&et(he)))throw Error("Children of a root must be ElementNode");return b.insertAfter(he),[b,he,he]}else{const[me,xe,we]=h($),Ce=b.getNextSiblings();return we.append(he,...Ce),[me,xe,he]}},[y,N]=h(c);return[y,N]}function xo(u,s){let c=u;for(;c!==tr()&&c!=null;){if(s(c))return c;c=c.getParent()}return null}function La(u){return Hs(u)&&u.tagName==="A"}function Hs(u){return u.nodeType===1}function Bi(u){if(An(u)&&!u.isInline())return!0;if(!et(u)||si(u))return!1;const s=u.getFirstChild(),c=s===null||ai(s)||_t(s)||s.isInline();return!u.isInline()&&u.canBeEmpty()!==!1&&c}function vo(u,s){let c=u;for(;c!==null&&c.getParent()!==null&&!s(c);)c=c.getParentOrThrow();return s(c)?c:null}function Ia(u,s){const c=u._decorators;let y=u._pendingDecorators||c;const N=s._nodeMap;let b;for(b in y)N.has(b)||(y===c&&(y=As(u)),delete y[b])}function Al(u,s,c,h,y,N){let b=u.getFirstChild();for(;b!==null;){const $=b.__key;b.__parent===s&&(et(b)&&Al(b,$,c,h,y,N),c.has($)||N.delete($),y.push($)),b=b.getNextSibling()}}function Ml(u,s,c,h){const y=u._nodeMap,N=s._nodeMap,b=[];for(const[$]of h){const ae=N.get($);ae!==void 0&&(ae.isAttached()||(et(ae)&&Al(ae,$,y,N,b,h),y.has($)||h.delete($),b.push($)))}for(const $ of b)N.delete($);for(const $ of c){const ae=N.get($);ae!==void 0&&!ae.isAttached()&&(y.has($)||c.delete($),N.delete($))}}let In="",Gn="",qt="",Er,Hn,cs,ka=!1,us=!1,Ws,Ks=null,zs,Rl,Hi,gn,On,Wn;function ds(u,s){const c=Hi.get(u);if(s!==null){const h=Oo(u);h.parentNode===s&&s.removeChild(h)}if(gn.has(u)||Hn._keyToDOMMap.delete(u),et(c)){const h=Ei(c,Hi);Wi(h,0,h.length-1,null)}c!==void 0&&ls(Wn,cs,Ws,c,"destroyed")}function Wi(u,s,c,h){let y=s;for(;y<=c;++y){const N=u[y];N!==void 0&&ds(N,h)}}function Ci(u,s){u.setProperty("text-align",s)}const fs="40px";function Jn(u,s){const c=Er.theme.indent;if(typeof c=="string"){const y=u.classList.contains(c);s>0&&!y?u.classList.add(c):s<1&&y&&u.classList.remove(c)}const h=getComputedStyle(u).getPropertyValue("--lexical-indent-base-value")||fs;u.style.setProperty("padding-inline-start",s===0?"":`calc(${s} * ${h})`)}function Br(u,s){const c=u.style;s===0?Ci(c,""):s===Ge?Ci(c,"left"):s===ze?Ci(c,"center"):s===tt?Ci(c,"right"):s===yt?Ci(c,"justify"):s===Nt?Ci(c,"start"):s===Et&&Ci(c,"end")}function hn(u,s,c){const h=gn.get(u);if(h===void 0)throw Error("createNode: node does not exist in nodeMap");const y=h.createDOM(Er,Hn);if(Je(u,y,Hn),_t(h)?y.setAttribute("data-lexical-text","true"):An(h)&&y.setAttribute("data-lexical-decorator","true"),et(h)){const N=h.__indent,b=h.__size;if(N!==0&&Jn(y,N),b!==0){const ae=b-1,he=Ei(h,gn);Pa(he,ae,h,y)}const $=h.__format;$!==0&&Br(y,$),h.isInline()||So(null,h,y),yo(h)&&(In+=$t,qt+=$t)}else{const N=h.getTextContent();if(An(h)){const b=h.decorate(Hn,Er);b!==null&&Il(u,b),y.contentEditable="false"}else _t(h)&&(h.isDirectionless()||(Gn+=N));In+=N,qt+=N}if(s!==null)if(c!=null)s.insertBefore(y,c);else{const N=s.__lexicalLineBreak;N!=null?s.insertBefore(y,N):s.appendChild(y)}return Object.freeze(h),ls(Wn,cs,Ws,h,"created"),y}function Pa(u,s,c,h){const y=Gn;Gn="",bl(u,c,0,s,h,null),Ll(c,h),Gn=y}function bl(u,s,c,h,y,N){const b=In;In="";let $=c;for(;$<=h;++$)hn(u[$],y,N);yo(s)&&(In+=$t),y.__lexicalTextContent=In,In=b+In}function $a(u,s){const c=s.get(u);return ai(c)||An(c)&&c.isInline()}function So(u,s,c){const h=u!==null&&(u.__size===0||$a(u.__last,Hi)),y=s.__size===0||$a(s.__last,gn);if(h){if(!y){const N=c.__lexicalLineBreak;N!=null&&c.removeChild(N),c.__lexicalLineBreak=null}}else if(y){const N=document.createElement("br");c.__lexicalLineBreak=N,c.appendChild(N)}}function Ll(u,s){const c=s.__lexicalDirTextContent,h=s.__lexicalDir;if(c!==Gn||h!==Ks){const y=Gn==="",N=y?Ks:Ln(Gn);if(N!==h){const b=s.classList,$=Er.theme;let ae=h!==null?$[h]:void 0,he=N!==null?$[N]:void 0;if(ae!==void 0){if(typeof ae=="string"){const me=ae.split(" ");ae=$[h]=me}b.remove(...ae)}if(N===null||y&&N==="ltr")s.removeAttribute("dir");else{if(he!==void 0){if(typeof he=="string"){const me=he.split(" ");he=$[N]=me}he!==void 0&&b.add(...he)}s.dir=N}if(!us){const me=u.getWritable();me.__dir=N}}Ks=N,s.__lexicalDirTextContent=Gn,s.__lexicalDir=N}}function Ki(u,s,c){const h=Gn;Gn="",ct(u,s,c),Ll(s,c),Gn=h}function Ei(u,s){const c=[];let h=u.__first;for(;h!==null;){const y=s.get(h);if(y===void 0)throw Error("createChildrenArray: node does not exist in nodeMap");c.push(h),h=y.__next}return c}function ct(u,s,c){const h=In,y=u.__size,N=s.__size;if(In="",y===1&&N===1){const b=u.__first,$=s.__first;if(b===$)hs(b,c);else{const ae=Oo(b),he=hn($,null,null);c.replaceChild(he,ae),ds(b,null)}}else{const b=Ei(u,Hi),$=Ei(s,gn);if(y===0)N!==0&&bl($,s,0,N-1,c,null);else if(N===0){if(y!==0){const he=c.__lexicalLineBreak==null;Wi(b,0,y-1,he?null:c),he&&(c.textContent="")}}else En(s,b,$,y,N,c)}yo(s)&&(In+=$t),c.__lexicalTextContent=In,In=h+In}function hs(u,s){const c=Hi.get(u);let h=gn.get(u);if(c===void 0||h===void 0)throw Error("reconcileNode: prevNode or nextNode does not exist in nodeMap");const y=ka||Rl.has(u)||zs.has(u),N=$s(Hn,u);if(c===h&&!y){if(et(c)){const b=N.__lexicalTextContent;b!==void 0&&(In+=b,qt+=b);const $=N.__lexicalDirTextContent;$!==void 0&&(Gn+=$)}else{const b=c.getTextContent();_t(c)&&!c.isDirectionless()&&(Gn+=b),qt+=b,In+=b}return N}if(c!==h&&y&&ls(Wn,cs,Ws,h,"updated"),h.updateDOM(c,N,Er)){const b=hn(u,null,null);if(s===null)throw Error("reconcileNode: parentDOM is null");return s.replaceChild(b,N),ds(u,null),b}if(et(c)&&et(h)){const b=h.__indent;b!==c.__indent&&Jn(N,b);const $=h.__format;$!==c.__format&&Br(N,$),y&&(Ki(c,h,N),!Ur(h)&&!h.isInline()&&So(c,h,N)),yo(h)&&(In+=$t,qt+=$t)}else{const b=h.getTextContent();if(An(h)){const $=h.decorate(Hn,Er);$!==null&&Il(u,$)}else _t(h)&&!h.isDirectionless()&&(Gn+=b);In+=b,qt+=b}if(!us&&Ur(h)&&h.__cachedText!==qt){const b=h.getWritable();b.__cachedText=qt,h=b}return Object.freeze(h),N}function Il(u,s){let c=Hn._pendingDecorators;const h=Hn._decorators;if(c===null){if(h[u]===s)return;c=As(Hn)}c[u]=s}function Tr(u){return u.firstChild}function wo(u){let s=u.nextSibling;return s!==null&&s===Hn._blockCursorElement&&(s=s.nextSibling),s}function En(u,s,c,h,y,N){const b=h-1,$=y-1;let ae,he,me=Tr(N),xe=0,we=0;for(;xe<=b&&we<=$;){const Ue=s[xe],$e=c[we];if(Ue===$e)me=wo(hs($e,N)),xe++,we++;else{ae===void 0&&(ae=new Set(s)),he===void 0&&(he=new Set(c));const Rt=he.has(Ue),Qe=ae.has($e);if(!Rt)me=wo(Oo(Ue)),ds(Ue,N),xe++;else if(!Qe)hn($e,N,me),we++;else{const ht=$s(Hn,$e);ht===me?me=wo(hs($e,N)):(me!=null?N.insertBefore(ht,me):N.appendChild(ht),hs($e,N)),xe++,we++}}}const Ce=xe>b,Ve=we>$;if(Ce&&!Ve){const Ue=c[$+1],$e=Ue===void 0?null:Hn.getElementByKey(Ue);bl(c,u,we,$,N,$e)}else Ve&&!Ce&&Wi(s,xe,b,N)}function zi(u,s,c,h,y,N){In="",qt="",Gn="",ka=h===ut,Ks=null,Hn=c,Er=c._config,cs=c._nodes,Ws=Hn._listeners.mutation,zs=y,Rl=N,Hi=u._nodeMap,gn=s._nodeMap,us=s._readOnly,On=new Map(c._keyToDOMMap);const b=new Map;return Wn=b,hs("root",null),Hn=void 0,cs=void 0,zs=void 0,Rl=void 0,Hi=void 0,gn=void 0,Er=void 0,On=void 0,Wn=void 0,b}function Je(u,s,c){const h=c._keyToDOMMap;s["__lexicalKey_"+c._key]=u,h.set(u,s)}function Oo(u){const s=On.get(u);if(s===void 0)throw Error(`Reconciliation: could not find DOM element for node key ${u}`);return s}const cr=Object.freeze({}),nr=30,kl=[["keydown",ge],["pointerdown",Bl],["compositionstart",x],["compositionend",Q],["input",C],["click",Fa],["cut",cr],["copy",cr],["dragstart",cr],["dragover",cr],["dragend",cr],["paste",cr],["focus",cr],["blur",cr],["drop",cr]];ee&&kl.push(["beforeinput",(u,s)=>g(u,s)]);let Ui=0,Pl=0,Us=0,Hr=null,Gs=0,Wr=!1,Do=!1,Ys=!1,js=!1,Ao=[0,"",0,"root",0];function Gi(u,s,c,h,y){const N=u.anchor,b=u.focus,$=N.getNode(),ae=xn(),he=ar(ae._window),me=he!==null?he.anchorNode:null,xe=N.key,we=ae.getElementByKey(xe),Ce=c.length;return xe!==b.key||!_t($)||(!y&&(!ee||Us<h+50)||$.isDirty()&&Ce<2||Ms(c))&&N.offset!==b.offset&&!$.isComposing()||zn($)||$.isDirty()&&Ce>1||(y||!ee)&&we!==null&&!$.isComposing()&&me!==Pr(we)||he!==null&&s!==null&&(!s.collapsed||s.startContainer!==he.anchorNode||s.startOffset!==he.anchorOffset)||$.getFormat()!==u.format||$.getStyle()!==u.style||bs(u,$)}function $l(u,s){return u!==null&&u.nodeValue!==null&&u.nodeType===Fe&&s!==0&&s!==u.nodeValue.length}function Fl(u,s,c){const{anchorNode:h,anchorOffset:y,focusNode:N,focusOffset:b}=u;Wr&&(Wr=!1,$l(h,y)&&$l(N,b))||zr(s,()=>{if(!c){Cr(null);return}if(!is(s,h,N))return;const $=_n();if(Tt($)){const ae=$.anchor,he=ae.getNode();if($.isCollapsed()){u.type==="Range"&&u.anchorNode===u.focusNode&&($.dirty=!0);const me=Co(s).event,xe=me?me.timeStamp:performance.now(),[we,Ce,Ve,Ue,$e]=Ao,Rt=tr(),Qe=s.isComposing()===!1&&Rt.getTextContent()==="";if(xe<$e+200&&ae.offset===Ve&&ae.key===Ue)$.format=we,$.style=Ce;else if(ae.type==="text"){if(!_t(he))throw Error("Point.getNode() must return TextNode when type is text");$.format=he.getFormat(),$.style=he.getStyle()}else ae.type==="element"&&!Qe&&($.format=0,$.style="")}else{let me=st,xe=!1;const we=$.getNodes(),Ce=we.length;for(let Ve=0;Ve<Ce;Ve++){const Ue=we[Ve];if(_t(Ue)&&(xe=!0,me&=Ue.getFormat(),me===0))break}$.format=xe?me:0}}dt(s,t,void 0)})}function Fa(u,s){zr(s,()=>{const c=_n(),h=ar(s._window),y=Fo();if(h){if(Tt(c)){const N=c.anchor,b=N.getNode();if(N.type==="element"&&N.offset===0&&c.isCollapsed()&&!Ur(b)&&tr().getChildrenSize()===1&&b.getTopLevelElementOrThrow().isEmpty()&&y!==null&&c.is(y))h.removeAllRanges(),c.dirty=!0;else if(u.detail===3&&!c.isCollapsed()){const ae=c.focus.getNode();b!==ae&&(et(b)?b.select(0):b.getParentOrThrow().select(0))}}else if(u.pointerType==="touch"){const N=h.anchorNode;if(N!==null){const b=N.nodeType;if(b===ke||b===Fe){const $=Wc(y,h,s,u);Cr($)}}}}dt(s,r,u)})}function Bl(u,s){const c=u.target,h=u.pointerType;c instanceof Node&&h!=="touch"&&zr(s,()=>{rs(c)||(Do=!0)})}function o(u){if(!u.getTargetRanges)return null;const s=u.getTargetRanges();return s.length===0?null:s[0]}function i(u,s){return u!==s||et(u)||et(s)||!u.isToken()||!s.isToken()}function a(u){return Pl===229&&u<Ui+nr}function g(u,s){const c=u.inputType,h=o(u);c==="deleteCompositionText"||De&&Ol(s)||c!=="insertCompositionText"&&zr(s,()=>{const y=_n();if(c==="deleteContentBackward"){if(y===null){const me=Fo();if(!Tt(me))return;Cr(me.clone())}if(Tt(y)){if(be&&vn(y.anchor.key),a(u.timeStamp)&&s.isComposing()&&y.anchor.key===y.focus.key){if(vn(null),Ui=0,setTimeout(()=>{zr(s,()=>{vn(null)})},nr),Tt(y)){const xe=y.anchor.getNode();if(xe.markDirty(),y.format=xe.getFormat(),!_t(xe))throw Error("Anchor node must be a TextNode");y.style=xe.getStyle()}y.anchor.getNode().getTextContent().length<=1&&(u.preventDefault(),dt(s,l,!0))}else vn(null),u.preventDefault(),dt(s,l,!0);return}}if(!Tt(y))return;const N=u.data;Hr!==null&&Rs(!1,s,Hr),(!y.dirty||Hr!==null)&&y.isCollapsed()&&!Ur(y.anchor.getNode())&&h!==null&&y.applyDOMRange(h),Hr=null;const b=y.anchor,$=y.focus,ae=b.getNode(),he=$.getNode();if(c==="insertText"||c==="insertTranspose"){if(N===`
39
39
  `)u.preventDefault(),dt(s,d,!1);else if(N===$t)u.preventDefault(),dt(s,f,void 0);else if(N==null&&u.dataTransfer){const me=u.dataTransfer.getData("text/plain");u.preventDefault(),y.insertRawText(me)}else N!=null&&Gi(y,h,N,u.timeStamp,!0)?(u.preventDefault(),dt(s,p,N)):Hr=N;Us=u.timeStamp;return}switch(u.preventDefault(),c){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":{dt(s,p,u);break}case"insertFromComposition":{vn(null),dt(s,p,u);break}case"insertLineBreak":{vn(null),dt(s,d,!1);break}case"insertParagraph":{vn(null),Ys&&!ue?(Ys=!1,dt(s,d,!1)):dt(s,f,void 0);break}case"insertFromPaste":case"insertFromPasteAsQuotation":{dt(s,_,u);break}case"deleteByComposition":{i(ae,he)&&dt(s,E,u);break}case"deleteByDrag":case"deleteByCut":{dt(s,E,u);break}case"deleteContent":{dt(s,l,!1);break}case"deleteWordBackward":{dt(s,T,!0);break}case"deleteWordForward":{dt(s,T,!1);break}case"deleteHardLineBackward":case"deleteSoftLineBackward":{dt(s,S,!0);break}case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":{dt(s,S,!1);break}case"formatStrikeThrough":{dt(s,w,"strikethrough");break}case"formatBold":{dt(s,w,"bold");break}case"formatItalic":{dt(s,w,"italic");break}case"formatUnderline":{dt(s,w,"underline");break}case"historyUndo":{dt(s,O,void 0);break}case"historyRedo":{dt(s,m,void 0);break}}})}function C(u,s){u.stopPropagation(),zr(s,()=>{const c=_n(),h=u.data,y=o(u);if(h!=null&&Tt(c)&&Gi(c,y,h,u.timeStamp,!1)){js&&(A(s,h),js=!1);const N=c.anchor,b=N.getNode(),$=ar(s._window);if($===null)return;const ae=N.offset;(!ee||c.isCollapsed()||!_t(b)||$.anchorNode===null||b.getTextContent().slice(0,ae)+h+b.getTextContent().slice(ae+c.focus.offset)!==mo($.anchorNode))&&dt(s,p,h);const he=h.length;De&&he>1&&u.inputType==="insertCompositionText"&&!s.isComposing()&&(c.anchor.offset-=he),!ne&&!ue&&!Re&&s.isComposing()&&(Ui=0,vn(null))}else Rs(!1,s,h!==null?h:void 0),js&&(A(s,h||void 0),js=!1);_l()}),Hr=null}function x(u,s){zr(s,()=>{const c=_n();if(Tt(c)&&!s.isComposing()){const h=c.anchor,y=c.anchor.getNode();vn(h.key),(u.timeStamp<Ui+nr||h.type==="element"||!c.isCollapsed()||y.getFormat()!==c.format||_t(y)&&y.getStyle()!==c.style)&&dt(s,p,Kt)}})}function A(u,s){const c=u._compositionKey;if(vn(null),c!==null&&s!=null){if(s===""){const h=Cn(c),y=Pr(u.getElementByKey(c));y!==null&&y.nodeValue!==null&&_t(h)&&$r(h,y.nodeValue,null,null,!0);return}if(s[s.length-1]===`
@@ -106,6 +106,6 @@ caused by: ${Di.fullStack(n)}`:t.stack??""}static info(t){qc(t);const n={},r=Di.
106
106
  `});const E={type:"element",tagName:"li",properties:d,children:f};return e.patch(t,E),e.applyData(t,E)}function ST(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=im(n[r])}return t}function im(e){const t=e.spread;return t??e.children.length>1}function wT(e,t){const n={},r=e.all(t);let l=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++l<r.length;){const f=r[l];if(f.type==="element"&&f.tagName==="li"&&f.properties&&Array.isArray(f.properties.className)&&f.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const d={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,d),e.applyData(t,d)}function OT(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function DT(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function AT(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Rd=sm("start"),bd=sm("end");function MT(e){return{start:Rd(e),end:bd(e)}}function sm(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};return{line:r.line||null,column:r.column||null,offset:r.offset>-1?r.offset:null}}}function RT(e,t){const n=e.all(t),r=n.shift(),l=[];if(r){const f={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],f),l.push(f)}if(n.length>0){const f={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},p=Rd(t.children[1]),_=bd(t.children[t.children.length-1]);p.line&&_.line&&(f.position={start:p,end:_}),l.push(f)}const d={type:"element",tagName:"table",properties:{},children:e.wrap(l,!0)};return e.patch(t,d),e.applyData(t,d)}function bT(e,t,n){const r=n?n.children:void 0,d=(r?r.indexOf(t):1)===0?"th":"td",f=n&&n.type==="table"?n.align:void 0,p=f?f.length:t.children.length;let _=-1;const E=[];for(;++_<p;){const S=t.children[_],w={},O=f?f[_]:void 0;O&&(w.align=O);let m={type:"element",tagName:d,properties:w,children:[]};S&&(m.children=e.all(S),e.patch(S,m),m=e.applyData(t,m)),E.push(m)}const T={type:"element",tagName:"tr",properties:{},children:e.wrap(E,!0)};return e.patch(t,T),e.applyData(t,T)}function LT(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Sg=9,wg=32;function IT(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),l=0;const d=[];for(;r;)d.push(Og(t.slice(l,r.index),l>0,!0),r[0]),l=r.index+r[0].length,r=n.exec(t);return d.push(Og(t.slice(l),l>0,!1)),d.join("")}function Og(e,t,n){let r=0,l=e.length;if(t){let d=e.codePointAt(r);for(;d===Sg||d===wg;)r++,d=e.codePointAt(r)}if(n){let d=e.codePointAt(l-1);for(;d===Sg||d===wg;)l--,d=e.codePointAt(l-1)}return l>r?e.slice(r,l):""}function kT(e,t){const n={type:"text",value:IT(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function PT(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const $T={blockquote:dT,break:fT,code:hT,delete:gT,emphasis:pT,footnoteReference:nm,footnote:mT,heading:_T,html:yT,imageReference:NT,image:CT,inlineCode:ET,linkReference:TT,link:xT,listItem:vT,list:wT,paragraph:OT,root:DT,strong:AT,table:RT,tableCell:LT,tableRow:bT,text:kT,thematicBreak:PT,toml:Xa,yaml:Xa,definition:Xa,footnoteDefinition:Xa};function Xa(){return null}const om=function(e){if(e==null)return WT;if(typeof e=="string")return HT(e);if(typeof e=="object")return Array.isArray(e)?FT(e):BT(e);if(typeof e=="function")return Tc(e);throw new Error("Expected function, string, or object as test")};function FT(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=om(e[n]);return Tc(r);function r(...l){let d=-1;for(;++d<t.length;)if(t[d].call(this,...l))return!0;return!1}}function BT(e){return Tc(t);function t(n){let r;for(r in e)if(n[r]!==e[r])return!1;return!0}}function HT(e){return Tc(t);function t(n){return n&&n.type===e}}function Tc(e){return t;function t(n,...r){return!!(n&&typeof n=="object"&&"type"in n&&e.call(this,n,...r))}}function WT(){return!0}const KT=!0,Dg=!1,zT="skip",UT=function(e,t,n,r){typeof t=="function"&&typeof n!="function"&&(r=n,n=t,t=null);const l=om(t),d=r?-1:1;f(e,void 0,[])();function f(p,_,E){const T=p&&typeof p=="object"?p:{};if(typeof T.type=="string"){const w=typeof T.tagName=="string"?T.tagName:typeof T.name=="string"?T.name:void 0;Object.defineProperty(S,"name",{value:"node ("+(p.type+(w?"<"+w+">":""))+")"})}return S;function S(){let w=[],O,m,v;if((!t||l(p,_,E[E.length-1]||null))&&(w=GT(n(p,E)),w[0]===Dg))return w;if(p.children&&w[0]!==zT)for(m=(r?p.children.length:-1)+d,v=E.concat(p);m>-1&&m<p.children.length;){if(O=f(p.children[m],m,v)(),O[0]===Dg)return O;m=typeof O[1]=="number"?O[1]:m+d}return w}}};function GT(e){return Array.isArray(e)?e:typeof e=="number"?[KT,e]:[e]}const Ld=function(e,t,n,r){typeof t=="function"&&typeof n!="function"&&(r=n,n=t,t=null),UT(e,t,l,r);function l(d,f){const p=f[f.length-1];return n(d,p?p.children.indexOf(d):null,p)}};function YT(e){return!e||!e.position||!e.position.start||!e.position.start.line||!e.position.start.column||!e.position.end||!e.position.end.line||!e.position.end.column}const Ag={}.hasOwnProperty;function jT(e){const t=Object.create(null);if(!e||!e.type)throw new Error("mdast-util-definitions expected node");return Ld(e,"definition",r=>{const l=Mg(r.identifier);l&&!Ag.call(t,l)&&(t[l]=r)}),n;function n(r){const l=Mg(r);return l&&Ag.call(t,l)?t[l]:null}}function Mg(e){return String(e||"").toUpperCase()}const hc={}.hasOwnProperty;function VT(e,t){const n=t||{},r=n.allowDangerousHtml||!1,l={};return f.dangerous=r,f.clobberPrefix=n.clobberPrefix===void 0||n.clobberPrefix===null?"user-content-":n.clobberPrefix,f.footnoteLabel=n.footnoteLabel||"Footnotes",f.footnoteLabelTagName=n.footnoteLabelTagName||"h2",f.footnoteLabelProperties=n.footnoteLabelProperties||{className:["sr-only"]},f.footnoteBackLabel=n.footnoteBackLabel||"Back to content",f.unknownHandler=n.unknownHandler,f.passThrough=n.passThrough,f.handlers={...$T,...n.handlers},f.definition=jT(e),f.footnoteById=l,f.footnoteOrder=[],f.footnoteCounts={},f.patch=qT,f.applyData=ZT,f.one=p,f.all=_,f.wrap=XT,f.augment=d,Ld(e,"footnoteDefinition",E=>{const T=String(E.identifier).toUpperCase();hc.call(l,T)||(l[T]=E)}),f;function d(E,T){if(E&&"data"in E&&E.data){const S=E.data;S.hName&&(T.type!=="element"&&(T={type:"element",tagName:"",properties:{},children:[]}),T.tagName=S.hName),T.type==="element"&&S.hProperties&&(T.properties={...T.properties,...S.hProperties}),"children"in T&&T.children&&S.hChildren&&(T.children=S.hChildren)}if(E){const S="type"in E?E:{position:E};YT(S)||(T.position={start:Rd(S),end:bd(S)})}return T}function f(E,T,S,w){return Array.isArray(S)&&(w=S,S={}),d(E,{type:"element",tagName:T,properties:S||{},children:w||[]})}function p(E,T){return lm(f,E,T)}function _(E){return ns(f,E)}}function qT(e,t){e.position&&(t.position=MT(e))}function ZT(e,t){let n=t;if(e&&e.data){const r=e.data.hName,l=e.data.hChildren,d=e.data.hProperties;typeof r=="string"&&(n.type==="element"?n.tagName=r:n={type:"element",tagName:r,properties:{},children:[]}),n.type==="element"&&d&&(n.properties={...n.properties,...d}),"children"in n&&n.children&&l!==null&&l!==void 0&&(n.children=l)}return n}function lm(e,t,n){const r=t&&t.type;if(!r)throw new Error("Expected node, got `"+t+"`");return hc.call(e.handlers,r)?e.handlers[r](e,t,n):e.passThrough&&e.passThrough.includes(r)?"children"in t?{...t,children:ns(e,t)}:t:e.unknownHandler?e.unknownHandler(e,t,n):JT(e,t)}function ns(e,t){const n=[];if("children"in t){const r=t.children;let l=-1;for(;++l<r.length;){const d=lm(e,r[l],t);if(d){if(l&&r[l-1].type==="break"&&(!Array.isArray(d)&&d.type==="text"&&(d.value=d.value.replace(/^\s+/,"")),!Array.isArray(d)&&d.type==="element")){const f=d.children[0];f&&f.type==="text"&&(f.value=f.value.replace(/^\s+/,""))}Array.isArray(d)?n.push(...d):n.push(d)}}}return n}function JT(e,t){const n=t.data||{},r="value"in t&&!(hc.call(n,"hProperties")||hc.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:ns(e,t)};return e.patch(t,r),e.applyData(t,r)}function XT(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
107
107
  `});++r<e.length;)r&&n.push({type:"text",value:`
108
108
  `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
109
- `}),n}const QT=(e,t)=>e(t,"i",ns(e,t)),ex=(e,t)=>e(t,"b",ns(e,t)),tx=(e,t)=>e(t,"u",ns(e,t)),nx=(e,t)=>e(t,"s",ns(e,t)),rx=(e,t)=>e(t,"sub",ns(e,t)),ix=(e,t)=>e(t,"sup",ns(e,t)),sx={emphasis:QT,strong:ex,underline:tx,strikethrough:nx,subscript:rx,superscript:ix},ox=e=>{const[t,n]=rt.useState();let r;return rt.useEffect(()=>{(async()=>{if(!r)try{r=(await Promise.resolve().then(()=>require("./index-xQyPA7tc.cjs"))).default}catch{throw new Error("Failed to import React Markdown, cannot properly render LegacyRichText.")}const d=r({children:e.markdown,remarkPlugins:[uT],remarkRehypeOptions:{handlers:sx}});n(d)})()},[e.markdown]),t||null};class uo extends Error{}class lx extends uo{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}}class ax extends uo{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}}class cx extends uo{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}}class Zo extends uo{}class am extends uo{constructor(t){super(`Invalid unit ${t}`)}}class mr extends uo{}class _s extends uo{constructor(){super("Zone is an abstract class")}}const at="numeric",mi="short",Yr="long",gc={year:at,month:at,day:at},cm={year:at,month:mi,day:at},ux={year:at,month:mi,day:at,weekday:mi},um={year:at,month:Yr,day:at},dm={year:at,month:Yr,day:at,weekday:Yr},fm={hour:at,minute:at},hm={hour:at,minute:at,second:at},gm={hour:at,minute:at,second:at,timeZoneName:mi},pm={hour:at,minute:at,second:at,timeZoneName:Yr},mm={hour:at,minute:at,hourCycle:"h23"},_m={hour:at,minute:at,second:at,hourCycle:"h23"},ym={hour:at,minute:at,second:at,hourCycle:"h23",timeZoneName:mi},Nm={hour:at,minute:at,second:at,hourCycle:"h23",timeZoneName:Yr},Cm={year:at,month:at,day:at,hour:at,minute:at},Em={year:at,month:at,day:at,hour:at,minute:at,second:at},Tm={year:at,month:mi,day:at,hour:at,minute:at},xm={year:at,month:mi,day:at,hour:at,minute:at,second:at},dx={year:at,month:mi,day:at,weekday:mi,hour:at,minute:at},vm={year:at,month:Yr,day:at,hour:at,minute:at,timeZoneName:mi},Sm={year:at,month:Yr,day:at,hour:at,minute:at,second:at,timeZoneName:mi},wm={year:at,month:Yr,day:at,weekday:Yr,hour:at,minute:at,timeZoneName:Yr},Om={year:at,month:Yr,day:at,weekday:Yr,hour:at,minute:at,second:at,timeZoneName:Yr};class ua{get type(){throw new _s}get name(){throw new _s}get ianaName(){return this.name}get isUniversal(){throw new _s}offsetName(t,n){throw new _s}formatOffset(t,n){throw new _s}offset(t){throw new _s}equals(t){throw new _s}get isValid(){throw new _s}}let ku=null;class xc extends ua{static get instance(){return ku===null&&(ku=new xc),ku}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:n,locale:r}){return Pm(t,n,r)}formatOffset(t,n){return oa(this.offset(t),n)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return t.type==="system"}get isValid(){return!0}}let oc={};function fx(e){return oc[e]||(oc[e]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),oc[e]}const hx={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function gx(e,t){const n=e.format(t).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,l,d,f,p,_,E,T]=r;return[f,l,d,p,_,E,T]}function px(e,t){const n=e.formatToParts(t),r=[];for(let l=0;l<n.length;l++){const{type:d,value:f}=n[l],p=hx[d];d==="era"?r[p]=f:Lt(p)||(r[p]=parseInt(f,10))}return r}let Qa={};class ts extends ua{static create(t){return Qa[t]||(Qa[t]=new ts(t)),Qa[t]}static resetCache(){Qa={},oc={}}static isValidSpecifier(t){return this.isValidZone(t)}static isValidZone(t){if(!t)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:t}).format(),!0}catch{return!1}}constructor(t){super(),this.zoneName=t,this.valid=ts.isValidZone(t)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(t,{format:n,locale:r}){return Pm(t,n,r,this.name)}formatOffset(t,n){return oa(this.offset(t),n)}offset(t){const n=new Date(t);if(isNaN(n))return NaN;const r=fx(this.name);let[l,d,f,p,_,E,T]=r.formatToParts?px(r,n):gx(r,n);p==="BC"&&(l=-Math.abs(l)+1);const w=Sc({year:l,month:d,day:f,hour:_===24?0:_,minute:E,second:T,millisecond:0});let O=+n;const m=O%1e3;return O-=m>=0?m:1e3+m,(w-O)/(60*1e3)}equals(t){return t.type==="iana"&&t.name===this.name}get isValid(){return this.valid}}let Rg={};function mx(e,t={}){const n=JSON.stringify([e,t]);let r=Rg[n];return r||(r=new Intl.ListFormat(e,t),Rg[n]=r),r}let td={};function nd(e,t={}){const n=JSON.stringify([e,t]);let r=td[n];return r||(r=new Intl.DateTimeFormat(e,t),td[n]=r),r}let rd={};function _x(e,t={}){const n=JSON.stringify([e,t]);let r=rd[n];return r||(r=new Intl.NumberFormat(e,t),rd[n]=r),r}let id={};function yx(e,t={}){const{base:n,...r}=t,l=JSON.stringify([e,r]);let d=id[l];return d||(d=new Intl.RelativeTimeFormat(e,t),id[l]=d),d}let ta=null;function Nx(){return ta||(ta=new Intl.DateTimeFormat().resolvedOptions().locale,ta)}let bg={};function Cx(e){let t=bg[e];if(!t){const n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,bg[e]=t}return t}function Ex(e){const t=e.indexOf("-x-");t!==-1&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(n===-1)return[e];{let r,l;try{r=nd(e).resolvedOptions(),l=e}catch{const _=e.substring(0,n);r=nd(_).resolvedOptions(),l=_}const{numberingSystem:d,calendar:f}=r;return[l,d,f]}}function Tx(e,t,n){return(n||t)&&(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`)),e}function xx(e){const t=[];for(let n=1;n<=12;n++){const r=vt.utc(2009,n,1);t.push(e(r))}return t}function vx(e){const t=[];for(let n=1;n<=7;n++){const r=vt.utc(2016,11,13+n);t.push(e(r))}return t}function ec(e,t,n,r){const l=e.listingMode();return l==="error"?null:l==="en"?n(t):r(t)}function Sx(e){return e.numberingSystem&&e.numberingSystem!=="latn"?!1:e.numberingSystem==="latn"||!e.locale||e.locale.startsWith("en")||new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem==="latn"}class wx{constructor(t,n,r){this.padTo=r.padTo||0,this.floor=r.floor||!1;const{padTo:l,floor:d,...f}=r;if(!n||Object.keys(f).length>0){const p={useGrouping:!1,...r};r.padTo>0&&(p.minimumIntegerDigits=r.padTo),this.inf=_x(t,p)}}format(t){if(this.inf){const n=this.floor?Math.floor(t):t;return this.inf.format(n)}else{const n=this.floor?Math.floor(t):Fd(t,3);return Kn(n,this.padTo)}}}class Ox{constructor(t,n,r){this.opts=r,this.originalZone=void 0;let l;if(this.opts.timeZone)this.dt=t;else if(t.zone.type==="fixed"){const f=-1*(t.offset/60),p=f>=0?`Etc/GMT+${f}`:`Etc/GMT${f}`;t.offset!==0&&ts.create(p).valid?(l=p,this.dt=t):(l="UTC",this.dt=t.offset===0?t:t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone)}else t.zone.type==="system"?this.dt=t:t.zone.type==="iana"?(this.dt=t,l=t.zone.name):(l="UTC",this.dt=t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone);const d={...this.opts};d.timeZone=d.timeZone||l,this.dtf=nd(n,d)}format(){return this.originalZone?this.formatToParts().map(({value:t})=>t).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const t=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?t.map(n=>{if(n.type==="timeZoneName"){const r=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...n,value:r}}else return n}):t}resolvedOptions(){return this.dtf.resolvedOptions()}}class Dx{constructor(t,n,r){this.opts={style:"long",...r},!n&&Im()&&(this.rtf=yx(t,r))}format(t,n){return this.rtf?this.rtf.format(t,n):Jx(n,t,this.opts.numeric,this.opts.style!=="long")}formatToParts(t,n){return this.rtf?this.rtf.formatToParts(t,n):[]}}const Ax={firstDay:1,minimalDays:4,weekend:[6,7]};class un{static fromOpts(t){return un.create(t.locale,t.numberingSystem,t.outputCalendar,t.weekSettings,t.defaultToEN)}static create(t,n,r,l,d=!1){const f=t||Rn.defaultLocale,p=f||(d?"en-US":Nx()),_=n||Rn.defaultNumberingSystem,E=r||Rn.defaultOutputCalendar,T=sd(l)||Rn.defaultWeekSettings;return new un(p,_,E,T,f)}static resetCache(){ta=null,td={},rd={},id={}}static fromObject({locale:t,numberingSystem:n,outputCalendar:r,weekSettings:l}={}){return un.create(t,n,r,l)}constructor(t,n,r,l,d){const[f,p,_]=Ex(t);this.locale=f,this.numberingSystem=n||p||null,this.outputCalendar=r||_||null,this.weekSettings=l,this.intl=Tx(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=d,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=Sx(this)),this.fastNumbersCached}listingMode(){const t=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return t&&n?"en":"intl"}clone(t){return!t||Object.getOwnPropertyNames(t).length===0?this:un.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,sd(t.weekSettings)||this.weekSettings,t.defaultToEN||!1)}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,n=!1){return ec(this,t,Bm,()=>{const r=n?{month:t,day:"numeric"}:{month:t},l=n?"format":"standalone";return this.monthsCache[l][t]||(this.monthsCache[l][t]=xx(d=>this.extract(d,r,"month"))),this.monthsCache[l][t]})}weekdays(t,n=!1){return ec(this,t,Km,()=>{const r=n?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},l=n?"format":"standalone";return this.weekdaysCache[l][t]||(this.weekdaysCache[l][t]=vx(d=>this.extract(d,r,"weekday"))),this.weekdaysCache[l][t]})}meridiems(){return ec(this,void 0,()=>zm,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[vt.utc(2016,11,13,9),vt.utc(2016,11,13,19)].map(n=>this.extract(n,t,"dayperiod"))}return this.meridiemCache})}eras(t){return ec(this,t,Um,()=>{const n={era:t};return this.eraCache[t]||(this.eraCache[t]=[vt.utc(-40,1,1),vt.utc(2017,1,1)].map(r=>this.extract(r,n,"era"))),this.eraCache[t]})}extract(t,n,r){const l=this.dtFormatter(t,n),d=l.formatToParts(),f=d.find(p=>p.type.toLowerCase()===r);return f?f.value:null}numberFormatter(t={}){return new wx(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,n={}){return new Ox(t,this.intl,n)}relFormatter(t={}){return new Dx(this.intl,this.isEnglish(),t)}listFormatter(t={}){return mx(this.intl,t)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:km()?Cx(this.locale):Ax}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let Pu=null;class vr extends ua{static get utcInstance(){return Pu===null&&(Pu=new vr(0)),Pu}static instance(t){return t===0?vr.utcInstance:new vr(t)}static parseSpecifier(t){if(t){const n=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new vr(wc(n[1],n[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${oa(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${oa(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,n){return oa(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return t.type==="fixed"&&t.fixed===this.fixed}get isValid(){return!0}}class Mx extends ua{constructor(t){super(),this.zoneName=t}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function Cs(e,t){if(Lt(e)||e===null)return t;if(e instanceof ua)return e;if(Px(e)){const n=e.toLowerCase();return n==="default"?t:n==="local"||n==="system"?xc.instance:n==="utc"||n==="gmt"?vr.utcInstance:vr.parseSpecifier(n)||ts.create(e)}else return Ts(e)?vr.instance(e):typeof e=="object"&&"offset"in e&&typeof e.offset=="function"?e:new Mx(e)}const Id={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},Lg={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},Rx=Id.hanidec.replace(/[\[|\]]/g,"").split("");function bx(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);if(e[n].search(Id.hanidec)!==-1)t+=Rx.indexOf(e[n]);else for(const l in Lg){const[d,f]=Lg[l];r>=d&&r<=f&&(t+=r-d)}}return parseInt(t,10)}else return t}let qo={};function Lx(){qo={}}function hi({numberingSystem:e},t=""){const n=e||"latn";return qo[n]||(qo[n]={}),qo[n][t]||(qo[n][t]=new RegExp(`${Id[n]}${t}`)),qo[n][t]}let Ig=()=>Date.now(),kg="system",Pg=null,$g=null,Fg=null,Bg=60,Hg,Wg=null;class Rn{static get now(){return Ig}static set now(t){Ig=t}static set defaultZone(t){kg=t}static get defaultZone(){return Cs(kg,xc.instance)}static get defaultLocale(){return Pg}static set defaultLocale(t){Pg=t}static get defaultNumberingSystem(){return $g}static set defaultNumberingSystem(t){$g=t}static get defaultOutputCalendar(){return Fg}static set defaultOutputCalendar(t){Fg=t}static get defaultWeekSettings(){return Wg}static set defaultWeekSettings(t){Wg=sd(t)}static get twoDigitCutoffYear(){return Bg}static set twoDigitCutoffYear(t){Bg=t%100}static get throwOnInvalid(){return Hg}static set throwOnInvalid(t){Hg=t}static resetCaches(){un.resetCache(),ts.resetCache(),vt.resetCache(),Lx()}}class pi{constructor(t,n){this.reason=t,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const Dm=[0,31,59,90,120,151,181,212,243,273,304,334],Am=[0,31,60,91,121,152,182,213,244,274,305,335];function ei(e,t){return new pi("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function kd(e,t,n){const r=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const l=r.getUTCDay();return l===0?7:l}function Mm(e,t,n){return n+(da(e)?Am:Dm)[t-1]}function Rm(e,t){const n=da(e)?Am:Dm,r=n.findIndex(d=>d<t),l=t-n[r];return{month:r+1,day:l}}function Pd(e,t){return(e-t+7)%7+1}function pc(e,t=4,n=1){const{year:r,month:l,day:d}=e,f=Mm(r,l,d),p=Pd(kd(r,l,d),n);let _=Math.floor((f-p+14-t)/7),E;return _<1?(E=r-1,_=ca(E,t,n)):_>ca(r,t,n)?(E=r+1,_=1):E=r,{weekYear:E,weekNumber:_,weekday:p,...Oc(e)}}function Kg(e,t=4,n=1){const{weekYear:r,weekNumber:l,weekday:d}=e,f=Pd(kd(r,1,t),n),p=Jo(r);let _=l*7+d-f-7+t,E;_<1?(E=r-1,_+=Jo(E)):_>p?(E=r+1,_-=Jo(r)):E=r;const{month:T,day:S}=Rm(E,_);return{year:E,month:T,day:S,...Oc(e)}}function $u(e){const{year:t,month:n,day:r}=e,l=Mm(t,n,r);return{year:t,ordinal:l,...Oc(e)}}function zg(e){const{year:t,ordinal:n}=e,{month:r,day:l}=Rm(t,n);return{year:t,month:r,day:l,...Oc(e)}}function Ug(e,t){if(!Lt(e.localWeekday)||!Lt(e.localWeekNumber)||!Lt(e.localWeekYear)){if(!Lt(e.weekday)||!Lt(e.weekNumber)||!Lt(e.weekYear))throw new Zo("Cannot mix locale-based week fields with ISO-based week fields");return Lt(e.localWeekday)||(e.weekday=e.localWeekday),Lt(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),Lt(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function Ix(e,t=4,n=1){const r=vc(e.weekYear),l=ti(e.weekNumber,1,ca(e.weekYear,t,n)),d=ti(e.weekday,1,7);return r?l?d?!1:ei("weekday",e.weekday):ei("week",e.weekNumber):ei("weekYear",e.weekYear)}function kx(e){const t=vc(e.year),n=ti(e.ordinal,1,Jo(e.year));return t?n?!1:ei("ordinal",e.ordinal):ei("year",e.year)}function bm(e){const t=vc(e.year),n=ti(e.month,1,12),r=ti(e.day,1,mc(e.year,e.month));return t?n?r?!1:ei("day",e.day):ei("month",e.month):ei("year",e.year)}function Lm(e){const{hour:t,minute:n,second:r,millisecond:l}=e,d=ti(t,0,23)||t===24&&n===0&&r===0&&l===0,f=ti(n,0,59),p=ti(r,0,59),_=ti(l,0,999);return d?f?p?_?!1:ei("millisecond",l):ei("second",r):ei("minute",n):ei("hour",t)}function Lt(e){return typeof e>"u"}function Ts(e){return typeof e=="number"}function vc(e){return typeof e=="number"&&e%1===0}function Px(e){return typeof e=="string"}function $x(e){return Object.prototype.toString.call(e)==="[object Date]"}function Im(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function km(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function Fx(e){return Array.isArray(e)?e:[e]}function Gg(e,t,n){if(e.length!==0)return e.reduce((r,l)=>{const d=[t(l),l];return r&&n(r[0],d[0])===r[0]?r:d},null)[1]}function Bx(e,t){return t.reduce((n,r)=>(n[r]=e[r],n),{})}function el(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function sd(e){if(e==null)return null;if(typeof e!="object")throw new mr("Week settings must be an object");if(!ti(e.firstDay,1,7)||!ti(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(t=>!ti(t,1,7)))throw new mr("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function ti(e,t,n){return vc(e)&&e>=t&&e<=n}function Hx(e,t){return e-t*Math.floor(e/t)}function Kn(e,t=2){const n=e<0;let r;return n?r="-"+(""+-e).padStart(t,"0"):r=(""+e).padStart(t,"0"),r}function Ns(e){if(!(Lt(e)||e===null||e===""))return parseInt(e,10)}function Xs(e){if(!(Lt(e)||e===null||e===""))return parseFloat(e)}function $d(e){if(!(Lt(e)||e===null||e==="")){const t=parseFloat("0."+e)*1e3;return Math.floor(t)}}function Fd(e,t,n=!1){const r=10**t;return(n?Math.trunc:Math.round)(e*r)/r}function da(e){return e%4===0&&(e%100!==0||e%400===0)}function Jo(e){return da(e)?366:365}function mc(e,t){const n=Hx(t-1,12)+1,r=e+(t-n)/12;return n===2?da(r)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function Sc(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function Yg(e,t,n){return-Pd(kd(e,1,t),n)+t-1}function ca(e,t=4,n=1){const r=Yg(e,t,n),l=Yg(e+1,t,n);return(Jo(e)-r+l)/7}function od(e){return e>99?e:e>Rn.twoDigitCutoffYear?1900+e:2e3+e}function Pm(e,t,n,r=null){const l=new Date(e),d={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(d.timeZone=r);const f={timeZoneName:t,...d},p=new Intl.DateTimeFormat(n,f).formatToParts(l).find(_=>_.type.toLowerCase()==="timezonename");return p?p.value:null}function wc(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const r=parseInt(t,10)||0,l=n<0||Object.is(n,-0)?-r:r;return n*60+l}function $m(e){const t=Number(e);if(typeof e=="boolean"||e===""||Number.isNaN(t))throw new mr(`Invalid unit value ${e}`);return t}function _c(e,t){const n={};for(const r in e)if(el(e,r)){const l=e[r];if(l==null)continue;n[t(r)]=$m(l)}return n}function oa(e,t){const n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),l=e>=0?"+":"-";switch(t){case"short":return`${l}${Kn(n,2)}:${Kn(r,2)}`;case"narrow":return`${l}${n}${r>0?`:${r}`:""}`;case"techie":return`${l}${Kn(n,2)}${Kn(r,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function Oc(e){return Bx(e,["hour","minute","second","millisecond"])}const Wx=["January","February","March","April","May","June","July","August","September","October","November","December"],Fm=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Kx=["J","F","M","A","M","J","J","A","S","O","N","D"];function Bm(e){switch(e){case"narrow":return[...Kx];case"short":return[...Fm];case"long":return[...Wx];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const Hm=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Wm=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],zx=["M","T","W","T","F","S","S"];function Km(e){switch(e){case"narrow":return[...zx];case"short":return[...Wm];case"long":return[...Hm];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const zm=["AM","PM"],Ux=["Before Christ","Anno Domini"],Gx=["BC","AD"],Yx=["B","A"];function Um(e){switch(e){case"narrow":return[...Yx];case"short":return[...Gx];case"long":return[...Ux];default:return null}}function jx(e){return zm[e.hour<12?0:1]}function Vx(e,t){return Km(t)[e.weekday-1]}function qx(e,t){return Bm(t)[e.month-1]}function Zx(e,t){return Um(t)[e.year<0?0:1]}function Jx(e,t,n="always",r=!1){const l={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},d=["hours","minutes","seconds"].indexOf(e)===-1;if(n==="auto"&&d){const S=e==="days";switch(t){case 1:return S?"tomorrow":`next ${l[e][0]}`;case-1:return S?"yesterday":`last ${l[e][0]}`;case 0:return S?"today":`this ${l[e][0]}`}}const f=Object.is(t,-0)||t<0,p=Math.abs(t),_=p===1,E=l[e],T=r?_?E[1]:E[2]||E[1]:_?l[e][0]:e;return f?`${p} ${T} ago`:`in ${p} ${T}`}function jg(e,t){let n="";for(const r of e)r.literal?n+=r.val:n+=t(r.val);return n}const Xx={D:gc,DD:cm,DDD:um,DDDD:dm,t:fm,tt:hm,ttt:gm,tttt:pm,T:mm,TT:_m,TTT:ym,TTTT:Nm,f:Cm,ff:Tm,fff:vm,ffff:wm,F:Em,FF:xm,FFF:Sm,FFFF:Om};class _r{static create(t,n={}){return new _r(t,n)}static parseFormat(t){let n=null,r="",l=!1;const d=[];for(let f=0;f<t.length;f++){const p=t.charAt(f);p==="'"?(r.length>0&&d.push({literal:l||/^\s+$/.test(r),val:r}),n=null,r="",l=!l):l||p===n?r+=p:(r.length>0&&d.push({literal:/^\s+$/.test(r),val:r}),r=p,n=p)}return r.length>0&&d.push({literal:l||/^\s+$/.test(r),val:r}),d}static macroTokenToFormatOpts(t){return Xx[t]}constructor(t,n){this.opts=n,this.loc=t,this.systemLoc=null}formatWithSystemDefault(t,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(t,{...this.opts,...n}).format()}dtFormatter(t,n={}){return this.loc.dtFormatter(t,{...this.opts,...n})}formatDateTime(t,n){return this.dtFormatter(t,n).format()}formatDateTimeParts(t,n){return this.dtFormatter(t,n).formatToParts()}formatInterval(t,n){return this.dtFormatter(t.start,n).dtf.formatRange(t.start.toJSDate(),t.end.toJSDate())}resolvedOptions(t,n){return this.dtFormatter(t,n).resolvedOptions()}num(t,n=0){if(this.opts.forceSimple)return Kn(t,n);const r={...this.opts};return n>0&&(r.padTo=n),this.loc.numberFormatter(r).format(t)}formatDateTimeFromString(t,n){const r=this.loc.listingMode()==="en",l=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",d=(O,m)=>this.loc.extract(t,O,m),f=O=>t.isOffsetFixed&&t.offset===0&&O.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,O.format):"",p=()=>r?jx(t):d({hour:"numeric",hourCycle:"h12"},"dayperiod"),_=(O,m)=>r?qx(t,O):d(m?{month:O}:{month:O,day:"numeric"},"month"),E=(O,m)=>r?Vx(t,O):d(m?{weekday:O}:{weekday:O,month:"long",day:"numeric"},"weekday"),T=O=>{const m=_r.macroTokenToFormatOpts(O);return m?this.formatWithSystemDefault(t,m):O},S=O=>r?Zx(t,O):d({era:O},"era"),w=O=>{switch(O){case"S":return this.num(t.millisecond);case"u":case"SSS":return this.num(t.millisecond,3);case"s":return this.num(t.second);case"ss":return this.num(t.second,2);case"uu":return this.num(Math.floor(t.millisecond/10),2);case"uuu":return this.num(Math.floor(t.millisecond/100));case"m":return this.num(t.minute);case"mm":return this.num(t.minute,2);case"h":return this.num(t.hour%12===0?12:t.hour%12);case"hh":return this.num(t.hour%12===0?12:t.hour%12,2);case"H":return this.num(t.hour);case"HH":return this.num(t.hour,2);case"Z":return f({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return f({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return f({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:this.loc.locale});case"z":return t.zoneName;case"a":return p();case"d":return l?d({day:"numeric"},"day"):this.num(t.day);case"dd":return l?d({day:"2-digit"},"day"):this.num(t.day,2);case"c":return this.num(t.weekday);case"ccc":return E("short",!0);case"cccc":return E("long",!0);case"ccccc":return E("narrow",!0);case"E":return this.num(t.weekday);case"EEE":return E("short",!1);case"EEEE":return E("long",!1);case"EEEEE":return E("narrow",!1);case"L":return l?d({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return l?d({month:"2-digit",day:"numeric"},"month"):this.num(t.month,2);case"LLL":return _("short",!0);case"LLLL":return _("long",!0);case"LLLLL":return _("narrow",!0);case"M":return l?d({month:"numeric"},"month"):this.num(t.month);case"MM":return l?d({month:"2-digit"},"month"):this.num(t.month,2);case"MMM":return _("short",!1);case"MMMM":return _("long",!1);case"MMMMM":return _("narrow",!1);case"y":return l?d({year:"numeric"},"year"):this.num(t.year);case"yy":return l?d({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return l?d({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return l?d({year:"numeric"},"year"):this.num(t.year,6);case"G":return S("short");case"GG":return S("long");case"GGGGG":return S("narrow");case"kk":return this.num(t.weekYear.toString().slice(-2),2);case"kkkk":return this.num(t.weekYear,4);case"W":return this.num(t.weekNumber);case"WW":return this.num(t.weekNumber,2);case"n":return this.num(t.localWeekNumber);case"nn":return this.num(t.localWeekNumber,2);case"ii":return this.num(t.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(t.localWeekYear,4);case"o":return this.num(t.ordinal);case"ooo":return this.num(t.ordinal,3);case"q":return this.num(t.quarter);case"qq":return this.num(t.quarter,2);case"X":return this.num(Math.floor(t.ts/1e3));case"x":return this.num(t.ts);default:return T(O)}};return jg(_r.parseFormat(n),w)}formatDurationFromString(t,n){const r=_=>{switch(_[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},l=_=>E=>{const T=r(E);return T?this.num(_.get(T),E.length):E},d=_r.parseFormat(n),f=d.reduce((_,{literal:E,val:T})=>E?_:_.concat(T),[]),p=t.shiftTo(...f.map(r).filter(_=>_));return jg(d,l(p))}}const Gm=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function ll(...e){const t=e.reduce((n,r)=>n+r.source,"");return RegExp(`^${t}$`)}function al(...e){return t=>e.reduce(([n,r,l],d)=>{const[f,p,_]=d(t,l);return[{...n,...f},p||r,_]},[{},null,1]).slice(0,2)}function cl(e,...t){if(e==null)return[null,null];for(const[n,r]of t){const l=n.exec(e);if(l)return r(l)}return[null,null]}function Ym(...e){return(t,n)=>{const r={};let l;for(l=0;l<e.length;l++)r[e[l]]=Ns(t[n+l]);return[r,null,n+l]}}const jm=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,Qx=`(?:${jm.source}?(?:\\[(${Gm.source})\\])?)?`,Bd=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Vm=RegExp(`${Bd.source}${Qx}`),Hd=RegExp(`(?:T${Vm.source})?`),ev=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,tv=/(\d{4})-?W(\d\d)(?:-?(\d))?/,nv=/(\d{4})-?(\d{3})/,rv=Ym("weekYear","weekNumber","weekDay"),iv=Ym("year","ordinal"),sv=/(\d{4})-(\d\d)-(\d\d)/,qm=RegExp(`${Bd.source} ?(?:${jm.source}|(${Gm.source}))?`),ov=RegExp(`(?: ${qm.source})?`);function Xo(e,t,n){const r=e[t];return Lt(r)?n:Ns(r)}function lv(e,t){return[{year:Xo(e,t),month:Xo(e,t+1,1),day:Xo(e,t+2,1)},null,t+3]}function ul(e,t){return[{hours:Xo(e,t,0),minutes:Xo(e,t+1,0),seconds:Xo(e,t+2,0),milliseconds:$d(e[t+3])},null,t+4]}function fa(e,t){const n=!e[t]&&!e[t+1],r=wc(e[t+1],e[t+2]),l=n?null:vr.instance(r);return[{},l,t+3]}function ha(e,t){const n=e[t]?ts.create(e[t]):null;return[{},n,t+1]}const av=RegExp(`^T?${Bd.source}$`),cv=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function uv(e){const[t,n,r,l,d,f,p,_,E]=e,T=t[0]==="-",S=_&&_[0]==="-",w=(O,m=!1)=>O!==void 0&&(m||O&&T)?-O:O;return[{years:w(Xs(n)),months:w(Xs(r)),weeks:w(Xs(l)),days:w(Xs(d)),hours:w(Xs(f)),minutes:w(Xs(p)),seconds:w(Xs(_),_==="-0"),milliseconds:w($d(E),S)}]}const dv={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Wd(e,t,n,r,l,d,f){const p={year:t.length===2?od(Ns(t)):Ns(t),month:Fm.indexOf(n)+1,day:Ns(r),hour:Ns(l),minute:Ns(d)};return f&&(p.second=Ns(f)),e&&(p.weekday=e.length>3?Hm.indexOf(e)+1:Wm.indexOf(e)+1),p}const fv=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function hv(e){const[,t,n,r,l,d,f,p,_,E,T,S]=e,w=Wd(t,l,r,n,d,f,p);let O;return _?O=dv[_]:E?O=0:O=wc(T,S),[w,new vr(O)]}function gv(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const pv=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,mv=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,_v=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Vg(e){const[,t,n,r,l,d,f,p]=e;return[Wd(t,l,r,n,d,f,p),vr.utcInstance]}function yv(e){const[,t,n,r,l,d,f,p]=e;return[Wd(t,p,n,r,l,d,f),vr.utcInstance]}const Nv=ll(ev,Hd),Cv=ll(tv,Hd),Ev=ll(nv,Hd),Tv=ll(Vm),Zm=al(lv,ul,fa,ha),xv=al(rv,ul,fa,ha),vv=al(iv,ul,fa,ha),Sv=al(ul,fa,ha);function wv(e){return cl(e,[Nv,Zm],[Cv,xv],[Ev,vv],[Tv,Sv])}function Ov(e){return cl(gv(e),[fv,hv])}function Dv(e){return cl(e,[pv,Vg],[mv,Vg],[_v,yv])}function Av(e){return cl(e,[cv,uv])}const Mv=al(ul);function Rv(e){return cl(e,[av,Mv])}const bv=ll(sv,ov),Lv=ll(qm),Iv=al(ul,fa,ha);function kv(e){return cl(e,[bv,Zm],[Lv,Iv])}const qg="Invalid Duration",Jm={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},Pv={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...Jm},Qr=146097/400,Go=146097/4800,$v={years:{quarters:4,months:12,weeks:Qr/7,days:Qr,hours:Qr*24,minutes:Qr*24*60,seconds:Qr*24*60*60,milliseconds:Qr*24*60*60*1e3},quarters:{months:3,weeks:Qr/28,days:Qr/4,hours:Qr*24/4,minutes:Qr*24*60/4,seconds:Qr*24*60*60/4,milliseconds:Qr*24*60*60*1e3/4},months:{weeks:Go/7,days:Go,hours:Go*24,minutes:Go*24*60,seconds:Go*24*60*60,milliseconds:Go*24*60*60*1e3},...Jm},io=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Fv=io.slice(0).reverse();function ys(e,t,n=!1){const r={values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new en(r)}function Xm(e,t){let n=t.milliseconds??0;for(const r of Fv.slice(1))t[r]&&(n+=t[r]*e[r].milliseconds);return n}function Zg(e,t){const n=Xm(e,t)<0?-1:1;io.reduceRight((r,l)=>{if(Lt(t[l]))return r;if(r){const d=t[r]*n,f=e[l][r],p=Math.floor(d/f);t[l]+=p*n,t[r]-=p*f*n}return l},null),io.reduce((r,l)=>{if(Lt(t[l]))return r;if(r){const d=t[r]%1;t[r]-=d,t[l]+=d*e[r][l]}return l},null)}function Bv(e){const t={};for(const[n,r]of Object.entries(e))r!==0&&(t[n]=r);return t}class en{constructor(t){const n=t.conversionAccuracy==="longterm"||!1;let r=n?$v:Pv;t.matrix&&(r=t.matrix),this.values=t.values,this.loc=t.loc||un.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=r,this.isLuxonDuration=!0}static fromMillis(t,n){return en.fromObject({milliseconds:t},n)}static fromObject(t,n={}){if(t==null||typeof t!="object")throw new mr(`Duration.fromObject: argument expected to be an object, got ${t===null?"null":typeof t}`);return new en({values:_c(t,en.normalizeUnit),loc:un.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(t){if(Ts(t))return en.fromMillis(t);if(en.isDuration(t))return t;if(typeof t=="object")return en.fromObject(t);throw new mr(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,n){const[r]=Av(t);return r?en.fromObject(r,n):en.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,n){const[r]=Rv(t);return r?en.fromObject(r,n):en.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,n=null){if(!t)throw new mr("need to specify a reason the Duration is invalid");const r=t instanceof pi?t:new pi(t,n);if(Rn.throwOnInvalid)throw new cx(r);return new en({invalid:r})}static normalizeUnit(t){const n={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[t&&t.toLowerCase()];if(!n)throw new am(t);return n}static isDuration(t){return t&&t.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(t,n={}){const r={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?_r.create(this.loc,r).formatDurationFromString(this,t):qg}toHuman(t={}){if(!this.isValid)return qg;const n=io.map(r=>{const l=this.values[r];return Lt(l)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:r.slice(0,-1)}).format(l)}).filter(r=>r);return this.loc.listFormatter({type:"conjunction",style:t.listStyle||"narrow",...t}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let t="P";return this.years!==0&&(t+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(t+=this.months+this.quarters*3+"M"),this.weeks!==0&&(t+=this.weeks+"W"),this.days!==0&&(t+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(t+="T"),this.hours!==0&&(t+=this.hours+"H"),this.minutes!==0&&(t+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(t+=Fd(this.seconds+this.milliseconds/1e3,3)+"S"),t==="P"&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;const n=this.toMillis();return n<0||n>=864e5?null:(t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...t,includeOffset:!1},vt.fromMillis(n,{zone:"UTC"}).toISOTime(t))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?Xm(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;const n=en.fromDurationLike(t),r={};for(const l of io)(el(n.values,l)||el(this.values,l))&&(r[l]=n.get(l)+this.get(l));return ys(this,{values:r},!0)}minus(t){if(!this.isValid)return this;const n=en.fromDurationLike(t);return this.plus(n.negate())}mapUnits(t){if(!this.isValid)return this;const n={};for(const r of Object.keys(this.values))n[r]=$m(t(this.values[r],r));return ys(this,{values:n},!0)}get(t){return this[en.normalizeUnit(t)]}set(t){if(!this.isValid)return this;const n={...this.values,..._c(t,en.normalizeUnit)};return ys(this,{values:n})}reconfigure({locale:t,numberingSystem:n,conversionAccuracy:r,matrix:l}={}){const f={loc:this.loc.clone({locale:t,numberingSystem:n}),matrix:l,conversionAccuracy:r};return ys(this,f)}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;const t=this.toObject();return Zg(this.matrix,t),ys(this,{values:t},!0)}rescale(){if(!this.isValid)return this;const t=Bv(this.normalize().shiftToAll().toObject());return ys(this,{values:t},!0)}shiftTo(...t){if(!this.isValid)return this;if(t.length===0)return this;t=t.map(f=>en.normalizeUnit(f));const n={},r={},l=this.toObject();let d;for(const f of io)if(t.indexOf(f)>=0){d=f;let p=0;for(const E in r)p+=this.matrix[E][f]*r[E],r[E]=0;Ts(l[f])&&(p+=l[f]);const _=Math.trunc(p);n[f]=_,r[f]=(p*1e3-_*1e3)/1e3}else Ts(l[f])&&(r[f]=l[f]);for(const f in r)r[f]!==0&&(n[d]+=f===d?r[f]:r[f]/this.matrix[d][f]);return Zg(this.matrix,n),ys(this,{values:n},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=this.values[n]===0?0:-this.values[n];return ys(this,{values:t},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(t){if(!this.isValid||!t.isValid||!this.loc.equals(t.loc))return!1;function n(r,l){return r===void 0||r===0?l===void 0||l===0:r===l}for(const r of io)if(!n(this.values[r],t.values[r]))return!1;return!0}}const Yo="Invalid Interval";function Hv(e,t){return!e||!e.isValid?Mn.invalid("missing or invalid start"):!t||!t.isValid?Mn.invalid("missing or invalid end"):t<e?Mn.invalid("end before start",`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`):null}class Mn{constructor(t){this.s=t.start,this.e=t.end,this.invalid=t.invalid||null,this.isLuxonInterval=!0}static invalid(t,n=null){if(!t)throw new mr("need to specify a reason the Interval is invalid");const r=t instanceof pi?t:new pi(t,n);if(Rn.throwOnInvalid)throw new ax(r);return new Mn({invalid:r})}static fromDateTimes(t,n){const r=Xl(t),l=Xl(n),d=Hv(r,l);return d??new Mn({start:r,end:l})}static after(t,n){const r=en.fromDurationLike(n),l=Xl(t);return Mn.fromDateTimes(l,l.plus(r))}static before(t,n){const r=en.fromDurationLike(n),l=Xl(t);return Mn.fromDateTimes(l.minus(r),l)}static fromISO(t,n){const[r,l]=(t||"").split("/",2);if(r&&l){let d,f;try{d=vt.fromISO(r,n),f=d.isValid}catch{f=!1}let p,_;try{p=vt.fromISO(l,n),_=p.isValid}catch{_=!1}if(f&&_)return Mn.fromDateTimes(d,p);if(f){const E=en.fromISO(l,n);if(E.isValid)return Mn.after(d,E)}else if(_){const E=en.fromISO(r,n);if(E.isValid)return Mn.before(p,E)}}return Mn.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static isInterval(t){return t&&t.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(t="milliseconds"){return this.isValid?this.toDuration(t).get(t):NaN}count(t="milliseconds",n){if(!this.isValid)return NaN;const r=this.start.startOf(t,n);let l;return n!=null&&n.useLocaleWeeks?l=this.end.reconfigure({locale:r.locale}):l=this.end,l=l.startOf(t,n),Math.floor(l.diff(r,t).get(t))+(l.valueOf()!==this.end.valueOf())}hasSame(t){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,t):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(t){return this.isValid?this.s>t:!1}isBefore(t){return this.isValid?this.e<=t:!1}contains(t){return this.isValid?this.s<=t&&this.e>t:!1}set({start:t,end:n}={}){return this.isValid?Mn.fromDateTimes(t||this.s,n||this.e):this}splitAt(...t){if(!this.isValid)return[];const n=t.map(Xl).filter(f=>this.contains(f)).sort((f,p)=>f.toMillis()-p.toMillis()),r=[];let{s:l}=this,d=0;for(;l<this.e;){const f=n[d]||this.e,p=+f>+this.e?this.e:f;r.push(Mn.fromDateTimes(l,p)),l=p,d+=1}return r}splitBy(t){const n=en.fromDurationLike(t);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s:r}=this,l=1,d;const f=[];for(;r<this.e;){const p=this.start.plus(n.mapUnits(_=>_*l));d=+p>+this.e?this.e:p,f.push(Mn.fromDateTimes(r,d)),r=d,l+=1}return f}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}overlaps(t){return this.e>t.s&&this.s<t.e}abutsStart(t){return this.isValid?+this.e==+t.s:!1}abutsEnd(t){return this.isValid?+t.e==+this.s:!1}engulfs(t){return this.isValid?this.s<=t.s&&this.e>=t.e:!1}equals(t){return!this.isValid||!t.isValid?!1:this.s.equals(t.s)&&this.e.equals(t.e)}intersection(t){if(!this.isValid)return this;const n=this.s>t.s?this.s:t.s,r=this.e<t.e?this.e:t.e;return n>=r?null:Mn.fromDateTimes(n,r)}union(t){if(!this.isValid)return this;const n=this.s<t.s?this.s:t.s,r=this.e>t.e?this.e:t.e;return Mn.fromDateTimes(n,r)}static merge(t){const[n,r]=t.sort((l,d)=>l.s-d.s).reduce(([l,d],f)=>d?d.overlaps(f)||d.abutsStart(f)?[l,d.union(f)]:[l.concat([d]),f]:[l,f],[[],null]);return r&&n.push(r),n}static xor(t){let n=null,r=0;const l=[],d=t.map(_=>[{time:_.s,type:"s"},{time:_.e,type:"e"}]),f=Array.prototype.concat(...d),p=f.sort((_,E)=>_.time-E.time);for(const _ of p)r+=_.type==="s"?1:-1,r===1?n=_.time:(n&&+n!=+_.time&&l.push(Mn.fromDateTimes(n,_.time)),n=null);return Mn.merge(l)}difference(...t){return Mn.xor([this].concat(t)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Yo}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(t=gc,n={}){return this.isValid?_r.create(this.s.loc.clone(n),t).formatInterval(this):Yo}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:Yo}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Yo}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:Yo}toFormat(t,{separator:n=" – "}={}){return this.isValid?`${this.s.toFormat(t)}${n}${this.e.toFormat(t)}`:Yo}toDuration(t,n){return this.isValid?this.e.diff(this.s,t,n):en.invalid(this.invalidReason)}mapEndpoints(t){return Mn.fromDateTimes(t(this.s),t(this.e))}}class tc{static hasDST(t=Rn.defaultZone){const n=vt.now().setZone(t).set({month:12});return!t.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(t){return ts.isValidZone(t)}static normalizeZone(t){return Cs(t,Rn.defaultZone)}static getStartOfWeek({locale:t=null,locObj:n=null}={}){return(n||un.create(t)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:t=null,locObj:n=null}={}){return(n||un.create(t)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:t=null,locObj:n=null}={}){return(n||un.create(t)).getWeekendDays().slice()}static months(t="long",{locale:n=null,numberingSystem:r=null,locObj:l=null,outputCalendar:d="gregory"}={}){return(l||un.create(n,r,d)).months(t)}static monthsFormat(t="long",{locale:n=null,numberingSystem:r=null,locObj:l=null,outputCalendar:d="gregory"}={}){return(l||un.create(n,r,d)).months(t,!0)}static weekdays(t="long",{locale:n=null,numberingSystem:r=null,locObj:l=null}={}){return(l||un.create(n,r,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:n=null,numberingSystem:r=null,locObj:l=null}={}){return(l||un.create(n,r,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return un.create(t).meridiems()}static eras(t="short",{locale:n=null}={}){return un.create(n,null,"gregory").eras(t)}static features(){return{relative:Im(),localeWeek:km()}}}function Jg(e,t){const n=l=>l.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(t)-n(e);return Math.floor(en.fromMillis(r).as("days"))}function Wv(e,t,n){const r=[["years",(_,E)=>E.year-_.year],["quarters",(_,E)=>E.quarter-_.quarter+(E.year-_.year)*4],["months",(_,E)=>E.month-_.month+(E.year-_.year)*12],["weeks",(_,E)=>{const T=Jg(_,E);return(T-T%7)/7}],["days",Jg]],l={},d=e;let f,p;for(const[_,E]of r)n.indexOf(_)>=0&&(f=_,l[_]=E(e,t),p=d.plus(l),p>t?(l[_]--,e=d.plus(l),e>t&&(p=e,l[_]--,e=d.plus(l))):e=p);return[e,l,p,f]}function Kv(e,t,n,r){let[l,d,f,p]=Wv(e,t,n);const _=t-l,E=n.filter(S=>["hours","minutes","seconds","milliseconds"].indexOf(S)>=0);E.length===0&&(f<t&&(f=l.plus({[p]:1})),f!==l&&(d[p]=(d[p]||0)+_/(f-l)));const T=en.fromObject(d,r);return E.length>0?en.fromMillis(_,r).shiftTo(...E).plus(T):T}const zv="missing Intl.DateTimeFormat.formatToParts support";function ln(e,t=n=>n){return{regex:e,deser:([n])=>t(bx(n))}}const Uv=" ",Qm=`[ ${Uv}]`,e_=new RegExp(Qm,"g");function Gv(e){return e.replace(/\./g,"\\.?").replace(e_,Qm)}function Xg(e){return e.replace(/\./g,"").replace(e_," ").toLowerCase()}function gi(e,t){return e===null?null:{regex:RegExp(e.map(Gv).join("|")),deser:([n])=>e.findIndex(r=>Xg(n)===Xg(r))+t}}function Qg(e,t){return{regex:e,deser:([,n,r])=>wc(n,r),groups:t}}function nc(e){return{regex:e,deser:([t])=>t}}function Yv(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function jv(e,t){const n=hi(t),r=hi(t,"{2}"),l=hi(t,"{3}"),d=hi(t,"{4}"),f=hi(t,"{6}"),p=hi(t,"{1,2}"),_=hi(t,"{1,3}"),E=hi(t,"{1,6}"),T=hi(t,"{1,9}"),S=hi(t,"{2,4}"),w=hi(t,"{4,6}"),O=I=>({regex:RegExp(Yv(I.val)),deser:([G])=>G,literal:!0}),v=(I=>{if(e.literal)return O(I);switch(I.val){case"G":return gi(t.eras("short"),0);case"GG":return gi(t.eras("long"),0);case"y":return ln(E);case"yy":return ln(S,od);case"yyyy":return ln(d);case"yyyyy":return ln(w);case"yyyyyy":return ln(f);case"M":return ln(p);case"MM":return ln(r);case"MMM":return gi(t.months("short",!0),1);case"MMMM":return gi(t.months("long",!0),1);case"L":return ln(p);case"LL":return ln(r);case"LLL":return gi(t.months("short",!1),1);case"LLLL":return gi(t.months("long",!1),1);case"d":return ln(p);case"dd":return ln(r);case"o":return ln(_);case"ooo":return ln(l);case"HH":return ln(r);case"H":return ln(p);case"hh":return ln(r);case"h":return ln(p);case"mm":return ln(r);case"m":return ln(p);case"q":return ln(p);case"qq":return ln(r);case"s":return ln(p);case"ss":return ln(r);case"S":return ln(_);case"SSS":return ln(l);case"u":return nc(T);case"uu":return nc(p);case"uuu":return ln(n);case"a":return gi(t.meridiems(),0);case"kkkk":return ln(d);case"kk":return ln(S,od);case"W":return ln(p);case"WW":return ln(r);case"E":case"c":return ln(n);case"EEE":return gi(t.weekdays("short",!1),1);case"EEEE":return gi(t.weekdays("long",!1),1);case"ccc":return gi(t.weekdays("short",!0),1);case"cccc":return gi(t.weekdays("long",!0),1);case"Z":case"ZZ":return Qg(new RegExp(`([+-]${p.source})(?::(${r.source}))?`),2);case"ZZZ":return Qg(new RegExp(`([+-]${p.source})(${r.source})?`),2);case"z":return nc(/[a-z_+-/]{1,256}?/i);case" ":return nc(/[^\S\n\r]/);default:return O(I)}})(e)||{invalidReason:zv};return v.token=e,v}const Vv={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function qv(e,t,n){const{type:r,value:l}=e;if(r==="literal"){const _=/^\s+$/.test(l);return{literal:!_,val:_?" ":l}}const d=t[r];let f=r;r==="hour"&&(t.hour12!=null?f=t.hour12?"hour12":"hour24":t.hourCycle!=null?t.hourCycle==="h11"||t.hourCycle==="h12"?f="hour12":f="hour24":f=n.hour12?"hour12":"hour24");let p=Vv[f];if(typeof p=="object"&&(p=p[d]),p)return{literal:!1,val:p}}function Zv(e){return[`^${e.map(n=>n.regex).reduce((n,r)=>`${n}(${r.source})`,"")}$`,e]}function Jv(e,t,n){const r=e.match(t);if(r){const l={};let d=1;for(const f in n)if(el(n,f)){const p=n[f],_=p.groups?p.groups+1:1;!p.literal&&p.token&&(l[p.token.val[0]]=p.deser(r.slice(d,d+_))),d+=_}return[r,l]}else return[r,{}]}function Xv(e){const t=d=>{switch(d){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let n=null,r;return Lt(e.z)||(n=ts.create(e.z)),Lt(e.Z)||(n||(n=new vr(e.Z)),r=e.Z),Lt(e.q)||(e.M=(e.q-1)*3+1),Lt(e.h)||(e.h<12&&e.a===1?e.h+=12:e.h===12&&e.a===0&&(e.h=0)),e.G===0&&e.y&&(e.y=-e.y),Lt(e.u)||(e.S=$d(e.u)),[Object.keys(e).reduce((d,f)=>{const p=t(f);return p&&(d[p]=e[f]),d},{}),n,r]}let Fu=null;function Qv(){return Fu||(Fu=vt.fromMillis(1555555555555)),Fu}function eS(e,t){if(e.literal)return e;const n=_r.macroTokenToFormatOpts(e.val),r=i_(n,t);return r==null||r.includes(void 0)?e:r}function t_(e,t){return Array.prototype.concat(...e.map(n=>eS(n,t)))}class n_{constructor(t,n){if(this.locale=t,this.format=n,this.tokens=t_(_r.parseFormat(n),t),this.units=this.tokens.map(r=>jv(r,t)),this.disqualifyingUnit=this.units.find(r=>r.invalidReason),!this.disqualifyingUnit){const[r,l]=Zv(this.units);this.regex=RegExp(r,"i"),this.handlers=l}}explainFromTokens(t){if(this.isValid){const[n,r]=Jv(t,this.regex,this.handlers),[l,d,f]=r?Xv(r):[null,null,void 0];if(el(r,"a")&&el(r,"H"))throw new Zo("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:this.tokens,regex:this.regex,rawMatches:n,matches:r,result:l,zone:d,specificOffset:f}}else return{input:t,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function r_(e,t,n){return new n_(e,n).explainFromTokens(t)}function tS(e,t,n){const{result:r,zone:l,specificOffset:d,invalidReason:f}=r_(e,t,n);return[r,l,d,f]}function i_(e,t){if(!e)return null;const r=_r.create(t,e).dtFormatter(Qv()),l=r.formatToParts(),d=r.resolvedOptions();return l.map(f=>qv(f,e,d))}const Bu="Invalid DateTime",nS=864e13;function na(e){return new pi("unsupported zone",`the zone "${e.name}" is not supported`)}function Hu(e){return e.weekData===null&&(e.weekData=pc(e.c)),e.weekData}function Wu(e){return e.localWeekData===null&&(e.localWeekData=pc(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function Qs(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new vt({...n,...t,old:n})}function s_(e,t,n){let r=e-t*60*1e3;const l=n.offset(r);if(t===l)return[r,t];r-=(l-t)*60*1e3;const d=n.offset(r);return l===d?[r,l]:[e-Math.min(l,d)*60*1e3,Math.max(l,d)]}function rc(e,t){e+=t*60*1e3;const n=new Date(e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function lc(e,t,n){return s_(Sc(e),t,n)}function ep(e,t){const n=e.o,r=e.c.year+Math.trunc(t.years),l=e.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,d={...e.c,year:r,month:l,day:Math.min(e.c.day,mc(r,l))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},f=en.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),p=Sc(d);let[_,E]=s_(p,n,e.zone);return f!==0&&(_+=f,E=e.zone.offset(_)),{ts:_,o:E}}function jo(e,t,n,r,l,d){const{setZone:f,zone:p}=n;if(e&&Object.keys(e).length!==0||t){const _=t||p,E=vt.fromObject(e,{...n,zone:_,specificOffset:d});return f?E:E.setZone(p)}else return vt.invalid(new pi("unparsable",`the input "${l}" can't be parsed as ${r}`))}function ic(e,t,n=!0){return e.isValid?_r.create(un.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function Ku(e,t){const n=e.c.year>9999||e.c.year<0;let r="";return n&&e.c.year>=0&&(r+="+"),r+=Kn(e.c.year,n?6:4),t?(r+="-",r+=Kn(e.c.month),r+="-",r+=Kn(e.c.day)):(r+=Kn(e.c.month),r+=Kn(e.c.day)),r}function tp(e,t,n,r,l,d){let f=Kn(e.c.hour);return t?(f+=":",f+=Kn(e.c.minute),(e.c.millisecond!==0||e.c.second!==0||!n)&&(f+=":")):f+=Kn(e.c.minute),(e.c.millisecond!==0||e.c.second!==0||!n)&&(f+=Kn(e.c.second),(e.c.millisecond!==0||!r)&&(f+=".",f+=Kn(e.c.millisecond,3))),l&&(e.isOffsetFixed&&e.offset===0&&!d?f+="Z":e.o<0?(f+="-",f+=Kn(Math.trunc(-e.o/60)),f+=":",f+=Kn(Math.trunc(-e.o%60))):(f+="+",f+=Kn(Math.trunc(e.o/60)),f+=":",f+=Kn(Math.trunc(e.o%60)))),d&&(f+="["+e.zone.ianaName+"]"),f}const o_={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},rS={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},iS={ordinal:1,hour:0,minute:0,second:0,millisecond:0},l_=["year","month","day","hour","minute","second","millisecond"],sS=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],oS=["year","ordinal","hour","minute","second","millisecond"];function lS(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new am(e);return t}function np(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return lS(e)}}function aS(e){return cc[e]||(ac===void 0&&(ac=Rn.now()),cc[e]=e.offset(ac)),cc[e]}function rp(e,t){const n=Cs(t.zone,Rn.defaultZone);if(!n.isValid)return vt.invalid(na(n));const r=un.fromObject(t);let l,d;if(Lt(e.year))l=Rn.now();else{for(const _ of l_)Lt(e[_])&&(e[_]=o_[_]);const f=bm(e)||Lm(e);if(f)return vt.invalid(f);const p=aS(n);[l,d]=lc(e,p,n)}return new vt({ts:l,zone:n,loc:r,o:d})}function ip(e,t,n){const r=Lt(n.round)?!0:n.round,l=(f,p)=>(f=Fd(f,r||n.calendary?0:2,!0),t.loc.clone(n).relFormatter(n).format(f,p)),d=f=>n.calendary?t.hasSame(e,f)?0:t.startOf(f).diff(e.startOf(f),f).get(f):t.diff(e,f).get(f);if(n.unit)return l(d(n.unit),n.unit);for(const f of n.units){const p=d(f);if(Math.abs(p)>=1)return l(p,f)}return l(e>t?-0:0,n.units[n.units.length-1])}function sp(e){let t={},n;return e.length>0&&typeof e[e.length-1]=="object"?(t=e[e.length-1],n=Array.from(e).slice(0,e.length-1)):n=Array.from(e),[t,n]}let ac,cc={};class vt{constructor(t){const n=t.zone||Rn.defaultZone;let r=t.invalid||(Number.isNaN(t.ts)?new pi("invalid input"):null)||(n.isValid?null:na(n));this.ts=Lt(t.ts)?Rn.now():t.ts;let l=null,d=null;if(!r)if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(n))[l,d]=[t.old.c,t.old.o];else{const p=Ts(t.o)&&!t.old?t.o:n.offset(this.ts);l=rc(this.ts,p),r=Number.isNaN(l.year)?new pi("invalid input"):null,l=r?null:l,d=r?null:p}this._zone=n,this.loc=t.loc||un.create(),this.invalid=r,this.weekData=null,this.localWeekData=null,this.c=l,this.o=d,this.isLuxonDateTime=!0}static now(){return new vt({})}static local(){const[t,n]=sp(arguments),[r,l,d,f,p,_,E]=n;return rp({year:r,month:l,day:d,hour:f,minute:p,second:_,millisecond:E},t)}static utc(){const[t,n]=sp(arguments),[r,l,d,f,p,_,E]=n;return t.zone=vr.utcInstance,rp({year:r,month:l,day:d,hour:f,minute:p,second:_,millisecond:E},t)}static fromJSDate(t,n={}){const r=$x(t)?t.valueOf():NaN;if(Number.isNaN(r))return vt.invalid("invalid input");const l=Cs(n.zone,Rn.defaultZone);return l.isValid?new vt({ts:r,zone:l,loc:un.fromObject(n)}):vt.invalid(na(l))}static fromMillis(t,n={}){if(Ts(t))return t<-864e13||t>nS?vt.invalid("Timestamp out of range"):new vt({ts:t,zone:Cs(n.zone,Rn.defaultZone),loc:un.fromObject(n)});throw new mr(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,n={}){if(Ts(t))return new vt({ts:t*1e3,zone:Cs(n.zone,Rn.defaultZone),loc:un.fromObject(n)});throw new mr("fromSeconds requires a numerical input")}static fromObject(t,n={}){t=t||{};const r=Cs(n.zone,Rn.defaultZone);if(!r.isValid)return vt.invalid(na(r));const l=un.fromObject(n),d=_c(t,np),{minDaysInFirstWeek:f,startOfWeek:p}=Ug(d,l),_=Rn.now(),E=Lt(n.specificOffset)?r.offset(_):n.specificOffset,T=!Lt(d.ordinal),S=!Lt(d.year),w=!Lt(d.month)||!Lt(d.day),O=S||w,m=d.weekYear||d.weekNumber;if((O||T)&&m)throw new Zo("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(w&&T)throw new Zo("Can't mix ordinal dates with month/day");const v=m||d.weekday&&!O;let I,G,k=rc(_,E);v?(I=sS,G=rS,k=pc(k,f,p)):T?(I=oS,G=iS,k=$u(k)):(I=l_,G=o_);let P=!1;for(const z of I){const q=d[z];Lt(q)?P?d[z]=G[z]:d[z]=k[z]:P=!0}const H=v?Ix(d,f,p):T?kx(d):bm(d),j=H||Lm(d);if(j)return vt.invalid(j);const re=v?Kg(d,f,p):T?zg(d):d,[te,ce]=lc(re,E,r),V=new vt({ts:te,zone:r,o:ce,loc:l});return d.weekday&&O&&t.weekday!==V.weekday?vt.invalid("mismatched weekday",`you can't specify both a weekday of ${d.weekday} and a date of ${V.toISO()}`):V.isValid?V:vt.invalid(V.invalid)}static fromISO(t,n={}){const[r,l]=wv(t);return jo(r,l,n,"ISO 8601",t)}static fromRFC2822(t,n={}){const[r,l]=Ov(t);return jo(r,l,n,"RFC 2822",t)}static fromHTTP(t,n={}){const[r,l]=Dv(t);return jo(r,l,n,"HTTP",n)}static fromFormat(t,n,r={}){if(Lt(t)||Lt(n))throw new mr("fromFormat requires an input string and a format");const{locale:l=null,numberingSystem:d=null}=r,f=un.fromOpts({locale:l,numberingSystem:d,defaultToEN:!0}),[p,_,E,T]=tS(f,t,n);return T?vt.invalid(T):jo(p,_,r,`format ${n}`,t,E)}static fromString(t,n,r={}){return vt.fromFormat(t,n,r)}static fromSQL(t,n={}){const[r,l]=kv(t);return jo(r,l,n,"SQL",t)}static invalid(t,n=null){if(!t)throw new mr("need to specify a reason the DateTime is invalid");const r=t instanceof pi?t:new pi(t,n);if(Rn.throwOnInvalid)throw new lx(r);return new vt({invalid:r})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}static parseFormatForOpts(t,n={}){const r=i_(t,un.fromObject(n));return r?r.map(l=>l?l.val:null).join(""):null}static expandFormat(t,n={}){return t_(_r.parseFormat(t),un.fromObject(n)).map(l=>l.val).join("")}static resetCache(){ac=void 0,cc={}}get(t){return this[t]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Hu(this).weekYear:NaN}get weekNumber(){return this.isValid?Hu(this).weekNumber:NaN}get weekday(){return this.isValid?Hu(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Wu(this).weekday:NaN}get localWeekNumber(){return this.isValid?Wu(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Wu(this).weekYear:NaN}get ordinal(){return this.isValid?$u(this.c).ordinal:NaN}get monthShort(){return this.isValid?tc.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?tc.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?tc.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?tc.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const t=864e5,n=6e4,r=Sc(this.c),l=this.zone.offset(r-t),d=this.zone.offset(r+t),f=this.zone.offset(r-l*n),p=this.zone.offset(r-d*n);if(f===p)return[this];const _=r-f*n,E=r-p*n,T=rc(_,f),S=rc(E,p);return T.hour===S.hour&&T.minute===S.minute&&T.second===S.second&&T.millisecond===S.millisecond?[Qs(this,{ts:_}),Qs(this,{ts:E})]:[this]}get isInLeapYear(){return da(this.year)}get daysInMonth(){return mc(this.year,this.month)}get daysInYear(){return this.isValid?Jo(this.year):NaN}get weeksInWeekYear(){return this.isValid?ca(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?ca(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(t={}){const{locale:n,numberingSystem:r,calendar:l}=_r.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:n,numberingSystem:r,outputCalendar:l}}toUTC(t=0,n={}){return this.setZone(vr.instance(t),n)}toLocal(){return this.setZone(Rn.defaultZone)}setZone(t,{keepLocalTime:n=!1,keepCalendarTime:r=!1}={}){if(t=Cs(t,Rn.defaultZone),t.equals(this.zone))return this;if(t.isValid){let l=this.ts;if(n||r){const d=t.offset(this.ts),f=this.toObject();[l]=lc(f,d,t)}return Qs(this,{ts:l,zone:t})}else return vt.invalid(na(t))}reconfigure({locale:t,numberingSystem:n,outputCalendar:r}={}){const l=this.loc.clone({locale:t,numberingSystem:n,outputCalendar:r});return Qs(this,{loc:l})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;const n=_c(t,np),{minDaysInFirstWeek:r,startOfWeek:l}=Ug(n,this.loc),d=!Lt(n.weekYear)||!Lt(n.weekNumber)||!Lt(n.weekday),f=!Lt(n.ordinal),p=!Lt(n.year),_=!Lt(n.month)||!Lt(n.day),E=p||_,T=n.weekYear||n.weekNumber;if((E||f)&&T)throw new Zo("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(_&&f)throw new Zo("Can't mix ordinal dates with month/day");let S;d?S=Kg({...pc(this.c,r,l),...n},r,l):Lt(n.ordinal)?(S={...this.toObject(),...n},Lt(n.day)&&(S.day=Math.min(mc(S.year,S.month),S.day))):S=zg({...$u(this.c),...n});const[w,O]=lc(S,this.o,this.zone);return Qs(this,{ts:w,o:O})}plus(t){if(!this.isValid)return this;const n=en.fromDurationLike(t);return Qs(this,ep(this,n))}minus(t){if(!this.isValid)return this;const n=en.fromDurationLike(t).negate();return Qs(this,ep(this,n))}startOf(t,{useLocaleWeeks:n=!1}={}){if(!this.isValid)return this;const r={},l=en.normalizeUnit(t);switch(l){case"years":r.month=1;case"quarters":case"months":r.day=1;case"weeks":case"days":r.hour=0;case"hours":r.minute=0;case"minutes":r.second=0;case"seconds":r.millisecond=0;break}if(l==="weeks")if(n){const d=this.loc.getStartOfWeek(),{weekday:f}=this;f<d&&(r.weekNumber=this.weekNumber-1),r.weekday=d}else r.weekday=1;if(l==="quarters"){const d=Math.ceil(this.month/3);r.month=(d-1)*3+1}return this.set(r)}endOf(t,n){return this.isValid?this.plus({[t]:1}).startOf(t,n).minus(1):this}toFormat(t,n={}){return this.isValid?_r.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,t):Bu}toLocaleString(t=gc,n={}){return this.isValid?_r.create(this.loc.clone(n),t).formatDateTime(this):Bu}toLocaleParts(t={}){return this.isValid?_r.create(this.loc.clone(t),t).formatDateTimeParts(this):[]}toISO({format:t="extended",suppressSeconds:n=!1,suppressMilliseconds:r=!1,includeOffset:l=!0,extendedZone:d=!1}={}){if(!this.isValid)return null;const f=t==="extended";let p=Ku(this,f);return p+="T",p+=tp(this,f,n,r,l,d),p}toISODate({format:t="extended"}={}){return this.isValid?Ku(this,t==="extended"):null}toISOWeekDate(){return ic(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:t=!1,suppressSeconds:n=!1,includeOffset:r=!0,includePrefix:l=!1,extendedZone:d=!1,format:f="extended"}={}){return this.isValid?(l?"T":"")+tp(this,f==="extended",n,t,r,d):null}toRFC2822(){return ic(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return ic(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?Ku(this,!0):null}toSQLTime({includeOffset:t=!0,includeZone:n=!1,includeOffsetSpace:r=!0}={}){let l="HH:mm:ss.SSS";return(n||t)&&(r&&(l+=" "),n?l+="z":t&&(l+="ZZ")),ic(this,l,!0)}toSQL(t={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(t)}`:null}toString(){return this.isValid?this.toISO():Bu}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(t={}){if(!this.isValid)return{};const n={...this.c};return t.includeConfig&&(n.outputCalendar=this.outputCalendar,n.numberingSystem=this.loc.numberingSystem,n.locale=this.loc.locale),n}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(t,n="milliseconds",r={}){if(!this.isValid||!t.isValid)return en.invalid("created by diffing an invalid DateTime");const l={locale:this.locale,numberingSystem:this.numberingSystem,...r},d=Fx(n).map(en.normalizeUnit),f=t.valueOf()>this.valueOf(),p=f?this:t,_=f?t:this,E=Kv(p,_,d,l);return f?E.negate():E}diffNow(t="milliseconds",n={}){return this.diff(vt.now(),t,n)}until(t){return this.isValid?Mn.fromDateTimes(this,t):this}hasSame(t,n,r){if(!this.isValid)return!1;const l=t.valueOf(),d=this.setZone(t.zone,{keepLocalTime:!0});return d.startOf(n,r)<=l&&l<=d.endOf(n,r)}equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)}toRelative(t={}){if(!this.isValid)return null;const n=t.base||vt.fromObject({},{zone:this.zone}),r=t.padding?this<n?-t.padding:t.padding:0;let l=["years","months","days","hours","minutes","seconds"],d=t.unit;return Array.isArray(t.unit)&&(l=t.unit,d=void 0),ip(n,this.plus(r),{...t,numeric:"always",units:l,unit:d})}toRelativeCalendar(t={}){return this.isValid?ip(t.base||vt.fromObject({},{zone:this.zone}),this,{...t,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...t){if(!t.every(vt.isDateTime))throw new mr("min requires all arguments be DateTimes");return Gg(t,n=>n.valueOf(),Math.min)}static max(...t){if(!t.every(vt.isDateTime))throw new mr("max requires all arguments be DateTimes");return Gg(t,n=>n.valueOf(),Math.max)}static fromFormatExplain(t,n,r={}){const{locale:l=null,numberingSystem:d=null}=r,f=un.fromOpts({locale:l,numberingSystem:d,defaultToEN:!0});return r_(f,t,n)}static fromStringExplain(t,n,r={}){return vt.fromFormatExplain(t,n,r)}static buildFormatParser(t,n={}){const{locale:r=null,numberingSystem:l=null}=n,d=un.fromOpts({locale:r,numberingSystem:l,defaultToEN:!0});return new n_(d,t)}static fromFormatParser(t,n,r={}){if(Lt(t)||Lt(n))throw new mr("fromFormatParser requires an input string and a format parser");const{locale:l=null,numberingSystem:d=null}=r,f=un.fromOpts({locale:l,numberingSystem:d,defaultToEN:!0});if(!f.equals(n.locale))throw new mr(`fromFormatParser called with a locale of ${f}, but the format parser was created for ${n.locale}`);const{result:p,zone:_,specificOffset:E,invalidReason:T}=n.explainFromTokens(t);return T?vt.invalid(T):jo(p,_,r,`format ${n.format}`,t,E)}static get DATE_SHORT(){return gc}static get DATE_MED(){return cm}static get DATE_MED_WITH_WEEKDAY(){return ux}static get DATE_FULL(){return um}static get DATE_HUGE(){return dm}static get TIME_SIMPLE(){return fm}static get TIME_WITH_SECONDS(){return hm}static get TIME_WITH_SHORT_OFFSET(){return gm}static get TIME_WITH_LONG_OFFSET(){return pm}static get TIME_24_SIMPLE(){return mm}static get TIME_24_WITH_SECONDS(){return _m}static get TIME_24_WITH_SHORT_OFFSET(){return ym}static get TIME_24_WITH_LONG_OFFSET(){return Nm}static get DATETIME_SHORT(){return Cm}static get DATETIME_SHORT_WITH_SECONDS(){return Em}static get DATETIME_MED(){return Tm}static get DATETIME_MED_WITH_SECONDS(){return xm}static get DATETIME_MED_WITH_WEEKDAY(){return dx}static get DATETIME_FULL(){return vm}static get DATETIME_FULL_WITH_SECONDS(){return Sm}static get DATETIME_HUGE(){return wm}static get DATETIME_HUGE_WITH_SECONDS(){return Om}}function Xl(e){if(vt.isDateTime(e))return e;if(e&&e.valueOf&&Ts(e.valueOf()))return vt.fromJSDate(e);if(e&&typeof e=="object")return vt.fromObject(e);throw new mr(`Unknown datetime argument: ${e}, of type ${typeof e}`)}var Yt=(e=>(e.Monday="MONDAY",e.Tuesday="TUESDAY",e.Wednesday="WEDNESDAY",e.Thursday="THURSDAY",e.Friday="FRIDAY",e.Saturday="SATURDAY",e.Sunday="SUNDAY",e))(Yt||{});function Dc(e){const t={1:Yt.Monday,2:Yt.Tuesday,3:Yt.Wednesday,4:Yt.Thursday,5:Yt.Friday,6:Yt.Saturday,7:Yt.Sunday};if(e.weekday in t)return t[e.weekday];throw new Error(`Invalid DateTime.weekday property: ${e}, ${e.weekday}`)}function oo(e){return{[Yt.Monday]:"Monday",[Yt.Tuesday]:"Tuesday",[Yt.Wednesday]:"Wednesday",[Yt.Thursday]:"Thursday",[Yt.Friday]:"Friday",[Yt.Saturday]:"Saturday",[Yt.Sunday]:"Sunday"}[e]}const ld=[Yt.Monday,Yt.Tuesday,Yt.Wednesday,Yt.Thursday,Yt.Friday,Yt.Saturday,Yt.Sunday],ra={[Yt.Monday]:"monday",[Yt.Tuesday]:"tuesday",[Yt.Wednesday]:"wednesday",[Yt.Thursday]:"thursday",[Yt.Friday]:"friday",[Yt.Saturday]:"saturday",[Yt.Sunday]:"sunday"};class yc{constructor(t,n,r){Ie(this,"end");Ie(this,"start");this.end=t.setZone(r),this.start=t.setZone(r),[n.start,n.end].forEach(E=>{if(E.split(":").length!==2)throw new Error('expected interval start and end data to be in the format "HH:MM"')});const[l,d]=n.start.split(":").map(Number),[f,p]=n.end.split(":").map(Number);let _=0;f<l&&(_=1),this.end=this.end.set({hour:f,minute:p,day:this.end.day+_}),this.start=this.start.set({hour:l,minute:d}),this.end.minute===59&&(this.end=this.end.set({minute:60}))}contains(t){return this.start<=t&&t<this.end}getStartTime(t,n){const r={hour:"numeric",minute:"numeric",...n};return this.start.setLocale(t||"en-US").toLocaleString(r).replace(" "," ")}getEndTime(t,n){const r={hour:"numeric",minute:"numeric",...n};return this.end.setLocale(t||"en-US").toLocaleString(r).replace(" "," ")}timeIsEqualTo(t){const n=this.getStartTime()===t.getStartTime(),r=this.getEndTime()===t.getEndTime();return n&&r}is24h(){const t=this.start.minute===0&&this.start.hour===0,n=this.end.minute===0&&this.end.hour===0,r=this.end.day-this.start.day===1||this.end.day===1;return t&&n&&r}}class a_{constructor(t,n){Ie(this,"holidayHoursByDate");Ie(this,"hours");Ie(this,"timezone");this.holidayHoursByDate=Object.fromEntries((t.holidayHours||[]).map(r=>[r.date,r])),this.hours=t,this.timezone=n}getInterval(t){if(this.isTemporarilyClosedAt(t))return null;const n=t.minus({days:1});for(const r of[n,t]){const l=this.getHours(r);if(l&&!l.isClosed)for(const d of l.openIntervals||[]){const f=new yc(r,d,this.timezone);if(f.contains(t))return f}}return null}getCurrentInterval(){return this.getInterval(vt.now())}getIntervalAfter(t){const n=this.getIntervalsForNDays(8,t),r=(d,f)=>d.start===f.start?0:d.start>f.start?1:-1,l=n.sort(r);for(const[d,f]of l.entries())if(f.contains(t)&&l.length>d+1)return l[d+1];for(const d of l)if(d.start>t)return d;return null}getIntervalsForNDays(t,n){const r=[];for(let l=0;l<t;l++){let d=n;d=d.plus({days:l});const f=this.getHours(d);f!=null&&f.openIntervals&&!f.isClosed&&r.push(...f.openIntervals.map(p=>new yc(d,p,this.timezone)))}return r}getHolidayHours(t){return this.isTemporarilyClosedAt(t)?null:this.holidayHoursByDate[(t.toISO()||"").replace(/T.*/,"")]||null}getNormalHours(t){if(this.isTemporarilyClosedAt(t))return null;const n=oo(Dc(t)).toLowerCase();return this.hours[n]}getHours(t){const n=this.getHolidayHours(t);return!n||n.isRegularHours?this.getNormalHours(t):n}getNextInterval(){return this.getIntervalAfter(vt.now())}isHoliday(t){return!!this.getHolidayHours(t)}isTemporarilyClosedAt(t){if(!this.hours.reopenDate)return!1;const n=this.hours.reopenDate.split("-");if(n.length===3){const[r,l,d]=n,f=vt.fromObject({year:Number(r),month:Number(l),day:Number(d)},{zone:this.timezone});if(t<f)return!0}return!1}isOpenAt(t){return this.isTemporarilyClosedAt(t)?!1:!!this.getInterval(t)}isOpenNow(){return this.isOpenAt(vt.now())}}function cS(e,t){const n=[...e];return t=t%n.length,n.concat(n.splice(0,n.length-t))}function uS(e,t){if(e.length!==t.length)return!1;for(const[n,r]of e.entries())if(!r.timeIsEqualTo(t[n]))return!1;return!0}function ga(e){var t,n;return((n=(t=e==null?void 0:e.currentInterval)==null?void 0:t.is24h)==null?void 0:n.call(t))||!1}function pa(e){return!e.futureInterval}function dS(e){return ga(e)?nt.jsx("span",{className:"HoursStatus-current",children:"Open 24 Hours"}):pa(e)?nt.jsx("span",{className:"HoursStatus-current",children:"Temporarily Closed"}):nt.jsx("span",{className:"HoursStatus-current",children:e.isOpen?"Open Now":"Closed"})}function fS(e){return ga(e)||pa(e)?null:nt.jsx("span",{className:"HoursStatus-separator",children:" • "})}function hS(e){return ga(e)||pa(e)?null:nt.jsx("span",{className:"HoursStatus-future",children:e.isOpen?"Closes at":"Opens at"})}function gS(e){if(ga(e)||pa(e))return null;let t="";if(e.isOpen){const n=e.currentInterval;t+=n?n.getEndTime("en-US",e.timeOptions):""}else{const n=e.futureInterval;t+=n?n.getStartTime("en-US",e.timeOptions):""}return nt.jsxs("span",{className:"HoursStatus-time",children:[" ",t]})}function pS(e){var r,l;if(ga(e)||pa(e))return null;const t={weekday:"long",...e.dayOptions??{}};let n="";if(e.isOpen){const d=e.currentInterval;n+=((r=d==null?void 0:d.end)==null?void 0:r.setLocale("en-US").toLocaleString(t))||""}else{const d=e.futureInterval;n+=((l=d==null?void 0:d.start)==null?void 0:l.setLocale("en-US").toLocaleString(t))||""}return nt.jsxs("span",{className:"HoursStatus-dayOfWeek",children:[" ",n]})}function mS(e,t){const n=e.currentTemplate||dS,r=e.separatorTemplate||fS,l=e.futureTemplate||hS,d=e.timeTemplate||gS,f=e.dayOfWeekTemplate||pS;return nt.jsxs("div",{className:lo("HoursStatus",(t==null?void 0:t.className)||""),children:[n(e),r(e),l(e),d(e),f(e)]})}const _S={minHeight:`${1.5}em`},yS=e=>{const[t,n]=rt.useState(!1),[r,l]=rt.useState(!1);if(rt.useEffect(()=>{l(!0)},[]),!e.hours)return nt.jsx(nt.Fragment,{});const d=e.statusTemplate||mS,f=new a_(e.hours,e.timezone),p=f.isOpenNow(),_=f.getCurrentInterval(),E=f.getNextInterval(),T=(_==null?void 0:_.end)||(E==null?void 0:E.start);if(T&&!t){n(!0);const w=T.toMillis()-vt.now().toMillis();setTimeout(()=>n(!1),w)}const S={isOpen:p,currentInterval:_,futureInterval:E,...e};return nt.jsx(nt.Fragment,{children:r?d(S,e):nt.jsx("div",{style:_S,className:lo("HoursStatus",(e==null?void 0:e.className)||"")})})};function NS(e,t){const n=[];return e.forEach(r=>{const l=n[n.length-1];l?uS(l.intervals,r.intervals)?(l.endDay=r.endDay,l.isToday=l.isToday||r.isToday):n.push({...r}):n.push({...r})}),n.map(r=>{const l=t&&ra[r.startDay]in t?t[ra[r.startDay]]||"":oo(r.startDay),d=t&&ra[r.endDay]in t?t[ra[r.endDay]]||"":oo(r.endDay);return{...r,dayOfWeek:"Collapsed",dayName:r.startDay===r.endDay?`${l}`:`${l} - ${d}`}})}function CS(e,t,n){const r=[],l=e.intervals.length>0&&e.intervals[0].is24h();return e.intervals.length===0?r.push((n==null?void 0:n.isClosed)||"Closed"):l?r.push((n==null?void 0:n.open24Hours)||"Open 24 hours"):e.intervals.forEach(d=>{const f=d.getStartTime((n==null?void 0:n.timeFormatLocale)||"en-US",t),p=d.getEndTime((n==null?void 0:n.timeFormatLocale)||"en-US",t);r.push(`${f} - ${p}`)}),r}function ES(e,t,n){const r=[];for(let l=1;l<=7;l++){const d=vt.fromObject({weekday:l}),f=Dc(d);r.push({startDay:f,endDay:f,dayName:n&&oo(f).toLowerCase()in n?n[oo(f).toLowerCase()]||"":oo(f),intervals:e.filter(p=>p.start.weekday===l),isToday:(t==null?void 0:t.weekday)===l})}return r}const TS=e=>{const[t,n]=rt.useState(!1);return rt.useEffect(()=>{n(!0)},[]),e.hours?nt.jsx(nt.Fragment,{children:t?nt.jsx(xS,{...e}):nt.jsx(vS,{...e})}):nt.jsx(nt.Fragment,{})},xS=e=>{const t=new a_(e.hours,Intl.DateTimeFormat().resolvedOptions().timeZone),n=vt.now(),r=t.getIntervalsForNDays(7,n),l=ES(r,n,e.dayOfWeekNames);return nt.jsx(ad,{...e,hoursData:l,isClient:!0})},vS=e=>{var f;const{hours:t,dayOfWeekNames:n,intervalTranslations:r}=e,l=ld.map(p=>{var E,T;const _=ra[p];return{dayName:(n==null?void 0:n[_])||oo(p),startDay:p,endDay:p,isToday:!1,intervals:((T=(E=t[_])==null?void 0:E.openIntervals)==null?void 0:T.map(S=>new yc(vt.now(),S,"UTC")))??[]}}),d=(f=t.holidayHours)==null?void 0:f.map(p=>{var T,S;const _=vt.fromFormat(p.date,"yyyy-MM-dd"),E=Dc(_);return{dayName:_.setLocale((r==null?void 0:r.timeFormatLocale)||"en-US").toLocaleString(),isToday:!1,startDay:E,endDay:E,intervals:(p.isRegularHours?(T=p.openIntervals)==null?void 0:T.map(w=>new yc(_,w,"UTC")):(S=l.find(w=>w.startDay===E))==null?void 0:S.intervals)??[]}});return nt.jsxs(nt.Fragment,{children:[nt.jsx(ad,{...e,hoursData:l,isClient:!1}),d&&d.length>0&&nt.jsx(ad,{...e,hoursData:d,isClient:!1,isHolidayHours:!0}),t.reopenDate&&nt.jsxs("div",{className:"HoursTable-row",children:[nt.jsx("span",{className:"HoursTable-day",children:(r==null?void 0:r.reopenDate)||"Reopen Date"}),nt.jsx("span",{className:"HoursTable-intervals",children:vt.fromFormat(t.reopenDate,"yyyy-MM-dd").setLocale((r==null?void 0:r.timeFormatLocale)||"en-US").toLocaleString()})]})]})},ad=e=>{const{intervalStringsBuilderFn:t,className:n,timeOptions:r,intervalTranslations:l,dayOfWeekNames:d,startOfWeek:f,isClient:p,isHolidayHours:_}=e;let E=e.hoursData;function T(O){return O?{today:Dc(vt.now()),monday:Yt.Monday,tuesday:Yt.Tuesday,wednesday:Yt.Wednesday,thursday:Yt.Thursday,friday:Yt.Friday,saturday:Yt.Saturday,sunday:Yt.Sunday}[O]:Yt.Sunday}const S=ld.indexOf(T(p||f!=="today"?f:"sunday")),w=cS(ld,7-S);return _||(E.sort((O,m)=>w.indexOf(O.startDay)-w.indexOf(m.startDay)),e.collapseDays&&(E=NS(E,d))),nt.jsx("div",{className:lo("HoursTable",n),children:E.map(O=>{const v=(t||CS)(O,r,l);return nt.jsxs("div",{className:lo("HoursTable-row",{"is-today":O.isToday}),children:[nt.jsx("span",{className:"HoursTable-day",children:O.dayName}),nt.jsx("span",{className:"HoursTable-intervals",children:v.map((I,G)=>nt.jsx("span",{className:"HoursTable-interval",children:I},G))})]},O.dayName)})})},SS=e=>`<script type="application/ld+json">
109
+ `}),n}const QT=(e,t)=>e(t,"i",ns(e,t)),ex=(e,t)=>e(t,"b",ns(e,t)),tx=(e,t)=>e(t,"u",ns(e,t)),nx=(e,t)=>e(t,"s",ns(e,t)),rx=(e,t)=>e(t,"sub",ns(e,t)),ix=(e,t)=>e(t,"sup",ns(e,t)),sx={emphasis:QT,strong:ex,underline:tx,strikethrough:nx,subscript:rx,superscript:ix},ox=e=>{const[t,n]=rt.useState();let r;return rt.useEffect(()=>{(async()=>{if(!r)try{r=(await Promise.resolve().then(()=>require("./index-C7vTnykM.cjs"))).default}catch{throw new Error("Failed to import React Markdown, cannot properly render LegacyRichText.")}const d=r({children:e.markdown,remarkPlugins:[uT],remarkRehypeOptions:{handlers:sx}});n(d)})()},[e.markdown]),t||null};class uo extends Error{}class lx extends uo{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}}class ax extends uo{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}}class cx extends uo{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}}class Zo extends uo{}class am extends uo{constructor(t){super(`Invalid unit ${t}`)}}class mr extends uo{}class _s extends uo{constructor(){super("Zone is an abstract class")}}const at="numeric",mi="short",Yr="long",gc={year:at,month:at,day:at},cm={year:at,month:mi,day:at},ux={year:at,month:mi,day:at,weekday:mi},um={year:at,month:Yr,day:at},dm={year:at,month:Yr,day:at,weekday:Yr},fm={hour:at,minute:at},hm={hour:at,minute:at,second:at},gm={hour:at,minute:at,second:at,timeZoneName:mi},pm={hour:at,minute:at,second:at,timeZoneName:Yr},mm={hour:at,minute:at,hourCycle:"h23"},_m={hour:at,minute:at,second:at,hourCycle:"h23"},ym={hour:at,minute:at,second:at,hourCycle:"h23",timeZoneName:mi},Nm={hour:at,minute:at,second:at,hourCycle:"h23",timeZoneName:Yr},Cm={year:at,month:at,day:at,hour:at,minute:at},Em={year:at,month:at,day:at,hour:at,minute:at,second:at},Tm={year:at,month:mi,day:at,hour:at,minute:at},xm={year:at,month:mi,day:at,hour:at,minute:at,second:at},dx={year:at,month:mi,day:at,weekday:mi,hour:at,minute:at},vm={year:at,month:Yr,day:at,hour:at,minute:at,timeZoneName:mi},Sm={year:at,month:Yr,day:at,hour:at,minute:at,second:at,timeZoneName:mi},wm={year:at,month:Yr,day:at,weekday:Yr,hour:at,minute:at,timeZoneName:Yr},Om={year:at,month:Yr,day:at,weekday:Yr,hour:at,minute:at,second:at,timeZoneName:Yr};class ua{get type(){throw new _s}get name(){throw new _s}get ianaName(){return this.name}get isUniversal(){throw new _s}offsetName(t,n){throw new _s}formatOffset(t,n){throw new _s}offset(t){throw new _s}equals(t){throw new _s}get isValid(){throw new _s}}let ku=null;class xc extends ua{static get instance(){return ku===null&&(ku=new xc),ku}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:n,locale:r}){return Pm(t,n,r)}formatOffset(t,n){return oa(this.offset(t),n)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return t.type==="system"}get isValid(){return!0}}let oc={};function fx(e){return oc[e]||(oc[e]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),oc[e]}const hx={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function gx(e,t){const n=e.format(t).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,l,d,f,p,_,E,T]=r;return[f,l,d,p,_,E,T]}function px(e,t){const n=e.formatToParts(t),r=[];for(let l=0;l<n.length;l++){const{type:d,value:f}=n[l],p=hx[d];d==="era"?r[p]=f:Lt(p)||(r[p]=parseInt(f,10))}return r}let Qa={};class ts extends ua{static create(t){return Qa[t]||(Qa[t]=new ts(t)),Qa[t]}static resetCache(){Qa={},oc={}}static isValidSpecifier(t){return this.isValidZone(t)}static isValidZone(t){if(!t)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:t}).format(),!0}catch{return!1}}constructor(t){super(),this.zoneName=t,this.valid=ts.isValidZone(t)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(t,{format:n,locale:r}){return Pm(t,n,r,this.name)}formatOffset(t,n){return oa(this.offset(t),n)}offset(t){const n=new Date(t);if(isNaN(n))return NaN;const r=fx(this.name);let[l,d,f,p,_,E,T]=r.formatToParts?px(r,n):gx(r,n);p==="BC"&&(l=-Math.abs(l)+1);const w=Sc({year:l,month:d,day:f,hour:_===24?0:_,minute:E,second:T,millisecond:0});let O=+n;const m=O%1e3;return O-=m>=0?m:1e3+m,(w-O)/(60*1e3)}equals(t){return t.type==="iana"&&t.name===this.name}get isValid(){return this.valid}}let Rg={};function mx(e,t={}){const n=JSON.stringify([e,t]);let r=Rg[n];return r||(r=new Intl.ListFormat(e,t),Rg[n]=r),r}let td={};function nd(e,t={}){const n=JSON.stringify([e,t]);let r=td[n];return r||(r=new Intl.DateTimeFormat(e,t),td[n]=r),r}let rd={};function _x(e,t={}){const n=JSON.stringify([e,t]);let r=rd[n];return r||(r=new Intl.NumberFormat(e,t),rd[n]=r),r}let id={};function yx(e,t={}){const{base:n,...r}=t,l=JSON.stringify([e,r]);let d=id[l];return d||(d=new Intl.RelativeTimeFormat(e,t),id[l]=d),d}let ta=null;function Nx(){return ta||(ta=new Intl.DateTimeFormat().resolvedOptions().locale,ta)}let bg={};function Cx(e){let t=bg[e];if(!t){const n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,bg[e]=t}return t}function Ex(e){const t=e.indexOf("-x-");t!==-1&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(n===-1)return[e];{let r,l;try{r=nd(e).resolvedOptions(),l=e}catch{const _=e.substring(0,n);r=nd(_).resolvedOptions(),l=_}const{numberingSystem:d,calendar:f}=r;return[l,d,f]}}function Tx(e,t,n){return(n||t)&&(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`)),e}function xx(e){const t=[];for(let n=1;n<=12;n++){const r=vt.utc(2009,n,1);t.push(e(r))}return t}function vx(e){const t=[];for(let n=1;n<=7;n++){const r=vt.utc(2016,11,13+n);t.push(e(r))}return t}function ec(e,t,n,r){const l=e.listingMode();return l==="error"?null:l==="en"?n(t):r(t)}function Sx(e){return e.numberingSystem&&e.numberingSystem!=="latn"?!1:e.numberingSystem==="latn"||!e.locale||e.locale.startsWith("en")||new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem==="latn"}class wx{constructor(t,n,r){this.padTo=r.padTo||0,this.floor=r.floor||!1;const{padTo:l,floor:d,...f}=r;if(!n||Object.keys(f).length>0){const p={useGrouping:!1,...r};r.padTo>0&&(p.minimumIntegerDigits=r.padTo),this.inf=_x(t,p)}}format(t){if(this.inf){const n=this.floor?Math.floor(t):t;return this.inf.format(n)}else{const n=this.floor?Math.floor(t):Fd(t,3);return Kn(n,this.padTo)}}}class Ox{constructor(t,n,r){this.opts=r,this.originalZone=void 0;let l;if(this.opts.timeZone)this.dt=t;else if(t.zone.type==="fixed"){const f=-1*(t.offset/60),p=f>=0?`Etc/GMT+${f}`:`Etc/GMT${f}`;t.offset!==0&&ts.create(p).valid?(l=p,this.dt=t):(l="UTC",this.dt=t.offset===0?t:t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone)}else t.zone.type==="system"?this.dt=t:t.zone.type==="iana"?(this.dt=t,l=t.zone.name):(l="UTC",this.dt=t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone);const d={...this.opts};d.timeZone=d.timeZone||l,this.dtf=nd(n,d)}format(){return this.originalZone?this.formatToParts().map(({value:t})=>t).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const t=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?t.map(n=>{if(n.type==="timeZoneName"){const r=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...n,value:r}}else return n}):t}resolvedOptions(){return this.dtf.resolvedOptions()}}class Dx{constructor(t,n,r){this.opts={style:"long",...r},!n&&Im()&&(this.rtf=yx(t,r))}format(t,n){return this.rtf?this.rtf.format(t,n):Jx(n,t,this.opts.numeric,this.opts.style!=="long")}formatToParts(t,n){return this.rtf?this.rtf.formatToParts(t,n):[]}}const Ax={firstDay:1,minimalDays:4,weekend:[6,7]};class un{static fromOpts(t){return un.create(t.locale,t.numberingSystem,t.outputCalendar,t.weekSettings,t.defaultToEN)}static create(t,n,r,l,d=!1){const f=t||Rn.defaultLocale,p=f||(d?"en-US":Nx()),_=n||Rn.defaultNumberingSystem,E=r||Rn.defaultOutputCalendar,T=sd(l)||Rn.defaultWeekSettings;return new un(p,_,E,T,f)}static resetCache(){ta=null,td={},rd={},id={}}static fromObject({locale:t,numberingSystem:n,outputCalendar:r,weekSettings:l}={}){return un.create(t,n,r,l)}constructor(t,n,r,l,d){const[f,p,_]=Ex(t);this.locale=f,this.numberingSystem=n||p||null,this.outputCalendar=r||_||null,this.weekSettings=l,this.intl=Tx(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=d,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=Sx(this)),this.fastNumbersCached}listingMode(){const t=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return t&&n?"en":"intl"}clone(t){return!t||Object.getOwnPropertyNames(t).length===0?this:un.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,sd(t.weekSettings)||this.weekSettings,t.defaultToEN||!1)}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,n=!1){return ec(this,t,Bm,()=>{const r=n?{month:t,day:"numeric"}:{month:t},l=n?"format":"standalone";return this.monthsCache[l][t]||(this.monthsCache[l][t]=xx(d=>this.extract(d,r,"month"))),this.monthsCache[l][t]})}weekdays(t,n=!1){return ec(this,t,Km,()=>{const r=n?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},l=n?"format":"standalone";return this.weekdaysCache[l][t]||(this.weekdaysCache[l][t]=vx(d=>this.extract(d,r,"weekday"))),this.weekdaysCache[l][t]})}meridiems(){return ec(this,void 0,()=>zm,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[vt.utc(2016,11,13,9),vt.utc(2016,11,13,19)].map(n=>this.extract(n,t,"dayperiod"))}return this.meridiemCache})}eras(t){return ec(this,t,Um,()=>{const n={era:t};return this.eraCache[t]||(this.eraCache[t]=[vt.utc(-40,1,1),vt.utc(2017,1,1)].map(r=>this.extract(r,n,"era"))),this.eraCache[t]})}extract(t,n,r){const l=this.dtFormatter(t,n),d=l.formatToParts(),f=d.find(p=>p.type.toLowerCase()===r);return f?f.value:null}numberFormatter(t={}){return new wx(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,n={}){return new Ox(t,this.intl,n)}relFormatter(t={}){return new Dx(this.intl,this.isEnglish(),t)}listFormatter(t={}){return mx(this.intl,t)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:km()?Cx(this.locale):Ax}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let Pu=null;class vr extends ua{static get utcInstance(){return Pu===null&&(Pu=new vr(0)),Pu}static instance(t){return t===0?vr.utcInstance:new vr(t)}static parseSpecifier(t){if(t){const n=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new vr(wc(n[1],n[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${oa(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${oa(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,n){return oa(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return t.type==="fixed"&&t.fixed===this.fixed}get isValid(){return!0}}class Mx extends ua{constructor(t){super(),this.zoneName=t}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function Cs(e,t){if(Lt(e)||e===null)return t;if(e instanceof ua)return e;if(Px(e)){const n=e.toLowerCase();return n==="default"?t:n==="local"||n==="system"?xc.instance:n==="utc"||n==="gmt"?vr.utcInstance:vr.parseSpecifier(n)||ts.create(e)}else return Ts(e)?vr.instance(e):typeof e=="object"&&"offset"in e&&typeof e.offset=="function"?e:new Mx(e)}const Id={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},Lg={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},Rx=Id.hanidec.replace(/[\[|\]]/g,"").split("");function bx(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);if(e[n].search(Id.hanidec)!==-1)t+=Rx.indexOf(e[n]);else for(const l in Lg){const[d,f]=Lg[l];r>=d&&r<=f&&(t+=r-d)}}return parseInt(t,10)}else return t}let qo={};function Lx(){qo={}}function hi({numberingSystem:e},t=""){const n=e||"latn";return qo[n]||(qo[n]={}),qo[n][t]||(qo[n][t]=new RegExp(`${Id[n]}${t}`)),qo[n][t]}let Ig=()=>Date.now(),kg="system",Pg=null,$g=null,Fg=null,Bg=60,Hg,Wg=null;class Rn{static get now(){return Ig}static set now(t){Ig=t}static set defaultZone(t){kg=t}static get defaultZone(){return Cs(kg,xc.instance)}static get defaultLocale(){return Pg}static set defaultLocale(t){Pg=t}static get defaultNumberingSystem(){return $g}static set defaultNumberingSystem(t){$g=t}static get defaultOutputCalendar(){return Fg}static set defaultOutputCalendar(t){Fg=t}static get defaultWeekSettings(){return Wg}static set defaultWeekSettings(t){Wg=sd(t)}static get twoDigitCutoffYear(){return Bg}static set twoDigitCutoffYear(t){Bg=t%100}static get throwOnInvalid(){return Hg}static set throwOnInvalid(t){Hg=t}static resetCaches(){un.resetCache(),ts.resetCache(),vt.resetCache(),Lx()}}class pi{constructor(t,n){this.reason=t,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const Dm=[0,31,59,90,120,151,181,212,243,273,304,334],Am=[0,31,60,91,121,152,182,213,244,274,305,335];function ei(e,t){return new pi("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function kd(e,t,n){const r=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const l=r.getUTCDay();return l===0?7:l}function Mm(e,t,n){return n+(da(e)?Am:Dm)[t-1]}function Rm(e,t){const n=da(e)?Am:Dm,r=n.findIndex(d=>d<t),l=t-n[r];return{month:r+1,day:l}}function Pd(e,t){return(e-t+7)%7+1}function pc(e,t=4,n=1){const{year:r,month:l,day:d}=e,f=Mm(r,l,d),p=Pd(kd(r,l,d),n);let _=Math.floor((f-p+14-t)/7),E;return _<1?(E=r-1,_=ca(E,t,n)):_>ca(r,t,n)?(E=r+1,_=1):E=r,{weekYear:E,weekNumber:_,weekday:p,...Oc(e)}}function Kg(e,t=4,n=1){const{weekYear:r,weekNumber:l,weekday:d}=e,f=Pd(kd(r,1,t),n),p=Jo(r);let _=l*7+d-f-7+t,E;_<1?(E=r-1,_+=Jo(E)):_>p?(E=r+1,_-=Jo(r)):E=r;const{month:T,day:S}=Rm(E,_);return{year:E,month:T,day:S,...Oc(e)}}function $u(e){const{year:t,month:n,day:r}=e,l=Mm(t,n,r);return{year:t,ordinal:l,...Oc(e)}}function zg(e){const{year:t,ordinal:n}=e,{month:r,day:l}=Rm(t,n);return{year:t,month:r,day:l,...Oc(e)}}function Ug(e,t){if(!Lt(e.localWeekday)||!Lt(e.localWeekNumber)||!Lt(e.localWeekYear)){if(!Lt(e.weekday)||!Lt(e.weekNumber)||!Lt(e.weekYear))throw new Zo("Cannot mix locale-based week fields with ISO-based week fields");return Lt(e.localWeekday)||(e.weekday=e.localWeekday),Lt(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),Lt(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function Ix(e,t=4,n=1){const r=vc(e.weekYear),l=ti(e.weekNumber,1,ca(e.weekYear,t,n)),d=ti(e.weekday,1,7);return r?l?d?!1:ei("weekday",e.weekday):ei("week",e.weekNumber):ei("weekYear",e.weekYear)}function kx(e){const t=vc(e.year),n=ti(e.ordinal,1,Jo(e.year));return t?n?!1:ei("ordinal",e.ordinal):ei("year",e.year)}function bm(e){const t=vc(e.year),n=ti(e.month,1,12),r=ti(e.day,1,mc(e.year,e.month));return t?n?r?!1:ei("day",e.day):ei("month",e.month):ei("year",e.year)}function Lm(e){const{hour:t,minute:n,second:r,millisecond:l}=e,d=ti(t,0,23)||t===24&&n===0&&r===0&&l===0,f=ti(n,0,59),p=ti(r,0,59),_=ti(l,0,999);return d?f?p?_?!1:ei("millisecond",l):ei("second",r):ei("minute",n):ei("hour",t)}function Lt(e){return typeof e>"u"}function Ts(e){return typeof e=="number"}function vc(e){return typeof e=="number"&&e%1===0}function Px(e){return typeof e=="string"}function $x(e){return Object.prototype.toString.call(e)==="[object Date]"}function Im(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function km(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function Fx(e){return Array.isArray(e)?e:[e]}function Gg(e,t,n){if(e.length!==0)return e.reduce((r,l)=>{const d=[t(l),l];return r&&n(r[0],d[0])===r[0]?r:d},null)[1]}function Bx(e,t){return t.reduce((n,r)=>(n[r]=e[r],n),{})}function el(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function sd(e){if(e==null)return null;if(typeof e!="object")throw new mr("Week settings must be an object");if(!ti(e.firstDay,1,7)||!ti(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(t=>!ti(t,1,7)))throw new mr("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function ti(e,t,n){return vc(e)&&e>=t&&e<=n}function Hx(e,t){return e-t*Math.floor(e/t)}function Kn(e,t=2){const n=e<0;let r;return n?r="-"+(""+-e).padStart(t,"0"):r=(""+e).padStart(t,"0"),r}function Ns(e){if(!(Lt(e)||e===null||e===""))return parseInt(e,10)}function Xs(e){if(!(Lt(e)||e===null||e===""))return parseFloat(e)}function $d(e){if(!(Lt(e)||e===null||e==="")){const t=parseFloat("0."+e)*1e3;return Math.floor(t)}}function Fd(e,t,n=!1){const r=10**t;return(n?Math.trunc:Math.round)(e*r)/r}function da(e){return e%4===0&&(e%100!==0||e%400===0)}function Jo(e){return da(e)?366:365}function mc(e,t){const n=Hx(t-1,12)+1,r=e+(t-n)/12;return n===2?da(r)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function Sc(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function Yg(e,t,n){return-Pd(kd(e,1,t),n)+t-1}function ca(e,t=4,n=1){const r=Yg(e,t,n),l=Yg(e+1,t,n);return(Jo(e)-r+l)/7}function od(e){return e>99?e:e>Rn.twoDigitCutoffYear?1900+e:2e3+e}function Pm(e,t,n,r=null){const l=new Date(e),d={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(d.timeZone=r);const f={timeZoneName:t,...d},p=new Intl.DateTimeFormat(n,f).formatToParts(l).find(_=>_.type.toLowerCase()==="timezonename");return p?p.value:null}function wc(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const r=parseInt(t,10)||0,l=n<0||Object.is(n,-0)?-r:r;return n*60+l}function $m(e){const t=Number(e);if(typeof e=="boolean"||e===""||Number.isNaN(t))throw new mr(`Invalid unit value ${e}`);return t}function _c(e,t){const n={};for(const r in e)if(el(e,r)){const l=e[r];if(l==null)continue;n[t(r)]=$m(l)}return n}function oa(e,t){const n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),l=e>=0?"+":"-";switch(t){case"short":return`${l}${Kn(n,2)}:${Kn(r,2)}`;case"narrow":return`${l}${n}${r>0?`:${r}`:""}`;case"techie":return`${l}${Kn(n,2)}${Kn(r,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function Oc(e){return Bx(e,["hour","minute","second","millisecond"])}const Wx=["January","February","March","April","May","June","July","August","September","October","November","December"],Fm=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Kx=["J","F","M","A","M","J","J","A","S","O","N","D"];function Bm(e){switch(e){case"narrow":return[...Kx];case"short":return[...Fm];case"long":return[...Wx];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const Hm=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Wm=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],zx=["M","T","W","T","F","S","S"];function Km(e){switch(e){case"narrow":return[...zx];case"short":return[...Wm];case"long":return[...Hm];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const zm=["AM","PM"],Ux=["Before Christ","Anno Domini"],Gx=["BC","AD"],Yx=["B","A"];function Um(e){switch(e){case"narrow":return[...Yx];case"short":return[...Gx];case"long":return[...Ux];default:return null}}function jx(e){return zm[e.hour<12?0:1]}function Vx(e,t){return Km(t)[e.weekday-1]}function qx(e,t){return Bm(t)[e.month-1]}function Zx(e,t){return Um(t)[e.year<0?0:1]}function Jx(e,t,n="always",r=!1){const l={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},d=["hours","minutes","seconds"].indexOf(e)===-1;if(n==="auto"&&d){const S=e==="days";switch(t){case 1:return S?"tomorrow":`next ${l[e][0]}`;case-1:return S?"yesterday":`last ${l[e][0]}`;case 0:return S?"today":`this ${l[e][0]}`}}const f=Object.is(t,-0)||t<0,p=Math.abs(t),_=p===1,E=l[e],T=r?_?E[1]:E[2]||E[1]:_?l[e][0]:e;return f?`${p} ${T} ago`:`in ${p} ${T}`}function jg(e,t){let n="";for(const r of e)r.literal?n+=r.val:n+=t(r.val);return n}const Xx={D:gc,DD:cm,DDD:um,DDDD:dm,t:fm,tt:hm,ttt:gm,tttt:pm,T:mm,TT:_m,TTT:ym,TTTT:Nm,f:Cm,ff:Tm,fff:vm,ffff:wm,F:Em,FF:xm,FFF:Sm,FFFF:Om};class _r{static create(t,n={}){return new _r(t,n)}static parseFormat(t){let n=null,r="",l=!1;const d=[];for(let f=0;f<t.length;f++){const p=t.charAt(f);p==="'"?(r.length>0&&d.push({literal:l||/^\s+$/.test(r),val:r}),n=null,r="",l=!l):l||p===n?r+=p:(r.length>0&&d.push({literal:/^\s+$/.test(r),val:r}),r=p,n=p)}return r.length>0&&d.push({literal:l||/^\s+$/.test(r),val:r}),d}static macroTokenToFormatOpts(t){return Xx[t]}constructor(t,n){this.opts=n,this.loc=t,this.systemLoc=null}formatWithSystemDefault(t,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(t,{...this.opts,...n}).format()}dtFormatter(t,n={}){return this.loc.dtFormatter(t,{...this.opts,...n})}formatDateTime(t,n){return this.dtFormatter(t,n).format()}formatDateTimeParts(t,n){return this.dtFormatter(t,n).formatToParts()}formatInterval(t,n){return this.dtFormatter(t.start,n).dtf.formatRange(t.start.toJSDate(),t.end.toJSDate())}resolvedOptions(t,n){return this.dtFormatter(t,n).resolvedOptions()}num(t,n=0){if(this.opts.forceSimple)return Kn(t,n);const r={...this.opts};return n>0&&(r.padTo=n),this.loc.numberFormatter(r).format(t)}formatDateTimeFromString(t,n){const r=this.loc.listingMode()==="en",l=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",d=(O,m)=>this.loc.extract(t,O,m),f=O=>t.isOffsetFixed&&t.offset===0&&O.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,O.format):"",p=()=>r?jx(t):d({hour:"numeric",hourCycle:"h12"},"dayperiod"),_=(O,m)=>r?qx(t,O):d(m?{month:O}:{month:O,day:"numeric"},"month"),E=(O,m)=>r?Vx(t,O):d(m?{weekday:O}:{weekday:O,month:"long",day:"numeric"},"weekday"),T=O=>{const m=_r.macroTokenToFormatOpts(O);return m?this.formatWithSystemDefault(t,m):O},S=O=>r?Zx(t,O):d({era:O},"era"),w=O=>{switch(O){case"S":return this.num(t.millisecond);case"u":case"SSS":return this.num(t.millisecond,3);case"s":return this.num(t.second);case"ss":return this.num(t.second,2);case"uu":return this.num(Math.floor(t.millisecond/10),2);case"uuu":return this.num(Math.floor(t.millisecond/100));case"m":return this.num(t.minute);case"mm":return this.num(t.minute,2);case"h":return this.num(t.hour%12===0?12:t.hour%12);case"hh":return this.num(t.hour%12===0?12:t.hour%12,2);case"H":return this.num(t.hour);case"HH":return this.num(t.hour,2);case"Z":return f({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return f({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return f({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:this.loc.locale});case"z":return t.zoneName;case"a":return p();case"d":return l?d({day:"numeric"},"day"):this.num(t.day);case"dd":return l?d({day:"2-digit"},"day"):this.num(t.day,2);case"c":return this.num(t.weekday);case"ccc":return E("short",!0);case"cccc":return E("long",!0);case"ccccc":return E("narrow",!0);case"E":return this.num(t.weekday);case"EEE":return E("short",!1);case"EEEE":return E("long",!1);case"EEEEE":return E("narrow",!1);case"L":return l?d({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return l?d({month:"2-digit",day:"numeric"},"month"):this.num(t.month,2);case"LLL":return _("short",!0);case"LLLL":return _("long",!0);case"LLLLL":return _("narrow",!0);case"M":return l?d({month:"numeric"},"month"):this.num(t.month);case"MM":return l?d({month:"2-digit"},"month"):this.num(t.month,2);case"MMM":return _("short",!1);case"MMMM":return _("long",!1);case"MMMMM":return _("narrow",!1);case"y":return l?d({year:"numeric"},"year"):this.num(t.year);case"yy":return l?d({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return l?d({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return l?d({year:"numeric"},"year"):this.num(t.year,6);case"G":return S("short");case"GG":return S("long");case"GGGGG":return S("narrow");case"kk":return this.num(t.weekYear.toString().slice(-2),2);case"kkkk":return this.num(t.weekYear,4);case"W":return this.num(t.weekNumber);case"WW":return this.num(t.weekNumber,2);case"n":return this.num(t.localWeekNumber);case"nn":return this.num(t.localWeekNumber,2);case"ii":return this.num(t.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(t.localWeekYear,4);case"o":return this.num(t.ordinal);case"ooo":return this.num(t.ordinal,3);case"q":return this.num(t.quarter);case"qq":return this.num(t.quarter,2);case"X":return this.num(Math.floor(t.ts/1e3));case"x":return this.num(t.ts);default:return T(O)}};return jg(_r.parseFormat(n),w)}formatDurationFromString(t,n){const r=_=>{switch(_[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},l=_=>E=>{const T=r(E);return T?this.num(_.get(T),E.length):E},d=_r.parseFormat(n),f=d.reduce((_,{literal:E,val:T})=>E?_:_.concat(T),[]),p=t.shiftTo(...f.map(r).filter(_=>_));return jg(d,l(p))}}const Gm=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function ll(...e){const t=e.reduce((n,r)=>n+r.source,"");return RegExp(`^${t}$`)}function al(...e){return t=>e.reduce(([n,r,l],d)=>{const[f,p,_]=d(t,l);return[{...n,...f},p||r,_]},[{},null,1]).slice(0,2)}function cl(e,...t){if(e==null)return[null,null];for(const[n,r]of t){const l=n.exec(e);if(l)return r(l)}return[null,null]}function Ym(...e){return(t,n)=>{const r={};let l;for(l=0;l<e.length;l++)r[e[l]]=Ns(t[n+l]);return[r,null,n+l]}}const jm=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,Qx=`(?:${jm.source}?(?:\\[(${Gm.source})\\])?)?`,Bd=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Vm=RegExp(`${Bd.source}${Qx}`),Hd=RegExp(`(?:T${Vm.source})?`),ev=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,tv=/(\d{4})-?W(\d\d)(?:-?(\d))?/,nv=/(\d{4})-?(\d{3})/,rv=Ym("weekYear","weekNumber","weekDay"),iv=Ym("year","ordinal"),sv=/(\d{4})-(\d\d)-(\d\d)/,qm=RegExp(`${Bd.source} ?(?:${jm.source}|(${Gm.source}))?`),ov=RegExp(`(?: ${qm.source})?`);function Xo(e,t,n){const r=e[t];return Lt(r)?n:Ns(r)}function lv(e,t){return[{year:Xo(e,t),month:Xo(e,t+1,1),day:Xo(e,t+2,1)},null,t+3]}function ul(e,t){return[{hours:Xo(e,t,0),minutes:Xo(e,t+1,0),seconds:Xo(e,t+2,0),milliseconds:$d(e[t+3])},null,t+4]}function fa(e,t){const n=!e[t]&&!e[t+1],r=wc(e[t+1],e[t+2]),l=n?null:vr.instance(r);return[{},l,t+3]}function ha(e,t){const n=e[t]?ts.create(e[t]):null;return[{},n,t+1]}const av=RegExp(`^T?${Bd.source}$`),cv=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function uv(e){const[t,n,r,l,d,f,p,_,E]=e,T=t[0]==="-",S=_&&_[0]==="-",w=(O,m=!1)=>O!==void 0&&(m||O&&T)?-O:O;return[{years:w(Xs(n)),months:w(Xs(r)),weeks:w(Xs(l)),days:w(Xs(d)),hours:w(Xs(f)),minutes:w(Xs(p)),seconds:w(Xs(_),_==="-0"),milliseconds:w($d(E),S)}]}const dv={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Wd(e,t,n,r,l,d,f){const p={year:t.length===2?od(Ns(t)):Ns(t),month:Fm.indexOf(n)+1,day:Ns(r),hour:Ns(l),minute:Ns(d)};return f&&(p.second=Ns(f)),e&&(p.weekday=e.length>3?Hm.indexOf(e)+1:Wm.indexOf(e)+1),p}const fv=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function hv(e){const[,t,n,r,l,d,f,p,_,E,T,S]=e,w=Wd(t,l,r,n,d,f,p);let O;return _?O=dv[_]:E?O=0:O=wc(T,S),[w,new vr(O)]}function gv(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const pv=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,mv=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,_v=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Vg(e){const[,t,n,r,l,d,f,p]=e;return[Wd(t,l,r,n,d,f,p),vr.utcInstance]}function yv(e){const[,t,n,r,l,d,f,p]=e;return[Wd(t,p,n,r,l,d,f),vr.utcInstance]}const Nv=ll(ev,Hd),Cv=ll(tv,Hd),Ev=ll(nv,Hd),Tv=ll(Vm),Zm=al(lv,ul,fa,ha),xv=al(rv,ul,fa,ha),vv=al(iv,ul,fa,ha),Sv=al(ul,fa,ha);function wv(e){return cl(e,[Nv,Zm],[Cv,xv],[Ev,vv],[Tv,Sv])}function Ov(e){return cl(gv(e),[fv,hv])}function Dv(e){return cl(e,[pv,Vg],[mv,Vg],[_v,yv])}function Av(e){return cl(e,[cv,uv])}const Mv=al(ul);function Rv(e){return cl(e,[av,Mv])}const bv=ll(sv,ov),Lv=ll(qm),Iv=al(ul,fa,ha);function kv(e){return cl(e,[bv,Zm],[Lv,Iv])}const qg="Invalid Duration",Jm={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},Pv={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...Jm},Qr=146097/400,Go=146097/4800,$v={years:{quarters:4,months:12,weeks:Qr/7,days:Qr,hours:Qr*24,minutes:Qr*24*60,seconds:Qr*24*60*60,milliseconds:Qr*24*60*60*1e3},quarters:{months:3,weeks:Qr/28,days:Qr/4,hours:Qr*24/4,minutes:Qr*24*60/4,seconds:Qr*24*60*60/4,milliseconds:Qr*24*60*60*1e3/4},months:{weeks:Go/7,days:Go,hours:Go*24,minutes:Go*24*60,seconds:Go*24*60*60,milliseconds:Go*24*60*60*1e3},...Jm},io=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Fv=io.slice(0).reverse();function ys(e,t,n=!1){const r={values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new en(r)}function Xm(e,t){let n=t.milliseconds??0;for(const r of Fv.slice(1))t[r]&&(n+=t[r]*e[r].milliseconds);return n}function Zg(e,t){const n=Xm(e,t)<0?-1:1;io.reduceRight((r,l)=>{if(Lt(t[l]))return r;if(r){const d=t[r]*n,f=e[l][r],p=Math.floor(d/f);t[l]+=p*n,t[r]-=p*f*n}return l},null),io.reduce((r,l)=>{if(Lt(t[l]))return r;if(r){const d=t[r]%1;t[r]-=d,t[l]+=d*e[r][l]}return l},null)}function Bv(e){const t={};for(const[n,r]of Object.entries(e))r!==0&&(t[n]=r);return t}class en{constructor(t){const n=t.conversionAccuracy==="longterm"||!1;let r=n?$v:Pv;t.matrix&&(r=t.matrix),this.values=t.values,this.loc=t.loc||un.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=r,this.isLuxonDuration=!0}static fromMillis(t,n){return en.fromObject({milliseconds:t},n)}static fromObject(t,n={}){if(t==null||typeof t!="object")throw new mr(`Duration.fromObject: argument expected to be an object, got ${t===null?"null":typeof t}`);return new en({values:_c(t,en.normalizeUnit),loc:un.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(t){if(Ts(t))return en.fromMillis(t);if(en.isDuration(t))return t;if(typeof t=="object")return en.fromObject(t);throw new mr(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,n){const[r]=Av(t);return r?en.fromObject(r,n):en.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,n){const[r]=Rv(t);return r?en.fromObject(r,n):en.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,n=null){if(!t)throw new mr("need to specify a reason the Duration is invalid");const r=t instanceof pi?t:new pi(t,n);if(Rn.throwOnInvalid)throw new cx(r);return new en({invalid:r})}static normalizeUnit(t){const n={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[t&&t.toLowerCase()];if(!n)throw new am(t);return n}static isDuration(t){return t&&t.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(t,n={}){const r={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?_r.create(this.loc,r).formatDurationFromString(this,t):qg}toHuman(t={}){if(!this.isValid)return qg;const n=io.map(r=>{const l=this.values[r];return Lt(l)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:r.slice(0,-1)}).format(l)}).filter(r=>r);return this.loc.listFormatter({type:"conjunction",style:t.listStyle||"narrow",...t}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let t="P";return this.years!==0&&(t+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(t+=this.months+this.quarters*3+"M"),this.weeks!==0&&(t+=this.weeks+"W"),this.days!==0&&(t+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(t+="T"),this.hours!==0&&(t+=this.hours+"H"),this.minutes!==0&&(t+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(t+=Fd(this.seconds+this.milliseconds/1e3,3)+"S"),t==="P"&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;const n=this.toMillis();return n<0||n>=864e5?null:(t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...t,includeOffset:!1},vt.fromMillis(n,{zone:"UTC"}).toISOTime(t))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?Xm(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;const n=en.fromDurationLike(t),r={};for(const l of io)(el(n.values,l)||el(this.values,l))&&(r[l]=n.get(l)+this.get(l));return ys(this,{values:r},!0)}minus(t){if(!this.isValid)return this;const n=en.fromDurationLike(t);return this.plus(n.negate())}mapUnits(t){if(!this.isValid)return this;const n={};for(const r of Object.keys(this.values))n[r]=$m(t(this.values[r],r));return ys(this,{values:n},!0)}get(t){return this[en.normalizeUnit(t)]}set(t){if(!this.isValid)return this;const n={...this.values,..._c(t,en.normalizeUnit)};return ys(this,{values:n})}reconfigure({locale:t,numberingSystem:n,conversionAccuracy:r,matrix:l}={}){const f={loc:this.loc.clone({locale:t,numberingSystem:n}),matrix:l,conversionAccuracy:r};return ys(this,f)}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;const t=this.toObject();return Zg(this.matrix,t),ys(this,{values:t},!0)}rescale(){if(!this.isValid)return this;const t=Bv(this.normalize().shiftToAll().toObject());return ys(this,{values:t},!0)}shiftTo(...t){if(!this.isValid)return this;if(t.length===0)return this;t=t.map(f=>en.normalizeUnit(f));const n={},r={},l=this.toObject();let d;for(const f of io)if(t.indexOf(f)>=0){d=f;let p=0;for(const E in r)p+=this.matrix[E][f]*r[E],r[E]=0;Ts(l[f])&&(p+=l[f]);const _=Math.trunc(p);n[f]=_,r[f]=(p*1e3-_*1e3)/1e3}else Ts(l[f])&&(r[f]=l[f]);for(const f in r)r[f]!==0&&(n[d]+=f===d?r[f]:r[f]/this.matrix[d][f]);return Zg(this.matrix,n),ys(this,{values:n},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=this.values[n]===0?0:-this.values[n];return ys(this,{values:t},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(t){if(!this.isValid||!t.isValid||!this.loc.equals(t.loc))return!1;function n(r,l){return r===void 0||r===0?l===void 0||l===0:r===l}for(const r of io)if(!n(this.values[r],t.values[r]))return!1;return!0}}const Yo="Invalid Interval";function Hv(e,t){return!e||!e.isValid?Mn.invalid("missing or invalid start"):!t||!t.isValid?Mn.invalid("missing or invalid end"):t<e?Mn.invalid("end before start",`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`):null}class Mn{constructor(t){this.s=t.start,this.e=t.end,this.invalid=t.invalid||null,this.isLuxonInterval=!0}static invalid(t,n=null){if(!t)throw new mr("need to specify a reason the Interval is invalid");const r=t instanceof pi?t:new pi(t,n);if(Rn.throwOnInvalid)throw new ax(r);return new Mn({invalid:r})}static fromDateTimes(t,n){const r=Xl(t),l=Xl(n),d=Hv(r,l);return d??new Mn({start:r,end:l})}static after(t,n){const r=en.fromDurationLike(n),l=Xl(t);return Mn.fromDateTimes(l,l.plus(r))}static before(t,n){const r=en.fromDurationLike(n),l=Xl(t);return Mn.fromDateTimes(l.minus(r),l)}static fromISO(t,n){const[r,l]=(t||"").split("/",2);if(r&&l){let d,f;try{d=vt.fromISO(r,n),f=d.isValid}catch{f=!1}let p,_;try{p=vt.fromISO(l,n),_=p.isValid}catch{_=!1}if(f&&_)return Mn.fromDateTimes(d,p);if(f){const E=en.fromISO(l,n);if(E.isValid)return Mn.after(d,E)}else if(_){const E=en.fromISO(r,n);if(E.isValid)return Mn.before(p,E)}}return Mn.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static isInterval(t){return t&&t.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(t="milliseconds"){return this.isValid?this.toDuration(t).get(t):NaN}count(t="milliseconds",n){if(!this.isValid)return NaN;const r=this.start.startOf(t,n);let l;return n!=null&&n.useLocaleWeeks?l=this.end.reconfigure({locale:r.locale}):l=this.end,l=l.startOf(t,n),Math.floor(l.diff(r,t).get(t))+(l.valueOf()!==this.end.valueOf())}hasSame(t){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,t):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(t){return this.isValid?this.s>t:!1}isBefore(t){return this.isValid?this.e<=t:!1}contains(t){return this.isValid?this.s<=t&&this.e>t:!1}set({start:t,end:n}={}){return this.isValid?Mn.fromDateTimes(t||this.s,n||this.e):this}splitAt(...t){if(!this.isValid)return[];const n=t.map(Xl).filter(f=>this.contains(f)).sort((f,p)=>f.toMillis()-p.toMillis()),r=[];let{s:l}=this,d=0;for(;l<this.e;){const f=n[d]||this.e,p=+f>+this.e?this.e:f;r.push(Mn.fromDateTimes(l,p)),l=p,d+=1}return r}splitBy(t){const n=en.fromDurationLike(t);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s:r}=this,l=1,d;const f=[];for(;r<this.e;){const p=this.start.plus(n.mapUnits(_=>_*l));d=+p>+this.e?this.e:p,f.push(Mn.fromDateTimes(r,d)),r=d,l+=1}return f}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}overlaps(t){return this.e>t.s&&this.s<t.e}abutsStart(t){return this.isValid?+this.e==+t.s:!1}abutsEnd(t){return this.isValid?+t.e==+this.s:!1}engulfs(t){return this.isValid?this.s<=t.s&&this.e>=t.e:!1}equals(t){return!this.isValid||!t.isValid?!1:this.s.equals(t.s)&&this.e.equals(t.e)}intersection(t){if(!this.isValid)return this;const n=this.s>t.s?this.s:t.s,r=this.e<t.e?this.e:t.e;return n>=r?null:Mn.fromDateTimes(n,r)}union(t){if(!this.isValid)return this;const n=this.s<t.s?this.s:t.s,r=this.e>t.e?this.e:t.e;return Mn.fromDateTimes(n,r)}static merge(t){const[n,r]=t.sort((l,d)=>l.s-d.s).reduce(([l,d],f)=>d?d.overlaps(f)||d.abutsStart(f)?[l,d.union(f)]:[l.concat([d]),f]:[l,f],[[],null]);return r&&n.push(r),n}static xor(t){let n=null,r=0;const l=[],d=t.map(_=>[{time:_.s,type:"s"},{time:_.e,type:"e"}]),f=Array.prototype.concat(...d),p=f.sort((_,E)=>_.time-E.time);for(const _ of p)r+=_.type==="s"?1:-1,r===1?n=_.time:(n&&+n!=+_.time&&l.push(Mn.fromDateTimes(n,_.time)),n=null);return Mn.merge(l)}difference(...t){return Mn.xor([this].concat(t)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Yo}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(t=gc,n={}){return this.isValid?_r.create(this.s.loc.clone(n),t).formatInterval(this):Yo}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:Yo}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Yo}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:Yo}toFormat(t,{separator:n=" – "}={}){return this.isValid?`${this.s.toFormat(t)}${n}${this.e.toFormat(t)}`:Yo}toDuration(t,n){return this.isValid?this.e.diff(this.s,t,n):en.invalid(this.invalidReason)}mapEndpoints(t){return Mn.fromDateTimes(t(this.s),t(this.e))}}class tc{static hasDST(t=Rn.defaultZone){const n=vt.now().setZone(t).set({month:12});return!t.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(t){return ts.isValidZone(t)}static normalizeZone(t){return Cs(t,Rn.defaultZone)}static getStartOfWeek({locale:t=null,locObj:n=null}={}){return(n||un.create(t)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:t=null,locObj:n=null}={}){return(n||un.create(t)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:t=null,locObj:n=null}={}){return(n||un.create(t)).getWeekendDays().slice()}static months(t="long",{locale:n=null,numberingSystem:r=null,locObj:l=null,outputCalendar:d="gregory"}={}){return(l||un.create(n,r,d)).months(t)}static monthsFormat(t="long",{locale:n=null,numberingSystem:r=null,locObj:l=null,outputCalendar:d="gregory"}={}){return(l||un.create(n,r,d)).months(t,!0)}static weekdays(t="long",{locale:n=null,numberingSystem:r=null,locObj:l=null}={}){return(l||un.create(n,r,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:n=null,numberingSystem:r=null,locObj:l=null}={}){return(l||un.create(n,r,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return un.create(t).meridiems()}static eras(t="short",{locale:n=null}={}){return un.create(n,null,"gregory").eras(t)}static features(){return{relative:Im(),localeWeek:km()}}}function Jg(e,t){const n=l=>l.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(t)-n(e);return Math.floor(en.fromMillis(r).as("days"))}function Wv(e,t,n){const r=[["years",(_,E)=>E.year-_.year],["quarters",(_,E)=>E.quarter-_.quarter+(E.year-_.year)*4],["months",(_,E)=>E.month-_.month+(E.year-_.year)*12],["weeks",(_,E)=>{const T=Jg(_,E);return(T-T%7)/7}],["days",Jg]],l={},d=e;let f,p;for(const[_,E]of r)n.indexOf(_)>=0&&(f=_,l[_]=E(e,t),p=d.plus(l),p>t?(l[_]--,e=d.plus(l),e>t&&(p=e,l[_]--,e=d.plus(l))):e=p);return[e,l,p,f]}function Kv(e,t,n,r){let[l,d,f,p]=Wv(e,t,n);const _=t-l,E=n.filter(S=>["hours","minutes","seconds","milliseconds"].indexOf(S)>=0);E.length===0&&(f<t&&(f=l.plus({[p]:1})),f!==l&&(d[p]=(d[p]||0)+_/(f-l)));const T=en.fromObject(d,r);return E.length>0?en.fromMillis(_,r).shiftTo(...E).plus(T):T}const zv="missing Intl.DateTimeFormat.formatToParts support";function ln(e,t=n=>n){return{regex:e,deser:([n])=>t(bx(n))}}const Uv=" ",Qm=`[ ${Uv}]`,e_=new RegExp(Qm,"g");function Gv(e){return e.replace(/\./g,"\\.?").replace(e_,Qm)}function Xg(e){return e.replace(/\./g,"").replace(e_," ").toLowerCase()}function gi(e,t){return e===null?null:{regex:RegExp(e.map(Gv).join("|")),deser:([n])=>e.findIndex(r=>Xg(n)===Xg(r))+t}}function Qg(e,t){return{regex:e,deser:([,n,r])=>wc(n,r),groups:t}}function nc(e){return{regex:e,deser:([t])=>t}}function Yv(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function jv(e,t){const n=hi(t),r=hi(t,"{2}"),l=hi(t,"{3}"),d=hi(t,"{4}"),f=hi(t,"{6}"),p=hi(t,"{1,2}"),_=hi(t,"{1,3}"),E=hi(t,"{1,6}"),T=hi(t,"{1,9}"),S=hi(t,"{2,4}"),w=hi(t,"{4,6}"),O=I=>({regex:RegExp(Yv(I.val)),deser:([G])=>G,literal:!0}),v=(I=>{if(e.literal)return O(I);switch(I.val){case"G":return gi(t.eras("short"),0);case"GG":return gi(t.eras("long"),0);case"y":return ln(E);case"yy":return ln(S,od);case"yyyy":return ln(d);case"yyyyy":return ln(w);case"yyyyyy":return ln(f);case"M":return ln(p);case"MM":return ln(r);case"MMM":return gi(t.months("short",!0),1);case"MMMM":return gi(t.months("long",!0),1);case"L":return ln(p);case"LL":return ln(r);case"LLL":return gi(t.months("short",!1),1);case"LLLL":return gi(t.months("long",!1),1);case"d":return ln(p);case"dd":return ln(r);case"o":return ln(_);case"ooo":return ln(l);case"HH":return ln(r);case"H":return ln(p);case"hh":return ln(r);case"h":return ln(p);case"mm":return ln(r);case"m":return ln(p);case"q":return ln(p);case"qq":return ln(r);case"s":return ln(p);case"ss":return ln(r);case"S":return ln(_);case"SSS":return ln(l);case"u":return nc(T);case"uu":return nc(p);case"uuu":return ln(n);case"a":return gi(t.meridiems(),0);case"kkkk":return ln(d);case"kk":return ln(S,od);case"W":return ln(p);case"WW":return ln(r);case"E":case"c":return ln(n);case"EEE":return gi(t.weekdays("short",!1),1);case"EEEE":return gi(t.weekdays("long",!1),1);case"ccc":return gi(t.weekdays("short",!0),1);case"cccc":return gi(t.weekdays("long",!0),1);case"Z":case"ZZ":return Qg(new RegExp(`([+-]${p.source})(?::(${r.source}))?`),2);case"ZZZ":return Qg(new RegExp(`([+-]${p.source})(${r.source})?`),2);case"z":return nc(/[a-z_+-/]{1,256}?/i);case" ":return nc(/[^\S\n\r]/);default:return O(I)}})(e)||{invalidReason:zv};return v.token=e,v}const Vv={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function qv(e,t,n){const{type:r,value:l}=e;if(r==="literal"){const _=/^\s+$/.test(l);return{literal:!_,val:_?" ":l}}const d=t[r];let f=r;r==="hour"&&(t.hour12!=null?f=t.hour12?"hour12":"hour24":t.hourCycle!=null?t.hourCycle==="h11"||t.hourCycle==="h12"?f="hour12":f="hour24":f=n.hour12?"hour12":"hour24");let p=Vv[f];if(typeof p=="object"&&(p=p[d]),p)return{literal:!1,val:p}}function Zv(e){return[`^${e.map(n=>n.regex).reduce((n,r)=>`${n}(${r.source})`,"")}$`,e]}function Jv(e,t,n){const r=e.match(t);if(r){const l={};let d=1;for(const f in n)if(el(n,f)){const p=n[f],_=p.groups?p.groups+1:1;!p.literal&&p.token&&(l[p.token.val[0]]=p.deser(r.slice(d,d+_))),d+=_}return[r,l]}else return[r,{}]}function Xv(e){const t=d=>{switch(d){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let n=null,r;return Lt(e.z)||(n=ts.create(e.z)),Lt(e.Z)||(n||(n=new vr(e.Z)),r=e.Z),Lt(e.q)||(e.M=(e.q-1)*3+1),Lt(e.h)||(e.h<12&&e.a===1?e.h+=12:e.h===12&&e.a===0&&(e.h=0)),e.G===0&&e.y&&(e.y=-e.y),Lt(e.u)||(e.S=$d(e.u)),[Object.keys(e).reduce((d,f)=>{const p=t(f);return p&&(d[p]=e[f]),d},{}),n,r]}let Fu=null;function Qv(){return Fu||(Fu=vt.fromMillis(1555555555555)),Fu}function eS(e,t){if(e.literal)return e;const n=_r.macroTokenToFormatOpts(e.val),r=i_(n,t);return r==null||r.includes(void 0)?e:r}function t_(e,t){return Array.prototype.concat(...e.map(n=>eS(n,t)))}class n_{constructor(t,n){if(this.locale=t,this.format=n,this.tokens=t_(_r.parseFormat(n),t),this.units=this.tokens.map(r=>jv(r,t)),this.disqualifyingUnit=this.units.find(r=>r.invalidReason),!this.disqualifyingUnit){const[r,l]=Zv(this.units);this.regex=RegExp(r,"i"),this.handlers=l}}explainFromTokens(t){if(this.isValid){const[n,r]=Jv(t,this.regex,this.handlers),[l,d,f]=r?Xv(r):[null,null,void 0];if(el(r,"a")&&el(r,"H"))throw new Zo("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:this.tokens,regex:this.regex,rawMatches:n,matches:r,result:l,zone:d,specificOffset:f}}else return{input:t,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function r_(e,t,n){return new n_(e,n).explainFromTokens(t)}function tS(e,t,n){const{result:r,zone:l,specificOffset:d,invalidReason:f}=r_(e,t,n);return[r,l,d,f]}function i_(e,t){if(!e)return null;const r=_r.create(t,e).dtFormatter(Qv()),l=r.formatToParts(),d=r.resolvedOptions();return l.map(f=>qv(f,e,d))}const Bu="Invalid DateTime",nS=864e13;function na(e){return new pi("unsupported zone",`the zone "${e.name}" is not supported`)}function Hu(e){return e.weekData===null&&(e.weekData=pc(e.c)),e.weekData}function Wu(e){return e.localWeekData===null&&(e.localWeekData=pc(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function Qs(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new vt({...n,...t,old:n})}function s_(e,t,n){let r=e-t*60*1e3;const l=n.offset(r);if(t===l)return[r,t];r-=(l-t)*60*1e3;const d=n.offset(r);return l===d?[r,l]:[e-Math.min(l,d)*60*1e3,Math.max(l,d)]}function rc(e,t){e+=t*60*1e3;const n=new Date(e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function lc(e,t,n){return s_(Sc(e),t,n)}function ep(e,t){const n=e.o,r=e.c.year+Math.trunc(t.years),l=e.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,d={...e.c,year:r,month:l,day:Math.min(e.c.day,mc(r,l))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},f=en.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),p=Sc(d);let[_,E]=s_(p,n,e.zone);return f!==0&&(_+=f,E=e.zone.offset(_)),{ts:_,o:E}}function jo(e,t,n,r,l,d){const{setZone:f,zone:p}=n;if(e&&Object.keys(e).length!==0||t){const _=t||p,E=vt.fromObject(e,{...n,zone:_,specificOffset:d});return f?E:E.setZone(p)}else return vt.invalid(new pi("unparsable",`the input "${l}" can't be parsed as ${r}`))}function ic(e,t,n=!0){return e.isValid?_r.create(un.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function Ku(e,t){const n=e.c.year>9999||e.c.year<0;let r="";return n&&e.c.year>=0&&(r+="+"),r+=Kn(e.c.year,n?6:4),t?(r+="-",r+=Kn(e.c.month),r+="-",r+=Kn(e.c.day)):(r+=Kn(e.c.month),r+=Kn(e.c.day)),r}function tp(e,t,n,r,l,d){let f=Kn(e.c.hour);return t?(f+=":",f+=Kn(e.c.minute),(e.c.millisecond!==0||e.c.second!==0||!n)&&(f+=":")):f+=Kn(e.c.minute),(e.c.millisecond!==0||e.c.second!==0||!n)&&(f+=Kn(e.c.second),(e.c.millisecond!==0||!r)&&(f+=".",f+=Kn(e.c.millisecond,3))),l&&(e.isOffsetFixed&&e.offset===0&&!d?f+="Z":e.o<0?(f+="-",f+=Kn(Math.trunc(-e.o/60)),f+=":",f+=Kn(Math.trunc(-e.o%60))):(f+="+",f+=Kn(Math.trunc(e.o/60)),f+=":",f+=Kn(Math.trunc(e.o%60)))),d&&(f+="["+e.zone.ianaName+"]"),f}const o_={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},rS={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},iS={ordinal:1,hour:0,minute:0,second:0,millisecond:0},l_=["year","month","day","hour","minute","second","millisecond"],sS=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],oS=["year","ordinal","hour","minute","second","millisecond"];function lS(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new am(e);return t}function np(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return lS(e)}}function aS(e){return cc[e]||(ac===void 0&&(ac=Rn.now()),cc[e]=e.offset(ac)),cc[e]}function rp(e,t){const n=Cs(t.zone,Rn.defaultZone);if(!n.isValid)return vt.invalid(na(n));const r=un.fromObject(t);let l,d;if(Lt(e.year))l=Rn.now();else{for(const _ of l_)Lt(e[_])&&(e[_]=o_[_]);const f=bm(e)||Lm(e);if(f)return vt.invalid(f);const p=aS(n);[l,d]=lc(e,p,n)}return new vt({ts:l,zone:n,loc:r,o:d})}function ip(e,t,n){const r=Lt(n.round)?!0:n.round,l=(f,p)=>(f=Fd(f,r||n.calendary?0:2,!0),t.loc.clone(n).relFormatter(n).format(f,p)),d=f=>n.calendary?t.hasSame(e,f)?0:t.startOf(f).diff(e.startOf(f),f).get(f):t.diff(e,f).get(f);if(n.unit)return l(d(n.unit),n.unit);for(const f of n.units){const p=d(f);if(Math.abs(p)>=1)return l(p,f)}return l(e>t?-0:0,n.units[n.units.length-1])}function sp(e){let t={},n;return e.length>0&&typeof e[e.length-1]=="object"?(t=e[e.length-1],n=Array.from(e).slice(0,e.length-1)):n=Array.from(e),[t,n]}let ac,cc={};class vt{constructor(t){const n=t.zone||Rn.defaultZone;let r=t.invalid||(Number.isNaN(t.ts)?new pi("invalid input"):null)||(n.isValid?null:na(n));this.ts=Lt(t.ts)?Rn.now():t.ts;let l=null,d=null;if(!r)if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(n))[l,d]=[t.old.c,t.old.o];else{const p=Ts(t.o)&&!t.old?t.o:n.offset(this.ts);l=rc(this.ts,p),r=Number.isNaN(l.year)?new pi("invalid input"):null,l=r?null:l,d=r?null:p}this._zone=n,this.loc=t.loc||un.create(),this.invalid=r,this.weekData=null,this.localWeekData=null,this.c=l,this.o=d,this.isLuxonDateTime=!0}static now(){return new vt({})}static local(){const[t,n]=sp(arguments),[r,l,d,f,p,_,E]=n;return rp({year:r,month:l,day:d,hour:f,minute:p,second:_,millisecond:E},t)}static utc(){const[t,n]=sp(arguments),[r,l,d,f,p,_,E]=n;return t.zone=vr.utcInstance,rp({year:r,month:l,day:d,hour:f,minute:p,second:_,millisecond:E},t)}static fromJSDate(t,n={}){const r=$x(t)?t.valueOf():NaN;if(Number.isNaN(r))return vt.invalid("invalid input");const l=Cs(n.zone,Rn.defaultZone);return l.isValid?new vt({ts:r,zone:l,loc:un.fromObject(n)}):vt.invalid(na(l))}static fromMillis(t,n={}){if(Ts(t))return t<-864e13||t>nS?vt.invalid("Timestamp out of range"):new vt({ts:t,zone:Cs(n.zone,Rn.defaultZone),loc:un.fromObject(n)});throw new mr(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,n={}){if(Ts(t))return new vt({ts:t*1e3,zone:Cs(n.zone,Rn.defaultZone),loc:un.fromObject(n)});throw new mr("fromSeconds requires a numerical input")}static fromObject(t,n={}){t=t||{};const r=Cs(n.zone,Rn.defaultZone);if(!r.isValid)return vt.invalid(na(r));const l=un.fromObject(n),d=_c(t,np),{minDaysInFirstWeek:f,startOfWeek:p}=Ug(d,l),_=Rn.now(),E=Lt(n.specificOffset)?r.offset(_):n.specificOffset,T=!Lt(d.ordinal),S=!Lt(d.year),w=!Lt(d.month)||!Lt(d.day),O=S||w,m=d.weekYear||d.weekNumber;if((O||T)&&m)throw new Zo("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(w&&T)throw new Zo("Can't mix ordinal dates with month/day");const v=m||d.weekday&&!O;let I,G,k=rc(_,E);v?(I=sS,G=rS,k=pc(k,f,p)):T?(I=oS,G=iS,k=$u(k)):(I=l_,G=o_);let P=!1;for(const z of I){const q=d[z];Lt(q)?P?d[z]=G[z]:d[z]=k[z]:P=!0}const H=v?Ix(d,f,p):T?kx(d):bm(d),j=H||Lm(d);if(j)return vt.invalid(j);const re=v?Kg(d,f,p):T?zg(d):d,[te,ce]=lc(re,E,r),V=new vt({ts:te,zone:r,o:ce,loc:l});return d.weekday&&O&&t.weekday!==V.weekday?vt.invalid("mismatched weekday",`you can't specify both a weekday of ${d.weekday} and a date of ${V.toISO()}`):V.isValid?V:vt.invalid(V.invalid)}static fromISO(t,n={}){const[r,l]=wv(t);return jo(r,l,n,"ISO 8601",t)}static fromRFC2822(t,n={}){const[r,l]=Ov(t);return jo(r,l,n,"RFC 2822",t)}static fromHTTP(t,n={}){const[r,l]=Dv(t);return jo(r,l,n,"HTTP",n)}static fromFormat(t,n,r={}){if(Lt(t)||Lt(n))throw new mr("fromFormat requires an input string and a format");const{locale:l=null,numberingSystem:d=null}=r,f=un.fromOpts({locale:l,numberingSystem:d,defaultToEN:!0}),[p,_,E,T]=tS(f,t,n);return T?vt.invalid(T):jo(p,_,r,`format ${n}`,t,E)}static fromString(t,n,r={}){return vt.fromFormat(t,n,r)}static fromSQL(t,n={}){const[r,l]=kv(t);return jo(r,l,n,"SQL",t)}static invalid(t,n=null){if(!t)throw new mr("need to specify a reason the DateTime is invalid");const r=t instanceof pi?t:new pi(t,n);if(Rn.throwOnInvalid)throw new lx(r);return new vt({invalid:r})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}static parseFormatForOpts(t,n={}){const r=i_(t,un.fromObject(n));return r?r.map(l=>l?l.val:null).join(""):null}static expandFormat(t,n={}){return t_(_r.parseFormat(t),un.fromObject(n)).map(l=>l.val).join("")}static resetCache(){ac=void 0,cc={}}get(t){return this[t]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Hu(this).weekYear:NaN}get weekNumber(){return this.isValid?Hu(this).weekNumber:NaN}get weekday(){return this.isValid?Hu(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Wu(this).weekday:NaN}get localWeekNumber(){return this.isValid?Wu(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Wu(this).weekYear:NaN}get ordinal(){return this.isValid?$u(this.c).ordinal:NaN}get monthShort(){return this.isValid?tc.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?tc.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?tc.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?tc.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const t=864e5,n=6e4,r=Sc(this.c),l=this.zone.offset(r-t),d=this.zone.offset(r+t),f=this.zone.offset(r-l*n),p=this.zone.offset(r-d*n);if(f===p)return[this];const _=r-f*n,E=r-p*n,T=rc(_,f),S=rc(E,p);return T.hour===S.hour&&T.minute===S.minute&&T.second===S.second&&T.millisecond===S.millisecond?[Qs(this,{ts:_}),Qs(this,{ts:E})]:[this]}get isInLeapYear(){return da(this.year)}get daysInMonth(){return mc(this.year,this.month)}get daysInYear(){return this.isValid?Jo(this.year):NaN}get weeksInWeekYear(){return this.isValid?ca(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?ca(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(t={}){const{locale:n,numberingSystem:r,calendar:l}=_r.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:n,numberingSystem:r,outputCalendar:l}}toUTC(t=0,n={}){return this.setZone(vr.instance(t),n)}toLocal(){return this.setZone(Rn.defaultZone)}setZone(t,{keepLocalTime:n=!1,keepCalendarTime:r=!1}={}){if(t=Cs(t,Rn.defaultZone),t.equals(this.zone))return this;if(t.isValid){let l=this.ts;if(n||r){const d=t.offset(this.ts),f=this.toObject();[l]=lc(f,d,t)}return Qs(this,{ts:l,zone:t})}else return vt.invalid(na(t))}reconfigure({locale:t,numberingSystem:n,outputCalendar:r}={}){const l=this.loc.clone({locale:t,numberingSystem:n,outputCalendar:r});return Qs(this,{loc:l})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;const n=_c(t,np),{minDaysInFirstWeek:r,startOfWeek:l}=Ug(n,this.loc),d=!Lt(n.weekYear)||!Lt(n.weekNumber)||!Lt(n.weekday),f=!Lt(n.ordinal),p=!Lt(n.year),_=!Lt(n.month)||!Lt(n.day),E=p||_,T=n.weekYear||n.weekNumber;if((E||f)&&T)throw new Zo("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(_&&f)throw new Zo("Can't mix ordinal dates with month/day");let S;d?S=Kg({...pc(this.c,r,l),...n},r,l):Lt(n.ordinal)?(S={...this.toObject(),...n},Lt(n.day)&&(S.day=Math.min(mc(S.year,S.month),S.day))):S=zg({...$u(this.c),...n});const[w,O]=lc(S,this.o,this.zone);return Qs(this,{ts:w,o:O})}plus(t){if(!this.isValid)return this;const n=en.fromDurationLike(t);return Qs(this,ep(this,n))}minus(t){if(!this.isValid)return this;const n=en.fromDurationLike(t).negate();return Qs(this,ep(this,n))}startOf(t,{useLocaleWeeks:n=!1}={}){if(!this.isValid)return this;const r={},l=en.normalizeUnit(t);switch(l){case"years":r.month=1;case"quarters":case"months":r.day=1;case"weeks":case"days":r.hour=0;case"hours":r.minute=0;case"minutes":r.second=0;case"seconds":r.millisecond=0;break}if(l==="weeks")if(n){const d=this.loc.getStartOfWeek(),{weekday:f}=this;f<d&&(r.weekNumber=this.weekNumber-1),r.weekday=d}else r.weekday=1;if(l==="quarters"){const d=Math.ceil(this.month/3);r.month=(d-1)*3+1}return this.set(r)}endOf(t,n){return this.isValid?this.plus({[t]:1}).startOf(t,n).minus(1):this}toFormat(t,n={}){return this.isValid?_r.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,t):Bu}toLocaleString(t=gc,n={}){return this.isValid?_r.create(this.loc.clone(n),t).formatDateTime(this):Bu}toLocaleParts(t={}){return this.isValid?_r.create(this.loc.clone(t),t).formatDateTimeParts(this):[]}toISO({format:t="extended",suppressSeconds:n=!1,suppressMilliseconds:r=!1,includeOffset:l=!0,extendedZone:d=!1}={}){if(!this.isValid)return null;const f=t==="extended";let p=Ku(this,f);return p+="T",p+=tp(this,f,n,r,l,d),p}toISODate({format:t="extended"}={}){return this.isValid?Ku(this,t==="extended"):null}toISOWeekDate(){return ic(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:t=!1,suppressSeconds:n=!1,includeOffset:r=!0,includePrefix:l=!1,extendedZone:d=!1,format:f="extended"}={}){return this.isValid?(l?"T":"")+tp(this,f==="extended",n,t,r,d):null}toRFC2822(){return ic(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return ic(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?Ku(this,!0):null}toSQLTime({includeOffset:t=!0,includeZone:n=!1,includeOffsetSpace:r=!0}={}){let l="HH:mm:ss.SSS";return(n||t)&&(r&&(l+=" "),n?l+="z":t&&(l+="ZZ")),ic(this,l,!0)}toSQL(t={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(t)}`:null}toString(){return this.isValid?this.toISO():Bu}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(t={}){if(!this.isValid)return{};const n={...this.c};return t.includeConfig&&(n.outputCalendar=this.outputCalendar,n.numberingSystem=this.loc.numberingSystem,n.locale=this.loc.locale),n}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(t,n="milliseconds",r={}){if(!this.isValid||!t.isValid)return en.invalid("created by diffing an invalid DateTime");const l={locale:this.locale,numberingSystem:this.numberingSystem,...r},d=Fx(n).map(en.normalizeUnit),f=t.valueOf()>this.valueOf(),p=f?this:t,_=f?t:this,E=Kv(p,_,d,l);return f?E.negate():E}diffNow(t="milliseconds",n={}){return this.diff(vt.now(),t,n)}until(t){return this.isValid?Mn.fromDateTimes(this,t):this}hasSame(t,n,r){if(!this.isValid)return!1;const l=t.valueOf(),d=this.setZone(t.zone,{keepLocalTime:!0});return d.startOf(n,r)<=l&&l<=d.endOf(n,r)}equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)}toRelative(t={}){if(!this.isValid)return null;const n=t.base||vt.fromObject({},{zone:this.zone}),r=t.padding?this<n?-t.padding:t.padding:0;let l=["years","months","days","hours","minutes","seconds"],d=t.unit;return Array.isArray(t.unit)&&(l=t.unit,d=void 0),ip(n,this.plus(r),{...t,numeric:"always",units:l,unit:d})}toRelativeCalendar(t={}){return this.isValid?ip(t.base||vt.fromObject({},{zone:this.zone}),this,{...t,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...t){if(!t.every(vt.isDateTime))throw new mr("min requires all arguments be DateTimes");return Gg(t,n=>n.valueOf(),Math.min)}static max(...t){if(!t.every(vt.isDateTime))throw new mr("max requires all arguments be DateTimes");return Gg(t,n=>n.valueOf(),Math.max)}static fromFormatExplain(t,n,r={}){const{locale:l=null,numberingSystem:d=null}=r,f=un.fromOpts({locale:l,numberingSystem:d,defaultToEN:!0});return r_(f,t,n)}static fromStringExplain(t,n,r={}){return vt.fromFormatExplain(t,n,r)}static buildFormatParser(t,n={}){const{locale:r=null,numberingSystem:l=null}=n,d=un.fromOpts({locale:r,numberingSystem:l,defaultToEN:!0});return new n_(d,t)}static fromFormatParser(t,n,r={}){if(Lt(t)||Lt(n))throw new mr("fromFormatParser requires an input string and a format parser");const{locale:l=null,numberingSystem:d=null}=r,f=un.fromOpts({locale:l,numberingSystem:d,defaultToEN:!0});if(!f.equals(n.locale))throw new mr(`fromFormatParser called with a locale of ${f}, but the format parser was created for ${n.locale}`);const{result:p,zone:_,specificOffset:E,invalidReason:T}=n.explainFromTokens(t);return T?vt.invalid(T):jo(p,_,r,`format ${n.format}`,t,E)}static get DATE_SHORT(){return gc}static get DATE_MED(){return cm}static get DATE_MED_WITH_WEEKDAY(){return ux}static get DATE_FULL(){return um}static get DATE_HUGE(){return dm}static get TIME_SIMPLE(){return fm}static get TIME_WITH_SECONDS(){return hm}static get TIME_WITH_SHORT_OFFSET(){return gm}static get TIME_WITH_LONG_OFFSET(){return pm}static get TIME_24_SIMPLE(){return mm}static get TIME_24_WITH_SECONDS(){return _m}static get TIME_24_WITH_SHORT_OFFSET(){return ym}static get TIME_24_WITH_LONG_OFFSET(){return Nm}static get DATETIME_SHORT(){return Cm}static get DATETIME_SHORT_WITH_SECONDS(){return Em}static get DATETIME_MED(){return Tm}static get DATETIME_MED_WITH_SECONDS(){return xm}static get DATETIME_MED_WITH_WEEKDAY(){return dx}static get DATETIME_FULL(){return vm}static get DATETIME_FULL_WITH_SECONDS(){return Sm}static get DATETIME_HUGE(){return wm}static get DATETIME_HUGE_WITH_SECONDS(){return Om}}function Xl(e){if(vt.isDateTime(e))return e;if(e&&e.valueOf&&Ts(e.valueOf()))return vt.fromJSDate(e);if(e&&typeof e=="object")return vt.fromObject(e);throw new mr(`Unknown datetime argument: ${e}, of type ${typeof e}`)}var Yt=(e=>(e.Monday="MONDAY",e.Tuesday="TUESDAY",e.Wednesday="WEDNESDAY",e.Thursday="THURSDAY",e.Friday="FRIDAY",e.Saturday="SATURDAY",e.Sunday="SUNDAY",e))(Yt||{});function Dc(e){const t={1:Yt.Monday,2:Yt.Tuesday,3:Yt.Wednesday,4:Yt.Thursday,5:Yt.Friday,6:Yt.Saturday,7:Yt.Sunday};if(e.weekday in t)return t[e.weekday];throw new Error(`Invalid DateTime.weekday property: ${e}, ${e.weekday}`)}function oo(e){return{[Yt.Monday]:"Monday",[Yt.Tuesday]:"Tuesday",[Yt.Wednesday]:"Wednesday",[Yt.Thursday]:"Thursday",[Yt.Friday]:"Friday",[Yt.Saturday]:"Saturday",[Yt.Sunday]:"Sunday"}[e]}const ld=[Yt.Monday,Yt.Tuesday,Yt.Wednesday,Yt.Thursday,Yt.Friday,Yt.Saturday,Yt.Sunday],ra={[Yt.Monday]:"monday",[Yt.Tuesday]:"tuesday",[Yt.Wednesday]:"wednesday",[Yt.Thursday]:"thursday",[Yt.Friday]:"friday",[Yt.Saturday]:"saturday",[Yt.Sunday]:"sunday"};class yc{constructor(t,n,r){Ie(this,"end");Ie(this,"start");this.end=t.setZone(r),this.start=t.setZone(r),[n.start,n.end].forEach(E=>{if(E.split(":").length!==2)throw new Error('expected interval start and end data to be in the format "HH:MM"')});const[l,d]=n.start.split(":").map(Number),[f,p]=n.end.split(":").map(Number);let _=0;f<l&&(_=1),this.end=this.end.set({hour:f,minute:p,day:this.end.day+_}),this.start=this.start.set({hour:l,minute:d}),this.end.minute===59&&(this.end=this.end.set({minute:60}))}contains(t){return this.start<=t&&t<this.end}getStartTime(t,n){const r={hour:"numeric",minute:"numeric",...n};return this.start.setLocale(t||"en-US").toLocaleString(r).replace(" "," ")}getEndTime(t,n){const r={hour:"numeric",minute:"numeric",...n};return this.end.setLocale(t||"en-US").toLocaleString(r).replace(" "," ")}timeIsEqualTo(t){const n=this.getStartTime()===t.getStartTime(),r=this.getEndTime()===t.getEndTime();return n&&r}is24h(){const t=this.start.minute===0&&this.start.hour===0,n=this.end.minute===0&&this.end.hour===0,r=this.end.day-this.start.day===1||this.end.day===1;return t&&n&&r}}class a_{constructor(t,n){Ie(this,"holidayHoursByDate");Ie(this,"hours");Ie(this,"timezone");this.holidayHoursByDate=Object.fromEntries((t.holidayHours||[]).map(r=>[r.date,r])),this.hours=t,this.timezone=n}getInterval(t){if(this.isTemporarilyClosedAt(t))return null;const n=t.minus({days:1});for(const r of[n,t]){const l=this.getHours(r);if(l&&!l.isClosed)for(const d of l.openIntervals||[]){const f=new yc(r,d,this.timezone);if(f.contains(t))return f}}return null}getCurrentInterval(){return this.getInterval(vt.now())}getIntervalAfter(t){const n=this.getIntervalsForNDays(8,t),r=(d,f)=>d.start===f.start?0:d.start>f.start?1:-1,l=n.sort(r);for(const[d,f]of l.entries())if(f.contains(t)&&l.length>d+1)return l[d+1];for(const d of l)if(d.start>t)return d;return null}getIntervalsForNDays(t,n){const r=[];for(let l=0;l<t;l++){let d=n;d=d.plus({days:l});const f=this.getHours(d);f!=null&&f.openIntervals&&!f.isClosed&&r.push(...f.openIntervals.map(p=>new yc(d,p,this.timezone)))}return r}getHolidayHours(t){return this.isTemporarilyClosedAt(t)?null:this.holidayHoursByDate[(t.toISO()||"").replace(/T.*/,"")]||null}getNormalHours(t){if(this.isTemporarilyClosedAt(t))return null;const n=oo(Dc(t)).toLowerCase();return this.hours[n]}getHours(t){const n=this.getHolidayHours(t);return!n||n.isRegularHours?this.getNormalHours(t):n}getNextInterval(){return this.getIntervalAfter(vt.now())}isHoliday(t){return!!this.getHolidayHours(t)}isTemporarilyClosedAt(t){if(!this.hours.reopenDate)return!1;const n=this.hours.reopenDate.split("-");if(n.length===3){const[r,l,d]=n,f=vt.fromObject({year:Number(r),month:Number(l),day:Number(d)},{zone:this.timezone});if(t<f)return!0}return!1}isOpenAt(t){return this.isTemporarilyClosedAt(t)?!1:!!this.getInterval(t)}isOpenNow(){return this.isOpenAt(vt.now())}}function cS(e,t){const n=[...e];return t=t%n.length,n.concat(n.splice(0,n.length-t))}function uS(e,t){if(e.length!==t.length)return!1;for(const[n,r]of e.entries())if(!r.timeIsEqualTo(t[n]))return!1;return!0}function ga(e){var t,n;return((n=(t=e==null?void 0:e.currentInterval)==null?void 0:t.is24h)==null?void 0:n.call(t))||!1}function pa(e){return!e.futureInterval}function dS(e){return ga(e)?nt.jsx("span",{className:"HoursStatus-current",children:"Open 24 Hours"}):pa(e)?nt.jsx("span",{className:"HoursStatus-current",children:"Temporarily Closed"}):nt.jsx("span",{className:"HoursStatus-current",children:e.isOpen?"Open Now":"Closed"})}function fS(e){return ga(e)||pa(e)?null:nt.jsx("span",{className:"HoursStatus-separator",children:" • "})}function hS(e){return ga(e)||pa(e)?null:nt.jsx("span",{className:"HoursStatus-future",children:e.isOpen?"Closes at":"Opens at"})}function gS(e){if(ga(e)||pa(e))return null;let t="";if(e.isOpen){const n=e.currentInterval;t+=n?n.getEndTime("en-US",e.timeOptions):""}else{const n=e.futureInterval;t+=n?n.getStartTime("en-US",e.timeOptions):""}return nt.jsxs("span",{className:"HoursStatus-time",children:[" ",t]})}function pS(e){var r,l;if(ga(e)||pa(e))return null;const t={weekday:"long",...e.dayOptions??{}};let n="";if(e.isOpen){const d=e.currentInterval;n+=((r=d==null?void 0:d.end)==null?void 0:r.setLocale("en-US").toLocaleString(t))||""}else{const d=e.futureInterval;n+=((l=d==null?void 0:d.start)==null?void 0:l.setLocale("en-US").toLocaleString(t))||""}return nt.jsxs("span",{className:"HoursStatus-dayOfWeek",children:[" ",n]})}function mS(e,t){const n=e.currentTemplate||dS,r=e.separatorTemplate||fS,l=e.futureTemplate||hS,d=e.timeTemplate||gS,f=e.dayOfWeekTemplate||pS;return nt.jsxs("div",{className:lo("HoursStatus",(t==null?void 0:t.className)||""),children:[n(e),r(e),l(e),d(e),f(e)]})}const _S={minHeight:`${1.5}em`},yS=e=>{const[t,n]=rt.useState(!1),[r,l]=rt.useState(!1);if(rt.useEffect(()=>{l(!0)},[]),!e.hours)return nt.jsx(nt.Fragment,{});const d=e.statusTemplate||mS,f=new a_(e.hours,e.timezone),p=f.isOpenNow(),_=f.getCurrentInterval(),E=f.getNextInterval(),T=(_==null?void 0:_.end)||(E==null?void 0:E.start);if(T&&!t){n(!0);const w=T.toMillis()-vt.now().toMillis();setTimeout(()=>n(!1),w)}const S={isOpen:p,currentInterval:_,futureInterval:E,...e};return nt.jsx(nt.Fragment,{children:r?d(S,e):nt.jsx("div",{style:_S,className:lo("HoursStatus",(e==null?void 0:e.className)||"")})})};function NS(e,t){const n=[];return e.forEach(r=>{const l=n[n.length-1];l?uS(l.intervals,r.intervals)?(l.endDay=r.endDay,l.isToday=l.isToday||r.isToday):n.push({...r}):n.push({...r})}),n.map(r=>{const l=t&&ra[r.startDay]in t?t[ra[r.startDay]]||"":oo(r.startDay),d=t&&ra[r.endDay]in t?t[ra[r.endDay]]||"":oo(r.endDay);return{...r,dayOfWeek:"Collapsed",dayName:r.startDay===r.endDay?`${l}`:`${l} - ${d}`}})}function CS(e,t,n){const r=[],l=e.intervals.length>0&&e.intervals[0].is24h();return e.intervals.length===0?r.push((n==null?void 0:n.isClosed)||"Closed"):l?r.push((n==null?void 0:n.open24Hours)||"Open 24 hours"):e.intervals.forEach(d=>{const f=d.getStartTime((n==null?void 0:n.timeFormatLocale)||"en-US",t),p=d.getEndTime((n==null?void 0:n.timeFormatLocale)||"en-US",t);r.push(`${f} - ${p}`)}),r}function ES(e,t,n){const r=[];for(let l=1;l<=7;l++){const d=vt.fromObject({weekday:l}),f=Dc(d);r.push({startDay:f,endDay:f,dayName:n&&oo(f).toLowerCase()in n?n[oo(f).toLowerCase()]||"":oo(f),intervals:e.filter(p=>p.start.weekday===l),isToday:(t==null?void 0:t.weekday)===l})}return r}const TS=e=>{const[t,n]=rt.useState(!1);return rt.useEffect(()=>{n(!0)},[]),e.hours?nt.jsx(nt.Fragment,{children:t?nt.jsx(xS,{...e}):nt.jsx(vS,{...e})}):nt.jsx(nt.Fragment,{})},xS=e=>{const t=new a_(e.hours,Intl.DateTimeFormat().resolvedOptions().timeZone),n=vt.now(),r=t.getIntervalsForNDays(7,n),l=ES(r,n,e.dayOfWeekNames);return nt.jsx(ad,{...e,hoursData:l,isClient:!0})},vS=e=>{var f;const{hours:t,dayOfWeekNames:n,intervalTranslations:r}=e,l=ld.map(p=>{var E,T;const _=ra[p];return{dayName:(n==null?void 0:n[_])||oo(p),startDay:p,endDay:p,isToday:!1,intervals:((T=(E=t[_])==null?void 0:E.openIntervals)==null?void 0:T.map(S=>new yc(vt.now(),S,"UTC")))??[]}}),d=(f=t.holidayHours)==null?void 0:f.map(p=>{var T,S;const _=vt.fromFormat(p.date,"yyyy-MM-dd"),E=Dc(_);return{dayName:_.setLocale((r==null?void 0:r.timeFormatLocale)||"en-US").toLocaleString(),isToday:!1,startDay:E,endDay:E,intervals:(p.isRegularHours?(T=p.openIntervals)==null?void 0:T.map(w=>new yc(_,w,"UTC")):(S=l.find(w=>w.startDay===E))==null?void 0:S.intervals)??[]}});return nt.jsxs(nt.Fragment,{children:[nt.jsx(ad,{...e,hoursData:l,isClient:!1}),d&&d.length>0&&nt.jsx(ad,{...e,hoursData:d,isClient:!1,isHolidayHours:!0}),t.reopenDate&&nt.jsxs("div",{className:"HoursTable-row",children:[nt.jsx("span",{className:"HoursTable-day",children:(r==null?void 0:r.reopenDate)||"Reopen Date"}),nt.jsx("span",{className:"HoursTable-intervals",children:vt.fromFormat(t.reopenDate,"yyyy-MM-dd").setLocale((r==null?void 0:r.timeFormatLocale)||"en-US").toLocaleString()})]})]})},ad=e=>{const{intervalStringsBuilderFn:t,className:n,timeOptions:r,intervalTranslations:l,dayOfWeekNames:d,startOfWeek:f,isClient:p,isHolidayHours:_}=e;let E=e.hoursData;function T(O){return O?{today:Dc(vt.now()),monday:Yt.Monday,tuesday:Yt.Tuesday,wednesday:Yt.Wednesday,thursday:Yt.Thursday,friday:Yt.Friday,saturday:Yt.Saturday,sunday:Yt.Sunday}[O]:Yt.Sunday}const S=ld.indexOf(T(p||f!=="today"?f:"sunday")),w=cS(ld,7-S);return _||(E.sort((O,m)=>w.indexOf(O.startDay)-w.indexOf(m.startDay)),e.collapseDays&&(E=NS(E,d))),nt.jsx("div",{className:lo("HoursTable",n),children:E.map(O=>{const v=(t||CS)(O,r,l);return nt.jsxs("div",{className:lo("HoursTable-row",{"is-today":O.isToday}),children:[nt.jsx("span",{className:"HoursTable-day",children:O.dayName}),nt.jsx("span",{className:"HoursTable-intervals",children:v.map((I,G)=>nt.jsx("span",{className:"HoursTable-interval",children:I},G))})]},O.dayName)})})},SS=e=>`<script type="application/ld+json">
110
110
  ${JSON.stringify(e)}
111
111
  <\/script>`,Ac=(e,t)=>{if(!(!e.name||typeof e.name!="string"))return{"@context":"https://schema.org","@type":t,name:e.name}},wS=e=>typeof e!="object"?!1:!!e.name||!!e.address,OS=e=>typeof e!="object"?!1:!!e.line1||!!e.city||!!e.region||!!e.postalCode||!!e.countryCode,Kd=e=>OS(e)&&{address:{"@type":"PostalAddress",streetAddress:e.line1,addressLocality:e.city,addressRegion:e.region,postalCode:e.postalCode,addressCountry:e.countryCode}},c_=e=>wS(e)&&{"@type":"Place",name:e.name,...Kd(e.address)},u_=e=>typeof e!="object"||!("image"in e)?!1:"url"in e.image&&typeof e.image.url=="string",Mc=e=>{if(!e)return{};const t=new Array;for(const n of e)u_(n)&&t.push(n.image.url);return{image:t}},DS=e=>u_(e)&&{image:e.image.url},AS=e=>typeof e!="object"?!1:!!e.name,MS=e=>Array.isArray(e)&&e.length>0,d_=e=>MS(e)&&{performer:{"@type":"PerformingGroup",name:e.join(" and ")}},f_=e=>AS(e)&&{organizer:{"@type":"Organization",name:e.name,...e.url&&{url:e.url}}},RS=["BackOrder","Discontinued","InStock","InStoreOnly","LimitedAvailability","MadeToOrder","OnlineOnly","OutOfStock","PreOrder","PreSale","Reserved","SoldOut"],bS=e=>typeof e!="object"?!1:"priceCurrency"in e&&"price"in e&&"availability"in e&&RS.includes(e.availability),zd=e=>bS(e)&&{offers:{"@type":"Offer",url:e.url,priceCurrency:e.priceCurrency,price:e.price,priceValidUntil:e.priceValidUntil,itemCondition:e.itemCondition,availability:e.availability}},LS=(e,t)=>{const n=c_({name:e.geomodifier,address:e.address});return{...Ac(e,t??"Event"),...Mc(e.photoGallery),...n&&{location:n},...d_(e.performers),...f_({name:e.organizerName}),...zd({url:"",priceCurrency:e.c_currency,price:e.price,priceValidUntil:e.expirationDate,itemCondition:e.condition,availability:e.stockStatus}),...e.c_startDate&&{startDate:e.c_startDate},...e.c_endDate&&{endDate:e.c_endDate},...e.description&&{description:e.description},...e.attendance&&{eventAttendanceMode:e.attendance},...e.eventStatus&&{eventStatus:e.eventStatus}}},IS=e=>typeof e!="object"?!1:"monday"in e||"tuesday"in e||"wednesday"in e||"thursday"in e||"friday"in e||"saturday"in e||"sunday"in e,kS=e=>typeof e!="object"?!1:e.isClosed?!0:"openIntervals"in e&&Array.isArray(e.openIntervals)&&e.openIntervals.length?e.openIntervals.every(t=>typeof t=="object"&&"start"in t&&"end"in t):!1,h_=e=>{if(!IS(e))return{};let t=new Map;t=eo(e.monday,t,"Mo"),t=eo(e.tuesday,t,"Tu"),t=eo(e.wednesday,t,"We"),t=eo(e.thursday,t,"Th"),t=eo(e.friday,t,"Fr"),t=eo(e.saturday,t,"Sa"),t=eo(e.sunday,t,"Su");const n=new Array;for(const[r,l]of t){const d=l.join(",");n.push(d+" "+r)}return{openingHours:n}},eo=(e,t,n)=>{if(!kS(e))return t;if(e.isClosed||!e.openIntervals){const r="00:00-00:00",l=t.get(r)??[];return l.push(n),t.set(r,l),t}for(let r=0;r<e.openIntervals.length;r++){const l=e.openIntervals[r].start+"-"+e.openIntervals[r].end,d=t.get(l)??[];d.push(n),t.set(l,d)}return t},PS=(e,t)=>({...Ac(e,t??"LocalBusiness"),...Kd(e.address),...h_(e.hours),...Mc(e.photoGallery),description:e.description,telephone:e.mainPhone,email:e.email}),$S=e=>typeof e!="object"?!1:"ratingValue"in e,FS=e=>typeof e!="object"?!1:"ratingValue"in e&&"reviewCount"in e,g_=e=>$S(e)&&{review:{"@type":"Review",reviewRating:{"@type":"Rating",ratingValue:e.ratingValue,bestRating:e.bestRating},...e.author&&{author:{"@type":"Person",name:e.author}}}},p_=e=>FS(e)?{aggregateRating:{"@type":"AggregateRating",ratingValue:e.ratingValue,reviewCount:e.reviewCount}}:void 0,BS=(e,t)=>({...Ac(e,t??"Product"),...Mc(e.photoGallery),...g_(e.c_reviews),...p_(e.c_aggregateRating),...zd({url:"",priceCurrency:e.c_currency,price:e.price,priceValidUntil:e.expirationDate,itemCondition:e.condition,availability:e.stockStatus}),description:e.description,sku:e.sku,mpn:e.mpn,...e.brand&&{brand:{"@type":"Brand",name:e.brand}}}),HS=e=>!e||typeof e!="object"?!1:"question"in e&&"answer"in e,WS=e=>!e||typeof e!="object"?!1:"question"in e&&"answerV2"in e?"json"in e.answerV2&&typeof e.answerV2.json=="object":!1;function cd(e,t){for(const n in e)if(typeof e[n]=="object")if(Array.isArray(e[n]))for(let r=0;r<e[n].length;r++)cd(e[n][r],t);else cd(e[n],t);else n==="text"&&t.push(e[n])}function m_(e){if(e.json){const t=[];return cd(e.json,t),t.join("")}return""}const KS=e=>{const t=e.map(n=>{if(HS(n)||WS(n))return{"@type":"Question",name:n.question,acceptedAnswer:{"@type":"Answer",text:"answer"in n?n.answer:m_(n.answerV2)}}}).filter(Boolean);if(t.length)return{"@context":"http://www.schema.org","@type":"FAQPage",mainEntity:t}},ud=Math.log2(1.6745627884839434),zS=4,US=19,dd="js-baidu-neg-lng-fix";let __;const GS=new Promise(e=>__=e),YS="https://api.map.baidu.com/geoconv/v1/";let Ql=[];const jS="gcj02ToBD09Callback_b872c21c";let VS=0,op;async function y_(e){return await new Promise((t,n)=>{Ql.push({coordinates:e,resolve:t,reject:n}),Ql.length===1&&(op=setTimeout(r,100)),Ql.length>40&&(clearTimeout(op),r());function r(){const l=Ql;Ql=[];const d=[].concat(...l.map(_=>_.coordinates)),f=jS+"_"+VS++,p=document.createElement("script");window[f]=_=>{var S;if(_.status){const w=new Error(`Unable to convert coordinates to BD-09: Received status code ${_.status}${_.message?": "+_.message:""}`);l.forEach(O=>O.reject(w))}const E=_.result.map(w=>new dn(w.y,w.x));let T=0;l.forEach(w=>{w.resolve(E.slice(T,T+=w.coordinates.length))}),delete window[f],(S=p.parentNode)==null||S.removeChild(p)},GS.then(_=>{const E={ak:_,callback:f,coords:d.map(T=>`${T.longitude},${T.latitude}`).join(";"),from:3,to:5};p.src=YS+"?"+Object.entries(E).map(([T,S])=>T+"="+S).join("&"),document.head.appendChild(p)})}})}class qS extends rl{constructor(n){super(n);Ie(this,"_wrapper");Ie(this,"map");Ie(this,"_panStartHandler");Ie(this,"_panHandler");Ie(this,"_centerReady");const r=!!(window.MSInputMethodContext&&document.DOCUMENT_NODE);this._wrapper=n.wrapper,this.map=new BMap.Map(this._wrapper,{enableMapClick:n.controlEnabled,maxZoom:r?14:18,...n.providerOptions}),n.controlEnabled?(this.map.enableScrollWheelZoom(),this.map.addControl(new BMap.NavigationControl({anchor:BMAP_ANCHOR_TOP_RIGHT,type:BMAP_NAVIGATION_CONTROL_ZOOM}))):(this.map.disableDragging(),this.map.disableDoubleClickZoom(),this.map.disablePinchToZoom()),this._panStartHandler=()=>null,this._panHandler=()=>null,this.map.addEventListener("movestart",()=>this._panStartHandler()),this.map.addEventListener("moveend",()=>this._panHandler()),this.map.addEventListener("zoomstart",()=>this._panStartHandler()),this.map.addEventListener("zoomend",()=>{this._wrapper&&(this._wrapper.dataset.baiduZoom=this.map.getZoom()),this._panHandler()}),this._centerReady=Promise.resolve()}getCenter(){return new dn(this.map.getCenter())}getZoom(){return this.map.getZoom()-ud}setCenter(n,r){this._centerReady=y_([n]).then(([l])=>{const d=new BMap.Point(l.longitude,l.latitude);this.map.panTo(d,{noAnimation:!r})})}setZoom(n,r){this._centerReady.then(()=>{this.map.setViewport({center:this.map.getCenter(),zoom:Math.floor(n+ud)},{enableAnimation:r})})}}class ZS extends il{constructor(n){super(n);Ie(this,"_wrapper");Ie(this,"_zIndex");Ie(this,"_wrapperClass");Ie(this,"_originalWrapperClass");Ie(this,"_element");Ie(this,"_coordinateReady");Ie(this,"_negativeLngFix");Ie(this,"pin");this._wrapper=null,this._zIndex=0,this._wrapperClass="",this._originalWrapperClass="",this._element=this._pinEl,this._coordinateReady=Promise.resolve(),this._negativeLngFix=!1;class r extends BMap.Marker{constructor(p,_){super(p);Ie(this,"pin");this.pin=_}initialize(p){return this.pin._wrapper=super.initialize(p),this.pin._wrapper&&(this.pin._wrapper.style.zIndex=this.pin._zIndex.toString(),this.pin._originalWrapperClass=this.pin._wrapper.getAttribute("class")??"",this.pin._wrapper.setAttribute("class",this.pin._getClass()),this.pin._wrapper.appendChild(this.pin._element),this.pin.addListeners()),this.pin._wrapper}draw(){if(this.pin._wrapper){const p=this.pin._wrapper.style.zIndex;super.draw(),this.pin._wrapper.style.height="",this.pin._wrapper.style.width="",this.pin._wrapper.style.pointerEvents="none",this.pin._wrapper.style.zIndex=p}else super.draw()}}this.pin=new r(new BMap.Point(0,0),this);const l=new BMap.Icon("data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",{height:0,width:0});this.pin.setIcon(l),this.pin.setShadow(l)}addListeners(){super.addListeners(),this._wrapper&&this._wrapper.addEventListener("touchend",()=>this._clickHandler())}setCoordinate(n){this._coordinateReady=y_([n]).then(([r])=>{this._negativeLngFix=r.longitude<0,this.pin.setPosition(new BMap.Point(r.longitude+(this._negativeLngFix?180:0),r.latitude)),this._wrapper&&this._wrapper.classList[this._negativeLngFix?"add":"remove"](dd)})}setMap(n,r){this._coordinateReady.then(()=>{r&&r.getProviderMap().map.removeOverlay(this.pin),n&&n.getProviderMap().map.addOverlay(this.pin)})}setProperties(n){super.setProperties(n),this._wrapperClass=n.getClass(),this._element=n.getElement()||this._pinEl,this._zIndex=n.getZIndex(),this._wrapper&&this._wrapper.setAttribute("class",this._getClass())}_getClass(){return`${this._originalWrapperClass} ${this._negativeLngFix?dd:""} ${this._wrapperClass}`}}const JS="https://api.map.baidu.com/getscript";function XS(e,t,n,{params:r={},version:l="3.0"}={}){window.BMAP_PROTOCOL="https",window.BMap_loadScriptTime=new Date().getTime();const d=n,f={ak:d,v:l,...r};__(d);const p=document.createElement("script");p.src=JS+"?"+Object.entries(f).map(([T,S])=>T+"="+S).join("&"),p.onload=()=>e(),document.head.appendChild(p);let _="";for(let T=zS;T<=US;T++){const S=2**(T-ud+7);_+=`[data-baidu-zoom="${T}"] .${dd}{transform:translateX(-${S}px);}`}const E=document.createElement("style");E.appendChild(document.createTextNode(_)),document.head.appendChild(E)}const QS=new ao().withLoadFunction(XS).withMapClass(qS).withPinClass(ZS).withProviderName("Baidu").build();let N_;function ew(){class e extends Microsoft.Maps.CustomOverlay{constructor(){super({beneathLabels:!1});Ie(this,"_container");Ie(this,"_pins");Ie(this,"_viewChangeEventHandler");Ie(this,"_map");this._container=document.createElement("div"),this._pins=new Set,this._viewChangeEventHandler=null,this._container.style.position="absolute",this._container.style.left="0",this._container.style.top="0"}addPin(r){this._pins.add(r),r._wrapper&&(r._wrapper.style.position="absolute",this._container.appendChild(r._wrapper)),this._map&&this.updatePinPosition(r)}onAdd(){this._map=this.getMap(),this.setHtmlElement(this._container)}onLoad(){this._viewChangeEventHandler=Microsoft.Maps.Events.addHandler(this._map,"viewchange",()=>this.updatePinPositions()),this.updatePinPositions()}onRemove(){this._viewChangeEventHandler&&Microsoft.Maps.Events.removeHandler(this._viewChangeEventHandler),this._map=null}removePin(r){this._pins.delete(r),r._wrapper&&this._container.removeChild(r._wrapper)}updatePinPosition(r){if(!this._map)return;const l=this._map.tryLocationToPixel(r._location,Microsoft.Maps.PixelReference.control);r._wrapper&&l instanceof Microsoft.Maps.Point&&(r._wrapper.style.left=l.x+"px",r._wrapper.style.top=l.y+"px")}updatePinPositions(){this._pins.forEach(r=>this.updatePinPosition(r))}}N_=e}class tw extends rl{constructor(n){super(n);Ie(this,"wrapper");Ie(this,"map");Ie(this,"pinOverlay");this.wrapper=n.wrapper,this.wrapper&&(this.map=new Microsoft.Maps.Map(this.wrapper,{disablePanning:!n.controlEnabled,disableZooming:!n.controlEnabled,showLocateMeButton:!1,showMapTypeSelector:!1,showScalebar:!1,showTrafficButton:!1,...n.providerOptions}),this.pinOverlay=new N_(this.map),this.map.layers.insert(this.pinOverlay),Microsoft.Maps.Events.addHandler(this.map,"viewchangestart",()=>this._panStartHandler()),Microsoft.Maps.Events.addHandler(this.map,"viewchangeend",()=>this._panHandler()))}getCenter(){var n;return new dn(((n=this.map)==null?void 0:n.getCenter())??{lat:0,lng:0})}getZoom(){var n;return((n=this.map)==null?void 0:n.getZoom())??0}setCenter(n,r){var d;const l=new Microsoft.Maps.Location(n.latitude,n.longitude);(d=this.map)==null||d.setView({center:l}),this.pinOverlay.updatePinPositions()}setZoom(n,r){var l;(l=this.map)==null||l.setView({zoom:Math.floor(n)}),this.pinOverlay.updatePinPositions()}}class C_ extends il{constructor(n){super(n);Ie(this,"_location");Ie(this,"_map");this._map=null,this._location=new Microsoft.Maps.Location(0,0)}static getId(){return this._pinId=(this._pinId||0)+1,this._pinId}setCoordinate(n){this._location=new Microsoft.Maps.Location(n.latitude,n.longitude),this._map&&this._map.getProviderMap().pinOverlay.updatePinPosition(this)}setMap(n,r){r&&r.getProviderMap().pinOverlay.removePin(this),n&&n.getProviderMap().pinOverlay.addPin(this),this._map=n}}Ie(C_,"_pinId");const lp="BingMapsCallback_593d7d33",nw="https://www.bing.com/api/maps/mapcontrol";function rw(e,t,n,{params:r={}}={}){window[lp]=()=>{ew(),e()};const l={callback:lp,key:n,...r};mp(nw+"?"+Object.entries(l).map(([d,f])=>d+"="+f).join("&"))}const iw=new ao().withLoadFunction(rw).withMapClass(tw).withPinClass(C_).withProviderName("Bing").build();class sw extends rl{constructor(n){var r,l,d;super(n);Ie(this,"map");if(n.wrapper&&(this.map=new mapboxgl.Map({container:n.wrapper,interactive:n.controlEnabled,style:"mapbox://styles/mapbox/streets-v9",...n.providerOptions})),n.controlEnabled){const f=new mapboxgl.NavigationControl({showCompass:!1});(r=this.map)==null||r.addControl(f)}(l=this.map)==null||l.on("movestart",()=>this._panStartHandler()),(d=this.map)==null||d.on("moveend",()=>this._panHandler())}getCenter(){var n;return new dn(((n=this.map)==null?void 0:n.getCenter())??{lat:0,lng:0})}getZoom(){var n;return(((n=this.map)==null?void 0:n.getZoom())??0)+1}setCenter(n,r){const l=new mapboxgl.LngLat(n.longitude,n.latitude);this.map&&this.map[r?"panTo":"setCenter"](l)}setZoom(n,r){this.map&&this.map[r?"zoomTo":"setZoom"](n-1)}setZoomCenter(n,r,l){const d=new mapboxgl.LngLat(r.longitude,r.latitude);this.map&&this.map[l?"easeTo":"jumpTo"]({center:d,zoom:n-1})}}class ow extends il{constructor(n){super(n);Ie(this,"pin");this._wrapper&&(this._wrapper.style.position="relative",this.pin=new mapboxgl.Marker({anchor:"top-left",element:this._wrapper}))}setCoordinate(n){var r;(r=this.pin)==null||r.setLngLat(new mapboxgl.LngLat(n.longitude,n.latitude))}setMap(n,r){var l,d;if(n){const f=n.getProviderMap().map;f&&((l=this.pin)==null||l.addTo(f))}else(d=this.pin)==null||d.remove()}}function lw(e,t,n,{version:r="v1.13.0"}={}){const l=`https://api.mapbox.com/mapbox-gl-js/${r}/mapbox-gl`,d=document.createElement("link");d.rel="stylesheet",d.href=l+".css";const f=document.createElement("script");f.src=l+".js",f.onload=()=>{mapboxgl.accessToken=n,e()},document.head.appendChild(d),document.head.appendChild(f)}const aw=new ao().withLoadFunction(lw).withMapClass(sw).withPinClass(ow).withProviderName("Mapbox").build();var so;let E_=(so=class extends rl{constructor(n){var r,l,d;super(n);Ie(this,"map");this._initMap(n),n.controlEnabled&&((r=this.map)==null||r.zoomControl.setPosition("topright")),(l=this.map)==null||l.on("movestart",()=>this._panStartHandler()),(d=this.map)==null||d.on("moveend",()=>this._panHandler())}getCenter(){var n;return new dn(((n=this.map)==null?void 0:n.getCenter())??{lat:0,lng:0})}getZoom(){var n;return((n=this.map)==null?void 0:n.getZoom())??0}setCenter(n,r){var d;const l=new L.LatLng(n.latitude,n.longitude);(d=this.map)==null||d.panTo(l,{animate:r})}setZoom(n,r){var l;(l=this.map)==null||l.setZoom(n,{animate:r})}setZoomCenter(n,r,l){var f;const d=new L.LatLng(r.latitude,r.longitude);(f=this.map)==null||f.setView(d,n,{animate:l})}_initMap(n){n.wrapper&&(this.map=new L.Map(n.wrapper,{boxZoom:n.controlEnabled,doubleClickZoom:n.controlEnabled,dragging:n.controlEnabled,zoom:0,zoomControl:n.controlEnabled,zoomSnap:0,...n.providerOptions}));const r=n.providerOptions,l=r.tileLayerSrc||"https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token={accessToken}",d=r.tileLayerOptions||{attribution:'Map data &copy; <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="https://www.mapbox.com/">Mapbox</a>',id:"mapbox/streets-v11"};d.accessToken=so.apiKey,this.map&&L.tileLayer(l,d).addTo(this.map)}},Ie(so,"apiKey"),so),cw=class extends _d{constructor(n){super(n);Ie(this,"pin");this.pin=new L.Marker(new L.LatLng(0,0)),this.pin.on("click",()=>this._clickHandler()),this.pin.on("mouseover",()=>this._hoverHandler(!0)),this.pin.on("mouseout",()=>this._hoverHandler(!1))}setCoordinate(n){const r=new L.LatLng(n.latitude,n.longitude);this.pin.setLatLng(r)}setMap(n,r){if(n){const l=n.getProviderMap().map;l&&this.pin.addTo(l)}else this.pin.remove()}setProperties(n){const r=n.getWidth(),l=n.getHeight(),d=n.getAnchorX(),f=n.getAnchorY();this.pin.setIcon(new L.Icon({iconUrl:this._icons[n.getIcon()],iconSize:[r,l],iconAnchor:[d*r,f*l],className:n.getClass()})),this.pin.setZIndexOffset(n.getZIndex())}};function uw(e,t,n,{version:r="1.7.1"}={}){const l=`https://unpkg.com/leaflet@${r}/dist/leaflet`;E_.apiKey=n;const d=document.createElement("link");d.rel="stylesheet",d.href=l+".css";const f=document.createElement("script");f.src=l+".js",f.onload=()=>e(),document.head.appendChild(d),document.head.appendChild(f)}const Ud=new ao().withLoadFunction(uw).withMapClass(E_).withPinClass(cw).withProviderName("Leaflet").build(),dw=Ud.getMapClass(),fw=Ud.getPinClass();class hw extends dw{constructor(){super(...arguments);Ie(this,"map")}_initMap(n){this.map=L.mapquest.map(n.wrapper,{boxZoom:n.controlEnabled,center:new L.LatLng(0,0),doubleClickZoom:n.controlEnabled,dragging:n.controlEnabled,layers:L.mapquest.tileLayer("map"),zoom:0,zoomControl:n.controlEnabled,zoomSnap:0,...n.providerOptions})}}class gw extends fw{}function pw(e,t,n,{version:r="v1.3.2"}={}){const l=`https://api.mqcdn.com/sdk/mapquest-js/${r}/mapquest-maps`,d=document.createElement("link");d.rel="stylesheet",d.href=l+".css";const f=document.createElement("script");f.src=l+".js",f.onload=()=>{L.mapquest.key=n,e()},document.head.appendChild(d),document.head.appendChild(f)}const mw=new ao().withLoadFunction(pw).withMapClass(hw).withPinClass(gw).withProviderName("MapQuest").build();exports.Address=fy;exports.AddressSchema=Kd;exports.AggregateRatingSchema=p_;exports.Analytics=fp;exports.AnalyticsContext=pd;exports.AnalyticsProvider=Jy;exports.AnalyticsScopeProvider=Xy;exports.BaiduMaps=QS;exports.BaseSchema=Ac;exports.BingMaps=iw;exports.Clusterer=$N;exports.Coordinate=dn;exports.Day=Yt;exports.Event=LS;exports.FAQPage=KS;exports.GoogleMaps=Np;exports.HoursStatus=yS;exports.HoursTable=TS;exports.Image=oN;exports.ImageLayoutOption=Es;exports.LeafletMaps=Ud;exports.LegacyRichText=ox;exports.LexicalRichText=yE;exports.Link=pp;exports.ListingPublisherOption=ap;exports.LocalBusiness=PS;exports.LocationMap=HN;exports.LocationSchema=c_;exports.Map=Tp;exports.MapProviderOption=Uu;exports.MapQuestMaps=mw;exports.MapboxMaps=aw;exports.Marker=Cd;exports.OfferSchema=zd;exports.OpeningHoursSchema=h_;exports.OrganizationSchema=f_;exports.PerformerSchema=d_;exports.PhotoGallerySchema=Mc;exports.PhotoSchema=DS;exports.Product=BS;exports.ReviewSchema=g_;exports.SchemaWrapper=SS;exports.asciiAlpha=DE;exports.asciiAlphanumeric=ed;exports.asciiAtext=AE;exports.asciiControl=ME;exports.asciiDigit=RE;exports.asciiHexDigit=bE;exports.asciiPunctuation=LE;exports.c=lo;exports.classifyCharacter=aa;exports.combineExtensions=jp;exports.createState=VT;exports.debuggingParamDetected=uc;exports.getDefaultExportFromCjs=hd;exports.getDirections=uy;exports.getRichTextContent=m_;exports.getRuntime=Qo;exports.jsxRuntimeExports=nt;exports.markdownLineEnding=IE;exports.markdownLineEndingOrSpace=em;exports.markdownSpace=kE;exports.normalizeUri=ol;exports.push=Vo;exports.resolveAll=tm;exports.splice=Cc;exports.useAnalytics=nl;exports.useClusterContext=PN;exports.useIdentify=tN;exports.useMapContext=IN;exports.usePageView=eN;exports.useScope=md;exports.useTrack=Qy;exports.visit=Ld;
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const On=require("react"),m=require("./index-B42syM2P.cjs");function er(n){const t=[];let e=-1;for(;++e<n.footnoteOrder.length;){const r=n.footnoteById[n.footnoteOrder[e]];if(!r)continue;const i=n.all(r),l=String(r.identifier).toUpperCase(),o=m.normalizeUri(l.toLowerCase());let a=0;const s=[];for(;++a<=n.footnoteCounts[l];){const p={type:"element",tagName:"a",properties:{href:"#"+n.clobberPrefix+"fnref-"+o+(a>1?"-"+a:""),dataFootnoteBackref:!0,className:["data-footnote-backref"],ariaLabel:n.footnoteBackLabel},children:[{type:"text",value:"↩"}]};a>1&&p.children.push({type:"element",tagName:"sup",children:[{type:"text",value:String(a)}]}),s.length>0&&s.push({type:"text",value:" "}),s.push(p)}const c=i[i.length-1];if(c&&c.type==="element"&&c.tagName==="p"){const p=c.children[c.children.length-1];p&&p.type==="text"?p.value+=" ":c.children.push({type:"text",value:" "}),c.children.push(...s)}else i.push(...s);const d={type:"element",tagName:"li",properties:{id:n.clobberPrefix+"fn-"+o},children:n.wrap(i,!0)};n.patch(r,d),t.push(d)}if(t.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:n.footnoteLabelTagName,properties:{...JSON.parse(JSON.stringify(n.footnoteLabelProperties)),id:"footnote-label"},children:[{type:"text",value:n.footnoteLabel}]},{type:"text",value:`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const On=require("react"),m=require("./index-BUNvw5E2.cjs");function er(n){const t=[];let e=-1;for(;++e<n.footnoteOrder.length;){const r=n.footnoteById[n.footnoteOrder[e]];if(!r)continue;const i=n.all(r),l=String(r.identifier).toUpperCase(),o=m.normalizeUri(l.toLowerCase());let a=0;const s=[];for(;++a<=n.footnoteCounts[l];){const p={type:"element",tagName:"a",properties:{href:"#"+n.clobberPrefix+"fnref-"+o+(a>1?"-"+a:""),dataFootnoteBackref:!0,className:["data-footnote-backref"],ariaLabel:n.footnoteBackLabel},children:[{type:"text",value:"↩"}]};a>1&&p.children.push({type:"element",tagName:"sup",children:[{type:"text",value:String(a)}]}),s.length>0&&s.push({type:"text",value:" "}),s.push(p)}const c=i[i.length-1];if(c&&c.type==="element"&&c.tagName==="p"){const p=c.children[c.children.length-1];p&&p.type==="text"?p.value+=" ":c.children.push({type:"text",value:" "}),c.children.push(...s)}else i.push(...s);const d={type:"element",tagName:"li",properties:{id:n.clobberPrefix+"fn-"+o},children:n.wrap(i,!0)};n.patch(r,d),t.push(d)}if(t.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:n.footnoteLabelTagName,properties:{...JSON.parse(JSON.stringify(n.footnoteLabelProperties)),id:"footnote-label"},children:[{type:"text",value:n.footnoteLabel}]},{type:"text",value:`
2
2
  `},{type:"element",tagName:"ol",properties:{},children:n.wrap(t,!0)},{type:"text",value:`
3
3
  `}]}}function yt(n,t){const e=m.createState(n,t),r=e.one(n,null),i=er(e);return i&&r.children.push({type:"text",value:`
4
4
  `},i),Array.isArray(r)?{type:"root",children:r}:r}const tr=function(n,t){return n&&"run"in n?rr(n,t):ir(n||t)};function rr(n,t){return(e,r,i)=>{n.run(yt(e,t),r,l=>{i(l)})}}function ir(n){return t=>yt(t,n)}const Pe=["http","https","mailto","tel"];function xt(n){const t=(n||"").trim(),e=t.charAt(0);if(e==="#"||e==="/")return t;const r=t.indexOf(":");if(r===-1)return t;let i=-1;for(;++i<Pe.length;){const l=Pe[i];if(r===l.length&&t.slice(0,l.length).toLowerCase()===l)return t}return i=t.indexOf("?"),i!==-1&&r>i||(i=t.indexOf("#"),i!==-1&&r>i)?t:"javascript:void(0)"}/*!
@@ -1547,7 +1547,7 @@ const Uy = (e) => {
1547
1547
  default:
1548
1548
  return "";
1549
1549
  }
1550
- }, up = Ec(null), Gy = X_(() => import("./debugger-DoQ3QjB9.js"));
1550
+ }, up = Ec(null), Gy = X_(() => import("./debugger-CgvWSiIa.js"));
1551
1551
  function XS(e) {
1552
1552
  const {
1553
1553
  children: t,
@@ -2102,7 +2102,7 @@ var hp = { exports: {} };
2102
2102
  })(hp);
2103
2103
  var eN = hp.exports;
2104
2104
  const el = /* @__PURE__ */ op(eN), tN = "phonecall", nN = "drivingdirection", Tf = "calltoactionclick", rN = "clicktowebsite", iN = "other", xf = "link", sN = "cta", oN = (e) => {
2105
- const t = e.cta ?? { link: e.href };
2105
+ const t = { ...e.cta ?? { link: e.href } };
2106
2106
  if (!t.link)
2107
2107
  throw e.cta ? new Error("CTA's link is undefined") : new Error("Link's href is undefined");
2108
2108
  return t.linkType || (t.linkType = cN(t.link)), t.link = uN(t), t;
@@ -26097,7 +26097,7 @@ const kT = (e, t) => e(t, "i", is(e, t)), PT = (e, t) => e(t, "b", is(e, t)), $T
26097
26097
  (async () => {
26098
26098
  if (!r)
26099
26099
  try {
26100
- r = (await import("./index-BkH-nrXZ.js")).default;
26100
+ r = (await import("./index-B-lQrz2O.js")).default;
26101
26101
  } catch {
26102
26102
  throw new Error(
26103
26103
  "Failed to import React Markdown, cannot properly render LegacyRichText."
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-B42syM2P.cjs");exports.Address=e.Address;exports.AddressSchema=e.AddressSchema;exports.AggregateRatingSchema=e.AggregateRatingSchema;exports.Analytics=e.Analytics;exports.AnalyticsContext=e.AnalyticsContext;exports.AnalyticsProvider=e.AnalyticsProvider;exports.AnalyticsScopeProvider=e.AnalyticsScopeProvider;exports.BaiduMaps=e.BaiduMaps;exports.BaseSchema=e.BaseSchema;exports.BingMaps=e.BingMaps;exports.Clusterer=e.Clusterer;exports.CoordinateClass=e.Coordinate;exports.Day=e.Day;exports.Event=e.Event;exports.FAQPage=e.FAQPage;exports.GoogleMaps=e.GoogleMaps;exports.HoursStatus=e.HoursStatus;exports.HoursTable=e.HoursTable;exports.Image=e.Image;exports.ImageLayoutOption=e.ImageLayoutOption;exports.LeafletMaps=e.LeafletMaps;exports.LegacyRichText=e.LegacyRichText;exports.LexicalRichText=e.LexicalRichText;exports.Link=e.Link;exports.ListingPublisherOption=e.ListingPublisherOption;exports.LocalBusiness=e.LocalBusiness;exports.LocationMap=e.LocationMap;exports.LocationSchema=e.LocationSchema;exports.Map=e.Map;exports.MapProviderOption=e.MapProviderOption;exports.MapQuestMaps=e.MapQuestMaps;exports.MapboxMaps=e.MapboxMaps;exports.Marker=e.Marker;exports.OfferSchema=e.OfferSchema;exports.OpeningHoursSchema=e.OpeningHoursSchema;exports.OrganizationSchema=e.OrganizationSchema;exports.PerformerSchema=e.PerformerSchema;exports.PhotoGallerySchema=e.PhotoGallerySchema;exports.PhotoSchema=e.PhotoSchema;exports.Product=e.Product;exports.ReviewSchema=e.ReviewSchema;exports.SchemaWrapper=e.SchemaWrapper;exports.debuggingParamDetected=e.debuggingParamDetected;exports.getDirections=e.getDirections;exports.getRichTextContent=e.getRichTextContent;exports.useAnalytics=e.useAnalytics;exports.useClusterContext=e.useClusterContext;exports.useIdentify=e.useIdentify;exports.useMapContext=e.useMapContext;exports.usePageView=e.usePageView;exports.useScope=e.useScope;exports.useTrack=e.useTrack;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-BUNvw5E2.cjs");exports.Address=e.Address;exports.AddressSchema=e.AddressSchema;exports.AggregateRatingSchema=e.AggregateRatingSchema;exports.Analytics=e.Analytics;exports.AnalyticsContext=e.AnalyticsContext;exports.AnalyticsProvider=e.AnalyticsProvider;exports.AnalyticsScopeProvider=e.AnalyticsScopeProvider;exports.BaiduMaps=e.BaiduMaps;exports.BaseSchema=e.BaseSchema;exports.BingMaps=e.BingMaps;exports.Clusterer=e.Clusterer;exports.CoordinateClass=e.Coordinate;exports.Day=e.Day;exports.Event=e.Event;exports.FAQPage=e.FAQPage;exports.GoogleMaps=e.GoogleMaps;exports.HoursStatus=e.HoursStatus;exports.HoursTable=e.HoursTable;exports.Image=e.Image;exports.ImageLayoutOption=e.ImageLayoutOption;exports.LeafletMaps=e.LeafletMaps;exports.LegacyRichText=e.LegacyRichText;exports.LexicalRichText=e.LexicalRichText;exports.Link=e.Link;exports.ListingPublisherOption=e.ListingPublisherOption;exports.LocalBusiness=e.LocalBusiness;exports.LocationMap=e.LocationMap;exports.LocationSchema=e.LocationSchema;exports.Map=e.Map;exports.MapProviderOption=e.MapProviderOption;exports.MapQuestMaps=e.MapQuestMaps;exports.MapboxMaps=e.MapboxMaps;exports.Marker=e.Marker;exports.OfferSchema=e.OfferSchema;exports.OpeningHoursSchema=e.OpeningHoursSchema;exports.OrganizationSchema=e.OrganizationSchema;exports.PerformerSchema=e.PerformerSchema;exports.PhotoGallerySchema=e.PhotoGallerySchema;exports.PhotoSchema=e.PhotoSchema;exports.Product=e.Product;exports.ReviewSchema=e.ReviewSchema;exports.SchemaWrapper=e.SchemaWrapper;exports.debuggingParamDetected=e.debuggingParamDetected;exports.getDirections=e.getDirections;exports.getRichTextContent=e.getRichTextContent;exports.useAnalytics=e.useAnalytics;exports.useClusterContext=e.useClusterContext;exports.useIdentify=e.useIdentify;exports.useMapContext=e.useMapContext;exports.usePageView=e.usePageView;exports.useScope=e.useScope;exports.useTrack=e.useTrack;
@@ -1,4 +1,4 @@
1
- import { A as e, a3 as t, ab as i, x as o, y as r, E as c, H as n, ad as p, Z as g, ae as u, Q as h, aj as m, X as l, _ as S, a1 as d, af as M, V as P, W as y, I as x, J as A, ah as L, U as C, T as f, K as O, L as R, $ as T, S as b, a4 as v, N as B, M as D, ai as H, ag as I, P as k, a6 as w, a5 as G, a8 as Q, a7 as z, a9 as E, aa as F, a0 as V, ac as W, Y as j, F as J, w as K, a2 as N, z as U, R as X, D as Y, O as Z, C as _, G as $, B as q } from "./index-BdqMb-Um.js";
1
+ import { A as e, a3 as t, ab as i, x as o, y as r, E as c, H as n, ad as p, Z as g, ae as u, Q as h, aj as m, X as l, _ as S, a1 as d, af as M, V as P, W as y, I as x, J as A, ah as L, U as C, T as f, K as O, L as R, $ as T, S as b, a4 as v, N as B, M as D, ai as H, ag as I, P as k, a6 as w, a5 as G, a8 as Q, a7 as z, a9 as E, aa as F, a0 as V, ac as W, Y as j, F as J, w as K, a2 as N, z as U, R as X, D as Y, O as Z, C as _, G as $, B as q } from "./index-DKVTGEU-.js";
2
2
  export {
3
3
  e as Address,
4
4
  t as AddressSchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yext/pages-components",
3
- "version": "1.1.10",
3
+ "version": "1.1.11",
4
4
  "description": "A React component library that supports Yext Pages development",
5
5
  "author": "sumo@yext.com",
6
6
  "license": "BSD-3-Clause",