@photonhealth/elements 0.0.82 → 0.0.84

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/index.js +86 -90
  2. package/dist/index.mjs +1887 -1889
  3. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,17 +1,17 @@
1
- "use strict";const fr={};function u$(e){fr.context=e}const d$=(e,t)=>e===t,br=Symbol("solid-proxy"),wu=Symbol("solid-track"),gs={equals:d$};let Dg=jg;const Ur=1,bs=2,Rg={owned:null,cleanups:null,context:null,owner:null};var rt=null;let Cn=null,et=null,mt=null,Ir=null,eh=0;function $a(e,t){const r=et,n=rt,i=e.length===0,o=i?Rg:{owned:null,cleanups:null,context:null,owner:t||n},a=i?e:()=>e(()=>V(()=>Dl(o)));rt=o,et=null;try{return Ti(a,!0)}finally{et=r,rt=n}}function L(e,t){t=t?Object.assign({},gs,t):gs;const r={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},n=i=>(typeof i=="function"&&(i=i(r.value)),Mg(r,i));return[Lg.bind(r),n]}function f$(e,t,r){const n=Al(e,t,!0,Ur);Pi(n)}function W(e,t,r){const n=Al(e,t,!1,Ur);Pi(n)}function xe(e,t,r){Dg=b$;const n=Al(e,t,!1,Ur);n.user=!0,Ir?Ir.push(n):Pi(n)}function pe(e,t,r){r=r?Object.assign({},gs,r):gs;const n=Al(e,t,!0,0);return n.observers=null,n.observerSlots=null,n.comparator=r.equals||void 0,Pi(n),Lg.bind(n)}function h$(e){return Ti(e,!1)}function V(e){const t=et;et=null;try{return e()}finally{et=t}}function Tt(e){xe(()=>V(e))}function Il(e){return rt===null||(rt.cleanups===null?rt.cleanups=[e]:rt.cleanups.push(e)),e}function Fg(){return et}function P(){return rt}function p$(e,t){const r=Symbol("context");return{id:r,Provider:w$(r),defaultValue:e}}function m$(e){let t;return(t=Vg(rt,e.id))!==void 0?t:e.defaultValue}function v$(e){const t=pe(e),r=pe(()=>_u(t()));return r.toArray=()=>{const n=r();return Array.isArray(n)?n:n!=null?[n]:[]},r}function Lg(){const e=Cn;if(this.sources&&(this.state||e))if(this.state===Ur||e)Pi(this);else{const t=mt;mt=null,Ti(()=>ws(this),!1),mt=t}if(et){const t=this.observers?this.observers.length:0;et.sources?(et.sources.push(this),et.sourceSlots.push(t)):(et.sources=[this],et.sourceSlots=[t]),this.observers?(this.observers.push(et),this.observerSlots.push(et.sources.length-1)):(this.observers=[et],this.observerSlots=[et.sources.length-1])}return this.value}function Mg(e,t,r){let n=e.value;return(!e.comparator||!e.comparator(n,t))&&(e.value=t,e.observers&&e.observers.length&&Ti(()=>{for(let i=0;i<e.observers.length;i+=1){const o=e.observers[i],a=Cn&&Cn.running;a&&Cn.disposed.has(o),(a&&!o.tState||!a&&!o.state)&&(o.pure?mt.push(o):Ir.push(o),o.observers&&zg(o)),a||(o.state=Ur)}if(mt.length>1e6)throw mt=[],new Error},!1)),t}function Pi(e){if(!e.fn)return;Dl(e);const t=rt,r=et,n=eh;et=rt=e,y$(e,e.value,n),et=r,rt=t}function y$(e,t,r){let n;try{n=e.fn(t)}catch(i){e.pure&&(e.state=Ur,e.owned&&e.owned.forEach(Dl),e.owned=null),Ug(i)}(!e.updatedAt||e.updatedAt<=r)&&(e.updatedAt!=null&&"observers"in e?Mg(e,n):e.value=n,e.updatedAt=r)}function Al(e,t,r,n=Ur,i){const o={fn:e,state:n,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:rt,context:null,pure:r};return rt===null||rt!==Rg&&(rt.owned?rt.owned.push(o):rt.owned=[o]),o}function $s(e){const t=Cn;if(e.state===0||t)return;if(e.state===bs||t)return ws(e);if(e.suspense&&V(e.suspense.inFallback))return e.suspense.effects.push(e);const r=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<eh);)(e.state||t)&&r.push(e);for(let n=r.length-1;n>=0;n--)if(e=r[n],e.state===Ur||t)Pi(e);else if(e.state===bs||t){const i=mt;mt=null,Ti(()=>ws(e,r[0]),!1),mt=i}}function Ti(e,t){if(mt)return e();let r=!1;t||(mt=[]),Ir?r=!0:Ir=[],eh++;try{const n=e();return g$(r),n}catch(n){mt||(Ir=null),mt=null,Ug(n)}}function g$(e){if(mt&&(jg(mt),mt=null),e)return;const t=Ir;Ir=null,t.length&&Ti(()=>Dg(t),!1)}function jg(e){for(let t=0;t<e.length;t++)$s(e[t])}function b$(e){let t,r=0;for(t=0;t<e.length;t++){const n=e[t];n.user?e[r++]=n:$s(n)}for(fr.context&&u$(),t=0;t<r;t++)$s(e[t])}function ws(e,t){const r=Cn;e.state=0;for(let n=0;n<e.sources.length;n+=1){const i=e.sources[n];i.sources&&(i.state===Ur||r?i!==t&&$s(i):(i.state===bs||r)&&ws(i,t))}}function zg(e){const t=Cn;for(let r=0;r<e.observers.length;r+=1){const n=e.observers[r];(!n.state||t)&&(n.state=bs,n.pure?mt.push(n):Ir.push(n),n.observers&&zg(n))}}function Dl(e){let t;if(e.sources)for(;e.sources.length;){const r=e.sources.pop(),n=e.sourceSlots.pop(),i=r.observers;if(i&&i.length){const o=i.pop(),a=r.observerSlots.pop();n<i.length&&(o.sourceSlots[a]=n,i[n]=o,r.observerSlots[n]=a)}}if(e.owned){for(t=0;t<e.owned.length;t++)Dl(e.owned[t]);e.owned=null}if(e.cleanups){for(t=0;t<e.cleanups.length;t++)e.cleanups[t]();e.cleanups=null}e.state=0,e.context=null}function $$(e){return e instanceof Error||typeof e=="string"?e:new Error("Unknown error")}function Ug(e){throw e=$$(e),e}function Vg(e,t){return e?e.context&&e.context[t]!==void 0?e.context[t]:Vg(e.owner,t):void 0}function _u(e){if(typeof e=="function"&&!e.length)return _u(e());if(Array.isArray(e)){const t=[];for(let r=0;r<e.length;r++){const n=_u(e[r]);Array.isArray(n)?t.push.apply(t,n):t.push(n)}return t}return e}function w$(e,t){return function(n){let i;return W(()=>i=V(()=>(rt.context={[e]:n.value},v$(()=>n.children))),void 0),i}}const _$=Symbol("fallback");function $p(e){for(let t=0;t<e.length;t++)e[t]()}function x$(e,t,r={}){let n=[],i=[],o=[],a=0,s=t.length>1?[]:null;return Il(()=>$p(o)),()=>{let c=e()||[],l,u;return c[wu],V(()=>{let f=c.length,h,p,m,v,y,b,g,_,S;if(f===0)a!==0&&($p(o),o=[],n=[],i=[],a=0,s&&(s=[])),r.fallback&&(n=[_$],i[0]=$a(E=>(o[0]=E,r.fallback())),a=1);else if(a===0){for(i=new Array(f),u=0;u<f;u++)n[u]=c[u],i[u]=$a(d);a=f}else{for(m=new Array(f),v=new Array(f),s&&(y=new Array(f)),b=0,g=Math.min(a,f);b<g&&n[b]===c[b];b++);for(g=a-1,_=f-1;g>=b&&_>=b&&n[g]===c[_];g--,_--)m[_]=i[g],v[_]=o[g],s&&(y[_]=s[g]);for(h=new Map,p=new Array(_+1),u=_;u>=b;u--)S=c[u],l=h.get(S),p[u]=l===void 0?-1:l,h.set(S,u);for(l=b;l<=g;l++)S=n[l],u=h.get(S),u!==void 0&&u!==-1?(m[u]=i[l],v[u]=o[l],s&&(y[u]=s[l]),u=p[u],h.set(S,u)):o[l]();for(u=b;u<f;u++)u in m?(i[u]=m[u],o[u]=v[u],s&&(s[u]=y[u],s[u](u))):i[u]=$a(d);i=i.slice(0,a=f),n=c.slice(0)}return i});function d(f){if(o[u]=f,s){const[h,p]=L(u);return s[u]=p,t(c[u],h)}return t(c[u])}}}function U(e,t){return V(()=>e(t||{}))}function Yo(){return!0}const S$={get(e,t,r){return t===br?r:e.get(t)},has(e,t){return t===br?!0:e.has(t)},set:Yo,deleteProperty:Yo,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:Yo,deleteProperty:Yo}},ownKeys(e){return e.keys()}};function cc(e){return(e=typeof e=="function"?e():e)?e:{}}function xu(...e){let t=!1;for(let n=0;n<e.length;n++){const i=e[n];t=t||!!i&&br in i,e[n]=typeof i=="function"?(t=!0,pe(i)):i}if(t)return new Proxy({get(n){for(let i=e.length-1;i>=0;i--){const o=cc(e[i])[n];if(o!==void 0)return o}},has(n){for(let i=e.length-1;i>=0;i--)if(n in cc(e[i]))return!0;return!1},keys(){const n=[];for(let i=0;i<e.length;i++)n.push(...Object.keys(cc(e[i])));return[...new Set(n)]}},S$);const r={};for(let n=e.length-1;n>=0;n--)if(e[n]){const i=Object.getOwnPropertyDescriptors(e[n]);for(const o in i)o in r||Object.defineProperty(r,o,{enumerable:!0,get(){for(let a=e.length-1;a>=0;a--){const s=(e[a]||{})[o];if(s!==void 0)return s}}})}return r}function Rl(e){const t="fallback"in e&&{fallback:()=>e.fallback};return pe(x$(()=>e.each,e.children,t||void 0))}function re(e){let t=!1;const r=e.keyed,n=pe(()=>e.when,void 0,{equals:(i,o)=>t?i===o:!i==!o});return pe(()=>{const i=n();if(i){const o=e.children,a=typeof o=="function"&&o.length>0;return t=r||a,a?V(()=>o(i)):o}return e.fallback},void 0,void 0)}function k$(e,t,r){let n=r.length,i=t.length,o=n,a=0,s=0,c=t[i-1].nextSibling,l=null;for(;a<i||s<o;){if(t[a]===r[s]){a++,s++;continue}for(;t[i-1]===r[o-1];)i--,o--;if(i===a){const u=o<n?s?r[s-1].nextSibling:r[o-s]:c;for(;s<o;)e.insertBefore(r[s++],u)}else if(o===s)for(;a<i;)(!l||!l.has(t[a]))&&t[a].remove(),a++;else if(t[a]===r[o-1]&&r[s]===t[i-1]){const u=t[--i].nextSibling;e.insertBefore(r[s++],t[a++].nextSibling),e.insertBefore(r[--o],u),t[i]=r[o]}else{if(!l){l=new Map;let d=s;for(;d<o;)l.set(r[d],d++)}const u=l.get(t[a]);if(u!=null)if(s<u&&u<o){let d=a,f=1,h;for(;++d<i&&d<o&&!((h=l.get(t[d]))==null||h!==u+f);)f++;if(f>u-s){const p=t[a];for(;s<u;)e.insertBefore(r[s++],p)}else e.replaceChild(r[s++],t[a++])}else a++;else t[a++].remove()}}}const wp="_$DX_DELEGATE";function C(e,t,r){const n=document.createElement("template");n.innerHTML=e;let i=n.content.firstChild;return r&&(i=i.firstChild),i}function Ni(e,t=window.document){const r=t[wp]||(t[wp]=new Set);for(let n=0,i=e.length;n<i;n++){const o=e[n];r.has(o)||(r.add(o),t.addEventListener(o,P$))}}function E$(e,t,r){r==null?e.removeAttribute(t):e.setAttribute(t,r)}function _p(e,t){t==null?e.removeAttribute("class"):e.className=t}function O$(e,t,r={}){const n=Object.keys(t||{}),i=Object.keys(r);let o,a;for(o=0,a=i.length;o<a;o++){const s=i[o];!s||s==="undefined"||t[s]||(xp(e,s,!1),delete r[s])}for(o=0,a=n.length;o<a;o++){const s=n[o],c=!!t[s];!s||s==="undefined"||r[s]===c||!c||(xp(e,s,!0),r[s]=c)}return r}function C$(e,t,r){if(!t)return r?E$(e,"style"):t;const n=e.style;if(typeof t=="string")return n.cssText=t;typeof r=="string"&&(n.cssText=r=void 0),r||(r={}),t||(t={});let i,o;for(o in r)t[o]==null&&n.removeProperty(o),delete r[o];for(o in t)i=t[o],i!==r[o]&&(n.setProperty(o,i),r[o]=i);return r}function ee(e,t,r){return V(()=>e(t,r))}function w(e,t,r,n){if(r!==void 0&&!n&&(n=[]),typeof t!="function")return _s(e,t,n,r);W(i=>_s(e,t(),i,r),n)}function xp(e,t,r){const n=t.trim().split(/\s+/);for(let i=0,o=n.length;i<o;i++)e.classList.toggle(n[i],r)}function P$(e){const t=`$$${e.type}`;let r=e.composedPath&&e.composedPath()[0]||e.target;for(e.target!==r&&Object.defineProperty(e,"target",{configurable:!0,value:r}),Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return r||document}}),fr.registry&&!fr.done&&(fr.done=!0,document.querySelectorAll("[id^=pl-]").forEach(n=>{for(;n&&n.nodeType!==8&&n.nodeValue!=="pl-"+e;){let i=n.nextSibling;n.remove(),n=i}n&&n.remove()}));r;){const n=r[t];if(n&&!r.disabled){const i=r[`${t}Data`];if(i!==void 0?n.call(r,i,e):n.call(r,e),e.cancelBubble)return}r=r._$host||r.parentNode||r.host}}function _s(e,t,r,n,i){for(fr.context&&!r&&(r=[...e.childNodes]);typeof r=="function";)r=r();if(t===r)return r;const o=typeof t,a=n!==void 0;if(e=a&&r[0]&&r[0].parentNode||e,o==="string"||o==="number"){if(fr.context)return r;if(o==="number"&&(t=t.toString()),a){let s=r[0];s&&s.nodeType===3?s.data=t:s=document.createTextNode(t),r=Wn(e,r,n,s)}else r!==""&&typeof r=="string"?r=e.firstChild.data=t:r=e.textContent=t}else if(t==null||o==="boolean"){if(fr.context)return r;r=Wn(e,r,n)}else{if(o==="function")return W(()=>{let s=t();for(;typeof s=="function";)s=s();r=_s(e,s,r,n)}),()=>r;if(Array.isArray(t)){const s=[],c=r&&Array.isArray(r);if(Su(s,t,r,i))return W(()=>r=_s(e,s,r,n,!0)),()=>r;if(fr.context){if(!s.length)return r;for(let l=0;l<s.length;l++)if(s[l].parentNode)return r=s}if(s.length===0){if(r=Wn(e,r,n),a)return r}else c?r.length===0?Sp(e,s,n):k$(e,r,s):(r&&Wn(e),Sp(e,s));r=s}else if(t instanceof Node){if(fr.context&&t.parentNode)return r=a?[t]:t;if(Array.isArray(r)){if(a)return r=Wn(e,r,n,t);Wn(e,r,null,t)}else r==null||r===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);r=t}}return r}function Su(e,t,r,n){let i=!1;for(let o=0,a=t.length;o<a;o++){let s=t[o],c=r&&r[o];if(s instanceof Node)e.push(s);else if(!(s==null||s===!0||s===!1))if(Array.isArray(s))i=Su(e,s,c)||i;else if(typeof s=="function")if(n){for(;typeof s=="function";)s=s();i=Su(e,Array.isArray(s)?s:[s],Array.isArray(c)?c:[c])||i}else e.push(s),i=!0;else{const l=String(s);c&&c.nodeType===3&&c.data===l?e.push(c):e.push(document.createTextNode(l))}}return i}function Sp(e,t,r=null){for(let n=0,i=t.length;n<i;n++)e.insertBefore(t[n],r)}function Wn(e,t,r,n){if(r===void 0)return e.textContent="";const i=n||document.createTextNode("");if(t.length){let o=!1;for(let a=t.length-1;a>=0;a--){const s=t[a];if(i!==s){const c=s.parentNode===e;!o&&!a?c?e.replaceChild(i,s):e.insertBefore(i,r):c&&s.remove()}else o=!0}}else e.insertBefore(i,r);return[i]}function T$(e){return Object.keys(e).reduce((r,n)=>{const i=e[n];return r[n]=Object.assign({},i),Wg(i.value)&&!R$(i.value)&&!Array.isArray(i.value)&&(r[n].value=Object.assign({},i.value)),Array.isArray(i.value)&&(r[n].value=i.value.slice(0)),r},{})}function N$(e){return e?Object.keys(e).reduce((r,n)=>{const i=e[n];return r[n]=Wg(i)&&"value"in i?i:{value:i},r[n].attribute||(r[n].attribute=D$(n)),r[n].parse="parse"in r[n]?r[n].parse:typeof r[n].value!="string",r},{}):{}}function I$(e){return Object.keys(e).reduce((r,n)=>(r[n]=e[n].value,r),{})}function A$(e,t){const r=T$(t);return Object.keys(t).forEach(i=>{const o=r[i],a=e.getAttribute(o.attribute),s=e[i];a&&(o.value=o.parse?Bg(a):a),s!=null&&(o.value=Array.isArray(s)?s.slice(0):s),o.reflect&&kp(e,o.attribute,o.value),Object.defineProperty(e,i,{get(){return o.value},set(c){const l=o.value;o.value=c,o.reflect&&kp(this,o.attribute,o.value);for(let u=0,d=this.__propertyChangedCallbacks.length;u<d;u++)this.__propertyChangedCallbacks[u](i,c,l)},enumerable:!0,configurable:!0})}),r}function Bg(e){if(!!e)try{return JSON.parse(e)}catch{return e}}function kp(e,t,r){if(r==null||r===!1)return e.removeAttribute(t);let n=JSON.stringify(r);e.__updating[t]=!0,n==="true"&&(n=""),e.setAttribute(t,n),Promise.resolve().then(()=>delete e.__updating[t])}function D$(e){return e.replace(/\.?([A-Z]+)/g,(t,r)=>"-"+r.toLowerCase()).replace("_","-").replace(/^-/,"")}function Wg(e){return e!=null&&(typeof e=="object"||typeof e=="function")}function R$(e){return Object.prototype.toString.call(e)==="[object Function]"}function F$(e){return typeof e=="function"&&e.toString().indexOf("class")===0}let uc;function L$(e,t){const r=Object.keys(t);return class extends e{static get observedAttributes(){return r.map(i=>t[i].attribute)}constructor(){super(),this.__initialized=!1,this.__released=!1,this.__releaseCallbacks=[],this.__propertyChangedCallbacks=[],this.__updating={},this.props={}}connectedCallback(){if(this.__initialized)return;this.__releaseCallbacks=[],this.__propertyChangedCallbacks=[],this.__updating={},this.props=A$(this,t);const i=I$(this.props),o=this.Component,a=uc;try{uc=this,this.__initialized=!0,F$(o)?new o(i,{element:this}):o(i,{element:this})}finally{uc=a}}async disconnectedCallback(){if(await Promise.resolve(),this.isConnected)return;this.__propertyChangedCallbacks.length=0;let i=null;for(;i=this.__releaseCallbacks.pop();)i(this);delete this.__initialized,this.__released=!0}attributeChangedCallback(i,o,a){if(!!this.__initialized&&!this.__updating[i]&&(i=this.lookupProp(i),i in t)){if(a==null&&!this[i])return;this[i]=t[i].parse?Bg(a):a}}lookupProp(i){if(!!t)return r.find(o=>i===o||i===t[o].attribute)}get renderRoot(){return this.shadowRoot||this.attachShadow({mode:"open"})}addReleaseCallback(i){this.__releaseCallbacks.push(i)}addPropertyChangedCallback(i){this.__propertyChangedCallbacks.push(i)}}}function M$(e,t={},r={}){const{BaseElement:n=HTMLElement,extension:i}=r;return o=>{if(!e)throw new Error("tag is required to register a Component");let a=customElements.get(e);return a?(a.prototype.Component=o,a):(a=L$(n,N$(t)),a.prototype.Component=o,a.prototype.registeredTag=e,customElements.define(e,a,i),a)}}function j$(e){const t=Object.keys(e),r={};for(let n=0;n<t.length;n++){const[i,o]=L(e[t[n]]);Object.defineProperty(r,t[n],{get:i,set(a){o(()=>a)}})}return r}function z$(e){if(e.assignedSlot&&e.assignedSlot._$owner)return e.assignedSlot._$owner;let t=e.parentNode;for(;t&&!t._$owner&&!(t.assignedSlot&&t.assignedSlot._$owner);)t=t.parentNode;return t&&t.assignedSlot?t.assignedSlot._$owner:e._$owner}function U$(e){return(t,r)=>{const{element:n}=r;return $a(i=>{const o=j$(t);n.addPropertyChangedCallback((s,c)=>o[s]=c),n.addReleaseCallback(()=>{n.renderRoot.textContent="",i()});const a=e(o,r);return w(n.renderRoot,a)},z$(n))}}function $e(e,t,r){return arguments.length===2&&(r=t,t={}),M$(e,t)(U$(r))}const qg=p$(),at=()=>m$(qg),V$=(e,t)=>{const r=[];return t.forEach(n=>{(!Object.keys(e).includes(n)||e[n]==null)&&r.push(`photon-client requires ${n}, but no value was provided`)}),r.forEach(n=>console.warn(n)),r},B$=/[?&]code=[^&]+/,W$=/[?&]state=[^&]+/,q$=/[?&]error=[^&]+/,H$=(e=window.location.search)=>(B$.test(e)||q$.test(e))&&W$.test(e),Ep=e=>e.replace(/\w\S*/g,function(t){return t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()}),G$=e=>/^\d+$/.test(e)&&e.length>=5;var ku=function(e,t){return ku=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},ku(e,t)};function lr(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");ku(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var O=function(){return O=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},O.apply(this,arguments)};function an(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function oe(e,t,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(u){try{l(n.next(u))}catch(d){a(d)}}function c(u){try{l(n.throw(u))}catch(d){a(d)}}function l(u){u.done?o(u.value):i(u.value).then(s,c)}l((n=n.apply(e,t||[])).next())})}function Kr(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(l){return function(u){return c([l,u])}}function c(l){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(r=0)),r;)try{if(n=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,i=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){r.label=l[1];break}if(l[0]===6&&r.label<o[1]){r.label=o[1],o=l;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(l);break}o[2]&&r.ops.pop(),r.trys.pop();continue}l=t.call(e,r)}catch(u){l=[6,u],i=0}finally{n=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function xs(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}var Eu=function(e,t){return Eu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Eu(e,t)};function zn(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Eu(e,t),e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var se=function(){return se=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},se.apply(this,arguments)};function At(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function"){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}function me(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(l){try{c(n.next(l))}catch(u){o(u)}}function s(l){try{c(n.throw(l))}catch(u){o(u)}}function c(l){var u;l.done?i(l.value):(u=l.value,u instanceof r?u:new r(function(d){d(u)})).then(a,s)}c((n=n.apply(e,t||[])).next())})}function ve(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(c){return function(l){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&u[0]?n.return:u[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,u[1])).done)return i;switch(n=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,n=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(i=a.trys,!((i=i.length>0&&i[i.length-1])||u[0]!==6&&u[0]!==2)){a=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){a.label=u[1];break}if(u[0]===6&&a.label<i[1]){a.label=i[1],i=u;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(u);break}i[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(d){u=[6,d],n=0}finally{r=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([c,l])}}}function vi(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(t===void 0||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(s){i={error:s}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function Ou(e,t,r){if(r||arguments.length===2)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}var vr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function th(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ii(e,t){return e(t={exports:{}},t.exports),t.exports}var Br,wa,Xo=function(e){return e&&e.Math==Math&&e},le=Xo(typeof globalThis=="object"&&globalThis)||Xo(typeof window=="object"&&window)||Xo(typeof self=="object"&&self)||Xo(typeof vr=="object"&&vr)||function(){return this}()||Function("return this")(),Ae=function(e){try{return!!e()}catch{return!0}},Ee=!Ae(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),Lo=!Ae(function(){var e=function(){}.bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),Zo=Function.prototype.call,kt=Lo?Zo.bind(Zo):function(){return Zo.apply(Zo,arguments)},Op={}.propertyIsEnumerable,Cp=Object.getOwnPropertyDescriptor,Q$=Cp&&!Op.call({1:2},1)?function(e){var t=Cp(this,e);return!!t&&t.enumerable}:Op,rh={f:Q$},An=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},Hg=Function,Gg=Hg.prototype,K$=Gg.bind,Cu=Gg.call,Y$=Lo&&K$.bind(Cu,Cu),fe=function(e){return e instanceof Hg?Lo?Y$(e):function(){return Cu.apply(e,arguments)}:void 0},X$=fe({}.toString),Z$=fe("".slice),Ar=function(e){return Z$(X$(e),8,-1)},dc=Object,J$=fe("".split),Qg=Ae(function(){return!dc("z").propertyIsEnumerable(0)})?function(e){return Ar(e)=="String"?J$(e,""):dc(e)}:dc,Ai=function(e){return e==null},ew=TypeError,Mo=function(e){if(Ai(e))throw ew("Can't call method on "+e);return e},kr=function(e){return Qg(Mo(e))},fc=typeof document=="object"&&document.all,Fl={all:fc,IS_HTMLDDA:fc===void 0&&fc!==void 0},tw=Fl.all,Te=Fl.IS_HTMLDDA?function(e){return typeof e=="function"||e===tw}:function(e){return typeof e=="function"},rw=Fl.all,Le=Fl.IS_HTMLDDA?function(e){return typeof e=="object"?e!==null:Te(e)||e===rw}:function(e){return typeof e=="object"?e!==null:Te(e)},nw=function(e){return Te(e)?e:void 0},cr=function(e,t){return arguments.length<2?nw(le[e]):le[e]&&le[e][t]},Dn=fe({}.isPrototypeOf),hc=cr("navigator","userAgent")||"",Pp=le.process,Tp=le.Deno,Np=Pp&&Pp.versions||Tp&&Tp.version,Ip=Np&&Np.v8;Ip&&(wa=(Br=Ip.split("."))[0]>0&&Br[0]<4?1:+(Br[0]+Br[1])),!wa&&hc&&(!(Br=hc.match(/Edge\/(\d+)/))||Br[1]>=74)&&(Br=hc.match(/Chrome\/(\d+)/))&&(wa=+Br[1]);var Ss=wa,Wt=!!Object.getOwnPropertySymbols&&!Ae(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Ss&&Ss<41}),nh=Wt&&!Symbol.sham&&typeof Symbol.iterator=="symbol",iw=Object,yi=nh?function(e){return typeof e=="symbol"}:function(e){var t=cr("Symbol");return Te(t)&&Dn(t.prototype,iw(e))},ow=String,Di=function(e){try{return ow(e)}catch{return"Object"}},aw=TypeError,ih=function(e){if(Te(e))return e;throw aw(Di(e)+" is not a function")},ks=function(e,t){var r=e[t];return Ai(r)?void 0:ih(r)},sw=TypeError,lw=Object.defineProperty,oh=function(e,t){try{lw(le,e,{value:t,configurable:!0,writable:!0})}catch{le[e]=t}return t},tn=le["__core-js_shared__"]||oh("__core-js_shared__",{}),vn=Ii(function(e){(e.exports=function(t,r){return tn[t]||(tn[t]=r!==void 0?r:{})})("versions",[]).push({version:"3.25.4",mode:"global",copyright:"\xA9 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.25.4/LICENSE",source:"https://github.com/zloirock/core-js"})}),cw=Object,Ri=function(e){return cw(Mo(e))},uw=fe({}.hasOwnProperty),J=Object.hasOwn||function(e,t){return uw(Ri(e),t)},dw=0,fw=Math.random(),hw=fe(1 .toString),gi=function(e){return"Symbol("+(e===void 0?"":e)+")_"+hw(++dw+fw,36)},Hi=vn("wks"),Pn=le.Symbol,Ap=Pn&&Pn.for,pw=nh?Pn:Pn&&Pn.withoutSetter||gi,Ye=function(e){if(!J(Hi,e)||!Wt&&typeof Hi[e]!="string"){var t="Symbol."+e;Wt&&J(Pn,e)?Hi[e]=Pn[e]:Hi[e]=nh&&Ap?Ap(t):pw(t)}return Hi[e]},mw=TypeError,vw=Ye("toPrimitive"),yw=function(e,t){if(!Le(e)||yi(e))return e;var r,n=ks(e,vw);if(n){if(t===void 0&&(t="default"),r=kt(n,e,t),!Le(r)||yi(r))return r;throw mw("Can't convert object to primitive value")}return t===void 0&&(t="number"),function(i,o){var a,s;if(o==="string"&&Te(a=i.toString)&&!Le(s=kt(a,i))||Te(a=i.valueOf)&&!Le(s=kt(a,i))||o!=="string"&&Te(a=i.toString)&&!Le(s=kt(a,i)))return s;throw sw("Can't convert object to primitive value")}(e,t)},Rn=function(e){var t=yw(e,"string");return yi(t)?t:t+""},Pu=le.document,gw=Le(Pu)&&Le(Pu.createElement),Kg=function(e){return gw?Pu.createElement(e):{}},Yg=!Ee&&!Ae(function(){return Object.defineProperty(Kg("div"),"a",{get:function(){return 7}}).a!=7}),Dp=Object.getOwnPropertyDescriptor,jo={f:Ee?Dp:function(e,t){if(e=kr(e),t=Rn(t),Yg)try{return Dp(e,t)}catch{}if(J(e,t))return An(!kt(rh.f,e,t),e[t])}},Xg=Ee&&Ae(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42}),bw=String,$w=TypeError,ut=function(e){if(Le(e))return e;throw $w(bw(e)+" is not an object")},ww=TypeError,pc=Object.defineProperty,_w=Object.getOwnPropertyDescriptor,$t={f:Ee?Xg?function(e,t,r){if(ut(e),t=Rn(t),ut(r),typeof e=="function"&&t==="prototype"&&"value"in r&&"writable"in r&&!r.writable){var n=_w(e,t);n&&n.writable&&(e[t]=r.value,r={configurable:"configurable"in r?r.configurable:n.configurable,enumerable:"enumerable"in r?r.enumerable:n.enumerable,writable:!1})}return pc(e,t,r)}:pc:function(e,t,r){if(ut(e),t=Rn(t),ut(r),Yg)try{return pc(e,t,r)}catch{}if("get"in r||"set"in r)throw ww("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},Ll=Ee?function(e,t,r){return $t.f(e,t,An(1,r))}:function(e,t,r){return e[t]=r,e},Zg=Function.prototype,xw=Ee&&Object.getOwnPropertyDescriptor,mc=J(Zg,"name"),ah={EXISTS:mc,PROPER:mc&&function(){}.name==="something",CONFIGURABLE:mc&&(!Ee||Ee&&xw(Zg,"name").configurable)},Sw=fe(Function.toString);Te(tn.inspectSource)||(tn.inspectSource=function(e){return Sw(e)});var Es,ho,Os,Jg=tn.inspectSource,Rp=le.WeakMap,kw=Te(Rp)&&/native code/.test(String(Rp)),Fp=vn("keys"),Ml=function(e){return Fp[e]||(Fp[e]=gi(e))},Fi={},Tu=le.TypeError,Ew=le.WeakMap;if(kw||tn.state){var bn=tn.state||(tn.state=new Ew),Ow=fe(bn.get),Lp=fe(bn.has),Cw=fe(bn.set);Es=function(e,t){if(Lp(bn,e))throw Tu("Object already initialized");return t.facade=e,Cw(bn,e,t),t},ho=function(e){return Ow(bn,e)||{}},Os=function(e){return Lp(bn,e)}}else{var qn=Ml("state");Fi[qn]=!0,Es=function(e,t){if(J(e,qn))throw Tu("Object already initialized");return t.facade=e,Ll(e,qn,t),t},ho=function(e){return J(e,qn)?e[qn]:{}},Os=function(e){return J(e,qn)}}var Kt={set:Es,get:ho,has:Os,enforce:function(e){return Os(e)?ho(e):Es(e,{})},getterFor:function(e){return function(t){var r;if(!Le(t)||(r=ho(t)).type!==e)throw Tu("Incompatible receiver, "+e+" required");return r}}},Pw=Ii(function(e){var t=ah.CONFIGURABLE,r=Kt.enforce,n=Kt.get,i=Object.defineProperty,o=Ee&&!Ae(function(){return i(function(){},"length",{value:8}).length!==8}),a=String(String).split("String"),s=e.exports=function(c,l,u){String(l).slice(0,7)==="Symbol("&&(l="["+String(l).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),u&&u.getter&&(l="get "+l),u&&u.setter&&(l="set "+l),(!J(c,"name")||t&&c.name!==l)&&(Ee?i(c,"name",{value:l,configurable:!0}):c.name=l),o&&u&&J(u,"arity")&&c.length!==u.arity&&i(c,"length",{value:u.arity});try{u&&J(u,"constructor")&&u.constructor?Ee&&i(c,"prototype",{writable:!1}):c.prototype&&(c.prototype=void 0)}catch{}var d=r(c);return J(d,"source")||(d.source=a.join(typeof l=="string"?l:"")),c};Function.prototype.toString=s(function(){return Te(this)&&n(this).source||Jg(this)},"toString")}),Ot=function(e,t,r,n){n||(n={});var i=n.enumerable,o=n.name!==void 0?n.name:t;if(Te(r)&&Pw(r,o,n),n.global)i?e[t]=r:oh(t,r);else{try{n.unsafe?e[t]&&(i=!0):delete e[t]}catch{}i?e[t]=r:$t.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},Tw=Math.ceil,Nw=Math.floor,Iw=Math.trunc||function(e){var t=+e;return(t>0?Nw:Tw)(t)},sh=function(e){var t=+e;return t!=t||t===0?0:Iw(t)},Aw=Math.max,Dw=Math.min,Nu=function(e,t){var r=sh(e);return r<0?Aw(r+t,0):Dw(r,t)},Rw=Math.min,eb=function(e){return e>0?Rw(sh(e),9007199254740991):0},Li=function(e){return eb(e.length)},Mp=function(e){return function(t,r,n){var i,o=kr(t),a=Li(o),s=Nu(n,a);if(e&&r!=r){for(;a>s;)if((i=o[s++])!=i)return!0}else for(;a>s;s++)if((e||s in o)&&o[s]===r)return e||s||0;return!e&&-1}},tb={includes:Mp(!0),indexOf:Mp(!1)},Fw=tb.indexOf,jp=fe([].push),rb=function(e,t){var r,n=kr(e),i=0,o=[];for(r in n)!J(Fi,r)&&J(n,r)&&jp(o,r);for(;t.length>i;)J(n,r=t[i++])&&(~Fw(o,r)||jp(o,r));return o},Cs=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Lw=Cs.concat("length","prototype"),wo={f:Object.getOwnPropertyNames||function(e){return rb(e,Lw)}},jl={f:Object.getOwnPropertySymbols},Mw=fe([].concat),jw=cr("Reflect","ownKeys")||function(e){var t=wo.f(ut(e)),r=jl.f;return r?Mw(t,r(e)):t},nb=function(e,t,r){for(var n=jw(t),i=$t.f,o=jo.f,a=0;a<n.length;a++){var s=n[a];J(e,s)||r&&J(r,s)||i(e,s,o(t,s))}},zw=/#|\.prototype\./,zo=function(e,t){var r=Vw[Uw(e)];return r==Ww||r!=Bw&&(Te(t)?Ae(t):!!t)},Uw=zo.normalize=function(e){return String(e).replace(zw,".").toLowerCase()},Vw=zo.data={},Bw=zo.NATIVE="N",Ww=zo.POLYFILL="P",Iu=zo,qw=jo.f,dt=function(e,t){var r,n,i,o,a,s=e.target,c=e.global,l=e.stat;if(r=c?le:l?le[s]||oh(s,{}):(le[s]||{}).prototype)for(n in t){if(o=t[n],i=e.dontCallGetSet?(a=qw(r,n))&&a.value:r[n],!Iu(c?n:s+(l?".":"#")+n,e.forced)&&i!==void 0){if(typeof o==typeof i)continue;nb(o,i)}(e.sham||i&&i.sham)&&Ll(o,"sham",!0),Ot(r,n,o,e)}},ib={};ib[Ye("toStringTag")]="z";var vc,lh=String(ib)==="[object z]",Hw=Ye("toStringTag"),Gw=Object,Qw=Ar(function(){return arguments}())=="Arguments",Un=lh?Ar:function(e){var t,r,n;return e===void 0?"Undefined":e===null?"Null":typeof(r=function(i,o){try{return i[o]}catch{}}(t=Gw(e),Hw))=="string"?r:Qw?Ar(t):(n=Ar(t))=="Object"&&Te(t.callee)?"Arguments":n},Kw=String,Rr=function(e){if(Un(e)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return Kw(e)},Yw=Ye("match"),Xw=TypeError,ob=function(e){if(function(t){var r;return Le(t)&&((r=t[Yw])!==void 0?!!r:Ar(t)=="RegExp")}(e))throw Xw("The method doesn't accept regular expressions");return e},Zw=Ye("match"),ab=function(e){var t=/./;try{"/./"[e](t)}catch{try{return t[Zw]=!1,"/./"[e](t)}catch{}}return!1},Jw=jo.f,zp=fe("".startsWith),e_=fe("".slice),t_=Math.min,sb=ab("startsWith"),r_=!(sb||(vc=Jw(String.prototype,"startsWith"),!vc||vc.writable));dt({target:"String",proto:!0,forced:!r_&&!sb},{startsWith:function(e){var t=Rr(Mo(this));ob(e);var r=eb(t_(arguments.length>1?arguments[1]:void 0,t.length)),n=Rr(e);return zp?zp(t,n,r):e_(t,r,r+n.length)===n}});var ch=function(e,t){return fe(le[e].prototype[t])};ch("String","startsWith");var Ps=Array.isArray||function(e){return Ar(e)=="Array"},n_=TypeError,Up=function(e){if(e>9007199254740991)throw n_("Maximum allowed index exceeded");return e},_o=function(e,t,r){var n=Rn(t);n in e?$t.f(e,n,An(0,r)):e[n]=r},lb=function(){},i_=[],cb=cr("Reflect","construct"),uh=/^\s*(?:class|function)\b/,o_=fe(uh.exec),a_=!uh.exec(lb),Gi=function(e){if(!Te(e))return!1;try{return cb(lb,i_,e),!0}catch{return!1}},ub=function(e){if(!Te(e))return!1;switch(Un(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return a_||!!o_(uh,Jg(e))}catch{return!0}};ub.sham=!0;var Vp,dh=!cb||Ae(function(){var e;return Gi(Gi.call)||!Gi(Object)||!Gi(function(){e=!0})||e})?ub:Gi,s_=Ye("species"),Bp=Array,db=function(e,t){return new(function(r){var n;return Ps(r)&&(n=r.constructor,(dh(n)&&(n===Bp||Ps(n.prototype))||Le(n)&&(n=n[s_])===null)&&(n=void 0)),n===void 0?Bp:n}(e))(t===0?0:t)},l_=Ye("species"),fb=Ye("isConcatSpreadable"),c_=Ss>=51||!Ae(function(){var e=[];return e[fb]=!1,e.concat()[0]!==e}),u_=(Vp="concat",Ss>=51||!Ae(function(){var e=[];return(e.constructor={})[l_]=function(){return{foo:1}},e[Vp](Boolean).foo!==1})),d_=function(e){if(!Le(e))return!1;var t=e[fb];return t!==void 0?!!t:Ps(e)};dt({target:"Array",proto:!0,arity:1,forced:!c_||!u_},{concat:function(e){var t,r,n,i,o,a=Ri(this),s=db(a,0),c=0;for(t=-1,n=arguments.length;t<n;t++)if(d_(o=t===-1?a:arguments[t]))for(i=Li(o),Up(c+i),r=0;r<i;r++,c++)r in o&&_o(s,c,o[r]);else Up(c+1),_o(s,c++,o);return s.length=c,s}});var f_=lh?{}.toString:function(){return"[object "+Un(this)+"]"};lh||Ot(Object.prototype,"toString",f_,{unsafe:!0});var Jo,fh=Object.keys||function(e){return rb(e,Cs)},h_=Ee&&!Xg?Object.defineProperties:function(e,t){ut(e);for(var r,n=kr(t),i=fh(t),o=i.length,a=0;o>a;)$t.f(e,r=i[a++],n[r]);return e},hb={f:h_},p_=cr("document","documentElement"),pb=Ml("IE_PROTO"),yc=function(){},mb=function(e){return"<script>"+e+"<\/script>"},Wp=function(e){e.write(mb("")),e.close();var t=e.parentWindow.Object;return e=null,t},_a=function(){try{Jo=new ActiveXObject("htmlfile")}catch{}var e,t;_a=typeof document<"u"?document.domain&&Jo?Wp(Jo):((t=Kg("iframe")).style.display="none",p_.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(mb("document.F=Object")),e.close(),e.F):Wp(Jo);for(var r=Cs.length;r--;)delete _a.prototype[Cs[r]];return _a()};Fi[pb]=!0;var sn=Object.create||function(e,t){var r;return e!==null?(yc.prototype=ut(e),r=new yc,yc.prototype=null,r[pb]=e):r=_a(),t===void 0?r:hb.f(r,t)},m_=Array,v_=Math.max,vb=wo.f,yb=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],y_=function(e){try{return vb(e)}catch{return function(r,n,i){for(var o=Li(r),a=Nu(n,o),s=Nu(i===void 0?o:i,o),c=m_(v_(s-a,0)),l=0;a<s;a++,l++)_o(c,l,r[a]);return c.length=l,c}(yb)}},hh={f:function(e){return yb&&Ar(e)=="Window"?y_(e):vb(kr(e))}},gb={f:Ye},xo=le,g_=$t.f,Dt=function(e){var t=xo.Symbol||(xo.Symbol={});J(t,e)||g_(t,e,{value:gb.f(e)})},bb=function(){var e=cr("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,n=Ye("toPrimitive");t&&!t[n]&&Ot(t,n,function(i){return kt(r,this)},{arity:1})},b_=$t.f,qp=Ye("toStringTag"),en=function(e,t,r){e&&!r&&(e=e.prototype),e&&!J(e,qp)&&b_(e,qp,{configurable:!0,value:t})},$_=fe(fe.bind),zl=function(e,t){return ih(e),t===void 0?e:Lo?$_(e,t):function(){return e.apply(t,arguments)}},Hp=fe([].push),Wr=function(e){var t=e==1,r=e==2,n=e==3,i=e==4,o=e==6,a=e==7,s=e==5||o;return function(c,l,u,d){for(var f,h,p=Ri(c),m=Qg(p),v=zl(l,u),y=Li(m),b=0,g=d||db,_=t?g(c,y):r||a?g(c,0):void 0;y>b;b++)if((s||b in m)&&(h=v(f=m[b],b,p),e))if(t)_[b]=h;else if(h)switch(e){case 3:return!0;case 5:return f;case 6:return b;case 2:Hp(_,f)}else switch(e){case 4:return!1;case 7:Hp(_,f)}return o?-1:n||i?i:_}},Ul={forEach:Wr(0),map:Wr(1),filter:Wr(2),some:Wr(3),every:Wr(4),find:Wr(5),findIndex:Wr(6),filterReject:Wr(7)}.forEach,Rt=Ml("hidden"),w_=Kt.set,Gp=Kt.getterFor("Symbol"),Ht=Object.prototype,ni=le.Symbol,lo=ni&&ni.prototype,__=le.TypeError,gc=le.QObject,$b=jo.f,Zr=$t.f,wb=hh.f,x_=rh.f,_b=fe([].push),Fr=vn("symbols"),Uo=vn("op-symbols"),S_=vn("wks"),bc=!gc||!gc.prototype||!gc.prototype.findChild,Au=Ee&&Ae(function(){return sn(Zr({},"a",{get:function(){return Zr(this,"a",{value:7}).a}})).a!=7})?function(e,t,r){var n=$b(Ht,t);n&&delete Ht[t],Zr(e,t,r),n&&e!==Ht&&Zr(Ht,t,n)}:Zr,$c=function(e,t){var r=Fr[e]=sn(lo);return w_(r,{type:"Symbol",tag:e,description:t}),Ee||(r.description=t),r},Ts=function(e,t,r){e===Ht&&Ts(Uo,t,r),ut(e);var n=Rn(t);return ut(r),J(Fr,n)?(r.enumerable?(J(e,Rt)&&e[Rt][n]&&(e[Rt][n]=!1),r=sn(r,{enumerable:An(0,!1)})):(J(e,Rt)||Zr(e,Rt,An(1,{})),e[Rt][n]=!0),Au(e,n,r)):Zr(e,n,r)},wc=function(e,t){ut(e);var r=kr(t),n=fh(r).concat(xb(r));return Ul(n,function(i){Ee&&!kt(Du,r,i)||Ts(e,i,r[i])}),e},Du=function(e){var t=Rn(e),r=kt(x_,this,t);return!(this===Ht&&J(Fr,t)&&!J(Uo,t))&&(!(r||!J(this,t)||!J(Fr,t)||J(this,Rt)&&this[Rt][t])||r)},Qp=function(e,t){var r=kr(e),n=Rn(t);if(r!==Ht||!J(Fr,n)||J(Uo,n)){var i=$b(r,n);return!i||!J(Fr,n)||J(r,Rt)&&r[Rt][n]||(i.enumerable=!0),i}},Kp=function(e){var t=wb(kr(e)),r=[];return Ul(t,function(n){J(Fr,n)||J(Fi,n)||_b(r,n)}),r},xb=function(e){var t=e===Ht,r=wb(t?Uo:kr(e)),n=[];return Ul(r,function(i){!J(Fr,i)||t&&!J(Ht,i)||_b(n,Fr[i])}),n};Wt||(lo=(ni=function(){if(Dn(lo,this))throw __("Symbol is not a constructor");var e=arguments.length&&arguments[0]!==void 0?Rr(arguments[0]):void 0,t=gi(e),r=function(n){this===Ht&&kt(r,Uo,n),J(this,Rt)&&J(this[Rt],t)&&(this[Rt][t]=!1),Au(this,t,An(1,n))};return Ee&&bc&&Au(Ht,t,{configurable:!0,set:r}),$c(t,e)}).prototype,Ot(lo,"toString",function(){return Gp(this).tag}),Ot(ni,"withoutSetter",function(e){return $c(gi(e),e)}),rh.f=Du,$t.f=Ts,hb.f=wc,jo.f=Qp,wo.f=hh.f=Kp,jl.f=xb,gb.f=function(e){return $c(Ye(e),e)},Ee&&(Zr(lo,"description",{configurable:!0,get:function(){return Gp(this).description}}),Ot(Ht,"propertyIsEnumerable",Du,{unsafe:!0}))),dt({global:!0,constructor:!0,wrap:!0,forced:!Wt,sham:!Wt},{Symbol:ni}),Ul(fh(S_),function(e){Dt(e)}),dt({target:"Symbol",stat:!0,forced:!Wt},{useSetter:function(){bc=!0},useSimple:function(){bc=!1}}),dt({target:"Object",stat:!0,forced:!Wt,sham:!Ee},{create:function(e,t){return t===void 0?sn(e):wc(sn(e),t)},defineProperty:Ts,defineProperties:wc,getOwnPropertyDescriptor:Qp}),dt({target:"Object",stat:!0,forced:!Wt},{getOwnPropertyNames:Kp}),bb(),en(ni,"Symbol"),Fi[Rt]=!0;var Sb=Wt&&!!Symbol.for&&!!Symbol.keyFor,_c=vn("string-to-symbol-registry"),k_=vn("symbol-to-string-registry");dt({target:"Symbol",stat:!0,forced:!Sb},{for:function(e){var t=Rr(e);if(J(_c,t))return _c[t];var r=cr("Symbol")(t);return _c[t]=r,k_[r]=t,r}});var Yp=vn("symbol-to-string-registry");dt({target:"Symbol",stat:!0,forced:!Sb},{keyFor:function(e){if(!yi(e))throw TypeError(Di(e)+" is not a symbol");if(J(Yp,e))return Yp[e]}});var kb=Function.prototype,Xp=kb.apply,Zp=kb.call,Eb=typeof Reflect=="object"&&Reflect.apply||(Lo?Zp.bind(Xp):function(){return Zp.apply(Xp,arguments)}),ph=fe([].slice),rn=cr("JSON","stringify"),ea=fe(/./.exec),Jp=fe("".charAt),E_=fe("".charCodeAt),O_=fe("".replace),C_=fe(1 .toString),P_=/[\uD800-\uDFFF]/g,e0=/^[\uD800-\uDBFF]$/,t0=/^[\uDC00-\uDFFF]$/,r0=!Wt||Ae(function(){var e=cr("Symbol")();return rn([e])!="[null]"||rn({a:e})!="{}"||rn(Object(e))!="{}"}),n0=Ae(function(){return rn("\uDF06\uD834")!=='"\\udf06\\ud834"'||rn("\uDEAD")!=='"\\udead"'}),T_=function(e,t){var r=ph(arguments),n=t;if((Le(t)||e!==void 0)&&!yi(e))return Ps(t)||(t=function(i,o){if(Te(n)&&(o=kt(n,this,i,o)),!yi(o))return o}),r[1]=t,Eb(rn,null,r)},N_=function(e,t,r){var n=Jp(r,t-1),i=Jp(r,t+1);return ea(e0,e)&&!ea(t0,i)||ea(t0,e)&&!ea(e0,n)?"\\u"+C_(E_(e,0),16):e};rn&&dt({target:"JSON",stat:!0,arity:3,forced:r0||n0},{stringify:function(e,t,r){var n=ph(arguments),i=Eb(r0?T_:rn,null,n);return n0&&typeof i=="string"?O_(i,P_,N_):i}});var I_=!Wt||Ae(function(){jl.f(1)});dt({target:"Object",stat:!0,forced:I_},{getOwnPropertySymbols:function(e){var t=jl.f;return t?t(Ri(e)):[]}}),Dt("asyncIterator");var A_=$t.f,Pr=le.Symbol,$n=Pr&&Pr.prototype;if(Ee&&Te(Pr)&&(!("description"in $n)||Pr().description!==void 0)){var i0={},ta=function(){var e=arguments.length<1||arguments[0]===void 0?void 0:Rr(arguments[0]),t=Dn($n,this)?new Pr(e):e===void 0?Pr():Pr(e);return e===""&&(i0[t]=!0),t};nb(ta,Pr),ta.prototype=$n,$n.constructor=ta;var D_=String(Pr("test"))=="Symbol(test)",R_=fe($n.valueOf),F_=fe($n.toString),L_=/^Symbol\((.*)\)[^)]+$/,M_=fe("".replace),j_=fe("".slice);A_($n,"description",{configurable:!0,get:function(){var e=R_(this);if(J(i0,e))return"";var t=F_(e),r=D_?j_(t,7,-1):M_(t,L_,"$1");return r===""?void 0:r}}),dt({global:!0,constructor:!0,forced:!0},{Symbol:ta})}Dt("hasInstance"),Dt("isConcatSpreadable"),Dt("iterator"),Dt("match"),Dt("matchAll"),Dt("replace"),Dt("search"),Dt("species"),Dt("split"),Dt("toPrimitive"),bb(),Dt("toStringTag"),en(cr("Symbol"),"Symbol"),Dt("unscopables"),en(le.JSON,"JSON",!0),en(Math,"Math",!0),dt({global:!0},{Reflect:{}}),en(le.Reflect,"Reflect",!0),xo.Symbol;var Tn,o0,a0,z_=fe("".charAt),s0=fe("".charCodeAt),U_=fe("".slice),l0=function(e){return function(t,r){var n,i,o=Rr(Mo(t)),a=sh(r),s=o.length;return a<0||a>=s?e?"":void 0:(n=s0(o,a))<55296||n>56319||a+1===s||(i=s0(o,a+1))<56320||i>57343?e?z_(o,a):n:e?U_(o,a,a+2):i-56320+(n-55296<<10)+65536}},V_={codeAt:l0(!1),charAt:l0(!0)},B_=!Ae(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),c0=Ml("IE_PROTO"),Ru=Object,W_=Ru.prototype,ln=B_?Ru.getPrototypeOf:function(e){var t=Ri(e);if(J(t,c0))return t[c0];var r=t.constructor;return Te(r)&&t instanceof r?r.prototype:t instanceof Ru?W_:null},Fu=Ye("iterator"),Ob=!1;[].keys&&("next"in(a0=[].keys())?(o0=ln(ln(a0)))!==Object.prototype&&(Tn=o0):Ob=!0);var q_=!Le(Tn)||Ae(function(){var e={};return Tn[Fu].call(e)!==e});q_&&(Tn={}),Te(Tn[Fu])||Ot(Tn,Fu,function(){return this});var mh={IteratorPrototype:Tn,BUGGY_SAFARI_ITERATORS:Ob},bi={},H_=mh.IteratorPrototype,G_=function(){return this},Q_=String,K_=TypeError,$r=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=fe(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),t=r instanceof Array}catch{}return function(n,i){return ut(n),function(o){if(typeof o=="object"||Te(o))return o;throw K_("Can't set "+Q_(o)+" as a prototype")}(i),t?e(n,i):n.__proto__=i,n}}():void 0),Y_=ah.PROPER,X_=ah.CONFIGURABLE,u0=mh.IteratorPrototype,ra=mh.BUGGY_SAFARI_ITERATORS,Qi=Ye("iterator"),Z_=function(){return this},vh=function(e,t,r,n,i,o,a){(function(y,b,g,_){var S=b+" Iterator";y.prototype=sn(H_,{next:An(+!_,g)}),en(y,S,!1),bi[S]=G_})(r,t,n);var s,c,l,u=function(y){if(y===i&&m)return m;if(!ra&&y in h)return h[y];switch(y){case"keys":case"values":case"entries":return function(){return new r(this,y)}}return function(){return new r(this)}},d=t+" Iterator",f=!1,h=e.prototype,p=h[Qi]||h["@@iterator"]||i&&h[i],m=!ra&&p||u(i),v=t=="Array"&&h.entries||p;if(v&&(s=ln(v.call(new e)))!==Object.prototype&&s.next&&(ln(s)!==u0&&($r?$r(s,u0):Te(s[Qi])||Ot(s,Qi,Z_)),en(s,d,!0)),Y_&&i=="values"&&p&&p.name!=="values"&&(X_?Ll(h,"name","values"):(f=!0,m=function(){return kt(p,this)})),i)if(c={values:u("values"),keys:o?m:u("keys"),entries:u("entries")},a)for(l in c)(ra||f||!(l in h))&&Ot(h,l,c[l]);else dt({target:t,proto:!0,forced:ra||f},c);return h[Qi]!==m&&Ot(h,Qi,m,{name:i}),bi[t]=m,c},$i=function(e,t){return{value:e,done:t}},J_=V_.charAt,e3=Kt.set,t3=Kt.getterFor("String Iterator");vh(String,"String",function(e){e3(this,{type:"String Iterator",string:Rr(e),index:0})},function(){var e,t=t3(this),r=t.string,n=t.index;return n>=r.length?$i(void 0,!0):(e=J_(r,n),t.index+=e.length,$i(e,!1))});var Lu=function(e,t,r){var n,i;ut(e);try{if(!(n=ks(e,"return"))){if(t==="throw")throw r;return r}n=kt(n,e)}catch(o){i=!0,n=o}if(t==="throw")throw r;if(i)throw n;return ut(n),r},r3=function(e,t,r,n){try{return n?t(ut(r)[0],r[1]):t(r)}catch(i){Lu(e,"throw",i)}},n3=Ye("iterator"),i3=Array.prototype,Cb=function(e){return e!==void 0&&(bi.Array===e||i3[n3]===e)},o3=Ye("iterator"),yh=function(e){if(!Ai(e))return ks(e,o3)||ks(e,"@@iterator")||bi[Un(e)]},a3=TypeError,Pb=function(e,t){var r=arguments.length<2?yh(e):t;if(ih(r))return ut(kt(r,e));throw a3(Di(e)+" is not iterable")},d0=Array,Tb=Ye("iterator"),Nb=!1;try{var s3=0,f0={next:function(){return{done:!!s3++}},return:function(){Nb=!0}};f0[Tb]=function(){return this},Array.from(f0,function(){throw 2})}catch{}var Ib=function(e,t){if(!t&&!Nb)return!1;var r=!1;try{var n={};n[Tb]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch{}return r},l3=!Ib(function(e){Array.from(e)});dt({target:"Array",stat:!0,forced:l3},{from:function(e){var t=Ri(e),r=dh(this),n=arguments.length,i=n>1?arguments[1]:void 0,o=i!==void 0;o&&(i=zl(i,n>2?arguments[2]:void 0));var a,s,c,l,u,d,f=yh(t),h=0;if(!f||this===d0&&Cb(f))for(a=Li(t),s=r?new this(a):d0(a);a>h;h++)d=o?i(t[h],h):t[h],_o(s,h,d);else for(u=(l=Pb(t,f)).next,s=r?new this:[];!(c=kt(u,l)).done;h++)d=o?r3(l,i,[c.value,h],!0):c.value,_o(s,h,d);return s.length=h,s}}),xo.Array.from;var Ft,ci,Ns,c3=typeof ArrayBuffer<"u"&&typeof DataView<"u",u3=$t.f,Ab=Kt.enforce,d3=Kt.get,Is=le.Int8Array,Mu=Is&&Is.prototype,h0=le.Uint8ClampedArray,p0=h0&&h0.prototype,hr=Is&&ln(Is),nr=Mu&&ln(Mu),f3=Object.prototype,ju=le.TypeError,m0=Ye("toStringTag"),zu=gi("TYPED_ARRAY_TAG"),Dr=c3&&!!$r&&Un(le.opera)!=="Opera",Db=!1,Tr={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},gh={BigInt64Array:8,BigUint64Array:8},Rb=function(e){var t=ln(e);if(Le(t)){var r=d3(t);return r&&J(r,"TypedArrayConstructor")?r.TypedArrayConstructor:Rb(t)}},v0=function(e){if(!Le(e))return!1;var t=Un(e);return J(Tr,t)||J(gh,t)};for(Ft in Tr)(Ns=(ci=le[Ft])&&ci.prototype)?Ab(Ns).TypedArrayConstructor=ci:Dr=!1;for(Ft in gh)(Ns=(ci=le[Ft])&&ci.prototype)&&(Ab(Ns).TypedArrayConstructor=ci);if((!Dr||!Te(hr)||hr===Function.prototype)&&(hr=function(){throw ju("Incorrect invocation")},Dr))for(Ft in Tr)le[Ft]&&$r(le[Ft],hr);if((!Dr||!nr||nr===f3)&&(nr=hr.prototype,Dr))for(Ft in Tr)le[Ft]&&$r(le[Ft].prototype,nr);if(Dr&&ln(p0)!==nr&&$r(p0,nr),Ee&&!J(nr,m0))for(Ft in Db=!0,u3(nr,m0,{get:function(){return Le(this)?this[zu]:void 0}}),Tr)le[Ft]&&Ll(le[Ft],zu,Ft);var Vl={NATIVE_ARRAY_BUFFER_VIEWS:Dr,TYPED_ARRAY_TAG:Db&&zu,aTypedArray:function(e){if(v0(e))return e;throw ju("Target is not a typed array")},aTypedArrayConstructor:function(e){if(Te(e)&&(!$r||Dn(hr,e)))return e;throw ju(Di(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,r,n){if(Ee){if(r)for(var i in Tr){var o=le[i];if(o&&J(o.prototype,e))try{delete o.prototype[e]}catch{try{o.prototype[e]=t}catch{}}}nr[e]&&!r||Ot(nr,e,r?t:Dr&&Mu[e]||t,n)}},exportTypedArrayStaticMethod:function(e,t,r){var n,i;if(Ee){if($r){if(r){for(n in Tr)if((i=le[n])&&J(i,e))try{delete i[e]}catch{}}if(hr[e]&&!r)return;try{return Ot(hr,e,r?t:Dr&&hr[e]||t)}catch{}}for(n in Tr)!(i=le[n])||i[e]&&!r||Ot(i,e,t)}},getTypedArrayConstructor:Rb,isView:function(e){if(!Le(e))return!1;var t=Un(e);return t==="DataView"||J(Tr,t)||J(gh,t)},isTypedArray:v0,TypedArray:hr,TypedArrayPrototype:nr},h3=TypeError,p3=Ye("species"),m3=function(e,t){var r,n=ut(e).constructor;return n===void 0||Ai(r=ut(n)[p3])?t:function(i){if(dh(i))return i;throw h3(Di(i)+" is not a constructor")}(r)},v3=Vl.aTypedArrayConstructor,y3=Vl.getTypedArrayConstructor,g3=Vl.aTypedArray;(0,Vl.exportTypedArrayMethod)("slice",function(e,t){for(var r,n=ph(g3(this),e,t),i=v3(m3(r=this,y3(r))),o=0,a=n.length,s=new i(a);a>o;)s[o]=n[o++];return s},Ae(function(){new Int8Array(1).slice()}));var b3=$t.f,Uu=Ye("unscopables"),Vu=Array.prototype;Vu[Uu]==null&&b3(Vu,Uu,{configurable:!0,value:sn(null)});var xa=function(e){Vu[Uu][e]=!0},$3=tb.includes,w3=Ae(function(){return!Array(1).includes()});dt({target:"Array",proto:!0,forced:w3},{includes:function(e){return $3(this,e,arguments.length>1?arguments[1]:void 0)}}),xa("includes"),ch("Array","includes");var _3=fe("".indexOf);dt({target:"String",proto:!0,forced:!ab("includes")},{includes:function(e){return!!~_3(Rr(Mo(this)),Rr(ob(e)),arguments.length>1?arguments[1]:void 0)}}),ch("String","includes");var x3=$t.f,S3=Kt.set,k3=Kt.getterFor("Array Iterator");vh(Array,"Array",function(e,t){S3(this,{type:"Array Iterator",target:kr(e),index:0,kind:t})},function(){var e=k3(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,$i(void 0,!0)):$i(r=="keys"?n:r=="values"?t[n]:[n,t[n]],!1)},"values");var y0=bi.Arguments=bi.Array;if(xa("keys"),xa("values"),xa("entries"),Ee&&y0.name!=="values")try{x3(y0,"name",{value:"values"})}catch{}var g0=Ae(function(){if(typeof ArrayBuffer=="function"){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}),na=Object.isExtensible,xc=Ae(function(){na(1)})||g0?function(e){return!!Le(e)&&(!g0||Ar(e)!="ArrayBuffer")&&(!na||na(e))}:na,E3=!Ae(function(){return Object.isExtensible(Object.preventExtensions({}))}),ii=Ii(function(e){var t=$t.f,r=!1,n=gi("meta"),i=0,o=function(s){t(s,n,{value:{objectID:"O"+i++,weakData:{}}})},a=e.exports={enable:function(){a.enable=function(){},r=!0;var s=wo.f,c=fe([].splice),l={};l[n]=1,s(l).length&&(wo.f=function(u){for(var d=s(u),f=0,h=d.length;f<h;f++)if(d[f]===n){c(d,f,1);break}return d},dt({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:hh.f}))},fastKey:function(s,c){if(!Le(s))return typeof s=="symbol"?s:(typeof s=="string"?"S":"P")+s;if(!J(s,n)){if(!xc(s))return"F";if(!c)return"E";o(s)}return s[n].objectID},getWeakData:function(s,c){if(!J(s,n)){if(!xc(s))return!0;if(!c)return!1;o(s)}return s[n].weakData},onFreeze:function(s){return E3&&r&&xc(s)&&!J(s,n)&&o(s),s}};Fi[n]=!0});ii.enable,ii.fastKey,ii.getWeakData,ii.onFreeze;var O3=TypeError,Sa=function(e,t){this.stopped=e,this.result=t},b0=Sa.prototype,Fb=function(e,t,r){var n,i,o,a,s,c,l,u=r&&r.that,d=!(!r||!r.AS_ENTRIES),f=!(!r||!r.IS_RECORD),h=!(!r||!r.IS_ITERATOR),p=!(!r||!r.INTERRUPTED),m=zl(t,u),v=function(b){return n&&Lu(n,"normal",b),new Sa(!0,b)},y=function(b){return d?(ut(b),p?m(b[0],b[1],v):m(b[0],b[1])):p?m(b,v):m(b)};if(f)n=e.iterator;else if(h)n=e;else{if(!(i=yh(e)))throw O3(Di(e)+" is not iterable");if(Cb(i)){for(o=0,a=Li(e);a>o;o++)if((s=y(e[o]))&&Dn(b0,s))return s;return new Sa(!1)}n=Pb(e,i)}for(c=f?e.next:n.next;!(l=kt(c,n)).done;){try{s=y(l.value)}catch(b){Lu(n,"throw",b)}if(typeof s=="object"&&s&&Dn(b0,s))return s}return new Sa(!1)},C3=TypeError,Lb=function(e,t){if(Dn(t,e))return e;throw C3("Incorrect invocation")},$0=function(e,t,r){for(var n in t)Ot(e,n,t[n],r);return e},w0=Ye("species"),P3=$t.f,_0=ii.fastKey,x0=Kt.set,Sc=Kt.getterFor,T3={getConstructor:function(e,t,r,n){var i=e(function(l,u){Lb(l,o),x0(l,{type:t,index:sn(null),first:void 0,last:void 0,size:0}),Ee||(l.size=0),Ai(u)||Fb(u,l[n],{that:l,AS_ENTRIES:r})}),o=i.prototype,a=Sc(t),s=function(l,u,d){var f,h,p=a(l),m=c(l,u);return m?m.value=d:(p.last=m={index:h=_0(u,!0),key:u,value:d,previous:f=p.last,next:void 0,removed:!1},p.first||(p.first=m),f&&(f.next=m),Ee?p.size++:l.size++,h!=="F"&&(p.index[h]=m)),l},c=function(l,u){var d,f=a(l),h=_0(u);if(h!=="F")return f.index[h];for(d=f.first;d;d=d.next)if(d.key==u)return d};return $0(o,{clear:function(){for(var l=a(this),u=l.index,d=l.first;d;)d.removed=!0,d.previous&&(d.previous=d.previous.next=void 0),delete u[d.index],d=d.next;l.first=l.last=void 0,Ee?l.size=0:this.size=0},delete:function(l){var u=this,d=a(u),f=c(u,l);if(f){var h=f.next,p=f.previous;delete d.index[f.index],f.removed=!0,p&&(p.next=h),h&&(h.previous=p),d.first==f&&(d.first=h),d.last==f&&(d.last=p),Ee?d.size--:u.size--}return!!f},forEach:function(l){for(var u,d=a(this),f=zl(l,arguments.length>1?arguments[1]:void 0);u=u?u.next:d.first;)for(f(u.value,u.key,this);u&&u.removed;)u=u.previous},has:function(l){return!!c(this,l)}}),$0(o,r?{get:function(l){var u=c(this,l);return u&&u.value},set:function(l,u){return s(this,l===0?0:l,u)}}:{add:function(l){return s(this,l=l===0?0:l,l)}}),Ee&&P3(o,"size",{get:function(){return a(this).size}}),i},setStrong:function(e,t,r){var n=t+" Iterator",i=Sc(t),o=Sc(n);vh(e,t,function(a,s){x0(this,{type:n,target:a,state:i(a),kind:s,last:void 0})},function(){for(var a=o(this),s=a.kind,c=a.last;c&&c.removed;)c=c.previous;return a.target&&(a.last=c=c?c.next:a.state.first)?$i(s=="keys"?c.key:s=="values"?c.value:[c.key,c.value],!1):(a.target=void 0,$i(void 0,!0))},r?"entries":"values",!r,!0),function(a){var s=cr(a),c=$t.f;Ee&&s&&!s[w0]&&c(s,w0,{configurable:!0,get:function(){return this}})}(t)}};function Mb(e){var t=this.constructor;return this.then(function(r){return t.resolve(e()).then(function(){return r})},function(r){return t.resolve(e()).then(function(){return t.reject(r)})})}function jb(e){return new this(function(t,r){if(!e||e.length===void 0)return r(new TypeError(typeof e+" "+e+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var n=Array.prototype.slice.call(e);if(n.length===0)return t([]);var i=n.length;function o(s,c){if(c&&(typeof c=="object"||typeof c=="function")){var l=c.then;if(typeof l=="function")return void l.call(c,function(u){o(s,u)},function(u){n[s]={status:"rejected",reason:u},--i==0&&t(n)})}n[s]={status:"fulfilled",value:c},--i==0&&t(n)}for(var a=0;a<n.length;a++)o(a,n[a])})}(function(e,t,r){var n=e.indexOf("Map")!==-1,i=e.indexOf("Weak")!==-1,o=n?"set":"add",a=le[e],s=a&&a.prototype,c=a,l={},u=function(v){var y=fe(s[v]);Ot(s,v,v=="add"?function(b){return y(this,b===0?0:b),this}:v=="delete"?function(b){return!(i&&!Le(b))&&y(this,b===0?0:b)}:v=="get"?function(b){return i&&!Le(b)?void 0:y(this,b===0?0:b)}:v=="has"?function(b){return!(i&&!Le(b))&&y(this,b===0?0:b)}:function(b,g){return y(this,b===0?0:b,g),this})};if(Iu(e,!Te(a)||!(i||s.forEach&&!Ae(function(){new a().entries().next()}))))c=r.getConstructor(t,e,n,o),ii.enable();else if(Iu(e,!0)){var d=new c,f=d[o](i?{}:-0,1)!=d,h=Ae(function(){d.has(1)}),p=Ib(function(v){new a(v)}),m=!i&&Ae(function(){for(var v=new a,y=5;y--;)v[o](y,y);return!v.has(-0)});p||((c=t(function(v,y){Lb(v,s);var b=function(g,_,S){var E,x;return $r&&Te(E=_.constructor)&&E!==S&&Le(x=E.prototype)&&x!==S.prototype&&$r(g,x),g}(new a,v,c);return Ai(y)||Fb(y,b[o],{that:b,AS_ENTRIES:n}),b})).prototype=s,s.constructor=c),(h||m)&&(u("delete"),u("has"),n&&u("get")),(m||f)&&u(o),i&&s.clear&&delete s.clear}l[e]=c,dt({global:!0,constructor:!0,forced:c!=a},l),en(c,e),i||r.setStrong(c,e,n)})("Set",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},T3),xo.Set;var N3=setTimeout;function S0(e){return Boolean(e&&e.length!==void 0)}function I3(){}function Ve(e){if(!(this instanceof Ve))throw new TypeError("Promises must be constructed via new");if(typeof e!="function")throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],Ub(e,this)}function zb(e,t){for(;e._state===3;)e=e._value;e._state!==0?(e._handled=!0,Ve._immediateFn(function(){var r=e._state===1?t.onFulfilled:t.onRejected;if(r!==null){var n;try{n=r(e._value)}catch(i){return void So(t.promise,i)}Bu(t.promise,n)}else(e._state===1?Bu:So)(t.promise,e._value)})):e._deferreds.push(t)}function Bu(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&(typeof t=="object"||typeof t=="function")){var r=t.then;if(t instanceof Ve)return e._state=3,e._value=t,void Wu(e);if(typeof r=="function")return void Ub((n=r,i=t,function(){n.apply(i,arguments)}),e)}e._state=1,e._value=t,Wu(e)}catch(o){So(e,o)}var n,i}function So(e,t){e._state=2,e._value=t,Wu(e)}function Wu(e){e._state===2&&e._deferreds.length===0&&Ve._immediateFn(function(){e._handled||Ve._unhandledRejectionFn(e._value)});for(var t=0,r=e._deferreds.length;t<r;t++)zb(e,e._deferreds[t]);e._deferreds=null}function A3(e,t,r){this.onFulfilled=typeof e=="function"?e:null,this.onRejected=typeof t=="function"?t:null,this.promise=r}function Ub(e,t){var r=!1;try{e(function(n){r||(r=!0,Bu(t,n))},function(n){r||(r=!0,So(t,n))})}catch(n){if(r)return;r=!0,So(t,n)}}Ve.prototype.catch=function(e){return this.then(null,e)},Ve.prototype.then=function(e,t){var r=new this.constructor(I3);return zb(this,new A3(e,t,r)),r},Ve.prototype.finally=Mb,Ve.all=function(e){return new Ve(function(t,r){if(!S0(e))return r(new TypeError("Promise.all accepts an array"));var n=Array.prototype.slice.call(e);if(n.length===0)return t([]);var i=n.length;function o(s,c){try{if(c&&(typeof c=="object"||typeof c=="function")){var l=c.then;if(typeof l=="function")return void l.call(c,function(u){o(s,u)},r)}n[s]=c,--i==0&&t(n)}catch(u){r(u)}}for(var a=0;a<n.length;a++)o(a,n[a])})},Ve.allSettled=jb,Ve.resolve=function(e){return e&&typeof e=="object"&&e.constructor===Ve?e:new Ve(function(t){t(e)})},Ve.reject=function(e){return new Ve(function(t,r){r(e)})},Ve.race=function(e){return new Ve(function(t,r){if(!S0(e))return r(new TypeError("Promise.race accepts an array"));for(var n=0,i=e.length;n<i;n++)Ve.resolve(e[n]).then(t,r)})},Ve._immediateFn=typeof setImmediate=="function"&&function(e){setImmediate(e)}||function(e){N3(e,0)},Ve._unhandledRejectionFn=function(e){typeof console<"u"&&console&&console.warn("Possible Unhandled Promise Rejection:",e)};var Hn=function(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}();typeof Hn.Promise!="function"?Hn.Promise=Ve:(Hn.Promise.prototype.finally||(Hn.Promise.prototype.finally=Mb),Hn.Promise.allSettled||(Hn.Promise.allSettled=jb)),function(e){function t(h){for(var p=0,m=Math.min(65536,h.length+1),v=new Uint16Array(m),y=[],b=0;;){var g=p<h.length;if(!g||b>=m-1){var _=v.subarray(0,b);if(y.push(String.fromCharCode.apply(null,_)),!g)return y.join("");h=h.subarray(p),p=0,b=0}var S=h[p++];if((128&S)==0)v[b++]=S;else if((224&S)==192){var E=63&h[p++];v[b++]=(31&S)<<6|E}else if((240&S)==224){E=63&h[p++];var x=63&h[p++];v[b++]=(31&S)<<12|E<<6|x}else if((248&S)==240){var N=(7&S)<<18|(E=63&h[p++])<<12|(x=63&h[p++])<<6|63&h[p++];N>65535&&(N-=65536,v[b++]=N>>>10&1023|55296,N=56320|1023&N),v[b++]=N}}}var r="Failed to ",n=function(h,p,m){if(h)throw new Error("".concat(r).concat(p,": the '").concat(m,"' option is unsupported."))},i=typeof Buffer=="function"&&Buffer.from,o=i?function(h){return Buffer.from(h)}:function(h){for(var p=0,m=h.length,v=0,y=Math.max(32,m+(m>>>1)+7),b=new Uint8Array(y>>>3<<3);p<m;){var g=h.charCodeAt(p++);if(g>=55296&&g<=56319){if(p<m){var _=h.charCodeAt(p);(64512&_)==56320&&(++p,g=((1023&g)<<10)+(1023&_)+65536)}if(g>=55296&&g<=56319)continue}if(v+4>b.length){y+=8,y=(y*=1+p/h.length*2)>>>3<<3;var S=new Uint8Array(y);S.set(b),b=S}if((4294967168&g)!=0){if((4294965248&g)==0)b[v++]=g>>>6&31|192;else if((4294901760&g)==0)b[v++]=g>>>12&15|224,b[v++]=g>>>6&63|128;else{if((4292870144&g)!=0)continue;b[v++]=g>>>18&7|240,b[v++]=g>>>12&63|128,b[v++]=g>>>6&63|128}b[v++]=63&g|128}else b[v++]=g}return b.slice?b.slice(0,v):b.subarray(0,v)};function a(){this.encoding="utf-8"}a.prototype.encode=function(h,p){return n(p&&p.stream,"encode","stream"),o(h)};var s=!i&&typeof Blob=="function"&&typeof URL=="function"&&typeof URL.createObjectURL=="function",c=["utf-8","utf8","unicode-1-1-utf-8"],l=t;i?l=function(h,p){return(h instanceof Buffer?h:Buffer.from(h.buffer,h.byteOffset,h.byteLength)).toString(p)}:s&&(l=function(h){try{return function(p){var m;try{var v=new Blob([p],{type:"text/plain;charset=UTF-8"});m=URL.createObjectURL(v);var y=new XMLHttpRequest;return y.open("GET",m,!1),y.send(),y.responseText}finally{m&&URL.revokeObjectURL(m)}}(h)}catch{return t(h)}});var u="construct 'TextDecoder'",d="".concat(r," ").concat(u,": the ");function f(h,p){if(n(p&&p.fatal,u,"fatal"),h=h||"utf-8",!(i?Buffer.isEncoding(h):c.indexOf(h.toLowerCase())!==-1))throw new RangeError("".concat(d," encoding label provided ('").concat(h,"') is invalid."));this.encoding=h,this.fatal=!1,this.ignoreBOM=!1}f.prototype.decode=function(h,p){var m;return n(p&&p.stream,"decode","stream"),m=h instanceof Uint8Array?h:h.buffer instanceof ArrayBuffer?new Uint8Array(h.buffer):new Uint8Array(h),l(m,this.encoding)},e.TextEncoder=e.TextEncoder||a,e.TextDecoder=e.TextDecoder||f}(typeof window<"u"?window:vr),function(){function e(v,y){if(!(v instanceof y))throw new TypeError("Cannot call a class as a function")}function t(v,y){for(var b=0;b<y.length;b++){var g=y[b];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(v,g.key,g)}}function r(v,y,b){return y&&t(v.prototype,y),b&&t(v,b),v}function n(v,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");v.prototype=Object.create(y&&y.prototype,{constructor:{value:v,writable:!0,configurable:!0}}),y&&o(v,y)}function i(v){return i=Object.setPrototypeOf?Object.getPrototypeOf:function(y){return y.__proto__||Object.getPrototypeOf(y)},i(v)}function o(v,y){return o=Object.setPrototypeOf||function(b,g){return b.__proto__=g,b},o(v,y)}function a(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function s(v){if(v===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v}function c(v,y){return!y||typeof y!="object"&&typeof y!="function"?s(v):y}function l(v){var y=a();return function(){var b,g=i(v);if(y){var _=i(this).constructor;b=Reflect.construct(g,arguments,_)}else b=g.apply(this,arguments);return c(this,b)}}function u(v,y){for(;!Object.prototype.hasOwnProperty.call(v,y)&&(v=i(v))!==null;);return v}function d(v,y,b){return d=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(g,_,S){var E=u(g,_);if(E){var x=Object.getOwnPropertyDescriptor(E,_);return x.get?x.get.call(S):x.value}},d(v,y,b||v)}var f=function(){function v(){e(this,v),Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}return r(v,[{key:"addEventListener",value:function(y,b,g){y in this.listeners||(this.listeners[y]=[]),this.listeners[y].push({callback:b,options:g})}},{key:"removeEventListener",value:function(y,b){if(y in this.listeners){for(var g=this.listeners[y],_=0,S=g.length;_<S;_++)if(g[_].callback===b)return void g.splice(_,1)}}},{key:"dispatchEvent",value:function(y){if(y.type in this.listeners){for(var b=this.listeners[y.type].slice(),g=0,_=b.length;g<_;g++){var S=b[g];try{S.callback.call(this,y)}catch(E){Promise.resolve().then(function(){throw E})}S.options&&S.options.once&&this.removeEventListener(y.type,S.callback)}return!y.defaultPrevented}}}]),v}(),h=function(v){n(b,v);var y=l(b);function b(){var g;return e(this,b),(g=y.call(this)).listeners||f.call(s(g)),Object.defineProperty(s(g),"aborted",{value:!1,writable:!0,configurable:!0}),Object.defineProperty(s(g),"onabort",{value:null,writable:!0,configurable:!0}),g}return r(b,[{key:"toString",value:function(){return"[object AbortSignal]"}},{key:"dispatchEvent",value:function(g){g.type==="abort"&&(this.aborted=!0,typeof this.onabort=="function"&&this.onabort.call(this,g)),d(i(b.prototype),"dispatchEvent",this).call(this,g)}}]),b}(f),p=function(){function v(){e(this,v),Object.defineProperty(this,"signal",{value:new h,writable:!0,configurable:!0})}return r(v,[{key:"abort",value:function(){var y;try{y=new Event("abort")}catch{typeof document<"u"?document.createEvent?(y=document.createEvent("Event")).initEvent("abort",!1,!1):(y=document.createEventObject()).type="abort":y={type:"abort",bubbles:!1,cancelable:!1}}this.signal.dispatchEvent(y)}},{key:"toString",value:function(){return"[object AbortController]"}}]),v}();function m(v){return v.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL?(console.log("__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill"),!0):typeof v.Request=="function"&&!v.Request.prototype.hasOwnProperty("signal")||!v.AbortController}typeof Symbol<"u"&&Symbol.toStringTag&&(p.prototype[Symbol.toStringTag]="AbortController",h.prototype[Symbol.toStringTag]="AbortSignal"),function(v){m(v)&&(v.AbortController=p,v.AbortSignal=h)}(typeof self<"u"?self:vr)}();var _n=Ii(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function n(){var i=this;this.locked=new Map,this.addToLocked=function(o,a){var s=i.locked.get(o);s===void 0?a===void 0?i.locked.set(o,[]):i.locked.set(o,[a]):a!==void 0&&(s.unshift(a),i.locked.set(o,s))},this.isLocked=function(o){return i.locked.has(o)},this.lock=function(o){return new Promise(function(a,s){i.isLocked(o)?i.addToLocked(o,a):(i.addToLocked(o),a())})},this.unlock=function(o){var a=i.locked.get(o);if(a!==void 0&&a.length!==0){var s=a.pop();i.locked.set(o,a),s!==void 0&&setTimeout(s,0)}else i.locked.delete(o)}}return n.getInstance=function(){return n.instance===void 0&&(n.instance=new n),n.instance},n}();t.default=function(){return r.getInstance()}});th(_n);var D3=Ii(function(e,t){var r=vr&&vr.__awaiter||function(c,l,u,d){return new(u||(u=Promise))(function(f,h){function p(y){try{v(d.next(y))}catch(b){h(b)}}function m(y){try{v(d.throw(y))}catch(b){h(b)}}function v(y){y.done?f(y.value):new u(function(b){b(y.value)}).then(p,m)}v((d=d.apply(c,l||[])).next())})},n=vr&&vr.__generator||function(c,l){var u,d,f,h,p={label:0,sent:function(){if(1&f[0])throw f[1];return f[1]},trys:[],ops:[]};return h={next:m(0),throw:m(1),return:m(2)},typeof Symbol=="function"&&(h[Symbol.iterator]=function(){return this}),h;function m(v){return function(y){return function(b){if(u)throw new TypeError("Generator is already executing.");for(;p;)try{if(u=1,d&&(f=2&b[0]?d.return:b[0]?d.throw||((f=d.return)&&f.call(d),0):d.next)&&!(f=f.call(d,b[1])).done)return f;switch(d=0,f&&(b=[2&b[0],f.value]),b[0]){case 0:case 1:f=b;break;case 4:return p.label++,{value:b[1],done:!1};case 5:p.label++,d=b[1],b=[0];continue;case 7:b=p.ops.pop(),p.trys.pop();continue;default:if(f=p.trys,!((f=f.length>0&&f[f.length-1])||b[0]!==6&&b[0]!==2)){p=0;continue}if(b[0]===3&&(!f||b[1]>f[0]&&b[1]<f[3])){p.label=b[1];break}if(b[0]===6&&p.label<f[1]){p.label=f[1],f=b;break}if(f&&p.label<f[2]){p.label=f[2],p.ops.push(b);break}f[2]&&p.ops.pop(),p.trys.pop();continue}b=l.call(c,p)}catch(g){b=[6,g],d=0}finally{u=f=0}if(5&b[0])throw b[1];return{value:b[0]?b[1]:void 0,done:!0}}([v,y])}}};Object.defineProperty(t,"__esModule",{value:!0});var i="browser-tabs-lock-key";function o(c){return new Promise(function(l){return setTimeout(l,c)})}function a(c){for(var l="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz",u="",d=0;d<c;d++)u+=l[Math.floor(Math.random()*l.length)];return u}var s=function(){function c(){this.acquiredIatSet=new Set,this.id=Date.now().toString()+a(15),this.acquireLock=this.acquireLock.bind(this),this.releaseLock=this.releaseLock.bind(this),this.releaseLock__private__=this.releaseLock__private__.bind(this),this.waitForSomethingToChange=this.waitForSomethingToChange.bind(this),this.refreshLockWhileAcquired=this.refreshLockWhileAcquired.bind(this),c.waiters===void 0&&(c.waiters=[])}return c.prototype.acquireLock=function(l,u){return u===void 0&&(u=5e3),r(this,void 0,void 0,function(){var d,f,h,p,m,v;return n(this,function(y){switch(y.label){case 0:d=Date.now()+a(4),f=Date.now()+u,h=i+"-"+l,p=window.localStorage,y.label=1;case 1:return Date.now()<f?[4,o(30)]:[3,8];case 2:return y.sent(),p.getItem(h)!==null?[3,5]:(m=this.id+"-"+l+"-"+d,[4,o(Math.floor(25*Math.random()))]);case 3:return y.sent(),p.setItem(h,JSON.stringify({id:this.id,iat:d,timeoutKey:m,timeAcquired:Date.now(),timeRefreshed:Date.now()})),[4,o(30)];case 4:return y.sent(),(v=p.getItem(h))!==null&&(v=JSON.parse(v)).id===this.id&&v.iat===d?(this.acquiredIatSet.add(d),this.refreshLockWhileAcquired(h,d),[2,!0]):[3,7];case 5:return c.lockCorrector(),[4,this.waitForSomethingToChange(f)];case 6:y.sent(),y.label=7;case 7:return d=Date.now()+a(4),[3,1];case 8:return[2,!1]}})})},c.prototype.refreshLockWhileAcquired=function(l,u){return r(this,void 0,void 0,function(){var d=this;return n(this,function(f){return setTimeout(function(){return r(d,void 0,void 0,function(){var h,p;return n(this,function(m){switch(m.label){case 0:return[4,_n.default().lock(u)];case 1:return m.sent(),this.acquiredIatSet.has(u)?(h=window.localStorage,(p=h.getItem(l))===null?(_n.default().unlock(u),[2]):((p=JSON.parse(p)).timeRefreshed=Date.now(),h.setItem(l,JSON.stringify(p)),_n.default().unlock(u),this.refreshLockWhileAcquired(l,u),[2])):(_n.default().unlock(u),[2])}})})},1e3),[2]})})},c.prototype.waitForSomethingToChange=function(l){return r(this,void 0,void 0,function(){return n(this,function(u){switch(u.label){case 0:return[4,new Promise(function(d){var f=!1,h=Date.now(),p=!1;function m(){if(p||(window.removeEventListener("storage",m),c.removeFromWaiting(m),clearTimeout(v),p=!0),!f){f=!0;var y=50-(Date.now()-h);y>0?setTimeout(d,y):d()}}window.addEventListener("storage",m),c.addToWaiting(m);var v=setTimeout(m,Math.max(0,l-Date.now()))})];case 1:return u.sent(),[2]}})})},c.addToWaiting=function(l){this.removeFromWaiting(l),c.waiters!==void 0&&c.waiters.push(l)},c.removeFromWaiting=function(l){c.waiters!==void 0&&(c.waiters=c.waiters.filter(function(u){return u!==l}))},c.notifyWaiters=function(){c.waiters!==void 0&&c.waiters.slice().forEach(function(l){return l()})},c.prototype.releaseLock=function(l){return r(this,void 0,void 0,function(){return n(this,function(u){switch(u.label){case 0:return[4,this.releaseLock__private__(l)];case 1:return[2,u.sent()]}})})},c.prototype.releaseLock__private__=function(l){return r(this,void 0,void 0,function(){var u,d,f;return n(this,function(h){switch(h.label){case 0:return u=window.localStorage,d=i+"-"+l,(f=u.getItem(d))===null?[2]:(f=JSON.parse(f)).id!==this.id?[3,2]:[4,_n.default().lock(f.iat)];case 1:h.sent(),this.acquiredIatSet.delete(f.iat),u.removeItem(d),_n.default().unlock(f.iat),c.notifyWaiters(),h.label=2;case 2:return[2]}})})},c.lockCorrector=function(){for(var l=Date.now()-5e3,u=window.localStorage,d=Object.keys(u),f=!1,h=0;h<d.length;h++){var p=d[h];if(p.includes(i)){var m=u.getItem(p);m!==null&&((m=JSON.parse(m)).timeRefreshed===void 0&&m.timeAcquired<l||m.timeRefreshed!==void 0&&m.timeRefreshed<l)&&(u.removeItem(p),f=!0)}}f&&c.notifyWaiters()},c.waiters=void 0,c}();t.default=s}),R3=th(D3),F3={timeoutInSeconds:60},L3=["login_required","consent_required","interaction_required","account_selection_required","access_denied"],Vb={name:"auth0-spa-js",version:"1.22.6"},Bb=function(){return Date.now()},Lr=function(e){function t(r,n){var i=e.call(this,n)||this;return i.error=r,i.error_description=n,Object.setPrototypeOf(i,t.prototype),i}return zn(t,e),t.fromPayload=function(r){return new t(r.error,r.error_description)},t}(Error),M3=function(e){function t(r,n,i,o){o===void 0&&(o=null);var a=e.call(this,r,n)||this;return a.state=i,a.appState=o,Object.setPrototypeOf(a,t.prototype),a}return zn(t,e),t}(Lr),qu=function(e){function t(){var r=e.call(this,"timeout","Timeout")||this;return Object.setPrototypeOf(r,t.prototype),r}return zn(t,e),t}(Lr),j3=function(e){function t(r){var n=e.call(this)||this;return n.popup=r,Object.setPrototypeOf(n,t.prototype),n}return zn(t,e),t}(qu),z3=function(e){function t(r){var n=e.call(this,"cancelled","Popup closed")||this;return n.popup=r,Object.setPrototypeOf(n,t.prototype),n}return zn(t,e),t}(Lr),U3=function(e){function t(r,n,i){var o=e.call(this,r,n)||this;return o.mfa_token=i,Object.setPrototypeOf(o,t.prototype),o}return zn(t,e),t}(Lr),V3=function(e){function t(r,n){var i=e.call(this,"missing_refresh_token","Missing Refresh Token (audience: '".concat(E0(r,["default"]),"', scope: '").concat(E0(n),"')"))||this;return i.audience=r,i.scope=n,Object.setPrototypeOf(i,t.prototype),i}return zn(t,e),t}(Lr),B3=function(e){return new Promise(function(t,r){var n,i=setInterval(function(){e.popup&&e.popup.closed&&(clearInterval(i),clearTimeout(o),window.removeEventListener("message",n,!1),r(new z3(e.popup)))},1e3),o=setTimeout(function(){clearInterval(i),r(new j3(e.popup)),window.removeEventListener("message",n,!1)},1e3*(e.timeoutInSeconds||60));n=function(a){if(a.data&&a.data.type==="authorization_response"){if(clearTimeout(o),clearInterval(i),window.removeEventListener("message",n,!1),e.popup.close(),a.data.response.error)return r(Lr.fromPayload(a.data.response));t(a.data.response)}},window.addEventListener("message",n)})},bh=function(){return window.crypto||window.msCrypto},Wb=function(){var e=bh();return e.subtle||e.webkitSubtle},Or=function(){var e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_~.",t="";return Array.from(bh().getRandomValues(new Uint8Array(43))).forEach(function(r){return t+=e[r%e.length]}),t},Gn=function(e){return btoa(e)},Hu=function(e){return Object.keys(e).filter(function(t){return e[t]!==void 0}).map(function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])}).join("&")},kc=function(e){return me(void 0,void 0,void 0,function(){var t;return ve(this,function(r){switch(r.label){case 0:return t=Wb().digest({name:"SHA-256"},new TextEncoder().encode(e)),window.msCrypto?[2,new Promise(function(n,i){t.oncomplete=function(o){n(o.target.result)},t.onerror=function(o){i(o.error)},t.onabort=function(){i("The digest operation was aborted")}})]:[4,t];case 1:return[2,r.sent()]}})})},k0=function(e){return function(t){return decodeURIComponent(atob(t).split("").map(function(r){return"%"+("00"+r.charCodeAt(0).toString(16)).slice(-2)}).join(""))}(e.replace(/_/g,"/").replace(/-/g,"+"))},Ec=function(e){var t=new Uint8Array(e);return function(r){var n={"+":"-","/":"_","=":""};return r.replace(/[+/=]/g,function(i){return n[i]})}(window.btoa(String.fromCharCode.apply(String,Ou([],vi(Array.from(t)),!1))))};function E0(e,t){return t===void 0&&(t=[]),e&&!t.includes(e)?e:""}var W3=function(e,t){return me(void 0,void 0,void 0,function(){var r,n;return ve(this,function(i){switch(i.label){case 0:return[4,(o=e,a=t,a=a||{},new Promise(function(s,c){var l=new XMLHttpRequest,u=[],d=[],f={},h=function(){return{ok:(l.status/100|0)==2,statusText:l.statusText,status:l.status,url:l.responseURL,text:function(){return Promise.resolve(l.responseText)},json:function(){return Promise.resolve(l.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([l.response]))},clone:h,headers:{keys:function(){return u},entries:function(){return d},get:function(m){return f[m.toLowerCase()]},has:function(m){return m.toLowerCase()in f}}}};for(var p in l.open(a.method||"get",o,!0),l.onload=function(){l.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(m,v,y){u.push(v=v.toLowerCase()),d.push([v,y]),f[v]=f[v]?f[v]+","+y:y}),s(h())},l.onerror=c,l.withCredentials=a.credentials=="include",a.headers)l.setRequestHeader(p,a.headers[p]);l.send(a.body||null)}))];case 1:return r=i.sent(),n={ok:r.ok},[4,r.json()];case 2:return[2,(n.json=i.sent(),n)]}var o,a})})},q3=function(e,t,r){return me(void 0,void 0,void 0,function(){var n,i;return ve(this,function(o){return n=new AbortController,t.signal=n.signal,[2,Promise.race([W3(e,t),new Promise(function(a,s){i=setTimeout(function(){n.abort(),s(new Error("Timeout when executing 'fetch'"))},r)})]).finally(function(){clearTimeout(i)})]})})},H3=function(e,t,r,n,i,o,a){return me(void 0,void 0,void 0,function(){return ve(this,function(s){return[2,(c={auth:{audience:t,scope:r},timeout:i,fetchUrl:e,fetchOptions:n,useFormData:a},l=o,new Promise(function(u,d){var f=new MessageChannel;f.port1.onmessage=function(h){h.data.error?d(new Error(h.data.error)):u(h.data),f.port1.close()},l.postMessage(c,[f.port2])}))];var c,l})})},G3=function(e,t,r,n,i,o,a){return a===void 0&&(a=1e4),me(void 0,void 0,void 0,function(){return ve(this,function(s){return i?[2,H3(e,t,r,n,a,i,o)]:[2,q3(e,n,a)]})})};function Q3(e,t,r,n,i,o,a){return me(this,void 0,void 0,function(){var s,c,l,u,d,f,h,p,m;return ve(this,function(v){switch(v.label){case 0:s=null,l=0,v.label=1;case 1:if(!(l<3))return[3,6];v.label=2;case 2:return v.trys.push([2,4,,5]),[4,G3(e,r,n,i,o,a,t)];case 3:return c=v.sent(),s=null,[3,6];case 4:return u=v.sent(),s=u,[3,5];case 5:return l++,[3,1];case 6:if(s)throw s.message=s.message||"Failed to fetch",s;if(d=c.json,f=d.error,h=d.error_description,p=At(d,["error","error_description"]),!c.ok)throw m=h||"HTTP error. Unable to fetch ".concat(e),f==="mfa_required"?new U3(f,m,p.mfa_token):new Lr(f||"request_error",m);return[2,p]}})})}function ia(e,t){var r=e.baseUrl,n=e.timeout,i=e.audience,o=e.scope,a=e.auth0Client,s=e.useFormData,c=At(e,["baseUrl","timeout","audience","scope","auth0Client","useFormData"]);return me(this,void 0,void 0,function(){var l;return ve(this,function(u){switch(u.label){case 0:return l=s?Hu(c):JSON.stringify(c),[4,Q3("".concat(r,"/oauth/token"),n,i||"default",o,{method:"POST",body:l,headers:{"Content-Type":s?"application/x-www-form-urlencoded":"application/json","Auth0-Client":btoa(JSON.stringify(a||Vb))}},t,s)];case 1:return[2,u.sent()]}})})}var K3=function(e){return Array.from(new Set(e))},qr=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return K3(e.join(" ").trim().split(/\s+/)).join(" ")},En=function(){function e(t,r){r===void 0&&(r="@@auth0spajs@@"),this.prefix=r,this.client_id=t.client_id,this.scope=t.scope,this.audience=t.audience}return e.prototype.toKey=function(){return"".concat(this.prefix,"::").concat(this.client_id,"::").concat(this.audience,"::").concat(this.scope)},e.fromKey=function(t){var r=vi(t.split("::"),4),n=r[0],i=r[1],o=r[2];return new e({client_id:i,scope:r[3],audience:o},n)},e.fromCacheEntry=function(t){return new e({scope:t.scope,audience:t.audience,client_id:t.client_id})},e}(),Y3=function(){function e(){}return e.prototype.set=function(t,r){localStorage.setItem(t,JSON.stringify(r))},e.prototype.get=function(t){var r=window.localStorage.getItem(t);if(r)try{return JSON.parse(r)}catch{return}},e.prototype.remove=function(t){localStorage.removeItem(t)},e.prototype.allKeys=function(){return Object.keys(window.localStorage).filter(function(t){return t.startsWith("@@auth0spajs@@")})},e}(),X3=function(){var e;this.enclosedCache=(e={},{set:function(t,r){e[t]=r},get:function(t){var r=e[t];if(r)return r},remove:function(t){delete e[t]},allKeys:function(){return Object.keys(e)}})},Z3=function(){function e(t,r,n){this.cache=t,this.keyManifest=r,this.nowProvider=n,this.nowProvider=this.nowProvider||Bb}return e.prototype.get=function(t,r){var n;return r===void 0&&(r=0),me(this,void 0,void 0,function(){var i,o,a,s,c;return ve(this,function(l){switch(l.label){case 0:return[4,this.cache.get(t.toKey())];case 1:return(i=l.sent())?[3,4]:[4,this.getCacheKeys()];case 2:return(o=l.sent())?(a=this.matchExistingCacheKey(t,o))?[4,this.cache.get(a)]:[3,4]:[2];case 3:i=l.sent(),l.label=4;case 4:return i?[4,this.nowProvider()]:[2];case 5:return s=l.sent(),c=Math.floor(s/1e3),i.expiresAt-r<c?i.body.refresh_token?(i.body={refresh_token:i.body.refresh_token},[4,this.cache.set(t.toKey(),i)]):[3,7]:[3,10];case 6:return l.sent(),[2,i.body];case 7:return[4,this.cache.remove(t.toKey())];case 8:return l.sent(),[4,(n=this.keyManifest)===null||n===void 0?void 0:n.remove(t.toKey())];case 9:return l.sent(),[2];case 10:return[2,i.body]}})})},e.prototype.set=function(t){var r;return me(this,void 0,void 0,function(){var n,i;return ve(this,function(o){switch(o.label){case 0:return n=new En({client_id:t.client_id,scope:t.scope,audience:t.audience}),[4,this.wrapCacheEntry(t)];case 1:return i=o.sent(),[4,this.cache.set(n.toKey(),i)];case 2:return o.sent(),[4,(r=this.keyManifest)===null||r===void 0?void 0:r.add(n.toKey())];case 3:return o.sent(),[2]}})})},e.prototype.clear=function(t){var r;return me(this,void 0,void 0,function(){var n,i=this;return ve(this,function(o){switch(o.label){case 0:return[4,this.getCacheKeys()];case 1:return(n=o.sent())?[4,n.filter(function(a){return!t||a.includes(t)}).reduce(function(a,s){return me(i,void 0,void 0,function(){return ve(this,function(c){switch(c.label){case 0:return[4,a];case 1:return c.sent(),[4,this.cache.remove(s)];case 2:return c.sent(),[2]}})})},Promise.resolve())]:[2];case 2:return o.sent(),[4,(r=this.keyManifest)===null||r===void 0?void 0:r.clear()];case 3:return o.sent(),[2]}})})},e.prototype.clearSync=function(t){var r=this,n=this.cache.allKeys();n&&n.filter(function(i){return!t||i.includes(t)}).forEach(function(i){r.cache.remove(i)})},e.prototype.wrapCacheEntry=function(t){return me(this,void 0,void 0,function(){var r,n,i;return ve(this,function(o){switch(o.label){case 0:return[4,this.nowProvider()];case 1:return r=o.sent(),n=Math.floor(r/1e3)+t.expires_in,i=Math.min(n,t.decodedToken.claims.exp),[2,{body:t,expiresAt:i}]}})})},e.prototype.getCacheKeys=function(){var t;return me(this,void 0,void 0,function(){var r;return ve(this,function(n){switch(n.label){case 0:return this.keyManifest?[4,this.keyManifest.get()]:[3,2];case 1:return r=(t=n.sent())===null||t===void 0?void 0:t.keys,[3,4];case 2:return[4,this.cache.allKeys()];case 3:r=n.sent(),n.label=4;case 4:return[2,r]}})})},e.prototype.matchExistingCacheKey=function(t,r){return r.filter(function(n){var i=En.fromKey(n),o=new Set(i.scope&&i.scope.split(" ")),a=t.scope.split(" "),s=i.scope&&a.reduce(function(c,l){return c&&o.has(l)},!0);return i.prefix==="@@auth0spajs@@"&&i.client_id===t.client_id&&i.audience===t.audience&&s})[0]},e}(),J3=function(){function e(t,r){this.storage=t,this.clientId=r,this.storageKey="".concat("a0.spajs.txs",".").concat(this.clientId),this.transaction=this.storage.get(this.storageKey)}return e.prototype.create=function(t){this.transaction=t,this.storage.save(this.storageKey,t,{daysUntilExpire:1})},e.prototype.get=function(){return this.transaction},e.prototype.remove=function(){delete this.transaction,this.storage.remove(this.storageKey)},e}(),Ki=function(e){return typeof e=="number"},e4=["iss","aud","exp","nbf","iat","jti","azp","nonce","auth_time","at_hash","c_hash","acr","amr","sub_jwk","cnf","sip_from_tag","sip_date","sip_callid","sip_cseq_num","sip_via_branch","orig","dest","mky","events","toe","txn","rph","sid","vot","vtm"],t4=function(e){if(!e.id_token)throw new Error("ID token is required but missing");var t=function(s){var c=s.split("."),l=vi(c,3),u=l[0],d=l[1],f=l[2];if(c.length!==3||!u||!d||!f)throw new Error("ID token could not be decoded");var h=JSON.parse(k0(d)),p={__raw:s},m={};return Object.keys(h).forEach(function(v){p[v]=h[v],e4.includes(v)||(m[v]=h[v])}),{encoded:{header:u,payload:d,signature:f},header:JSON.parse(k0(u)),claims:p,user:m}}(e.id_token);if(!t.claims.iss)throw new Error("Issuer (iss) claim must be a string present in the ID token");if(t.claims.iss!==e.iss)throw new Error('Issuer (iss) claim mismatch in the ID token; expected "'.concat(e.iss,'", found "').concat(t.claims.iss,'"'));if(!t.user.sub)throw new Error("Subject (sub) claim must be a string present in the ID token");if(t.header.alg!=="RS256")throw new Error('Signature algorithm of "'.concat(t.header.alg,'" is not supported. Expected the ID token to be signed with "RS256".'));if(!t.claims.aud||typeof t.claims.aud!="string"&&!Array.isArray(t.claims.aud))throw new Error("Audience (aud) claim must be a string or array of strings present in the ID token");if(Array.isArray(t.claims.aud)){if(!t.claims.aud.includes(e.aud))throw new Error('Audience (aud) claim mismatch in the ID token; expected "'.concat(e.aud,'" but was not one of "').concat(t.claims.aud.join(", "),'"'));if(t.claims.aud.length>1){if(!t.claims.azp)throw new Error("Authorized Party (azp) claim must be a string present in the ID token when Audience (aud) claim has multiple values");if(t.claims.azp!==e.aud)throw new Error('Authorized Party (azp) claim mismatch in the ID token; expected "'.concat(e.aud,'", found "').concat(t.claims.azp,'"'))}}else if(t.claims.aud!==e.aud)throw new Error('Audience (aud) claim mismatch in the ID token; expected "'.concat(e.aud,'" but found "').concat(t.claims.aud,'"'));if(e.nonce){if(!t.claims.nonce)throw new Error("Nonce (nonce) claim must be a string present in the ID token");if(t.claims.nonce!==e.nonce)throw new Error('Nonce (nonce) claim mismatch in the ID token; expected "'.concat(e.nonce,'", found "').concat(t.claims.nonce,'"'))}if(e.max_age&&!Ki(t.claims.auth_time))throw new Error("Authentication Time (auth_time) claim must be a number present in the ID token when Max Age (max_age) is specified");if(!Ki(t.claims.exp))throw new Error("Expiration Time (exp) claim must be a number present in the ID token");if(!Ki(t.claims.iat))throw new Error("Issued At (iat) claim must be a number present in the ID token");var r=e.leeway||60,n=new Date(e.now||Date.now()),i=new Date(0),o=new Date(0),a=new Date(0);if(a.setUTCSeconds(parseInt(t.claims.auth_time)+e.max_age+r),i.setUTCSeconds(t.claims.exp+r),o.setUTCSeconds(t.claims.nbf-r),n>i)throw new Error("Expiration Time (exp) claim error in the ID token; current time (".concat(n,") is after expiration time (").concat(i,")"));if(Ki(t.claims.nbf)&&n<o)throw new Error("Not Before time (nbf) claim in the ID token indicates that this token can't be used just yet. Currrent time (".concat(n,") is before ").concat(o));if(Ki(t.claims.auth_time)&&n>a)throw new Error("Authentication Time (auth_time) claim in the ID token indicates that too much time has passed since the last end-user authentication. Currrent time (".concat(n,") is after last auth at ").concat(a));if(e.organizationId){if(!t.claims.org_id)throw new Error("Organization ID (org_id) claim must be a string present in the ID token");if(e.organizationId!==t.claims.org_id)throw new Error('Organization ID (org_id) claim mismatch in the ID token; expected "'.concat(e.organizationId,'", found "').concat(t.claims.org_id,'"'))}return t},On=Ii(function(e,t){var r=vr&&vr.__assign||function(){return r=Object.assign||function(c){for(var l,u=1,d=arguments.length;u<d;u++)for(var f in l=arguments[u])Object.prototype.hasOwnProperty.call(l,f)&&(c[f]=l[f]);return c},r.apply(this,arguments)};function n(c,l){if(!l)return"";var u="; "+c;return l===!0?u:u+"="+l}function i(c,l,u){return encodeURIComponent(c).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/\(/g,"%28").replace(/\)/g,"%29")+"="+encodeURIComponent(l).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent)+function(d){if(typeof d.expires=="number"){var f=new Date;f.setMilliseconds(f.getMilliseconds()+864e5*d.expires),d.expires=f}return n("Expires",d.expires?d.expires.toUTCString():"")+n("Domain",d.domain)+n("Path",d.path)+n("Secure",d.secure)+n("SameSite",d.sameSite)}(u)}function o(c){for(var l={},u=c?c.split("; "):[],d=/(%[\dA-F]{2})+/gi,f=0;f<u.length;f++){var h=u[f].split("="),p=h.slice(1).join("=");p.charAt(0)==='"'&&(p=p.slice(1,-1));try{l[h[0].replace(d,decodeURIComponent)]=p.replace(d,decodeURIComponent)}catch{}}return l}function a(){return o(document.cookie)}function s(c,l,u){document.cookie=i(c,l,r({path:"/"},u))}t.__esModule=!0,t.encode=i,t.parse=o,t.getAll=a,t.get=function(c){return a()[c]},t.set=s,t.remove=function(c,l){s(c,"",r(r({},l),{expires:-1}))}});th(On),On.encode,On.parse,On.getAll;var r4=On.get,qb=On.set,Hb=On.remove,Jn={get:function(e){var t=r4(e);if(t!==void 0)return JSON.parse(t)},save:function(e,t,r){var n={};window.location.protocol==="https:"&&(n={secure:!0,sameSite:"none"}),r?.daysUntilExpire&&(n.expires=r.daysUntilExpire),r?.cookieDomain&&(n.domain=r.cookieDomain),qb(e,JSON.stringify(t),n)},remove:function(e,t){var r={};t?.cookieDomain&&(r.domain=t.cookieDomain),Hb(e,r)}},n4={get:function(e){var t=Jn.get(e);return t||Jn.get("".concat("_legacy_").concat(e))},save:function(e,t,r){var n={};window.location.protocol==="https:"&&(n={secure:!0}),r?.daysUntilExpire&&(n.expires=r.daysUntilExpire),qb("".concat("_legacy_").concat(e),JSON.stringify(t),n),Jn.save(e,t,r)},remove:function(e,t){var r={};t?.cookieDomain&&(r.domain=t.cookieDomain),Hb(e,r),Jn.remove(e,t),Jn.remove("".concat("_legacy_").concat(e),t)}},i4={get:function(e){if(typeof sessionStorage<"u"){var t=sessionStorage.getItem(e);if(t!==void 0)return JSON.parse(t)}},save:function(e,t){sessionStorage.setItem(e,JSON.stringify(t))},remove:function(e){sessionStorage.removeItem(e)}};function o4(e,t,r){var n=t===void 0?null:t,i=function(c,l){var u=atob(c);if(l){for(var d=new Uint8Array(u.length),f=0,h=u.length;f<h;++f)d[f]=u.charCodeAt(f);return String.fromCharCode.apply(null,new Uint16Array(d.buffer))}return u}(e,r!==void 0&&r),o=i.indexOf(`
2
- `,10)+1,a=i.substring(o)+(n?"//# sourceMappingURL="+n:""),s=new Blob([a],{type:"application/javascript"});return URL.createObjectURL(s)}var O0,C0,P0,Oc,a4=(O0="Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwohZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7dmFyIHQ9ZnVuY3Rpb24oZSxyKXtyZXR1cm4gdD1PYmplY3Quc2V0UHJvdG90eXBlT2Z8fHtfX3Byb3RvX186W119aW5zdGFuY2VvZiBBcnJheSYmZnVuY3Rpb24odCxlKXt0Ll9fcHJvdG9fXz1lfXx8ZnVuY3Rpb24odCxlKXtmb3IodmFyIHIgaW4gZSlPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwoZSxyKSYmKHRbcl09ZVtyXSl9LHQoZSxyKX07ZnVuY3Rpb24gZShlLHIpe2lmKCJmdW5jdGlvbiIhPXR5cGVvZiByJiZudWxsIT09cil0aHJvdyBuZXcgVHlwZUVycm9yKCJDbGFzcyBleHRlbmRzIHZhbHVlICIrU3RyaW5nKHIpKyIgaXMgbm90IGEgY29uc3RydWN0b3Igb3IgbnVsbCIpO2Z1bmN0aW9uIG4oKXt0aGlzLmNvbnN0cnVjdG9yPWV9dChlLHIpLGUucHJvdG90eXBlPW51bGw9PT1yP09iamVjdC5jcmVhdGUocik6KG4ucHJvdG90eXBlPXIucHJvdG90eXBlLG5ldyBuKX12YXIgcj1mdW5jdGlvbigpe3JldHVybiByPU9iamVjdC5hc3NpZ258fGZ1bmN0aW9uKHQpe2Zvcih2YXIgZSxyPTEsbj1hcmd1bWVudHMubGVuZ3RoO3I8bjtyKyspZm9yKHZhciBvIGluIGU9YXJndW1lbnRzW3JdKU9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHkuY2FsbChlLG8pJiYodFtvXT1lW29dKTtyZXR1cm4gdH0sci5hcHBseSh0aGlzLGFyZ3VtZW50cyl9O2Z1bmN0aW9uIG4odCxlLHIsbil7cmV0dXJuIG5ldyhyfHwocj1Qcm9taXNlKSkoKGZ1bmN0aW9uKG8sYyl7ZnVuY3Rpb24gaSh0KXt0cnl7cyhuLm5leHQodCkpfWNhdGNoKHQpe2ModCl9fWZ1bmN0aW9uIGEodCl7dHJ5e3Mobi50aHJvdyh0KSl9Y2F0Y2godCl7Yyh0KX19ZnVuY3Rpb24gcyh0KXt2YXIgZTt0LmRvbmU/byh0LnZhbHVlKTooZT10LnZhbHVlLGUgaW5zdGFuY2VvZiByP2U6bmV3IHIoKGZ1bmN0aW9uKHQpe3QoZSl9KSkpLnRoZW4oaSxhKX1zKChuPW4uYXBwbHkodCxlfHxbXSkpLm5leHQoKSl9KSl9ZnVuY3Rpb24gbyh0LGUpe3ZhciByLG4sbyxjLGk9e2xhYmVsOjAsc2VudDpmdW5jdGlvbigpe2lmKDEmb1swXSl0aHJvdyBvWzFdO3JldHVybiBvWzFdfSx0cnlzOltdLG9wczpbXX07cmV0dXJuIGM9e25leHQ6YSgwKSx0aHJvdzphKDEpLHJldHVybjphKDIpfSwiZnVuY3Rpb24iPT10eXBlb2YgU3ltYm9sJiYoY1tTeW1ib2wuaXRlcmF0b3JdPWZ1bmN0aW9uKCl7cmV0dXJuIHRoaXN9KSxjO2Z1bmN0aW9uIGEoYyl7cmV0dXJuIGZ1bmN0aW9uKGEpe3JldHVybiBmdW5jdGlvbihjKXtpZihyKXRocm93IG5ldyBUeXBlRXJyb3IoIkdlbmVyYXRvciBpcyBhbHJlYWR5IGV4ZWN1dGluZy4iKTtmb3IoO2k7KXRyeXtpZihyPTEsbiYmKG89MiZjWzBdP24ucmV0dXJuOmNbMF0/bi50aHJvd3x8KChvPW4ucmV0dXJuKSYmby5jYWxsKG4pLDApOm4ubmV4dCkmJiEobz1vLmNhbGwobixjWzFdKSkuZG9uZSlyZXR1cm4gbztzd2l0Y2gobj0wLG8mJihjPVsyJmNbMF0sby52YWx1ZV0pLGNbMF0pe2Nhc2UgMDpjYXNlIDE6bz1jO2JyZWFrO2Nhc2UgNDpyZXR1cm4gaS5sYWJlbCsrLHt2YWx1ZTpjWzFdLGRvbmU6ITF9O2Nhc2UgNTppLmxhYmVsKyssbj1jWzFdLGM9WzBdO2NvbnRpbnVlO2Nhc2UgNzpjPWkub3BzLnBvcCgpLGkudHJ5cy5wb3AoKTtjb250aW51ZTtkZWZhdWx0OmlmKCEobz1pLnRyeXMsKG89by5sZW5ndGg+MCYmb1tvLmxlbmd0aC0xXSl8fDYhPT1jWzBdJiYyIT09Y1swXSkpe2k9MDtjb250aW51ZX1pZigzPT09Y1swXSYmKCFvfHxjWzFdPm9bMF0mJmNbMV08b1szXSkpe2kubGFiZWw9Y1sxXTticmVha31pZig2PT09Y1swXSYmaS5sYWJlbDxvWzFdKXtpLmxhYmVsPW9bMV0sbz1jO2JyZWFrfWlmKG8mJmkubGFiZWw8b1syXSl7aS5sYWJlbD1vWzJdLGkub3BzLnB1c2goYyk7YnJlYWt9b1syXSYmaS5vcHMucG9wKCksaS50cnlzLnBvcCgpO2NvbnRpbnVlfWM9ZS5jYWxsKHQsaSl9Y2F0Y2godCl7Yz1bNix0XSxuPTB9ZmluYWxseXtyPW89MH1pZig1JmNbMF0pdGhyb3cgY1sxXTtyZXR1cm57dmFsdWU6Y1swXT9jWzFdOnZvaWQgMCxkb25lOiEwfX0oW2MsYV0pfX19ZnVuY3Rpb24gYyh0LGUpe3JldHVybiB2b2lkIDA9PT1lJiYoZT1bXSksdCYmIWUuaW5jbHVkZXModCk/dDoiIn12YXIgaT1mdW5jdGlvbih0KXtmdW5jdGlvbiByKGUsbil7dmFyIG89dC5jYWxsKHRoaXMsbil8fHRoaXM7cmV0dXJuIG8uZXJyb3I9ZSxvLmVycm9yX2Rlc2NyaXB0aW9uPW4sT2JqZWN0LnNldFByb3RvdHlwZU9mKG8sci5wcm90b3R5cGUpLG99cmV0dXJuIGUocix0KSxyLmZyb21QYXlsb2FkPWZ1bmN0aW9uKHQpe3JldHVybiBuZXcgcih0LmVycm9yLHQuZXJyb3JfZGVzY3JpcHRpb24pfSxyfShFcnJvcik7IWZ1bmN0aW9uKHQpe2Z1bmN0aW9uIHIoZSxuLG8sYyl7dm9pZCAwPT09YyYmKGM9bnVsbCk7dmFyIGk9dC5jYWxsKHRoaXMsZSxuKXx8dGhpcztyZXR1cm4gaS5zdGF0ZT1vLGkuYXBwU3RhdGU9YyxPYmplY3Quc2V0UHJvdG90eXBlT2YoaSxyLnByb3RvdHlwZSksaX1lKHIsdCl9KGkpLGZ1bmN0aW9uKHQpe2Z1bmN0aW9uIHIoZSl7dmFyIG49dC5jYWxsKHRoaXMpfHx0aGlzO3JldHVybiBuLnBvcHVwPWUsT2JqZWN0LnNldFByb3RvdHlwZU9mKG4sci5wcm90b3R5cGUpLG59ZShyLHQpfShmdW5jdGlvbih0KXtmdW5jdGlvbiByKCl7dmFyIGU9dC5jYWxsKHRoaXMsInRpbWVvdXQiLCJUaW1lb3V0Iil8fHRoaXM7cmV0dXJuIE9iamVjdC5zZXRQcm90b3R5cGVPZihlLHIucHJvdG90eXBlKSxlfXJldHVybiBlKHIsdCkscn0oaSkpLGZ1bmN0aW9uKHQpe2Z1bmN0aW9uIHIoZSl7dmFyIG49dC5jYWxsKHRoaXMsImNhbmNlbGxlZCIsIlBvcHVwIGNsb3NlZCIpfHx0aGlzO3JldHVybiBuLnBvcHVwPWUsT2JqZWN0LnNldFByb3RvdHlwZU9mKG4sci5wcm90b3R5cGUpLG59ZShyLHQpfShpKSxmdW5jdGlvbih0KXtmdW5jdGlvbiByKGUsbixvKXt2YXIgYz10LmNhbGwodGhpcyxlLG4pfHx0aGlzO3JldHVybiBjLm1mYV90b2tlbj1vLE9iamVjdC5zZXRQcm90b3R5cGVPZihjLHIucHJvdG90eXBlKSxjfWUocix0KX0oaSk7dmFyIGE9ZnVuY3Rpb24odCl7ZnVuY3Rpb24gcihlLG4pe3ZhciBvPXQuY2FsbCh0aGlzLCJtaXNzaW5nX3JlZnJlc2hfdG9rZW4iLCJNaXNzaW5nIFJlZnJlc2ggVG9rZW4gKGF1ZGllbmNlOiAnIi5jb25jYXQoYyhlLFsiZGVmYXVsdCJdKSwiJywgc2NvcGU6ICciKS5jb25jYXQoYyhuKSwiJykiKSl8fHRoaXM7cmV0dXJuIG8uYXVkaWVuY2U9ZSxvLnNjb3BlPW4sT2JqZWN0LnNldFByb3RvdHlwZU9mKG8sci5wcm90b3R5cGUpLG99cmV0dXJuIGUocix0KSxyfShpKSxzPXt9LHU9ZnVuY3Rpb24odCxlKXtyZXR1cm4iIi5jb25jYXQodCwifCIpLmNvbmNhdChlKX07YWRkRXZlbnRMaXN0ZW5lcigibWVzc2FnZSIsKGZ1bmN0aW9uKHQpe3ZhciBlPXQuZGF0YSxjPWUudGltZW91dCxpPWUuYXV0aCxmPWUuZmV0Y2hVcmwsbD1lLmZldGNoT3B0aW9ucyxwPWUudXNlRm9ybURhdGEsaD1mdW5jdGlvbih0LGUpe3ZhciByPSJmdW5jdGlvbiI9PXR5cGVvZiBTeW1ib2wmJnRbU3ltYm9sLml0ZXJhdG9yXTtpZighcilyZXR1cm4gdDt2YXIgbixvLGM9ci5jYWxsKHQpLGk9W107dHJ5e2Zvcig7KHZvaWQgMD09PWV8fGUtLSA+MCkmJiEobj1jLm5leHQoKSkuZG9uZTspaS5wdXNoKG4udmFsdWUpfWNhdGNoKHQpe289e2Vycm9yOnR9fWZpbmFsbHl7dHJ5e24mJiFuLmRvbmUmJihyPWMucmV0dXJuKSYmci5jYWxsKGMpfWZpbmFsbHl7aWYobyl0aHJvdyBvLmVycm9yfX1yZXR1cm4gaX0odC5wb3J0cywxKVswXTtyZXR1cm4gbih2b2lkIDAsdm9pZCAwLHZvaWQgMCwoZnVuY3Rpb24oKXt2YXIgdCxlLG4seSx2LGIsZCx3LE8sXztyZXR1cm4gbyh0aGlzLChmdW5jdGlvbihvKXtzd2l0Y2goby5sYWJlbCl7Y2FzZSAwOm49KGU9aXx8e30pLmF1ZGllbmNlLHk9ZS5zY29wZSxvLmxhYmVsPTE7Y2FzZSAxOmlmKG8udHJ5cy5wdXNoKFsxLDcsLDhdKSwhKHY9cD8obT1sLmJvZHksaz1uZXcgVVJMU2VhcmNoUGFyYW1zKG0pLFA9e30say5mb3JFYWNoKChmdW5jdGlvbih0LGUpe1BbZV09dH0pKSxQKTpKU09OLnBhcnNlKGwuYm9keSkpLnJlZnJlc2hfdG9rZW4mJiJyZWZyZXNoX3Rva2VuIj09PXYuZ3JhbnRfdHlwZSl7aWYoYj1mdW5jdGlvbih0LGUpe3JldHVybiBzW3UodCxlKV19KG4seSksIWIpdGhyb3cgbmV3IGEobix5KTtsLmJvZHk9cD9uZXcgVVJMU2VhcmNoUGFyYW1zKHIocih7fSx2KSx7cmVmcmVzaF90b2tlbjpifSkpLnRvU3RyaW5nKCk6SlNPTi5zdHJpbmdpZnkocihyKHt9LHYpLHtyZWZyZXNoX3Rva2VuOmJ9KSl9ZD12b2lkIDAsImZ1bmN0aW9uIj09dHlwZW9mIEFib3J0Q29udHJvbGxlciYmKGQ9bmV3IEFib3J0Q29udHJvbGxlcixsLnNpZ25hbD1kLnNpZ25hbCksdz12b2lkIDAsby5sYWJlbD0yO2Nhc2UgMjpyZXR1cm4gby50cnlzLnB1c2goWzIsNCwsNV0pLFs0LFByb21pc2UucmFjZShbKGc9YyxuZXcgUHJvbWlzZSgoZnVuY3Rpb24odCl7cmV0dXJuIHNldFRpbWVvdXQodCxnKX0pKSksZmV0Y2goZixyKHt9LGwpKV0pXTtjYXNlIDM6cmV0dXJuIHc9by5zZW50KCksWzMsNV07Y2FzZSA0OnJldHVybiBPPW8uc2VudCgpLGgucG9zdE1lc3NhZ2Uoe2Vycm9yOk8ubWVzc2FnZX0pLFsyXTtjYXNlIDU6cmV0dXJuIHc/WzQsdy5qc29uKCldOihkJiZkLmFib3J0KCksaC5wb3N0TWVzc2FnZSh7ZXJyb3I6IlRpbWVvdXQgd2hlbiBleGVjdXRpbmcgJ2ZldGNoJyJ9KSxbMl0pO2Nhc2UgNjpyZXR1cm4odD1vLnNlbnQoKSkucmVmcmVzaF90b2tlbj8oZnVuY3Rpb24odCxlLHIpe3NbdShlLHIpXT10fSh0LnJlZnJlc2hfdG9rZW4sbix5KSxkZWxldGUgdC5yZWZyZXNoX3Rva2VuKTpmdW5jdGlvbih0LGUpe2RlbGV0ZSBzW3UodCxlKV19KG4seSksaC5wb3N0TWVzc2FnZSh7b2s6dy5vayxqc29uOnR9KSxbMyw4XTtjYXNlIDc6cmV0dXJuIF89by5zZW50KCksaC5wb3N0TWVzc2FnZSh7b2s6ITEsanNvbjp7ZXJyb3JfZGVzY3JpcHRpb246Xy5tZXNzYWdlfX0pLFszLDhdO2Nhc2UgODpyZXR1cm5bMl19dmFyIGcsbSxrLFB9KSl9KSl9KSl9KCk7Cgo=",C0=null,P0=!1,function(e){return Oc=Oc||o4(O0,C0,P0),new Worker(Oc,e)}),Cc={},s4=function(){function e(t,r){this.cache=t,this.clientId=r,this.manifestKey=this.createManifestKeyFrom(this.clientId)}return e.prototype.add=function(t){var r;return me(this,void 0,void 0,function(){var n,i;return ve(this,function(o){switch(o.label){case 0:return i=Set.bind,[4,this.cache.get(this.manifestKey)];case 1:return(n=new(i.apply(Set,[void 0,((r=o.sent())===null||r===void 0?void 0:r.keys)||[]]))).add(t),[4,this.cache.set(this.manifestKey,{keys:Ou([],vi(n),!1)})];case 2:return o.sent(),[2]}})})},e.prototype.remove=function(t){return me(this,void 0,void 0,function(){var r,n;return ve(this,function(i){switch(i.label){case 0:return[4,this.cache.get(this.manifestKey)];case 1:return(r=i.sent())?((n=new Set(r.keys)).delete(t),n.size>0?[4,this.cache.set(this.manifestKey,{keys:Ou([],vi(n),!1)})]:[3,3]):[3,5];case 2:case 4:return[2,i.sent()];case 3:return[4,this.cache.remove(this.manifestKey)];case 5:return[2]}})})},e.prototype.get=function(){return this.cache.get(this.manifestKey)},e.prototype.clear=function(){return this.cache.remove(this.manifestKey)},e.prototype.createManifestKeyFrom=function(t){return"".concat("@@auth0spajs@@","::").concat(t)},e}(),Pc=new R3,l4={memory:function(){return new X3().enclosedCache},localstorage:function(){return new Y3}},T0=function(e){return l4[e]},c4=function(){return!/Trident.*rv:11\.0/.test(navigator.userAgent)},u4=function(){function e(t){var r,n,i,o,a=this;if(this.options=t,this._releaseLockOnPageHide=function(){return me(a,void 0,void 0,function(){return ve(this,function(l){switch(l.label){case 0:return[4,Pc.releaseLock("auth0.lock.getTokenSilently")];case 1:return l.sent(),window.removeEventListener("pagehide",this._releaseLockOnPageHide),[2]}})})},typeof window<"u"&&function(){if(!bh())throw new Error("For security reasons, `window.crypto` is required to run `auth0-spa-js`.");if(Wb()===void 0)throw new Error(`
1
+ "use strict";const fr={};function u$(e){fr.context=e}const d$=(e,t)=>e===t,br=Symbol("solid-proxy"),_u=Symbol("solid-track"),gs={equals:d$};let Dg=jg;const Ur=1,bs=2,Rg={owned:null,cleanups:null,context:null,owner:null};var rt=null;let Cn=null,et=null,mt=null,Ir=null,th=0;function $a(e,t){const r=et,n=rt,i=e.length===0,o=i?Rg:{owned:null,cleanups:null,context:null,owner:t||n},a=i?e:()=>e(()=>V(()=>Dl(o)));rt=o,et=null;try{return Ti(a,!0)}finally{et=r,rt=n}}function M(e,t){t=t?Object.assign({},gs,t):gs;const r={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},n=i=>(typeof i=="function"&&(i=i(r.value)),Mg(r,i));return[Lg.bind(r),n]}function f$(e,t,r){const n=Al(e,t,!0,Ur);Pi(n)}function W(e,t,r){const n=Al(e,t,!1,Ur);Pi(n)}function xe(e,t,r){Dg=b$;const n=Al(e,t,!1,Ur);n.user=!0,Ir?Ir.push(n):Pi(n)}function pe(e,t,r){r=r?Object.assign({},gs,r):gs;const n=Al(e,t,!0,0);return n.observers=null,n.observerSlots=null,n.comparator=r.equals||void 0,Pi(n),Lg.bind(n)}function h$(e){return Ti(e,!1)}function V(e){const t=et;et=null;try{return e()}finally{et=t}}function Tt(e){xe(()=>V(e))}function Il(e){return rt===null||(rt.cleanups===null?rt.cleanups=[e]:rt.cleanups.push(e)),e}function Fg(){return et}function P(){return rt}function p$(e,t){const r=Symbol("context");return{id:r,Provider:w$(r),defaultValue:e}}function m$(e){let t;return(t=Vg(rt,e.id))!==void 0?t:e.defaultValue}function v$(e){const t=pe(e),r=pe(()=>xu(t()));return r.toArray=()=>{const n=r();return Array.isArray(n)?n:n!=null?[n]:[]},r}function Lg(){const e=Cn;if(this.sources&&(this.state||e))if(this.state===Ur||e)Pi(this);else{const t=mt;mt=null,Ti(()=>ws(this),!1),mt=t}if(et){const t=this.observers?this.observers.length:0;et.sources?(et.sources.push(this),et.sourceSlots.push(t)):(et.sources=[this],et.sourceSlots=[t]),this.observers?(this.observers.push(et),this.observerSlots.push(et.sources.length-1)):(this.observers=[et],this.observerSlots=[et.sources.length-1])}return this.value}function Mg(e,t,r){let n=e.value;return(!e.comparator||!e.comparator(n,t))&&(e.value=t,e.observers&&e.observers.length&&Ti(()=>{for(let i=0;i<e.observers.length;i+=1){const o=e.observers[i],a=Cn&&Cn.running;a&&Cn.disposed.has(o),(a&&!o.tState||!a&&!o.state)&&(o.pure?mt.push(o):Ir.push(o),o.observers&&zg(o)),a||(o.state=Ur)}if(mt.length>1e6)throw mt=[],new Error},!1)),t}function Pi(e){if(!e.fn)return;Dl(e);const t=rt,r=et,n=th;et=rt=e,y$(e,e.value,n),et=r,rt=t}function y$(e,t,r){let n;try{n=e.fn(t)}catch(i){e.pure&&(e.state=Ur,e.owned&&e.owned.forEach(Dl),e.owned=null),Ug(i)}(!e.updatedAt||e.updatedAt<=r)&&(e.updatedAt!=null&&"observers"in e?Mg(e,n):e.value=n,e.updatedAt=r)}function Al(e,t,r,n=Ur,i){const o={fn:e,state:n,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:rt,context:null,pure:r};return rt===null||rt!==Rg&&(rt.owned?rt.owned.push(o):rt.owned=[o]),o}function $s(e){const t=Cn;if(e.state===0||t)return;if(e.state===bs||t)return ws(e);if(e.suspense&&V(e.suspense.inFallback))return e.suspense.effects.push(e);const r=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<th);)(e.state||t)&&r.push(e);for(let n=r.length-1;n>=0;n--)if(e=r[n],e.state===Ur||t)Pi(e);else if(e.state===bs||t){const i=mt;mt=null,Ti(()=>ws(e,r[0]),!1),mt=i}}function Ti(e,t){if(mt)return e();let r=!1;t||(mt=[]),Ir?r=!0:Ir=[],th++;try{const n=e();return g$(r),n}catch(n){mt||(Ir=null),mt=null,Ug(n)}}function g$(e){if(mt&&(jg(mt),mt=null),e)return;const t=Ir;Ir=null,t.length&&Ti(()=>Dg(t),!1)}function jg(e){for(let t=0;t<e.length;t++)$s(e[t])}function b$(e){let t,r=0;for(t=0;t<e.length;t++){const n=e[t];n.user?e[r++]=n:$s(n)}for(fr.context&&u$(),t=0;t<r;t++)$s(e[t])}function ws(e,t){const r=Cn;e.state=0;for(let n=0;n<e.sources.length;n+=1){const i=e.sources[n];i.sources&&(i.state===Ur||r?i!==t&&$s(i):(i.state===bs||r)&&ws(i,t))}}function zg(e){const t=Cn;for(let r=0;r<e.observers.length;r+=1){const n=e.observers[r];(!n.state||t)&&(n.state=bs,n.pure?mt.push(n):Ir.push(n),n.observers&&zg(n))}}function Dl(e){let t;if(e.sources)for(;e.sources.length;){const r=e.sources.pop(),n=e.sourceSlots.pop(),i=r.observers;if(i&&i.length){const o=i.pop(),a=r.observerSlots.pop();n<i.length&&(o.sourceSlots[a]=n,i[n]=o,r.observerSlots[n]=a)}}if(e.owned){for(t=0;t<e.owned.length;t++)Dl(e.owned[t]);e.owned=null}if(e.cleanups){for(t=0;t<e.cleanups.length;t++)e.cleanups[t]();e.cleanups=null}e.state=0,e.context=null}function $$(e){return e instanceof Error||typeof e=="string"?e:new Error("Unknown error")}function Ug(e){throw e=$$(e),e}function Vg(e,t){return e?e.context&&e.context[t]!==void 0?e.context[t]:Vg(e.owner,t):void 0}function xu(e){if(typeof e=="function"&&!e.length)return xu(e());if(Array.isArray(e)){const t=[];for(let r=0;r<e.length;r++){const n=xu(e[r]);Array.isArray(n)?t.push.apply(t,n):t.push(n)}return t}return e}function w$(e,t){return function(n){let i;return W(()=>i=V(()=>(rt.context={[e]:n.value},v$(()=>n.children))),void 0),i}}const _$=Symbol("fallback");function $p(e){for(let t=0;t<e.length;t++)e[t]()}function x$(e,t,r={}){let n=[],i=[],o=[],a=0,s=t.length>1?[]:null;return Il(()=>$p(o)),()=>{let c=e()||[],l,u;return c[_u],V(()=>{let f=c.length,h,p,m,v,y,b,g,_,k;if(f===0)a!==0&&($p(o),o=[],n=[],i=[],a=0,s&&(s=[])),r.fallback&&(n=[_$],i[0]=$a(E=>(o[0]=E,r.fallback())),a=1);else if(a===0){for(i=new Array(f),u=0;u<f;u++)n[u]=c[u],i[u]=$a(d);a=f}else{for(m=new Array(f),v=new Array(f),s&&(y=new Array(f)),b=0,g=Math.min(a,f);b<g&&n[b]===c[b];b++);for(g=a-1,_=f-1;g>=b&&_>=b&&n[g]===c[_];g--,_--)m[_]=i[g],v[_]=o[g],s&&(y[_]=s[g]);for(h=new Map,p=new Array(_+1),u=_;u>=b;u--)k=c[u],l=h.get(k),p[u]=l===void 0?-1:l,h.set(k,u);for(l=b;l<=g;l++)k=n[l],u=h.get(k),u!==void 0&&u!==-1?(m[u]=i[l],v[u]=o[l],s&&(y[u]=s[l]),u=p[u],h.set(k,u)):o[l]();for(u=b;u<f;u++)u in m?(i[u]=m[u],o[u]=v[u],s&&(s[u]=y[u],s[u](u))):i[u]=$a(d);i=i.slice(0,a=f),n=c.slice(0)}return i});function d(f){if(o[u]=f,s){const[h,p]=M(u);return s[u]=p,t(c[u],h)}return t(c[u])}}}function U(e,t){return V(()=>e(t||{}))}function Yo(){return!0}const S$={get(e,t,r){return t===br?r:e.get(t)},has(e,t){return t===br?!0:e.has(t)},set:Yo,deleteProperty:Yo,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:Yo,deleteProperty:Yo}},ownKeys(e){return e.keys()}};function uc(e){return(e=typeof e=="function"?e():e)?e:{}}function Su(...e){let t=!1;for(let n=0;n<e.length;n++){const i=e[n];t=t||!!i&&br in i,e[n]=typeof i=="function"?(t=!0,pe(i)):i}if(t)return new Proxy({get(n){for(let i=e.length-1;i>=0;i--){const o=uc(e[i])[n];if(o!==void 0)return o}},has(n){for(let i=e.length-1;i>=0;i--)if(n in uc(e[i]))return!0;return!1},keys(){const n=[];for(let i=0;i<e.length;i++)n.push(...Object.keys(uc(e[i])));return[...new Set(n)]}},S$);const r={};for(let n=e.length-1;n>=0;n--)if(e[n]){const i=Object.getOwnPropertyDescriptors(e[n]);for(const o in i)o in r||Object.defineProperty(r,o,{enumerable:!0,get(){for(let a=e.length-1;a>=0;a--){const s=(e[a]||{})[o];if(s!==void 0)return s}}})}return r}function Rl(e){const t="fallback"in e&&{fallback:()=>e.fallback};return pe(x$(()=>e.each,e.children,t||void 0))}function ne(e){let t=!1;const r=e.keyed,n=pe(()=>e.when,void 0,{equals:(i,o)=>t?i===o:!i==!o});return pe(()=>{const i=n();if(i){const o=e.children,a=typeof o=="function"&&o.length>0;return t=r||a,a?V(()=>o(i)):o}return e.fallback},void 0,void 0)}function k$(e,t,r){let n=r.length,i=t.length,o=n,a=0,s=0,c=t[i-1].nextSibling,l=null;for(;a<i||s<o;){if(t[a]===r[s]){a++,s++;continue}for(;t[i-1]===r[o-1];)i--,o--;if(i===a){const u=o<n?s?r[s-1].nextSibling:r[o-s]:c;for(;s<o;)e.insertBefore(r[s++],u)}else if(o===s)for(;a<i;)(!l||!l.has(t[a]))&&t[a].remove(),a++;else if(t[a]===r[o-1]&&r[s]===t[i-1]){const u=t[--i].nextSibling;e.insertBefore(r[s++],t[a++].nextSibling),e.insertBefore(r[--o],u),t[i]=r[o]}else{if(!l){l=new Map;let d=s;for(;d<o;)l.set(r[d],d++)}const u=l.get(t[a]);if(u!=null)if(s<u&&u<o){let d=a,f=1,h;for(;++d<i&&d<o&&!((h=l.get(t[d]))==null||h!==u+f);)f++;if(f>u-s){const p=t[a];for(;s<u;)e.insertBefore(r[s++],p)}else e.replaceChild(r[s++],t[a++])}else a++;else t[a++].remove()}}}const wp="_$DX_DELEGATE";function C(e,t,r){const n=document.createElement("template");n.innerHTML=e;let i=n.content.firstChild;return r&&(i=i.firstChild),i}function Ni(e,t=window.document){const r=t[wp]||(t[wp]=new Set);for(let n=0,i=e.length;n<i;n++){const o=e[n];r.has(o)||(r.add(o),t.addEventListener(o,P$))}}function E$(e,t,r){r==null?e.removeAttribute(t):e.setAttribute(t,r)}function _p(e,t){t==null?e.removeAttribute("class"):e.className=t}function O$(e,t,r={}){const n=Object.keys(t||{}),i=Object.keys(r);let o,a;for(o=0,a=i.length;o<a;o++){const s=i[o];!s||s==="undefined"||t[s]||(xp(e,s,!1),delete r[s])}for(o=0,a=n.length;o<a;o++){const s=n[o],c=!!t[s];!s||s==="undefined"||r[s]===c||!c||(xp(e,s,!0),r[s]=c)}return r}function C$(e,t,r){if(!t)return r?E$(e,"style"):t;const n=e.style;if(typeof t=="string")return n.cssText=t;typeof r=="string"&&(n.cssText=r=void 0),r||(r={}),t||(t={});let i,o;for(o in r)t[o]==null&&n.removeProperty(o),delete r[o];for(o in t)i=t[o],i!==r[o]&&(n.setProperty(o,i),r[o]=i);return r}function ee(e,t,r){return V(()=>e(t,r))}function w(e,t,r,n){if(r!==void 0&&!n&&(n=[]),typeof t!="function")return _s(e,t,n,r);W(i=>_s(e,t(),i,r),n)}function xp(e,t,r){const n=t.trim().split(/\s+/);for(let i=0,o=n.length;i<o;i++)e.classList.toggle(n[i],r)}function P$(e){const t=`$$${e.type}`;let r=e.composedPath&&e.composedPath()[0]||e.target;for(e.target!==r&&Object.defineProperty(e,"target",{configurable:!0,value:r}),Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return r||document}}),fr.registry&&!fr.done&&(fr.done=!0,document.querySelectorAll("[id^=pl-]").forEach(n=>{for(;n&&n.nodeType!==8&&n.nodeValue!=="pl-"+e;){let i=n.nextSibling;n.remove(),n=i}n&&n.remove()}));r;){const n=r[t];if(n&&!r.disabled){const i=r[`${t}Data`];if(i!==void 0?n.call(r,i,e):n.call(r,e),e.cancelBubble)return}r=r._$host||r.parentNode||r.host}}function _s(e,t,r,n,i){for(fr.context&&!r&&(r=[...e.childNodes]);typeof r=="function";)r=r();if(t===r)return r;const o=typeof t,a=n!==void 0;if(e=a&&r[0]&&r[0].parentNode||e,o==="string"||o==="number"){if(fr.context)return r;if(o==="number"&&(t=t.toString()),a){let s=r[0];s&&s.nodeType===3?s.data=t:s=document.createTextNode(t),r=Wn(e,r,n,s)}else r!==""&&typeof r=="string"?r=e.firstChild.data=t:r=e.textContent=t}else if(t==null||o==="boolean"){if(fr.context)return r;r=Wn(e,r,n)}else{if(o==="function")return W(()=>{let s=t();for(;typeof s=="function";)s=s();r=_s(e,s,r,n)}),()=>r;if(Array.isArray(t)){const s=[],c=r&&Array.isArray(r);if(ku(s,t,r,i))return W(()=>r=_s(e,s,r,n,!0)),()=>r;if(fr.context){if(!s.length)return r;for(let l=0;l<s.length;l++)if(s[l].parentNode)return r=s}if(s.length===0){if(r=Wn(e,r,n),a)return r}else c?r.length===0?Sp(e,s,n):k$(e,r,s):(r&&Wn(e),Sp(e,s));r=s}else if(t instanceof Node){if(fr.context&&t.parentNode)return r=a?[t]:t;if(Array.isArray(r)){if(a)return r=Wn(e,r,n,t);Wn(e,r,null,t)}else r==null||r===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);r=t}}return r}function ku(e,t,r,n){let i=!1;for(let o=0,a=t.length;o<a;o++){let s=t[o],c=r&&r[o];if(s instanceof Node)e.push(s);else if(!(s==null||s===!0||s===!1))if(Array.isArray(s))i=ku(e,s,c)||i;else if(typeof s=="function")if(n){for(;typeof s=="function";)s=s();i=ku(e,Array.isArray(s)?s:[s],Array.isArray(c)?c:[c])||i}else e.push(s),i=!0;else{const l=String(s);c&&c.nodeType===3&&c.data===l?e.push(c):e.push(document.createTextNode(l))}}return i}function Sp(e,t,r=null){for(let n=0,i=t.length;n<i;n++)e.insertBefore(t[n],r)}function Wn(e,t,r,n){if(r===void 0)return e.textContent="";const i=n||document.createTextNode("");if(t.length){let o=!1;for(let a=t.length-1;a>=0;a--){const s=t[a];if(i!==s){const c=s.parentNode===e;!o&&!a?c?e.replaceChild(i,s):e.insertBefore(i,r):c&&s.remove()}else o=!0}}else e.insertBefore(i,r);return[i]}function T$(e){return Object.keys(e).reduce((r,n)=>{const i=e[n];return r[n]=Object.assign({},i),Wg(i.value)&&!R$(i.value)&&!Array.isArray(i.value)&&(r[n].value=Object.assign({},i.value)),Array.isArray(i.value)&&(r[n].value=i.value.slice(0)),r},{})}function N$(e){return e?Object.keys(e).reduce((r,n)=>{const i=e[n];return r[n]=Wg(i)&&"value"in i?i:{value:i},r[n].attribute||(r[n].attribute=D$(n)),r[n].parse="parse"in r[n]?r[n].parse:typeof r[n].value!="string",r},{}):{}}function I$(e){return Object.keys(e).reduce((r,n)=>(r[n]=e[n].value,r),{})}function A$(e,t){const r=T$(t);return Object.keys(t).forEach(i=>{const o=r[i],a=e.getAttribute(o.attribute),s=e[i];a&&(o.value=o.parse?Bg(a):a),s!=null&&(o.value=Array.isArray(s)?s.slice(0):s),o.reflect&&kp(e,o.attribute,o.value),Object.defineProperty(e,i,{get(){return o.value},set(c){const l=o.value;o.value=c,o.reflect&&kp(this,o.attribute,o.value);for(let u=0,d=this.__propertyChangedCallbacks.length;u<d;u++)this.__propertyChangedCallbacks[u](i,c,l)},enumerable:!0,configurable:!0})}),r}function Bg(e){if(!!e)try{return JSON.parse(e)}catch{return e}}function kp(e,t,r){if(r==null||r===!1)return e.removeAttribute(t);let n=JSON.stringify(r);e.__updating[t]=!0,n==="true"&&(n=""),e.setAttribute(t,n),Promise.resolve().then(()=>delete e.__updating[t])}function D$(e){return e.replace(/\.?([A-Z]+)/g,(t,r)=>"-"+r.toLowerCase()).replace("_","-").replace(/^-/,"")}function Wg(e){return e!=null&&(typeof e=="object"||typeof e=="function")}function R$(e){return Object.prototype.toString.call(e)==="[object Function]"}function F$(e){return typeof e=="function"&&e.toString().indexOf("class")===0}let dc;function L$(e,t){const r=Object.keys(t);return class extends e{static get observedAttributes(){return r.map(i=>t[i].attribute)}constructor(){super(),this.__initialized=!1,this.__released=!1,this.__releaseCallbacks=[],this.__propertyChangedCallbacks=[],this.__updating={},this.props={}}connectedCallback(){if(this.__initialized)return;this.__releaseCallbacks=[],this.__propertyChangedCallbacks=[],this.__updating={},this.props=A$(this,t);const i=I$(this.props),o=this.Component,a=dc;try{dc=this,this.__initialized=!0,F$(o)?new o(i,{element:this}):o(i,{element:this})}finally{dc=a}}async disconnectedCallback(){if(await Promise.resolve(),this.isConnected)return;this.__propertyChangedCallbacks.length=0;let i=null;for(;i=this.__releaseCallbacks.pop();)i(this);delete this.__initialized,this.__released=!0}attributeChangedCallback(i,o,a){if(!!this.__initialized&&!this.__updating[i]&&(i=this.lookupProp(i),i in t)){if(a==null&&!this[i])return;this[i]=t[i].parse?Bg(a):a}}lookupProp(i){if(!!t)return r.find(o=>i===o||i===t[o].attribute)}get renderRoot(){return this.shadowRoot||this.attachShadow({mode:"open"})}addReleaseCallback(i){this.__releaseCallbacks.push(i)}addPropertyChangedCallback(i){this.__propertyChangedCallbacks.push(i)}}}function M$(e,t={},r={}){const{BaseElement:n=HTMLElement,extension:i}=r;return o=>{if(!e)throw new Error("tag is required to register a Component");let a=customElements.get(e);return a?(a.prototype.Component=o,a):(a=L$(n,N$(t)),a.prototype.Component=o,a.prototype.registeredTag=e,customElements.define(e,a,i),a)}}function j$(e){const t=Object.keys(e),r={};for(let n=0;n<t.length;n++){const[i,o]=M(e[t[n]]);Object.defineProperty(r,t[n],{get:i,set(a){o(()=>a)}})}return r}function z$(e){if(e.assignedSlot&&e.assignedSlot._$owner)return e.assignedSlot._$owner;let t=e.parentNode;for(;t&&!t._$owner&&!(t.assignedSlot&&t.assignedSlot._$owner);)t=t.parentNode;return t&&t.assignedSlot?t.assignedSlot._$owner:e._$owner}function U$(e){return(t,r)=>{const{element:n}=r;return $a(i=>{const o=j$(t);n.addPropertyChangedCallback((s,c)=>o[s]=c),n.addReleaseCallback(()=>{n.renderRoot.textContent="",i()});const a=e(o,r);return w(n.renderRoot,a)},z$(n))}}function $e(e,t,r){return arguments.length===2&&(r=t,t={}),M$(e,t)(U$(r))}const qg=p$(),at=()=>m$(qg),V$=(e,t)=>{const r=[];return t.forEach(n=>{(!Object.keys(e).includes(n)||e[n]==null)&&r.push(`photon-client requires ${n}, but no value was provided`)}),r.forEach(n=>console.warn(n)),r},B$=/[?&]code=[^&]+/,W$=/[?&]state=[^&]+/,q$=/[?&]error=[^&]+/,H$=(e=window.location.search)=>(B$.test(e)||q$.test(e))&&W$.test(e),Ep=e=>e.replace(/\w\S*/g,function(t){return t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()}),G$=e=>/^\d+$/.test(e)&&e.length>=5;var Eu=function(e,t){return Eu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Eu(e,t)};function lr(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Eu(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var O=function(){return O=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},O.apply(this,arguments)};function an(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function oe(e,t,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(u){try{l(n.next(u))}catch(d){a(d)}}function c(u){try{l(n.throw(u))}catch(d){a(d)}}function l(u){u.done?o(u.value):i(u.value).then(s,c)}l((n=n.apply(e,t||[])).next())})}function Kr(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(l){return function(u){return c([l,u])}}function c(l){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(r=0)),r;)try{if(n=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,i=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){r.label=l[1];break}if(l[0]===6&&r.label<o[1]){r.label=o[1],o=l;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(l);break}o[2]&&r.ops.pop(),r.trys.pop();continue}l=t.call(e,r)}catch(u){l=[6,u],i=0}finally{n=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function xs(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}var Ou=function(e,t){return Ou=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Ou(e,t)};function zn(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Ou(e,t),e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var se=function(){return se=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},se.apply(this,arguments)};function At(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function"){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}function ve(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(l){try{c(n.next(l))}catch(u){o(u)}}function s(l){try{c(n.throw(l))}catch(u){o(u)}}function c(l){var u;l.done?i(l.value):(u=l.value,u instanceof r?u:new r(function(d){d(u)})).then(a,s)}c((n=n.apply(e,t||[])).next())})}function ye(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(c){return function(l){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&u[0]?n.return:u[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,u[1])).done)return i;switch(n=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,n=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(i=a.trys,!((i=i.length>0&&i[i.length-1])||u[0]!==6&&u[0]!==2)){a=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){a.label=u[1];break}if(u[0]===6&&a.label<i[1]){a.label=i[1],i=u;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(u);break}i[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(d){u=[6,d],n=0}finally{r=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([c,l])}}}function vi(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(t===void 0||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(s){i={error:s}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function Cu(e,t,r){if(r||arguments.length===2)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}var vr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function rh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ii(e,t){return e(t={exports:{}},t.exports),t.exports}var Br,wa,Xo=function(e){return e&&e.Math==Math&&e},le=Xo(typeof globalThis=="object"&&globalThis)||Xo(typeof window=="object"&&window)||Xo(typeof self=="object"&&self)||Xo(typeof vr=="object"&&vr)||function(){return this}()||Function("return this")(),Ae=function(e){try{return!!e()}catch{return!0}},Ee=!Ae(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),Lo=!Ae(function(){var e=function(){}.bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),Zo=Function.prototype.call,kt=Lo?Zo.bind(Zo):function(){return Zo.apply(Zo,arguments)},Op={}.propertyIsEnumerable,Cp=Object.getOwnPropertyDescriptor,Q$=Cp&&!Op.call({1:2},1)?function(e){var t=Cp(this,e);return!!t&&t.enumerable}:Op,nh={f:Q$},An=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},Hg=Function,Gg=Hg.prototype,K$=Gg.bind,Pu=Gg.call,Y$=Lo&&K$.bind(Pu,Pu),fe=function(e){return e instanceof Hg?Lo?Y$(e):function(){return Pu.apply(e,arguments)}:void 0},X$=fe({}.toString),Z$=fe("".slice),Ar=function(e){return Z$(X$(e),8,-1)},fc=Object,J$=fe("".split),Qg=Ae(function(){return!fc("z").propertyIsEnumerable(0)})?function(e){return Ar(e)=="String"?J$(e,""):fc(e)}:fc,Ai=function(e){return e==null},ew=TypeError,Mo=function(e){if(Ai(e))throw ew("Can't call method on "+e);return e},kr=function(e){return Qg(Mo(e))},hc=typeof document=="object"&&document.all,Fl={all:hc,IS_HTMLDDA:hc===void 0&&hc!==void 0},tw=Fl.all,Te=Fl.IS_HTMLDDA?function(e){return typeof e=="function"||e===tw}:function(e){return typeof e=="function"},rw=Fl.all,Le=Fl.IS_HTMLDDA?function(e){return typeof e=="object"?e!==null:Te(e)||e===rw}:function(e){return typeof e=="object"?e!==null:Te(e)},nw=function(e){return Te(e)?e:void 0},cr=function(e,t){return arguments.length<2?nw(le[e]):le[e]&&le[e][t]},Dn=fe({}.isPrototypeOf),pc=cr("navigator","userAgent")||"",Pp=le.process,Tp=le.Deno,Np=Pp&&Pp.versions||Tp&&Tp.version,Ip=Np&&Np.v8;Ip&&(wa=(Br=Ip.split("."))[0]>0&&Br[0]<4?1:+(Br[0]+Br[1])),!wa&&pc&&(!(Br=pc.match(/Edge\/(\d+)/))||Br[1]>=74)&&(Br=pc.match(/Chrome\/(\d+)/))&&(wa=+Br[1]);var Ss=wa,Wt=!!Object.getOwnPropertySymbols&&!Ae(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Ss&&Ss<41}),ih=Wt&&!Symbol.sham&&typeof Symbol.iterator=="symbol",iw=Object,yi=ih?function(e){return typeof e=="symbol"}:function(e){var t=cr("Symbol");return Te(t)&&Dn(t.prototype,iw(e))},ow=String,Di=function(e){try{return ow(e)}catch{return"Object"}},aw=TypeError,oh=function(e){if(Te(e))return e;throw aw(Di(e)+" is not a function")},ks=function(e,t){var r=e[t];return Ai(r)?void 0:oh(r)},sw=TypeError,lw=Object.defineProperty,ah=function(e,t){try{lw(le,e,{value:t,configurable:!0,writable:!0})}catch{le[e]=t}return t},tn=le["__core-js_shared__"]||ah("__core-js_shared__",{}),vn=Ii(function(e){(e.exports=function(t,r){return tn[t]||(tn[t]=r!==void 0?r:{})})("versions",[]).push({version:"3.25.4",mode:"global",copyright:"\xA9 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.25.4/LICENSE",source:"https://github.com/zloirock/core-js"})}),cw=Object,Ri=function(e){return cw(Mo(e))},uw=fe({}.hasOwnProperty),J=Object.hasOwn||function(e,t){return uw(Ri(e),t)},dw=0,fw=Math.random(),hw=fe(1 .toString),gi=function(e){return"Symbol("+(e===void 0?"":e)+")_"+hw(++dw+fw,36)},Hi=vn("wks"),Pn=le.Symbol,Ap=Pn&&Pn.for,pw=ih?Pn:Pn&&Pn.withoutSetter||gi,Ye=function(e){if(!J(Hi,e)||!Wt&&typeof Hi[e]!="string"){var t="Symbol."+e;Wt&&J(Pn,e)?Hi[e]=Pn[e]:Hi[e]=ih&&Ap?Ap(t):pw(t)}return Hi[e]},mw=TypeError,vw=Ye("toPrimitive"),yw=function(e,t){if(!Le(e)||yi(e))return e;var r,n=ks(e,vw);if(n){if(t===void 0&&(t="default"),r=kt(n,e,t),!Le(r)||yi(r))return r;throw mw("Can't convert object to primitive value")}return t===void 0&&(t="number"),function(i,o){var a,s;if(o==="string"&&Te(a=i.toString)&&!Le(s=kt(a,i))||Te(a=i.valueOf)&&!Le(s=kt(a,i))||o!=="string"&&Te(a=i.toString)&&!Le(s=kt(a,i)))return s;throw sw("Can't convert object to primitive value")}(e,t)},Rn=function(e){var t=yw(e,"string");return yi(t)?t:t+""},Tu=le.document,gw=Le(Tu)&&Le(Tu.createElement),Kg=function(e){return gw?Tu.createElement(e):{}},Yg=!Ee&&!Ae(function(){return Object.defineProperty(Kg("div"),"a",{get:function(){return 7}}).a!=7}),Dp=Object.getOwnPropertyDescriptor,jo={f:Ee?Dp:function(e,t){if(e=kr(e),t=Rn(t),Yg)try{return Dp(e,t)}catch{}if(J(e,t))return An(!kt(nh.f,e,t),e[t])}},Xg=Ee&&Ae(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42}),bw=String,$w=TypeError,ut=function(e){if(Le(e))return e;throw $w(bw(e)+" is not an object")},ww=TypeError,mc=Object.defineProperty,_w=Object.getOwnPropertyDescriptor,$t={f:Ee?Xg?function(e,t,r){if(ut(e),t=Rn(t),ut(r),typeof e=="function"&&t==="prototype"&&"value"in r&&"writable"in r&&!r.writable){var n=_w(e,t);n&&n.writable&&(e[t]=r.value,r={configurable:"configurable"in r?r.configurable:n.configurable,enumerable:"enumerable"in r?r.enumerable:n.enumerable,writable:!1})}return mc(e,t,r)}:mc:function(e,t,r){if(ut(e),t=Rn(t),ut(r),Yg)try{return mc(e,t,r)}catch{}if("get"in r||"set"in r)throw ww("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},Ll=Ee?function(e,t,r){return $t.f(e,t,An(1,r))}:function(e,t,r){return e[t]=r,e},Zg=Function.prototype,xw=Ee&&Object.getOwnPropertyDescriptor,vc=J(Zg,"name"),sh={EXISTS:vc,PROPER:vc&&function(){}.name==="something",CONFIGURABLE:vc&&(!Ee||Ee&&xw(Zg,"name").configurable)},Sw=fe(Function.toString);Te(tn.inspectSource)||(tn.inspectSource=function(e){return Sw(e)});var Es,ho,Os,Jg=tn.inspectSource,Rp=le.WeakMap,kw=Te(Rp)&&/native code/.test(String(Rp)),Fp=vn("keys"),Ml=function(e){return Fp[e]||(Fp[e]=gi(e))},Fi={},Nu=le.TypeError,Ew=le.WeakMap;if(kw||tn.state){var bn=tn.state||(tn.state=new Ew),Ow=fe(bn.get),Lp=fe(bn.has),Cw=fe(bn.set);Es=function(e,t){if(Lp(bn,e))throw Nu("Object already initialized");return t.facade=e,Cw(bn,e,t),t},ho=function(e){return Ow(bn,e)||{}},Os=function(e){return Lp(bn,e)}}else{var qn=Ml("state");Fi[qn]=!0,Es=function(e,t){if(J(e,qn))throw Nu("Object already initialized");return t.facade=e,Ll(e,qn,t),t},ho=function(e){return J(e,qn)?e[qn]:{}},Os=function(e){return J(e,qn)}}var Kt={set:Es,get:ho,has:Os,enforce:function(e){return Os(e)?ho(e):Es(e,{})},getterFor:function(e){return function(t){var r;if(!Le(t)||(r=ho(t)).type!==e)throw Nu("Incompatible receiver, "+e+" required");return r}}},Pw=Ii(function(e){var t=sh.CONFIGURABLE,r=Kt.enforce,n=Kt.get,i=Object.defineProperty,o=Ee&&!Ae(function(){return i(function(){},"length",{value:8}).length!==8}),a=String(String).split("String"),s=e.exports=function(c,l,u){String(l).slice(0,7)==="Symbol("&&(l="["+String(l).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),u&&u.getter&&(l="get "+l),u&&u.setter&&(l="set "+l),(!J(c,"name")||t&&c.name!==l)&&(Ee?i(c,"name",{value:l,configurable:!0}):c.name=l),o&&u&&J(u,"arity")&&c.length!==u.arity&&i(c,"length",{value:u.arity});try{u&&J(u,"constructor")&&u.constructor?Ee&&i(c,"prototype",{writable:!1}):c.prototype&&(c.prototype=void 0)}catch{}var d=r(c);return J(d,"source")||(d.source=a.join(typeof l=="string"?l:"")),c};Function.prototype.toString=s(function(){return Te(this)&&n(this).source||Jg(this)},"toString")}),Ot=function(e,t,r,n){n||(n={});var i=n.enumerable,o=n.name!==void 0?n.name:t;if(Te(r)&&Pw(r,o,n),n.global)i?e[t]=r:ah(t,r);else{try{n.unsafe?e[t]&&(i=!0):delete e[t]}catch{}i?e[t]=r:$t.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},Tw=Math.ceil,Nw=Math.floor,Iw=Math.trunc||function(e){var t=+e;return(t>0?Nw:Tw)(t)},lh=function(e){var t=+e;return t!=t||t===0?0:Iw(t)},Aw=Math.max,Dw=Math.min,Iu=function(e,t){var r=lh(e);return r<0?Aw(r+t,0):Dw(r,t)},Rw=Math.min,eb=function(e){return e>0?Rw(lh(e),9007199254740991):0},Li=function(e){return eb(e.length)},Mp=function(e){return function(t,r,n){var i,o=kr(t),a=Li(o),s=Iu(n,a);if(e&&r!=r){for(;a>s;)if((i=o[s++])!=i)return!0}else for(;a>s;s++)if((e||s in o)&&o[s]===r)return e||s||0;return!e&&-1}},tb={includes:Mp(!0),indexOf:Mp(!1)},Fw=tb.indexOf,jp=fe([].push),rb=function(e,t){var r,n=kr(e),i=0,o=[];for(r in n)!J(Fi,r)&&J(n,r)&&jp(o,r);for(;t.length>i;)J(n,r=t[i++])&&(~Fw(o,r)||jp(o,r));return o},Cs=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Lw=Cs.concat("length","prototype"),wo={f:Object.getOwnPropertyNames||function(e){return rb(e,Lw)}},jl={f:Object.getOwnPropertySymbols},Mw=fe([].concat),jw=cr("Reflect","ownKeys")||function(e){var t=wo.f(ut(e)),r=jl.f;return r?Mw(t,r(e)):t},nb=function(e,t,r){for(var n=jw(t),i=$t.f,o=jo.f,a=0;a<n.length;a++){var s=n[a];J(e,s)||r&&J(r,s)||i(e,s,o(t,s))}},zw=/#|\.prototype\./,zo=function(e,t){var r=Vw[Uw(e)];return r==Ww||r!=Bw&&(Te(t)?Ae(t):!!t)},Uw=zo.normalize=function(e){return String(e).replace(zw,".").toLowerCase()},Vw=zo.data={},Bw=zo.NATIVE="N",Ww=zo.POLYFILL="P",Au=zo,qw=jo.f,dt=function(e,t){var r,n,i,o,a,s=e.target,c=e.global,l=e.stat;if(r=c?le:l?le[s]||ah(s,{}):(le[s]||{}).prototype)for(n in t){if(o=t[n],i=e.dontCallGetSet?(a=qw(r,n))&&a.value:r[n],!Au(c?n:s+(l?".":"#")+n,e.forced)&&i!==void 0){if(typeof o==typeof i)continue;nb(o,i)}(e.sham||i&&i.sham)&&Ll(o,"sham",!0),Ot(r,n,o,e)}},ib={};ib[Ye("toStringTag")]="z";var yc,ch=String(ib)==="[object z]",Hw=Ye("toStringTag"),Gw=Object,Qw=Ar(function(){return arguments}())=="Arguments",Un=ch?Ar:function(e){var t,r,n;return e===void 0?"Undefined":e===null?"Null":typeof(r=function(i,o){try{return i[o]}catch{}}(t=Gw(e),Hw))=="string"?r:Qw?Ar(t):(n=Ar(t))=="Object"&&Te(t.callee)?"Arguments":n},Kw=String,Rr=function(e){if(Un(e)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return Kw(e)},Yw=Ye("match"),Xw=TypeError,ob=function(e){if(function(t){var r;return Le(t)&&((r=t[Yw])!==void 0?!!r:Ar(t)=="RegExp")}(e))throw Xw("The method doesn't accept regular expressions");return e},Zw=Ye("match"),ab=function(e){var t=/./;try{"/./"[e](t)}catch{try{return t[Zw]=!1,"/./"[e](t)}catch{}}return!1},Jw=jo.f,zp=fe("".startsWith),e_=fe("".slice),t_=Math.min,sb=ab("startsWith"),r_=!(sb||(yc=Jw(String.prototype,"startsWith"),!yc||yc.writable));dt({target:"String",proto:!0,forced:!r_&&!sb},{startsWith:function(e){var t=Rr(Mo(this));ob(e);var r=eb(t_(arguments.length>1?arguments[1]:void 0,t.length)),n=Rr(e);return zp?zp(t,n,r):e_(t,r,r+n.length)===n}});var uh=function(e,t){return fe(le[e].prototype[t])};uh("String","startsWith");var Ps=Array.isArray||function(e){return Ar(e)=="Array"},n_=TypeError,Up=function(e){if(e>9007199254740991)throw n_("Maximum allowed index exceeded");return e},_o=function(e,t,r){var n=Rn(t);n in e?$t.f(e,n,An(0,r)):e[n]=r},lb=function(){},i_=[],cb=cr("Reflect","construct"),dh=/^\s*(?:class|function)\b/,o_=fe(dh.exec),a_=!dh.exec(lb),Gi=function(e){if(!Te(e))return!1;try{return cb(lb,i_,e),!0}catch{return!1}},ub=function(e){if(!Te(e))return!1;switch(Un(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return a_||!!o_(dh,Jg(e))}catch{return!0}};ub.sham=!0;var Vp,fh=!cb||Ae(function(){var e;return Gi(Gi.call)||!Gi(Object)||!Gi(function(){e=!0})||e})?ub:Gi,s_=Ye("species"),Bp=Array,db=function(e,t){return new(function(r){var n;return Ps(r)&&(n=r.constructor,(fh(n)&&(n===Bp||Ps(n.prototype))||Le(n)&&(n=n[s_])===null)&&(n=void 0)),n===void 0?Bp:n}(e))(t===0?0:t)},l_=Ye("species"),fb=Ye("isConcatSpreadable"),c_=Ss>=51||!Ae(function(){var e=[];return e[fb]=!1,e.concat()[0]!==e}),u_=(Vp="concat",Ss>=51||!Ae(function(){var e=[];return(e.constructor={})[l_]=function(){return{foo:1}},e[Vp](Boolean).foo!==1})),d_=function(e){if(!Le(e))return!1;var t=e[fb];return t!==void 0?!!t:Ps(e)};dt({target:"Array",proto:!0,arity:1,forced:!c_||!u_},{concat:function(e){var t,r,n,i,o,a=Ri(this),s=db(a,0),c=0;for(t=-1,n=arguments.length;t<n;t++)if(d_(o=t===-1?a:arguments[t]))for(i=Li(o),Up(c+i),r=0;r<i;r++,c++)r in o&&_o(s,c,o[r]);else Up(c+1),_o(s,c++,o);return s.length=c,s}});var f_=ch?{}.toString:function(){return"[object "+Un(this)+"]"};ch||Ot(Object.prototype,"toString",f_,{unsafe:!0});var Jo,hh=Object.keys||function(e){return rb(e,Cs)},h_=Ee&&!Xg?Object.defineProperties:function(e,t){ut(e);for(var r,n=kr(t),i=hh(t),o=i.length,a=0;o>a;)$t.f(e,r=i[a++],n[r]);return e},hb={f:h_},p_=cr("document","documentElement"),pb=Ml("IE_PROTO"),gc=function(){},mb=function(e){return"<script>"+e+"<\/script>"},Wp=function(e){e.write(mb("")),e.close();var t=e.parentWindow.Object;return e=null,t},_a=function(){try{Jo=new ActiveXObject("htmlfile")}catch{}var e,t;_a=typeof document<"u"?document.domain&&Jo?Wp(Jo):((t=Kg("iframe")).style.display="none",p_.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(mb("document.F=Object")),e.close(),e.F):Wp(Jo);for(var r=Cs.length;r--;)delete _a.prototype[Cs[r]];return _a()};Fi[pb]=!0;var sn=Object.create||function(e,t){var r;return e!==null?(gc.prototype=ut(e),r=new gc,gc.prototype=null,r[pb]=e):r=_a(),t===void 0?r:hb.f(r,t)},m_=Array,v_=Math.max,vb=wo.f,yb=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],y_=function(e){try{return vb(e)}catch{return function(r,n,i){for(var o=Li(r),a=Iu(n,o),s=Iu(i===void 0?o:i,o),c=m_(v_(s-a,0)),l=0;a<s;a++,l++)_o(c,l,r[a]);return c.length=l,c}(yb)}},ph={f:function(e){return yb&&Ar(e)=="Window"?y_(e):vb(kr(e))}},gb={f:Ye},xo=le,g_=$t.f,Dt=function(e){var t=xo.Symbol||(xo.Symbol={});J(t,e)||g_(t,e,{value:gb.f(e)})},bb=function(){var e=cr("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,n=Ye("toPrimitive");t&&!t[n]&&Ot(t,n,function(i){return kt(r,this)},{arity:1})},b_=$t.f,qp=Ye("toStringTag"),en=function(e,t,r){e&&!r&&(e=e.prototype),e&&!J(e,qp)&&b_(e,qp,{configurable:!0,value:t})},$_=fe(fe.bind),zl=function(e,t){return oh(e),t===void 0?e:Lo?$_(e,t):function(){return e.apply(t,arguments)}},Hp=fe([].push),Wr=function(e){var t=e==1,r=e==2,n=e==3,i=e==4,o=e==6,a=e==7,s=e==5||o;return function(c,l,u,d){for(var f,h,p=Ri(c),m=Qg(p),v=zl(l,u),y=Li(m),b=0,g=d||db,_=t?g(c,y):r||a?g(c,0):void 0;y>b;b++)if((s||b in m)&&(h=v(f=m[b],b,p),e))if(t)_[b]=h;else if(h)switch(e){case 3:return!0;case 5:return f;case 6:return b;case 2:Hp(_,f)}else switch(e){case 4:return!1;case 7:Hp(_,f)}return o?-1:n||i?i:_}},Ul={forEach:Wr(0),map:Wr(1),filter:Wr(2),some:Wr(3),every:Wr(4),find:Wr(5),findIndex:Wr(6),filterReject:Wr(7)}.forEach,Rt=Ml("hidden"),w_=Kt.set,Gp=Kt.getterFor("Symbol"),Ht=Object.prototype,ni=le.Symbol,lo=ni&&ni.prototype,__=le.TypeError,bc=le.QObject,$b=jo.f,Zr=$t.f,wb=ph.f,x_=nh.f,_b=fe([].push),Fr=vn("symbols"),Uo=vn("op-symbols"),S_=vn("wks"),$c=!bc||!bc.prototype||!bc.prototype.findChild,Du=Ee&&Ae(function(){return sn(Zr({},"a",{get:function(){return Zr(this,"a",{value:7}).a}})).a!=7})?function(e,t,r){var n=$b(Ht,t);n&&delete Ht[t],Zr(e,t,r),n&&e!==Ht&&Zr(Ht,t,n)}:Zr,wc=function(e,t){var r=Fr[e]=sn(lo);return w_(r,{type:"Symbol",tag:e,description:t}),Ee||(r.description=t),r},Ts=function(e,t,r){e===Ht&&Ts(Uo,t,r),ut(e);var n=Rn(t);return ut(r),J(Fr,n)?(r.enumerable?(J(e,Rt)&&e[Rt][n]&&(e[Rt][n]=!1),r=sn(r,{enumerable:An(0,!1)})):(J(e,Rt)||Zr(e,Rt,An(1,{})),e[Rt][n]=!0),Du(e,n,r)):Zr(e,n,r)},_c=function(e,t){ut(e);var r=kr(t),n=hh(r).concat(xb(r));return Ul(n,function(i){Ee&&!kt(Ru,r,i)||Ts(e,i,r[i])}),e},Ru=function(e){var t=Rn(e),r=kt(x_,this,t);return!(this===Ht&&J(Fr,t)&&!J(Uo,t))&&(!(r||!J(this,t)||!J(Fr,t)||J(this,Rt)&&this[Rt][t])||r)},Qp=function(e,t){var r=kr(e),n=Rn(t);if(r!==Ht||!J(Fr,n)||J(Uo,n)){var i=$b(r,n);return!i||!J(Fr,n)||J(r,Rt)&&r[Rt][n]||(i.enumerable=!0),i}},Kp=function(e){var t=wb(kr(e)),r=[];return Ul(t,function(n){J(Fr,n)||J(Fi,n)||_b(r,n)}),r},xb=function(e){var t=e===Ht,r=wb(t?Uo:kr(e)),n=[];return Ul(r,function(i){!J(Fr,i)||t&&!J(Ht,i)||_b(n,Fr[i])}),n};Wt||(lo=(ni=function(){if(Dn(lo,this))throw __("Symbol is not a constructor");var e=arguments.length&&arguments[0]!==void 0?Rr(arguments[0]):void 0,t=gi(e),r=function(n){this===Ht&&kt(r,Uo,n),J(this,Rt)&&J(this[Rt],t)&&(this[Rt][t]=!1),Du(this,t,An(1,n))};return Ee&&$c&&Du(Ht,t,{configurable:!0,set:r}),wc(t,e)}).prototype,Ot(lo,"toString",function(){return Gp(this).tag}),Ot(ni,"withoutSetter",function(e){return wc(gi(e),e)}),nh.f=Ru,$t.f=Ts,hb.f=_c,jo.f=Qp,wo.f=ph.f=Kp,jl.f=xb,gb.f=function(e){return wc(Ye(e),e)},Ee&&(Zr(lo,"description",{configurable:!0,get:function(){return Gp(this).description}}),Ot(Ht,"propertyIsEnumerable",Ru,{unsafe:!0}))),dt({global:!0,constructor:!0,wrap:!0,forced:!Wt,sham:!Wt},{Symbol:ni}),Ul(hh(S_),function(e){Dt(e)}),dt({target:"Symbol",stat:!0,forced:!Wt},{useSetter:function(){$c=!0},useSimple:function(){$c=!1}}),dt({target:"Object",stat:!0,forced:!Wt,sham:!Ee},{create:function(e,t){return t===void 0?sn(e):_c(sn(e),t)},defineProperty:Ts,defineProperties:_c,getOwnPropertyDescriptor:Qp}),dt({target:"Object",stat:!0,forced:!Wt},{getOwnPropertyNames:Kp}),bb(),en(ni,"Symbol"),Fi[Rt]=!0;var Sb=Wt&&!!Symbol.for&&!!Symbol.keyFor,xc=vn("string-to-symbol-registry"),k_=vn("symbol-to-string-registry");dt({target:"Symbol",stat:!0,forced:!Sb},{for:function(e){var t=Rr(e);if(J(xc,t))return xc[t];var r=cr("Symbol")(t);return xc[t]=r,k_[r]=t,r}});var Yp=vn("symbol-to-string-registry");dt({target:"Symbol",stat:!0,forced:!Sb},{keyFor:function(e){if(!yi(e))throw TypeError(Di(e)+" is not a symbol");if(J(Yp,e))return Yp[e]}});var kb=Function.prototype,Xp=kb.apply,Zp=kb.call,Eb=typeof Reflect=="object"&&Reflect.apply||(Lo?Zp.bind(Xp):function(){return Zp.apply(Xp,arguments)}),mh=fe([].slice),rn=cr("JSON","stringify"),ea=fe(/./.exec),Jp=fe("".charAt),E_=fe("".charCodeAt),O_=fe("".replace),C_=fe(1 .toString),P_=/[\uD800-\uDFFF]/g,e0=/^[\uD800-\uDBFF]$/,t0=/^[\uDC00-\uDFFF]$/,r0=!Wt||Ae(function(){var e=cr("Symbol")();return rn([e])!="[null]"||rn({a:e})!="{}"||rn(Object(e))!="{}"}),n0=Ae(function(){return rn("\uDF06\uD834")!=='"\\udf06\\ud834"'||rn("\uDEAD")!=='"\\udead"'}),T_=function(e,t){var r=mh(arguments),n=t;if((Le(t)||e!==void 0)&&!yi(e))return Ps(t)||(t=function(i,o){if(Te(n)&&(o=kt(n,this,i,o)),!yi(o))return o}),r[1]=t,Eb(rn,null,r)},N_=function(e,t,r){var n=Jp(r,t-1),i=Jp(r,t+1);return ea(e0,e)&&!ea(t0,i)||ea(t0,e)&&!ea(e0,n)?"\\u"+C_(E_(e,0),16):e};rn&&dt({target:"JSON",stat:!0,arity:3,forced:r0||n0},{stringify:function(e,t,r){var n=mh(arguments),i=Eb(r0?T_:rn,null,n);return n0&&typeof i=="string"?O_(i,P_,N_):i}});var I_=!Wt||Ae(function(){jl.f(1)});dt({target:"Object",stat:!0,forced:I_},{getOwnPropertySymbols:function(e){var t=jl.f;return t?t(Ri(e)):[]}}),Dt("asyncIterator");var A_=$t.f,Pr=le.Symbol,$n=Pr&&Pr.prototype;if(Ee&&Te(Pr)&&(!("description"in $n)||Pr().description!==void 0)){var i0={},ta=function(){var e=arguments.length<1||arguments[0]===void 0?void 0:Rr(arguments[0]),t=Dn($n,this)?new Pr(e):e===void 0?Pr():Pr(e);return e===""&&(i0[t]=!0),t};nb(ta,Pr),ta.prototype=$n,$n.constructor=ta;var D_=String(Pr("test"))=="Symbol(test)",R_=fe($n.valueOf),F_=fe($n.toString),L_=/^Symbol\((.*)\)[^)]+$/,M_=fe("".replace),j_=fe("".slice);A_($n,"description",{configurable:!0,get:function(){var e=R_(this);if(J(i0,e))return"";var t=F_(e),r=D_?j_(t,7,-1):M_(t,L_,"$1");return r===""?void 0:r}}),dt({global:!0,constructor:!0,forced:!0},{Symbol:ta})}Dt("hasInstance"),Dt("isConcatSpreadable"),Dt("iterator"),Dt("match"),Dt("matchAll"),Dt("replace"),Dt("search"),Dt("species"),Dt("split"),Dt("toPrimitive"),bb(),Dt("toStringTag"),en(cr("Symbol"),"Symbol"),Dt("unscopables"),en(le.JSON,"JSON",!0),en(Math,"Math",!0),dt({global:!0},{Reflect:{}}),en(le.Reflect,"Reflect",!0),xo.Symbol;var Tn,o0,a0,z_=fe("".charAt),s0=fe("".charCodeAt),U_=fe("".slice),l0=function(e){return function(t,r){var n,i,o=Rr(Mo(t)),a=lh(r),s=o.length;return a<0||a>=s?e?"":void 0:(n=s0(o,a))<55296||n>56319||a+1===s||(i=s0(o,a+1))<56320||i>57343?e?z_(o,a):n:e?U_(o,a,a+2):i-56320+(n-55296<<10)+65536}},V_={codeAt:l0(!1),charAt:l0(!0)},B_=!Ae(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),c0=Ml("IE_PROTO"),Fu=Object,W_=Fu.prototype,ln=B_?Fu.getPrototypeOf:function(e){var t=Ri(e);if(J(t,c0))return t[c0];var r=t.constructor;return Te(r)&&t instanceof r?r.prototype:t instanceof Fu?W_:null},Lu=Ye("iterator"),Ob=!1;[].keys&&("next"in(a0=[].keys())?(o0=ln(ln(a0)))!==Object.prototype&&(Tn=o0):Ob=!0);var q_=!Le(Tn)||Ae(function(){var e={};return Tn[Lu].call(e)!==e});q_&&(Tn={}),Te(Tn[Lu])||Ot(Tn,Lu,function(){return this});var vh={IteratorPrototype:Tn,BUGGY_SAFARI_ITERATORS:Ob},bi={},H_=vh.IteratorPrototype,G_=function(){return this},Q_=String,K_=TypeError,$r=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=fe(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),t=r instanceof Array}catch{}return function(n,i){return ut(n),function(o){if(typeof o=="object"||Te(o))return o;throw K_("Can't set "+Q_(o)+" as a prototype")}(i),t?e(n,i):n.__proto__=i,n}}():void 0),Y_=sh.PROPER,X_=sh.CONFIGURABLE,u0=vh.IteratorPrototype,ra=vh.BUGGY_SAFARI_ITERATORS,Qi=Ye("iterator"),Z_=function(){return this},yh=function(e,t,r,n,i,o,a){(function(y,b,g,_){var k=b+" Iterator";y.prototype=sn(H_,{next:An(+!_,g)}),en(y,k,!1),bi[k]=G_})(r,t,n);var s,c,l,u=function(y){if(y===i&&m)return m;if(!ra&&y in h)return h[y];switch(y){case"keys":case"values":case"entries":return function(){return new r(this,y)}}return function(){return new r(this)}},d=t+" Iterator",f=!1,h=e.prototype,p=h[Qi]||h["@@iterator"]||i&&h[i],m=!ra&&p||u(i),v=t=="Array"&&h.entries||p;if(v&&(s=ln(v.call(new e)))!==Object.prototype&&s.next&&(ln(s)!==u0&&($r?$r(s,u0):Te(s[Qi])||Ot(s,Qi,Z_)),en(s,d,!0)),Y_&&i=="values"&&p&&p.name!=="values"&&(X_?Ll(h,"name","values"):(f=!0,m=function(){return kt(p,this)})),i)if(c={values:u("values"),keys:o?m:u("keys"),entries:u("entries")},a)for(l in c)(ra||f||!(l in h))&&Ot(h,l,c[l]);else dt({target:t,proto:!0,forced:ra||f},c);return h[Qi]!==m&&Ot(h,Qi,m,{name:i}),bi[t]=m,c},$i=function(e,t){return{value:e,done:t}},J_=V_.charAt,e3=Kt.set,t3=Kt.getterFor("String Iterator");yh(String,"String",function(e){e3(this,{type:"String Iterator",string:Rr(e),index:0})},function(){var e,t=t3(this),r=t.string,n=t.index;return n>=r.length?$i(void 0,!0):(e=J_(r,n),t.index+=e.length,$i(e,!1))});var Mu=function(e,t,r){var n,i;ut(e);try{if(!(n=ks(e,"return"))){if(t==="throw")throw r;return r}n=kt(n,e)}catch(o){i=!0,n=o}if(t==="throw")throw r;if(i)throw n;return ut(n),r},r3=function(e,t,r,n){try{return n?t(ut(r)[0],r[1]):t(r)}catch(i){Mu(e,"throw",i)}},n3=Ye("iterator"),i3=Array.prototype,Cb=function(e){return e!==void 0&&(bi.Array===e||i3[n3]===e)},o3=Ye("iterator"),gh=function(e){if(!Ai(e))return ks(e,o3)||ks(e,"@@iterator")||bi[Un(e)]},a3=TypeError,Pb=function(e,t){var r=arguments.length<2?gh(e):t;if(oh(r))return ut(kt(r,e));throw a3(Di(e)+" is not iterable")},d0=Array,Tb=Ye("iterator"),Nb=!1;try{var s3=0,f0={next:function(){return{done:!!s3++}},return:function(){Nb=!0}};f0[Tb]=function(){return this},Array.from(f0,function(){throw 2})}catch{}var Ib=function(e,t){if(!t&&!Nb)return!1;var r=!1;try{var n={};n[Tb]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch{}return r},l3=!Ib(function(e){Array.from(e)});dt({target:"Array",stat:!0,forced:l3},{from:function(e){var t=Ri(e),r=fh(this),n=arguments.length,i=n>1?arguments[1]:void 0,o=i!==void 0;o&&(i=zl(i,n>2?arguments[2]:void 0));var a,s,c,l,u,d,f=gh(t),h=0;if(!f||this===d0&&Cb(f))for(a=Li(t),s=r?new this(a):d0(a);a>h;h++)d=o?i(t[h],h):t[h],_o(s,h,d);else for(u=(l=Pb(t,f)).next,s=r?new this:[];!(c=kt(u,l)).done;h++)d=o?r3(l,i,[c.value,h],!0):c.value,_o(s,h,d);return s.length=h,s}}),xo.Array.from;var Ft,ci,Ns,c3=typeof ArrayBuffer<"u"&&typeof DataView<"u",u3=$t.f,Ab=Kt.enforce,d3=Kt.get,Is=le.Int8Array,ju=Is&&Is.prototype,h0=le.Uint8ClampedArray,p0=h0&&h0.prototype,hr=Is&&ln(Is),nr=ju&&ln(ju),f3=Object.prototype,zu=le.TypeError,m0=Ye("toStringTag"),Uu=gi("TYPED_ARRAY_TAG"),Dr=c3&&!!$r&&Un(le.opera)!=="Opera",Db=!1,Tr={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},bh={BigInt64Array:8,BigUint64Array:8},Rb=function(e){var t=ln(e);if(Le(t)){var r=d3(t);return r&&J(r,"TypedArrayConstructor")?r.TypedArrayConstructor:Rb(t)}},v0=function(e){if(!Le(e))return!1;var t=Un(e);return J(Tr,t)||J(bh,t)};for(Ft in Tr)(Ns=(ci=le[Ft])&&ci.prototype)?Ab(Ns).TypedArrayConstructor=ci:Dr=!1;for(Ft in bh)(Ns=(ci=le[Ft])&&ci.prototype)&&(Ab(Ns).TypedArrayConstructor=ci);if((!Dr||!Te(hr)||hr===Function.prototype)&&(hr=function(){throw zu("Incorrect invocation")},Dr))for(Ft in Tr)le[Ft]&&$r(le[Ft],hr);if((!Dr||!nr||nr===f3)&&(nr=hr.prototype,Dr))for(Ft in Tr)le[Ft]&&$r(le[Ft].prototype,nr);if(Dr&&ln(p0)!==nr&&$r(p0,nr),Ee&&!J(nr,m0))for(Ft in Db=!0,u3(nr,m0,{get:function(){return Le(this)?this[Uu]:void 0}}),Tr)le[Ft]&&Ll(le[Ft],Uu,Ft);var Vl={NATIVE_ARRAY_BUFFER_VIEWS:Dr,TYPED_ARRAY_TAG:Db&&Uu,aTypedArray:function(e){if(v0(e))return e;throw zu("Target is not a typed array")},aTypedArrayConstructor:function(e){if(Te(e)&&(!$r||Dn(hr,e)))return e;throw zu(Di(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,r,n){if(Ee){if(r)for(var i in Tr){var o=le[i];if(o&&J(o.prototype,e))try{delete o.prototype[e]}catch{try{o.prototype[e]=t}catch{}}}nr[e]&&!r||Ot(nr,e,r?t:Dr&&ju[e]||t,n)}},exportTypedArrayStaticMethod:function(e,t,r){var n,i;if(Ee){if($r){if(r){for(n in Tr)if((i=le[n])&&J(i,e))try{delete i[e]}catch{}}if(hr[e]&&!r)return;try{return Ot(hr,e,r?t:Dr&&hr[e]||t)}catch{}}for(n in Tr)!(i=le[n])||i[e]&&!r||Ot(i,e,t)}},getTypedArrayConstructor:Rb,isView:function(e){if(!Le(e))return!1;var t=Un(e);return t==="DataView"||J(Tr,t)||J(bh,t)},isTypedArray:v0,TypedArray:hr,TypedArrayPrototype:nr},h3=TypeError,p3=Ye("species"),m3=function(e,t){var r,n=ut(e).constructor;return n===void 0||Ai(r=ut(n)[p3])?t:function(i){if(fh(i))return i;throw h3(Di(i)+" is not a constructor")}(r)},v3=Vl.aTypedArrayConstructor,y3=Vl.getTypedArrayConstructor,g3=Vl.aTypedArray;(0,Vl.exportTypedArrayMethod)("slice",function(e,t){for(var r,n=mh(g3(this),e,t),i=v3(m3(r=this,y3(r))),o=0,a=n.length,s=new i(a);a>o;)s[o]=n[o++];return s},Ae(function(){new Int8Array(1).slice()}));var b3=$t.f,Vu=Ye("unscopables"),Bu=Array.prototype;Bu[Vu]==null&&b3(Bu,Vu,{configurable:!0,value:sn(null)});var xa=function(e){Bu[Vu][e]=!0},$3=tb.includes,w3=Ae(function(){return!Array(1).includes()});dt({target:"Array",proto:!0,forced:w3},{includes:function(e){return $3(this,e,arguments.length>1?arguments[1]:void 0)}}),xa("includes"),uh("Array","includes");var _3=fe("".indexOf);dt({target:"String",proto:!0,forced:!ab("includes")},{includes:function(e){return!!~_3(Rr(Mo(this)),Rr(ob(e)),arguments.length>1?arguments[1]:void 0)}}),uh("String","includes");var x3=$t.f,S3=Kt.set,k3=Kt.getterFor("Array Iterator");yh(Array,"Array",function(e,t){S3(this,{type:"Array Iterator",target:kr(e),index:0,kind:t})},function(){var e=k3(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,$i(void 0,!0)):$i(r=="keys"?n:r=="values"?t[n]:[n,t[n]],!1)},"values");var y0=bi.Arguments=bi.Array;if(xa("keys"),xa("values"),xa("entries"),Ee&&y0.name!=="values")try{x3(y0,"name",{value:"values"})}catch{}var g0=Ae(function(){if(typeof ArrayBuffer=="function"){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}),na=Object.isExtensible,Sc=Ae(function(){na(1)})||g0?function(e){return!!Le(e)&&(!g0||Ar(e)!="ArrayBuffer")&&(!na||na(e))}:na,E3=!Ae(function(){return Object.isExtensible(Object.preventExtensions({}))}),ii=Ii(function(e){var t=$t.f,r=!1,n=gi("meta"),i=0,o=function(s){t(s,n,{value:{objectID:"O"+i++,weakData:{}}})},a=e.exports={enable:function(){a.enable=function(){},r=!0;var s=wo.f,c=fe([].splice),l={};l[n]=1,s(l).length&&(wo.f=function(u){for(var d=s(u),f=0,h=d.length;f<h;f++)if(d[f]===n){c(d,f,1);break}return d},dt({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:ph.f}))},fastKey:function(s,c){if(!Le(s))return typeof s=="symbol"?s:(typeof s=="string"?"S":"P")+s;if(!J(s,n)){if(!Sc(s))return"F";if(!c)return"E";o(s)}return s[n].objectID},getWeakData:function(s,c){if(!J(s,n)){if(!Sc(s))return!0;if(!c)return!1;o(s)}return s[n].weakData},onFreeze:function(s){return E3&&r&&Sc(s)&&!J(s,n)&&o(s),s}};Fi[n]=!0});ii.enable,ii.fastKey,ii.getWeakData,ii.onFreeze;var O3=TypeError,Sa=function(e,t){this.stopped=e,this.result=t},b0=Sa.prototype,Fb=function(e,t,r){var n,i,o,a,s,c,l,u=r&&r.that,d=!(!r||!r.AS_ENTRIES),f=!(!r||!r.IS_RECORD),h=!(!r||!r.IS_ITERATOR),p=!(!r||!r.INTERRUPTED),m=zl(t,u),v=function(b){return n&&Mu(n,"normal",b),new Sa(!0,b)},y=function(b){return d?(ut(b),p?m(b[0],b[1],v):m(b[0],b[1])):p?m(b,v):m(b)};if(f)n=e.iterator;else if(h)n=e;else{if(!(i=gh(e)))throw O3(Di(e)+" is not iterable");if(Cb(i)){for(o=0,a=Li(e);a>o;o++)if((s=y(e[o]))&&Dn(b0,s))return s;return new Sa(!1)}n=Pb(e,i)}for(c=f?e.next:n.next;!(l=kt(c,n)).done;){try{s=y(l.value)}catch(b){Mu(n,"throw",b)}if(typeof s=="object"&&s&&Dn(b0,s))return s}return new Sa(!1)},C3=TypeError,Lb=function(e,t){if(Dn(t,e))return e;throw C3("Incorrect invocation")},$0=function(e,t,r){for(var n in t)Ot(e,n,t[n],r);return e},w0=Ye("species"),P3=$t.f,_0=ii.fastKey,x0=Kt.set,kc=Kt.getterFor,T3={getConstructor:function(e,t,r,n){var i=e(function(l,u){Lb(l,o),x0(l,{type:t,index:sn(null),first:void 0,last:void 0,size:0}),Ee||(l.size=0),Ai(u)||Fb(u,l[n],{that:l,AS_ENTRIES:r})}),o=i.prototype,a=kc(t),s=function(l,u,d){var f,h,p=a(l),m=c(l,u);return m?m.value=d:(p.last=m={index:h=_0(u,!0),key:u,value:d,previous:f=p.last,next:void 0,removed:!1},p.first||(p.first=m),f&&(f.next=m),Ee?p.size++:l.size++,h!=="F"&&(p.index[h]=m)),l},c=function(l,u){var d,f=a(l),h=_0(u);if(h!=="F")return f.index[h];for(d=f.first;d;d=d.next)if(d.key==u)return d};return $0(o,{clear:function(){for(var l=a(this),u=l.index,d=l.first;d;)d.removed=!0,d.previous&&(d.previous=d.previous.next=void 0),delete u[d.index],d=d.next;l.first=l.last=void 0,Ee?l.size=0:this.size=0},delete:function(l){var u=this,d=a(u),f=c(u,l);if(f){var h=f.next,p=f.previous;delete d.index[f.index],f.removed=!0,p&&(p.next=h),h&&(h.previous=p),d.first==f&&(d.first=h),d.last==f&&(d.last=p),Ee?d.size--:u.size--}return!!f},forEach:function(l){for(var u,d=a(this),f=zl(l,arguments.length>1?arguments[1]:void 0);u=u?u.next:d.first;)for(f(u.value,u.key,this);u&&u.removed;)u=u.previous},has:function(l){return!!c(this,l)}}),$0(o,r?{get:function(l){var u=c(this,l);return u&&u.value},set:function(l,u){return s(this,l===0?0:l,u)}}:{add:function(l){return s(this,l=l===0?0:l,l)}}),Ee&&P3(o,"size",{get:function(){return a(this).size}}),i},setStrong:function(e,t,r){var n=t+" Iterator",i=kc(t),o=kc(n);yh(e,t,function(a,s){x0(this,{type:n,target:a,state:i(a),kind:s,last:void 0})},function(){for(var a=o(this),s=a.kind,c=a.last;c&&c.removed;)c=c.previous;return a.target&&(a.last=c=c?c.next:a.state.first)?$i(s=="keys"?c.key:s=="values"?c.value:[c.key,c.value],!1):(a.target=void 0,$i(void 0,!0))},r?"entries":"values",!r,!0),function(a){var s=cr(a),c=$t.f;Ee&&s&&!s[w0]&&c(s,w0,{configurable:!0,get:function(){return this}})}(t)}};function Mb(e){var t=this.constructor;return this.then(function(r){return t.resolve(e()).then(function(){return r})},function(r){return t.resolve(e()).then(function(){return t.reject(r)})})}function jb(e){return new this(function(t,r){if(!e||e.length===void 0)return r(new TypeError(typeof e+" "+e+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var n=Array.prototype.slice.call(e);if(n.length===0)return t([]);var i=n.length;function o(s,c){if(c&&(typeof c=="object"||typeof c=="function")){var l=c.then;if(typeof l=="function")return void l.call(c,function(u){o(s,u)},function(u){n[s]={status:"rejected",reason:u},--i==0&&t(n)})}n[s]={status:"fulfilled",value:c},--i==0&&t(n)}for(var a=0;a<n.length;a++)o(a,n[a])})}(function(e,t,r){var n=e.indexOf("Map")!==-1,i=e.indexOf("Weak")!==-1,o=n?"set":"add",a=le[e],s=a&&a.prototype,c=a,l={},u=function(v){var y=fe(s[v]);Ot(s,v,v=="add"?function(b){return y(this,b===0?0:b),this}:v=="delete"?function(b){return!(i&&!Le(b))&&y(this,b===0?0:b)}:v=="get"?function(b){return i&&!Le(b)?void 0:y(this,b===0?0:b)}:v=="has"?function(b){return!(i&&!Le(b))&&y(this,b===0?0:b)}:function(b,g){return y(this,b===0?0:b,g),this})};if(Au(e,!Te(a)||!(i||s.forEach&&!Ae(function(){new a().entries().next()}))))c=r.getConstructor(t,e,n,o),ii.enable();else if(Au(e,!0)){var d=new c,f=d[o](i?{}:-0,1)!=d,h=Ae(function(){d.has(1)}),p=Ib(function(v){new a(v)}),m=!i&&Ae(function(){for(var v=new a,y=5;y--;)v[o](y,y);return!v.has(-0)});p||((c=t(function(v,y){Lb(v,s);var b=function(g,_,k){var E,x;return $r&&Te(E=_.constructor)&&E!==k&&Le(x=E.prototype)&&x!==k.prototype&&$r(g,x),g}(new a,v,c);return Ai(y)||Fb(y,b[o],{that:b,AS_ENTRIES:n}),b})).prototype=s,s.constructor=c),(h||m)&&(u("delete"),u("has"),n&&u("get")),(m||f)&&u(o),i&&s.clear&&delete s.clear}l[e]=c,dt({global:!0,constructor:!0,forced:c!=a},l),en(c,e),i||r.setStrong(c,e,n)})("Set",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},T3),xo.Set;var N3=setTimeout;function S0(e){return Boolean(e&&e.length!==void 0)}function I3(){}function Ve(e){if(!(this instanceof Ve))throw new TypeError("Promises must be constructed via new");if(typeof e!="function")throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],Ub(e,this)}function zb(e,t){for(;e._state===3;)e=e._value;e._state!==0?(e._handled=!0,Ve._immediateFn(function(){var r=e._state===1?t.onFulfilled:t.onRejected;if(r!==null){var n;try{n=r(e._value)}catch(i){return void So(t.promise,i)}Wu(t.promise,n)}else(e._state===1?Wu:So)(t.promise,e._value)})):e._deferreds.push(t)}function Wu(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&(typeof t=="object"||typeof t=="function")){var r=t.then;if(t instanceof Ve)return e._state=3,e._value=t,void qu(e);if(typeof r=="function")return void Ub((n=r,i=t,function(){n.apply(i,arguments)}),e)}e._state=1,e._value=t,qu(e)}catch(o){So(e,o)}var n,i}function So(e,t){e._state=2,e._value=t,qu(e)}function qu(e){e._state===2&&e._deferreds.length===0&&Ve._immediateFn(function(){e._handled||Ve._unhandledRejectionFn(e._value)});for(var t=0,r=e._deferreds.length;t<r;t++)zb(e,e._deferreds[t]);e._deferreds=null}function A3(e,t,r){this.onFulfilled=typeof e=="function"?e:null,this.onRejected=typeof t=="function"?t:null,this.promise=r}function Ub(e,t){var r=!1;try{e(function(n){r||(r=!0,Wu(t,n))},function(n){r||(r=!0,So(t,n))})}catch(n){if(r)return;r=!0,So(t,n)}}Ve.prototype.catch=function(e){return this.then(null,e)},Ve.prototype.then=function(e,t){var r=new this.constructor(I3);return zb(this,new A3(e,t,r)),r},Ve.prototype.finally=Mb,Ve.all=function(e){return new Ve(function(t,r){if(!S0(e))return r(new TypeError("Promise.all accepts an array"));var n=Array.prototype.slice.call(e);if(n.length===0)return t([]);var i=n.length;function o(s,c){try{if(c&&(typeof c=="object"||typeof c=="function")){var l=c.then;if(typeof l=="function")return void l.call(c,function(u){o(s,u)},r)}n[s]=c,--i==0&&t(n)}catch(u){r(u)}}for(var a=0;a<n.length;a++)o(a,n[a])})},Ve.allSettled=jb,Ve.resolve=function(e){return e&&typeof e=="object"&&e.constructor===Ve?e:new Ve(function(t){t(e)})},Ve.reject=function(e){return new Ve(function(t,r){r(e)})},Ve.race=function(e){return new Ve(function(t,r){if(!S0(e))return r(new TypeError("Promise.race accepts an array"));for(var n=0,i=e.length;n<i;n++)Ve.resolve(e[n]).then(t,r)})},Ve._immediateFn=typeof setImmediate=="function"&&function(e){setImmediate(e)}||function(e){N3(e,0)},Ve._unhandledRejectionFn=function(e){typeof console<"u"&&console&&console.warn("Possible Unhandled Promise Rejection:",e)};var Hn=function(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}();typeof Hn.Promise!="function"?Hn.Promise=Ve:(Hn.Promise.prototype.finally||(Hn.Promise.prototype.finally=Mb),Hn.Promise.allSettled||(Hn.Promise.allSettled=jb)),function(e){function t(h){for(var p=0,m=Math.min(65536,h.length+1),v=new Uint16Array(m),y=[],b=0;;){var g=p<h.length;if(!g||b>=m-1){var _=v.subarray(0,b);if(y.push(String.fromCharCode.apply(null,_)),!g)return y.join("");h=h.subarray(p),p=0,b=0}var k=h[p++];if((128&k)==0)v[b++]=k;else if((224&k)==192){var E=63&h[p++];v[b++]=(31&k)<<6|E}else if((240&k)==224){E=63&h[p++];var x=63&h[p++];v[b++]=(31&k)<<12|E<<6|x}else if((248&k)==240){var T=(7&k)<<18|(E=63&h[p++])<<12|(x=63&h[p++])<<6|63&h[p++];T>65535&&(T-=65536,v[b++]=T>>>10&1023|55296,T=56320|1023&T),v[b++]=T}}}var r="Failed to ",n=function(h,p,m){if(h)throw new Error("".concat(r).concat(p,": the '").concat(m,"' option is unsupported."))},i=typeof Buffer=="function"&&Buffer.from,o=i?function(h){return Buffer.from(h)}:function(h){for(var p=0,m=h.length,v=0,y=Math.max(32,m+(m>>>1)+7),b=new Uint8Array(y>>>3<<3);p<m;){var g=h.charCodeAt(p++);if(g>=55296&&g<=56319){if(p<m){var _=h.charCodeAt(p);(64512&_)==56320&&(++p,g=((1023&g)<<10)+(1023&_)+65536)}if(g>=55296&&g<=56319)continue}if(v+4>b.length){y+=8,y=(y*=1+p/h.length*2)>>>3<<3;var k=new Uint8Array(y);k.set(b),b=k}if((4294967168&g)!=0){if((4294965248&g)==0)b[v++]=g>>>6&31|192;else if((4294901760&g)==0)b[v++]=g>>>12&15|224,b[v++]=g>>>6&63|128;else{if((4292870144&g)!=0)continue;b[v++]=g>>>18&7|240,b[v++]=g>>>12&63|128,b[v++]=g>>>6&63|128}b[v++]=63&g|128}else b[v++]=g}return b.slice?b.slice(0,v):b.subarray(0,v)};function a(){this.encoding="utf-8"}a.prototype.encode=function(h,p){return n(p&&p.stream,"encode","stream"),o(h)};var s=!i&&typeof Blob=="function"&&typeof URL=="function"&&typeof URL.createObjectURL=="function",c=["utf-8","utf8","unicode-1-1-utf-8"],l=t;i?l=function(h,p){return(h instanceof Buffer?h:Buffer.from(h.buffer,h.byteOffset,h.byteLength)).toString(p)}:s&&(l=function(h){try{return function(p){var m;try{var v=new Blob([p],{type:"text/plain;charset=UTF-8"});m=URL.createObjectURL(v);var y=new XMLHttpRequest;return y.open("GET",m,!1),y.send(),y.responseText}finally{m&&URL.revokeObjectURL(m)}}(h)}catch{return t(h)}});var u="construct 'TextDecoder'",d="".concat(r," ").concat(u,": the ");function f(h,p){if(n(p&&p.fatal,u,"fatal"),h=h||"utf-8",!(i?Buffer.isEncoding(h):c.indexOf(h.toLowerCase())!==-1))throw new RangeError("".concat(d," encoding label provided ('").concat(h,"') is invalid."));this.encoding=h,this.fatal=!1,this.ignoreBOM=!1}f.prototype.decode=function(h,p){var m;return n(p&&p.stream,"decode","stream"),m=h instanceof Uint8Array?h:h.buffer instanceof ArrayBuffer?new Uint8Array(h.buffer):new Uint8Array(h),l(m,this.encoding)},e.TextEncoder=e.TextEncoder||a,e.TextDecoder=e.TextDecoder||f}(typeof window<"u"?window:vr),function(){function e(v,y){if(!(v instanceof y))throw new TypeError("Cannot call a class as a function")}function t(v,y){for(var b=0;b<y.length;b++){var g=y[b];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(v,g.key,g)}}function r(v,y,b){return y&&t(v.prototype,y),b&&t(v,b),v}function n(v,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");v.prototype=Object.create(y&&y.prototype,{constructor:{value:v,writable:!0,configurable:!0}}),y&&o(v,y)}function i(v){return i=Object.setPrototypeOf?Object.getPrototypeOf:function(y){return y.__proto__||Object.getPrototypeOf(y)},i(v)}function o(v,y){return o=Object.setPrototypeOf||function(b,g){return b.__proto__=g,b},o(v,y)}function a(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function s(v){if(v===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v}function c(v,y){return!y||typeof y!="object"&&typeof y!="function"?s(v):y}function l(v){var y=a();return function(){var b,g=i(v);if(y){var _=i(this).constructor;b=Reflect.construct(g,arguments,_)}else b=g.apply(this,arguments);return c(this,b)}}function u(v,y){for(;!Object.prototype.hasOwnProperty.call(v,y)&&(v=i(v))!==null;);return v}function d(v,y,b){return d=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(g,_,k){var E=u(g,_);if(E){var x=Object.getOwnPropertyDescriptor(E,_);return x.get?x.get.call(k):x.value}},d(v,y,b||v)}var f=function(){function v(){e(this,v),Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}return r(v,[{key:"addEventListener",value:function(y,b,g){y in this.listeners||(this.listeners[y]=[]),this.listeners[y].push({callback:b,options:g})}},{key:"removeEventListener",value:function(y,b){if(y in this.listeners){for(var g=this.listeners[y],_=0,k=g.length;_<k;_++)if(g[_].callback===b)return void g.splice(_,1)}}},{key:"dispatchEvent",value:function(y){if(y.type in this.listeners){for(var b=this.listeners[y.type].slice(),g=0,_=b.length;g<_;g++){var k=b[g];try{k.callback.call(this,y)}catch(E){Promise.resolve().then(function(){throw E})}k.options&&k.options.once&&this.removeEventListener(y.type,k.callback)}return!y.defaultPrevented}}}]),v}(),h=function(v){n(b,v);var y=l(b);function b(){var g;return e(this,b),(g=y.call(this)).listeners||f.call(s(g)),Object.defineProperty(s(g),"aborted",{value:!1,writable:!0,configurable:!0}),Object.defineProperty(s(g),"onabort",{value:null,writable:!0,configurable:!0}),g}return r(b,[{key:"toString",value:function(){return"[object AbortSignal]"}},{key:"dispatchEvent",value:function(g){g.type==="abort"&&(this.aborted=!0,typeof this.onabort=="function"&&this.onabort.call(this,g)),d(i(b.prototype),"dispatchEvent",this).call(this,g)}}]),b}(f),p=function(){function v(){e(this,v),Object.defineProperty(this,"signal",{value:new h,writable:!0,configurable:!0})}return r(v,[{key:"abort",value:function(){var y;try{y=new Event("abort")}catch{typeof document<"u"?document.createEvent?(y=document.createEvent("Event")).initEvent("abort",!1,!1):(y=document.createEventObject()).type="abort":y={type:"abort",bubbles:!1,cancelable:!1}}this.signal.dispatchEvent(y)}},{key:"toString",value:function(){return"[object AbortController]"}}]),v}();function m(v){return v.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL?(console.log("__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill"),!0):typeof v.Request=="function"&&!v.Request.prototype.hasOwnProperty("signal")||!v.AbortController}typeof Symbol<"u"&&Symbol.toStringTag&&(p.prototype[Symbol.toStringTag]="AbortController",h.prototype[Symbol.toStringTag]="AbortSignal"),function(v){m(v)&&(v.AbortController=p,v.AbortSignal=h)}(typeof self<"u"?self:vr)}();var _n=Ii(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function n(){var i=this;this.locked=new Map,this.addToLocked=function(o,a){var s=i.locked.get(o);s===void 0?a===void 0?i.locked.set(o,[]):i.locked.set(o,[a]):a!==void 0&&(s.unshift(a),i.locked.set(o,s))},this.isLocked=function(o){return i.locked.has(o)},this.lock=function(o){return new Promise(function(a,s){i.isLocked(o)?i.addToLocked(o,a):(i.addToLocked(o),a())})},this.unlock=function(o){var a=i.locked.get(o);if(a!==void 0&&a.length!==0){var s=a.pop();i.locked.set(o,a),s!==void 0&&setTimeout(s,0)}else i.locked.delete(o)}}return n.getInstance=function(){return n.instance===void 0&&(n.instance=new n),n.instance},n}();t.default=function(){return r.getInstance()}});rh(_n);var D3=Ii(function(e,t){var r=vr&&vr.__awaiter||function(c,l,u,d){return new(u||(u=Promise))(function(f,h){function p(y){try{v(d.next(y))}catch(b){h(b)}}function m(y){try{v(d.throw(y))}catch(b){h(b)}}function v(y){y.done?f(y.value):new u(function(b){b(y.value)}).then(p,m)}v((d=d.apply(c,l||[])).next())})},n=vr&&vr.__generator||function(c,l){var u,d,f,h,p={label:0,sent:function(){if(1&f[0])throw f[1];return f[1]},trys:[],ops:[]};return h={next:m(0),throw:m(1),return:m(2)},typeof Symbol=="function"&&(h[Symbol.iterator]=function(){return this}),h;function m(v){return function(y){return function(b){if(u)throw new TypeError("Generator is already executing.");for(;p;)try{if(u=1,d&&(f=2&b[0]?d.return:b[0]?d.throw||((f=d.return)&&f.call(d),0):d.next)&&!(f=f.call(d,b[1])).done)return f;switch(d=0,f&&(b=[2&b[0],f.value]),b[0]){case 0:case 1:f=b;break;case 4:return p.label++,{value:b[1],done:!1};case 5:p.label++,d=b[1],b=[0];continue;case 7:b=p.ops.pop(),p.trys.pop();continue;default:if(f=p.trys,!((f=f.length>0&&f[f.length-1])||b[0]!==6&&b[0]!==2)){p=0;continue}if(b[0]===3&&(!f||b[1]>f[0]&&b[1]<f[3])){p.label=b[1];break}if(b[0]===6&&p.label<f[1]){p.label=f[1],f=b;break}if(f&&p.label<f[2]){p.label=f[2],p.ops.push(b);break}f[2]&&p.ops.pop(),p.trys.pop();continue}b=l.call(c,p)}catch(g){b=[6,g],d=0}finally{u=f=0}if(5&b[0])throw b[1];return{value:b[0]?b[1]:void 0,done:!0}}([v,y])}}};Object.defineProperty(t,"__esModule",{value:!0});var i="browser-tabs-lock-key";function o(c){return new Promise(function(l){return setTimeout(l,c)})}function a(c){for(var l="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz",u="",d=0;d<c;d++)u+=l[Math.floor(Math.random()*l.length)];return u}var s=function(){function c(){this.acquiredIatSet=new Set,this.id=Date.now().toString()+a(15),this.acquireLock=this.acquireLock.bind(this),this.releaseLock=this.releaseLock.bind(this),this.releaseLock__private__=this.releaseLock__private__.bind(this),this.waitForSomethingToChange=this.waitForSomethingToChange.bind(this),this.refreshLockWhileAcquired=this.refreshLockWhileAcquired.bind(this),c.waiters===void 0&&(c.waiters=[])}return c.prototype.acquireLock=function(l,u){return u===void 0&&(u=5e3),r(this,void 0,void 0,function(){var d,f,h,p,m,v;return n(this,function(y){switch(y.label){case 0:d=Date.now()+a(4),f=Date.now()+u,h=i+"-"+l,p=window.localStorage,y.label=1;case 1:return Date.now()<f?[4,o(30)]:[3,8];case 2:return y.sent(),p.getItem(h)!==null?[3,5]:(m=this.id+"-"+l+"-"+d,[4,o(Math.floor(25*Math.random()))]);case 3:return y.sent(),p.setItem(h,JSON.stringify({id:this.id,iat:d,timeoutKey:m,timeAcquired:Date.now(),timeRefreshed:Date.now()})),[4,o(30)];case 4:return y.sent(),(v=p.getItem(h))!==null&&(v=JSON.parse(v)).id===this.id&&v.iat===d?(this.acquiredIatSet.add(d),this.refreshLockWhileAcquired(h,d),[2,!0]):[3,7];case 5:return c.lockCorrector(),[4,this.waitForSomethingToChange(f)];case 6:y.sent(),y.label=7;case 7:return d=Date.now()+a(4),[3,1];case 8:return[2,!1]}})})},c.prototype.refreshLockWhileAcquired=function(l,u){return r(this,void 0,void 0,function(){var d=this;return n(this,function(f){return setTimeout(function(){return r(d,void 0,void 0,function(){var h,p;return n(this,function(m){switch(m.label){case 0:return[4,_n.default().lock(u)];case 1:return m.sent(),this.acquiredIatSet.has(u)?(h=window.localStorage,(p=h.getItem(l))===null?(_n.default().unlock(u),[2]):((p=JSON.parse(p)).timeRefreshed=Date.now(),h.setItem(l,JSON.stringify(p)),_n.default().unlock(u),this.refreshLockWhileAcquired(l,u),[2])):(_n.default().unlock(u),[2])}})})},1e3),[2]})})},c.prototype.waitForSomethingToChange=function(l){return r(this,void 0,void 0,function(){return n(this,function(u){switch(u.label){case 0:return[4,new Promise(function(d){var f=!1,h=Date.now(),p=!1;function m(){if(p||(window.removeEventListener("storage",m),c.removeFromWaiting(m),clearTimeout(v),p=!0),!f){f=!0;var y=50-(Date.now()-h);y>0?setTimeout(d,y):d()}}window.addEventListener("storage",m),c.addToWaiting(m);var v=setTimeout(m,Math.max(0,l-Date.now()))})];case 1:return u.sent(),[2]}})})},c.addToWaiting=function(l){this.removeFromWaiting(l),c.waiters!==void 0&&c.waiters.push(l)},c.removeFromWaiting=function(l){c.waiters!==void 0&&(c.waiters=c.waiters.filter(function(u){return u!==l}))},c.notifyWaiters=function(){c.waiters!==void 0&&c.waiters.slice().forEach(function(l){return l()})},c.prototype.releaseLock=function(l){return r(this,void 0,void 0,function(){return n(this,function(u){switch(u.label){case 0:return[4,this.releaseLock__private__(l)];case 1:return[2,u.sent()]}})})},c.prototype.releaseLock__private__=function(l){return r(this,void 0,void 0,function(){var u,d,f;return n(this,function(h){switch(h.label){case 0:return u=window.localStorage,d=i+"-"+l,(f=u.getItem(d))===null?[2]:(f=JSON.parse(f)).id!==this.id?[3,2]:[4,_n.default().lock(f.iat)];case 1:h.sent(),this.acquiredIatSet.delete(f.iat),u.removeItem(d),_n.default().unlock(f.iat),c.notifyWaiters(),h.label=2;case 2:return[2]}})})},c.lockCorrector=function(){for(var l=Date.now()-5e3,u=window.localStorage,d=Object.keys(u),f=!1,h=0;h<d.length;h++){var p=d[h];if(p.includes(i)){var m=u.getItem(p);m!==null&&((m=JSON.parse(m)).timeRefreshed===void 0&&m.timeAcquired<l||m.timeRefreshed!==void 0&&m.timeRefreshed<l)&&(u.removeItem(p),f=!0)}}f&&c.notifyWaiters()},c.waiters=void 0,c}();t.default=s}),R3=rh(D3),F3={timeoutInSeconds:60},L3=["login_required","consent_required","interaction_required","account_selection_required","access_denied"],Vb={name:"auth0-spa-js",version:"1.22.6"},Bb=function(){return Date.now()},Lr=function(e){function t(r,n){var i=e.call(this,n)||this;return i.error=r,i.error_description=n,Object.setPrototypeOf(i,t.prototype),i}return zn(t,e),t.fromPayload=function(r){return new t(r.error,r.error_description)},t}(Error),M3=function(e){function t(r,n,i,o){o===void 0&&(o=null);var a=e.call(this,r,n)||this;return a.state=i,a.appState=o,Object.setPrototypeOf(a,t.prototype),a}return zn(t,e),t}(Lr),Hu=function(e){function t(){var r=e.call(this,"timeout","Timeout")||this;return Object.setPrototypeOf(r,t.prototype),r}return zn(t,e),t}(Lr),j3=function(e){function t(r){var n=e.call(this)||this;return n.popup=r,Object.setPrototypeOf(n,t.prototype),n}return zn(t,e),t}(Hu),z3=function(e){function t(r){var n=e.call(this,"cancelled","Popup closed")||this;return n.popup=r,Object.setPrototypeOf(n,t.prototype),n}return zn(t,e),t}(Lr),U3=function(e){function t(r,n,i){var o=e.call(this,r,n)||this;return o.mfa_token=i,Object.setPrototypeOf(o,t.prototype),o}return zn(t,e),t}(Lr),V3=function(e){function t(r,n){var i=e.call(this,"missing_refresh_token","Missing Refresh Token (audience: '".concat(E0(r,["default"]),"', scope: '").concat(E0(n),"')"))||this;return i.audience=r,i.scope=n,Object.setPrototypeOf(i,t.prototype),i}return zn(t,e),t}(Lr),B3=function(e){return new Promise(function(t,r){var n,i=setInterval(function(){e.popup&&e.popup.closed&&(clearInterval(i),clearTimeout(o),window.removeEventListener("message",n,!1),r(new z3(e.popup)))},1e3),o=setTimeout(function(){clearInterval(i),r(new j3(e.popup)),window.removeEventListener("message",n,!1)},1e3*(e.timeoutInSeconds||60));n=function(a){if(a.data&&a.data.type==="authorization_response"){if(clearTimeout(o),clearInterval(i),window.removeEventListener("message",n,!1),e.popup.close(),a.data.response.error)return r(Lr.fromPayload(a.data.response));t(a.data.response)}},window.addEventListener("message",n)})},$h=function(){return window.crypto||window.msCrypto},Wb=function(){var e=$h();return e.subtle||e.webkitSubtle},Or=function(){var e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_~.",t="";return Array.from($h().getRandomValues(new Uint8Array(43))).forEach(function(r){return t+=e[r%e.length]}),t},Gn=function(e){return btoa(e)},Gu=function(e){return Object.keys(e).filter(function(t){return e[t]!==void 0}).map(function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])}).join("&")},Ec=function(e){return ve(void 0,void 0,void 0,function(){var t;return ye(this,function(r){switch(r.label){case 0:return t=Wb().digest({name:"SHA-256"},new TextEncoder().encode(e)),window.msCrypto?[2,new Promise(function(n,i){t.oncomplete=function(o){n(o.target.result)},t.onerror=function(o){i(o.error)},t.onabort=function(){i("The digest operation was aborted")}})]:[4,t];case 1:return[2,r.sent()]}})})},k0=function(e){return function(t){return decodeURIComponent(atob(t).split("").map(function(r){return"%"+("00"+r.charCodeAt(0).toString(16)).slice(-2)}).join(""))}(e.replace(/_/g,"/").replace(/-/g,"+"))},Oc=function(e){var t=new Uint8Array(e);return function(r){var n={"+":"-","/":"_","=":""};return r.replace(/[+/=]/g,function(i){return n[i]})}(window.btoa(String.fromCharCode.apply(String,Cu([],vi(Array.from(t)),!1))))};function E0(e,t){return t===void 0&&(t=[]),e&&!t.includes(e)?e:""}var W3=function(e,t){return ve(void 0,void 0,void 0,function(){var r,n;return ye(this,function(i){switch(i.label){case 0:return[4,(o=e,a=t,a=a||{},new Promise(function(s,c){var l=new XMLHttpRequest,u=[],d=[],f={},h=function(){return{ok:(l.status/100|0)==2,statusText:l.statusText,status:l.status,url:l.responseURL,text:function(){return Promise.resolve(l.responseText)},json:function(){return Promise.resolve(l.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([l.response]))},clone:h,headers:{keys:function(){return u},entries:function(){return d},get:function(m){return f[m.toLowerCase()]},has:function(m){return m.toLowerCase()in f}}}};for(var p in l.open(a.method||"get",o,!0),l.onload=function(){l.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(m,v,y){u.push(v=v.toLowerCase()),d.push([v,y]),f[v]=f[v]?f[v]+","+y:y}),s(h())},l.onerror=c,l.withCredentials=a.credentials=="include",a.headers)l.setRequestHeader(p,a.headers[p]);l.send(a.body||null)}))];case 1:return r=i.sent(),n={ok:r.ok},[4,r.json()];case 2:return[2,(n.json=i.sent(),n)]}var o,a})})},q3=function(e,t,r){return ve(void 0,void 0,void 0,function(){var n,i;return ye(this,function(o){return n=new AbortController,t.signal=n.signal,[2,Promise.race([W3(e,t),new Promise(function(a,s){i=setTimeout(function(){n.abort(),s(new Error("Timeout when executing 'fetch'"))},r)})]).finally(function(){clearTimeout(i)})]})})},H3=function(e,t,r,n,i,o,a){return ve(void 0,void 0,void 0,function(){return ye(this,function(s){return[2,(c={auth:{audience:t,scope:r},timeout:i,fetchUrl:e,fetchOptions:n,useFormData:a},l=o,new Promise(function(u,d){var f=new MessageChannel;f.port1.onmessage=function(h){h.data.error?d(new Error(h.data.error)):u(h.data),f.port1.close()},l.postMessage(c,[f.port2])}))];var c,l})})},G3=function(e,t,r,n,i,o,a){return a===void 0&&(a=1e4),ve(void 0,void 0,void 0,function(){return ye(this,function(s){return i?[2,H3(e,t,r,n,a,i,o)]:[2,q3(e,n,a)]})})};function Q3(e,t,r,n,i,o,a){return ve(this,void 0,void 0,function(){var s,c,l,u,d,f,h,p,m;return ye(this,function(v){switch(v.label){case 0:s=null,l=0,v.label=1;case 1:if(!(l<3))return[3,6];v.label=2;case 2:return v.trys.push([2,4,,5]),[4,G3(e,r,n,i,o,a,t)];case 3:return c=v.sent(),s=null,[3,6];case 4:return u=v.sent(),s=u,[3,5];case 5:return l++,[3,1];case 6:if(s)throw s.message=s.message||"Failed to fetch",s;if(d=c.json,f=d.error,h=d.error_description,p=At(d,["error","error_description"]),!c.ok)throw m=h||"HTTP error. Unable to fetch ".concat(e),f==="mfa_required"?new U3(f,m,p.mfa_token):new Lr(f||"request_error",m);return[2,p]}})})}function ia(e,t){var r=e.baseUrl,n=e.timeout,i=e.audience,o=e.scope,a=e.auth0Client,s=e.useFormData,c=At(e,["baseUrl","timeout","audience","scope","auth0Client","useFormData"]);return ve(this,void 0,void 0,function(){var l;return ye(this,function(u){switch(u.label){case 0:return l=s?Gu(c):JSON.stringify(c),[4,Q3("".concat(r,"/oauth/token"),n,i||"default",o,{method:"POST",body:l,headers:{"Content-Type":s?"application/x-www-form-urlencoded":"application/json","Auth0-Client":btoa(JSON.stringify(a||Vb))}},t,s)];case 1:return[2,u.sent()]}})})}var K3=function(e){return Array.from(new Set(e))},qr=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return K3(e.join(" ").trim().split(/\s+/)).join(" ")},En=function(){function e(t,r){r===void 0&&(r="@@auth0spajs@@"),this.prefix=r,this.client_id=t.client_id,this.scope=t.scope,this.audience=t.audience}return e.prototype.toKey=function(){return"".concat(this.prefix,"::").concat(this.client_id,"::").concat(this.audience,"::").concat(this.scope)},e.fromKey=function(t){var r=vi(t.split("::"),4),n=r[0],i=r[1],o=r[2];return new e({client_id:i,scope:r[3],audience:o},n)},e.fromCacheEntry=function(t){return new e({scope:t.scope,audience:t.audience,client_id:t.client_id})},e}(),Y3=function(){function e(){}return e.prototype.set=function(t,r){localStorage.setItem(t,JSON.stringify(r))},e.prototype.get=function(t){var r=window.localStorage.getItem(t);if(r)try{return JSON.parse(r)}catch{return}},e.prototype.remove=function(t){localStorage.removeItem(t)},e.prototype.allKeys=function(){return Object.keys(window.localStorage).filter(function(t){return t.startsWith("@@auth0spajs@@")})},e}(),X3=function(){var e;this.enclosedCache=(e={},{set:function(t,r){e[t]=r},get:function(t){var r=e[t];if(r)return r},remove:function(t){delete e[t]},allKeys:function(){return Object.keys(e)}})},Z3=function(){function e(t,r,n){this.cache=t,this.keyManifest=r,this.nowProvider=n,this.nowProvider=this.nowProvider||Bb}return e.prototype.get=function(t,r){var n;return r===void 0&&(r=0),ve(this,void 0,void 0,function(){var i,o,a,s,c;return ye(this,function(l){switch(l.label){case 0:return[4,this.cache.get(t.toKey())];case 1:return(i=l.sent())?[3,4]:[4,this.getCacheKeys()];case 2:return(o=l.sent())?(a=this.matchExistingCacheKey(t,o))?[4,this.cache.get(a)]:[3,4]:[2];case 3:i=l.sent(),l.label=4;case 4:return i?[4,this.nowProvider()]:[2];case 5:return s=l.sent(),c=Math.floor(s/1e3),i.expiresAt-r<c?i.body.refresh_token?(i.body={refresh_token:i.body.refresh_token},[4,this.cache.set(t.toKey(),i)]):[3,7]:[3,10];case 6:return l.sent(),[2,i.body];case 7:return[4,this.cache.remove(t.toKey())];case 8:return l.sent(),[4,(n=this.keyManifest)===null||n===void 0?void 0:n.remove(t.toKey())];case 9:return l.sent(),[2];case 10:return[2,i.body]}})})},e.prototype.set=function(t){var r;return ve(this,void 0,void 0,function(){var n,i;return ye(this,function(o){switch(o.label){case 0:return n=new En({client_id:t.client_id,scope:t.scope,audience:t.audience}),[4,this.wrapCacheEntry(t)];case 1:return i=o.sent(),[4,this.cache.set(n.toKey(),i)];case 2:return o.sent(),[4,(r=this.keyManifest)===null||r===void 0?void 0:r.add(n.toKey())];case 3:return o.sent(),[2]}})})},e.prototype.clear=function(t){var r;return ve(this,void 0,void 0,function(){var n,i=this;return ye(this,function(o){switch(o.label){case 0:return[4,this.getCacheKeys()];case 1:return(n=o.sent())?[4,n.filter(function(a){return!t||a.includes(t)}).reduce(function(a,s){return ve(i,void 0,void 0,function(){return ye(this,function(c){switch(c.label){case 0:return[4,a];case 1:return c.sent(),[4,this.cache.remove(s)];case 2:return c.sent(),[2]}})})},Promise.resolve())]:[2];case 2:return o.sent(),[4,(r=this.keyManifest)===null||r===void 0?void 0:r.clear()];case 3:return o.sent(),[2]}})})},e.prototype.clearSync=function(t){var r=this,n=this.cache.allKeys();n&&n.filter(function(i){return!t||i.includes(t)}).forEach(function(i){r.cache.remove(i)})},e.prototype.wrapCacheEntry=function(t){return ve(this,void 0,void 0,function(){var r,n,i;return ye(this,function(o){switch(o.label){case 0:return[4,this.nowProvider()];case 1:return r=o.sent(),n=Math.floor(r/1e3)+t.expires_in,i=Math.min(n,t.decodedToken.claims.exp),[2,{body:t,expiresAt:i}]}})})},e.prototype.getCacheKeys=function(){var t;return ve(this,void 0,void 0,function(){var r;return ye(this,function(n){switch(n.label){case 0:return this.keyManifest?[4,this.keyManifest.get()]:[3,2];case 1:return r=(t=n.sent())===null||t===void 0?void 0:t.keys,[3,4];case 2:return[4,this.cache.allKeys()];case 3:r=n.sent(),n.label=4;case 4:return[2,r]}})})},e.prototype.matchExistingCacheKey=function(t,r){return r.filter(function(n){var i=En.fromKey(n),o=new Set(i.scope&&i.scope.split(" ")),a=t.scope.split(" "),s=i.scope&&a.reduce(function(c,l){return c&&o.has(l)},!0);return i.prefix==="@@auth0spajs@@"&&i.client_id===t.client_id&&i.audience===t.audience&&s})[0]},e}(),J3=function(){function e(t,r){this.storage=t,this.clientId=r,this.storageKey="".concat("a0.spajs.txs",".").concat(this.clientId),this.transaction=this.storage.get(this.storageKey)}return e.prototype.create=function(t){this.transaction=t,this.storage.save(this.storageKey,t,{daysUntilExpire:1})},e.prototype.get=function(){return this.transaction},e.prototype.remove=function(){delete this.transaction,this.storage.remove(this.storageKey)},e}(),Ki=function(e){return typeof e=="number"},e4=["iss","aud","exp","nbf","iat","jti","azp","nonce","auth_time","at_hash","c_hash","acr","amr","sub_jwk","cnf","sip_from_tag","sip_date","sip_callid","sip_cseq_num","sip_via_branch","orig","dest","mky","events","toe","txn","rph","sid","vot","vtm"],t4=function(e){if(!e.id_token)throw new Error("ID token is required but missing");var t=function(s){var c=s.split("."),l=vi(c,3),u=l[0],d=l[1],f=l[2];if(c.length!==3||!u||!d||!f)throw new Error("ID token could not be decoded");var h=JSON.parse(k0(d)),p={__raw:s},m={};return Object.keys(h).forEach(function(v){p[v]=h[v],e4.includes(v)||(m[v]=h[v])}),{encoded:{header:u,payload:d,signature:f},header:JSON.parse(k0(u)),claims:p,user:m}}(e.id_token);if(!t.claims.iss)throw new Error("Issuer (iss) claim must be a string present in the ID token");if(t.claims.iss!==e.iss)throw new Error('Issuer (iss) claim mismatch in the ID token; expected "'.concat(e.iss,'", found "').concat(t.claims.iss,'"'));if(!t.user.sub)throw new Error("Subject (sub) claim must be a string present in the ID token");if(t.header.alg!=="RS256")throw new Error('Signature algorithm of "'.concat(t.header.alg,'" is not supported. Expected the ID token to be signed with "RS256".'));if(!t.claims.aud||typeof t.claims.aud!="string"&&!Array.isArray(t.claims.aud))throw new Error("Audience (aud) claim must be a string or array of strings present in the ID token");if(Array.isArray(t.claims.aud)){if(!t.claims.aud.includes(e.aud))throw new Error('Audience (aud) claim mismatch in the ID token; expected "'.concat(e.aud,'" but was not one of "').concat(t.claims.aud.join(", "),'"'));if(t.claims.aud.length>1){if(!t.claims.azp)throw new Error("Authorized Party (azp) claim must be a string present in the ID token when Audience (aud) claim has multiple values");if(t.claims.azp!==e.aud)throw new Error('Authorized Party (azp) claim mismatch in the ID token; expected "'.concat(e.aud,'", found "').concat(t.claims.azp,'"'))}}else if(t.claims.aud!==e.aud)throw new Error('Audience (aud) claim mismatch in the ID token; expected "'.concat(e.aud,'" but found "').concat(t.claims.aud,'"'));if(e.nonce){if(!t.claims.nonce)throw new Error("Nonce (nonce) claim must be a string present in the ID token");if(t.claims.nonce!==e.nonce)throw new Error('Nonce (nonce) claim mismatch in the ID token; expected "'.concat(e.nonce,'", found "').concat(t.claims.nonce,'"'))}if(e.max_age&&!Ki(t.claims.auth_time))throw new Error("Authentication Time (auth_time) claim must be a number present in the ID token when Max Age (max_age) is specified");if(!Ki(t.claims.exp))throw new Error("Expiration Time (exp) claim must be a number present in the ID token");if(!Ki(t.claims.iat))throw new Error("Issued At (iat) claim must be a number present in the ID token");var r=e.leeway||60,n=new Date(e.now||Date.now()),i=new Date(0),o=new Date(0),a=new Date(0);if(a.setUTCSeconds(parseInt(t.claims.auth_time)+e.max_age+r),i.setUTCSeconds(t.claims.exp+r),o.setUTCSeconds(t.claims.nbf-r),n>i)throw new Error("Expiration Time (exp) claim error in the ID token; current time (".concat(n,") is after expiration time (").concat(i,")"));if(Ki(t.claims.nbf)&&n<o)throw new Error("Not Before time (nbf) claim in the ID token indicates that this token can't be used just yet. Currrent time (".concat(n,") is before ").concat(o));if(Ki(t.claims.auth_time)&&n>a)throw new Error("Authentication Time (auth_time) claim in the ID token indicates that too much time has passed since the last end-user authentication. Currrent time (".concat(n,") is after last auth at ").concat(a));if(e.organizationId){if(!t.claims.org_id)throw new Error("Organization ID (org_id) claim must be a string present in the ID token");if(e.organizationId!==t.claims.org_id)throw new Error('Organization ID (org_id) claim mismatch in the ID token; expected "'.concat(e.organizationId,'", found "').concat(t.claims.org_id,'"'))}return t},On=Ii(function(e,t){var r=vr&&vr.__assign||function(){return r=Object.assign||function(c){for(var l,u=1,d=arguments.length;u<d;u++)for(var f in l=arguments[u])Object.prototype.hasOwnProperty.call(l,f)&&(c[f]=l[f]);return c},r.apply(this,arguments)};function n(c,l){if(!l)return"";var u="; "+c;return l===!0?u:u+"="+l}function i(c,l,u){return encodeURIComponent(c).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/\(/g,"%28").replace(/\)/g,"%29")+"="+encodeURIComponent(l).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent)+function(d){if(typeof d.expires=="number"){var f=new Date;f.setMilliseconds(f.getMilliseconds()+864e5*d.expires),d.expires=f}return n("Expires",d.expires?d.expires.toUTCString():"")+n("Domain",d.domain)+n("Path",d.path)+n("Secure",d.secure)+n("SameSite",d.sameSite)}(u)}function o(c){for(var l={},u=c?c.split("; "):[],d=/(%[\dA-F]{2})+/gi,f=0;f<u.length;f++){var h=u[f].split("="),p=h.slice(1).join("=");p.charAt(0)==='"'&&(p=p.slice(1,-1));try{l[h[0].replace(d,decodeURIComponent)]=p.replace(d,decodeURIComponent)}catch{}}return l}function a(){return o(document.cookie)}function s(c,l,u){document.cookie=i(c,l,r({path:"/"},u))}t.__esModule=!0,t.encode=i,t.parse=o,t.getAll=a,t.get=function(c){return a()[c]},t.set=s,t.remove=function(c,l){s(c,"",r(r({},l),{expires:-1}))}});rh(On),On.encode,On.parse,On.getAll;var r4=On.get,qb=On.set,Hb=On.remove,Jn={get:function(e){var t=r4(e);if(t!==void 0)return JSON.parse(t)},save:function(e,t,r){var n={};window.location.protocol==="https:"&&(n={secure:!0,sameSite:"none"}),r?.daysUntilExpire&&(n.expires=r.daysUntilExpire),r?.cookieDomain&&(n.domain=r.cookieDomain),qb(e,JSON.stringify(t),n)},remove:function(e,t){var r={};t?.cookieDomain&&(r.domain=t.cookieDomain),Hb(e,r)}},n4={get:function(e){var t=Jn.get(e);return t||Jn.get("".concat("_legacy_").concat(e))},save:function(e,t,r){var n={};window.location.protocol==="https:"&&(n={secure:!0}),r?.daysUntilExpire&&(n.expires=r.daysUntilExpire),qb("".concat("_legacy_").concat(e),JSON.stringify(t),n),Jn.save(e,t,r)},remove:function(e,t){var r={};t?.cookieDomain&&(r.domain=t.cookieDomain),Hb(e,r),Jn.remove(e,t),Jn.remove("".concat("_legacy_").concat(e),t)}},i4={get:function(e){if(typeof sessionStorage<"u"){var t=sessionStorage.getItem(e);if(t!==void 0)return JSON.parse(t)}},save:function(e,t){sessionStorage.setItem(e,JSON.stringify(t))},remove:function(e){sessionStorage.removeItem(e)}};function o4(e,t,r){var n=t===void 0?null:t,i=function(c,l){var u=atob(c);if(l){for(var d=new Uint8Array(u.length),f=0,h=u.length;f<h;++f)d[f]=u.charCodeAt(f);return String.fromCharCode.apply(null,new Uint16Array(d.buffer))}return u}(e,r!==void 0&&r),o=i.indexOf(`
2
+ `,10)+1,a=i.substring(o)+(n?"//# sourceMappingURL="+n:""),s=new Blob([a],{type:"application/javascript"});return URL.createObjectURL(s)}var O0,C0,P0,Cc,a4=(O0="Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwohZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7dmFyIHQ9ZnVuY3Rpb24oZSxyKXtyZXR1cm4gdD1PYmplY3Quc2V0UHJvdG90eXBlT2Z8fHtfX3Byb3RvX186W119aW5zdGFuY2VvZiBBcnJheSYmZnVuY3Rpb24odCxlKXt0Ll9fcHJvdG9fXz1lfXx8ZnVuY3Rpb24odCxlKXtmb3IodmFyIHIgaW4gZSlPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwoZSxyKSYmKHRbcl09ZVtyXSl9LHQoZSxyKX07ZnVuY3Rpb24gZShlLHIpe2lmKCJmdW5jdGlvbiIhPXR5cGVvZiByJiZudWxsIT09cil0aHJvdyBuZXcgVHlwZUVycm9yKCJDbGFzcyBleHRlbmRzIHZhbHVlICIrU3RyaW5nKHIpKyIgaXMgbm90IGEgY29uc3RydWN0b3Igb3IgbnVsbCIpO2Z1bmN0aW9uIG4oKXt0aGlzLmNvbnN0cnVjdG9yPWV9dChlLHIpLGUucHJvdG90eXBlPW51bGw9PT1yP09iamVjdC5jcmVhdGUocik6KG4ucHJvdG90eXBlPXIucHJvdG90eXBlLG5ldyBuKX12YXIgcj1mdW5jdGlvbigpe3JldHVybiByPU9iamVjdC5hc3NpZ258fGZ1bmN0aW9uKHQpe2Zvcih2YXIgZSxyPTEsbj1hcmd1bWVudHMubGVuZ3RoO3I8bjtyKyspZm9yKHZhciBvIGluIGU9YXJndW1lbnRzW3JdKU9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHkuY2FsbChlLG8pJiYodFtvXT1lW29dKTtyZXR1cm4gdH0sci5hcHBseSh0aGlzLGFyZ3VtZW50cyl9O2Z1bmN0aW9uIG4odCxlLHIsbil7cmV0dXJuIG5ldyhyfHwocj1Qcm9taXNlKSkoKGZ1bmN0aW9uKG8sYyl7ZnVuY3Rpb24gaSh0KXt0cnl7cyhuLm5leHQodCkpfWNhdGNoKHQpe2ModCl9fWZ1bmN0aW9uIGEodCl7dHJ5e3Mobi50aHJvdyh0KSl9Y2F0Y2godCl7Yyh0KX19ZnVuY3Rpb24gcyh0KXt2YXIgZTt0LmRvbmU/byh0LnZhbHVlKTooZT10LnZhbHVlLGUgaW5zdGFuY2VvZiByP2U6bmV3IHIoKGZ1bmN0aW9uKHQpe3QoZSl9KSkpLnRoZW4oaSxhKX1zKChuPW4uYXBwbHkodCxlfHxbXSkpLm5leHQoKSl9KSl9ZnVuY3Rpb24gbyh0LGUpe3ZhciByLG4sbyxjLGk9e2xhYmVsOjAsc2VudDpmdW5jdGlvbigpe2lmKDEmb1swXSl0aHJvdyBvWzFdO3JldHVybiBvWzFdfSx0cnlzOltdLG9wczpbXX07cmV0dXJuIGM9e25leHQ6YSgwKSx0aHJvdzphKDEpLHJldHVybjphKDIpfSwiZnVuY3Rpb24iPT10eXBlb2YgU3ltYm9sJiYoY1tTeW1ib2wuaXRlcmF0b3JdPWZ1bmN0aW9uKCl7cmV0dXJuIHRoaXN9KSxjO2Z1bmN0aW9uIGEoYyl7cmV0dXJuIGZ1bmN0aW9uKGEpe3JldHVybiBmdW5jdGlvbihjKXtpZihyKXRocm93IG5ldyBUeXBlRXJyb3IoIkdlbmVyYXRvciBpcyBhbHJlYWR5IGV4ZWN1dGluZy4iKTtmb3IoO2k7KXRyeXtpZihyPTEsbiYmKG89MiZjWzBdP24ucmV0dXJuOmNbMF0/bi50aHJvd3x8KChvPW4ucmV0dXJuKSYmby5jYWxsKG4pLDApOm4ubmV4dCkmJiEobz1vLmNhbGwobixjWzFdKSkuZG9uZSlyZXR1cm4gbztzd2l0Y2gobj0wLG8mJihjPVsyJmNbMF0sby52YWx1ZV0pLGNbMF0pe2Nhc2UgMDpjYXNlIDE6bz1jO2JyZWFrO2Nhc2UgNDpyZXR1cm4gaS5sYWJlbCsrLHt2YWx1ZTpjWzFdLGRvbmU6ITF9O2Nhc2UgNTppLmxhYmVsKyssbj1jWzFdLGM9WzBdO2NvbnRpbnVlO2Nhc2UgNzpjPWkub3BzLnBvcCgpLGkudHJ5cy5wb3AoKTtjb250aW51ZTtkZWZhdWx0OmlmKCEobz1pLnRyeXMsKG89by5sZW5ndGg+MCYmb1tvLmxlbmd0aC0xXSl8fDYhPT1jWzBdJiYyIT09Y1swXSkpe2k9MDtjb250aW51ZX1pZigzPT09Y1swXSYmKCFvfHxjWzFdPm9bMF0mJmNbMV08b1szXSkpe2kubGFiZWw9Y1sxXTticmVha31pZig2PT09Y1swXSYmaS5sYWJlbDxvWzFdKXtpLmxhYmVsPW9bMV0sbz1jO2JyZWFrfWlmKG8mJmkubGFiZWw8b1syXSl7aS5sYWJlbD1vWzJdLGkub3BzLnB1c2goYyk7YnJlYWt9b1syXSYmaS5vcHMucG9wKCksaS50cnlzLnBvcCgpO2NvbnRpbnVlfWM9ZS5jYWxsKHQsaSl9Y2F0Y2godCl7Yz1bNix0XSxuPTB9ZmluYWxseXtyPW89MH1pZig1JmNbMF0pdGhyb3cgY1sxXTtyZXR1cm57dmFsdWU6Y1swXT9jWzFdOnZvaWQgMCxkb25lOiEwfX0oW2MsYV0pfX19ZnVuY3Rpb24gYyh0LGUpe3JldHVybiB2b2lkIDA9PT1lJiYoZT1bXSksdCYmIWUuaW5jbHVkZXModCk/dDoiIn12YXIgaT1mdW5jdGlvbih0KXtmdW5jdGlvbiByKGUsbil7dmFyIG89dC5jYWxsKHRoaXMsbil8fHRoaXM7cmV0dXJuIG8uZXJyb3I9ZSxvLmVycm9yX2Rlc2NyaXB0aW9uPW4sT2JqZWN0LnNldFByb3RvdHlwZU9mKG8sci5wcm90b3R5cGUpLG99cmV0dXJuIGUocix0KSxyLmZyb21QYXlsb2FkPWZ1bmN0aW9uKHQpe3JldHVybiBuZXcgcih0LmVycm9yLHQuZXJyb3JfZGVzY3JpcHRpb24pfSxyfShFcnJvcik7IWZ1bmN0aW9uKHQpe2Z1bmN0aW9uIHIoZSxuLG8sYyl7dm9pZCAwPT09YyYmKGM9bnVsbCk7dmFyIGk9dC5jYWxsKHRoaXMsZSxuKXx8dGhpcztyZXR1cm4gaS5zdGF0ZT1vLGkuYXBwU3RhdGU9YyxPYmplY3Quc2V0UHJvdG90eXBlT2YoaSxyLnByb3RvdHlwZSksaX1lKHIsdCl9KGkpLGZ1bmN0aW9uKHQpe2Z1bmN0aW9uIHIoZSl7dmFyIG49dC5jYWxsKHRoaXMpfHx0aGlzO3JldHVybiBuLnBvcHVwPWUsT2JqZWN0LnNldFByb3RvdHlwZU9mKG4sci5wcm90b3R5cGUpLG59ZShyLHQpfShmdW5jdGlvbih0KXtmdW5jdGlvbiByKCl7dmFyIGU9dC5jYWxsKHRoaXMsInRpbWVvdXQiLCJUaW1lb3V0Iil8fHRoaXM7cmV0dXJuIE9iamVjdC5zZXRQcm90b3R5cGVPZihlLHIucHJvdG90eXBlKSxlfXJldHVybiBlKHIsdCkscn0oaSkpLGZ1bmN0aW9uKHQpe2Z1bmN0aW9uIHIoZSl7dmFyIG49dC5jYWxsKHRoaXMsImNhbmNlbGxlZCIsIlBvcHVwIGNsb3NlZCIpfHx0aGlzO3JldHVybiBuLnBvcHVwPWUsT2JqZWN0LnNldFByb3RvdHlwZU9mKG4sci5wcm90b3R5cGUpLG59ZShyLHQpfShpKSxmdW5jdGlvbih0KXtmdW5jdGlvbiByKGUsbixvKXt2YXIgYz10LmNhbGwodGhpcyxlLG4pfHx0aGlzO3JldHVybiBjLm1mYV90b2tlbj1vLE9iamVjdC5zZXRQcm90b3R5cGVPZihjLHIucHJvdG90eXBlKSxjfWUocix0KX0oaSk7dmFyIGE9ZnVuY3Rpb24odCl7ZnVuY3Rpb24gcihlLG4pe3ZhciBvPXQuY2FsbCh0aGlzLCJtaXNzaW5nX3JlZnJlc2hfdG9rZW4iLCJNaXNzaW5nIFJlZnJlc2ggVG9rZW4gKGF1ZGllbmNlOiAnIi5jb25jYXQoYyhlLFsiZGVmYXVsdCJdKSwiJywgc2NvcGU6ICciKS5jb25jYXQoYyhuKSwiJykiKSl8fHRoaXM7cmV0dXJuIG8uYXVkaWVuY2U9ZSxvLnNjb3BlPW4sT2JqZWN0LnNldFByb3RvdHlwZU9mKG8sci5wcm90b3R5cGUpLG99cmV0dXJuIGUocix0KSxyfShpKSxzPXt9LHU9ZnVuY3Rpb24odCxlKXtyZXR1cm4iIi5jb25jYXQodCwifCIpLmNvbmNhdChlKX07YWRkRXZlbnRMaXN0ZW5lcigibWVzc2FnZSIsKGZ1bmN0aW9uKHQpe3ZhciBlPXQuZGF0YSxjPWUudGltZW91dCxpPWUuYXV0aCxmPWUuZmV0Y2hVcmwsbD1lLmZldGNoT3B0aW9ucyxwPWUudXNlRm9ybURhdGEsaD1mdW5jdGlvbih0LGUpe3ZhciByPSJmdW5jdGlvbiI9PXR5cGVvZiBTeW1ib2wmJnRbU3ltYm9sLml0ZXJhdG9yXTtpZighcilyZXR1cm4gdDt2YXIgbixvLGM9ci5jYWxsKHQpLGk9W107dHJ5e2Zvcig7KHZvaWQgMD09PWV8fGUtLSA+MCkmJiEobj1jLm5leHQoKSkuZG9uZTspaS5wdXNoKG4udmFsdWUpfWNhdGNoKHQpe289e2Vycm9yOnR9fWZpbmFsbHl7dHJ5e24mJiFuLmRvbmUmJihyPWMucmV0dXJuKSYmci5jYWxsKGMpfWZpbmFsbHl7aWYobyl0aHJvdyBvLmVycm9yfX1yZXR1cm4gaX0odC5wb3J0cywxKVswXTtyZXR1cm4gbih2b2lkIDAsdm9pZCAwLHZvaWQgMCwoZnVuY3Rpb24oKXt2YXIgdCxlLG4seSx2LGIsZCx3LE8sXztyZXR1cm4gbyh0aGlzLChmdW5jdGlvbihvKXtzd2l0Y2goby5sYWJlbCl7Y2FzZSAwOm49KGU9aXx8e30pLmF1ZGllbmNlLHk9ZS5zY29wZSxvLmxhYmVsPTE7Y2FzZSAxOmlmKG8udHJ5cy5wdXNoKFsxLDcsLDhdKSwhKHY9cD8obT1sLmJvZHksaz1uZXcgVVJMU2VhcmNoUGFyYW1zKG0pLFA9e30say5mb3JFYWNoKChmdW5jdGlvbih0LGUpe1BbZV09dH0pKSxQKTpKU09OLnBhcnNlKGwuYm9keSkpLnJlZnJlc2hfdG9rZW4mJiJyZWZyZXNoX3Rva2VuIj09PXYuZ3JhbnRfdHlwZSl7aWYoYj1mdW5jdGlvbih0LGUpe3JldHVybiBzW3UodCxlKV19KG4seSksIWIpdGhyb3cgbmV3IGEobix5KTtsLmJvZHk9cD9uZXcgVVJMU2VhcmNoUGFyYW1zKHIocih7fSx2KSx7cmVmcmVzaF90b2tlbjpifSkpLnRvU3RyaW5nKCk6SlNPTi5zdHJpbmdpZnkocihyKHt9LHYpLHtyZWZyZXNoX3Rva2VuOmJ9KSl9ZD12b2lkIDAsImZ1bmN0aW9uIj09dHlwZW9mIEFib3J0Q29udHJvbGxlciYmKGQ9bmV3IEFib3J0Q29udHJvbGxlcixsLnNpZ25hbD1kLnNpZ25hbCksdz12b2lkIDAsby5sYWJlbD0yO2Nhc2UgMjpyZXR1cm4gby50cnlzLnB1c2goWzIsNCwsNV0pLFs0LFByb21pc2UucmFjZShbKGc9YyxuZXcgUHJvbWlzZSgoZnVuY3Rpb24odCl7cmV0dXJuIHNldFRpbWVvdXQodCxnKX0pKSksZmV0Y2goZixyKHt9LGwpKV0pXTtjYXNlIDM6cmV0dXJuIHc9by5zZW50KCksWzMsNV07Y2FzZSA0OnJldHVybiBPPW8uc2VudCgpLGgucG9zdE1lc3NhZ2Uoe2Vycm9yOk8ubWVzc2FnZX0pLFsyXTtjYXNlIDU6cmV0dXJuIHc/WzQsdy5qc29uKCldOihkJiZkLmFib3J0KCksaC5wb3N0TWVzc2FnZSh7ZXJyb3I6IlRpbWVvdXQgd2hlbiBleGVjdXRpbmcgJ2ZldGNoJyJ9KSxbMl0pO2Nhc2UgNjpyZXR1cm4odD1vLnNlbnQoKSkucmVmcmVzaF90b2tlbj8oZnVuY3Rpb24odCxlLHIpe3NbdShlLHIpXT10fSh0LnJlZnJlc2hfdG9rZW4sbix5KSxkZWxldGUgdC5yZWZyZXNoX3Rva2VuKTpmdW5jdGlvbih0LGUpe2RlbGV0ZSBzW3UodCxlKV19KG4seSksaC5wb3N0TWVzc2FnZSh7b2s6dy5vayxqc29uOnR9KSxbMyw4XTtjYXNlIDc6cmV0dXJuIF89by5zZW50KCksaC5wb3N0TWVzc2FnZSh7b2s6ITEsanNvbjp7ZXJyb3JfZGVzY3JpcHRpb246Xy5tZXNzYWdlfX0pLFszLDhdO2Nhc2UgODpyZXR1cm5bMl19dmFyIGcsbSxrLFB9KSl9KSl9KSl9KCk7Cgo=",C0=null,P0=!1,function(e){return Cc=Cc||o4(O0,C0,P0),new Worker(Cc,e)}),Pc={},s4=function(){function e(t,r){this.cache=t,this.clientId=r,this.manifestKey=this.createManifestKeyFrom(this.clientId)}return e.prototype.add=function(t){var r;return ve(this,void 0,void 0,function(){var n,i;return ye(this,function(o){switch(o.label){case 0:return i=Set.bind,[4,this.cache.get(this.manifestKey)];case 1:return(n=new(i.apply(Set,[void 0,((r=o.sent())===null||r===void 0?void 0:r.keys)||[]]))).add(t),[4,this.cache.set(this.manifestKey,{keys:Cu([],vi(n),!1)})];case 2:return o.sent(),[2]}})})},e.prototype.remove=function(t){return ve(this,void 0,void 0,function(){var r,n;return ye(this,function(i){switch(i.label){case 0:return[4,this.cache.get(this.manifestKey)];case 1:return(r=i.sent())?((n=new Set(r.keys)).delete(t),n.size>0?[4,this.cache.set(this.manifestKey,{keys:Cu([],vi(n),!1)})]:[3,3]):[3,5];case 2:case 4:return[2,i.sent()];case 3:return[4,this.cache.remove(this.manifestKey)];case 5:return[2]}})})},e.prototype.get=function(){return this.cache.get(this.manifestKey)},e.prototype.clear=function(){return this.cache.remove(this.manifestKey)},e.prototype.createManifestKeyFrom=function(t){return"".concat("@@auth0spajs@@","::").concat(t)},e}(),Tc=new R3,l4={memory:function(){return new X3().enclosedCache},localstorage:function(){return new Y3}},T0=function(e){return l4[e]},c4=function(){return!/Trident.*rv:11\.0/.test(navigator.userAgent)},u4=function(){function e(t){var r,n,i,o,a=this;if(this.options=t,this._releaseLockOnPageHide=function(){return ve(a,void 0,void 0,function(){return ye(this,function(l){switch(l.label){case 0:return[4,Tc.releaseLock("auth0.lock.getTokenSilently")];case 1:return l.sent(),window.removeEventListener("pagehide",this._releaseLockOnPageHide),[2]}})})},typeof window<"u"&&function(){if(!$h())throw new Error("For security reasons, `window.crypto` is required to run `auth0-spa-js`.");if(Wb()===void 0)throw new Error(`
3
3
  auth0-spa-js must run on a secure origin. See https://github.com/auth0/auth0-spa-js/blob/master/FAQ.md#why-do-i-get-auth0-spa-js-must-run-on-a-secure-origin for more information.
4
- `)}(),t.cache&&t.cacheLocation&&console.warn("Both `cache` and `cacheLocation` options have been specified in the Auth0Client configuration; ignoring `cacheLocation` and using `cache`."),t.cache)i=t.cache;else{if(this.cacheLocation=t.cacheLocation||"memory",!T0(this.cacheLocation))throw new Error('Invalid cache location "'.concat(this.cacheLocation,'"'));i=T0(this.cacheLocation)()}this.httpTimeoutMs=t.httpTimeoutInSeconds?1e3*t.httpTimeoutInSeconds:1e4,this.cookieStorage=t.legacySameSiteCookie===!1?Jn:n4,this.orgHintCookieName=(o=this.options.client_id,"auth0.".concat(o,".organization_hint")),this.isAuthenticatedCookieName=function(l){return"auth0.".concat(l,".is.authenticated")}(this.options.client_id),this.sessionCheckExpiryDays=t.sessionCheckExpiryDays||1;var s,c=t.useCookiesForTransactions?this.cookieStorage:i4;this.scope=this.options.scope,this.transactionManager=new J3(c,this.options.client_id),this.nowProvider=this.options.nowProvider||Bb,this.cacheManager=new Z3(i,i.allKeys?null:new s4(i,this.options.client_id),this.nowProvider),this.domainUrl=(s=this.options.domain,/^https?:\/\//.test(s)?s:"https://".concat(s)),this.tokenIssuer=function(l,u){return l?l.startsWith("https://")?l:"https://".concat(l,"/"):"".concat(u,"/")}(this.options.issuer,this.domainUrl),this.defaultScope=qr("openid",((n=(r=this.options)===null||r===void 0?void 0:r.advancedOptions)===null||n===void 0?void 0:n.defaultScope)!==void 0?this.options.advancedOptions.defaultScope:"openid profile email"),this.options.useRefreshTokens&&(this.scope=qr(this.scope,"offline_access")),typeof window<"u"&&window.Worker&&this.options.useRefreshTokens&&this.cacheLocation==="memory"&&c4()&&(this.worker=new a4),this.customOptions=function(l){return l.advancedOptions,l.audience,l.auth0Client,l.authorizeTimeoutInSeconds,l.cacheLocation,l.cache,l.client_id,l.domain,l.issuer,l.leeway,l.max_age,l.nowProvider,l.redirect_uri,l.scope,l.useRefreshTokens,l.useRefreshTokensFallback,l.useCookiesForTransactions,l.useFormData,At(l,["advancedOptions","audience","auth0Client","authorizeTimeoutInSeconds","cacheLocation","cache","client_id","domain","issuer","leeway","max_age","nowProvider","redirect_uri","scope","useRefreshTokens","useRefreshTokensFallback","useCookiesForTransactions","useFormData"])}(t),this.useRefreshTokensFallback=this.options.useRefreshTokensFallback!==!1}return e.prototype._url=function(t){var r=encodeURIComponent(btoa(JSON.stringify(this.options.auth0Client||Vb)));return"".concat(this.domainUrl).concat(t,"&auth0Client=").concat(r)},e.prototype._getParams=function(t,r,n,i,o){var a=this.options;a.useRefreshTokens,a.useCookiesForTransactions,a.useFormData,a.auth0Client,a.cacheLocation,a.advancedOptions,a.detailedResponse,a.nowProvider,a.authorizeTimeoutInSeconds,a.legacySameSiteCookie,a.sessionCheckExpiryDays,a.domain,a.leeway,a.httpTimeoutInSeconds;var s=At(a,["useRefreshTokens","useCookiesForTransactions","useFormData","auth0Client","cacheLocation","advancedOptions","detailedResponse","nowProvider","authorizeTimeoutInSeconds","legacySameSiteCookie","sessionCheckExpiryDays","domain","leeway","httpTimeoutInSeconds"]);return se(se(se({},s),t),{scope:qr(this.defaultScope,this.scope,t.scope),response_type:"code",response_mode:"query",state:r,nonce:n,redirect_uri:o||this.options.redirect_uri,code_challenge:i,code_challenge_method:"S256"})},e.prototype._authorizeUrl=function(t){return this._url("/authorize?".concat(Hu(t)))},e.prototype._verifyIdToken=function(t,r,n){return me(this,void 0,void 0,function(){var i;return ve(this,function(o){switch(o.label){case 0:return[4,this.nowProvider()];case 1:return i=o.sent(),[2,t4({iss:this.tokenIssuer,aud:this.options.client_id,id_token:t,nonce:r,organizationId:n,leeway:this.options.leeway,max_age:this._parseNumber(this.options.max_age),now:i})]}})})},e.prototype._parseNumber=function(t){return typeof t!="string"?t:parseInt(t,10)||void 0},e.prototype._processOrgIdHint=function(t){t?this.cookieStorage.save(this.orgHintCookieName,t,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}):this.cookieStorage.remove(this.orgHintCookieName,{cookieDomain:this.options.cookieDomain})},e.prototype.buildAuthorizeUrl=function(t){return t===void 0&&(t={}),me(this,void 0,void 0,function(){var r,n,i,o,a,s,c,l,u,d,f,h;return ve(this,function(p){switch(p.label){case 0:return r=t.redirect_uri,n=t.appState,i=At(t,["redirect_uri","appState"]),o=Gn(Or()),a=Gn(Or()),s=Or(),[4,kc(s)];case 1:return c=p.sent(),l=Ec(c),u=t.fragment?"#".concat(t.fragment):"",d=this._getParams(i,o,a,l,r),f=this._authorizeUrl(d),h=t.organization||this.options.organization,this.transactionManager.create(se({nonce:a,code_verifier:s,appState:n,scope:d.scope,audience:d.audience||"default",redirect_uri:d.redirect_uri,state:o},h&&{organizationId:h})),[2,f+u]}})})},e.prototype.loginWithPopup=function(t,r){return me(this,void 0,void 0,function(){var n,i,o,a,s,c,l,u,d,f,h,p,m;return ve(this,function(v){switch(v.label){case 0:if(t=t||{},!(r=r||{}).popup&&(r.popup=function(y){var b=window.screenX+(window.innerWidth-400)/2,g=window.screenY+(window.innerHeight-600)/2;return window.open(y,"auth0:authorize:popup","left=".concat(b,",top=").concat(g,",width=").concat(400,",height=").concat(600,",resizable,scrollbars=yes,status=1"))}(""),!r.popup))throw new Error("Unable to open a popup for loginWithPopup - window.open returned `null`");return n=At(t,[]),i=Gn(Or()),o=Gn(Or()),a=Or(),[4,kc(a)];case 1:return s=v.sent(),c=Ec(s),l=this._getParams(n,i,o,c,this.options.redirect_uri||window.location.origin),u=this._authorizeUrl(se(se({},l),{response_mode:"web_message"})),r.popup.location.href=u,[4,B3(se(se({},r),{timeoutInSeconds:r.timeoutInSeconds||this.options.authorizeTimeoutInSeconds||60}))];case 2:if(d=v.sent(),i!==d.state)throw new Error("Invalid state");return[4,ia({audience:l.audience,scope:l.scope,baseUrl:this.domainUrl,client_id:this.options.client_id,code_verifier:a,code:d.code,grant_type:"authorization_code",redirect_uri:l.redirect_uri,auth0Client:this.options.auth0Client,useFormData:this.options.useFormData,timeout:this.httpTimeoutMs},this.worker)];case 3:return f=v.sent(),h=t.organization||this.options.organization,[4,this._verifyIdToken(f.id_token,o,h)];case 4:return p=v.sent(),m=se(se({},f),{decodedToken:p,scope:l.scope,audience:l.audience||"default",client_id:this.options.client_id}),[4,this.cacheManager.set(m)];case 5:return v.sent(),this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this._processOrgIdHint(p.claims.org_id),[2]}})})},e.prototype.getUser=function(t){return t===void 0&&(t={}),me(this,void 0,void 0,function(){var r,n,i;return ve(this,function(o){switch(o.label){case 0:return r=t.audience||this.options.audience||"default",n=qr(this.defaultScope,this.scope,t.scope),[4,this.cacheManager.get(new En({client_id:this.options.client_id,audience:r,scope:n}))];case 1:return[2,(i=o.sent())&&i.decodedToken&&i.decodedToken.user]}})})},e.prototype.getIdTokenClaims=function(t){return t===void 0&&(t={}),me(this,void 0,void 0,function(){var r,n,i;return ve(this,function(o){switch(o.label){case 0:return r=t.audience||this.options.audience||"default",n=qr(this.defaultScope,this.scope,t.scope),[4,this.cacheManager.get(new En({client_id:this.options.client_id,audience:r,scope:n}))];case 1:return[2,(i=o.sent())&&i.decodedToken&&i.decodedToken.claims]}})})},e.prototype.loginWithRedirect=function(t){return t===void 0&&(t={}),me(this,void 0,void 0,function(){var r,n,i;return ve(this,function(o){switch(o.label){case 0:return r=t.redirectMethod,n=At(t,["redirectMethod"]),[4,this.buildAuthorizeUrl(n)];case 1:return i=o.sent(),window.location[r||"assign"](i),[2]}})})},e.prototype.handleRedirectCallback=function(t){return t===void 0&&(t=window.location.href),me(this,void 0,void 0,function(){var r,n,i,o,a,s,c,l,u,d;return ve(this,function(f){switch(f.label){case 0:if((r=t.split("?").slice(1)).length===0)throw new Error("There are no query params available for parsing.");if(n=function(h){h.indexOf("#")>-1&&(h=h.substr(0,h.indexOf("#")));var p=h.split("&"),m={};return p.forEach(function(v){var y=vi(v.split("="),2),b=y[0],g=y[1];m[b]=decodeURIComponent(g)}),m.expires_in&&(m.expires_in=parseInt(m.expires_in)),m}(r.join("")),i=n.state,o=n.code,a=n.error,s=n.error_description,!(c=this.transactionManager.get()))throw new Error("Invalid state");if(this.transactionManager.remove(),a)throw new M3(a,s,i,c.appState);if(!c.code_verifier||c.state&&c.state!==i)throw new Error("Invalid state");return l={audience:c.audience,scope:c.scope,baseUrl:this.domainUrl,client_id:this.options.client_id,code_verifier:c.code_verifier,grant_type:"authorization_code",code:o,auth0Client:this.options.auth0Client,useFormData:this.options.useFormData,timeout:this.httpTimeoutMs},c.redirect_uri!==void 0&&(l.redirect_uri=c.redirect_uri),[4,ia(l,this.worker)];case 1:return u=f.sent(),[4,this._verifyIdToken(u.id_token,c.nonce,c.organizationId)];case 2:return d=f.sent(),[4,this.cacheManager.set(se(se(se(se({},u),{decodedToken:d,audience:c.audience,scope:c.scope}),u.scope?{oauthTokenScope:u.scope}:null),{client_id:this.options.client_id}))];case 3:return f.sent(),this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this._processOrgIdHint(d.claims.org_id),[2,{appState:c.appState}]}})})},e.prototype.checkSession=function(t){return me(this,void 0,void 0,function(){var r;return ve(this,function(n){switch(n.label){case 0:if(!this.cookieStorage.get(this.isAuthenticatedCookieName)){if(!this.cookieStorage.get("auth0.is.authenticated"))return[2];this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this.cookieStorage.remove("auth0.is.authenticated")}n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.getTokenSilently(t)];case 2:return n.sent(),[3,4];case 3:if(r=n.sent(),!L3.includes(r.error))throw r;return[3,4];case 4:return[2]}})})},e.prototype.getTokenSilently=function(t){return t===void 0&&(t={}),me(this,void 0,void 0,function(){var r,n,i,o,a=this;return ve(this,function(s){switch(s.label){case 0:return r=se(se({audience:this.options.audience,ignoreCache:!1},t),{scope:qr(this.defaultScope,this.scope,t.scope)}),n=r.ignoreCache,i=At(r,["ignoreCache"]),[4,(c=function(){return a._getTokenSilently(se({ignoreCache:n},i))},l="".concat(this.options.client_id,"::").concat(i.audience,"::").concat(i.scope),u=Cc[l],u||(u=c().finally(function(){delete Cc[l],u=null}),Cc[l]=u),u)];case 1:return o=s.sent(),[2,t.detailedResponse?o:o.access_token]}var c,l,u})})},e.prototype._getTokenSilently=function(t){return t===void 0&&(t={}),me(this,void 0,void 0,function(){var r,n,i,o,a,s,c,l,u;return ve(this,function(d){switch(d.label){case 0:return r=t.ignoreCache,n=At(t,["ignoreCache"]),r?[3,2]:[4,this._getEntryFromCache({scope:n.scope,audience:n.audience||"default",client_id:this.options.client_id})];case 1:if(i=d.sent())return[2,i];d.label=2;case 2:return[4,(f=function(){return Pc.acquireLock("auth0.lock.getTokenSilently",5e3)},h=10,h===void 0&&(h=3),me(void 0,void 0,void 0,function(){var p;return ve(this,function(m){switch(m.label){case 0:p=0,m.label=1;case 1:return p<h?[4,f()]:[3,4];case 2:if(m.sent())return[2,!0];m.label=3;case 3:return p++,[3,1];case 4:return[2,!1]}})}))];case 3:if(!d.sent())return[3,15];d.label=4;case 4:return d.trys.push([4,,12,14]),window.addEventListener("pagehide",this._releaseLockOnPageHide),r?[3,6]:[4,this._getEntryFromCache({scope:n.scope,audience:n.audience||"default",client_id:this.options.client_id})];case 5:if(i=d.sent())return[2,i];d.label=6;case 6:return this.options.useRefreshTokens?[4,this._getTokenUsingRefreshToken(n)]:[3,8];case 7:return a=d.sent(),[3,10];case 8:return[4,this._getTokenFromIFrame(n)];case 9:a=d.sent(),d.label=10;case 10:return o=a,[4,this.cacheManager.set(se({client_id:this.options.client_id},o))];case 11:return d.sent(),this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),s=o.id_token,c=o.access_token,l=o.oauthTokenScope,u=o.expires_in,[2,se(se({id_token:s,access_token:c},l?{scope:l}:null),{expires_in:u})];case 12:return[4,Pc.releaseLock("auth0.lock.getTokenSilently")];case 13:return d.sent(),window.removeEventListener("pagehide",this._releaseLockOnPageHide),[7];case 14:return[3,16];case 15:throw new qu;case 16:return[2]}var f,h})})},e.prototype.getTokenWithPopup=function(t,r){return t===void 0&&(t={}),r===void 0&&(r={}),me(this,void 0,void 0,function(){return ve(this,function(n){switch(n.label){case 0:return t.audience=t.audience||this.options.audience,t.scope=qr(this.defaultScope,this.scope,t.scope),r=se(se({},F3),r),[4,this.loginWithPopup(t,r)];case 1:return n.sent(),[4,this.cacheManager.get(new En({scope:t.scope,audience:t.audience||"default",client_id:this.options.client_id}))];case 2:return[2,n.sent().access_token]}})})},e.prototype.isAuthenticated=function(){return me(this,void 0,void 0,function(){return ve(this,function(t){switch(t.label){case 0:return[4,this.getUser()];case 1:return[2,!!t.sent()]}})})},e.prototype.buildLogoutUrl=function(t){t===void 0&&(t={}),t.client_id!==null?t.client_id=t.client_id||this.options.client_id:delete t.client_id;var r=t.federated,n=At(t,["federated"]),i=r?"&federated":"";return this._url("/v2/logout?".concat(Hu(n)))+i},e.prototype.logout=function(t){var r=this;t===void 0&&(t={});var n=t.localOnly,i=At(t,["localOnly"]);if(n&&i.federated)throw new Error("It is invalid to set both the `federated` and `localOnly` options to `true`");var o=function(){if(r.cookieStorage.remove(r.orgHintCookieName,{cookieDomain:r.options.cookieDomain}),r.cookieStorage.remove(r.isAuthenticatedCookieName,{cookieDomain:r.options.cookieDomain}),!n){var a=r.buildLogoutUrl(i);window.location.assign(a)}};if(this.options.cache)return this.cacheManager.clear().then(function(){return o()});this.cacheManager.clearSync(),o()},e.prototype._getTokenFromIFrame=function(t){return me(this,void 0,void 0,function(){var r,n,i,o,a,s,c,l,u,d,f,h,p,m,v,y,b;return ve(this,function(g){switch(g.label){case 0:return r=Gn(Or()),n=Gn(Or()),i=Or(),[4,kc(i)];case 1:o=g.sent(),a=Ec(o),s=At(t,["detailedResponse"]),c=this._getParams(s,r,n,a,t.redirect_uri||this.options.redirect_uri||window.location.origin),(l=this.cookieStorage.get(this.orgHintCookieName))&&!c.organization&&(c.organization=l),u=this._authorizeUrl(se(se({},c),{prompt:"none",response_mode:"web_message"})),g.label=2;case 2:if(g.trys.push([2,6,,7]),window.crossOriginIsolated)throw new Lr("login_required","The application is running in a Cross-Origin Isolated context, silently retrieving a token without refresh token is not possible.");return d=t.timeoutInSeconds||this.options.authorizeTimeoutInSeconds,[4,(_=u,S=this.domainUrl,E=d,E===void 0&&(E=60),new Promise(function(x,N){var M=window.document.createElement("iframe");M.setAttribute("width","0"),M.setAttribute("height","0"),M.style.display="none";var j,q=function(){window.document.body.contains(M)&&(window.document.body.removeChild(M),window.removeEventListener("message",j,!1))},A=setTimeout(function(){N(new qu),q()},1e3*E);j=function(T){if(T.origin==S&&T.data&&T.data.type==="authorization_response"){var F=T.source;F&&F.close(),T.data.response.error?N(Lr.fromPayload(T.data.response)):x(T.data.response),clearTimeout(A),window.removeEventListener("message",j,!1),setTimeout(q,2e3)}},window.addEventListener("message",j,!1),window.document.body.appendChild(M),M.setAttribute("src",_)}))];case 3:if(f=g.sent(),r!==f.state)throw new Error("Invalid state");return h=t.scope,p=t.audience,m=At(t,["scope","audience","redirect_uri","ignoreCache","timeoutInSeconds","detailedResponse"]),[4,ia(se(se(se({},this.customOptions),m),{scope:h,audience:p,baseUrl:this.domainUrl,client_id:this.options.client_id,code_verifier:i,code:f.code,grant_type:"authorization_code",redirect_uri:c.redirect_uri,auth0Client:this.options.auth0Client,useFormData:this.options.useFormData,timeout:m.timeout||this.httpTimeoutMs}),this.worker)];case 4:return v=g.sent(),[4,this._verifyIdToken(v.id_token,n)];case 5:return y=g.sent(),this._processOrgIdHint(y.claims.org_id),[2,se(se({},v),{decodedToken:y,scope:c.scope,oauthTokenScope:v.scope,audience:c.audience||"default"})];case 6:throw(b=g.sent()).error==="login_required"&&this.logout({localOnly:!0}),b;case 7:return[2]}var _,S,E})})},e.prototype._getTokenUsingRefreshToken=function(t){return me(this,void 0,void 0,function(){var r,n,i,o,a,s,c,l,u;return ve(this,function(d){switch(d.label){case 0:return t.scope=qr(this.defaultScope,this.options.scope,t.scope),[4,this.cacheManager.get(new En({scope:t.scope,audience:t.audience||"default",client_id:this.options.client_id}))];case 1:return(r=d.sent())&&r.refresh_token||this.worker?[3,4]:this.useRefreshTokensFallback?[4,this._getTokenFromIFrame(t)]:[3,3];case 2:return[2,d.sent()];case 3:throw new V3(t.audience||"default",t.scope);case 4:n=t.redirect_uri||this.options.redirect_uri||window.location.origin,o=t.scope,a=t.audience,s=At(t,["scope","audience","ignoreCache","timeoutInSeconds","detailedResponse"]),c=typeof t.timeoutInSeconds=="number"?1e3*t.timeoutInSeconds:null,d.label=5;case 5:return d.trys.push([5,7,,10]),[4,ia(se(se(se(se(se({},this.customOptions),s),{audience:a,scope:o,baseUrl:this.domainUrl,client_id:this.options.client_id,grant_type:"refresh_token",refresh_token:r&&r.refresh_token,redirect_uri:n}),c&&{timeout:c}),{auth0Client:this.options.auth0Client,useFormData:this.options.useFormData,timeout:this.httpTimeoutMs}),this.worker)];case 6:return i=d.sent(),[3,10];case 7:return((l=d.sent()).message.indexOf("Missing Refresh Token")>-1||l.message&&l.message.indexOf("invalid refresh token")>-1)&&this.useRefreshTokensFallback?[4,this._getTokenFromIFrame(t)]:[3,9];case 8:return[2,d.sent()];case 9:throw l;case 10:return[4,this._verifyIdToken(i.id_token)];case 11:return u=d.sent(),[2,se(se({},i),{decodedToken:u,scope:t.scope,oauthTokenScope:i.scope,audience:t.audience||"default"})]}})})},e.prototype._getEntryFromCache=function(t){var r=t.scope,n=t.audience,i=t.client_id;return me(this,void 0,void 0,function(){var o,a,s,c,l;return ve(this,function(u){switch(u.label){case 0:return[4,this.cacheManager.get(new En({scope:r,audience:n,client_id:i}),60)];case 1:return(o=u.sent())&&o.access_token?(a=o.id_token,s=o.access_token,c=o.oauthTokenScope,l=o.expires_in,[2,se(se({id_token:a,access_token:s},c?{scope:c}:null),{expires_in:l})]):[2]}})})},e}(),Tc="Invariant Violation",N0=Object.setPrototypeOf,d4=N0===void 0?function(e,t){return e.__proto__=t,e}:N0,be=function(e){lr(t,e);function t(r){r===void 0&&(r=Tc);var n=e.call(this,typeof r=="number"?Tc+": "+r+" (see https://github.com/apollographql/invariant-packages)":r)||this;return n.framesToPop=1,n.name=Tc,d4(n,t.prototype),n}return t}(Error);function B(e,t){if(!e)throw new be(t)}var Gb=["debug","log","warn","error","silent"],f4=Gb.indexOf("log");function oa(e){return function(){if(Gb.indexOf(e)>=f4){var t=console[e]||console.log;return t.apply(console,arguments)}}}(function(e){e.debug=oa("debug"),e.log=oa("log"),e.warn=oa("warn"),e.error=oa("error")})(B||(B={}));function qt(e){try{return e()}catch{}}const I0=qt(function(){return globalThis})||qt(function(){return window})||qt(function(){return self})||qt(function(){return global})||qt(function(){return qt.constructor("return this")()});var A0="__",D0=[A0,A0].join("DEV");function h4(){try{return Boolean(__DEV__)}catch{return Object.defineProperty(I0,D0,{value:qt(function(){return"production"})!=="production",enumerable:!1,configurable:!0,writable:!0}),I0[D0]}}const Nc=h4();function Yr(e){try{return e()}catch{}}var Gu=Yr(function(){return globalThis})||Yr(function(){return window})||Yr(function(){return self})||Yr(function(){return global})||Yr(function(){return Yr.constructor("return this")()}),Qu=!1;function p4(){Gu&&!Yr(function(){return"production"})&&!Yr(function(){return process})&&(Object.defineProperty(Gu,"process",{value:{env:{NODE_ENV:"production"}},configurable:!0,enumerable:!1,writable:!0}),Qu=!0)}p4();function R0(){Qu&&(delete Gu.process,Qu=!1)}function ka(e,t){if(!Boolean(e))throw new Error(t)}function m4(e){return typeof e=="object"&&e!==null}function v4(e,t){if(!Boolean(e))throw new Error(t??"Unexpected invariant triggered.")}const y4=/\r\n|[\n\r]/g;function Ku(e,t){let r=0,n=1;for(const i of e.body.matchAll(y4)){if(typeof i.index=="number"||v4(!1),i.index>=t)break;r=i.index+i[0].length,n+=1}return{line:n,column:t+1-r}}function g4(e){return Qb(e.source,Ku(e.source,e.start))}function Qb(e,t){const r=e.locationOffset.column-1,n="".padStart(r)+e.body,i=t.line-1,o=e.locationOffset.line-1,a=t.line+o,s=t.line===1?r:0,c=t.column+s,l=`${e.name}:${a}:${c}
4
+ `)}(),t.cache&&t.cacheLocation&&console.warn("Both `cache` and `cacheLocation` options have been specified in the Auth0Client configuration; ignoring `cacheLocation` and using `cache`."),t.cache)i=t.cache;else{if(this.cacheLocation=t.cacheLocation||"memory",!T0(this.cacheLocation))throw new Error('Invalid cache location "'.concat(this.cacheLocation,'"'));i=T0(this.cacheLocation)()}this.httpTimeoutMs=t.httpTimeoutInSeconds?1e3*t.httpTimeoutInSeconds:1e4,this.cookieStorage=t.legacySameSiteCookie===!1?Jn:n4,this.orgHintCookieName=(o=this.options.client_id,"auth0.".concat(o,".organization_hint")),this.isAuthenticatedCookieName=function(l){return"auth0.".concat(l,".is.authenticated")}(this.options.client_id),this.sessionCheckExpiryDays=t.sessionCheckExpiryDays||1;var s,c=t.useCookiesForTransactions?this.cookieStorage:i4;this.scope=this.options.scope,this.transactionManager=new J3(c,this.options.client_id),this.nowProvider=this.options.nowProvider||Bb,this.cacheManager=new Z3(i,i.allKeys?null:new s4(i,this.options.client_id),this.nowProvider),this.domainUrl=(s=this.options.domain,/^https?:\/\//.test(s)?s:"https://".concat(s)),this.tokenIssuer=function(l,u){return l?l.startsWith("https://")?l:"https://".concat(l,"/"):"".concat(u,"/")}(this.options.issuer,this.domainUrl),this.defaultScope=qr("openid",((n=(r=this.options)===null||r===void 0?void 0:r.advancedOptions)===null||n===void 0?void 0:n.defaultScope)!==void 0?this.options.advancedOptions.defaultScope:"openid profile email"),this.options.useRefreshTokens&&(this.scope=qr(this.scope,"offline_access")),typeof window<"u"&&window.Worker&&this.options.useRefreshTokens&&this.cacheLocation==="memory"&&c4()&&(this.worker=new a4),this.customOptions=function(l){return l.advancedOptions,l.audience,l.auth0Client,l.authorizeTimeoutInSeconds,l.cacheLocation,l.cache,l.client_id,l.domain,l.issuer,l.leeway,l.max_age,l.nowProvider,l.redirect_uri,l.scope,l.useRefreshTokens,l.useRefreshTokensFallback,l.useCookiesForTransactions,l.useFormData,At(l,["advancedOptions","audience","auth0Client","authorizeTimeoutInSeconds","cacheLocation","cache","client_id","domain","issuer","leeway","max_age","nowProvider","redirect_uri","scope","useRefreshTokens","useRefreshTokensFallback","useCookiesForTransactions","useFormData"])}(t),this.useRefreshTokensFallback=this.options.useRefreshTokensFallback!==!1}return e.prototype._url=function(t){var r=encodeURIComponent(btoa(JSON.stringify(this.options.auth0Client||Vb)));return"".concat(this.domainUrl).concat(t,"&auth0Client=").concat(r)},e.prototype._getParams=function(t,r,n,i,o){var a=this.options;a.useRefreshTokens,a.useCookiesForTransactions,a.useFormData,a.auth0Client,a.cacheLocation,a.advancedOptions,a.detailedResponse,a.nowProvider,a.authorizeTimeoutInSeconds,a.legacySameSiteCookie,a.sessionCheckExpiryDays,a.domain,a.leeway,a.httpTimeoutInSeconds;var s=At(a,["useRefreshTokens","useCookiesForTransactions","useFormData","auth0Client","cacheLocation","advancedOptions","detailedResponse","nowProvider","authorizeTimeoutInSeconds","legacySameSiteCookie","sessionCheckExpiryDays","domain","leeway","httpTimeoutInSeconds"]);return se(se(se({},s),t),{scope:qr(this.defaultScope,this.scope,t.scope),response_type:"code",response_mode:"query",state:r,nonce:n,redirect_uri:o||this.options.redirect_uri,code_challenge:i,code_challenge_method:"S256"})},e.prototype._authorizeUrl=function(t){return this._url("/authorize?".concat(Gu(t)))},e.prototype._verifyIdToken=function(t,r,n){return ve(this,void 0,void 0,function(){var i;return ye(this,function(o){switch(o.label){case 0:return[4,this.nowProvider()];case 1:return i=o.sent(),[2,t4({iss:this.tokenIssuer,aud:this.options.client_id,id_token:t,nonce:r,organizationId:n,leeway:this.options.leeway,max_age:this._parseNumber(this.options.max_age),now:i})]}})})},e.prototype._parseNumber=function(t){return typeof t!="string"?t:parseInt(t,10)||void 0},e.prototype._processOrgIdHint=function(t){t?this.cookieStorage.save(this.orgHintCookieName,t,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}):this.cookieStorage.remove(this.orgHintCookieName,{cookieDomain:this.options.cookieDomain})},e.prototype.buildAuthorizeUrl=function(t){return t===void 0&&(t={}),ve(this,void 0,void 0,function(){var r,n,i,o,a,s,c,l,u,d,f,h;return ye(this,function(p){switch(p.label){case 0:return r=t.redirect_uri,n=t.appState,i=At(t,["redirect_uri","appState"]),o=Gn(Or()),a=Gn(Or()),s=Or(),[4,Ec(s)];case 1:return c=p.sent(),l=Oc(c),u=t.fragment?"#".concat(t.fragment):"",d=this._getParams(i,o,a,l,r),f=this._authorizeUrl(d),h=t.organization||this.options.organization,this.transactionManager.create(se({nonce:a,code_verifier:s,appState:n,scope:d.scope,audience:d.audience||"default",redirect_uri:d.redirect_uri,state:o},h&&{organizationId:h})),[2,f+u]}})})},e.prototype.loginWithPopup=function(t,r){return ve(this,void 0,void 0,function(){var n,i,o,a,s,c,l,u,d,f,h,p,m;return ye(this,function(v){switch(v.label){case 0:if(t=t||{},!(r=r||{}).popup&&(r.popup=function(y){var b=window.screenX+(window.innerWidth-400)/2,g=window.screenY+(window.innerHeight-600)/2;return window.open(y,"auth0:authorize:popup","left=".concat(b,",top=").concat(g,",width=").concat(400,",height=").concat(600,",resizable,scrollbars=yes,status=1"))}(""),!r.popup))throw new Error("Unable to open a popup for loginWithPopup - window.open returned `null`");return n=At(t,[]),i=Gn(Or()),o=Gn(Or()),a=Or(),[4,Ec(a)];case 1:return s=v.sent(),c=Oc(s),l=this._getParams(n,i,o,c,this.options.redirect_uri||window.location.origin),u=this._authorizeUrl(se(se({},l),{response_mode:"web_message"})),r.popup.location.href=u,[4,B3(se(se({},r),{timeoutInSeconds:r.timeoutInSeconds||this.options.authorizeTimeoutInSeconds||60}))];case 2:if(d=v.sent(),i!==d.state)throw new Error("Invalid state");return[4,ia({audience:l.audience,scope:l.scope,baseUrl:this.domainUrl,client_id:this.options.client_id,code_verifier:a,code:d.code,grant_type:"authorization_code",redirect_uri:l.redirect_uri,auth0Client:this.options.auth0Client,useFormData:this.options.useFormData,timeout:this.httpTimeoutMs},this.worker)];case 3:return f=v.sent(),h=t.organization||this.options.organization,[4,this._verifyIdToken(f.id_token,o,h)];case 4:return p=v.sent(),m=se(se({},f),{decodedToken:p,scope:l.scope,audience:l.audience||"default",client_id:this.options.client_id}),[4,this.cacheManager.set(m)];case 5:return v.sent(),this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this._processOrgIdHint(p.claims.org_id),[2]}})})},e.prototype.getUser=function(t){return t===void 0&&(t={}),ve(this,void 0,void 0,function(){var r,n,i;return ye(this,function(o){switch(o.label){case 0:return r=t.audience||this.options.audience||"default",n=qr(this.defaultScope,this.scope,t.scope),[4,this.cacheManager.get(new En({client_id:this.options.client_id,audience:r,scope:n}))];case 1:return[2,(i=o.sent())&&i.decodedToken&&i.decodedToken.user]}})})},e.prototype.getIdTokenClaims=function(t){return t===void 0&&(t={}),ve(this,void 0,void 0,function(){var r,n,i;return ye(this,function(o){switch(o.label){case 0:return r=t.audience||this.options.audience||"default",n=qr(this.defaultScope,this.scope,t.scope),[4,this.cacheManager.get(new En({client_id:this.options.client_id,audience:r,scope:n}))];case 1:return[2,(i=o.sent())&&i.decodedToken&&i.decodedToken.claims]}})})},e.prototype.loginWithRedirect=function(t){return t===void 0&&(t={}),ve(this,void 0,void 0,function(){var r,n,i;return ye(this,function(o){switch(o.label){case 0:return r=t.redirectMethod,n=At(t,["redirectMethod"]),[4,this.buildAuthorizeUrl(n)];case 1:return i=o.sent(),window.location[r||"assign"](i),[2]}})})},e.prototype.handleRedirectCallback=function(t){return t===void 0&&(t=window.location.href),ve(this,void 0,void 0,function(){var r,n,i,o,a,s,c,l,u,d;return ye(this,function(f){switch(f.label){case 0:if((r=t.split("?").slice(1)).length===0)throw new Error("There are no query params available for parsing.");if(n=function(h){h.indexOf("#")>-1&&(h=h.substr(0,h.indexOf("#")));var p=h.split("&"),m={};return p.forEach(function(v){var y=vi(v.split("="),2),b=y[0],g=y[1];m[b]=decodeURIComponent(g)}),m.expires_in&&(m.expires_in=parseInt(m.expires_in)),m}(r.join("")),i=n.state,o=n.code,a=n.error,s=n.error_description,!(c=this.transactionManager.get()))throw new Error("Invalid state");if(this.transactionManager.remove(),a)throw new M3(a,s,i,c.appState);if(!c.code_verifier||c.state&&c.state!==i)throw new Error("Invalid state");return l={audience:c.audience,scope:c.scope,baseUrl:this.domainUrl,client_id:this.options.client_id,code_verifier:c.code_verifier,grant_type:"authorization_code",code:o,auth0Client:this.options.auth0Client,useFormData:this.options.useFormData,timeout:this.httpTimeoutMs},c.redirect_uri!==void 0&&(l.redirect_uri=c.redirect_uri),[4,ia(l,this.worker)];case 1:return u=f.sent(),[4,this._verifyIdToken(u.id_token,c.nonce,c.organizationId)];case 2:return d=f.sent(),[4,this.cacheManager.set(se(se(se(se({},u),{decodedToken:d,audience:c.audience,scope:c.scope}),u.scope?{oauthTokenScope:u.scope}:null),{client_id:this.options.client_id}))];case 3:return f.sent(),this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this._processOrgIdHint(d.claims.org_id),[2,{appState:c.appState}]}})})},e.prototype.checkSession=function(t){return ve(this,void 0,void 0,function(){var r;return ye(this,function(n){switch(n.label){case 0:if(!this.cookieStorage.get(this.isAuthenticatedCookieName)){if(!this.cookieStorage.get("auth0.is.authenticated"))return[2];this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this.cookieStorage.remove("auth0.is.authenticated")}n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.getTokenSilently(t)];case 2:return n.sent(),[3,4];case 3:if(r=n.sent(),!L3.includes(r.error))throw r;return[3,4];case 4:return[2]}})})},e.prototype.getTokenSilently=function(t){return t===void 0&&(t={}),ve(this,void 0,void 0,function(){var r,n,i,o,a=this;return ye(this,function(s){switch(s.label){case 0:return r=se(se({audience:this.options.audience,ignoreCache:!1},t),{scope:qr(this.defaultScope,this.scope,t.scope)}),n=r.ignoreCache,i=At(r,["ignoreCache"]),[4,(c=function(){return a._getTokenSilently(se({ignoreCache:n},i))},l="".concat(this.options.client_id,"::").concat(i.audience,"::").concat(i.scope),u=Pc[l],u||(u=c().finally(function(){delete Pc[l],u=null}),Pc[l]=u),u)];case 1:return o=s.sent(),[2,t.detailedResponse?o:o.access_token]}var c,l,u})})},e.prototype._getTokenSilently=function(t){return t===void 0&&(t={}),ve(this,void 0,void 0,function(){var r,n,i,o,a,s,c,l,u;return ye(this,function(d){switch(d.label){case 0:return r=t.ignoreCache,n=At(t,["ignoreCache"]),r?[3,2]:[4,this._getEntryFromCache({scope:n.scope,audience:n.audience||"default",client_id:this.options.client_id})];case 1:if(i=d.sent())return[2,i];d.label=2;case 2:return[4,(f=function(){return Tc.acquireLock("auth0.lock.getTokenSilently",5e3)},h=10,h===void 0&&(h=3),ve(void 0,void 0,void 0,function(){var p;return ye(this,function(m){switch(m.label){case 0:p=0,m.label=1;case 1:return p<h?[4,f()]:[3,4];case 2:if(m.sent())return[2,!0];m.label=3;case 3:return p++,[3,1];case 4:return[2,!1]}})}))];case 3:if(!d.sent())return[3,15];d.label=4;case 4:return d.trys.push([4,,12,14]),window.addEventListener("pagehide",this._releaseLockOnPageHide),r?[3,6]:[4,this._getEntryFromCache({scope:n.scope,audience:n.audience||"default",client_id:this.options.client_id})];case 5:if(i=d.sent())return[2,i];d.label=6;case 6:return this.options.useRefreshTokens?[4,this._getTokenUsingRefreshToken(n)]:[3,8];case 7:return a=d.sent(),[3,10];case 8:return[4,this._getTokenFromIFrame(n)];case 9:a=d.sent(),d.label=10;case 10:return o=a,[4,this.cacheManager.set(se({client_id:this.options.client_id},o))];case 11:return d.sent(),this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),s=o.id_token,c=o.access_token,l=o.oauthTokenScope,u=o.expires_in,[2,se(se({id_token:s,access_token:c},l?{scope:l}:null),{expires_in:u})];case 12:return[4,Tc.releaseLock("auth0.lock.getTokenSilently")];case 13:return d.sent(),window.removeEventListener("pagehide",this._releaseLockOnPageHide),[7];case 14:return[3,16];case 15:throw new Hu;case 16:return[2]}var f,h})})},e.prototype.getTokenWithPopup=function(t,r){return t===void 0&&(t={}),r===void 0&&(r={}),ve(this,void 0,void 0,function(){return ye(this,function(n){switch(n.label){case 0:return t.audience=t.audience||this.options.audience,t.scope=qr(this.defaultScope,this.scope,t.scope),r=se(se({},F3),r),[4,this.loginWithPopup(t,r)];case 1:return n.sent(),[4,this.cacheManager.get(new En({scope:t.scope,audience:t.audience||"default",client_id:this.options.client_id}))];case 2:return[2,n.sent().access_token]}})})},e.prototype.isAuthenticated=function(){return ve(this,void 0,void 0,function(){return ye(this,function(t){switch(t.label){case 0:return[4,this.getUser()];case 1:return[2,!!t.sent()]}})})},e.prototype.buildLogoutUrl=function(t){t===void 0&&(t={}),t.client_id!==null?t.client_id=t.client_id||this.options.client_id:delete t.client_id;var r=t.federated,n=At(t,["federated"]),i=r?"&federated":"";return this._url("/v2/logout?".concat(Gu(n)))+i},e.prototype.logout=function(t){var r=this;t===void 0&&(t={});var n=t.localOnly,i=At(t,["localOnly"]);if(n&&i.federated)throw new Error("It is invalid to set both the `federated` and `localOnly` options to `true`");var o=function(){if(r.cookieStorage.remove(r.orgHintCookieName,{cookieDomain:r.options.cookieDomain}),r.cookieStorage.remove(r.isAuthenticatedCookieName,{cookieDomain:r.options.cookieDomain}),!n){var a=r.buildLogoutUrl(i);window.location.assign(a)}};if(this.options.cache)return this.cacheManager.clear().then(function(){return o()});this.cacheManager.clearSync(),o()},e.prototype._getTokenFromIFrame=function(t){return ve(this,void 0,void 0,function(){var r,n,i,o,a,s,c,l,u,d,f,h,p,m,v,y,b;return ye(this,function(g){switch(g.label){case 0:return r=Gn(Or()),n=Gn(Or()),i=Or(),[4,Ec(i)];case 1:o=g.sent(),a=Oc(o),s=At(t,["detailedResponse"]),c=this._getParams(s,r,n,a,t.redirect_uri||this.options.redirect_uri||window.location.origin),(l=this.cookieStorage.get(this.orgHintCookieName))&&!c.organization&&(c.organization=l),u=this._authorizeUrl(se(se({},c),{prompt:"none",response_mode:"web_message"})),g.label=2;case 2:if(g.trys.push([2,6,,7]),window.crossOriginIsolated)throw new Lr("login_required","The application is running in a Cross-Origin Isolated context, silently retrieving a token without refresh token is not possible.");return d=t.timeoutInSeconds||this.options.authorizeTimeoutInSeconds,[4,(_=u,k=this.domainUrl,E=d,E===void 0&&(E=60),new Promise(function(x,T){var j=window.document.createElement("iframe");j.setAttribute("width","0"),j.setAttribute("height","0"),j.style.display="none";var z,K=function(){window.document.body.contains(j)&&(window.document.body.removeChild(j),window.removeEventListener("message",z,!1))},D=setTimeout(function(){T(new Hu),K()},1e3*E);z=function(L){if(L.origin==k&&L.data&&L.data.type==="authorization_response"){var R=L.source;R&&R.close(),L.data.response.error?T(Lr.fromPayload(L.data.response)):x(L.data.response),clearTimeout(D),window.removeEventListener("message",z,!1),setTimeout(K,2e3)}},window.addEventListener("message",z,!1),window.document.body.appendChild(j),j.setAttribute("src",_)}))];case 3:if(f=g.sent(),r!==f.state)throw new Error("Invalid state");return h=t.scope,p=t.audience,m=At(t,["scope","audience","redirect_uri","ignoreCache","timeoutInSeconds","detailedResponse"]),[4,ia(se(se(se({},this.customOptions),m),{scope:h,audience:p,baseUrl:this.domainUrl,client_id:this.options.client_id,code_verifier:i,code:f.code,grant_type:"authorization_code",redirect_uri:c.redirect_uri,auth0Client:this.options.auth0Client,useFormData:this.options.useFormData,timeout:m.timeout||this.httpTimeoutMs}),this.worker)];case 4:return v=g.sent(),[4,this._verifyIdToken(v.id_token,n)];case 5:return y=g.sent(),this._processOrgIdHint(y.claims.org_id),[2,se(se({},v),{decodedToken:y,scope:c.scope,oauthTokenScope:v.scope,audience:c.audience||"default"})];case 6:throw(b=g.sent()).error==="login_required"&&this.logout({localOnly:!0}),b;case 7:return[2]}var _,k,E})})},e.prototype._getTokenUsingRefreshToken=function(t){return ve(this,void 0,void 0,function(){var r,n,i,o,a,s,c,l,u;return ye(this,function(d){switch(d.label){case 0:return t.scope=qr(this.defaultScope,this.options.scope,t.scope),[4,this.cacheManager.get(new En({scope:t.scope,audience:t.audience||"default",client_id:this.options.client_id}))];case 1:return(r=d.sent())&&r.refresh_token||this.worker?[3,4]:this.useRefreshTokensFallback?[4,this._getTokenFromIFrame(t)]:[3,3];case 2:return[2,d.sent()];case 3:throw new V3(t.audience||"default",t.scope);case 4:n=t.redirect_uri||this.options.redirect_uri||window.location.origin,o=t.scope,a=t.audience,s=At(t,["scope","audience","ignoreCache","timeoutInSeconds","detailedResponse"]),c=typeof t.timeoutInSeconds=="number"?1e3*t.timeoutInSeconds:null,d.label=5;case 5:return d.trys.push([5,7,,10]),[4,ia(se(se(se(se(se({},this.customOptions),s),{audience:a,scope:o,baseUrl:this.domainUrl,client_id:this.options.client_id,grant_type:"refresh_token",refresh_token:r&&r.refresh_token,redirect_uri:n}),c&&{timeout:c}),{auth0Client:this.options.auth0Client,useFormData:this.options.useFormData,timeout:this.httpTimeoutMs}),this.worker)];case 6:return i=d.sent(),[3,10];case 7:return((l=d.sent()).message.indexOf("Missing Refresh Token")>-1||l.message&&l.message.indexOf("invalid refresh token")>-1)&&this.useRefreshTokensFallback?[4,this._getTokenFromIFrame(t)]:[3,9];case 8:return[2,d.sent()];case 9:throw l;case 10:return[4,this._verifyIdToken(i.id_token)];case 11:return u=d.sent(),[2,se(se({},i),{decodedToken:u,scope:t.scope,oauthTokenScope:i.scope,audience:t.audience||"default"})]}})})},e.prototype._getEntryFromCache=function(t){var r=t.scope,n=t.audience,i=t.client_id;return ve(this,void 0,void 0,function(){var o,a,s,c,l;return ye(this,function(u){switch(u.label){case 0:return[4,this.cacheManager.get(new En({scope:r,audience:n,client_id:i}),60)];case 1:return(o=u.sent())&&o.access_token?(a=o.id_token,s=o.access_token,c=o.oauthTokenScope,l=o.expires_in,[2,se(se({id_token:a,access_token:s},c?{scope:c}:null),{expires_in:l})]):[2]}})})},e}(),Nc="Invariant Violation",N0=Object.setPrototypeOf,d4=N0===void 0?function(e,t){return e.__proto__=t,e}:N0,be=function(e){lr(t,e);function t(r){r===void 0&&(r=Nc);var n=e.call(this,typeof r=="number"?Nc+": "+r+" (see https://github.com/apollographql/invariant-packages)":r)||this;return n.framesToPop=1,n.name=Nc,d4(n,t.prototype),n}return t}(Error);function B(e,t){if(!e)throw new be(t)}var Gb=["debug","log","warn","error","silent"],f4=Gb.indexOf("log");function oa(e){return function(){if(Gb.indexOf(e)>=f4){var t=console[e]||console.log;return t.apply(console,arguments)}}}(function(e){e.debug=oa("debug"),e.log=oa("log"),e.warn=oa("warn"),e.error=oa("error")})(B||(B={}));function qt(e){try{return e()}catch{}}const I0=qt(function(){return globalThis})||qt(function(){return window})||qt(function(){return self})||qt(function(){return global})||qt(function(){return qt.constructor("return this")()});var A0="__",D0=[A0,A0].join("DEV");function h4(){try{return Boolean(__DEV__)}catch{return Object.defineProperty(I0,D0,{value:qt(function(){return"production"})!=="production",enumerable:!1,configurable:!0,writable:!0}),I0[D0]}}const Ic=h4();function Yr(e){try{return e()}catch{}}var Qu=Yr(function(){return globalThis})||Yr(function(){return window})||Yr(function(){return self})||Yr(function(){return global})||Yr(function(){return Yr.constructor("return this")()}),Ku=!1;function p4(){Qu&&!Yr(function(){return"production"})&&!Yr(function(){return process})&&(Object.defineProperty(Qu,"process",{value:{env:{NODE_ENV:"production"}},configurable:!0,enumerable:!1,writable:!0}),Ku=!0)}p4();function R0(){Ku&&(delete Qu.process,Ku=!1)}function ka(e,t){if(!Boolean(e))throw new Error(t)}function m4(e){return typeof e=="object"&&e!==null}function v4(e,t){if(!Boolean(e))throw new Error(t??"Unexpected invariant triggered.")}const y4=/\r\n|[\n\r]/g;function Yu(e,t){let r=0,n=1;for(const i of e.body.matchAll(y4)){if(typeof i.index=="number"||v4(!1),i.index>=t)break;r=i.index+i[0].length,n+=1}return{line:n,column:t+1-r}}function g4(e){return Qb(e.source,Yu(e.source,e.start))}function Qb(e,t){const r=e.locationOffset.column-1,n="".padStart(r)+e.body,i=t.line-1,o=e.locationOffset.line-1,a=t.line+o,s=t.line===1?r:0,c=t.column+s,l=`${e.name}:${a}:${c}
5
5
  `,u=n.split(/\r\n|[\n\r]/g),d=u[i];if(d.length>120){const f=Math.floor(c/80),h=c%80,p=[];for(let m=0;m<d.length;m+=80)p.push(d.slice(m,m+80));return l+F0([[`${a} |`,p[0]],...p.slice(1,f+1).map(m=>["|",m]),["|","^".padStart(h)],["|",p[f+1]]])}return l+F0([[`${a-1} |`,u[i-1]],[`${a} |`,d],["|","^".padStart(c)],[`${a+1} |`,u[i+1]]])}function F0(e){const t=e.filter(([n,i])=>i!==void 0),r=Math.max(...t.map(([n])=>n.length));return t.map(([n,i])=>n.padStart(r)+(i?" "+i:"")).join(`
6
- `)}function b4(e){const t=e[0];return t==null||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}class $h extends Error{constructor(t,...r){var n,i,o;const{nodes:a,source:s,positions:c,path:l,originalError:u,extensions:d}=b4(r);super(t),this.name="GraphQLError",this.path=l??void 0,this.originalError=u??void 0,this.nodes=L0(Array.isArray(a)?a:a?[a]:void 0);const f=L0((n=this.nodes)===null||n===void 0?void 0:n.map(p=>p.loc).filter(p=>p!=null));this.source=s??(f==null||(i=f[0])===null||i===void 0?void 0:i.source),this.positions=c??f?.map(p=>p.start),this.locations=c&&s?c.map(p=>Ku(s,p)):f?.map(p=>Ku(p.source,p.start));const h=m4(u?.extensions)?u?.extensions:void 0;this.extensions=(o=d??h)!==null&&o!==void 0?o:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),u!=null&&u.stack?Object.defineProperty(this,"stack",{value:u.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,$h):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(const r of this.nodes)r.loc&&(t+=`
6
+ `)}function b4(e){const t=e[0];return t==null||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}class wh extends Error{constructor(t,...r){var n,i,o;const{nodes:a,source:s,positions:c,path:l,originalError:u,extensions:d}=b4(r);super(t),this.name="GraphQLError",this.path=l??void 0,this.originalError=u??void 0,this.nodes=L0(Array.isArray(a)?a:a?[a]:void 0);const f=L0((n=this.nodes)===null||n===void 0?void 0:n.map(p=>p.loc).filter(p=>p!=null));this.source=s??(f==null||(i=f[0])===null||i===void 0?void 0:i.source),this.positions=c??f?.map(p=>p.start),this.locations=c&&s?c.map(p=>Yu(s,p)):f?.map(p=>Yu(p.source,p.start));const h=m4(u?.extensions)?u?.extensions:void 0;this.extensions=(o=d??h)!==null&&o!==void 0?o:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),u!=null&&u.stack?Object.defineProperty(this,"stack",{value:u.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,wh):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(const r of this.nodes)r.loc&&(t+=`
7
7
 
8
8
  `+g4(r.loc));else if(this.source&&this.locations)for(const r of this.locations)t+=`
9
9
 
10
- `+Qb(this.source,r);return t}toJSON(){const t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}}function L0(e){return e===void 0||e.length===0?void 0:e}function ct(e,t,r){return new $h(`Syntax Error: ${r}`,{source:e,positions:[t]})}class $4{constructor(t,r,n){this.start=t.start,this.end=r.end,this.startToken=t,this.endToken=r,this.source=n}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}class Kb{constructor(t,r,n,i,o,a){this.kind=t,this.start=r,this.end=n,this.line=i,this.column=o,this.value=a,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}const Yb={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},w4=new Set(Object.keys(Yb));function M0(e){const t=e?.kind;return typeof t=="string"&&w4.has(t)}var oi;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(oi||(oi={}));var Yu;(function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(Yu||(Yu={}));var Z;(function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(Z||(Z={}));function Xu(e){return e===9||e===32}function ko(e){return e>=48&&e<=57}function Xb(e){return e>=97&&e<=122||e>=65&&e<=90}function Zb(e){return Xb(e)||e===95}function _4(e){return Xb(e)||ko(e)||e===95}function x4(e){var t;let r=Number.MAX_SAFE_INTEGER,n=null,i=-1;for(let a=0;a<e.length;++a){var o;const s=e[a],c=S4(s);c!==s.length&&(n=(o=n)!==null&&o!==void 0?o:a,i=a,a!==0&&c<r&&(r=c))}return e.map((a,s)=>s===0?a:a.slice(r)).slice((t=n)!==null&&t!==void 0?t:0,i+1)}function S4(e){let t=0;for(;t<e.length&&Xu(e.charCodeAt(t));)++t;return t}function k4(e,t){const r=e.replace(/"""/g,'\\"""'),n=r.split(/\r\n|[\n\r]/g),i=n.length===1,o=n.length>1&&n.slice(1).every(h=>h.length===0||Xu(h.charCodeAt(0))),a=r.endsWith('\\"""'),s=e.endsWith('"')&&!a,c=e.endsWith("\\"),l=s||c,u=!(t!=null&&t.minimize)&&(!i||e.length>70||l||o||a);let d="";const f=i&&Xu(e.charCodeAt(0));return(u&&!f||o)&&(d+=`
10
+ `+Qb(this.source,r);return t}toJSON(){const t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}}function L0(e){return e===void 0||e.length===0?void 0:e}function ct(e,t,r){return new wh(`Syntax Error: ${r}`,{source:e,positions:[t]})}class $4{constructor(t,r,n){this.start=t.start,this.end=r.end,this.startToken=t,this.endToken=r,this.source=n}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}class Kb{constructor(t,r,n,i,o,a){this.kind=t,this.start=r,this.end=n,this.line=i,this.column=o,this.value=a,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}const Yb={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},w4=new Set(Object.keys(Yb));function M0(e){const t=e?.kind;return typeof t=="string"&&w4.has(t)}var oi;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(oi||(oi={}));var Xu;(function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(Xu||(Xu={}));var Z;(function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(Z||(Z={}));function Zu(e){return e===9||e===32}function ko(e){return e>=48&&e<=57}function Xb(e){return e>=97&&e<=122||e>=65&&e<=90}function Zb(e){return Xb(e)||e===95}function _4(e){return Xb(e)||ko(e)||e===95}function x4(e){var t;let r=Number.MAX_SAFE_INTEGER,n=null,i=-1;for(let a=0;a<e.length;++a){var o;const s=e[a],c=S4(s);c!==s.length&&(n=(o=n)!==null&&o!==void 0?o:a,i=a,a!==0&&c<r&&(r=c))}return e.map((a,s)=>s===0?a:a.slice(r)).slice((t=n)!==null&&t!==void 0?t:0,i+1)}function S4(e){let t=0;for(;t<e.length&&Zu(e.charCodeAt(t));)++t;return t}function k4(e,t){const r=e.replace(/"""/g,'\\"""'),n=r.split(/\r\n|[\n\r]/g),i=n.length===1,o=n.length>1&&n.slice(1).every(h=>h.length===0||Zu(h.charCodeAt(0))),a=r.endsWith('\\"""'),s=e.endsWith('"')&&!a,c=e.endsWith("\\"),l=s||c,u=!(t!=null&&t.minimize)&&(!i||e.length>70||l||o||a);let d="";const f=i&&Zu(e.charCodeAt(0));return(u&&!f||o)&&(d+=`
11
11
  `),d+=r,(u||l)&&(d+=`
12
- `),'"""'+d+'"""'}var I;(function(e){e.SOF="<SOF>",e.EOF="<EOF>",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"})(I||(I={}));class E4{constructor(t){const r=new Kb(I.SOF,0,0,0,0);this.source=t,this.lastToken=r,this.token=r,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let t=this.token;if(t.kind!==I.EOF)do if(t.next)t=t.next;else{const r=C4(this,t.end);t.next=r,r.prev=t,t=r}while(t.kind===I.COMMENT);return t}}function O4(e){return e===I.BANG||e===I.DOLLAR||e===I.AMP||e===I.PAREN_L||e===I.PAREN_R||e===I.SPREAD||e===I.COLON||e===I.EQUALS||e===I.AT||e===I.BRACKET_L||e===I.BRACKET_R||e===I.BRACE_L||e===I.PIPE||e===I.BRACE_R}function Mi(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function Bl(e,t){return Jb(e.charCodeAt(t))&&e1(e.charCodeAt(t+1))}function Jb(e){return e>=55296&&e<=56319}function e1(e){return e>=56320&&e<=57343}function Fn(e,t){const r=e.source.body.codePointAt(t);if(r===void 0)return I.EOF;if(r>=32&&r<=126){const n=String.fromCodePoint(r);return n==='"'?`'"'`:`"${n}"`}return"U+"+r.toString(16).toUpperCase().padStart(4,"0")}function Je(e,t,r,n,i){const o=e.line,a=1+r-e.lineStart;return new Kb(t,r,n,o,a,i)}function C4(e,t){const r=e.source.body,n=r.length;let i=t;for(;i<n;){const o=r.charCodeAt(i);switch(o){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++e.line,e.lineStart=i;continue;case 13:r.charCodeAt(i+1)===10?i+=2:++i,++e.line,e.lineStart=i;continue;case 35:return P4(e,i);case 33:return Je(e,I.BANG,i,i+1);case 36:return Je(e,I.DOLLAR,i,i+1);case 38:return Je(e,I.AMP,i,i+1);case 40:return Je(e,I.PAREN_L,i,i+1);case 41:return Je(e,I.PAREN_R,i,i+1);case 46:if(r.charCodeAt(i+1)===46&&r.charCodeAt(i+2)===46)return Je(e,I.SPREAD,i,i+3);break;case 58:return Je(e,I.COLON,i,i+1);case 61:return Je(e,I.EQUALS,i,i+1);case 64:return Je(e,I.AT,i,i+1);case 91:return Je(e,I.BRACKET_L,i,i+1);case 93:return Je(e,I.BRACKET_R,i,i+1);case 123:return Je(e,I.BRACE_L,i,i+1);case 124:return Je(e,I.PIPE,i,i+1);case 125:return Je(e,I.BRACE_R,i,i+1);case 34:return r.charCodeAt(i+1)===34&&r.charCodeAt(i+2)===34?R4(e,i):N4(e,i)}if(ko(o)||o===45)return T4(e,i,o);if(Zb(o))return F4(e,i);throw ct(e.source,i,o===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:Mi(o)||Bl(r,i)?`Unexpected character: ${Fn(e,i)}.`:`Invalid character: ${Fn(e,i)}.`)}return Je(e,I.EOF,n,n)}function P4(e,t){const r=e.source.body,n=r.length;let i=t+1;for(;i<n;){const o=r.charCodeAt(i);if(o===10||o===13)break;if(Mi(o))++i;else if(Bl(r,i))i+=2;else break}return Je(e,I.COMMENT,t,i,r.slice(t+1,i))}function T4(e,t,r){const n=e.source.body;let i=t,o=r,a=!1;if(o===45&&(o=n.charCodeAt(++i)),o===48){if(o=n.charCodeAt(++i),ko(o))throw ct(e.source,i,`Invalid number, unexpected digit after 0: ${Fn(e,i)}.`)}else i=Ic(e,i,o),o=n.charCodeAt(i);if(o===46&&(a=!0,o=n.charCodeAt(++i),i=Ic(e,i,o),o=n.charCodeAt(i)),(o===69||o===101)&&(a=!0,o=n.charCodeAt(++i),(o===43||o===45)&&(o=n.charCodeAt(++i)),i=Ic(e,i,o),o=n.charCodeAt(i)),o===46||Zb(o))throw ct(e.source,i,`Invalid number, expected digit but got: ${Fn(e,i)}.`);return Je(e,a?I.FLOAT:I.INT,t,i,n.slice(t,i))}function Ic(e,t,r){if(!ko(r))throw ct(e.source,t,`Invalid number, expected digit but got: ${Fn(e,t)}.`);const n=e.source.body;let i=t+1;for(;ko(n.charCodeAt(i));)++i;return i}function N4(e,t){const r=e.source.body,n=r.length;let i=t+1,o=i,a="";for(;i<n;){const s=r.charCodeAt(i);if(s===34)return a+=r.slice(o,i),Je(e,I.STRING,t,i+1,a);if(s===92){a+=r.slice(o,i);const c=r.charCodeAt(i+1)===117?r.charCodeAt(i+2)===123?I4(e,i):A4(e,i):D4(e,i);a+=c.value,i+=c.size,o=i;continue}if(s===10||s===13)break;if(Mi(s))++i;else if(Bl(r,i))i+=2;else throw ct(e.source,i,`Invalid character within String: ${Fn(e,i)}.`)}throw ct(e.source,i,"Unterminated string.")}function I4(e,t){const r=e.source.body;let n=0,i=3;for(;i<12;){const o=r.charCodeAt(t+i++);if(o===125){if(i<5||!Mi(n))break;return{value:String.fromCodePoint(n),size:i}}if(n=n<<4|co(o),n<0)break}throw ct(e.source,t,`Invalid Unicode escape sequence: "${r.slice(t,t+i)}".`)}function A4(e,t){const r=e.source.body,n=j0(r,t+2);if(Mi(n))return{value:String.fromCodePoint(n),size:6};if(Jb(n)&&r.charCodeAt(t+6)===92&&r.charCodeAt(t+7)===117){const i=j0(r,t+8);if(e1(i))return{value:String.fromCodePoint(n,i),size:12}}throw ct(e.source,t,`Invalid Unicode escape sequence: "${r.slice(t,t+6)}".`)}function j0(e,t){return co(e.charCodeAt(t))<<12|co(e.charCodeAt(t+1))<<8|co(e.charCodeAt(t+2))<<4|co(e.charCodeAt(t+3))}function co(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function D4(e,t){const r=e.source.body;switch(r.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:`
13
- `,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw ct(e.source,t,`Invalid character escape sequence: "${r.slice(t,t+2)}".`)}function R4(e,t){const r=e.source.body,n=r.length;let i=e.lineStart,o=t+3,a=o,s="";const c=[];for(;o<n;){const l=r.charCodeAt(o);if(l===34&&r.charCodeAt(o+1)===34&&r.charCodeAt(o+2)===34){s+=r.slice(a,o),c.push(s);const u=Je(e,I.BLOCK_STRING,t,o+3,x4(c).join(`
14
- `));return e.line+=c.length-1,e.lineStart=i,u}if(l===92&&r.charCodeAt(o+1)===34&&r.charCodeAt(o+2)===34&&r.charCodeAt(o+3)===34){s+=r.slice(a,o),a=o+1,o+=4;continue}if(l===10||l===13){s+=r.slice(a,o),c.push(s),l===13&&r.charCodeAt(o+1)===10?o+=2:++o,s="",a=o,i=o;continue}if(Mi(l))++o;else if(Bl(r,o))o+=2;else throw ct(e.source,o,`Invalid character within String: ${Fn(e,o)}.`)}throw ct(e.source,o,"Unterminated string.")}function F4(e,t){const r=e.source.body,n=r.length;let i=t+1;for(;i<n;){const o=r.charCodeAt(i);if(_4(o))++i;else break}return Je(e,I.NAME,t,i,r.slice(t,i))}const L4=10,t1=2;function r1(e){return Wl(e,[])}function Wl(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return M4(e,t);default:return String(e)}}function M4(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";const r=[...t,e];if(j4(e)){const n=e.toJSON();if(n!==e)return typeof n=="string"?n:Wl(n,r)}else if(Array.isArray(e))return U4(e,r);return z4(e,r)}function j4(e){return typeof e.toJSON=="function"}function z4(e,t){const r=Object.entries(e);return r.length===0?"{}":t.length>t1?"["+V4(e)+"]":"{ "+r.map(([i,o])=>i+": "+Wl(o,t)).join(", ")+" }"}function U4(e,t){if(e.length===0)return"[]";if(t.length>t1)return"[Array]";const r=Math.min(L4,e.length),n=e.length-r,i=[];for(let o=0;o<r;++o)i.push(Wl(e[o],t));return n===1?i.push("... 1 more item"):n>1&&i.push(`... ${n} more items`),"["+i.join(", ")+"]"}function V4(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){const r=e.constructor.name;if(typeof r=="string"&&r!=="")return r}return t}const B4=function(t,r){return t instanceof r};class wh{constructor(t,r="GraphQL request",n={line:1,column:1}){typeof t=="string"||ka(!1,`Body must be a string. Received: ${r1(t)}.`),this.body=t,this.name=r,this.locationOffset=n,this.locationOffset.line>0||ka(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||ka(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function W4(e){return B4(e,wh)}function q4(e,t){return new H4(e,t).parseDocument()}class H4{constructor(t,r={}){const n=W4(t)?t:new wh(t);this._lexer=new E4(n),this._options=r,this._tokenCounter=0}parseName(){const t=this.expectToken(I.NAME);return this.node(t,{kind:Z.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:Z.DOCUMENT,definitions:this.many(I.SOF,this.parseDefinition,I.EOF)})}parseDefinition(){if(this.peek(I.BRACE_L))return this.parseOperationDefinition();const t=this.peekDescription(),r=t?this._lexer.lookahead():this._lexer.token;if(r.kind===I.NAME){switch(r.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(t)throw ct(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(r.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(r)}parseOperationDefinition(){const t=this._lexer.token;if(this.peek(I.BRACE_L))return this.node(t,{kind:Z.OPERATION_DEFINITION,operation:oi.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const r=this.parseOperationType();let n;return this.peek(I.NAME)&&(n=this.parseName()),this.node(t,{kind:Z.OPERATION_DEFINITION,operation:r,name:n,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const t=this.expectToken(I.NAME);switch(t.value){case"query":return oi.QUERY;case"mutation":return oi.MUTATION;case"subscription":return oi.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(I.PAREN_L,this.parseVariableDefinition,I.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:Z.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(I.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(I.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const t=this._lexer.token;return this.expectToken(I.DOLLAR),this.node(t,{kind:Z.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:Z.SELECTION_SET,selections:this.many(I.BRACE_L,this.parseSelection,I.BRACE_R)})}parseSelection(){return this.peek(I.SPREAD)?this.parseFragment():this.parseField()}parseField(){const t=this._lexer.token,r=this.parseName();let n,i;return this.expectOptionalToken(I.COLON)?(n=r,i=this.parseName()):i=r,this.node(t,{kind:Z.FIELD,alias:n,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(I.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){const r=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(I.PAREN_L,r,I.PAREN_R)}parseArgument(t=!1){const r=this._lexer.token,n=this.parseName();return this.expectToken(I.COLON),this.node(r,{kind:Z.ARGUMENT,name:n,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const t=this._lexer.token;this.expectToken(I.SPREAD);const r=this.expectOptionalKeyword("on");return!r&&this.peek(I.NAME)?this.node(t,{kind:Z.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:Z.INLINE_FRAGMENT,typeCondition:r?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const t=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:Z.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:Z.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){const r=this._lexer.token;switch(r.kind){case I.BRACKET_L:return this.parseList(t);case I.BRACE_L:return this.parseObject(t);case I.INT:return this.advanceLexer(),this.node(r,{kind:Z.INT,value:r.value});case I.FLOAT:return this.advanceLexer(),this.node(r,{kind:Z.FLOAT,value:r.value});case I.STRING:case I.BLOCK_STRING:return this.parseStringLiteral();case I.NAME:switch(this.advanceLexer(),r.value){case"true":return this.node(r,{kind:Z.BOOLEAN,value:!0});case"false":return this.node(r,{kind:Z.BOOLEAN,value:!1});case"null":return this.node(r,{kind:Z.NULL});default:return this.node(r,{kind:Z.ENUM,value:r.value})}case I.DOLLAR:if(t)if(this.expectToken(I.DOLLAR),this._lexer.token.kind===I.NAME){const n=this._lexer.token.value;throw ct(this._lexer.source,r.start,`Unexpected variable "$${n}" in constant value.`)}else throw this.unexpected(r);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:Z.STRING,value:t.value,block:t.kind===I.BLOCK_STRING})}parseList(t){const r=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:Z.LIST,values:this.any(I.BRACKET_L,r,I.BRACKET_R)})}parseObject(t){const r=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:Z.OBJECT,fields:this.any(I.BRACE_L,r,I.BRACE_R)})}parseObjectField(t){const r=this._lexer.token,n=this.parseName();return this.expectToken(I.COLON),this.node(r,{kind:Z.OBJECT_FIELD,name:n,value:this.parseValueLiteral(t)})}parseDirectives(t){const r=[];for(;this.peek(I.AT);)r.push(this.parseDirective(t));return r}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){const r=this._lexer.token;return this.expectToken(I.AT),this.node(r,{kind:Z.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){const t=this._lexer.token;let r;if(this.expectOptionalToken(I.BRACKET_L)){const n=this.parseTypeReference();this.expectToken(I.BRACKET_R),r=this.node(t,{kind:Z.LIST_TYPE,type:n})}else r=this.parseNamedType();return this.expectOptionalToken(I.BANG)?this.node(t,{kind:Z.NON_NULL_TYPE,type:r}):r}parseNamedType(){return this.node(this._lexer.token,{kind:Z.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(I.STRING)||this.peek(I.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("schema");const n=this.parseConstDirectives(),i=this.many(I.BRACE_L,this.parseOperationTypeDefinition,I.BRACE_R);return this.node(t,{kind:Z.SCHEMA_DEFINITION,description:r,directives:n,operationTypes:i})}parseOperationTypeDefinition(){const t=this._lexer.token,r=this.parseOperationType();this.expectToken(I.COLON);const n=this.parseNamedType();return this.node(t,{kind:Z.OPERATION_TYPE_DEFINITION,operation:r,type:n})}parseScalarTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("scalar");const n=this.parseName(),i=this.parseConstDirectives();return this.node(t,{kind:Z.SCALAR_TYPE_DEFINITION,description:r,name:n,directives:i})}parseObjectTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("type");const n=this.parseName(),i=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:Z.OBJECT_TYPE_DEFINITION,description:r,name:n,interfaces:i,directives:o,fields:a})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(I.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(I.BRACE_L,this.parseFieldDefinition,I.BRACE_R)}parseFieldDefinition(){const t=this._lexer.token,r=this.parseDescription(),n=this.parseName(),i=this.parseArgumentDefs();this.expectToken(I.COLON);const o=this.parseTypeReference(),a=this.parseConstDirectives();return this.node(t,{kind:Z.FIELD_DEFINITION,description:r,name:n,arguments:i,type:o,directives:a})}parseArgumentDefs(){return this.optionalMany(I.PAREN_L,this.parseInputValueDef,I.PAREN_R)}parseInputValueDef(){const t=this._lexer.token,r=this.parseDescription(),n=this.parseName();this.expectToken(I.COLON);const i=this.parseTypeReference();let o;this.expectOptionalToken(I.EQUALS)&&(o=this.parseConstValueLiteral());const a=this.parseConstDirectives();return this.node(t,{kind:Z.INPUT_VALUE_DEFINITION,description:r,name:n,type:i,defaultValue:o,directives:a})}parseInterfaceTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("interface");const n=this.parseName(),i=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:Z.INTERFACE_TYPE_DEFINITION,description:r,name:n,interfaces:i,directives:o,fields:a})}parseUnionTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("union");const n=this.parseName(),i=this.parseConstDirectives(),o=this.parseUnionMemberTypes();return this.node(t,{kind:Z.UNION_TYPE_DEFINITION,description:r,name:n,directives:i,types:o})}parseUnionMemberTypes(){return this.expectOptionalToken(I.EQUALS)?this.delimitedMany(I.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("enum");const n=this.parseName(),i=this.parseConstDirectives(),o=this.parseEnumValuesDefinition();return this.node(t,{kind:Z.ENUM_TYPE_DEFINITION,description:r,name:n,directives:i,values:o})}parseEnumValuesDefinition(){return this.optionalMany(I.BRACE_L,this.parseEnumValueDefinition,I.BRACE_R)}parseEnumValueDefinition(){const t=this._lexer.token,r=this.parseDescription(),n=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(t,{kind:Z.ENUM_VALUE_DEFINITION,description:r,name:n,directives:i})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw ct(this._lexer.source,this._lexer.token.start,`${aa(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("input");const n=this.parseName(),i=this.parseConstDirectives(),o=this.parseInputFieldsDefinition();return this.node(t,{kind:Z.INPUT_OBJECT_TYPE_DEFINITION,description:r,name:n,directives:i,fields:o})}parseInputFieldsDefinition(){return this.optionalMany(I.BRACE_L,this.parseInputValueDef,I.BRACE_R)}parseTypeSystemExtension(){const t=this._lexer.lookahead();if(t.kind===I.NAME)switch(t.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(t)}parseSchemaExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const r=this.parseConstDirectives(),n=this.optionalMany(I.BRACE_L,this.parseOperationTypeDefinition,I.BRACE_R);if(r.length===0&&n.length===0)throw this.unexpected();return this.node(t,{kind:Z.SCHEMA_EXTENSION,directives:r,operationTypes:n})}parseScalarTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const r=this.parseName(),n=this.parseConstDirectives();if(n.length===0)throw this.unexpected();return this.node(t,{kind:Z.SCALAR_TYPE_EXTENSION,name:r,directives:n})}parseObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();if(n.length===0&&i.length===0&&o.length===0)throw this.unexpected();return this.node(t,{kind:Z.OBJECT_TYPE_EXTENSION,name:r,interfaces:n,directives:i,fields:o})}parseInterfaceTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();if(n.length===0&&i.length===0&&o.length===0)throw this.unexpected();return this.node(t,{kind:Z.INTERFACE_TYPE_EXTENSION,name:r,interfaces:n,directives:i,fields:o})}parseUnionTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const r=this.parseName(),n=this.parseConstDirectives(),i=this.parseUnionMemberTypes();if(n.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:Z.UNION_TYPE_EXTENSION,name:r,directives:n,types:i})}parseEnumTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const r=this.parseName(),n=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();if(n.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:Z.ENUM_TYPE_EXTENSION,name:r,directives:n,values:i})}parseInputObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const r=this.parseName(),n=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();if(n.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:Z.INPUT_OBJECT_TYPE_EXTENSION,name:r,directives:n,fields:i})}parseDirectiveDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("directive"),this.expectToken(I.AT);const n=this.parseName(),i=this.parseArgumentDefs(),o=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const a=this.parseDirectiveLocations();return this.node(t,{kind:Z.DIRECTIVE_DEFINITION,description:r,name:n,arguments:i,repeatable:o,locations:a})}parseDirectiveLocations(){return this.delimitedMany(I.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const t=this._lexer.token,r=this.parseName();if(Object.prototype.hasOwnProperty.call(Yu,r.value))return r;throw this.unexpected(t)}node(t,r){return this._options.noLocation!==!0&&(r.loc=new $4(t,this._lexer.lastToken,this._lexer.source)),r}peek(t){return this._lexer.token.kind===t}expectToken(t){const r=this._lexer.token;if(r.kind===t)return this.advanceLexer(),r;throw ct(this._lexer.source,r.start,`Expected ${n1(t)}, found ${aa(r)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){const r=this._lexer.token;if(r.kind===I.NAME&&r.value===t)this.advanceLexer();else throw ct(this._lexer.source,r.start,`Expected "${t}", found ${aa(r)}.`)}expectOptionalKeyword(t){const r=this._lexer.token;return r.kind===I.NAME&&r.value===t?(this.advanceLexer(),!0):!1}unexpected(t){const r=t??this._lexer.token;return ct(this._lexer.source,r.start,`Unexpected ${aa(r)}.`)}any(t,r,n){this.expectToken(t);const i=[];for(;!this.expectOptionalToken(n);)i.push(r.call(this));return i}optionalMany(t,r,n){if(this.expectOptionalToken(t)){const i=[];do i.push(r.call(this));while(!this.expectOptionalToken(n));return i}return[]}many(t,r,n){this.expectToken(t);const i=[];do i.push(r.call(this));while(!this.expectOptionalToken(n));return i}delimitedMany(t,r){this.expectOptionalToken(t);const n=[];do n.push(r.call(this));while(this.expectOptionalToken(t));return n}advanceLexer(){const{maxTokens:t}=this._options,r=this._lexer.advance();if(t!==void 0&&r.kind!==I.EOF&&(++this._tokenCounter,this._tokenCounter>t))throw ct(this._lexer.source,r.start,`Document contains more that ${t} tokens. Parsing aborted.`)}}function aa(e){const t=e.value;return n1(e.kind)+(t!=null?` "${t}"`:"")}function n1(e){return O4(e)?`"${e}"`:e}function G4(e){return`"${e.replace(Q4,K4)}"`}const Q4=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function K4(e){return Y4[e.charCodeAt(0)]}const Y4=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"],_h=Object.freeze({});function ar(e,t,r=Yb){const n=new Map;for(const y of Object.values(Z))n.set(y,X4(t,y));let i,o=Array.isArray(e),a=[e],s=-1,c=[],l=e,u,d;const f=[],h=[];do{s++;const y=s===a.length,b=y&&c.length!==0;if(y){if(u=h.length===0?void 0:f[f.length-1],l=d,d=h.pop(),b)if(o){l=l.slice();let _=0;for(const[S,E]of c){const x=S-_;E===null?(l.splice(x,1),_++):l[x]=E}}else{l=Object.defineProperties({},Object.getOwnPropertyDescriptors(l));for(const[_,S]of c)l[_]=S}s=i.index,a=i.keys,c=i.edits,o=i.inArray,i=i.prev}else if(d){if(u=o?s:a[s],l=d[u],l==null)continue;f.push(u)}let g;if(!Array.isArray(l)){var p,m;M0(l)||ka(!1,`Invalid AST Node: ${r1(l)}.`);const _=y?(p=n.get(l.kind))===null||p===void 0?void 0:p.leave:(m=n.get(l.kind))===null||m===void 0?void 0:m.enter;if(g=_?.call(t,l,u,d,f,h),g===_h)break;if(g===!1){if(!y){f.pop();continue}}else if(g!==void 0&&(c.push([u,g]),!y))if(M0(g))l=g;else{f.pop();continue}}if(g===void 0&&b&&c.push([u,l]),y)f.pop();else{var v;i={inArray:o,index:s,keys:a,edits:c,prev:i},o=Array.isArray(l),a=o?l:(v=r[l.kind])!==null&&v!==void 0?v:[],s=-1,c=[],d&&h.push(d),d=l}}while(i!==void 0);return c.length!==0?c[c.length-1][1]:e}function X4(e,t){const r=e[t];return typeof r=="object"?r:typeof r=="function"?{enter:r,leave:void 0}:{enter:e.enter,leave:e.leave}}function Z4(e){return ar(e,e5)}const J4=80,e5={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>H(e.definitions,`
12
+ `),'"""'+d+'"""'}var N;(function(e){e.SOF="<SOF>",e.EOF="<EOF>",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"})(N||(N={}));class E4{constructor(t){const r=new Kb(N.SOF,0,0,0,0);this.source=t,this.lastToken=r,this.token=r,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let t=this.token;if(t.kind!==N.EOF)do if(t.next)t=t.next;else{const r=C4(this,t.end);t.next=r,r.prev=t,t=r}while(t.kind===N.COMMENT);return t}}function O4(e){return e===N.BANG||e===N.DOLLAR||e===N.AMP||e===N.PAREN_L||e===N.PAREN_R||e===N.SPREAD||e===N.COLON||e===N.EQUALS||e===N.AT||e===N.BRACKET_L||e===N.BRACKET_R||e===N.BRACE_L||e===N.PIPE||e===N.BRACE_R}function Mi(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function Bl(e,t){return Jb(e.charCodeAt(t))&&e1(e.charCodeAt(t+1))}function Jb(e){return e>=55296&&e<=56319}function e1(e){return e>=56320&&e<=57343}function Fn(e,t){const r=e.source.body.codePointAt(t);if(r===void 0)return N.EOF;if(r>=32&&r<=126){const n=String.fromCodePoint(r);return n==='"'?`'"'`:`"${n}"`}return"U+"+r.toString(16).toUpperCase().padStart(4,"0")}function Je(e,t,r,n,i){const o=e.line,a=1+r-e.lineStart;return new Kb(t,r,n,o,a,i)}function C4(e,t){const r=e.source.body,n=r.length;let i=t;for(;i<n;){const o=r.charCodeAt(i);switch(o){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++e.line,e.lineStart=i;continue;case 13:r.charCodeAt(i+1)===10?i+=2:++i,++e.line,e.lineStart=i;continue;case 35:return P4(e,i);case 33:return Je(e,N.BANG,i,i+1);case 36:return Je(e,N.DOLLAR,i,i+1);case 38:return Je(e,N.AMP,i,i+1);case 40:return Je(e,N.PAREN_L,i,i+1);case 41:return Je(e,N.PAREN_R,i,i+1);case 46:if(r.charCodeAt(i+1)===46&&r.charCodeAt(i+2)===46)return Je(e,N.SPREAD,i,i+3);break;case 58:return Je(e,N.COLON,i,i+1);case 61:return Je(e,N.EQUALS,i,i+1);case 64:return Je(e,N.AT,i,i+1);case 91:return Je(e,N.BRACKET_L,i,i+1);case 93:return Je(e,N.BRACKET_R,i,i+1);case 123:return Je(e,N.BRACE_L,i,i+1);case 124:return Je(e,N.PIPE,i,i+1);case 125:return Je(e,N.BRACE_R,i,i+1);case 34:return r.charCodeAt(i+1)===34&&r.charCodeAt(i+2)===34?R4(e,i):N4(e,i)}if(ko(o)||o===45)return T4(e,i,o);if(Zb(o))return F4(e,i);throw ct(e.source,i,o===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:Mi(o)||Bl(r,i)?`Unexpected character: ${Fn(e,i)}.`:`Invalid character: ${Fn(e,i)}.`)}return Je(e,N.EOF,n,n)}function P4(e,t){const r=e.source.body,n=r.length;let i=t+1;for(;i<n;){const o=r.charCodeAt(i);if(o===10||o===13)break;if(Mi(o))++i;else if(Bl(r,i))i+=2;else break}return Je(e,N.COMMENT,t,i,r.slice(t+1,i))}function T4(e,t,r){const n=e.source.body;let i=t,o=r,a=!1;if(o===45&&(o=n.charCodeAt(++i)),o===48){if(o=n.charCodeAt(++i),ko(o))throw ct(e.source,i,`Invalid number, unexpected digit after 0: ${Fn(e,i)}.`)}else i=Ac(e,i,o),o=n.charCodeAt(i);if(o===46&&(a=!0,o=n.charCodeAt(++i),i=Ac(e,i,o),o=n.charCodeAt(i)),(o===69||o===101)&&(a=!0,o=n.charCodeAt(++i),(o===43||o===45)&&(o=n.charCodeAt(++i)),i=Ac(e,i,o),o=n.charCodeAt(i)),o===46||Zb(o))throw ct(e.source,i,`Invalid number, expected digit but got: ${Fn(e,i)}.`);return Je(e,a?N.FLOAT:N.INT,t,i,n.slice(t,i))}function Ac(e,t,r){if(!ko(r))throw ct(e.source,t,`Invalid number, expected digit but got: ${Fn(e,t)}.`);const n=e.source.body;let i=t+1;for(;ko(n.charCodeAt(i));)++i;return i}function N4(e,t){const r=e.source.body,n=r.length;let i=t+1,o=i,a="";for(;i<n;){const s=r.charCodeAt(i);if(s===34)return a+=r.slice(o,i),Je(e,N.STRING,t,i+1,a);if(s===92){a+=r.slice(o,i);const c=r.charCodeAt(i+1)===117?r.charCodeAt(i+2)===123?I4(e,i):A4(e,i):D4(e,i);a+=c.value,i+=c.size,o=i;continue}if(s===10||s===13)break;if(Mi(s))++i;else if(Bl(r,i))i+=2;else throw ct(e.source,i,`Invalid character within String: ${Fn(e,i)}.`)}throw ct(e.source,i,"Unterminated string.")}function I4(e,t){const r=e.source.body;let n=0,i=3;for(;i<12;){const o=r.charCodeAt(t+i++);if(o===125){if(i<5||!Mi(n))break;return{value:String.fromCodePoint(n),size:i}}if(n=n<<4|co(o),n<0)break}throw ct(e.source,t,`Invalid Unicode escape sequence: "${r.slice(t,t+i)}".`)}function A4(e,t){const r=e.source.body,n=j0(r,t+2);if(Mi(n))return{value:String.fromCodePoint(n),size:6};if(Jb(n)&&r.charCodeAt(t+6)===92&&r.charCodeAt(t+7)===117){const i=j0(r,t+8);if(e1(i))return{value:String.fromCodePoint(n,i),size:12}}throw ct(e.source,t,`Invalid Unicode escape sequence: "${r.slice(t,t+6)}".`)}function j0(e,t){return co(e.charCodeAt(t))<<12|co(e.charCodeAt(t+1))<<8|co(e.charCodeAt(t+2))<<4|co(e.charCodeAt(t+3))}function co(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function D4(e,t){const r=e.source.body;switch(r.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:`
13
+ `,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw ct(e.source,t,`Invalid character escape sequence: "${r.slice(t,t+2)}".`)}function R4(e,t){const r=e.source.body,n=r.length;let i=e.lineStart,o=t+3,a=o,s="";const c=[];for(;o<n;){const l=r.charCodeAt(o);if(l===34&&r.charCodeAt(o+1)===34&&r.charCodeAt(o+2)===34){s+=r.slice(a,o),c.push(s);const u=Je(e,N.BLOCK_STRING,t,o+3,x4(c).join(`
14
+ `));return e.line+=c.length-1,e.lineStart=i,u}if(l===92&&r.charCodeAt(o+1)===34&&r.charCodeAt(o+2)===34&&r.charCodeAt(o+3)===34){s+=r.slice(a,o),a=o+1,o+=4;continue}if(l===10||l===13){s+=r.slice(a,o),c.push(s),l===13&&r.charCodeAt(o+1)===10?o+=2:++o,s="",a=o,i=o;continue}if(Mi(l))++o;else if(Bl(r,o))o+=2;else throw ct(e.source,o,`Invalid character within String: ${Fn(e,o)}.`)}throw ct(e.source,o,"Unterminated string.")}function F4(e,t){const r=e.source.body,n=r.length;let i=t+1;for(;i<n;){const o=r.charCodeAt(i);if(_4(o))++i;else break}return Je(e,N.NAME,t,i,r.slice(t,i))}const L4=10,t1=2;function r1(e){return Wl(e,[])}function Wl(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return M4(e,t);default:return String(e)}}function M4(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";const r=[...t,e];if(j4(e)){const n=e.toJSON();if(n!==e)return typeof n=="string"?n:Wl(n,r)}else if(Array.isArray(e))return U4(e,r);return z4(e,r)}function j4(e){return typeof e.toJSON=="function"}function z4(e,t){const r=Object.entries(e);return r.length===0?"{}":t.length>t1?"["+V4(e)+"]":"{ "+r.map(([i,o])=>i+": "+Wl(o,t)).join(", ")+" }"}function U4(e,t){if(e.length===0)return"[]";if(t.length>t1)return"[Array]";const r=Math.min(L4,e.length),n=e.length-r,i=[];for(let o=0;o<r;++o)i.push(Wl(e[o],t));return n===1?i.push("... 1 more item"):n>1&&i.push(`... ${n} more items`),"["+i.join(", ")+"]"}function V4(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){const r=e.constructor.name;if(typeof r=="string"&&r!=="")return r}return t}const B4=function(t,r){return t instanceof r};class _h{constructor(t,r="GraphQL request",n={line:1,column:1}){typeof t=="string"||ka(!1,`Body must be a string. Received: ${r1(t)}.`),this.body=t,this.name=r,this.locationOffset=n,this.locationOffset.line>0||ka(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||ka(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function W4(e){return B4(e,_h)}function q4(e,t){return new H4(e,t).parseDocument()}class H4{constructor(t,r={}){const n=W4(t)?t:new _h(t);this._lexer=new E4(n),this._options=r,this._tokenCounter=0}parseName(){const t=this.expectToken(N.NAME);return this.node(t,{kind:Z.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:Z.DOCUMENT,definitions:this.many(N.SOF,this.parseDefinition,N.EOF)})}parseDefinition(){if(this.peek(N.BRACE_L))return this.parseOperationDefinition();const t=this.peekDescription(),r=t?this._lexer.lookahead():this._lexer.token;if(r.kind===N.NAME){switch(r.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(t)throw ct(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(r.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(r)}parseOperationDefinition(){const t=this._lexer.token;if(this.peek(N.BRACE_L))return this.node(t,{kind:Z.OPERATION_DEFINITION,operation:oi.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const r=this.parseOperationType();let n;return this.peek(N.NAME)&&(n=this.parseName()),this.node(t,{kind:Z.OPERATION_DEFINITION,operation:r,name:n,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const t=this.expectToken(N.NAME);switch(t.value){case"query":return oi.QUERY;case"mutation":return oi.MUTATION;case"subscription":return oi.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(N.PAREN_L,this.parseVariableDefinition,N.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:Z.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(N.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(N.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const t=this._lexer.token;return this.expectToken(N.DOLLAR),this.node(t,{kind:Z.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:Z.SELECTION_SET,selections:this.many(N.BRACE_L,this.parseSelection,N.BRACE_R)})}parseSelection(){return this.peek(N.SPREAD)?this.parseFragment():this.parseField()}parseField(){const t=this._lexer.token,r=this.parseName();let n,i;return this.expectOptionalToken(N.COLON)?(n=r,i=this.parseName()):i=r,this.node(t,{kind:Z.FIELD,alias:n,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(N.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){const r=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(N.PAREN_L,r,N.PAREN_R)}parseArgument(t=!1){const r=this._lexer.token,n=this.parseName();return this.expectToken(N.COLON),this.node(r,{kind:Z.ARGUMENT,name:n,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const t=this._lexer.token;this.expectToken(N.SPREAD);const r=this.expectOptionalKeyword("on");return!r&&this.peek(N.NAME)?this.node(t,{kind:Z.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:Z.INLINE_FRAGMENT,typeCondition:r?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const t=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:Z.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:Z.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){const r=this._lexer.token;switch(r.kind){case N.BRACKET_L:return this.parseList(t);case N.BRACE_L:return this.parseObject(t);case N.INT:return this.advanceLexer(),this.node(r,{kind:Z.INT,value:r.value});case N.FLOAT:return this.advanceLexer(),this.node(r,{kind:Z.FLOAT,value:r.value});case N.STRING:case N.BLOCK_STRING:return this.parseStringLiteral();case N.NAME:switch(this.advanceLexer(),r.value){case"true":return this.node(r,{kind:Z.BOOLEAN,value:!0});case"false":return this.node(r,{kind:Z.BOOLEAN,value:!1});case"null":return this.node(r,{kind:Z.NULL});default:return this.node(r,{kind:Z.ENUM,value:r.value})}case N.DOLLAR:if(t)if(this.expectToken(N.DOLLAR),this._lexer.token.kind===N.NAME){const n=this._lexer.token.value;throw ct(this._lexer.source,r.start,`Unexpected variable "$${n}" in constant value.`)}else throw this.unexpected(r);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:Z.STRING,value:t.value,block:t.kind===N.BLOCK_STRING})}parseList(t){const r=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:Z.LIST,values:this.any(N.BRACKET_L,r,N.BRACKET_R)})}parseObject(t){const r=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:Z.OBJECT,fields:this.any(N.BRACE_L,r,N.BRACE_R)})}parseObjectField(t){const r=this._lexer.token,n=this.parseName();return this.expectToken(N.COLON),this.node(r,{kind:Z.OBJECT_FIELD,name:n,value:this.parseValueLiteral(t)})}parseDirectives(t){const r=[];for(;this.peek(N.AT);)r.push(this.parseDirective(t));return r}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){const r=this._lexer.token;return this.expectToken(N.AT),this.node(r,{kind:Z.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){const t=this._lexer.token;let r;if(this.expectOptionalToken(N.BRACKET_L)){const n=this.parseTypeReference();this.expectToken(N.BRACKET_R),r=this.node(t,{kind:Z.LIST_TYPE,type:n})}else r=this.parseNamedType();return this.expectOptionalToken(N.BANG)?this.node(t,{kind:Z.NON_NULL_TYPE,type:r}):r}parseNamedType(){return this.node(this._lexer.token,{kind:Z.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(N.STRING)||this.peek(N.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("schema");const n=this.parseConstDirectives(),i=this.many(N.BRACE_L,this.parseOperationTypeDefinition,N.BRACE_R);return this.node(t,{kind:Z.SCHEMA_DEFINITION,description:r,directives:n,operationTypes:i})}parseOperationTypeDefinition(){const t=this._lexer.token,r=this.parseOperationType();this.expectToken(N.COLON);const n=this.parseNamedType();return this.node(t,{kind:Z.OPERATION_TYPE_DEFINITION,operation:r,type:n})}parseScalarTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("scalar");const n=this.parseName(),i=this.parseConstDirectives();return this.node(t,{kind:Z.SCALAR_TYPE_DEFINITION,description:r,name:n,directives:i})}parseObjectTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("type");const n=this.parseName(),i=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:Z.OBJECT_TYPE_DEFINITION,description:r,name:n,interfaces:i,directives:o,fields:a})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(N.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(N.BRACE_L,this.parseFieldDefinition,N.BRACE_R)}parseFieldDefinition(){const t=this._lexer.token,r=this.parseDescription(),n=this.parseName(),i=this.parseArgumentDefs();this.expectToken(N.COLON);const o=this.parseTypeReference(),a=this.parseConstDirectives();return this.node(t,{kind:Z.FIELD_DEFINITION,description:r,name:n,arguments:i,type:o,directives:a})}parseArgumentDefs(){return this.optionalMany(N.PAREN_L,this.parseInputValueDef,N.PAREN_R)}parseInputValueDef(){const t=this._lexer.token,r=this.parseDescription(),n=this.parseName();this.expectToken(N.COLON);const i=this.parseTypeReference();let o;this.expectOptionalToken(N.EQUALS)&&(o=this.parseConstValueLiteral());const a=this.parseConstDirectives();return this.node(t,{kind:Z.INPUT_VALUE_DEFINITION,description:r,name:n,type:i,defaultValue:o,directives:a})}parseInterfaceTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("interface");const n=this.parseName(),i=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:Z.INTERFACE_TYPE_DEFINITION,description:r,name:n,interfaces:i,directives:o,fields:a})}parseUnionTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("union");const n=this.parseName(),i=this.parseConstDirectives(),o=this.parseUnionMemberTypes();return this.node(t,{kind:Z.UNION_TYPE_DEFINITION,description:r,name:n,directives:i,types:o})}parseUnionMemberTypes(){return this.expectOptionalToken(N.EQUALS)?this.delimitedMany(N.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("enum");const n=this.parseName(),i=this.parseConstDirectives(),o=this.parseEnumValuesDefinition();return this.node(t,{kind:Z.ENUM_TYPE_DEFINITION,description:r,name:n,directives:i,values:o})}parseEnumValuesDefinition(){return this.optionalMany(N.BRACE_L,this.parseEnumValueDefinition,N.BRACE_R)}parseEnumValueDefinition(){const t=this._lexer.token,r=this.parseDescription(),n=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(t,{kind:Z.ENUM_VALUE_DEFINITION,description:r,name:n,directives:i})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw ct(this._lexer.source,this._lexer.token.start,`${aa(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("input");const n=this.parseName(),i=this.parseConstDirectives(),o=this.parseInputFieldsDefinition();return this.node(t,{kind:Z.INPUT_OBJECT_TYPE_DEFINITION,description:r,name:n,directives:i,fields:o})}parseInputFieldsDefinition(){return this.optionalMany(N.BRACE_L,this.parseInputValueDef,N.BRACE_R)}parseTypeSystemExtension(){const t=this._lexer.lookahead();if(t.kind===N.NAME)switch(t.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(t)}parseSchemaExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const r=this.parseConstDirectives(),n=this.optionalMany(N.BRACE_L,this.parseOperationTypeDefinition,N.BRACE_R);if(r.length===0&&n.length===0)throw this.unexpected();return this.node(t,{kind:Z.SCHEMA_EXTENSION,directives:r,operationTypes:n})}parseScalarTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const r=this.parseName(),n=this.parseConstDirectives();if(n.length===0)throw this.unexpected();return this.node(t,{kind:Z.SCALAR_TYPE_EXTENSION,name:r,directives:n})}parseObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();if(n.length===0&&i.length===0&&o.length===0)throw this.unexpected();return this.node(t,{kind:Z.OBJECT_TYPE_EXTENSION,name:r,interfaces:n,directives:i,fields:o})}parseInterfaceTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();if(n.length===0&&i.length===0&&o.length===0)throw this.unexpected();return this.node(t,{kind:Z.INTERFACE_TYPE_EXTENSION,name:r,interfaces:n,directives:i,fields:o})}parseUnionTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const r=this.parseName(),n=this.parseConstDirectives(),i=this.parseUnionMemberTypes();if(n.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:Z.UNION_TYPE_EXTENSION,name:r,directives:n,types:i})}parseEnumTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const r=this.parseName(),n=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();if(n.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:Z.ENUM_TYPE_EXTENSION,name:r,directives:n,values:i})}parseInputObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const r=this.parseName(),n=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();if(n.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:Z.INPUT_OBJECT_TYPE_EXTENSION,name:r,directives:n,fields:i})}parseDirectiveDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("directive"),this.expectToken(N.AT);const n=this.parseName(),i=this.parseArgumentDefs(),o=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const a=this.parseDirectiveLocations();return this.node(t,{kind:Z.DIRECTIVE_DEFINITION,description:r,name:n,arguments:i,repeatable:o,locations:a})}parseDirectiveLocations(){return this.delimitedMany(N.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const t=this._lexer.token,r=this.parseName();if(Object.prototype.hasOwnProperty.call(Xu,r.value))return r;throw this.unexpected(t)}node(t,r){return this._options.noLocation!==!0&&(r.loc=new $4(t,this._lexer.lastToken,this._lexer.source)),r}peek(t){return this._lexer.token.kind===t}expectToken(t){const r=this._lexer.token;if(r.kind===t)return this.advanceLexer(),r;throw ct(this._lexer.source,r.start,`Expected ${n1(t)}, found ${aa(r)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){const r=this._lexer.token;if(r.kind===N.NAME&&r.value===t)this.advanceLexer();else throw ct(this._lexer.source,r.start,`Expected "${t}", found ${aa(r)}.`)}expectOptionalKeyword(t){const r=this._lexer.token;return r.kind===N.NAME&&r.value===t?(this.advanceLexer(),!0):!1}unexpected(t){const r=t??this._lexer.token;return ct(this._lexer.source,r.start,`Unexpected ${aa(r)}.`)}any(t,r,n){this.expectToken(t);const i=[];for(;!this.expectOptionalToken(n);)i.push(r.call(this));return i}optionalMany(t,r,n){if(this.expectOptionalToken(t)){const i=[];do i.push(r.call(this));while(!this.expectOptionalToken(n));return i}return[]}many(t,r,n){this.expectToken(t);const i=[];do i.push(r.call(this));while(!this.expectOptionalToken(n));return i}delimitedMany(t,r){this.expectOptionalToken(t);const n=[];do n.push(r.call(this));while(this.expectOptionalToken(t));return n}advanceLexer(){const{maxTokens:t}=this._options,r=this._lexer.advance();if(t!==void 0&&r.kind!==N.EOF&&(++this._tokenCounter,this._tokenCounter>t))throw ct(this._lexer.source,r.start,`Document contains more that ${t} tokens. Parsing aborted.`)}}function aa(e){const t=e.value;return n1(e.kind)+(t!=null?` "${t}"`:"")}function n1(e){return O4(e)?`"${e}"`:e}function G4(e){return`"${e.replace(Q4,K4)}"`}const Q4=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function K4(e){return Y4[e.charCodeAt(0)]}const Y4=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"],xh=Object.freeze({});function ar(e,t,r=Yb){const n=new Map;for(const y of Object.values(Z))n.set(y,X4(t,y));let i,o=Array.isArray(e),a=[e],s=-1,c=[],l=e,u,d;const f=[],h=[];do{s++;const y=s===a.length,b=y&&c.length!==0;if(y){if(u=h.length===0?void 0:f[f.length-1],l=d,d=h.pop(),b)if(o){l=l.slice();let _=0;for(const[k,E]of c){const x=k-_;E===null?(l.splice(x,1),_++):l[x]=E}}else{l=Object.defineProperties({},Object.getOwnPropertyDescriptors(l));for(const[_,k]of c)l[_]=k}s=i.index,a=i.keys,c=i.edits,o=i.inArray,i=i.prev}else if(d){if(u=o?s:a[s],l=d[u],l==null)continue;f.push(u)}let g;if(!Array.isArray(l)){var p,m;M0(l)||ka(!1,`Invalid AST Node: ${r1(l)}.`);const _=y?(p=n.get(l.kind))===null||p===void 0?void 0:p.leave:(m=n.get(l.kind))===null||m===void 0?void 0:m.enter;if(g=_?.call(t,l,u,d,f,h),g===xh)break;if(g===!1){if(!y){f.pop();continue}}else if(g!==void 0&&(c.push([u,g]),!y))if(M0(g))l=g;else{f.pop();continue}}if(g===void 0&&b&&c.push([u,l]),y)f.pop();else{var v;i={inArray:o,index:s,keys:a,edits:c,prev:i},o=Array.isArray(l),a=o?l:(v=r[l.kind])!==null&&v!==void 0?v:[],s=-1,c=[],d&&h.push(d),d=l}}while(i!==void 0);return c.length!==0?c[c.length-1][1]:e}function X4(e,t){const r=e[t];return typeof r=="object"?r:typeof r=="function"?{enter:r,leave:void 0}:{enter:e.enter,leave:e.leave}}function Z4(e){return ar(e,e5)}const J4=80,e5={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>H(e.definitions,`
15
15
 
16
16
  `)},OperationDefinition:{leave(e){const t=he("(",H(e.variableDefinitions,", "),")"),r=H([e.operation,H([e.name,t]),H(e.directives," ")]," ");return(r==="query"?"":r+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:r,directives:n})=>e+": "+t+he(" = ",r)+he(" ",H(n," "))},SelectionSet:{leave:({selections:e})=>Jt(e)},Field:{leave({alias:e,name:t,arguments:r,directives:n,selectionSet:i}){const o=he("",e,": ")+t;let a=o+he("(",H(r,", "),")");return a.length>J4&&(a=o+he(`(
17
17
  `,Ea(H(r,`
@@ -38,12 +38,12 @@
38
38
  `)),`
39
39
  }`)}function he(e,t,r=""){return t!=null&&t!==""?e+t+r:""}function Ea(e){return he(" ",e.replace(/\n/g,`
40
40
  `))}function z0(e){var t;return(t=e?.some(r=>r.includes(`
41
- `)))!==null&&t!==void 0?t:!1}function U0(e){return e.kind===Z.FIELD||e.kind===Z.FRAGMENT_SPREAD||e.kind===Z.INLINE_FRAGMENT}function t5(){return R0()}function r5(){__DEV__?B(typeof Nc=="boolean",Nc):B(typeof Nc=="boolean",39)}t5();r5();function ql(e,t){var r=e.directives;return!r||!r.length?!0:o5(r).every(function(n){var i=n.directive,o=n.ifArgument,a=!1;return o.value.kind==="Variable"?(a=t&&t[o.value.name.value],__DEV__?B(a!==void 0,"Invalid variable referenced in @".concat(i.name.value," directive.")):B(a!==void 0,40)):a=o.value.value,i.name.value==="skip"?!a:a})}function xh(e,t,r){var n=new Set(e),i=n.size;return ar(t,{Directive:function(o){if(n.delete(o.name.value)&&(!r||!n.size))return _h}}),r?!n.size:n.size<i}function n5(e){return e&&xh(["client","export"],e,!0)}function i5(e){var t=e.name.value;return t==="skip"||t==="include"}function o5(e){var t=[];return e&&e.length&&e.forEach(function(r){if(!!i5(r)){var n=r.arguments,i=r.name.value;__DEV__?B(n&&n.length===1,"Incorrect number of arguments for the @".concat(i," directive.")):B(n&&n.length===1,41);var o=n[0];__DEV__?B(o.name&&o.name.value==="if","Invalid argument for the @".concat(i," directive.")):B(o.name&&o.name.value==="if",42);var a=o.value;__DEV__?B(a&&(a.kind==="Variable"||a.kind==="BooleanValue"),"Argument for the @".concat(i," directive must be a variable or a boolean value.")):B(a&&(a.kind==="Variable"||a.kind==="BooleanValue"),43),t.push({directive:r,ifArgument:o})}}),t}function a5(e,t){var r=t,n=[];e.definitions.forEach(function(o){if(o.kind==="OperationDefinition")throw __DEV__?new be("Found a ".concat(o.operation," operation").concat(o.name?" named '".concat(o.name.value,"'"):"",". ")+"No operations are allowed when using a fragment as a query. Only fragments are allowed."):new be(44);o.kind==="FragmentDefinition"&&n.push(o)}),typeof r>"u"&&(__DEV__?B(n.length===1,"Found ".concat(n.length," fragments. `fragmentName` must be provided when there is not exactly 1 fragment.")):B(n.length===1,45),r=n[0].name.value);var i=O(O({},e),{definitions:xs([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:r}}]}}],e.definitions,!0)});return i}function Sh(e){e===void 0&&(e=[]);var t={};return e.forEach(function(r){t[r.name.value]=r}),t}function kh(e,t){switch(e.kind){case"InlineFragment":return e;case"FragmentSpread":{var r=e.name.value;if(typeof t=="function")return t(r);var n=t&&t[r];return __DEV__?B(n,"No fragment named ".concat(r)):B(n,46),n||null}default:return null}}function We(e){return e!==null&&typeof e=="object"}function ui(e){return{__ref:String(e)}}function ke(e){return Boolean(e&&typeof e=="object"&&typeof e.__ref=="string")}function s5(e){return We(e)&&e.kind==="Document"&&Array.isArray(e.definitions)}function l5(e){return e.kind==="StringValue"}function c5(e){return e.kind==="BooleanValue"}function u5(e){return e.kind==="IntValue"}function d5(e){return e.kind==="FloatValue"}function f5(e){return e.kind==="Variable"}function h5(e){return e.kind==="ObjectValue"}function p5(e){return e.kind==="ListValue"}function m5(e){return e.kind==="EnumValue"}function v5(e){return e.kind==="NullValue"}function wi(e,t,r,n){if(u5(r)||d5(r))e[t.value]=Number(r.value);else if(c5(r)||l5(r))e[t.value]=r.value;else if(h5(r)){var i={};r.fields.map(function(a){return wi(i,a.name,a.value,n)}),e[t.value]=i}else if(f5(r)){var o=(n||{})[r.name.value];e[t.value]=o}else if(p5(r))e[t.value]=r.values.map(function(a){var s={};return wi(s,t,a,n),s[t.value]});else if(m5(r))e[t.value]=r.value;else if(v5(r))e[t.value]=null;else throw __DEV__?new be('The inline argument "'.concat(t.value,'" of kind "').concat(r.kind,'"')+"is not supported. Use variables instead of inline arguments to overcome this limitation."):new be(55)}function y5(e,t){var r=null;e.directives&&(r={},e.directives.forEach(function(i){r[i.name.value]={},i.arguments&&i.arguments.forEach(function(o){var a=o.name,s=o.value;return wi(r[i.name.value],a,s,t)})}));var n=null;return e.arguments&&e.arguments.length&&(n={},e.arguments.forEach(function(i){var o=i.name,a=i.value;return wi(n,o,a,t)})),Eh(e.name.value,n,r)}var g5=["connection","include","skip","client","rest","export"],Eh=Object.assign(function(e,t,r){if(t&&r&&r.connection&&r.connection.key)if(r.connection.filter&&r.connection.filter.length>0){var n=r.connection.filter?r.connection.filter:[];n.sort();var i={};return n.forEach(function(s){i[s]=t[s]}),"".concat(r.connection.key,"(").concat(Yi(i),")")}else return r.connection.key;var o=e;if(t){var a=Yi(t);o+="(".concat(a,")")}return r&&Object.keys(r).forEach(function(s){g5.indexOf(s)===-1&&(r[s]&&Object.keys(r[s]).length?o+="@".concat(s,"(").concat(Yi(r[s]),")"):o+="@".concat(s))}),o},{setStringify:function(e){var t=Yi;return Yi=e,t}}),Yi=function(t){return JSON.stringify(t,b5)};function b5(e,t){return We(t)&&!Array.isArray(t)&&(t=Object.keys(t).sort().reduce(function(r,n){return r[n]=t[n],r},{})),t}function Hl(e,t){if(e.arguments&&e.arguments.length){var r={};return e.arguments.forEach(function(n){var i=n.name,o=n.value;return wi(r,i,o,t)}),r}return null}function Ln(e){return e.alias?e.alias.value:e.name.value}function Zu(e,t,r){if(typeof e.__typename=="string")return e.__typename;for(var n=0,i=t.selections;n<i.length;n++){var o=i[n];if(Mr(o)){if(o.name.value==="__typename")return e[Ln(o)]}else{var a=Zu(e,kh(o,r).selectionSet,r);if(typeof a=="string")return a}}}function Mr(e){return e.kind==="Field"}function i1(e){return e.kind==="InlineFragment"}function Gl(e){__DEV__?B(e&&e.kind==="Document",'Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a "gql" tag? http://docs.apollostack.com/apollo-client/core.html#gql'):B(e&&e.kind==="Document",47);var t=e.definitions.filter(function(r){return r.kind!=="FragmentDefinition"}).map(function(r){if(r.kind!=="OperationDefinition")throw __DEV__?new be('Schema type definitions not allowed in queries. Found: "'.concat(r.kind,'"')):new be(48);return r});return __DEV__?B(t.length<=1,"Ambiguous GraphQL document: contains ".concat(t.length," operations")):B(t.length<=1,49),e}function Vo(e){return Gl(e),e.definitions.filter(function(t){return t.kind==="OperationDefinition"})[0]}function Ju(e){return e.definitions.filter(function(t){return t.kind==="OperationDefinition"&&t.name}).map(function(t){return t.name.value})[0]||null}function Oh(e){return e.definitions.filter(function(t){return t.kind==="FragmentDefinition"})}function o1(e){var t=Vo(e);return __DEV__?B(t&&t.operation==="query","Must contain a query definition."):B(t&&t.operation==="query",50),t}function $5(e){__DEV__?B(e.kind==="Document",'Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a "gql" tag? http://docs.apollostack.com/apollo-client/core.html#gql'):B(e.kind==="Document",51),__DEV__?B(e.definitions.length<=1,"Fragment must have exactly one definition."):B(e.definitions.length<=1,52);var t=e.definitions[0];return __DEV__?B(t.kind==="FragmentDefinition","Must be a fragment definition."):B(t.kind==="FragmentDefinition",53),t}function Ch(e){Gl(e);for(var t,r=0,n=e.definitions;r<n.length;r++){var i=n[r];if(i.kind==="OperationDefinition"){var o=i.operation;if(o==="query"||o==="mutation"||o==="subscription")return i}i.kind==="FragmentDefinition"&&!t&&(t=i)}if(t)return t;throw __DEV__?new be("Expected a parsed GraphQL query with a query, mutation, subscription, or a fragment."):new be(54)}function Ph(e){var t=Object.create(null),r=e&&e.variableDefinitions;return r&&r.length&&r.forEach(function(n){n.defaultValue&&wi(t,n.variable.name,n.defaultValue)}),t}function V0(e,t,r){var n=0;return e.forEach(function(i,o){t.call(this,i,o,e)&&(e[n++]=i)},r),e.length=n,e}var B0={kind:"Field",name:{kind:"Name",value:"__typename"}};function a1(e,t){return!e||e.selectionSet.selections.every(function(r){return r.kind==="FragmentSpread"&&a1(t[r.name.value],t)})}function Th(e){return a1(Vo(e)||$5(e),Sh(Oh(e)))?null:e}function W0(e){return function(r){return e.some(function(n){return n.name&&n.name===r.name.value||n.test&&n.test(r)})}}function s1(e,t){var r=Object.create(null),n=[],i=Object.create(null),o=[],a=Th(ar(t,{Variable:{enter:function(s,c,l){l.kind!=="VariableDefinition"&&(r[s.name.value]=!0)}},Field:{enter:function(s){if(e&&s.directives){var c=e.some(function(l){return l.remove});if(c&&s.directives&&s.directives.some(W0(e)))return s.arguments&&s.arguments.forEach(function(l){l.value.kind==="Variable"&&n.push({name:l.value.name.value})}),s.selectionSet&&l1(s.selectionSet).forEach(function(l){o.push({name:l.name.value})}),null}}},FragmentSpread:{enter:function(s){i[s.name.value]=!0}},Directive:{enter:function(s){if(W0(e)(s))return null}}}));return a&&V0(n,function(s){return!!s.name&&!r[s.name]}).length&&(a=S5(n,a)),a&&V0(o,function(s){return!!s.name&&!i[s.name]}).length&&(a=k5(o,a)),a}var Nh=Object.assign(function(e){return ar(e,{SelectionSet:{enter:function(t,r,n){if(!(n&&n.kind==="OperationDefinition")){var i=t.selections;if(!!i){var o=i.some(function(s){return Mr(s)&&(s.name.value==="__typename"||s.name.value.lastIndexOf("__",0)===0)});if(!o){var a=n;if(!(Mr(a)&&a.directives&&a.directives.some(function(s){return s.name.value==="export"})))return O(O({},t),{selections:xs(xs([],i,!0),[B0],!1)})}}}}}})},{added:function(e){return e===B0}}),w5={test:function(e){var t=e.name.value==="connection";return t&&(!e.arguments||!e.arguments.some(function(r){return r.name.value==="key"}))&&__DEV__&&B.warn("Removing an @connection directive even though it does not have a key. You may want to use the key parameter to specify a store key."),t}};function _5(e){return s1([w5],Gl(e))}function x5(e){return function(r){return e.some(function(n){return r.value&&r.value.kind==="Variable"&&r.value.name&&(n.name===r.value.name.value||n.test&&n.test(r))})}}function S5(e,t){var r=x5(e);return Th(ar(t,{OperationDefinition:{enter:function(n){return O(O({},n),{variableDefinitions:n.variableDefinitions?n.variableDefinitions.filter(function(i){return!e.some(function(o){return o.name===i.variable.name.value})}):[]})}},Field:{enter:function(n){var i=e.some(function(a){return a.remove});if(i){var o=0;if(n.arguments&&n.arguments.forEach(function(a){r(a)&&(o+=1)}),o===1)return null}}},Argument:{enter:function(n){if(r(n))return null}}}))}function k5(e,t){function r(n){if(e.some(function(i){return i.name===n.name.value}))return null}return Th(ar(t,{FragmentSpread:{enter:r},FragmentDefinition:{enter:r}}))}function l1(e){var t=[];return e.selections.forEach(function(r){(Mr(r)||i1(r))&&r.selectionSet?l1(r.selectionSet).forEach(function(n){return t.push(n)}):r.kind==="FragmentSpread"&&t.push(r)}),t}function E5(e){var t=Ch(e),r=t.operation;if(r==="query")return e;var n=ar(e,{OperationDefinition:{enter:function(i){return O(O({},i),{operation:"query"})}}});return n}function O5(e){Gl(e);var t=s1([{test:function(r){return r.name.value==="client"},remove:!0}],e);return t&&(t=ar(t,{FragmentDefinition:{enter:function(r){if(r.selectionSet){var n=r.selectionSet.selections.every(function(i){return Mr(i)&&i.name.value==="__typename"});if(n)return null}}}})),t}var C5=Object.prototype.hasOwnProperty;function q0(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Ih(e)}function Ih(e){var t=e[0]||{},r=e.length;if(r>1)for(var n=new cn,i=1;i<r;++i)t=n.merge(t,e[i]);return t}var P5=function(e,t,r){return this.merge(e[r],t[r])},cn=function(){function e(t){t===void 0&&(t=P5),this.reconciler=t,this.isObject=We,this.pastCopies=new Set}return e.prototype.merge=function(t,r){for(var n=this,i=[],o=2;o<arguments.length;o++)i[o-2]=arguments[o];return We(r)&&We(t)?(Object.keys(r).forEach(function(a){if(C5.call(t,a)){var s=t[a];if(r[a]!==s){var c=n.reconciler.apply(n,xs([t,r,a],i,!1));c!==s&&(t=n.shallowCopyForMerge(t),t[a]=c)}}else t=n.shallowCopyForMerge(t),t[a]=r[a]}),t):r},e.prototype.shallowCopyForMerge=function(t){return We(t)&&(this.pastCopies.has(t)||(Array.isArray(t)?t=t.slice(0):t=O({__proto__:Object.getPrototypeOf(t)},t),this.pastCopies.add(t))),t},e}();function T5(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=N5(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
42
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function N5(e,t){if(!!e){if(typeof e=="string")return H0(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return H0(e,t)}}function H0(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function G0(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Ah(e,t,r){return t&&G0(e.prototype,t),r&&G0(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var Dh=function(){return typeof Symbol=="function"},Rh=function(e){return Dh()&&Boolean(Symbol[e])},Fh=function(e){return Rh(e)?Symbol[e]:"@@"+e};Dh()&&!Rh("observable")&&(Symbol.observable=Symbol("observable"));var I5=Fh("iterator"),ed=Fh("observable"),c1=Fh("species");function As(e,t){var r=e[t];if(r!=null){if(typeof r!="function")throw new TypeError(r+" is not a function");return r}}function Xi(e){var t=e.constructor;return t!==void 0&&(t=t[c1],t===null&&(t=void 0)),t!==void 0?t:Pe}function A5(e){return e instanceof Pe}function _i(e){_i.log?_i.log(e):setTimeout(function(){throw e})}function Oa(e){Promise.resolve().then(function(){try{e()}catch(t){_i(t)}})}function u1(e){var t=e._cleanup;if(t!==void 0&&(e._cleanup=void 0,!!t))try{if(typeof t=="function")t();else{var r=As(t,"unsubscribe");r&&r.call(t)}}catch(n){_i(n)}}function td(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function D5(e){var t=e._queue;if(!!t){e._queue=void 0,e._state="ready";for(var r=0;r<t.length&&(d1(e,t[r].type,t[r].value),e._state!=="closed");++r);}}function d1(e,t,r){e._state="running";var n=e._observer;try{var i=As(n,t);switch(t){case"next":i&&i.call(n,r);break;case"error":if(td(e),i)i.call(n,r);else throw r;break;case"complete":td(e),i&&i.call(n);break}}catch(o){_i(o)}e._state==="closed"?u1(e):e._state==="running"&&(e._state="ready")}function Ac(e,t,r){if(e._state!=="closed"){if(e._state==="buffering"){e._queue.push({type:t,value:r});return}if(e._state!=="ready"){e._state="buffering",e._queue=[{type:t,value:r}],Oa(function(){return D5(e)});return}d1(e,t,r)}}var R5=function(){function e(r,n){this._cleanup=void 0,this._observer=r,this._queue=void 0,this._state="initializing";var i=new F5(this);try{this._cleanup=n.call(void 0,i)}catch(o){i.error(o)}this._state==="initializing"&&(this._state="ready")}var t=e.prototype;return t.unsubscribe=function(){this._state!=="closed"&&(td(this),u1(this))},Ah(e,[{key:"closed",get:function(){return this._state==="closed"}}]),e}(),F5=function(){function e(r){this._subscription=r}var t=e.prototype;return t.next=function(n){Ac(this._subscription,"next",n)},t.error=function(n){Ac(this._subscription,"error",n)},t.complete=function(){Ac(this._subscription,"complete")},Ah(e,[{key:"closed",get:function(){return this._subscription._state==="closed"}}]),e}(),Pe=function(){function e(r){if(!(this instanceof e))throw new TypeError("Observable cannot be called as a function");if(typeof r!="function")throw new TypeError("Observable initializer must be a function");this._subscriber=r}var t=e.prototype;return t.subscribe=function(n){return(typeof n!="object"||n===null)&&(n={next:n,error:arguments[1],complete:arguments[2]}),new R5(n,this._subscriber)},t.forEach=function(n){var i=this;return new Promise(function(o,a){if(typeof n!="function"){a(new TypeError(n+" is not a function"));return}function s(){c.unsubscribe(),o()}var c=i.subscribe({next:function(l){try{n(l,s)}catch(u){a(u),c.unsubscribe()}},error:a,complete:o})})},t.map=function(n){var i=this;if(typeof n!="function")throw new TypeError(n+" is not a function");var o=Xi(this);return new o(function(a){return i.subscribe({next:function(s){try{s=n(s)}catch(c){return a.error(c)}a.next(s)},error:function(s){a.error(s)},complete:function(){a.complete()}})})},t.filter=function(n){var i=this;if(typeof n!="function")throw new TypeError(n+" is not a function");var o=Xi(this);return new o(function(a){return i.subscribe({next:function(s){try{if(!n(s))return}catch(c){return a.error(c)}a.next(s)},error:function(s){a.error(s)},complete:function(){a.complete()}})})},t.reduce=function(n){var i=this;if(typeof n!="function")throw new TypeError(n+" is not a function");var o=Xi(this),a=arguments.length>1,s=!1,c=arguments[1],l=c;return new o(function(u){return i.subscribe({next:function(d){var f=!s;if(s=!0,!f||a)try{l=n(l,d)}catch(h){return u.error(h)}else l=d},error:function(d){u.error(d)},complete:function(){if(!s&&!a)return u.error(new TypeError("Cannot reduce an empty sequence"));u.next(l),u.complete()}})})},t.concat=function(){for(var n=this,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];var s=Xi(this);return new s(function(c){var l,u=0;function d(f){l=f.subscribe({next:function(h){c.next(h)},error:function(h){c.error(h)},complete:function(){u===o.length?(l=void 0,c.complete()):d(s.from(o[u++]))}})}return d(n),function(){l&&(l.unsubscribe(),l=void 0)}})},t.flatMap=function(n){var i=this;if(typeof n!="function")throw new TypeError(n+" is not a function");var o=Xi(this);return new o(function(a){var s=[],c=i.subscribe({next:function(u){if(n)try{u=n(u)}catch(f){return a.error(f)}var d=o.from(u).subscribe({next:function(f){a.next(f)},error:function(f){a.error(f)},complete:function(){var f=s.indexOf(d);f>=0&&s.splice(f,1),l()}});s.push(d)},error:function(u){a.error(u)},complete:function(){l()}});function l(){c.closed&&s.length===0&&a.complete()}return function(){s.forEach(function(u){return u.unsubscribe()}),c.unsubscribe()}})},t[ed]=function(){return this},e.from=function(n){var i=typeof this=="function"?this:e;if(n==null)throw new TypeError(n+" is not an object");var o=As(n,ed);if(o){var a=o.call(n);if(Object(a)!==a)throw new TypeError(a+" is not an object");return A5(a)&&a.constructor===i?a:new i(function(s){return a.subscribe(s)})}if(Rh("iterator")&&(o=As(n,I5),o))return new i(function(s){Oa(function(){if(!s.closed){for(var c=T5(o.call(n)),l;!(l=c()).done;){var u=l.value;if(s.next(u),s.closed)return}s.complete()}})});if(Array.isArray(n))return new i(function(s){Oa(function(){if(!s.closed){for(var c=0;c<n.length;++c)if(s.next(n[c]),s.closed)return;s.complete()}})});throw new TypeError(n+" is not observable")},e.of=function(){for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];var a=typeof this=="function"?this:e;return new a(function(s){Oa(function(){if(!s.closed){for(var c=0;c<i.length;++c)if(s.next(i[c]),s.closed)return;s.complete()}})})},Ah(e,null,[{key:c1,get:function(){return this}}]),e}();Dh()&&Object.defineProperty(Pe,Symbol("extensions"),{value:{symbol:ed,hostReportError:_i},configurable:!0});function L5(e){var t,r=e.Symbol;if(typeof r=="function")if(r.observable)t=r.observable;else{typeof r.for=="function"?t=r.for("https://github.com/benlesh/symbol-observable"):t=r("https://github.com/benlesh/symbol-observable");try{r.observable=t}catch{}}else t="@@observable";return t}var ei;typeof self<"u"?ei=self:typeof window<"u"?ei=window:typeof global<"u"?ei=global:typeof module<"u"?ei=module:ei=Function("return this")();L5(ei);var Q0=Pe.prototype,K0="@@observable";Q0[K0]||(Q0[K0]=function(){return this});var M5=Object.prototype.toString;function f1(e){return rd(e)}function rd(e,t){switch(M5.call(e)){case"[object Array]":{if(t=t||new Map,t.has(e))return t.get(e);var r=e.slice(0);return t.set(e,r),r.forEach(function(i,o){r[o]=rd(i,t)}),r}case"[object Object]":{if(t=t||new Map,t.has(e))return t.get(e);var n=Object.create(Object.getPrototypeOf(e));return t.set(e,n),Object.keys(e).forEach(function(i){n[i]=rd(e[i],t)}),n}default:return e}}function j5(e){var t=new Set([e]);return t.forEach(function(r){We(r)&&z5(r)===r&&Object.getOwnPropertyNames(r).forEach(function(n){We(r[n])&&t.add(r[n])})}),e}function z5(e){if(__DEV__&&!Object.isFrozen(e))try{Object.freeze(e)}catch(t){if(t instanceof TypeError)return null;throw t}return e}function nd(e){return __DEV__&&j5(e),e}function po(e,t,r){var n=[];e.forEach(function(i){return i[t]&&n.push(i)}),n.forEach(function(i){return i[t](r)})}function Dc(e,t,r){return new Pe(function(n){var i=n.next,o=n.error,a=n.complete,s=0,c=!1,l={then:function(h){return new Promise(function(p){return p(h())})}};function u(h,p){return h?function(m){++s;var v=function(){return h(m)};l=l.then(v,v).then(function(y){--s,i&&i.call(n,y),c&&d.complete()},function(y){throw--s,y}).catch(function(y){o&&o.call(n,y)})}:function(m){return p&&p.call(n,m)}}var d={next:u(t,i),error:u(r,o),complete:function(){c=!0,s||a&&a.call(n)}},f=e.subscribe(d);return function(){return f.unsubscribe()}})}var Vn=typeof WeakMap=="function"&&qt(function(){return navigator.product})!=="ReactNative",U5=typeof WeakSet=="function",h1=typeof Symbol=="function"&&typeof Symbol.for=="function",Ql=h1&&Symbol.asyncIterator;qt(function(){return window.document.createElement});qt(function(){return navigator.userAgent.indexOf("jsdom")>=0});function p1(e){function t(r){Object.defineProperty(e,r,{value:Pe})}return h1&&Symbol.species&&t(Symbol.species),t("@@species"),e}function Y0(e){return e&&typeof e.then=="function"}var uo=function(e){lr(t,e);function t(r){var n=e.call(this,function(i){return n.addObserver(i),function(){return n.removeObserver(i)}})||this;return n.observers=new Set,n.promise=new Promise(function(i,o){n.resolve=i,n.reject=o}),n.handlers={next:function(i){n.sub!==null&&(n.latest=["next",i],n.notify("next",i),po(n.observers,"next",i))},error:function(i){var o=n.sub;o!==null&&(o&&setTimeout(function(){return o.unsubscribe()}),n.sub=null,n.latest=["error",i],n.reject(i),n.notify("error",i),po(n.observers,"error",i))},complete:function(){var i=n.sub;if(i!==null){var o=n.sources.shift();o?Y0(o)?o.then(function(a){return n.sub=a.subscribe(n.handlers)}):n.sub=o.subscribe(n.handlers):(i&&setTimeout(function(){return i.unsubscribe()}),n.sub=null,n.latest&&n.latest[0]==="next"?n.resolve(n.latest[1]):n.resolve(),n.notify("complete"),po(n.observers,"complete"))}}},n.nextResultListeners=new Set,n.cancel=function(i){n.reject(i),n.sources=[],n.handlers.complete()},n.promise.catch(function(i){}),typeof r=="function"&&(r=[new Pe(r)]),Y0(r)?r.then(function(i){return n.start(i)},n.handlers.error):n.start(r),n}return t.prototype.start=function(r){this.sub===void 0&&(this.sources=Array.from(r),this.handlers.complete())},t.prototype.deliverLastMessage=function(r){if(this.latest){var n=this.latest[0],i=r[n];i&&i.call(r,this.latest[1]),this.sub===null&&n==="next"&&r.complete&&r.complete()}},t.prototype.addObserver=function(r){this.observers.has(r)||(this.deliverLastMessage(r),this.observers.add(r))},t.prototype.removeObserver=function(r){this.observers.delete(r)&&this.observers.size<1&&this.handlers.complete()},t.prototype.notify=function(r,n){var i=this.nextResultListeners;i.size&&(this.nextResultListeners=new Set,i.forEach(function(o){return o(r,n)}))},t.prototype.beforeNext=function(r){var n=!1;this.nextResultListeners.add(function(i,o){n||(n=!0,r(i,o))})},t}(Pe);p1(uo);function Yt(e){return Array.isArray(e)&&e.length>0}function di(e){return"incremental"in e}function V5(e){return"hasNext"in e&&"data"in e}function B5(e){return di(e)||V5(e)}function m1(e,t){var r=e,n=new cn;return di(t)&&Yt(t.incremental)&&t.incremental.forEach(function(i){for(var o=i.data,a=i.path,s=a.length-1;s>=0;--s){var c=a[s],l=!isNaN(+c),u=l?[]:{};u[c]=o,o=u}r=n.merge(r,o)}),r}function Ca(e){var t=id(e);return Yt(t)}function id(e){var t=Yt(e.errors)?e.errors.slice(0):[];return di(e)&&Yt(e.incremental)&&e.incremental.forEach(function(r){r.errors&&t.push.apply(t,r.errors)}),t}function Kl(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Object.create(null);return e.forEach(function(n){!n||Object.keys(n).forEach(function(i){var o=n[i];o!==void 0&&(r[i]=o)})}),r}var X0=new Map;function od(e){var t=X0.get(e)||1;return X0.set(e,t+1),"".concat(e,":").concat(t,":").concat(Math.random().toString(36).slice(2))}function W5(e){var t=od("stringifyForDisplay");return JSON.stringify(e,function(r,n){return n===void 0?t:n}).split(JSON.stringify(t)).join("<undefined>")}function Rc(e,t){return Kl(e,t,t.variables&&{variables:O(O({},e&&e.variables),t.variables)})}function Z0(e){return new Pe(function(t){t.error(e)})}var ad=function(e,t,r){var n=new Error(r);throw n.name="ServerError",n.response=e,n.statusCode=e.status,n.result=t,n};function q5(e){for(var t=["query","operationName","variables","extensions","context"],r=0,n=Object.keys(e);r<n.length;r++){var i=n[r];if(t.indexOf(i)<0)throw __DEV__?new be("illegal argument: ".concat(i)):new be(27)}return e}function H5(e,t){var r=O({},e),n=function(o){typeof o=="function"?r=O(O({},r),o(r)):r=O(O({},r),o)},i=function(){return O({},r)};return Object.defineProperty(t,"setContext",{enumerable:!1,value:n}),Object.defineProperty(t,"getContext",{enumerable:!1,value:i}),t}function G5(e){var t={variables:e.variables||{},extensions:e.extensions||{},operationName:e.operationName,query:e.query};return t.operationName||(t.operationName=typeof t.query!="string"?Ju(t.query)||void 0:""),t}function J0(e,t){return t?t(e):Pe.of()}function Zi(e){return typeof e=="function"?new ji(e):e}function sa(e){return e.request.length<=1}var Q5=function(e){lr(t,e);function t(r,n){var i=e.call(this,r)||this;return i.link=n,i}return t}(Error),ji=function(){function e(t){t&&(this.request=t)}return e.empty=function(){return new e(function(){return Pe.of()})},e.from=function(t){return t.length===0?e.empty():t.map(Zi).reduce(function(r,n){return r.concat(n)})},e.split=function(t,r,n){var i=Zi(r),o=Zi(n||new e(J0));return sa(i)&&sa(o)?new e(function(a){return t(a)?i.request(a)||Pe.of():o.request(a)||Pe.of()}):new e(function(a,s){return t(a)?i.request(a,s)||Pe.of():o.request(a,s)||Pe.of()})},e.execute=function(t,r){return t.request(H5(r.context,G5(q5(r))))||Pe.of()},e.concat=function(t,r){var n=Zi(t);if(sa(n))return __DEV__&&B.warn(new Q5("You are calling concat on a terminating link, which will have no effect",n)),n;var i=Zi(r);return sa(i)?new e(function(o){return n.request(o,function(a){return i.request(a)||Pe.of()})||Pe.of()}):new e(function(o,a){return n.request(o,function(s){return i.request(s,a)||Pe.of()})||Pe.of()})},e.prototype.split=function(t,r,n){return this.concat(e.split(t,r,n||new e(J0)))},e.prototype.concat=function(t){return e.concat(this,t)},e.prototype.request=function(t,r){throw __DEV__?new be("request is not implemented"):new be(22)},e.prototype.onError=function(t,r){if(r&&r.error)return r.error(t),!1;throw t},e.prototype.setOnError=function(t){return this.onError=t,this},e}(),sd=ji.execute,K5="3.7.6";function Y5(e){return!!e.body}function X5(e){return!!e.getReader}function Z5(e){return!!(Ql&&e[Symbol.asyncIterator])}function J5(e){return!!e.stream}function ex(e){return!!e.arrayBuffer}function tx(e){return!!e.pipe}function rx(e){var t,r=e[Symbol.asyncIterator]();return t={next:function(){return r.next()}},t[Symbol.asyncIterator]=function(){return this},t}function nx(e){var t=null,r=null,n=!1,i=[],o=[];function a(d){if(!r){if(o.length){var f=o.shift();if(Array.isArray(f)&&f[0])return f[0]({value:d,done:!1})}i.push(d)}}function s(d){r=d;var f=o.slice();f.forEach(function(h){h[1](d)}),!t||t()}function c(){n=!0;var d=o.slice();d.forEach(function(f){f[0]({value:void 0,done:!0})}),!t||t()}t=function(){t=null,e.removeListener("data",a),e.removeListener("error",s),e.removeListener("end",c),e.removeListener("finish",c),e.removeListener("close",c)},e.on("data",a),e.on("error",s),e.on("end",c),e.on("finish",c),e.on("close",c);function l(){return new Promise(function(d,f){if(r)return f(r);if(i.length)return d({value:i.shift(),done:!1});if(n)return d({value:void 0,done:!0});o.push([d,f])})}var u={next:function(){return l()}};return Ql&&(u[Symbol.asyncIterator]=function(){return this}),u}function ix(e){var t=!1,r={next:function(){return t?Promise.resolve({value:void 0,done:!0}):(t=!0,new Promise(function(n,i){e.then(function(o){n({value:o,done:!1})}).catch(i)}))}};return Ql&&(r[Symbol.asyncIterator]=function(){return this}),r}function em(e){var t={next:function(){return e.read()}};return Ql&&(t[Symbol.asyncIterator]=function(){return this}),t}function ox(e){var t=e;if(Y5(e)&&(t=e.body),Z5(t))return rx(t);if(X5(t))return em(t.getReader());if(J5(t))return em(t.stream().getReader());if(ex(t))return ix(t.arrayBuffer());if(tx(t))return nx(t);throw new Error("Unknown body type for responseIterator. Please pass a streamable response.")}var tm=Object.prototype.hasOwnProperty;function ax(e,t){var r,n,i;return oe(this,void 0,void 0,function(){var o,a,s,c,l,u,d,f,h,p,m,v,y,b,g,_,S,E,x,N;return Kr(this,function(M){switch(M.label){case 0:if(TextDecoder===void 0)throw new Error("TextDecoder must be defined in the environment: please import a polyfill.");o=new TextDecoder("utf-8"),a=(r=e.headers)===null||r===void 0?void 0:r.get("content-type"),s="boundary=",c=a?.includes(s)?a?.substring(a?.indexOf(s)+s.length).replace(/['"]/g,"").replace(/\;(.*)/gm,"").trim():"-",l="--".concat(c),u="",d=ox(e),f=!0,M.label=1;case 1:return f?[4,d.next()]:[3,3];case 2:for(h=M.sent(),p=h.value,m=h.done,v=typeof p=="string"?p:o.decode(p),f=!m,u+=v,y=u.indexOf(l);y>-1;){if(b=void 0,N=[u.slice(0,y),u.slice(y+l.length)],b=N[0],u=N[1],b.trim()){if(g=b.indexOf(`\r
41
+ `)))!==null&&t!==void 0?t:!1}function U0(e){return e.kind===Z.FIELD||e.kind===Z.FRAGMENT_SPREAD||e.kind===Z.INLINE_FRAGMENT}function t5(){return R0()}function r5(){__DEV__?B(typeof Ic=="boolean",Ic):B(typeof Ic=="boolean",39)}t5();r5();function ql(e,t){var r=e.directives;return!r||!r.length?!0:o5(r).every(function(n){var i=n.directive,o=n.ifArgument,a=!1;return o.value.kind==="Variable"?(a=t&&t[o.value.name.value],__DEV__?B(a!==void 0,"Invalid variable referenced in @".concat(i.name.value," directive.")):B(a!==void 0,40)):a=o.value.value,i.name.value==="skip"?!a:a})}function Sh(e,t,r){var n=new Set(e),i=n.size;return ar(t,{Directive:function(o){if(n.delete(o.name.value)&&(!r||!n.size))return xh}}),r?!n.size:n.size<i}function n5(e){return e&&Sh(["client","export"],e,!0)}function i5(e){var t=e.name.value;return t==="skip"||t==="include"}function o5(e){var t=[];return e&&e.length&&e.forEach(function(r){if(!!i5(r)){var n=r.arguments,i=r.name.value;__DEV__?B(n&&n.length===1,"Incorrect number of arguments for the @".concat(i," directive.")):B(n&&n.length===1,41);var o=n[0];__DEV__?B(o.name&&o.name.value==="if","Invalid argument for the @".concat(i," directive.")):B(o.name&&o.name.value==="if",42);var a=o.value;__DEV__?B(a&&(a.kind==="Variable"||a.kind==="BooleanValue"),"Argument for the @".concat(i," directive must be a variable or a boolean value.")):B(a&&(a.kind==="Variable"||a.kind==="BooleanValue"),43),t.push({directive:r,ifArgument:o})}}),t}function a5(e,t){var r=t,n=[];e.definitions.forEach(function(o){if(o.kind==="OperationDefinition")throw __DEV__?new be("Found a ".concat(o.operation," operation").concat(o.name?" named '".concat(o.name.value,"'"):"",". ")+"No operations are allowed when using a fragment as a query. Only fragments are allowed."):new be(44);o.kind==="FragmentDefinition"&&n.push(o)}),typeof r>"u"&&(__DEV__?B(n.length===1,"Found ".concat(n.length," fragments. `fragmentName` must be provided when there is not exactly 1 fragment.")):B(n.length===1,45),r=n[0].name.value);var i=O(O({},e),{definitions:xs([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:r}}]}}],e.definitions,!0)});return i}function kh(e){e===void 0&&(e=[]);var t={};return e.forEach(function(r){t[r.name.value]=r}),t}function Eh(e,t){switch(e.kind){case"InlineFragment":return e;case"FragmentSpread":{var r=e.name.value;if(typeof t=="function")return t(r);var n=t&&t[r];return __DEV__?B(n,"No fragment named ".concat(r)):B(n,46),n||null}default:return null}}function We(e){return e!==null&&typeof e=="object"}function ui(e){return{__ref:String(e)}}function ke(e){return Boolean(e&&typeof e=="object"&&typeof e.__ref=="string")}function s5(e){return We(e)&&e.kind==="Document"&&Array.isArray(e.definitions)}function l5(e){return e.kind==="StringValue"}function c5(e){return e.kind==="BooleanValue"}function u5(e){return e.kind==="IntValue"}function d5(e){return e.kind==="FloatValue"}function f5(e){return e.kind==="Variable"}function h5(e){return e.kind==="ObjectValue"}function p5(e){return e.kind==="ListValue"}function m5(e){return e.kind==="EnumValue"}function v5(e){return e.kind==="NullValue"}function wi(e,t,r,n){if(u5(r)||d5(r))e[t.value]=Number(r.value);else if(c5(r)||l5(r))e[t.value]=r.value;else if(h5(r)){var i={};r.fields.map(function(a){return wi(i,a.name,a.value,n)}),e[t.value]=i}else if(f5(r)){var o=(n||{})[r.name.value];e[t.value]=o}else if(p5(r))e[t.value]=r.values.map(function(a){var s={};return wi(s,t,a,n),s[t.value]});else if(m5(r))e[t.value]=r.value;else if(v5(r))e[t.value]=null;else throw __DEV__?new be('The inline argument "'.concat(t.value,'" of kind "').concat(r.kind,'"')+"is not supported. Use variables instead of inline arguments to overcome this limitation."):new be(55)}function y5(e,t){var r=null;e.directives&&(r={},e.directives.forEach(function(i){r[i.name.value]={},i.arguments&&i.arguments.forEach(function(o){var a=o.name,s=o.value;return wi(r[i.name.value],a,s,t)})}));var n=null;return e.arguments&&e.arguments.length&&(n={},e.arguments.forEach(function(i){var o=i.name,a=i.value;return wi(n,o,a,t)})),Oh(e.name.value,n,r)}var g5=["connection","include","skip","client","rest","export"],Oh=Object.assign(function(e,t,r){if(t&&r&&r.connection&&r.connection.key)if(r.connection.filter&&r.connection.filter.length>0){var n=r.connection.filter?r.connection.filter:[];n.sort();var i={};return n.forEach(function(s){i[s]=t[s]}),"".concat(r.connection.key,"(").concat(Yi(i),")")}else return r.connection.key;var o=e;if(t){var a=Yi(t);o+="(".concat(a,")")}return r&&Object.keys(r).forEach(function(s){g5.indexOf(s)===-1&&(r[s]&&Object.keys(r[s]).length?o+="@".concat(s,"(").concat(Yi(r[s]),")"):o+="@".concat(s))}),o},{setStringify:function(e){var t=Yi;return Yi=e,t}}),Yi=function(t){return JSON.stringify(t,b5)};function b5(e,t){return We(t)&&!Array.isArray(t)&&(t=Object.keys(t).sort().reduce(function(r,n){return r[n]=t[n],r},{})),t}function Hl(e,t){if(e.arguments&&e.arguments.length){var r={};return e.arguments.forEach(function(n){var i=n.name,o=n.value;return wi(r,i,o,t)}),r}return null}function Ln(e){return e.alias?e.alias.value:e.name.value}function Ju(e,t,r){if(typeof e.__typename=="string")return e.__typename;for(var n=0,i=t.selections;n<i.length;n++){var o=i[n];if(Mr(o)){if(o.name.value==="__typename")return e[Ln(o)]}else{var a=Ju(e,Eh(o,r).selectionSet,r);if(typeof a=="string")return a}}}function Mr(e){return e.kind==="Field"}function i1(e){return e.kind==="InlineFragment"}function Gl(e){__DEV__?B(e&&e.kind==="Document",'Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a "gql" tag? http://docs.apollostack.com/apollo-client/core.html#gql'):B(e&&e.kind==="Document",47);var t=e.definitions.filter(function(r){return r.kind!=="FragmentDefinition"}).map(function(r){if(r.kind!=="OperationDefinition")throw __DEV__?new be('Schema type definitions not allowed in queries. Found: "'.concat(r.kind,'"')):new be(48);return r});return __DEV__?B(t.length<=1,"Ambiguous GraphQL document: contains ".concat(t.length," operations")):B(t.length<=1,49),e}function Vo(e){return Gl(e),e.definitions.filter(function(t){return t.kind==="OperationDefinition"})[0]}function ed(e){return e.definitions.filter(function(t){return t.kind==="OperationDefinition"&&t.name}).map(function(t){return t.name.value})[0]||null}function Ch(e){return e.definitions.filter(function(t){return t.kind==="FragmentDefinition"})}function o1(e){var t=Vo(e);return __DEV__?B(t&&t.operation==="query","Must contain a query definition."):B(t&&t.operation==="query",50),t}function $5(e){__DEV__?B(e.kind==="Document",'Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a "gql" tag? http://docs.apollostack.com/apollo-client/core.html#gql'):B(e.kind==="Document",51),__DEV__?B(e.definitions.length<=1,"Fragment must have exactly one definition."):B(e.definitions.length<=1,52);var t=e.definitions[0];return __DEV__?B(t.kind==="FragmentDefinition","Must be a fragment definition."):B(t.kind==="FragmentDefinition",53),t}function Ph(e){Gl(e);for(var t,r=0,n=e.definitions;r<n.length;r++){var i=n[r];if(i.kind==="OperationDefinition"){var o=i.operation;if(o==="query"||o==="mutation"||o==="subscription")return i}i.kind==="FragmentDefinition"&&!t&&(t=i)}if(t)return t;throw __DEV__?new be("Expected a parsed GraphQL query with a query, mutation, subscription, or a fragment."):new be(54)}function Th(e){var t=Object.create(null),r=e&&e.variableDefinitions;return r&&r.length&&r.forEach(function(n){n.defaultValue&&wi(t,n.variable.name,n.defaultValue)}),t}function V0(e,t,r){var n=0;return e.forEach(function(i,o){t.call(this,i,o,e)&&(e[n++]=i)},r),e.length=n,e}var B0={kind:"Field",name:{kind:"Name",value:"__typename"}};function a1(e,t){return!e||e.selectionSet.selections.every(function(r){return r.kind==="FragmentSpread"&&a1(t[r.name.value],t)})}function Nh(e){return a1(Vo(e)||$5(e),kh(Ch(e)))?null:e}function W0(e){return function(r){return e.some(function(n){return n.name&&n.name===r.name.value||n.test&&n.test(r)})}}function s1(e,t){var r=Object.create(null),n=[],i=Object.create(null),o=[],a=Nh(ar(t,{Variable:{enter:function(s,c,l){l.kind!=="VariableDefinition"&&(r[s.name.value]=!0)}},Field:{enter:function(s){if(e&&s.directives){var c=e.some(function(l){return l.remove});if(c&&s.directives&&s.directives.some(W0(e)))return s.arguments&&s.arguments.forEach(function(l){l.value.kind==="Variable"&&n.push({name:l.value.name.value})}),s.selectionSet&&l1(s.selectionSet).forEach(function(l){o.push({name:l.name.value})}),null}}},FragmentSpread:{enter:function(s){i[s.name.value]=!0}},Directive:{enter:function(s){if(W0(e)(s))return null}}}));return a&&V0(n,function(s){return!!s.name&&!r[s.name]}).length&&(a=S5(n,a)),a&&V0(o,function(s){return!!s.name&&!i[s.name]}).length&&(a=k5(o,a)),a}var Ih=Object.assign(function(e){return ar(e,{SelectionSet:{enter:function(t,r,n){if(!(n&&n.kind==="OperationDefinition")){var i=t.selections;if(!!i){var o=i.some(function(s){return Mr(s)&&(s.name.value==="__typename"||s.name.value.lastIndexOf("__",0)===0)});if(!o){var a=n;if(!(Mr(a)&&a.directives&&a.directives.some(function(s){return s.name.value==="export"})))return O(O({},t),{selections:xs(xs([],i,!0),[B0],!1)})}}}}}})},{added:function(e){return e===B0}}),w5={test:function(e){var t=e.name.value==="connection";return t&&(!e.arguments||!e.arguments.some(function(r){return r.name.value==="key"}))&&__DEV__&&B.warn("Removing an @connection directive even though it does not have a key. You may want to use the key parameter to specify a store key."),t}};function _5(e){return s1([w5],Gl(e))}function x5(e){return function(r){return e.some(function(n){return r.value&&r.value.kind==="Variable"&&r.value.name&&(n.name===r.value.name.value||n.test&&n.test(r))})}}function S5(e,t){var r=x5(e);return Nh(ar(t,{OperationDefinition:{enter:function(n){return O(O({},n),{variableDefinitions:n.variableDefinitions?n.variableDefinitions.filter(function(i){return!e.some(function(o){return o.name===i.variable.name.value})}):[]})}},Field:{enter:function(n){var i=e.some(function(a){return a.remove});if(i){var o=0;if(n.arguments&&n.arguments.forEach(function(a){r(a)&&(o+=1)}),o===1)return null}}},Argument:{enter:function(n){if(r(n))return null}}}))}function k5(e,t){function r(n){if(e.some(function(i){return i.name===n.name.value}))return null}return Nh(ar(t,{FragmentSpread:{enter:r},FragmentDefinition:{enter:r}}))}function l1(e){var t=[];return e.selections.forEach(function(r){(Mr(r)||i1(r))&&r.selectionSet?l1(r.selectionSet).forEach(function(n){return t.push(n)}):r.kind==="FragmentSpread"&&t.push(r)}),t}function E5(e){var t=Ph(e),r=t.operation;if(r==="query")return e;var n=ar(e,{OperationDefinition:{enter:function(i){return O(O({},i),{operation:"query"})}}});return n}function O5(e){Gl(e);var t=s1([{test:function(r){return r.name.value==="client"},remove:!0}],e);return t&&(t=ar(t,{FragmentDefinition:{enter:function(r){if(r.selectionSet){var n=r.selectionSet.selections.every(function(i){return Mr(i)&&i.name.value==="__typename"});if(n)return null}}}})),t}var C5=Object.prototype.hasOwnProperty;function q0(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Ah(e)}function Ah(e){var t=e[0]||{},r=e.length;if(r>1)for(var n=new cn,i=1;i<r;++i)t=n.merge(t,e[i]);return t}var P5=function(e,t,r){return this.merge(e[r],t[r])},cn=function(){function e(t){t===void 0&&(t=P5),this.reconciler=t,this.isObject=We,this.pastCopies=new Set}return e.prototype.merge=function(t,r){for(var n=this,i=[],o=2;o<arguments.length;o++)i[o-2]=arguments[o];return We(r)&&We(t)?(Object.keys(r).forEach(function(a){if(C5.call(t,a)){var s=t[a];if(r[a]!==s){var c=n.reconciler.apply(n,xs([t,r,a],i,!1));c!==s&&(t=n.shallowCopyForMerge(t),t[a]=c)}}else t=n.shallowCopyForMerge(t),t[a]=r[a]}),t):r},e.prototype.shallowCopyForMerge=function(t){return We(t)&&(this.pastCopies.has(t)||(Array.isArray(t)?t=t.slice(0):t=O({__proto__:Object.getPrototypeOf(t)},t),this.pastCopies.add(t))),t},e}();function T5(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=N5(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
42
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function N5(e,t){if(!!e){if(typeof e=="string")return H0(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return H0(e,t)}}function H0(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function G0(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Dh(e,t,r){return t&&G0(e.prototype,t),r&&G0(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var Rh=function(){return typeof Symbol=="function"},Fh=function(e){return Rh()&&Boolean(Symbol[e])},Lh=function(e){return Fh(e)?Symbol[e]:"@@"+e};Rh()&&!Fh("observable")&&(Symbol.observable=Symbol("observable"));var I5=Lh("iterator"),td=Lh("observable"),c1=Lh("species");function As(e,t){var r=e[t];if(r!=null){if(typeof r!="function")throw new TypeError(r+" is not a function");return r}}function Xi(e){var t=e.constructor;return t!==void 0&&(t=t[c1],t===null&&(t=void 0)),t!==void 0?t:Pe}function A5(e){return e instanceof Pe}function _i(e){_i.log?_i.log(e):setTimeout(function(){throw e})}function Oa(e){Promise.resolve().then(function(){try{e()}catch(t){_i(t)}})}function u1(e){var t=e._cleanup;if(t!==void 0&&(e._cleanup=void 0,!!t))try{if(typeof t=="function")t();else{var r=As(t,"unsubscribe");r&&r.call(t)}}catch(n){_i(n)}}function rd(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function D5(e){var t=e._queue;if(!!t){e._queue=void 0,e._state="ready";for(var r=0;r<t.length&&(d1(e,t[r].type,t[r].value),e._state!=="closed");++r);}}function d1(e,t,r){e._state="running";var n=e._observer;try{var i=As(n,t);switch(t){case"next":i&&i.call(n,r);break;case"error":if(rd(e),i)i.call(n,r);else throw r;break;case"complete":rd(e),i&&i.call(n);break}}catch(o){_i(o)}e._state==="closed"?u1(e):e._state==="running"&&(e._state="ready")}function Dc(e,t,r){if(e._state!=="closed"){if(e._state==="buffering"){e._queue.push({type:t,value:r});return}if(e._state!=="ready"){e._state="buffering",e._queue=[{type:t,value:r}],Oa(function(){return D5(e)});return}d1(e,t,r)}}var R5=function(){function e(r,n){this._cleanup=void 0,this._observer=r,this._queue=void 0,this._state="initializing";var i=new F5(this);try{this._cleanup=n.call(void 0,i)}catch(o){i.error(o)}this._state==="initializing"&&(this._state="ready")}var t=e.prototype;return t.unsubscribe=function(){this._state!=="closed"&&(rd(this),u1(this))},Dh(e,[{key:"closed",get:function(){return this._state==="closed"}}]),e}(),F5=function(){function e(r){this._subscription=r}var t=e.prototype;return t.next=function(n){Dc(this._subscription,"next",n)},t.error=function(n){Dc(this._subscription,"error",n)},t.complete=function(){Dc(this._subscription,"complete")},Dh(e,[{key:"closed",get:function(){return this._subscription._state==="closed"}}]),e}(),Pe=function(){function e(r){if(!(this instanceof e))throw new TypeError("Observable cannot be called as a function");if(typeof r!="function")throw new TypeError("Observable initializer must be a function");this._subscriber=r}var t=e.prototype;return t.subscribe=function(n){return(typeof n!="object"||n===null)&&(n={next:n,error:arguments[1],complete:arguments[2]}),new R5(n,this._subscriber)},t.forEach=function(n){var i=this;return new Promise(function(o,a){if(typeof n!="function"){a(new TypeError(n+" is not a function"));return}function s(){c.unsubscribe(),o()}var c=i.subscribe({next:function(l){try{n(l,s)}catch(u){a(u),c.unsubscribe()}},error:a,complete:o})})},t.map=function(n){var i=this;if(typeof n!="function")throw new TypeError(n+" is not a function");var o=Xi(this);return new o(function(a){return i.subscribe({next:function(s){try{s=n(s)}catch(c){return a.error(c)}a.next(s)},error:function(s){a.error(s)},complete:function(){a.complete()}})})},t.filter=function(n){var i=this;if(typeof n!="function")throw new TypeError(n+" is not a function");var o=Xi(this);return new o(function(a){return i.subscribe({next:function(s){try{if(!n(s))return}catch(c){return a.error(c)}a.next(s)},error:function(s){a.error(s)},complete:function(){a.complete()}})})},t.reduce=function(n){var i=this;if(typeof n!="function")throw new TypeError(n+" is not a function");var o=Xi(this),a=arguments.length>1,s=!1,c=arguments[1],l=c;return new o(function(u){return i.subscribe({next:function(d){var f=!s;if(s=!0,!f||a)try{l=n(l,d)}catch(h){return u.error(h)}else l=d},error:function(d){u.error(d)},complete:function(){if(!s&&!a)return u.error(new TypeError("Cannot reduce an empty sequence"));u.next(l),u.complete()}})})},t.concat=function(){for(var n=this,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];var s=Xi(this);return new s(function(c){var l,u=0;function d(f){l=f.subscribe({next:function(h){c.next(h)},error:function(h){c.error(h)},complete:function(){u===o.length?(l=void 0,c.complete()):d(s.from(o[u++]))}})}return d(n),function(){l&&(l.unsubscribe(),l=void 0)}})},t.flatMap=function(n){var i=this;if(typeof n!="function")throw new TypeError(n+" is not a function");var o=Xi(this);return new o(function(a){var s=[],c=i.subscribe({next:function(u){if(n)try{u=n(u)}catch(f){return a.error(f)}var d=o.from(u).subscribe({next:function(f){a.next(f)},error:function(f){a.error(f)},complete:function(){var f=s.indexOf(d);f>=0&&s.splice(f,1),l()}});s.push(d)},error:function(u){a.error(u)},complete:function(){l()}});function l(){c.closed&&s.length===0&&a.complete()}return function(){s.forEach(function(u){return u.unsubscribe()}),c.unsubscribe()}})},t[td]=function(){return this},e.from=function(n){var i=typeof this=="function"?this:e;if(n==null)throw new TypeError(n+" is not an object");var o=As(n,td);if(o){var a=o.call(n);if(Object(a)!==a)throw new TypeError(a+" is not an object");return A5(a)&&a.constructor===i?a:new i(function(s){return a.subscribe(s)})}if(Fh("iterator")&&(o=As(n,I5),o))return new i(function(s){Oa(function(){if(!s.closed){for(var c=T5(o.call(n)),l;!(l=c()).done;){var u=l.value;if(s.next(u),s.closed)return}s.complete()}})});if(Array.isArray(n))return new i(function(s){Oa(function(){if(!s.closed){for(var c=0;c<n.length;++c)if(s.next(n[c]),s.closed)return;s.complete()}})});throw new TypeError(n+" is not observable")},e.of=function(){for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];var a=typeof this=="function"?this:e;return new a(function(s){Oa(function(){if(!s.closed){for(var c=0;c<i.length;++c)if(s.next(i[c]),s.closed)return;s.complete()}})})},Dh(e,null,[{key:c1,get:function(){return this}}]),e}();Rh()&&Object.defineProperty(Pe,Symbol("extensions"),{value:{symbol:td,hostReportError:_i},configurable:!0});function L5(e){var t,r=e.Symbol;if(typeof r=="function")if(r.observable)t=r.observable;else{typeof r.for=="function"?t=r.for("https://github.com/benlesh/symbol-observable"):t=r("https://github.com/benlesh/symbol-observable");try{r.observable=t}catch{}}else t="@@observable";return t}var ei;typeof self<"u"?ei=self:typeof window<"u"?ei=window:typeof global<"u"?ei=global:typeof module<"u"?ei=module:ei=Function("return this")();L5(ei);var Q0=Pe.prototype,K0="@@observable";Q0[K0]||(Q0[K0]=function(){return this});var M5=Object.prototype.toString;function f1(e){return nd(e)}function nd(e,t){switch(M5.call(e)){case"[object Array]":{if(t=t||new Map,t.has(e))return t.get(e);var r=e.slice(0);return t.set(e,r),r.forEach(function(i,o){r[o]=nd(i,t)}),r}case"[object Object]":{if(t=t||new Map,t.has(e))return t.get(e);var n=Object.create(Object.getPrototypeOf(e));return t.set(e,n),Object.keys(e).forEach(function(i){n[i]=nd(e[i],t)}),n}default:return e}}function j5(e){var t=new Set([e]);return t.forEach(function(r){We(r)&&z5(r)===r&&Object.getOwnPropertyNames(r).forEach(function(n){We(r[n])&&t.add(r[n])})}),e}function z5(e){if(__DEV__&&!Object.isFrozen(e))try{Object.freeze(e)}catch(t){if(t instanceof TypeError)return null;throw t}return e}function id(e){return __DEV__&&j5(e),e}function po(e,t,r){var n=[];e.forEach(function(i){return i[t]&&n.push(i)}),n.forEach(function(i){return i[t](r)})}function Rc(e,t,r){return new Pe(function(n){var i=n.next,o=n.error,a=n.complete,s=0,c=!1,l={then:function(h){return new Promise(function(p){return p(h())})}};function u(h,p){return h?function(m){++s;var v=function(){return h(m)};l=l.then(v,v).then(function(y){--s,i&&i.call(n,y),c&&d.complete()},function(y){throw--s,y}).catch(function(y){o&&o.call(n,y)})}:function(m){return p&&p.call(n,m)}}var d={next:u(t,i),error:u(r,o),complete:function(){c=!0,s||a&&a.call(n)}},f=e.subscribe(d);return function(){return f.unsubscribe()}})}var Vn=typeof WeakMap=="function"&&qt(function(){return navigator.product})!=="ReactNative",U5=typeof WeakSet=="function",h1=typeof Symbol=="function"&&typeof Symbol.for=="function",Ql=h1&&Symbol.asyncIterator;qt(function(){return window.document.createElement});qt(function(){return navigator.userAgent.indexOf("jsdom")>=0});function p1(e){function t(r){Object.defineProperty(e,r,{value:Pe})}return h1&&Symbol.species&&t(Symbol.species),t("@@species"),e}function Y0(e){return e&&typeof e.then=="function"}var uo=function(e){lr(t,e);function t(r){var n=e.call(this,function(i){return n.addObserver(i),function(){return n.removeObserver(i)}})||this;return n.observers=new Set,n.promise=new Promise(function(i,o){n.resolve=i,n.reject=o}),n.handlers={next:function(i){n.sub!==null&&(n.latest=["next",i],n.notify("next",i),po(n.observers,"next",i))},error:function(i){var o=n.sub;o!==null&&(o&&setTimeout(function(){return o.unsubscribe()}),n.sub=null,n.latest=["error",i],n.reject(i),n.notify("error",i),po(n.observers,"error",i))},complete:function(){var i=n.sub;if(i!==null){var o=n.sources.shift();o?Y0(o)?o.then(function(a){return n.sub=a.subscribe(n.handlers)}):n.sub=o.subscribe(n.handlers):(i&&setTimeout(function(){return i.unsubscribe()}),n.sub=null,n.latest&&n.latest[0]==="next"?n.resolve(n.latest[1]):n.resolve(),n.notify("complete"),po(n.observers,"complete"))}}},n.nextResultListeners=new Set,n.cancel=function(i){n.reject(i),n.sources=[],n.handlers.complete()},n.promise.catch(function(i){}),typeof r=="function"&&(r=[new Pe(r)]),Y0(r)?r.then(function(i){return n.start(i)},n.handlers.error):n.start(r),n}return t.prototype.start=function(r){this.sub===void 0&&(this.sources=Array.from(r),this.handlers.complete())},t.prototype.deliverLastMessage=function(r){if(this.latest){var n=this.latest[0],i=r[n];i&&i.call(r,this.latest[1]),this.sub===null&&n==="next"&&r.complete&&r.complete()}},t.prototype.addObserver=function(r){this.observers.has(r)||(this.deliverLastMessage(r),this.observers.add(r))},t.prototype.removeObserver=function(r){this.observers.delete(r)&&this.observers.size<1&&this.handlers.complete()},t.prototype.notify=function(r,n){var i=this.nextResultListeners;i.size&&(this.nextResultListeners=new Set,i.forEach(function(o){return o(r,n)}))},t.prototype.beforeNext=function(r){var n=!1;this.nextResultListeners.add(function(i,o){n||(n=!0,r(i,o))})},t}(Pe);p1(uo);function Yt(e){return Array.isArray(e)&&e.length>0}function di(e){return"incremental"in e}function V5(e){return"hasNext"in e&&"data"in e}function B5(e){return di(e)||V5(e)}function m1(e,t){var r=e,n=new cn;return di(t)&&Yt(t.incremental)&&t.incremental.forEach(function(i){for(var o=i.data,a=i.path,s=a.length-1;s>=0;--s){var c=a[s],l=!isNaN(+c),u=l?[]:{};u[c]=o,o=u}r=n.merge(r,o)}),r}function Ca(e){var t=od(e);return Yt(t)}function od(e){var t=Yt(e.errors)?e.errors.slice(0):[];return di(e)&&Yt(e.incremental)&&e.incremental.forEach(function(r){r.errors&&t.push.apply(t,r.errors)}),t}function Kl(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Object.create(null);return e.forEach(function(n){!n||Object.keys(n).forEach(function(i){var o=n[i];o!==void 0&&(r[i]=o)})}),r}var X0=new Map;function ad(e){var t=X0.get(e)||1;return X0.set(e,t+1),"".concat(e,":").concat(t,":").concat(Math.random().toString(36).slice(2))}function W5(e){var t=ad("stringifyForDisplay");return JSON.stringify(e,function(r,n){return n===void 0?t:n}).split(JSON.stringify(t)).join("<undefined>")}function Fc(e,t){return Kl(e,t,t.variables&&{variables:O(O({},e&&e.variables),t.variables)})}function Z0(e){return new Pe(function(t){t.error(e)})}var sd=function(e,t,r){var n=new Error(r);throw n.name="ServerError",n.response=e,n.statusCode=e.status,n.result=t,n};function q5(e){for(var t=["query","operationName","variables","extensions","context"],r=0,n=Object.keys(e);r<n.length;r++){var i=n[r];if(t.indexOf(i)<0)throw __DEV__?new be("illegal argument: ".concat(i)):new be(27)}return e}function H5(e,t){var r=O({},e),n=function(o){typeof o=="function"?r=O(O({},r),o(r)):r=O(O({},r),o)},i=function(){return O({},r)};return Object.defineProperty(t,"setContext",{enumerable:!1,value:n}),Object.defineProperty(t,"getContext",{enumerable:!1,value:i}),t}function G5(e){var t={variables:e.variables||{},extensions:e.extensions||{},operationName:e.operationName,query:e.query};return t.operationName||(t.operationName=typeof t.query!="string"?ed(t.query)||void 0:""),t}function J0(e,t){return t?t(e):Pe.of()}function Zi(e){return typeof e=="function"?new ji(e):e}function sa(e){return e.request.length<=1}var Q5=function(e){lr(t,e);function t(r,n){var i=e.call(this,r)||this;return i.link=n,i}return t}(Error),ji=function(){function e(t){t&&(this.request=t)}return e.empty=function(){return new e(function(){return Pe.of()})},e.from=function(t){return t.length===0?e.empty():t.map(Zi).reduce(function(r,n){return r.concat(n)})},e.split=function(t,r,n){var i=Zi(r),o=Zi(n||new e(J0));return sa(i)&&sa(o)?new e(function(a){return t(a)?i.request(a)||Pe.of():o.request(a)||Pe.of()}):new e(function(a,s){return t(a)?i.request(a,s)||Pe.of():o.request(a,s)||Pe.of()})},e.execute=function(t,r){return t.request(H5(r.context,G5(q5(r))))||Pe.of()},e.concat=function(t,r){var n=Zi(t);if(sa(n))return __DEV__&&B.warn(new Q5("You are calling concat on a terminating link, which will have no effect",n)),n;var i=Zi(r);return sa(i)?new e(function(o){return n.request(o,function(a){return i.request(a)||Pe.of()})||Pe.of()}):new e(function(o,a){return n.request(o,function(s){return i.request(s,a)||Pe.of()})||Pe.of()})},e.prototype.split=function(t,r,n){return this.concat(e.split(t,r,n||new e(J0)))},e.prototype.concat=function(t){return e.concat(this,t)},e.prototype.request=function(t,r){throw __DEV__?new be("request is not implemented"):new be(22)},e.prototype.onError=function(t,r){if(r&&r.error)return r.error(t),!1;throw t},e.prototype.setOnError=function(t){return this.onError=t,this},e}(),ld=ji.execute,K5="3.7.6";function Y5(e){return!!e.body}function X5(e){return!!e.getReader}function Z5(e){return!!(Ql&&e[Symbol.asyncIterator])}function J5(e){return!!e.stream}function ex(e){return!!e.arrayBuffer}function tx(e){return!!e.pipe}function rx(e){var t,r=e[Symbol.asyncIterator]();return t={next:function(){return r.next()}},t[Symbol.asyncIterator]=function(){return this},t}function nx(e){var t=null,r=null,n=!1,i=[],o=[];function a(d){if(!r){if(o.length){var f=o.shift();if(Array.isArray(f)&&f[0])return f[0]({value:d,done:!1})}i.push(d)}}function s(d){r=d;var f=o.slice();f.forEach(function(h){h[1](d)}),!t||t()}function c(){n=!0;var d=o.slice();d.forEach(function(f){f[0]({value:void 0,done:!0})}),!t||t()}t=function(){t=null,e.removeListener("data",a),e.removeListener("error",s),e.removeListener("end",c),e.removeListener("finish",c),e.removeListener("close",c)},e.on("data",a),e.on("error",s),e.on("end",c),e.on("finish",c),e.on("close",c);function l(){return new Promise(function(d,f){if(r)return f(r);if(i.length)return d({value:i.shift(),done:!1});if(n)return d({value:void 0,done:!0});o.push([d,f])})}var u={next:function(){return l()}};return Ql&&(u[Symbol.asyncIterator]=function(){return this}),u}function ix(e){var t=!1,r={next:function(){return t?Promise.resolve({value:void 0,done:!0}):(t=!0,new Promise(function(n,i){e.then(function(o){n({value:o,done:!1})}).catch(i)}))}};return Ql&&(r[Symbol.asyncIterator]=function(){return this}),r}function em(e){var t={next:function(){return e.read()}};return Ql&&(t[Symbol.asyncIterator]=function(){return this}),t}function ox(e){var t=e;if(Y5(e)&&(t=e.body),Z5(t))return rx(t);if(X5(t))return em(t.getReader());if(J5(t))return em(t.stream().getReader());if(ex(t))return ix(t.arrayBuffer());if(tx(t))return nx(t);throw new Error("Unknown body type for responseIterator. Please pass a streamable response.")}var tm=Object.prototype.hasOwnProperty;function ax(e,t){var r,n,i;return oe(this,void 0,void 0,function(){var o,a,s,c,l,u,d,f,h,p,m,v,y,b,g,_,k,E,x,T;return Kr(this,function(j){switch(j.label){case 0:if(TextDecoder===void 0)throw new Error("TextDecoder must be defined in the environment: please import a polyfill.");o=new TextDecoder("utf-8"),a=(r=e.headers)===null||r===void 0?void 0:r.get("content-type"),s="boundary=",c=a?.includes(s)?a?.substring(a?.indexOf(s)+s.length).replace(/['"]/g,"").replace(/\;(.*)/gm,"").trim():"-",l="--".concat(c),u="",d=ox(e),f=!0,j.label=1;case 1:return f?[4,d.next()]:[3,3];case 2:for(h=j.sent(),p=h.value,m=h.done,v=typeof p=="string"?p:o.decode(p),f=!m,u+=v,y=u.indexOf(l);y>-1;){if(b=void 0,T=[u.slice(0,y),u.slice(y+l.length)],b=T[0],u=T[1],b.trim()){if(g=b.indexOf(`\r
43
43
  \r
44
- `),_=sx(b.slice(0,g)),S=_["content-type"],S&&S.toLowerCase().indexOf("application/json")===-1)throw new Error("Unsupported patch content type: application/json is required.");E=b.slice(g);try{x=v1(e,E.replace(`\r
45
- `,"")),(Object.keys(x).length>1||"data"in x||"incremental"in x||"errors"in x)&&((n=t.next)===null||n===void 0||n.call(t,x))}catch(j){Lh(j,t)}}y=u.indexOf(l)}return[3,1];case 3:return(i=t.complete)===null||i===void 0||i.call(t),[2]}})})}function sx(e){var t={};return e.split(`
46
- `).forEach(function(r){var n=r.indexOf(":");if(n>-1){var i=r.slice(0,n).trim().toLowerCase(),o=r.slice(n+1).trim();t[i]=o}}),t}function v1(e,t){if(e.status>=300){var r=function(){try{return JSON.parse(t)}catch{return t}};ad(e,r(),"Response not successful: Received status code ".concat(e.status))}try{return JSON.parse(t)}catch(i){var n=i;throw n.name="ServerParseError",n.response=e,n.statusCode=e.status,n.bodyText=t,n}}function Lh(e,t){var r,n;e.name!=="AbortError"&&(e.result&&e.result.errors&&e.result.data&&((r=t.next)===null||r===void 0||r.call(t,e.result)),(n=t.error)===null||n===void 0||n.call(t,e))}function lx(e,t,r){cx(t)(e).then(function(n){var i,o;(i=r.next)===null||i===void 0||i.call(r,n),(o=r.complete)===null||o===void 0||o.call(r)}).catch(function(n){return Lh(n,r)})}function cx(e){return function(t){return t.text().then(function(r){return v1(t,r)}).then(function(r){return t.status>=300&&ad(t,r,"Response not successful: Received status code ".concat(t.status)),!Array.isArray(r)&&!tm.call(r,"data")&&!tm.call(r,"errors")&&ad(t,r,"Server response was missing for query '".concat(Array.isArray(e)?e.map(function(n){return n.operationName}):e.operationName,"'.")),r})}}var ld=function(e,t){var r;try{r=JSON.stringify(e)}catch(i){var n=__DEV__?new be("Network request failed. ".concat(t," is not serializable: ").concat(i.message)):new be(24);throw n.parseError=i,n}return r},ux={includeQuery:!0,includeExtensions:!1,preserveHeaderCase:!1},dx={accept:"*/*","content-type":"application/json"},fx={method:"POST"},hx={http:ux,headers:dx,options:fx},px=function(e,t){return t(e)};function mx(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i={},o={};r.forEach(function(d){i=O(O(O({},i),d.options),{headers:O(O({},i.headers),d.headers)}),d.credentials&&(i.credentials=d.credentials),o=O(O({},o),d.http)}),i.headers&&(i.headers=vx(i.headers,o.preserveHeaderCase));var a=e.operationName,s=e.extensions,c=e.variables,l=e.query,u={operationName:a,variables:c};return o.includeExtensions&&(u.extensions=s),o.includeQuery&&(u.query=t(l,Z4)),{options:i,body:u}}function vx(e,t){if(!t){var r=Object.create(null);return Object.keys(Object(e)).forEach(function(o){r[o.toLowerCase()]=e[o]}),r}var n=Object.create(null);Object.keys(Object(e)).forEach(function(o){n[o.toLowerCase()]={originalName:o,value:e[o]}});var i=Object.create(null);return Object.keys(n).forEach(function(o){i[n[o].originalName]=n[o].value}),i}var yx=function(e){if(!e&&typeof fetch>"u")throw __DEV__?new be(`
44
+ `),_=sx(b.slice(0,g)),k=_["content-type"],k&&k.toLowerCase().indexOf("application/json")===-1)throw new Error("Unsupported patch content type: application/json is required.");E=b.slice(g);try{x=v1(e,E.replace(`\r
45
+ `,"")),(Object.keys(x).length>1||"data"in x||"incremental"in x||"errors"in x)&&((n=t.next)===null||n===void 0||n.call(t,x))}catch(z){Mh(z,t)}}y=u.indexOf(l)}return[3,1];case 3:return(i=t.complete)===null||i===void 0||i.call(t),[2]}})})}function sx(e){var t={};return e.split(`
46
+ `).forEach(function(r){var n=r.indexOf(":");if(n>-1){var i=r.slice(0,n).trim().toLowerCase(),o=r.slice(n+1).trim();t[i]=o}}),t}function v1(e,t){if(e.status>=300){var r=function(){try{return JSON.parse(t)}catch{return t}};sd(e,r(),"Response not successful: Received status code ".concat(e.status))}try{return JSON.parse(t)}catch(i){var n=i;throw n.name="ServerParseError",n.response=e,n.statusCode=e.status,n.bodyText=t,n}}function Mh(e,t){var r,n;e.name!=="AbortError"&&(e.result&&e.result.errors&&e.result.data&&((r=t.next)===null||r===void 0||r.call(t,e.result)),(n=t.error)===null||n===void 0||n.call(t,e))}function lx(e,t,r){cx(t)(e).then(function(n){var i,o;(i=r.next)===null||i===void 0||i.call(r,n),(o=r.complete)===null||o===void 0||o.call(r)}).catch(function(n){return Mh(n,r)})}function cx(e){return function(t){return t.text().then(function(r){return v1(t,r)}).then(function(r){return t.status>=300&&sd(t,r,"Response not successful: Received status code ".concat(t.status)),!Array.isArray(r)&&!tm.call(r,"data")&&!tm.call(r,"errors")&&sd(t,r,"Server response was missing for query '".concat(Array.isArray(e)?e.map(function(n){return n.operationName}):e.operationName,"'.")),r})}}var cd=function(e,t){var r;try{r=JSON.stringify(e)}catch(i){var n=__DEV__?new be("Network request failed. ".concat(t," is not serializable: ").concat(i.message)):new be(24);throw n.parseError=i,n}return r},ux={includeQuery:!0,includeExtensions:!1,preserveHeaderCase:!1},dx={accept:"*/*","content-type":"application/json"},fx={method:"POST"},hx={http:ux,headers:dx,options:fx},px=function(e,t){return t(e)};function mx(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i={},o={};r.forEach(function(d){i=O(O(O({},i),d.options),{headers:O(O({},i.headers),d.headers)}),d.credentials&&(i.credentials=d.credentials),o=O(O({},o),d.http)}),i.headers&&(i.headers=vx(i.headers,o.preserveHeaderCase));var a=e.operationName,s=e.extensions,c=e.variables,l=e.query,u={operationName:a,variables:c};return o.includeExtensions&&(u.extensions=s),o.includeQuery&&(u.query=t(l,Z4)),{options:i,body:u}}function vx(e,t){if(!t){var r=Object.create(null);return Object.keys(Object(e)).forEach(function(o){r[o.toLowerCase()]=e[o]}),r}var n=Object.create(null);Object.keys(Object(e)).forEach(function(o){n[o.toLowerCase()]={originalName:o,value:e[o]}});var i=Object.create(null);return Object.keys(n).forEach(function(o){i[n[o].originalName]=n[o].value}),i}var yx=function(e){if(!e&&typeof fetch>"u")throw __DEV__?new be(`
47
47
  "fetch" has not been found globally and no fetcher has been configured. To fix this, install a fetch package (like https://www.npmjs.com/package/cross-fetch), instantiate the fetcher, and pass it into your HttpLink constructor. For example:
48
48
 
49
49
  import fetch from 'cross-fetch';
@@ -51,7 +51,7 @@ import { ApolloClient, HttpLink } from '@apollo/client';
51
51
  const client = new ApolloClient({
52
52
  link: new HttpLink({ uri: '/graphql', fetch })
53
53
  });
54
- `):new be(23)},gx=function(){if(typeof AbortController>"u")return{controller:!1,signal:!1};var e=new AbortController,t=e.signal;return{controller:e,signal:t}},bx=function(e,t){var r=e.getContext(),n=r.uri;return n||(typeof t=="function"?t(e):t||"/graphql")};function $x(e,t){var r=[],n=function(d,f){r.push("".concat(d,"=").concat(encodeURIComponent(f)))};if("query"in t&&n("query",t.query),t.operationName&&n("operationName",t.operationName),t.variables){var i=void 0;try{i=ld(t.variables,"Variables map")}catch(d){return{parseError:d}}n("variables",i)}if(t.extensions){var o=void 0;try{o=ld(t.extensions,"Extensions map")}catch(d){return{parseError:d}}n("extensions",o)}var a="",s=e,c=e.indexOf("#");c!==-1&&(a=e.substr(c),s=e.substr(0,c));var l=s.indexOf("?")===-1?"?":"&",u=s+l+r.join("&")+a;return{newURI:u}}var rm=qt(function(){return fetch}),wx=function(e){e===void 0&&(e={});var t=e.uri,r=t===void 0?"/graphql":t,n=e.fetch,i=e.print,o=i===void 0?px:i,a=e.includeExtensions,s=e.preserveHeaderCase,c=e.useGETForQueries,l=e.includeUnusedVariables,u=l===void 0?!1:l,d=an(e,["uri","fetch","print","includeExtensions","preserveHeaderCase","useGETForQueries","includeUnusedVariables"]);__DEV__&&yx(n||rm);var f={http:{includeExtensions:a,preserveHeaderCase:s},options:d.fetchOptions,credentials:d.credentials,headers:d.headers};return new ji(function(h){var p=bx(h,r),m=h.getContext(),v={};if(m.clientAwareness){var y=m.clientAwareness,b=y.name,g=y.version;b&&(v["apollographql-client-name"]=b),g&&(v["apollographql-client-version"]=g)}var _=O(O({},v),m.headers),S={http:m.http,options:m.fetchOptions,credentials:m.credentials,headers:_},E=mx(h,o,hx,f,S),x=E.options,N=E.body;if(N.variables&&!u){var M=new Set(Object.keys(N.variables));ar(h.query,{Variable:function(ae,R,ge){ge&&ge.kind!=="VariableDefinition"&&M.delete(ae.name.value)}}),M.size&&(N.variables=O({},N.variables),M.forEach(function(ae){delete N.variables[ae]}))}var j;if(!x.signal){var q=gx(),A=q.controller,T=q.signal;j=A,j&&(x.signal=T)}var F=function(ae){return ae.kind==="OperationDefinition"&&ae.operation==="mutation"};if(c&&!h.query.definitions.some(F)&&(x.method="GET"),xh(["defer"],h.query)&&(x.headers=x.headers||{},x.headers.accept="multipart/mixed; deferSpec=20220824, application/json"),x.method==="GET"){var z=$x(p,N),Y=z.newURI,ne=z.parseError;if(ne)return Z0(ne);p=Y}else try{x.body=ld(N,"Payload")}catch(ae){return Z0(ae)}return new Pe(function(ae){var R=n||qt(function(){return fetch})||rm;return R(p,x).then(function(ge){var _e;h.setContext({response:ge});var D=(_e=ge.headers)===null||_e===void 0?void 0:_e.get("content-type");return D!==null&&/^multipart\/mixed/i.test(D)?ax(ge,ae):lx(ge,h,ae)}).catch(function(ge){return Lh(ge,ae)}),function(){j&&j.abort()}})})},y1=function(e){lr(t,e);function t(r){r===void 0&&(r={});var n=e.call(this,wx(r).request)||this;return n.options=r,n}return t}(ji),g1=Object.prototype,nm=g1.toString,_x=g1.hasOwnProperty,im=Function.prototype.toString,cd=new Map;function tt(e,t){try{return ud(e,t)}finally{cd.clear()}}function ud(e,t){if(e===t)return!0;var r=nm.call(e),n=nm.call(t);if(r!==n)return!1;switch(r){case"[object Array]":if(e.length!==t.length)return!1;case"[object Object]":{if(am(e,t))return!0;var i=om(e),o=om(t),a=i.length;if(a!==o.length)return!1;for(var s=0;s<a;++s)if(!_x.call(t,i[s]))return!1;for(var s=0;s<a;++s){var c=i[s];if(!ud(e[c],t[c]))return!1}return!0}case"[object Error]":return e.name===t.name&&e.message===t.message;case"[object Number]":if(e!==e)return t!==t;case"[object Boolean]":case"[object Date]":return+e==+t;case"[object RegExp]":case"[object String]":return e=="".concat(t);case"[object Map]":case"[object Set]":{if(e.size!==t.size)return!1;if(am(e,t))return!0;for(var l=e.entries(),u=r==="[object Map]";;){var d=l.next();if(d.done)break;var f=d.value,h=f[0],p=f[1];if(!t.has(h)||u&&!ud(p,t.get(h)))return!1}return!0}case"[object Uint16Array]":case"[object Uint8Array]":case"[object Uint32Array]":case"[object Int32Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object ArrayBuffer]":e=new Uint8Array(e),t=new Uint8Array(t);case"[object DataView]":{var m=e.byteLength;if(m===t.byteLength)for(;m--&&e[m]===t[m];);return m===-1}case"[object AsyncFunction]":case"[object GeneratorFunction]":case"[object AsyncGeneratorFunction]":case"[object Function]":{var v=im.call(e);return v!==im.call(t)?!1:!kx(v,Sx)}}return!1}function om(e){return Object.keys(e).filter(xx,e)}function xx(e){return this[e]!==void 0}var Sx="{ [native code] }";function kx(e,t){var r=e.length-t.length;return r>=0&&e.indexOf(t,r)===r}function am(e,t){var r=cd.get(e);if(r){if(r.has(t))return!0}else cd.set(e,r=new Set);return r.add(t),!1}var Ex=function(){return Object.create(null)},b1=Array.prototype,Ox=b1.forEach,Cx=b1.slice,Bo=function(){function e(t,r){t===void 0&&(t=!0),r===void 0&&(r=Ex),this.weakness=t,this.makeData=r}return e.prototype.lookup=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return this.lookupArray(t)},e.prototype.lookupArray=function(t){var r=this;return Ox.call(t,function(n){return r=r.getChildTrie(n)}),r.data||(r.data=this.makeData(Cx.call(t)))},e.prototype.getChildTrie=function(t){var r=this.weakness&&Px(t)?this.weak||(this.weak=new WeakMap):this.strong||(this.strong=new Map),n=r.get(t);return n||r.set(t,n=new e(this.weakness,this.makeData)),n},e}();function Px(e){switch(typeof e){case"object":if(e===null)break;case"function":return!0}return!1}var pt=null,sm={},Tx=1,Nx=function(){return function(){function e(){this.id=["slot",Tx++,Date.now(),Math.random().toString(36).slice(2)].join(":")}return e.prototype.hasValue=function(){for(var t=pt;t;t=t.parent)if(this.id in t.slots){var r=t.slots[this.id];if(r===sm)break;return t!==pt&&(pt.slots[this.id]=r),!0}return pt&&(pt.slots[this.id]=sm),!1},e.prototype.getValue=function(){if(this.hasValue())return pt.slots[this.id]},e.prototype.withValue=function(t,r,n,i){var o,a=(o={__proto__:null},o[this.id]=t,o),s=pt;pt={parent:s,slots:a};try{return r.apply(i,n)}finally{pt=s}},e.bind=function(t){var r=pt;return function(){var n=pt;try{return pt=r,t.apply(this,arguments)}finally{pt=n}}},e.noContext=function(t,r,n){if(pt){var i=pt;try{return pt=null,t.apply(n,r)}finally{pt=i}}else return t.apply(n,r)},e}()};function lm(e){try{return e()}catch{}}var Fc="@wry/context:Slot",Ix=lm(function(){return globalThis})||lm(function(){return global})||Object.create(null),cm=Ix,Yl=cm[Fc]||Array[Fc]||function(e){try{Object.defineProperty(cm,Fc,{value:e,enumerable:!1,writable:!1,configurable:!0})}finally{return e}}(Nx());Yl.bind;Yl.noContext;function Ax(){}var Dx=function(){function e(t,r){t===void 0&&(t=1/0),r===void 0&&(r=Ax),this.max=t,this.dispose=r,this.map=new Map,this.newest=null,this.oldest=null}return e.prototype.has=function(t){return this.map.has(t)},e.prototype.get=function(t){var r=this.getNode(t);return r&&r.value},e.prototype.getNode=function(t){var r=this.map.get(t);if(r&&r!==this.newest){var n=r.older,i=r.newer;i&&(i.older=n),n&&(n.newer=i),r.older=this.newest,r.older.newer=r,r.newer=null,this.newest=r,r===this.oldest&&(this.oldest=i)}return r},e.prototype.set=function(t,r){var n=this.getNode(t);return n?n.value=r:(n={key:t,value:r,newer:null,older:this.newest},this.newest&&(this.newest.newer=n),this.newest=n,this.oldest=this.oldest||n,this.map.set(t,n),n.value)},e.prototype.clean=function(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)},e.prototype.delete=function(t){var r=this.map.get(t);return r?(r===this.newest&&(this.newest=r.older),r===this.oldest&&(this.oldest=r.newer),r.newer&&(r.newer.older=r.older),r.older&&(r.older.newer=r.newer),this.map.delete(t),this.dispose(r.value,t),!0):!1},e}(),Xl=new Yl,Lc,Rx=Object.prototype.hasOwnProperty,Mh=(Lc=Array.from,Lc===void 0?function(e){var t=[];return e.forEach(function(r){return t.push(r)}),t}:Lc);function Ds(e){var t=e.unsubscribe;typeof t=="function"&&(e.unsubscribe=void 0,t())}var Eo=[],Fx=100;function xi(e,t){if(!e)throw new Error(t||"assertion failure")}function Lx(e,t){var r=e.length;return r>0&&r===t.length&&e[r-1]===t[r-1]}function $1(e){switch(e.length){case 0:throw new Error("unknown value");case 1:return e[0];case 2:throw e[1]}}function Mx(e){return e.slice(0)}var jx=function(){function e(t){this.fn=t,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],this.deps=null,++e.count}return e.prototype.peek=function(){if(this.value.length===1&&!un(this))return um(this),this.value[0]},e.prototype.recompute=function(t){return xi(!this.recomputing,"already recomputing"),um(this),un(this)?zx(this,t):$1(this.value)},e.prototype.setDirty=function(){this.dirty||(this.dirty=!0,this.value.length=0,w1(this),Ds(this))},e.prototype.dispose=function(){var t=this;this.setDirty(),E1(this),jh(this,function(r,n){r.setDirty(),O1(r,t)})},e.prototype.forget=function(){this.dispose()},e.prototype.dependOn=function(t){t.add(this),this.deps||(this.deps=Eo.pop()||new Set),this.deps.add(t)},e.prototype.forgetDeps=function(){var t=this;this.deps&&(Mh(this.deps).forEach(function(r){return r.delete(t)}),this.deps.clear(),Eo.push(this.deps),this.deps=null)},e.count=0,e}();function um(e){var t=Xl.getValue();if(t)return e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),un(e)?x1(t,e):S1(t,e),t}function zx(e,t){return E1(e),Xl.withValue(e,Ux,[e,t]),Bx(e,t)&&Vx(e),$1(e.value)}function Ux(e,t){e.recomputing=!0,e.value.length=0;try{e.value[0]=e.fn.apply(null,t)}catch(r){e.value[1]=r}e.recomputing=!1}function un(e){return e.dirty||!!(e.dirtyChildren&&e.dirtyChildren.size)}function Vx(e){e.dirty=!1,!un(e)&&_1(e)}function w1(e){jh(e,x1)}function _1(e){jh(e,S1)}function jh(e,t){var r=e.parents.size;if(r)for(var n=Mh(e.parents),i=0;i<r;++i)t(n[i],e)}function x1(e,t){xi(e.childValues.has(t)),xi(un(t));var r=!un(e);if(!e.dirtyChildren)e.dirtyChildren=Eo.pop()||new Set;else if(e.dirtyChildren.has(t))return;e.dirtyChildren.add(t),r&&w1(e)}function S1(e,t){xi(e.childValues.has(t)),xi(!un(t));var r=e.childValues.get(t);r.length===0?e.childValues.set(t,Mx(t.value)):Lx(r,t.value)||e.setDirty(),k1(e,t),!un(e)&&_1(e)}function k1(e,t){var r=e.dirtyChildren;r&&(r.delete(t),r.size===0&&(Eo.length<Fx&&Eo.push(r),e.dirtyChildren=null))}function E1(e){e.childValues.size>0&&e.childValues.forEach(function(t,r){O1(e,r)}),e.forgetDeps(),xi(e.dirtyChildren===null)}function O1(e,t){t.parents.delete(e),e.childValues.delete(t),k1(e,t)}function Bx(e,t){if(typeof e.subscribe=="function")try{Ds(e),e.unsubscribe=e.subscribe.apply(null,t)}catch{return e.setDirty(),!1}return!0}var Wx={setDirty:!0,dispose:!0,forget:!0};function C1(e){var t=new Map,r=e&&e.subscribe;function n(i){var o=Xl.getValue();if(o){var a=t.get(i);a||t.set(i,a=new Set),o.dependOn(a),typeof r=="function"&&(Ds(a),a.unsubscribe=r(i))}}return n.dirty=function(o,a){var s=t.get(o);if(s){var c=a&&Rx.call(Wx,a)?a:"setDirty";Mh(s).forEach(function(l){return l[c]()}),t.delete(o),Ds(s)}},n}function P1(){var e=new Bo(typeof WeakMap=="function");return function(){return e.lookupArray(arguments)}}P1();var Mc=new Set;function Rs(e,t){t===void 0&&(t=Object.create(null));var r=new Dx(t.max||Math.pow(2,16),function(l){return l.dispose()}),n=t.keyArgs,i=t.makeCacheKey||P1(),o=function(){var l=i.apply(null,n?n.apply(null,arguments):arguments);if(l===void 0)return e.apply(null,arguments);var u=r.get(l);u||(r.set(l,u=new jx(e)),u.subscribe=t.subscribe,u.forget=function(){return r.delete(l)});var d=u.recompute(Array.prototype.slice.call(arguments));return r.set(l,u),Mc.add(r),Xl.hasValue()||(Mc.forEach(function(f){return f.clean()}),Mc.clear()),d};Object.defineProperty(o,"size",{get:function(){return r.map.size},configurable:!1,enumerable:!1});function a(l){var u=r.get(l);u&&u.setDirty()}o.dirtyKey=a,o.dirty=function(){a(i.apply(null,arguments))};function s(l){var u=r.get(l);if(u)return u.peek()}o.peekKey=s,o.peek=function(){return s(i.apply(null,arguments))};function c(l){return r.delete(l)}return o.forgetKey=c,o.forget=function(){return c(i.apply(null,arguments))},o.makeCacheKey=i,o.getKey=n?function(){return i.apply(null,n.apply(null,arguments))}:i,Object.freeze(o)}var qx=function(){function e(){this.getFragmentDoc=Rs(a5)}return e.prototype.batch=function(t){var r=this,n=typeof t.optimistic=="string"?t.optimistic:t.optimistic===!1?null:void 0,i;return this.performTransaction(function(){return i=t.update(r)},n),i},e.prototype.recordOptimisticTransaction=function(t,r){this.performTransaction(t,r)},e.prototype.transformDocument=function(t){return t},e.prototype.transformForLink=function(t){return t},e.prototype.identify=function(t){},e.prototype.gc=function(){return[]},e.prototype.modify=function(t){return!1},e.prototype.readQuery=function(t,r){return r===void 0&&(r=!!t.optimistic),this.read(O(O({},t),{rootId:t.id||"ROOT_QUERY",optimistic:r}))},e.prototype.readFragment=function(t,r){return r===void 0&&(r=!!t.optimistic),this.read(O(O({},t),{query:this.getFragmentDoc(t.fragment,t.fragmentName),rootId:t.id,optimistic:r}))},e.prototype.writeQuery=function(t){var r=t.id,n=t.data,i=an(t,["id","data"]);return this.write(Object.assign(i,{dataId:r||"ROOT_QUERY",result:n}))},e.prototype.writeFragment=function(t){var r=t.id,n=t.data,i=t.fragment,o=t.fragmentName,a=an(t,["id","data","fragment","fragmentName"]);return this.write(Object.assign(a,{query:this.getFragmentDoc(i,o),dataId:r,result:n}))},e.prototype.updateQuery=function(t,r){return this.batch({update:function(n){var i=n.readQuery(t),o=r(i);return o==null?i:(n.writeQuery(O(O({},t),{data:o})),o)}})},e.prototype.updateFragment=function(t,r){return this.batch({update:function(n){var i=n.readFragment(t),o=r(i);return o==null?i:(n.writeFragment(O(O({},t),{data:o})),o)}})},e}(),T1=function(e){lr(t,e);function t(r,n,i,o){var a,s=e.call(this,r)||this;if(s.message=r,s.path=n,s.query=i,s.variables=o,Array.isArray(s.path)){s.missing=s.message;for(var c=s.path.length-1;c>=0;--c)s.missing=(a={},a[s.path[c]]=s.missing,a)}else s.missing=s.path;return s.__proto__=t.prototype,s}return t}(Error),lt=Object.prototype.hasOwnProperty;function Ji(e){return e==null}var Ge=Array.isArray;function N1(e,t){var r=e.__typename,n=e.id,i=e._id;if(typeof r=="string"&&(t&&(t.keyObject=Ji(n)?Ji(i)?void 0:{_id:i}:{id:n}),Ji(n)&&!Ji(i)&&(n=i),!Ji(n)))return"".concat(r,":").concat(typeof n=="number"||typeof n=="string"?n:JSON.stringify(n))}var I1={dataIdFromObject:N1,addTypename:!0,resultCaching:!0,canonizeResults:!1};function Hx(e){return Kl(I1,e)}function A1(e){var t=e.canonizeResults;return t===void 0?I1.canonizeResults:t}function Gx(e,t){return ke(t)?e.get(t.__ref,"__typename"):t&&t.__typename}var D1=/^[_a-z][_0-9a-z]*/i;function dn(e){var t=e.match(D1);return t?t[0]:e}function dd(e,t,r){return We(t)?Ge(t)?t.every(function(n){return dd(e,n,r)}):e.selections.every(function(n){if(Mr(n)&&ql(n,r)){var i=Ln(n);return lt.call(t,i)&&(!n.selectionSet||dd(n.selectionSet,t[i],r))}return!0}):!1}function ai(e){return We(e)&&!ke(e)&&!Ge(e)}function Qx(){return new cn}function R1(e,t){var r=Sh(Oh(e));return{fragmentMap:r,lookupFragment:function(n){var i=r[n];return!i&&t&&(i=t.lookup(n)),i||null}}}var Pa=Object.create(null),jc=function(){return Pa},dm=Object.create(null),Oo=function(){function e(t,r){var n=this;this.policies=t,this.group=r,this.data=Object.create(null),this.rootIds=Object.create(null),this.refs=Object.create(null),this.getFieldValue=function(i,o){return nd(ke(i)?n.get(i.__ref,o):i&&i[o])},this.canRead=function(i){return ke(i)?n.has(i.__ref):typeof i=="object"},this.toReference=function(i,o){if(typeof i=="string")return ui(i);if(ke(i))return i;var a=n.policies.identify(i)[0];if(a){var s=ui(a);return o&&n.merge(a,i),s}}}return e.prototype.toObject=function(){return O({},this.data)},e.prototype.has=function(t){return this.lookup(t,!0)!==void 0},e.prototype.get=function(t,r){if(this.group.depend(t,r),lt.call(this.data,t)){var n=this.data[t];if(n&&lt.call(n,r))return n[r]}if(r==="__typename"&&lt.call(this.policies.rootTypenamesById,t))return this.policies.rootTypenamesById[t];if(this instanceof Gr)return this.parent.get(t,r)},e.prototype.lookup=function(t,r){if(r&&this.group.depend(t,"__exists"),lt.call(this.data,t))return this.data[t];if(this instanceof Gr)return this.parent.lookup(t,r);if(this.policies.rootTypenamesById[t])return Object.create(null)},e.prototype.merge=function(t,r){var n=this,i;ke(t)&&(t=t.__ref),ke(r)&&(r=r.__ref);var o=typeof t=="string"?this.lookup(i=t):t,a=typeof r=="string"?this.lookup(i=r):r;if(!!a){__DEV__?B(typeof i=="string","store.merge expects a string ID"):B(typeof i=="string",1);var s=new cn(Yx).merge(o,a);if(this.data[i]=s,s!==o&&(delete this.refs[i],this.group.caching)){var c=Object.create(null);o||(c.__exists=1),Object.keys(a).forEach(function(l){if(!o||o[l]!==s[l]){c[l]=1;var u=dn(l);u!==l&&!n.policies.hasKeyArgs(s.__typename,u)&&(c[u]=1),s[l]===void 0&&!(n instanceof Gr)&&delete s[l]}}),c.__typename&&!(o&&o.__typename)&&this.policies.rootTypenamesById[i]===s.__typename&&delete c.__typename,Object.keys(c).forEach(function(l){return n.group.dirty(i,l)})}}},e.prototype.modify=function(t,r){var n=this,i=this.lookup(t);if(i){var o=Object.create(null),a=!1,s=!0,c={DELETE:Pa,INVALIDATE:dm,isReference:ke,toReference:this.toReference,canRead:this.canRead,readField:function(l,u){return n.policies.readField(typeof l=="string"?{fieldName:l,from:u||ui(t)}:l,{store:n})}};if(Object.keys(i).forEach(function(l){var u=dn(l),d=i[l];if(d!==void 0){var f=typeof r=="function"?r:r[l]||r[u];if(f){var h=f===jc?Pa:f(nd(d),O(O({},c),{fieldName:u,storeFieldName:l,storage:n.getStorage(t,l)}));h===dm?n.group.dirty(t,l):(h===Pa&&(h=void 0),h!==d&&(o[l]=h,a=!0,d=h))}d!==void 0&&(s=!1)}}),a)return this.merge(t,o),s&&(this instanceof Gr?this.data[t]=void 0:delete this.data[t],this.group.dirty(t,"__exists")),!0}return!1},e.prototype.delete=function(t,r,n){var i,o=this.lookup(t);if(o){var a=this.getFieldValue(o,"__typename"),s=r&&n?this.policies.getStoreFieldName({typename:a,fieldName:r,args:n}):r;return this.modify(t,s?(i={},i[s]=jc,i):jc)}return!1},e.prototype.evict=function(t,r){var n=!1;return t.id&&(lt.call(this.data,t.id)&&(n=this.delete(t.id,t.fieldName,t.args)),this instanceof Gr&&this!==r&&(n=this.parent.evict(t,r)||n),(t.fieldName||n)&&this.group.dirty(t.id,t.fieldName||"__exists")),n},e.prototype.clear=function(){this.replace(null)},e.prototype.extract=function(){var t=this,r=this.toObject(),n=[];return this.getRootIdSet().forEach(function(i){lt.call(t.policies.rootTypenamesById,i)||n.push(i)}),n.length&&(r.__META={extraRootIds:n.sort()}),r},e.prototype.replace=function(t){var r=this;if(Object.keys(this.data).forEach(function(o){t&&lt.call(t,o)||r.delete(o)}),t){var n=t.__META,i=an(t,["__META"]);Object.keys(i).forEach(function(o){r.merge(o,i[o])}),n&&n.extraRootIds.forEach(this.retain,this)}},e.prototype.retain=function(t){return this.rootIds[t]=(this.rootIds[t]||0)+1},e.prototype.release=function(t){if(this.rootIds[t]>0){var r=--this.rootIds[t];return r||delete this.rootIds[t],r}return 0},e.prototype.getRootIdSet=function(t){return t===void 0&&(t=new Set),Object.keys(this.rootIds).forEach(t.add,t),this instanceof Gr?this.parent.getRootIdSet(t):Object.keys(this.policies.rootTypenamesById).forEach(t.add,t),t},e.prototype.gc=function(){var t=this,r=this.getRootIdSet(),n=this.toObject();r.forEach(function(a){lt.call(n,a)&&(Object.keys(t.findChildRefIds(a)).forEach(r.add,r),delete n[a])});var i=Object.keys(n);if(i.length){for(var o=this;o instanceof Gr;)o=o.parent;i.forEach(function(a){return o.delete(a)})}return i},e.prototype.findChildRefIds=function(t){if(!lt.call(this.refs,t)){var r=this.refs[t]=Object.create(null),n=this.data[t];if(!n)return r;var i=new Set([n]);i.forEach(function(o){ke(o)&&(r[o.__ref]=!0),We(o)&&Object.keys(o).forEach(function(a){var s=o[a];We(s)&&i.add(s)})})}return this.refs[t]},e.prototype.makeCacheKey=function(){return this.group.keyMaker.lookupArray(arguments)},e}(),F1=function(){function e(t,r){r===void 0&&(r=null),this.caching=t,this.parent=r,this.d=null,this.resetCaching()}return e.prototype.resetCaching=function(){this.d=this.caching?C1():null,this.keyMaker=new Bo(Vn)},e.prototype.depend=function(t,r){if(this.d){this.d(zc(t,r));var n=dn(r);n!==r&&this.d(zc(t,n)),this.parent&&this.parent.depend(t,r)}},e.prototype.dirty=function(t,r){this.d&&this.d.dirty(zc(t,r),r==="__exists"?"forget":"setDirty")},e}();function zc(e,t){return t+"#"+e}function fm(e,t){mo(e)&&e.group.depend(t,"__exists")}(function(e){var t=function(r){lr(n,r);function n(i){var o=i.policies,a=i.resultCaching,s=a===void 0?!0:a,c=i.seed,l=r.call(this,o,new F1(s))||this;return l.stump=new Kx(l),l.storageTrie=new Bo(Vn),c&&l.replace(c),l}return n.prototype.addLayer=function(i,o){return this.stump.addLayer(i,o)},n.prototype.removeLayer=function(){return this},n.prototype.getStorage=function(){return this.storageTrie.lookupArray(arguments)},n}(e);e.Root=t})(Oo||(Oo={}));var Gr=function(e){lr(t,e);function t(r,n,i,o){var a=e.call(this,n.policies,o)||this;return a.id=r,a.parent=n,a.replay=i,a.group=o,i(a),a}return t.prototype.addLayer=function(r,n){return new t(r,this,n,this.group)},t.prototype.removeLayer=function(r){var n=this,i=this.parent.removeLayer(r);return r===this.id?(this.group.caching&&Object.keys(this.data).forEach(function(o){var a=n.data[o],s=i.lookup(o);s?a?a!==s&&Object.keys(a).forEach(function(c){tt(a[c],s[c])||n.group.dirty(o,c)}):(n.group.dirty(o,"__exists"),Object.keys(s).forEach(function(c){n.group.dirty(o,c)})):n.delete(o)}),i):i===this.parent?this:i.addLayer(this.id,this.replay)},t.prototype.toObject=function(){return O(O({},this.parent.toObject()),this.data)},t.prototype.findChildRefIds=function(r){var n=this.parent.findChildRefIds(r);return lt.call(this.data,r)?O(O({},n),e.prototype.findChildRefIds.call(this,r)):n},t.prototype.getStorage=function(){for(var r=this.parent;r.parent;)r=r.parent;return r.getStorage.apply(r,arguments)},t}(Oo),Kx=function(e){lr(t,e);function t(r){return e.call(this,"EntityStore.Stump",r,function(){},new F1(r.group.caching,r.group))||this}return t.prototype.removeLayer=function(){return this},t.prototype.merge=function(){return this.parent.merge.apply(this.parent,arguments)},t}(Gr);function Yx(e,t,r){var n=e[r],i=t[r];return tt(n,i)?n:i}function mo(e){return!!(e instanceof Oo&&e.group.caching)}function Xx(e){return We(e)?Ge(e)?e.slice(0):O({__proto__:Object.getPrototypeOf(e)},e):e}var fd=function(){function e(){this.known=new(U5?WeakSet:Set),this.pool=new Bo(Vn),this.passes=new WeakMap,this.keysByJSON=new Map,this.empty=this.admit({})}return e.prototype.isKnown=function(t){return We(t)&&this.known.has(t)},e.prototype.pass=function(t){if(We(t)){var r=Xx(t);return this.passes.set(r,t),r}return t},e.prototype.admit=function(t){var r=this;if(We(t)){var n=this.passes.get(t);if(n)return n;var i=Object.getPrototypeOf(t);switch(i){case Array.prototype:{if(this.known.has(t))return t;var o=t.map(this.admit,this),a=this.pool.lookupArray(o);return a.array||(this.known.add(a.array=o),__DEV__&&Object.freeze(o)),a.array}case null:case Object.prototype:{if(this.known.has(t))return t;var s=Object.getPrototypeOf(t),c=[s],l=this.sortedKeys(t);c.push(l.json);var u=c.length;l.sorted.forEach(function(h){c.push(r.admit(t[h]))});var a=this.pool.lookupArray(c);if(!a.object){var d=a.object=Object.create(s);this.known.add(d),l.sorted.forEach(function(h,p){d[h]=c[u+p]}),__DEV__&&Object.freeze(d)}return a.object}}}return t},e.prototype.sortedKeys=function(t){var r=Object.keys(t),n=this.pool.lookupArray(r);if(!n.keys){r.sort();var i=JSON.stringify(r);(n.keys=this.keysByJSON.get(i))||this.keysByJSON.set(i,n.keys={sorted:r,json:i})}return n.keys},e}(),Nn=Object.assign(function(e){if(We(e)){hd===void 0&&hm();var t=hd.admit(e),r=pd.get(t);return r===void 0&&pd.set(t,r=JSON.stringify(t)),r}return JSON.stringify(e)},{reset:hm}),hd,pd;function hm(){hd=new fd,pd=new(Vn?WeakMap:Map)}function pm(e){return[e.selectionSet,e.objectOrReference,e.context,e.context.canonizeResults]}var Zx=function(){function e(t){var r=this;this.knownResults=new(Vn?WeakMap:Map),this.config=Kl(t,{addTypename:t.addTypename!==!1,canonizeResults:A1(t)}),this.canon=t.canon||new fd,this.executeSelectionSet=Rs(function(n){var i,o=n.context.canonizeResults,a=pm(n);a[3]=!o;var s=(i=r.executeSelectionSet).peek.apply(i,a);return s?o?O(O({},s),{result:r.canon.admit(s.result)}):s:(fm(n.context.store,n.enclosingRef.__ref),r.execSelectionSetImpl(n))},{max:this.config.resultCacheMaxSize,keyArgs:pm,makeCacheKey:function(n,i,o,a){if(mo(o.store))return o.store.makeCacheKey(n,ke(i)?i.__ref:i,o.varString,a)}}),this.executeSubSelectedArray=Rs(function(n){return fm(n.context.store,n.enclosingRef.__ref),r.execSubSelectedArrayImpl(n)},{max:this.config.resultCacheMaxSize,makeCacheKey:function(n){var i=n.field,o=n.array,a=n.context;if(mo(a.store))return a.store.makeCacheKey(i,o,a.varString)}})}return e.prototype.resetCanon=function(){this.canon=new fd},e.prototype.diffQueryAgainstStore=function(t){var r=t.store,n=t.query,i=t.rootId,o=i===void 0?"ROOT_QUERY":i,a=t.variables,s=t.returnPartialData,c=s===void 0?!0:s,l=t.canonizeResults,u=l===void 0?this.config.canonizeResults:l,d=this.config.cache.policies;a=O(O({},Ph(o1(n))),a);var f=ui(o),h=this.executeSelectionSet({selectionSet:Ch(n).selectionSet,objectOrReference:f,enclosingRef:f,context:O({store:r,query:n,policies:d,variables:a,varString:Nn(a),canonizeResults:u},R1(n,this.config.fragments))}),p;if(h.missing&&(p=[new T1(Jx(h.missing),h.missing,n,a)],!c))throw p[0];return{result:h.result,complete:!p,missing:p}},e.prototype.isFresh=function(t,r,n,i){if(mo(i.store)&&this.knownResults.get(t)===n){var o=this.executeSelectionSet.peek(n,r,i,this.canon.isKnown(t));if(o&&t===o.result)return!0}return!1},e.prototype.execSelectionSetImpl=function(t){var r=this,n=t.selectionSet,i=t.objectOrReference,o=t.enclosingRef,a=t.context;if(ke(i)&&!a.policies.rootTypenamesById[i.__ref]&&!a.store.has(i.__ref))return{result:this.canon.empty,missing:"Dangling reference to missing ".concat(i.__ref," object")};var s=a.variables,c=a.policies,l=a.store,u=l.getFieldValue(i,"__typename"),d=[],f,h=new cn;this.config.addTypename&&typeof u=="string"&&!c.rootIdsByTypename[u]&&d.push({__typename:u});function p(g,_){var S;return g.missing&&(f=h.merge(f,(S={},S[_]=g.missing,S))),g.result}var m=new Set(n.selections);m.forEach(function(g){var _,S;if(!!ql(g,s))if(Mr(g)){var E=c.readField({fieldName:g.name.value,field:g,variables:a.variables,from:i},a),x=Ln(g);E===void 0?Nh.added(g)||(f=h.merge(f,(_={},_[x]="Can't find field '".concat(g.name.value,"' on ").concat(ke(i)?i.__ref+" object":"object "+JSON.stringify(i,null,2)),_))):Ge(E)?E=p(r.executeSubSelectedArray({field:g,array:E,enclosingRef:o,context:a}),x):g.selectionSet?E!=null&&(E=p(r.executeSelectionSet({selectionSet:g.selectionSet,objectOrReference:E,enclosingRef:ke(E)?E:o,context:a}),x)):a.canonizeResults&&(E=r.canon.pass(E)),E!==void 0&&d.push((S={},S[x]=E,S))}else{var N=kh(g,a.lookupFragment);if(!N&&g.kind===Z.FRAGMENT_SPREAD)throw __DEV__?new be("No fragment named ".concat(g.name.value)):new be(5);N&&c.fragmentMatches(N,u)&&N.selectionSet.selections.forEach(m.add,m)}});var v=Ih(d),y={result:v,missing:f},b=a.canonizeResults?this.canon.admit(y):nd(y);return b.result&&this.knownResults.set(b.result,n),b},e.prototype.execSubSelectedArrayImpl=function(t){var r=this,n=t.field,i=t.array,o=t.enclosingRef,a=t.context,s,c=new cn;function l(u,d){var f;return u.missing&&(s=c.merge(s,(f={},f[d]=u.missing,f))),u.result}return n.selectionSet&&(i=i.filter(a.store.canRead)),i=i.map(function(u,d){return u===null?null:Ge(u)?l(r.executeSubSelectedArray({field:n,array:u,enclosingRef:o,context:a}),d):n.selectionSet?l(r.executeSelectionSet({selectionSet:n.selectionSet,objectOrReference:u,enclosingRef:ke(u)?u:o,context:a}),d):(__DEV__&&e9(a.store,n,u),u)}),{result:a.canonizeResults?this.canon.admit(i):i,missing:s}},e}();function Jx(e){try{JSON.stringify(e,function(t,r){if(typeof r=="string")throw r;return r})}catch(t){return t}}function e9(e,t,r){if(!t.selectionSet){var n=new Set([r]);n.forEach(function(i){We(i)&&(__DEV__?B(!ke(i),"Missing selection set for object of type ".concat(Gx(e,i)," returned for query field ").concat(t.name.value)):B(!ke(i),6),Object.values(i).forEach(n.add,n))})}}var zh=new Yl,mm=new WeakMap;function vo(e){var t=mm.get(e);return t||mm.set(e,t={vars:new Set,dep:C1()}),t}function vm(e){vo(e).vars.forEach(function(t){return t.forgetCache(e)})}function t9(e){vo(e).vars.forEach(function(t){return t.attachCache(e)})}function r9(e){var t=new Set,r=new Set,n=function(o){if(arguments.length>0){if(e!==o){e=o,t.forEach(function(c){vo(c).dep.dirty(n),n9(c)});var a=Array.from(r);r.clear(),a.forEach(function(c){return c(e)})}}else{var s=zh.getValue();s&&(i(s),vo(s).dep(n))}return e};n.onNextChange=function(o){return r.add(o),function(){r.delete(o)}};var i=n.attachCache=function(o){return t.add(o),vo(o).vars.add(n),n};return n.forgetCache=function(o){return t.delete(o)},n}function n9(e){e.broadcastWatches&&e.broadcastWatches()}var ym=Object.create(null);function Uh(e){var t=JSON.stringify(e);return ym[t]||(ym[t]=Object.create(null))}function gm(e){var t=Uh(e);return t.keyFieldsFn||(t.keyFieldsFn=function(r,n){var i=function(a,s){return n.readField(s,a)},o=n.keyObject=Vh(e,function(a){var s=fi(n.storeObject,a,i);return s===void 0&&r!==n.storeObject&&lt.call(r,a[0])&&(s=fi(r,a,M1)),__DEV__?B(s!==void 0,"Missing field '".concat(a.join("."),"' while extracting keyFields from ").concat(JSON.stringify(r))):B(s!==void 0,2),s});return"".concat(n.typename,":").concat(JSON.stringify(o))})}function bm(e){var t=Uh(e);return t.keyArgsFn||(t.keyArgsFn=function(r,n){var i=n.field,o=n.variables,a=n.fieldName,s=Vh(e,function(l){var u=l[0],d=u.charAt(0);if(d==="@"){if(i&&Yt(i.directives)){var f=u.slice(1),h=i.directives.find(function(y){return y.name.value===f}),p=h&&Hl(h,o);return p&&fi(p,l.slice(1))}return}if(d==="$"){var m=u.slice(1);if(o&&lt.call(o,m)){var v=l.slice(0);return v[0]=m,fi(o,v)}return}if(r)return fi(r,l)}),c=JSON.stringify(s);return(r||c!=="{}")&&(a+=":"+c),a})}function Vh(e,t){var r=new cn;return L1(e).reduce(function(n,i){var o,a=t(i);if(a!==void 0){for(var s=i.length-1;s>=0;--s)a=(o={},o[i[s]]=a,o);n=r.merge(n,a)}return n},Object.create(null))}function L1(e){var t=Uh(e);if(!t.paths){var r=t.paths=[],n=[];e.forEach(function(i,o){Ge(i)?(L1(i).forEach(function(a){return r.push(n.concat(a))}),n.length=0):(n.push(i),Ge(e[o+1])||(r.push(n.slice(0)),n.length=0))})}return t.paths}function M1(e,t){return e[t]}function fi(e,t,r){return r=r||M1,j1(t.reduce(function n(i,o){return Ge(i)?i.map(function(a){return n(a,o)}):i&&r(i,o)},e))}function j1(e){return We(e)?Ge(e)?e.map(j1):Vh(Object.keys(e).sort(),function(t){return fi(e,t)}):e}Eh.setStringify(Nn);function md(e){return e.args!==void 0?e.args:e.field?Hl(e.field,e.variables):null}var i9=function(){},$m=function(e,t){return t.fieldName},wm=function(e,t,r){var n=r.mergeObjects;return n(e,t)},_m=function(e,t){return t},o9=function(){function e(t){this.config=t,this.typePolicies=Object.create(null),this.toBeAdded=Object.create(null),this.supertypeMap=new Map,this.fuzzySubtypes=new Map,this.rootIdsByTypename=Object.create(null),this.rootTypenamesById=Object.create(null),this.usingPossibleTypes=!1,this.config=O({dataIdFromObject:N1},t),this.cache=this.config.cache,this.setRootTypename("Query"),this.setRootTypename("Mutation"),this.setRootTypename("Subscription"),t.possibleTypes&&this.addPossibleTypes(t.possibleTypes),t.typePolicies&&this.addTypePolicies(t.typePolicies)}return e.prototype.identify=function(t,r){var n,i=this,o=r&&(r.typename||((n=r.storeObject)===null||n===void 0?void 0:n.__typename))||t.__typename;if(o===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];for(var a=r&&r.storeObject||t,s=O(O({},r),{typename:o,storeObject:a,readField:r&&r.readField||function(){var f=Bh(arguments,a);return i.readField(f,{store:i.cache.data,variables:f.variables})}}),c,l=o&&this.getTypePolicy(o),u=l&&l.keyFn||this.config.dataIdFromObject;u;){var d=u(t,s);if(Ge(d))u=gm(d);else{c=d;break}}return c=c?String(c):void 0,s.keyObject?[c,s.keyObject]:[c]},e.prototype.addTypePolicies=function(t){var r=this;Object.keys(t).forEach(function(n){var i=t[n],o=i.queryType,a=i.mutationType,s=i.subscriptionType,c=an(i,["queryType","mutationType","subscriptionType"]);o&&r.setRootTypename("Query",n),a&&r.setRootTypename("Mutation",n),s&&r.setRootTypename("Subscription",n),lt.call(r.toBeAdded,n)?r.toBeAdded[n].push(c):r.toBeAdded[n]=[c]})},e.prototype.updateTypePolicy=function(t,r){var n=this,i=this.getTypePolicy(t),o=r.keyFields,a=r.fields;function s(c,l){c.merge=typeof l=="function"?l:l===!0?wm:l===!1?_m:c.merge}s(i,r.merge),i.keyFn=o===!1?i9:Ge(o)?gm(o):typeof o=="function"?o:i.keyFn,a&&Object.keys(a).forEach(function(c){var l=n.getFieldPolicy(t,c,!0),u=a[c];if(typeof u=="function")l.read=u;else{var d=u.keyArgs,f=u.read,h=u.merge;l.keyFn=d===!1?$m:Ge(d)?bm(d):typeof d=="function"?d:l.keyFn,typeof f=="function"&&(l.read=f),s(l,h)}l.read&&l.merge&&(l.keyFn=l.keyFn||$m)})},e.prototype.setRootTypename=function(t,r){r===void 0&&(r=t);var n="ROOT_"+t.toUpperCase(),i=this.rootTypenamesById[n];r!==i&&(__DEV__?B(!i||i===t,"Cannot change root ".concat(t," __typename more than once")):B(!i||i===t,3),i&&delete this.rootIdsByTypename[i],this.rootIdsByTypename[r]=n,this.rootTypenamesById[n]=r)},e.prototype.addPossibleTypes=function(t){var r=this;this.usingPossibleTypes=!0,Object.keys(t).forEach(function(n){r.getSupertypeSet(n,!0),t[n].forEach(function(i){r.getSupertypeSet(i,!0).add(n);var o=i.match(D1);(!o||o[0]!==i)&&r.fuzzySubtypes.set(i,new RegExp(i))})})},e.prototype.getTypePolicy=function(t){var r=this;if(!lt.call(this.typePolicies,t)){var n=this.typePolicies[t]=Object.create(null);n.fields=Object.create(null);var i=this.supertypeMap.get(t);i&&i.size&&i.forEach(function(a){var s=r.getTypePolicy(a),c=s.fields,l=an(s,["fields"]);Object.assign(n,l),Object.assign(n.fields,c)})}var o=this.toBeAdded[t];return o&&o.length&&o.splice(0).forEach(function(a){r.updateTypePolicy(t,a)}),this.typePolicies[t]},e.prototype.getFieldPolicy=function(t,r,n){if(t){var i=this.getTypePolicy(t).fields;return i[r]||n&&(i[r]=Object.create(null))}},e.prototype.getSupertypeSet=function(t,r){var n=this.supertypeMap.get(t);return!n&&r&&this.supertypeMap.set(t,n=new Set),n},e.prototype.fragmentMatches=function(t,r,n,i){var o=this;if(!t.typeCondition)return!0;if(!r)return!1;var a=t.typeCondition.name.value;if(r===a)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(a))for(var s=this.getSupertypeSet(r,!0),c=[s],l=function(p){var m=o.getSupertypeSet(p,!1);m&&m.size&&c.indexOf(m)<0&&c.push(m)},u=!!(n&&this.fuzzySubtypes.size),d=!1,f=0;f<c.length;++f){var h=c[f];if(h.has(a))return s.has(a)||(d&&__DEV__&&B.warn("Inferring subtype ".concat(r," of supertype ").concat(a)),s.add(a)),!0;h.forEach(l),u&&f===c.length-1&&dd(t.selectionSet,n,i)&&(u=!1,d=!0,this.fuzzySubtypes.forEach(function(p,m){var v=r.match(p);v&&v[0]===r&&l(m)}))}return!1},e.prototype.hasKeyArgs=function(t,r){var n=this.getFieldPolicy(t,r,!1);return!!(n&&n.keyFn)},e.prototype.getStoreFieldName=function(t){var r=t.typename,n=t.fieldName,i=this.getFieldPolicy(r,n,!1),o,a=i&&i.keyFn;if(a&&r)for(var s={typename:r,fieldName:n,field:t.field||null,variables:t.variables},c=md(t);a;){var l=a(c,s);if(Ge(l))a=bm(l);else{o=l||n;break}}return o===void 0&&(o=t.field?y5(t.field,t.variables):Eh(n,md(t))),o===!1?n:n===dn(o)?o:n+":"+o},e.prototype.readField=function(t,r){var n=t.from;if(!!n){var i=t.field||t.fieldName;if(!!i){if(t.typename===void 0){var o=r.store.getFieldValue(n,"__typename");o&&(t.typename=o)}var a=this.getStoreFieldName(t),s=dn(a),c=r.store.getFieldValue(n,a),l=this.getFieldPolicy(t.typename,s,!1),u=l&&l.read;if(u){var d=xm(this,n,t,r,r.store.getStorage(ke(n)?n.__ref:n,a));return zh.withValue(this.cache,u,[c,d])}return c}}},e.prototype.getReadFunction=function(t,r){var n=this.getFieldPolicy(t,r,!1);return n&&n.read},e.prototype.getMergeFunction=function(t,r,n){var i=this.getFieldPolicy(t,r,!1),o=i&&i.merge;return!o&&n&&(i=this.getTypePolicy(n),o=i&&i.merge),o},e.prototype.runMergeFunction=function(t,r,n,i,o){var a=n.field,s=n.typename,c=n.merge;return c===wm?z1(i.store)(t,r):c===_m?r:(i.overwrite&&(t=void 0),c(t,r,xm(this,void 0,{typename:s,fieldName:a.name.value,field:a,variables:i.variables},i,o||Object.create(null))))},e}();function xm(e,t,r,n,i){var o=e.getStoreFieldName(r),a=dn(o),s=r.variables||n.variables,c=n.store,l=c.toReference,u=c.canRead;return{args:md(r),field:r.field||null,fieldName:a,storeFieldName:o,variables:s,isReference:ke,toReference:l,storage:i,cache:e.cache,canRead:u,readField:function(){return e.readField(Bh(arguments,t,s),n)},mergeObjects:z1(n.store)}}function Bh(e,t,r){var n=e[0],i=e[1],o=e.length,a;return typeof n=="string"?a={fieldName:n,from:o>1?i:t}:(a=O({},n),lt.call(a,"from")||(a.from=t)),__DEV__&&a.from===void 0&&__DEV__&&B.warn("Undefined 'from' passed to readField with arguments ".concat(W5(Array.from(e)))),a.variables===void 0&&(a.variables=r),a}function z1(e){return function(r,n){if(Ge(r)||Ge(n))throw __DEV__?new be("Cannot automatically merge arrays"):new be(4);if(We(r)&&We(n)){var i=e.getFieldValue(r,"__typename"),o=e.getFieldValue(n,"__typename"),a=i&&o&&i!==o;if(a)return n;if(ke(r)&&ai(n))return e.merge(r.__ref,n),r;if(ai(r)&&ke(n))return e.merge(r,n.__ref),n;if(ai(r)&&ai(n))return O(O({},r),n)}return n}}function Uc(e,t,r){var n="".concat(t).concat(r),i=e.flavors.get(n);return i||e.flavors.set(n,i=e.clientOnly===t&&e.deferred===r?e:O(O({},e),{clientOnly:t,deferred:r})),i}var a9=function(){function e(t,r,n){this.cache=t,this.reader=r,this.fragments=n}return e.prototype.writeToStore=function(t,r){var n=this,i=r.query,o=r.result,a=r.dataId,s=r.variables,c=r.overwrite,l=Vo(i),u=Qx();s=O(O({},Ph(l)),s);var d=O(O({store:t,written:Object.create(null),merge:function(h,p){return u.merge(h,p)},variables:s,varString:Nn(s)},R1(i,this.fragments)),{overwrite:!!c,incomingById:new Map,clientOnly:!1,deferred:!1,flavors:new Map}),f=this.processSelectionSet({result:o||Object.create(null),dataId:a,selectionSet:l.selectionSet,mergeTree:{map:new Map},context:d});if(!ke(f))throw __DEV__?new be("Could not identify object ".concat(JSON.stringify(o))):new be(7);return d.incomingById.forEach(function(h,p){var m=h.storeObject,v=h.mergeTree,y=h.fieldNodeSet,b=ui(p);if(v&&v.map.size){var g=n.applyMerges(v,b,m,d);if(ke(g))return;m=g}if(__DEV__&&!d.overwrite){var _=Object.create(null);y.forEach(function(x){x.selectionSet&&(_[x.name.value]=!0)});var S=function(x){return _[dn(x)]===!0},E=function(x){var N=v&&v.map.get(x);return Boolean(N&&N.info&&N.info.merge)};Object.keys(m).forEach(function(x){S(x)&&!E(x)&&s9(b,m,x,d.store)})}t.merge(p,m)}),t.retain(f.__ref),f},e.prototype.processSelectionSet=function(t){var r=this,n=t.dataId,i=t.result,o=t.selectionSet,a=t.context,s=t.mergeTree,c=this.cache.policies,l=Object.create(null),u=n&&c.rootTypenamesById[n]||Zu(i,o,a.fragmentMap)||n&&a.store.get(n,"__typename");typeof u=="string"&&(l.__typename=u);var d=function(){var g=Bh(arguments,l,a.variables);if(ke(g.from)){var _=a.incomingById.get(g.from.__ref);if(_){var S=c.readField(O(O({},g),{from:_.storeObject}),a);if(S!==void 0)return S}}return c.readField(g,a)},f=new Set;this.flattenFields(o,i,a,u).forEach(function(g,_){var S,E=Ln(_),x=i[E];if(f.add(_),x!==void 0){var N=c.getStoreFieldName({typename:u,fieldName:_.name.value,field:_,variables:g.variables}),M=Sm(s,N),j=r.processFieldValue(x,_,_.selectionSet?Uc(g,!1,!1):g,M),q=void 0;_.selectionSet&&(ke(j)||ai(j))&&(q=d("__typename",j));var A=c.getMergeFunction(u,_.name.value,q);A?M.info={field:_,typename:u,merge:A}:km(s,N),l=g.merge(l,(S={},S[N]=j,S))}else __DEV__&&!g.clientOnly&&!g.deferred&&!Nh.added(_)&&!c.getReadFunction(u,_.name.value)&&__DEV__&&B.error("Missing field '".concat(Ln(_),"' while writing result ").concat(JSON.stringify(i,null,2)).substring(0,1e3))});try{var h=c.identify(i,{typename:u,selectionSet:o,fragmentMap:a.fragmentMap,storeObject:l,readField:d}),p=h[0],m=h[1];n=n||p,m&&(l=a.merge(l,m))}catch(g){if(!n)throw g}if(typeof n=="string"){var v=ui(n),y=a.written[n]||(a.written[n]=[]);if(y.indexOf(o)>=0||(y.push(o),this.reader&&this.reader.isFresh(i,v,o,a)))return v;var b=a.incomingById.get(n);return b?(b.storeObject=a.merge(b.storeObject,l),b.mergeTree=vd(b.mergeTree,s),f.forEach(function(g){return b.fieldNodeSet.add(g)})):a.incomingById.set(n,{storeObject:l,mergeTree:Fs(s)?void 0:s,fieldNodeSet:f}),v}return l},e.prototype.processFieldValue=function(t,r,n,i){var o=this;return!r.selectionSet||t===null?__DEV__?f1(t):t:Ge(t)?t.map(function(a,s){var c=o.processFieldValue(a,r,n,Sm(i,s));return km(i,s),c}):this.processSelectionSet({result:t,selectionSet:r.selectionSet,context:n,mergeTree:i})},e.prototype.flattenFields=function(t,r,n,i){i===void 0&&(i=Zu(r,t,n.fragmentMap));var o=new Map,a=this.cache.policies,s=new Bo(!1);return function c(l,u){var d=s.lookup(l,u.clientOnly,u.deferred);d.visited||(d.visited=!0,l.selections.forEach(function(f){if(!!ql(f,n.variables)){var h=u.clientOnly,p=u.deferred;if(!(h&&p)&&Yt(f.directives)&&f.directives.forEach(function(y){var b=y.name.value;if(b==="client"&&(h=!0),b==="defer"){var g=Hl(y,n.variables);(!g||g.if!==!1)&&(p=!0)}}),Mr(f)){var m=o.get(f);m&&(h=h&&m.clientOnly,p=p&&m.deferred),o.set(f,Uc(n,h,p))}else{var v=kh(f,n.lookupFragment);if(!v&&f.kind===Z.FRAGMENT_SPREAD)throw __DEV__?new be("No fragment named ".concat(f.name.value)):new be(8);v&&a.fragmentMatches(v,i,r,n.variables)&&c(v.selectionSet,Uc(n,h,p))}}}))}(t,n),o},e.prototype.applyMerges=function(t,r,n,i,o){var a,s=this;if(t.map.size&&!ke(n)){var c=!Ge(n)&&(ke(r)||ai(r))?r:void 0,l=n;c&&!o&&(o=[ke(c)?c.__ref:c]);var u,d=function(f,h){return Ge(f)?typeof h=="number"?f[h]:void 0:i.store.getFieldValue(f,String(h))};t.map.forEach(function(f,h){var p=d(c,h),m=d(l,h);if(m!==void 0){o&&o.push(h);var v=s.applyMerges(f,p,m,i,o);v!==m&&(u=u||new Map,u.set(h,v)),o&&B(o.pop()===h)}}),u&&(n=Ge(l)?l.slice(0):O({},l),u.forEach(function(f,h){n[h]=f}))}return t.info?this.cache.policies.runMergeFunction(r,n,t.info,i,o&&(a=i.store).getStorage.apply(a,o)):n},e}(),U1=[];function Sm(e,t){var r=e.map;return r.has(t)||r.set(t,U1.pop()||{map:new Map}),r.get(t)}function vd(e,t){if(e===t||!t||Fs(t))return e;if(!e||Fs(e))return t;var r=e.info&&t.info?O(O({},e.info),t.info):e.info||t.info,n=e.map.size&&t.map.size,i=n?new Map:e.map.size?e.map:t.map,o={info:r,map:i};if(n){var a=new Set(t.map.keys());e.map.forEach(function(s,c){o.map.set(c,vd(s,t.map.get(c))),a.delete(c)}),a.forEach(function(s){o.map.set(s,vd(t.map.get(s),e.map.get(s)))})}return o}function Fs(e){return!e||!(e.info||e.map.size)}function km(e,t){var r=e.map,n=r.get(t);n&&Fs(n)&&(U1.push(n),r.delete(t))}var Em=new Set;function s9(e,t,r,n){var i=function(d){var f=n.getFieldValue(d,r);return typeof f=="object"&&f},o=i(e);if(!!o){var a=i(t);if(!!a&&!ke(o)&&!tt(o,a)&&!Object.keys(o).every(function(d){return n.getFieldValue(a,d)!==void 0})){var s=n.getFieldValue(e,"__typename")||n.getFieldValue(t,"__typename"),c=dn(r),l="".concat(s,".").concat(c);if(!Em.has(l)){Em.add(l);var u=[];!Ge(o)&&!Ge(a)&&[o,a].forEach(function(d){var f=n.getFieldValue(d,"__typename");typeof f=="string"&&!u.includes(f)&&u.push(f)}),__DEV__&&B.warn("Cache data may be lost when replacing the ".concat(c," field of a ").concat(s,` object.
54
+ `):new be(23)},gx=function(){if(typeof AbortController>"u")return{controller:!1,signal:!1};var e=new AbortController,t=e.signal;return{controller:e,signal:t}},bx=function(e,t){var r=e.getContext(),n=r.uri;return n||(typeof t=="function"?t(e):t||"/graphql")};function $x(e,t){var r=[],n=function(d,f){r.push("".concat(d,"=").concat(encodeURIComponent(f)))};if("query"in t&&n("query",t.query),t.operationName&&n("operationName",t.operationName),t.variables){var i=void 0;try{i=cd(t.variables,"Variables map")}catch(d){return{parseError:d}}n("variables",i)}if(t.extensions){var o=void 0;try{o=cd(t.extensions,"Extensions map")}catch(d){return{parseError:d}}n("extensions",o)}var a="",s=e,c=e.indexOf("#");c!==-1&&(a=e.substr(c),s=e.substr(0,c));var l=s.indexOf("?")===-1?"?":"&",u=s+l+r.join("&")+a;return{newURI:u}}var rm=qt(function(){return fetch}),wx=function(e){e===void 0&&(e={});var t=e.uri,r=t===void 0?"/graphql":t,n=e.fetch,i=e.print,o=i===void 0?px:i,a=e.includeExtensions,s=e.preserveHeaderCase,c=e.useGETForQueries,l=e.includeUnusedVariables,u=l===void 0?!1:l,d=an(e,["uri","fetch","print","includeExtensions","preserveHeaderCase","useGETForQueries","includeUnusedVariables"]);__DEV__&&yx(n||rm);var f={http:{includeExtensions:a,preserveHeaderCase:s},options:d.fetchOptions,credentials:d.credentials,headers:d.headers};return new ji(function(h){var p=bx(h,r),m=h.getContext(),v={};if(m.clientAwareness){var y=m.clientAwareness,b=y.name,g=y.version;b&&(v["apollographql-client-name"]=b),g&&(v["apollographql-client-version"]=g)}var _=O(O({},v),m.headers),k={http:m.http,options:m.fetchOptions,credentials:m.credentials,headers:_},E=mx(h,o,hx,f,k),x=E.options,T=E.body;if(T.variables&&!u){var j=new Set(Object.keys(T.variables));ar(h.query,{Variable:function(ae,A,me){me&&me.kind!=="VariableDefinition"&&j.delete(ae.name.value)}}),j.size&&(T.variables=O({},T.variables),j.forEach(function(ae){delete T.variables[ae]}))}var z;if(!x.signal){var K=gx(),D=K.controller,L=K.signal;z=D,z&&(x.signal=L)}var R=function(ae){return ae.kind==="OperationDefinition"&&ae.operation==="mutation"};if(c&&!h.query.definitions.some(R)&&(x.method="GET"),Sh(["defer"],h.query)&&(x.headers=x.headers||{},x.headers.accept="multipart/mixed; deferSpec=20220824, application/json"),x.method==="GET"){var F=$x(p,T),q=F.newURI,re=F.parseError;if(re)return Z0(re);p=q}else try{x.body=cd(T,"Payload")}catch(ae){return Z0(ae)}return new Pe(function(ae){var A=n||qt(function(){return fetch})||rm;return A(p,x).then(function(me){var _e;h.setContext({response:me});var I=(_e=me.headers)===null||_e===void 0?void 0:_e.get("content-type");return I!==null&&/^multipart\/mixed/i.test(I)?ax(me,ae):lx(me,h,ae)}).catch(function(me){return Mh(me,ae)}),function(){z&&z.abort()}})})},y1=function(e){lr(t,e);function t(r){r===void 0&&(r={});var n=e.call(this,wx(r).request)||this;return n.options=r,n}return t}(ji),g1=Object.prototype,nm=g1.toString,_x=g1.hasOwnProperty,im=Function.prototype.toString,ud=new Map;function tt(e,t){try{return dd(e,t)}finally{ud.clear()}}function dd(e,t){if(e===t)return!0;var r=nm.call(e),n=nm.call(t);if(r!==n)return!1;switch(r){case"[object Array]":if(e.length!==t.length)return!1;case"[object Object]":{if(am(e,t))return!0;var i=om(e),o=om(t),a=i.length;if(a!==o.length)return!1;for(var s=0;s<a;++s)if(!_x.call(t,i[s]))return!1;for(var s=0;s<a;++s){var c=i[s];if(!dd(e[c],t[c]))return!1}return!0}case"[object Error]":return e.name===t.name&&e.message===t.message;case"[object Number]":if(e!==e)return t!==t;case"[object Boolean]":case"[object Date]":return+e==+t;case"[object RegExp]":case"[object String]":return e=="".concat(t);case"[object Map]":case"[object Set]":{if(e.size!==t.size)return!1;if(am(e,t))return!0;for(var l=e.entries(),u=r==="[object Map]";;){var d=l.next();if(d.done)break;var f=d.value,h=f[0],p=f[1];if(!t.has(h)||u&&!dd(p,t.get(h)))return!1}return!0}case"[object Uint16Array]":case"[object Uint8Array]":case"[object Uint32Array]":case"[object Int32Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object ArrayBuffer]":e=new Uint8Array(e),t=new Uint8Array(t);case"[object DataView]":{var m=e.byteLength;if(m===t.byteLength)for(;m--&&e[m]===t[m];);return m===-1}case"[object AsyncFunction]":case"[object GeneratorFunction]":case"[object AsyncGeneratorFunction]":case"[object Function]":{var v=im.call(e);return v!==im.call(t)?!1:!kx(v,Sx)}}return!1}function om(e){return Object.keys(e).filter(xx,e)}function xx(e){return this[e]!==void 0}var Sx="{ [native code] }";function kx(e,t){var r=e.length-t.length;return r>=0&&e.indexOf(t,r)===r}function am(e,t){var r=ud.get(e);if(r){if(r.has(t))return!0}else ud.set(e,r=new Set);return r.add(t),!1}var Ex=function(){return Object.create(null)},b1=Array.prototype,Ox=b1.forEach,Cx=b1.slice,Bo=function(){function e(t,r){t===void 0&&(t=!0),r===void 0&&(r=Ex),this.weakness=t,this.makeData=r}return e.prototype.lookup=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return this.lookupArray(t)},e.prototype.lookupArray=function(t){var r=this;return Ox.call(t,function(n){return r=r.getChildTrie(n)}),r.data||(r.data=this.makeData(Cx.call(t)))},e.prototype.getChildTrie=function(t){var r=this.weakness&&Px(t)?this.weak||(this.weak=new WeakMap):this.strong||(this.strong=new Map),n=r.get(t);return n||r.set(t,n=new e(this.weakness,this.makeData)),n},e}();function Px(e){switch(typeof e){case"object":if(e===null)break;case"function":return!0}return!1}var pt=null,sm={},Tx=1,Nx=function(){return function(){function e(){this.id=["slot",Tx++,Date.now(),Math.random().toString(36).slice(2)].join(":")}return e.prototype.hasValue=function(){for(var t=pt;t;t=t.parent)if(this.id in t.slots){var r=t.slots[this.id];if(r===sm)break;return t!==pt&&(pt.slots[this.id]=r),!0}return pt&&(pt.slots[this.id]=sm),!1},e.prototype.getValue=function(){if(this.hasValue())return pt.slots[this.id]},e.prototype.withValue=function(t,r,n,i){var o,a=(o={__proto__:null},o[this.id]=t,o),s=pt;pt={parent:s,slots:a};try{return r.apply(i,n)}finally{pt=s}},e.bind=function(t){var r=pt;return function(){var n=pt;try{return pt=r,t.apply(this,arguments)}finally{pt=n}}},e.noContext=function(t,r,n){if(pt){var i=pt;try{return pt=null,t.apply(n,r)}finally{pt=i}}else return t.apply(n,r)},e}()};function lm(e){try{return e()}catch{}}var Lc="@wry/context:Slot",Ix=lm(function(){return globalThis})||lm(function(){return global})||Object.create(null),cm=Ix,Yl=cm[Lc]||Array[Lc]||function(e){try{Object.defineProperty(cm,Lc,{value:e,enumerable:!1,writable:!1,configurable:!0})}finally{return e}}(Nx());Yl.bind;Yl.noContext;function Ax(){}var Dx=function(){function e(t,r){t===void 0&&(t=1/0),r===void 0&&(r=Ax),this.max=t,this.dispose=r,this.map=new Map,this.newest=null,this.oldest=null}return e.prototype.has=function(t){return this.map.has(t)},e.prototype.get=function(t){var r=this.getNode(t);return r&&r.value},e.prototype.getNode=function(t){var r=this.map.get(t);if(r&&r!==this.newest){var n=r.older,i=r.newer;i&&(i.older=n),n&&(n.newer=i),r.older=this.newest,r.older.newer=r,r.newer=null,this.newest=r,r===this.oldest&&(this.oldest=i)}return r},e.prototype.set=function(t,r){var n=this.getNode(t);return n?n.value=r:(n={key:t,value:r,newer:null,older:this.newest},this.newest&&(this.newest.newer=n),this.newest=n,this.oldest=this.oldest||n,this.map.set(t,n),n.value)},e.prototype.clean=function(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)},e.prototype.delete=function(t){var r=this.map.get(t);return r?(r===this.newest&&(this.newest=r.older),r===this.oldest&&(this.oldest=r.newer),r.newer&&(r.newer.older=r.older),r.older&&(r.older.newer=r.newer),this.map.delete(t),this.dispose(r.value,t),!0):!1},e}(),Xl=new Yl,Mc,Rx=Object.prototype.hasOwnProperty,jh=(Mc=Array.from,Mc===void 0?function(e){var t=[];return e.forEach(function(r){return t.push(r)}),t}:Mc);function Ds(e){var t=e.unsubscribe;typeof t=="function"&&(e.unsubscribe=void 0,t())}var Eo=[],Fx=100;function xi(e,t){if(!e)throw new Error(t||"assertion failure")}function Lx(e,t){var r=e.length;return r>0&&r===t.length&&e[r-1]===t[r-1]}function $1(e){switch(e.length){case 0:throw new Error("unknown value");case 1:return e[0];case 2:throw e[1]}}function Mx(e){return e.slice(0)}var jx=function(){function e(t){this.fn=t,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],this.deps=null,++e.count}return e.prototype.peek=function(){if(this.value.length===1&&!un(this))return um(this),this.value[0]},e.prototype.recompute=function(t){return xi(!this.recomputing,"already recomputing"),um(this),un(this)?zx(this,t):$1(this.value)},e.prototype.setDirty=function(){this.dirty||(this.dirty=!0,this.value.length=0,w1(this),Ds(this))},e.prototype.dispose=function(){var t=this;this.setDirty(),E1(this),zh(this,function(r,n){r.setDirty(),O1(r,t)})},e.prototype.forget=function(){this.dispose()},e.prototype.dependOn=function(t){t.add(this),this.deps||(this.deps=Eo.pop()||new Set),this.deps.add(t)},e.prototype.forgetDeps=function(){var t=this;this.deps&&(jh(this.deps).forEach(function(r){return r.delete(t)}),this.deps.clear(),Eo.push(this.deps),this.deps=null)},e.count=0,e}();function um(e){var t=Xl.getValue();if(t)return e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),un(e)?x1(t,e):S1(t,e),t}function zx(e,t){return E1(e),Xl.withValue(e,Ux,[e,t]),Bx(e,t)&&Vx(e),$1(e.value)}function Ux(e,t){e.recomputing=!0,e.value.length=0;try{e.value[0]=e.fn.apply(null,t)}catch(r){e.value[1]=r}e.recomputing=!1}function un(e){return e.dirty||!!(e.dirtyChildren&&e.dirtyChildren.size)}function Vx(e){e.dirty=!1,!un(e)&&_1(e)}function w1(e){zh(e,x1)}function _1(e){zh(e,S1)}function zh(e,t){var r=e.parents.size;if(r)for(var n=jh(e.parents),i=0;i<r;++i)t(n[i],e)}function x1(e,t){xi(e.childValues.has(t)),xi(un(t));var r=!un(e);if(!e.dirtyChildren)e.dirtyChildren=Eo.pop()||new Set;else if(e.dirtyChildren.has(t))return;e.dirtyChildren.add(t),r&&w1(e)}function S1(e,t){xi(e.childValues.has(t)),xi(!un(t));var r=e.childValues.get(t);r.length===0?e.childValues.set(t,Mx(t.value)):Lx(r,t.value)||e.setDirty(),k1(e,t),!un(e)&&_1(e)}function k1(e,t){var r=e.dirtyChildren;r&&(r.delete(t),r.size===0&&(Eo.length<Fx&&Eo.push(r),e.dirtyChildren=null))}function E1(e){e.childValues.size>0&&e.childValues.forEach(function(t,r){O1(e,r)}),e.forgetDeps(),xi(e.dirtyChildren===null)}function O1(e,t){t.parents.delete(e),e.childValues.delete(t),k1(e,t)}function Bx(e,t){if(typeof e.subscribe=="function")try{Ds(e),e.unsubscribe=e.subscribe.apply(null,t)}catch{return e.setDirty(),!1}return!0}var Wx={setDirty:!0,dispose:!0,forget:!0};function C1(e){var t=new Map,r=e&&e.subscribe;function n(i){var o=Xl.getValue();if(o){var a=t.get(i);a||t.set(i,a=new Set),o.dependOn(a),typeof r=="function"&&(Ds(a),a.unsubscribe=r(i))}}return n.dirty=function(o,a){var s=t.get(o);if(s){var c=a&&Rx.call(Wx,a)?a:"setDirty";jh(s).forEach(function(l){return l[c]()}),t.delete(o),Ds(s)}},n}function P1(){var e=new Bo(typeof WeakMap=="function");return function(){return e.lookupArray(arguments)}}P1();var jc=new Set;function Rs(e,t){t===void 0&&(t=Object.create(null));var r=new Dx(t.max||Math.pow(2,16),function(l){return l.dispose()}),n=t.keyArgs,i=t.makeCacheKey||P1(),o=function(){var l=i.apply(null,n?n.apply(null,arguments):arguments);if(l===void 0)return e.apply(null,arguments);var u=r.get(l);u||(r.set(l,u=new jx(e)),u.subscribe=t.subscribe,u.forget=function(){return r.delete(l)});var d=u.recompute(Array.prototype.slice.call(arguments));return r.set(l,u),jc.add(r),Xl.hasValue()||(jc.forEach(function(f){return f.clean()}),jc.clear()),d};Object.defineProperty(o,"size",{get:function(){return r.map.size},configurable:!1,enumerable:!1});function a(l){var u=r.get(l);u&&u.setDirty()}o.dirtyKey=a,o.dirty=function(){a(i.apply(null,arguments))};function s(l){var u=r.get(l);if(u)return u.peek()}o.peekKey=s,o.peek=function(){return s(i.apply(null,arguments))};function c(l){return r.delete(l)}return o.forgetKey=c,o.forget=function(){return c(i.apply(null,arguments))},o.makeCacheKey=i,o.getKey=n?function(){return i.apply(null,n.apply(null,arguments))}:i,Object.freeze(o)}var qx=function(){function e(){this.getFragmentDoc=Rs(a5)}return e.prototype.batch=function(t){var r=this,n=typeof t.optimistic=="string"?t.optimistic:t.optimistic===!1?null:void 0,i;return this.performTransaction(function(){return i=t.update(r)},n),i},e.prototype.recordOptimisticTransaction=function(t,r){this.performTransaction(t,r)},e.prototype.transformDocument=function(t){return t},e.prototype.transformForLink=function(t){return t},e.prototype.identify=function(t){},e.prototype.gc=function(){return[]},e.prototype.modify=function(t){return!1},e.prototype.readQuery=function(t,r){return r===void 0&&(r=!!t.optimistic),this.read(O(O({},t),{rootId:t.id||"ROOT_QUERY",optimistic:r}))},e.prototype.readFragment=function(t,r){return r===void 0&&(r=!!t.optimistic),this.read(O(O({},t),{query:this.getFragmentDoc(t.fragment,t.fragmentName),rootId:t.id,optimistic:r}))},e.prototype.writeQuery=function(t){var r=t.id,n=t.data,i=an(t,["id","data"]);return this.write(Object.assign(i,{dataId:r||"ROOT_QUERY",result:n}))},e.prototype.writeFragment=function(t){var r=t.id,n=t.data,i=t.fragment,o=t.fragmentName,a=an(t,["id","data","fragment","fragmentName"]);return this.write(Object.assign(a,{query:this.getFragmentDoc(i,o),dataId:r,result:n}))},e.prototype.updateQuery=function(t,r){return this.batch({update:function(n){var i=n.readQuery(t),o=r(i);return o==null?i:(n.writeQuery(O(O({},t),{data:o})),o)}})},e.prototype.updateFragment=function(t,r){return this.batch({update:function(n){var i=n.readFragment(t),o=r(i);return o==null?i:(n.writeFragment(O(O({},t),{data:o})),o)}})},e}(),T1=function(e){lr(t,e);function t(r,n,i,o){var a,s=e.call(this,r)||this;if(s.message=r,s.path=n,s.query=i,s.variables=o,Array.isArray(s.path)){s.missing=s.message;for(var c=s.path.length-1;c>=0;--c)s.missing=(a={},a[s.path[c]]=s.missing,a)}else s.missing=s.path;return s.__proto__=t.prototype,s}return t}(Error),lt=Object.prototype.hasOwnProperty;function Ji(e){return e==null}var Ge=Array.isArray;function N1(e,t){var r=e.__typename,n=e.id,i=e._id;if(typeof r=="string"&&(t&&(t.keyObject=Ji(n)?Ji(i)?void 0:{_id:i}:{id:n}),Ji(n)&&!Ji(i)&&(n=i),!Ji(n)))return"".concat(r,":").concat(typeof n=="number"||typeof n=="string"?n:JSON.stringify(n))}var I1={dataIdFromObject:N1,addTypename:!0,resultCaching:!0,canonizeResults:!1};function Hx(e){return Kl(I1,e)}function A1(e){var t=e.canonizeResults;return t===void 0?I1.canonizeResults:t}function Gx(e,t){return ke(t)?e.get(t.__ref,"__typename"):t&&t.__typename}var D1=/^[_a-z][_0-9a-z]*/i;function dn(e){var t=e.match(D1);return t?t[0]:e}function fd(e,t,r){return We(t)?Ge(t)?t.every(function(n){return fd(e,n,r)}):e.selections.every(function(n){if(Mr(n)&&ql(n,r)){var i=Ln(n);return lt.call(t,i)&&(!n.selectionSet||fd(n.selectionSet,t[i],r))}return!0}):!1}function ai(e){return We(e)&&!ke(e)&&!Ge(e)}function Qx(){return new cn}function R1(e,t){var r=kh(Ch(e));return{fragmentMap:r,lookupFragment:function(n){var i=r[n];return!i&&t&&(i=t.lookup(n)),i||null}}}var Pa=Object.create(null),zc=function(){return Pa},dm=Object.create(null),Oo=function(){function e(t,r){var n=this;this.policies=t,this.group=r,this.data=Object.create(null),this.rootIds=Object.create(null),this.refs=Object.create(null),this.getFieldValue=function(i,o){return id(ke(i)?n.get(i.__ref,o):i&&i[o])},this.canRead=function(i){return ke(i)?n.has(i.__ref):typeof i=="object"},this.toReference=function(i,o){if(typeof i=="string")return ui(i);if(ke(i))return i;var a=n.policies.identify(i)[0];if(a){var s=ui(a);return o&&n.merge(a,i),s}}}return e.prototype.toObject=function(){return O({},this.data)},e.prototype.has=function(t){return this.lookup(t,!0)!==void 0},e.prototype.get=function(t,r){if(this.group.depend(t,r),lt.call(this.data,t)){var n=this.data[t];if(n&&lt.call(n,r))return n[r]}if(r==="__typename"&&lt.call(this.policies.rootTypenamesById,t))return this.policies.rootTypenamesById[t];if(this instanceof Gr)return this.parent.get(t,r)},e.prototype.lookup=function(t,r){if(r&&this.group.depend(t,"__exists"),lt.call(this.data,t))return this.data[t];if(this instanceof Gr)return this.parent.lookup(t,r);if(this.policies.rootTypenamesById[t])return Object.create(null)},e.prototype.merge=function(t,r){var n=this,i;ke(t)&&(t=t.__ref),ke(r)&&(r=r.__ref);var o=typeof t=="string"?this.lookup(i=t):t,a=typeof r=="string"?this.lookup(i=r):r;if(!!a){__DEV__?B(typeof i=="string","store.merge expects a string ID"):B(typeof i=="string",1);var s=new cn(Yx).merge(o,a);if(this.data[i]=s,s!==o&&(delete this.refs[i],this.group.caching)){var c=Object.create(null);o||(c.__exists=1),Object.keys(a).forEach(function(l){if(!o||o[l]!==s[l]){c[l]=1;var u=dn(l);u!==l&&!n.policies.hasKeyArgs(s.__typename,u)&&(c[u]=1),s[l]===void 0&&!(n instanceof Gr)&&delete s[l]}}),c.__typename&&!(o&&o.__typename)&&this.policies.rootTypenamesById[i]===s.__typename&&delete c.__typename,Object.keys(c).forEach(function(l){return n.group.dirty(i,l)})}}},e.prototype.modify=function(t,r){var n=this,i=this.lookup(t);if(i){var o=Object.create(null),a=!1,s=!0,c={DELETE:Pa,INVALIDATE:dm,isReference:ke,toReference:this.toReference,canRead:this.canRead,readField:function(l,u){return n.policies.readField(typeof l=="string"?{fieldName:l,from:u||ui(t)}:l,{store:n})}};if(Object.keys(i).forEach(function(l){var u=dn(l),d=i[l];if(d!==void 0){var f=typeof r=="function"?r:r[l]||r[u];if(f){var h=f===zc?Pa:f(id(d),O(O({},c),{fieldName:u,storeFieldName:l,storage:n.getStorage(t,l)}));h===dm?n.group.dirty(t,l):(h===Pa&&(h=void 0),h!==d&&(o[l]=h,a=!0,d=h))}d!==void 0&&(s=!1)}}),a)return this.merge(t,o),s&&(this instanceof Gr?this.data[t]=void 0:delete this.data[t],this.group.dirty(t,"__exists")),!0}return!1},e.prototype.delete=function(t,r,n){var i,o=this.lookup(t);if(o){var a=this.getFieldValue(o,"__typename"),s=r&&n?this.policies.getStoreFieldName({typename:a,fieldName:r,args:n}):r;return this.modify(t,s?(i={},i[s]=zc,i):zc)}return!1},e.prototype.evict=function(t,r){var n=!1;return t.id&&(lt.call(this.data,t.id)&&(n=this.delete(t.id,t.fieldName,t.args)),this instanceof Gr&&this!==r&&(n=this.parent.evict(t,r)||n),(t.fieldName||n)&&this.group.dirty(t.id,t.fieldName||"__exists")),n},e.prototype.clear=function(){this.replace(null)},e.prototype.extract=function(){var t=this,r=this.toObject(),n=[];return this.getRootIdSet().forEach(function(i){lt.call(t.policies.rootTypenamesById,i)||n.push(i)}),n.length&&(r.__META={extraRootIds:n.sort()}),r},e.prototype.replace=function(t){var r=this;if(Object.keys(this.data).forEach(function(o){t&&lt.call(t,o)||r.delete(o)}),t){var n=t.__META,i=an(t,["__META"]);Object.keys(i).forEach(function(o){r.merge(o,i[o])}),n&&n.extraRootIds.forEach(this.retain,this)}},e.prototype.retain=function(t){return this.rootIds[t]=(this.rootIds[t]||0)+1},e.prototype.release=function(t){if(this.rootIds[t]>0){var r=--this.rootIds[t];return r||delete this.rootIds[t],r}return 0},e.prototype.getRootIdSet=function(t){return t===void 0&&(t=new Set),Object.keys(this.rootIds).forEach(t.add,t),this instanceof Gr?this.parent.getRootIdSet(t):Object.keys(this.policies.rootTypenamesById).forEach(t.add,t),t},e.prototype.gc=function(){var t=this,r=this.getRootIdSet(),n=this.toObject();r.forEach(function(a){lt.call(n,a)&&(Object.keys(t.findChildRefIds(a)).forEach(r.add,r),delete n[a])});var i=Object.keys(n);if(i.length){for(var o=this;o instanceof Gr;)o=o.parent;i.forEach(function(a){return o.delete(a)})}return i},e.prototype.findChildRefIds=function(t){if(!lt.call(this.refs,t)){var r=this.refs[t]=Object.create(null),n=this.data[t];if(!n)return r;var i=new Set([n]);i.forEach(function(o){ke(o)&&(r[o.__ref]=!0),We(o)&&Object.keys(o).forEach(function(a){var s=o[a];We(s)&&i.add(s)})})}return this.refs[t]},e.prototype.makeCacheKey=function(){return this.group.keyMaker.lookupArray(arguments)},e}(),F1=function(){function e(t,r){r===void 0&&(r=null),this.caching=t,this.parent=r,this.d=null,this.resetCaching()}return e.prototype.resetCaching=function(){this.d=this.caching?C1():null,this.keyMaker=new Bo(Vn)},e.prototype.depend=function(t,r){if(this.d){this.d(Uc(t,r));var n=dn(r);n!==r&&this.d(Uc(t,n)),this.parent&&this.parent.depend(t,r)}},e.prototype.dirty=function(t,r){this.d&&this.d.dirty(Uc(t,r),r==="__exists"?"forget":"setDirty")},e}();function Uc(e,t){return t+"#"+e}function fm(e,t){mo(e)&&e.group.depend(t,"__exists")}(function(e){var t=function(r){lr(n,r);function n(i){var o=i.policies,a=i.resultCaching,s=a===void 0?!0:a,c=i.seed,l=r.call(this,o,new F1(s))||this;return l.stump=new Kx(l),l.storageTrie=new Bo(Vn),c&&l.replace(c),l}return n.prototype.addLayer=function(i,o){return this.stump.addLayer(i,o)},n.prototype.removeLayer=function(){return this},n.prototype.getStorage=function(){return this.storageTrie.lookupArray(arguments)},n}(e);e.Root=t})(Oo||(Oo={}));var Gr=function(e){lr(t,e);function t(r,n,i,o){var a=e.call(this,n.policies,o)||this;return a.id=r,a.parent=n,a.replay=i,a.group=o,i(a),a}return t.prototype.addLayer=function(r,n){return new t(r,this,n,this.group)},t.prototype.removeLayer=function(r){var n=this,i=this.parent.removeLayer(r);return r===this.id?(this.group.caching&&Object.keys(this.data).forEach(function(o){var a=n.data[o],s=i.lookup(o);s?a?a!==s&&Object.keys(a).forEach(function(c){tt(a[c],s[c])||n.group.dirty(o,c)}):(n.group.dirty(o,"__exists"),Object.keys(s).forEach(function(c){n.group.dirty(o,c)})):n.delete(o)}),i):i===this.parent?this:i.addLayer(this.id,this.replay)},t.prototype.toObject=function(){return O(O({},this.parent.toObject()),this.data)},t.prototype.findChildRefIds=function(r){var n=this.parent.findChildRefIds(r);return lt.call(this.data,r)?O(O({},n),e.prototype.findChildRefIds.call(this,r)):n},t.prototype.getStorage=function(){for(var r=this.parent;r.parent;)r=r.parent;return r.getStorage.apply(r,arguments)},t}(Oo),Kx=function(e){lr(t,e);function t(r){return e.call(this,"EntityStore.Stump",r,function(){},new F1(r.group.caching,r.group))||this}return t.prototype.removeLayer=function(){return this},t.prototype.merge=function(){return this.parent.merge.apply(this.parent,arguments)},t}(Gr);function Yx(e,t,r){var n=e[r],i=t[r];return tt(n,i)?n:i}function mo(e){return!!(e instanceof Oo&&e.group.caching)}function Xx(e){return We(e)?Ge(e)?e.slice(0):O({__proto__:Object.getPrototypeOf(e)},e):e}var hd=function(){function e(){this.known=new(U5?WeakSet:Set),this.pool=new Bo(Vn),this.passes=new WeakMap,this.keysByJSON=new Map,this.empty=this.admit({})}return e.prototype.isKnown=function(t){return We(t)&&this.known.has(t)},e.prototype.pass=function(t){if(We(t)){var r=Xx(t);return this.passes.set(r,t),r}return t},e.prototype.admit=function(t){var r=this;if(We(t)){var n=this.passes.get(t);if(n)return n;var i=Object.getPrototypeOf(t);switch(i){case Array.prototype:{if(this.known.has(t))return t;var o=t.map(this.admit,this),a=this.pool.lookupArray(o);return a.array||(this.known.add(a.array=o),__DEV__&&Object.freeze(o)),a.array}case null:case Object.prototype:{if(this.known.has(t))return t;var s=Object.getPrototypeOf(t),c=[s],l=this.sortedKeys(t);c.push(l.json);var u=c.length;l.sorted.forEach(function(h){c.push(r.admit(t[h]))});var a=this.pool.lookupArray(c);if(!a.object){var d=a.object=Object.create(s);this.known.add(d),l.sorted.forEach(function(h,p){d[h]=c[u+p]}),__DEV__&&Object.freeze(d)}return a.object}}}return t},e.prototype.sortedKeys=function(t){var r=Object.keys(t),n=this.pool.lookupArray(r);if(!n.keys){r.sort();var i=JSON.stringify(r);(n.keys=this.keysByJSON.get(i))||this.keysByJSON.set(i,n.keys={sorted:r,json:i})}return n.keys},e}(),Nn=Object.assign(function(e){if(We(e)){pd===void 0&&hm();var t=pd.admit(e),r=md.get(t);return r===void 0&&md.set(t,r=JSON.stringify(t)),r}return JSON.stringify(e)},{reset:hm}),pd,md;function hm(){pd=new hd,md=new(Vn?WeakMap:Map)}function pm(e){return[e.selectionSet,e.objectOrReference,e.context,e.context.canonizeResults]}var Zx=function(){function e(t){var r=this;this.knownResults=new(Vn?WeakMap:Map),this.config=Kl(t,{addTypename:t.addTypename!==!1,canonizeResults:A1(t)}),this.canon=t.canon||new hd,this.executeSelectionSet=Rs(function(n){var i,o=n.context.canonizeResults,a=pm(n);a[3]=!o;var s=(i=r.executeSelectionSet).peek.apply(i,a);return s?o?O(O({},s),{result:r.canon.admit(s.result)}):s:(fm(n.context.store,n.enclosingRef.__ref),r.execSelectionSetImpl(n))},{max:this.config.resultCacheMaxSize,keyArgs:pm,makeCacheKey:function(n,i,o,a){if(mo(o.store))return o.store.makeCacheKey(n,ke(i)?i.__ref:i,o.varString,a)}}),this.executeSubSelectedArray=Rs(function(n){return fm(n.context.store,n.enclosingRef.__ref),r.execSubSelectedArrayImpl(n)},{max:this.config.resultCacheMaxSize,makeCacheKey:function(n){var i=n.field,o=n.array,a=n.context;if(mo(a.store))return a.store.makeCacheKey(i,o,a.varString)}})}return e.prototype.resetCanon=function(){this.canon=new hd},e.prototype.diffQueryAgainstStore=function(t){var r=t.store,n=t.query,i=t.rootId,o=i===void 0?"ROOT_QUERY":i,a=t.variables,s=t.returnPartialData,c=s===void 0?!0:s,l=t.canonizeResults,u=l===void 0?this.config.canonizeResults:l,d=this.config.cache.policies;a=O(O({},Th(o1(n))),a);var f=ui(o),h=this.executeSelectionSet({selectionSet:Ph(n).selectionSet,objectOrReference:f,enclosingRef:f,context:O({store:r,query:n,policies:d,variables:a,varString:Nn(a),canonizeResults:u},R1(n,this.config.fragments))}),p;if(h.missing&&(p=[new T1(Jx(h.missing),h.missing,n,a)],!c))throw p[0];return{result:h.result,complete:!p,missing:p}},e.prototype.isFresh=function(t,r,n,i){if(mo(i.store)&&this.knownResults.get(t)===n){var o=this.executeSelectionSet.peek(n,r,i,this.canon.isKnown(t));if(o&&t===o.result)return!0}return!1},e.prototype.execSelectionSetImpl=function(t){var r=this,n=t.selectionSet,i=t.objectOrReference,o=t.enclosingRef,a=t.context;if(ke(i)&&!a.policies.rootTypenamesById[i.__ref]&&!a.store.has(i.__ref))return{result:this.canon.empty,missing:"Dangling reference to missing ".concat(i.__ref," object")};var s=a.variables,c=a.policies,l=a.store,u=l.getFieldValue(i,"__typename"),d=[],f,h=new cn;this.config.addTypename&&typeof u=="string"&&!c.rootIdsByTypename[u]&&d.push({__typename:u});function p(g,_){var k;return g.missing&&(f=h.merge(f,(k={},k[_]=g.missing,k))),g.result}var m=new Set(n.selections);m.forEach(function(g){var _,k;if(!!ql(g,s))if(Mr(g)){var E=c.readField({fieldName:g.name.value,field:g,variables:a.variables,from:i},a),x=Ln(g);E===void 0?Ih.added(g)||(f=h.merge(f,(_={},_[x]="Can't find field '".concat(g.name.value,"' on ").concat(ke(i)?i.__ref+" object":"object "+JSON.stringify(i,null,2)),_))):Ge(E)?E=p(r.executeSubSelectedArray({field:g,array:E,enclosingRef:o,context:a}),x):g.selectionSet?E!=null&&(E=p(r.executeSelectionSet({selectionSet:g.selectionSet,objectOrReference:E,enclosingRef:ke(E)?E:o,context:a}),x)):a.canonizeResults&&(E=r.canon.pass(E)),E!==void 0&&d.push((k={},k[x]=E,k))}else{var T=Eh(g,a.lookupFragment);if(!T&&g.kind===Z.FRAGMENT_SPREAD)throw __DEV__?new be("No fragment named ".concat(g.name.value)):new be(5);T&&c.fragmentMatches(T,u)&&T.selectionSet.selections.forEach(m.add,m)}});var v=Ah(d),y={result:v,missing:f},b=a.canonizeResults?this.canon.admit(y):id(y);return b.result&&this.knownResults.set(b.result,n),b},e.prototype.execSubSelectedArrayImpl=function(t){var r=this,n=t.field,i=t.array,o=t.enclosingRef,a=t.context,s,c=new cn;function l(u,d){var f;return u.missing&&(s=c.merge(s,(f={},f[d]=u.missing,f))),u.result}return n.selectionSet&&(i=i.filter(a.store.canRead)),i=i.map(function(u,d){return u===null?null:Ge(u)?l(r.executeSubSelectedArray({field:n,array:u,enclosingRef:o,context:a}),d):n.selectionSet?l(r.executeSelectionSet({selectionSet:n.selectionSet,objectOrReference:u,enclosingRef:ke(u)?u:o,context:a}),d):(__DEV__&&e9(a.store,n,u),u)}),{result:a.canonizeResults?this.canon.admit(i):i,missing:s}},e}();function Jx(e){try{JSON.stringify(e,function(t,r){if(typeof r=="string")throw r;return r})}catch(t){return t}}function e9(e,t,r){if(!t.selectionSet){var n=new Set([r]);n.forEach(function(i){We(i)&&(__DEV__?B(!ke(i),"Missing selection set for object of type ".concat(Gx(e,i)," returned for query field ").concat(t.name.value)):B(!ke(i),6),Object.values(i).forEach(n.add,n))})}}var Uh=new Yl,mm=new WeakMap;function vo(e){var t=mm.get(e);return t||mm.set(e,t={vars:new Set,dep:C1()}),t}function vm(e){vo(e).vars.forEach(function(t){return t.forgetCache(e)})}function t9(e){vo(e).vars.forEach(function(t){return t.attachCache(e)})}function r9(e){var t=new Set,r=new Set,n=function(o){if(arguments.length>0){if(e!==o){e=o,t.forEach(function(c){vo(c).dep.dirty(n),n9(c)});var a=Array.from(r);r.clear(),a.forEach(function(c){return c(e)})}}else{var s=Uh.getValue();s&&(i(s),vo(s).dep(n))}return e};n.onNextChange=function(o){return r.add(o),function(){r.delete(o)}};var i=n.attachCache=function(o){return t.add(o),vo(o).vars.add(n),n};return n.forgetCache=function(o){return t.delete(o)},n}function n9(e){e.broadcastWatches&&e.broadcastWatches()}var ym=Object.create(null);function Vh(e){var t=JSON.stringify(e);return ym[t]||(ym[t]=Object.create(null))}function gm(e){var t=Vh(e);return t.keyFieldsFn||(t.keyFieldsFn=function(r,n){var i=function(a,s){return n.readField(s,a)},o=n.keyObject=Bh(e,function(a){var s=fi(n.storeObject,a,i);return s===void 0&&r!==n.storeObject&&lt.call(r,a[0])&&(s=fi(r,a,M1)),__DEV__?B(s!==void 0,"Missing field '".concat(a.join("."),"' while extracting keyFields from ").concat(JSON.stringify(r))):B(s!==void 0,2),s});return"".concat(n.typename,":").concat(JSON.stringify(o))})}function bm(e){var t=Vh(e);return t.keyArgsFn||(t.keyArgsFn=function(r,n){var i=n.field,o=n.variables,a=n.fieldName,s=Bh(e,function(l){var u=l[0],d=u.charAt(0);if(d==="@"){if(i&&Yt(i.directives)){var f=u.slice(1),h=i.directives.find(function(y){return y.name.value===f}),p=h&&Hl(h,o);return p&&fi(p,l.slice(1))}return}if(d==="$"){var m=u.slice(1);if(o&&lt.call(o,m)){var v=l.slice(0);return v[0]=m,fi(o,v)}return}if(r)return fi(r,l)}),c=JSON.stringify(s);return(r||c!=="{}")&&(a+=":"+c),a})}function Bh(e,t){var r=new cn;return L1(e).reduce(function(n,i){var o,a=t(i);if(a!==void 0){for(var s=i.length-1;s>=0;--s)a=(o={},o[i[s]]=a,o);n=r.merge(n,a)}return n},Object.create(null))}function L1(e){var t=Vh(e);if(!t.paths){var r=t.paths=[],n=[];e.forEach(function(i,o){Ge(i)?(L1(i).forEach(function(a){return r.push(n.concat(a))}),n.length=0):(n.push(i),Ge(e[o+1])||(r.push(n.slice(0)),n.length=0))})}return t.paths}function M1(e,t){return e[t]}function fi(e,t,r){return r=r||M1,j1(t.reduce(function n(i,o){return Ge(i)?i.map(function(a){return n(a,o)}):i&&r(i,o)},e))}function j1(e){return We(e)?Ge(e)?e.map(j1):Bh(Object.keys(e).sort(),function(t){return fi(e,t)}):e}Oh.setStringify(Nn);function vd(e){return e.args!==void 0?e.args:e.field?Hl(e.field,e.variables):null}var i9=function(){},$m=function(e,t){return t.fieldName},wm=function(e,t,r){var n=r.mergeObjects;return n(e,t)},_m=function(e,t){return t},o9=function(){function e(t){this.config=t,this.typePolicies=Object.create(null),this.toBeAdded=Object.create(null),this.supertypeMap=new Map,this.fuzzySubtypes=new Map,this.rootIdsByTypename=Object.create(null),this.rootTypenamesById=Object.create(null),this.usingPossibleTypes=!1,this.config=O({dataIdFromObject:N1},t),this.cache=this.config.cache,this.setRootTypename("Query"),this.setRootTypename("Mutation"),this.setRootTypename("Subscription"),t.possibleTypes&&this.addPossibleTypes(t.possibleTypes),t.typePolicies&&this.addTypePolicies(t.typePolicies)}return e.prototype.identify=function(t,r){var n,i=this,o=r&&(r.typename||((n=r.storeObject)===null||n===void 0?void 0:n.__typename))||t.__typename;if(o===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];for(var a=r&&r.storeObject||t,s=O(O({},r),{typename:o,storeObject:a,readField:r&&r.readField||function(){var f=Wh(arguments,a);return i.readField(f,{store:i.cache.data,variables:f.variables})}}),c,l=o&&this.getTypePolicy(o),u=l&&l.keyFn||this.config.dataIdFromObject;u;){var d=u(t,s);if(Ge(d))u=gm(d);else{c=d;break}}return c=c?String(c):void 0,s.keyObject?[c,s.keyObject]:[c]},e.prototype.addTypePolicies=function(t){var r=this;Object.keys(t).forEach(function(n){var i=t[n],o=i.queryType,a=i.mutationType,s=i.subscriptionType,c=an(i,["queryType","mutationType","subscriptionType"]);o&&r.setRootTypename("Query",n),a&&r.setRootTypename("Mutation",n),s&&r.setRootTypename("Subscription",n),lt.call(r.toBeAdded,n)?r.toBeAdded[n].push(c):r.toBeAdded[n]=[c]})},e.prototype.updateTypePolicy=function(t,r){var n=this,i=this.getTypePolicy(t),o=r.keyFields,a=r.fields;function s(c,l){c.merge=typeof l=="function"?l:l===!0?wm:l===!1?_m:c.merge}s(i,r.merge),i.keyFn=o===!1?i9:Ge(o)?gm(o):typeof o=="function"?o:i.keyFn,a&&Object.keys(a).forEach(function(c){var l=n.getFieldPolicy(t,c,!0),u=a[c];if(typeof u=="function")l.read=u;else{var d=u.keyArgs,f=u.read,h=u.merge;l.keyFn=d===!1?$m:Ge(d)?bm(d):typeof d=="function"?d:l.keyFn,typeof f=="function"&&(l.read=f),s(l,h)}l.read&&l.merge&&(l.keyFn=l.keyFn||$m)})},e.prototype.setRootTypename=function(t,r){r===void 0&&(r=t);var n="ROOT_"+t.toUpperCase(),i=this.rootTypenamesById[n];r!==i&&(__DEV__?B(!i||i===t,"Cannot change root ".concat(t," __typename more than once")):B(!i||i===t,3),i&&delete this.rootIdsByTypename[i],this.rootIdsByTypename[r]=n,this.rootTypenamesById[n]=r)},e.prototype.addPossibleTypes=function(t){var r=this;this.usingPossibleTypes=!0,Object.keys(t).forEach(function(n){r.getSupertypeSet(n,!0),t[n].forEach(function(i){r.getSupertypeSet(i,!0).add(n);var o=i.match(D1);(!o||o[0]!==i)&&r.fuzzySubtypes.set(i,new RegExp(i))})})},e.prototype.getTypePolicy=function(t){var r=this;if(!lt.call(this.typePolicies,t)){var n=this.typePolicies[t]=Object.create(null);n.fields=Object.create(null);var i=this.supertypeMap.get(t);i&&i.size&&i.forEach(function(a){var s=r.getTypePolicy(a),c=s.fields,l=an(s,["fields"]);Object.assign(n,l),Object.assign(n.fields,c)})}var o=this.toBeAdded[t];return o&&o.length&&o.splice(0).forEach(function(a){r.updateTypePolicy(t,a)}),this.typePolicies[t]},e.prototype.getFieldPolicy=function(t,r,n){if(t){var i=this.getTypePolicy(t).fields;return i[r]||n&&(i[r]=Object.create(null))}},e.prototype.getSupertypeSet=function(t,r){var n=this.supertypeMap.get(t);return!n&&r&&this.supertypeMap.set(t,n=new Set),n},e.prototype.fragmentMatches=function(t,r,n,i){var o=this;if(!t.typeCondition)return!0;if(!r)return!1;var a=t.typeCondition.name.value;if(r===a)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(a))for(var s=this.getSupertypeSet(r,!0),c=[s],l=function(p){var m=o.getSupertypeSet(p,!1);m&&m.size&&c.indexOf(m)<0&&c.push(m)},u=!!(n&&this.fuzzySubtypes.size),d=!1,f=0;f<c.length;++f){var h=c[f];if(h.has(a))return s.has(a)||(d&&__DEV__&&B.warn("Inferring subtype ".concat(r," of supertype ").concat(a)),s.add(a)),!0;h.forEach(l),u&&f===c.length-1&&fd(t.selectionSet,n,i)&&(u=!1,d=!0,this.fuzzySubtypes.forEach(function(p,m){var v=r.match(p);v&&v[0]===r&&l(m)}))}return!1},e.prototype.hasKeyArgs=function(t,r){var n=this.getFieldPolicy(t,r,!1);return!!(n&&n.keyFn)},e.prototype.getStoreFieldName=function(t){var r=t.typename,n=t.fieldName,i=this.getFieldPolicy(r,n,!1),o,a=i&&i.keyFn;if(a&&r)for(var s={typename:r,fieldName:n,field:t.field||null,variables:t.variables},c=vd(t);a;){var l=a(c,s);if(Ge(l))a=bm(l);else{o=l||n;break}}return o===void 0&&(o=t.field?y5(t.field,t.variables):Oh(n,vd(t))),o===!1?n:n===dn(o)?o:n+":"+o},e.prototype.readField=function(t,r){var n=t.from;if(!!n){var i=t.field||t.fieldName;if(!!i){if(t.typename===void 0){var o=r.store.getFieldValue(n,"__typename");o&&(t.typename=o)}var a=this.getStoreFieldName(t),s=dn(a),c=r.store.getFieldValue(n,a),l=this.getFieldPolicy(t.typename,s,!1),u=l&&l.read;if(u){var d=xm(this,n,t,r,r.store.getStorage(ke(n)?n.__ref:n,a));return Uh.withValue(this.cache,u,[c,d])}return c}}},e.prototype.getReadFunction=function(t,r){var n=this.getFieldPolicy(t,r,!1);return n&&n.read},e.prototype.getMergeFunction=function(t,r,n){var i=this.getFieldPolicy(t,r,!1),o=i&&i.merge;return!o&&n&&(i=this.getTypePolicy(n),o=i&&i.merge),o},e.prototype.runMergeFunction=function(t,r,n,i,o){var a=n.field,s=n.typename,c=n.merge;return c===wm?z1(i.store)(t,r):c===_m?r:(i.overwrite&&(t=void 0),c(t,r,xm(this,void 0,{typename:s,fieldName:a.name.value,field:a,variables:i.variables},i,o||Object.create(null))))},e}();function xm(e,t,r,n,i){var o=e.getStoreFieldName(r),a=dn(o),s=r.variables||n.variables,c=n.store,l=c.toReference,u=c.canRead;return{args:vd(r),field:r.field||null,fieldName:a,storeFieldName:o,variables:s,isReference:ke,toReference:l,storage:i,cache:e.cache,canRead:u,readField:function(){return e.readField(Wh(arguments,t,s),n)},mergeObjects:z1(n.store)}}function Wh(e,t,r){var n=e[0],i=e[1],o=e.length,a;return typeof n=="string"?a={fieldName:n,from:o>1?i:t}:(a=O({},n),lt.call(a,"from")||(a.from=t)),__DEV__&&a.from===void 0&&__DEV__&&B.warn("Undefined 'from' passed to readField with arguments ".concat(W5(Array.from(e)))),a.variables===void 0&&(a.variables=r),a}function z1(e){return function(r,n){if(Ge(r)||Ge(n))throw __DEV__?new be("Cannot automatically merge arrays"):new be(4);if(We(r)&&We(n)){var i=e.getFieldValue(r,"__typename"),o=e.getFieldValue(n,"__typename"),a=i&&o&&i!==o;if(a)return n;if(ke(r)&&ai(n))return e.merge(r.__ref,n),r;if(ai(r)&&ke(n))return e.merge(r,n.__ref),n;if(ai(r)&&ai(n))return O(O({},r),n)}return n}}function Vc(e,t,r){var n="".concat(t).concat(r),i=e.flavors.get(n);return i||e.flavors.set(n,i=e.clientOnly===t&&e.deferred===r?e:O(O({},e),{clientOnly:t,deferred:r})),i}var a9=function(){function e(t,r,n){this.cache=t,this.reader=r,this.fragments=n}return e.prototype.writeToStore=function(t,r){var n=this,i=r.query,o=r.result,a=r.dataId,s=r.variables,c=r.overwrite,l=Vo(i),u=Qx();s=O(O({},Th(l)),s);var d=O(O({store:t,written:Object.create(null),merge:function(h,p){return u.merge(h,p)},variables:s,varString:Nn(s)},R1(i,this.fragments)),{overwrite:!!c,incomingById:new Map,clientOnly:!1,deferred:!1,flavors:new Map}),f=this.processSelectionSet({result:o||Object.create(null),dataId:a,selectionSet:l.selectionSet,mergeTree:{map:new Map},context:d});if(!ke(f))throw __DEV__?new be("Could not identify object ".concat(JSON.stringify(o))):new be(7);return d.incomingById.forEach(function(h,p){var m=h.storeObject,v=h.mergeTree,y=h.fieldNodeSet,b=ui(p);if(v&&v.map.size){var g=n.applyMerges(v,b,m,d);if(ke(g))return;m=g}if(__DEV__&&!d.overwrite){var _=Object.create(null);y.forEach(function(x){x.selectionSet&&(_[x.name.value]=!0)});var k=function(x){return _[dn(x)]===!0},E=function(x){var T=v&&v.map.get(x);return Boolean(T&&T.info&&T.info.merge)};Object.keys(m).forEach(function(x){k(x)&&!E(x)&&s9(b,m,x,d.store)})}t.merge(p,m)}),t.retain(f.__ref),f},e.prototype.processSelectionSet=function(t){var r=this,n=t.dataId,i=t.result,o=t.selectionSet,a=t.context,s=t.mergeTree,c=this.cache.policies,l=Object.create(null),u=n&&c.rootTypenamesById[n]||Ju(i,o,a.fragmentMap)||n&&a.store.get(n,"__typename");typeof u=="string"&&(l.__typename=u);var d=function(){var g=Wh(arguments,l,a.variables);if(ke(g.from)){var _=a.incomingById.get(g.from.__ref);if(_){var k=c.readField(O(O({},g),{from:_.storeObject}),a);if(k!==void 0)return k}}return c.readField(g,a)},f=new Set;this.flattenFields(o,i,a,u).forEach(function(g,_){var k,E=Ln(_),x=i[E];if(f.add(_),x!==void 0){var T=c.getStoreFieldName({typename:u,fieldName:_.name.value,field:_,variables:g.variables}),j=Sm(s,T),z=r.processFieldValue(x,_,_.selectionSet?Vc(g,!1,!1):g,j),K=void 0;_.selectionSet&&(ke(z)||ai(z))&&(K=d("__typename",z));var D=c.getMergeFunction(u,_.name.value,K);D?j.info={field:_,typename:u,merge:D}:km(s,T),l=g.merge(l,(k={},k[T]=z,k))}else __DEV__&&!g.clientOnly&&!g.deferred&&!Ih.added(_)&&!c.getReadFunction(u,_.name.value)&&__DEV__&&B.error("Missing field '".concat(Ln(_),"' while writing result ").concat(JSON.stringify(i,null,2)).substring(0,1e3))});try{var h=c.identify(i,{typename:u,selectionSet:o,fragmentMap:a.fragmentMap,storeObject:l,readField:d}),p=h[0],m=h[1];n=n||p,m&&(l=a.merge(l,m))}catch(g){if(!n)throw g}if(typeof n=="string"){var v=ui(n),y=a.written[n]||(a.written[n]=[]);if(y.indexOf(o)>=0||(y.push(o),this.reader&&this.reader.isFresh(i,v,o,a)))return v;var b=a.incomingById.get(n);return b?(b.storeObject=a.merge(b.storeObject,l),b.mergeTree=yd(b.mergeTree,s),f.forEach(function(g){return b.fieldNodeSet.add(g)})):a.incomingById.set(n,{storeObject:l,mergeTree:Fs(s)?void 0:s,fieldNodeSet:f}),v}return l},e.prototype.processFieldValue=function(t,r,n,i){var o=this;return!r.selectionSet||t===null?__DEV__?f1(t):t:Ge(t)?t.map(function(a,s){var c=o.processFieldValue(a,r,n,Sm(i,s));return km(i,s),c}):this.processSelectionSet({result:t,selectionSet:r.selectionSet,context:n,mergeTree:i})},e.prototype.flattenFields=function(t,r,n,i){i===void 0&&(i=Ju(r,t,n.fragmentMap));var o=new Map,a=this.cache.policies,s=new Bo(!1);return function c(l,u){var d=s.lookup(l,u.clientOnly,u.deferred);d.visited||(d.visited=!0,l.selections.forEach(function(f){if(!!ql(f,n.variables)){var h=u.clientOnly,p=u.deferred;if(!(h&&p)&&Yt(f.directives)&&f.directives.forEach(function(y){var b=y.name.value;if(b==="client"&&(h=!0),b==="defer"){var g=Hl(y,n.variables);(!g||g.if!==!1)&&(p=!0)}}),Mr(f)){var m=o.get(f);m&&(h=h&&m.clientOnly,p=p&&m.deferred),o.set(f,Vc(n,h,p))}else{var v=Eh(f,n.lookupFragment);if(!v&&f.kind===Z.FRAGMENT_SPREAD)throw __DEV__?new be("No fragment named ".concat(f.name.value)):new be(8);v&&a.fragmentMatches(v,i,r,n.variables)&&c(v.selectionSet,Vc(n,h,p))}}}))}(t,n),o},e.prototype.applyMerges=function(t,r,n,i,o){var a,s=this;if(t.map.size&&!ke(n)){var c=!Ge(n)&&(ke(r)||ai(r))?r:void 0,l=n;c&&!o&&(o=[ke(c)?c.__ref:c]);var u,d=function(f,h){return Ge(f)?typeof h=="number"?f[h]:void 0:i.store.getFieldValue(f,String(h))};t.map.forEach(function(f,h){var p=d(c,h),m=d(l,h);if(m!==void 0){o&&o.push(h);var v=s.applyMerges(f,p,m,i,o);v!==m&&(u=u||new Map,u.set(h,v)),o&&B(o.pop()===h)}}),u&&(n=Ge(l)?l.slice(0):O({},l),u.forEach(function(f,h){n[h]=f}))}return t.info?this.cache.policies.runMergeFunction(r,n,t.info,i,o&&(a=i.store).getStorage.apply(a,o)):n},e}(),U1=[];function Sm(e,t){var r=e.map;return r.has(t)||r.set(t,U1.pop()||{map:new Map}),r.get(t)}function yd(e,t){if(e===t||!t||Fs(t))return e;if(!e||Fs(e))return t;var r=e.info&&t.info?O(O({},e.info),t.info):e.info||t.info,n=e.map.size&&t.map.size,i=n?new Map:e.map.size?e.map:t.map,o={info:r,map:i};if(n){var a=new Set(t.map.keys());e.map.forEach(function(s,c){o.map.set(c,yd(s,t.map.get(c))),a.delete(c)}),a.forEach(function(s){o.map.set(s,yd(t.map.get(s),e.map.get(s)))})}return o}function Fs(e){return!e||!(e.info||e.map.size)}function km(e,t){var r=e.map,n=r.get(t);n&&Fs(n)&&(U1.push(n),r.delete(t))}var Em=new Set;function s9(e,t,r,n){var i=function(d){var f=n.getFieldValue(d,r);return typeof f=="object"&&f},o=i(e);if(!!o){var a=i(t);if(!!a&&!ke(o)&&!tt(o,a)&&!Object.keys(o).every(function(d){return n.getFieldValue(a,d)!==void 0})){var s=n.getFieldValue(e,"__typename")||n.getFieldValue(t,"__typename"),c=dn(r),l="".concat(s,".").concat(c);if(!Em.has(l)){Em.add(l);var u=[];!Ge(o)&&!Ge(a)&&[o,a].forEach(function(d){var f=n.getFieldValue(d,"__typename");typeof f=="string"&&!u.includes(f)&&u.push(f)}),__DEV__&&B.warn("Cache data may be lost when replacing the ".concat(c," field of a ").concat(s,` object.
55
55
 
56
56
  To address this problem (which is not a bug in Apollo Client), `).concat(u.length?"either ensure all objects of type "+u.join(" and ")+" have an ID or a custom merge function, or ":"","define a custom merge function for the ").concat(l,` field, so InMemoryCache can safely merge these objects:
57
57
 
@@ -62,13 +62,13 @@ For more information about these options, please refer to the documentation:
62
62
 
63
63
  * Ensuring entity objects have IDs: https://go.apollo.dev/c/generating-unique-identifiers
64
64
  * Defining custom merge functions: https://go.apollo.dev/c/merging-non-normalized-objects
65
- `))}}}}var l9=function(e){lr(t,e);function t(r){r===void 0&&(r={});var n=e.call(this)||this;return n.watches=new Set,n.typenameDocumentCache=new Map,n.makeVar=r9,n.txCount=0,n.config=Hx(r),n.addTypename=!!n.config.addTypename,n.policies=new o9({cache:n,dataIdFromObject:n.config.dataIdFromObject,possibleTypes:n.config.possibleTypes,typePolicies:n.config.typePolicies}),n.init(),n}return t.prototype.init=function(){var r=this.data=new Oo.Root({policies:this.policies,resultCaching:this.config.resultCaching});this.optimisticData=r.stump,this.resetResultCache()},t.prototype.resetResultCache=function(r){var n=this,i=this.storeReader,o=this.config.fragments;this.storeWriter=new a9(this,this.storeReader=new Zx({cache:this,addTypename:this.addTypename,resultCacheMaxSize:this.config.resultCacheMaxSize,canonizeResults:A1(this.config),canon:r?void 0:i&&i.canon,fragments:o}),o),this.maybeBroadcastWatch=Rs(function(a,s){return n.broadcastWatch(a,s)},{max:this.config.resultCacheMaxSize,makeCacheKey:function(a){var s=a.optimistic?n.optimisticData:n.data;if(mo(s)){var c=a.optimistic,l=a.id,u=a.variables;return s.makeCacheKey(a.query,a.callback,Nn({optimistic:c,id:l,variables:u}))}}}),new Set([this.data.group,this.optimisticData.group]).forEach(function(a){return a.resetCaching()})},t.prototype.restore=function(r){return this.init(),r&&this.data.replace(r),this},t.prototype.extract=function(r){return r===void 0&&(r=!1),(r?this.optimisticData:this.data).extract()},t.prototype.read=function(r){var n=r.returnPartialData,i=n===void 0?!1:n;try{return this.storeReader.diffQueryAgainstStore(O(O({},r),{store:r.optimistic?this.optimisticData:this.data,config:this.config,returnPartialData:i})).result||null}catch(o){if(o instanceof T1)return null;throw o}},t.prototype.write=function(r){try{return++this.txCount,this.storeWriter.writeToStore(this.data,r)}finally{!--this.txCount&&r.broadcast!==!1&&this.broadcastWatches()}},t.prototype.modify=function(r){if(lt.call(r,"id")&&!r.id)return!1;var n=r.optimistic?this.optimisticData:this.data;try{return++this.txCount,n.modify(r.id||"ROOT_QUERY",r.fields)}finally{!--this.txCount&&r.broadcast!==!1&&this.broadcastWatches()}},t.prototype.diff=function(r){return this.storeReader.diffQueryAgainstStore(O(O({},r),{store:r.optimistic?this.optimisticData:this.data,rootId:r.id||"ROOT_QUERY",config:this.config}))},t.prototype.watch=function(r){var n=this;return this.watches.size||t9(this),this.watches.add(r),r.immediate&&this.maybeBroadcastWatch(r),function(){n.watches.delete(r)&&!n.watches.size&&vm(n),n.maybeBroadcastWatch.forget(r)}},t.prototype.gc=function(r){Nn.reset();var n=this.optimisticData.gc();return r&&!this.txCount&&(r.resetResultCache?this.resetResultCache(r.resetResultIdentities):r.resetResultIdentities&&this.storeReader.resetCanon()),n},t.prototype.retain=function(r,n){return(n?this.optimisticData:this.data).retain(r)},t.prototype.release=function(r,n){return(n?this.optimisticData:this.data).release(r)},t.prototype.identify=function(r){if(ke(r))return r.__ref;try{return this.policies.identify(r)[0]}catch(n){__DEV__&&B.warn(n)}},t.prototype.evict=function(r){if(!r.id){if(lt.call(r,"id"))return!1;r=O(O({},r),{id:"ROOT_QUERY"})}try{return++this.txCount,this.optimisticData.evict(r,this.data)}finally{!--this.txCount&&r.broadcast!==!1&&this.broadcastWatches()}},t.prototype.reset=function(r){var n=this;return this.init(),Nn.reset(),r&&r.discardWatches?(this.watches.forEach(function(i){return n.maybeBroadcastWatch.forget(i)}),this.watches.clear(),vm(this)):this.broadcastWatches(),Promise.resolve()},t.prototype.removeOptimistic=function(r){var n=this.optimisticData.removeLayer(r);n!==this.optimisticData&&(this.optimisticData=n,this.broadcastWatches())},t.prototype.batch=function(r){var n=this,i=r.update,o=r.optimistic,a=o===void 0?!0:o,s=r.removeOptimistic,c=r.onWatchUpdated,l,u=function(f){var h=n,p=h.data,m=h.optimisticData;++n.txCount,f&&(n.data=n.optimisticData=f);try{return l=i(n)}finally{--n.txCount,n.data=p,n.optimisticData=m}},d=new Set;return c&&!this.txCount&&this.broadcastWatches(O(O({},r),{onWatchUpdated:function(f){return d.add(f),!1}})),typeof a=="string"?this.optimisticData=this.optimisticData.addLayer(a,u):a===!1?u(this.data):u(),typeof s=="string"&&(this.optimisticData=this.optimisticData.removeLayer(s)),c&&d.size?(this.broadcastWatches(O(O({},r),{onWatchUpdated:function(f,h){var p=c.call(this,f,h);return p!==!1&&d.delete(f),p}})),d.size&&d.forEach(function(f){return n.maybeBroadcastWatch.dirty(f)})):this.broadcastWatches(r),l},t.prototype.performTransaction=function(r,n){return this.batch({update:r,optimistic:n||n!==null})},t.prototype.transformDocument=function(r){if(this.addTypename){var n=this.typenameDocumentCache.get(r);return n||(n=Nh(r),this.typenameDocumentCache.set(r,n),this.typenameDocumentCache.set(n,n)),n}return r},t.prototype.transformForLink=function(r){var n=this.config.fragments;return n?n.transform(r):r},t.prototype.broadcastWatches=function(r){var n=this;this.txCount||this.watches.forEach(function(i){return n.maybeBroadcastWatch(i,r)})},t.prototype.broadcastWatch=function(r,n){var i=r.lastDiff,o=this.diff(r);n&&(r.optimistic&&typeof n.optimistic=="string"&&(o.fromOptimisticTransaction=!0),n.onWatchUpdated&&n.onWatchUpdated.call(this,r,o,i)===!1)||(!i||!tt(i.result,o.result))&&r.callback(r.lastDiff=o,i)},t}(qx);function c9(e){return e.hasOwnProperty("graphQLErrors")}var u9=function(e){var t="";if(Yt(e.graphQLErrors)||Yt(e.clientErrors)){var r=(e.graphQLErrors||[]).concat(e.clientErrors||[]);r.forEach(function(n){var i=n?n.message:"Error message not found.";t+="".concat(i,`
65
+ `))}}}}var l9=function(e){lr(t,e);function t(r){r===void 0&&(r={});var n=e.call(this)||this;return n.watches=new Set,n.typenameDocumentCache=new Map,n.makeVar=r9,n.txCount=0,n.config=Hx(r),n.addTypename=!!n.config.addTypename,n.policies=new o9({cache:n,dataIdFromObject:n.config.dataIdFromObject,possibleTypes:n.config.possibleTypes,typePolicies:n.config.typePolicies}),n.init(),n}return t.prototype.init=function(){var r=this.data=new Oo.Root({policies:this.policies,resultCaching:this.config.resultCaching});this.optimisticData=r.stump,this.resetResultCache()},t.prototype.resetResultCache=function(r){var n=this,i=this.storeReader,o=this.config.fragments;this.storeWriter=new a9(this,this.storeReader=new Zx({cache:this,addTypename:this.addTypename,resultCacheMaxSize:this.config.resultCacheMaxSize,canonizeResults:A1(this.config),canon:r?void 0:i&&i.canon,fragments:o}),o),this.maybeBroadcastWatch=Rs(function(a,s){return n.broadcastWatch(a,s)},{max:this.config.resultCacheMaxSize,makeCacheKey:function(a){var s=a.optimistic?n.optimisticData:n.data;if(mo(s)){var c=a.optimistic,l=a.id,u=a.variables;return s.makeCacheKey(a.query,a.callback,Nn({optimistic:c,id:l,variables:u}))}}}),new Set([this.data.group,this.optimisticData.group]).forEach(function(a){return a.resetCaching()})},t.prototype.restore=function(r){return this.init(),r&&this.data.replace(r),this},t.prototype.extract=function(r){return r===void 0&&(r=!1),(r?this.optimisticData:this.data).extract()},t.prototype.read=function(r){var n=r.returnPartialData,i=n===void 0?!1:n;try{return this.storeReader.diffQueryAgainstStore(O(O({},r),{store:r.optimistic?this.optimisticData:this.data,config:this.config,returnPartialData:i})).result||null}catch(o){if(o instanceof T1)return null;throw o}},t.prototype.write=function(r){try{return++this.txCount,this.storeWriter.writeToStore(this.data,r)}finally{!--this.txCount&&r.broadcast!==!1&&this.broadcastWatches()}},t.prototype.modify=function(r){if(lt.call(r,"id")&&!r.id)return!1;var n=r.optimistic?this.optimisticData:this.data;try{return++this.txCount,n.modify(r.id||"ROOT_QUERY",r.fields)}finally{!--this.txCount&&r.broadcast!==!1&&this.broadcastWatches()}},t.prototype.diff=function(r){return this.storeReader.diffQueryAgainstStore(O(O({},r),{store:r.optimistic?this.optimisticData:this.data,rootId:r.id||"ROOT_QUERY",config:this.config}))},t.prototype.watch=function(r){var n=this;return this.watches.size||t9(this),this.watches.add(r),r.immediate&&this.maybeBroadcastWatch(r),function(){n.watches.delete(r)&&!n.watches.size&&vm(n),n.maybeBroadcastWatch.forget(r)}},t.prototype.gc=function(r){Nn.reset();var n=this.optimisticData.gc();return r&&!this.txCount&&(r.resetResultCache?this.resetResultCache(r.resetResultIdentities):r.resetResultIdentities&&this.storeReader.resetCanon()),n},t.prototype.retain=function(r,n){return(n?this.optimisticData:this.data).retain(r)},t.prototype.release=function(r,n){return(n?this.optimisticData:this.data).release(r)},t.prototype.identify=function(r){if(ke(r))return r.__ref;try{return this.policies.identify(r)[0]}catch(n){__DEV__&&B.warn(n)}},t.prototype.evict=function(r){if(!r.id){if(lt.call(r,"id"))return!1;r=O(O({},r),{id:"ROOT_QUERY"})}try{return++this.txCount,this.optimisticData.evict(r,this.data)}finally{!--this.txCount&&r.broadcast!==!1&&this.broadcastWatches()}},t.prototype.reset=function(r){var n=this;return this.init(),Nn.reset(),r&&r.discardWatches?(this.watches.forEach(function(i){return n.maybeBroadcastWatch.forget(i)}),this.watches.clear(),vm(this)):this.broadcastWatches(),Promise.resolve()},t.prototype.removeOptimistic=function(r){var n=this.optimisticData.removeLayer(r);n!==this.optimisticData&&(this.optimisticData=n,this.broadcastWatches())},t.prototype.batch=function(r){var n=this,i=r.update,o=r.optimistic,a=o===void 0?!0:o,s=r.removeOptimistic,c=r.onWatchUpdated,l,u=function(f){var h=n,p=h.data,m=h.optimisticData;++n.txCount,f&&(n.data=n.optimisticData=f);try{return l=i(n)}finally{--n.txCount,n.data=p,n.optimisticData=m}},d=new Set;return c&&!this.txCount&&this.broadcastWatches(O(O({},r),{onWatchUpdated:function(f){return d.add(f),!1}})),typeof a=="string"?this.optimisticData=this.optimisticData.addLayer(a,u):a===!1?u(this.data):u(),typeof s=="string"&&(this.optimisticData=this.optimisticData.removeLayer(s)),c&&d.size?(this.broadcastWatches(O(O({},r),{onWatchUpdated:function(f,h){var p=c.call(this,f,h);return p!==!1&&d.delete(f),p}})),d.size&&d.forEach(function(f){return n.maybeBroadcastWatch.dirty(f)})):this.broadcastWatches(r),l},t.prototype.performTransaction=function(r,n){return this.batch({update:r,optimistic:n||n!==null})},t.prototype.transformDocument=function(r){if(this.addTypename){var n=this.typenameDocumentCache.get(r);return n||(n=Ih(r),this.typenameDocumentCache.set(r,n),this.typenameDocumentCache.set(n,n)),n}return r},t.prototype.transformForLink=function(r){var n=this.config.fragments;return n?n.transform(r):r},t.prototype.broadcastWatches=function(r){var n=this;this.txCount||this.watches.forEach(function(i){return n.maybeBroadcastWatch(i,r)})},t.prototype.broadcastWatch=function(r,n){var i=r.lastDiff,o=this.diff(r);n&&(r.optimistic&&typeof n.optimistic=="string"&&(o.fromOptimisticTransaction=!0),n.onWatchUpdated&&n.onWatchUpdated.call(this,r,o,i)===!1)||(!i||!tt(i.result,o.result))&&r.callback(r.lastDiff=o,i)},t}(qx);function c9(e){return e.hasOwnProperty("graphQLErrors")}var u9=function(e){var t="";if(Yt(e.graphQLErrors)||Yt(e.clientErrors)){var r=(e.graphQLErrors||[]).concat(e.clientErrors||[]);r.forEach(function(n){var i=n?n.message:"Error message not found.";t+="".concat(i,`
66
66
  `)})}return e.networkError&&(t+="".concat(e.networkError.message,`
67
- `)),t=t.replace(/\n$/,""),t},Qn=function(e){lr(t,e);function t(r){var n=r.graphQLErrors,i=r.clientErrors,o=r.networkError,a=r.errorMessage,s=r.extraInfo,c=e.call(this,a)||this;return c.name="ApolloError",c.graphQLErrors=n||[],c.clientErrors=i||[],c.networkError=o||null,c.message=a||u9(c),c.extraInfo=s,c.__proto__=t.prototype,c}return t}(Error),Oe;(function(e){e[e.loading=1]="loading",e[e.setVariables=2]="setVariables",e[e.fetchMore=3]="fetchMore",e[e.refetch=4]="refetch",e[e.poll=6]="poll",e[e.ready=7]="ready",e[e.error=8]="error"})(Oe||(Oe={}));function Co(e){return e?e<7:!1}var d9=Object.assign,f9=Object.hasOwnProperty,yd=function(e){lr(t,e);function t(r){var n=r.queryManager,i=r.queryInfo,o=r.options,a=e.call(this,function(v){try{var y=v._subscription._observer;y&&!y.error&&(y.error=h9)}catch{}var b=!a.observers.size;a.observers.add(v);var g=a.last;return g&&g.error?v.error&&v.error(g.error):g&&g.result&&v.next&&v.next(g.result),b&&a.reobserve().catch(function(){}),function(){a.observers.delete(v)&&!a.observers.size&&a.tearDownQuery()}})||this;a.observers=new Set,a.subscriptions=new Set,a.queryInfo=i,a.queryManager=n,a.isTornDown=!1;var s=n.defaultOptions.watchQuery,c=s===void 0?{}:s,l=c.fetchPolicy,u=l===void 0?"cache-first":l,d=o.fetchPolicy,f=d===void 0?u:d,h=o.initialFetchPolicy,p=h===void 0?f==="standby"?u:f:h;a.options=O(O({},o),{initialFetchPolicy:p,fetchPolicy:f}),a.queryId=i.queryId||n.generateQueryId();var m=Vo(a.query);return a.queryName=m&&m.name&&m.name.value,a}return Object.defineProperty(t.prototype,"query",{get:function(){return this.queryManager.transform(this.options.query).document},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"variables",{get:function(){return this.options.variables},enumerable:!1,configurable:!0}),t.prototype.result=function(){var r=this;return new Promise(function(n,i){var o={next:function(s){n(s),r.observers.delete(o),r.observers.size||r.queryManager.removeQuery(r.queryId),setTimeout(function(){a.unsubscribe()},0)},error:i},a=r.subscribe(o)})},t.prototype.getCurrentResult=function(r){r===void 0&&(r=!0);var n=this.getLastResult(!0),i=this.queryInfo.networkStatus||n&&n.networkStatus||Oe.ready,o=O(O({},n),{loading:Co(i),networkStatus:i}),a=this.options.fetchPolicy,s=a===void 0?"cache-first":a;if(!(s==="network-only"||s==="no-cache"||s==="standby"||this.queryManager.transform(this.options.query).hasForcedResolvers)){var c=this.queryInfo.getDiff();(c.complete||this.options.returnPartialData)&&(o.data=c.result),tt(o.data,{})&&(o.data=void 0),c.complete?(delete o.partial,c.complete&&o.networkStatus===Oe.loading&&(s==="cache-first"||s==="cache-only")&&(o.networkStatus=Oe.ready,o.loading=!1)):o.partial=!0,__DEV__&&!c.complete&&!this.options.partialRefetch&&!o.loading&&!o.data&&!o.error&&B1(c.missing)}return r&&this.updateLastResult(o),o},t.prototype.isDifferentFromLastResult=function(r,n){return!this.last||!tt(this.last.result,r)||n&&!tt(this.last.variables,n)},t.prototype.getLast=function(r,n){var i=this.last;if(i&&i[r]&&(!n||tt(i.variables,this.variables)))return i[r]},t.prototype.getLastResult=function(r){return this.getLast("result",r)},t.prototype.getLastError=function(r){return this.getLast("error",r)},t.prototype.resetLastResults=function(){delete this.last,this.isTornDown=!1},t.prototype.resetQueryStoreErrors=function(){this.queryManager.resetErrors(this.queryId)},t.prototype.refetch=function(r){var n,i={pollInterval:0},o=this.options.fetchPolicy;if(o==="cache-and-network"?i.fetchPolicy=o:o==="no-cache"?i.fetchPolicy="no-cache":i.fetchPolicy="network-only",__DEV__&&r&&f9.call(r,"variables")){var a=o1(this.query),s=a.variableDefinitions;(!s||!s.some(function(c){return c.variable.name.value==="variables"}))&&__DEV__&&B.warn("Called refetch(".concat(JSON.stringify(r),") for query ").concat(((n=a.name)===null||n===void 0?void 0:n.value)||JSON.stringify(a),`, which does not declare a $variables variable.
68
- Did you mean to call refetch(variables) instead of refetch({ variables })?`))}return r&&!tt(this.options.variables,r)&&(i.variables=this.options.variables=O(O({},this.options.variables),r)),this.queryInfo.resetLastWrite(),this.reobserve(i,Oe.refetch)},t.prototype.fetchMore=function(r){var n=this,i=O(O({},r.query?r:O(O(O(O({},this.options),{query:this.query}),r),{variables:O(O({},this.options.variables),r.variables)})),{fetchPolicy:"no-cache"}),o=this.queryManager.generateQueryId(),a=this.queryInfo,s=a.networkStatus;a.networkStatus=Oe.fetchMore,i.notifyOnNetworkStatusChange&&this.observe();var c=new Set;return this.queryManager.fetchQuery(o,i,Oe.fetchMore).then(function(l){return n.queryManager.removeQuery(o),a.networkStatus===Oe.fetchMore&&(a.networkStatus=s),n.queryManager.cache.batch({update:function(u){var d=r.updateQuery;d?u.updateQuery({query:n.query,variables:n.variables,returnPartialData:!0,optimistic:!1},function(f){return d(f,{fetchMoreResult:l.data,variables:i.variables})}):u.writeQuery({query:i.query,variables:i.variables,data:l.data})},onWatchUpdated:function(u){c.add(u.query)}}),l}).finally(function(){c.has(n.query)||V1(n)})},t.prototype.subscribeToMore=function(r){var n=this,i=this.queryManager.startGraphQLSubscription({query:r.document,variables:r.variables,context:r.context}).subscribe({next:function(o){var a=r.updateQuery;a&&n.updateQuery(function(s,c){var l=c.variables;return a(s,{subscriptionData:o,variables:l})})},error:function(o){if(r.onError){r.onError(o);return}__DEV__&&B.error("Unhandled GraphQL subscription error",o)}});return this.subscriptions.add(i),function(){n.subscriptions.delete(i)&&i.unsubscribe()}},t.prototype.setOptions=function(r){return this.reobserve(r)},t.prototype.setVariables=function(r){return tt(this.variables,r)?this.observers.size?this.result():Promise.resolve():(this.options.variables=r,this.observers.size?this.reobserve({fetchPolicy:this.options.initialFetchPolicy,variables:r},Oe.setVariables):Promise.resolve())},t.prototype.updateQuery=function(r){var n=this.queryManager,i=n.cache.diff({query:this.options.query,variables:this.variables,returnPartialData:!0,optimistic:!1}).result,o=r(i,{variables:this.variables});o&&(n.cache.writeQuery({query:this.options.query,data:o,variables:this.variables}),n.broadcastQueries())},t.prototype.startPolling=function(r){this.options.pollInterval=r,this.updatePolling()},t.prototype.stopPolling=function(){this.options.pollInterval=0,this.updatePolling()},t.prototype.applyNextFetchPolicy=function(r,n){if(n.nextFetchPolicy){var i=n.fetchPolicy,o=i===void 0?"cache-first":i,a=n.initialFetchPolicy,s=a===void 0?o:a;o==="standby"||(typeof n.nextFetchPolicy=="function"?n.fetchPolicy=n.nextFetchPolicy(o,{reason:r,options:n,observable:this,initialFetchPolicy:s}):r==="variables-changed"?n.fetchPolicy=s:n.fetchPolicy=n.nextFetchPolicy)}return n.fetchPolicy},t.prototype.fetch=function(r,n){return this.queryManager.setObservableQuery(this),this.queryManager.fetchQueryObservable(this.queryId,r,n)},t.prototype.updatePolling=function(){var r=this;if(!this.queryManager.ssrMode){var n=this,i=n.pollingInfo,o=n.options.pollInterval;if(!o){i&&(clearTimeout(i.timeout),delete this.pollingInfo);return}if(!(i&&i.interval===o)){__DEV__?B(o,"Attempted to start a polling query without a polling interval."):B(o,13);var a=i||(this.pollingInfo={});a.interval=o;var s=function(){r.pollingInfo&&(Co(r.queryInfo.networkStatus)?c():r.reobserve({fetchPolicy:r.options.initialFetchPolicy==="no-cache"?"no-cache":"network-only"},Oe.poll).then(c,c))},c=function(){var l=r.pollingInfo;l&&(clearTimeout(l.timeout),l.timeout=setTimeout(s,l.interval))};c()}}},t.prototype.updateLastResult=function(r,n){return n===void 0&&(n=this.variables),this.last=O(O({},this.last),{result:this.queryManager.assumeImmutableResults?r:f1(r),variables:n}),Yt(r.errors)||delete this.last.error,this.last},t.prototype.reobserve=function(r,n){var i=this;this.isTornDown=!1;var o=n===Oe.refetch||n===Oe.fetchMore||n===Oe.poll,a=this.options.variables,s=this.options.fetchPolicy,c=Kl(this.options,r||{}),l=o?c:d9(this.options,c);o||(this.updatePolling(),r&&r.variables&&!tt(r.variables,a)&&l.fetchPolicy!=="standby"&&l.fetchPolicy===s&&(this.applyNextFetchPolicy("variables-changed",l),n===void 0&&(n=Oe.setVariables)));var u=l.variables&&O({},l.variables),d=this.fetch(l,n),f={next:function(h){i.reportResult(h,u)},error:function(h){i.reportError(h,u)}};return o||(this.concast&&this.observer&&this.concast.removeObserver(this.observer),this.concast=d,this.observer=f),d.addObserver(f),d.promise},t.prototype.observe=function(){this.reportResult(this.getCurrentResult(!1),this.variables)},t.prototype.reportResult=function(r,n){var i=this.getLastError();(i||this.isDifferentFromLastResult(r,n))&&((i||!r.partial||this.options.returnPartialData)&&this.updateLastResult(r,n),po(this.observers,"next",r))},t.prototype.reportError=function(r,n){var i=O(O({},this.getLastResult()),{error:r,errors:r.graphQLErrors,networkStatus:Oe.error,loading:!1});this.updateLastResult(i,n),po(this.observers,"error",this.last.error=r)},t.prototype.hasObservers=function(){return this.observers.size>0},t.prototype.tearDownQuery=function(){this.isTornDown||(this.concast&&this.observer&&(this.concast.removeObserver(this.observer),delete this.concast,delete this.observer),this.stopPolling(),this.subscriptions.forEach(function(r){return r.unsubscribe()}),this.subscriptions.clear(),this.queryManager.stopQuery(this.queryId),this.observers.clear(),this.isTornDown=!0)},t}(Pe);p1(yd);function V1(e){var t=e.options,r=t.fetchPolicy,n=t.nextFetchPolicy;return r==="cache-and-network"||r==="network-only"?e.reobserve({fetchPolicy:"cache-first",nextFetchPolicy:function(){return this.nextFetchPolicy=n,typeof n=="function"?n.apply(this,arguments):r}}):e.reobserve()}function h9(e){__DEV__&&B.error("Unhandled error",e.message,e.stack)}function B1(e){__DEV__&&e&&__DEV__&&B.debug("Missing cache result fields: ".concat(JSON.stringify(e)),e)}var W1=function(){function e(t){var r=t.cache,n=t.client,i=t.resolvers,o=t.fragmentMatcher;this.selectionsToResolveCache=new WeakMap,this.cache=r,n&&(this.client=n),i&&this.addResolvers(i),o&&this.setFragmentMatcher(o)}return e.prototype.addResolvers=function(t){var r=this;this.resolvers=this.resolvers||{},Array.isArray(t)?t.forEach(function(n){r.resolvers=q0(r.resolvers,n)}):this.resolvers=q0(this.resolvers,t)},e.prototype.setResolvers=function(t){this.resolvers={},this.addResolvers(t)},e.prototype.getResolvers=function(){return this.resolvers||{}},e.prototype.runResolvers=function(t){var r=t.document,n=t.remoteResult,i=t.context,o=t.variables,a=t.onlyRunForcedResolvers,s=a===void 0?!1:a;return oe(this,void 0,void 0,function(){return Kr(this,function(c){return r?[2,this.resolveDocument(r,n.data,i,o,this.fragmentMatcher,s).then(function(l){return O(O({},n),{data:l.result})})]:[2,n]})})},e.prototype.setFragmentMatcher=function(t){this.fragmentMatcher=t},e.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},e.prototype.clientQuery=function(t){return xh(["client"],t)&&this.resolvers?t:null},e.prototype.serverQuery=function(t){return O5(t)},e.prototype.prepareContext=function(t){var r=this.cache;return O(O({},t),{cache:r,getCacheKey:function(n){return r.identify(n)}})},e.prototype.addExportedVariables=function(t,r,n){return r===void 0&&(r={}),n===void 0&&(n={}),oe(this,void 0,void 0,function(){return Kr(this,function(i){return t?[2,this.resolveDocument(t,this.buildRootValueFromCache(t,r)||{},this.prepareContext(n),r).then(function(o){return O(O({},r),o.exportedVariables)})]:[2,O({},r)]})})},e.prototype.shouldForceResolvers=function(t){var r=!1;return ar(t,{Directive:{enter:function(n){if(n.name.value==="client"&&n.arguments&&(r=n.arguments.some(function(i){return i.name.value==="always"&&i.value.kind==="BooleanValue"&&i.value.value===!0}),r))return _h}}}),r},e.prototype.buildRootValueFromCache=function(t,r){return this.cache.diff({query:E5(t),variables:r,returnPartialData:!0,optimistic:!1}).result},e.prototype.resolveDocument=function(t,r,n,i,o,a){return n===void 0&&(n={}),i===void 0&&(i={}),o===void 0&&(o=function(){return!0}),a===void 0&&(a=!1),oe(this,void 0,void 0,function(){var s,c,l,u,d,f,h,p,m,v,y;return Kr(this,function(b){return s=Ch(t),c=Oh(t),l=Sh(c),u=this.collectSelectionsToResolve(s,l),d=s.operation,f=d?d.charAt(0).toUpperCase()+d.slice(1):"Query",h=this,p=h.cache,m=h.client,v={fragmentMap:l,context:O(O({},n),{cache:p,client:m}),variables:i,fragmentMatcher:o,defaultOperationType:f,exportedVariables:{},selectionsToResolve:u,onlyRunForcedResolvers:a},y=!1,[2,this.resolveSelectionSet(s.selectionSet,y,r,v).then(function(g){return{result:g,exportedVariables:v.exportedVariables}})]})})},e.prototype.resolveSelectionSet=function(t,r,n,i){return oe(this,void 0,void 0,function(){var o,a,s,c,l,u=this;return Kr(this,function(d){return o=i.fragmentMap,a=i.context,s=i.variables,c=[n],l=function(f){return oe(u,void 0,void 0,function(){var h,p;return Kr(this,function(m){return!r&&!i.selectionsToResolve.has(f)?[2]:ql(f,s)?Mr(f)?[2,this.resolveField(f,r,n,i).then(function(v){var y;typeof v<"u"&&c.push((y={},y[Ln(f)]=v,y))})]:(i1(f)?h=f:(h=o[f.name.value],__DEV__?B(h,"No fragment named ".concat(f.name.value)):B(h,11)),h&&h.typeCondition&&(p=h.typeCondition.name.value,i.fragmentMatcher(n,p,a))?[2,this.resolveSelectionSet(h.selectionSet,r,n,i).then(function(v){c.push(v)})]:[2]):[2]})})},[2,Promise.all(t.selections.map(l)).then(function(){return Ih(c)})]})})},e.prototype.resolveField=function(t,r,n,i){return oe(this,void 0,void 0,function(){var o,a,s,c,l,u,d,f,h,p=this;return Kr(this,function(m){return o=i.variables,a=t.name.value,s=Ln(t),c=a!==s,l=n[s]||n[a],u=Promise.resolve(l),(!i.onlyRunForcedResolvers||this.shouldForceResolvers(t))&&(d=n.__typename||i.defaultOperationType,f=this.resolvers&&this.resolvers[d],f&&(h=f[c?a:s],h&&(u=Promise.resolve(zh.withValue(this.cache,h,[n,Hl(t,o),i.context,{field:t,fragmentMap:i.fragmentMap}]))))),[2,u.then(function(v){var y,b;if(v===void 0&&(v=l),t.directives&&t.directives.forEach(function(_){_.name.value==="export"&&_.arguments&&_.arguments.forEach(function(S){S.name.value==="as"&&S.value.kind==="StringValue"&&(i.exportedVariables[S.value.value]=v)})}),!t.selectionSet||v==null)return v;var g=(b=(y=t.directives)===null||y===void 0?void 0:y.some(function(_){return _.name.value==="client"}))!==null&&b!==void 0?b:!1;if(Array.isArray(v))return p.resolveSubSelectedArray(t,r||g,v,i);if(t.selectionSet)return p.resolveSelectionSet(t.selectionSet,r||g,v,i)})]})})},e.prototype.resolveSubSelectedArray=function(t,r,n,i){var o=this;return Promise.all(n.map(function(a){if(a===null)return null;if(Array.isArray(a))return o.resolveSubSelectedArray(t,r,a,i);if(t.selectionSet)return o.resolveSelectionSet(t.selectionSet,r,a,i)}))},e.prototype.collectSelectionsToResolve=function(t,r){var n=function(a){return!Array.isArray(a)},i=this.selectionsToResolveCache;function o(a){if(!i.has(a)){var s=new Set;i.set(a,s),ar(a,{Directive:function(c,l,u,d,f){c.name.value==="client"&&f.forEach(function(h){n(h)&&U0(h)&&s.add(h)})},FragmentSpread:function(c,l,u,d,f){var h=r[c.name.value];__DEV__?B(h,"No fragment named ".concat(c.name.value)):B(h,12);var p=o(h);p.size>0&&(f.forEach(function(m){n(m)&&U0(m)&&s.add(m)}),s.add(c),p.forEach(function(m){s.add(m)}))}})}return i.get(a)}return o(t)},e}(),si=new(Vn?WeakMap:Map);function Vc(e,t){var r=e[t];typeof r=="function"&&(e[t]=function(){return si.set(e,(si.get(e)+1)%1e15),r.apply(this,arguments)})}function Om(e){e.notifyTimeout&&(clearTimeout(e.notifyTimeout),e.notifyTimeout=void 0)}var Bc=function(){function e(t,r){r===void 0&&(r=t.generateQueryId()),this.queryId=r,this.listeners=new Set,this.document=null,this.lastRequestId=1,this.subscriptions=new Set,this.stopped=!1,this.dirty=!1,this.observableQuery=null;var n=this.cache=t.cache;si.has(n)||(si.set(n,0),Vc(n,"evict"),Vc(n,"modify"),Vc(n,"reset"))}return e.prototype.init=function(t){var r=t.networkStatus||Oe.loading;return this.variables&&this.networkStatus!==Oe.loading&&!tt(this.variables,t.variables)&&(r=Oe.setVariables),tt(t.variables,this.variables)||(this.lastDiff=void 0),Object.assign(this,{document:t.document,variables:t.variables,networkError:null,graphQLErrors:this.graphQLErrors||[],networkStatus:r}),t.observableQuery&&this.setObservableQuery(t.observableQuery),t.lastRequestId&&(this.lastRequestId=t.lastRequestId),this},e.prototype.reset=function(){Om(this),this.dirty=!1},e.prototype.getDiff=function(t){t===void 0&&(t=this.variables);var r=this.getDiffOptions(t);if(this.lastDiff&&tt(r,this.lastDiff.options))return this.lastDiff.diff;this.updateWatch(this.variables=t);var n=this.observableQuery;if(n&&n.options.fetchPolicy==="no-cache")return{complete:!1};var i=this.cache.diff(r);return this.updateLastDiff(i,r),i},e.prototype.updateLastDiff=function(t,r){this.lastDiff=t?{diff:t,options:r||this.getDiffOptions()}:void 0},e.prototype.getDiffOptions=function(t){var r;return t===void 0&&(t=this.variables),{query:this.document,variables:t,returnPartialData:!0,optimistic:!0,canonizeResults:(r=this.observableQuery)===null||r===void 0?void 0:r.options.canonizeResults}},e.prototype.setDiff=function(t){var r=this,n=this.lastDiff&&this.lastDiff.diff;this.updateLastDiff(t),!this.dirty&&!tt(n&&n.result,t&&t.result)&&(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout(function(){return r.notify()},0)))},e.prototype.setObservableQuery=function(t){var r=this;t!==this.observableQuery&&(this.oqListener&&this.listeners.delete(this.oqListener),this.observableQuery=t,t?(t.queryInfo=this,this.listeners.add(this.oqListener=function(){var n=r.getDiff();n.fromOptimisticTransaction?t.observe():V1(t)})):delete this.oqListener)},e.prototype.notify=function(){var t=this;Om(this),this.shouldNotify()&&this.listeners.forEach(function(r){return r(t)}),this.dirty=!1},e.prototype.shouldNotify=function(){if(!this.dirty||!this.listeners.size)return!1;if(Co(this.networkStatus)&&this.observableQuery){var t=this.observableQuery.options.fetchPolicy;if(t!=="cache-only"&&t!=="cache-and-network")return!1}return!0},e.prototype.stop=function(){if(!this.stopped){this.stopped=!0,this.reset(),this.cancel(),this.cancel=e.prototype.cancel,this.subscriptions.forEach(function(r){return r.unsubscribe()});var t=this.observableQuery;t&&t.stopPolling()}},e.prototype.cancel=function(){},e.prototype.updateWatch=function(t){var r=this;t===void 0&&(t=this.variables);var n=this.observableQuery;if(!(n&&n.options.fetchPolicy==="no-cache")){var i=O(O({},this.getDiffOptions(t)),{watcher:this,callback:function(o){return r.setDiff(o)}});(!this.lastWatch||!tt(i,this.lastWatch))&&(this.cancel(),this.cancel=this.cache.watch(this.lastWatch=i))}},e.prototype.resetLastWrite=function(){this.lastWrite=void 0},e.prototype.shouldWrite=function(t,r){var n=this.lastWrite;return!(n&&n.dmCount===si.get(this.cache)&&tt(r,n.variables)&&tt(t.data,n.result.data))},e.prototype.markResult=function(t,r,n,i){var o=this,a=new cn,s=Yt(t.errors)?t.errors.slice(0):[];if(this.reset(),"incremental"in t&&Yt(t.incremental)){var c=m1(this.getDiff().result,t);t.data=c}else if("hasNext"in t&&t.hasNext){var l=this.getDiff();t.data=a.merge(l.result,t.data)}this.graphQLErrors=s,n.fetchPolicy==="no-cache"?this.updateLastDiff({result:t.data,complete:!0},this.getDiffOptions(n.variables)):i!==0&&(gd(t,n.errorPolicy)?this.cache.performTransaction(function(u){if(o.shouldWrite(t,n.variables))u.writeQuery({query:r,data:t.data,variables:n.variables,overwrite:i===1}),o.lastWrite={result:t,variables:n.variables,dmCount:si.get(o.cache)};else if(o.lastDiff&&o.lastDiff.diff.complete){t.data=o.lastDiff.diff.result;return}var d=o.getDiffOptions(n.variables),f=u.diff(d);o.stopped||o.updateWatch(n.variables),o.updateLastDiff(f,d),f.complete&&(t.data=f.result)}):this.lastWrite=void 0)},e.prototype.markReady=function(){return this.networkError=null,this.networkStatus=Oe.ready},e.prototype.markError=function(t){return this.networkStatus=Oe.error,this.lastWrite=void 0,this.reset(),t.graphQLErrors&&(this.graphQLErrors=t.graphQLErrors),t.networkError&&(this.networkError=t.networkError),t},e}();function gd(e,t){t===void 0&&(t="none");var r=t==="ignore"||t==="all",n=!Ca(e);return!n&&r&&e.data&&(n=!0),n}var p9=Object.prototype.hasOwnProperty,m9=function(){function e(t){var r=t.cache,n=t.link,i=t.defaultOptions,o=t.queryDeduplication,a=o===void 0?!1:o,s=t.onBroadcast,c=t.ssrMode,l=c===void 0?!1:c,u=t.clientAwareness,d=u===void 0?{}:u,f=t.localState,h=t.assumeImmutableResults;this.clientAwareness={},this.queries=new Map,this.fetchCancelFns=new Map,this.transformCache=new(Vn?WeakMap:Map),this.queryIdCounter=1,this.requestIdCounter=1,this.mutationIdCounter=1,this.inFlightLinkObservables=new Map,this.cache=r,this.link=n,this.defaultOptions=i||Object.create(null),this.queryDeduplication=a,this.clientAwareness=d,this.localState=f||new W1({cache:r}),this.ssrMode=l,this.assumeImmutableResults=!!h,(this.onBroadcast=s)&&(this.mutationStore=Object.create(null))}return e.prototype.stop=function(){var t=this;this.queries.forEach(function(r,n){t.stopQueryNoBroadcast(n)}),this.cancelPendingFetches(__DEV__?new be("QueryManager stopped while query was in flight"):new be(14))},e.prototype.cancelPendingFetches=function(t){this.fetchCancelFns.forEach(function(r){return r(t)}),this.fetchCancelFns.clear()},e.prototype.mutate=function(t){var r,n,i=t.mutation,o=t.variables,a=t.optimisticResponse,s=t.updateQueries,c=t.refetchQueries,l=c===void 0?[]:c,u=t.awaitRefetchQueries,d=u===void 0?!1:u,f=t.update,h=t.onQueryUpdated,p=t.fetchPolicy,m=p===void 0?((r=this.defaultOptions.mutate)===null||r===void 0?void 0:r.fetchPolicy)||"network-only":p,v=t.errorPolicy,y=v===void 0?((n=this.defaultOptions.mutate)===null||n===void 0?void 0:n.errorPolicy)||"none":v,b=t.keepRootFields,g=t.context;return oe(this,void 0,void 0,function(){var _,S,E,x,N,M;return Kr(this,function(j){switch(j.label){case 0:return __DEV__?B(i,"mutation option is required. You must specify your GraphQL document in the mutation option."):B(i,15),__DEV__?B(m==="network-only"||m==="no-cache","Mutations support only 'network-only' or 'no-cache' fetchPolicy strings. The default `network-only` behavior automatically writes mutation results to the cache. Passing `no-cache` skips the cache write."):B(m==="network-only"||m==="no-cache",16),_=this.generateMutationId(),S=this.transform(i),E=S.document,x=S.hasClientExports,i=this.cache.transformForLink(E),o=this.getVariables(i,o),x?[4,this.localState.addExportedVariables(i,o,g)]:[3,2];case 1:o=j.sent(),j.label=2;case 2:return N=this.mutationStore&&(this.mutationStore[_]={mutation:i,variables:o,loading:!0,error:null}),a&&this.markMutationOptimistic(a,{mutationId:_,document:i,variables:o,fetchPolicy:m,errorPolicy:y,context:g,updateQueries:s,update:f,keepRootFields:b}),this.broadcastQueries(),M=this,[2,new Promise(function(q,A){return Dc(M.getObservableFromLink(i,O(O({},g),{optimisticResponse:a}),o,!1),function(T){if(Ca(T)&&y==="none")throw new Qn({graphQLErrors:id(T)});N&&(N.loading=!1,N.error=null);var F=O({},T);return typeof l=="function"&&(l=l(F)),y==="ignore"&&Ca(F)&&delete F.errors,M.markMutationResult({mutationId:_,result:F,document:i,variables:o,fetchPolicy:m,errorPolicy:y,context:g,update:f,updateQueries:s,awaitRefetchQueries:d,refetchQueries:l,removeOptimistic:a?_:void 0,onQueryUpdated:h,keepRootFields:b})}).subscribe({next:function(T){M.broadcastQueries(),(!("hasNext"in T)||T.hasNext===!1)&&q(T)},error:function(T){N&&(N.loading=!1,N.error=T),a&&M.cache.removeOptimistic(_),M.broadcastQueries(),A(T instanceof Qn?T:new Qn({networkError:T}))}})})]}})})},e.prototype.markMutationResult=function(t,r){var n=this;r===void 0&&(r=this.cache);var i=t.result,o=[],a=t.fetchPolicy==="no-cache";if(!a&&gd(i,t.errorPolicy)){if(di(i)||o.push({result:i.data,dataId:"ROOT_MUTATION",query:t.document,variables:t.variables}),di(i)&&Yt(i.incremental)){var s=r.diff({id:"ROOT_MUTATION",query:this.transform(t.document).asQuery,variables:t.variables,optimistic:!1,returnPartialData:!0}),c=void 0;s.result&&(c=m1(s.result,i)),typeof c<"u"&&(i.data=c,o.push({result:c,dataId:"ROOT_MUTATION",query:t.document,variables:t.variables}))}var l=t.updateQueries;l&&this.queries.forEach(function(d,f){var h=d.observableQuery,p=h&&h.queryName;if(!(!p||!p9.call(l,p))){var m=l[p],v=n.queries.get(f),y=v.document,b=v.variables,g=r.diff({query:y,variables:b,returnPartialData:!0,optimistic:!1}),_=g.result,S=g.complete;if(S&&_){var E=m(_,{mutationResult:i,queryName:y&&Ju(y)||void 0,queryVariables:b});E&&o.push({result:E,dataId:"ROOT_QUERY",query:y,variables:b})}}})}if(o.length>0||t.refetchQueries||t.update||t.onQueryUpdated||t.removeOptimistic){var u=[];if(this.refetchQueries({updateCache:function(d){a||o.forEach(function(m){return d.write(m)});var f=t.update,h=!B5(i)||di(i)&&!i.hasNext;if(f){if(!a){var p=d.diff({id:"ROOT_MUTATION",query:n.transform(t.document).asQuery,variables:t.variables,optimistic:!1,returnPartialData:!0});p.complete&&(i=O(O({},i),{data:p.result}),"incremental"in i&&delete i.incremental,"hasNext"in i&&delete i.hasNext)}h&&f(d,i,{context:t.context,variables:t.variables})}!a&&!t.keepRootFields&&h&&d.modify({id:"ROOT_MUTATION",fields:function(m,v){var y=v.fieldName,b=v.DELETE;return y==="__typename"?m:b}})},include:t.refetchQueries,optimistic:!1,removeOptimistic:t.removeOptimistic,onQueryUpdated:t.onQueryUpdated||null}).forEach(function(d){return u.push(d)}),t.awaitRefetchQueries||t.onQueryUpdated)return Promise.all(u).then(function(){return i})}return Promise.resolve(i)},e.prototype.markMutationOptimistic=function(t,r){var n=this,i=typeof t=="function"?t(r.variables):t;return this.cache.recordOptimisticTransaction(function(o){try{n.markMutationResult(O(O({},r),{result:{data:i}}),o)}catch(a){__DEV__&&B.error(a)}},r.mutationId)},e.prototype.fetchQuery=function(t,r,n){return this.fetchQueryObservable(t,r,n).promise},e.prototype.getQueryStore=function(){var t=Object.create(null);return this.queries.forEach(function(r,n){t[n]={variables:r.variables,networkStatus:r.networkStatus,networkError:r.networkError,graphQLErrors:r.graphQLErrors}}),t},e.prototype.resetErrors=function(t){var r=this.queries.get(t);r&&(r.networkError=void 0,r.graphQLErrors=[])},e.prototype.transform=function(t){var r=this.transformCache;if(!r.has(t)){var n=this.cache.transformDocument(t),i=_5(n),o=this.localState.clientQuery(n),a=i&&this.localState.serverQuery(i),s={document:n,hasClientExports:n5(n),hasForcedResolvers:this.localState.shouldForceResolvers(n),clientQuery:o,serverQuery:a,defaultVars:Ph(Vo(n)),asQuery:O(O({},n),{definitions:n.definitions.map(function(l){return l.kind==="OperationDefinition"&&l.operation!=="query"?O(O({},l),{operation:"query"}):l})})},c=function(l){l&&!r.has(l)&&r.set(l,s)};c(t),c(n),c(o),c(a)}return r.get(t)},e.prototype.getVariables=function(t,r){return O(O({},this.transform(t).defaultVars),r)},e.prototype.watchQuery=function(t){t=O(O({},t),{variables:this.getVariables(t.query,t.variables)}),typeof t.notifyOnNetworkStatusChange>"u"&&(t.notifyOnNetworkStatusChange=!1);var r=new Bc(this),n=new yd({queryManager:this,queryInfo:r,options:t});return this.queries.set(n.queryId,r),r.init({document:n.query,observableQuery:n,variables:n.variables}),n},e.prototype.query=function(t,r){var n=this;return r===void 0&&(r=this.generateQueryId()),__DEV__?B(t.query,"query option is required. You must specify your GraphQL document in the query option."):B(t.query,17),__DEV__?B(t.query.kind==="Document",'You must wrap the query string in a "gql" tag.'):B(t.query.kind==="Document",18),__DEV__?B(!t.returnPartialData,"returnPartialData option only supported on watchQuery."):B(!t.returnPartialData,19),__DEV__?B(!t.pollInterval,"pollInterval option only supported on watchQuery."):B(!t.pollInterval,20),this.fetchQuery(r,t).finally(function(){return n.stopQuery(r)})},e.prototype.generateQueryId=function(){return String(this.queryIdCounter++)},e.prototype.generateRequestId=function(){return this.requestIdCounter++},e.prototype.generateMutationId=function(){return String(this.mutationIdCounter++)},e.prototype.stopQueryInStore=function(t){this.stopQueryInStoreNoBroadcast(t),this.broadcastQueries()},e.prototype.stopQueryInStoreNoBroadcast=function(t){var r=this.queries.get(t);r&&r.stop()},e.prototype.clearStore=function(t){return t===void 0&&(t={discardWatches:!0}),this.cancelPendingFetches(__DEV__?new be("Store reset while query was in flight (not completed in link chain)"):new be(21)),this.queries.forEach(function(r){r.observableQuery?r.networkStatus=Oe.loading:r.stop()}),this.mutationStore&&(this.mutationStore=Object.create(null)),this.cache.reset(t)},e.prototype.getObservableQueries=function(t){var r=this;t===void 0&&(t="active");var n=new Map,i=new Map,o=new Set;return Array.isArray(t)&&t.forEach(function(a){typeof a=="string"?i.set(a,!1):s5(a)?i.set(r.transform(a).document,!1):We(a)&&a.query&&o.add(a)}),this.queries.forEach(function(a,s){var c=a.observableQuery,l=a.document;if(c){if(t==="all"){n.set(s,c);return}var u=c.queryName,d=c.options.fetchPolicy;if(d==="standby"||t==="active"&&!c.hasObservers())return;(t==="active"||u&&i.has(u)||l&&i.has(l))&&(n.set(s,c),u&&i.set(u,!0),l&&i.set(l,!0))}}),o.size&&o.forEach(function(a){var s=od("legacyOneTimeQuery"),c=r.getQuery(s).init({document:a.query,variables:a.variables}),l=new yd({queryManager:r,queryInfo:c,options:O(O({},a),{fetchPolicy:"network-only"})});B(l.queryId===s),c.setObservableQuery(l),n.set(s,l)}),__DEV__&&i.size&&i.forEach(function(a,s){a||__DEV__&&B.warn("Unknown query ".concat(typeof s=="string"?"named ":"").concat(JSON.stringify(s,null,2)," requested in refetchQueries options.include array"))}),n},e.prototype.reFetchObservableQueries=function(t){var r=this;t===void 0&&(t=!1);var n=[];return this.getObservableQueries(t?"all":"active").forEach(function(i,o){var a=i.options.fetchPolicy;i.resetLastResults(),(t||a!=="standby"&&a!=="cache-only")&&n.push(i.refetch()),r.getQuery(o).setDiff(null)}),this.broadcastQueries(),Promise.all(n)},e.prototype.setObservableQuery=function(t){this.getQuery(t.queryId).setObservableQuery(t)},e.prototype.startGraphQLSubscription=function(t){var r=this,n=t.query,i=t.fetchPolicy,o=t.errorPolicy,a=t.variables,s=t.context,c=s===void 0?{}:s;n=this.transform(n).document,a=this.getVariables(n,a);var l=function(d){return r.getObservableFromLink(n,c,d).map(function(f){if(i!=="no-cache"&&(gd(f,o)&&r.cache.write({query:n,result:f.data,dataId:"ROOT_SUBSCRIPTION",variables:d}),r.broadcastQueries()),Ca(f))throw new Qn({graphQLErrors:f.errors});return f})};if(this.transform(n).hasClientExports){var u=this.localState.addExportedVariables(n,a,c).then(l);return new Pe(function(d){var f=null;return u.then(function(h){return f=h.subscribe(d)},d.error),function(){return f&&f.unsubscribe()}})}return l(a)},e.prototype.stopQuery=function(t){this.stopQueryNoBroadcast(t),this.broadcastQueries()},e.prototype.stopQueryNoBroadcast=function(t){this.stopQueryInStoreNoBroadcast(t),this.removeQuery(t)},e.prototype.removeQuery=function(t){this.fetchCancelFns.delete(t),this.queries.has(t)&&(this.getQuery(t).stop(),this.queries.delete(t))},e.prototype.broadcastQueries=function(){this.onBroadcast&&this.onBroadcast(),this.queries.forEach(function(t){return t.notify()})},e.prototype.getLocalState=function(){return this.localState},e.prototype.getObservableFromLink=function(t,r,n,i){var o=this,a;i===void 0&&(i=(a=r?.queryDeduplication)!==null&&a!==void 0?a:this.queryDeduplication);var s,c=this.transform(t).serverQuery;if(c){var l=this,u=l.inFlightLinkObservables,d=l.link,f={query:c,variables:n,operationName:Ju(c)||void 0,context:this.prepareContext(O(O({},r),{forceFetch:!i}))};if(r=f.context,i){var h=u.get(c)||new Map;u.set(c,h);var p=Nn(n);if(s=h.get(p),!s){var m=new uo([sd(d,f)]);h.set(p,s=m),m.beforeNext(function(){h.delete(p)&&h.size<1&&u.delete(c)})}}else s=new uo([sd(d,f)])}else s=new uo([Pe.of({data:{}})]),r=this.prepareContext(r);var v=this.transform(t).clientQuery;return v&&(s=Dc(s,function(y){return o.localState.runResolvers({document:v,remoteResult:y,context:r,variables:n})})),s},e.prototype.getResultsFromLink=function(t,r,n){var i=t.lastRequestId=this.generateRequestId(),o=this.cache.transformForLink(this.transform(t.document).document);return Dc(this.getObservableFromLink(o,n.context,n.variables),function(a){var s=id(a),c=s.length>0;if(i>=t.lastRequestId){if(c&&n.errorPolicy==="none")throw t.markError(new Qn({graphQLErrors:s}));t.markResult(a,o,n,r),t.markReady()}var l={data:a.data,loading:!1,networkStatus:Oe.ready};return c&&n.errorPolicy!=="ignore"&&(l.errors=s,l.networkStatus=Oe.error),l},function(a){var s=c9(a)?a:new Qn({networkError:a});throw i>=t.lastRequestId&&t.markError(s),s})},e.prototype.fetchQueryObservable=function(t,r,n){var i=this;n===void 0&&(n=Oe.loading);var o=this.transform(r.query).document,a=this.getVariables(o,r.variables),s=this.getQuery(t),c=this.defaultOptions.watchQuery,l=r.fetchPolicy,u=l===void 0?c&&c.fetchPolicy||"cache-first":l,d=r.errorPolicy,f=d===void 0?c&&c.errorPolicy||"none":d,h=r.returnPartialData,p=h===void 0?!1:h,m=r.notifyOnNetworkStatusChange,v=m===void 0?!1:m,y=r.context,b=y===void 0?{}:y,g=Object.assign({},r,{query:o,variables:a,fetchPolicy:u,errorPolicy:f,returnPartialData:p,notifyOnNetworkStatusChange:v,context:b}),_=function(x){g.variables=x;var N=i.fetchQueryByPolicy(s,g,n);return g.fetchPolicy!=="standby"&&N.length>0&&s.observableQuery&&s.observableQuery.applyNextFetchPolicy("after-fetch",r),N},S=function(){return i.fetchCancelFns.delete(t)};this.fetchCancelFns.set(t,function(x){S(),setTimeout(function(){return E.cancel(x)})});var E=new uo(this.transform(g.query).hasClientExports?this.localState.addExportedVariables(g.query,g.variables,g.context).then(_):_(g.variables));return E.promise.then(S,S),E},e.prototype.refetchQueries=function(t){var r=this,n=t.updateCache,i=t.include,o=t.optimistic,a=o===void 0?!1:o,s=t.removeOptimistic,c=s===void 0?a?od("refetchQueries"):void 0:s,l=t.onQueryUpdated,u=new Map;i&&this.getObservableQueries(i).forEach(function(f,h){u.set(h,{oq:f,lastDiff:r.getQuery(h).getDiff()})});var d=new Map;return n&&this.cache.batch({update:n,optimistic:a&&c||!1,removeOptimistic:c,onWatchUpdated:function(f,h,p){var m=f.watcher instanceof Bc&&f.watcher.observableQuery;if(m){if(l){u.delete(m.queryId);var v=l(m,h,p);return v===!0&&(v=m.refetch()),v!==!1&&d.set(m,v),v}l!==null&&u.set(m.queryId,{oq:m,lastDiff:p,diff:h})}}}),u.size&&u.forEach(function(f,h){var p=f.oq,m=f.lastDiff,v=f.diff,y;if(l){if(!v){var b=p.queryInfo;b.reset(),v=b.getDiff()}y=l(p,v,m)}(!l||y===!0)&&(y=p.refetch()),y!==!1&&d.set(p,y),h.indexOf("legacyOneTimeQuery")>=0&&r.stopQueryNoBroadcast(h)}),c&&this.cache.removeOptimistic(c),d},e.prototype.fetchQueryByPolicy=function(t,r,n){var i=this,o=r.query,a=r.variables,s=r.fetchPolicy,c=r.refetchWritePolicy,l=r.errorPolicy,u=r.returnPartialData,d=r.context,f=r.notifyOnNetworkStatusChange,h=t.networkStatus;t.init({document:this.transform(o).document,variables:a,networkStatus:n});var p=function(){return t.getDiff(a)},m=function(_,S){S===void 0&&(S=t.networkStatus||Oe.loading);var E=_.result;__DEV__&&!u&&!tt(E,{})&&B1(_.missing);var x=function(N){return Pe.of(O({data:N,loading:Co(S),networkStatus:S},_.complete?null:{partial:!0}))};return E&&i.transform(o).hasForcedResolvers?i.localState.runResolvers({document:o,remoteResult:{data:E},context:d,variables:a,onlyRunForcedResolvers:!0}).then(function(N){return x(N.data||void 0)}):l==="none"&&S===Oe.refetch&&Array.isArray(_.missing)?x(void 0):x(E)},v=s==="no-cache"?0:n===Oe.refetch&&c!=="merge"?1:2,y=function(){return i.getResultsFromLink(t,v,{variables:a,context:d,fetchPolicy:s,errorPolicy:l})},b=f&&typeof h=="number"&&h!==n&&Co(n);switch(s){default:case"cache-first":{var g=p();return g.complete?[m(g,t.markReady())]:u||b?[m(g),y()]:[y()]}case"cache-and-network":{var g=p();return g.complete||u||b?[m(g),y()]:[y()]}case"cache-only":return[m(p(),t.markReady())];case"network-only":return b?[m(p()),y()]:[y()];case"no-cache":return b?[m(t.getDiff()),y()]:[y()];case"standby":return[]}},e.prototype.getQuery=function(t){return t&&!this.queries.has(t)&&this.queries.set(t,new Bc(this,t)),this.queries.get(t)},e.prototype.prepareContext=function(t){t===void 0&&(t={});var r=this.localState.prepareContext(t);return O(O({},r),{clientAwareness:this.clientAwareness})},e}(),Cm=!1,v9=function(){function e(t){var r=this;this.resetStoreCallbacks=[],this.clearStoreCallbacks=[];var n=t.uri,i=t.credentials,o=t.headers,a=t.cache,s=t.ssrMode,c=s===void 0?!1:s,l=t.ssrForceFetchDelay,u=l===void 0?0:l,d=t.connectToDevTools,f=d===void 0?typeof window=="object"&&!window.__APOLLO_CLIENT__&&__DEV__:d,h=t.queryDeduplication,p=h===void 0?!0:h,m=t.defaultOptions,v=t.assumeImmutableResults,y=v===void 0?!1:v,b=t.resolvers,g=t.typeDefs,_=t.fragmentMatcher,S=t.name,E=t.version,x=t.link;if(x||(x=n?new y1({uri:n,credentials:i,headers:o}):ji.empty()),!a)throw __DEV__?new be(`To initialize Apollo Client, you must specify a 'cache' property in the options object.
69
- For more information, please visit: https://go.apollo.dev/c/docs`):new be(9);if(this.link=x,this.cache=a,this.disableNetworkFetches=c||u>0,this.queryDeduplication=p,this.defaultOptions=m||Object.create(null),this.typeDefs=g,u&&setTimeout(function(){return r.disableNetworkFetches=!1},u),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this),f&&typeof window=="object"&&(window.__APOLLO_CLIENT__=this),!Cm&&f&&__DEV__&&(Cm=!0,typeof window<"u"&&window.document&&window.top===window.self&&!window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__)){var N=window.navigator,M=N&&N.userAgent,j=void 0;typeof M=="string"&&(M.indexOf("Chrome/")>-1?j="https://chrome.google.com/webstore/detail/apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm":M.indexOf("Firefox/")>-1&&(j="https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/")),j&&__DEV__&&B.log("Download the Apollo DevTools for a better development experience: "+j)}this.version=K5,this.localState=new W1({cache:a,client:this,resolvers:b,fragmentMatcher:_}),this.queryManager=new m9({cache:this.cache,link:this.link,defaultOptions:this.defaultOptions,queryDeduplication:p,ssrMode:c,clientAwareness:{name:S,version:E},localState:this.localState,assumeImmutableResults:y,onBroadcast:f?function(){r.devToolsHookCb&&r.devToolsHookCb({action:{},state:{queries:r.queryManager.getQueryStore(),mutations:r.queryManager.mutationStore||{}},dataWithOptimisticResults:r.cache.extract(!0)})}:void 0})}return e.prototype.stop=function(){this.queryManager.stop()},e.prototype.watchQuery=function(t){return this.defaultOptions.watchQuery&&(t=Rc(this.defaultOptions.watchQuery,t)),this.disableNetworkFetches&&(t.fetchPolicy==="network-only"||t.fetchPolicy==="cache-and-network")&&(t=O(O({},t),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(t)},e.prototype.query=function(t){return this.defaultOptions.query&&(t=Rc(this.defaultOptions.query,t)),__DEV__?B(t.fetchPolicy!=="cache-and-network","The cache-and-network fetchPolicy does not work with client.query, because client.query can only return a single result. Please use client.watchQuery to receive multiple results from the cache and the network, or consider using a different fetchPolicy, such as cache-first or network-only."):B(t.fetchPolicy!=="cache-and-network",10),this.disableNetworkFetches&&t.fetchPolicy==="network-only"&&(t=O(O({},t),{fetchPolicy:"cache-first"})),this.queryManager.query(t)},e.prototype.mutate=function(t){return this.defaultOptions.mutate&&(t=Rc(this.defaultOptions.mutate,t)),this.queryManager.mutate(t)},e.prototype.subscribe=function(t){return this.queryManager.startGraphQLSubscription(t)},e.prototype.readQuery=function(t,r){return r===void 0&&(r=!1),this.cache.readQuery(t,r)},e.prototype.readFragment=function(t,r){return r===void 0&&(r=!1),this.cache.readFragment(t,r)},e.prototype.writeQuery=function(t){this.cache.writeQuery(t),this.queryManager.broadcastQueries()},e.prototype.writeFragment=function(t){this.cache.writeFragment(t),this.queryManager.broadcastQueries()},e.prototype.__actionHookForDevTools=function(t){this.devToolsHookCb=t},e.prototype.__requestRaw=function(t){return sd(this.link,t)},e.prototype.resetStore=function(){var t=this;return Promise.resolve().then(function(){return t.queryManager.clearStore({discardWatches:!1})}).then(function(){return Promise.all(t.resetStoreCallbacks.map(function(r){return r()}))}).then(function(){return t.reFetchObservableQueries()})},e.prototype.clearStore=function(){var t=this;return Promise.resolve().then(function(){return t.queryManager.clearStore({discardWatches:!0})}).then(function(){return Promise.all(t.clearStoreCallbacks.map(function(r){return r()}))})},e.prototype.onResetStore=function(t){var r=this;return this.resetStoreCallbacks.push(t),function(){r.resetStoreCallbacks=r.resetStoreCallbacks.filter(function(n){return n!==t})}},e.prototype.onClearStore=function(t){var r=this;return this.clearStoreCallbacks.push(t),function(){r.clearStoreCallbacks=r.clearStoreCallbacks.filter(function(n){return n!==t})}},e.prototype.reFetchObservableQueries=function(t){return this.queryManager.reFetchObservableQueries(t)},e.prototype.refetchQueries=function(t){var r=this.queryManager.refetchQueries(t),n=[],i=[];r.forEach(function(a,s){n.push(s),i.push(a)});var o=Promise.all(i);return o.queries=n,o.results=i,o.catch(function(a){__DEV__&&B.debug("In client.refetchQueries, Promise.all promise rejected with error ".concat(a))}),o},e.prototype.getObservableQueries=function(t){return t===void 0&&(t="active"),this.queryManager.getObservableQueries(t)},e.prototype.extract=function(t){return this.cache.extract(t)},e.prototype.restore=function(t){return this.cache.restore(t)},e.prototype.addResolvers=function(t){this.localState.addResolvers(t)},e.prototype.setResolvers=function(t){this.localState.setResolvers(t)},e.prototype.getResolvers=function(){return this.localState.getResolvers()},e.prototype.setLocalStateFragmentMatcher=function(t){this.localState.setFragmentMatcher(t)},e.prototype.setLink=function(t){this.link=this.queryManager.link=t},e}(),Ta=new Map,bd=new Map,q1=!0,Ls=!1;function H1(e){return e.replace(/[\s,]+/g," ").trim()}function y9(e){return H1(e.source.body.substring(e.start,e.end))}function g9(e){var t=new Set,r=[];return e.definitions.forEach(function(n){if(n.kind==="FragmentDefinition"){var i=n.name.value,o=y9(n.loc),a=bd.get(i);a&&!a.has(o)?q1&&console.warn("Warning: fragment with name "+i+` already exists.
67
+ `)),t=t.replace(/\n$/,""),t},Qn=function(e){lr(t,e);function t(r){var n=r.graphQLErrors,i=r.clientErrors,o=r.networkError,a=r.errorMessage,s=r.extraInfo,c=e.call(this,a)||this;return c.name="ApolloError",c.graphQLErrors=n||[],c.clientErrors=i||[],c.networkError=o||null,c.message=a||u9(c),c.extraInfo=s,c.__proto__=t.prototype,c}return t}(Error),Oe;(function(e){e[e.loading=1]="loading",e[e.setVariables=2]="setVariables",e[e.fetchMore=3]="fetchMore",e[e.refetch=4]="refetch",e[e.poll=6]="poll",e[e.ready=7]="ready",e[e.error=8]="error"})(Oe||(Oe={}));function Co(e){return e?e<7:!1}var d9=Object.assign,f9=Object.hasOwnProperty,gd=function(e){lr(t,e);function t(r){var n=r.queryManager,i=r.queryInfo,o=r.options,a=e.call(this,function(v){try{var y=v._subscription._observer;y&&!y.error&&(y.error=h9)}catch{}var b=!a.observers.size;a.observers.add(v);var g=a.last;return g&&g.error?v.error&&v.error(g.error):g&&g.result&&v.next&&v.next(g.result),b&&a.reobserve().catch(function(){}),function(){a.observers.delete(v)&&!a.observers.size&&a.tearDownQuery()}})||this;a.observers=new Set,a.subscriptions=new Set,a.queryInfo=i,a.queryManager=n,a.isTornDown=!1;var s=n.defaultOptions.watchQuery,c=s===void 0?{}:s,l=c.fetchPolicy,u=l===void 0?"cache-first":l,d=o.fetchPolicy,f=d===void 0?u:d,h=o.initialFetchPolicy,p=h===void 0?f==="standby"?u:f:h;a.options=O(O({},o),{initialFetchPolicy:p,fetchPolicy:f}),a.queryId=i.queryId||n.generateQueryId();var m=Vo(a.query);return a.queryName=m&&m.name&&m.name.value,a}return Object.defineProperty(t.prototype,"query",{get:function(){return this.queryManager.transform(this.options.query).document},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"variables",{get:function(){return this.options.variables},enumerable:!1,configurable:!0}),t.prototype.result=function(){var r=this;return new Promise(function(n,i){var o={next:function(s){n(s),r.observers.delete(o),r.observers.size||r.queryManager.removeQuery(r.queryId),setTimeout(function(){a.unsubscribe()},0)},error:i},a=r.subscribe(o)})},t.prototype.getCurrentResult=function(r){r===void 0&&(r=!0);var n=this.getLastResult(!0),i=this.queryInfo.networkStatus||n&&n.networkStatus||Oe.ready,o=O(O({},n),{loading:Co(i),networkStatus:i}),a=this.options.fetchPolicy,s=a===void 0?"cache-first":a;if(!(s==="network-only"||s==="no-cache"||s==="standby"||this.queryManager.transform(this.options.query).hasForcedResolvers)){var c=this.queryInfo.getDiff();(c.complete||this.options.returnPartialData)&&(o.data=c.result),tt(o.data,{})&&(o.data=void 0),c.complete?(delete o.partial,c.complete&&o.networkStatus===Oe.loading&&(s==="cache-first"||s==="cache-only")&&(o.networkStatus=Oe.ready,o.loading=!1)):o.partial=!0,__DEV__&&!c.complete&&!this.options.partialRefetch&&!o.loading&&!o.data&&!o.error&&B1(c.missing)}return r&&this.updateLastResult(o),o},t.prototype.isDifferentFromLastResult=function(r,n){return!this.last||!tt(this.last.result,r)||n&&!tt(this.last.variables,n)},t.prototype.getLast=function(r,n){var i=this.last;if(i&&i[r]&&(!n||tt(i.variables,this.variables)))return i[r]},t.prototype.getLastResult=function(r){return this.getLast("result",r)},t.prototype.getLastError=function(r){return this.getLast("error",r)},t.prototype.resetLastResults=function(){delete this.last,this.isTornDown=!1},t.prototype.resetQueryStoreErrors=function(){this.queryManager.resetErrors(this.queryId)},t.prototype.refetch=function(r){var n,i={pollInterval:0},o=this.options.fetchPolicy;if(o==="cache-and-network"?i.fetchPolicy=o:o==="no-cache"?i.fetchPolicy="no-cache":i.fetchPolicy="network-only",__DEV__&&r&&f9.call(r,"variables")){var a=o1(this.query),s=a.variableDefinitions;(!s||!s.some(function(c){return c.variable.name.value==="variables"}))&&__DEV__&&B.warn("Called refetch(".concat(JSON.stringify(r),") for query ").concat(((n=a.name)===null||n===void 0?void 0:n.value)||JSON.stringify(a),`, which does not declare a $variables variable.
68
+ Did you mean to call refetch(variables) instead of refetch({ variables })?`))}return r&&!tt(this.options.variables,r)&&(i.variables=this.options.variables=O(O({},this.options.variables),r)),this.queryInfo.resetLastWrite(),this.reobserve(i,Oe.refetch)},t.prototype.fetchMore=function(r){var n=this,i=O(O({},r.query?r:O(O(O(O({},this.options),{query:this.query}),r),{variables:O(O({},this.options.variables),r.variables)})),{fetchPolicy:"no-cache"}),o=this.queryManager.generateQueryId(),a=this.queryInfo,s=a.networkStatus;a.networkStatus=Oe.fetchMore,i.notifyOnNetworkStatusChange&&this.observe();var c=new Set;return this.queryManager.fetchQuery(o,i,Oe.fetchMore).then(function(l){return n.queryManager.removeQuery(o),a.networkStatus===Oe.fetchMore&&(a.networkStatus=s),n.queryManager.cache.batch({update:function(u){var d=r.updateQuery;d?u.updateQuery({query:n.query,variables:n.variables,returnPartialData:!0,optimistic:!1},function(f){return d(f,{fetchMoreResult:l.data,variables:i.variables})}):u.writeQuery({query:i.query,variables:i.variables,data:l.data})},onWatchUpdated:function(u){c.add(u.query)}}),l}).finally(function(){c.has(n.query)||V1(n)})},t.prototype.subscribeToMore=function(r){var n=this,i=this.queryManager.startGraphQLSubscription({query:r.document,variables:r.variables,context:r.context}).subscribe({next:function(o){var a=r.updateQuery;a&&n.updateQuery(function(s,c){var l=c.variables;return a(s,{subscriptionData:o,variables:l})})},error:function(o){if(r.onError){r.onError(o);return}__DEV__&&B.error("Unhandled GraphQL subscription error",o)}});return this.subscriptions.add(i),function(){n.subscriptions.delete(i)&&i.unsubscribe()}},t.prototype.setOptions=function(r){return this.reobserve(r)},t.prototype.setVariables=function(r){return tt(this.variables,r)?this.observers.size?this.result():Promise.resolve():(this.options.variables=r,this.observers.size?this.reobserve({fetchPolicy:this.options.initialFetchPolicy,variables:r},Oe.setVariables):Promise.resolve())},t.prototype.updateQuery=function(r){var n=this.queryManager,i=n.cache.diff({query:this.options.query,variables:this.variables,returnPartialData:!0,optimistic:!1}).result,o=r(i,{variables:this.variables});o&&(n.cache.writeQuery({query:this.options.query,data:o,variables:this.variables}),n.broadcastQueries())},t.prototype.startPolling=function(r){this.options.pollInterval=r,this.updatePolling()},t.prototype.stopPolling=function(){this.options.pollInterval=0,this.updatePolling()},t.prototype.applyNextFetchPolicy=function(r,n){if(n.nextFetchPolicy){var i=n.fetchPolicy,o=i===void 0?"cache-first":i,a=n.initialFetchPolicy,s=a===void 0?o:a;o==="standby"||(typeof n.nextFetchPolicy=="function"?n.fetchPolicy=n.nextFetchPolicy(o,{reason:r,options:n,observable:this,initialFetchPolicy:s}):r==="variables-changed"?n.fetchPolicy=s:n.fetchPolicy=n.nextFetchPolicy)}return n.fetchPolicy},t.prototype.fetch=function(r,n){return this.queryManager.setObservableQuery(this),this.queryManager.fetchQueryObservable(this.queryId,r,n)},t.prototype.updatePolling=function(){var r=this;if(!this.queryManager.ssrMode){var n=this,i=n.pollingInfo,o=n.options.pollInterval;if(!o){i&&(clearTimeout(i.timeout),delete this.pollingInfo);return}if(!(i&&i.interval===o)){__DEV__?B(o,"Attempted to start a polling query without a polling interval."):B(o,13);var a=i||(this.pollingInfo={});a.interval=o;var s=function(){r.pollingInfo&&(Co(r.queryInfo.networkStatus)?c():r.reobserve({fetchPolicy:r.options.initialFetchPolicy==="no-cache"?"no-cache":"network-only"},Oe.poll).then(c,c))},c=function(){var l=r.pollingInfo;l&&(clearTimeout(l.timeout),l.timeout=setTimeout(s,l.interval))};c()}}},t.prototype.updateLastResult=function(r,n){return n===void 0&&(n=this.variables),this.last=O(O({},this.last),{result:this.queryManager.assumeImmutableResults?r:f1(r),variables:n}),Yt(r.errors)||delete this.last.error,this.last},t.prototype.reobserve=function(r,n){var i=this;this.isTornDown=!1;var o=n===Oe.refetch||n===Oe.fetchMore||n===Oe.poll,a=this.options.variables,s=this.options.fetchPolicy,c=Kl(this.options,r||{}),l=o?c:d9(this.options,c);o||(this.updatePolling(),r&&r.variables&&!tt(r.variables,a)&&l.fetchPolicy!=="standby"&&l.fetchPolicy===s&&(this.applyNextFetchPolicy("variables-changed",l),n===void 0&&(n=Oe.setVariables)));var u=l.variables&&O({},l.variables),d=this.fetch(l,n),f={next:function(h){i.reportResult(h,u)},error:function(h){i.reportError(h,u)}};return o||(this.concast&&this.observer&&this.concast.removeObserver(this.observer),this.concast=d,this.observer=f),d.addObserver(f),d.promise},t.prototype.observe=function(){this.reportResult(this.getCurrentResult(!1),this.variables)},t.prototype.reportResult=function(r,n){var i=this.getLastError();(i||this.isDifferentFromLastResult(r,n))&&((i||!r.partial||this.options.returnPartialData)&&this.updateLastResult(r,n),po(this.observers,"next",r))},t.prototype.reportError=function(r,n){var i=O(O({},this.getLastResult()),{error:r,errors:r.graphQLErrors,networkStatus:Oe.error,loading:!1});this.updateLastResult(i,n),po(this.observers,"error",this.last.error=r)},t.prototype.hasObservers=function(){return this.observers.size>0},t.prototype.tearDownQuery=function(){this.isTornDown||(this.concast&&this.observer&&(this.concast.removeObserver(this.observer),delete this.concast,delete this.observer),this.stopPolling(),this.subscriptions.forEach(function(r){return r.unsubscribe()}),this.subscriptions.clear(),this.queryManager.stopQuery(this.queryId),this.observers.clear(),this.isTornDown=!0)},t}(Pe);p1(gd);function V1(e){var t=e.options,r=t.fetchPolicy,n=t.nextFetchPolicy;return r==="cache-and-network"||r==="network-only"?e.reobserve({fetchPolicy:"cache-first",nextFetchPolicy:function(){return this.nextFetchPolicy=n,typeof n=="function"?n.apply(this,arguments):r}}):e.reobserve()}function h9(e){__DEV__&&B.error("Unhandled error",e.message,e.stack)}function B1(e){__DEV__&&e&&__DEV__&&B.debug("Missing cache result fields: ".concat(JSON.stringify(e)),e)}var W1=function(){function e(t){var r=t.cache,n=t.client,i=t.resolvers,o=t.fragmentMatcher;this.selectionsToResolveCache=new WeakMap,this.cache=r,n&&(this.client=n),i&&this.addResolvers(i),o&&this.setFragmentMatcher(o)}return e.prototype.addResolvers=function(t){var r=this;this.resolvers=this.resolvers||{},Array.isArray(t)?t.forEach(function(n){r.resolvers=q0(r.resolvers,n)}):this.resolvers=q0(this.resolvers,t)},e.prototype.setResolvers=function(t){this.resolvers={},this.addResolvers(t)},e.prototype.getResolvers=function(){return this.resolvers||{}},e.prototype.runResolvers=function(t){var r=t.document,n=t.remoteResult,i=t.context,o=t.variables,a=t.onlyRunForcedResolvers,s=a===void 0?!1:a;return oe(this,void 0,void 0,function(){return Kr(this,function(c){return r?[2,this.resolveDocument(r,n.data,i,o,this.fragmentMatcher,s).then(function(l){return O(O({},n),{data:l.result})})]:[2,n]})})},e.prototype.setFragmentMatcher=function(t){this.fragmentMatcher=t},e.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},e.prototype.clientQuery=function(t){return Sh(["client"],t)&&this.resolvers?t:null},e.prototype.serverQuery=function(t){return O5(t)},e.prototype.prepareContext=function(t){var r=this.cache;return O(O({},t),{cache:r,getCacheKey:function(n){return r.identify(n)}})},e.prototype.addExportedVariables=function(t,r,n){return r===void 0&&(r={}),n===void 0&&(n={}),oe(this,void 0,void 0,function(){return Kr(this,function(i){return t?[2,this.resolveDocument(t,this.buildRootValueFromCache(t,r)||{},this.prepareContext(n),r).then(function(o){return O(O({},r),o.exportedVariables)})]:[2,O({},r)]})})},e.prototype.shouldForceResolvers=function(t){var r=!1;return ar(t,{Directive:{enter:function(n){if(n.name.value==="client"&&n.arguments&&(r=n.arguments.some(function(i){return i.name.value==="always"&&i.value.kind==="BooleanValue"&&i.value.value===!0}),r))return xh}}}),r},e.prototype.buildRootValueFromCache=function(t,r){return this.cache.diff({query:E5(t),variables:r,returnPartialData:!0,optimistic:!1}).result},e.prototype.resolveDocument=function(t,r,n,i,o,a){return n===void 0&&(n={}),i===void 0&&(i={}),o===void 0&&(o=function(){return!0}),a===void 0&&(a=!1),oe(this,void 0,void 0,function(){var s,c,l,u,d,f,h,p,m,v,y;return Kr(this,function(b){return s=Ph(t),c=Ch(t),l=kh(c),u=this.collectSelectionsToResolve(s,l),d=s.operation,f=d?d.charAt(0).toUpperCase()+d.slice(1):"Query",h=this,p=h.cache,m=h.client,v={fragmentMap:l,context:O(O({},n),{cache:p,client:m}),variables:i,fragmentMatcher:o,defaultOperationType:f,exportedVariables:{},selectionsToResolve:u,onlyRunForcedResolvers:a},y=!1,[2,this.resolveSelectionSet(s.selectionSet,y,r,v).then(function(g){return{result:g,exportedVariables:v.exportedVariables}})]})})},e.prototype.resolveSelectionSet=function(t,r,n,i){return oe(this,void 0,void 0,function(){var o,a,s,c,l,u=this;return Kr(this,function(d){return o=i.fragmentMap,a=i.context,s=i.variables,c=[n],l=function(f){return oe(u,void 0,void 0,function(){var h,p;return Kr(this,function(m){return!r&&!i.selectionsToResolve.has(f)?[2]:ql(f,s)?Mr(f)?[2,this.resolveField(f,r,n,i).then(function(v){var y;typeof v<"u"&&c.push((y={},y[Ln(f)]=v,y))})]:(i1(f)?h=f:(h=o[f.name.value],__DEV__?B(h,"No fragment named ".concat(f.name.value)):B(h,11)),h&&h.typeCondition&&(p=h.typeCondition.name.value,i.fragmentMatcher(n,p,a))?[2,this.resolveSelectionSet(h.selectionSet,r,n,i).then(function(v){c.push(v)})]:[2]):[2]})})},[2,Promise.all(t.selections.map(l)).then(function(){return Ah(c)})]})})},e.prototype.resolveField=function(t,r,n,i){return oe(this,void 0,void 0,function(){var o,a,s,c,l,u,d,f,h,p=this;return Kr(this,function(m){return o=i.variables,a=t.name.value,s=Ln(t),c=a!==s,l=n[s]||n[a],u=Promise.resolve(l),(!i.onlyRunForcedResolvers||this.shouldForceResolvers(t))&&(d=n.__typename||i.defaultOperationType,f=this.resolvers&&this.resolvers[d],f&&(h=f[c?a:s],h&&(u=Promise.resolve(Uh.withValue(this.cache,h,[n,Hl(t,o),i.context,{field:t,fragmentMap:i.fragmentMap}]))))),[2,u.then(function(v){var y,b;if(v===void 0&&(v=l),t.directives&&t.directives.forEach(function(_){_.name.value==="export"&&_.arguments&&_.arguments.forEach(function(k){k.name.value==="as"&&k.value.kind==="StringValue"&&(i.exportedVariables[k.value.value]=v)})}),!t.selectionSet||v==null)return v;var g=(b=(y=t.directives)===null||y===void 0?void 0:y.some(function(_){return _.name.value==="client"}))!==null&&b!==void 0?b:!1;if(Array.isArray(v))return p.resolveSubSelectedArray(t,r||g,v,i);if(t.selectionSet)return p.resolveSelectionSet(t.selectionSet,r||g,v,i)})]})})},e.prototype.resolveSubSelectedArray=function(t,r,n,i){var o=this;return Promise.all(n.map(function(a){if(a===null)return null;if(Array.isArray(a))return o.resolveSubSelectedArray(t,r,a,i);if(t.selectionSet)return o.resolveSelectionSet(t.selectionSet,r,a,i)}))},e.prototype.collectSelectionsToResolve=function(t,r){var n=function(a){return!Array.isArray(a)},i=this.selectionsToResolveCache;function o(a){if(!i.has(a)){var s=new Set;i.set(a,s),ar(a,{Directive:function(c,l,u,d,f){c.name.value==="client"&&f.forEach(function(h){n(h)&&U0(h)&&s.add(h)})},FragmentSpread:function(c,l,u,d,f){var h=r[c.name.value];__DEV__?B(h,"No fragment named ".concat(c.name.value)):B(h,12);var p=o(h);p.size>0&&(f.forEach(function(m){n(m)&&U0(m)&&s.add(m)}),s.add(c),p.forEach(function(m){s.add(m)}))}})}return i.get(a)}return o(t)},e}(),si=new(Vn?WeakMap:Map);function Bc(e,t){var r=e[t];typeof r=="function"&&(e[t]=function(){return si.set(e,(si.get(e)+1)%1e15),r.apply(this,arguments)})}function Om(e){e.notifyTimeout&&(clearTimeout(e.notifyTimeout),e.notifyTimeout=void 0)}var Wc=function(){function e(t,r){r===void 0&&(r=t.generateQueryId()),this.queryId=r,this.listeners=new Set,this.document=null,this.lastRequestId=1,this.subscriptions=new Set,this.stopped=!1,this.dirty=!1,this.observableQuery=null;var n=this.cache=t.cache;si.has(n)||(si.set(n,0),Bc(n,"evict"),Bc(n,"modify"),Bc(n,"reset"))}return e.prototype.init=function(t){var r=t.networkStatus||Oe.loading;return this.variables&&this.networkStatus!==Oe.loading&&!tt(this.variables,t.variables)&&(r=Oe.setVariables),tt(t.variables,this.variables)||(this.lastDiff=void 0),Object.assign(this,{document:t.document,variables:t.variables,networkError:null,graphQLErrors:this.graphQLErrors||[],networkStatus:r}),t.observableQuery&&this.setObservableQuery(t.observableQuery),t.lastRequestId&&(this.lastRequestId=t.lastRequestId),this},e.prototype.reset=function(){Om(this),this.dirty=!1},e.prototype.getDiff=function(t){t===void 0&&(t=this.variables);var r=this.getDiffOptions(t);if(this.lastDiff&&tt(r,this.lastDiff.options))return this.lastDiff.diff;this.updateWatch(this.variables=t);var n=this.observableQuery;if(n&&n.options.fetchPolicy==="no-cache")return{complete:!1};var i=this.cache.diff(r);return this.updateLastDiff(i,r),i},e.prototype.updateLastDiff=function(t,r){this.lastDiff=t?{diff:t,options:r||this.getDiffOptions()}:void 0},e.prototype.getDiffOptions=function(t){var r;return t===void 0&&(t=this.variables),{query:this.document,variables:t,returnPartialData:!0,optimistic:!0,canonizeResults:(r=this.observableQuery)===null||r===void 0?void 0:r.options.canonizeResults}},e.prototype.setDiff=function(t){var r=this,n=this.lastDiff&&this.lastDiff.diff;this.updateLastDiff(t),!this.dirty&&!tt(n&&n.result,t&&t.result)&&(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout(function(){return r.notify()},0)))},e.prototype.setObservableQuery=function(t){var r=this;t!==this.observableQuery&&(this.oqListener&&this.listeners.delete(this.oqListener),this.observableQuery=t,t?(t.queryInfo=this,this.listeners.add(this.oqListener=function(){var n=r.getDiff();n.fromOptimisticTransaction?t.observe():V1(t)})):delete this.oqListener)},e.prototype.notify=function(){var t=this;Om(this),this.shouldNotify()&&this.listeners.forEach(function(r){return r(t)}),this.dirty=!1},e.prototype.shouldNotify=function(){if(!this.dirty||!this.listeners.size)return!1;if(Co(this.networkStatus)&&this.observableQuery){var t=this.observableQuery.options.fetchPolicy;if(t!=="cache-only"&&t!=="cache-and-network")return!1}return!0},e.prototype.stop=function(){if(!this.stopped){this.stopped=!0,this.reset(),this.cancel(),this.cancel=e.prototype.cancel,this.subscriptions.forEach(function(r){return r.unsubscribe()});var t=this.observableQuery;t&&t.stopPolling()}},e.prototype.cancel=function(){},e.prototype.updateWatch=function(t){var r=this;t===void 0&&(t=this.variables);var n=this.observableQuery;if(!(n&&n.options.fetchPolicy==="no-cache")){var i=O(O({},this.getDiffOptions(t)),{watcher:this,callback:function(o){return r.setDiff(o)}});(!this.lastWatch||!tt(i,this.lastWatch))&&(this.cancel(),this.cancel=this.cache.watch(this.lastWatch=i))}},e.prototype.resetLastWrite=function(){this.lastWrite=void 0},e.prototype.shouldWrite=function(t,r){var n=this.lastWrite;return!(n&&n.dmCount===si.get(this.cache)&&tt(r,n.variables)&&tt(t.data,n.result.data))},e.prototype.markResult=function(t,r,n,i){var o=this,a=new cn,s=Yt(t.errors)?t.errors.slice(0):[];if(this.reset(),"incremental"in t&&Yt(t.incremental)){var c=m1(this.getDiff().result,t);t.data=c}else if("hasNext"in t&&t.hasNext){var l=this.getDiff();t.data=a.merge(l.result,t.data)}this.graphQLErrors=s,n.fetchPolicy==="no-cache"?this.updateLastDiff({result:t.data,complete:!0},this.getDiffOptions(n.variables)):i!==0&&(bd(t,n.errorPolicy)?this.cache.performTransaction(function(u){if(o.shouldWrite(t,n.variables))u.writeQuery({query:r,data:t.data,variables:n.variables,overwrite:i===1}),o.lastWrite={result:t,variables:n.variables,dmCount:si.get(o.cache)};else if(o.lastDiff&&o.lastDiff.diff.complete){t.data=o.lastDiff.diff.result;return}var d=o.getDiffOptions(n.variables),f=u.diff(d);o.stopped||o.updateWatch(n.variables),o.updateLastDiff(f,d),f.complete&&(t.data=f.result)}):this.lastWrite=void 0)},e.prototype.markReady=function(){return this.networkError=null,this.networkStatus=Oe.ready},e.prototype.markError=function(t){return this.networkStatus=Oe.error,this.lastWrite=void 0,this.reset(),t.graphQLErrors&&(this.graphQLErrors=t.graphQLErrors),t.networkError&&(this.networkError=t.networkError),t},e}();function bd(e,t){t===void 0&&(t="none");var r=t==="ignore"||t==="all",n=!Ca(e);return!n&&r&&e.data&&(n=!0),n}var p9=Object.prototype.hasOwnProperty,m9=function(){function e(t){var r=t.cache,n=t.link,i=t.defaultOptions,o=t.queryDeduplication,a=o===void 0?!1:o,s=t.onBroadcast,c=t.ssrMode,l=c===void 0?!1:c,u=t.clientAwareness,d=u===void 0?{}:u,f=t.localState,h=t.assumeImmutableResults;this.clientAwareness={},this.queries=new Map,this.fetchCancelFns=new Map,this.transformCache=new(Vn?WeakMap:Map),this.queryIdCounter=1,this.requestIdCounter=1,this.mutationIdCounter=1,this.inFlightLinkObservables=new Map,this.cache=r,this.link=n,this.defaultOptions=i||Object.create(null),this.queryDeduplication=a,this.clientAwareness=d,this.localState=f||new W1({cache:r}),this.ssrMode=l,this.assumeImmutableResults=!!h,(this.onBroadcast=s)&&(this.mutationStore=Object.create(null))}return e.prototype.stop=function(){var t=this;this.queries.forEach(function(r,n){t.stopQueryNoBroadcast(n)}),this.cancelPendingFetches(__DEV__?new be("QueryManager stopped while query was in flight"):new be(14))},e.prototype.cancelPendingFetches=function(t){this.fetchCancelFns.forEach(function(r){return r(t)}),this.fetchCancelFns.clear()},e.prototype.mutate=function(t){var r,n,i=t.mutation,o=t.variables,a=t.optimisticResponse,s=t.updateQueries,c=t.refetchQueries,l=c===void 0?[]:c,u=t.awaitRefetchQueries,d=u===void 0?!1:u,f=t.update,h=t.onQueryUpdated,p=t.fetchPolicy,m=p===void 0?((r=this.defaultOptions.mutate)===null||r===void 0?void 0:r.fetchPolicy)||"network-only":p,v=t.errorPolicy,y=v===void 0?((n=this.defaultOptions.mutate)===null||n===void 0?void 0:n.errorPolicy)||"none":v,b=t.keepRootFields,g=t.context;return oe(this,void 0,void 0,function(){var _,k,E,x,T,j;return Kr(this,function(z){switch(z.label){case 0:return __DEV__?B(i,"mutation option is required. You must specify your GraphQL document in the mutation option."):B(i,15),__DEV__?B(m==="network-only"||m==="no-cache","Mutations support only 'network-only' or 'no-cache' fetchPolicy strings. The default `network-only` behavior automatically writes mutation results to the cache. Passing `no-cache` skips the cache write."):B(m==="network-only"||m==="no-cache",16),_=this.generateMutationId(),k=this.transform(i),E=k.document,x=k.hasClientExports,i=this.cache.transformForLink(E),o=this.getVariables(i,o),x?[4,this.localState.addExportedVariables(i,o,g)]:[3,2];case 1:o=z.sent(),z.label=2;case 2:return T=this.mutationStore&&(this.mutationStore[_]={mutation:i,variables:o,loading:!0,error:null}),a&&this.markMutationOptimistic(a,{mutationId:_,document:i,variables:o,fetchPolicy:m,errorPolicy:y,context:g,updateQueries:s,update:f,keepRootFields:b}),this.broadcastQueries(),j=this,[2,new Promise(function(K,D){return Rc(j.getObservableFromLink(i,O(O({},g),{optimisticResponse:a}),o,!1),function(L){if(Ca(L)&&y==="none")throw new Qn({graphQLErrors:od(L)});T&&(T.loading=!1,T.error=null);var R=O({},L);return typeof l=="function"&&(l=l(R)),y==="ignore"&&Ca(R)&&delete R.errors,j.markMutationResult({mutationId:_,result:R,document:i,variables:o,fetchPolicy:m,errorPolicy:y,context:g,update:f,updateQueries:s,awaitRefetchQueries:d,refetchQueries:l,removeOptimistic:a?_:void 0,onQueryUpdated:h,keepRootFields:b})}).subscribe({next:function(L){j.broadcastQueries(),(!("hasNext"in L)||L.hasNext===!1)&&K(L)},error:function(L){T&&(T.loading=!1,T.error=L),a&&j.cache.removeOptimistic(_),j.broadcastQueries(),D(L instanceof Qn?L:new Qn({networkError:L}))}})})]}})})},e.prototype.markMutationResult=function(t,r){var n=this;r===void 0&&(r=this.cache);var i=t.result,o=[],a=t.fetchPolicy==="no-cache";if(!a&&bd(i,t.errorPolicy)){if(di(i)||o.push({result:i.data,dataId:"ROOT_MUTATION",query:t.document,variables:t.variables}),di(i)&&Yt(i.incremental)){var s=r.diff({id:"ROOT_MUTATION",query:this.transform(t.document).asQuery,variables:t.variables,optimistic:!1,returnPartialData:!0}),c=void 0;s.result&&(c=m1(s.result,i)),typeof c<"u"&&(i.data=c,o.push({result:c,dataId:"ROOT_MUTATION",query:t.document,variables:t.variables}))}var l=t.updateQueries;l&&this.queries.forEach(function(d,f){var h=d.observableQuery,p=h&&h.queryName;if(!(!p||!p9.call(l,p))){var m=l[p],v=n.queries.get(f),y=v.document,b=v.variables,g=r.diff({query:y,variables:b,returnPartialData:!0,optimistic:!1}),_=g.result,k=g.complete;if(k&&_){var E=m(_,{mutationResult:i,queryName:y&&ed(y)||void 0,queryVariables:b});E&&o.push({result:E,dataId:"ROOT_QUERY",query:y,variables:b})}}})}if(o.length>0||t.refetchQueries||t.update||t.onQueryUpdated||t.removeOptimistic){var u=[];if(this.refetchQueries({updateCache:function(d){a||o.forEach(function(m){return d.write(m)});var f=t.update,h=!B5(i)||di(i)&&!i.hasNext;if(f){if(!a){var p=d.diff({id:"ROOT_MUTATION",query:n.transform(t.document).asQuery,variables:t.variables,optimistic:!1,returnPartialData:!0});p.complete&&(i=O(O({},i),{data:p.result}),"incremental"in i&&delete i.incremental,"hasNext"in i&&delete i.hasNext)}h&&f(d,i,{context:t.context,variables:t.variables})}!a&&!t.keepRootFields&&h&&d.modify({id:"ROOT_MUTATION",fields:function(m,v){var y=v.fieldName,b=v.DELETE;return y==="__typename"?m:b}})},include:t.refetchQueries,optimistic:!1,removeOptimistic:t.removeOptimistic,onQueryUpdated:t.onQueryUpdated||null}).forEach(function(d){return u.push(d)}),t.awaitRefetchQueries||t.onQueryUpdated)return Promise.all(u).then(function(){return i})}return Promise.resolve(i)},e.prototype.markMutationOptimistic=function(t,r){var n=this,i=typeof t=="function"?t(r.variables):t;return this.cache.recordOptimisticTransaction(function(o){try{n.markMutationResult(O(O({},r),{result:{data:i}}),o)}catch(a){__DEV__&&B.error(a)}},r.mutationId)},e.prototype.fetchQuery=function(t,r,n){return this.fetchQueryObservable(t,r,n).promise},e.prototype.getQueryStore=function(){var t=Object.create(null);return this.queries.forEach(function(r,n){t[n]={variables:r.variables,networkStatus:r.networkStatus,networkError:r.networkError,graphQLErrors:r.graphQLErrors}}),t},e.prototype.resetErrors=function(t){var r=this.queries.get(t);r&&(r.networkError=void 0,r.graphQLErrors=[])},e.prototype.transform=function(t){var r=this.transformCache;if(!r.has(t)){var n=this.cache.transformDocument(t),i=_5(n),o=this.localState.clientQuery(n),a=i&&this.localState.serverQuery(i),s={document:n,hasClientExports:n5(n),hasForcedResolvers:this.localState.shouldForceResolvers(n),clientQuery:o,serverQuery:a,defaultVars:Th(Vo(n)),asQuery:O(O({},n),{definitions:n.definitions.map(function(l){return l.kind==="OperationDefinition"&&l.operation!=="query"?O(O({},l),{operation:"query"}):l})})},c=function(l){l&&!r.has(l)&&r.set(l,s)};c(t),c(n),c(o),c(a)}return r.get(t)},e.prototype.getVariables=function(t,r){return O(O({},this.transform(t).defaultVars),r)},e.prototype.watchQuery=function(t){t=O(O({},t),{variables:this.getVariables(t.query,t.variables)}),typeof t.notifyOnNetworkStatusChange>"u"&&(t.notifyOnNetworkStatusChange=!1);var r=new Wc(this),n=new gd({queryManager:this,queryInfo:r,options:t});return this.queries.set(n.queryId,r),r.init({document:n.query,observableQuery:n,variables:n.variables}),n},e.prototype.query=function(t,r){var n=this;return r===void 0&&(r=this.generateQueryId()),__DEV__?B(t.query,"query option is required. You must specify your GraphQL document in the query option."):B(t.query,17),__DEV__?B(t.query.kind==="Document",'You must wrap the query string in a "gql" tag.'):B(t.query.kind==="Document",18),__DEV__?B(!t.returnPartialData,"returnPartialData option only supported on watchQuery."):B(!t.returnPartialData,19),__DEV__?B(!t.pollInterval,"pollInterval option only supported on watchQuery."):B(!t.pollInterval,20),this.fetchQuery(r,t).finally(function(){return n.stopQuery(r)})},e.prototype.generateQueryId=function(){return String(this.queryIdCounter++)},e.prototype.generateRequestId=function(){return this.requestIdCounter++},e.prototype.generateMutationId=function(){return String(this.mutationIdCounter++)},e.prototype.stopQueryInStore=function(t){this.stopQueryInStoreNoBroadcast(t),this.broadcastQueries()},e.prototype.stopQueryInStoreNoBroadcast=function(t){var r=this.queries.get(t);r&&r.stop()},e.prototype.clearStore=function(t){return t===void 0&&(t={discardWatches:!0}),this.cancelPendingFetches(__DEV__?new be("Store reset while query was in flight (not completed in link chain)"):new be(21)),this.queries.forEach(function(r){r.observableQuery?r.networkStatus=Oe.loading:r.stop()}),this.mutationStore&&(this.mutationStore=Object.create(null)),this.cache.reset(t)},e.prototype.getObservableQueries=function(t){var r=this;t===void 0&&(t="active");var n=new Map,i=new Map,o=new Set;return Array.isArray(t)&&t.forEach(function(a){typeof a=="string"?i.set(a,!1):s5(a)?i.set(r.transform(a).document,!1):We(a)&&a.query&&o.add(a)}),this.queries.forEach(function(a,s){var c=a.observableQuery,l=a.document;if(c){if(t==="all"){n.set(s,c);return}var u=c.queryName,d=c.options.fetchPolicy;if(d==="standby"||t==="active"&&!c.hasObservers())return;(t==="active"||u&&i.has(u)||l&&i.has(l))&&(n.set(s,c),u&&i.set(u,!0),l&&i.set(l,!0))}}),o.size&&o.forEach(function(a){var s=ad("legacyOneTimeQuery"),c=r.getQuery(s).init({document:a.query,variables:a.variables}),l=new gd({queryManager:r,queryInfo:c,options:O(O({},a),{fetchPolicy:"network-only"})});B(l.queryId===s),c.setObservableQuery(l),n.set(s,l)}),__DEV__&&i.size&&i.forEach(function(a,s){a||__DEV__&&B.warn("Unknown query ".concat(typeof s=="string"?"named ":"").concat(JSON.stringify(s,null,2)," requested in refetchQueries options.include array"))}),n},e.prototype.reFetchObservableQueries=function(t){var r=this;t===void 0&&(t=!1);var n=[];return this.getObservableQueries(t?"all":"active").forEach(function(i,o){var a=i.options.fetchPolicy;i.resetLastResults(),(t||a!=="standby"&&a!=="cache-only")&&n.push(i.refetch()),r.getQuery(o).setDiff(null)}),this.broadcastQueries(),Promise.all(n)},e.prototype.setObservableQuery=function(t){this.getQuery(t.queryId).setObservableQuery(t)},e.prototype.startGraphQLSubscription=function(t){var r=this,n=t.query,i=t.fetchPolicy,o=t.errorPolicy,a=t.variables,s=t.context,c=s===void 0?{}:s;n=this.transform(n).document,a=this.getVariables(n,a);var l=function(d){return r.getObservableFromLink(n,c,d).map(function(f){if(i!=="no-cache"&&(bd(f,o)&&r.cache.write({query:n,result:f.data,dataId:"ROOT_SUBSCRIPTION",variables:d}),r.broadcastQueries()),Ca(f))throw new Qn({graphQLErrors:f.errors});return f})};if(this.transform(n).hasClientExports){var u=this.localState.addExportedVariables(n,a,c).then(l);return new Pe(function(d){var f=null;return u.then(function(h){return f=h.subscribe(d)},d.error),function(){return f&&f.unsubscribe()}})}return l(a)},e.prototype.stopQuery=function(t){this.stopQueryNoBroadcast(t),this.broadcastQueries()},e.prototype.stopQueryNoBroadcast=function(t){this.stopQueryInStoreNoBroadcast(t),this.removeQuery(t)},e.prototype.removeQuery=function(t){this.fetchCancelFns.delete(t),this.queries.has(t)&&(this.getQuery(t).stop(),this.queries.delete(t))},e.prototype.broadcastQueries=function(){this.onBroadcast&&this.onBroadcast(),this.queries.forEach(function(t){return t.notify()})},e.prototype.getLocalState=function(){return this.localState},e.prototype.getObservableFromLink=function(t,r,n,i){var o=this,a;i===void 0&&(i=(a=r?.queryDeduplication)!==null&&a!==void 0?a:this.queryDeduplication);var s,c=this.transform(t).serverQuery;if(c){var l=this,u=l.inFlightLinkObservables,d=l.link,f={query:c,variables:n,operationName:ed(c)||void 0,context:this.prepareContext(O(O({},r),{forceFetch:!i}))};if(r=f.context,i){var h=u.get(c)||new Map;u.set(c,h);var p=Nn(n);if(s=h.get(p),!s){var m=new uo([ld(d,f)]);h.set(p,s=m),m.beforeNext(function(){h.delete(p)&&h.size<1&&u.delete(c)})}}else s=new uo([ld(d,f)])}else s=new uo([Pe.of({data:{}})]),r=this.prepareContext(r);var v=this.transform(t).clientQuery;return v&&(s=Rc(s,function(y){return o.localState.runResolvers({document:v,remoteResult:y,context:r,variables:n})})),s},e.prototype.getResultsFromLink=function(t,r,n){var i=t.lastRequestId=this.generateRequestId(),o=this.cache.transformForLink(this.transform(t.document).document);return Rc(this.getObservableFromLink(o,n.context,n.variables),function(a){var s=od(a),c=s.length>0;if(i>=t.lastRequestId){if(c&&n.errorPolicy==="none")throw t.markError(new Qn({graphQLErrors:s}));t.markResult(a,o,n,r),t.markReady()}var l={data:a.data,loading:!1,networkStatus:Oe.ready};return c&&n.errorPolicy!=="ignore"&&(l.errors=s,l.networkStatus=Oe.error),l},function(a){var s=c9(a)?a:new Qn({networkError:a});throw i>=t.lastRequestId&&t.markError(s),s})},e.prototype.fetchQueryObservable=function(t,r,n){var i=this;n===void 0&&(n=Oe.loading);var o=this.transform(r.query).document,a=this.getVariables(o,r.variables),s=this.getQuery(t),c=this.defaultOptions.watchQuery,l=r.fetchPolicy,u=l===void 0?c&&c.fetchPolicy||"cache-first":l,d=r.errorPolicy,f=d===void 0?c&&c.errorPolicy||"none":d,h=r.returnPartialData,p=h===void 0?!1:h,m=r.notifyOnNetworkStatusChange,v=m===void 0?!1:m,y=r.context,b=y===void 0?{}:y,g=Object.assign({},r,{query:o,variables:a,fetchPolicy:u,errorPolicy:f,returnPartialData:p,notifyOnNetworkStatusChange:v,context:b}),_=function(x){g.variables=x;var T=i.fetchQueryByPolicy(s,g,n);return g.fetchPolicy!=="standby"&&T.length>0&&s.observableQuery&&s.observableQuery.applyNextFetchPolicy("after-fetch",r),T},k=function(){return i.fetchCancelFns.delete(t)};this.fetchCancelFns.set(t,function(x){k(),setTimeout(function(){return E.cancel(x)})});var E=new uo(this.transform(g.query).hasClientExports?this.localState.addExportedVariables(g.query,g.variables,g.context).then(_):_(g.variables));return E.promise.then(k,k),E},e.prototype.refetchQueries=function(t){var r=this,n=t.updateCache,i=t.include,o=t.optimistic,a=o===void 0?!1:o,s=t.removeOptimistic,c=s===void 0?a?ad("refetchQueries"):void 0:s,l=t.onQueryUpdated,u=new Map;i&&this.getObservableQueries(i).forEach(function(f,h){u.set(h,{oq:f,lastDiff:r.getQuery(h).getDiff()})});var d=new Map;return n&&this.cache.batch({update:n,optimistic:a&&c||!1,removeOptimistic:c,onWatchUpdated:function(f,h,p){var m=f.watcher instanceof Wc&&f.watcher.observableQuery;if(m){if(l){u.delete(m.queryId);var v=l(m,h,p);return v===!0&&(v=m.refetch()),v!==!1&&d.set(m,v),v}l!==null&&u.set(m.queryId,{oq:m,lastDiff:p,diff:h})}}}),u.size&&u.forEach(function(f,h){var p=f.oq,m=f.lastDiff,v=f.diff,y;if(l){if(!v){var b=p.queryInfo;b.reset(),v=b.getDiff()}y=l(p,v,m)}(!l||y===!0)&&(y=p.refetch()),y!==!1&&d.set(p,y),h.indexOf("legacyOneTimeQuery")>=0&&r.stopQueryNoBroadcast(h)}),c&&this.cache.removeOptimistic(c),d},e.prototype.fetchQueryByPolicy=function(t,r,n){var i=this,o=r.query,a=r.variables,s=r.fetchPolicy,c=r.refetchWritePolicy,l=r.errorPolicy,u=r.returnPartialData,d=r.context,f=r.notifyOnNetworkStatusChange,h=t.networkStatus;t.init({document:this.transform(o).document,variables:a,networkStatus:n});var p=function(){return t.getDiff(a)},m=function(_,k){k===void 0&&(k=t.networkStatus||Oe.loading);var E=_.result;__DEV__&&!u&&!tt(E,{})&&B1(_.missing);var x=function(T){return Pe.of(O({data:T,loading:Co(k),networkStatus:k},_.complete?null:{partial:!0}))};return E&&i.transform(o).hasForcedResolvers?i.localState.runResolvers({document:o,remoteResult:{data:E},context:d,variables:a,onlyRunForcedResolvers:!0}).then(function(T){return x(T.data||void 0)}):l==="none"&&k===Oe.refetch&&Array.isArray(_.missing)?x(void 0):x(E)},v=s==="no-cache"?0:n===Oe.refetch&&c!=="merge"?1:2,y=function(){return i.getResultsFromLink(t,v,{variables:a,context:d,fetchPolicy:s,errorPolicy:l})},b=f&&typeof h=="number"&&h!==n&&Co(n);switch(s){default:case"cache-first":{var g=p();return g.complete?[m(g,t.markReady())]:u||b?[m(g),y()]:[y()]}case"cache-and-network":{var g=p();return g.complete||u||b?[m(g),y()]:[y()]}case"cache-only":return[m(p(),t.markReady())];case"network-only":return b?[m(p()),y()]:[y()];case"no-cache":return b?[m(t.getDiff()),y()]:[y()];case"standby":return[]}},e.prototype.getQuery=function(t){return t&&!this.queries.has(t)&&this.queries.set(t,new Wc(this,t)),this.queries.get(t)},e.prototype.prepareContext=function(t){t===void 0&&(t={});var r=this.localState.prepareContext(t);return O(O({},r),{clientAwareness:this.clientAwareness})},e}(),Cm=!1,v9=function(){function e(t){var r=this;this.resetStoreCallbacks=[],this.clearStoreCallbacks=[];var n=t.uri,i=t.credentials,o=t.headers,a=t.cache,s=t.ssrMode,c=s===void 0?!1:s,l=t.ssrForceFetchDelay,u=l===void 0?0:l,d=t.connectToDevTools,f=d===void 0?typeof window=="object"&&!window.__APOLLO_CLIENT__&&__DEV__:d,h=t.queryDeduplication,p=h===void 0?!0:h,m=t.defaultOptions,v=t.assumeImmutableResults,y=v===void 0?!1:v,b=t.resolvers,g=t.typeDefs,_=t.fragmentMatcher,k=t.name,E=t.version,x=t.link;if(x||(x=n?new y1({uri:n,credentials:i,headers:o}):ji.empty()),!a)throw __DEV__?new be(`To initialize Apollo Client, you must specify a 'cache' property in the options object.
69
+ For more information, please visit: https://go.apollo.dev/c/docs`):new be(9);if(this.link=x,this.cache=a,this.disableNetworkFetches=c||u>0,this.queryDeduplication=p,this.defaultOptions=m||Object.create(null),this.typeDefs=g,u&&setTimeout(function(){return r.disableNetworkFetches=!1},u),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this),f&&typeof window=="object"&&(window.__APOLLO_CLIENT__=this),!Cm&&f&&__DEV__&&(Cm=!0,typeof window<"u"&&window.document&&window.top===window.self&&!window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__)){var T=window.navigator,j=T&&T.userAgent,z=void 0;typeof j=="string"&&(j.indexOf("Chrome/")>-1?z="https://chrome.google.com/webstore/detail/apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm":j.indexOf("Firefox/")>-1&&(z="https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/")),z&&__DEV__&&B.log("Download the Apollo DevTools for a better development experience: "+z)}this.version=K5,this.localState=new W1({cache:a,client:this,resolvers:b,fragmentMatcher:_}),this.queryManager=new m9({cache:this.cache,link:this.link,defaultOptions:this.defaultOptions,queryDeduplication:p,ssrMode:c,clientAwareness:{name:k,version:E},localState:this.localState,assumeImmutableResults:y,onBroadcast:f?function(){r.devToolsHookCb&&r.devToolsHookCb({action:{},state:{queries:r.queryManager.getQueryStore(),mutations:r.queryManager.mutationStore||{}},dataWithOptimisticResults:r.cache.extract(!0)})}:void 0})}return e.prototype.stop=function(){this.queryManager.stop()},e.prototype.watchQuery=function(t){return this.defaultOptions.watchQuery&&(t=Fc(this.defaultOptions.watchQuery,t)),this.disableNetworkFetches&&(t.fetchPolicy==="network-only"||t.fetchPolicy==="cache-and-network")&&(t=O(O({},t),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(t)},e.prototype.query=function(t){return this.defaultOptions.query&&(t=Fc(this.defaultOptions.query,t)),__DEV__?B(t.fetchPolicy!=="cache-and-network","The cache-and-network fetchPolicy does not work with client.query, because client.query can only return a single result. Please use client.watchQuery to receive multiple results from the cache and the network, or consider using a different fetchPolicy, such as cache-first or network-only."):B(t.fetchPolicy!=="cache-and-network",10),this.disableNetworkFetches&&t.fetchPolicy==="network-only"&&(t=O(O({},t),{fetchPolicy:"cache-first"})),this.queryManager.query(t)},e.prototype.mutate=function(t){return this.defaultOptions.mutate&&(t=Fc(this.defaultOptions.mutate,t)),this.queryManager.mutate(t)},e.prototype.subscribe=function(t){return this.queryManager.startGraphQLSubscription(t)},e.prototype.readQuery=function(t,r){return r===void 0&&(r=!1),this.cache.readQuery(t,r)},e.prototype.readFragment=function(t,r){return r===void 0&&(r=!1),this.cache.readFragment(t,r)},e.prototype.writeQuery=function(t){this.cache.writeQuery(t),this.queryManager.broadcastQueries()},e.prototype.writeFragment=function(t){this.cache.writeFragment(t),this.queryManager.broadcastQueries()},e.prototype.__actionHookForDevTools=function(t){this.devToolsHookCb=t},e.prototype.__requestRaw=function(t){return ld(this.link,t)},e.prototype.resetStore=function(){var t=this;return Promise.resolve().then(function(){return t.queryManager.clearStore({discardWatches:!1})}).then(function(){return Promise.all(t.resetStoreCallbacks.map(function(r){return r()}))}).then(function(){return t.reFetchObservableQueries()})},e.prototype.clearStore=function(){var t=this;return Promise.resolve().then(function(){return t.queryManager.clearStore({discardWatches:!0})}).then(function(){return Promise.all(t.clearStoreCallbacks.map(function(r){return r()}))})},e.prototype.onResetStore=function(t){var r=this;return this.resetStoreCallbacks.push(t),function(){r.resetStoreCallbacks=r.resetStoreCallbacks.filter(function(n){return n!==t})}},e.prototype.onClearStore=function(t){var r=this;return this.clearStoreCallbacks.push(t),function(){r.clearStoreCallbacks=r.clearStoreCallbacks.filter(function(n){return n!==t})}},e.prototype.reFetchObservableQueries=function(t){return this.queryManager.reFetchObservableQueries(t)},e.prototype.refetchQueries=function(t){var r=this.queryManager.refetchQueries(t),n=[],i=[];r.forEach(function(a,s){n.push(s),i.push(a)});var o=Promise.all(i);return o.queries=n,o.results=i,o.catch(function(a){__DEV__&&B.debug("In client.refetchQueries, Promise.all promise rejected with error ".concat(a))}),o},e.prototype.getObservableQueries=function(t){return t===void 0&&(t="active"),this.queryManager.getObservableQueries(t)},e.prototype.extract=function(t){return this.cache.extract(t)},e.prototype.restore=function(t){return this.cache.restore(t)},e.prototype.addResolvers=function(t){this.localState.addResolvers(t)},e.prototype.setResolvers=function(t){this.localState.setResolvers(t)},e.prototype.getResolvers=function(){return this.localState.getResolvers()},e.prototype.setLocalStateFragmentMatcher=function(t){this.localState.setFragmentMatcher(t)},e.prototype.setLink=function(t){this.link=this.queryManager.link=t},e}(),Ta=new Map,$d=new Map,q1=!0,Ls=!1;function H1(e){return e.replace(/[\s,]+/g," ").trim()}function y9(e){return H1(e.source.body.substring(e.start,e.end))}function g9(e){var t=new Set,r=[];return e.definitions.forEach(function(n){if(n.kind==="FragmentDefinition"){var i=n.name.value,o=y9(n.loc),a=$d.get(i);a&&!a.has(o)?q1&&console.warn("Warning: fragment with name "+i+` already exists.
70
70
  graphql-tag enforces all fragment names across your application to be unique; read more about
71
- this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):a||bd.set(i,a=new Set),a.add(o),t.has(o)||(t.add(o),r.push(n))}else r.push(n)}),O(O({},e),{definitions:r})}function b9(e){var t=new Set(e.definitions);t.forEach(function(n){n.loc&&delete n.loc,Object.keys(n).forEach(function(i){var o=n[i];o&&typeof o=="object"&&t.add(o)})});var r=e.loc;return r&&(delete r.startToken,delete r.endToken),e}function $9(e){var t=H1(e);if(!Ta.has(t)){var r=q4(e,{experimentalFragmentVariables:Ls,allowLegacyFragmentVariables:Ls});if(!r||r.kind!=="Document")throw new Error("Not a valid GraphQL document.");Ta.set(t,b9(g9(r)))}return Ta.get(t)}function Q(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];typeof e=="string"&&(e=[e]);var n=e[0];return t.forEach(function(i,o){i&&i.kind==="Document"?n+=i.loc.source.body:n+=i,n+=e[o+1]}),$9(n)}function w9(){Ta.clear(),bd.clear()}function _9(){q1=!1}function x9(){Ls=!0}function S9(){Ls=!1}var eo={gql:Q,resetCaches:w9,disableFragmentWarnings:_9,enableExperimentalFragmentVariables:x9,disableExperimentalFragmentVariables:S9};(function(e){e.gql=eo.gql,e.resetCaches=eo.resetCaches,e.disableFragmentWarnings=eo.disableFragmentWarnings,e.enableExperimentalFragmentVariables=eo.enableExperimentalFragmentVariables,e.disableExperimentalFragmentVariables=eo.disableExperimentalFragmentVariables})(Q||(Q={}));Q.default=Q;const Wo=Q;function k9(e){return new ji(function(t,r){var n=an(t,[]);return new Pe(function(i){var o,a=!1;return Promise.resolve(n).then(function(s){return e(s,t.getContext())}).then(t.setContext).then(function(){a||(o=r(t).subscribe({next:i.next.bind(i),error:i.error.bind(i),complete:i.complete.bind(i)}))}).catch(i.error.bind(i)),function(){a=!0,o&&o.unsubscribe()}})})}const E9=/[?&]code=[^&]+/,O9=/[?&]state=[^&]+/,C9=/[?&]error=[^&]+/;class Pm{constructor({authentication:t,organization:r,audience:n="https://api.photon.health"}){this.authentication=t,this.organization=r,this.audience=n}login({organizationId:t,invitation:r,appState:n}){return oe(this,void 0,void 0,function*(){let i={redirectMethod:"assign"};return(t||this.organization)&&(i=Object.assign(i,{organization:t||this.organization})),r&&(i=Object.assign(i,{invitation:r})),n&&(i=Object.assign(i,{appState:n})),this.authentication.loginWithRedirect(i)})}logout({returnTo:t}){return oe(this,void 0,void 0,function*(){let r={};return t&&(r=Object.assign(r,{returnTo:t})),this.authentication.logout(r)})}hasAuthParams(t=window.location.search){return(E9.test(t)||C9.test(t))&&O9.test(t)}getAccessToken({audience:t}={audience:this.audience}){return oe(this,void 0,void 0,function*(){let r={audience:t||this.audience||void 0};return this.organization&&(r=Object.assign(r,{organization:this.organization})),this.authentication.getTokenSilently(r)})}getAccessTokenWithConsent({audience:t}={audience:this.audience}){return oe(this,void 0,void 0,function*(){let r={audience:t||this.audience||void 0};return this.organization&&(r=Object.assign(r,{organization:this.organization})),this.authentication.getTokenWithPopup(r)})}checkSession(){return oe(this,void 0,void 0,function*(){return this.authentication.checkSession()})}handleRedirect(t){return oe(this,void 0,void 0,function*(){try{return this.authentication.handleRedirectCallback(t)}catch(r){throw r}})}getUser(){return oe(this,void 0,void 0,function*(){return this.authentication.getUser()})}isAuthenticated(){return oe(this,void 0,void 0,function*(){try{return yield this.authentication.checkSession(),yield this.authentication.isAuthenticated()}catch{return!1}})}}const la=Q`
71
+ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):a||$d.set(i,a=new Set),a.add(o),t.has(o)||(t.add(o),r.push(n))}else r.push(n)}),O(O({},e),{definitions:r})}function b9(e){var t=new Set(e.definitions);t.forEach(function(n){n.loc&&delete n.loc,Object.keys(n).forEach(function(i){var o=n[i];o&&typeof o=="object"&&t.add(o)})});var r=e.loc;return r&&(delete r.startToken,delete r.endToken),e}function $9(e){var t=H1(e);if(!Ta.has(t)){var r=q4(e,{experimentalFragmentVariables:Ls,allowLegacyFragmentVariables:Ls});if(!r||r.kind!=="Document")throw new Error("Not a valid GraphQL document.");Ta.set(t,b9(g9(r)))}return Ta.get(t)}function Q(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];typeof e=="string"&&(e=[e]);var n=e[0];return t.forEach(function(i,o){i&&i.kind==="Document"?n+=i.loc.source.body:n+=i,n+=e[o+1]}),$9(n)}function w9(){Ta.clear(),$d.clear()}function _9(){q1=!1}function x9(){Ls=!0}function S9(){Ls=!1}var eo={gql:Q,resetCaches:w9,disableFragmentWarnings:_9,enableExperimentalFragmentVariables:x9,disableExperimentalFragmentVariables:S9};(function(e){e.gql=eo.gql,e.resetCaches=eo.resetCaches,e.disableFragmentWarnings=eo.disableFragmentWarnings,e.enableExperimentalFragmentVariables=eo.enableExperimentalFragmentVariables,e.disableExperimentalFragmentVariables=eo.disableExperimentalFragmentVariables})(Q||(Q={}));Q.default=Q;const Wo=Q;function k9(e){return new ji(function(t,r){var n=an(t,[]);return new Pe(function(i){var o,a=!1;return Promise.resolve(n).then(function(s){return e(s,t.getContext())}).then(t.setContext).then(function(){a||(o=r(t).subscribe({next:i.next.bind(i),error:i.error.bind(i),complete:i.complete.bind(i)}))}).catch(i.error.bind(i)),function(){a=!0,o&&o.unsubscribe()}})})}const E9=/[?&]code=[^&]+/,O9=/[?&]state=[^&]+/,C9=/[?&]error=[^&]+/;class Pm{constructor({authentication:t,organization:r,audience:n="https://api.photon.health"}){this.authentication=t,this.organization=r,this.audience=n}login({organizationId:t,invitation:r,appState:n}){return oe(this,void 0,void 0,function*(){let i={redirectMethod:"assign"};return(t||this.organization)&&(i=Object.assign(i,{organization:t||this.organization})),r&&(i=Object.assign(i,{invitation:r})),n&&(i=Object.assign(i,{appState:n})),this.authentication.loginWithRedirect(i)})}logout({returnTo:t}){return oe(this,void 0,void 0,function*(){let r={};return t&&(r=Object.assign(r,{returnTo:t})),this.authentication.logout(r)})}hasAuthParams(t=window.location.search){return(E9.test(t)||C9.test(t))&&O9.test(t)}getAccessToken({audience:t}={audience:this.audience}){return oe(this,void 0,void 0,function*(){let r={audience:t||this.audience||void 0};return this.organization&&(r=Object.assign(r,{organization:this.organization})),this.authentication.getTokenSilently(r)})}getAccessTokenWithConsent({audience:t}={audience:this.audience}){return oe(this,void 0,void 0,function*(){let r={audience:t||this.audience||void 0};return this.organization&&(r=Object.assign(r,{organization:this.organization})),this.authentication.getTokenWithPopup(r)})}checkSession(){return oe(this,void 0,void 0,function*(){return this.authentication.checkSession()})}handleRedirect(t){return oe(this,void 0,void 0,function*(){try{return this.authentication.handleRedirectCallback(t)}catch(r){throw r}})}getUser(){return oe(this,void 0,void 0,function*(){return this.authentication.getUser()})}isAuthenticated(){return oe(this,void 0,void 0,function*(){try{return yield this.authentication.checkSession(),yield this.authentication.isAuthenticated()}catch{return!1}})}}const la=Q`
72
72
  fragment OrganizationFields on Organization {
73
73
  id
74
74
  name
@@ -116,7 +116,7 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):a
116
116
  schedule
117
117
  controlled
118
118
  }
119
- `,Wc=Q`
119
+ `,qc=Q`
120
120
  fragment SearchMedicationFields on SearchMedication {
121
121
  id
122
122
  name
@@ -155,14 +155,8 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):a
155
155
  }
156
156
  state
157
157
  treatment {
158
- ... on Medication {
159
- id
160
- name
161
- }
162
- ... on MedicalEquipment {
163
- id
164
- name
165
- }
158
+ id
159
+ name
166
160
  }
167
161
  dispenseAsWritten
168
162
  dispenseQuantity
@@ -220,7 +214,7 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):a
220
214
  }
221
215
  createdAt
222
216
  }
223
- `,qc=Q`
217
+ `,Hc=Q`
224
218
  fragment WebhookFields on WebhookConfig {
225
219
  id
226
220
  name
@@ -237,6 +231,8 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):a
237
231
  `,ua=Q`
238
232
  fragment PharmacyFields on Pharmacy {
239
233
  id
234
+ NPI
235
+ NCPDP
240
236
  name
241
237
  fulfillmentTypes
242
238
  address {
@@ -248,7 +244,7 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):a
248
244
  street2
249
245
  }
250
246
  }
251
- `,Hc=Q`
247
+ `,Gc=Q`
252
248
  fragment PrescriptionTemplateFields on PrescriptionTemplate {
253
249
  id
254
250
  daysSupply
@@ -558,7 +554,7 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):a
558
554
  ...${n}
559
555
  }
560
556
  }
561
- `;return Fe(this.apollo,o,{filter:r})})}}class M9{constructor(t){this.apollo=t}createPrescriptionTemplate({fragment:t}){t||(t={PrescriptionTemplateFields:Hc});let[r,n]=Object.entries(t)[0];const i=Q`
557
+ `;return Fe(this.apollo,o,{filter:r})})}}class M9{constructor(t){this.apollo=t}createPrescriptionTemplate({fragment:t}){t||(t={PrescriptionTemplateFields:Gc});let[r,n]=Object.entries(t)[0];const i=Q`
562
558
  ${n}
563
559
  mutation createPrescriptionTemplate(
564
560
  $catalogId: ID!,
@@ -585,7 +581,7 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):a
585
581
  ...${r}
586
582
  }
587
583
  }
588
- `;return Et(this.apollo,i)}updatePrescriptionTemplate({fragment:t}){t||(t={PrescriptionTemplateFields:Hc});let[r,n]=Object.entries(t)[0];const i=Q`
584
+ `;return Et(this.apollo,i)}updatePrescriptionTemplate({fragment:t}){t||(t={PrescriptionTemplateFields:Gc});let[r,n]=Object.entries(t)[0];const i=Q`
589
585
  ${n}
590
586
  mutation updatePrescriptionTemplate(
591
587
  $catalogId: ID!,
@@ -612,7 +608,7 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):a
612
608
  ...${r}
613
609
  }
614
610
  }
615
- `;return Et(this.apollo,i)}deletePrescriptionTemplate({fragment:t}){t||(t={PrescriptionTemplateFields:Hc});let[r,n]=Object.entries(t)[0];const i=Q`
611
+ `;return Et(this.apollo,i)}deletePrescriptionTemplate({fragment:t}){t||(t={PrescriptionTemplateFields:Gc});let[r,n]=Object.entries(t)[0];const i=Q`
616
612
  ${n}
617
613
  mutation deletePrescriptionTemplate(
618
614
  $catalogId: ID!,
@@ -625,21 +621,21 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):a
625
621
  ...${r}
626
622
  }
627
623
  }
628
- `;return Et(this.apollo,i)}}class j9{constructor(t){this.apollo=t}getConcepts({name:t,fragment:r}){return oe(this,void 0,void 0,function*(){r||(r={SearchMedicationFields:Wc});let[n,i]=Object.entries(r)[0];const o=Q`
624
+ `;return Et(this.apollo,i)}}class j9{constructor(t){this.apollo=t}getConcepts({name:t,fragment:r}){return oe(this,void 0,void 0,function*(){r||(r={SearchMedicationFields:qc});let[n,i]=Object.entries(r)[0];const o=Q`
629
625
  ${i}
630
626
  query medicationConcepts($name: String!) {
631
627
  medicationConcepts(name: $name) {
632
628
  ...${n}
633
629
  }
634
630
  }
635
- `;return Fe(this.apollo,o,{name:t})})}getStrengths({id:t,fragment:r}){return oe(this,void 0,void 0,function*(){r||(r={SearchMedicationFields:Wc});let[n,i]=Object.entries(r)[0];const o=Q`
631
+ `;return Fe(this.apollo,o,{name:t})})}getStrengths({id:t,fragment:r}){return oe(this,void 0,void 0,function*(){r||(r={SearchMedicationFields:qc});let[n,i]=Object.entries(r)[0];const o=Q`
636
632
  ${i}
637
633
  query medicationStrengths($id: String!) {
638
634
  medicationStrengths(id: $id) {
639
635
  ...${n}
640
636
  }
641
637
  }
642
- `;return Fe(this.apollo,o,{id:t})})}getRoutes({id:t,fragment:r}){return oe(this,void 0,void 0,function*(){r||(r={SearchMedicationFields:Wc});let[n,i]=Object.entries(r)[0];const o=Q`
638
+ `;return Fe(this.apollo,o,{id:t})})}getRoutes({id:t,fragment:r}){return oe(this,void 0,void 0,function*(){r||(r={SearchMedicationFields:qc});let[n,i]=Object.entries(r)[0];const o=Q`
643
639
  ${i}
644
640
  query medicationRoutes($id: String!) {
645
641
  medicationRoutes(id: $id) {
@@ -697,14 +693,14 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):a
697
693
  ...${r}
698
694
  }
699
695
  }
700
- `;return Fe(this.apollo,i)})}}class B9{constructor(t){this.apollo=t}getWebhooks({fragment:t}={fragment:{WebhookFields:qc}}){return oe(this,void 0,void 0,function*(){t||(t={WebhookFields:qc});let[r,n]=Object.entries(t)[0];const i=Q`
696
+ `;return Fe(this.apollo,i)})}}class B9{constructor(t){this.apollo=t}getWebhooks({fragment:t}={fragment:{WebhookFields:Hc}}){return oe(this,void 0,void 0,function*(){t||(t={WebhookFields:Hc});let[r,n]=Object.entries(t)[0];const i=Q`
701
697
  ${n}
702
698
  query webhooks {
703
699
  webhooks {
704
700
  ...${r}
705
701
  }
706
702
  }
707
- `;return Fe(this.apollo,i)})}createWebhook({fragment:t}){t||(t={WebhookFields:qc});let[r,n]=Object.entries(t)[0];const i=Q`
703
+ `;return Fe(this.apollo,i)})}createWebhook({fragment:t}){t||(t={WebhookFields:Hc});let[r,n]=Object.entries(t)[0];const i=Q`
708
704
  ${n}
709
705
  mutation createWebhook(
710
706
  $name: String
@@ -718,7 +714,7 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):a
718
714
  }`;return Et(this.apollo,i)}deleteWebhook(){const t=Q`
719
715
  mutation deleteWebhookConfig($id: String!) {
720
716
  deleteWebhookConfig(id: $id)
721
- }`;return Et(this.apollo,t)}}class W9{constructor(t){this.client=new U9(t),this.organization=new V9(t),this.webhook=new B9(t)}}var Dm;(function(e){e.Drug="DRUG",e.Package="PACKAGE",e.Product="PRODUCT"})(Dm||(Dm={}));var Rm;(function(e){e.Icd10="ICD10"})(Rm||(Rm={}));var Fm;(function(e){e.Canceled="CANCELED",e.New="NEW",e.Scheduled="SCHEDULED",e.Sent="SENT"})(Fm||(Fm={}));var Lm;(function(e){e.MailOrder="MAIL_ORDER",e.PickUp="PICK_UP"})(Lm||(Lm={}));var Mm;(function(e){e.Otc="OTC",e.Rx="RX"})(Mm||(Mm={}));var jm;(function(e){e.Canceled="CANCELED",e.Completed="COMPLETED",e.Error="ERROR",e.Pending="PENDING",e.Placed="PLACED"})(jm||(jm={}));var zm;(function(e){e.Pharmacy="PHARMACY",e.Prescriber="PRESCRIBER"})(zm||(zm={}));var Um;(function(e){e.Active="ACTIVE",e.Depleted="DEPLETED",e.Expired="EXPIRED"})(Um||(Um={}));var Vm;(function(e){e.I="I",e.Ii="II",e.Iii="III",e.Iv="IV",e.V="V"})(Vm||(Vm={}));var Bm;(function(e){e.Concept="CONCEPT",e.Form="FORM",e.Route="ROUTE",e.Strength="STRENGTH"})(Bm||(Bm={}));var Wm;(function(e){e.Female="FEMALE",e.Male="MALE",e.Unknown="UNKNOWN"})(Wm||(Wm={}));class q9{constructor({domain:t,clientId:r,redirectURI:n,organization:i,audience:o="https://api.photon.health",uri:a="https://api.photon.health/graphql",developmentMode:s=!1}){this.auth0Client=new u4({domain:t||(s?"auth.neutron.health":"auth.photon.health"),client_id:r,redirect_uri:n,cacheLocation:"memory"}),this.audience=o,this.uri=a,s&&(this.audience="https://api.neutron.health",this.uri="https://api.neutron.health/graphql"),this.organization=i,this.authentication=new Pm({authentication:this.auth0Client,organization:this.organization,audience:this.audience});let c=this.constructApolloClient();this.clinical=new z9(c),this.management=new W9(c)}constructApolloClient(){return new v9({link:k9((r,n)=>oe(this,void 0,void 0,function*(){var{headers:i}=n,o=an(n,["headers"]);let a;try{a=yield this.authentication.getAccessToken()}catch(s){if(s.message.includes("Consent required"))a=yield this.authentication.getAccessTokenWithConsent();else throw s}return a?Object.assign(Object.assign({},o),{headers:Object.assign(Object.assign({},i),{authorization:a})}):Object.assign({headers:i},o)})).concat(new y1({uri:this.uri})),defaultOptions:{query:{fetchPolicy:"network-only",errorPolicy:"all"}},cache:new l9})}setOrganization(t){return this.organization=t,this.authentication=new Pm({authentication:this.auth0Client,organization:t,audience:this.audience}),this}}const $d=Symbol("store-raw"),Po=Symbol("store-node"),H9=Symbol("store-name");function G1(e,t){let r=e[br];if(!r&&(Object.defineProperty(e,br,{value:r=new Proxy(e,K9)}),!Array.isArray(e))){const n=Object.keys(e),i=Object.getOwnPropertyDescriptors(e);for(let o=0,a=n.length;o<a;o++){const s=n[o];i[s].get&&Object.defineProperty(e,s,{enumerable:i[s].enumerable,get:i[s].get.bind(r)})}}return r}function fn(e){let t;return e!=null&&typeof e=="object"&&(e[br]||!(t=Object.getPrototypeOf(e))||t===Object.prototype||Array.isArray(e))}function Si(e,t=new Set){let r,n,i,o;if(r=e!=null&&e[$d])return r;if(!fn(e)||t.has(e))return e;if(Array.isArray(e)){Object.isFrozen(e)?e=e.slice(0):t.add(e);for(let a=0,s=e.length;a<s;a++)i=e[a],(n=Si(i,t))!==i&&(e[a]=n)}else{Object.isFrozen(e)?e=Object.assign({},e):t.add(e);const a=Object.keys(e),s=Object.getOwnPropertyDescriptors(e);for(let c=0,l=a.length;c<l;c++)o=a[c],!s[o].get&&(i=e[o],(n=Si(i,t))!==i&&(e[o]=n))}return e}function Wh(e){let t=e[Po];return t||Object.defineProperty(e,Po,{value:t={}}),t}function wd(e,t,r){return e[t]||(e[t]=K1(r))}function G9(e,t){const r=Reflect.getOwnPropertyDescriptor(e,t);return!r||r.get||!r.configurable||t===br||t===Po||t===H9||(delete r.value,delete r.writable,r.get=()=>e[br][t]),r}function Q1(e){if(Fg()){const t=Wh(e);(t._||(t._=K1()))()}}function Q9(e){return Q1(e),Reflect.ownKeys(e)}function K1(e){const[t,r]=L(e,{equals:!1,internal:!0});return t.$=r,t}const K9={get(e,t,r){if(t===$d)return e;if(t===br)return r;if(t===wu)return Q1(e),r;const n=Wh(e),i=n.hasOwnProperty(t);let o=i?n[t]():e[t];if(t===Po||t==="__proto__")return o;if(!i){const a=Object.getOwnPropertyDescriptor(e,t);Fg()&&(typeof o!="function"||e.hasOwnProperty(t))&&!(a&&a.get)&&(o=wd(n,t,o)())}return fn(o)?G1(o):o},has(e,t){return t===$d||t===br||t===wu||t===Po||t==="__proto__"?!0:(this.get(e,t,e),t in e)},set(){return!0},deleteProperty(){return!0},ownKeys:Q9,getOwnPropertyDescriptor:G9};function Bt(e,t,r,n=!1){if(!n&&e[t]===r)return;const i=e[t],o=e.length;r===void 0?delete e[t]:e[t]=r;let a=Wh(e),s;(s=wd(a,t,i))&&s.$(()=>r),Array.isArray(e)&&e.length!==o&&(s=wd(a,"length",o))&&s.$(e.length),(s=a._)&&s.$()}function Y1(e,t){const r=Object.keys(t);for(let n=0;n<r.length;n+=1){const i=r[n];Bt(e,i,t[i])}}function Y9(e,t){if(typeof t=="function"&&(t=t(e)),t=Si(t),Array.isArray(t)){if(e===t)return;let r=0,n=t.length;for(;r<n;r++){const i=t[r];e[r]!==i&&Bt(e,r,i)}Bt(e,"length",n)}else Y1(e,t)}function fo(e,t,r=[]){let n,i=e;if(t.length>1){n=t.shift();const a=typeof n,s=Array.isArray(e);if(Array.isArray(n)){for(let c=0;c<n.length;c++)fo(e,[n[c]].concat(t),r);return}else if(s&&a==="function"){for(let c=0;c<e.length;c++)n(e[c],c)&&fo(e,[c].concat(t),r);return}else if(s&&a==="object"){const{from:c=0,to:l=e.length-1,by:u=1}=n;for(let d=c;d<=l;d+=u)fo(e,[d].concat(t),r);return}else if(t.length>1){fo(e[n],t,[n].concat(r));return}i=e[n],r=[n].concat(r)}let o=t[0];typeof o=="function"&&(o=o(i,r),o===i)||n===void 0&&o==null||(o=Si(o),n===void 0||fn(i)&&fn(o)&&!Array.isArray(o)?Y1(i,o):Bt(e,n,o))}function yn(...[e,t]){const r=Si(e||{}),n=Array.isArray(r),i=G1(r);function o(...a){h$(()=>{n&&a.length===1?Y9(r,a[0]):fo(r,a)})}return[i,o]}const _d=Symbol("store-root");function ti(e,t,r,n,i){const o=t[r];if(e===o)return;if(!fn(e)||!fn(o)||i&&e[i]!==o[i]){if(e!==o){if(r===_d)return e;Bt(t,r,e)}return}if(Array.isArray(e)){if(e.length&&o.length&&(!n||i&&e[0]&&e[0][i]!=null)){let c,l,u,d,f,h,p,m;for(u=0,d=Math.min(o.length,e.length);u<d&&(o[u]===e[u]||i&&o[u]&&e[u]&&o[u][i]===e[u][i]);u++)ti(e[u],o,u,n,i);const v=new Array(e.length),y=new Map;for(d=o.length-1,f=e.length-1;d>=u&&f>=u&&(o[d]===e[f]||i&&o[u]&&e[u]&&o[d][i]===e[f][i]);d--,f--)v[f]=o[d];if(u>f||u>d){for(l=u;l<=f;l++)Bt(o,l,e[l]);for(;l<e.length;l++)Bt(o,l,v[l]),ti(e[l],o,l,n,i);o.length>e.length&&Bt(o,"length",e.length);return}for(p=new Array(f+1),l=f;l>=u;l--)h=e[l],m=i&&h?h[i]:h,c=y.get(m),p[l]=c===void 0?-1:c,y.set(m,l);for(c=u;c<=d;c++)h=o[c],m=i&&h?h[i]:h,l=y.get(m),l!==void 0&&l!==-1&&(v[l]=o[c],l=p[l],y.set(m,l));for(l=u;l<e.length;l++)l in v?(Bt(o,l,v[l]),ti(e[l],o,l,n,i)):Bt(o,l,e[l])}else for(let c=0,l=e.length;c<l;c++)ti(e[c],o,c,n,i);o.length>e.length&&Bt(o,"length",e.length);return}const a=Object.keys(e);for(let c=0,l=a.length;c<l;c++)ti(e[a[c]],o,a[c],n,i);const s=Object.keys(o);for(let c=0,l=s.length;c<l;c++)e[s[c]]===void 0&&Bt(o,s[c],void 0)}function X9(e,t={}){const{merge:r,key:n="id"}=t,i=Si(e);return o=>{if(!fn(o)||!fn(i))return i;const a=ti(i,{[_d]:o},_d,r,n);return a===void 0?o:a}}const Z9=e=>{window.location.replace(e?.returnTo||window.location.pathname)},J9=Wo`
717
+ }`;return Et(this.apollo,t)}}class W9{constructor(t){this.client=new U9(t),this.organization=new V9(t),this.webhook=new B9(t)}}var Dm;(function(e){e.Drug="DRUG",e.Package="PACKAGE",e.Product="PRODUCT"})(Dm||(Dm={}));var Rm;(function(e){e.Icd10="ICD10"})(Rm||(Rm={}));var Fm;(function(e){e.Canceled="CANCELED",e.New="NEW",e.Scheduled="SCHEDULED",e.Sent="SENT"})(Fm||(Fm={}));var Lm;(function(e){e.MailOrder="MAIL_ORDER",e.PickUp="PICK_UP"})(Lm||(Lm={}));var Mm;(function(e){e.Otc="OTC",e.Rx="RX"})(Mm||(Mm={}));var jm;(function(e){e.Canceled="CANCELED",e.Completed="COMPLETED",e.Error="ERROR",e.Pending="PENDING",e.Placed="PLACED"})(jm||(jm={}));var zm;(function(e){e.Pharmacy="PHARMACY",e.Prescriber="PRESCRIBER"})(zm||(zm={}));var Um;(function(e){e.Active="ACTIVE",e.Depleted="DEPLETED",e.Expired="EXPIRED"})(Um||(Um={}));var Vm;(function(e){e.I="I",e.Ii="II",e.Iii="III",e.Iv="IV",e.V="V"})(Vm||(Vm={}));var Bm;(function(e){e.Concept="CONCEPT",e.Form="FORM",e.Route="ROUTE",e.Strength="STRENGTH"})(Bm||(Bm={}));var Wm;(function(e){e.Female="FEMALE",e.Male="MALE",e.Unknown="UNKNOWN"})(Wm||(Wm={}));class q9{constructor({domain:t,clientId:r,redirectURI:n,organization:i,audience:o="https://api.photon.health",uri:a="https://api.photon.health/graphql",developmentMode:s=!1}){this.auth0Client=new u4({domain:t||(s?"auth.neutron.health":"auth.photon.health"),client_id:r,redirect_uri:n,cacheLocation:"memory"}),this.audience=o,this.uri=a,s&&(this.audience="https://api.neutron.health",this.uri="https://api.neutron.health/graphql"),this.organization=i,this.authentication=new Pm({authentication:this.auth0Client,organization:this.organization,audience:this.audience});let c=this.constructApolloClient();this.clinical=new z9(c),this.management=new W9(c)}constructApolloClient(){return new v9({link:k9((r,n)=>oe(this,void 0,void 0,function*(){var{headers:i}=n,o=an(n,["headers"]);let a;try{a=yield this.authentication.getAccessToken()}catch(s){if(s.message.includes("Consent required"))a=yield this.authentication.getAccessTokenWithConsent();else throw s}return a?Object.assign(Object.assign({},o),{headers:Object.assign(Object.assign({},i),{authorization:a})}):Object.assign({headers:i},o)})).concat(new y1({uri:this.uri})),defaultOptions:{query:{fetchPolicy:"network-only",errorPolicy:"all"}},cache:new l9})}setOrganization(t){return this.organization=t,this.authentication=new Pm({authentication:this.auth0Client,organization:t,audience:this.audience}),this}}const wd=Symbol("store-raw"),Po=Symbol("store-node"),H9=Symbol("store-name");function G1(e,t){let r=e[br];if(!r&&(Object.defineProperty(e,br,{value:r=new Proxy(e,K9)}),!Array.isArray(e))){const n=Object.keys(e),i=Object.getOwnPropertyDescriptors(e);for(let o=0,a=n.length;o<a;o++){const s=n[o];i[s].get&&Object.defineProperty(e,s,{enumerable:i[s].enumerable,get:i[s].get.bind(r)})}}return r}function fn(e){let t;return e!=null&&typeof e=="object"&&(e[br]||!(t=Object.getPrototypeOf(e))||t===Object.prototype||Array.isArray(e))}function Si(e,t=new Set){let r,n,i,o;if(r=e!=null&&e[wd])return r;if(!fn(e)||t.has(e))return e;if(Array.isArray(e)){Object.isFrozen(e)?e=e.slice(0):t.add(e);for(let a=0,s=e.length;a<s;a++)i=e[a],(n=Si(i,t))!==i&&(e[a]=n)}else{Object.isFrozen(e)?e=Object.assign({},e):t.add(e);const a=Object.keys(e),s=Object.getOwnPropertyDescriptors(e);for(let c=0,l=a.length;c<l;c++)o=a[c],!s[o].get&&(i=e[o],(n=Si(i,t))!==i&&(e[o]=n))}return e}function qh(e){let t=e[Po];return t||Object.defineProperty(e,Po,{value:t={}}),t}function _d(e,t,r){return e[t]||(e[t]=K1(r))}function G9(e,t){const r=Reflect.getOwnPropertyDescriptor(e,t);return!r||r.get||!r.configurable||t===br||t===Po||t===H9||(delete r.value,delete r.writable,r.get=()=>e[br][t]),r}function Q1(e){if(Fg()){const t=qh(e);(t._||(t._=K1()))()}}function Q9(e){return Q1(e),Reflect.ownKeys(e)}function K1(e){const[t,r]=M(e,{equals:!1,internal:!0});return t.$=r,t}const K9={get(e,t,r){if(t===wd)return e;if(t===br)return r;if(t===_u)return Q1(e),r;const n=qh(e),i=n.hasOwnProperty(t);let o=i?n[t]():e[t];if(t===Po||t==="__proto__")return o;if(!i){const a=Object.getOwnPropertyDescriptor(e,t);Fg()&&(typeof o!="function"||e.hasOwnProperty(t))&&!(a&&a.get)&&(o=_d(n,t,o)())}return fn(o)?G1(o):o},has(e,t){return t===wd||t===br||t===_u||t===Po||t==="__proto__"?!0:(this.get(e,t,e),t in e)},set(){return!0},deleteProperty(){return!0},ownKeys:Q9,getOwnPropertyDescriptor:G9};function Bt(e,t,r,n=!1){if(!n&&e[t]===r)return;const i=e[t],o=e.length;r===void 0?delete e[t]:e[t]=r;let a=qh(e),s;(s=_d(a,t,i))&&s.$(()=>r),Array.isArray(e)&&e.length!==o&&(s=_d(a,"length",o))&&s.$(e.length),(s=a._)&&s.$()}function Y1(e,t){const r=Object.keys(t);for(let n=0;n<r.length;n+=1){const i=r[n];Bt(e,i,t[i])}}function Y9(e,t){if(typeof t=="function"&&(t=t(e)),t=Si(t),Array.isArray(t)){if(e===t)return;let r=0,n=t.length;for(;r<n;r++){const i=t[r];e[r]!==i&&Bt(e,r,i)}Bt(e,"length",n)}else Y1(e,t)}function fo(e,t,r=[]){let n,i=e;if(t.length>1){n=t.shift();const a=typeof n,s=Array.isArray(e);if(Array.isArray(n)){for(let c=0;c<n.length;c++)fo(e,[n[c]].concat(t),r);return}else if(s&&a==="function"){for(let c=0;c<e.length;c++)n(e[c],c)&&fo(e,[c].concat(t),r);return}else if(s&&a==="object"){const{from:c=0,to:l=e.length-1,by:u=1}=n;for(let d=c;d<=l;d+=u)fo(e,[d].concat(t),r);return}else if(t.length>1){fo(e[n],t,[n].concat(r));return}i=e[n],r=[n].concat(r)}let o=t[0];typeof o=="function"&&(o=o(i,r),o===i)||n===void 0&&o==null||(o=Si(o),n===void 0||fn(i)&&fn(o)&&!Array.isArray(o)?Y1(i,o):Bt(e,n,o))}function yn(...[e,t]){const r=Si(e||{}),n=Array.isArray(r),i=G1(r);function o(...a){h$(()=>{n&&a.length===1?Y9(r,a[0]):fo(r,a)})}return[i,o]}const xd=Symbol("store-root");function ti(e,t,r,n,i){const o=t[r];if(e===o)return;if(!fn(e)||!fn(o)||i&&e[i]!==o[i]){if(e!==o){if(r===xd)return e;Bt(t,r,e)}return}if(Array.isArray(e)){if(e.length&&o.length&&(!n||i&&e[0]&&e[0][i]!=null)){let c,l,u,d,f,h,p,m;for(u=0,d=Math.min(o.length,e.length);u<d&&(o[u]===e[u]||i&&o[u]&&e[u]&&o[u][i]===e[u][i]);u++)ti(e[u],o,u,n,i);const v=new Array(e.length),y=new Map;for(d=o.length-1,f=e.length-1;d>=u&&f>=u&&(o[d]===e[f]||i&&o[u]&&e[u]&&o[d][i]===e[f][i]);d--,f--)v[f]=o[d];if(u>f||u>d){for(l=u;l<=f;l++)Bt(o,l,e[l]);for(;l<e.length;l++)Bt(o,l,v[l]),ti(e[l],o,l,n,i);o.length>e.length&&Bt(o,"length",e.length);return}for(p=new Array(f+1),l=f;l>=u;l--)h=e[l],m=i&&h?h[i]:h,c=y.get(m),p[l]=c===void 0?-1:c,y.set(m,l);for(c=u;c<=d;c++)h=o[c],m=i&&h?h[i]:h,l=y.get(m),l!==void 0&&l!==-1&&(v[l]=o[c],l=p[l],y.set(m,l));for(l=u;l<e.length;l++)l in v?(Bt(o,l,v[l]),ti(e[l],o,l,n,i)):Bt(o,l,e[l])}else for(let c=0,l=e.length;c<l;c++)ti(e[c],o,c,n,i);o.length>e.length&&Bt(o,"length",e.length);return}const a=Object.keys(e);for(let c=0,l=a.length;c<l;c++)ti(e[a[c]],o,a[c],n,i);const s=Object.keys(o);for(let c=0,l=s.length;c<l;c++)e[s[c]]===void 0&&Bt(o,s[c],void 0)}function X9(e,t={}){const{merge:r,key:n="id"}=t,i=Si(e);return o=>{if(!fn(o)||!fn(i))return i;const a=ti(i,{[xd]:o},xd,r,n);return a===void 0?o:a}}const Z9=e=>{window.location.replace(e?.returnTo||window.location.pathname)},J9=Wo`
722
718
  fragment CatalogTreatmentsFields on Catalog {
723
719
  treatments {
724
720
  id
@@ -739,12 +735,12 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):a
739
735
  }
740
736
  }
741
737
  }
742
- `;class e8{sdk;setStore;store;authentication;getSDK;clinical;constructor(t){this.sdk=t;const[r,n]=yn({authentication:{isAuthenticated:!1,isLoading:!0,error:void 0,user:void 0},catalog:{isLoading:!1,treatments:[],templates:[]},catalogs:{isLoading:!1,catalogs:[]},dispenseUnits:{isLoading:!1,dispenseUnits:new Array},patients:{isLoading:!1,patients:[],finished:!1},patient:{isLoading:!1,patient:void 0},prescription:{isLoading:!1,errors:[],error:void 0,data:void 0}});this.setStore=n,this.store=r,this.authentication={state:r.authentication,handleRedirect:async i=>{try{const o=await this.sdk.authentication.handleRedirect(i);Z9(o?.appState)}catch(o){const s=new URLSearchParams(window.location.search).get("error_description");o.message.includes("must be an organization id")?this.setStore("authentication",{...this.store.authentication,error:"The provided organization id is invalid or does not exist"}):s?.includes("is not part of the org")?this.setStore("authentication",{...this.store.authentication,error:"User is not authorized",isLoading:!1}):this.setStore("authentication",{...this.store.authentication,error:o.message})}},checkSession:this.checkSession.bind(this),login:this.login.bind(this),logout:this.logout.bind(this)},this.getSDK=this._getSDK.bind(this),this.clinical={catalog:{state:r.catalog,getCatalog:this.getCatalog.bind(this)},catalogs:{state:r.catalogs,getCatalogs:this.getCatalogs.bind(this)},dispenseUnits:{state:r.dispenseUnits,getDispenseUnits:this.getDispenseUnits.bind(this)},patients:{state:r.patients,getPatients:this.getPatients.bind(this)},patient:{state:r.patient,getPatient:this.getPatient.bind(this)},prescription:{state:r.prescription,createPrescription:this.createPrescription.bind(this)}}}_getSDK(){return this.sdk}async checkSession(){await this.sdk.authentication.checkSession();const t=await this.sdk.authentication.isAuthenticated();this.setStore("authentication",{...this.store.authentication,isAuthenticated:t});const r=await this.sdk.authentication.getUser();this.setStore("authentication",{...this.store.authentication,user:r}),this.setStore("authentication",{...this.store.authentication,isLoading:!1})}async login(t={}){await this.sdk.authentication.login(t),await this.checkSession()}async logout(t={}){await this.sdk.authentication.logout(t),this.setStore("authentication",{...this.store.authentication,isAuthenticated:!1}),this.setStore("authentication",{...this.store.authentication,user:void 0})}async getPatients(t){t||(t={}),this.setStore("patients",{...this.store.patients,isLoading:!0});const{data:r}=await this.sdk.clinical.patient.getPatients(t);this.setStore("patients",{...this.store.patients,isLoading:!1,patients:t.clear?r.patients:this.store.patients.patients.concat(r.patients),finished:r.patients.length==0})}async getPatient(t){this.setStore("patient",{...this.store.patient,isLoading:!0});const{data:r}=await this.sdk.clinical.patient.getPatient(t);return this.setStore("patient",{...this.store.patient,isLoading:!1,patient:r.patient}),r.patient}async getCatalog(t){this.setStore("catalog",{...this.store.catalog,isLoading:!0});const{data:r}=await this.sdk.clinical.catalog.getCatalog({id:t.id,fragment:{CatalogTreatmentsFields:J9}});this.setStore("catalog",{...this.store.catalog,isLoading:!1,treatments:r.catalog.treatments.map(n=>n)||[],templates:r.catalog.templates.map(n=>n)||[]})}async getCatalogs(){this.setStore("catalogs",{...this.store.catalogs,isLoading:!0});const{data:t}=await this.sdk.clinical.catalog.getCatalogs();this.setStore("catalogs",{...this.store.catalogs,isLoading:!1,catalogs:t.catalogs})}async getDispenseUnits(){this.setStore("dispenseUnits",{...this.store.dispenseUnits,isLoading:!0});const{data:t}=await this.sdk.clinical.prescription.getDispenseUnits();this.setStore("dispenseUnits",{...this.store.dispenseUnits,isLoading:!1,dispenseUnits:t.dispenseUnits.map((r,n)=>({id:String(n),...r}))})}async createPrescription(t){this.setStore("prescription",{...this.store.prescription,isLoading:!0});const r=this.sdk.clinical.prescription.createPrescription({});try{const{data:n,errors:i}=await r({variables:t,refetchQueries:[],awaitRefetchQueries:!1});return i&&i.length>0&&this.setStore("prescription",{...this.store.prescription,errors:[...i]}),n?.createPrescription&&this.setStore("prescription",{...this.store.prescription,data:n.createPrescription}),this.setStore("prescription",{...this.store.prescription,isLoading:!1}),{data:n,errors:i}}catch(n){return this.setStore("prescription",{...this.store.prescription,error:n,isLoading:!1}),{data:null,errors:[]}}}}var t8=(e,t,r)=>{const n=r(e,t);return Il(()=>clearInterval(n))};const r8=C("<slot></slot>"),n8=C("<div></div>");$e("photon-client",{domain:{attribute:"domain",value:void 0,reflect:!1,notify:!1,parse:!1},id:{attribute:"id",value:void 0,reflect:!1,notify:!1,parse:!1},redirectUri:{attribute:"redirect-uri",value:void 0,reflect:!1,notify:!1,parse:!1},redirectPath:{attribute:"redirect-path",value:void 0,reflect:!1,notify:!1,parse:!1},org:{attribute:"org",value:void 0,reflect:!1,notify:!1,parse:!1},audience:{attribute:"audience",value:void 0,reflect:!1,notify:!1,parse:!1},uri:{attribute:"uri",value:void 0,reflect:!1,notify:!1,parse:!1},developmentMode:{attribute:"dev-mode",value:!1,reflect:!0,notify:!1,parse:!0},errorMessage:{attribute:"error-message",value:"Oh snap! There was an error loading. Please contact your site's administrator",reflect:!1,notify:!1,parse:!1},autoLogin:{attribute:"auto-login",value:!1,reflect:!1,notify:!1,parse:!0}},({domain:e,id:t,redirectUri:r,redirectPath:n,org:i,developmentMode:o,errorMessage:a,audience:s,uri:c,autoLogin:l})=>{let u;V$({id:t},["id"]);const d=new q9({domain:e,audience:s,uri:c,clientId:t,redirectURI:r||window.location.origin,organization:i,developmentMode:o}),f=new e8(d);o&&console.info("[PhotonClient]: Development mode enabled");const[h]=L(f);return xe(async()=>{H$()&&h()?(await h()?.authentication.handleRedirect(),n&&window.location.replace(n)):h()&&(await h()?.authentication.checkSession(),t8(async()=>{await h()?.authentication.checkSession()},6e4,setInterval))}),xe(async()=>{if(!h()?.authentication.state.isLoading&&!h()?.authentication.state.isAuthenticated&&l){const p={appState:{}};n&&(p.appState.returnTo=n),await h()?.authentication.login(p)}},[h()?.authentication.state.isAuthenticated,h()?.authentication.state.isLoading]),(()=>{const p=n8.cloneNode(!0),m=u;return typeof m=="function"?ee(m,p):u=p,w(p,U(qg.Provider,{get value(){return h()},get children(){const v=r8.cloneNode(!0);return v._$owner=P(),v}})),p})()});const ze=`*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.top-0{top:0}.left-0{left:0}.z-10{z-index:10}.my-8{margin-top:2rem;margin-bottom:2rem}.mb-7{margin-bottom:1.75rem}.mb-1\\.5{margin-bottom:.375rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.ml-1{margin-left:.25rem}.mt-6{margin-top:1.5rem}.mb-3{margin-bottom:.75rem}.mb-8{margin-bottom:2rem}.mt-8{margin-top:2rem}.block{display:block}.inline{display:inline}.flex{display:flex}.hidden{display:none}.h-10{height:2.5rem}.h-\\[28px\\]{height:28px}.h-full{height:100%}.h-\\[21px\\]{height:21px}.h-screen{height:100vh}.w-full{width:100%}.w-fit{width:-moz-fit-content;width:fit-content}.w-\\[16px\\]{width:16px}.w-screen{width:100vw}.min-w-\\[40\\%\\]{min-width:40%}.min-w-\\[48\\%\\]{min-width:48%}.min-w-\\[125px\\]{min-width:125px}.max-w-\\[140px\\]{max-width:140px}.max-w-\\[180px\\]{max-width:180px}.max-w-sm{max-width:24rem}.flex-1{flex:1 1 0%}.flex-shrink{flex-shrink:1}.flex-grow{flex-grow:1}.basis-56{flex-basis:14rem}.basis-36{flex-basis:9rem}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.gap-4{gap:1rem}.gap-8{gap:2rem}.gap-3{gap:.75rem}.gap-1{gap:.25rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * (1 - var(--tw-space-x-reverse)))}.self-start{align-self:flex-start}.self-end{align-self:flex-end}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-ellipsis{text-overflow:ellipsis}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.rounded-lg{border-radius:.5rem}.rounded{border-radius:.25rem}.border{border-width:1px}.border-2{border-width:2px}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235/var(--tw-border-opacity))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68/var(--tw-border-opacity))}.bg-photon-blue{--tw-bg-opacity: 1;background-color:rgb(49 130 206/var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-\\[\\#f7f4f4\\]{--tw-bg-opacity: 1;background-color:rgb(247 244 244/var(--tw-bg-opacity))}.bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55/var(--tw-bg-opacity))}.p-4{padding:1rem}.p-2{padding:.5rem}.px-4{padding-left:1rem;padding-right:1rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pt-\\[3px\\]{padding-top:3px}.pt-1{padding-top:.25rem}.pl-2{padding-left:.5rem}.pb-2{padding-bottom:.5rem}.pl-1{padding-left:.25rem}.pb-1{padding-bottom:.25rem}.pl-3{padding-left:.75rem}.pr-3{padding-right:.75rem}.pt-2{padding-top:.5rem}.pb-4{padding-bottom:1rem}.pt-28{padding-top:7rem}.pt-4{padding-top:1rem}.pb-52{padding-bottom:13rem}.pl-\\[19\\.75px\\]{padding-left:19.75px}.pb-3{padding-bottom:.75rem}.pb-5{padding-bottom:1.25rem}.pl-4{padding-left:1rem}.pt-1\\.5{padding-top:.375rem}.text-center{text-align:center}.font-sans{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-7xl{font-size:4.5rem;line-height:1}.font-medium{font-weight:500}.font-light{font-weight:300}.font-normal{font-weight:400}.italic{font-style:italic}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128/var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175/var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81/var(--tw-text-opacity))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68/var(--tw-text-opacity))}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-teal-600{--tw-text-opacity: 1;color:rgb(13 148 136/var(--tw-text-opacity))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94/var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219/var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99/var(--tw-text-opacity))}.shadow-card{--tw-shadow: 0px 0px 1px rgba(48, 49, 51, .05),0px 2px 4px rgba(48, 49, 51, .1);--tw-shadow-colored: 0px 0px 1px var(--tw-shadow-color), 0px 2px 4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 rgba(0, 0, 0, 0)),var(--tw-ring-shadow, 0 0 rgba(0, 0, 0, 0)),var(--tw-shadow)}.outline{outline-style:solid}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.hover\\:cursor-pointer:hover{cursor:pointer}.hover\\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216/var(--tw-bg-opacity))}.hover\\:bg-photon-blue-dark:hover{--tw-bg-opacity: 1;background-color:rgb(43 108 176/var(--tw-bg-opacity))}.hover\\:text-gray-600:hover{--tw-text-opacity: 1;color:rgb(75 85 99/var(--tw-text-opacity))}.hover\\:text-black:hover{--tw-text-opacity: 1;color:rgb(0 0 0/var(--tw-text-opacity))}.hover\\:underline:hover{text-decoration-line:underline}.disabled\\:bg-gray-500:disabled{--tw-bg-opacity: 1;background-color:rgb(107 114 128/var(--tw-bg-opacity))}@media (min-width: 475px){.xs\\:mx-auto{margin-left:auto;margin-right:auto}.xs\\:w-fit{width:-moz-fit-content;width:fit-content}.xs\\:min-w-\\[40\\%\\]{min-width:40%}.xs\\:min-w-\\[48\\%\\]{min-width:48%}.xs\\:basis-60{flex-basis:15rem}.xs\\:basis-\\[10\\.5rem\\]{flex-basis:10.5rem}.xs\\:flex-row{flex-direction:row}.xs\\:items-center{align-items:center}.xs\\:gap-4{gap:1rem}.xs\\:self-end{align-self:flex-end}.xs\\:pl-4{padding-left:1rem}.xs\\:pt-28{padding-top:7rem}.xs\\:pb-2{padding-bottom:.5rem}.xs\\:text-base{font-size:1rem;line-height:1.5rem}}@media (min-width: 640px){.sm\\:w-\\[600px\\]{width:600px}.sm\\:max-w-\\[50\\%\\]{max-width:50%}.sm\\:flex-row{flex-direction:row}.sm\\:flex-col{flex-direction:column}.sm\\:flex-wrap{flex-wrap:wrap}.sm\\:items-start{align-items:flex-start}.sm\\:items-center{align-items:center}.sm\\:gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.sm\\:pr-2{padding-right:.5rem}}@media (min-width: 768px){.md\\:mb-0{margin-bottom:0}.md\\:w-1\\/3{width:33.333333%}.md\\:w-2\\/3{width:66.666667%}.md\\:max-w-\\[50\\%\\]{max-width:50%}.md\\:flex-row{flex-direction:row}.md\\:flex-col{flex-direction:column}.md\\:justify-center{justify-content:center}.md\\:px-8{padding-left:2rem;padding-right:2rem}.md\\:py-3{padding-top:.75rem;padding-bottom:.75rem}}@media (min-width: 1024px){.lg\\:flex-row{flex-direction:row}.lg\\:pt-20{padding-top:5rem}}
743
- `,i8=C("<style></style>"),o8=C('<button class="w-full disabled:bg-gray-500 bg-photon-blue hover:bg-blue-700 text-white h-10 px-4 rounded-lg font-sans hover:bg-photon-blue-dark transition ease-in-out delay-50"></button>');$e("photon-auth-button",{redirectPath:{attribute:"redirect-path",value:void 0,reflect:!1,notify:!1,parse:!1}},e=>{const t=at();return xe(()=>{t||console.error("[photon-auth-button] No valid PhotonClient instance was provided. Please ensure you are wrapping the element in a photon-client element")}),[(()=>{const r=i8.cloneNode(!0);return w(r,ze),r})(),t?(()=>{const r=o8.cloneNode(!0);return r.$$click=async()=>{const n={appState:{}};e.redirectPath&&(n.appState.returnTo=e.redirectPath),t.authentication.state.isAuthenticated?await t.authentication.logout():await t.authentication.login(n)},w(r,()=>t.authentication.state.isAuthenticated?"Log out":"Log in"),W(()=>r.disabled=t.authentication.state.isLoading),r})():null]});Ni(["click"]);const a8=C("<style></style>"),s8=C(`<div class="flex flex-col w-screen max-w-sm"><svg viewBox="0 0 305 62.61" xmlns="http://www.w3.org/2000/svg" class="h-[28px] pl-[19.75px]"><g fill="#273D52"><path d="M0 54.1169H6.81375V35.7722H18.0826C29.5481 35.7722 34.3963 30.3343 34.3963 18.7378V17.4275C34.3963 5.76548 29.417 0.655167 18.0826 0.655167H0V54.1169ZM6.81375 30.1377V6.28961H18.2792C24.7653 6.28961 27.386 8.9758 27.386 16.0516V20.0481C27.386 27.1895 24.7653 30.1377 18.2792 30.1377H6.81375Z"></path><path d="M70.9593 54.1169H77.773V0.655167H70.9593V24.4378H50.8456V0.655167H44.0319V54.1169H50.8456V30.3343H70.9593V54.1169Z"></path><path d="M107.146 54.772C119.528 54.772 125.687 46.5169 125.687 34.9205V19.7861C125.687 8.25511 119.528 0 107.146 0C94.6974 0 88.5388 8.25511 88.5388 19.7861V34.9205C88.5388 46.5169 94.6974 54.772 107.146 54.772ZM95.5491 35.9687V18.8033C95.5491 10.7448 99.4801 5.89651 107.146 5.89651C114.745 5.89651 118.677 10.7448 118.677 18.8033V35.9687C118.677 44.0928 114.745 48.8755 107.146 48.8755C99.4801 48.8755 95.5491 44.0928 95.5491 35.9687Z"></path><path d="M144.295 54.1169H151.109V6.48616H164.54V0.655167H130.864V6.48616H144.295V54.1169Z"></path><path d="M188.299 54.772C200.682 54.772 206.841 46.5169 206.841 34.9205V19.7861C206.841 8.25511 200.682 0 188.299 0C175.851 0 169.693 8.25511 169.693 19.7861V34.9205C169.693 46.5169 175.851 54.772 188.299 54.772ZM176.703 35.9687V18.8033C176.703 10.7448 180.634 5.89651 188.299 5.89651C195.899 5.89651 199.83 10.7448 199.83 18.8033V35.9687C199.83 44.0928 195.899 48.8755 188.299 48.8755C180.634 48.8755 176.703 44.0928 176.703 35.9687Z"></path><path d="M217.6 54.1169H224.021V14.3482L245.576 54.1169H252.608L248.058 45.1084L245.641 40.4239L224.086 0.655167H217.6V54.1169Z"></path></g><g fill="#B35724"><circle cx="249.798" cy="5.202" r="5.202"></circle></g></svg><h1 class="font-medium text-3xl text-center font-sans mt-6 mb-3">Log in to your account</h1><p class="text-gray-500 font-sans text-center mb-8">Don't have an account? <a href="mailto:rado@photon.health" class="text-teal-600 hover:underline hover:cursor-pointer font-sans font-light">Contact Sales</a></p><photon-auth-button></photon-auth-button></div>`);$e("photon-login",{redirectPath:{attribute:"redirect-path",value:void 0,reflect:!1,notify:!1,parse:!1}},e=>{const t=at();return xe(()=>{t||console.error("[photon-login] No valid PhotonClient instance was provided. Please ensure you are wrapping the element in a photon-client element")}),[(()=>{const r=a8.cloneNode(!0);return w(r,ze),r})(),(()=>{const r=V(()=>document.importNode(s8,!0)),n=r.firstChild,i=n.nextSibling,o=i.nextSibling,a=o.nextSibling;return a._$owner=P(),W(()=>a.redirectPath=e.redirectPath),r})()]});var X1=(e,t)=>{let r;const n=()=>clearTimeout(r);return P()&&Il(n),Object.assign((...o)=>{r!==void 0&&n(),r=setTimeout(()=>e(...o),t)},{clear:n})},Na=window,qh=Na.ShadowRoot&&(Na.ShadyCSS===void 0||Na.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Hh=Symbol(),qm=new WeakMap,Z1=class{constructor(e,t,r){if(this._$cssResult$=!0,r!==Hh)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(qh&&e===void 0){const r=t!==void 0&&t.length===1;r&&(e=qm.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&qm.set(t,e))}return e}toString(){return this.cssText}},l8=e=>new Z1(typeof e=="string"?e:e+"",void 0,Hh),ft=(e,...t)=>{const r=e.length===1?e[0]:t.reduce((n,i,o)=>n+(a=>{if(a._$cssResult$===!0)return a.cssText;if(typeof a=="number")return a;throw Error("Value passed to 'css' function must be a 'css' function result: "+a+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+e[o+1],e[0]);return new Z1(r,e,Hh)},c8=(e,t)=>{qh?e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet):t.forEach(r=>{const n=document.createElement("style"),i=Na.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=r.cssText,e.appendChild(n)})},Hm=qh?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let r="";for(const n of t.cssRules)r+=n.cssText;return l8(r)})(e):e,Gc,Ms=window,Gm=Ms.trustedTypes,u8=Gm?Gm.emptyScript:"",Qm=Ms.reactiveElementPolyfillSupport,To={toAttribute(e,t){switch(t){case Boolean:e=e?u8:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=e!==null;break;case Number:r=e===null?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch{r=null}}return r}},J1=(e,t)=>t!==e&&(t==t||e==e),Qc={attribute:!0,type:String,converter:To,reflect:!1,hasChanged:J1},ri=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(e){var t;this.finalize(),((t=this.h)!==null&&t!==void 0?t:this.h=[]).push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach((t,r)=>{const n=this._$Ep(r,t);n!==void 0&&(this._$Ev.set(n,r),e.push(n))}),e}static createProperty(e,t=Qc){if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){const r=typeof e=="symbol"?Symbol():"__"+e,n=this.getPropertyDescriptor(e,r,t);n!==void 0&&Object.defineProperty(this.prototype,e,n)}}static getPropertyDescriptor(e,t,r){return{get(){return this[t]},set(n){const i=this[e];this[t]=n,this.requestUpdate(e,i,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||Qc}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),e.h!==void 0&&(this.h=[...e.h]),this.elementProperties=new Map(e.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,r=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const n of r)this.createProperty(n,t[n])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const n of r)t.unshift(Hm(n))}else e!==void 0&&t.push(Hm(e));return t}static _$Ep(e,t){const r=t.attribute;return r===!1?void 0:typeof r=="string"?r:typeof e=="string"?e.toLowerCase():void 0}u(){var e;this._$E_=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(e=this.constructor.h)===null||e===void 0||e.forEach(t=>t(this))}addController(e){var t,r;((t=this._$ES)!==null&&t!==void 0?t:this._$ES=[]).push(e),this.renderRoot!==void 0&&this.isConnected&&((r=e.hostConnected)===null||r===void 0||r.call(e))}removeController(e){var t;(t=this._$ES)===null||t===void 0||t.splice(this._$ES.indexOf(e)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((e,t)=>{this.hasOwnProperty(t)&&(this._$Ei.set(t,this[t]),delete this[t])})}createRenderRoot(){var e;const t=(e=this.shadowRoot)!==null&&e!==void 0?e:this.attachShadow(this.constructor.shadowRootOptions);return c8(t,this.constructor.elementStyles),t}connectedCallback(){var e;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$ES)===null||e===void 0||e.forEach(t=>{var r;return(r=t.hostConnected)===null||r===void 0?void 0:r.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$ES)===null||e===void 0||e.forEach(t=>{var r;return(r=t.hostDisconnected)===null||r===void 0?void 0:r.call(t)})}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$EO(e,t,r=Qc){var n;const i=this.constructor._$Ep(e,r);if(i!==void 0&&r.reflect===!0){const o=(((n=r.converter)===null||n===void 0?void 0:n.toAttribute)!==void 0?r.converter:To).toAttribute(t,r.type);this._$El=e,o==null?this.removeAttribute(i):this.setAttribute(i,o),this._$El=null}}_$AK(e,t){var r;const n=this.constructor,i=n._$Ev.get(e);if(i!==void 0&&this._$El!==i){const o=n.getPropertyOptions(i),a=typeof o.converter=="function"?{fromAttribute:o.converter}:((r=o.converter)===null||r===void 0?void 0:r.fromAttribute)!==void 0?o.converter:To;this._$El=i,this[i]=a.fromAttribute(t,o.type),this._$El=null}}requestUpdate(e,t,r){let n=!0;e!==void 0&&(((r=r||this.constructor.getPropertyOptions(e)).hasChanged||J1)(this[e],t)?(this._$AL.has(e)||this._$AL.set(e,t),r.reflect===!0&&this._$El!==e&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(e,r))):n=!1),!this.isUpdatePending&&n&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((n,i)=>this[i]=n),this._$Ei=void 0);let t=!1;const r=this._$AL;try{t=this.shouldUpdate(r),t?(this.willUpdate(r),(e=this._$ES)===null||e===void 0||e.forEach(n=>{var i;return(i=n.hostUpdate)===null||i===void 0?void 0:i.call(n)}),this.update(r)):this._$Ek()}catch(n){throw t=!1,this._$Ek(),n}t&&this._$AE(r)}willUpdate(e){}_$AE(e){var t;(t=this._$ES)===null||t===void 0||t.forEach(r=>{var n;return(n=r.hostUpdated)===null||n===void 0?void 0:n.call(r)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(e){return!0}update(e){this._$EC!==void 0&&(this._$EC.forEach((t,r)=>this._$EO(r,this[r],t)),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}};ri.finalized=!0,ri.elementProperties=new Map,ri.elementStyles=[],ri.shadowRootOptions={mode:"open"},Qm?.({ReactiveElement:ri}),((Gc=Ms.reactiveElementVersions)!==null&&Gc!==void 0?Gc:Ms.reactiveElementVersions=[]).push("1.6.1");var Kc,js=window,ki=js.trustedTypes,Km=ki?ki.createPolicy("lit-html",{createHTML:e=>e}):void 0,Jr=`lit$${(Math.random()+"").slice(9)}$`,e2="?"+Jr,d8=`<${e2}>`,Ei=document,No=(e="")=>Ei.createComment(e),Io=e=>e===null||typeof e!="object"&&typeof e!="function",t2=Array.isArray,f8=e=>t2(e)||typeof e?.[Symbol.iterator]=="function",ro=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ym=/-->/g,Xm=/>/g,wn=RegExp(`>|[
738
+ `;class e8{sdk;setStore;store;authentication;getSDK;clinical;constructor(t){this.sdk=t;const[r,n]=yn({authentication:{isAuthenticated:!1,isLoading:!0,error:void 0,user:void 0},catalog:{isLoading:!1,treatments:[],templates:[]},catalogs:{isLoading:!1,catalogs:[]},dispenseUnits:{isLoading:!1,dispenseUnits:new Array},patients:{isLoading:!1,patients:[],finished:!1},patient:{isLoading:!1,patient:void 0},prescription:{isLoading:!1,errors:[],error:void 0,data:void 0}});this.setStore=n,this.store=r,this.authentication={state:r.authentication,handleRedirect:async i=>{try{const o=await this.sdk.authentication.handleRedirect(i);Z9(o?.appState)}catch(o){const s=new URLSearchParams(window.location.search).get("error_description");o.message.includes("must be an organization id")?this.setStore("authentication",{...this.store.authentication,error:"The provided organization id is invalid or does not exist"}):s?.includes("is not part of the org")?this.setStore("authentication",{...this.store.authentication,error:"User is not authorized",isLoading:!1}):this.setStore("authentication",{...this.store.authentication,error:o.message})}},checkSession:this.checkSession.bind(this),login:this.login.bind(this),logout:this.logout.bind(this)},this.getSDK=this._getSDK.bind(this),this.clinical={catalog:{state:r.catalog,getCatalog:this.getCatalog.bind(this)},catalogs:{state:r.catalogs,getCatalogs:this.getCatalogs.bind(this)},dispenseUnits:{state:r.dispenseUnits,getDispenseUnits:this.getDispenseUnits.bind(this)},patients:{state:r.patients,getPatients:this.getPatients.bind(this)},patient:{state:r.patient,getPatient:this.getPatient.bind(this)},prescription:{state:r.prescription,createPrescription:this.createPrescription.bind(this)}}}_getSDK(){return this.sdk}async checkSession(){await this.sdk.authentication.checkSession();const t=await this.sdk.authentication.isAuthenticated();this.setStore("authentication",{...this.store.authentication,isAuthenticated:t});const r=await this.sdk.authentication.getUser();this.setStore("authentication",{...this.store.authentication,user:r}),this.setStore("authentication",{...this.store.authentication,isLoading:!1})}async login(t={}){await this.sdk.authentication.login(t),await this.checkSession()}async logout(t={}){await this.sdk.authentication.logout(t),this.setStore("authentication",{...this.store.authentication,isAuthenticated:!1}),this.setStore("authentication",{...this.store.authentication,user:void 0})}async getPatients(t){t||(t={}),this.setStore("patients",{...this.store.patients,isLoading:!0});const{data:r}=await this.sdk.clinical.patient.getPatients(t);this.setStore("patients",{...this.store.patients,isLoading:!1,patients:t.clear?r.patients:this.store.patients.patients.concat(r.patients),finished:r.patients.length==0})}async getPatient(t){this.setStore("patient",{...this.store.patient,isLoading:!0});const{data:r}=await this.sdk.clinical.patient.getPatient(t);return this.setStore("patient",{...this.store.patient,isLoading:!1,patient:r.patient}),r.patient}async getCatalog(t){this.setStore("catalog",{...this.store.catalog,isLoading:!0});const{data:r}=await this.sdk.clinical.catalog.getCatalog({id:t.id,fragment:{CatalogTreatmentsFields:J9}});this.setStore("catalog",{...this.store.catalog,isLoading:!1,treatments:r.catalog.treatments.map(n=>n)||[],templates:r.catalog.templates.map(n=>n)||[]})}async getCatalogs(){this.setStore("catalogs",{...this.store.catalogs,isLoading:!0});const{data:t}=await this.sdk.clinical.catalog.getCatalogs();this.setStore("catalogs",{...this.store.catalogs,isLoading:!1,catalogs:t.catalogs})}async getDispenseUnits(){this.setStore("dispenseUnits",{...this.store.dispenseUnits,isLoading:!0});const{data:t}=await this.sdk.clinical.prescription.getDispenseUnits();this.setStore("dispenseUnits",{...this.store.dispenseUnits,isLoading:!1,dispenseUnits:t.dispenseUnits.map((r,n)=>({id:String(n),...r}))})}async createPrescription(t){this.setStore("prescription",{...this.store.prescription,isLoading:!0});const r=this.sdk.clinical.prescription.createPrescription({});try{const{data:n,errors:i}=await r({variables:t,refetchQueries:[],awaitRefetchQueries:!1});return i&&i.length>0&&this.setStore("prescription",{...this.store.prescription,errors:[...i]}),n?.createPrescription&&this.setStore("prescription",{...this.store.prescription,data:n.createPrescription}),this.setStore("prescription",{...this.store.prescription,isLoading:!1}),{data:n,errors:i}}catch(n){return this.setStore("prescription",{...this.store.prescription,error:n,isLoading:!1}),{data:null,errors:[]}}}}var t8=(e,t,r)=>{const n=r(e,t);return Il(()=>clearInterval(n))};const r8=C("<slot></slot>"),n8=C("<div></div>");$e("photon-client",{domain:{attribute:"domain",value:void 0,reflect:!1,notify:!1,parse:!1},id:{attribute:"id",value:void 0,reflect:!1,notify:!1,parse:!1},redirectUri:{attribute:"redirect-uri",value:void 0,reflect:!1,notify:!1,parse:!1},redirectPath:{attribute:"redirect-path",value:void 0,reflect:!1,notify:!1,parse:!1},org:{attribute:"org",value:void 0,reflect:!1,notify:!1,parse:!1},audience:{attribute:"audience",value:void 0,reflect:!1,notify:!1,parse:!1},uri:{attribute:"uri",value:void 0,reflect:!1,notify:!1,parse:!1},developmentMode:{attribute:"dev-mode",value:!1,reflect:!0,notify:!1,parse:!0},errorMessage:{attribute:"error-message",value:"Oh snap! There was an error loading. Please contact your site's administrator",reflect:!1,notify:!1,parse:!1},autoLogin:{attribute:"auto-login",value:!1,reflect:!1,notify:!1,parse:!0}},({domain:e,id:t,redirectUri:r,redirectPath:n,org:i,developmentMode:o,errorMessage:a,audience:s,uri:c,autoLogin:l})=>{let u;V$({id:t},["id"]);const d=new q9({domain:e,audience:s,uri:c,clientId:t,redirectURI:r||window.location.origin,organization:i,developmentMode:o}),f=new e8(d);o&&console.info("[PhotonClient]: Development mode enabled");const[h]=M(f);return xe(async()=>{H$()&&h()?(await h()?.authentication.handleRedirect(),n&&window.location.replace(n)):h()&&(await h()?.authentication.checkSession(),t8(async()=>{await h()?.authentication.checkSession()},6e4,setInterval))}),xe(async()=>{if(!h()?.authentication.state.isLoading&&!h()?.authentication.state.isAuthenticated&&l){const p={appState:{}};n&&(p.appState.returnTo=n),await h()?.authentication.login(p)}},[h()?.authentication.state.isAuthenticated,h()?.authentication.state.isLoading]),(()=>{const p=n8.cloneNode(!0),m=u;return typeof m=="function"?ee(m,p):u=p,w(p,U(qg.Provider,{get value(){return h()},get children(){const v=r8.cloneNode(!0);return v._$owner=P(),v}})),p})()});const ze=`*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.top-0{top:0}.left-0{left:0}.z-10{z-index:10}.my-8{margin-top:2rem;margin-bottom:2rem}.mb-7{margin-bottom:1.75rem}.mb-1\\.5{margin-bottom:.375rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.ml-1{margin-left:.25rem}.mt-6{margin-top:1.5rem}.mb-3{margin-bottom:.75rem}.mb-8{margin-bottom:2rem}.mt-8{margin-top:2rem}.block{display:block}.inline{display:inline}.flex{display:flex}.hidden{display:none}.h-10{height:2.5rem}.h-\\[28px\\]{height:28px}.h-full{height:100%}.h-\\[21px\\]{height:21px}.h-screen{height:100vh}.w-full{width:100%}.w-fit{width:-moz-fit-content;width:fit-content}.w-\\[16px\\]{width:16px}.w-screen{width:100vw}.min-w-\\[40\\%\\]{min-width:40%}.min-w-\\[48\\%\\]{min-width:48%}.min-w-\\[125px\\]{min-width:125px}.max-w-\\[140px\\]{max-width:140px}.max-w-\\[180px\\]{max-width:180px}.max-w-sm{max-width:24rem}.flex-1{flex:1 1 0%}.flex-shrink{flex-shrink:1}.flex-grow{flex-grow:1}.basis-56{flex-basis:14rem}.basis-36{flex-basis:9rem}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.gap-4{gap:1rem}.gap-8{gap:2rem}.gap-3{gap:.75rem}.gap-1{gap:.25rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * (1 - var(--tw-space-x-reverse)))}.self-start{align-self:flex-start}.self-end{align-self:flex-end}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-ellipsis{text-overflow:ellipsis}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.rounded-lg{border-radius:.5rem}.rounded{border-radius:.25rem}.border{border-width:1px}.border-2{border-width:2px}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235/var(--tw-border-opacity))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68/var(--tw-border-opacity))}.bg-photon-blue{--tw-bg-opacity: 1;background-color:rgb(49 130 206/var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-\\[\\#f7f4f4\\]{--tw-bg-opacity: 1;background-color:rgb(247 244 244/var(--tw-bg-opacity))}.bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55/var(--tw-bg-opacity))}.p-4{padding:1rem}.p-2{padding:.5rem}.px-4{padding-left:1rem;padding-right:1rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pt-\\[3px\\]{padding-top:3px}.pt-1{padding-top:.25rem}.pl-2{padding-left:.5rem}.pb-2{padding-bottom:.5rem}.pl-1{padding-left:.25rem}.pb-1{padding-bottom:.25rem}.pl-3{padding-left:.75rem}.pr-3{padding-right:.75rem}.pt-2{padding-top:.5rem}.pb-4{padding-bottom:1rem}.pt-28{padding-top:7rem}.pt-4{padding-top:1rem}.pb-52{padding-bottom:13rem}.pl-\\[19\\.75px\\]{padding-left:19.75px}.pb-3{padding-bottom:.75rem}.pb-5{padding-bottom:1.25rem}.pl-4{padding-left:1rem}.pt-1\\.5{padding-top:.375rem}.text-center{text-align:center}.font-sans{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-7xl{font-size:4.5rem;line-height:1}.font-medium{font-weight:500}.font-light{font-weight:300}.font-normal{font-weight:400}.italic{font-style:italic}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128/var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175/var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81/var(--tw-text-opacity))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68/var(--tw-text-opacity))}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-teal-600{--tw-text-opacity: 1;color:rgb(13 148 136/var(--tw-text-opacity))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94/var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219/var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99/var(--tw-text-opacity))}.shadow-card{--tw-shadow: 0px 0px 1px rgba(48, 49, 51, .05),0px 2px 4px rgba(48, 49, 51, .1);--tw-shadow-colored: 0px 0px 1px var(--tw-shadow-color), 0px 2px 4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 rgba(0, 0, 0, 0)),var(--tw-ring-shadow, 0 0 rgba(0, 0, 0, 0)),var(--tw-shadow)}.outline{outline-style:solid}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.hover\\:cursor-pointer:hover{cursor:pointer}.hover\\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216/var(--tw-bg-opacity))}.hover\\:bg-photon-blue-dark:hover{--tw-bg-opacity: 1;background-color:rgb(43 108 176/var(--tw-bg-opacity))}.hover\\:text-gray-600:hover{--tw-text-opacity: 1;color:rgb(75 85 99/var(--tw-text-opacity))}.hover\\:text-black:hover{--tw-text-opacity: 1;color:rgb(0 0 0/var(--tw-text-opacity))}.hover\\:underline:hover{text-decoration-line:underline}.disabled\\:bg-gray-500:disabled{--tw-bg-opacity: 1;background-color:rgb(107 114 128/var(--tw-bg-opacity))}@media (min-width: 475px){.xs\\:mx-auto{margin-left:auto;margin-right:auto}.xs\\:w-fit{width:-moz-fit-content;width:fit-content}.xs\\:min-w-\\[40\\%\\]{min-width:40%}.xs\\:min-w-\\[48\\%\\]{min-width:48%}.xs\\:basis-60{flex-basis:15rem}.xs\\:basis-\\[10\\.5rem\\]{flex-basis:10.5rem}.xs\\:flex-row{flex-direction:row}.xs\\:items-center{align-items:center}.xs\\:gap-4{gap:1rem}.xs\\:self-end{align-self:flex-end}.xs\\:pl-4{padding-left:1rem}.xs\\:pt-28{padding-top:7rem}.xs\\:pb-2{padding-bottom:.5rem}.xs\\:text-base{font-size:1rem;line-height:1.5rem}}@media (min-width: 640px){.sm\\:w-\\[600px\\]{width:600px}.sm\\:max-w-\\[50\\%\\]{max-width:50%}.sm\\:flex-row{flex-direction:row}.sm\\:flex-col{flex-direction:column}.sm\\:flex-wrap{flex-wrap:wrap}.sm\\:items-start{align-items:flex-start}.sm\\:items-center{align-items:center}.sm\\:gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.sm\\:pr-2{padding-right:.5rem}}@media (min-width: 768px){.md\\:mb-0{margin-bottom:0}.md\\:w-1\\/3{width:33.333333%}.md\\:w-2\\/3{width:66.666667%}.md\\:max-w-\\[50\\%\\]{max-width:50%}.md\\:flex-row{flex-direction:row}.md\\:flex-col{flex-direction:column}.md\\:justify-center{justify-content:center}.md\\:px-8{padding-left:2rem;padding-right:2rem}.md\\:py-3{padding-top:.75rem;padding-bottom:.75rem}}@media (min-width: 1024px){.lg\\:flex-row{flex-direction:row}.lg\\:pt-20{padding-top:5rem}}
739
+ `,i8=C("<style></style>"),o8=C('<button class="w-full disabled:bg-gray-500 bg-photon-blue hover:bg-blue-700 text-white h-10 px-4 rounded-lg font-sans hover:bg-photon-blue-dark transition ease-in-out delay-50"></button>');$e("photon-auth-button",{redirectPath:{attribute:"redirect-path",value:void 0,reflect:!1,notify:!1,parse:!1}},e=>{const t=at();return xe(()=>{t||console.error("[photon-auth-button] No valid PhotonClient instance was provided. Please ensure you are wrapping the element in a photon-client element")}),[(()=>{const r=i8.cloneNode(!0);return w(r,ze),r})(),t?(()=>{const r=o8.cloneNode(!0);return r.$$click=async()=>{const n={appState:{}};e.redirectPath&&(n.appState.returnTo=e.redirectPath),t.authentication.state.isAuthenticated?await t.authentication.logout():await t.authentication.login(n)},w(r,()=>t.authentication.state.isAuthenticated?"Log out":"Log in"),W(()=>r.disabled=t.authentication.state.isLoading),r})():null]});Ni(["click"]);const a8=C("<style></style>"),s8=C(`<div class="flex flex-col w-screen max-w-sm"><svg viewBox="0 0 305 62.61" xmlns="http://www.w3.org/2000/svg" class="h-[28px] pl-[19.75px]"><g fill="#273D52"><path d="M0 54.1169H6.81375V35.7722H18.0826C29.5481 35.7722 34.3963 30.3343 34.3963 18.7378V17.4275C34.3963 5.76548 29.417 0.655167 18.0826 0.655167H0V54.1169ZM6.81375 30.1377V6.28961H18.2792C24.7653 6.28961 27.386 8.9758 27.386 16.0516V20.0481C27.386 27.1895 24.7653 30.1377 18.2792 30.1377H6.81375Z"></path><path d="M70.9593 54.1169H77.773V0.655167H70.9593V24.4378H50.8456V0.655167H44.0319V54.1169H50.8456V30.3343H70.9593V54.1169Z"></path><path d="M107.146 54.772C119.528 54.772 125.687 46.5169 125.687 34.9205V19.7861C125.687 8.25511 119.528 0 107.146 0C94.6974 0 88.5388 8.25511 88.5388 19.7861V34.9205C88.5388 46.5169 94.6974 54.772 107.146 54.772ZM95.5491 35.9687V18.8033C95.5491 10.7448 99.4801 5.89651 107.146 5.89651C114.745 5.89651 118.677 10.7448 118.677 18.8033V35.9687C118.677 44.0928 114.745 48.8755 107.146 48.8755C99.4801 48.8755 95.5491 44.0928 95.5491 35.9687Z"></path><path d="M144.295 54.1169H151.109V6.48616H164.54V0.655167H130.864V6.48616H144.295V54.1169Z"></path><path d="M188.299 54.772C200.682 54.772 206.841 46.5169 206.841 34.9205V19.7861C206.841 8.25511 200.682 0 188.299 0C175.851 0 169.693 8.25511 169.693 19.7861V34.9205C169.693 46.5169 175.851 54.772 188.299 54.772ZM176.703 35.9687V18.8033C176.703 10.7448 180.634 5.89651 188.299 5.89651C195.899 5.89651 199.83 10.7448 199.83 18.8033V35.9687C199.83 44.0928 195.899 48.8755 188.299 48.8755C180.634 48.8755 176.703 44.0928 176.703 35.9687Z"></path><path d="M217.6 54.1169H224.021V14.3482L245.576 54.1169H252.608L248.058 45.1084L245.641 40.4239L224.086 0.655167H217.6V54.1169Z"></path></g><g fill="#B35724"><circle cx="249.798" cy="5.202" r="5.202"></circle></g></svg><h1 class="font-medium text-3xl text-center font-sans mt-6 mb-3">Log in to your account</h1><p class="text-gray-500 font-sans text-center mb-8">Don't have an account? <a href="mailto:rado@photon.health" class="text-teal-600 hover:underline hover:cursor-pointer font-sans font-light">Contact Sales</a></p><photon-auth-button></photon-auth-button></div>`);$e("photon-login",{redirectPath:{attribute:"redirect-path",value:void 0,reflect:!1,notify:!1,parse:!1}},e=>{const t=at();return xe(()=>{t||console.error("[photon-login] No valid PhotonClient instance was provided. Please ensure you are wrapping the element in a photon-client element")}),[(()=>{const r=a8.cloneNode(!0);return w(r,ze),r})(),(()=>{const r=V(()=>document.importNode(s8,!0)),n=r.firstChild,i=n.nextSibling,o=i.nextSibling,a=o.nextSibling;return a._$owner=P(),W(()=>a.redirectPath=e.redirectPath),r})()]});var X1=(e,t)=>{let r;const n=()=>clearTimeout(r);return P()&&Il(n),Object.assign((...o)=>{r!==void 0&&n(),r=setTimeout(()=>e(...o),t)},{clear:n})},Na=window,Hh=Na.ShadowRoot&&(Na.ShadyCSS===void 0||Na.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Gh=Symbol(),qm=new WeakMap,Z1=class{constructor(e,t,r){if(this._$cssResult$=!0,r!==Gh)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(Hh&&e===void 0){const r=t!==void 0&&t.length===1;r&&(e=qm.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&qm.set(t,e))}return e}toString(){return this.cssText}},l8=e=>new Z1(typeof e=="string"?e:e+"",void 0,Gh),ft=(e,...t)=>{const r=e.length===1?e[0]:t.reduce((n,i,o)=>n+(a=>{if(a._$cssResult$===!0)return a.cssText;if(typeof a=="number")return a;throw Error("Value passed to 'css' function must be a 'css' function result: "+a+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+e[o+1],e[0]);return new Z1(r,e,Gh)},c8=(e,t)=>{Hh?e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet):t.forEach(r=>{const n=document.createElement("style"),i=Na.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=r.cssText,e.appendChild(n)})},Hm=Hh?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let r="";for(const n of t.cssRules)r+=n.cssText;return l8(r)})(e):e,Qc,Ms=window,Gm=Ms.trustedTypes,u8=Gm?Gm.emptyScript:"",Qm=Ms.reactiveElementPolyfillSupport,To={toAttribute(e,t){switch(t){case Boolean:e=e?u8:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=e!==null;break;case Number:r=e===null?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch{r=null}}return r}},J1=(e,t)=>t!==e&&(t==t||e==e),Kc={attribute:!0,type:String,converter:To,reflect:!1,hasChanged:J1},ri=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(e){var t;this.finalize(),((t=this.h)!==null&&t!==void 0?t:this.h=[]).push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach((t,r)=>{const n=this._$Ep(r,t);n!==void 0&&(this._$Ev.set(n,r),e.push(n))}),e}static createProperty(e,t=Kc){if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){const r=typeof e=="symbol"?Symbol():"__"+e,n=this.getPropertyDescriptor(e,r,t);n!==void 0&&Object.defineProperty(this.prototype,e,n)}}static getPropertyDescriptor(e,t,r){return{get(){return this[t]},set(n){const i=this[e];this[t]=n,this.requestUpdate(e,i,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||Kc}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),e.h!==void 0&&(this.h=[...e.h]),this.elementProperties=new Map(e.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,r=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const n of r)this.createProperty(n,t[n])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const n of r)t.unshift(Hm(n))}else e!==void 0&&t.push(Hm(e));return t}static _$Ep(e,t){const r=t.attribute;return r===!1?void 0:typeof r=="string"?r:typeof e=="string"?e.toLowerCase():void 0}u(){var e;this._$E_=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(e=this.constructor.h)===null||e===void 0||e.forEach(t=>t(this))}addController(e){var t,r;((t=this._$ES)!==null&&t!==void 0?t:this._$ES=[]).push(e),this.renderRoot!==void 0&&this.isConnected&&((r=e.hostConnected)===null||r===void 0||r.call(e))}removeController(e){var t;(t=this._$ES)===null||t===void 0||t.splice(this._$ES.indexOf(e)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((e,t)=>{this.hasOwnProperty(t)&&(this._$Ei.set(t,this[t]),delete this[t])})}createRenderRoot(){var e;const t=(e=this.shadowRoot)!==null&&e!==void 0?e:this.attachShadow(this.constructor.shadowRootOptions);return c8(t,this.constructor.elementStyles),t}connectedCallback(){var e;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$ES)===null||e===void 0||e.forEach(t=>{var r;return(r=t.hostConnected)===null||r===void 0?void 0:r.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$ES)===null||e===void 0||e.forEach(t=>{var r;return(r=t.hostDisconnected)===null||r===void 0?void 0:r.call(t)})}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$EO(e,t,r=Kc){var n;const i=this.constructor._$Ep(e,r);if(i!==void 0&&r.reflect===!0){const o=(((n=r.converter)===null||n===void 0?void 0:n.toAttribute)!==void 0?r.converter:To).toAttribute(t,r.type);this._$El=e,o==null?this.removeAttribute(i):this.setAttribute(i,o),this._$El=null}}_$AK(e,t){var r;const n=this.constructor,i=n._$Ev.get(e);if(i!==void 0&&this._$El!==i){const o=n.getPropertyOptions(i),a=typeof o.converter=="function"?{fromAttribute:o.converter}:((r=o.converter)===null||r===void 0?void 0:r.fromAttribute)!==void 0?o.converter:To;this._$El=i,this[i]=a.fromAttribute(t,o.type),this._$El=null}}requestUpdate(e,t,r){let n=!0;e!==void 0&&(((r=r||this.constructor.getPropertyOptions(e)).hasChanged||J1)(this[e],t)?(this._$AL.has(e)||this._$AL.set(e,t),r.reflect===!0&&this._$El!==e&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(e,r))):n=!1),!this.isUpdatePending&&n&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((n,i)=>this[i]=n),this._$Ei=void 0);let t=!1;const r=this._$AL;try{t=this.shouldUpdate(r),t?(this.willUpdate(r),(e=this._$ES)===null||e===void 0||e.forEach(n=>{var i;return(i=n.hostUpdate)===null||i===void 0?void 0:i.call(n)}),this.update(r)):this._$Ek()}catch(n){throw t=!1,this._$Ek(),n}t&&this._$AE(r)}willUpdate(e){}_$AE(e){var t;(t=this._$ES)===null||t===void 0||t.forEach(r=>{var n;return(n=r.hostUpdated)===null||n===void 0?void 0:n.call(r)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(e){return!0}update(e){this._$EC!==void 0&&(this._$EC.forEach((t,r)=>this._$EO(r,this[r],t)),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}};ri.finalized=!0,ri.elementProperties=new Map,ri.elementStyles=[],ri.shadowRootOptions={mode:"open"},Qm?.({ReactiveElement:ri}),((Qc=Ms.reactiveElementVersions)!==null&&Qc!==void 0?Qc:Ms.reactiveElementVersions=[]).push("1.6.1");var Yc,js=window,ki=js.trustedTypes,Km=ki?ki.createPolicy("lit-html",{createHTML:e=>e}):void 0,Jr=`lit$${(Math.random()+"").slice(9)}$`,e2="?"+Jr,d8=`<${e2}>`,Ei=document,No=(e="")=>Ei.createComment(e),Io=e=>e===null||typeof e!="object"&&typeof e!="function",t2=Array.isArray,f8=e=>t2(e)||typeof e?.[Symbol.iterator]=="function",ro=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ym=/-->/g,Xm=/>/g,wn=RegExp(`>|[
744
740
  \f\r](?:([^\\s"'>=/]+)([
745
741
  \f\r]*=[
746
742
  \f\r]*(?:[^
747
- \f\r"'\`<>=]|("|')|))|$)`,"g"),Zm=/'/g,Jm=/"/g,r2=/^(?:script|style|textarea|title)$/i,h8=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),Ie=h8(1),Gt=Symbol.for("lit-noChange"),Be=Symbol.for("lit-nothing"),ev=new WeakMap,hi=Ei.createTreeWalker(Ei,129,null,!1),p8=(e,t)=>{const r=e.length-1,n=[];let i,o=t===2?"<svg>":"",a=ro;for(let c=0;c<r;c++){const l=e[c];let u,d,f=-1,h=0;for(;h<l.length&&(a.lastIndex=h,d=a.exec(l),d!==null);)h=a.lastIndex,a===ro?d[1]==="!--"?a=Ym:d[1]!==void 0?a=Xm:d[2]!==void 0?(r2.test(d[2])&&(i=RegExp("</"+d[2],"g")),a=wn):d[3]!==void 0&&(a=wn):a===wn?d[0]===">"?(a=i??ro,f=-1):d[1]===void 0?f=-2:(f=a.lastIndex-d[2].length,u=d[1],a=d[3]===void 0?wn:d[3]==='"'?Jm:Zm):a===Jm||a===Zm?a=wn:a===Ym||a===Xm?a=ro:(a=wn,i=void 0);const p=a===wn&&e[c+1].startsWith("/>")?" ":"";o+=a===ro?l+d8:f>=0?(n.push(u),l.slice(0,f)+"$lit$"+l.slice(f)+Jr+p):l+Jr+(f===-2?(n.push(void 0),c):p)}const s=o+(e[r]||"<?>")+(t===2?"</svg>":"");if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return[Km!==void 0?Km.createHTML(s):s,n]},zs=class{constructor({strings:e,_$litType$:t},r){let n;this.parts=[];let i=0,o=0;const a=e.length-1,s=this.parts,[c,l]=p8(e,t);if(this.el=zs.createElement(c,r),hi.currentNode=this.el.content,t===2){const u=this.el.content,d=u.firstChild;d.remove(),u.append(...d.childNodes)}for(;(n=hi.nextNode())!==null&&s.length<a;){if(n.nodeType===1){if(n.hasAttributes()){const u=[];for(const d of n.getAttributeNames())if(d.endsWith("$lit$")||d.startsWith(Jr)){const f=l[o++];if(u.push(d),f!==void 0){const h=n.getAttribute(f.toLowerCase()+"$lit$").split(Jr),p=/([.?@])?(.*)/.exec(f);s.push({type:1,index:i,name:p[2],strings:h,ctor:p[1]==="."?v8:p[1]==="?"?g8:p[1]==="@"?b8:Jl})}else s.push({type:6,index:i})}for(const d of u)n.removeAttribute(d)}if(r2.test(n.tagName)){const u=n.textContent.split(Jr),d=u.length-1;if(d>0){n.textContent=ki?ki.emptyScript:"";for(let f=0;f<d;f++)n.append(u[f],No()),hi.nextNode(),s.push({type:2,index:++i});n.append(u[d],No())}}}else if(n.nodeType===8)if(n.data===e2)s.push({type:2,index:i});else{let u=-1;for(;(u=n.data.indexOf(Jr,u+1))!==-1;)s.push({type:7,index:i}),u+=Jr.length-1}i++}}static createElement(e,t){const r=Ei.createElement("template");return r.innerHTML=e,r}};function Oi(e,t,r=e,n){var i,o,a,s;if(t===Gt)return t;let c=n!==void 0?(i=r._$Co)===null||i===void 0?void 0:i[n]:r._$Cl;const l=Io(t)?void 0:t._$litDirective$;return c?.constructor!==l&&((o=c?._$AO)===null||o===void 0||o.call(c,!1),l===void 0?c=void 0:(c=new l(e),c._$AT(e,r,n)),n!==void 0?((a=(s=r)._$Co)!==null&&a!==void 0?a:s._$Co=[])[n]=c:r._$Cl=c),c!==void 0&&(t=Oi(e,c._$AS(e,t.values),c,n)),t}var m8=class{constructor(e,t){this.u=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(e){var t;const{el:{content:r},parts:n}=this._$AD,i=((t=e?.creationScope)!==null&&t!==void 0?t:Ei).importNode(r,!0);hi.currentNode=i;let o=hi.nextNode(),a=0,s=0,c=n[0];for(;c!==void 0;){if(a===c.index){let l;c.type===2?l=new Zl(o,o.nextSibling,this,e):c.type===1?l=new c.ctor(o,c.name,c.strings,this,e):c.type===6&&(l=new $8(o,this,e)),this.u.push(l),c=n[++s]}a!==c?.index&&(o=hi.nextNode(),a++)}return i}p(e){let t=0;for(const r of this.u)r!==void 0&&(r.strings!==void 0?(r._$AI(e,r,t),t+=r.strings.length-2):r._$AI(e[t])),t++}},Zl=class{constructor(e,t,r,n){var i;this.type=2,this._$AH=Be,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=r,this.options=n,this._$Cm=(i=n?.isConnected)===null||i===void 0||i}get _$AU(){var e,t;return(t=(e=this._$AM)===null||e===void 0?void 0:e._$AU)!==null&&t!==void 0?t:this._$Cm}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&e.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=Oi(this,e,t),Io(e)?e===Be||e==null||e===""?(this._$AH!==Be&&this._$AR(),this._$AH=Be):e!==this._$AH&&e!==Gt&&this.g(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):f8(e)?this.k(e):this.g(e)}O(e,t=this._$AB){return this._$AA.parentNode.insertBefore(e,t)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}g(e){this._$AH!==Be&&Io(this._$AH)?this._$AA.nextSibling.data=e:this.T(Ei.createTextNode(e)),this._$AH=e}$(e){var t;const{values:r,_$litType$:n}=e,i=typeof n=="number"?this._$AC(e):(n.el===void 0&&(n.el=zs.createElement(n.h,this.options)),n);if(((t=this._$AH)===null||t===void 0?void 0:t._$AD)===i)this._$AH.p(r);else{const o=new m8(i,this),a=o.v(this.options);o.p(r),this.T(a),this._$AH=o}}_$AC(e){let t=ev.get(e.strings);return t===void 0&&ev.set(e.strings,t=new zs(e)),t}k(e){t2(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let r,n=0;for(const i of e)n===t.length?t.push(r=new Zl(this.O(No()),this.O(No()),this,this.options)):r=t[n],r._$AI(i),n++;n<t.length&&(this._$AR(r&&r._$AB.nextSibling,n),t.length=n)}_$AR(e=this._$AA.nextSibling,t){var r;for((r=this._$AP)===null||r===void 0||r.call(this,!1,!0,t);e&&e!==this._$AB;){const n=e.nextSibling;e.remove(),e=n}}setConnected(e){var t;this._$AM===void 0&&(this._$Cm=e,(t=this._$AP)===null||t===void 0||t.call(this,e))}},Jl=class{constructor(e,t,r,n,i){this.type=1,this._$AH=Be,this._$AN=void 0,this.element=e,this.name=t,this._$AM=n,this.options=i,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=Be}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,r,n){const i=this.strings;let o=!1;if(i===void 0)e=Oi(this,e,t,0),o=!Io(e)||e!==this._$AH&&e!==Gt,o&&(this._$AH=e);else{const a=e;let s,c;for(e=i[0],s=0;s<i.length-1;s++)c=Oi(this,a[r+s],t,s),c===Gt&&(c=this._$AH[s]),o||(o=!Io(c)||c!==this._$AH[s]),c===Be?e=Be:e!==Be&&(e+=(c??"")+i[s+1]),this._$AH[s]=c}o&&!n&&this.j(e)}j(e){e===Be?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},v8=class extends Jl{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===Be?void 0:e}},y8=ki?ki.emptyScript:"",g8=class extends Jl{constructor(){super(...arguments),this.type=4}j(e){e&&e!==Be?this.element.setAttribute(this.name,y8):this.element.removeAttribute(this.name)}},b8=class extends Jl{constructor(e,t,r,n,i){super(e,t,r,n,i),this.type=5}_$AI(e,t=this){var r;if((e=(r=Oi(this,e,t,0))!==null&&r!==void 0?r:Be)===Gt)return;const n=this._$AH,i=e===Be&&n!==Be||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,o=e!==Be&&(n===Be||i);i&&this.element.removeEventListener(this.name,this,n),o&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t,r;typeof this._$AH=="function"?this._$AH.call((r=(t=this.options)===null||t===void 0?void 0:t.host)!==null&&r!==void 0?r:this.element,e):this._$AH.handleEvent(e)}},$8=class{constructor(e,t,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){Oi(this,e)}},tv=js.litHtmlPolyfillSupport;tv?.(zs,Zl),((Kc=js.litHtmlVersions)!==null&&Kc!==void 0?Kc:js.litHtmlVersions=[]).push("2.6.1");var w8=(e,t,r)=>{var n,i;const o=(n=r?.renderBefore)!==null&&n!==void 0?n:t;let a=o._$litPart$;if(a===void 0){const s=(i=r?.renderBefore)!==null&&i!==void 0?i:null;o._$litPart$=a=new Zl(t.insertBefore(No(),s),s,void 0,r??{})}return a._$AI(e),a},Yc,Xc,yo=class extends ri{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var e,t;const r=super.createRenderRoot();return(e=(t=this.renderOptions).renderBefore)!==null&&e!==void 0||(t.renderBefore=r.firstChild),r}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Dt=w8(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Dt)===null||e===void 0||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Dt)===null||e===void 0||e.setConnected(!1)}render(){return Gt}};yo.finalized=!0,yo._$litElement$=!0,(Yc=globalThis.litElementHydrateSupport)===null||Yc===void 0||Yc.call(globalThis,{LitElement:yo});var rv=globalThis.litElementPolyfillSupport;rv?.({LitElement:yo});((Xc=globalThis.litElementVersions)!==null&&Xc!==void 0?Xc:globalThis.litElementVersions=[]).push("3.2.0");/*! Bundled license information:
743
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Zm=/'/g,Jm=/"/g,r2=/^(?:script|style|textarea|title)$/i,h8=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),Ie=h8(1),Gt=Symbol.for("lit-noChange"),Be=Symbol.for("lit-nothing"),ev=new WeakMap,hi=Ei.createTreeWalker(Ei,129,null,!1),p8=(e,t)=>{const r=e.length-1,n=[];let i,o=t===2?"<svg>":"",a=ro;for(let c=0;c<r;c++){const l=e[c];let u,d,f=-1,h=0;for(;h<l.length&&(a.lastIndex=h,d=a.exec(l),d!==null);)h=a.lastIndex,a===ro?d[1]==="!--"?a=Ym:d[1]!==void 0?a=Xm:d[2]!==void 0?(r2.test(d[2])&&(i=RegExp("</"+d[2],"g")),a=wn):d[3]!==void 0&&(a=wn):a===wn?d[0]===">"?(a=i??ro,f=-1):d[1]===void 0?f=-2:(f=a.lastIndex-d[2].length,u=d[1],a=d[3]===void 0?wn:d[3]==='"'?Jm:Zm):a===Jm||a===Zm?a=wn:a===Ym||a===Xm?a=ro:(a=wn,i=void 0);const p=a===wn&&e[c+1].startsWith("/>")?" ":"";o+=a===ro?l+d8:f>=0?(n.push(u),l.slice(0,f)+"$lit$"+l.slice(f)+Jr+p):l+Jr+(f===-2?(n.push(void 0),c):p)}const s=o+(e[r]||"<?>")+(t===2?"</svg>":"");if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return[Km!==void 0?Km.createHTML(s):s,n]},zs=class{constructor({strings:e,_$litType$:t},r){let n;this.parts=[];let i=0,o=0;const a=e.length-1,s=this.parts,[c,l]=p8(e,t);if(this.el=zs.createElement(c,r),hi.currentNode=this.el.content,t===2){const u=this.el.content,d=u.firstChild;d.remove(),u.append(...d.childNodes)}for(;(n=hi.nextNode())!==null&&s.length<a;){if(n.nodeType===1){if(n.hasAttributes()){const u=[];for(const d of n.getAttributeNames())if(d.endsWith("$lit$")||d.startsWith(Jr)){const f=l[o++];if(u.push(d),f!==void 0){const h=n.getAttribute(f.toLowerCase()+"$lit$").split(Jr),p=/([.?@])?(.*)/.exec(f);s.push({type:1,index:i,name:p[2],strings:h,ctor:p[1]==="."?v8:p[1]==="?"?g8:p[1]==="@"?b8:Jl})}else s.push({type:6,index:i})}for(const d of u)n.removeAttribute(d)}if(r2.test(n.tagName)){const u=n.textContent.split(Jr),d=u.length-1;if(d>0){n.textContent=ki?ki.emptyScript:"";for(let f=0;f<d;f++)n.append(u[f],No()),hi.nextNode(),s.push({type:2,index:++i});n.append(u[d],No())}}}else if(n.nodeType===8)if(n.data===e2)s.push({type:2,index:i});else{let u=-1;for(;(u=n.data.indexOf(Jr,u+1))!==-1;)s.push({type:7,index:i}),u+=Jr.length-1}i++}}static createElement(e,t){const r=Ei.createElement("template");return r.innerHTML=e,r}};function Oi(e,t,r=e,n){var i,o,a,s;if(t===Gt)return t;let c=n!==void 0?(i=r._$Co)===null||i===void 0?void 0:i[n]:r._$Cl;const l=Io(t)?void 0:t._$litDirective$;return c?.constructor!==l&&((o=c?._$AO)===null||o===void 0||o.call(c,!1),l===void 0?c=void 0:(c=new l(e),c._$AT(e,r,n)),n!==void 0?((a=(s=r)._$Co)!==null&&a!==void 0?a:s._$Co=[])[n]=c:r._$Cl=c),c!==void 0&&(t=Oi(e,c._$AS(e,t.values),c,n)),t}var m8=class{constructor(e,t){this.u=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(e){var t;const{el:{content:r},parts:n}=this._$AD,i=((t=e?.creationScope)!==null&&t!==void 0?t:Ei).importNode(r,!0);hi.currentNode=i;let o=hi.nextNode(),a=0,s=0,c=n[0];for(;c!==void 0;){if(a===c.index){let l;c.type===2?l=new Zl(o,o.nextSibling,this,e):c.type===1?l=new c.ctor(o,c.name,c.strings,this,e):c.type===6&&(l=new $8(o,this,e)),this.u.push(l),c=n[++s]}a!==c?.index&&(o=hi.nextNode(),a++)}return i}p(e){let t=0;for(const r of this.u)r!==void 0&&(r.strings!==void 0?(r._$AI(e,r,t),t+=r.strings.length-2):r._$AI(e[t])),t++}},Zl=class{constructor(e,t,r,n){var i;this.type=2,this._$AH=Be,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=r,this.options=n,this._$Cm=(i=n?.isConnected)===null||i===void 0||i}get _$AU(){var e,t;return(t=(e=this._$AM)===null||e===void 0?void 0:e._$AU)!==null&&t!==void 0?t:this._$Cm}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&e.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=Oi(this,e,t),Io(e)?e===Be||e==null||e===""?(this._$AH!==Be&&this._$AR(),this._$AH=Be):e!==this._$AH&&e!==Gt&&this.g(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):f8(e)?this.k(e):this.g(e)}O(e,t=this._$AB){return this._$AA.parentNode.insertBefore(e,t)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}g(e){this._$AH!==Be&&Io(this._$AH)?this._$AA.nextSibling.data=e:this.T(Ei.createTextNode(e)),this._$AH=e}$(e){var t;const{values:r,_$litType$:n}=e,i=typeof n=="number"?this._$AC(e):(n.el===void 0&&(n.el=zs.createElement(n.h,this.options)),n);if(((t=this._$AH)===null||t===void 0?void 0:t._$AD)===i)this._$AH.p(r);else{const o=new m8(i,this),a=o.v(this.options);o.p(r),this.T(a),this._$AH=o}}_$AC(e){let t=ev.get(e.strings);return t===void 0&&ev.set(e.strings,t=new zs(e)),t}k(e){t2(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let r,n=0;for(const i of e)n===t.length?t.push(r=new Zl(this.O(No()),this.O(No()),this,this.options)):r=t[n],r._$AI(i),n++;n<t.length&&(this._$AR(r&&r._$AB.nextSibling,n),t.length=n)}_$AR(e=this._$AA.nextSibling,t){var r;for((r=this._$AP)===null||r===void 0||r.call(this,!1,!0,t);e&&e!==this._$AB;){const n=e.nextSibling;e.remove(),e=n}}setConnected(e){var t;this._$AM===void 0&&(this._$Cm=e,(t=this._$AP)===null||t===void 0||t.call(this,e))}},Jl=class{constructor(e,t,r,n,i){this.type=1,this._$AH=Be,this._$AN=void 0,this.element=e,this.name=t,this._$AM=n,this.options=i,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=Be}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,r,n){const i=this.strings;let o=!1;if(i===void 0)e=Oi(this,e,t,0),o=!Io(e)||e!==this._$AH&&e!==Gt,o&&(this._$AH=e);else{const a=e;let s,c;for(e=i[0],s=0;s<i.length-1;s++)c=Oi(this,a[r+s],t,s),c===Gt&&(c=this._$AH[s]),o||(o=!Io(c)||c!==this._$AH[s]),c===Be?e=Be:e!==Be&&(e+=(c??"")+i[s+1]),this._$AH[s]=c}o&&!n&&this.j(e)}j(e){e===Be?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},v8=class extends Jl{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===Be?void 0:e}},y8=ki?ki.emptyScript:"",g8=class extends Jl{constructor(){super(...arguments),this.type=4}j(e){e&&e!==Be?this.element.setAttribute(this.name,y8):this.element.removeAttribute(this.name)}},b8=class extends Jl{constructor(e,t,r,n,i){super(e,t,r,n,i),this.type=5}_$AI(e,t=this){var r;if((e=(r=Oi(this,e,t,0))!==null&&r!==void 0?r:Be)===Gt)return;const n=this._$AH,i=e===Be&&n!==Be||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,o=e!==Be&&(n===Be||i);i&&this.element.removeEventListener(this.name,this,n),o&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t,r;typeof this._$AH=="function"?this._$AH.call((r=(t=this.options)===null||t===void 0?void 0:t.host)!==null&&r!==void 0?r:this.element,e):this._$AH.handleEvent(e)}},$8=class{constructor(e,t,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){Oi(this,e)}},tv=js.litHtmlPolyfillSupport;tv?.(zs,Zl),((Yc=js.litHtmlVersions)!==null&&Yc!==void 0?Yc:js.litHtmlVersions=[]).push("2.6.1");var w8=(e,t,r)=>{var n,i;const o=(n=r?.renderBefore)!==null&&n!==void 0?n:t;let a=o._$litPart$;if(a===void 0){const s=(i=r?.renderBefore)!==null&&i!==void 0?i:null;o._$litPart$=a=new Zl(t.insertBefore(No(),s),s,void 0,r??{})}return a._$AI(e),a},Xc,Zc,yo=class extends ri{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var e,t;const r=super.createRenderRoot();return(e=(t=this.renderOptions).renderBefore)!==null&&e!==void 0||(t.renderBefore=r.firstChild),r}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Dt=w8(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Dt)===null||e===void 0||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Dt)===null||e===void 0||e.setConnected(!1)}render(){return Gt}};yo.finalized=!0,yo._$litElement$=!0,(Xc=globalThis.litElementHydrateSupport)===null||Xc===void 0||Xc.call(globalThis,{LitElement:yo});var rv=globalThis.litElementPolyfillSupport;rv?.({LitElement:yo});((Zc=globalThis.litElementVersions)!==null&&Zc!==void 0?Zc:globalThis.litElementVersions=[]).push("3.2.0");/*! Bundled license information:
748
744
 
749
745
  @lit/reactive-element/css-tag.js:
750
746
  (**
@@ -844,7 +840,7 @@ lit-html/is-server.js:
844
840
  max-width: var(--auto-size-available-width) !important;
845
841
  max-height: var(--auto-size-available-height) !important;
846
842
  }
847
- `;function nv(e){const t=e.tagName.toLowerCase();return e.getAttribute("tabindex")==="-1"||e.hasAttribute("disabled")||e.hasAttribute("aria-disabled")&&e.getAttribute("aria-disabled")!=="false"||t==="input"&&e.getAttribute("type")==="radio"&&!e.hasAttribute("checked")||e.offsetParent===null||window.getComputedStyle(e).visibility==="hidden"?!1:(t==="audio"||t==="video")&&e.hasAttribute("controls")||e.hasAttribute("tabindex")||e.hasAttribute("contenteditable")&&e.getAttribute("contenteditable")!=="false"?!0:["button","input","select","textarea","a","audio","video","summary"].includes(t)}function n2(e){var t,r;const n=[];function i(s){s instanceof HTMLElement&&(n.push(s),s.shadowRoot!==null&&s.shadowRoot.mode==="open"&&i(s.shadowRoot)),[...s.children].forEach(c=>i(c))}i(e);const o=(t=n.find(s=>nv(s)))!=null?t:null,a=(r=n.reverse().find(s=>nv(s)))!=null?r:null;return{start:o,end:a}}function x8(e,t){return{top:Math.round(e.getBoundingClientRect().top-t.getBoundingClientRect().top),left:Math.round(e.getBoundingClientRect().left-t.getBoundingClientRect().left)}}var xd=new Set;function S8(){const e=document.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}function iv(e){if(xd.add(e),!document.body.classList.contains("sl-scroll-lock")){const t=S8();document.body.classList.add("sl-scroll-lock"),document.body.style.setProperty("--sl-scroll-lock-size",`${t}px`)}}function ov(e){xd.delete(e),xd.size===0&&(document.body.classList.remove("sl-scroll-lock"),document.body.style.removeProperty("--sl-scrollbar-width"))}function k8(e,t,r="vertical",n="smooth"){const i=x8(e,t),o=i.top+t.scrollTop,a=i.left+t.scrollLeft,s=t.scrollLeft,c=t.scrollLeft+t.offsetWidth,l=t.scrollTop,u=t.scrollTop+t.offsetHeight;(r==="horizontal"||r==="both")&&(a<s?t.scrollTo({left:a,behavior:n}):a+e.clientWidth>c&&t.scrollTo({left:a-t.offsetWidth+e.clientWidth,behavior:n})),(r==="vertical"||r==="both")&&(o<l?t.scrollTo({top:o,behavior:n}):o+e.clientHeight>u&&t.scrollTo({top:o-t.offsetHeight+e.clientHeight,behavior:n}))}function hn(e,t){return new Promise(r=>{function n(i){i.target===e&&(e.removeEventListener(t,n),r())}e.addEventListener(t,n)})}var i2=Object.defineProperty,E8=Object.defineProperties,O8=Object.getOwnPropertyDescriptor,C8=Object.getOwnPropertyDescriptors,Us=Object.getOwnPropertySymbols,o2=Object.prototype.hasOwnProperty,a2=Object.prototype.propertyIsEnumerable,av=(e,t,r)=>t in e?i2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,qe=(e,t)=>{for(var r in t||(t={}))o2.call(t,r)&&av(e,r,t[r]);if(Us)for(var r of Us(t))a2.call(t,r)&&av(e,r,t[r]);return e},sr=(e,t)=>E8(e,C8(t)),Gh=(e,t)=>{var r={};for(var n in e)o2.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Us)for(var n of Us(e))t.indexOf(n)<0&&a2.call(e,n)&&(r[n]=e[n]);return r},$=(e,t,r,n)=>{for(var i=n>1?void 0:n?O8(t,r):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(i=(n?a(t,r,i):a(i))||i);return n&&i&&i2(t,r,i),i};function tr(e,t,r){return new Promise(n=>{if(r?.duration===1/0)throw new Error("Promise-based animations must be finite.");const i=e.animate(t,sr(qe({},r),{duration:P8()?0:r.duration}));i.addEventListener("cancel",n,{once:!0}),i.addEventListener("finish",n,{once:!0})})}function sv(e){return e=e.toString().toLowerCase(),e.indexOf("ms")>-1?parseFloat(e):e.indexOf("s")>-1?parseFloat(e)*1e3:parseFloat(e)}function P8(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}function yr(e){return Promise.all(e.getAnimations().map(t=>new Promise(r=>{const n=requestAnimationFrame(r);t.addEventListener("cancel",()=>n,{once:!0}),t.addEventListener("finish",()=>n,{once:!0}),t.cancel()})))}var s2=new Map,T8=new WeakMap;function N8(e){return e??{keyframes:[],options:{duration:0}}}function lv(e,t){return t.toLowerCase()==="rtl"?{keyframes:e.rtlKeyframes||e.keyframes,options:e.options}:e}function ur(e,t){s2.set(e,N8(t))}function rr(e,t,r){const n=T8.get(e);if(n?.[t])return lv(n[t],r.dir);const i=s2.get(t);return i?lv(i,r.dir):{keyframes:[],options:{duration:0}}}var Sd=new Set,I8=new MutationObserver(u2),li=new Map,l2=document.documentElement.dir||"ltr",c2=document.documentElement.lang||navigator.language,go;I8.observe(document.documentElement,{attributes:!0,attributeFilter:["dir","lang"]});function A8(...e){e.map(t=>{const r=t.$code.toLowerCase();li.has(r)?li.set(r,Object.assign(Object.assign({},li.get(r)),t)):li.set(r,t),go||(go=t)}),u2()}function u2(){l2=document.documentElement.dir||"ltr",c2=document.documentElement.lang||navigator.language,[...Sd.keys()].map(e=>{typeof e.requestUpdate=="function"&&e.requestUpdate()})}var D8=class{constructor(e){this.host=e,this.host.addController(this)}hostConnected(){Sd.add(this.host)}hostDisconnected(){Sd.delete(this.host)}dir(){return`${this.host.dir||l2}`.toLowerCase()}lang(){return`${this.host.lang||c2}`.toLowerCase()}term(e,...t){var r,n;const i=new Intl.Locale(this.lang()),o=i?.language.toLowerCase(),a=(n=(r=i?.region)===null||r===void 0?void 0:r.toLowerCase())!==null&&n!==void 0?n:"",s=li.get(`${o}-${a}`),c=li.get(o);let l;if(s&&s[e])l=s[e];else if(c&&c[e])l=c[e];else if(go&&go[e])l=go[e];else return console.error(`No translation found for: ${String(e)}`),String(e);return typeof l=="function"?l(...t):l}date(e,t){return e=new Date(e),new Intl.DateTimeFormat(this.lang(),t).format(e)}number(e,t){return e=Number(e),isNaN(e)?"":new Intl.NumberFormat(this.lang(),t).format(e)}relativeTime(e,t,r){return new Intl.RelativeTimeFormat(this.lang(),r).format(e,t)}},Bn=class extends D8{},R8={$code:"en",$name:"English",$dir:"ltr",clearEntry:"Clear entry",close:"Close",copy:"Copy",numOptionsSelected:e=>e===0?"No options selected":e===1?"1 option selected":`${e} options selected`,currentValue:"Current value",hidePassword:"Hide password",loading:"Loading",progress:"Progress",remove:"Remove",resize:"Resize",scrollToEnd:"Scroll to end",scrollToStart:"Scroll to start",selectAColorFromTheScreen:"Select a color from the screen",showPassword:"Show password",toggleColorFormat:"Toggle color format"};A8(R8);function De(e,t){const r=qe({waitUntilFirstUpdate:!1},t);return(n,i)=>{const{update:o}=n,a=Array.isArray(e)?e:[e];n.update=function(s){a.forEach(c=>{const l=c;if(s.has(l)){const u=s.get(l),d=this[l];u!==d&&(!r.waitUntilFirstUpdate||this.hasUpdated)&&this[i](u,d)}}),o.call(this,s)}}}var Xr={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Qh=e=>(...t)=>({_$litDirective$:e,values:t}),Kh=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r){this._$Ct=e,this._$AM=t,this._$Ci=r}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};/*! Bundled license information:
843
+ `;function nv(e){const t=e.tagName.toLowerCase();return e.getAttribute("tabindex")==="-1"||e.hasAttribute("disabled")||e.hasAttribute("aria-disabled")&&e.getAttribute("aria-disabled")!=="false"||t==="input"&&e.getAttribute("type")==="radio"&&!e.hasAttribute("checked")||e.offsetParent===null||window.getComputedStyle(e).visibility==="hidden"?!1:(t==="audio"||t==="video")&&e.hasAttribute("controls")||e.hasAttribute("tabindex")||e.hasAttribute("contenteditable")&&e.getAttribute("contenteditable")!=="false"?!0:["button","input","select","textarea","a","audio","video","summary"].includes(t)}function n2(e){var t,r;const n=[];function i(s){s instanceof HTMLElement&&(n.push(s),s.shadowRoot!==null&&s.shadowRoot.mode==="open"&&i(s.shadowRoot)),[...s.children].forEach(c=>i(c))}i(e);const o=(t=n.find(s=>nv(s)))!=null?t:null,a=(r=n.reverse().find(s=>nv(s)))!=null?r:null;return{start:o,end:a}}function x8(e,t){return{top:Math.round(e.getBoundingClientRect().top-t.getBoundingClientRect().top),left:Math.round(e.getBoundingClientRect().left-t.getBoundingClientRect().left)}}var Sd=new Set;function S8(){const e=document.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}function iv(e){if(Sd.add(e),!document.body.classList.contains("sl-scroll-lock")){const t=S8();document.body.classList.add("sl-scroll-lock"),document.body.style.setProperty("--sl-scroll-lock-size",`${t}px`)}}function ov(e){Sd.delete(e),Sd.size===0&&(document.body.classList.remove("sl-scroll-lock"),document.body.style.removeProperty("--sl-scrollbar-width"))}function k8(e,t,r="vertical",n="smooth"){const i=x8(e,t),o=i.top+t.scrollTop,a=i.left+t.scrollLeft,s=t.scrollLeft,c=t.scrollLeft+t.offsetWidth,l=t.scrollTop,u=t.scrollTop+t.offsetHeight;(r==="horizontal"||r==="both")&&(a<s?t.scrollTo({left:a,behavior:n}):a+e.clientWidth>c&&t.scrollTo({left:a-t.offsetWidth+e.clientWidth,behavior:n})),(r==="vertical"||r==="both")&&(o<l?t.scrollTo({top:o,behavior:n}):o+e.clientHeight>u&&t.scrollTo({top:o-t.offsetHeight+e.clientHeight,behavior:n}))}function hn(e,t){return new Promise(r=>{function n(i){i.target===e&&(e.removeEventListener(t,n),r())}e.addEventListener(t,n)})}var i2=Object.defineProperty,E8=Object.defineProperties,O8=Object.getOwnPropertyDescriptor,C8=Object.getOwnPropertyDescriptors,Us=Object.getOwnPropertySymbols,o2=Object.prototype.hasOwnProperty,a2=Object.prototype.propertyIsEnumerable,av=(e,t,r)=>t in e?i2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,qe=(e,t)=>{for(var r in t||(t={}))o2.call(t,r)&&av(e,r,t[r]);if(Us)for(var r of Us(t))a2.call(t,r)&&av(e,r,t[r]);return e},sr=(e,t)=>E8(e,C8(t)),Qh=(e,t)=>{var r={};for(var n in e)o2.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Us)for(var n of Us(e))t.indexOf(n)<0&&a2.call(e,n)&&(r[n]=e[n]);return r},$=(e,t,r,n)=>{for(var i=n>1?void 0:n?O8(t,r):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(i=(n?a(t,r,i):a(i))||i);return n&&i&&i2(t,r,i),i};function tr(e,t,r){return new Promise(n=>{if(r?.duration===1/0)throw new Error("Promise-based animations must be finite.");const i=e.animate(t,sr(qe({},r),{duration:P8()?0:r.duration}));i.addEventListener("cancel",n,{once:!0}),i.addEventListener("finish",n,{once:!0})})}function sv(e){return e=e.toString().toLowerCase(),e.indexOf("ms")>-1?parseFloat(e):e.indexOf("s")>-1?parseFloat(e)*1e3:parseFloat(e)}function P8(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}function yr(e){return Promise.all(e.getAnimations().map(t=>new Promise(r=>{const n=requestAnimationFrame(r);t.addEventListener("cancel",()=>n,{once:!0}),t.addEventListener("finish",()=>n,{once:!0}),t.cancel()})))}var s2=new Map,T8=new WeakMap;function N8(e){return e??{keyframes:[],options:{duration:0}}}function lv(e,t){return t.toLowerCase()==="rtl"?{keyframes:e.rtlKeyframes||e.keyframes,options:e.options}:e}function ur(e,t){s2.set(e,N8(t))}function rr(e,t,r){const n=T8.get(e);if(n?.[t])return lv(n[t],r.dir);const i=s2.get(t);return i?lv(i,r.dir):{keyframes:[],options:{duration:0}}}var kd=new Set,I8=new MutationObserver(u2),li=new Map,l2=document.documentElement.dir||"ltr",c2=document.documentElement.lang||navigator.language,go;I8.observe(document.documentElement,{attributes:!0,attributeFilter:["dir","lang"]});function A8(...e){e.map(t=>{const r=t.$code.toLowerCase();li.has(r)?li.set(r,Object.assign(Object.assign({},li.get(r)),t)):li.set(r,t),go||(go=t)}),u2()}function u2(){l2=document.documentElement.dir||"ltr",c2=document.documentElement.lang||navigator.language,[...kd.keys()].map(e=>{typeof e.requestUpdate=="function"&&e.requestUpdate()})}var D8=class{constructor(e){this.host=e,this.host.addController(this)}hostConnected(){kd.add(this.host)}hostDisconnected(){kd.delete(this.host)}dir(){return`${this.host.dir||l2}`.toLowerCase()}lang(){return`${this.host.lang||c2}`.toLowerCase()}term(e,...t){var r,n;const i=new Intl.Locale(this.lang()),o=i?.language.toLowerCase(),a=(n=(r=i?.region)===null||r===void 0?void 0:r.toLowerCase())!==null&&n!==void 0?n:"",s=li.get(`${o}-${a}`),c=li.get(o);let l;if(s&&s[e])l=s[e];else if(c&&c[e])l=c[e];else if(go&&go[e])l=go[e];else return console.error(`No translation found for: ${String(e)}`),String(e);return typeof l=="function"?l(...t):l}date(e,t){return e=new Date(e),new Intl.DateTimeFormat(this.lang(),t).format(e)}number(e,t){return e=Number(e),isNaN(e)?"":new Intl.NumberFormat(this.lang(),t).format(e)}relativeTime(e,t,r){return new Intl.RelativeTimeFormat(this.lang(),r).format(e,t)}},Bn=class extends D8{},R8={$code:"en",$name:"English",$dir:"ltr",clearEntry:"Clear entry",close:"Close",copy:"Copy",numOptionsSelected:e=>e===0?"No options selected":e===1?"1 option selected":`${e} options selected`,currentValue:"Current value",hidePassword:"Hide password",loading:"Loading",progress:"Progress",remove:"Remove",resize:"Resize",scrollToEnd:"Scroll to end",scrollToStart:"Scroll to start",selectAColorFromTheScreen:"Select a color from the screen",showPassword:"Show password",toggleColorFormat:"Toggle color format"};A8(R8);function De(e,t){const r=qe({waitUntilFirstUpdate:!1},t);return(n,i)=>{const{update:o}=n,a=Array.isArray(e)?e:[e];n.update=function(s){a.forEach(c=>{const l=c;if(s.has(l)){const u=s.get(l),d=this[l];u!==d&&(!r.waitUntilFirstUpdate||this.hasUpdated)&&this[i](u,d)}}),o.call(this,s)}}}var Xr={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Kh=e=>(...t)=>({_$litDirective$:e,values:t}),Yh=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r){this._$Ct=e,this._$AM=t,this._$Ci=r}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};/*! Bundled license information:
848
844
 
849
845
  lit-html/directive.js:
850
846
  (**
@@ -852,7 +848,7 @@ lit-html/directive.js:
852
848
  * Copyright 2017 Google LLC
853
849
  * SPDX-License-Identifier: BSD-3-Clause
854
850
  *)
855
- */var Ct=Qh(class extends Kh{constructor(e){var t;if(super(e),e.type!==Xr.ATTRIBUTE||e.name!=="class"||((t=e.strings)===null||t===void 0?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter(t=>e[t]).join(" ")+" "}update(e,[t]){var r,n;if(this.nt===void 0){this.nt=new Set,e.strings!==void 0&&(this.st=new Set(e.strings.join(" ").split(/\s/).filter(o=>o!=="")));for(const o in t)t[o]&&!(!((r=this.st)===null||r===void 0)&&r.has(o))&&this.nt.add(o);return this.render(t)}const i=e.element.classList;this.nt.forEach(o=>{o in t||(i.remove(o),this.nt.delete(o))});for(const o in t){const a=!!t[o];a===this.nt.has(o)||((n=this.st)===null||n===void 0?void 0:n.has(o))||(a?(i.add(o),this.nt.add(o)):(i.remove(o),this.nt.delete(o)))}return Gt}});/*! Bundled license information:
851
+ */var Ct=Kh(class extends Yh{constructor(e){var t;if(super(e),e.type!==Xr.ATTRIBUTE||e.name!=="class"||((t=e.strings)===null||t===void 0?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter(t=>e[t]).join(" ")+" "}update(e,[t]){var r,n;if(this.nt===void 0){this.nt=new Set,e.strings!==void 0&&(this.st=new Set(e.strings.join(" ").split(/\s/).filter(o=>o!=="")));for(const o in t)t[o]&&!(!((r=this.st)===null||r===void 0)&&r.has(o))&&this.nt.add(o);return this.render(t)}const i=e.element.classList;this.nt.forEach(o=>{o in t||(i.remove(o),this.nt.delete(o))});for(const o in t){const a=!!t[o];a===this.nt.has(o)||((n=this.st)===null||n===void 0?void 0:n.has(o))||(a?(i.add(o),this.nt.add(o)):(i.remove(o),this.nt.delete(o)))}return Gt}});/*! Bundled license information:
856
852
 
857
853
  lit-html/directives/class-map.js:
858
854
  (**
@@ -860,7 +856,7 @@ lit-html/directives/class-map.js:
860
856
  * Copyright 2018 Google LLC
861
857
  * SPDX-License-Identifier: BSD-3-Clause
862
858
  *)
863
- */var _t=e=>t=>typeof t=="function"?((r,n)=>(customElements.define(r,n),n))(e,t):((r,n)=>{const{kind:i,elements:o}=n;return{kind:i,elements:o,finisher(a){customElements.define(r,a)}}})(e,t),F8=(e,t)=>t.kind==="method"&&t.descriptor&&!("value"in t.descriptor)?sr(qe({},t),{finisher(r){r.createProperty(t.key,e)}}):{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:t.key,initializer(){typeof t.initializer=="function"&&(this[t.key]=t.initializer.call(this))},finisher(r){r.createProperty(t.key,e)}};function k(e){return(t,r)=>r!==void 0?((n,i,o)=>{i.constructor.createProperty(o,n)})(e,t,r):F8(e,t)}function Er(e){return k(sr(qe({},e),{state:!0}))}var L8=({finisher:e,descriptor:t})=>(r,n)=>{var i;if(n===void 0){const o=(i=r.originalKey)!==null&&i!==void 0?i:r.key,a=t!=null?{kind:"method",placement:"prototype",key:o,descriptor:t(r.key)}:sr(qe({},r),{key:o});return e!=null&&(a.finisher=function(s){e(s,o)}),a}{const o=r.constructor;t!==void 0&&Object.defineProperty(r,n,t(n)),e?.(o,n)}};function Xe(e,t){return L8({descriptor:r=>{const n={get(){var i,o;return(o=(i=this.renderRoot)===null||i===void 0?void 0:i.querySelector(e))!==null&&o!==void 0?o:null},enumerable:!0,configurable:!0};if(t){const i=typeof r=="symbol"?Symbol():"__"+r;n.get=function(){var o,a;return this[i]===void 0&&(this[i]=(a=(o=this.renderRoot)===null||o===void 0?void 0:o.querySelector(e))!==null&&a!==void 0?a:null),this[i]}}return n}})}var Zc;((Zc=window.HTMLSlotElement)===null||Zc===void 0?void 0:Zc.prototype.assignedElements)!=null;var ht=class extends yo{emit(e,t){const r=new CustomEvent(e,qe({bubbles:!0,cancelable:!1,composed:!0,detail:{}},t));return this.dispatchEvent(r),r}};$([k()],ht.prototype,"dir",2);$([k()],ht.prototype,"lang",2);/*! Bundled license information:
859
+ */var _t=e=>t=>typeof t=="function"?((r,n)=>(customElements.define(r,n),n))(e,t):((r,n)=>{const{kind:i,elements:o}=n;return{kind:i,elements:o,finisher(a){customElements.define(r,a)}}})(e,t),F8=(e,t)=>t.kind==="method"&&t.descriptor&&!("value"in t.descriptor)?sr(qe({},t),{finisher(r){r.createProperty(t.key,e)}}):{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:t.key,initializer(){typeof t.initializer=="function"&&(this[t.key]=t.initializer.call(this))},finisher(r){r.createProperty(t.key,e)}};function S(e){return(t,r)=>r!==void 0?((n,i,o)=>{i.constructor.createProperty(o,n)})(e,t,r):F8(e,t)}function Er(e){return S(sr(qe({},e),{state:!0}))}var L8=({finisher:e,descriptor:t})=>(r,n)=>{var i;if(n===void 0){const o=(i=r.originalKey)!==null&&i!==void 0?i:r.key,a=t!=null?{kind:"method",placement:"prototype",key:o,descriptor:t(r.key)}:sr(qe({},r),{key:o});return e!=null&&(a.finisher=function(s){e(s,o)}),a}{const o=r.constructor;t!==void 0&&Object.defineProperty(r,n,t(n)),e?.(o,n)}};function Xe(e,t){return L8({descriptor:r=>{const n={get(){var i,o;return(o=(i=this.renderRoot)===null||i===void 0?void 0:i.querySelector(e))!==null&&o!==void 0?o:null},enumerable:!0,configurable:!0};if(t){const i=typeof r=="symbol"?Symbol():"__"+r;n.get=function(){var o,a;return this[i]===void 0&&(this[i]=(a=(o=this.renderRoot)===null||o===void 0?void 0:o.querySelector(e))!==null&&a!==void 0?a:null),this[i]}}return n}})}var Jc;((Jc=window.HTMLSlotElement)===null||Jc===void 0?void 0:Jc.prototype.assignedElements)!=null;var ht=class extends yo{emit(e,t){const r=new CustomEvent(e,qe({bubbles:!0,cancelable:!1,composed:!0,detail:{}},t));return this.dispatchEvent(r),r}};$([S()],ht.prototype,"dir",2);$([S()],ht.prototype,"lang",2);/*! Bundled license information:
864
860
 
865
861
  @lit/reactive-element/decorators/custom-element.js:
866
862
  (**
@@ -963,7 +959,7 @@ lit-html/directives/class-map.js:
963
959
  aria-labelledby="dropdown"
964
960
  ></slot>
965
961
  </sl-popup>
966
- `}};Pt.styles=_8;$([Xe(".dropdown")],Pt.prototype,"popup",2);$([Xe(".dropdown__trigger")],Pt.prototype,"trigger",2);$([Xe(".dropdown__panel")],Pt.prototype,"panel",2);$([k({type:Boolean,reflect:!0})],Pt.prototype,"open",2);$([k({reflect:!0})],Pt.prototype,"placement",2);$([k({type:Boolean,reflect:!0})],Pt.prototype,"disabled",2);$([k({attribute:"stay-open-on-select",type:Boolean,reflect:!0})],Pt.prototype,"stayOpenOnSelect",2);$([k({attribute:!1})],Pt.prototype,"containingElement",2);$([k({type:Number})],Pt.prototype,"distance",2);$([k({type:Number})],Pt.prototype,"skidding",2);$([k({type:Boolean})],Pt.prototype,"hoist",2);$([De("open",{waitUntilFirstUpdate:!0})],Pt.prototype,"handleOpenChange",1);Pt=$([_t("sl-dropdown")],Pt);ur("dropdown.show",{keyframes:[{opacity:0,scale:.9},{opacity:1,scale:1}],options:{duration:100,easing:"ease"}});ur("dropdown.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.9}],options:{duration:100,easing:"ease"}});var M8=ft`
962
+ `}};Pt.styles=_8;$([Xe(".dropdown")],Pt.prototype,"popup",2);$([Xe(".dropdown__trigger")],Pt.prototype,"trigger",2);$([Xe(".dropdown__panel")],Pt.prototype,"panel",2);$([S({type:Boolean,reflect:!0})],Pt.prototype,"open",2);$([S({reflect:!0})],Pt.prototype,"placement",2);$([S({type:Boolean,reflect:!0})],Pt.prototype,"disabled",2);$([S({attribute:"stay-open-on-select",type:Boolean,reflect:!0})],Pt.prototype,"stayOpenOnSelect",2);$([S({attribute:!1})],Pt.prototype,"containingElement",2);$([S({type:Number})],Pt.prototype,"distance",2);$([S({type:Number})],Pt.prototype,"skidding",2);$([S({type:Boolean})],Pt.prototype,"hoist",2);$([De("open",{waitUntilFirstUpdate:!0})],Pt.prototype,"handleOpenChange",1);Pt=$([_t("sl-dropdown")],Pt);ur("dropdown.show",{keyframes:[{opacity:0,scale:.9},{opacity:1,scale:1}],options:{duration:100,easing:"ease"}});ur("dropdown.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.9}],options:{duration:100,easing:"ease"}});var M8=ft`
967
963
  ${wt}
968
964
 
969
965
  :host {
@@ -1003,7 +999,7 @@ lit-html/directives/class-map.js:
1003
999
  background: var(--arrow-color);
1004
1000
  z-index: -1;
1005
1001
  }
1006
- `;function zi(e){return e.split("-")[1]}function Yh(e){return e==="y"?"height":"width"}function nn(e){return e.split("-")[0]}function qo(e){return["top","bottom"].includes(nn(e))?"x":"y"}function cv(e,t,r){let{reference:n,floating:i}=e;const o=n.x+n.width/2-i.width/2,a=n.y+n.height/2-i.height/2,s=qo(t),c=Yh(s),l=n[c]/2-i[c]/2,u=s==="x";let d;switch(nn(t)){case"top":d={x:o,y:n.y-i.height};break;case"bottom":d={x:o,y:n.y+n.height};break;case"right":d={x:n.x+n.width,y:a};break;case"left":d={x:n.x-i.width,y:a};break;default:d={x:n.x,y:n.y}}switch(zi(t)){case"start":d[s]-=l*(r&&u?-1:1);break;case"end":d[s]+=l*(r&&u?-1:1)}return d}var j8=async(e,t,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:o=[],platform:a}=r,s=o.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=cv(l,n,c),f=n,h={},p=0;for(let m=0;m<s.length;m++){const{name:v,fn:y}=s[m],{x:b,y:g,data:_,reset:S}=await y({x:u,y:d,initialPlacement:n,placement:f,strategy:i,middlewareData:h,rects:l,platform:a,elements:{reference:e,floating:t}});u=b??u,d=g??d,h=sr(qe({},h),{[v]:qe(qe({},h[v]),_)}),S&&p<=50&&(p++,typeof S=="object"&&(S.placement&&(f=S.placement),S.rects&&(l=S.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):S.rects),{x:u,y:d}=cv(l,f,c)),m=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:h}};function d2(e){return typeof e!="number"?function(t){return qe({top:0,right:0,bottom:0,left:0},t)}(e):{top:e,right:e,bottom:e,left:e}}function Vs(e){return sr(qe({},e),{top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height})}async function Xh(e,t){var r;t===void 0&&(t={});const{x:n,y:i,platform:o,rects:a,elements:s,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=t,p=d2(h),m=s[f?d==="floating"?"reference":"floating":d],v=Vs(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(m)))==null||r?m:m.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(s.floating)),boundary:l,rootBoundary:u,strategy:c})),y=d==="floating"?sr(qe({},a.floating),{x:n,y:i}):a.reference,b=await(o.getOffsetParent==null?void 0:o.getOffsetParent(s.floating)),g=await(o.isElement==null?void 0:o.isElement(b))&&await(o.getScale==null?void 0:o.getScale(b))||{x:1,y:1},_=Vs(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({rect:y,offsetParent:b,strategy:c}):y);return{top:(v.top-_.top+p.top)/g.y,bottom:(_.bottom-v.bottom+p.bottom)/g.y,left:(v.left-_.left+p.left)/g.x,right:(_.right-v.right+p.right)/g.x}}var z8=Math.min,xn=Math.max;function kd(e,t,r){return xn(e,z8(t,r))}var U8=e=>({name:"arrow",options:e,async fn(t){const{element:r,padding:n=0}=e||{},{x:i,y:o,placement:a,rects:s,platform:c}=t;if(r==null)return{};const l=d2(n),u={x:i,y:o},d=qo(a),f=Yh(d),h=await c.getDimensions(r),p=d==="y"?"top":"left",m=d==="y"?"bottom":"right",v=s.reference[f]+s.reference[d]-u[d]-s.floating[f],y=u[d]-s.reference[d],b=await(c.getOffsetParent==null?void 0:c.getOffsetParent(r));let g=b?d==="y"?b.clientHeight||0:b.clientWidth||0:0;g===0&&(g=s.floating[f]);const _=v/2-y/2,S=l[p],E=g-h[f]-l[m],x=g/2-h[f]/2+_,N=kd(S,x,E),M=zi(a)!=null&&x!=N&&s.reference[f]/2-(x<S?l[p]:l[m])-h[f]/2<0;return{[d]:u[d]-(M?x<S?S-x:E-x:0),data:{[d]:N,centerOffset:x-N}}}}),V8=["top","right","bottom","left"];V8.reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]);var B8={left:"right",right:"left",bottom:"top",top:"bottom"};function Bs(e){return e.replace(/left|right|bottom|top/g,t=>B8[t])}function W8(e,t,r){r===void 0&&(r=!1);const n=zi(e),i=qo(e),o=Yh(i);let a=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=Bs(a)),{main:a,cross:Bs(a)}}var q8={start:"end",end:"start"};function Jc(e){return e.replace(/start|end/g,t=>q8[t])}var H8=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r;const{placement:n,middlewareData:i,rects:o,initialPlacement:a,platform:s,elements:c}=t,l=e,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0}=l,v=Gh(l,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]),y=nn(n),b=nn(a)===a,g=await(s.isRTL==null?void 0:s.isRTL(c.floating)),_=f||(b||!m?[Bs(a)]:function(q){const A=Bs(q);return[Jc(q),A,Jc(A)]}(a));f||p==="none"||_.push(...function(q,A,T,F){const z=zi(q);let Y=function(ne,ae,R){const ge=["left","right"],_e=["right","left"],D=["top","bottom"],xt=["bottom","top"];switch(ne){case"top":case"bottom":return R?ae?_e:ge:ae?ge:_e;case"left":case"right":return ae?D:xt;default:return[]}}(nn(q),T==="start",F);return z&&(Y=Y.map(ne=>ne+"-"+z),A&&(Y=Y.concat(Y.map(Jc)))),Y}(a,m,p,g));const S=[a,..._],E=await Xh(t,v),x=[];let N=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&x.push(E[y]),d){const{main:q,cross:A}=W8(n,o,g);x.push(E[q],E[A])}if(N=[...N,{placement:n,overflows:x}],!x.every(q=>q<=0)){var M;const q=(((M=i.flip)==null?void 0:M.index)||0)+1,A=S[q];if(A)return{data:{index:q,overflows:N},reset:{placement:A}};let T="bottom";switch(h){case"bestFit":{var j;const F=(j=N.map(z=>[z,z.overflows.filter(Y=>Y>0).reduce((Y,ne)=>Y+ne,0)]).sort((z,Y)=>z[1]-Y[1])[0])==null?void 0:j[0].placement;F&&(T=F);break}case"initialPlacement":T=a}if(n!==T)return{reset:{placement:T}}}return{}}}},G8=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:r,y:n}=t,i=await async function(o,a){const{placement:s,platform:c,elements:l}=o,u=await(c.isRTL==null?void 0:c.isRTL(l.floating)),d=nn(s),f=zi(s),h=qo(s)==="x",p=["left","top"].includes(d)?-1:1,m=u&&h?-1:1,v=typeof a=="function"?a(o):a;let{mainAxis:y,crossAxis:b,alignmentAxis:g}=typeof v=="number"?{mainAxis:v,crossAxis:0,alignmentAxis:null}:qe({mainAxis:0,crossAxis:0,alignmentAxis:null},v);return f&&typeof g=="number"&&(b=f==="end"?-1*g:g),h?{x:b*m,y:y*p}:{x:y*p,y:b*m}}(t,e);return{x:r+i.x,y:n+i.y,data:i}}}};function Q8(e){return e==="x"?"y":"x"}var K8=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:i}=t,o=e,{mainAxis:a=!0,crossAxis:s=!1,limiter:c={fn:y=>{let{x:b,y:g}=y;return{x:b,y:g}}}}=o,l=Gh(o,["mainAxis","crossAxis","limiter"]),u={x:r,y:n},d=await Xh(t,l),f=qo(nn(i)),h=Q8(f);let p=u[f],m=u[h];if(a){const y=f==="y"?"bottom":"right";p=kd(p+d[f==="y"?"top":"left"],p,p-d[y])}if(s){const y=h==="y"?"bottom":"right";m=kd(m+d[h==="y"?"top":"left"],m,m-d[y])}const v=c.fn(sr(qe({},t),{[f]:p,[h]:m}));return sr(qe({},v),{data:{x:v.x-r,y:v.y-n}})}}},uv=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:r,rects:n,platform:i,elements:o}=t,a=e,{apply:s=()=>{}}=a,c=Gh(a,["apply"]),l=await Xh(t,c),u=nn(r),d=zi(r);let f,h;u==="top"||u==="bottom"?(f=u,h=d===(await(i.isRTL==null?void 0:i.isRTL(o.floating))?"start":"end")?"left":"right"):(h=u,f=d==="end"?"top":"bottom");const p=xn(l.left,0),m=xn(l.right,0),v=xn(l.top,0),y=xn(l.bottom,0),b={availableHeight:n.floating.height-(["left","right"].includes(r)?2*(v!==0||y!==0?v+y:xn(l.top,l.bottom)):l[f]),availableWidth:n.floating.width-(["top","bottom"].includes(r)?2*(p!==0||m!==0?p+m:xn(l.left,l.right)):l[h])};await s(qe(qe({},t),b));const g=await i.getDimensions(o.floating);return n.floating.width!==g.width||n.floating.height!==g.height?{reset:{rects:!0}}:{}}}};function Qt(e){var t;return((t=e.ownerDocument)==null?void 0:t.defaultView)||window}function gr(e){return Qt(e).getComputedStyle(e)}function pn(e){return h2(e)?(e.nodeName||"").toLowerCase():""}var da;function f2(){if(da)return da;const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(da=e.brands.map(t=>t.brand+"/"+t.version).join(" "),da):navigator.userAgent}function jr(e){return e instanceof Qt(e).HTMLElement}function ir(e){return e instanceof Qt(e).Element}function h2(e){return e instanceof Qt(e).Node}function dv(e){return typeof ShadowRoot>"u"?!1:e instanceof Qt(e).ShadowRoot||e instanceof ShadowRoot}function ec(e){const{overflow:t,overflowX:r,overflowY:n,display:i}=gr(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(i)}function Y8(e){return["table","td","th"].includes(pn(e))}function Ed(e){const t=/firefox/i.test(f2()),r=gr(e),n=r.backdropFilter||r.WebkitBackdropFilter;return r.transform!=="none"||r.perspective!=="none"||!!n&&n!=="none"||t&&r.willChange==="filter"||t&&!!r.filter&&r.filter!=="none"||["transform","perspective"].some(i=>r.willChange.includes(i))||["paint","layout","strict","content"].some(i=>{const o=r.contain;return o!=null&&o.includes(i)})}function p2(){return!/^((?!chrome|android).)*safari/i.test(f2())}function Zh(e){return["html","body","#document"].includes(pn(e))}var fv=Math.min,bo=Math.max,Ws=Math.round;function m2(e){const t=gr(e);let r=parseFloat(t.width),n=parseFloat(t.height);const i=e.offsetWidth,o=e.offsetHeight,a=Ws(r)!==i||Ws(n)!==o;return a&&(r=i,n=o),{width:r,height:n,fallback:a}}function v2(e){return ir(e)?e:e.contextElement}var y2={x:1,y:1};function pi(e){const t=v2(e);if(!jr(t))return y2;const r=t.getBoundingClientRect(),{width:n,height:i,fallback:o}=m2(t);let a=(o?Ws(r.width):r.width)/n,s=(o?Ws(r.height):r.height)/i;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}function Mn(e,t,r,n){var i,o;t===void 0&&(t=!1),r===void 0&&(r=!1);const a=e.getBoundingClientRect(),s=v2(e);let c=y2;t&&(n?ir(n)&&(c=pi(n)):c=pi(e));const l=s?Qt(s):window,u=!p2()&&r;let d=(a.left+(u&&((i=l.visualViewport)==null?void 0:i.offsetLeft)||0))/c.x,f=(a.top+(u&&((o=l.visualViewport)==null?void 0:o.offsetTop)||0))/c.y,h=a.width/c.x,p=a.height/c.y;if(s){const m=Qt(s),v=n&&ir(n)?Qt(n):n;let y=m.frameElement;for(;y&&n&&v!==m;){const b=pi(y),g=y.getBoundingClientRect(),_=getComputedStyle(y);g.x+=(y.clientLeft+parseFloat(_.paddingLeft))*b.x,g.y+=(y.clientTop+parseFloat(_.paddingTop))*b.y,d*=b.x,f*=b.y,h*=b.x,p*=b.y,d+=g.x,f+=g.y,y=Qt(y).frameElement}}return{width:h,height:p,top:f,right:d+h,bottom:f+p,left:d,x:d,y:f}}function on(e){return((h2(e)?e.ownerDocument:e.document)||window.document).documentElement}function tc(e){return ir(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function g2(e){return Mn(on(e)).left+tc(e).scrollLeft}function X8(e,t,r){const n=jr(t),i=on(t),o=Mn(e,!0,r==="fixed",t);let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(n||!n&&r!=="fixed")if((pn(t)!=="body"||ec(i))&&(a=tc(t)),jr(t)){const c=Mn(t,!0);s.x=c.x+t.clientLeft,s.y=c.y+t.clientTop}else i&&(s.x=g2(i));return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}function Ao(e){if(pn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||(dv(e)?e.host:null)||on(e);return dv(t)?t.host:t}function hv(e){return jr(e)&&gr(e).position!=="fixed"?e.offsetParent:null}function pv(e){const t=Qt(e);let r=hv(e);for(;r&&Y8(r)&&gr(r).position==="static";)r=hv(r);return r&&(pn(r)==="html"||pn(r)==="body"&&gr(r).position==="static"&&!Ed(r))?t:r||function(n){let i=Ao(n);for(;jr(i)&&!Zh(i);){if(Ed(i))return i;i=Ao(i)}return null}(e)||t}function b2(e){const t=Ao(e);return Zh(t)?e.ownerDocument.body:jr(t)&&ec(t)?t:b2(t)}function $o(e,t){var r;t===void 0&&(t=[]);const n=b2(e),i=n===((r=e.ownerDocument)==null?void 0:r.body),o=Qt(n);return i?t.concat(o,o.visualViewport||[],ec(n)?n:[]):t.concat(n,$o(n))}function mv(e,t,r){return t==="viewport"?Vs(function(n,i){const o=Qt(n),a=on(n),s=o.visualViewport;let c=a.clientWidth,l=a.clientHeight,u=0,d=0;if(s){c=s.width,l=s.height;const f=p2();(f||!f&&i==="fixed")&&(u=s.offsetLeft,d=s.offsetTop)}return{width:c,height:l,x:u,y:d}}(e,r)):ir(t)?function(n,i){const o=Mn(n,!0,i==="fixed"),a=o.top+n.clientTop,s=o.left+n.clientLeft,c=jr(n)?pi(n):{x:1,y:1},l=n.clientWidth*c.x,u=n.clientHeight*c.y,d=s*c.x,f=a*c.y;return{top:f,left:d,right:d+l,bottom:f+u,x:d,y:f,width:l,height:u}}(t,r):Vs(function(n){var i;const o=on(n),a=tc(n),s=(i=n.ownerDocument)==null?void 0:i.body,c=bo(o.scrollWidth,o.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),l=bo(o.scrollHeight,o.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0);let u=-a.scrollLeft+g2(n);const d=-a.scrollTop;return gr(s||o).direction==="rtl"&&(u+=bo(o.clientWidth,s?s.clientWidth:0)-c),{width:c,height:l,x:u,y:d}}(on(e)))}var Z8={getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e;const o=r==="clippingAncestors"?function(l,u){const d=u.get(l);if(d)return d;let f=$o(l).filter(v=>ir(v)&&pn(v)!=="body"),h=null;const p=gr(l).position==="fixed";let m=p?Ao(l):l;for(;ir(m)&&!Zh(m);){const v=gr(m),y=Ed(m);(p?y||h:y||v.position!=="static"||!h||!["absolute","fixed"].includes(h.position))?h=v:f=f.filter(b=>b!==m),m=Ao(m)}return u.set(l,f),f}(t,this._c):[].concat(r),a=[...o,n],s=a[0],c=a.reduce((l,u)=>{const d=mv(t,u,i);return l.top=bo(d.top,l.top),l.right=fv(d.right,l.right),l.bottom=fv(d.bottom,l.bottom),l.left=bo(d.left,l.left),l},mv(t,s,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:r,strategy:n}=e;const i=jr(r),o=on(r);if(r===o)return t;let a={scrollLeft:0,scrollTop:0},s={x:1,y:1};const c={x:0,y:0};if((i||!i&&n!=="fixed")&&((pn(r)!=="body"||ec(o))&&(a=tc(r)),jr(r))){const l=Mn(r);s=pi(r),c.x=l.x+r.clientLeft,c.y=l.y+r.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-a.scrollLeft*s.x+c.x,y:t.y*s.y-a.scrollTop*s.y+c.y}},isElement:ir,getDimensions:function(e){return m2(e)},getOffsetParent:pv,getDocumentElement:on,getScale:pi,async getElementRects(e){let{reference:t,floating:r,strategy:n}=e;const i=this.getOffsetParent||pv,o=this.getDimensions;return{reference:X8(t,await i(r),n),floating:qe({x:0,y:0},await o(r))}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>gr(e).direction==="rtl"};function J8(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=!0,animationFrame:s=!1}=n,c=i&&!s,l=c||o?[...ir(e)?$o(e):e.contextElement?$o(e.contextElement):[],...$o(t)]:[];l.forEach(h=>{c&&h.addEventListener("scroll",r,{passive:!0}),o&&h.addEventListener("resize",r)});let u,d=null;if(a){let h=!0;d=new ResizeObserver(()=>{h||r(),h=!1}),ir(e)&&!s&&d.observe(e),ir(e)||!e.contextElement||s||d.observe(e.contextElement),d.observe(t)}let f=s?Mn(e):null;return s&&function h(){const p=Mn(e);!f||p.x===f.x&&p.y===f.y&&p.width===f.width&&p.height===f.height||r(),f=p,u=requestAnimationFrame(h)}(),r(),()=>{var h;l.forEach(p=>{c&&p.removeEventListener("scroll",r),o&&p.removeEventListener("resize",r)}),(h=d)==null||h.disconnect(),d=null,s&&cancelAnimationFrame(u)}}var e6=(e,t,r)=>{const n=new Map,i=qe({platform:Z8},r),o=sr(qe({},i.platform),{_c:n});return j8(e,t,sr(qe({},i),{platform:o}))},Ne=class extends ht{constructor(){super(...arguments),this.active=!1,this.placement="top",this.strategy="absolute",this.distance=0,this.skidding=0,this.arrow=!1,this.arrowPlacement="anchor",this.arrowPadding=10,this.flip=!1,this.flipFallbackPlacements="",this.flipFallbackStrategy="best-fit",this.flipPadding=0,this.shift=!1,this.shiftPadding=0,this.autoSizePadding=0}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.start()}disconnectedCallback(){this.stop()}async updated(e){super.updated(e),e.has("active")&&(this.active?this.start():this.stop()),e.has("anchor")&&this.handleAnchorChange(),this.active&&(await this.updateComplete,this.reposition())}async handleAnchorChange(){if(await this.stop(),this.anchor&&typeof this.anchor=="string"){const e=this.getRootNode();this.anchorEl=e.getElementById(this.anchor)}else this.anchor instanceof HTMLElement?this.anchorEl=this.anchor:this.anchorEl=this.querySelector('[slot="anchor"]');if(this.anchorEl instanceof HTMLSlotElement&&(this.anchorEl=this.anchorEl.assignedElements({flatten:!0})[0]),!this.anchorEl)throw new Error("Invalid anchor element: no anchor could be found using the anchor slot or the anchor attribute.");this.start()}start(){!this.anchorEl||(this.cleanup=J8(this.anchorEl,this.popup,()=>{this.reposition()}))}async stop(){return new Promise(e=>{this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),requestAnimationFrame(()=>e())):e()})}reposition(){if(!this.active||!this.anchorEl)return;const e=[G8({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?e.push(uv({apply:({rects:t})=>{const r=this.sync==="width"||this.sync==="both",n=this.sync==="height"||this.sync==="both";this.popup.style.width=r?`${t.reference.width}px`:"",this.popup.style.height=n?`${t.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&e.push(H8({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:this.flipFallbackStrategy==="best-fit"?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&e.push(K8({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?e.push(uv({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:({availableWidth:t,availableHeight:r})=>{this.autoSize==="vertical"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-height",`${r}px`):this.style.removeProperty("--auto-size-available-height"),this.autoSize==="horizontal"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-width",`${t}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&e.push(U8({element:this.arrowEl,padding:this.arrowPadding})),e6(this.anchorEl,this.popup,{placement:this.placement,middleware:e,strategy:this.strategy}).then(({x:t,y:r,middlewareData:n,placement:i})=>{const o=getComputedStyle(this).direction==="rtl",a={top:"bottom",right:"left",bottom:"top",left:"right"}[i.split("-")[0]];if(this.setAttribute("data-current-placement",i),Object.assign(this.popup.style,{left:`${t}px`,top:`${r}px`}),this.arrow){const s=n.arrow.x,c=n.arrow.y;let l="",u="",d="",f="";if(this.arrowPlacement==="start"){const h=typeof s=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";l=typeof c=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",u=o?h:"",f=o?"":h}else if(this.arrowPlacement==="end"){const h=typeof s=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";u=o?"":h,f=o?h:"",d=typeof c=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""}else this.arrowPlacement==="center"?(f=typeof s=="number"?"calc(50% - var(--arrow-size-diagonal))":"",l=typeof c=="number"?"calc(50% - var(--arrow-size-diagonal))":""):(f=typeof s=="number"?`${s}px`:"",l=typeof c=="number"?`${c}px`:"");Object.assign(this.arrowEl.style,{top:l,right:u,bottom:d,left:f,[a]:"calc(var(--arrow-size-diagonal) * -1)"})}}),this.emit("sl-reposition")}render(){return Ie`
1002
+ `;function zi(e){return e.split("-")[1]}function Xh(e){return e==="y"?"height":"width"}function nn(e){return e.split("-")[0]}function qo(e){return["top","bottom"].includes(nn(e))?"x":"y"}function cv(e,t,r){let{reference:n,floating:i}=e;const o=n.x+n.width/2-i.width/2,a=n.y+n.height/2-i.height/2,s=qo(t),c=Xh(s),l=n[c]/2-i[c]/2,u=s==="x";let d;switch(nn(t)){case"top":d={x:o,y:n.y-i.height};break;case"bottom":d={x:o,y:n.y+n.height};break;case"right":d={x:n.x+n.width,y:a};break;case"left":d={x:n.x-i.width,y:a};break;default:d={x:n.x,y:n.y}}switch(zi(t)){case"start":d[s]-=l*(r&&u?-1:1);break;case"end":d[s]+=l*(r&&u?-1:1)}return d}var j8=async(e,t,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:o=[],platform:a}=r,s=o.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=cv(l,n,c),f=n,h={},p=0;for(let m=0;m<s.length;m++){const{name:v,fn:y}=s[m],{x:b,y:g,data:_,reset:k}=await y({x:u,y:d,initialPlacement:n,placement:f,strategy:i,middlewareData:h,rects:l,platform:a,elements:{reference:e,floating:t}});u=b??u,d=g??d,h=sr(qe({},h),{[v]:qe(qe({},h[v]),_)}),k&&p<=50&&(p++,typeof k=="object"&&(k.placement&&(f=k.placement),k.rects&&(l=k.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):k.rects),{x:u,y:d}=cv(l,f,c)),m=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:h}};function d2(e){return typeof e!="number"?function(t){return qe({top:0,right:0,bottom:0,left:0},t)}(e):{top:e,right:e,bottom:e,left:e}}function Vs(e){return sr(qe({},e),{top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height})}async function Zh(e,t){var r;t===void 0&&(t={});const{x:n,y:i,platform:o,rects:a,elements:s,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=t,p=d2(h),m=s[f?d==="floating"?"reference":"floating":d],v=Vs(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(m)))==null||r?m:m.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(s.floating)),boundary:l,rootBoundary:u,strategy:c})),y=d==="floating"?sr(qe({},a.floating),{x:n,y:i}):a.reference,b=await(o.getOffsetParent==null?void 0:o.getOffsetParent(s.floating)),g=await(o.isElement==null?void 0:o.isElement(b))&&await(o.getScale==null?void 0:o.getScale(b))||{x:1,y:1},_=Vs(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({rect:y,offsetParent:b,strategy:c}):y);return{top:(v.top-_.top+p.top)/g.y,bottom:(_.bottom-v.bottom+p.bottom)/g.y,left:(v.left-_.left+p.left)/g.x,right:(_.right-v.right+p.right)/g.x}}var z8=Math.min,xn=Math.max;function Ed(e,t,r){return xn(e,z8(t,r))}var U8=e=>({name:"arrow",options:e,async fn(t){const{element:r,padding:n=0}=e||{},{x:i,y:o,placement:a,rects:s,platform:c}=t;if(r==null)return{};const l=d2(n),u={x:i,y:o},d=qo(a),f=Xh(d),h=await c.getDimensions(r),p=d==="y"?"top":"left",m=d==="y"?"bottom":"right",v=s.reference[f]+s.reference[d]-u[d]-s.floating[f],y=u[d]-s.reference[d],b=await(c.getOffsetParent==null?void 0:c.getOffsetParent(r));let g=b?d==="y"?b.clientHeight||0:b.clientWidth||0:0;g===0&&(g=s.floating[f]);const _=v/2-y/2,k=l[p],E=g-h[f]-l[m],x=g/2-h[f]/2+_,T=Ed(k,x,E),j=zi(a)!=null&&x!=T&&s.reference[f]/2-(x<k?l[p]:l[m])-h[f]/2<0;return{[d]:u[d]-(j?x<k?k-x:E-x:0),data:{[d]:T,centerOffset:x-T}}}}),V8=["top","right","bottom","left"];V8.reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]);var B8={left:"right",right:"left",bottom:"top",top:"bottom"};function Bs(e){return e.replace(/left|right|bottom|top/g,t=>B8[t])}function W8(e,t,r){r===void 0&&(r=!1);const n=zi(e),i=qo(e),o=Xh(i);let a=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=Bs(a)),{main:a,cross:Bs(a)}}var q8={start:"end",end:"start"};function eu(e){return e.replace(/start|end/g,t=>q8[t])}var H8=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r;const{placement:n,middlewareData:i,rects:o,initialPlacement:a,platform:s,elements:c}=t,l=e,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0}=l,v=Qh(l,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]),y=nn(n),b=nn(a)===a,g=await(s.isRTL==null?void 0:s.isRTL(c.floating)),_=f||(b||!m?[Bs(a)]:function(K){const D=Bs(K);return[eu(K),D,eu(D)]}(a));f||p==="none"||_.push(...function(K,D,L,R){const F=zi(K);let q=function(re,ae,A){const me=["left","right"],_e=["right","left"],I=["top","bottom"],xt=["bottom","top"];switch(re){case"top":case"bottom":return A?ae?_e:me:ae?me:_e;case"left":case"right":return ae?I:xt;default:return[]}}(nn(K),L==="start",R);return F&&(q=q.map(re=>re+"-"+F),D&&(q=q.concat(q.map(eu)))),q}(a,m,p,g));const k=[a,..._],E=await Zh(t,v),x=[];let T=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&x.push(E[y]),d){const{main:K,cross:D}=W8(n,o,g);x.push(E[K],E[D])}if(T=[...T,{placement:n,overflows:x}],!x.every(K=>K<=0)){var j;const K=(((j=i.flip)==null?void 0:j.index)||0)+1,D=k[K];if(D)return{data:{index:K,overflows:T},reset:{placement:D}};let L="bottom";switch(h){case"bestFit":{var z;const R=(z=T.map(F=>[F,F.overflows.filter(q=>q>0).reduce((q,re)=>q+re,0)]).sort((F,q)=>F[1]-q[1])[0])==null?void 0:z[0].placement;R&&(L=R);break}case"initialPlacement":L=a}if(n!==L)return{reset:{placement:L}}}return{}}}},G8=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:r,y:n}=t,i=await async function(o,a){const{placement:s,platform:c,elements:l}=o,u=await(c.isRTL==null?void 0:c.isRTL(l.floating)),d=nn(s),f=zi(s),h=qo(s)==="x",p=["left","top"].includes(d)?-1:1,m=u&&h?-1:1,v=typeof a=="function"?a(o):a;let{mainAxis:y,crossAxis:b,alignmentAxis:g}=typeof v=="number"?{mainAxis:v,crossAxis:0,alignmentAxis:null}:qe({mainAxis:0,crossAxis:0,alignmentAxis:null},v);return f&&typeof g=="number"&&(b=f==="end"?-1*g:g),h?{x:b*m,y:y*p}:{x:y*p,y:b*m}}(t,e);return{x:r+i.x,y:n+i.y,data:i}}}};function Q8(e){return e==="x"?"y":"x"}var K8=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:i}=t,o=e,{mainAxis:a=!0,crossAxis:s=!1,limiter:c={fn:y=>{let{x:b,y:g}=y;return{x:b,y:g}}}}=o,l=Qh(o,["mainAxis","crossAxis","limiter"]),u={x:r,y:n},d=await Zh(t,l),f=qo(nn(i)),h=Q8(f);let p=u[f],m=u[h];if(a){const y=f==="y"?"bottom":"right";p=Ed(p+d[f==="y"?"top":"left"],p,p-d[y])}if(s){const y=h==="y"?"bottom":"right";m=Ed(m+d[h==="y"?"top":"left"],m,m-d[y])}const v=c.fn(sr(qe({},t),{[f]:p,[h]:m}));return sr(qe({},v),{data:{x:v.x-r,y:v.y-n}})}}},uv=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:r,rects:n,platform:i,elements:o}=t,a=e,{apply:s=()=>{}}=a,c=Qh(a,["apply"]),l=await Zh(t,c),u=nn(r),d=zi(r);let f,h;u==="top"||u==="bottom"?(f=u,h=d===(await(i.isRTL==null?void 0:i.isRTL(o.floating))?"start":"end")?"left":"right"):(h=u,f=d==="end"?"top":"bottom");const p=xn(l.left,0),m=xn(l.right,0),v=xn(l.top,0),y=xn(l.bottom,0),b={availableHeight:n.floating.height-(["left","right"].includes(r)?2*(v!==0||y!==0?v+y:xn(l.top,l.bottom)):l[f]),availableWidth:n.floating.width-(["top","bottom"].includes(r)?2*(p!==0||m!==0?p+m:xn(l.left,l.right)):l[h])};await s(qe(qe({},t),b));const g=await i.getDimensions(o.floating);return n.floating.width!==g.width||n.floating.height!==g.height?{reset:{rects:!0}}:{}}}};function Qt(e){var t;return((t=e.ownerDocument)==null?void 0:t.defaultView)||window}function gr(e){return Qt(e).getComputedStyle(e)}function pn(e){return h2(e)?(e.nodeName||"").toLowerCase():""}var da;function f2(){if(da)return da;const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(da=e.brands.map(t=>t.brand+"/"+t.version).join(" "),da):navigator.userAgent}function jr(e){return e instanceof Qt(e).HTMLElement}function ir(e){return e instanceof Qt(e).Element}function h2(e){return e instanceof Qt(e).Node}function dv(e){return typeof ShadowRoot>"u"?!1:e instanceof Qt(e).ShadowRoot||e instanceof ShadowRoot}function ec(e){const{overflow:t,overflowX:r,overflowY:n,display:i}=gr(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(i)}function Y8(e){return["table","td","th"].includes(pn(e))}function Od(e){const t=/firefox/i.test(f2()),r=gr(e),n=r.backdropFilter||r.WebkitBackdropFilter;return r.transform!=="none"||r.perspective!=="none"||!!n&&n!=="none"||t&&r.willChange==="filter"||t&&!!r.filter&&r.filter!=="none"||["transform","perspective"].some(i=>r.willChange.includes(i))||["paint","layout","strict","content"].some(i=>{const o=r.contain;return o!=null&&o.includes(i)})}function p2(){return!/^((?!chrome|android).)*safari/i.test(f2())}function Jh(e){return["html","body","#document"].includes(pn(e))}var fv=Math.min,bo=Math.max,Ws=Math.round;function m2(e){const t=gr(e);let r=parseFloat(t.width),n=parseFloat(t.height);const i=e.offsetWidth,o=e.offsetHeight,a=Ws(r)!==i||Ws(n)!==o;return a&&(r=i,n=o),{width:r,height:n,fallback:a}}function v2(e){return ir(e)?e:e.contextElement}var y2={x:1,y:1};function pi(e){const t=v2(e);if(!jr(t))return y2;const r=t.getBoundingClientRect(),{width:n,height:i,fallback:o}=m2(t);let a=(o?Ws(r.width):r.width)/n,s=(o?Ws(r.height):r.height)/i;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}function Mn(e,t,r,n){var i,o;t===void 0&&(t=!1),r===void 0&&(r=!1);const a=e.getBoundingClientRect(),s=v2(e);let c=y2;t&&(n?ir(n)&&(c=pi(n)):c=pi(e));const l=s?Qt(s):window,u=!p2()&&r;let d=(a.left+(u&&((i=l.visualViewport)==null?void 0:i.offsetLeft)||0))/c.x,f=(a.top+(u&&((o=l.visualViewport)==null?void 0:o.offsetTop)||0))/c.y,h=a.width/c.x,p=a.height/c.y;if(s){const m=Qt(s),v=n&&ir(n)?Qt(n):n;let y=m.frameElement;for(;y&&n&&v!==m;){const b=pi(y),g=y.getBoundingClientRect(),_=getComputedStyle(y);g.x+=(y.clientLeft+parseFloat(_.paddingLeft))*b.x,g.y+=(y.clientTop+parseFloat(_.paddingTop))*b.y,d*=b.x,f*=b.y,h*=b.x,p*=b.y,d+=g.x,f+=g.y,y=Qt(y).frameElement}}return{width:h,height:p,top:f,right:d+h,bottom:f+p,left:d,x:d,y:f}}function on(e){return((h2(e)?e.ownerDocument:e.document)||window.document).documentElement}function tc(e){return ir(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function g2(e){return Mn(on(e)).left+tc(e).scrollLeft}function X8(e,t,r){const n=jr(t),i=on(t),o=Mn(e,!0,r==="fixed",t);let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(n||!n&&r!=="fixed")if((pn(t)!=="body"||ec(i))&&(a=tc(t)),jr(t)){const c=Mn(t,!0);s.x=c.x+t.clientLeft,s.y=c.y+t.clientTop}else i&&(s.x=g2(i));return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}function Ao(e){if(pn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||(dv(e)?e.host:null)||on(e);return dv(t)?t.host:t}function hv(e){return jr(e)&&gr(e).position!=="fixed"?e.offsetParent:null}function pv(e){const t=Qt(e);let r=hv(e);for(;r&&Y8(r)&&gr(r).position==="static";)r=hv(r);return r&&(pn(r)==="html"||pn(r)==="body"&&gr(r).position==="static"&&!Od(r))?t:r||function(n){let i=Ao(n);for(;jr(i)&&!Jh(i);){if(Od(i))return i;i=Ao(i)}return null}(e)||t}function b2(e){const t=Ao(e);return Jh(t)?e.ownerDocument.body:jr(t)&&ec(t)?t:b2(t)}function $o(e,t){var r;t===void 0&&(t=[]);const n=b2(e),i=n===((r=e.ownerDocument)==null?void 0:r.body),o=Qt(n);return i?t.concat(o,o.visualViewport||[],ec(n)?n:[]):t.concat(n,$o(n))}function mv(e,t,r){return t==="viewport"?Vs(function(n,i){const o=Qt(n),a=on(n),s=o.visualViewport;let c=a.clientWidth,l=a.clientHeight,u=0,d=0;if(s){c=s.width,l=s.height;const f=p2();(f||!f&&i==="fixed")&&(u=s.offsetLeft,d=s.offsetTop)}return{width:c,height:l,x:u,y:d}}(e,r)):ir(t)?function(n,i){const o=Mn(n,!0,i==="fixed"),a=o.top+n.clientTop,s=o.left+n.clientLeft,c=jr(n)?pi(n):{x:1,y:1},l=n.clientWidth*c.x,u=n.clientHeight*c.y,d=s*c.x,f=a*c.y;return{top:f,left:d,right:d+l,bottom:f+u,x:d,y:f,width:l,height:u}}(t,r):Vs(function(n){var i;const o=on(n),a=tc(n),s=(i=n.ownerDocument)==null?void 0:i.body,c=bo(o.scrollWidth,o.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),l=bo(o.scrollHeight,o.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0);let u=-a.scrollLeft+g2(n);const d=-a.scrollTop;return gr(s||o).direction==="rtl"&&(u+=bo(o.clientWidth,s?s.clientWidth:0)-c),{width:c,height:l,x:u,y:d}}(on(e)))}var Z8={getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e;const o=r==="clippingAncestors"?function(l,u){const d=u.get(l);if(d)return d;let f=$o(l).filter(v=>ir(v)&&pn(v)!=="body"),h=null;const p=gr(l).position==="fixed";let m=p?Ao(l):l;for(;ir(m)&&!Jh(m);){const v=gr(m),y=Od(m);(p?y||h:y||v.position!=="static"||!h||!["absolute","fixed"].includes(h.position))?h=v:f=f.filter(b=>b!==m),m=Ao(m)}return u.set(l,f),f}(t,this._c):[].concat(r),a=[...o,n],s=a[0],c=a.reduce((l,u)=>{const d=mv(t,u,i);return l.top=bo(d.top,l.top),l.right=fv(d.right,l.right),l.bottom=fv(d.bottom,l.bottom),l.left=bo(d.left,l.left),l},mv(t,s,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:r,strategy:n}=e;const i=jr(r),o=on(r);if(r===o)return t;let a={scrollLeft:0,scrollTop:0},s={x:1,y:1};const c={x:0,y:0};if((i||!i&&n!=="fixed")&&((pn(r)!=="body"||ec(o))&&(a=tc(r)),jr(r))){const l=Mn(r);s=pi(r),c.x=l.x+r.clientLeft,c.y=l.y+r.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-a.scrollLeft*s.x+c.x,y:t.y*s.y-a.scrollTop*s.y+c.y}},isElement:ir,getDimensions:function(e){return m2(e)},getOffsetParent:pv,getDocumentElement:on,getScale:pi,async getElementRects(e){let{reference:t,floating:r,strategy:n}=e;const i=this.getOffsetParent||pv,o=this.getDimensions;return{reference:X8(t,await i(r),n),floating:qe({x:0,y:0},await o(r))}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>gr(e).direction==="rtl"};function J8(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=!0,animationFrame:s=!1}=n,c=i&&!s,l=c||o?[...ir(e)?$o(e):e.contextElement?$o(e.contextElement):[],...$o(t)]:[];l.forEach(h=>{c&&h.addEventListener("scroll",r,{passive:!0}),o&&h.addEventListener("resize",r)});let u,d=null;if(a){let h=!0;d=new ResizeObserver(()=>{h||r(),h=!1}),ir(e)&&!s&&d.observe(e),ir(e)||!e.contextElement||s||d.observe(e.contextElement),d.observe(t)}let f=s?Mn(e):null;return s&&function h(){const p=Mn(e);!f||p.x===f.x&&p.y===f.y&&p.width===f.width&&p.height===f.height||r(),f=p,u=requestAnimationFrame(h)}(),r(),()=>{var h;l.forEach(p=>{c&&p.removeEventListener("scroll",r),o&&p.removeEventListener("resize",r)}),(h=d)==null||h.disconnect(),d=null,s&&cancelAnimationFrame(u)}}var e6=(e,t,r)=>{const n=new Map,i=qe({platform:Z8},r),o=sr(qe({},i.platform),{_c:n});return j8(e,t,sr(qe({},i),{platform:o}))},Ne=class extends ht{constructor(){super(...arguments),this.active=!1,this.placement="top",this.strategy="absolute",this.distance=0,this.skidding=0,this.arrow=!1,this.arrowPlacement="anchor",this.arrowPadding=10,this.flip=!1,this.flipFallbackPlacements="",this.flipFallbackStrategy="best-fit",this.flipPadding=0,this.shift=!1,this.shiftPadding=0,this.autoSizePadding=0}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.start()}disconnectedCallback(){this.stop()}async updated(e){super.updated(e),e.has("active")&&(this.active?this.start():this.stop()),e.has("anchor")&&this.handleAnchorChange(),this.active&&(await this.updateComplete,this.reposition())}async handleAnchorChange(){if(await this.stop(),this.anchor&&typeof this.anchor=="string"){const e=this.getRootNode();this.anchorEl=e.getElementById(this.anchor)}else this.anchor instanceof HTMLElement?this.anchorEl=this.anchor:this.anchorEl=this.querySelector('[slot="anchor"]');if(this.anchorEl instanceof HTMLSlotElement&&(this.anchorEl=this.anchorEl.assignedElements({flatten:!0})[0]),!this.anchorEl)throw new Error("Invalid anchor element: no anchor could be found using the anchor slot or the anchor attribute.");this.start()}start(){!this.anchorEl||(this.cleanup=J8(this.anchorEl,this.popup,()=>{this.reposition()}))}async stop(){return new Promise(e=>{this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),requestAnimationFrame(()=>e())):e()})}reposition(){if(!this.active||!this.anchorEl)return;const e=[G8({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?e.push(uv({apply:({rects:t})=>{const r=this.sync==="width"||this.sync==="both",n=this.sync==="height"||this.sync==="both";this.popup.style.width=r?`${t.reference.width}px`:"",this.popup.style.height=n?`${t.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&e.push(H8({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:this.flipFallbackStrategy==="best-fit"?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&e.push(K8({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?e.push(uv({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:({availableWidth:t,availableHeight:r})=>{this.autoSize==="vertical"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-height",`${r}px`):this.style.removeProperty("--auto-size-available-height"),this.autoSize==="horizontal"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-width",`${t}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&e.push(U8({element:this.arrowEl,padding:this.arrowPadding})),e6(this.anchorEl,this.popup,{placement:this.placement,middleware:e,strategy:this.strategy}).then(({x:t,y:r,middlewareData:n,placement:i})=>{const o=getComputedStyle(this).direction==="rtl",a={top:"bottom",right:"left",bottom:"top",left:"right"}[i.split("-")[0]];if(this.setAttribute("data-current-placement",i),Object.assign(this.popup.style,{left:`${t}px`,top:`${r}px`}),this.arrow){const s=n.arrow.x,c=n.arrow.y;let l="",u="",d="",f="";if(this.arrowPlacement==="start"){const h=typeof s=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";l=typeof c=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",u=o?h:"",f=o?"":h}else if(this.arrowPlacement==="end"){const h=typeof s=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";u=o?"":h,f=o?h:"",d=typeof c=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""}else this.arrowPlacement==="center"?(f=typeof s=="number"?"calc(50% - var(--arrow-size-diagonal))":"",l=typeof c=="number"?"calc(50% - var(--arrow-size-diagonal))":""):(f=typeof s=="number"?`${s}px`:"",l=typeof c=="number"?`${c}px`:"");Object.assign(this.arrowEl.style,{top:l,right:u,bottom:d,left:f,[a]:"calc(var(--arrow-size-diagonal) * -1)"})}}),this.emit("sl-reposition")}render(){return Ie`
1007
1003
  <slot name="anchor" @slotchange=${this.handleAnchorChange}></slot>
1008
1004
 
1009
1005
  <div
@@ -1013,7 +1009,7 @@ lit-html/directives/class-map.js:
1013
1009
  <slot></slot>
1014
1010
  ${this.arrow?Ie`<div part="arrow" class="popup__arrow" role="presentation"></div>`:""}
1015
1011
  </div>
1016
- `}};Ne.styles=M8;$([Xe(".popup")],Ne.prototype,"popup",2);$([Xe(".popup__arrow")],Ne.prototype,"arrowEl",2);$([k()],Ne.prototype,"anchor",2);$([k({type:Boolean,reflect:!0})],Ne.prototype,"active",2);$([k({reflect:!0})],Ne.prototype,"placement",2);$([k({reflect:!0})],Ne.prototype,"strategy",2);$([k({type:Number})],Ne.prototype,"distance",2);$([k({type:Number})],Ne.prototype,"skidding",2);$([k({type:Boolean})],Ne.prototype,"arrow",2);$([k({attribute:"arrow-placement"})],Ne.prototype,"arrowPlacement",2);$([k({attribute:"arrow-padding",type:Number})],Ne.prototype,"arrowPadding",2);$([k({type:Boolean})],Ne.prototype,"flip",2);$([k({attribute:"flip-fallback-placements",converter:{fromAttribute:e=>e.split(" ").map(t=>t.trim()).filter(t=>t!==""),toAttribute:e=>e.join(" ")}})],Ne.prototype,"flipFallbackPlacements",2);$([k({attribute:"flip-fallback-strategy"})],Ne.prototype,"flipFallbackStrategy",2);$([k({type:Object})],Ne.prototype,"flipBoundary",2);$([k({attribute:"flip-padding",type:Number})],Ne.prototype,"flipPadding",2);$([k({type:Boolean})],Ne.prototype,"shift",2);$([k({type:Object})],Ne.prototype,"shiftBoundary",2);$([k({attribute:"shift-padding",type:Number})],Ne.prototype,"shiftPadding",2);$([k({attribute:"auto-size"})],Ne.prototype,"autoSize",2);$([k()],Ne.prototype,"sync",2);$([k({type:Object})],Ne.prototype,"autoSizeBoundary",2);$([k({attribute:"auto-size-padding",type:Number})],Ne.prototype,"autoSizePadding",2);Ne=$([_t("sl-popup")],Ne);var $2=ft`
1012
+ `}};Ne.styles=M8;$([Xe(".popup")],Ne.prototype,"popup",2);$([Xe(".popup__arrow")],Ne.prototype,"arrowEl",2);$([S()],Ne.prototype,"anchor",2);$([S({type:Boolean,reflect:!0})],Ne.prototype,"active",2);$([S({reflect:!0})],Ne.prototype,"placement",2);$([S({reflect:!0})],Ne.prototype,"strategy",2);$([S({type:Number})],Ne.prototype,"distance",2);$([S({type:Number})],Ne.prototype,"skidding",2);$([S({type:Boolean})],Ne.prototype,"arrow",2);$([S({attribute:"arrow-placement"})],Ne.prototype,"arrowPlacement",2);$([S({attribute:"arrow-padding",type:Number})],Ne.prototype,"arrowPadding",2);$([S({type:Boolean})],Ne.prototype,"flip",2);$([S({attribute:"flip-fallback-placements",converter:{fromAttribute:e=>e.split(" ").map(t=>t.trim()).filter(t=>t!==""),toAttribute:e=>e.join(" ")}})],Ne.prototype,"flipFallbackPlacements",2);$([S({attribute:"flip-fallback-strategy"})],Ne.prototype,"flipFallbackStrategy",2);$([S({type:Object})],Ne.prototype,"flipBoundary",2);$([S({attribute:"flip-padding",type:Number})],Ne.prototype,"flipPadding",2);$([S({type:Boolean})],Ne.prototype,"shift",2);$([S({type:Object})],Ne.prototype,"shiftBoundary",2);$([S({attribute:"shift-padding",type:Number})],Ne.prototype,"shiftPadding",2);$([S({attribute:"auto-size"})],Ne.prototype,"autoSize",2);$([S()],Ne.prototype,"sync",2);$([S({type:Object})],Ne.prototype,"autoSizeBoundary",2);$([S({attribute:"auto-size-padding",type:Number})],Ne.prototype,"autoSizePadding",2);Ne=$([_t("sl-popup")],Ne);var $2=ft`
1017
1013
  .form-control .form-control__label {
1018
1014
  display: none;
1019
1015
  }
@@ -1364,7 +1360,7 @@ lit-html/directives/class-map.js:
1364
1360
  .input--no-spin-buttons input[type='number'] {
1365
1361
  -moz-appearance: textfield;
1366
1362
  }
1367
- `,r6=e=>e.strings===void 0,n6={},i6=(e,t=n6)=>e._$AH=t,Do=Qh(class extends Kh{constructor(e){if(super(e),e.type!==Xr.PROPERTY&&e.type!==Xr.ATTRIBUTE&&e.type!==Xr.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!r6(e))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===Gt||t===Be)return t;const r=e.element,n=e.name;if(e.type===Xr.PROPERTY){if(t===r[n])return Gt}else if(e.type===Xr.BOOLEAN_ATTRIBUTE){if(!!t===r.hasAttribute(n))return Gt}else if(e.type===Xr.ATTRIBUTE&&r.getAttribute(n)===t+"")return Gt;return i6(e),t}});/*! Bundled license information:
1363
+ `,r6=e=>e.strings===void 0,n6={},i6=(e,t=n6)=>e._$AH=t,Do=Kh(class extends Yh{constructor(e){if(super(e),e.type!==Xr.PROPERTY&&e.type!==Xr.ATTRIBUTE&&e.type!==Xr.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!r6(e))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===Gt||t===Be)return t;const r=e.element,n=e.name;if(e.type===Xr.PROPERTY){if(t===r[n])return Gt}else if(e.type===Xr.BOOLEAN_ATTRIBUTE){if(!!t===r.hasAttribute(n))return Gt}else if(e.type===Xr.ATTRIBUTE&&r.getAttribute(n)===t+"")return Gt;return i6(e),t}});/*! Bundled license information:
1368
1364
 
1369
1365
  lit-html/directive-helpers.js:
1370
1366
  (**
@@ -1491,7 +1487,7 @@ lit-html/directives/if-defined.js:
1491
1487
  </slot>
1492
1488
  </div>
1493
1489
  </div>
1494
- `}};ce.styles=t6;$([Xe(".input__control")],ce.prototype,"input",2);$([Er()],ce.prototype,"hasFocus",2);$([k()],ce.prototype,"title",2);$([k({reflect:!0})],ce.prototype,"type",2);$([k()],ce.prototype,"name",2);$([k()],ce.prototype,"value",2);$([rc()],ce.prototype,"defaultValue",2);$([k({reflect:!0})],ce.prototype,"size",2);$([k({type:Boolean,reflect:!0})],ce.prototype,"filled",2);$([k({type:Boolean,reflect:!0})],ce.prototype,"pill",2);$([k()],ce.prototype,"label",2);$([k({attribute:"help-text"})],ce.prototype,"helpText",2);$([k({type:Boolean})],ce.prototype,"clearable",2);$([k({type:Boolean,reflect:!0})],ce.prototype,"disabled",2);$([k()],ce.prototype,"placeholder",2);$([k({type:Boolean,reflect:!0})],ce.prototype,"readonly",2);$([k({attribute:"password-toggle",type:Boolean})],ce.prototype,"passwordToggle",2);$([k({attribute:"password-visible",type:Boolean})],ce.prototype,"passwordVisible",2);$([k({attribute:"no-spin-buttons",type:Boolean})],ce.prototype,"noSpinButtons",2);$([k({reflect:!0})],ce.prototype,"form",2);$([k({type:Boolean,reflect:!0})],ce.prototype,"required",2);$([k()],ce.prototype,"pattern",2);$([k({type:Number})],ce.prototype,"minlength",2);$([k({type:Number})],ce.prototype,"maxlength",2);$([k({type:Number})],ce.prototype,"min",2);$([k({type:Number})],ce.prototype,"max",2);$([k()],ce.prototype,"step",2);$([k()],ce.prototype,"autocapitalize",2);$([k()],ce.prototype,"autocorrect",2);$([k()],ce.prototype,"autocomplete",2);$([k({type:Boolean})],ce.prototype,"autofocus",2);$([k()],ce.prototype,"enterkeyhint",2);$([k({type:Boolean,converter:{fromAttribute:e=>!(!e||e==="false"),toAttribute:e=>e?"true":"false"}})],ce.prototype,"spellcheck",2);$([k()],ce.prototype,"inputmode",2);$([De("disabled",{waitUntilFirstUpdate:!0})],ce.prototype,"handleDisabledChange",1);$([De("step",{waitUntilFirstUpdate:!0})],ce.prototype,"handleStepChange",1);$([De("value",{waitUntilFirstUpdate:!0})],ce.prototype,"handleValueChange",1);ce=$([_t("sl-input")],ce);var Od="";function it(e){Od=e}function l6(){if(!Od){const e=[...document.getElementsByTagName("script")],t=e.find(r=>r.hasAttribute("data-shoelace"));if(t)it(t.getAttribute("data-shoelace"));else{const r=e.find(i=>/shoelace(\.min)?\.js($|\?)/.test(i.src));let n="";r&&(n=r.getAttribute("src")),it(n.split("/").slice(0,-1).join("/"))}}return Od.replace(/\/$/,"")}var c6={name:"default",resolver:e=>`${l6()}/assets/icons/${e}.svg`},u6=c6,gv={caret:`
1490
+ `}};ce.styles=t6;$([Xe(".input__control")],ce.prototype,"input",2);$([Er()],ce.prototype,"hasFocus",2);$([S()],ce.prototype,"title",2);$([S({reflect:!0})],ce.prototype,"type",2);$([S()],ce.prototype,"name",2);$([S()],ce.prototype,"value",2);$([rc()],ce.prototype,"defaultValue",2);$([S({reflect:!0})],ce.prototype,"size",2);$([S({type:Boolean,reflect:!0})],ce.prototype,"filled",2);$([S({type:Boolean,reflect:!0})],ce.prototype,"pill",2);$([S()],ce.prototype,"label",2);$([S({attribute:"help-text"})],ce.prototype,"helpText",2);$([S({type:Boolean})],ce.prototype,"clearable",2);$([S({type:Boolean,reflect:!0})],ce.prototype,"disabled",2);$([S()],ce.prototype,"placeholder",2);$([S({type:Boolean,reflect:!0})],ce.prototype,"readonly",2);$([S({attribute:"password-toggle",type:Boolean})],ce.prototype,"passwordToggle",2);$([S({attribute:"password-visible",type:Boolean})],ce.prototype,"passwordVisible",2);$([S({attribute:"no-spin-buttons",type:Boolean})],ce.prototype,"noSpinButtons",2);$([S({reflect:!0})],ce.prototype,"form",2);$([S({type:Boolean,reflect:!0})],ce.prototype,"required",2);$([S()],ce.prototype,"pattern",2);$([S({type:Number})],ce.prototype,"minlength",2);$([S({type:Number})],ce.prototype,"maxlength",2);$([S({type:Number})],ce.prototype,"min",2);$([S({type:Number})],ce.prototype,"max",2);$([S()],ce.prototype,"step",2);$([S()],ce.prototype,"autocapitalize",2);$([S()],ce.prototype,"autocorrect",2);$([S()],ce.prototype,"autocomplete",2);$([S({type:Boolean})],ce.prototype,"autofocus",2);$([S()],ce.prototype,"enterkeyhint",2);$([S({type:Boolean,converter:{fromAttribute:e=>!(!e||e==="false"),toAttribute:e=>e?"true":"false"}})],ce.prototype,"spellcheck",2);$([S()],ce.prototype,"inputmode",2);$([De("disabled",{waitUntilFirstUpdate:!0})],ce.prototype,"handleDisabledChange",1);$([De("step",{waitUntilFirstUpdate:!0})],ce.prototype,"handleStepChange",1);$([De("value",{waitUntilFirstUpdate:!0})],ce.prototype,"handleValueChange",1);ce=$([_t("sl-input")],ce);var Cd="";function it(e){Cd=e}function l6(){if(!Cd){const e=[...document.getElementsByTagName("script")],t=e.find(r=>r.hasAttribute("data-shoelace"));if(t)it(t.getAttribute("data-shoelace"));else{const r=e.find(i=>/shoelace(\.min)?\.js($|\?)/.test(i.src));let n="";r&&(n=r.getAttribute("src")),it(n.split("/").slice(0,-1).join("/"))}}return Cd.replace(/\/$/,"")}var c6={name:"default",resolver:e=>`${l6()}/assets/icons/${e}.svg`},u6=c6,gv={caret:`
1495
1491
  <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
1496
1492
  <polyline points="6 9 12 15 18 9"></polyline>
1497
1493
  </svg>
@@ -1579,7 +1575,7 @@ lit-html/directives/if-defined.js:
1579
1575
  <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-x-circle-fill" viewBox="0 0 16 16">
1580
1576
  <path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM5.354 4.646a.5.5 0 1 0-.708.708L7.293 8l-2.647 2.646a.5.5 0 0 0 .708.708L8 8.707l2.646 2.647a.5.5 0 0 0 .708-.708L8.707 8l2.647-2.646a.5.5 0 0 0-.708-.708L8 7.293 5.354 4.646z"></path>
1581
1577
  </svg>
1582
- `},d6={name:"system",resolver:e=>e in gv?`data:image/svg+xml,${encodeURIComponent(gv[e])}`:""},f6=d6,h6=[u6,f6],Cd=[];function p6(e){Cd.push(e)}function m6(e){Cd=Cd.filter(t=>t!==e)}function bv(e){return h6.find(t=>t.name===e)}var eu=new Map;function v6(e,t="cors"){if(eu.has(e))return eu.get(e);const r=fetch(e,{mode:t}).then(async n=>({ok:n.ok,status:n.status,html:await n.text()}));return eu.set(e,r),r}var tu=new Map;async function y6(e){if(tu.has(e))return tu.get(e);const t=await v6(e),r={ok:t.ok,status:t.status,svg:null};if(t.ok){const n=document.createElement("div");n.innerHTML=t.html;const i=n.firstElementChild;r.svg=i?.tagName.toLowerCase()==="svg"?i.outerHTML:""}return tu.set(e,r),r}var g6=ft`
1578
+ `},d6={name:"system",resolver:e=>e in gv?`data:image/svg+xml,${encodeURIComponent(gv[e])}`:""},f6=d6,h6=[u6,f6],Pd=[];function p6(e){Pd.push(e)}function m6(e){Pd=Pd.filter(t=>t!==e)}function bv(e){return h6.find(t=>t.name===e)}var tu=new Map;function v6(e,t="cors"){if(tu.has(e))return tu.get(e);const r=fetch(e,{mode:t}).then(async n=>({ok:n.ok,status:n.status,html:await n.text()}));return tu.set(e,r),r}var ru=new Map;async function y6(e){if(ru.has(e))return ru.get(e);const t=await v6(e),r={ok:t.ok,status:t.status,svg:null};if(t.ok){const n=document.createElement("div");n.innerHTML=t.html;const i=n.firstElementChild;r.svg=i?.tagName.toLowerCase()==="svg"?i.outerHTML:""}return ru.set(e,r),r}var g6=ft`
1583
1579
  ${wt}
1584
1580
 
1585
1581
  :host {
@@ -1594,7 +1590,7 @@ lit-html/directives/if-defined.js:
1594
1590
  height: 100%;
1595
1591
  width: 100%;
1596
1592
  }
1597
- `,Pd=class extends Kh{constructor(e){if(super(e),this.it=Be,e.type!==Xr.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===Be||e==null)return this._t=void 0,this.it=e;if(e===Gt)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;const t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}};Pd.directiveName="unsafeHTML",Pd.resultType=1;var Td=class extends Pd{};Td.directiveName="unsafeSVG",Td.resultType=2;var b6=Qh(Td),ru,wr=class extends ht{constructor(){super(...arguments),this.svg="",this.label="",this.library="default"}connectedCallback(){super.connectedCallback(),p6(this)}firstUpdated(){this.setIcon()}disconnectedCallback(){super.disconnectedCallback(),m6(this)}getUrl(){const e=bv(this.library);return this.name&&e?e.resolver(this.name):this.src}handleLabelChange(){typeof this.label=="string"&&this.label.length>0?(this.setAttribute("role","img"),this.setAttribute("aria-label",this.label),this.removeAttribute("aria-hidden")):(this.removeAttribute("role"),this.removeAttribute("aria-label"),this.setAttribute("aria-hidden","true"))}async setIcon(){var e;const t=bv(this.library),r=this.getUrl();if(ru||(ru=new DOMParser),r)try{const n=await y6(r);if(r!==this.getUrl())return;if(n.ok){const o=ru.parseFromString(n.svg,"text/html").body.querySelector("svg");o!==null?((e=t?.mutator)==null||e.call(t,o),this.svg=o.outerHTML,this.emit("sl-load")):(this.svg="",this.emit("sl-error"))}else this.svg="",this.emit("sl-error")}catch{this.emit("sl-error")}else this.svg.length>0&&(this.svg="")}render(){return Ie` ${b6(this.svg)} `}};wr.styles=g6;$([Er()],wr.prototype,"svg",2);$([k({reflect:!0})],wr.prototype,"name",2);$([k()],wr.prototype,"src",2);$([k()],wr.prototype,"label",2);$([k({reflect:!0})],wr.prototype,"library",2);$([De("label")],wr.prototype,"handleLabelChange",1);$([De(["name","src","library"])],wr.prototype,"setIcon",1);wr=$([_t("sl-icon")],wr);/*! Bundled license information:
1593
+ `,Td=class extends Yh{constructor(e){if(super(e),this.it=Be,e.type!==Xr.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===Be||e==null)return this._t=void 0,this.it=e;if(e===Gt)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;const t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}};Td.directiveName="unsafeHTML",Td.resultType=1;var Nd=class extends Td{};Nd.directiveName="unsafeSVG",Nd.resultType=2;var b6=Kh(Nd),nu,wr=class extends ht{constructor(){super(...arguments),this.svg="",this.label="",this.library="default"}connectedCallback(){super.connectedCallback(),p6(this)}firstUpdated(){this.setIcon()}disconnectedCallback(){super.disconnectedCallback(),m6(this)}getUrl(){const e=bv(this.library);return this.name&&e?e.resolver(this.name):this.src}handleLabelChange(){typeof this.label=="string"&&this.label.length>0?(this.setAttribute("role","img"),this.setAttribute("aria-label",this.label),this.removeAttribute("aria-hidden")):(this.removeAttribute("role"),this.removeAttribute("aria-label"),this.setAttribute("aria-hidden","true"))}async setIcon(){var e;const t=bv(this.library),r=this.getUrl();if(nu||(nu=new DOMParser),r)try{const n=await y6(r);if(r!==this.getUrl())return;if(n.ok){const o=nu.parseFromString(n.svg,"text/html").body.querySelector("svg");o!==null?((e=t?.mutator)==null||e.call(t,o),this.svg=o.outerHTML,this.emit("sl-load")):(this.svg="",this.emit("sl-error"))}else this.svg="",this.emit("sl-error")}catch{this.emit("sl-error")}else this.svg.length>0&&(this.svg="")}render(){return Ie` ${b6(this.svg)} `}};wr.styles=g6;$([Er()],wr.prototype,"svg",2);$([S({reflect:!0})],wr.prototype,"name",2);$([S()],wr.prototype,"src",2);$([S()],wr.prototype,"label",2);$([S({reflect:!0})],wr.prototype,"library",2);$([De("label")],wr.prototype,"handleLabelChange",1);$([De(["name","src","library"])],wr.prototype,"setIcon",1);wr=$([_t("sl-icon")],wr);/*! Bundled license information:
1598
1594
 
1599
1595
  lit-html/directives/unsafe-html.js:
1600
1596
  (**
@@ -1749,7 +1745,7 @@ lit-html/directives/unsafe-svg.js:
1749
1745
  <sl-icon name="chevron-right" library="system" aria-hidden="true"></sl-icon>
1750
1746
  </span>
1751
1747
  </div>
1752
- `}};Xt.styles=w6;$([Xe("slot:not([name])")],Xt.prototype,"defaultSlot",2);$([Xe(".menu-item")],Xt.prototype,"menuItem",2);$([k()],Xt.prototype,"type",2);$([k({type:Boolean,reflect:!0})],Xt.prototype,"checked",2);$([k()],Xt.prototype,"value",2);$([k({type:Boolean,reflect:!0})],Xt.prototype,"disabled",2);$([De("checked")],Xt.prototype,"handleCheckedChange",1);$([De("disabled")],Xt.prototype,"handleDisabledChange",1);$([De("type")],Xt.prototype,"handleTypeChange",1);Xt=$([_t("sl-menu-item")],Xt);var _6=ft`
1748
+ `}};Xt.styles=w6;$([Xe("slot:not([name])")],Xt.prototype,"defaultSlot",2);$([Xe(".menu-item")],Xt.prototype,"menuItem",2);$([S()],Xt.prototype,"type",2);$([S({type:Boolean,reflect:!0})],Xt.prototype,"checked",2);$([S()],Xt.prototype,"value",2);$([S({type:Boolean,reflect:!0})],Xt.prototype,"disabled",2);$([De("checked")],Xt.prototype,"handleCheckedChange",1);$([De("disabled")],Xt.prototype,"handleDisabledChange",1);$([De("type")],Xt.prototype,"handleTypeChange",1);Xt=$([_t("sl-menu-item")],Xt);var _6=ft`
1753
1749
  ${wt}
1754
1750
 
1755
1751
  :host {
@@ -1808,12 +1804,12 @@ lit-html/directives/unsafe-svg.js:
1808
1804
  stroke-dasharray: 0.01em, 2.75em;
1809
1805
  }
1810
1806
  }
1811
- `,Nd=class extends ht{constructor(){super(...arguments),this.localize=new Bn(this)}render(){return Ie`
1807
+ `,Id=class extends ht{constructor(){super(...arguments),this.localize=new Bn(this)}render(){return Ie`
1812
1808
  <svg part="base" class="spinner" role="progressbar" aria-valuetext=${this.localize.term("loading")}>
1813
1809
  <circle class="spinner__track"></circle>
1814
1810
  <circle class="spinner__indicator"></circle>
1815
1811
  </svg>
1816
- `}};Nd.styles=_6;Nd=$([_t("sl-spinner")],Nd);const Ut=`:root,:host,.sl-theme-light{color-scheme:light;--sl-color-gray-50: hsl(0 0% 97.5%);--sl-color-gray-100: hsl(240 4.8% 95.9%);--sl-color-gray-200: hsl(240 5.9% 90%);--sl-color-gray-300: hsl(240 4.9% 83.9%);--sl-color-gray-400: hsl(240 5% 64.9%);--sl-color-gray-500: hsl(240 3.8% 46.1%);--sl-color-gray-600: hsl(240 5.2% 33.9%);--sl-color-gray-700: hsl(240 5.3% 26.1%);--sl-color-gray-800: hsl(240 3.7% 15.9%);--sl-color-gray-900: hsl(240 5.9% 10%);--sl-color-gray-950: hsl(240 7.3% 8%);--sl-color-red-50: hsl(0 85.7% 97.3%);--sl-color-red-100: hsl(0 93.3% 94.1%);--sl-color-red-200: hsl(0 96.3% 89.4%);--sl-color-red-300: hsl(0 93.5% 81.8%);--sl-color-red-400: hsl(0 90.6% 70.8%);--sl-color-red-500: hsl(0 84.2% 60.2%);--sl-color-red-600: hsl(0 72.2% 50.6%);--sl-color-red-700: hsl(0 73.7% 41.8%);--sl-color-red-800: hsl(0 70% 35.3%);--sl-color-red-900: hsl(0 62.8% 30.6%);--sl-color-red-950: hsl(0 60% 19.6%);--sl-color-orange-50: hsl(33.3 100% 96.5%);--sl-color-orange-100: hsl(34.3 100% 91.8%);--sl-color-orange-200: hsl(32.1 97.7% 83.1%);--sl-color-orange-300: hsl(30.7 97.2% 72.4%);--sl-color-orange-400: hsl(27 96% 61%);--sl-color-orange-500: hsl(24.6 95% 53.1%);--sl-color-orange-600: hsl(20.5 90.2% 48.2%);--sl-color-orange-700: hsl(17.5 88.3% 40.4%);--sl-color-orange-800: hsl(15 79.1% 33.7%);--sl-color-orange-900: hsl(15.3 74.6% 27.8%);--sl-color-orange-950: hsl(15.2 69.1% 19%);--sl-color-amber-50: hsl(48 100% 96.1%);--sl-color-amber-100: hsl(48 96.5% 88.8%);--sl-color-amber-200: hsl(48 96.6% 76.7%);--sl-color-amber-300: hsl(45.9 96.7% 64.5%);--sl-color-amber-400: hsl(43.3 96.4% 56.3%);--sl-color-amber-500: hsl(37.7 92.1% 50.2%);--sl-color-amber-600: hsl(32.1 94.6% 43.7%);--sl-color-amber-700: hsl(26 90.5% 37.1%);--sl-color-amber-800: hsl(22.7 82.5% 31.4%);--sl-color-amber-900: hsl(21.7 77.8% 26.5%);--sl-color-amber-950: hsl(22.9 74.1% 16.7%);--sl-color-yellow-50: hsl(54.5 91.7% 95.3%);--sl-color-yellow-100: hsl(54.9 96.7% 88%);--sl-color-yellow-200: hsl(52.8 98.3% 76.9%);--sl-color-yellow-300: hsl(50.4 97.8% 63.5%);--sl-color-yellow-400: hsl(47.9 95.8% 53.1%);--sl-color-yellow-500: hsl(45.4 93.4% 47.5%);--sl-color-yellow-600: hsl(40.6 96.1% 40.4%);--sl-color-yellow-700: hsl(35.5 91.7% 32.9%);--sl-color-yellow-800: hsl(31.8 81% 28.8%);--sl-color-yellow-900: hsl(28.4 72.5% 25.7%);--sl-color-yellow-950: hsl(33.1 69% 13.9%);--sl-color-lime-50: hsl(78.3 92% 95.1%);--sl-color-lime-100: hsl(79.6 89.1% 89.2%);--sl-color-lime-200: hsl(80.9 88.5% 79.6%);--sl-color-lime-300: hsl(82 84.5% 67.1%);--sl-color-lime-400: hsl(82.7 78% 55.5%);--sl-color-lime-500: hsl(83.7 80.5% 44.3%);--sl-color-lime-600: hsl(84.8 85.2% 34.5%);--sl-color-lime-700: hsl(85.9 78.4% 27.3%);--sl-color-lime-800: hsl(86.3 69% 22.7%);--sl-color-lime-900: hsl(87.6 61.2% 20.2%);--sl-color-lime-950: hsl(86.5 60.6% 13.9%);--sl-color-green-50: hsl(138.5 76.5% 96.7%);--sl-color-green-100: hsl(140.6 84.2% 92.5%);--sl-color-green-200: hsl(141 78.9% 85.1%);--sl-color-green-300: hsl(141.7 76.6% 73.1%);--sl-color-green-400: hsl(141.9 69.2% 58%);--sl-color-green-500: hsl(142.1 70.6% 45.3%);--sl-color-green-600: hsl(142.1 76.2% 36.3%);--sl-color-green-700: hsl(142.4 71.8% 29.2%);--sl-color-green-800: hsl(142.8 64.2% 24.1%);--sl-color-green-900: hsl(143.8 61.2% 20.2%);--sl-color-green-950: hsl(144.3 60.7% 12%);--sl-color-emerald-50: hsl(151.8 81% 95.9%);--sl-color-emerald-100: hsl(149.3 80.4% 90%);--sl-color-emerald-200: hsl(152.4 76% 80.4%);--sl-color-emerald-300: hsl(156.2 71.6% 66.9%);--sl-color-emerald-400: hsl(158.1 64.4% 51.6%);--sl-color-emerald-500: hsl(160.1 84.1% 39.4%);--sl-color-emerald-600: hsl(161.4 93.5% 30.4%);--sl-color-emerald-700: hsl(162.9 93.5% 24.3%);--sl-color-emerald-800: hsl(163.1 88.1% 19.8%);--sl-color-emerald-900: hsl(164.2 85.7% 16.5%);--sl-color-emerald-950: hsl(164.3 87.5% 9.4%);--sl-color-teal-50: hsl(166.2 76.5% 96.7%);--sl-color-teal-100: hsl(167.2 85.5% 89.2%);--sl-color-teal-200: hsl(168.4 83.8% 78.2%);--sl-color-teal-300: hsl(170.6 76.9% 64.3%);--sl-color-teal-400: hsl(172.5 66% 50.4%);--sl-color-teal-500: hsl(173.4 80.4% 40%);--sl-color-teal-600: hsl(174.7 83.9% 31.6%);--sl-color-teal-700: hsl(175.3 77.4% 26.1%);--sl-color-teal-800: hsl(176.1 69.4% 21.8%);--sl-color-teal-900: hsl(175.9 60.8% 19%);--sl-color-teal-950: hsl(176.5 58.6% 11.4%);--sl-color-cyan-50: hsl(183.2 100% 96.3%);--sl-color-cyan-100: hsl(185.1 95.9% 90.4%);--sl-color-cyan-200: hsl(186.2 93.5% 81.8%);--sl-color-cyan-300: hsl(187 92.4% 69%);--sl-color-cyan-400: hsl(187.9 85.7% 53.3%);--sl-color-cyan-500: hsl(188.7 94.5% 42.7%);--sl-color-cyan-600: hsl(191.6 91.4% 36.5%);--sl-color-cyan-700: hsl(192.9 82.3% 31%);--sl-color-cyan-800: hsl(194.4 69.6% 27.1%);--sl-color-cyan-900: hsl(196.4 63.6% 23.7%);--sl-color-cyan-950: hsl(196.8 61% 16.1%);--sl-color-sky-50: hsl(204 100% 97.1%);--sl-color-sky-100: hsl(204 93.8% 93.7%);--sl-color-sky-200: hsl(200.6 94.4% 86.1%);--sl-color-sky-300: hsl(199.4 95.5% 73.9%);--sl-color-sky-400: hsl(198.4 93.2% 59.6%);--sl-color-sky-500: hsl(198.6 88.7% 48.4%);--sl-color-sky-600: hsl(200.4 98% 39.4%);--sl-color-sky-700: hsl(201.3 96.3% 32.2%);--sl-color-sky-800: hsl(201 90% 27.5%);--sl-color-sky-900: hsl(202 80.3% 23.9%);--sl-color-sky-950: hsl(202.3 73.8% 16.5%);--sl-color-blue-50: hsl(213.8 100% 96.9%);--sl-color-blue-100: hsl(214.3 94.6% 92.7%);--sl-color-blue-200: hsl(213.3 96.9% 87.3%);--sl-color-blue-300: hsl(211.7 96.4% 78.4%);--sl-color-blue-400: hsl(213.1 93.9% 67.8%);--sl-color-blue-500: hsl(217.2 91.2% 59.8%);--sl-color-blue-600: hsl(221.2 83.2% 53.3%);--sl-color-blue-700: hsl(224.3 76.3% 48%);--sl-color-blue-800: hsl(225.9 70.7% 40.2%);--sl-color-blue-900: hsl(224.4 64.3% 32.9%);--sl-color-blue-950: hsl(226.2 55.3% 18.4%);--sl-color-indigo-50: hsl(225.9 100% 96.7%);--sl-color-indigo-100: hsl(226.5 100% 93.9%);--sl-color-indigo-200: hsl(228 96.5% 88.8%);--sl-color-indigo-300: hsl(229.7 93.5% 81.8%);--sl-color-indigo-400: hsl(234.5 89.5% 73.9%);--sl-color-indigo-500: hsl(238.7 83.5% 66.7%);--sl-color-indigo-600: hsl(243.4 75.4% 58.6%);--sl-color-indigo-700: hsl(244.5 57.9% 50.6%);--sl-color-indigo-800: hsl(243.7 54.5% 41.4%);--sl-color-indigo-900: hsl(242.2 47.4% 34.3%);--sl-color-indigo-950: hsl(243.5 43.6% 22.9%);--sl-color-violet-50: hsl(250 100% 97.6%);--sl-color-violet-100: hsl(251.4 91.3% 95.5%);--sl-color-violet-200: hsl(250.5 95.2% 91.8%);--sl-color-violet-300: hsl(252.5 94.7% 85.1%);--sl-color-violet-400: hsl(255.1 91.7% 76.3%);--sl-color-violet-500: hsl(258.3 89.5% 66.3%);--sl-color-violet-600: hsl(262.1 83.3% 57.8%);--sl-color-violet-700: hsl(263.4 70% 50.4%);--sl-color-violet-800: hsl(263.4 69.3% 42.2%);--sl-color-violet-900: hsl(263.5 67.4% 34.9%);--sl-color-violet-950: hsl(265.1 61.5% 21.4%);--sl-color-purple-50: hsl(270 100% 98%);--sl-color-purple-100: hsl(268.7 100% 95.5%);--sl-color-purple-200: hsl(268.6 100% 91.8%);--sl-color-purple-300: hsl(269.2 97.4% 85.1%);--sl-color-purple-400: hsl(270 95.2% 75.3%);--sl-color-purple-500: hsl(270.7 91% 65.1%);--sl-color-purple-600: hsl(271.5 81.3% 55.9%);--sl-color-purple-700: hsl(272.1 71.7% 47.1%);--sl-color-purple-800: hsl(272.9 67.2% 39.4%);--sl-color-purple-900: hsl(273.6 65.6% 32%);--sl-color-purple-950: hsl(276 59.5% 16.5%);--sl-color-fuchsia-50: hsl(289.1 100% 97.8%);--sl-color-fuchsia-100: hsl(287 100% 95.5%);--sl-color-fuchsia-200: hsl(288.3 95.8% 90.6%);--sl-color-fuchsia-300: hsl(291.1 93.1% 82.9%);--sl-color-fuchsia-400: hsl(292 91.4% 72.5%);--sl-color-fuchsia-500: hsl(292.2 84.1% 60.6%);--sl-color-fuchsia-600: hsl(293.4 69.5% 48.8%);--sl-color-fuchsia-700: hsl(294.7 72.4% 39.8%);--sl-color-fuchsia-800: hsl(295.4 70.2% 32.9%);--sl-color-fuchsia-900: hsl(296.7 63.6% 28%);--sl-color-fuchsia-950: hsl(297.1 56.8% 14.5%);--sl-color-pink-50: hsl(327.3 73.3% 97.1%);--sl-color-pink-100: hsl(325.7 77.8% 94.7%);--sl-color-pink-200: hsl(325.9 84.6% 89.8%);--sl-color-pink-300: hsl(327.4 87.1% 81.8%);--sl-color-pink-400: hsl(328.6 85.5% 70.2%);--sl-color-pink-500: hsl(330.4 81.2% 60.4%);--sl-color-pink-600: hsl(333.3 71.4% 50.6%);--sl-color-pink-700: hsl(335.1 77.6% 42%);--sl-color-pink-800: hsl(335.8 74.4% 35.3%);--sl-color-pink-900: hsl(335.9 69% 30.4%);--sl-color-pink-950: hsl(336.2 65.4% 15.9%);--sl-color-rose-50: hsl(355.7 100% 97.3%);--sl-color-rose-100: hsl(355.6 100% 94.7%);--sl-color-rose-200: hsl(352.7 96.1% 90%);--sl-color-rose-300: hsl(352.6 95.7% 81.8%);--sl-color-rose-400: hsl(351.3 94.5% 71.4%);--sl-color-rose-500: hsl(349.7 89.2% 60.2%);--sl-color-rose-600: hsl(346.8 77.2% 49.8%);--sl-color-rose-700: hsl(345.3 82.7% 40.8%);--sl-color-rose-800: hsl(343.4 79.7% 34.7%);--sl-color-rose-900: hsl(341.5 75.5% 30.4%);--sl-color-rose-950: hsl(341.3 70.1% 17.1%);--sl-color-primary-50: var(--sl-color-sky-50);--sl-color-primary-100: var(--sl-color-sky-100);--sl-color-primary-200: var(--sl-color-sky-200);--sl-color-primary-300: var(--sl-color-sky-300);--sl-color-primary-400: var(--sl-color-sky-400);--sl-color-primary-500: var(--sl-color-sky-500);--sl-color-primary-600: var(--sl-color-sky-600);--sl-color-primary-700: var(--sl-color-sky-700);--sl-color-primary-800: var(--sl-color-sky-800);--sl-color-primary-900: var(--sl-color-sky-900);--sl-color-primary-950: var(--sl-color-sky-950);--sl-color-success-50: var(--sl-color-green-50);--sl-color-success-100: var(--sl-color-green-100);--sl-color-success-200: var(--sl-color-green-200);--sl-color-success-300: var(--sl-color-green-300);--sl-color-success-400: var(--sl-color-green-400);--sl-color-success-500: var(--sl-color-green-500);--sl-color-success-600: var(--sl-color-green-600);--sl-color-success-700: var(--sl-color-green-700);--sl-color-success-800: var(--sl-color-green-800);--sl-color-success-900: var(--sl-color-green-900);--sl-color-success-950: var(--sl-color-green-950);--sl-color-warning-50: var(--sl-color-amber-50);--sl-color-warning-100: var(--sl-color-amber-100);--sl-color-warning-200: var(--sl-color-amber-200);--sl-color-warning-300: var(--sl-color-amber-300);--sl-color-warning-400: var(--sl-color-amber-400);--sl-color-warning-500: var(--sl-color-amber-500);--sl-color-warning-600: var(--sl-color-amber-600);--sl-color-warning-700: var(--sl-color-amber-700);--sl-color-warning-800: var(--sl-color-amber-800);--sl-color-warning-900: var(--sl-color-amber-900);--sl-color-warning-950: var(--sl-color-amber-950);--sl-color-danger-50: var(--sl-color-red-50);--sl-color-danger-100: var(--sl-color-red-100);--sl-color-danger-200: var(--sl-color-red-200);--sl-color-danger-300: var(--sl-color-red-300);--sl-color-danger-400: var(--sl-color-red-400);--sl-color-danger-500: var(--sl-color-red-500);--sl-color-danger-600: var(--sl-color-red-600);--sl-color-danger-700: var(--sl-color-red-700);--sl-color-danger-800: var(--sl-color-red-800);--sl-color-danger-900: var(--sl-color-red-900);--sl-color-danger-950: var(--sl-color-red-950);--sl-color-neutral-50: var(--sl-color-gray-50);--sl-color-neutral-100: var(--sl-color-gray-100);--sl-color-neutral-200: var(--sl-color-gray-200);--sl-color-neutral-300: var(--sl-color-gray-300);--sl-color-neutral-400: var(--sl-color-gray-400);--sl-color-neutral-500: var(--sl-color-gray-500);--sl-color-neutral-600: var(--sl-color-gray-600);--sl-color-neutral-700: var(--sl-color-gray-700);--sl-color-neutral-800: var(--sl-color-gray-800);--sl-color-neutral-900: var(--sl-color-gray-900);--sl-color-neutral-950: var(--sl-color-gray-950);--sl-color-neutral-0: hsl(0, 0%, 100%);--sl-color-neutral-1000: hsl(0, 0%, 0%);--sl-border-radius-small: .1875rem;--sl-border-radius-medium: .25rem;--sl-border-radius-large: .5rem;--sl-border-radius-x-large: 1rem;--sl-border-radius-circle: 50%;--sl-border-radius-pill: 9999px;--sl-shadow-x-small: 0 1px 2px hsl(240 3.8% 46.1% / 6%);--sl-shadow-small: 0 1px 2px hsl(240 3.8% 46.1% / 12%);--sl-shadow-medium: 0 2px 4px hsl(240 3.8% 46.1% / 12%);--sl-shadow-large: 0 2px 8px hsl(240 3.8% 46.1% / 12%);--sl-shadow-x-large: 0 4px 16px hsl(240 3.8% 46.1% / 12%);--sl-spacing-3x-small: .125rem;--sl-spacing-2x-small: .25rem;--sl-spacing-x-small: .5rem;--sl-spacing-small: .75rem;--sl-spacing-medium: 1rem;--sl-spacing-large: 1.25rem;--sl-spacing-x-large: 1.75rem;--sl-spacing-2x-large: 2.25rem;--sl-spacing-3x-large: 3rem;--sl-spacing-4x-large: 4.5rem;--sl-transition-x-slow: 1s;--sl-transition-slow: .5s;--sl-transition-medium: .25s;--sl-transition-fast: .15s;--sl-transition-x-fast: 50ms;--sl-font-mono: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;--sl-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";--sl-font-serif: Georgia, "Times New Roman", serif;--sl-font-size-2x-small: .625rem;--sl-font-size-x-small: .75rem;--sl-font-size-small: .875rem;--sl-font-size-medium: 1rem;--sl-font-size-large: 1.25rem;--sl-font-size-x-large: 1.5rem;--sl-font-size-2x-large: 2.25rem;--sl-font-size-3x-large: 3rem;--sl-font-size-4x-large: 4.5rem;--sl-font-weight-light: 300;--sl-font-weight-normal: 400;--sl-font-weight-semibold: 500;--sl-font-weight-bold: 700;--sl-letter-spacing-denser: -.03em;--sl-letter-spacing-dense: -.015em;--sl-letter-spacing-normal: normal;--sl-letter-spacing-loose: .075em;--sl-letter-spacing-looser: .15em;--sl-line-height-denser: 1;--sl-line-height-dense: 1.4;--sl-line-height-normal: 1.8;--sl-line-height-loose: 2.2;--sl-line-height-looser: 2.6;--sl-focus-ring-color: var(--sl-color-primary-600);--sl-focus-ring-style: solid;--sl-focus-ring-width: 3px;--sl-focus-ring: var(--sl-focus-ring-style) var(--sl-focus-ring-width) var(--sl-focus-ring-color);--sl-focus-ring-offset: 1px;--sl-button-font-size-small: var(--sl-font-size-x-small);--sl-button-font-size-medium: var(--sl-font-size-small);--sl-button-font-size-large: var(--sl-font-size-medium);--sl-input-height-small: 1.875rem;--sl-input-height-medium: 2.5rem;--sl-input-height-large: 3.125rem;--sl-input-background-color: var(--sl-color-neutral-0);--sl-input-background-color-hover: var(--sl-input-background-color);--sl-input-background-color-focus: var(--sl-input-background-color);--sl-input-background-color-disabled: var(--sl-color-neutral-100);--sl-input-border-color: var(--sl-color-neutral-300);--sl-input-border-color-hover: var(--sl-color-neutral-400);--sl-input-border-color-focus: var(--sl-color-primary-500);--sl-input-border-color-disabled: var(--sl-color-neutral-300);--sl-input-border-width: 1px;--sl-input-required-content: "*";--sl-input-required-content-offset: -2px;--sl-input-required-content-color: var(--sl-input-label-color);--sl-input-border-radius-small: var(--sl-border-radius-medium);--sl-input-border-radius-medium: var(--sl-border-radius-medium);--sl-input-border-radius-large: var(--sl-border-radius-medium);--sl-input-font-family: var(--sl-font-sans);--sl-input-font-weight: var(--sl-font-weight-normal);--sl-input-font-size-small: var(--sl-font-size-small);--sl-input-font-size-medium: var(--sl-font-size-medium);--sl-input-font-size-large: var(--sl-font-size-large);--sl-input-letter-spacing: var(--sl-letter-spacing-normal);--sl-input-color: var(--sl-color-neutral-700);--sl-input-color-hover: var(--sl-color-neutral-700);--sl-input-color-focus: var(--sl-color-neutral-700);--sl-input-color-disabled: var(--sl-color-neutral-900);--sl-input-icon-color: var(--sl-color-neutral-500);--sl-input-icon-color-hover: var(--sl-color-neutral-600);--sl-input-icon-color-focus: var(--sl-color-neutral-600);--sl-input-placeholder-color: var(--sl-color-neutral-500);--sl-input-placeholder-color-disabled: var(--sl-color-neutral-600);--sl-input-spacing-small: var(--sl-spacing-small);--sl-input-spacing-medium: var(--sl-spacing-medium);--sl-input-spacing-large: var(--sl-spacing-large);--sl-input-focus-ring-color: hsl(198.6 88.7% 48.4% / 40%);--sl-input-focus-ring-offset: 0;--sl-input-filled-background-color: var(--sl-color-neutral-100);--sl-input-filled-background-color-hover: var(--sl-color-neutral-100);--sl-input-filled-background-color-focus: var(--sl-color-neutral-100);--sl-input-filled-background-color-disabled: var(--sl-color-neutral-100);--sl-input-filled-color: var(--sl-color-neutral-800);--sl-input-filled-color-hover: var(--sl-color-neutral-800);--sl-input-filled-color-focus: var(--sl-color-neutral-700);--sl-input-filled-color-disabled: var(--sl-color-neutral-800);--sl-input-label-font-size-small: var(--sl-font-size-small);--sl-input-label-font-size-medium: var(--sl-font-size-medium);--sl-input-label-font-size-large: var(--sl-font-size-large);--sl-input-label-color: inherit;--sl-input-help-text-font-size-small: var(--sl-font-size-x-small);--sl-input-help-text-font-size-medium: var(--sl-font-size-small);--sl-input-help-text-font-size-large: var(--sl-font-size-medium);--sl-input-help-text-color: var(--sl-color-neutral-500);--sl-toggle-size-small: .875rem;--sl-toggle-size-medium: 1.125rem;--sl-toggle-size-large: 1.375rem;--sl-overlay-background-color: hsl(240 3.8% 46.1% / 33%);--sl-panel-background-color: var(--sl-color-neutral-0);--sl-panel-border-color: var(--sl-color-neutral-200);--sl-panel-border-width: 1px;--sl-tooltip-border-radius: var(--sl-border-radius-medium);--sl-tooltip-background-color: var(--sl-color-neutral-800);--sl-tooltip-color: var(--sl-color-neutral-0);--sl-tooltip-font-family: var(--sl-font-sans);--sl-tooltip-font-weight: var(--sl-font-weight-normal);--sl-tooltip-font-size: var(--sl-font-size-small);--sl-tooltip-line-height: var(--sl-line-height-dense);--sl-tooltip-padding: var(--sl-spacing-2x-small) var(--sl-spacing-x-small);--sl-tooltip-arrow-size: 6px;--sl-z-index-drawer: 700;--sl-z-index-dialog: 800;--sl-z-index-dropdown: 900;--sl-z-index-toast: 950;--sl-z-index-tooltip: 1000}.sl-scroll-lock{padding-right:var(--sl-scroll-lock-size)!important;overflow:hidden!important}.sl-toast-stack{position:fixed;top:0;inset-inline-end:0;z-index:var(--sl-z-index-toast);width:28rem;max-width:100%;max-height:100%;overflow:auto}.sl-toast-stack sl-alert{margin:var(--sl-spacing-medium)}.sl-toast-stack sl-alert::part(base){box-shadow:var(--sl-shadow-large)}
1812
+ `}};Id.styles=_6;Id=$([_t("sl-spinner")],Id);const Ut=`:root,:host,.sl-theme-light{color-scheme:light;--sl-color-gray-50: hsl(0 0% 97.5%);--sl-color-gray-100: hsl(240 4.8% 95.9%);--sl-color-gray-200: hsl(240 5.9% 90%);--sl-color-gray-300: hsl(240 4.9% 83.9%);--sl-color-gray-400: hsl(240 5% 64.9%);--sl-color-gray-500: hsl(240 3.8% 46.1%);--sl-color-gray-600: hsl(240 5.2% 33.9%);--sl-color-gray-700: hsl(240 5.3% 26.1%);--sl-color-gray-800: hsl(240 3.7% 15.9%);--sl-color-gray-900: hsl(240 5.9% 10%);--sl-color-gray-950: hsl(240 7.3% 8%);--sl-color-red-50: hsl(0 85.7% 97.3%);--sl-color-red-100: hsl(0 93.3% 94.1%);--sl-color-red-200: hsl(0 96.3% 89.4%);--sl-color-red-300: hsl(0 93.5% 81.8%);--sl-color-red-400: hsl(0 90.6% 70.8%);--sl-color-red-500: hsl(0 84.2% 60.2%);--sl-color-red-600: hsl(0 72.2% 50.6%);--sl-color-red-700: hsl(0 73.7% 41.8%);--sl-color-red-800: hsl(0 70% 35.3%);--sl-color-red-900: hsl(0 62.8% 30.6%);--sl-color-red-950: hsl(0 60% 19.6%);--sl-color-orange-50: hsl(33.3 100% 96.5%);--sl-color-orange-100: hsl(34.3 100% 91.8%);--sl-color-orange-200: hsl(32.1 97.7% 83.1%);--sl-color-orange-300: hsl(30.7 97.2% 72.4%);--sl-color-orange-400: hsl(27 96% 61%);--sl-color-orange-500: hsl(24.6 95% 53.1%);--sl-color-orange-600: hsl(20.5 90.2% 48.2%);--sl-color-orange-700: hsl(17.5 88.3% 40.4%);--sl-color-orange-800: hsl(15 79.1% 33.7%);--sl-color-orange-900: hsl(15.3 74.6% 27.8%);--sl-color-orange-950: hsl(15.2 69.1% 19%);--sl-color-amber-50: hsl(48 100% 96.1%);--sl-color-amber-100: hsl(48 96.5% 88.8%);--sl-color-amber-200: hsl(48 96.6% 76.7%);--sl-color-amber-300: hsl(45.9 96.7% 64.5%);--sl-color-amber-400: hsl(43.3 96.4% 56.3%);--sl-color-amber-500: hsl(37.7 92.1% 50.2%);--sl-color-amber-600: hsl(32.1 94.6% 43.7%);--sl-color-amber-700: hsl(26 90.5% 37.1%);--sl-color-amber-800: hsl(22.7 82.5% 31.4%);--sl-color-amber-900: hsl(21.7 77.8% 26.5%);--sl-color-amber-950: hsl(22.9 74.1% 16.7%);--sl-color-yellow-50: hsl(54.5 91.7% 95.3%);--sl-color-yellow-100: hsl(54.9 96.7% 88%);--sl-color-yellow-200: hsl(52.8 98.3% 76.9%);--sl-color-yellow-300: hsl(50.4 97.8% 63.5%);--sl-color-yellow-400: hsl(47.9 95.8% 53.1%);--sl-color-yellow-500: hsl(45.4 93.4% 47.5%);--sl-color-yellow-600: hsl(40.6 96.1% 40.4%);--sl-color-yellow-700: hsl(35.5 91.7% 32.9%);--sl-color-yellow-800: hsl(31.8 81% 28.8%);--sl-color-yellow-900: hsl(28.4 72.5% 25.7%);--sl-color-yellow-950: hsl(33.1 69% 13.9%);--sl-color-lime-50: hsl(78.3 92% 95.1%);--sl-color-lime-100: hsl(79.6 89.1% 89.2%);--sl-color-lime-200: hsl(80.9 88.5% 79.6%);--sl-color-lime-300: hsl(82 84.5% 67.1%);--sl-color-lime-400: hsl(82.7 78% 55.5%);--sl-color-lime-500: hsl(83.7 80.5% 44.3%);--sl-color-lime-600: hsl(84.8 85.2% 34.5%);--sl-color-lime-700: hsl(85.9 78.4% 27.3%);--sl-color-lime-800: hsl(86.3 69% 22.7%);--sl-color-lime-900: hsl(87.6 61.2% 20.2%);--sl-color-lime-950: hsl(86.5 60.6% 13.9%);--sl-color-green-50: hsl(138.5 76.5% 96.7%);--sl-color-green-100: hsl(140.6 84.2% 92.5%);--sl-color-green-200: hsl(141 78.9% 85.1%);--sl-color-green-300: hsl(141.7 76.6% 73.1%);--sl-color-green-400: hsl(141.9 69.2% 58%);--sl-color-green-500: hsl(142.1 70.6% 45.3%);--sl-color-green-600: hsl(142.1 76.2% 36.3%);--sl-color-green-700: hsl(142.4 71.8% 29.2%);--sl-color-green-800: hsl(142.8 64.2% 24.1%);--sl-color-green-900: hsl(143.8 61.2% 20.2%);--sl-color-green-950: hsl(144.3 60.7% 12%);--sl-color-emerald-50: hsl(151.8 81% 95.9%);--sl-color-emerald-100: hsl(149.3 80.4% 90%);--sl-color-emerald-200: hsl(152.4 76% 80.4%);--sl-color-emerald-300: hsl(156.2 71.6% 66.9%);--sl-color-emerald-400: hsl(158.1 64.4% 51.6%);--sl-color-emerald-500: hsl(160.1 84.1% 39.4%);--sl-color-emerald-600: hsl(161.4 93.5% 30.4%);--sl-color-emerald-700: hsl(162.9 93.5% 24.3%);--sl-color-emerald-800: hsl(163.1 88.1% 19.8%);--sl-color-emerald-900: hsl(164.2 85.7% 16.5%);--sl-color-emerald-950: hsl(164.3 87.5% 9.4%);--sl-color-teal-50: hsl(166.2 76.5% 96.7%);--sl-color-teal-100: hsl(167.2 85.5% 89.2%);--sl-color-teal-200: hsl(168.4 83.8% 78.2%);--sl-color-teal-300: hsl(170.6 76.9% 64.3%);--sl-color-teal-400: hsl(172.5 66% 50.4%);--sl-color-teal-500: hsl(173.4 80.4% 40%);--sl-color-teal-600: hsl(174.7 83.9% 31.6%);--sl-color-teal-700: hsl(175.3 77.4% 26.1%);--sl-color-teal-800: hsl(176.1 69.4% 21.8%);--sl-color-teal-900: hsl(175.9 60.8% 19%);--sl-color-teal-950: hsl(176.5 58.6% 11.4%);--sl-color-cyan-50: hsl(183.2 100% 96.3%);--sl-color-cyan-100: hsl(185.1 95.9% 90.4%);--sl-color-cyan-200: hsl(186.2 93.5% 81.8%);--sl-color-cyan-300: hsl(187 92.4% 69%);--sl-color-cyan-400: hsl(187.9 85.7% 53.3%);--sl-color-cyan-500: hsl(188.7 94.5% 42.7%);--sl-color-cyan-600: hsl(191.6 91.4% 36.5%);--sl-color-cyan-700: hsl(192.9 82.3% 31%);--sl-color-cyan-800: hsl(194.4 69.6% 27.1%);--sl-color-cyan-900: hsl(196.4 63.6% 23.7%);--sl-color-cyan-950: hsl(196.8 61% 16.1%);--sl-color-sky-50: hsl(204 100% 97.1%);--sl-color-sky-100: hsl(204 93.8% 93.7%);--sl-color-sky-200: hsl(200.6 94.4% 86.1%);--sl-color-sky-300: hsl(199.4 95.5% 73.9%);--sl-color-sky-400: hsl(198.4 93.2% 59.6%);--sl-color-sky-500: hsl(198.6 88.7% 48.4%);--sl-color-sky-600: hsl(200.4 98% 39.4%);--sl-color-sky-700: hsl(201.3 96.3% 32.2%);--sl-color-sky-800: hsl(201 90% 27.5%);--sl-color-sky-900: hsl(202 80.3% 23.9%);--sl-color-sky-950: hsl(202.3 73.8% 16.5%);--sl-color-blue-50: hsl(213.8 100% 96.9%);--sl-color-blue-100: hsl(214.3 94.6% 92.7%);--sl-color-blue-200: hsl(213.3 96.9% 87.3%);--sl-color-blue-300: hsl(211.7 96.4% 78.4%);--sl-color-blue-400: hsl(213.1 93.9% 67.8%);--sl-color-blue-500: hsl(217.2 91.2% 59.8%);--sl-color-blue-600: hsl(221.2 83.2% 53.3%);--sl-color-blue-700: hsl(224.3 76.3% 48%);--sl-color-blue-800: hsl(225.9 70.7% 40.2%);--sl-color-blue-900: hsl(224.4 64.3% 32.9%);--sl-color-blue-950: hsl(226.2 55.3% 18.4%);--sl-color-indigo-50: hsl(225.9 100% 96.7%);--sl-color-indigo-100: hsl(226.5 100% 93.9%);--sl-color-indigo-200: hsl(228 96.5% 88.8%);--sl-color-indigo-300: hsl(229.7 93.5% 81.8%);--sl-color-indigo-400: hsl(234.5 89.5% 73.9%);--sl-color-indigo-500: hsl(238.7 83.5% 66.7%);--sl-color-indigo-600: hsl(243.4 75.4% 58.6%);--sl-color-indigo-700: hsl(244.5 57.9% 50.6%);--sl-color-indigo-800: hsl(243.7 54.5% 41.4%);--sl-color-indigo-900: hsl(242.2 47.4% 34.3%);--sl-color-indigo-950: hsl(243.5 43.6% 22.9%);--sl-color-violet-50: hsl(250 100% 97.6%);--sl-color-violet-100: hsl(251.4 91.3% 95.5%);--sl-color-violet-200: hsl(250.5 95.2% 91.8%);--sl-color-violet-300: hsl(252.5 94.7% 85.1%);--sl-color-violet-400: hsl(255.1 91.7% 76.3%);--sl-color-violet-500: hsl(258.3 89.5% 66.3%);--sl-color-violet-600: hsl(262.1 83.3% 57.8%);--sl-color-violet-700: hsl(263.4 70% 50.4%);--sl-color-violet-800: hsl(263.4 69.3% 42.2%);--sl-color-violet-900: hsl(263.5 67.4% 34.9%);--sl-color-violet-950: hsl(265.1 61.5% 21.4%);--sl-color-purple-50: hsl(270 100% 98%);--sl-color-purple-100: hsl(268.7 100% 95.5%);--sl-color-purple-200: hsl(268.6 100% 91.8%);--sl-color-purple-300: hsl(269.2 97.4% 85.1%);--sl-color-purple-400: hsl(270 95.2% 75.3%);--sl-color-purple-500: hsl(270.7 91% 65.1%);--sl-color-purple-600: hsl(271.5 81.3% 55.9%);--sl-color-purple-700: hsl(272.1 71.7% 47.1%);--sl-color-purple-800: hsl(272.9 67.2% 39.4%);--sl-color-purple-900: hsl(273.6 65.6% 32%);--sl-color-purple-950: hsl(276 59.5% 16.5%);--sl-color-fuchsia-50: hsl(289.1 100% 97.8%);--sl-color-fuchsia-100: hsl(287 100% 95.5%);--sl-color-fuchsia-200: hsl(288.3 95.8% 90.6%);--sl-color-fuchsia-300: hsl(291.1 93.1% 82.9%);--sl-color-fuchsia-400: hsl(292 91.4% 72.5%);--sl-color-fuchsia-500: hsl(292.2 84.1% 60.6%);--sl-color-fuchsia-600: hsl(293.4 69.5% 48.8%);--sl-color-fuchsia-700: hsl(294.7 72.4% 39.8%);--sl-color-fuchsia-800: hsl(295.4 70.2% 32.9%);--sl-color-fuchsia-900: hsl(296.7 63.6% 28%);--sl-color-fuchsia-950: hsl(297.1 56.8% 14.5%);--sl-color-pink-50: hsl(327.3 73.3% 97.1%);--sl-color-pink-100: hsl(325.7 77.8% 94.7%);--sl-color-pink-200: hsl(325.9 84.6% 89.8%);--sl-color-pink-300: hsl(327.4 87.1% 81.8%);--sl-color-pink-400: hsl(328.6 85.5% 70.2%);--sl-color-pink-500: hsl(330.4 81.2% 60.4%);--sl-color-pink-600: hsl(333.3 71.4% 50.6%);--sl-color-pink-700: hsl(335.1 77.6% 42%);--sl-color-pink-800: hsl(335.8 74.4% 35.3%);--sl-color-pink-900: hsl(335.9 69% 30.4%);--sl-color-pink-950: hsl(336.2 65.4% 15.9%);--sl-color-rose-50: hsl(355.7 100% 97.3%);--sl-color-rose-100: hsl(355.6 100% 94.7%);--sl-color-rose-200: hsl(352.7 96.1% 90%);--sl-color-rose-300: hsl(352.6 95.7% 81.8%);--sl-color-rose-400: hsl(351.3 94.5% 71.4%);--sl-color-rose-500: hsl(349.7 89.2% 60.2%);--sl-color-rose-600: hsl(346.8 77.2% 49.8%);--sl-color-rose-700: hsl(345.3 82.7% 40.8%);--sl-color-rose-800: hsl(343.4 79.7% 34.7%);--sl-color-rose-900: hsl(341.5 75.5% 30.4%);--sl-color-rose-950: hsl(341.3 70.1% 17.1%);--sl-color-primary-50: var(--sl-color-sky-50);--sl-color-primary-100: var(--sl-color-sky-100);--sl-color-primary-200: var(--sl-color-sky-200);--sl-color-primary-300: var(--sl-color-sky-300);--sl-color-primary-400: var(--sl-color-sky-400);--sl-color-primary-500: var(--sl-color-sky-500);--sl-color-primary-600: var(--sl-color-sky-600);--sl-color-primary-700: var(--sl-color-sky-700);--sl-color-primary-800: var(--sl-color-sky-800);--sl-color-primary-900: var(--sl-color-sky-900);--sl-color-primary-950: var(--sl-color-sky-950);--sl-color-success-50: var(--sl-color-green-50);--sl-color-success-100: var(--sl-color-green-100);--sl-color-success-200: var(--sl-color-green-200);--sl-color-success-300: var(--sl-color-green-300);--sl-color-success-400: var(--sl-color-green-400);--sl-color-success-500: var(--sl-color-green-500);--sl-color-success-600: var(--sl-color-green-600);--sl-color-success-700: var(--sl-color-green-700);--sl-color-success-800: var(--sl-color-green-800);--sl-color-success-900: var(--sl-color-green-900);--sl-color-success-950: var(--sl-color-green-950);--sl-color-warning-50: var(--sl-color-amber-50);--sl-color-warning-100: var(--sl-color-amber-100);--sl-color-warning-200: var(--sl-color-amber-200);--sl-color-warning-300: var(--sl-color-amber-300);--sl-color-warning-400: var(--sl-color-amber-400);--sl-color-warning-500: var(--sl-color-amber-500);--sl-color-warning-600: var(--sl-color-amber-600);--sl-color-warning-700: var(--sl-color-amber-700);--sl-color-warning-800: var(--sl-color-amber-800);--sl-color-warning-900: var(--sl-color-amber-900);--sl-color-warning-950: var(--sl-color-amber-950);--sl-color-danger-50: var(--sl-color-red-50);--sl-color-danger-100: var(--sl-color-red-100);--sl-color-danger-200: var(--sl-color-red-200);--sl-color-danger-300: var(--sl-color-red-300);--sl-color-danger-400: var(--sl-color-red-400);--sl-color-danger-500: var(--sl-color-red-500);--sl-color-danger-600: var(--sl-color-red-600);--sl-color-danger-700: var(--sl-color-red-700);--sl-color-danger-800: var(--sl-color-red-800);--sl-color-danger-900: var(--sl-color-red-900);--sl-color-danger-950: var(--sl-color-red-950);--sl-color-neutral-50: var(--sl-color-gray-50);--sl-color-neutral-100: var(--sl-color-gray-100);--sl-color-neutral-200: var(--sl-color-gray-200);--sl-color-neutral-300: var(--sl-color-gray-300);--sl-color-neutral-400: var(--sl-color-gray-400);--sl-color-neutral-500: var(--sl-color-gray-500);--sl-color-neutral-600: var(--sl-color-gray-600);--sl-color-neutral-700: var(--sl-color-gray-700);--sl-color-neutral-800: var(--sl-color-gray-800);--sl-color-neutral-900: var(--sl-color-gray-900);--sl-color-neutral-950: var(--sl-color-gray-950);--sl-color-neutral-0: hsl(0, 0%, 100%);--sl-color-neutral-1000: hsl(0, 0%, 0%);--sl-border-radius-small: .1875rem;--sl-border-radius-medium: .25rem;--sl-border-radius-large: .5rem;--sl-border-radius-x-large: 1rem;--sl-border-radius-circle: 50%;--sl-border-radius-pill: 9999px;--sl-shadow-x-small: 0 1px 2px hsl(240 3.8% 46.1% / 6%);--sl-shadow-small: 0 1px 2px hsl(240 3.8% 46.1% / 12%);--sl-shadow-medium: 0 2px 4px hsl(240 3.8% 46.1% / 12%);--sl-shadow-large: 0 2px 8px hsl(240 3.8% 46.1% / 12%);--sl-shadow-x-large: 0 4px 16px hsl(240 3.8% 46.1% / 12%);--sl-spacing-3x-small: .125rem;--sl-spacing-2x-small: .25rem;--sl-spacing-x-small: .5rem;--sl-spacing-small: .75rem;--sl-spacing-medium: 1rem;--sl-spacing-large: 1.25rem;--sl-spacing-x-large: 1.75rem;--sl-spacing-2x-large: 2.25rem;--sl-spacing-3x-large: 3rem;--sl-spacing-4x-large: 4.5rem;--sl-transition-x-slow: 1s;--sl-transition-slow: .5s;--sl-transition-medium: .25s;--sl-transition-fast: .15s;--sl-transition-x-fast: 50ms;--sl-font-mono: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;--sl-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";--sl-font-serif: Georgia, "Times New Roman", serif;--sl-font-size-2x-small: .625rem;--sl-font-size-x-small: .75rem;--sl-font-size-small: .875rem;--sl-font-size-medium: 1rem;--sl-font-size-large: 1.25rem;--sl-font-size-x-large: 1.5rem;--sl-font-size-2x-large: 2.25rem;--sl-font-size-3x-large: 3rem;--sl-font-size-4x-large: 4.5rem;--sl-font-weight-light: 300;--sl-font-weight-normal: 400;--sl-font-weight-semibold: 500;--sl-font-weight-bold: 700;--sl-letter-spacing-denser: -.03em;--sl-letter-spacing-dense: -.015em;--sl-letter-spacing-normal: normal;--sl-letter-spacing-loose: .075em;--sl-letter-spacing-looser: .15em;--sl-line-height-denser: 1;--sl-line-height-dense: 1.4;--sl-line-height-normal: 1.8;--sl-line-height-loose: 2.2;--sl-line-height-looser: 2.6;--sl-focus-ring-color: var(--sl-color-primary-600);--sl-focus-ring-style: solid;--sl-focus-ring-width: 3px;--sl-focus-ring: var(--sl-focus-ring-style) var(--sl-focus-ring-width) var(--sl-focus-ring-color);--sl-focus-ring-offset: 1px;--sl-button-font-size-small: var(--sl-font-size-x-small);--sl-button-font-size-medium: var(--sl-font-size-small);--sl-button-font-size-large: var(--sl-font-size-medium);--sl-input-height-small: 1.875rem;--sl-input-height-medium: 2.5rem;--sl-input-height-large: 3.125rem;--sl-input-background-color: var(--sl-color-neutral-0);--sl-input-background-color-hover: var(--sl-input-background-color);--sl-input-background-color-focus: var(--sl-input-background-color);--sl-input-background-color-disabled: var(--sl-color-neutral-100);--sl-input-border-color: var(--sl-color-neutral-300);--sl-input-border-color-hover: var(--sl-color-neutral-400);--sl-input-border-color-focus: var(--sl-color-primary-500);--sl-input-border-color-disabled: var(--sl-color-neutral-300);--sl-input-border-width: 1px;--sl-input-required-content: "*";--sl-input-required-content-offset: -2px;--sl-input-required-content-color: var(--sl-input-label-color);--sl-input-border-radius-small: var(--sl-border-radius-medium);--sl-input-border-radius-medium: var(--sl-border-radius-medium);--sl-input-border-radius-large: var(--sl-border-radius-medium);--sl-input-font-family: var(--sl-font-sans);--sl-input-font-weight: var(--sl-font-weight-normal);--sl-input-font-size-small: var(--sl-font-size-small);--sl-input-font-size-medium: var(--sl-font-size-medium);--sl-input-font-size-large: var(--sl-font-size-large);--sl-input-letter-spacing: var(--sl-letter-spacing-normal);--sl-input-color: var(--sl-color-neutral-700);--sl-input-color-hover: var(--sl-color-neutral-700);--sl-input-color-focus: var(--sl-color-neutral-700);--sl-input-color-disabled: var(--sl-color-neutral-900);--sl-input-icon-color: var(--sl-color-neutral-500);--sl-input-icon-color-hover: var(--sl-color-neutral-600);--sl-input-icon-color-focus: var(--sl-color-neutral-600);--sl-input-placeholder-color: var(--sl-color-neutral-500);--sl-input-placeholder-color-disabled: var(--sl-color-neutral-600);--sl-input-spacing-small: var(--sl-spacing-small);--sl-input-spacing-medium: var(--sl-spacing-medium);--sl-input-spacing-large: var(--sl-spacing-large);--sl-input-focus-ring-color: hsl(198.6 88.7% 48.4% / 40%);--sl-input-focus-ring-offset: 0;--sl-input-filled-background-color: var(--sl-color-neutral-100);--sl-input-filled-background-color-hover: var(--sl-color-neutral-100);--sl-input-filled-background-color-focus: var(--sl-color-neutral-100);--sl-input-filled-background-color-disabled: var(--sl-color-neutral-100);--sl-input-filled-color: var(--sl-color-neutral-800);--sl-input-filled-color-hover: var(--sl-color-neutral-800);--sl-input-filled-color-focus: var(--sl-color-neutral-700);--sl-input-filled-color-disabled: var(--sl-color-neutral-800);--sl-input-label-font-size-small: var(--sl-font-size-small);--sl-input-label-font-size-medium: var(--sl-font-size-medium);--sl-input-label-font-size-large: var(--sl-font-size-large);--sl-input-label-color: inherit;--sl-input-help-text-font-size-small: var(--sl-font-size-x-small);--sl-input-help-text-font-size-medium: var(--sl-font-size-small);--sl-input-help-text-font-size-large: var(--sl-font-size-medium);--sl-input-help-text-color: var(--sl-color-neutral-500);--sl-toggle-size-small: .875rem;--sl-toggle-size-medium: 1.125rem;--sl-toggle-size-large: 1.375rem;--sl-overlay-background-color: hsl(240 3.8% 46.1% / 33%);--sl-panel-background-color: var(--sl-color-neutral-0);--sl-panel-border-color: var(--sl-color-neutral-200);--sl-panel-border-width: 1px;--sl-tooltip-border-radius: var(--sl-border-radius-medium);--sl-tooltip-background-color: var(--sl-color-neutral-800);--sl-tooltip-color: var(--sl-color-neutral-0);--sl-tooltip-font-family: var(--sl-font-sans);--sl-tooltip-font-weight: var(--sl-font-weight-normal);--sl-tooltip-font-size: var(--sl-font-size-small);--sl-tooltip-line-height: var(--sl-line-height-dense);--sl-tooltip-padding: var(--sl-spacing-2x-small) var(--sl-spacing-x-small);--sl-tooltip-arrow-size: 6px;--sl-z-index-drawer: 700;--sl-z-index-dialog: 800;--sl-z-index-dropdown: 900;--sl-z-index-toast: 950;--sl-z-index-tooltip: 1000}.sl-scroll-lock{padding-right:var(--sl-scroll-lock-size)!important;overflow:hidden!important}.sl-toast-stack{position:fixed;top:0;inset-inline-end:0;z-index:var(--sl-z-index-toast);width:28rem;max-width:100%;max-height:100%;overflow:auto}.sl-toast-stack sl-alert{margin:var(--sl-spacing-medium)}.sl-toast-stack sl-alert::part(base){box-shadow:var(--sl-shadow-large)}
1817
1813
  `,Vt=`:host,.sl-theme-dark{color-scheme:dark;--sl-color-gray-50: hsl(240 5.1% 15%);--sl-color-gray-100: hsl(240 5.7% 18.2%);--sl-color-gray-200: hsl(240 4.6% 22%);--sl-color-gray-300: hsl(240 5% 27.6%);--sl-color-gray-400: hsl(240 5% 35.5%);--sl-color-gray-500: hsl(240 3.7% 44%);--sl-color-gray-600: hsl(240 5.3% 58%);--sl-color-gray-700: hsl(240 5.6% 73%);--sl-color-gray-800: hsl(240 7.3% 84%);--sl-color-gray-900: hsl(240 9.1% 91.8%);--sl-color-gray-950: hsl(0 0% 95%);--sl-color-red-50: hsl(0 56% 23.9%);--sl-color-red-100: hsl(.6 60% 33.9%);--sl-color-red-200: hsl(.9 67.2% 37.1%);--sl-color-red-300: hsl(1.1 71.3% 43.7%);--sl-color-red-400: hsl(1 76% 52.5%);--sl-color-red-500: hsl(.7 89.6% 57.2%);--sl-color-red-600: hsl(0 98.6% 67.9%);--sl-color-red-700: hsl(0 100% 72.3%);--sl-color-red-800: hsl(0 100% 85.6%);--sl-color-red-900: hsl(0 100% 90.3%);--sl-color-red-950: hsl(0 100% 95.9%);--sl-color-orange-50: hsl(15 64.2% 23.3%);--sl-color-orange-100: hsl(15.1 70.9% 31.1%);--sl-color-orange-200: hsl(15.3 75.7% 35.5%);--sl-color-orange-300: hsl(17.1 83.5% 42.7%);--sl-color-orange-400: hsl(20.1 88% 50.8%);--sl-color-orange-500: hsl(24.3 100% 50.5%);--sl-color-orange-600: hsl(27.2 100% 57.7%);--sl-color-orange-700: hsl(31.3 100% 68.7%);--sl-color-orange-800: hsl(33.8 100% 79.3%);--sl-color-orange-900: hsl(38.9 100% 87.7%);--sl-color-orange-950: hsl(46.2 100% 95%);--sl-color-amber-50: hsl(21.9 66.3% 21.1%);--sl-color-amber-100: hsl(21.5 73.6% 29.7%);--sl-color-amber-200: hsl(22.3 77.6% 33.3%);--sl-color-amber-300: hsl(25.4 84.2% 39.6%);--sl-color-amber-400: hsl(31.4 87.4% 46.7%);--sl-color-amber-500: hsl(37 96.6% 48.3%);--sl-color-amber-600: hsl(43.3 100% 53.4%);--sl-color-amber-700: hsl(46.5 100% 61.1%);--sl-color-amber-800: hsl(49.3 100% 73%);--sl-color-amber-900: hsl(51.8 100% 85%);--sl-color-amber-950: hsl(60 100% 94.6%);--sl-color-yellow-50: hsl(32.5 60% 18.2%);--sl-color-yellow-100: hsl(28.1 68.6% 29%);--sl-color-yellow-200: hsl(31.3 75.8% 30.8%);--sl-color-yellow-300: hsl(34.7 84.4% 35.3%);--sl-color-yellow-400: hsl(40.1 87.3% 43.3%);--sl-color-yellow-500: hsl(44.7 88% 46%);--sl-color-yellow-600: hsl(47.7 100% 50.9%);--sl-color-yellow-700: hsl(51.3 100% 59.9%);--sl-color-yellow-800: hsl(54.6 100% 73%);--sl-color-yellow-900: hsl(58.9 100% 84.2%);--sl-color-yellow-950: hsl(60 100% 94%);--sl-color-lime-50: hsl(86.5 54.4% 18%);--sl-color-lime-100: hsl(87.6 56.8% 23.3%);--sl-color-lime-200: hsl(85.8 63.2% 24.5%);--sl-color-lime-300: hsl(86.1 72% 29.4%);--sl-color-lime-400: hsl(85.5 76.8% 37.3%);--sl-color-lime-500: hsl(84.3 74.2% 42.1%);--sl-color-lime-600: hsl(82.8 81.5% 52.6%);--sl-color-lime-700: hsl(82 89.9% 64%);--sl-color-lime-800: hsl(80.9 97.9% 76.6%);--sl-color-lime-900: hsl(77.9 100% 85.8%);--sl-color-lime-950: hsl(69.5 100% 93.8%);--sl-color-green-50: hsl(144.3 53.6% 16%);--sl-color-green-100: hsl(143.2 55.4% 23.5%);--sl-color-green-200: hsl(141.5 58.2% 26.3%);--sl-color-green-300: hsl(140.8 64.2% 31.8%);--sl-color-green-400: hsl(140.3 68% 39.2%);--sl-color-green-500: hsl(141.1 64.9% 43%);--sl-color-green-600: hsl(141.6 72.4% 55.2%);--sl-color-green-700: hsl(141.7 82.7% 70.1%);--sl-color-green-800: hsl(141 90.9% 82.1%);--sl-color-green-900: hsl(142 100% 89.1%);--sl-color-green-950: hsl(144 100% 95.5%);--sl-color-emerald-50: hsl(164.3 75% 13.5%);--sl-color-emerald-100: hsl(163.5 72.6% 20.1%);--sl-color-emerald-200: hsl(162.1 73.7% 22.4%);--sl-color-emerald-300: hsl(161.3 77.3% 27.6%);--sl-color-emerald-400: hsl(159.6 77.1% 34.3%);--sl-color-emerald-500: hsl(159.1 73.5% 37.9%);--sl-color-emerald-600: hsl(157.8 66.8% 48.9%);--sl-color-emerald-700: hsl(156.2 76.1% 63.8%);--sl-color-emerald-800: hsl(152.4 84.4% 77.4%);--sl-color-emerald-900: hsl(149.3 100% 87%);--sl-color-emerald-950: hsl(158.6 100% 94.8%);--sl-color-teal-50: hsl(176.5 51.5% 15.4%);--sl-color-teal-100: hsl(175.9 54.7% 22.3%);--sl-color-teal-200: hsl(175.9 60.7% 23.9%);--sl-color-teal-300: hsl(174.5 67.3% 28.8%);--sl-color-teal-400: hsl(174.4 71.9% 34.9%);--sl-color-teal-500: hsl(173.1 71% 38.3%);--sl-color-teal-600: hsl(172.3 68.2% 48.1%);--sl-color-teal-700: hsl(170.5 81.3% 61.5%);--sl-color-teal-800: hsl(168.4 92.1% 75.2%);--sl-color-teal-900: hsl(168.3 100% 86%);--sl-color-teal-950: hsl(180 100% 95.5%);--sl-color-cyan-50: hsl(197.1 53.8% 20.3%);--sl-color-cyan-100: hsl(196.8 57.3% 27.2%);--sl-color-cyan-200: hsl(195.3 62.7% 29.4%);--sl-color-cyan-300: hsl(193.5 71.3% 34.1%);--sl-color-cyan-400: hsl(192.5 76.8% 40.6%);--sl-color-cyan-500: hsl(189.4 78.6% 42.6%);--sl-color-cyan-600: hsl(188.2 89.1% 51.7%);--sl-color-cyan-700: hsl(187 98.6% 66.2%);--sl-color-cyan-800: hsl(184.9 100% 78.3%);--sl-color-cyan-900: hsl(180 100% 86.6%);--sl-color-cyan-950: hsl(180 100% 94.8%);--sl-color-sky-50: hsl(203 63.8% 20.9%);--sl-color-sky-100: hsl(203.4 70.4% 28%);--sl-color-sky-200: hsl(202.7 75.8% 30.8%);--sl-color-sky-300: hsl(203.1 80.4% 36.1%);--sl-color-sky-400: hsl(202.1 80.5% 44.3%);--sl-color-sky-500: hsl(199.7 85.9% 47.7%);--sl-color-sky-600: hsl(198.7 97.9% 57.2%);--sl-color-sky-700: hsl(198.7 100% 70.5%);--sl-color-sky-800: hsl(198.8 100% 82.5%);--sl-color-sky-900: hsl(198.5 100% 89.9%);--sl-color-sky-950: hsl(186 100% 95.5%);--sl-color-blue-50: hsl(227.1 49.5% 22.7%);--sl-color-blue-100: hsl(225.8 58.9% 36.8%);--sl-color-blue-200: hsl(227.7 64.4% 42.9%);--sl-color-blue-300: hsl(226.1 72.7% 51.2%);--sl-color-blue-400: hsl(222.6 86.5% 56.3%);--sl-color-blue-500: hsl(217.8 95.8% 57.4%);--sl-color-blue-600: hsl(213.3 100% 65%);--sl-color-blue-700: hsl(210.9 100% 74.8%);--sl-color-blue-800: hsl(211.5 100% 83.4%);--sl-color-blue-900: hsl(211 100% 88.9%);--sl-color-blue-950: hsl(201.8 100% 95.3%);--sl-color-indigo-50: hsl(243.5 40.8% 27%);--sl-color-indigo-100: hsl(242.9 45.7% 37.6%);--sl-color-indigo-200: hsl(244.7 52.7% 43.1%);--sl-color-indigo-300: hsl(245.3 60.5% 52.4%);--sl-color-indigo-400: hsl(244.1 79.2% 60.4%);--sl-color-indigo-500: hsl(239.6 88.7% 63.8%);--sl-color-indigo-600: hsl(234.5 96.7% 70.9%);--sl-color-indigo-700: hsl(229.4 100% 78.3%);--sl-color-indigo-800: hsl(227.1 100% 85%);--sl-color-indigo-900: hsl(223.8 100% 89.9%);--sl-color-indigo-950: hsl(220 100% 95.1%);--sl-color-violet-50: hsl(265.1 57.3% 25.4%);--sl-color-violet-100: hsl(263.5 63.8% 39.4%);--sl-color-violet-200: hsl(263.4 66.2% 44.1%);--sl-color-violet-300: hsl(263.7 72.8% 52.4%);--sl-color-violet-400: hsl(262.5 87.3% 59.8%);--sl-color-violet-500: hsl(258.3 95.1% 63.2%);--sl-color-violet-600: hsl(255.1 100% 67.2%);--sl-color-violet-700: hsl(253 100% 81.5%);--sl-color-violet-800: hsl(251.7 100% 87.9%);--sl-color-violet-900: hsl(254.1 100% 91.7%);--sl-color-violet-950: hsl(257.1 100% 96.1%);--sl-color-purple-50: hsl(276 54.3% 20.5%);--sl-color-purple-100: hsl(273.6 61.8% 35.4%);--sl-color-purple-200: hsl(272.9 64% 41.4%);--sl-color-purple-300: hsl(271.9 68.1% 49.2%);--sl-color-purple-400: hsl(271.5 85.1% 57.8%);--sl-color-purple-500: hsl(270.7 96.4% 62.1%);--sl-color-purple-600: hsl(270.5 100% 71.9%);--sl-color-purple-700: hsl(270.9 100% 81.3%);--sl-color-purple-800: hsl(272.4 100% 87.7%);--sl-color-purple-900: hsl(276.7 100% 91.5%);--sl-color-purple-950: hsl(300 100% 96.5%);--sl-color-fuchsia-50: hsl(297.1 51.2% 18.6%);--sl-color-fuchsia-100: hsl(296.7 59.5% 31.5%);--sl-color-fuchsia-200: hsl(295.4 65.4% 35.1%);--sl-color-fuchsia-300: hsl(294.6 67.4% 42.2%);--sl-color-fuchsia-400: hsl(293.3 68.7% 51.2%);--sl-color-fuchsia-500: hsl(292.1 88.4% 57.7%);--sl-color-fuchsia-600: hsl(292 98.5% 59.5%);--sl-color-fuchsia-700: hsl(292.4 100% 79.5%);--sl-color-fuchsia-800: hsl(292.9 100% 86.8%);--sl-color-fuchsia-900: hsl(300 100% 91.5%);--sl-color-fuchsia-950: hsl(300 100% 96.3%);--sl-color-pink-50: hsl(336.2 59.6% 20%);--sl-color-pink-100: hsl(336.8 63.9% 34%);--sl-color-pink-200: hsl(336.8 68.7% 37.6%);--sl-color-pink-300: hsl(336.1 71.8% 44.5%);--sl-color-pink-400: hsl(333.9 74.9% 53.1%);--sl-color-pink-500: hsl(330.7 86.3% 57.7%);--sl-color-pink-600: hsl(328.6 91.5% 67.2%);--sl-color-pink-700: hsl(327.4 97.6% 78.7%);--sl-color-pink-800: hsl(325.1 100% 86.6%);--sl-color-pink-900: hsl(322.1 100% 91.3%);--sl-color-pink-950: hsl(315 100% 95.9%);--sl-color-rose-50: hsl(342.3 62.9% 21.5%);--sl-color-rose-100: hsl(342.8 68.9% 34.2%);--sl-color-rose-200: hsl(344.8 72.6% 37.3%);--sl-color-rose-300: hsl(346.9 75.8% 43.7%);--sl-color-rose-400: hsl(348.2 80.1% 52.7%);--sl-color-rose-500: hsl(350.4 94.8% 57.5%);--sl-color-rose-600: hsl(351.2 100% 58.1%);--sl-color-rose-700: hsl(352.3 100% 78.1%);--sl-color-rose-800: hsl(352 100% 86.2%);--sl-color-rose-900: hsl(354.5 100% 90.7%);--sl-color-rose-950: hsl(353.3 100% 95.7%);--sl-color-primary-50: var(--sl-color-sky-50);--sl-color-primary-100: var(--sl-color-sky-100);--sl-color-primary-200: var(--sl-color-sky-200);--sl-color-primary-300: var(--sl-color-sky-300);--sl-color-primary-400: var(--sl-color-sky-400);--sl-color-primary-500: var(--sl-color-sky-500);--sl-color-primary-600: var(--sl-color-sky-600);--sl-color-primary-700: var(--sl-color-sky-700);--sl-color-primary-800: var(--sl-color-sky-800);--sl-color-primary-900: var(--sl-color-sky-900);--sl-color-primary-950: var(--sl-color-sky-950);--sl-color-success-50: var(--sl-color-green-50);--sl-color-success-100: var(--sl-color-green-100);--sl-color-success-200: var(--sl-color-green-200);--sl-color-success-300: var(--sl-color-green-300);--sl-color-success-400: var(--sl-color-green-400);--sl-color-success-500: var(--sl-color-green-500);--sl-color-success-600: var(--sl-color-green-600);--sl-color-success-700: var(--sl-color-green-700);--sl-color-success-800: var(--sl-color-green-800);--sl-color-success-900: var(--sl-color-green-900);--sl-color-success-950: var(--sl-color-green-950);--sl-color-warning-50: var(--sl-color-amber-50);--sl-color-warning-100: var(--sl-color-amber-100);--sl-color-warning-200: var(--sl-color-amber-200);--sl-color-warning-300: var(--sl-color-amber-300);--sl-color-warning-400: var(--sl-color-amber-400);--sl-color-warning-500: var(--sl-color-amber-500);--sl-color-warning-600: var(--sl-color-amber-600);--sl-color-warning-700: var(--sl-color-amber-700);--sl-color-warning-800: var(--sl-color-amber-800);--sl-color-warning-900: var(--sl-color-amber-900);--sl-color-warning-950: var(--sl-color-amber-950);--sl-color-danger-50: var(--sl-color-red-50);--sl-color-danger-100: var(--sl-color-red-100);--sl-color-danger-200: var(--sl-color-red-200);--sl-color-danger-300: var(--sl-color-red-300);--sl-color-danger-400: var(--sl-color-red-400);--sl-color-danger-500: var(--sl-color-red-500);--sl-color-danger-600: var(--sl-color-red-600);--sl-color-danger-700: var(--sl-color-red-700);--sl-color-danger-800: var(--sl-color-red-800);--sl-color-danger-900: var(--sl-color-red-900);--sl-color-danger-950: var(--sl-color-red-950);--sl-color-neutral-50: var(--sl-color-gray-50);--sl-color-neutral-100: var(--sl-color-gray-100);--sl-color-neutral-200: var(--sl-color-gray-200);--sl-color-neutral-300: var(--sl-color-gray-300);--sl-color-neutral-400: var(--sl-color-gray-400);--sl-color-neutral-500: var(--sl-color-gray-500);--sl-color-neutral-600: var(--sl-color-gray-600);--sl-color-neutral-700: var(--sl-color-gray-700);--sl-color-neutral-800: var(--sl-color-gray-800);--sl-color-neutral-900: var(--sl-color-gray-900);--sl-color-neutral-950: var(--sl-color-gray-950);--sl-color-neutral-0: hsl(240, 5.9%, 11%);--sl-color-neutral-1000: hsl(0, 0%, 100%);--sl-border-radius-small: .1875rem;--sl-border-radius-medium: .25rem;--sl-border-radius-large: .5rem;--sl-border-radius-x-large: 1rem;--sl-border-radius-circle: 50%;--sl-border-radius-pill: 9999px;--sl-shadow-x-small: 0 1px 2px rgb(0 0 0 / 18%);--sl-shadow-small: 0 1px 2px rgb(0 0 0 / 24%);--sl-shadow-medium: 0 2px 4px rgb(0 0 0 / 24%);--sl-shadow-large: 0 2px 8px rgb(0 0 0 / 24%);--sl-shadow-x-large: 0 4px 16px rgb(0 0 0 / 24%);--sl-spacing-3x-small: .125rem;--sl-spacing-2x-small: .25rem;--sl-spacing-x-small: .5rem;--sl-spacing-small: .75rem;--sl-spacing-medium: 1rem;--sl-spacing-large: 1.25rem;--sl-spacing-x-large: 1.75rem;--sl-spacing-2x-large: 2.25rem;--sl-spacing-3x-large: 3rem;--sl-spacing-4x-large: 4.5rem;--sl-transition-x-slow: 1s;--sl-transition-slow: .5s;--sl-transition-medium: .25s;--sl-transition-fast: .15s;--sl-transition-x-fast: 50ms;--sl-font-mono: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;--sl-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";--sl-font-serif: Georgia, "Times New Roman", serif;--sl-font-size-2x-small: .625rem;--sl-font-size-x-small: .75rem;--sl-font-size-small: .875rem;--sl-font-size-medium: 1rem;--sl-font-size-large: 1.25rem;--sl-font-size-x-large: 1.5rem;--sl-font-size-2x-large: 2.25rem;--sl-font-size-3x-large: 3rem;--sl-font-size-4x-large: 4.5rem;--sl-font-weight-light: 300;--sl-font-weight-normal: 400;--sl-font-weight-semibold: 500;--sl-font-weight-bold: 700;--sl-letter-spacing-denser: -.03em;--sl-letter-spacing-dense: -.015em;--sl-letter-spacing-normal: normal;--sl-letter-spacing-loose: .075em;--sl-letter-spacing-looser: .15em;--sl-line-height-denser: 1;--sl-line-height-dense: 1.4;--sl-line-height-normal: 1.8;--sl-line-height-loose: 2.2;--sl-line-height-looser: 2.6;--sl-focus-ring-color: var(--sl-color-primary-700);--sl-focus-ring-style: solid;--sl-focus-ring-width: 3px;--sl-focus-ring: var(--sl-focus-ring-style) var(--sl-focus-ring-width) var(--sl-focus-ring-color);--sl-focus-ring-offset: 1px;--sl-button-font-size-small: var(--sl-font-size-x-small);--sl-button-font-size-medium: var(--sl-font-size-small);--sl-button-font-size-large: var(--sl-font-size-medium);--sl-input-height-small: 1.875rem;--sl-input-height-medium: 2.5rem;--sl-input-height-large: 3.125rem;--sl-input-background-color: var(--sl-color-neutral-0);--sl-input-background-color-hover: var(--sl-input-background-color);--sl-input-background-color-focus: var(--sl-input-background-color);--sl-input-background-color-disabled: var(--sl-color-neutral-100);--sl-input-border-color: var(--sl-color-neutral-300);--sl-input-border-color-hover: var(--sl-color-neutral-400);--sl-input-border-color-focus: var(--sl-color-primary-500);--sl-input-border-color-disabled: var(--sl-color-neutral-300);--sl-input-border-width: 1px;--sl-input-required-content: "*";--sl-input-required-content-offset: -2px;--sl-input-required-content-color: var(--sl-input-label-color);--sl-input-border-radius-small: var(--sl-border-radius-medium);--sl-input-border-radius-medium: var(--sl-border-radius-medium);--sl-input-border-radius-large: var(--sl-border-radius-medium);--sl-input-font-family: var(--sl-font-sans);--sl-input-font-weight: var(--sl-font-weight-normal);--sl-input-font-size-small: var(--sl-font-size-small);--sl-input-font-size-medium: var(--sl-font-size-medium);--sl-input-font-size-large: var(--sl-font-size-large);--sl-input-letter-spacing: var(--sl-letter-spacing-normal);--sl-input-color: var(--sl-color-neutral-700);--sl-input-color-hover: var(--sl-color-neutral-700);--sl-input-color-focus: var(--sl-color-neutral-700);--sl-input-color-disabled: var(--sl-color-neutral-900);--sl-input-icon-color: var(--sl-color-neutral-500);--sl-input-icon-color-hover: var(--sl-color-neutral-600);--sl-input-icon-color-focus: var(--sl-color-neutral-600);--sl-input-placeholder-color: var(--sl-color-neutral-500);--sl-input-placeholder-color-disabled: var(--sl-color-neutral-600);--sl-input-spacing-small: var(--sl-spacing-small);--sl-input-spacing-medium: var(--sl-spacing-medium);--sl-input-spacing-large: var(--sl-spacing-large);--sl-input-focus-ring-color: hsl(198.6 88.7% 48.4% / 40%);--sl-input-focus-ring-offset: 0;--sl-input-filled-background-color: var(--sl-color-neutral-100);--sl-input-filled-background-color-hover: var(--sl-color-neutral-100);--sl-input-filled-background-color-focus: var(--sl-color-neutral-100);--sl-input-filled-background-color-disabled: var(--sl-color-neutral-100);--sl-input-filled-color: var(--sl-color-neutral-800);--sl-input-filled-color-hover: var(--sl-color-neutral-800);--sl-input-filled-color-focus: var(--sl-color-neutral-700);--sl-input-filled-color-disabled: var(--sl-color-neutral-800);--sl-input-label-font-size-small: var(--sl-font-size-small);--sl-input-label-font-size-medium: var(--sl-font-size-medium);--sl-input-label-font-size-large: var(--sl-font-size-large);--sl-input-label-color: inherit;--sl-input-help-text-font-size-small: var(--sl-font-size-x-small);--sl-input-help-text-font-size-medium: var(--sl-font-size-small);--sl-input-help-text-font-size-large: var(--sl-font-size-medium);--sl-input-help-text-color: var(--sl-color-neutral-500);--sl-toggle-size-small: .875rem;--sl-toggle-size-medium: 1.125rem;--sl-toggle-size-large: 1.375rem;--sl-overlay-background-color: hsl(0 0% 0% / 43%);--sl-panel-background-color: var(--sl-color-neutral-50);--sl-panel-border-color: var(--sl-color-neutral-200);--sl-panel-border-width: 1px;--sl-tooltip-border-radius: var(--sl-border-radius-medium);--sl-tooltip-background-color: var(--sl-color-neutral-800);--sl-tooltip-color: var(--sl-color-neutral-0);--sl-tooltip-font-family: var(--sl-font-sans);--sl-tooltip-font-weight: var(--sl-font-weight-normal);--sl-tooltip-font-size: var(--sl-font-size-small);--sl-tooltip-line-height: var(--sl-line-height-dense);--sl-tooltip-padding: var(--sl-spacing-2x-small) var(--sl-spacing-x-small);--sl-tooltip-arrow-size: 6px;--sl-z-index-drawer: 700;--sl-z-index-dialog: 800;--sl-z-index-dropdown: 900;--sl-z-index-toast: 950;--sl-z-index-tooltip: 1000}.sl-scroll-lock{padding-right:var(--sl-scroll-lock-size)!important;overflow:hidden!important}.sl-toast-stack{position:fixed;top:0;inset-inline-end:0;z-index:var(--sl-z-index-toast);width:28rem;max-width:100%;max-height:100%;overflow:auto}.sl-toast-stack sl-alert{margin:var(--sl-spacing-medium)}.sl-toast-stack sl-alert::part(base){box-shadow:var(--sl-shadow-large)}
1818
1814
  `,x6=`.invalid::part(base){--tw-border-opacity: 1;border-color:rgb(239 68 68/var(--tw-border-opacity));border-width:2px}.input::part(base){border-radius:var(--photon-border-radius, .5rem)}.input::part(base):hover{cursor:pointer}.input::part(input){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.disabled::part(base):hover{cursor:not-allowed}.selected::part(base){--tw-bg-opacity: 1;background-color:rgb(49 130 206/var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(255 255 255/var(--tw-text-opacity))}.default::part(base):hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235/var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(31 41 55/var(--tw-text-opacity))}.default::part(label){width:100%;overflow:hidden}.group-member::part(base){padding-left:1rem;font-weight:500}.group::part(base){--tw-bg-opacity: 1;background-color:rgb(243 244 246/var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(31 41 55/var(--tw-text-opacity));font-size:.875rem;line-height:1.25rem}.dropdown::part(panel){border-radius:var(--photon-border-radius, .5rem)}.dropdown-container{border-radius:var(--photon-border-radius, .5rem)}
1819
1815
  `;/**
@@ -1837,7 +1833,7 @@ lit-html/directives/unsafe-svg.js:
1837
1833
  */var S6=["bottom","height","left","right","top","width"],k6=function(t,r){return t===void 0&&(t={}),r===void 0&&(r={}),S6.some(function(n){return t[n]!==r[n]})},Qr=new Map,w2,E6=function e(){var t=[];Qr.forEach(function(r,n){var i=n.getBoundingClientRect();k6(i,r.rect)&&(r.rect=i,t.push(r))}),t.forEach(function(r){r.callbacks.forEach(function(n){return n(r.rect)})}),w2=window.requestAnimationFrame(e)};function O6(e,t){return{observe:function(){var n=Qr.size===0;Qr.has(e)?Qr.get(e).callbacks.push(t):Qr.set(e,{rect:void 0,hasRectChanged:!1,callbacks:[t]}),n&&E6()},unobserve:function(){var n=Qr.get(e);if(n){var i=n.callbacks.indexOf(t);i>=0&&n.callbacks.splice(i,1),n.callbacks.length||Qr.delete(e),Qr.size||cancelAnimationFrame(w2)}}}}function fa(e,t,r){let n=[],i;return()=>{let o;r.key&&r.debug!=null&&r.debug()&&(o=Date.now());const a=e();if(!(a.length!==n.length||a.some((l,u)=>n[u]!==l)))return i;n=a;let c;if(r.key&&r.debug!=null&&r.debug()&&(c=Date.now()),i=t(...a),r==null||r.onChange==null||r.onChange(i),r.key&&r.debug!=null&&r.debug()){const l=Math.round((Date.now()-o)*100)/100,u=Math.round((Date.now()-c)*100)/100,d=u/16,f=(h,p)=>{for(h=String(h);h.length<p;)h=" "+h;return h};console.info("%c\u23F1 "+f(u,5)+" /"+f(l,5)+" ms",`
1838
1834
  font-size: .6rem;
1839
1835
  font-weight: bold;
1840
- color: hsl(`+Math.max(0,Math.min(120-120*d,120))+"deg 100% 31%);",r?.key)}return i}}const C6=e=>e,P6=e=>{const t=Math.max(e.startIndex-e.overscan,0),r=Math.min(e.endIndex+e.overscan,e.count-1),n=[];for(let i=t;i<=r;i++)n.push(i);return n},T6=(e,t)=>{const r=O6(e.scrollElement,n=>{t(n)});if(!!e.scrollElement)return t(e.scrollElement.getBoundingClientRect()),r.observe(),()=>{r.unobserve()}},N6=(e,t)=>{const r=()=>t(e.scrollElement[e.options.horizontal?"scrollLeft":"scrollTop"]);if(!!e.scrollElement)return r(),e.scrollElement.addEventListener("scroll",r,{capture:!1,passive:!0}),()=>{e.scrollElement.removeEventListener("scroll",r)}},I6=(e,t)=>e.getBoundingClientRect()[t.options.horizontal?"width":"height"],A6=(e,t,r)=>{var n;(n=r.scrollElement)==null||n.scrollTo({[r.options.horizontal?"left":"top"]:e,behavior:t?"smooth":void 0})};class D6{constructor(t){var r=this;this.unsubs=[],this.scrollElement=null,this.measurementsCache=[],this.itemMeasurementsCache={},this.pendingMeasuredCacheIndexes=[],this.measureElementCache={},this.setOptions=n=>{Object.entries(n).forEach(i=>{let[o,a]=i;typeof a>"u"&&delete n[o]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:C6,rangeExtractor:P6,enableSmoothScroll:!0,onChange:()=>{},measureElement:I6,initialRect:{width:0,height:0},...n}},this.notify=()=>{var n,i;(n=(i=this.options).onChange)==null||n.call(i,this)},this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[]},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{const n=this.options.getScrollElement();this.scrollElement!==n&&(this.cleanup(),this.scrollElement=n,this.unsubs.push(this.options.observeElementRect(this,i=>{this.scrollRect=i,this.notify()})),this.unsubs.push(this.options.observeElementOffset(this,i=>{this.scrollOffset=i,this.notify()})))},this.getSize=()=>this.scrollRect[this.options.horizontal?"width":"height"],this.getMeasurements=fa(()=>[this.options.count,this.options.paddingStart,this.options.getItemKey,this.itemMeasurementsCache],(n,i,o,a)=>{const s=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const c=this.measurementsCache.slice(0,s);for(let l=s;l<n;l++){const u=o(l),d=a[u],f=c[l-1]?c[l-1].end:i,h=typeof d=="number"?d:this.options.estimateSize(l),p=f+h;c[l]={index:l,start:f,size:h,end:p,key:u}}return this.measurementsCache=c,c},{key:!1,debug:()=>this.options.debug}),this.calculateRange=fa(()=>[this.getMeasurements(),this.getSize(),this.scrollOffset],(n,i,o)=>F6({measurements:n,outerSize:i,scrollOffset:o}),{key:!1,debug:()=>this.options.debug}),this.getIndexes=fa(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(n,i,o,a)=>n({...i,overscan:o,count:a}),{key:!1}),this.getVirtualItems=fa(()=>[this.getIndexes(),this.getMeasurements(),this.options.measureElement],(n,i,o)=>{const a=u=>d=>{var f;const h=this.measurementsCache[u];if(!d)return;const p=o(d,this),m=(f=this.itemMeasurementsCache[h.key])!=null?f:h.size;p!==m&&(h.start<this.scrollOffset&&(this.destinationOffset||this._scrollToOffset(this.scrollOffset+(p-m),!1)),this.pendingMeasuredCacheIndexes.push(u),this.itemMeasurementsCache={...this.itemMeasurementsCache,[h.key]:p},this.notify())},s=[],c={};for(let u=0,d=n.length;u<d;u++){var l;const f=n[u],p={...i[f],measureElement:c[f]=(l=this.measureElementCache[f])!=null?l:a(f)};s.push(p)}return this.measureElementCache=c,s},{key:!1}),this.scrollToOffset=function(n,i){let{align:o}=i===void 0?{align:"start"}:i;const a=()=>{const s=r.scrollOffset,c=r.getSize();o==="auto"&&(n<=s?o="start":n>=s+c?o="end":o="start"),o==="start"?r._scrollToOffset(n,!0):o==="end"?r._scrollToOffset(n-c,!0):o==="center"&&r._scrollToOffset(n-c/2,!0)};a(),requestAnimationFrame(()=>{a()})},this.scrollToIndex=function(n,i){let{align:o,...a}=i===void 0?{align:"auto"}:i;const s=r.getMeasurements(),c=r.scrollOffset,l=r.getSize(),{count:u}=r.options,d=s[Math.max(0,Math.min(n,u-1))];if(!d)return;if(o==="auto")if(d.end>=c+l-r.options.scrollPaddingEnd)o="end";else if(d.start<=c+r.options.scrollPaddingStart)o="start";else return;const f=o==="end"?d.end+r.options.scrollPaddingEnd:d.start-r.options.scrollPaddingStart;r.scrollToOffset(f,{align:o,...a})},this.getTotalSize=()=>{var n;return(((n=this.getMeasurements()[this.options.count-1])==null?void 0:n.end)||this.options.paddingStart)+this.options.paddingEnd},this._scrollToOffset=(n,i)=>{clearTimeout(this.scrollCheckFrame),this.destinationOffset=n,this.options.scrollToFn(n,this.options.enableSmoothScroll&&i,this);let o;const a=()=>{let s=this.scrollOffset;this.scrollCheckFrame=o=setTimeout(()=>{if(this.scrollCheckFrame===o){if(this.scrollOffset===s){this.destinationOffset=void 0;return}s=this.scrollOffset,a()}},100)};a()},this.measure=()=>{this.itemMeasurementsCache={},this.notify()},this.setOptions(t),this.scrollRect=this.options.initialRect,this.scrollOffset=this.options.initialOffset}}const R6=(e,t,r,n)=>{for(;e<=t;){const i=(e+t)/2|0,o=r(i);if(o<n)e=i+1;else if(o>n)t=i-1;else return i}return e>0?e-1:0};function F6(e){let{measurements:t,outerSize:r,scrollOffset:n}=e;const i=t.length-1,a=R6(0,i,c=>t[c].start,n);let s=a;for(;s<i&&t[s].end<n+r;)s++;return{startIndex:a,endIndex:s}}function L6(e){const t=xu(e),r=new D6(t),[n,i]=yn(r.getVirtualItems()),[o,a]=L(r.getTotalSize()),s={get(l,u){switch(u){case"getVirtualItems":return()=>n;case"getTotalSize":return()=>o();default:return Reflect.get(l,u)}}},c=new Proxy(r,s);return c.setOptions(t),Tt(()=>{const l=c._didMount();c._willUpdate(),Il(l)}),f$(()=>{c.setOptions(xu(t,e,{onChange:l=>{l._willUpdate(),i(X9(l.getVirtualItems(),{key:"index"})),a(l.getTotalSize()),e.onChange==null||e.onChange(l)}})),c.measure()}),c}function $v(e){return L6(xu({observeElementRect:T6,observeElementOffset:N6,scrollToFn:A6},e))}const M6=C('<div slot="suffix" class="flex"><sl-icon class="text-gray-400 hover:text-gray-600" name="x-circle-fill"></sl-icon></div>'),nu=C("<sl-menu-item></sl-menu-item>"),j6=C('<sl-menu-item><p class="text-center text-gray-400 italic">Loading...</p></sl-menu-item>'),z6=C('<div><style></style><style></style><style></style><style></style><sl-dropdown class="dropdown relative" hoist><sl-input slot="trigger" size="medium" class="input"><p slot="help-text" class="text-red-500 pt-2 font-sans"></p><div slot="suffix" class="flex"><sl-spinner slot="suffix"></sl-spinner></div><div slot="suffix" class="flex"><sl-icon></sl-icon></div></sl-input><div class="border border-gray-200 dropdown-container overflow-hidden relative"><div class="bg-white pt-2 overflow-x-hidden overflow-y-auto relative"><div></div></div></div></sl-dropdown></div>'),U6=C('<div class="flex items-center pt-2 pb-2"><p class="text-gray-700 text-sm font-sans"></p></div>'),V6=C('<p class="pl-1 text-red-500">*</p>'),B6=C('<p class="text-gray-400 text-xs pl-2 font-sans">Optional</p>'),wv=C('<p class="text-center text-gray-400 italic">Loading...</p>'),_v=C('<p class="text-center text-gray-400 italic">Nothing more to load</p>'),W6=C("<p></p>"),q6=C('<sl-menu-item class="group"></sl-menu-item>'),H6=C('<p class="overflow-hidden overflow-ellipsis whitespace-nowrap"></p>');it("https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.0.0-beta.82/dist/");const Nt=e=>{let t,r,n,i,o;e.actionRef&&(e.actionRef.clear=()=>{d(void 0),h(-1),i.value="",b(""),E()});const[a,s]=L(!1),[c,l]=L(""),[u,d]=L(),[f,h]=L(-1),[p,m]=L($v({count:e.data.length,getScrollElement:()=>n,estimateSize:()=>36.8,overscan:25})),[v,y]=L(),b=X1(async x=>{l(x),e.onSearchChange&&await e.onSearchChange(x)},250),g=new IntersectionObserver(async x=>{x.at(-1)?.isIntersecting&&e.hasMore&&e.fetchMore&&await e.fetchMore(c())});xe(()=>{v()&&g.observe(v())});const _=x=>{if(x)return e.helpText?e.helpText:e.required?"Please select data...":void 0},S=x=>{const N=new CustomEvent("photon-data-selected",{composed:!0,bubbles:!0,detail:{data:x}});t?.dispatchEvent(N)},E=()=>{const x=new CustomEvent("photon-data-unselected",{composed:!0,bubbles:!0,detail:{}});t?.dispatchEvent(x)};return xe(()=>{e.selectedData&&(d(e.selectedData),S(e.selectedData)),e.selectedData===void 0&&d(void 0)}),xe(()=>{const x=e.data.length*36.8;n.style.minHeight=`${x}px`;const N=$v({count:e.hasMore?e.data.length+1:e.data.length,getScrollElement:()=>n,estimateSize:()=>36.8,overscan:e.fetchMore?25:e.data.length});m(N)}),Tt(()=>{i&&i.addEventListener("keydown",x=>{(x.code=="Space"||x.key==" ")&&x.stopImmediatePropagation()})}),(()=>{const x=V(()=>document.importNode(z6,!0)),N=x.firstChild,M=N.nextSibling,j=M.nextSibling,q=j.nextSibling,A=q.nextSibling,T=A.firstChild,F=T.firstChild,z=F.nextSibling,Y=z.firstChild,ne=z.nextSibling,ae=ne.firstChild,R=T.nextSibling,ge=R.firstChild,_e=ge.firstChild,D=t;typeof D=="function"?ee(D,x):t=x,w(N,ze),w(M,Vt),w(j,Ut),w(q,x6),w(x,(()=>{const G=pe(()=>!!e.label);return()=>G()?(()=>{const K=U6.cloneNode(!0),X=K.firstChild;return w(X,()=>e.label),w(K,(()=>{const ie=pe(()=>!!e.required);return()=>ie()?V6.cloneNode(!0):null})(),null),w(K,(()=>{const ie=pe(()=>!!e.optional);return()=>ie()?B6.cloneNode(!0):null})(),null),K})():null})(),A);const xt=r;typeof xt=="function"?ee(xt,A):r=A,A.addEventListener("sl-hide",async()=>{u()||(i.value="",l(""),e.onHide&&await e.onHide()),s(!1)}),A.addEventListener("sl-show",async()=>{s(!0),e.onOpen&&await e.onOpen()}),A.style.setProperty("width","100%"),A._$owner=P();const St=i;typeof St=="function"?ee(St,T):i=T,T.addEventListener("sl-input",G=>{a()||r.show(),b(G.target.value)}),T.addEventListener("sl-focus",()=>{r.children[1].style.width=`${i.clientWidth}px`,f()>0&&p().scrollToIndex(f())}),T._$owner=P(),w(F,()=>_(e.invalid??!1)),Y._$owner=P(),w(T,U(re,{get when(){return e.clearable},get children(){const G=V(()=>document.importNode(M6,!0)),K=G.firstChild;return K.addEventListener("click",X=>{X.stopImmediatePropagation(),d(void 0),h(-1),i.value="",b(""),E(),r.hide()}),K._$owner=P(),W(()=>G.classList.toggle("hidden",!!(e.isLoading||u()==null))),G}}),ne),ae._$owner=P();const Mt=o;typeof Mt=="function"?ee(Mt,ge):o=ge,ge.style.setProperty("max-height","200px"),ge.style.setProperty("min-height","56px"),ge.style.setProperty("width","100%");const It=n;return typeof It=="function"?ee(It,_e):n=_e,_e.style.setProperty("min-height","36.8px"),_e.style.setProperty("width","100%"),w(_e,U(re,{get when(){return e.data.length>0&&!e.groups},get children(){return p().getVirtualItems().map(G=>{const K=G.index>e.data.length-1,X=e.data[G.index];return(()=>{const ie=V(()=>document.importNode(nu,!0));return ee(ue=>{K&&G.index>0&&y(ue)},ie),ie.$$click=()=>{K||(d(X),h(G.index),i.value="",b(""),S(X),r.hide())},ie.style.setProperty("width","100%"),ie._$owner=P(),w(ie,()=>K?e.hasMore?wv.cloneNode(!0):_v.cloneNode(!0):(()=>{const ue=W6.cloneNode(!0);return w(ue,()=>e.displayAccessor(X,!0)),W(de=>{const Ue=!e.showOverflow,Me=!e.showOverflow,st=!e.showOverflow,dr=!!e.showOverflow;return Ue!==de._v$14&&ue.classList.toggle("overflow-hidden",de._v$14=Ue),Me!==de._v$15&&ue.classList.toggle("overflow-ellipsis",de._v$15=Me),st!==de._v$16&&ue.classList.toggle("whitespace-nowrap",de._v$16=st),dr!==de._v$17&&ue.classList.toggle("whitespace-normal",de._v$17=dr),de},{_v$14:void 0,_v$15:void 0,_v$16:void 0,_v$17:void 0}),ue})()),W(ue=>{const de=X&&X.id===u()?.id&&!K?"selected default":"default",Ue=`${G.size}px`;return de!==ue._v$12&&_p(ie,ue._v$12=de),Ue!==ue._v$13&&ie.style.setProperty("min-height",ue._v$13=Ue),ue},{_v$12:void 0,_v$13:void 0}),ie})()})}}),null),w(_e,U(re,{get when(){return e.data.length>0&&e.groups&&e.groups.length>0},get children(){return U(Rl,{get each(){return e.groups||[]},children:G=>[(()=>{const K=V(()=>document.importNode(q6,!0));return K._$owner=P(),w(K,()=>G.label),W(()=>K.classList.toggle("hidden",p().getVirtualItems().filter(X=>G.filter(e.data[X.index])).length===0)),K})(),pe(()=>p().getVirtualItems().filter(K=>G.filter(e.data[K.index])).map(K=>{const X=K.index>e.data.length-1,ie=e.data[K.index];return(()=>{const ue=V(()=>document.importNode(nu,!0));return ee(de=>{X&&K.index>0&&y(de)},ue),ue.$$click=()=>{X||(d(ie),h(K.index),i.value="",b(""),S(ie),r.hide())},ue.style.setProperty("width","100%"),ue._$owner=P(),w(ue,()=>X?e.hasMore?wv.cloneNode(!0):_v.cloneNode(!0):(()=>{const de=H6.cloneNode(!0);return w(de,()=>e.displayAccessor(ie,!0)),de})()),W(de=>{const Ue=ie&&ie.id===u()?.id&&!X?"selected default group-member":"default group-member",Me=`${K.size}px`;return Ue!==de._v$18&&_p(ue,de._v$18=Ue),Me!==de._v$19&&ue.style.setProperty("min-height",de._v$19=Me),de},{_v$18:void 0,_v$19:void 0}),ue})()}))]})}}),null),w(_e,U(re,{get when(){return e.data.length==0&&!e.isLoading},get children(){const G=V(()=>document.importNode(nu,!0));return G._$owner=P(),w(G,()=>e.noDataMsg?e.noDataMsg:"No data found"),G}}),null),w(_e,U(re,{get when(){return e.data.length==0&&e.isLoading},get children(){const G=V(()=>document.importNode(j6,!0));return G._$owner=P(),G}}),null),W(G=>{const K=e.forceLabelSize&&!e.invalid?-20:e.invalid?-18:0,X=e.disabled??!1,ie=u()?e.displayAccessor(u(),!1):e.placeholder??"Select data...",ue=e.disabled??!1,de=!!(e.invalid??!1),Ue=!!(e.disabled??!1),Me=e.required,st=!!e.forceLabelSize,dr=!e.isLoading,gn=!!e.isLoading,Vr=a()?"chevron-up":"chevron-down";return K!==G._v$&&(A.distance=G._v$=K),X!==G._v$2&&(A.disabled=G._v$2=X),ie!==G._v$3&&(T.placeholder=G._v$3=ie),ue!==G._v$4&&(T.disabled=G._v$4=ue),de!==G._v$5&&T.classList.toggle("invalid",G._v$5=de),Ue!==G._v$6&&T.classList.toggle("disabled",G._v$6=Ue),Me!==G._v$7&&(T.required=G._v$7=Me),st!==G._v$8&&F.classList.toggle("h-[28px]",G._v$8=st),dr!==G._v$9&&z.classList.toggle("hidden",G._v$9=dr),gn!==G._v$10&&ne.classList.toggle("hidden",G._v$10=gn),Vr!==G._v$11&&(ae.name=G._v$11=Vr),G},{_v$:void 0,_v$2:void 0,_v$3:void 0,_v$4:void 0,_v$5:void 0,_v$6:void 0,_v$7:void 0,_v$8:void 0,_v$9:void 0,_v$10:void 0,_v$11:void 0}),x})()};Ni(["click"]);const xv=Wo`
1836
+ color: hsl(`+Math.max(0,Math.min(120-120*d,120))+"deg 100% 31%);",r?.key)}return i}}const C6=e=>e,P6=e=>{const t=Math.max(e.startIndex-e.overscan,0),r=Math.min(e.endIndex+e.overscan,e.count-1),n=[];for(let i=t;i<=r;i++)n.push(i);return n},T6=(e,t)=>{const r=O6(e.scrollElement,n=>{t(n)});if(!!e.scrollElement)return t(e.scrollElement.getBoundingClientRect()),r.observe(),()=>{r.unobserve()}},N6=(e,t)=>{const r=()=>t(e.scrollElement[e.options.horizontal?"scrollLeft":"scrollTop"]);if(!!e.scrollElement)return r(),e.scrollElement.addEventListener("scroll",r,{capture:!1,passive:!0}),()=>{e.scrollElement.removeEventListener("scroll",r)}},I6=(e,t)=>e.getBoundingClientRect()[t.options.horizontal?"width":"height"],A6=(e,t,r)=>{var n;(n=r.scrollElement)==null||n.scrollTo({[r.options.horizontal?"left":"top"]:e,behavior:t?"smooth":void 0})};class D6{constructor(t){var r=this;this.unsubs=[],this.scrollElement=null,this.measurementsCache=[],this.itemMeasurementsCache={},this.pendingMeasuredCacheIndexes=[],this.measureElementCache={},this.setOptions=n=>{Object.entries(n).forEach(i=>{let[o,a]=i;typeof a>"u"&&delete n[o]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:C6,rangeExtractor:P6,enableSmoothScroll:!0,onChange:()=>{},measureElement:I6,initialRect:{width:0,height:0},...n}},this.notify=()=>{var n,i;(n=(i=this.options).onChange)==null||n.call(i,this)},this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[]},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{const n=this.options.getScrollElement();this.scrollElement!==n&&(this.cleanup(),this.scrollElement=n,this.unsubs.push(this.options.observeElementRect(this,i=>{this.scrollRect=i,this.notify()})),this.unsubs.push(this.options.observeElementOffset(this,i=>{this.scrollOffset=i,this.notify()})))},this.getSize=()=>this.scrollRect[this.options.horizontal?"width":"height"],this.getMeasurements=fa(()=>[this.options.count,this.options.paddingStart,this.options.getItemKey,this.itemMeasurementsCache],(n,i,o,a)=>{const s=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const c=this.measurementsCache.slice(0,s);for(let l=s;l<n;l++){const u=o(l),d=a[u],f=c[l-1]?c[l-1].end:i,h=typeof d=="number"?d:this.options.estimateSize(l),p=f+h;c[l]={index:l,start:f,size:h,end:p,key:u}}return this.measurementsCache=c,c},{key:!1,debug:()=>this.options.debug}),this.calculateRange=fa(()=>[this.getMeasurements(),this.getSize(),this.scrollOffset],(n,i,o)=>F6({measurements:n,outerSize:i,scrollOffset:o}),{key:!1,debug:()=>this.options.debug}),this.getIndexes=fa(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(n,i,o,a)=>n({...i,overscan:o,count:a}),{key:!1}),this.getVirtualItems=fa(()=>[this.getIndexes(),this.getMeasurements(),this.options.measureElement],(n,i,o)=>{const a=u=>d=>{var f;const h=this.measurementsCache[u];if(!d)return;const p=o(d,this),m=(f=this.itemMeasurementsCache[h.key])!=null?f:h.size;p!==m&&(h.start<this.scrollOffset&&(this.destinationOffset||this._scrollToOffset(this.scrollOffset+(p-m),!1)),this.pendingMeasuredCacheIndexes.push(u),this.itemMeasurementsCache={...this.itemMeasurementsCache,[h.key]:p},this.notify())},s=[],c={};for(let u=0,d=n.length;u<d;u++){var l;const f=n[u],p={...i[f],measureElement:c[f]=(l=this.measureElementCache[f])!=null?l:a(f)};s.push(p)}return this.measureElementCache=c,s},{key:!1}),this.scrollToOffset=function(n,i){let{align:o}=i===void 0?{align:"start"}:i;const a=()=>{const s=r.scrollOffset,c=r.getSize();o==="auto"&&(n<=s?o="start":n>=s+c?o="end":o="start"),o==="start"?r._scrollToOffset(n,!0):o==="end"?r._scrollToOffset(n-c,!0):o==="center"&&r._scrollToOffset(n-c/2,!0)};a(),requestAnimationFrame(()=>{a()})},this.scrollToIndex=function(n,i){let{align:o,...a}=i===void 0?{align:"auto"}:i;const s=r.getMeasurements(),c=r.scrollOffset,l=r.getSize(),{count:u}=r.options,d=s[Math.max(0,Math.min(n,u-1))];if(!d)return;if(o==="auto")if(d.end>=c+l-r.options.scrollPaddingEnd)o="end";else if(d.start<=c+r.options.scrollPaddingStart)o="start";else return;const f=o==="end"?d.end+r.options.scrollPaddingEnd:d.start-r.options.scrollPaddingStart;r.scrollToOffset(f,{align:o,...a})},this.getTotalSize=()=>{var n;return(((n=this.getMeasurements()[this.options.count-1])==null?void 0:n.end)||this.options.paddingStart)+this.options.paddingEnd},this._scrollToOffset=(n,i)=>{clearTimeout(this.scrollCheckFrame),this.destinationOffset=n,this.options.scrollToFn(n,this.options.enableSmoothScroll&&i,this);let o;const a=()=>{let s=this.scrollOffset;this.scrollCheckFrame=o=setTimeout(()=>{if(this.scrollCheckFrame===o){if(this.scrollOffset===s){this.destinationOffset=void 0;return}s=this.scrollOffset,a()}},100)};a()},this.measure=()=>{this.itemMeasurementsCache={},this.notify()},this.setOptions(t),this.scrollRect=this.options.initialRect,this.scrollOffset=this.options.initialOffset}}const R6=(e,t,r,n)=>{for(;e<=t;){const i=(e+t)/2|0,o=r(i);if(o<n)e=i+1;else if(o>n)t=i-1;else return i}return e>0?e-1:0};function F6(e){let{measurements:t,outerSize:r,scrollOffset:n}=e;const i=t.length-1,a=R6(0,i,c=>t[c].start,n);let s=a;for(;s<i&&t[s].end<n+r;)s++;return{startIndex:a,endIndex:s}}function L6(e){const t=Su(e),r=new D6(t),[n,i]=yn(r.getVirtualItems()),[o,a]=M(r.getTotalSize()),s={get(l,u){switch(u){case"getVirtualItems":return()=>n;case"getTotalSize":return()=>o();default:return Reflect.get(l,u)}}},c=new Proxy(r,s);return c.setOptions(t),Tt(()=>{const l=c._didMount();c._willUpdate(),Il(l)}),f$(()=>{c.setOptions(Su(t,e,{onChange:l=>{l._willUpdate(),i(X9(l.getVirtualItems(),{key:"index"})),a(l.getTotalSize()),e.onChange==null||e.onChange(l)}})),c.measure()}),c}function $v(e){return L6(Su({observeElementRect:T6,observeElementOffset:N6,scrollToFn:A6},e))}const M6=C('<div slot="suffix" class="flex"><sl-icon class="text-gray-400 hover:text-gray-600" name="x-circle-fill"></sl-icon></div>'),iu=C("<sl-menu-item></sl-menu-item>"),j6=C('<sl-menu-item><p class="text-center text-gray-400 italic">Loading...</p></sl-menu-item>'),z6=C('<div><style></style><style></style><style></style><style></style><sl-dropdown class="dropdown relative" hoist><sl-input slot="trigger" size="medium" class="input"><p slot="help-text" class="text-red-500 pt-2 font-sans"></p><div slot="suffix" class="flex"><sl-spinner slot="suffix"></sl-spinner></div><div slot="suffix" class="flex"><sl-icon></sl-icon></div></sl-input><div class="border border-gray-200 dropdown-container overflow-hidden relative"><div class="bg-white pt-2 overflow-x-hidden overflow-y-auto relative"><div></div></div></div></sl-dropdown></div>'),U6=C('<div class="flex items-center pt-2 pb-2"><p class="text-gray-700 text-sm font-sans"></p></div>'),V6=C('<p class="pl-1 text-red-500">*</p>'),B6=C('<p class="text-gray-400 text-xs pl-2 font-sans">Optional</p>'),wv=C('<p class="text-center text-gray-400 italic">Loading...</p>'),_v=C('<p class="text-center text-gray-400 italic">Nothing more to load</p>'),W6=C("<p></p>"),q6=C('<sl-menu-item class="group"></sl-menu-item>'),H6=C('<p class="overflow-hidden overflow-ellipsis whitespace-nowrap"></p>');it("https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.0.0-beta.82/dist/");const Nt=e=>{let t,r,n,i,o;e.actionRef&&(e.actionRef.clear=()=>{d(void 0),h(-1),i.value="",b(""),E()});const[a,s]=M(!1),[c,l]=M(""),[u,d]=M(),[f,h]=M(-1),[p,m]=M($v({count:e.data.length,getScrollElement:()=>n,estimateSize:()=>36.8,overscan:25})),[v,y]=M(),b=X1(async x=>{l(x),e.onSearchChange&&await e.onSearchChange(x)},250),g=new IntersectionObserver(async x=>{x.at(-1)?.isIntersecting&&e.hasMore&&e.fetchMore&&await e.fetchMore(c())});xe(()=>{v()&&g.observe(v())});const _=x=>{if(x)return e.helpText?e.helpText:e.required?"Please select data...":void 0},k=x=>{const T=new CustomEvent("photon-data-selected",{composed:!0,bubbles:!0,detail:{data:x}});t?.dispatchEvent(T)},E=()=>{const x=new CustomEvent("photon-data-unselected",{composed:!0,bubbles:!0,detail:{}});t?.dispatchEvent(x)};return xe(()=>{e.selectedData&&(d(e.selectedData),k(e.selectedData)),e.selectedData===void 0&&d(void 0)}),xe(()=>{const x=e.data.length*36.8;n.style.minHeight=`${x}px`;const T=$v({count:e.hasMore?e.data.length+1:e.data.length,getScrollElement:()=>n,estimateSize:()=>36.8,overscan:e.fetchMore?25:e.data.length});m(T)}),Tt(()=>{i&&i.addEventListener("keydown",x=>{(x.code=="Space"||x.key==" ")&&x.stopImmediatePropagation()})}),(()=>{const x=V(()=>document.importNode(z6,!0)),T=x.firstChild,j=T.nextSibling,z=j.nextSibling,K=z.nextSibling,D=K.nextSibling,L=D.firstChild,R=L.firstChild,F=R.nextSibling,q=F.firstChild,re=F.nextSibling,ae=re.firstChild,A=L.nextSibling,me=A.firstChild,_e=me.firstChild,I=t;typeof I=="function"?ee(I,x):t=x,w(T,ze),w(j,Vt),w(z,Ut),w(K,x6),w(x,(()=>{const G=pe(()=>!!e.label);return()=>G()?(()=>{const Y=U6.cloneNode(!0),X=Y.firstChild;return w(X,()=>e.label),w(Y,(()=>{const ie=pe(()=>!!e.required);return()=>ie()?V6.cloneNode(!0):null})(),null),w(Y,(()=>{const ie=pe(()=>!!e.optional);return()=>ie()?B6.cloneNode(!0):null})(),null),Y})():null})(),D);const xt=r;typeof xt=="function"?ee(xt,D):r=D,D.addEventListener("sl-hide",async()=>{u()||(i.value="",l(""),e.onHide&&await e.onHide()),s(!1)}),D.addEventListener("sl-show",async()=>{s(!0),e.onOpen&&await e.onOpen()}),D.style.setProperty("width","100%"),D._$owner=P();const St=i;typeof St=="function"?ee(St,L):i=L,L.addEventListener("sl-input",G=>{a()||r.show(),b(G.target.value)}),L.addEventListener("sl-focus",()=>{r.children[1].style.width=`${i.clientWidth}px`,f()>0&&p().scrollToIndex(f())}),L._$owner=P(),w(R,()=>_(e.invalid??!1)),q._$owner=P(),w(L,U(ne,{get when(){return e.clearable},get children(){const G=V(()=>document.importNode(M6,!0)),Y=G.firstChild;return Y.addEventListener("click",X=>{X.stopImmediatePropagation(),d(void 0),h(-1),i.value="",b(""),E(),r.hide()}),Y._$owner=P(),W(()=>G.classList.toggle("hidden",!!(e.isLoading||u()==null))),G}}),re),ae._$owner=P();const Mt=o;typeof Mt=="function"?ee(Mt,me):o=me,me.style.setProperty("max-height","200px"),me.style.setProperty("min-height","56px"),me.style.setProperty("width","100%");const It=n;return typeof It=="function"?ee(It,_e):n=_e,_e.style.setProperty("min-height","36.8px"),_e.style.setProperty("width","100%"),w(_e,U(ne,{get when(){return e.data.length>0&&!e.groups},get children(){return p().getVirtualItems().map(G=>{const Y=G.index>e.data.length-1,X=e.data[G.index];return(()=>{const ie=V(()=>document.importNode(iu,!0));return ee(ue=>{Y&&G.index>0&&y(ue)},ie),ie.$$click=()=>{Y||(d(X),h(G.index),i.value="",b(""),k(X),r.hide())},ie.style.setProperty("width","100%"),ie._$owner=P(),w(ie,()=>Y?e.hasMore?wv.cloneNode(!0):_v.cloneNode(!0):(()=>{const ue=W6.cloneNode(!0);return w(ue,()=>e.displayAccessor(X,!0)),W(de=>{const Ue=!e.showOverflow,Me=!e.showOverflow,st=!e.showOverflow,dr=!!e.showOverflow;return Ue!==de._v$14&&ue.classList.toggle("overflow-hidden",de._v$14=Ue),Me!==de._v$15&&ue.classList.toggle("overflow-ellipsis",de._v$15=Me),st!==de._v$16&&ue.classList.toggle("whitespace-nowrap",de._v$16=st),dr!==de._v$17&&ue.classList.toggle("whitespace-normal",de._v$17=dr),de},{_v$14:void 0,_v$15:void 0,_v$16:void 0,_v$17:void 0}),ue})()),W(ue=>{const de=X&&X.id===u()?.id&&!Y?"selected default":"default",Ue=`${G.size}px`;return de!==ue._v$12&&_p(ie,ue._v$12=de),Ue!==ue._v$13&&ie.style.setProperty("min-height",ue._v$13=Ue),ue},{_v$12:void 0,_v$13:void 0}),ie})()})}}),null),w(_e,U(ne,{get when(){return e.data.length>0&&e.groups&&e.groups.length>0},get children(){return U(Rl,{get each(){return e.groups||[]},children:G=>[(()=>{const Y=V(()=>document.importNode(q6,!0));return Y._$owner=P(),w(Y,()=>G.label),W(()=>Y.classList.toggle("hidden",p().getVirtualItems().filter(X=>G.filter(e.data[X.index])).length===0)),Y})(),pe(()=>p().getVirtualItems().filter(Y=>G.filter(e.data[Y.index])).map(Y=>{const X=Y.index>e.data.length-1,ie=e.data[Y.index];return(()=>{const ue=V(()=>document.importNode(iu,!0));return ee(de=>{X&&Y.index>0&&y(de)},ue),ue.$$click=()=>{X||(d(ie),h(Y.index),i.value="",b(""),k(ie),r.hide())},ue.style.setProperty("width","100%"),ue._$owner=P(),w(ue,()=>X?e.hasMore?wv.cloneNode(!0):_v.cloneNode(!0):(()=>{const de=H6.cloneNode(!0);return w(de,()=>e.displayAccessor(ie,!0)),de})()),W(de=>{const Ue=ie&&ie.id===u()?.id&&!X?"selected default group-member":"default group-member",Me=`${Y.size}px`;return Ue!==de._v$18&&_p(ue,de._v$18=Ue),Me!==de._v$19&&ue.style.setProperty("min-height",de._v$19=Me),de},{_v$18:void 0,_v$19:void 0}),ue})()}))]})}}),null),w(_e,U(ne,{get when(){return e.data.length==0&&!e.isLoading},get children(){const G=V(()=>document.importNode(iu,!0));return G._$owner=P(),w(G,()=>e.noDataMsg?e.noDataMsg:"No data found"),G}}),null),w(_e,U(ne,{get when(){return e.data.length==0&&e.isLoading},get children(){const G=V(()=>document.importNode(j6,!0));return G._$owner=P(),G}}),null),W(G=>{const Y=e.forceLabelSize&&!e.invalid?-20:e.invalid?-18:0,X=e.disabled??!1,ie=u()?e.displayAccessor(u(),!1):e.placeholder??"Select data...",ue=e.disabled??!1,de=!!(e.invalid??!1),Ue=!!(e.disabled??!1),Me=e.required,st=!!e.forceLabelSize,dr=!e.isLoading,gn=!!e.isLoading,Vr=a()?"chevron-up":"chevron-down";return Y!==G._v$&&(D.distance=G._v$=Y),X!==G._v$2&&(D.disabled=G._v$2=X),ie!==G._v$3&&(L.placeholder=G._v$3=ie),ue!==G._v$4&&(L.disabled=G._v$4=ue),de!==G._v$5&&L.classList.toggle("invalid",G._v$5=de),Ue!==G._v$6&&L.classList.toggle("disabled",G._v$6=Ue),Me!==G._v$7&&(L.required=G._v$7=Me),st!==G._v$8&&R.classList.toggle("h-[28px]",G._v$8=st),dr!==G._v$9&&F.classList.toggle("hidden",G._v$9=dr),gn!==G._v$10&&re.classList.toggle("hidden",G._v$10=gn),Vr!==G._v$11&&(ae.name=G._v$11=Vr),G},{_v$:void 0,_v$2:void 0,_v$3:void 0,_v$4:void 0,_v$5:void 0,_v$6:void 0,_v$7:void 0,_v$8:void 0,_v$9:void 0,_v$10:void 0,_v$11:void 0}),x})()};Ni(["click"]);const xv=Wo`
1841
1837
  fragment PatientOrderFields on Patient {
1842
1838
  id
1843
1839
  externalId
@@ -1878,7 +1874,7 @@ lit-html/directives/unsafe-svg.js:
1878
1874
  phone
1879
1875
  }
1880
1876
  }
1881
- `,G6=()=>{const[e,t]=yn({patients:{data:[],errors:[],isLoading:!1,finished:!1},selectedPatient:{data:void 0,errors:[],isLoading:!1}}),r=async(s,c)=>{t("selectedPatient",{...e.selectedPatient,isLoading:!0});const{data:l,errors:u}=await s.clinical.patient.getPatient({id:c,fragment:{PatientOrderFields:xv}});t("selectedPatient",{...e.selectedPatient,isLoading:!1,data:l.patient,errors:u})},n=async(s,c)=>{c||(c={}),t("patients",{...e.patients,isLoading:!0});const{data:l,errors:u}=await s.clinical.patient.getPatients({first:c.first,name:c.name,fragment:{PatientOrderFields:xv}});return t("patients",{...e.patients,isLoading:!1,errors:u,data:l.patients,finished:l.patients.length===0}),(!u||u.length===0)&&l.patients.length>0?()=>i(s,{...c,after:l.patients.at(-1).id}):void 0},i=async(s,c)=>{t("patients",{...e.patients,isLoading:!0});const{data:l,errors:u}=await s.clinical.patient.getPatients(c);return t("patients",{...e.patients,isLoading:!1,errors:u,data:[...e.patients.data,...l.patients],finished:l.patients.length===0}),(!u||u.length===0)&&l.patients.length>0?()=>i(s,{...c,after:l.patients.at(-1).id}):void 0};return{store:e,actions:{getPatients:n,getSelectedPatient:r,clearSelectedPatient:async()=>{t("selectedPatient",{...e.selectedPatient,data:void 0})},reset:async()=>{t("patients",{data:[],errors:[],isLoading:!1,finished:!1}),t("selectedPatient",{data:void 0,errors:[],isLoading:!1})}}}},Jh=G6(),Q6=C("<div></div>");$e("photon-patient-select",{label:void 0,required:!1,invalid:!1,helpText:void 0,selected:void 0,formName:void 0,disabled:!1,forceLabelSize:!1,sdk:void 0},e=>{let t;const r=at(),{store:n,actions:i}=Jh;let o;Tt(()=>{i.reset()});const a=c=>{const l=new CustomEvent("photon-patient-selected",{composed:!0,bubbles:!0,detail:{patient:c}});t?.dispatchEvent(l)},s=pe(()=>n.selectedPatient.data?[n.selectedPatient.data,...n.patients.data.filter(c=>c.id!==n.selectedPatient.data.id)]:n.patients.data);return xe(async()=>{e.selected&&!n.selectedPatient.data&&V(async()=>{await i.getSelectedPatient(r?r.getSDK():e.sdk,e.selected)})}),(()=>{const c=Q6.cloneNode(!0),l=t;return typeof l=="function"?ee(l,c):t=c,c.addEventListener("photon-data-selected",u=>{a(u.detail.data)}),w(c,U(Nt,{get data(){return s()},get label(){return e.label},get forceLabelSize(){return e.forceLabelSize},get required(){return e.required},get disabled(){return e.disabled},placeholder:"Select patient...",get invalid(){return e.invalid},get isLoading(){return n.patients.isLoading||n.selectedPatient.isLoading},get hasMore(){return n.patients.data.length%25===0&&!n.patients.finished},displayAccessor:u=>u.name.full,onSearchChange:async u=>o=await i.getPatients(r.getSDK(),{name:u}),onOpen:async()=>{n.patients.data.length==0&&(o=await i.getPatients(r.getSDK()))},onHide:async()=>{o=await i.getPatients(r.getSDK())},fetchMore:async u=>{o&&(o=await o())},noDataMsg:"No patients found",get helpText(){return e.helpText},get selectedData(){return n.selectedPatient.data}})),c})()});const iu=C("<style></style>"),K6=C("<slot></slot>"),Y6=C("<photon-login></photon-login>"),X6=C('<div class="w-full flex justify-center"><sl-spinner style="font-size: 3rem;"></sl-spinner></div>');it("https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.0.0-beta.82/dist/");$e("photon-auth-wrapper",{autoLogin:!1,hideLoader:!1,redirectPath:{attribute:"redirect-path",value:void 0,reflect:!1,notify:!1,parse:!1}},e=>{const t=at(),[r,n]=L(!1),[i,o]=L(!0);return xe(()=>{t||console.error("[photon-auth-wrapper] No valid PhotonClient instance was provided. Please ensure you are wrapping the element in a photon-client element")}),xe(()=>{if(t?.authentication.state.isLoading)o(!0);else{if(o(!1),!t?.authentication.state.isAuthenticated&&e.autoLogin){const a={appState:{}};e.redirectPath&&(a.appState.returnTo=e.redirectPath),t?.authentication.login(a)}n(t?.authentication.state.isAuthenticated||!1)}},[t?.authentication.state.isAuthenticated,t?.authentication.state.isLoading]),[(()=>{const a=iu.cloneNode(!0);return w(a,ze),a})(),(()=>{const a=iu.cloneNode(!0);return w(a,Vt),a})(),(()=>{const a=iu.cloneNode(!0);return w(a,Ut),a})(),U(re,{get when(){return t&&r()},get children(){const a=K6.cloneNode(!0);return a._$owner=P(),a}}),U(re,{get when(){return t&&!r()&&!i()&&!e.autoLogin},get children(){const a=V(()=>document.importNode(Y6,!0));return a._$owner=P(),W(()=>a.redirectPath=e.redirectPath),a}}),U(re,{get when(){return t&&i()&&!e.hideLoader},get children(){const a=V(()=>document.importNode(X6,!0)),s=a.firstChild;return s._$owner=P(),a}})]});var Z6=ft`
1877
+ `,G6=()=>{const[e,t]=yn({patients:{data:[],errors:[],isLoading:!1,finished:!1},selectedPatient:{data:void 0,errors:[],isLoading:!1}}),r=async(s,c)=>{t("selectedPatient",{...e.selectedPatient,isLoading:!0});const{data:l,errors:u}=await s.clinical.patient.getPatient({id:c,fragment:{PatientOrderFields:xv}});t("selectedPatient",{...e.selectedPatient,isLoading:!1,data:l.patient,errors:u})},n=async(s,c)=>{c||(c={}),t("patients",{...e.patients,isLoading:!0});const{data:l,errors:u}=await s.clinical.patient.getPatients({first:c.first,name:c.name,fragment:{PatientOrderFields:xv}});return t("patients",{...e.patients,isLoading:!1,errors:u,data:l.patients,finished:l.patients.length===0}),(!u||u.length===0)&&l.patients.length>0?()=>i(s,{...c,after:l.patients.at(-1).id}):void 0},i=async(s,c)=>{t("patients",{...e.patients,isLoading:!0});const{data:l,errors:u}=await s.clinical.patient.getPatients(c);return t("patients",{...e.patients,isLoading:!1,errors:u,data:[...e.patients.data,...l.patients],finished:l.patients.length===0}),(!u||u.length===0)&&l.patients.length>0?()=>i(s,{...c,after:l.patients.at(-1).id}):void 0};return{store:e,actions:{getPatients:n,getSelectedPatient:r,clearSelectedPatient:async()=>{t("selectedPatient",{...e.selectedPatient,data:void 0})},reset:async()=>{t("patients",{data:[],errors:[],isLoading:!1,finished:!1}),t("selectedPatient",{data:void 0,errors:[],isLoading:!1})}}}},nc=G6(),Q6=C("<div></div>");$e("photon-patient-select",{label:void 0,required:!1,invalid:!1,helpText:void 0,selected:void 0,formName:void 0,disabled:!1,forceLabelSize:!1,sdk:void 0},e=>{let t;const r=at(),{store:n,actions:i}=nc;let o;Tt(()=>{i.reset()});const a=c=>{const l=new CustomEvent("photon-patient-selected",{composed:!0,bubbles:!0,detail:{patient:c}});t?.dispatchEvent(l)},s=pe(()=>n.selectedPatient.data?[n.selectedPatient.data,...n.patients.data.filter(c=>c.id!==n.selectedPatient.data.id)]:n.patients.data);return xe(async()=>{e.selected&&!n.selectedPatient.data&&V(async()=>{await i.getSelectedPatient(r?r.getSDK():e.sdk,e.selected)})}),(()=>{const c=Q6.cloneNode(!0),l=t;return typeof l=="function"?ee(l,c):t=c,c.addEventListener("photon-data-selected",u=>{a(u.detail.data)}),w(c,U(Nt,{get data(){return s()},get label(){return e.label},get forceLabelSize(){return e.forceLabelSize},get required(){return e.required},get disabled(){return e.disabled},placeholder:"Select patient...",get invalid(){return e.invalid},get isLoading(){return n.patients.isLoading||n.selectedPatient.isLoading},get hasMore(){return n.patients.data.length%25===0&&!n.patients.finished},displayAccessor:u=>u.name.full,onSearchChange:async u=>o=await i.getPatients(r.getSDK(),{name:u}),onOpen:async()=>{n.patients.data.length==0&&(o=await i.getPatients(r.getSDK()))},onHide:async()=>{o=await i.getPatients(r.getSDK())},fetchMore:async u=>{o&&(o=await o())},noDataMsg:"No patients found",get helpText(){return e.helpText},get selectedData(){return n.selectedPatient.data}})),c})()});const ou=C("<style></style>"),K6=C("<slot></slot>"),Y6=C("<photon-login></photon-login>"),X6=C('<div class="w-full flex justify-center"><sl-spinner style="font-size: 3rem;"></sl-spinner></div>');it("https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.0.0-beta.82/dist/");$e("photon-auth-wrapper",{autoLogin:!1,hideLoader:!1,redirectPath:{attribute:"redirect-path",value:void 0,reflect:!1,notify:!1,parse:!1}},e=>{const t=at(),[r,n]=M(!1),[i,o]=M(!0);return xe(()=>{t||console.error("[photon-auth-wrapper] No valid PhotonClient instance was provided. Please ensure you are wrapping the element in a photon-client element")}),xe(()=>{if(t?.authentication.state.isLoading)o(!0);else{if(o(!1),!t?.authentication.state.isAuthenticated&&e.autoLogin){const a={appState:{}};e.redirectPath&&(a.appState.returnTo=e.redirectPath),t?.authentication.login(a)}n(t?.authentication.state.isAuthenticated||!1)}},[t?.authentication.state.isAuthenticated,t?.authentication.state.isLoading]),[(()=>{const a=ou.cloneNode(!0);return w(a,ze),a})(),(()=>{const a=ou.cloneNode(!0);return w(a,Vt),a})(),(()=>{const a=ou.cloneNode(!0);return w(a,Ut),a})(),U(ne,{get when(){return t&&r()},get children(){const a=K6.cloneNode(!0);return a._$owner=P(),a}}),U(ne,{get when(){return t&&!r()&&!i()&&!e.autoLogin},get children(){const a=V(()=>document.importNode(Y6,!0));return a._$owner=P(),W(()=>a.redirectPath=e.redirectPath),a}}),U(ne,{get when(){return t&&i()&&!e.hideLoader},get children(){const a=V(()=>document.importNode(X6,!0)),s=a.firstChild;return s._$owner=P(),a}})]});var Z6=ft`
1882
1878
  ${wt}
1883
1879
 
1884
1880
  :host {
@@ -1962,7 +1958,7 @@ lit-html/static.js:
1962
1958
  aria-hidden="true"
1963
1959
  ></sl-icon>
1964
1960
  </${t}>
1965
- `}};zt.styles=Z6;$([Xe(".icon-button")],zt.prototype,"button",2);$([Er()],zt.prototype,"hasFocus",2);$([k()],zt.prototype,"name",2);$([k()],zt.prototype,"library",2);$([k()],zt.prototype,"src",2);$([k()],zt.prototype,"href",2);$([k()],zt.prototype,"target",2);$([k()],zt.prototype,"download",2);$([k()],zt.prototype,"label",2);$([k({type:Boolean,reflect:!0})],zt.prototype,"disabled",2);zt=$([_t("sl-icon-button")],zt);var t7=ft`
1961
+ `}};zt.styles=Z6;$([Xe(".icon-button")],zt.prototype,"button",2);$([Er()],zt.prototype,"hasFocus",2);$([S()],zt.prototype,"name",2);$([S()],zt.prototype,"library",2);$([S()],zt.prototype,"src",2);$([S()],zt.prototype,"href",2);$([S()],zt.prototype,"target",2);$([S()],zt.prototype,"download",2);$([S()],zt.prototype,"label",2);$([S({type:Boolean,reflect:!0})],zt.prototype,"disabled",2);zt=$([_t("sl-icon-button")],zt);var t7=ft`
1966
1962
  ${wt}
1967
1963
 
1968
1964
  :host {
@@ -2079,7 +2075,7 @@ lit-html/static.js:
2079
2075
  ></sl-icon-button>
2080
2076
  `:""}
2081
2077
  </div>
2082
- `}};_r.styles=t7;$([Xe('[part~="base"]')],_r.prototype,"base",2);$([k({type:Boolean,reflect:!0})],_r.prototype,"open",2);$([k({type:Boolean,reflect:!0})],_r.prototype,"closable",2);$([k({reflect:!0})],_r.prototype,"variant",2);$([k({type:Number})],_r.prototype,"duration",2);$([De("open",{waitUntilFirstUpdate:!0})],_r.prototype,"handleOpenChange",1);$([De("duration")],_r.prototype,"handleDurationChange",1);_r=$([_t("sl-alert")],_r);ur("alert.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:250,easing:"ease"}});ur("alert.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:250,easing:"ease"}});var r7=ft`
2078
+ `}};_r.styles=t7;$([Xe('[part~="base"]')],_r.prototype,"base",2);$([S({type:Boolean,reflect:!0})],_r.prototype,"open",2);$([S({type:Boolean,reflect:!0})],_r.prototype,"closable",2);$([S({reflect:!0})],_r.prototype,"variant",2);$([S({type:Number})],_r.prototype,"duration",2);$([De("open",{waitUntilFirstUpdate:!0})],_r.prototype,"handleOpenChange",1);$([De("duration")],_r.prototype,"handleDurationChange",1);_r=$([_t("sl-alert")],_r);ur("alert.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:250,easing:"ease"}});ur("alert.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:250,easing:"ease"}});var r7=ft`
2083
2079
  ${wt}
2084
2080
 
2085
2081
  :host {
@@ -2260,9 +2256,9 @@ lit-html/static.js:
2260
2256
 
2261
2257
  <slot part="label" class="switch__label"></slot>
2262
2258
  </label>
2263
- `}};gt.styles=r7;$([Xe('input[type="checkbox"]')],gt.prototype,"input",2);$([Er()],gt.prototype,"hasFocus",2);$([k()],gt.prototype,"title",2);$([k()],gt.prototype,"name",2);$([k()],gt.prototype,"value",2);$([k({reflect:!0})],gt.prototype,"size",2);$([k({type:Boolean,reflect:!0})],gt.prototype,"disabled",2);$([k({type:Boolean,reflect:!0})],gt.prototype,"checked",2);$([rc("checked")],gt.prototype,"defaultChecked",2);$([k({reflect:!0})],gt.prototype,"form",2);$([k({type:Boolean,reflect:!0})],gt.prototype,"required",2);$([De("checked",{waitUntilFirstUpdate:!0})],gt.prototype,"handleCheckedChange",1);$([De("disabled",{waitUntilFirstUpdate:!0})],gt.prototype,"handleDisabledChange",1);gt=$([_t("sl-switch")],gt);const n7=`.remove-icon-button::part(base):hover,.remove-icon-button::part(base):focus{--tw-text-opacity: 1;color:rgb(239 68 68/var(--tw-text-opacity))}.enable-switch{--width: 60px;--height: 32px;--thumb-size: 26px;--sl-color-primary-600: #22c55e}
2264
- `;class i7 extends TypeError{constructor(t,r){let n;const{message:i,...o}=t,{path:a}=t,s=a.length===0?i:`At path: ${a.join(".")} -- ${i}`;super(s),this.value=void 0,this.key=void 0,this.type=void 0,this.refinement=void 0,this.path=void 0,this.branch=void 0,this.failures=void 0,Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>n??(n=[t,...r()])}}function o7(e){return mi(e)&&typeof e[Symbol.iterator]=="function"}function mi(e){return typeof e=="object"&&e!=null}function mn(e){return typeof e=="symbol"?e.toString():typeof e=="string"?JSON.stringify(e):`${e}`}function a7(e){const{done:t,value:r}=e.next();return t?void 0:r}function s7(e,t,r,n){if(e===!0)return;e===!1?e={}:typeof e=="string"&&(e={message:e});const{path:i,branch:o}=t,{type:a}=r,{refinement:s,message:c=`Expected a value of type \`${a}\`${s?` with refinement \`${s}\``:""}, but received: \`${mn(n)}\``}=e;return{value:n,type:a,refinement:s,key:i[i.length-1],path:i,branch:o,...e,message:c}}function*Id(e,t,r,n){o7(e)||(e=[e]);for(const i of e){const o=s7(i,t,r,n);o&&(yield o)}}function*ep(e,t,r){r===void 0&&(r={});const{path:n=[],branch:i=[e],coerce:o=!1,mask:a=!1}=r,s={path:n,branch:i};if(o&&(e=t.coercer(e,s),a&&t.type!=="type"&&mi(t.schema)&&mi(e)&&!Array.isArray(e)))for(const l in e)t.schema[l]===void 0&&delete e[l];let c="valid";for(const l of t.validator(e,s))c="not_valid",yield[l,void 0];for(let[l,u,d]of t.entries(e,s)){const f=ep(u,d,{path:l===void 0?n:[...n,l],branch:l===void 0?i:[...i,u],coerce:o,mask:a});for(const h of f)h[0]?(c=h[0].refinement!=null?"not_refined":"not_valid",yield[h[0],void 0]):o&&(u=h[1],l===void 0?e=u:e instanceof Map?e.set(l,u):e instanceof Set?e.add(u):mi(e)&&(u!==void 0||l in e)&&(e[l]=u))}if(c!=="not_valid")for(const l of t.refiner(e,s))c="not_refined",yield[l,void 0];c==="valid"&&(yield[void 0,e])}class Ui{constructor(t){this.TYPE=void 0,this.type=void 0,this.schema=void 0,this.coercer=void 0,this.validator=void 0,this.refiner=void 0,this.entries=void 0;const{type:r,schema:n,validator:i,refiner:o,coercer:a=c=>c,entries:s=function*(){}}=t;this.type=r,this.schema=n,this.entries=s,this.coercer=a,i?this.validator=(c,l)=>{const u=i(c,l);return Id(u,l,this,c)}:this.validator=()=>[],o?this.refiner=(c,l)=>{const u=o(c,l);return Id(u,l,this,c)}:this.refiner=()=>[]}assert(t){return x2(t,this)}create(t){return l7(t,this)}is(t){return S2(t,this)}mask(t){return c7(t,this)}validate(t,r){return r===void 0&&(r={}),Qo(t,this,r)}}function x2(e,t){const r=Qo(e,t);if(r[0])throw r[0]}function l7(e,t){const r=Qo(e,t,{coerce:!0});if(r[0])throw r[0];return r[1]}function c7(e,t){const r=Qo(e,t,{coerce:!0,mask:!0});if(r[0])throw r[0];return r[1]}function S2(e,t){return!Qo(e,t)[0]}function Qo(e,t,r){r===void 0&&(r={});const n=ep(e,t,r),i=a7(n);return i[0]?[new i7(i[0],function*(){for(const a of n)a[0]&&(yield a[0])}),void 0]:[void 0,i[1]]}function Vi(e,t){return new Ui({type:e,schema:null,validator:t})}function Bi(){return Vi("any",()=>!0)}function u7(e){return new Ui({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[r,n]of t.entries())yield[r,n,e]},coercer(t){return Array.isArray(t)?t.slice():t},validator(t){return Array.isArray(t)||`Expected an array value, but received: ${mn(t)}`}})}function d7(e){const t={},r=e.map(n=>mn(n)).join();for(const n of e)t[n]=n;return new Ui({type:"enums",schema:t,validator(n){return e.includes(n)||`Expected one of \`${r}\`, but received: ${mn(n)}`}})}function ou(){return Vi("number",e=>typeof e=="number"&&!isNaN(e)||`Expected a number, but received: ${mn(e)}`)}function nc(e,t){return new Ui({type:"record",schema:null,*entries(r){if(mi(r))for(const n in r){const i=r[n];yield[n,n,e],yield[n,i,t]}},validator(r){return mi(r)||`Expected an object, but received: ${mn(r)}`}})}function jt(){return Vi("string",e=>typeof e=="string"||`Expected a string, but received: ${mn(e)}`)}function kv(e){const t=e.map(r=>r.type).join(" | ");return new Ui({type:"union",schema:null,coercer(r,n){return(e.find(o=>{const[a]=o.validate(r,{coerce:!0});return!a})||f7()).coercer(r,n)},validator(r,n){const i=[];for(const o of e){const[...a]=ep(r,o,n),[s]=a;if(s[0])for(const[c]of a)c&&i.push(c);else return[]}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${mn(r)}`,...i]}})}function f7(){return Vi("unknown",()=>!0)}function au(e,t,r){r===void 0&&(r={});const{exclusive:n}=r;return Ko(e,"min",i=>n?i>t:i>=t||`Expected a ${e.type} greater than ${n?"":"or equal to "}${t} but received \`${i}\``)}function Nr(e,t,r){r===void 0&&(r=t);const n=`Expected a ${e.type}`,i=t===r?`of \`${t}\``:`between \`${t}\` and \`${r}\``;return Ko(e,"size",o=>{if(typeof o=="number"||o instanceof Date)return t<=o&&o<=r||`${n} ${i} but received \`${o}\``;if(o instanceof Map||o instanceof Set){const{size:a}=o;return t<=a&&a<=r||`${n} with a size ${i} but received one with a size of \`${a}\``}else{const{length:a}=o;return t<=a&&a<=r||`${n} with a length ${i} but received one with a length of \`${a}\``}})}function Ko(e,t,r){return new Ui({...e,*refiner(n,i){yield*e.refiner(n,i);const o=r(n,i),a=Id(o,i,e,n);for(const s of a)yield{...s,refinement:t}}})}const k2=e=>{const t={};if(e){const d={};for(const f of Object.keys(e))d[f]={value:e[f],error:void 0};e=d}const[r,n]=yn(e||{}),i=({key:d,value:f})=>{n(d,{value:f,error:void 0})},o=d=>{let f=0;for(const h in r)d.includes(h)&&r[h]?.error&&(f+=1);return f>0},a=d=>{for(const f of d)n(f,void 0)};return{store:r,actions:{updateFormValue:i,clearKeys:a,registerValidator:({key:d,validator:f})=>{if(d in t){t[d]=[...t[d],f];return}t[d]=[f]},unRegisterValidator:d=>{delete t[d]},validate:d=>{Object.entries(r).filter(([f])=>d?d.includes(f):!0).forEach(([f,h])=>{t[f]&&t[f].forEach(p=>{try{x2(h?.value,p)}catch(m){for(const v of m.failures())n(f,{value:h?.value,error:v.message})}})})},hasErrors:o,reset:()=>{const d=Object.keys(r);a(d);const f=Object.keys(t);for(const h of f)delete t[h]}}}};function Lt(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function Re(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function Aa(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Aa=function(r){return typeof r}:Aa=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Aa(e)}function ot(e){Re(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||Aa(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function h7(e,t){Re(2,arguments);var r=ot(e).getTime(),n=Lt(t);return new Date(r+n)}var p7={};function Wi(){return p7}function E2(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function Ev(e){Re(1,arguments);var t=ot(e);return t.setHours(0,0,0,0),t}var m7=6e4,O2=36e5,v7=1e3;function y7(e,t){Re(2,arguments);var r=Ev(e),n=Ev(t);return r.getTime()===n.getTime()}function Da(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Da=function(r){return typeof r}:Da=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Da(e)}function g7(e){return Re(1,arguments),e instanceof Date||Da(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function b7(e){if(Re(1,arguments),!g7(e)&&typeof e!="number")return!1;var t=ot(e);return!isNaN(Number(t))}function $7(e,t){return Re(2,arguments),ot(e).getTime()-ot(t).getTime()}var Ov={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},w7="trunc";function _7(e){return e?Ov[e]:Ov[w7]}function x7(e,t,r){Re(2,arguments);var n=$7(e,t)/O2;return _7(r?.roundingMethod)(n)}function C2(e,t){Re(2,arguments);var r=Lt(t);return h7(e,-r)}var S7=864e5;function k7(e){Re(1,arguments);var t=ot(e),r=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var n=t.getTime(),i=r-n;return Math.floor(i/S7)+1}function Ci(e){Re(1,arguments);var t=1,r=ot(e),n=r.getUTCDay(),i=(n<t?7:0)+n-t;return r.setUTCDate(r.getUTCDate()-i),r.setUTCHours(0,0,0,0),r}function P2(e){Re(1,arguments);var t=ot(e),r=t.getUTCFullYear(),n=new Date(0);n.setUTCFullYear(r+1,0,4),n.setUTCHours(0,0,0,0);var i=Ci(n),o=new Date(0);o.setUTCFullYear(r,0,4),o.setUTCHours(0,0,0,0);var a=Ci(o);return t.getTime()>=i.getTime()?r+1:t.getTime()>=a.getTime()?r:r-1}function E7(e){Re(1,arguments);var t=P2(e),r=new Date(0);r.setUTCFullYear(t,0,4),r.setUTCHours(0,0,0,0);var n=Ci(r);return n}var O7=6048e5;function T2(e){Re(1,arguments);var t=ot(e),r=Ci(t).getTime()-E7(t).getTime();return Math.round(r/O7)+1}function jn(e,t){var r,n,i,o,a,s,c,l;Re(1,arguments);var u=Wi(),d=Lt((r=(n=(i=(o=t?.weekStartsOn)!==null&&o!==void 0?o:t==null||(a=t.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&i!==void 0?i:u.weekStartsOn)!==null&&n!==void 0?n:(c=u.locale)===null||c===void 0||(l=c.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&r!==void 0?r:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=ot(e),h=f.getUTCDay(),p=(h<d?7:0)+h-d;return f.setUTCDate(f.getUTCDate()-p),f.setUTCHours(0,0,0,0),f}function tp(e,t){var r,n,i,o,a,s,c,l;Re(1,arguments);var u=ot(e),d=u.getUTCFullYear(),f=Wi(),h=Lt((r=(n=(i=(o=t?.firstWeekContainsDate)!==null&&o!==void 0?o:t==null||(a=t.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&i!==void 0?i:f.firstWeekContainsDate)!==null&&n!==void 0?n:(c=f.locale)===null||c===void 0||(l=c.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&r!==void 0?r:1);if(!(h>=1&&h<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=new Date(0);p.setUTCFullYear(d+1,0,h),p.setUTCHours(0,0,0,0);var m=jn(p,t),v=new Date(0);v.setUTCFullYear(d,0,h),v.setUTCHours(0,0,0,0);var y=jn(v,t);return u.getTime()>=m.getTime()?d+1:u.getTime()>=y.getTime()?d:d-1}function C7(e,t){var r,n,i,o,a,s,c,l;Re(1,arguments);var u=Wi(),d=Lt((r=(n=(i=(o=t?.firstWeekContainsDate)!==null&&o!==void 0?o:t==null||(a=t.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&i!==void 0?i:u.firstWeekContainsDate)!==null&&n!==void 0?n:(c=u.locale)===null||c===void 0||(l=c.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&r!==void 0?r:1),f=tp(e,t),h=new Date(0);h.setUTCFullYear(f,0,d),h.setUTCHours(0,0,0,0);var p=jn(h,t);return p}var P7=6048e5;function N2(e,t){Re(1,arguments);var r=ot(e),n=jn(r,t).getTime()-C7(r,t).getTime();return Math.round(n/P7)+1}function Se(e,t){for(var r=e<0?"-":"",n=Math.abs(e).toString();n.length<t;)n="0"+n;return r+n}var T7={y:function(t,r){var n=t.getUTCFullYear(),i=n>0?n:1-n;return Se(r==="yy"?i%100:i,r.length)},M:function(t,r){var n=t.getUTCMonth();return r==="M"?String(n+1):Se(n+1,2)},d:function(t,r){return Se(t.getUTCDate(),r.length)},a:function(t,r){var n=t.getUTCHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(t,r){return Se(t.getUTCHours()%12||12,r.length)},H:function(t,r){return Se(t.getUTCHours(),r.length)},m:function(t,r){return Se(t.getUTCMinutes(),r.length)},s:function(t,r){return Se(t.getUTCSeconds(),r.length)},S:function(t,r){var n=r.length,i=t.getUTCMilliseconds(),o=Math.floor(i*Math.pow(10,n-3));return Se(o,r.length)}};const Hr=T7;var Xn={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},N7={G:function(t,r,n){var i=t.getUTCFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});case"GGGG":default:return n.era(i,{width:"wide"})}},y:function(t,r,n){if(r==="yo"){var i=t.getUTCFullYear(),o=i>0?i:1-i;return n.ordinalNumber(o,{unit:"year"})}return Hr.y(t,r)},Y:function(t,r,n,i){var o=tp(t,i),a=o>0?o:1-o;if(r==="YY"){var s=a%100;return Se(s,2)}return r==="Yo"?n.ordinalNumber(a,{unit:"year"}):Se(a,r.length)},R:function(t,r){var n=P2(t);return Se(n,r.length)},u:function(t,r){var n=t.getUTCFullYear();return Se(n,r.length)},Q:function(t,r,n){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"Q":return String(i);case"QQ":return Se(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(t,r,n){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"q":return String(i);case"qq":return Se(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(t,r,n){var i=t.getUTCMonth();switch(r){case"M":case"MM":return Hr.M(t,r);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(t,r,n){var i=t.getUTCMonth();switch(r){case"L":return String(i+1);case"LL":return Se(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(t,r,n,i){var o=N2(t,i);return r==="wo"?n.ordinalNumber(o,{unit:"week"}):Se(o,r.length)},I:function(t,r,n){var i=T2(t);return r==="Io"?n.ordinalNumber(i,{unit:"week"}):Se(i,r.length)},d:function(t,r,n){return r==="do"?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):Hr.d(t,r)},D:function(t,r,n){var i=k7(t);return r==="Do"?n.ordinalNumber(i,{unit:"dayOfYear"}):Se(i,r.length)},E:function(t,r,n){var i=t.getUTCDay();switch(r){case"E":case"EE":case"EEE":return n.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(i,{width:"short",context:"formatting"});case"EEEE":default:return n.day(i,{width:"wide",context:"formatting"})}},e:function(t,r,n,i){var o=t.getUTCDay(),a=(o-i.weekStartsOn+8)%7||7;switch(r){case"e":return String(a);case"ee":return Se(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(t,r,n,i){var o=t.getUTCDay(),a=(o-i.weekStartsOn+8)%7||7;switch(r){case"c":return String(a);case"cc":return Se(a,r.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(t,r,n){var i=t.getUTCDay(),o=i===0?7:i;switch(r){case"i":return String(o);case"ii":return Se(o,r.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});case"iiii":default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(t,r,n){var i=t.getUTCHours(),o=i/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(t,r,n){var i=t.getUTCHours(),o;switch(i===12?o=Xn.noon:i===0?o=Xn.midnight:o=i/12>=1?"pm":"am",r){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(t,r,n){var i=t.getUTCHours(),o;switch(i>=17?o=Xn.evening:i>=12?o=Xn.afternoon:i>=4?o=Xn.morning:o=Xn.night,r){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(t,r,n){if(r==="ho"){var i=t.getUTCHours()%12;return i===0&&(i=12),n.ordinalNumber(i,{unit:"hour"})}return Hr.h(t,r)},H:function(t,r,n){return r==="Ho"?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):Hr.H(t,r)},K:function(t,r,n){var i=t.getUTCHours()%12;return r==="Ko"?n.ordinalNumber(i,{unit:"hour"}):Se(i,r.length)},k:function(t,r,n){var i=t.getUTCHours();return i===0&&(i=24),r==="ko"?n.ordinalNumber(i,{unit:"hour"}):Se(i,r.length)},m:function(t,r,n){return r==="mo"?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):Hr.m(t,r)},s:function(t,r,n){return r==="so"?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):Hr.s(t,r)},S:function(t,r){return Hr.S(t,r)},X:function(t,r,n,i){var o=i._originalDate||t,a=o.getTimezoneOffset();if(a===0)return"Z";switch(r){case"X":return Pv(a);case"XXXX":case"XX":return Sn(a);case"XXXXX":case"XXX":default:return Sn(a,":")}},x:function(t,r,n,i){var o=i._originalDate||t,a=o.getTimezoneOffset();switch(r){case"x":return Pv(a);case"xxxx":case"xx":return Sn(a);case"xxxxx":case"xxx":default:return Sn(a,":")}},O:function(t,r,n,i){var o=i._originalDate||t,a=o.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+Cv(a,":");case"OOOO":default:return"GMT"+Sn(a,":")}},z:function(t,r,n,i){var o=i._originalDate||t,a=o.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+Cv(a,":");case"zzzz":default:return"GMT"+Sn(a,":")}},t:function(t,r,n,i){var o=i._originalDate||t,a=Math.floor(o.getTime()/1e3);return Se(a,r.length)},T:function(t,r,n,i){var o=i._originalDate||t,a=o.getTime();return Se(a,r.length)}};function Cv(e,t){var r=e>0?"-":"+",n=Math.abs(e),i=Math.floor(n/60),o=n%60;if(o===0)return r+String(i);var a=t||"";return r+String(i)+a+Se(o,2)}function Pv(e,t){if(e%60===0){var r=e>0?"-":"+";return r+Se(Math.abs(e)/60,2)}return Sn(e,t)}function Sn(e,t){var r=t||"",n=e>0?"-":"+",i=Math.abs(e),o=Se(Math.floor(i/60),2),a=Se(i%60,2);return n+o+r+a}const I7=N7;var Tv=function(t,r){switch(t){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},I2=function(t,r){switch(t){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},A7=function(t,r){var n=t.match(/(P+)(p+)?/)||[],i=n[1],o=n[2];if(!o)return Tv(t,r);var a;switch(i){case"P":a=r.dateTime({width:"short"});break;case"PP":a=r.dateTime({width:"medium"});break;case"PPP":a=r.dateTime({width:"long"});break;case"PPPP":default:a=r.dateTime({width:"full"});break}return a.replace("{{date}}",Tv(i,r)).replace("{{time}}",I2(o,r))},D7={p:I2,P:A7};const Ad=D7;var R7=["D","DD"],F7=["YY","YYYY"];function A2(e){return R7.indexOf(e)!==-1}function D2(e){return F7.indexOf(e)!==-1}function Gs(e,t,r){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var L7={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},M7=function(t,r,n){var i,o=L7[t];return typeof o=="string"?i=o:r===1?i=o.one:i=o.other.replace("{{count}}",r.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i};const j7=M7;function su(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.width?String(t.width):e.defaultWidth,n=e.formats[r]||e.formats[e.defaultWidth];return n}}var z7={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},U7={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},V7={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},B7={date:su({formats:z7,defaultWidth:"full"}),time:su({formats:U7,defaultWidth:"full"}),dateTime:su({formats:V7,defaultWidth:"full"})};const W7=B7;var q7={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},H7=function(t,r,n,i){return q7[t]};const G7=H7;function oo(e){return function(t,r){var n=r!=null&&r.context?String(r.context):"standalone",i;if(n==="formatting"&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,a=r!=null&&r.width?String(r.width):o;i=e.formattingValues[a]||e.formattingValues[o]}else{var s=e.defaultWidth,c=r!=null&&r.width?String(r.width):e.defaultWidth;i=e.values[c]||e.values[s]}var l=e.argumentCallback?e.argumentCallback(t):t;return i[l]}}var Q7={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},K7={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Y7={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},X7={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Z7={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},J7={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},eS=function(t,r){var n=Number(t),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},tS={ordinalNumber:eS,era:oo({values:Q7,defaultWidth:"wide"}),quarter:oo({values:K7,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:oo({values:Y7,defaultWidth:"wide"}),day:oo({values:X7,defaultWidth:"wide"}),dayPeriod:oo({values:Z7,defaultWidth:"wide",formattingValues:J7,defaultFormattingWidth:"wide"})};const rS=tS;function ao(e){return function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.width,i=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;var a=o[0],s=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?iS(s,function(d){return d.test(a)}):nS(s,function(d){return d.test(a)}),l;l=e.valueCallback?e.valueCallback(c):c,l=r.valueCallback?r.valueCallback(l):l;var u=t.slice(a.length);return{value:l,rest:u}}}function nS(e,t){for(var r in e)if(e.hasOwnProperty(r)&&t(e[r]))return r}function iS(e,t){for(var r=0;r<e.length;r++)if(t(e[r]))return r}function oS(e){return function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.match(e.matchPattern);if(!n)return null;var i=n[0],o=t.match(e.parsePattern);if(!o)return null;var a=e.valueCallback?e.valueCallback(o[0]):o[0];a=r.valueCallback?r.valueCallback(a):a;var s=t.slice(i.length);return{value:a,rest:s}}}var aS=/^(\d+)(th|st|nd|rd)?/i,sS=/\d+/i,lS={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},cS={any:[/^b/i,/^(a|c)/i]},uS={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},dS={any:[/1/i,/2/i,/3/i,/4/i]},fS={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},hS={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},pS={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},mS={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},vS={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},yS={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},gS={ordinalNumber:oS({matchPattern:aS,parsePattern:sS,valueCallback:function(t){return parseInt(t,10)}}),era:ao({matchPatterns:lS,defaultMatchWidth:"wide",parsePatterns:cS,defaultParseWidth:"any"}),quarter:ao({matchPatterns:uS,defaultMatchWidth:"wide",parsePatterns:dS,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:ao({matchPatterns:fS,defaultMatchWidth:"wide",parsePatterns:hS,defaultParseWidth:"any"}),day:ao({matchPatterns:pS,defaultMatchWidth:"wide",parsePatterns:mS,defaultParseWidth:"any"}),dayPeriod:ao({matchPatterns:vS,defaultMatchWidth:"any",parsePatterns:yS,defaultParseWidth:"any"})};const bS=gS;var $S={code:"en-US",formatDistance:j7,formatLong:W7,formatRelative:G7,localize:rS,match:bS,options:{weekStartsOn:0,firstWeekContainsDate:1}};const R2=$S;var wS=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,_S=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,xS=/^'([^]*?)'?$/,SS=/''/g,kS=/[a-zA-Z]/;function ic(e,t,r){var n,i,o,a,s,c,l,u,d,f,h,p,m,v,y,b,g,_;Re(2,arguments);var S=String(t),E=Wi(),x=(n=(i=r?.locale)!==null&&i!==void 0?i:E.locale)!==null&&n!==void 0?n:R2,N=Lt((o=(a=(s=(c=r?.firstWeekContainsDate)!==null&&c!==void 0?c:r==null||(l=r.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&s!==void 0?s:E.firstWeekContainsDate)!==null&&a!==void 0?a:(d=E.locale)===null||d===void 0||(f=d.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&o!==void 0?o:1);if(!(N>=1&&N<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var M=Lt((h=(p=(m=(v=r?.weekStartsOn)!==null&&v!==void 0?v:r==null||(y=r.locale)===null||y===void 0||(b=y.options)===null||b===void 0?void 0:b.weekStartsOn)!==null&&m!==void 0?m:E.weekStartsOn)!==null&&p!==void 0?p:(g=E.locale)===null||g===void 0||(_=g.options)===null||_===void 0?void 0:_.weekStartsOn)!==null&&h!==void 0?h:0);if(!(M>=0&&M<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!x.localize)throw new RangeError("locale must contain localize property");if(!x.formatLong)throw new RangeError("locale must contain formatLong property");var j=ot(e);if(!b7(j))throw new RangeError("Invalid time value");var q=E2(j),A=C2(j,q),T={firstWeekContainsDate:N,weekStartsOn:M,locale:x,_originalDate:j},F=S.match(_S).map(function(z){var Y=z[0];if(Y==="p"||Y==="P"){var ne=Ad[Y];return ne(z,x.formatLong)}return z}).join("").match(wS).map(function(z){if(z==="''")return"'";var Y=z[0];if(Y==="'")return ES(z);var ne=I7[Y];if(ne)return!(r!=null&&r.useAdditionalWeekYearTokens)&&D2(z)&&Gs(z,t,String(e)),!(r!=null&&r.useAdditionalDayOfYearTokens)&&A2(z)&&Gs(z,t,String(e)),ne(A,z,x.localize,T);if(Y.match(kS))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Y+"`");return z}).join("");return F}function ES(e){var t=e.match(xS);return t?t[1].replace(SS,"'"):e}function OS(e,t){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}function Ra(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ra=function(r){return typeof r}:Ra=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ra(e)}function F2(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Dd(e,t)}function Dd(e,t){return Dd=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Dd(e,t)}function L2(e){var t=PS();return function(){var n=Qs(e),i;if(t){var o=Qs(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return CS(this,i)}}function CS(e,t){return t&&(Ra(t)==="object"||typeof t=="function")?t:Rd(e)}function Rd(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function PS(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Qs(e){return Qs=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Qs(e)}function rp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Nv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function np(e,t,r){return t&&Nv(e.prototype,t),r&&Nv(e,r),e}function Fd(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var TS=10,M2=function(){function e(){rp(this,e),Fd(this,"subPriority",0)}return np(e,[{key:"validate",value:function(r,n){return!0}}]),e}(),NS=function(e){F2(r,e);var t=L2(r);function r(n,i,o,a,s){var c;return rp(this,r),c=t.call(this),c.value=n,c.validateValue=i,c.setValue=o,c.priority=a,s&&(c.subPriority=s),c}return np(r,[{key:"validate",value:function(i,o){return this.validateValue(i,this.value,o)}},{key:"set",value:function(i,o,a){return this.setValue(i,o,this.value,a)}}]),r}(M2),IS=function(e){F2(r,e);var t=L2(r);function r(){var n;rp(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Fd(Rd(n),"priority",TS),Fd(Rd(n),"subPriority",-1),n}return np(r,[{key:"set",value:function(i,o){if(o.timestampIsSet)return i;var a=new Date(0);return a.setFullYear(i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()),a.setHours(i.getUTCHours(),i.getUTCMinutes(),i.getUTCSeconds(),i.getUTCMilliseconds()),a}}]),r}(M2);function AS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Iv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function DS(e,t,r){return t&&Iv(e.prototype,t),r&&Iv(e,r),e}var we=function(){function e(){AS(this,e)}return DS(e,[{key:"run",value:function(r,n,i,o){var a=this.parse(r,n,i,o);return a?{setter:new NS(a.value,this.validate,this.set,this.priority,this.subPriority),rest:a.rest}:null}},{key:"validate",value:function(r,n,i){return!0}}]),e}();function Fa(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Fa=function(r){return typeof r}:Fa=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Fa(e)}function RS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Av(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function FS(e,t,r){return t&&Av(e.prototype,t),r&&Av(e,r),e}function LS(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ld(e,t)}function Ld(e,t){return Ld=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Ld(e,t)}function MS(e){var t=zS();return function(){var n=Ks(e),i;if(t){var o=Ks(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return jS(this,i)}}function jS(e,t){return t&&(Fa(t)==="object"||typeof t=="function")?t:Md(e)}function Md(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function zS(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ks(e){return Ks=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Ks(e)}function Dv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var US=function(e){LS(r,e);var t=MS(r);function r(){var n;RS(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Dv(Md(n),"priority",140),Dv(Md(n),"incompatibleTokens",["R","u","t","T"]),n}return FS(r,[{key:"parse",value:function(i,o,a){switch(o){case"G":case"GG":case"GGG":return a.era(i,{width:"abbreviated"})||a.era(i,{width:"narrow"});case"GGGGG":return a.era(i,{width:"narrow"});case"GGGG":default:return a.era(i,{width:"wide"})||a.era(i,{width:"abbreviated"})||a.era(i,{width:"narrow"})}}},{key:"set",value:function(i,o,a){return o.era=a,i.setUTCFullYear(a,0,1),i.setUTCHours(0,0,0,0),i}}]),r}(we),Qe={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},pr={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Ke(e,t){return e&&{value:t(e.value),rest:e.rest}}function je(e,t){var r=t.match(e);return r?{value:parseInt(r[0],10),rest:t.slice(r[0].length)}:null}function mr(e,t){var r=t.match(e);if(!r)return null;if(r[0]==="Z")return{value:0,rest:t.slice(1)};var n=r[1]==="+"?1:-1,i=r[2]?parseInt(r[2],10):0,o=r[3]?parseInt(r[3],10):0,a=r[5]?parseInt(r[5],10):0;return{value:n*(i*O2+o*m7+a*v7),rest:t.slice(r[0].length)}}function j2(e){return je(Qe.anyDigitsSigned,e)}function He(e,t){switch(e){case 1:return je(Qe.singleDigit,t);case 2:return je(Qe.twoDigits,t);case 3:return je(Qe.threeDigits,t);case 4:return je(Qe.fourDigits,t);default:return je(new RegExp("^\\d{1,"+e+"}"),t)}}function Ys(e,t){switch(e){case 1:return je(Qe.singleDigitSigned,t);case 2:return je(Qe.twoDigitsSigned,t);case 3:return je(Qe.threeDigitsSigned,t);case 4:return je(Qe.fourDigitsSigned,t);default:return je(new RegExp("^-?\\d{1,"+e+"}"),t)}}function ip(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function z2(e,t){var r=t>0,n=r?t:1-t,i;if(n<=50)i=e||100;else{var o=n+50,a=Math.floor(o/100)*100,s=e>=o%100;i=e+a-(s?100:0)}return r?i:1-i}function U2(e){return e%400===0||e%4===0&&e%100!==0}function La(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?La=function(r){return typeof r}:La=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},La(e)}function VS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Rv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function BS(e,t,r){return t&&Rv(e.prototype,t),r&&Rv(e,r),e}function WS(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&jd(e,t)}function jd(e,t){return jd=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},jd(e,t)}function qS(e){var t=GS();return function(){var n=Xs(e),i;if(t){var o=Xs(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return HS(this,i)}}function HS(e,t){return t&&(La(t)==="object"||typeof t=="function")?t:zd(e)}function zd(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function GS(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Xs(e){return Xs=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Xs(e)}function Fv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var QS=function(e){WS(r,e);var t=qS(r);function r(){var n;VS(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Fv(zd(n),"priority",130),Fv(zd(n),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),n}return BS(r,[{key:"parse",value:function(i,o,a){var s=function(l){return{year:l,isTwoDigitYear:o==="yy"}};switch(o){case"y":return Ke(He(4,i),s);case"yo":return Ke(a.ordinalNumber(i,{unit:"year"}),s);default:return Ke(He(o.length,i),s)}}},{key:"validate",value:function(i,o){return o.isTwoDigitYear||o.year>0}},{key:"set",value:function(i,o,a){var s=i.getUTCFullYear();if(a.isTwoDigitYear){var c=z2(a.year,s);return i.setUTCFullYear(c,0,1),i.setUTCHours(0,0,0,0),i}var l=!("era"in o)||o.era===1?a.year:1-a.year;return i.setUTCFullYear(l,0,1),i.setUTCHours(0,0,0,0),i}}]),r}(we);function Ma(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ma=function(r){return typeof r}:Ma=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ma(e)}function KS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Lv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function YS(e,t,r){return t&&Lv(e.prototype,t),r&&Lv(e,r),e}function XS(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ud(e,t)}function Ud(e,t){return Ud=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Ud(e,t)}function ZS(e){var t=ek();return function(){var n=Zs(e),i;if(t){var o=Zs(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return JS(this,i)}}function JS(e,t){return t&&(Ma(t)==="object"||typeof t=="function")?t:Vd(e)}function Vd(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ek(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Zs(e){return Zs=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Zs(e)}function Mv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var tk=function(e){XS(r,e);var t=ZS(r);function r(){var n;KS(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Mv(Vd(n),"priority",130),Mv(Vd(n),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),n}return YS(r,[{key:"parse",value:function(i,o,a){var s=function(l){return{year:l,isTwoDigitYear:o==="YY"}};switch(o){case"Y":return Ke(He(4,i),s);case"Yo":return Ke(a.ordinalNumber(i,{unit:"year"}),s);default:return Ke(He(o.length,i),s)}}},{key:"validate",value:function(i,o){return o.isTwoDigitYear||o.year>0}},{key:"set",value:function(i,o,a,s){var c=tp(i,s);if(a.isTwoDigitYear){var l=z2(a.year,c);return i.setUTCFullYear(l,0,s.firstWeekContainsDate),i.setUTCHours(0,0,0,0),jn(i,s)}var u=!("era"in o)||o.era===1?a.year:1-a.year;return i.setUTCFullYear(u,0,s.firstWeekContainsDate),i.setUTCHours(0,0,0,0),jn(i,s)}}]),r}(we);function ja(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ja=function(r){return typeof r}:ja=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ja(e)}function rk(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function nk(e,t,r){return t&&jv(e.prototype,t),r&&jv(e,r),e}function ik(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Bd(e,t)}function Bd(e,t){return Bd=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Bd(e,t)}function ok(e){var t=sk();return function(){var n=Js(e),i;if(t){var o=Js(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return ak(this,i)}}function ak(e,t){return t&&(ja(t)==="object"||typeof t=="function")?t:Wd(e)}function Wd(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function sk(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Js(e){return Js=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Js(e)}function zv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var lk=function(e){ik(r,e);var t=ok(r);function r(){var n;rk(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),zv(Wd(n),"priority",130),zv(Wd(n),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),n}return nk(r,[{key:"parse",value:function(i,o){return Ys(o==="R"?4:o.length,i)}},{key:"set",value:function(i,o,a){var s=new Date(0);return s.setUTCFullYear(a,0,4),s.setUTCHours(0,0,0,0),Ci(s)}}]),r}(we);function za(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?za=function(r){return typeof r}:za=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},za(e)}function ck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Uv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function uk(e,t,r){return t&&Uv(e.prototype,t),r&&Uv(e,r),e}function dk(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&qd(e,t)}function qd(e,t){return qd=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},qd(e,t)}function fk(e){var t=pk();return function(){var n=el(e),i;if(t){var o=el(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return hk(this,i)}}function hk(e,t){return t&&(za(t)==="object"||typeof t=="function")?t:Hd(e)}function Hd(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pk(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function el(e){return el=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},el(e)}function Vv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var mk=function(e){dk(r,e);var t=fk(r);function r(){var n;ck(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Vv(Hd(n),"priority",130),Vv(Hd(n),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),n}return uk(r,[{key:"parse",value:function(i,o){return Ys(o==="u"?4:o.length,i)}},{key:"set",value:function(i,o,a){return i.setUTCFullYear(a,0,1),i.setUTCHours(0,0,0,0),i}}]),r}(we);function Ua(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ua=function(r){return typeof r}:Ua=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ua(e)}function vk(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Bv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function yk(e,t,r){return t&&Bv(e.prototype,t),r&&Bv(e,r),e}function gk(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Gd(e,t)}function Gd(e,t){return Gd=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Gd(e,t)}function bk(e){var t=wk();return function(){var n=tl(e),i;if(t){var o=tl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return $k(this,i)}}function $k(e,t){return t&&(Ua(t)==="object"||typeof t=="function")?t:Qd(e)}function Qd(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function wk(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function tl(e){return tl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},tl(e)}function Wv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var _k=function(e){gk(r,e);var t=bk(r);function r(){var n;vk(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Wv(Qd(n),"priority",120),Wv(Qd(n),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),n}return yk(r,[{key:"parse",value:function(i,o,a){switch(o){case"Q":case"QQ":return He(o.length,i);case"Qo":return a.ordinalNumber(i,{unit:"quarter"});case"QQQ":return a.quarter(i,{width:"abbreviated",context:"formatting"})||a.quarter(i,{width:"narrow",context:"formatting"});case"QQQQQ":return a.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return a.quarter(i,{width:"wide",context:"formatting"})||a.quarter(i,{width:"abbreviated",context:"formatting"})||a.quarter(i,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(i,o){return o>=1&&o<=4}},{key:"set",value:function(i,o,a){return i.setUTCMonth((a-1)*3,1),i.setUTCHours(0,0,0,0),i}}]),r}(we);function Va(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Va=function(r){return typeof r}:Va=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Va(e)}function xk(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Sk(e,t,r){return t&&qv(e.prototype,t),r&&qv(e,r),e}function kk(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Kd(e,t)}function Kd(e,t){return Kd=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Kd(e,t)}function Ek(e){var t=Ck();return function(){var n=rl(e),i;if(t){var o=rl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Ok(this,i)}}function Ok(e,t){return t&&(Va(t)==="object"||typeof t=="function")?t:Yd(e)}function Yd(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ck(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function rl(e){return rl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},rl(e)}function Hv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Pk=function(e){kk(r,e);var t=Ek(r);function r(){var n;xk(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Hv(Yd(n),"priority",120),Hv(Yd(n),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),n}return Sk(r,[{key:"parse",value:function(i,o,a){switch(o){case"q":case"qq":return He(o.length,i);case"qo":return a.ordinalNumber(i,{unit:"quarter"});case"qqq":return a.quarter(i,{width:"abbreviated",context:"standalone"})||a.quarter(i,{width:"narrow",context:"standalone"});case"qqqqq":return a.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return a.quarter(i,{width:"wide",context:"standalone"})||a.quarter(i,{width:"abbreviated",context:"standalone"})||a.quarter(i,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(i,o){return o>=1&&o<=4}},{key:"set",value:function(i,o,a){return i.setUTCMonth((a-1)*3,1),i.setUTCHours(0,0,0,0),i}}]),r}(we);function Ba(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ba=function(r){return typeof r}:Ba=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ba(e)}function Tk(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Nk(e,t,r){return t&&Gv(e.prototype,t),r&&Gv(e,r),e}function Ik(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Xd(e,t)}function Xd(e,t){return Xd=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Xd(e,t)}function Ak(e){var t=Rk();return function(){var n=nl(e),i;if(t){var o=nl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Dk(this,i)}}function Dk(e,t){return t&&(Ba(t)==="object"||typeof t=="function")?t:Zd(e)}function Zd(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Rk(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function nl(e){return nl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},nl(e)}function Qv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Fk=function(e){Ik(r,e);var t=Ak(r);function r(){var n;Tk(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Qv(Zd(n),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),Qv(Zd(n),"priority",110),n}return Nk(r,[{key:"parse",value:function(i,o,a){var s=function(l){return l-1};switch(o){case"M":return Ke(je(Qe.month,i),s);case"MM":return Ke(He(2,i),s);case"Mo":return Ke(a.ordinalNumber(i,{unit:"month"}),s);case"MMM":return a.month(i,{width:"abbreviated",context:"formatting"})||a.month(i,{width:"narrow",context:"formatting"});case"MMMMM":return a.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return a.month(i,{width:"wide",context:"formatting"})||a.month(i,{width:"abbreviated",context:"formatting"})||a.month(i,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(i,o){return o>=0&&o<=11}},{key:"set",value:function(i,o,a){return i.setUTCMonth(a,1),i.setUTCHours(0,0,0,0),i}}]),r}(we);function Wa(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Wa=function(r){return typeof r}:Wa=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Wa(e)}function Lk(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Kv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Mk(e,t,r){return t&&Kv(e.prototype,t),r&&Kv(e,r),e}function jk(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Jd(e,t)}function Jd(e,t){return Jd=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Jd(e,t)}function zk(e){var t=Vk();return function(){var n=il(e),i;if(t){var o=il(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Uk(this,i)}}function Uk(e,t){return t&&(Wa(t)==="object"||typeof t=="function")?t:ef(e)}function ef(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Vk(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function il(e){return il=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},il(e)}function Yv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Bk=function(e){jk(r,e);var t=zk(r);function r(){var n;Lk(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Yv(ef(n),"priority",110),Yv(ef(n),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),n}return Mk(r,[{key:"parse",value:function(i,o,a){var s=function(l){return l-1};switch(o){case"L":return Ke(je(Qe.month,i),s);case"LL":return Ke(He(2,i),s);case"Lo":return Ke(a.ordinalNumber(i,{unit:"month"}),s);case"LLL":return a.month(i,{width:"abbreviated",context:"standalone"})||a.month(i,{width:"narrow",context:"standalone"});case"LLLLL":return a.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return a.month(i,{width:"wide",context:"standalone"})||a.month(i,{width:"abbreviated",context:"standalone"})||a.month(i,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(i,o){return o>=0&&o<=11}},{key:"set",value:function(i,o,a){return i.setUTCMonth(a,1),i.setUTCHours(0,0,0,0),i}}]),r}(we);function Wk(e,t,r){Re(2,arguments);var n=ot(e),i=Lt(t),o=N2(n,r)-i;return n.setUTCDate(n.getUTCDate()-o*7),n}function qa(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?qa=function(r){return typeof r}:qa=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},qa(e)}function qk(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Hk(e,t,r){return t&&Xv(e.prototype,t),r&&Xv(e,r),e}function Gk(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&tf(e,t)}function tf(e,t){return tf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},tf(e,t)}function Qk(e){var t=Yk();return function(){var n=ol(e),i;if(t){var o=ol(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Kk(this,i)}}function Kk(e,t){return t&&(qa(t)==="object"||typeof t=="function")?t:rf(e)}function rf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Yk(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ol(e){return ol=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},ol(e)}function Zv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Xk=function(e){Gk(r,e);var t=Qk(r);function r(){var n;qk(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Zv(rf(n),"priority",100),Zv(rf(n),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),n}return Hk(r,[{key:"parse",value:function(i,o,a){switch(o){case"w":return je(Qe.week,i);case"wo":return a.ordinalNumber(i,{unit:"week"});default:return He(o.length,i)}}},{key:"validate",value:function(i,o){return o>=1&&o<=53}},{key:"set",value:function(i,o,a,s){return jn(Wk(i,a,s),s)}}]),r}(we);function Zk(e,t){Re(2,arguments);var r=ot(e),n=Lt(t),i=T2(r)-n;return r.setUTCDate(r.getUTCDate()-i*7),r}function Ha(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ha=function(r){return typeof r}:Ha=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ha(e)}function Jk(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Jv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function eE(e,t,r){return t&&Jv(e.prototype,t),r&&Jv(e,r),e}function tE(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&nf(e,t)}function nf(e,t){return nf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},nf(e,t)}function rE(e){var t=iE();return function(){var n=al(e),i;if(t){var o=al(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return nE(this,i)}}function nE(e,t){return t&&(Ha(t)==="object"||typeof t=="function")?t:of(e)}function of(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function iE(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function al(e){return al=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},al(e)}function ey(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var oE=function(e){tE(r,e);var t=rE(r);function r(){var n;Jk(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),ey(of(n),"priority",100),ey(of(n),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),n}return eE(r,[{key:"parse",value:function(i,o,a){switch(o){case"I":return je(Qe.week,i);case"Io":return a.ordinalNumber(i,{unit:"week"});default:return He(o.length,i)}}},{key:"validate",value:function(i,o){return o>=1&&o<=53}},{key:"set",value:function(i,o,a){return Ci(Zk(i,a))}}]),r}(we);function Ga(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ga=function(r){return typeof r}:Ga=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ga(e)}function aE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ty(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function sE(e,t,r){return t&&ty(e.prototype,t),r&&ty(e,r),e}function lE(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&af(e,t)}function af(e,t){return af=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},af(e,t)}function cE(e){var t=dE();return function(){var n=sl(e),i;if(t){var o=sl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return uE(this,i)}}function uE(e,t){return t&&(Ga(t)==="object"||typeof t=="function")?t:Qa(e)}function Qa(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function dE(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function sl(e){return sl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},sl(e)}function lu(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var fE=[31,28,31,30,31,30,31,31,30,31,30,31],hE=[31,29,31,30,31,30,31,31,30,31,30,31],pE=function(e){lE(r,e);var t=cE(r);function r(){var n;aE(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),lu(Qa(n),"priority",90),lu(Qa(n),"subPriority",1),lu(Qa(n),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),n}return sE(r,[{key:"parse",value:function(i,o,a){switch(o){case"d":return je(Qe.date,i);case"do":return a.ordinalNumber(i,{unit:"date"});default:return He(o.length,i)}}},{key:"validate",value:function(i,o){var a=i.getUTCFullYear(),s=U2(a),c=i.getUTCMonth();return s?o>=1&&o<=hE[c]:o>=1&&o<=fE[c]}},{key:"set",value:function(i,o,a){return i.setUTCDate(a),i.setUTCHours(0,0,0,0),i}}]),r}(we);function Ka(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ka=function(r){return typeof r}:Ka=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ka(e)}function mE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ry(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function vE(e,t,r){return t&&ry(e.prototype,t),r&&ry(e,r),e}function yE(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&sf(e,t)}function sf(e,t){return sf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},sf(e,t)}function gE(e){var t=$E();return function(){var n=ll(e),i;if(t){var o=ll(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return bE(this,i)}}function bE(e,t){return t&&(Ka(t)==="object"||typeof t=="function")?t:Ya(e)}function Ya(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $E(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ll(e){return ll=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},ll(e)}function cu(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var wE=function(e){yE(r,e);var t=gE(r);function r(){var n;mE(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),cu(Ya(n),"priority",90),cu(Ya(n),"subpriority",1),cu(Ya(n),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),n}return vE(r,[{key:"parse",value:function(i,o,a){switch(o){case"D":case"DD":return je(Qe.dayOfYear,i);case"Do":return a.ordinalNumber(i,{unit:"date"});default:return He(o.length,i)}}},{key:"validate",value:function(i,o){var a=i.getUTCFullYear(),s=U2(a);return s?o>=1&&o<=366:o>=1&&o<=365}},{key:"set",value:function(i,o,a){return i.setUTCMonth(0,a),i.setUTCHours(0,0,0,0),i}}]),r}(we);function op(e,t,r){var n,i,o,a,s,c,l,u;Re(2,arguments);var d=Wi(),f=Lt((n=(i=(o=(a=r?.weekStartsOn)!==null&&a!==void 0?a:r==null||(s=r.locale)===null||s===void 0||(c=s.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&o!==void 0?o:d.weekStartsOn)!==null&&i!==void 0?i:(l=d.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&n!==void 0?n:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=ot(e),p=Lt(t),m=h.getUTCDay(),v=p%7,y=(v+7)%7,b=(y<f?7:0)+p-m;return h.setUTCDate(h.getUTCDate()+b),h}function Xa(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Xa=function(r){return typeof r}:Xa=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Xa(e)}function _E(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ny(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function xE(e,t,r){return t&&ny(e.prototype,t),r&&ny(e,r),e}function SE(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&lf(e,t)}function lf(e,t){return lf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},lf(e,t)}function kE(e){var t=OE();return function(){var n=cl(e),i;if(t){var o=cl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return EE(this,i)}}function EE(e,t){return t&&(Xa(t)==="object"||typeof t=="function")?t:cf(e)}function cf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function OE(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function cl(e){return cl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},cl(e)}function iy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var CE=function(e){SE(r,e);var t=kE(r);function r(){var n;_E(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),iy(cf(n),"priority",90),iy(cf(n),"incompatibleTokens",["D","i","e","c","t","T"]),n}return xE(r,[{key:"parse",value:function(i,o,a){switch(o){case"E":case"EE":case"EEE":return a.day(i,{width:"abbreviated",context:"formatting"})||a.day(i,{width:"short",context:"formatting"})||a.day(i,{width:"narrow",context:"formatting"});case"EEEEE":return a.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(i,{width:"short",context:"formatting"})||a.day(i,{width:"narrow",context:"formatting"});case"EEEE":default:return a.day(i,{width:"wide",context:"formatting"})||a.day(i,{width:"abbreviated",context:"formatting"})||a.day(i,{width:"short",context:"formatting"})||a.day(i,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(i,o){return o>=0&&o<=6}},{key:"set",value:function(i,o,a,s){return i=op(i,a,s),i.setUTCHours(0,0,0,0),i}}]),r}(we);function Za(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Za=function(r){return typeof r}:Za=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Za(e)}function PE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function TE(e,t,r){return t&&oy(e.prototype,t),r&&oy(e,r),e}function NE(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&uf(e,t)}function uf(e,t){return uf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},uf(e,t)}function IE(e){var t=DE();return function(){var n=ul(e),i;if(t){var o=ul(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return AE(this,i)}}function AE(e,t){return t&&(Za(t)==="object"||typeof t=="function")?t:df(e)}function df(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function DE(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ul(e){return ul=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},ul(e)}function ay(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var RE=function(e){NE(r,e);var t=IE(r);function r(){var n;PE(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),ay(df(n),"priority",90),ay(df(n),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),n}return TE(r,[{key:"parse",value:function(i,o,a,s){var c=function(u){var d=Math.floor((u-1)/7)*7;return(u+s.weekStartsOn+6)%7+d};switch(o){case"e":case"ee":return Ke(He(o.length,i),c);case"eo":return Ke(a.ordinalNumber(i,{unit:"day"}),c);case"eee":return a.day(i,{width:"abbreviated",context:"formatting"})||a.day(i,{width:"short",context:"formatting"})||a.day(i,{width:"narrow",context:"formatting"});case"eeeee":return a.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(i,{width:"short",context:"formatting"})||a.day(i,{width:"narrow",context:"formatting"});case"eeee":default:return a.day(i,{width:"wide",context:"formatting"})||a.day(i,{width:"abbreviated",context:"formatting"})||a.day(i,{width:"short",context:"formatting"})||a.day(i,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(i,o){return o>=0&&o<=6}},{key:"set",value:function(i,o,a,s){return i=op(i,a,s),i.setUTCHours(0,0,0,0),i}}]),r}(we);function Ja(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ja=function(r){return typeof r}:Ja=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ja(e)}function FE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function LE(e,t,r){return t&&sy(e.prototype,t),r&&sy(e,r),e}function ME(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ff(e,t)}function ff(e,t){return ff=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},ff(e,t)}function jE(e){var t=UE();return function(){var n=dl(e),i;if(t){var o=dl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return zE(this,i)}}function zE(e,t){return t&&(Ja(t)==="object"||typeof t=="function")?t:hf(e)}function hf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function UE(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function dl(e){return dl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},dl(e)}function ly(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var VE=function(e){ME(r,e);var t=jE(r);function r(){var n;FE(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),ly(hf(n),"priority",90),ly(hf(n),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),n}return LE(r,[{key:"parse",value:function(i,o,a,s){var c=function(u){var d=Math.floor((u-1)/7)*7;return(u+s.weekStartsOn+6)%7+d};switch(o){case"c":case"cc":return Ke(He(o.length,i),c);case"co":return Ke(a.ordinalNumber(i,{unit:"day"}),c);case"ccc":return a.day(i,{width:"abbreviated",context:"standalone"})||a.day(i,{width:"short",context:"standalone"})||a.day(i,{width:"narrow",context:"standalone"});case"ccccc":return a.day(i,{width:"narrow",context:"standalone"});case"cccccc":return a.day(i,{width:"short",context:"standalone"})||a.day(i,{width:"narrow",context:"standalone"});case"cccc":default:return a.day(i,{width:"wide",context:"standalone"})||a.day(i,{width:"abbreviated",context:"standalone"})||a.day(i,{width:"short",context:"standalone"})||a.day(i,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(i,o){return o>=0&&o<=6}},{key:"set",value:function(i,o,a,s){return i=op(i,a,s),i.setUTCHours(0,0,0,0),i}}]),r}(we);function BE(e,t){Re(2,arguments);var r=Lt(t);r%7===0&&(r=r-7);var n=1,i=ot(e),o=i.getUTCDay(),a=r%7,s=(a+7)%7,c=(s<n?7:0)+r-o;return i.setUTCDate(i.getUTCDate()+c),i}function es(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?es=function(r){return typeof r}:es=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},es(e)}function WE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function qE(e,t,r){return t&&cy(e.prototype,t),r&&cy(e,r),e}function HE(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&pf(e,t)}function pf(e,t){return pf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},pf(e,t)}function GE(e){var t=KE();return function(){var n=fl(e),i;if(t){var o=fl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return QE(this,i)}}function QE(e,t){return t&&(es(t)==="object"||typeof t=="function")?t:mf(e)}function mf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function KE(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function fl(e){return fl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},fl(e)}function uy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var YE=function(e){HE(r,e);var t=GE(r);function r(){var n;WE(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),uy(mf(n),"priority",90),uy(mf(n),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),n}return qE(r,[{key:"parse",value:function(i,o,a){var s=function(l){return l===0?7:l};switch(o){case"i":case"ii":return He(o.length,i);case"io":return a.ordinalNumber(i,{unit:"day"});case"iii":return Ke(a.day(i,{width:"abbreviated",context:"formatting"})||a.day(i,{width:"short",context:"formatting"})||a.day(i,{width:"narrow",context:"formatting"}),s);case"iiiii":return Ke(a.day(i,{width:"narrow",context:"formatting"}),s);case"iiiiii":return Ke(a.day(i,{width:"short",context:"formatting"})||a.day(i,{width:"narrow",context:"formatting"}),s);case"iiii":default:return Ke(a.day(i,{width:"wide",context:"formatting"})||a.day(i,{width:"abbreviated",context:"formatting"})||a.day(i,{width:"short",context:"formatting"})||a.day(i,{width:"narrow",context:"formatting"}),s)}}},{key:"validate",value:function(i,o){return o>=1&&o<=7}},{key:"set",value:function(i,o,a){return i=BE(i,a),i.setUTCHours(0,0,0,0),i}}]),r}(we);function ts(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ts=function(r){return typeof r}:ts=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ts(e)}function XE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ZE(e,t,r){return t&&dy(e.prototype,t),r&&dy(e,r),e}function JE(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&vf(e,t)}function vf(e,t){return vf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},vf(e,t)}function eO(e){var t=rO();return function(){var n=hl(e),i;if(t){var o=hl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return tO(this,i)}}function tO(e,t){return t&&(ts(t)==="object"||typeof t=="function")?t:yf(e)}function yf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rO(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function hl(e){return hl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},hl(e)}function fy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var nO=function(e){JE(r,e);var t=eO(r);function r(){var n;XE(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),fy(yf(n),"priority",80),fy(yf(n),"incompatibleTokens",["b","B","H","k","t","T"]),n}return ZE(r,[{key:"parse",value:function(i,o,a){switch(o){case"a":case"aa":case"aaa":return a.dayPeriod(i,{width:"abbreviated",context:"formatting"})||a.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaaa":return a.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return a.dayPeriod(i,{width:"wide",context:"formatting"})||a.dayPeriod(i,{width:"abbreviated",context:"formatting"})||a.dayPeriod(i,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(i,o,a){return i.setUTCHours(ip(a),0,0,0),i}}]),r}(we);function rs(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?rs=function(r){return typeof r}:rs=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},rs(e)}function iO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function oO(e,t,r){return t&&hy(e.prototype,t),r&&hy(e,r),e}function aO(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&gf(e,t)}function gf(e,t){return gf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},gf(e,t)}function sO(e){var t=cO();return function(){var n=pl(e),i;if(t){var o=pl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return lO(this,i)}}function lO(e,t){return t&&(rs(t)==="object"||typeof t=="function")?t:bf(e)}function bf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cO(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function pl(e){return pl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},pl(e)}function py(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var uO=function(e){aO(r,e);var t=sO(r);function r(){var n;iO(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),py(bf(n),"priority",80),py(bf(n),"incompatibleTokens",["a","B","H","k","t","T"]),n}return oO(r,[{key:"parse",value:function(i,o,a){switch(o){case"b":case"bb":case"bbb":return a.dayPeriod(i,{width:"abbreviated",context:"formatting"})||a.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbbb":return a.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return a.dayPeriod(i,{width:"wide",context:"formatting"})||a.dayPeriod(i,{width:"abbreviated",context:"formatting"})||a.dayPeriod(i,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(i,o,a){return i.setUTCHours(ip(a),0,0,0),i}}]),r}(we);function ns(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ns=function(r){return typeof r}:ns=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ns(e)}function dO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function my(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function fO(e,t,r){return t&&my(e.prototype,t),r&&my(e,r),e}function hO(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&$f(e,t)}function $f(e,t){return $f=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},$f(e,t)}function pO(e){var t=vO();return function(){var n=ml(e),i;if(t){var o=ml(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return mO(this,i)}}function mO(e,t){return t&&(ns(t)==="object"||typeof t=="function")?t:wf(e)}function wf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vO(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ml(e){return ml=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},ml(e)}function vy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var yO=function(e){hO(r,e);var t=pO(r);function r(){var n;dO(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),vy(wf(n),"priority",80),vy(wf(n),"incompatibleTokens",["a","b","t","T"]),n}return fO(r,[{key:"parse",value:function(i,o,a){switch(o){case"B":case"BB":case"BBB":return a.dayPeriod(i,{width:"abbreviated",context:"formatting"})||a.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBBB":return a.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return a.dayPeriod(i,{width:"wide",context:"formatting"})||a.dayPeriod(i,{width:"abbreviated",context:"formatting"})||a.dayPeriod(i,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(i,o,a){return i.setUTCHours(ip(a),0,0,0),i}}]),r}(we);function is(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?is=function(r){return typeof r}:is=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},is(e)}function gO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function bO(e,t,r){return t&&yy(e.prototype,t),r&&yy(e,r),e}function $O(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_f(e,t)}function _f(e,t){return _f=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},_f(e,t)}function wO(e){var t=xO();return function(){var n=vl(e),i;if(t){var o=vl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return _O(this,i)}}function _O(e,t){return t&&(is(t)==="object"||typeof t=="function")?t:xf(e)}function xf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xO(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function vl(e){return vl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},vl(e)}function gy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var SO=function(e){$O(r,e);var t=wO(r);function r(){var n;gO(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),gy(xf(n),"priority",70),gy(xf(n),"incompatibleTokens",["H","K","k","t","T"]),n}return bO(r,[{key:"parse",value:function(i,o,a){switch(o){case"h":return je(Qe.hour12h,i);case"ho":return a.ordinalNumber(i,{unit:"hour"});default:return He(o.length,i)}}},{key:"validate",value:function(i,o){return o>=1&&o<=12}},{key:"set",value:function(i,o,a){var s=i.getUTCHours()>=12;return s&&a<12?i.setUTCHours(a+12,0,0,0):!s&&a===12?i.setUTCHours(0,0,0,0):i.setUTCHours(a,0,0,0),i}}]),r}(we);function os(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?os=function(r){return typeof r}:os=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},os(e)}function kO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function by(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function EO(e,t,r){return t&&by(e.prototype,t),r&&by(e,r),e}function OO(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Sf(e,t)}function Sf(e,t){return Sf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Sf(e,t)}function CO(e){var t=TO();return function(){var n=yl(e),i;if(t){var o=yl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return PO(this,i)}}function PO(e,t){return t&&(os(t)==="object"||typeof t=="function")?t:kf(e)}function kf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function TO(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function yl(e){return yl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},yl(e)}function $y(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var NO=function(e){OO(r,e);var t=CO(r);function r(){var n;kO(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),$y(kf(n),"priority",70),$y(kf(n),"incompatibleTokens",["a","b","h","K","k","t","T"]),n}return EO(r,[{key:"parse",value:function(i,o,a){switch(o){case"H":return je(Qe.hour23h,i);case"Ho":return a.ordinalNumber(i,{unit:"hour"});default:return He(o.length,i)}}},{key:"validate",value:function(i,o){return o>=0&&o<=23}},{key:"set",value:function(i,o,a){return i.setUTCHours(a,0,0,0),i}}]),r}(we);function as(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?as=function(r){return typeof r}:as=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},as(e)}function IO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function AO(e,t,r){return t&&wy(e.prototype,t),r&&wy(e,r),e}function DO(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ef(e,t)}function Ef(e,t){return Ef=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Ef(e,t)}function RO(e){var t=LO();return function(){var n=gl(e),i;if(t){var o=gl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return FO(this,i)}}function FO(e,t){return t&&(as(t)==="object"||typeof t=="function")?t:Of(e)}function Of(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function LO(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function gl(e){return gl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},gl(e)}function _y(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var MO=function(e){DO(r,e);var t=RO(r);function r(){var n;IO(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),_y(Of(n),"priority",70),_y(Of(n),"incompatibleTokens",["h","H","k","t","T"]),n}return AO(r,[{key:"parse",value:function(i,o,a){switch(o){case"K":return je(Qe.hour11h,i);case"Ko":return a.ordinalNumber(i,{unit:"hour"});default:return He(o.length,i)}}},{key:"validate",value:function(i,o){return o>=0&&o<=11}},{key:"set",value:function(i,o,a){var s=i.getUTCHours()>=12;return s&&a<12?i.setUTCHours(a+12,0,0,0):i.setUTCHours(a,0,0,0),i}}]),r}(we);function ss(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ss=function(r){return typeof r}:ss=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ss(e)}function jO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function zO(e,t,r){return t&&xy(e.prototype,t),r&&xy(e,r),e}function UO(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Cf(e,t)}function Cf(e,t){return Cf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Cf(e,t)}function VO(e){var t=WO();return function(){var n=bl(e),i;if(t){var o=bl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return BO(this,i)}}function BO(e,t){return t&&(ss(t)==="object"||typeof t=="function")?t:Pf(e)}function Pf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function WO(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function bl(e){return bl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},bl(e)}function Sy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var qO=function(e){UO(r,e);var t=VO(r);function r(){var n;jO(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Sy(Pf(n),"priority",70),Sy(Pf(n),"incompatibleTokens",["a","b","h","H","K","t","T"]),n}return zO(r,[{key:"parse",value:function(i,o,a){switch(o){case"k":return je(Qe.hour24h,i);case"ko":return a.ordinalNumber(i,{unit:"hour"});default:return He(o.length,i)}}},{key:"validate",value:function(i,o){return o>=1&&o<=24}},{key:"set",value:function(i,o,a){var s=a<=24?a%24:a;return i.setUTCHours(s,0,0,0),i}}]),r}(we);function ls(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ls=function(r){return typeof r}:ls=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ls(e)}function HO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ky(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function GO(e,t,r){return t&&ky(e.prototype,t),r&&ky(e,r),e}function QO(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Tf(e,t)}function Tf(e,t){return Tf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Tf(e,t)}function KO(e){var t=XO();return function(){var n=$l(e),i;if(t){var o=$l(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return YO(this,i)}}function YO(e,t){return t&&(ls(t)==="object"||typeof t=="function")?t:Nf(e)}function Nf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function XO(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function $l(e){return $l=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},$l(e)}function Ey(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var ZO=function(e){QO(r,e);var t=KO(r);function r(){var n;HO(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Ey(Nf(n),"priority",60),Ey(Nf(n),"incompatibleTokens",["t","T"]),n}return GO(r,[{key:"parse",value:function(i,o,a){switch(o){case"m":return je(Qe.minute,i);case"mo":return a.ordinalNumber(i,{unit:"minute"});default:return He(o.length,i)}}},{key:"validate",value:function(i,o){return o>=0&&o<=59}},{key:"set",value:function(i,o,a){return i.setUTCMinutes(a,0,0),i}}]),r}(we);function cs(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?cs=function(r){return typeof r}:cs=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},cs(e)}function JO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Oy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function eC(e,t,r){return t&&Oy(e.prototype,t),r&&Oy(e,r),e}function tC(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&If(e,t)}function If(e,t){return If=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},If(e,t)}function rC(e){var t=iC();return function(){var n=wl(e),i;if(t){var o=wl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return nC(this,i)}}function nC(e,t){return t&&(cs(t)==="object"||typeof t=="function")?t:Af(e)}function Af(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function iC(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function wl(e){return wl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},wl(e)}function Cy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var oC=function(e){tC(r,e);var t=rC(r);function r(){var n;JO(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Cy(Af(n),"priority",50),Cy(Af(n),"incompatibleTokens",["t","T"]),n}return eC(r,[{key:"parse",value:function(i,o,a){switch(o){case"s":return je(Qe.second,i);case"so":return a.ordinalNumber(i,{unit:"second"});default:return He(o.length,i)}}},{key:"validate",value:function(i,o){return o>=0&&o<=59}},{key:"set",value:function(i,o,a){return i.setUTCSeconds(a,0),i}}]),r}(we);function us(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?us=function(r){return typeof r}:us=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},us(e)}function aC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Py(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function sC(e,t,r){return t&&Py(e.prototype,t),r&&Py(e,r),e}function lC(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Df(e,t)}function Df(e,t){return Df=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Df(e,t)}function cC(e){var t=dC();return function(){var n=_l(e),i;if(t){var o=_l(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return uC(this,i)}}function uC(e,t){return t&&(us(t)==="object"||typeof t=="function")?t:Rf(e)}function Rf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function dC(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _l(e){return _l=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},_l(e)}function Ty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var fC=function(e){lC(r,e);var t=cC(r);function r(){var n;aC(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Ty(Rf(n),"priority",30),Ty(Rf(n),"incompatibleTokens",["t","T"]),n}return sC(r,[{key:"parse",value:function(i,o){var a=function(c){return Math.floor(c*Math.pow(10,-o.length+3))};return Ke(He(o.length,i),a)}},{key:"set",value:function(i,o,a){return i.setUTCMilliseconds(a),i}}]),r}(we);function ds(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ds=function(r){return typeof r}:ds=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ds(e)}function hC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ny(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function pC(e,t,r){return t&&Ny(e.prototype,t),r&&Ny(e,r),e}function mC(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ff(e,t)}function Ff(e,t){return Ff=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Ff(e,t)}function vC(e){var t=gC();return function(){var n=xl(e),i;if(t){var o=xl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return yC(this,i)}}function yC(e,t){return t&&(ds(t)==="object"||typeof t=="function")?t:Lf(e)}function Lf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function gC(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function xl(e){return xl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},xl(e)}function Iy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var bC=function(e){mC(r,e);var t=vC(r);function r(){var n;hC(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Iy(Lf(n),"priority",10),Iy(Lf(n),"incompatibleTokens",["t","T","x"]),n}return pC(r,[{key:"parse",value:function(i,o){switch(o){case"X":return mr(pr.basicOptionalMinutes,i);case"XX":return mr(pr.basic,i);case"XXXX":return mr(pr.basicOptionalSeconds,i);case"XXXXX":return mr(pr.extendedOptionalSeconds,i);case"XXX":default:return mr(pr.extended,i)}}},{key:"set",value:function(i,o,a){return o.timestampIsSet?i:new Date(i.getTime()-a)}}]),r}(we);function fs(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?fs=function(r){return typeof r}:fs=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},fs(e)}function $C(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ay(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function wC(e,t,r){return t&&Ay(e.prototype,t),r&&Ay(e,r),e}function _C(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Mf(e,t)}function Mf(e,t){return Mf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Mf(e,t)}function xC(e){var t=kC();return function(){var n=Sl(e),i;if(t){var o=Sl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return SC(this,i)}}function SC(e,t){return t&&(fs(t)==="object"||typeof t=="function")?t:jf(e)}function jf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function kC(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Sl(e){return Sl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Sl(e)}function Dy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var EC=function(e){_C(r,e);var t=xC(r);function r(){var n;$C(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Dy(jf(n),"priority",10),Dy(jf(n),"incompatibleTokens",["t","T","X"]),n}return wC(r,[{key:"parse",value:function(i,o){switch(o){case"x":return mr(pr.basicOptionalMinutes,i);case"xx":return mr(pr.basic,i);case"xxxx":return mr(pr.basicOptionalSeconds,i);case"xxxxx":return mr(pr.extendedOptionalSeconds,i);case"xxx":default:return mr(pr.extended,i)}}},{key:"set",value:function(i,o,a){return o.timestampIsSet?i:new Date(i.getTime()-a)}}]),r}(we);function hs(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?hs=function(r){return typeof r}:hs=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},hs(e)}function OC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ry(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function CC(e,t,r){return t&&Ry(e.prototype,t),r&&Ry(e,r),e}function PC(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&zf(e,t)}function zf(e,t){return zf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},zf(e,t)}function TC(e){var t=IC();return function(){var n=kl(e),i;if(t){var o=kl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return NC(this,i)}}function NC(e,t){return t&&(hs(t)==="object"||typeof t=="function")?t:Uf(e)}function Uf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function IC(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function kl(e){return kl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},kl(e)}function Fy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var AC=function(e){PC(r,e);var t=TC(r);function r(){var n;OC(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Fy(Uf(n),"priority",40),Fy(Uf(n),"incompatibleTokens","*"),n}return CC(r,[{key:"parse",value:function(i){return j2(i)}},{key:"set",value:function(i,o,a){return[new Date(a*1e3),{timestampIsSet:!0}]}}]),r}(we);function ps(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ps=function(r){return typeof r}:ps=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ps(e)}function DC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ly(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function RC(e,t,r){return t&&Ly(e.prototype,t),r&&Ly(e,r),e}function FC(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Vf(e,t)}function Vf(e,t){return Vf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Vf(e,t)}function LC(e){var t=jC();return function(){var n=El(e),i;if(t){var o=El(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return MC(this,i)}}function MC(e,t){return t&&(ps(t)==="object"||typeof t=="function")?t:Bf(e)}function Bf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function jC(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function El(e){return El=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},El(e)}function My(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var zC=function(e){FC(r,e);var t=LC(r);function r(){var n;DC(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),My(Bf(n),"priority",20),My(Bf(n),"incompatibleTokens","*"),n}return RC(r,[{key:"parse",value:function(i){return j2(i)}},{key:"set",value:function(i,o,a){return[new Date(a),{timestampIsSet:!0}]}}]),r}(we),UC={G:new US,y:new QS,Y:new tk,R:new lk,u:new mk,Q:new _k,q:new Pk,M:new Fk,L:new Bk,w:new Xk,I:new oE,d:new pE,D:new wE,E:new CE,e:new RE,c:new VE,i:new YE,a:new nO,b:new uO,B:new yO,h:new SO,H:new NO,K:new MO,k:new qO,m:new ZO,s:new oC,S:new fC,X:new bC,x:new EC,t:new AC,T:new zC};function ms(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ms=function(r){return typeof r}:ms=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ms(e)}function jy(e,t){var r;if(typeof Symbol>"u"||e[Symbol.iterator]==null){if(Array.isArray(e)||(r=VC(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
2265
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,a=!1,s;return{s:function(){r=e[Symbol.iterator]()},n:function(){var l=r.next();return o=l.done,l},e:function(l){a=!0,s=l},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(a)throw s}}}}function VC(e,t){if(!!e){if(typeof e=="string")return zy(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return zy(e,t)}}function zy(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var BC=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,WC=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,qC=/^'([^]*?)'?$/,HC=/''/g,GC=/\S/,QC=/[a-zA-Z]/;function KC(e,t,r,n){var i,o,a,s,c,l,u,d,f,h,p,m,v,y,b,g,_,S;Re(3,arguments);var E=String(e),x=String(t),N=Wi(),M=(i=(o=n?.locale)!==null&&o!==void 0?o:N.locale)!==null&&i!==void 0?i:R2;if(!M.match)throw new RangeError("locale must contain match property");var j=Lt((a=(s=(c=(l=n?.firstWeekContainsDate)!==null&&l!==void 0?l:n==null||(u=n.locale)===null||u===void 0||(d=u.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&c!==void 0?c:N.firstWeekContainsDate)!==null&&s!==void 0?s:(f=N.locale)===null||f===void 0||(h=f.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&a!==void 0?a:1);if(!(j>=1&&j<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var q=Lt((p=(m=(v=(y=n?.weekStartsOn)!==null&&y!==void 0?y:n==null||(b=n.locale)===null||b===void 0||(g=b.options)===null||g===void 0?void 0:g.weekStartsOn)!==null&&v!==void 0?v:N.weekStartsOn)!==null&&m!==void 0?m:(_=N.locale)===null||_===void 0||(S=_.options)===null||S===void 0?void 0:S.weekStartsOn)!==null&&p!==void 0?p:0);if(!(q>=0&&q<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(x==="")return E===""?ot(r):new Date(NaN);var A={firstWeekContainsDate:j,weekStartsOn:q,locale:M},T=[new IS],F=x.match(WC).map(function(K){var X=K[0];if(X in Ad){var ie=Ad[X];return ie(K,M.formatLong)}return K}).join("").match(BC),z=[],Y=jy(F),ne;try{var ae=function(){var X=ne.value;!(n!=null&&n.useAdditionalWeekYearTokens)&&D2(X)&&Gs(X,x,e),!(n!=null&&n.useAdditionalDayOfYearTokens)&&A2(X)&&Gs(X,x,e);var ie=X[0],ue=UC[ie];if(ue){var de=ue.incompatibleTokens;if(Array.isArray(de)){var Ue=z.find(function(st){return de.includes(st.token)||st.token===ie});if(Ue)throw new RangeError("The format string mustn't contain `".concat(Ue.fullToken,"` and `").concat(X,"` at the same time"))}else if(ue.incompatibleTokens==="*"&&z.length>0)throw new RangeError("The format string mustn't contain `".concat(X,"` and any other token at the same time"));z.push({token:ie,fullToken:X});var Me=ue.run(E,X,M.match,A);if(!Me)return{v:new Date(NaN)};T.push(Me.setter),E=Me.rest}else{if(ie.match(QC))throw new RangeError("Format string contains an unescaped latin alphabet character `"+ie+"`");if(X==="''"?X="'":ie==="'"&&(X=YC(X)),E.indexOf(X)===0)E=E.slice(X.length);else return{v:new Date(NaN)}}};for(Y.s();!(ne=Y.n()).done;){var R=ae();if(ms(R)==="object")return R.v}}catch(K){Y.e(K)}finally{Y.f()}if(E.length>0&&GC.test(E))return new Date(NaN);var ge=T.map(function(K){return K.priority}).sort(function(K,X){return X-K}).filter(function(K,X,ie){return ie.indexOf(K)===X}).map(function(K){return T.filter(function(X){return X.priority===K}).sort(function(X,ie){return ie.subPriority-X.subPriority})}).map(function(K){return K[0]}),_e=ot(r);if(isNaN(_e.getTime()))return new Date(NaN);var D=C2(_e,E2(_e)),xt={},St=jy(ge),Mt;try{for(St.s();!(Mt=St.n()).done;){var It=Mt.value;if(!It.validate(D,A))return new Date(NaN);var G=It.set(D,xt,A);Array.isArray(G)?(D=G[0],OS(xt,G[1])):D=G}}catch(K){St.e(K)}finally{St.f()}return D}function YC(e){return e.match(qC)[1].replace(HC,"'")}function XC(e){return Re(1,arguments),y7(e,Date.now())}const nt=(e,t)=>Vi("message",r=>S2(r,e)?!0:t),ZC=(e,t=r=>KC(r,"yyyy-MM-dd",new Date))=>Vi("between",function(n){return x7(t(n),e)>=0||XC(t(n))}),JC=()=>Ko(jt(),"numericString",e=>e.length===0?!0:/^\d+$/.test(e)),eP=()=>Ko(jt(),"email",e=>e.length===0?!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)),Uy=()=>Ko(Bi(),"empty",e=>e===null||e==null);var tP=ft`
2259
+ `}};gt.styles=r7;$([Xe('input[type="checkbox"]')],gt.prototype,"input",2);$([Er()],gt.prototype,"hasFocus",2);$([S()],gt.prototype,"title",2);$([S()],gt.prototype,"name",2);$([S()],gt.prototype,"value",2);$([S({reflect:!0})],gt.prototype,"size",2);$([S({type:Boolean,reflect:!0})],gt.prototype,"disabled",2);$([S({type:Boolean,reflect:!0})],gt.prototype,"checked",2);$([rc("checked")],gt.prototype,"defaultChecked",2);$([S({reflect:!0})],gt.prototype,"form",2);$([S({type:Boolean,reflect:!0})],gt.prototype,"required",2);$([De("checked",{waitUntilFirstUpdate:!0})],gt.prototype,"handleCheckedChange",1);$([De("disabled",{waitUntilFirstUpdate:!0})],gt.prototype,"handleDisabledChange",1);gt=$([_t("sl-switch")],gt);const n7=`.remove-icon-button::part(base):hover,.remove-icon-button::part(base):focus{--tw-text-opacity: 1;color:rgb(239 68 68/var(--tw-text-opacity))}.enable-switch{--width: 60px;--height: 32px;--thumb-size: 26px;--sl-color-primary-600: #22c55e}
2260
+ `;class i7 extends TypeError{constructor(t,r){let n;const{message:i,...o}=t,{path:a}=t,s=a.length===0?i:`At path: ${a.join(".")} -- ${i}`;super(s),this.value=void 0,this.key=void 0,this.type=void 0,this.refinement=void 0,this.path=void 0,this.branch=void 0,this.failures=void 0,Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>n??(n=[t,...r()])}}function o7(e){return mi(e)&&typeof e[Symbol.iterator]=="function"}function mi(e){return typeof e=="object"&&e!=null}function mn(e){return typeof e=="symbol"?e.toString():typeof e=="string"?JSON.stringify(e):`${e}`}function a7(e){const{done:t,value:r}=e.next();return t?void 0:r}function s7(e,t,r,n){if(e===!0)return;e===!1?e={}:typeof e=="string"&&(e={message:e});const{path:i,branch:o}=t,{type:a}=r,{refinement:s,message:c=`Expected a value of type \`${a}\`${s?` with refinement \`${s}\``:""}, but received: \`${mn(n)}\``}=e;return{value:n,type:a,refinement:s,key:i[i.length-1],path:i,branch:o,...e,message:c}}function*Ad(e,t,r,n){o7(e)||(e=[e]);for(const i of e){const o=s7(i,t,r,n);o&&(yield o)}}function*ep(e,t,r){r===void 0&&(r={});const{path:n=[],branch:i=[e],coerce:o=!1,mask:a=!1}=r,s={path:n,branch:i};if(o&&(e=t.coercer(e,s),a&&t.type!=="type"&&mi(t.schema)&&mi(e)&&!Array.isArray(e)))for(const l in e)t.schema[l]===void 0&&delete e[l];let c="valid";for(const l of t.validator(e,s))c="not_valid",yield[l,void 0];for(let[l,u,d]of t.entries(e,s)){const f=ep(u,d,{path:l===void 0?n:[...n,l],branch:l===void 0?i:[...i,u],coerce:o,mask:a});for(const h of f)h[0]?(c=h[0].refinement!=null?"not_refined":"not_valid",yield[h[0],void 0]):o&&(u=h[1],l===void 0?e=u:e instanceof Map?e.set(l,u):e instanceof Set?e.add(u):mi(e)&&(u!==void 0||l in e)&&(e[l]=u))}if(c!=="not_valid")for(const l of t.refiner(e,s))c="not_refined",yield[l,void 0];c==="valid"&&(yield[void 0,e])}class Ui{constructor(t){this.TYPE=void 0,this.type=void 0,this.schema=void 0,this.coercer=void 0,this.validator=void 0,this.refiner=void 0,this.entries=void 0;const{type:r,schema:n,validator:i,refiner:o,coercer:a=c=>c,entries:s=function*(){}}=t;this.type=r,this.schema=n,this.entries=s,this.coercer=a,i?this.validator=(c,l)=>{const u=i(c,l);return Ad(u,l,this,c)}:this.validator=()=>[],o?this.refiner=(c,l)=>{const u=o(c,l);return Ad(u,l,this,c)}:this.refiner=()=>[]}assert(t){return x2(t,this)}create(t){return l7(t,this)}is(t){return S2(t,this)}mask(t){return c7(t,this)}validate(t,r){return r===void 0&&(r={}),Qo(t,this,r)}}function x2(e,t){const r=Qo(e,t);if(r[0])throw r[0]}function l7(e,t){const r=Qo(e,t,{coerce:!0});if(r[0])throw r[0];return r[1]}function c7(e,t){const r=Qo(e,t,{coerce:!0,mask:!0});if(r[0])throw r[0];return r[1]}function S2(e,t){return!Qo(e,t)[0]}function Qo(e,t,r){r===void 0&&(r={});const n=ep(e,t,r),i=a7(n);return i[0]?[new i7(i[0],function*(){for(const a of n)a[0]&&(yield a[0])}),void 0]:[void 0,i[1]]}function Vi(e,t){return new Ui({type:e,schema:null,validator:t})}function Bi(){return Vi("any",()=>!0)}function u7(e){return new Ui({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[r,n]of t.entries())yield[r,n,e]},coercer(t){return Array.isArray(t)?t.slice():t},validator(t){return Array.isArray(t)||`Expected an array value, but received: ${mn(t)}`}})}function d7(e){const t={},r=e.map(n=>mn(n)).join();for(const n of e)t[n]=n;return new Ui({type:"enums",schema:t,validator(n){return e.includes(n)||`Expected one of \`${r}\`, but received: ${mn(n)}`}})}function au(){return Vi("number",e=>typeof e=="number"&&!isNaN(e)||`Expected a number, but received: ${mn(e)}`)}function ic(e,t){return new Ui({type:"record",schema:null,*entries(r){if(mi(r))for(const n in r){const i=r[n];yield[n,n,e],yield[n,i,t]}},validator(r){return mi(r)||`Expected an object, but received: ${mn(r)}`}})}function jt(){return Vi("string",e=>typeof e=="string"||`Expected a string, but received: ${mn(e)}`)}function kv(e){const t=e.map(r=>r.type).join(" | ");return new Ui({type:"union",schema:null,coercer(r,n){return(e.find(o=>{const[a]=o.validate(r,{coerce:!0});return!a})||f7()).coercer(r,n)},validator(r,n){const i=[];for(const o of e){const[...a]=ep(r,o,n),[s]=a;if(s[0])for(const[c]of a)c&&i.push(c);else return[]}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${mn(r)}`,...i]}})}function f7(){return Vi("unknown",()=>!0)}function su(e,t,r){r===void 0&&(r={});const{exclusive:n}=r;return Ko(e,"min",i=>n?i>t:i>=t||`Expected a ${e.type} greater than ${n?"":"or equal to "}${t} but received \`${i}\``)}function Nr(e,t,r){r===void 0&&(r=t);const n=`Expected a ${e.type}`,i=t===r?`of \`${t}\``:`between \`${t}\` and \`${r}\``;return Ko(e,"size",o=>{if(typeof o=="number"||o instanceof Date)return t<=o&&o<=r||`${n} ${i} but received \`${o}\``;if(o instanceof Map||o instanceof Set){const{size:a}=o;return t<=a&&a<=r||`${n} with a size ${i} but received one with a size of \`${a}\``}else{const{length:a}=o;return t<=a&&a<=r||`${n} with a length ${i} but received one with a length of \`${a}\``}})}function Ko(e,t,r){return new Ui({...e,*refiner(n,i){yield*e.refiner(n,i);const o=r(n,i),a=Ad(o,i,e,n);for(const s of a)yield{...s,refinement:t}}})}const k2=e=>{const t={};if(e){const d={};for(const f of Object.keys(e))d[f]={value:e[f],error:void 0};e=d}const[r,n]=yn(e||{}),i=({key:d,value:f})=>{n(d,{value:f,error:void 0})},o=d=>{let f=0;for(const h in r)d.includes(h)&&r[h]?.error&&(f+=1);return f>0},a=d=>{for(const f of d)n(f,void 0)};return{store:r,actions:{updateFormValue:i,clearKeys:a,registerValidator:({key:d,validator:f})=>{if(d in t){t[d]=[...t[d],f];return}t[d]=[f]},unRegisterValidator:d=>{delete t[d]},validate:d=>{Object.entries(r).filter(([f])=>d?d.includes(f):!0).forEach(([f,h])=>{t[f]&&t[f].forEach(p=>{try{x2(h?.value,p)}catch(m){for(const v of m.failures())n(f,{value:h?.value,error:v.message})}})})},hasErrors:o,reset:()=>{const d=Object.keys(r);a(d);const f=Object.keys(t);for(const h of f)delete t[h]}}}};function Lt(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function Re(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function Aa(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Aa=function(r){return typeof r}:Aa=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Aa(e)}function ot(e){Re(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||Aa(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function h7(e,t){Re(2,arguments);var r=ot(e).getTime(),n=Lt(t);return new Date(r+n)}var p7={};function Wi(){return p7}function E2(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function Ev(e){Re(1,arguments);var t=ot(e);return t.setHours(0,0,0,0),t}var m7=6e4,O2=36e5,v7=1e3;function y7(e,t){Re(2,arguments);var r=Ev(e),n=Ev(t);return r.getTime()===n.getTime()}function Da(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Da=function(r){return typeof r}:Da=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Da(e)}function g7(e){return Re(1,arguments),e instanceof Date||Da(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function b7(e){if(Re(1,arguments),!g7(e)&&typeof e!="number")return!1;var t=ot(e);return!isNaN(Number(t))}function $7(e,t){return Re(2,arguments),ot(e).getTime()-ot(t).getTime()}var Ov={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},w7="trunc";function _7(e){return e?Ov[e]:Ov[w7]}function x7(e,t,r){Re(2,arguments);var n=$7(e,t)/O2;return _7(r?.roundingMethod)(n)}function C2(e,t){Re(2,arguments);var r=Lt(t);return h7(e,-r)}var S7=864e5;function k7(e){Re(1,arguments);var t=ot(e),r=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var n=t.getTime(),i=r-n;return Math.floor(i/S7)+1}function Ci(e){Re(1,arguments);var t=1,r=ot(e),n=r.getUTCDay(),i=(n<t?7:0)+n-t;return r.setUTCDate(r.getUTCDate()-i),r.setUTCHours(0,0,0,0),r}function P2(e){Re(1,arguments);var t=ot(e),r=t.getUTCFullYear(),n=new Date(0);n.setUTCFullYear(r+1,0,4),n.setUTCHours(0,0,0,0);var i=Ci(n),o=new Date(0);o.setUTCFullYear(r,0,4),o.setUTCHours(0,0,0,0);var a=Ci(o);return t.getTime()>=i.getTime()?r+1:t.getTime()>=a.getTime()?r:r-1}function E7(e){Re(1,arguments);var t=P2(e),r=new Date(0);r.setUTCFullYear(t,0,4),r.setUTCHours(0,0,0,0);var n=Ci(r);return n}var O7=6048e5;function T2(e){Re(1,arguments);var t=ot(e),r=Ci(t).getTime()-E7(t).getTime();return Math.round(r/O7)+1}function jn(e,t){var r,n,i,o,a,s,c,l;Re(1,arguments);var u=Wi(),d=Lt((r=(n=(i=(o=t?.weekStartsOn)!==null&&o!==void 0?o:t==null||(a=t.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&i!==void 0?i:u.weekStartsOn)!==null&&n!==void 0?n:(c=u.locale)===null||c===void 0||(l=c.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&r!==void 0?r:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=ot(e),h=f.getUTCDay(),p=(h<d?7:0)+h-d;return f.setUTCDate(f.getUTCDate()-p),f.setUTCHours(0,0,0,0),f}function tp(e,t){var r,n,i,o,a,s,c,l;Re(1,arguments);var u=ot(e),d=u.getUTCFullYear(),f=Wi(),h=Lt((r=(n=(i=(o=t?.firstWeekContainsDate)!==null&&o!==void 0?o:t==null||(a=t.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&i!==void 0?i:f.firstWeekContainsDate)!==null&&n!==void 0?n:(c=f.locale)===null||c===void 0||(l=c.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&r!==void 0?r:1);if(!(h>=1&&h<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=new Date(0);p.setUTCFullYear(d+1,0,h),p.setUTCHours(0,0,0,0);var m=jn(p,t),v=new Date(0);v.setUTCFullYear(d,0,h),v.setUTCHours(0,0,0,0);var y=jn(v,t);return u.getTime()>=m.getTime()?d+1:u.getTime()>=y.getTime()?d:d-1}function C7(e,t){var r,n,i,o,a,s,c,l;Re(1,arguments);var u=Wi(),d=Lt((r=(n=(i=(o=t?.firstWeekContainsDate)!==null&&o!==void 0?o:t==null||(a=t.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&i!==void 0?i:u.firstWeekContainsDate)!==null&&n!==void 0?n:(c=u.locale)===null||c===void 0||(l=c.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&r!==void 0?r:1),f=tp(e,t),h=new Date(0);h.setUTCFullYear(f,0,d),h.setUTCHours(0,0,0,0);var p=jn(h,t);return p}var P7=6048e5;function N2(e,t){Re(1,arguments);var r=ot(e),n=jn(r,t).getTime()-C7(r,t).getTime();return Math.round(n/P7)+1}function Se(e,t){for(var r=e<0?"-":"",n=Math.abs(e).toString();n.length<t;)n="0"+n;return r+n}var T7={y:function(t,r){var n=t.getUTCFullYear(),i=n>0?n:1-n;return Se(r==="yy"?i%100:i,r.length)},M:function(t,r){var n=t.getUTCMonth();return r==="M"?String(n+1):Se(n+1,2)},d:function(t,r){return Se(t.getUTCDate(),r.length)},a:function(t,r){var n=t.getUTCHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(t,r){return Se(t.getUTCHours()%12||12,r.length)},H:function(t,r){return Se(t.getUTCHours(),r.length)},m:function(t,r){return Se(t.getUTCMinutes(),r.length)},s:function(t,r){return Se(t.getUTCSeconds(),r.length)},S:function(t,r){var n=r.length,i=t.getUTCMilliseconds(),o=Math.floor(i*Math.pow(10,n-3));return Se(o,r.length)}};const Hr=T7;var Xn={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},N7={G:function(t,r,n){var i=t.getUTCFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});case"GGGG":default:return n.era(i,{width:"wide"})}},y:function(t,r,n){if(r==="yo"){var i=t.getUTCFullYear(),o=i>0?i:1-i;return n.ordinalNumber(o,{unit:"year"})}return Hr.y(t,r)},Y:function(t,r,n,i){var o=tp(t,i),a=o>0?o:1-o;if(r==="YY"){var s=a%100;return Se(s,2)}return r==="Yo"?n.ordinalNumber(a,{unit:"year"}):Se(a,r.length)},R:function(t,r){var n=P2(t);return Se(n,r.length)},u:function(t,r){var n=t.getUTCFullYear();return Se(n,r.length)},Q:function(t,r,n){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"Q":return String(i);case"QQ":return Se(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(t,r,n){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"q":return String(i);case"qq":return Se(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(t,r,n){var i=t.getUTCMonth();switch(r){case"M":case"MM":return Hr.M(t,r);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(t,r,n){var i=t.getUTCMonth();switch(r){case"L":return String(i+1);case"LL":return Se(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(t,r,n,i){var o=N2(t,i);return r==="wo"?n.ordinalNumber(o,{unit:"week"}):Se(o,r.length)},I:function(t,r,n){var i=T2(t);return r==="Io"?n.ordinalNumber(i,{unit:"week"}):Se(i,r.length)},d:function(t,r,n){return r==="do"?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):Hr.d(t,r)},D:function(t,r,n){var i=k7(t);return r==="Do"?n.ordinalNumber(i,{unit:"dayOfYear"}):Se(i,r.length)},E:function(t,r,n){var i=t.getUTCDay();switch(r){case"E":case"EE":case"EEE":return n.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(i,{width:"short",context:"formatting"});case"EEEE":default:return n.day(i,{width:"wide",context:"formatting"})}},e:function(t,r,n,i){var o=t.getUTCDay(),a=(o-i.weekStartsOn+8)%7||7;switch(r){case"e":return String(a);case"ee":return Se(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(t,r,n,i){var o=t.getUTCDay(),a=(o-i.weekStartsOn+8)%7||7;switch(r){case"c":return String(a);case"cc":return Se(a,r.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(t,r,n){var i=t.getUTCDay(),o=i===0?7:i;switch(r){case"i":return String(o);case"ii":return Se(o,r.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});case"iiii":default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(t,r,n){var i=t.getUTCHours(),o=i/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(t,r,n){var i=t.getUTCHours(),o;switch(i===12?o=Xn.noon:i===0?o=Xn.midnight:o=i/12>=1?"pm":"am",r){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(t,r,n){var i=t.getUTCHours(),o;switch(i>=17?o=Xn.evening:i>=12?o=Xn.afternoon:i>=4?o=Xn.morning:o=Xn.night,r){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(t,r,n){if(r==="ho"){var i=t.getUTCHours()%12;return i===0&&(i=12),n.ordinalNumber(i,{unit:"hour"})}return Hr.h(t,r)},H:function(t,r,n){return r==="Ho"?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):Hr.H(t,r)},K:function(t,r,n){var i=t.getUTCHours()%12;return r==="Ko"?n.ordinalNumber(i,{unit:"hour"}):Se(i,r.length)},k:function(t,r,n){var i=t.getUTCHours();return i===0&&(i=24),r==="ko"?n.ordinalNumber(i,{unit:"hour"}):Se(i,r.length)},m:function(t,r,n){return r==="mo"?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):Hr.m(t,r)},s:function(t,r,n){return r==="so"?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):Hr.s(t,r)},S:function(t,r){return Hr.S(t,r)},X:function(t,r,n,i){var o=i._originalDate||t,a=o.getTimezoneOffset();if(a===0)return"Z";switch(r){case"X":return Pv(a);case"XXXX":case"XX":return Sn(a);case"XXXXX":case"XXX":default:return Sn(a,":")}},x:function(t,r,n,i){var o=i._originalDate||t,a=o.getTimezoneOffset();switch(r){case"x":return Pv(a);case"xxxx":case"xx":return Sn(a);case"xxxxx":case"xxx":default:return Sn(a,":")}},O:function(t,r,n,i){var o=i._originalDate||t,a=o.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+Cv(a,":");case"OOOO":default:return"GMT"+Sn(a,":")}},z:function(t,r,n,i){var o=i._originalDate||t,a=o.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+Cv(a,":");case"zzzz":default:return"GMT"+Sn(a,":")}},t:function(t,r,n,i){var o=i._originalDate||t,a=Math.floor(o.getTime()/1e3);return Se(a,r.length)},T:function(t,r,n,i){var o=i._originalDate||t,a=o.getTime();return Se(a,r.length)}};function Cv(e,t){var r=e>0?"-":"+",n=Math.abs(e),i=Math.floor(n/60),o=n%60;if(o===0)return r+String(i);var a=t||"";return r+String(i)+a+Se(o,2)}function Pv(e,t){if(e%60===0){var r=e>0?"-":"+";return r+Se(Math.abs(e)/60,2)}return Sn(e,t)}function Sn(e,t){var r=t||"",n=e>0?"-":"+",i=Math.abs(e),o=Se(Math.floor(i/60),2),a=Se(i%60,2);return n+o+r+a}const I7=N7;var Tv=function(t,r){switch(t){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},I2=function(t,r){switch(t){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},A7=function(t,r){var n=t.match(/(P+)(p+)?/)||[],i=n[1],o=n[2];if(!o)return Tv(t,r);var a;switch(i){case"P":a=r.dateTime({width:"short"});break;case"PP":a=r.dateTime({width:"medium"});break;case"PPP":a=r.dateTime({width:"long"});break;case"PPPP":default:a=r.dateTime({width:"full"});break}return a.replace("{{date}}",Tv(i,r)).replace("{{time}}",I2(o,r))},D7={p:I2,P:A7};const Dd=D7;var R7=["D","DD"],F7=["YY","YYYY"];function A2(e){return R7.indexOf(e)!==-1}function D2(e){return F7.indexOf(e)!==-1}function Gs(e,t,r){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var L7={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},M7=function(t,r,n){var i,o=L7[t];return typeof o=="string"?i=o:r===1?i=o.one:i=o.other.replace("{{count}}",r.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i};const j7=M7;function lu(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.width?String(t.width):e.defaultWidth,n=e.formats[r]||e.formats[e.defaultWidth];return n}}var z7={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},U7={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},V7={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},B7={date:lu({formats:z7,defaultWidth:"full"}),time:lu({formats:U7,defaultWidth:"full"}),dateTime:lu({formats:V7,defaultWidth:"full"})};const W7=B7;var q7={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},H7=function(t,r,n,i){return q7[t]};const G7=H7;function oo(e){return function(t,r){var n=r!=null&&r.context?String(r.context):"standalone",i;if(n==="formatting"&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,a=r!=null&&r.width?String(r.width):o;i=e.formattingValues[a]||e.formattingValues[o]}else{var s=e.defaultWidth,c=r!=null&&r.width?String(r.width):e.defaultWidth;i=e.values[c]||e.values[s]}var l=e.argumentCallback?e.argumentCallback(t):t;return i[l]}}var Q7={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},K7={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Y7={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},X7={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Z7={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},J7={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},eS=function(t,r){var n=Number(t),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},tS={ordinalNumber:eS,era:oo({values:Q7,defaultWidth:"wide"}),quarter:oo({values:K7,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:oo({values:Y7,defaultWidth:"wide"}),day:oo({values:X7,defaultWidth:"wide"}),dayPeriod:oo({values:Z7,defaultWidth:"wide",formattingValues:J7,defaultFormattingWidth:"wide"})};const rS=tS;function ao(e){return function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.width,i=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;var a=o[0],s=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?iS(s,function(d){return d.test(a)}):nS(s,function(d){return d.test(a)}),l;l=e.valueCallback?e.valueCallback(c):c,l=r.valueCallback?r.valueCallback(l):l;var u=t.slice(a.length);return{value:l,rest:u}}}function nS(e,t){for(var r in e)if(e.hasOwnProperty(r)&&t(e[r]))return r}function iS(e,t){for(var r=0;r<e.length;r++)if(t(e[r]))return r}function oS(e){return function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.match(e.matchPattern);if(!n)return null;var i=n[0],o=t.match(e.parsePattern);if(!o)return null;var a=e.valueCallback?e.valueCallback(o[0]):o[0];a=r.valueCallback?r.valueCallback(a):a;var s=t.slice(i.length);return{value:a,rest:s}}}var aS=/^(\d+)(th|st|nd|rd)?/i,sS=/\d+/i,lS={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},cS={any:[/^b/i,/^(a|c)/i]},uS={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},dS={any:[/1/i,/2/i,/3/i,/4/i]},fS={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},hS={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},pS={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},mS={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},vS={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},yS={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},gS={ordinalNumber:oS({matchPattern:aS,parsePattern:sS,valueCallback:function(t){return parseInt(t,10)}}),era:ao({matchPatterns:lS,defaultMatchWidth:"wide",parsePatterns:cS,defaultParseWidth:"any"}),quarter:ao({matchPatterns:uS,defaultMatchWidth:"wide",parsePatterns:dS,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:ao({matchPatterns:fS,defaultMatchWidth:"wide",parsePatterns:hS,defaultParseWidth:"any"}),day:ao({matchPatterns:pS,defaultMatchWidth:"wide",parsePatterns:mS,defaultParseWidth:"any"}),dayPeriod:ao({matchPatterns:vS,defaultMatchWidth:"any",parsePatterns:yS,defaultParseWidth:"any"})};const bS=gS;var $S={code:"en-US",formatDistance:j7,formatLong:W7,formatRelative:G7,localize:rS,match:bS,options:{weekStartsOn:0,firstWeekContainsDate:1}};const R2=$S;var wS=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,_S=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,xS=/^'([^]*?)'?$/,SS=/''/g,kS=/[a-zA-Z]/;function oc(e,t,r){var n,i,o,a,s,c,l,u,d,f,h,p,m,v,y,b,g,_;Re(2,arguments);var k=String(t),E=Wi(),x=(n=(i=r?.locale)!==null&&i!==void 0?i:E.locale)!==null&&n!==void 0?n:R2,T=Lt((o=(a=(s=(c=r?.firstWeekContainsDate)!==null&&c!==void 0?c:r==null||(l=r.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&s!==void 0?s:E.firstWeekContainsDate)!==null&&a!==void 0?a:(d=E.locale)===null||d===void 0||(f=d.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&o!==void 0?o:1);if(!(T>=1&&T<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var j=Lt((h=(p=(m=(v=r?.weekStartsOn)!==null&&v!==void 0?v:r==null||(y=r.locale)===null||y===void 0||(b=y.options)===null||b===void 0?void 0:b.weekStartsOn)!==null&&m!==void 0?m:E.weekStartsOn)!==null&&p!==void 0?p:(g=E.locale)===null||g===void 0||(_=g.options)===null||_===void 0?void 0:_.weekStartsOn)!==null&&h!==void 0?h:0);if(!(j>=0&&j<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!x.localize)throw new RangeError("locale must contain localize property");if(!x.formatLong)throw new RangeError("locale must contain formatLong property");var z=ot(e);if(!b7(z))throw new RangeError("Invalid time value");var K=E2(z),D=C2(z,K),L={firstWeekContainsDate:T,weekStartsOn:j,locale:x,_originalDate:z},R=k.match(_S).map(function(F){var q=F[0];if(q==="p"||q==="P"){var re=Dd[q];return re(F,x.formatLong)}return F}).join("").match(wS).map(function(F){if(F==="''")return"'";var q=F[0];if(q==="'")return ES(F);var re=I7[q];if(re)return!(r!=null&&r.useAdditionalWeekYearTokens)&&D2(F)&&Gs(F,t,String(e)),!(r!=null&&r.useAdditionalDayOfYearTokens)&&A2(F)&&Gs(F,t,String(e)),re(D,F,x.localize,L);if(q.match(kS))throw new RangeError("Format string contains an unescaped latin alphabet character `"+q+"`");return F}).join("");return R}function ES(e){var t=e.match(xS);return t?t[1].replace(SS,"'"):e}function OS(e,t){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}function Ra(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ra=function(r){return typeof r}:Ra=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ra(e)}function F2(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Rd(e,t)}function Rd(e,t){return Rd=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Rd(e,t)}function L2(e){var t=PS();return function(){var n=Qs(e),i;if(t){var o=Qs(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return CS(this,i)}}function CS(e,t){return t&&(Ra(t)==="object"||typeof t=="function")?t:Fd(e)}function Fd(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function PS(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Qs(e){return Qs=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Qs(e)}function rp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Nv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function np(e,t,r){return t&&Nv(e.prototype,t),r&&Nv(e,r),e}function Ld(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var TS=10,M2=function(){function e(){rp(this,e),Ld(this,"subPriority",0)}return np(e,[{key:"validate",value:function(r,n){return!0}}]),e}(),NS=function(e){F2(r,e);var t=L2(r);function r(n,i,o,a,s){var c;return rp(this,r),c=t.call(this),c.value=n,c.validateValue=i,c.setValue=o,c.priority=a,s&&(c.subPriority=s),c}return np(r,[{key:"validate",value:function(i,o){return this.validateValue(i,this.value,o)}},{key:"set",value:function(i,o,a){return this.setValue(i,o,this.value,a)}}]),r}(M2),IS=function(e){F2(r,e);var t=L2(r);function r(){var n;rp(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Ld(Fd(n),"priority",TS),Ld(Fd(n),"subPriority",-1),n}return np(r,[{key:"set",value:function(i,o){if(o.timestampIsSet)return i;var a=new Date(0);return a.setFullYear(i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()),a.setHours(i.getUTCHours(),i.getUTCMinutes(),i.getUTCSeconds(),i.getUTCMilliseconds()),a}}]),r}(M2);function AS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Iv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function DS(e,t,r){return t&&Iv(e.prototype,t),r&&Iv(e,r),e}var we=function(){function e(){AS(this,e)}return DS(e,[{key:"run",value:function(r,n,i,o){var a=this.parse(r,n,i,o);return a?{setter:new NS(a.value,this.validate,this.set,this.priority,this.subPriority),rest:a.rest}:null}},{key:"validate",value:function(r,n,i){return!0}}]),e}();function Fa(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Fa=function(r){return typeof r}:Fa=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Fa(e)}function RS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Av(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function FS(e,t,r){return t&&Av(e.prototype,t),r&&Av(e,r),e}function LS(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Md(e,t)}function Md(e,t){return Md=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Md(e,t)}function MS(e){var t=zS();return function(){var n=Ks(e),i;if(t){var o=Ks(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return jS(this,i)}}function jS(e,t){return t&&(Fa(t)==="object"||typeof t=="function")?t:jd(e)}function jd(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function zS(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ks(e){return Ks=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Ks(e)}function Dv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var US=function(e){LS(r,e);var t=MS(r);function r(){var n;RS(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Dv(jd(n),"priority",140),Dv(jd(n),"incompatibleTokens",["R","u","t","T"]),n}return FS(r,[{key:"parse",value:function(i,o,a){switch(o){case"G":case"GG":case"GGG":return a.era(i,{width:"abbreviated"})||a.era(i,{width:"narrow"});case"GGGGG":return a.era(i,{width:"narrow"});case"GGGG":default:return a.era(i,{width:"wide"})||a.era(i,{width:"abbreviated"})||a.era(i,{width:"narrow"})}}},{key:"set",value:function(i,o,a){return o.era=a,i.setUTCFullYear(a,0,1),i.setUTCHours(0,0,0,0),i}}]),r}(we),Qe={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},pr={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Ke(e,t){return e&&{value:t(e.value),rest:e.rest}}function je(e,t){var r=t.match(e);return r?{value:parseInt(r[0],10),rest:t.slice(r[0].length)}:null}function mr(e,t){var r=t.match(e);if(!r)return null;if(r[0]==="Z")return{value:0,rest:t.slice(1)};var n=r[1]==="+"?1:-1,i=r[2]?parseInt(r[2],10):0,o=r[3]?parseInt(r[3],10):0,a=r[5]?parseInt(r[5],10):0;return{value:n*(i*O2+o*m7+a*v7),rest:t.slice(r[0].length)}}function j2(e){return je(Qe.anyDigitsSigned,e)}function He(e,t){switch(e){case 1:return je(Qe.singleDigit,t);case 2:return je(Qe.twoDigits,t);case 3:return je(Qe.threeDigits,t);case 4:return je(Qe.fourDigits,t);default:return je(new RegExp("^\\d{1,"+e+"}"),t)}}function Ys(e,t){switch(e){case 1:return je(Qe.singleDigitSigned,t);case 2:return je(Qe.twoDigitsSigned,t);case 3:return je(Qe.threeDigitsSigned,t);case 4:return je(Qe.fourDigitsSigned,t);default:return je(new RegExp("^-?\\d{1,"+e+"}"),t)}}function ip(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function z2(e,t){var r=t>0,n=r?t:1-t,i;if(n<=50)i=e||100;else{var o=n+50,a=Math.floor(o/100)*100,s=e>=o%100;i=e+a-(s?100:0)}return r?i:1-i}function U2(e){return e%400===0||e%4===0&&e%100!==0}function La(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?La=function(r){return typeof r}:La=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},La(e)}function VS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Rv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function BS(e,t,r){return t&&Rv(e.prototype,t),r&&Rv(e,r),e}function WS(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&zd(e,t)}function zd(e,t){return zd=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},zd(e,t)}function qS(e){var t=GS();return function(){var n=Xs(e),i;if(t){var o=Xs(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return HS(this,i)}}function HS(e,t){return t&&(La(t)==="object"||typeof t=="function")?t:Ud(e)}function Ud(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function GS(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Xs(e){return Xs=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Xs(e)}function Fv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var QS=function(e){WS(r,e);var t=qS(r);function r(){var n;VS(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Fv(Ud(n),"priority",130),Fv(Ud(n),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),n}return BS(r,[{key:"parse",value:function(i,o,a){var s=function(l){return{year:l,isTwoDigitYear:o==="yy"}};switch(o){case"y":return Ke(He(4,i),s);case"yo":return Ke(a.ordinalNumber(i,{unit:"year"}),s);default:return Ke(He(o.length,i),s)}}},{key:"validate",value:function(i,o){return o.isTwoDigitYear||o.year>0}},{key:"set",value:function(i,o,a){var s=i.getUTCFullYear();if(a.isTwoDigitYear){var c=z2(a.year,s);return i.setUTCFullYear(c,0,1),i.setUTCHours(0,0,0,0),i}var l=!("era"in o)||o.era===1?a.year:1-a.year;return i.setUTCFullYear(l,0,1),i.setUTCHours(0,0,0,0),i}}]),r}(we);function Ma(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ma=function(r){return typeof r}:Ma=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ma(e)}function KS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Lv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function YS(e,t,r){return t&&Lv(e.prototype,t),r&&Lv(e,r),e}function XS(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Vd(e,t)}function Vd(e,t){return Vd=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Vd(e,t)}function ZS(e){var t=ek();return function(){var n=Zs(e),i;if(t){var o=Zs(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return JS(this,i)}}function JS(e,t){return t&&(Ma(t)==="object"||typeof t=="function")?t:Bd(e)}function Bd(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ek(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Zs(e){return Zs=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Zs(e)}function Mv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var tk=function(e){XS(r,e);var t=ZS(r);function r(){var n;KS(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Mv(Bd(n),"priority",130),Mv(Bd(n),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),n}return YS(r,[{key:"parse",value:function(i,o,a){var s=function(l){return{year:l,isTwoDigitYear:o==="YY"}};switch(o){case"Y":return Ke(He(4,i),s);case"Yo":return Ke(a.ordinalNumber(i,{unit:"year"}),s);default:return Ke(He(o.length,i),s)}}},{key:"validate",value:function(i,o){return o.isTwoDigitYear||o.year>0}},{key:"set",value:function(i,o,a,s){var c=tp(i,s);if(a.isTwoDigitYear){var l=z2(a.year,c);return i.setUTCFullYear(l,0,s.firstWeekContainsDate),i.setUTCHours(0,0,0,0),jn(i,s)}var u=!("era"in o)||o.era===1?a.year:1-a.year;return i.setUTCFullYear(u,0,s.firstWeekContainsDate),i.setUTCHours(0,0,0,0),jn(i,s)}}]),r}(we);function ja(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ja=function(r){return typeof r}:ja=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ja(e)}function rk(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function nk(e,t,r){return t&&jv(e.prototype,t),r&&jv(e,r),e}function ik(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Wd(e,t)}function Wd(e,t){return Wd=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Wd(e,t)}function ok(e){var t=sk();return function(){var n=Js(e),i;if(t){var o=Js(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return ak(this,i)}}function ak(e,t){return t&&(ja(t)==="object"||typeof t=="function")?t:qd(e)}function qd(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function sk(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Js(e){return Js=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Js(e)}function zv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var lk=function(e){ik(r,e);var t=ok(r);function r(){var n;rk(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),zv(qd(n),"priority",130),zv(qd(n),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),n}return nk(r,[{key:"parse",value:function(i,o){return Ys(o==="R"?4:o.length,i)}},{key:"set",value:function(i,o,a){var s=new Date(0);return s.setUTCFullYear(a,0,4),s.setUTCHours(0,0,0,0),Ci(s)}}]),r}(we);function za(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?za=function(r){return typeof r}:za=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},za(e)}function ck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Uv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function uk(e,t,r){return t&&Uv(e.prototype,t),r&&Uv(e,r),e}function dk(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Hd(e,t)}function Hd(e,t){return Hd=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Hd(e,t)}function fk(e){var t=pk();return function(){var n=el(e),i;if(t){var o=el(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return hk(this,i)}}function hk(e,t){return t&&(za(t)==="object"||typeof t=="function")?t:Gd(e)}function Gd(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pk(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function el(e){return el=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},el(e)}function Vv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var mk=function(e){dk(r,e);var t=fk(r);function r(){var n;ck(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Vv(Gd(n),"priority",130),Vv(Gd(n),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),n}return uk(r,[{key:"parse",value:function(i,o){return Ys(o==="u"?4:o.length,i)}},{key:"set",value:function(i,o,a){return i.setUTCFullYear(a,0,1),i.setUTCHours(0,0,0,0),i}}]),r}(we);function Ua(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ua=function(r){return typeof r}:Ua=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ua(e)}function vk(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Bv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function yk(e,t,r){return t&&Bv(e.prototype,t),r&&Bv(e,r),e}function gk(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Qd(e,t)}function Qd(e,t){return Qd=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Qd(e,t)}function bk(e){var t=wk();return function(){var n=tl(e),i;if(t){var o=tl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return $k(this,i)}}function $k(e,t){return t&&(Ua(t)==="object"||typeof t=="function")?t:Kd(e)}function Kd(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function wk(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function tl(e){return tl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},tl(e)}function Wv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var _k=function(e){gk(r,e);var t=bk(r);function r(){var n;vk(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Wv(Kd(n),"priority",120),Wv(Kd(n),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),n}return yk(r,[{key:"parse",value:function(i,o,a){switch(o){case"Q":case"QQ":return He(o.length,i);case"Qo":return a.ordinalNumber(i,{unit:"quarter"});case"QQQ":return a.quarter(i,{width:"abbreviated",context:"formatting"})||a.quarter(i,{width:"narrow",context:"formatting"});case"QQQQQ":return a.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return a.quarter(i,{width:"wide",context:"formatting"})||a.quarter(i,{width:"abbreviated",context:"formatting"})||a.quarter(i,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(i,o){return o>=1&&o<=4}},{key:"set",value:function(i,o,a){return i.setUTCMonth((a-1)*3,1),i.setUTCHours(0,0,0,0),i}}]),r}(we);function Va(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Va=function(r){return typeof r}:Va=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Va(e)}function xk(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Sk(e,t,r){return t&&qv(e.prototype,t),r&&qv(e,r),e}function kk(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Yd(e,t)}function Yd(e,t){return Yd=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Yd(e,t)}function Ek(e){var t=Ck();return function(){var n=rl(e),i;if(t){var o=rl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Ok(this,i)}}function Ok(e,t){return t&&(Va(t)==="object"||typeof t=="function")?t:Xd(e)}function Xd(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ck(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function rl(e){return rl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},rl(e)}function Hv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Pk=function(e){kk(r,e);var t=Ek(r);function r(){var n;xk(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Hv(Xd(n),"priority",120),Hv(Xd(n),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),n}return Sk(r,[{key:"parse",value:function(i,o,a){switch(o){case"q":case"qq":return He(o.length,i);case"qo":return a.ordinalNumber(i,{unit:"quarter"});case"qqq":return a.quarter(i,{width:"abbreviated",context:"standalone"})||a.quarter(i,{width:"narrow",context:"standalone"});case"qqqqq":return a.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return a.quarter(i,{width:"wide",context:"standalone"})||a.quarter(i,{width:"abbreviated",context:"standalone"})||a.quarter(i,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(i,o){return o>=1&&o<=4}},{key:"set",value:function(i,o,a){return i.setUTCMonth((a-1)*3,1),i.setUTCHours(0,0,0,0),i}}]),r}(we);function Ba(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ba=function(r){return typeof r}:Ba=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ba(e)}function Tk(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Nk(e,t,r){return t&&Gv(e.prototype,t),r&&Gv(e,r),e}function Ik(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Zd(e,t)}function Zd(e,t){return Zd=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Zd(e,t)}function Ak(e){var t=Rk();return function(){var n=nl(e),i;if(t){var o=nl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Dk(this,i)}}function Dk(e,t){return t&&(Ba(t)==="object"||typeof t=="function")?t:Jd(e)}function Jd(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Rk(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function nl(e){return nl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},nl(e)}function Qv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Fk=function(e){Ik(r,e);var t=Ak(r);function r(){var n;Tk(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Qv(Jd(n),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),Qv(Jd(n),"priority",110),n}return Nk(r,[{key:"parse",value:function(i,o,a){var s=function(l){return l-1};switch(o){case"M":return Ke(je(Qe.month,i),s);case"MM":return Ke(He(2,i),s);case"Mo":return Ke(a.ordinalNumber(i,{unit:"month"}),s);case"MMM":return a.month(i,{width:"abbreviated",context:"formatting"})||a.month(i,{width:"narrow",context:"formatting"});case"MMMMM":return a.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return a.month(i,{width:"wide",context:"formatting"})||a.month(i,{width:"abbreviated",context:"formatting"})||a.month(i,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(i,o){return o>=0&&o<=11}},{key:"set",value:function(i,o,a){return i.setUTCMonth(a,1),i.setUTCHours(0,0,0,0),i}}]),r}(we);function Wa(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Wa=function(r){return typeof r}:Wa=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Wa(e)}function Lk(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Kv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Mk(e,t,r){return t&&Kv(e.prototype,t),r&&Kv(e,r),e}function jk(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ef(e,t)}function ef(e,t){return ef=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},ef(e,t)}function zk(e){var t=Vk();return function(){var n=il(e),i;if(t){var o=il(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Uk(this,i)}}function Uk(e,t){return t&&(Wa(t)==="object"||typeof t=="function")?t:tf(e)}function tf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Vk(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function il(e){return il=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},il(e)}function Yv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Bk=function(e){jk(r,e);var t=zk(r);function r(){var n;Lk(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Yv(tf(n),"priority",110),Yv(tf(n),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),n}return Mk(r,[{key:"parse",value:function(i,o,a){var s=function(l){return l-1};switch(o){case"L":return Ke(je(Qe.month,i),s);case"LL":return Ke(He(2,i),s);case"Lo":return Ke(a.ordinalNumber(i,{unit:"month"}),s);case"LLL":return a.month(i,{width:"abbreviated",context:"standalone"})||a.month(i,{width:"narrow",context:"standalone"});case"LLLLL":return a.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return a.month(i,{width:"wide",context:"standalone"})||a.month(i,{width:"abbreviated",context:"standalone"})||a.month(i,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(i,o){return o>=0&&o<=11}},{key:"set",value:function(i,o,a){return i.setUTCMonth(a,1),i.setUTCHours(0,0,0,0),i}}]),r}(we);function Wk(e,t,r){Re(2,arguments);var n=ot(e),i=Lt(t),o=N2(n,r)-i;return n.setUTCDate(n.getUTCDate()-o*7),n}function qa(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?qa=function(r){return typeof r}:qa=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},qa(e)}function qk(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Hk(e,t,r){return t&&Xv(e.prototype,t),r&&Xv(e,r),e}function Gk(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&rf(e,t)}function rf(e,t){return rf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},rf(e,t)}function Qk(e){var t=Yk();return function(){var n=ol(e),i;if(t){var o=ol(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Kk(this,i)}}function Kk(e,t){return t&&(qa(t)==="object"||typeof t=="function")?t:nf(e)}function nf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Yk(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ol(e){return ol=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},ol(e)}function Zv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Xk=function(e){Gk(r,e);var t=Qk(r);function r(){var n;qk(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Zv(nf(n),"priority",100),Zv(nf(n),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),n}return Hk(r,[{key:"parse",value:function(i,o,a){switch(o){case"w":return je(Qe.week,i);case"wo":return a.ordinalNumber(i,{unit:"week"});default:return He(o.length,i)}}},{key:"validate",value:function(i,o){return o>=1&&o<=53}},{key:"set",value:function(i,o,a,s){return jn(Wk(i,a,s),s)}}]),r}(we);function Zk(e,t){Re(2,arguments);var r=ot(e),n=Lt(t),i=T2(r)-n;return r.setUTCDate(r.getUTCDate()-i*7),r}function Ha(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ha=function(r){return typeof r}:Ha=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ha(e)}function Jk(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Jv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function eE(e,t,r){return t&&Jv(e.prototype,t),r&&Jv(e,r),e}function tE(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&of(e,t)}function of(e,t){return of=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},of(e,t)}function rE(e){var t=iE();return function(){var n=al(e),i;if(t){var o=al(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return nE(this,i)}}function nE(e,t){return t&&(Ha(t)==="object"||typeof t=="function")?t:af(e)}function af(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function iE(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function al(e){return al=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},al(e)}function ey(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var oE=function(e){tE(r,e);var t=rE(r);function r(){var n;Jk(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),ey(af(n),"priority",100),ey(af(n),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),n}return eE(r,[{key:"parse",value:function(i,o,a){switch(o){case"I":return je(Qe.week,i);case"Io":return a.ordinalNumber(i,{unit:"week"});default:return He(o.length,i)}}},{key:"validate",value:function(i,o){return o>=1&&o<=53}},{key:"set",value:function(i,o,a){return Ci(Zk(i,a))}}]),r}(we);function Ga(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ga=function(r){return typeof r}:Ga=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ga(e)}function aE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ty(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function sE(e,t,r){return t&&ty(e.prototype,t),r&&ty(e,r),e}function lE(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&sf(e,t)}function sf(e,t){return sf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},sf(e,t)}function cE(e){var t=dE();return function(){var n=sl(e),i;if(t){var o=sl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return uE(this,i)}}function uE(e,t){return t&&(Ga(t)==="object"||typeof t=="function")?t:Qa(e)}function Qa(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function dE(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function sl(e){return sl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},sl(e)}function cu(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var fE=[31,28,31,30,31,30,31,31,30,31,30,31],hE=[31,29,31,30,31,30,31,31,30,31,30,31],pE=function(e){lE(r,e);var t=cE(r);function r(){var n;aE(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),cu(Qa(n),"priority",90),cu(Qa(n),"subPriority",1),cu(Qa(n),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),n}return sE(r,[{key:"parse",value:function(i,o,a){switch(o){case"d":return je(Qe.date,i);case"do":return a.ordinalNumber(i,{unit:"date"});default:return He(o.length,i)}}},{key:"validate",value:function(i,o){var a=i.getUTCFullYear(),s=U2(a),c=i.getUTCMonth();return s?o>=1&&o<=hE[c]:o>=1&&o<=fE[c]}},{key:"set",value:function(i,o,a){return i.setUTCDate(a),i.setUTCHours(0,0,0,0),i}}]),r}(we);function Ka(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ka=function(r){return typeof r}:Ka=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ka(e)}function mE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ry(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function vE(e,t,r){return t&&ry(e.prototype,t),r&&ry(e,r),e}function yE(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&lf(e,t)}function lf(e,t){return lf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},lf(e,t)}function gE(e){var t=$E();return function(){var n=ll(e),i;if(t){var o=ll(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return bE(this,i)}}function bE(e,t){return t&&(Ka(t)==="object"||typeof t=="function")?t:Ya(e)}function Ya(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $E(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ll(e){return ll=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},ll(e)}function uu(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var wE=function(e){yE(r,e);var t=gE(r);function r(){var n;mE(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),uu(Ya(n),"priority",90),uu(Ya(n),"subpriority",1),uu(Ya(n),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),n}return vE(r,[{key:"parse",value:function(i,o,a){switch(o){case"D":case"DD":return je(Qe.dayOfYear,i);case"Do":return a.ordinalNumber(i,{unit:"date"});default:return He(o.length,i)}}},{key:"validate",value:function(i,o){var a=i.getUTCFullYear(),s=U2(a);return s?o>=1&&o<=366:o>=1&&o<=365}},{key:"set",value:function(i,o,a){return i.setUTCMonth(0,a),i.setUTCHours(0,0,0,0),i}}]),r}(we);function op(e,t,r){var n,i,o,a,s,c,l,u;Re(2,arguments);var d=Wi(),f=Lt((n=(i=(o=(a=r?.weekStartsOn)!==null&&a!==void 0?a:r==null||(s=r.locale)===null||s===void 0||(c=s.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&o!==void 0?o:d.weekStartsOn)!==null&&i!==void 0?i:(l=d.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&n!==void 0?n:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=ot(e),p=Lt(t),m=h.getUTCDay(),v=p%7,y=(v+7)%7,b=(y<f?7:0)+p-m;return h.setUTCDate(h.getUTCDate()+b),h}function Xa(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Xa=function(r){return typeof r}:Xa=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Xa(e)}function _E(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ny(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function xE(e,t,r){return t&&ny(e.prototype,t),r&&ny(e,r),e}function SE(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&cf(e,t)}function cf(e,t){return cf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},cf(e,t)}function kE(e){var t=OE();return function(){var n=cl(e),i;if(t){var o=cl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return EE(this,i)}}function EE(e,t){return t&&(Xa(t)==="object"||typeof t=="function")?t:uf(e)}function uf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function OE(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function cl(e){return cl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},cl(e)}function iy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var CE=function(e){SE(r,e);var t=kE(r);function r(){var n;_E(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),iy(uf(n),"priority",90),iy(uf(n),"incompatibleTokens",["D","i","e","c","t","T"]),n}return xE(r,[{key:"parse",value:function(i,o,a){switch(o){case"E":case"EE":case"EEE":return a.day(i,{width:"abbreviated",context:"formatting"})||a.day(i,{width:"short",context:"formatting"})||a.day(i,{width:"narrow",context:"formatting"});case"EEEEE":return a.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(i,{width:"short",context:"formatting"})||a.day(i,{width:"narrow",context:"formatting"});case"EEEE":default:return a.day(i,{width:"wide",context:"formatting"})||a.day(i,{width:"abbreviated",context:"formatting"})||a.day(i,{width:"short",context:"formatting"})||a.day(i,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(i,o){return o>=0&&o<=6}},{key:"set",value:function(i,o,a,s){return i=op(i,a,s),i.setUTCHours(0,0,0,0),i}}]),r}(we);function Za(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Za=function(r){return typeof r}:Za=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Za(e)}function PE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function TE(e,t,r){return t&&oy(e.prototype,t),r&&oy(e,r),e}function NE(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&df(e,t)}function df(e,t){return df=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},df(e,t)}function IE(e){var t=DE();return function(){var n=ul(e),i;if(t){var o=ul(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return AE(this,i)}}function AE(e,t){return t&&(Za(t)==="object"||typeof t=="function")?t:ff(e)}function ff(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function DE(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ul(e){return ul=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},ul(e)}function ay(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var RE=function(e){NE(r,e);var t=IE(r);function r(){var n;PE(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),ay(ff(n),"priority",90),ay(ff(n),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),n}return TE(r,[{key:"parse",value:function(i,o,a,s){var c=function(u){var d=Math.floor((u-1)/7)*7;return(u+s.weekStartsOn+6)%7+d};switch(o){case"e":case"ee":return Ke(He(o.length,i),c);case"eo":return Ke(a.ordinalNumber(i,{unit:"day"}),c);case"eee":return a.day(i,{width:"abbreviated",context:"formatting"})||a.day(i,{width:"short",context:"formatting"})||a.day(i,{width:"narrow",context:"formatting"});case"eeeee":return a.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(i,{width:"short",context:"formatting"})||a.day(i,{width:"narrow",context:"formatting"});case"eeee":default:return a.day(i,{width:"wide",context:"formatting"})||a.day(i,{width:"abbreviated",context:"formatting"})||a.day(i,{width:"short",context:"formatting"})||a.day(i,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(i,o){return o>=0&&o<=6}},{key:"set",value:function(i,o,a,s){return i=op(i,a,s),i.setUTCHours(0,0,0,0),i}}]),r}(we);function Ja(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ja=function(r){return typeof r}:Ja=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ja(e)}function FE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function LE(e,t,r){return t&&sy(e.prototype,t),r&&sy(e,r),e}function ME(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&hf(e,t)}function hf(e,t){return hf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},hf(e,t)}function jE(e){var t=UE();return function(){var n=dl(e),i;if(t){var o=dl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return zE(this,i)}}function zE(e,t){return t&&(Ja(t)==="object"||typeof t=="function")?t:pf(e)}function pf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function UE(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function dl(e){return dl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},dl(e)}function ly(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var VE=function(e){ME(r,e);var t=jE(r);function r(){var n;FE(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),ly(pf(n),"priority",90),ly(pf(n),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),n}return LE(r,[{key:"parse",value:function(i,o,a,s){var c=function(u){var d=Math.floor((u-1)/7)*7;return(u+s.weekStartsOn+6)%7+d};switch(o){case"c":case"cc":return Ke(He(o.length,i),c);case"co":return Ke(a.ordinalNumber(i,{unit:"day"}),c);case"ccc":return a.day(i,{width:"abbreviated",context:"standalone"})||a.day(i,{width:"short",context:"standalone"})||a.day(i,{width:"narrow",context:"standalone"});case"ccccc":return a.day(i,{width:"narrow",context:"standalone"});case"cccccc":return a.day(i,{width:"short",context:"standalone"})||a.day(i,{width:"narrow",context:"standalone"});case"cccc":default:return a.day(i,{width:"wide",context:"standalone"})||a.day(i,{width:"abbreviated",context:"standalone"})||a.day(i,{width:"short",context:"standalone"})||a.day(i,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(i,o){return o>=0&&o<=6}},{key:"set",value:function(i,o,a,s){return i=op(i,a,s),i.setUTCHours(0,0,0,0),i}}]),r}(we);function BE(e,t){Re(2,arguments);var r=Lt(t);r%7===0&&(r=r-7);var n=1,i=ot(e),o=i.getUTCDay(),a=r%7,s=(a+7)%7,c=(s<n?7:0)+r-o;return i.setUTCDate(i.getUTCDate()+c),i}function es(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?es=function(r){return typeof r}:es=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},es(e)}function WE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function qE(e,t,r){return t&&cy(e.prototype,t),r&&cy(e,r),e}function HE(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&mf(e,t)}function mf(e,t){return mf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},mf(e,t)}function GE(e){var t=KE();return function(){var n=fl(e),i;if(t){var o=fl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return QE(this,i)}}function QE(e,t){return t&&(es(t)==="object"||typeof t=="function")?t:vf(e)}function vf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function KE(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function fl(e){return fl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},fl(e)}function uy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var YE=function(e){HE(r,e);var t=GE(r);function r(){var n;WE(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),uy(vf(n),"priority",90),uy(vf(n),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),n}return qE(r,[{key:"parse",value:function(i,o,a){var s=function(l){return l===0?7:l};switch(o){case"i":case"ii":return He(o.length,i);case"io":return a.ordinalNumber(i,{unit:"day"});case"iii":return Ke(a.day(i,{width:"abbreviated",context:"formatting"})||a.day(i,{width:"short",context:"formatting"})||a.day(i,{width:"narrow",context:"formatting"}),s);case"iiiii":return Ke(a.day(i,{width:"narrow",context:"formatting"}),s);case"iiiiii":return Ke(a.day(i,{width:"short",context:"formatting"})||a.day(i,{width:"narrow",context:"formatting"}),s);case"iiii":default:return Ke(a.day(i,{width:"wide",context:"formatting"})||a.day(i,{width:"abbreviated",context:"formatting"})||a.day(i,{width:"short",context:"formatting"})||a.day(i,{width:"narrow",context:"formatting"}),s)}}},{key:"validate",value:function(i,o){return o>=1&&o<=7}},{key:"set",value:function(i,o,a){return i=BE(i,a),i.setUTCHours(0,0,0,0),i}}]),r}(we);function ts(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ts=function(r){return typeof r}:ts=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ts(e)}function XE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ZE(e,t,r){return t&&dy(e.prototype,t),r&&dy(e,r),e}function JE(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&yf(e,t)}function yf(e,t){return yf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},yf(e,t)}function eO(e){var t=rO();return function(){var n=hl(e),i;if(t){var o=hl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return tO(this,i)}}function tO(e,t){return t&&(ts(t)==="object"||typeof t=="function")?t:gf(e)}function gf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rO(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function hl(e){return hl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},hl(e)}function fy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var nO=function(e){JE(r,e);var t=eO(r);function r(){var n;XE(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),fy(gf(n),"priority",80),fy(gf(n),"incompatibleTokens",["b","B","H","k","t","T"]),n}return ZE(r,[{key:"parse",value:function(i,o,a){switch(o){case"a":case"aa":case"aaa":return a.dayPeriod(i,{width:"abbreviated",context:"formatting"})||a.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaaa":return a.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return a.dayPeriod(i,{width:"wide",context:"formatting"})||a.dayPeriod(i,{width:"abbreviated",context:"formatting"})||a.dayPeriod(i,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(i,o,a){return i.setUTCHours(ip(a),0,0,0),i}}]),r}(we);function rs(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?rs=function(r){return typeof r}:rs=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},rs(e)}function iO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function oO(e,t,r){return t&&hy(e.prototype,t),r&&hy(e,r),e}function aO(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&bf(e,t)}function bf(e,t){return bf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},bf(e,t)}function sO(e){var t=cO();return function(){var n=pl(e),i;if(t){var o=pl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return lO(this,i)}}function lO(e,t){return t&&(rs(t)==="object"||typeof t=="function")?t:$f(e)}function $f(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cO(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function pl(e){return pl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},pl(e)}function py(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var uO=function(e){aO(r,e);var t=sO(r);function r(){var n;iO(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),py($f(n),"priority",80),py($f(n),"incompatibleTokens",["a","B","H","k","t","T"]),n}return oO(r,[{key:"parse",value:function(i,o,a){switch(o){case"b":case"bb":case"bbb":return a.dayPeriod(i,{width:"abbreviated",context:"formatting"})||a.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbbb":return a.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return a.dayPeriod(i,{width:"wide",context:"formatting"})||a.dayPeriod(i,{width:"abbreviated",context:"formatting"})||a.dayPeriod(i,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(i,o,a){return i.setUTCHours(ip(a),0,0,0),i}}]),r}(we);function ns(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ns=function(r){return typeof r}:ns=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ns(e)}function dO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function my(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function fO(e,t,r){return t&&my(e.prototype,t),r&&my(e,r),e}function hO(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&wf(e,t)}function wf(e,t){return wf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},wf(e,t)}function pO(e){var t=vO();return function(){var n=ml(e),i;if(t){var o=ml(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return mO(this,i)}}function mO(e,t){return t&&(ns(t)==="object"||typeof t=="function")?t:_f(e)}function _f(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vO(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ml(e){return ml=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},ml(e)}function vy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var yO=function(e){hO(r,e);var t=pO(r);function r(){var n;dO(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),vy(_f(n),"priority",80),vy(_f(n),"incompatibleTokens",["a","b","t","T"]),n}return fO(r,[{key:"parse",value:function(i,o,a){switch(o){case"B":case"BB":case"BBB":return a.dayPeriod(i,{width:"abbreviated",context:"formatting"})||a.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBBB":return a.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return a.dayPeriod(i,{width:"wide",context:"formatting"})||a.dayPeriod(i,{width:"abbreviated",context:"formatting"})||a.dayPeriod(i,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(i,o,a){return i.setUTCHours(ip(a),0,0,0),i}}]),r}(we);function is(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?is=function(r){return typeof r}:is=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},is(e)}function gO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function bO(e,t,r){return t&&yy(e.prototype,t),r&&yy(e,r),e}function $O(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&xf(e,t)}function xf(e,t){return xf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},xf(e,t)}function wO(e){var t=xO();return function(){var n=vl(e),i;if(t){var o=vl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return _O(this,i)}}function _O(e,t){return t&&(is(t)==="object"||typeof t=="function")?t:Sf(e)}function Sf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xO(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function vl(e){return vl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},vl(e)}function gy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var SO=function(e){$O(r,e);var t=wO(r);function r(){var n;gO(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),gy(Sf(n),"priority",70),gy(Sf(n),"incompatibleTokens",["H","K","k","t","T"]),n}return bO(r,[{key:"parse",value:function(i,o,a){switch(o){case"h":return je(Qe.hour12h,i);case"ho":return a.ordinalNumber(i,{unit:"hour"});default:return He(o.length,i)}}},{key:"validate",value:function(i,o){return o>=1&&o<=12}},{key:"set",value:function(i,o,a){var s=i.getUTCHours()>=12;return s&&a<12?i.setUTCHours(a+12,0,0,0):!s&&a===12?i.setUTCHours(0,0,0,0):i.setUTCHours(a,0,0,0),i}}]),r}(we);function os(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?os=function(r){return typeof r}:os=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},os(e)}function kO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function by(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function EO(e,t,r){return t&&by(e.prototype,t),r&&by(e,r),e}function OO(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&kf(e,t)}function kf(e,t){return kf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},kf(e,t)}function CO(e){var t=TO();return function(){var n=yl(e),i;if(t){var o=yl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return PO(this,i)}}function PO(e,t){return t&&(os(t)==="object"||typeof t=="function")?t:Ef(e)}function Ef(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function TO(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function yl(e){return yl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},yl(e)}function $y(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var NO=function(e){OO(r,e);var t=CO(r);function r(){var n;kO(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),$y(Ef(n),"priority",70),$y(Ef(n),"incompatibleTokens",["a","b","h","K","k","t","T"]),n}return EO(r,[{key:"parse",value:function(i,o,a){switch(o){case"H":return je(Qe.hour23h,i);case"Ho":return a.ordinalNumber(i,{unit:"hour"});default:return He(o.length,i)}}},{key:"validate",value:function(i,o){return o>=0&&o<=23}},{key:"set",value:function(i,o,a){return i.setUTCHours(a,0,0,0),i}}]),r}(we);function as(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?as=function(r){return typeof r}:as=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},as(e)}function IO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function AO(e,t,r){return t&&wy(e.prototype,t),r&&wy(e,r),e}function DO(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Of(e,t)}function Of(e,t){return Of=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Of(e,t)}function RO(e){var t=LO();return function(){var n=gl(e),i;if(t){var o=gl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return FO(this,i)}}function FO(e,t){return t&&(as(t)==="object"||typeof t=="function")?t:Cf(e)}function Cf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function LO(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function gl(e){return gl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},gl(e)}function _y(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var MO=function(e){DO(r,e);var t=RO(r);function r(){var n;IO(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),_y(Cf(n),"priority",70),_y(Cf(n),"incompatibleTokens",["h","H","k","t","T"]),n}return AO(r,[{key:"parse",value:function(i,o,a){switch(o){case"K":return je(Qe.hour11h,i);case"Ko":return a.ordinalNumber(i,{unit:"hour"});default:return He(o.length,i)}}},{key:"validate",value:function(i,o){return o>=0&&o<=11}},{key:"set",value:function(i,o,a){var s=i.getUTCHours()>=12;return s&&a<12?i.setUTCHours(a+12,0,0,0):i.setUTCHours(a,0,0,0),i}}]),r}(we);function ss(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ss=function(r){return typeof r}:ss=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ss(e)}function jO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function zO(e,t,r){return t&&xy(e.prototype,t),r&&xy(e,r),e}function UO(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Pf(e,t)}function Pf(e,t){return Pf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Pf(e,t)}function VO(e){var t=WO();return function(){var n=bl(e),i;if(t){var o=bl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return BO(this,i)}}function BO(e,t){return t&&(ss(t)==="object"||typeof t=="function")?t:Tf(e)}function Tf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function WO(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function bl(e){return bl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},bl(e)}function Sy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var qO=function(e){UO(r,e);var t=VO(r);function r(){var n;jO(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Sy(Tf(n),"priority",70),Sy(Tf(n),"incompatibleTokens",["a","b","h","H","K","t","T"]),n}return zO(r,[{key:"parse",value:function(i,o,a){switch(o){case"k":return je(Qe.hour24h,i);case"ko":return a.ordinalNumber(i,{unit:"hour"});default:return He(o.length,i)}}},{key:"validate",value:function(i,o){return o>=1&&o<=24}},{key:"set",value:function(i,o,a){var s=a<=24?a%24:a;return i.setUTCHours(s,0,0,0),i}}]),r}(we);function ls(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ls=function(r){return typeof r}:ls=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ls(e)}function HO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ky(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function GO(e,t,r){return t&&ky(e.prototype,t),r&&ky(e,r),e}function QO(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Nf(e,t)}function Nf(e,t){return Nf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Nf(e,t)}function KO(e){var t=XO();return function(){var n=$l(e),i;if(t){var o=$l(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return YO(this,i)}}function YO(e,t){return t&&(ls(t)==="object"||typeof t=="function")?t:If(e)}function If(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function XO(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function $l(e){return $l=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},$l(e)}function Ey(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var ZO=function(e){QO(r,e);var t=KO(r);function r(){var n;HO(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Ey(If(n),"priority",60),Ey(If(n),"incompatibleTokens",["t","T"]),n}return GO(r,[{key:"parse",value:function(i,o,a){switch(o){case"m":return je(Qe.minute,i);case"mo":return a.ordinalNumber(i,{unit:"minute"});default:return He(o.length,i)}}},{key:"validate",value:function(i,o){return o>=0&&o<=59}},{key:"set",value:function(i,o,a){return i.setUTCMinutes(a,0,0),i}}]),r}(we);function cs(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?cs=function(r){return typeof r}:cs=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},cs(e)}function JO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Oy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function eC(e,t,r){return t&&Oy(e.prototype,t),r&&Oy(e,r),e}function tC(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Af(e,t)}function Af(e,t){return Af=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Af(e,t)}function rC(e){var t=iC();return function(){var n=wl(e),i;if(t){var o=wl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return nC(this,i)}}function nC(e,t){return t&&(cs(t)==="object"||typeof t=="function")?t:Df(e)}function Df(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function iC(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function wl(e){return wl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},wl(e)}function Cy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var oC=function(e){tC(r,e);var t=rC(r);function r(){var n;JO(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Cy(Df(n),"priority",50),Cy(Df(n),"incompatibleTokens",["t","T"]),n}return eC(r,[{key:"parse",value:function(i,o,a){switch(o){case"s":return je(Qe.second,i);case"so":return a.ordinalNumber(i,{unit:"second"});default:return He(o.length,i)}}},{key:"validate",value:function(i,o){return o>=0&&o<=59}},{key:"set",value:function(i,o,a){return i.setUTCSeconds(a,0),i}}]),r}(we);function us(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?us=function(r){return typeof r}:us=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},us(e)}function aC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Py(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function sC(e,t,r){return t&&Py(e.prototype,t),r&&Py(e,r),e}function lC(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Rf(e,t)}function Rf(e,t){return Rf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Rf(e,t)}function cC(e){var t=dC();return function(){var n=_l(e),i;if(t){var o=_l(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return uC(this,i)}}function uC(e,t){return t&&(us(t)==="object"||typeof t=="function")?t:Ff(e)}function Ff(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function dC(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _l(e){return _l=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},_l(e)}function Ty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var fC=function(e){lC(r,e);var t=cC(r);function r(){var n;aC(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Ty(Ff(n),"priority",30),Ty(Ff(n),"incompatibleTokens",["t","T"]),n}return sC(r,[{key:"parse",value:function(i,o){var a=function(c){return Math.floor(c*Math.pow(10,-o.length+3))};return Ke(He(o.length,i),a)}},{key:"set",value:function(i,o,a){return i.setUTCMilliseconds(a),i}}]),r}(we);function ds(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ds=function(r){return typeof r}:ds=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ds(e)}function hC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ny(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function pC(e,t,r){return t&&Ny(e.prototype,t),r&&Ny(e,r),e}function mC(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Lf(e,t)}function Lf(e,t){return Lf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Lf(e,t)}function vC(e){var t=gC();return function(){var n=xl(e),i;if(t){var o=xl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return yC(this,i)}}function yC(e,t){return t&&(ds(t)==="object"||typeof t=="function")?t:Mf(e)}function Mf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function gC(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function xl(e){return xl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},xl(e)}function Iy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var bC=function(e){mC(r,e);var t=vC(r);function r(){var n;hC(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Iy(Mf(n),"priority",10),Iy(Mf(n),"incompatibleTokens",["t","T","x"]),n}return pC(r,[{key:"parse",value:function(i,o){switch(o){case"X":return mr(pr.basicOptionalMinutes,i);case"XX":return mr(pr.basic,i);case"XXXX":return mr(pr.basicOptionalSeconds,i);case"XXXXX":return mr(pr.extendedOptionalSeconds,i);case"XXX":default:return mr(pr.extended,i)}}},{key:"set",value:function(i,o,a){return o.timestampIsSet?i:new Date(i.getTime()-a)}}]),r}(we);function fs(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?fs=function(r){return typeof r}:fs=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},fs(e)}function $C(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ay(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function wC(e,t,r){return t&&Ay(e.prototype,t),r&&Ay(e,r),e}function _C(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&jf(e,t)}function jf(e,t){return jf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},jf(e,t)}function xC(e){var t=kC();return function(){var n=Sl(e),i;if(t){var o=Sl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return SC(this,i)}}function SC(e,t){return t&&(fs(t)==="object"||typeof t=="function")?t:zf(e)}function zf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function kC(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Sl(e){return Sl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Sl(e)}function Dy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var EC=function(e){_C(r,e);var t=xC(r);function r(){var n;$C(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Dy(zf(n),"priority",10),Dy(zf(n),"incompatibleTokens",["t","T","X"]),n}return wC(r,[{key:"parse",value:function(i,o){switch(o){case"x":return mr(pr.basicOptionalMinutes,i);case"xx":return mr(pr.basic,i);case"xxxx":return mr(pr.basicOptionalSeconds,i);case"xxxxx":return mr(pr.extendedOptionalSeconds,i);case"xxx":default:return mr(pr.extended,i)}}},{key:"set",value:function(i,o,a){return o.timestampIsSet?i:new Date(i.getTime()-a)}}]),r}(we);function hs(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?hs=function(r){return typeof r}:hs=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},hs(e)}function OC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ry(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function CC(e,t,r){return t&&Ry(e.prototype,t),r&&Ry(e,r),e}function PC(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Uf(e,t)}function Uf(e,t){return Uf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Uf(e,t)}function TC(e){var t=IC();return function(){var n=kl(e),i;if(t){var o=kl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return NC(this,i)}}function NC(e,t){return t&&(hs(t)==="object"||typeof t=="function")?t:Vf(e)}function Vf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function IC(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function kl(e){return kl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},kl(e)}function Fy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var AC=function(e){PC(r,e);var t=TC(r);function r(){var n;OC(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Fy(Vf(n),"priority",40),Fy(Vf(n),"incompatibleTokens","*"),n}return CC(r,[{key:"parse",value:function(i){return j2(i)}},{key:"set",value:function(i,o,a){return[new Date(a*1e3),{timestampIsSet:!0}]}}]),r}(we);function ps(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ps=function(r){return typeof r}:ps=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ps(e)}function DC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ly(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function RC(e,t,r){return t&&Ly(e.prototype,t),r&&Ly(e,r),e}function FC(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Bf(e,t)}function Bf(e,t){return Bf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Bf(e,t)}function LC(e){var t=jC();return function(){var n=El(e),i;if(t){var o=El(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return MC(this,i)}}function MC(e,t){return t&&(ps(t)==="object"||typeof t=="function")?t:Wf(e)}function Wf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function jC(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function El(e){return El=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},El(e)}function My(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var zC=function(e){FC(r,e);var t=LC(r);function r(){var n;DC(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),My(Wf(n),"priority",20),My(Wf(n),"incompatibleTokens","*"),n}return RC(r,[{key:"parse",value:function(i){return j2(i)}},{key:"set",value:function(i,o,a){return[new Date(a),{timestampIsSet:!0}]}}]),r}(we),UC={G:new US,y:new QS,Y:new tk,R:new lk,u:new mk,Q:new _k,q:new Pk,M:new Fk,L:new Bk,w:new Xk,I:new oE,d:new pE,D:new wE,E:new CE,e:new RE,c:new VE,i:new YE,a:new nO,b:new uO,B:new yO,h:new SO,H:new NO,K:new MO,k:new qO,m:new ZO,s:new oC,S:new fC,X:new bC,x:new EC,t:new AC,T:new zC};function ms(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ms=function(r){return typeof r}:ms=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ms(e)}function jy(e,t){var r;if(typeof Symbol>"u"||e[Symbol.iterator]==null){if(Array.isArray(e)||(r=VC(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
2261
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,a=!1,s;return{s:function(){r=e[Symbol.iterator]()},n:function(){var l=r.next();return o=l.done,l},e:function(l){a=!0,s=l},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(a)throw s}}}}function VC(e,t){if(!!e){if(typeof e=="string")return zy(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return zy(e,t)}}function zy(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var BC=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,WC=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,qC=/^'([^]*?)'?$/,HC=/''/g,GC=/\S/,QC=/[a-zA-Z]/;function KC(e,t,r,n){var i,o,a,s,c,l,u,d,f,h,p,m,v,y,b,g,_,k;Re(3,arguments);var E=String(e),x=String(t),T=Wi(),j=(i=(o=n?.locale)!==null&&o!==void 0?o:T.locale)!==null&&i!==void 0?i:R2;if(!j.match)throw new RangeError("locale must contain match property");var z=Lt((a=(s=(c=(l=n?.firstWeekContainsDate)!==null&&l!==void 0?l:n==null||(u=n.locale)===null||u===void 0||(d=u.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&c!==void 0?c:T.firstWeekContainsDate)!==null&&s!==void 0?s:(f=T.locale)===null||f===void 0||(h=f.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&a!==void 0?a:1);if(!(z>=1&&z<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var K=Lt((p=(m=(v=(y=n?.weekStartsOn)!==null&&y!==void 0?y:n==null||(b=n.locale)===null||b===void 0||(g=b.options)===null||g===void 0?void 0:g.weekStartsOn)!==null&&v!==void 0?v:T.weekStartsOn)!==null&&m!==void 0?m:(_=T.locale)===null||_===void 0||(k=_.options)===null||k===void 0?void 0:k.weekStartsOn)!==null&&p!==void 0?p:0);if(!(K>=0&&K<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(x==="")return E===""?ot(r):new Date(NaN);var D={firstWeekContainsDate:z,weekStartsOn:K,locale:j},L=[new IS],R=x.match(WC).map(function(Y){var X=Y[0];if(X in Dd){var ie=Dd[X];return ie(Y,j.formatLong)}return Y}).join("").match(BC),F=[],q=jy(R),re;try{var ae=function(){var X=re.value;!(n!=null&&n.useAdditionalWeekYearTokens)&&D2(X)&&Gs(X,x,e),!(n!=null&&n.useAdditionalDayOfYearTokens)&&A2(X)&&Gs(X,x,e);var ie=X[0],ue=UC[ie];if(ue){var de=ue.incompatibleTokens;if(Array.isArray(de)){var Ue=F.find(function(st){return de.includes(st.token)||st.token===ie});if(Ue)throw new RangeError("The format string mustn't contain `".concat(Ue.fullToken,"` and `").concat(X,"` at the same time"))}else if(ue.incompatibleTokens==="*"&&F.length>0)throw new RangeError("The format string mustn't contain `".concat(X,"` and any other token at the same time"));F.push({token:ie,fullToken:X});var Me=ue.run(E,X,j.match,D);if(!Me)return{v:new Date(NaN)};L.push(Me.setter),E=Me.rest}else{if(ie.match(QC))throw new RangeError("Format string contains an unescaped latin alphabet character `"+ie+"`");if(X==="''"?X="'":ie==="'"&&(X=YC(X)),E.indexOf(X)===0)E=E.slice(X.length);else return{v:new Date(NaN)}}};for(q.s();!(re=q.n()).done;){var A=ae();if(ms(A)==="object")return A.v}}catch(Y){q.e(Y)}finally{q.f()}if(E.length>0&&GC.test(E))return new Date(NaN);var me=L.map(function(Y){return Y.priority}).sort(function(Y,X){return X-Y}).filter(function(Y,X,ie){return ie.indexOf(Y)===X}).map(function(Y){return L.filter(function(X){return X.priority===Y}).sort(function(X,ie){return ie.subPriority-X.subPriority})}).map(function(Y){return Y[0]}),_e=ot(r);if(isNaN(_e.getTime()))return new Date(NaN);var I=C2(_e,E2(_e)),xt={},St=jy(me),Mt;try{for(St.s();!(Mt=St.n()).done;){var It=Mt.value;if(!It.validate(I,D))return new Date(NaN);var G=It.set(I,xt,D);Array.isArray(G)?(I=G[0],OS(xt,G[1])):I=G}}catch(Y){St.e(Y)}finally{St.f()}return I}function YC(e){return e.match(qC)[1].replace(HC,"'")}function XC(e){return Re(1,arguments),y7(e,Date.now())}const nt=(e,t)=>Vi("message",r=>S2(r,e)?!0:t),ZC=(e,t=r=>KC(r,"yyyy-MM-dd",new Date))=>Vi("between",function(n){return x7(t(n),e)>=0||XC(t(n))}),JC=()=>Ko(jt(),"numericString",e=>e.length===0?!0:/^\d+$/.test(e)),eP=()=>Ko(jt(),"email",e=>e.length===0?!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)),Uy=()=>Ko(Bi(),"empty",e=>e===null||e==null);var tP=ft`
2266
2262
  ${wt}
2267
2263
 
2268
2264
  :host {
@@ -2876,7 +2872,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
2876
2872
  ${this.caret?Ia` <sl-icon part="caret" class="button__caret" library="system" name="caret"></sl-icon> `:""}
2877
2873
  ${this.loading?Ia`<sl-spinner></sl-spinner>`:""}
2878
2874
  </${t}>
2879
- `}};Ce.styles=tP;$([Xe(".button")],Ce.prototype,"button",2);$([Er()],Ce.prototype,"hasFocus",2);$([Er()],Ce.prototype,"invalid",2);$([k()],Ce.prototype,"title",2);$([k({reflect:!0})],Ce.prototype,"variant",2);$([k({reflect:!0})],Ce.prototype,"size",2);$([k({type:Boolean,reflect:!0})],Ce.prototype,"caret",2);$([k({type:Boolean,reflect:!0})],Ce.prototype,"disabled",2);$([k({type:Boolean,reflect:!0})],Ce.prototype,"loading",2);$([k({type:Boolean,reflect:!0})],Ce.prototype,"outline",2);$([k({type:Boolean,reflect:!0})],Ce.prototype,"pill",2);$([k({type:Boolean,reflect:!0})],Ce.prototype,"circle",2);$([k()],Ce.prototype,"type",2);$([k()],Ce.prototype,"name",2);$([k()],Ce.prototype,"value",2);$([k()],Ce.prototype,"href",2);$([k()],Ce.prototype,"target",2);$([k()],Ce.prototype,"download",2);$([k()],Ce.prototype,"form",2);$([k({attribute:"formaction"})],Ce.prototype,"formAction",2);$([k({attribute:"formenctype"})],Ce.prototype,"formEnctype",2);$([k({attribute:"formmethod"})],Ce.prototype,"formMethod",2);$([k({attribute:"formnovalidate",type:Boolean})],Ce.prototype,"formNoValidate",2);$([k({attribute:"formtarget"})],Ce.prototype,"formTarget",2);$([De("disabled",{waitUntilFirstUpdate:!0})],Ce.prototype,"handleDisabledChange",1);Ce=$([_t("sl-button")],Ce);const rP=C('<photon-checkbox label="Add To Templates" form-name="daw"></photon-checkbox>'),nP=C('<photon-card title="Add Prescription"><div class="flex flex-col gap-3"><photon-treatment-select label="Search Treatment Catalog"></photon-treatment-select><div class="flex flex-col-reverse xs:flex-row xs:items-center gap-2"><photon-checkbox label="Dispense as written" tip="This prescription will be filled generically unless this box is checked" form-name="daw" class="flex-grow"></photon-checkbox><photon-med-search-dialog></photon-med-search-dialog><a class="font-sans text-gray-500 text-sm hover:text-black hover:cursor-pointer pt-1">Advanced Search \u2192</a></div><div class="sm:max-w-[50%] sm:pr-2"><photon-datepicker label="Effective Date" required="true"></photon-datepicker></div><div class="flex flex-col sm:flex-wrap sm:flex-row sm:items-start sm:gap-x-4"><div class="flex flex-col flex-1 flex-shrink md:max-w-[50%]"><photon-number-input class="flex-grow flex-1" label="Quantity" required="true" min="1"></photon-number-input><photon-dosage-calculator-dialog></photon-dosage-calculator-dialog><photon-button variant="outline" class="w-fit"><sl-icon slot="suffix" name="calculator"></sl-icon>Dose Calculator</photon-button></div><photon-dispense-units class="flex-grow flex-shrink md:max-w-[50%] flex-1" label="Dispense Unit" required="true" force-label-size="true"></photon-dispense-units></div><div class="flex flex-col sm:flex-wrap sm:flex-row sm:items-center sm:gap-x-4"><photon-number-input class="flex-grow flex-shrink md:max-w-[50%] flex-1" label="Days Supply" required="true" min="0"></photon-number-input><photon-number-input class="flex-grow flex-shrink md:max-w-[50%] flex-1" label="Refills" required="true" min="0"></photon-number-input></div><photon-textarea label="Patient Instructions (SIG)" form-name="patient_instructions" required="true" placeholder="Enter patient instructions"></photon-textarea><photon-textarea label="Pharmacy Note" placeholder="Enter pharmacy note"></photon-textarea><div class="flex flex-col xs:flex-row gap-2"><div class="flex flex-grow justify-end"><photon-button class="w-full xs:w-fit">Add Prescription</photon-button></div></div></div></photon-card>');it("https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.0.0-beta.82/dist/");const iP={treatment:nt(nc(jt(),Bi()),"Please select a treatment..."),dispenseQuantity:nt(au(ou(),1),"Quantity must be positive"),daysSupply:nt(au(ou(),0),"Days Supply must be at least 0"),refillsInput:nt(au(ou(),0),"Refills must be at least 0"),instructions:nt(Nr(jt(),1,1/0),"Please enter instructions for the patient..."),effectiveDate:nt(ZC(new Date),"Please choose a date that isn't in the past")},oP=e=>{let t,r;const[n,i]=L(void 0),[o,a]=L(void 0);let s;for(const[c,l]of Object.entries(iP))e.actions.registerValidator({key:c,validator:l});return(()=>{const c=V(()=>document.importNode(nP,!0)),l=c.firstChild,u=l.firstChild,d=u.nextSibling,f=d.firstChild,h=f.nextSibling,p=h.nextSibling,m=d.nextSibling,v=m.firstChild,y=m.nextSibling,b=y.firstChild,g=b.firstChild,_=g.nextSibling,S=_.nextSibling,E=S.firstChild,x=b.nextSibling,N=y.nextSibling,M=N.firstChild,j=M.nextSibling,q=N.nextSibling,A=q.nextSibling,T=A.nextSibling,F=T.firstChild,z=F.firstChild,Y=s;typeof Y=="function"?ee(Y,c):s=c,c._$owner=P(),l.addEventListener("photon-medication-selected",R=>{i(R.detail.medication),e.actions.updateFormValue({key:"treatment",value:R.detail.medication})}),u.addEventListener("photon-treatment-selected",R=>{R.detail.data.__typename==="PrescriptionTemplate"?(e.actions.updateFormValue({key:"treatment",value:R.detail.data.treatment}),R.detail.data.dispenseAsWritten&&e.actions.updateFormValue({key:"dispenseAsWritten",value:R.detail.data.dispenseAsWritten}),R.detail.data.dispenseQuantity&&e.actions.updateFormValue({key:"dispenseQuantity",value:Number(R.detail.data.dispenseQuantity)}),R.detail.data.dispenseUnit&&e.actions.updateFormValue({key:"dispenseUnit",value:R.detail.data.dispenseUnit}),R.detail.data.daysSupply&&e.actions.updateFormValue({key:"daysSupply",value:Number(R.detail.data.daysSupply)}),R.detail.data.fillsAllowed&&e.actions.updateFormValue({key:"refillsInput",value:Number(R.detail.data.fillsAllowed)-1}),R.detail.data.instructions&&e.actions.updateFormValue({key:"instructions",value:R.detail.data.instructions}),R.detail.data.notes&&e.actions.updateFormValue({key:"notes",value:R.detail.data.notes})):e.actions.updateFormValue({key:"treatment",value:R.detail.data}),e.actions.updateFormValue({key:"catalogId",value:R.detail.catalogId})}),u._$owner=P(),f.addEventListener("photon-checkbox-toggled",R=>e.actions.updateFormValue({key:"dispenseAsWritten",value:R.detail.checked})),f._$owner=P();const ne=t;typeof ne=="function"?ee(ne,h):t=h,h._$owner=P(),p.$$click=()=>t.open=!0,v.addEventListener("photon-datepicker-selected",R=>e.actions.updateFormValue({key:"effectiveDate",value:R.detail.date})),v._$owner=P(),g.addEventListener("photon-input-changed",R=>{e.actions.updateFormValue({key:"dispenseQuantity",value:Number(R.detail.input)})}),g._$owner=P();const ae=r;return typeof ae=="function"?ee(ae,_):r=_,_.addEventListener("photon-dose-selected",R=>{e.actions.updateFormValue({key:"dispenseQuantity",value:Number(R.detail.value)}),R.detail.unit==="mL"&&e.actions.updateFormValue({key:"dispenseUnit",value:"Milliliter"})}),_._$owner=P(),S.addEventListener("photon-clicked",()=>{r.open=!0}),S._$owner=P(),E._$owner=P(),x.addEventListener("photon-dispense-unit-selected",R=>e.actions.updateFormValue({key:"dispenseUnit",value:R.detail.dispenseUnit.name})),x._$owner=P(),M.addEventListener("photon-input-changed",R=>{e.actions.updateFormValue({key:"daysSupply",value:Number(R.detail.input)})}),M._$owner=P(),j.addEventListener("photon-input-changed",R=>e.actions.updateFormValue({key:"refillsInput",value:Number(R.detail.input)})),j._$owner=P(),q.addEventListener("photon-textarea-changed",R=>e.actions.updateFormValue({key:"instructions",value:R.detail.value})),q._$owner=P(),A.addEventListener("photon-textarea-changed",R=>e.actions.updateFormValue({key:"notes",value:R.detail.value})),A._$owner=P(),w(T,U(re,{get when(){return!e.hideAddToTemplates},get children(){const R=V(()=>document.importNode(rP,!0));return R.addEventListener("photon-checkbox-toggled",ge=>e.actions.updateFormValue({key:"addToTemplates",value:ge.detail.checked})),R._$owner=P(),W(()=>R.checked=e.store.addToTemplates?.value||!1),R}}),F),z.addEventListener("photon-clicked",()=>{const R=["treatment","effectiveDate","dispenseQuantity","daysSupply","refillsInput","instructions"];e.actions.validate(R),e.actions.hasErrors(R)||(e.actions.updateFormValue({key:"draftPrescriptions",value:[...e.store.draftPrescriptions?.value||[],{id:String(Math.random()),effectiveDate:e.store.effectiveDate.value,treatment:e.store.treatment.value,dispenseAsWritten:e.store.dispenseAsWritten.value,dispenseQuantity:e.store.dispenseQuantity.value,dispenseUnit:e.store.dispenseUnit.value,daysSupply:e.store.daysSupply.value,refillsInput:e.store.refillsInput.value,instructions:e.store.instructions.value,notes:e.store.notes.value,fillsAllowed:e.store.refillsInput.value+1,addToTemplates:e.store.addToTemplates?.value??!1,catalogId:e.store.catalogId.value??void 0}]}),e.actions.updateFormValue({key:"effectiveDate",value:ic(new Date,"yyyy-MM-dd").toString()}),e.actions.clearKeys(["treatment","dispenseAsWritten","dispenseQuantity","dispenseUnit","daysSupply","refillsInput","instructions","notes"]),i(void 0),e.actions.updateFormValue({key:"treatment",value:void 0}),e.actions.updateFormValue({key:"refillsInput",value:0}),e.actions.updateFormValue({key:"dispenseAsWritten",value:!1}),e.actions.updateFormValue({key:"dispenseQuantity",value:1}),e.actions.updateFormValue({key:"daysSupply",value:30}),e.actions.updateFormValue({key:"instructions",value:""}),e.actions.updateFormValue({key:"notes",value:""}))}),z._$owner=P(),W(R=>{const ge=e.store.treatment?.value??void 0,_e=e.store.treatment?.error??!1,D=e.store.treatment?.error,xt=n(),St=e.store.effectiveDate?.error??!1,Mt=e.store.effectiveDate?.error,It=e.store.dispenseQuantity?.error??!1,G=e.store.dispenseQuantity?.error,K=e.store.treatment?.value??void 0,X=e.store.dispenseUnit?.value??o()?.name,ie=e.store.daysSupply?.error??!1,ue=e.store.daysSupply?.error,de=e.store.refillsInput?.error??!1,Ue=e.store.refillsInput?.error,Me=e.store.instructions?.error??!1,st=e.store.instructions?.error;return ge!==R._v$&&(u.selected=R._v$=ge),_e!==R._v$2&&(u.invalid=R._v$2=_e),D!==R._v$3&&(u.helpText=R._v$3=D),xt!==R._v$4&&(u.offCatalogOption=R._v$4=xt),St!==R._v$5&&(v.invalid=R._v$5=St),Mt!==R._v$6&&(v.helpText=R._v$6=Mt),It!==R._v$7&&(g.invalid=R._v$7=It),G!==R._v$8&&(g.helpText=R._v$8=G),K!==R._v$9&&(_.medication=R._v$9=K),X!==R._v$10&&(x.selected=R._v$10=X),ie!==R._v$11&&(M.invalid=R._v$11=ie),ue!==R._v$12&&(M.helpText=R._v$12=ue),de!==R._v$13&&(j.invalid=R._v$13=de),Ue!==R._v$14&&(j.helpText=R._v$14=Ue),Me!==R._v$15&&(q.invalid=R._v$15=Me),st!==R._v$16&&(q.helpText=R._v$16=st),R},{_v$:void 0,_v$2:void 0,_v$3:void 0,_v$4:void 0,_v$5:void 0,_v$6:void 0,_v$7:void 0,_v$8:void 0,_v$9:void 0,_v$10:void 0,_v$11:void 0,_v$12:void 0,_v$13:void 0,_v$14:void 0,_v$15:void 0,_v$16:void 0}),W(()=>f.checked=e.store.dispenseAsWritten?.value||!1),W(()=>g.value=e.store.dispenseQuantity?.value??1),W(()=>M.value=e.store.daysSupply?.value??30),W(()=>j.value=e.store.refillsInput?.value??0),W(()=>q.value=e.store.instructions?.value),W(()=>A.value=e.store.notes?.value),c})()};Ni(["click"]);const aP=C("<photon-patient-dialog></photon-patient-dialog>"),sP=C('<p class="font-sans text-sm font-medium">Patient Address</p>'),lP=C('<div class="flex flex-col font-sans text-gray-700"><p></p><div class="flex flex-row gap-1"><div class="flex flex-row"><p>,</p><p></p></div><p></p></div></div>'),cP=C('<p class="italic font-sans text-gray-500">Please edit patient and add address</p>'),uP=C('<p class="font-sans text-red-500 text-sm"></p>'),dP=C('<photon-button class="self-end" variant="outline">Edit Patient</photon-button>'),fP=C('<photon-card><div class="flex flex-col gap-3"><p class="font-sans text-l font-medium">Select Patient</p><photon-patient-select></photon-patient-select></div></photon-card>'),hP=C("<p></p>"),pP=nt(nc(jt(),Bi()),"Please select a patient..."),mP=nt(nc(jt(),Bi()),"Please enter an address for patient..."),vP=e=>{const[t,r]=L(!1),{actions:n}=Jh;return e.actions.registerValidator({key:"patient",validator:pP}),e.enableOrder&&e.actions.registerValidator({key:"address",validator:mP}),(()=>{const i=V(()=>document.importNode(fP,!0)),o=i.firstChild,a=o.firstChild,s=a.nextSibling;return i._$owner=P(),s.addEventListener("photon-patient-selected",c=>{e.actions.updateFormValue({key:"patient",value:c.detail.patient}),e.enableOrder&&e.actions.updateFormValue({key:"address",value:c.detail.patient.address})}),s._$owner=P(),w(o,U(re,{get when(){return e.store.patient?.value?.id&&e.enableOrder},get children(){return[(()=>{const c=V(()=>document.importNode(aP,!0));return c.addEventListener("photon-patient-updated",()=>{n.getSelectedPatient(e.client.getSDK(),e.store.patient?.value?.id)}),c._$owner=P(),W(l=>{const u=t(),d=e.store.patient.value.id;return u!==l._v$&&(c.open=l._v$=u),d!==l._v$2&&(c.patientId=l._v$2=d),l},{_v$:void 0,_v$2:void 0}),c})(),U(re,{get when(){return e.store.patient?.value},get children(){return[sP.cloneNode(!0),U(re,{get when(){return e.store.patient.value.address},get children(){const c=lP.cloneNode(!0),l=c.firstChild,u=l.nextSibling,d=u.firstChild,f=d.firstChild,h=f.firstChild,p=f.nextSibling,m=d.nextSibling;return w(l,()=>e.store.patient.value.address.street1),w(c,(()=>{const v=pe(()=>!!e.store.patient.value.address.street2);return()=>v()?(()=>{const y=hP.cloneNode(!0);return w(y,()=>e.store.patient.value.address.street2),y})():null})(),u),w(f,()=>e.store.patient.value.address.city,h),w(p,()=>e.store.patient.value.address.state),w(m,()=>e.store.patient.value.address.postalCode),c}}),U(re,{get when(){return!e.store.patient.value.address},get children(){return[(()=>{const c=cP.cloneNode(!0);return W(l=>{const u=!!e.store.address.error,d=!!e.store.address.error,f=!!e.store.address.error,h=!!e.store.address.error;return u!==l._v$3&&c.classList.toggle("p-2",l._v$3=u),d!==l._v$4&&c.classList.toggle("border-red-500",l._v$4=d),f!==l._v$5&&c.classList.toggle("border-2",l._v$5=f),h!==l._v$6&&c.classList.toggle("rounded",l._v$6=h),l},{_v$3:void 0,_v$4:void 0,_v$5:void 0,_v$6:void 0}),c})(),U(re,{get when(){return e.store.address.error},get children(){const c=uP.cloneNode(!0);return w(c,()=>e.store.address.error),c}})]}})]}}),(()=>{const c=V(()=>document.importNode(dP,!0));return c.addEventListener("photon-clicked",()=>{r(!1),r(!0)}),c._$owner=P(),c})()]}}),null),W(c=>{const l=e.store.patient?.error??!1,u=e.store.patient?.error,d=e.store.patient?.value?.id??e.patientId,f=e.client.getSDK();return l!==c._v$7&&(s.invalid=c._v$7=l),u!==c._v$8&&(s.helpText=c._v$8=u),d!==c._v$9&&(s.selected=c._v$9=d),f!==c._v$10&&(s.sdk=c._v$10=f),c},{_v$7:void 0,_v$8:void 0,_v$9:void 0,_v$10:void 0}),i})()},yP=C('<p class="font-sans text-red-500 text-sm pt-1.5"></p>'),gP=C('<div><photon-card><p class="italic font-sans text-gray-500">No prescriptions pending</p></photon-card></div>'),bP=C('<div><photon-card><div class="w-full flex justify-between"><p class="italic font-sans text-gray-500">Loading Prescriptions...</p><sl-spinner style="font-size: 1rem;"></sl-spinner></div></photon-card></div>'),$P=C('<photon-card><photon-dialog label="Lose pending prescription?" confirm-text="Yes, Cancel" cancel-text="No, Keep Editing"><p class="font-sans text-lg xs:text-base">You have selected to remove a pending prescription. Continuing will remove it from the list of prescriptions to be created.</p></photon-dialog><div class="flex flex-col gap-3"><p class="font-sans text-l font-medium">Pending Prescriptions</p></div></photon-card>'),wP=C('<photon-card><div class="flex flex-row items-center"><div class="flex flex-col flex-grow" style="max-width: calc(100% - 36px);"><p class="font-medium font-sans"></p><p class="font-normal text-gray-700 overflow-hidden whitespace-nowrap overflow-ellipsis font-sans"> <!>, <!> refills - </p></div><div><sl-icon-button class="self-end text-xl remove-icon-button" name="trash3"></sl-icon-button></div></div></photon-card>'),_P=nt(Nr(u7(Bi()),1,1/0),"You must add at least 1 Prescription"),xP=e=>{const[t,r]=L(!1),[n,i]=L();return e.actions.registerValidator({key:"draftPrescriptions",validator:_P}),(()=>{const o=V(()=>document.importNode($P,!0)),a=o.firstChild,s=a.nextSibling;return s.firstChild,o._$owner=P(),a.addEventListener("photon-dialog-confirmed",()=>{e.actions.updateFormValue({key:"draftPrescriptions",value:e.store.draftPrescriptions.value.filter(c=>c.id!==n())}),r(!1),i(void 0)}),a.addEventListener("photon-dialog-canceled",()=>{r(!1),i(void 0)}),a._$owner=P(),w(s,U(re,{get when(){return(e.store.draftPrescriptions?.value??[]).length===0&&!e.isLoading},get children(){const c=V(()=>document.importNode(gP,!0)),l=c.firstChild;return l._$owner=P(),w(c,U(re,{get when(){return e.store.draftPrescriptions?.error},get children(){const u=yP.cloneNode(!0);return w(u,()=>e.store.draftPrescriptions?.error),u}}),null),W(()=>l.invalid=e.store.draftPrescriptions?.error),c}}),null),w(s,U(re,{get when(){return e.isLoading},get children(){const c=V(()=>document.importNode(bP,!0)),l=c.firstChild,u=l.firstChild,d=u.firstChild,f=d.nextSibling;return l._$owner=P(),f._$owner=P(),c}}),null),w(s,U(Rl,{get each(){return e.store.draftPrescriptions?.value??[]},children:c=>(()=>{const l=V(()=>document.importNode(wP,!0)),u=l.firstChild,d=u.firstChild,f=d.firstChild,h=f.nextSibling,p=h.firstChild,m=p.nextSibling,v=m.nextSibling,y=v.nextSibling;y.nextSibling;const b=d.nextSibling,g=b.firstChild;return l._$owner=P(),w(f,()=>c.treatment.name),w(h,()=>c.dispenseQuantity,p),w(h,()=>c.dispenseUnit,m),w(h,()=>c.refillsInput,y),w(h,()=>c.instructions,null),g.$$click=()=>{r(!0),i(c.id)},g._$owner=P(),l})()}),null),W(()=>a.open=t()),o})()};Ni(["click"]);const SP=C('<photon-card><p class="italic font-sans text-gray-500">Please select a patient</p></photon-card>'),kP=C('<photon-card><p class="italic font-sans text-gray-500">Please update patient address in order to select pharmacy</p></photon-card>'),EP=C('<div class="flex flex-col gap-2"><p class="font-sans text-sm font-medium flex-grow">Search for a Local Pharmacy</p><photon-pharmacy-search></photon-pharmacy-search></div>'),OP=C('<photon-card><div class="flex flex-col gap-3"><div class="flex flex-row"><p class="font-sans text-l font-medium flex-grow">Select Pharmacy</p></div></div></photon-card>'),CP=nt(nc(jt(),Bi()),"Please select or search for a pharmacy..."),PP=e=>(e.actions.registerValidator({key:"pharmacy",validator:CP}),(()=>{const t=V(()=>document.importNode(OP,!0)),r=t.firstChild;return r.firstChild,t._$owner=P(),w(r,U(re,{get when(){return!e.store.patient?.value},get children(){const n=V(()=>document.importNode(SP,!0));return n._$owner=P(),n}}),null),w(r,U(re,{get when(){return e.store.patient?.value&&!e.store.address?.value},get children(){const n=V(()=>document.importNode(kP,!0));return n._$owner=P(),n}}),null),w(r,U(re,{get when(){return e.store.patient?.value&&e.store.address?.value},get children(){const n=V(()=>document.importNode(EP,!0)),i=n.firstChild,o=i.nextSibling;return o.addEventListener("photon-pharmacy-selected",a=>{e.actions.updateFormValue({key:"pharmacy",value:a.detail.pharmacy})}),o.addEventListener("photon-pharmacy-removed",a=>{e.actions.updateFormValue({key:"pharmacy",value:void 0})}),o._$owner=P(),W(a=>{const s=e.store.pharmacy?.error??!1,c=e.store.pharmacy?.error,l=e.store.patient.value.address?`${e.store.patient.value.address.street1} ${e.store.patient.value.address.street2||""} ${e.store.patient.value.address.city}, ${e.store.patient.value.address.state} ${e.store.patient.value.address.postalCode}`:"",u=e.store.patient.value.preferredPharmacies?.[0]?.id??"";return s!==a._v$&&(o.invalid=a._v$=s),c!==a._v$2&&(o.helpText=a._v$2=c),l!==a._v$3&&(o.address=a._v$3=l),u!==a._v$4&&(o.selected=a._v$4=u),a},{_v$:void 0,_v$2:void 0,_v$3:void 0,_v$4:void 0}),n}}),null),t})()),TP=C('<sl-spinner style="font-size: 1rem;"></sl-spinner>'),NP=C('<div class="flex flex-col gap-2"></div>'),IP=C('<photon-card><div class="flex flex-col gap-3"><div class="flex flex-row"><p class="font-sans text-l font-medium flex-grow">Selected Pharmacy</p></div></div></photon-card>'),AP=({pharmacyId:e})=>{const t=at(),[r,n]=L({});return xe(async()=>{if(e&&t){const{data:i}=await t.getSDK().clinical.pharmacy.getPharmacy({id:e});n(i.pharmacy)}}),(()=>{const i=V(()=>document.importNode(IP,!0)),o=i.firstChild;return o.firstChild,i._$owner=P(),w(o,U(re,{get when(){return!r()},get children(){const a=V(()=>document.importNode(TP,!0));return a._$owner=P(),a}}),null),w(o,U(re,{get when(){return r()},get children(){const a=NP.cloneNode(!0);return w(a,()=>r()?.name),a}}),null),i})()},DP=C('<div class="w-full flex justify-center"><sl-spinner style="font-size: 3rem;"></sl-spinner></div>'),RP=C('<sl-alert variant="warning" open><sl-icon slot="icon" name="exclamation-triangle"></sl-icon><strong>You are not authorized to prescribe</strong><br></sl-alert>'),FP=C('<photon-button class="w-full xs:w-fit" variant="outline">Add Prescription</photon-button>'),LP=C('<div class="flex flex-row justify-end gap-2"><photon-button class="w-full xs:w-fit"></photon-button></div>'),MP=C('<div><style></style><style></style><style></style><style></style><div><div class="flex flex-col gap-8"></div></div></div>');it("https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.0.0-beta.82/dist/");const jP=Wo`
2875
+ `}};Ce.styles=tP;$([Xe(".button")],Ce.prototype,"button",2);$([Er()],Ce.prototype,"hasFocus",2);$([Er()],Ce.prototype,"invalid",2);$([S()],Ce.prototype,"title",2);$([S({reflect:!0})],Ce.prototype,"variant",2);$([S({reflect:!0})],Ce.prototype,"size",2);$([S({type:Boolean,reflect:!0})],Ce.prototype,"caret",2);$([S({type:Boolean,reflect:!0})],Ce.prototype,"disabled",2);$([S({type:Boolean,reflect:!0})],Ce.prototype,"loading",2);$([S({type:Boolean,reflect:!0})],Ce.prototype,"outline",2);$([S({type:Boolean,reflect:!0})],Ce.prototype,"pill",2);$([S({type:Boolean,reflect:!0})],Ce.prototype,"circle",2);$([S()],Ce.prototype,"type",2);$([S()],Ce.prototype,"name",2);$([S()],Ce.prototype,"value",2);$([S()],Ce.prototype,"href",2);$([S()],Ce.prototype,"target",2);$([S()],Ce.prototype,"download",2);$([S()],Ce.prototype,"form",2);$([S({attribute:"formaction"})],Ce.prototype,"formAction",2);$([S({attribute:"formenctype"})],Ce.prototype,"formEnctype",2);$([S({attribute:"formmethod"})],Ce.prototype,"formMethod",2);$([S({attribute:"formnovalidate",type:Boolean})],Ce.prototype,"formNoValidate",2);$([S({attribute:"formtarget"})],Ce.prototype,"formTarget",2);$([De("disabled",{waitUntilFirstUpdate:!0})],Ce.prototype,"handleDisabledChange",1);Ce=$([_t("sl-button")],Ce);const rP=C('<photon-checkbox label="Add To Templates" form-name="daw"></photon-checkbox>'),nP=C('<photon-card title="Add Prescription"><div class="flex flex-col gap-3"><photon-treatment-select label="Search Treatment Catalog"></photon-treatment-select><div class="flex flex-col-reverse xs:flex-row xs:items-center gap-2"><photon-checkbox label="Dispense as written" tip="This prescription will be filled generically unless this box is checked" form-name="daw" class="flex-grow"></photon-checkbox><photon-med-search-dialog></photon-med-search-dialog><a class="font-sans text-gray-500 text-sm hover:text-black hover:cursor-pointer pt-1">Advanced Search \u2192</a></div><div class="sm:max-w-[50%] sm:pr-2"><photon-datepicker label="Effective Date" required="true"></photon-datepicker></div><div class="flex flex-col sm:flex-wrap sm:flex-row sm:items-start sm:gap-x-4"><div class="flex flex-col flex-1 flex-shrink md:max-w-[50%]"><photon-number-input class="flex-grow flex-1" label="Quantity" required="true" min="1"></photon-number-input><photon-dosage-calculator-dialog></photon-dosage-calculator-dialog><photon-button variant="outline" class="w-fit"><sl-icon slot="suffix" name="calculator"></sl-icon>Dose Calculator</photon-button></div><photon-dispense-units class="flex-grow flex-shrink md:max-w-[50%] flex-1" label="Dispense Unit" required="true" force-label-size="true"></photon-dispense-units></div><div class="flex flex-col sm:flex-wrap sm:flex-row sm:items-center sm:gap-x-4"><photon-number-input class="flex-grow flex-shrink md:max-w-[50%] flex-1" label="Days Supply" required="true" min="0"></photon-number-input><photon-number-input class="flex-grow flex-shrink md:max-w-[50%] flex-1" label="Refills" required="true" min="0"></photon-number-input></div><photon-textarea label="Patient Instructions (SIG)" form-name="patient_instructions" required="true" placeholder="Enter patient instructions"></photon-textarea><photon-textarea label="Pharmacy Note" placeholder="Enter pharmacy note"></photon-textarea><div class="flex flex-col xs:flex-row gap-2"><div class="flex flex-grow justify-end"><photon-button class="w-full xs:w-fit">Add Prescription</photon-button></div></div></div></photon-card>');it("https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.0.0-beta.82/dist/");const iP={treatment:nt(ic(jt(),Bi()),"Please select a treatment..."),dispenseQuantity:nt(su(au(),1),"Quantity must be positive"),daysSupply:nt(su(au(),0),"Days Supply must be at least 0"),refillsInput:nt(su(au(),0),"Refills must be at least 0"),instructions:nt(Nr(jt(),1,1/0),"Please enter instructions for the patient..."),effectiveDate:nt(ZC(new Date),"Please choose a date that isn't in the past")},oP=e=>{let t,r;const[n,i]=M(void 0),[o,a]=M(void 0);let s;for(const[c,l]of Object.entries(iP))e.actions.registerValidator({key:c,validator:l});return(()=>{const c=V(()=>document.importNode(nP,!0)),l=c.firstChild,u=l.firstChild,d=u.nextSibling,f=d.firstChild,h=f.nextSibling,p=h.nextSibling,m=d.nextSibling,v=m.firstChild,y=m.nextSibling,b=y.firstChild,g=b.firstChild,_=g.nextSibling,k=_.nextSibling,E=k.firstChild,x=b.nextSibling,T=y.nextSibling,j=T.firstChild,z=j.nextSibling,K=T.nextSibling,D=K.nextSibling,L=D.nextSibling,R=L.firstChild,F=R.firstChild,q=s;typeof q=="function"?ee(q,c):s=c,c._$owner=P(),l.addEventListener("photon-medication-selected",A=>{i(A.detail.medication),e.actions.updateFormValue({key:"treatment",value:A.detail.medication})}),u.addEventListener("photon-treatment-selected",A=>{A.detail.data.__typename==="PrescriptionTemplate"?(e.actions.updateFormValue({key:"treatment",value:A.detail.data.treatment}),A.detail.data.dispenseAsWritten&&e.actions.updateFormValue({key:"dispenseAsWritten",value:A.detail.data.dispenseAsWritten}),A.detail.data.dispenseQuantity&&e.actions.updateFormValue({key:"dispenseQuantity",value:Number(A.detail.data.dispenseQuantity)}),A.detail.data.dispenseUnit&&e.actions.updateFormValue({key:"dispenseUnit",value:A.detail.data.dispenseUnit}),A.detail.data.daysSupply&&e.actions.updateFormValue({key:"daysSupply",value:Number(A.detail.data.daysSupply)}),A.detail.data.fillsAllowed&&e.actions.updateFormValue({key:"refillsInput",value:Number(A.detail.data.fillsAllowed)-1}),A.detail.data.instructions&&e.actions.updateFormValue({key:"instructions",value:A.detail.data.instructions}),A.detail.data.notes&&e.actions.updateFormValue({key:"notes",value:A.detail.data.notes})):e.actions.updateFormValue({key:"treatment",value:A.detail.data}),e.actions.updateFormValue({key:"catalogId",value:A.detail.catalogId})}),u._$owner=P(),f.addEventListener("photon-checkbox-toggled",A=>e.actions.updateFormValue({key:"dispenseAsWritten",value:A.detail.checked})),f._$owner=P();const re=t;typeof re=="function"?ee(re,h):t=h,h._$owner=P(),p.$$click=()=>t.open=!0,v.addEventListener("photon-datepicker-selected",A=>e.actions.updateFormValue({key:"effectiveDate",value:A.detail.date})),v._$owner=P(),g.addEventListener("photon-input-changed",A=>{e.actions.updateFormValue({key:"dispenseQuantity",value:Number(A.detail.input)})}),g._$owner=P();const ae=r;return typeof ae=="function"?ee(ae,_):r=_,_.addEventListener("photon-dose-selected",A=>{e.actions.updateFormValue({key:"dispenseQuantity",value:Number(A.detail.value)}),A.detail.unit==="mL"&&e.actions.updateFormValue({key:"dispenseUnit",value:"Milliliter"})}),_._$owner=P(),k.addEventListener("photon-clicked",()=>{r.open=!0}),k._$owner=P(),E._$owner=P(),x.addEventListener("photon-dispense-unit-selected",A=>e.actions.updateFormValue({key:"dispenseUnit",value:A.detail.dispenseUnit.name})),x._$owner=P(),j.addEventListener("photon-input-changed",A=>{e.actions.updateFormValue({key:"daysSupply",value:Number(A.detail.input)})}),j._$owner=P(),z.addEventListener("photon-input-changed",A=>e.actions.updateFormValue({key:"refillsInput",value:Number(A.detail.input)})),z._$owner=P(),K.addEventListener("photon-textarea-changed",A=>e.actions.updateFormValue({key:"instructions",value:A.detail.value})),K._$owner=P(),D.addEventListener("photon-textarea-changed",A=>e.actions.updateFormValue({key:"notes",value:A.detail.value})),D._$owner=P(),w(L,U(ne,{get when(){return!e.hideAddToTemplates},get children(){const A=V(()=>document.importNode(rP,!0));return A.addEventListener("photon-checkbox-toggled",me=>e.actions.updateFormValue({key:"addToTemplates",value:me.detail.checked})),A._$owner=P(),W(()=>A.checked=e.store.addToTemplates?.value||!1),A}}),R),F.addEventListener("photon-clicked",()=>{const A=["treatment","effectiveDate","dispenseQuantity","daysSupply","refillsInput","instructions"];e.actions.validate(A),e.actions.hasErrors(A)||(e.actions.updateFormValue({key:"draftPrescriptions",value:[...e.store.draftPrescriptions?.value||[],{id:String(Math.random()),effectiveDate:e.store.effectiveDate.value,treatment:e.store.treatment.value,dispenseAsWritten:e.store.dispenseAsWritten.value,dispenseQuantity:e.store.dispenseQuantity.value,dispenseUnit:e.store.dispenseUnit.value,daysSupply:e.store.daysSupply.value,refillsInput:e.store.refillsInput.value,instructions:e.store.instructions.value,notes:e.store.notes.value,fillsAllowed:e.store.refillsInput.value+1,addToTemplates:e.store.addToTemplates?.value??!1,catalogId:e.store.catalogId.value??void 0}]}),e.actions.updateFormValue({key:"effectiveDate",value:oc(new Date,"yyyy-MM-dd").toString()}),e.actions.clearKeys(["treatment","dispenseAsWritten","dispenseQuantity","dispenseUnit","daysSupply","refillsInput","instructions","notes"]),i(void 0),e.actions.updateFormValue({key:"treatment",value:void 0}),e.actions.updateFormValue({key:"refillsInput",value:0}),e.actions.updateFormValue({key:"dispenseAsWritten",value:!1}),e.actions.updateFormValue({key:"dispenseQuantity",value:1}),e.actions.updateFormValue({key:"daysSupply",value:30}),e.actions.updateFormValue({key:"instructions",value:""}),e.actions.updateFormValue({key:"notes",value:""}))}),F._$owner=P(),W(A=>{const me=e.store.treatment?.value??void 0,_e=e.store.treatment?.error??!1,I=e.store.treatment?.error,xt=n(),St=e.store.effectiveDate?.error??!1,Mt=e.store.effectiveDate?.error,It=e.store.dispenseQuantity?.error??!1,G=e.store.dispenseQuantity?.error,Y=e.store.treatment?.value??void 0,X=e.store.dispenseUnit?.value??o()?.name,ie=e.store.daysSupply?.error??!1,ue=e.store.daysSupply?.error,de=e.store.refillsInput?.error??!1,Ue=e.store.refillsInput?.error,Me=e.store.instructions?.error??!1,st=e.store.instructions?.error;return me!==A._v$&&(u.selected=A._v$=me),_e!==A._v$2&&(u.invalid=A._v$2=_e),I!==A._v$3&&(u.helpText=A._v$3=I),xt!==A._v$4&&(u.offCatalogOption=A._v$4=xt),St!==A._v$5&&(v.invalid=A._v$5=St),Mt!==A._v$6&&(v.helpText=A._v$6=Mt),It!==A._v$7&&(g.invalid=A._v$7=It),G!==A._v$8&&(g.helpText=A._v$8=G),Y!==A._v$9&&(_.medication=A._v$9=Y),X!==A._v$10&&(x.selected=A._v$10=X),ie!==A._v$11&&(j.invalid=A._v$11=ie),ue!==A._v$12&&(j.helpText=A._v$12=ue),de!==A._v$13&&(z.invalid=A._v$13=de),Ue!==A._v$14&&(z.helpText=A._v$14=Ue),Me!==A._v$15&&(K.invalid=A._v$15=Me),st!==A._v$16&&(K.helpText=A._v$16=st),A},{_v$:void 0,_v$2:void 0,_v$3:void 0,_v$4:void 0,_v$5:void 0,_v$6:void 0,_v$7:void 0,_v$8:void 0,_v$9:void 0,_v$10:void 0,_v$11:void 0,_v$12:void 0,_v$13:void 0,_v$14:void 0,_v$15:void 0,_v$16:void 0}),W(()=>f.checked=e.store.dispenseAsWritten?.value||!1),W(()=>g.value=e.store.dispenseQuantity?.value??1),W(()=>j.value=e.store.daysSupply?.value??30),W(()=>z.value=e.store.refillsInput?.value??0),W(()=>K.value=e.store.instructions?.value),W(()=>D.value=e.store.notes?.value),c})()};Ni(["click"]);const aP=C("<photon-patient-dialog></photon-patient-dialog>"),sP=C('<p class="font-sans text-sm font-medium">Patient Address</p>'),lP=C('<div class="flex flex-col font-sans text-gray-700"><p></p><div class="flex flex-row gap-1"><div class="flex flex-row"><p>,</p><p></p></div><p></p></div></div>'),cP=C('<p class="italic font-sans text-gray-500">Please edit patient and add address</p>'),uP=C('<p class="font-sans text-red-500 text-sm"></p>'),dP=C('<photon-button class="self-end" variant="outline">Edit Patient</photon-button>'),fP=C('<photon-card><div class="flex flex-col gap-3"><p class="font-sans text-l font-medium">Select Patient</p><photon-patient-select></photon-patient-select></div></photon-card>'),hP=C("<p></p>"),pP=nt(ic(jt(),Bi()),"Please select a patient..."),mP=nt(ic(jt(),Bi()),"Please enter an address for patient..."),vP=e=>{const[t,r]=M(!1),{actions:n}=nc;return e.actions.registerValidator({key:"patient",validator:pP}),e.enableOrder&&e.actions.registerValidator({key:"address",validator:mP}),(()=>{const i=V(()=>document.importNode(fP,!0)),o=i.firstChild,a=o.firstChild,s=a.nextSibling;return i._$owner=P(),s.addEventListener("photon-patient-selected",c=>{e.actions.updateFormValue({key:"patient",value:c.detail.patient}),e.enableOrder&&e.actions.updateFormValue({key:"address",value:c.detail.patient.address})}),s._$owner=P(),w(o,U(ne,{get when(){return e.store.patient?.value?.id&&e.enableOrder},get children(){return[(()=>{const c=V(()=>document.importNode(aP,!0));return c.addEventListener("photon-patient-updated",()=>{n.getSelectedPatient(e.client.getSDK(),e.store.patient?.value?.id)}),c._$owner=P(),W(l=>{const u=t(),d=e.store.patient.value.id;return u!==l._v$&&(c.open=l._v$=u),d!==l._v$2&&(c.patientId=l._v$2=d),l},{_v$:void 0,_v$2:void 0}),c})(),U(ne,{get when(){return e.store.patient?.value},get children(){return[sP.cloneNode(!0),U(ne,{get when(){return e.store.patient.value.address},get children(){const c=lP.cloneNode(!0),l=c.firstChild,u=l.nextSibling,d=u.firstChild,f=d.firstChild,h=f.firstChild,p=f.nextSibling,m=d.nextSibling;return w(l,()=>e.store.patient.value.address.street1),w(c,(()=>{const v=pe(()=>!!e.store.patient.value.address.street2);return()=>v()?(()=>{const y=hP.cloneNode(!0);return w(y,()=>e.store.patient.value.address.street2),y})():null})(),u),w(f,()=>e.store.patient.value.address.city,h),w(p,()=>e.store.patient.value.address.state),w(m,()=>e.store.patient.value.address.postalCode),c}}),U(ne,{get when(){return!e.store.patient.value.address},get children(){return[(()=>{const c=cP.cloneNode(!0);return W(l=>{const u=!!e.store.address.error,d=!!e.store.address.error,f=!!e.store.address.error,h=!!e.store.address.error;return u!==l._v$3&&c.classList.toggle("p-2",l._v$3=u),d!==l._v$4&&c.classList.toggle("border-red-500",l._v$4=d),f!==l._v$5&&c.classList.toggle("border-2",l._v$5=f),h!==l._v$6&&c.classList.toggle("rounded",l._v$6=h),l},{_v$3:void 0,_v$4:void 0,_v$5:void 0,_v$6:void 0}),c})(),U(ne,{get when(){return e.store.address.error},get children(){const c=uP.cloneNode(!0);return w(c,()=>e.store.address.error),c}})]}})]}}),(()=>{const c=V(()=>document.importNode(dP,!0));return c.addEventListener("photon-clicked",()=>{r(!1),r(!0)}),c._$owner=P(),c})()]}}),null),W(c=>{const l=e.store.patient?.error??!1,u=e.store.patient?.error,d=e.store.patient?.value?.id??e.patientId,f=e.client.getSDK();return l!==c._v$7&&(s.invalid=c._v$7=l),u!==c._v$8&&(s.helpText=c._v$8=u),d!==c._v$9&&(s.selected=c._v$9=d),f!==c._v$10&&(s.sdk=c._v$10=f),c},{_v$7:void 0,_v$8:void 0,_v$9:void 0,_v$10:void 0}),i})()},yP=C('<p class="font-sans text-red-500 text-sm pt-1.5"></p>'),gP=C('<div><photon-card><p class="italic font-sans text-gray-500">No prescriptions pending</p></photon-card></div>'),bP=C('<div><photon-card><div class="w-full flex justify-between"><p class="italic font-sans text-gray-500">Loading Prescriptions...</p><sl-spinner style="font-size: 1rem;"></sl-spinner></div></photon-card></div>'),$P=C('<photon-card><photon-dialog label="Lose pending prescription?" confirm-text="Yes, Cancel" cancel-text="No, Keep Editing"><p class="font-sans text-lg xs:text-base">You have selected to remove a pending prescription. Continuing will remove it from the list of prescriptions to be created.</p></photon-dialog><div class="flex flex-col gap-3"><p class="font-sans text-l font-medium">Pending Prescriptions</p></div></photon-card>'),wP=C('<photon-card><div class="flex flex-row items-center"><div class="flex flex-col flex-grow" style="max-width: calc(100% - 36px);"><p class="font-medium font-sans"></p><p class="font-normal text-gray-700 overflow-hidden whitespace-nowrap overflow-ellipsis font-sans"> <!>, <!> refills - </p></div><div><sl-icon-button class="self-end text-xl remove-icon-button" name="trash3"></sl-icon-button></div></div></photon-card>'),_P=nt(Nr(u7(Bi()),1,1/0),"You must add at least 1 Prescription"),xP=e=>{const[t,r]=M(!1),[n,i]=M();return e.actions.registerValidator({key:"draftPrescriptions",validator:_P}),(()=>{const o=V(()=>document.importNode($P,!0)),a=o.firstChild,s=a.nextSibling;return s.firstChild,o._$owner=P(),a.addEventListener("photon-dialog-confirmed",()=>{e.actions.updateFormValue({key:"draftPrescriptions",value:e.store.draftPrescriptions.value.filter(c=>c.id!==n())}),r(!1),i(void 0)}),a.addEventListener("photon-dialog-canceled",()=>{r(!1),i(void 0)}),a._$owner=P(),w(s,U(ne,{get when(){return(e.store.draftPrescriptions?.value??[]).length===0&&!e.isLoading},get children(){const c=V(()=>document.importNode(gP,!0)),l=c.firstChild;return l._$owner=P(),w(c,U(ne,{get when(){return e.store.draftPrescriptions?.error},get children(){const u=yP.cloneNode(!0);return w(u,()=>e.store.draftPrescriptions?.error),u}}),null),W(()=>l.invalid=e.store.draftPrescriptions?.error),c}}),null),w(s,U(ne,{get when(){return e.isLoading},get children(){const c=V(()=>document.importNode(bP,!0)),l=c.firstChild,u=l.firstChild,d=u.firstChild,f=d.nextSibling;return l._$owner=P(),f._$owner=P(),c}}),null),w(s,U(Rl,{get each(){return e.store.draftPrescriptions?.value??[]},children:c=>(()=>{const l=V(()=>document.importNode(wP,!0)),u=l.firstChild,d=u.firstChild,f=d.firstChild,h=f.nextSibling,p=h.firstChild,m=p.nextSibling,v=m.nextSibling,y=v.nextSibling;y.nextSibling;const b=d.nextSibling,g=b.firstChild;return l._$owner=P(),w(f,()=>c.treatment.name),w(h,()=>c.dispenseQuantity,p),w(h,()=>c.dispenseUnit,m),w(h,()=>c.refillsInput,y),w(h,()=>c.instructions,null),g.$$click=()=>{r(!0),i(c.id)},g._$owner=P(),l})()}),null),W(()=>a.open=t()),o})()};Ni(["click"]);const SP=C('<photon-card><p class="italic font-sans text-gray-500">Please select a patient</p></photon-card>'),kP=C('<photon-card><p class="italic font-sans text-gray-500">Please update patient address in order to select pharmacy</p></photon-card>'),EP=C('<div class="flex flex-col gap-2"><p class="font-sans text-sm font-medium flex-grow">Search for a Local Pharmacy</p><photon-pharmacy-search></photon-pharmacy-search></div>'),OP=C('<photon-card><div class="flex flex-col gap-3"><div class="flex flex-row"><p class="font-sans text-l font-medium flex-grow">Select Pharmacy</p></div></div></photon-card>'),CP=nt(ic(jt(),Bi()),"Please select or search for a pharmacy..."),PP=e=>(e.actions.registerValidator({key:"pharmacy",validator:CP}),(()=>{const t=V(()=>document.importNode(OP,!0)),r=t.firstChild;return r.firstChild,t._$owner=P(),w(r,U(ne,{get when(){return!e.store.patient?.value},get children(){const n=V(()=>document.importNode(SP,!0));return n._$owner=P(),n}}),null),w(r,U(ne,{get when(){return e.store.patient?.value&&!e.store.address?.value},get children(){const n=V(()=>document.importNode(kP,!0));return n._$owner=P(),n}}),null),w(r,U(ne,{get when(){return e.store.patient?.value&&e.store.address?.value},get children(){const n=V(()=>document.importNode(EP,!0)),i=n.firstChild,o=i.nextSibling;return o.addEventListener("photon-pharmacy-selected",a=>{e.actions.updateFormValue({key:"pharmacy",value:a.detail.pharmacy})}),o.addEventListener("photon-pharmacy-removed",a=>{e.actions.updateFormValue({key:"pharmacy",value:void 0})}),o._$owner=P(),W(a=>{const s=e.store.pharmacy?.error??!1,c=e.store.pharmacy?.error,l=e.store.patient.value.address?`${e.store.patient.value.address.street1} ${e.store.patient.value.address.street2||""} ${e.store.patient.value.address.city}, ${e.store.patient.value.address.state} ${e.store.patient.value.address.postalCode}`:"",u=e.store.patient.value.preferredPharmacies?.[0]?.id??"";return s!==a._v$&&(o.invalid=a._v$=s),c!==a._v$2&&(o.helpText=a._v$2=c),l!==a._v$3&&(o.address=a._v$3=l),u!==a._v$4&&(o.selected=a._v$4=u),a},{_v$:void 0,_v$2:void 0,_v$3:void 0,_v$4:void 0}),n}}),null),t})()),TP=C('<sl-spinner style="font-size: 1rem;"></sl-spinner>'),NP=C('<div class="flex flex-col gap-2"></div>'),IP=C('<photon-card><div class="flex flex-col gap-3"><div class="flex flex-row"><p class="font-sans text-l font-medium flex-grow">Selected Pharmacy</p></div></div></photon-card>'),AP=({pharmacyId:e})=>{const t=at(),[r,n]=M({});return xe(async()=>{if(e&&t){const{data:i}=await t.getSDK().clinical.pharmacy.getPharmacy({id:e});n(i.pharmacy)}}),(()=>{const i=V(()=>document.importNode(IP,!0)),o=i.firstChild;return o.firstChild,i._$owner=P(),w(o,U(ne,{get when(){return!r()},get children(){const a=V(()=>document.importNode(TP,!0));return a._$owner=P(),a}}),null),w(o,U(ne,{get when(){return r()},get children(){const a=NP.cloneNode(!0);return w(a,()=>r()?.name),a}}),null),i})()},DP=C('<div class="w-full flex justify-center"><sl-spinner style="font-size: 3rem;"></sl-spinner></div>'),RP=C('<sl-alert variant="warning" open><sl-icon slot="icon" name="exclamation-triangle"></sl-icon><strong>You are not authorized to prescribe</strong><br></sl-alert>'),FP=C('<photon-button class="w-full xs:w-fit" variant="outline">Add Prescription</photon-button>'),LP=C('<div class="flex flex-row justify-end gap-2"><photon-button class="w-full xs:w-fit"></photon-button></div>'),MP=C('<div><style></style><style></style><style></style><style></style><div><div class="flex flex-col gap-8"></div></div></div>');it("https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.0.0-beta.82/dist/");const jP=Wo`
2880
2876
  fragment CatalogTreatmentsFields on Catalog {
2881
2877
  id
2882
2878
  treatments {
@@ -2898,7 +2894,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
2898
2894
  }
2899
2895
  }
2900
2896
  }
2901
- `;$e("photon-prescribe-workflow",{patientId:void 0,templateIds:void 0,hideSubmit:!1,hideTemplates:!0,enableOrder:!1,pharmacyId:void 0,loading:!1},(e,t)=>{let r;const{store:n,actions:i}=k2({dispenseAsWritten:!1,patient:void 0,treatment:void 0,draftPrescriptions:[],pharmacy:void 0,errors:[],address:void 0}),o=at(),[a,s]=L(!e.templateIds),[c,l]=L(!0),[u,d]=L(!1),[f,h]=L(!1),[p,m]=L(o?.authentication.state.isAuthenticated||!1);xe(()=>{!o?.authentication.state.isAuthenticated&&!o?.authentication.state.isLoading&&!o?.authentication.state.error&&o?.authentication.login({appState:{returnTo:window.location.pathname}})}),xe(()=>{l(o?.authentication.state.isLoading||!1)},[o?.authentication.state.isLoading]),xe(()=>{m(o?.authentication.state.isAuthenticated||!1)},[o?.authentication.state.isAuthenticated]),xe(()=>{h(!!o?.authentication.state.error)},[o?.authentication.state.error]),xe(async()=>{if(e.templateIds&&o){d(!0);const E=e.templateIds.split(","),{data:{catalogs:x}}=await o.getSDK().clinical.catalog.getCatalogs();if(x.length===0){console.error("No catalog set");return}const{data:{catalog:N}}=await o.getSDK().clinical.catalog.getCatalog({id:x[0].id,fragment:{CatalogTreatmentsFields:jP}}),M={};N.templates.forEach(j=>{j&&(M[j.id]=j)});for(let j=0;j<E.length;j++){const q=E[j],A=M[q];A||console.error(`Invalid template id ${q}`),(!A.treatment||!A.dispenseQuantity||!A.dispenseUnit||!A.fillsAllowed||!A.instructions)&&console.error(`Template is missing required prescription details ${q}`),i.updateFormValue({key:"draftPrescriptions",value:[...n.draftPrescriptions?.value||[],{id:String(Math.random()),effectiveDate:ic(new Date,"yyyy-MM-dd").toString(),treatment:A.treatment,dispenseAsWritten:A.dispenseAsWritten,dispenseQuantity:A.dispenseQuantity,dispenseUnit:A.dispenseUnit,daysSupply:A.daysSupply,refillsInput:A.fillsAllowed?A.fillsAllowed-1:0,fillsAllowed:A.fillsAllowed,instructions:A.instructions,notes:A.notes,addToTemplates:!1,catalogId:void 0}]})}d(!1)}},[o]);const v=E=>{const x=new CustomEvent("photon-prescriptions-created",{composed:!0,bubbles:!0,detail:{prescriptions:E}});r?.dispatchEvent(x)},y=E=>{const x=new CustomEvent("photon-order-created",{composed:!0,bubbles:!0,detail:{order:E}});r?.dispatchEvent(x)},b=E=>{const x=new CustomEvent("photon-prescriptions-error",{composed:!0,bubbles:!0,detail:{errors:E}});r?.dispatchEvent(x)},g=E=>{const x=new CustomEvent("photon-order-error",{composed:!0,bubbles:!0,detail:{errors:E}});r?.dispatchEvent(x)},_=E=>{const x=new CustomEvent("photon-form-validate",{composed:!0,bubbles:!0,detail:{canSubmit:E,form:n,actions:i}});r?.dispatchEvent(x)},S=async E=>{const x=E?["patient","draftPrescriptions","pharmacy","address"]:["patient","draftPrescriptions"];if(i.validate(x),!i.hasErrors(x)){l(!0),i.updateFormValue({key:"errors",value:[]});const M=o.getSDK().clinical.order.createOrder({}),j=o.getSDK().clinical.prescription.createPrescriptions({}),q=[];for(const F of n.draftPrescriptions.value){const z={daysSupply:F.daysSupply,dispenseAsWritten:F.dispenseAsWritten,dispenseQuantity:F.dispenseQuantity,dispenseUnit:F.dispenseUnit,effectiveDate:F.effectiveDate,instructions:F.instructions,notes:F.notes,patientId:n.patient?.value.id,fillsAllowed:F.refillsInput?F.refillsInput+1:1,treatmentId:F.treatment.id};q.push(z)}const{data:A,errors:T}=await j({variables:{prescriptions:q},refetchQueries:[],awaitRefetchQueries:!1});if(e.enableOrder||l(!1),T){b(T);return}if(v(A.createPrescriptions),e.enableOrder){const F=Object.assign({},n.patient?.value.address);delete F.__typename,delete F.name;const{data:z,errors:Y}=await M({variables:{patientId:n.patient?.value.id,pharmacyId:e?.pharmacyId||n.pharmacy?.value.id,address:F,fills:A?.createPrescriptions.map(ne=>({prescriptionId:ne.id}))},refetchQueries:[],awaitRefetchQueries:!1});if(e.enableOrder&&l(!1),Y){g(Y);return}y(z.createOrder)}}};return t.element.submitForm=S,xe(()=>{_(Boolean(n.draftPrescriptions?.value?.length>0&&n.patient?.value))}),(()=>{const E=MP.cloneNode(!0),x=E.firstChild,N=x.nextSibling,M=N.nextSibling,j=M.nextSibling,q=j.nextSibling,A=q.firstChild,T=r;return typeof T=="function"?ee(T,E):r=E,w(x,ze),w(N,Vt),w(M,Ut),w(j,n7),w(A,U(re,{get when(){return pe(()=>!!(!o||c()))()&&!p()},get children(){const F=V(()=>document.importNode(DP,!0)),z=F.firstChild;return z._$owner=P(),F}}),null),w(A,U(re,{get when(){return pe(()=>!!(o&&!p()))()&&f()},get children(){const F=V(()=>document.importNode(RP,!0)),z=F.firstChild;return F._$owner=P(),z._$owner=P(),F}}),null),w(A,U(re,{get when(){return o&&p()},get children(){return[U(vP,{actions:i,store:n,get patientId(){return e.patientId},client:o,get enableOrder(){return e.enableOrder}}),U(re,{get when(){return a()},get children(){return U(oP,{get hideAddToTemplates(){return e.hideTemplates},actions:i,store:n})}}),U(xP,{actions:i,store:n,get isLoading(){return u()}}),U(re,{get when(){return e.enableOrder&&!e.pharmacyId},get children(){return U(PP,{store:n,actions:i})}}),U(re,{get when(){return e.enableOrder&&e.pharmacyId},get children(){return U(AP,{get pharmacyId(){return e.pharmacyId}})}}),U(re,{get when(){return!e.hideSubmit},get children(){const F=V(()=>document.importNode(LP,!0)),z=F.firstChild;return w(F,U(re,{get when(){return!a()},get children(){const Y=V(()=>document.importNode(FP,!0));return Y.addEventListener("photon-clicked",async()=>s(!0)),Y._$owner=P(),Y}}),z),z.addEventListener("photon-clicked",async()=>await S(e.enableOrder)),z._$owner=P(),w(z,()=>e.enableOrder?"Send Order":"Save Prescriptions"),W(()=>z.loading=c()),F}})]}}),null),E})()});const zP=C('<p class="font-sans text-l font-medium"></p>'),UP=C('<sl-icon-button class="self-start"></sl-icon-button>'),VP=C("<style></style>"),BP=C('<div class="rounded-lg bg-white p-4 shadow-card border border-gray-200"></div>'),WP=C('<div class="flex flex-row justify-between"></div>'),qP=C("<slot></slot>");$e("photon-card",{invalid:!1,title:null,collapsable:!1},e=>{const[t,r]=L(!0);let n=null,i=null;return e.title&&(n=(()=>{const o=zP.cloneNode(!0);return w(o,()=>e.title),o})()),e.collapsable&&(i=(()=>{const o=V(()=>document.importNode(UP,!0));return o.addEventListener("click",()=>{r(!t())}),o._$owner=P(),W(()=>o.name=t()?"chevron-right":"chevron-down"),o})()),[(()=>{const o=VP.cloneNode(!0);return w(o,ze),o})(),(()=>{const o=BP.cloneNode(!0);return w(o,n||i?(()=>{const a=WP.cloneNode(!0);return w(a,n,null),w(a,i,null),a})():null,null),w(o,(()=>{const a=pe(()=>!!(e.collapsable&&t()));return()=>a()?null:(()=>{const s=qP.cloneNode(!0);return s._$owner=P(),s})()})(),null),W(a=>{const s=!!e.invalid,c=!!e.invalid;return s!==a._v$&&o.classList.toggle("border-red-500",a._v$=s),c!==a._v$2&&o.classList.toggle("border-2",a._v$2=c),a},{_v$:void 0,_v$2:void 0}),o})()]});const HP=Wo`
2897
+ `;$e("photon-prescribe-workflow",{patientId:void 0,templateIds:void 0,hideSubmit:!1,hideTemplates:!0,enableOrder:!1,pharmacyId:void 0,loading:!1},(e,t)=>{let r;const{store:n,actions:i}=k2({dispenseAsWritten:!1,patient:void 0,treatment:void 0,draftPrescriptions:[],pharmacy:void 0,errors:[],address:void 0}),o=at(),[a,s]=M(!e.templateIds),[c,l]=M(!0),[u,d]=M(!1),[f,h]=M(!1),[p,m]=M(o?.authentication.state.isAuthenticated||!1);xe(()=>{!o?.authentication.state.isAuthenticated&&!o?.authentication.state.isLoading&&!o?.authentication.state.error&&o?.authentication.login({appState:{returnTo:window.location.pathname}})}),xe(()=>{l(o?.authentication.state.isLoading||!1)},[o?.authentication.state.isLoading]),xe(()=>{m(o?.authentication.state.isAuthenticated||!1)},[o?.authentication.state.isAuthenticated]),xe(()=>{h(!!o?.authentication.state.error)},[o?.authentication.state.error]),xe(async()=>{if(e.templateIds&&o){d(!0);const E=e.templateIds.split(","),{data:{catalogs:x}}=await o.getSDK().clinical.catalog.getCatalogs();if(x.length===0){console.error("No catalog set");return}const{data:{catalog:T}}=await o.getSDK().clinical.catalog.getCatalog({id:x[0].id,fragment:{CatalogTreatmentsFields:jP}}),j={};T.templates.forEach(z=>{z&&(j[z.id]=z)});for(let z=0;z<E.length;z++){const K=E[z],D=j[K];D||console.error(`Invalid template id ${K}`),(!D.treatment||!D.dispenseQuantity||!D.dispenseUnit||!D.fillsAllowed||!D.instructions)&&console.error(`Template is missing required prescription details ${K}`),i.updateFormValue({key:"draftPrescriptions",value:[...n.draftPrescriptions?.value||[],{id:String(Math.random()),effectiveDate:oc(new Date,"yyyy-MM-dd").toString(),treatment:D.treatment,dispenseAsWritten:D.dispenseAsWritten,dispenseQuantity:D.dispenseQuantity,dispenseUnit:D.dispenseUnit,daysSupply:D.daysSupply,refillsInput:D.fillsAllowed?D.fillsAllowed-1:0,fillsAllowed:D.fillsAllowed,instructions:D.instructions,notes:D.notes,addToTemplates:!1,catalogId:void 0}]})}d(!1)}},[o]);const v=E=>{const x=new CustomEvent("photon-prescriptions-created",{composed:!0,bubbles:!0,detail:{prescriptions:E}});r?.dispatchEvent(x)},y=E=>{const x=new CustomEvent("photon-order-created",{composed:!0,bubbles:!0,detail:{order:E}});r?.dispatchEvent(x)},b=E=>{const x=new CustomEvent("photon-prescriptions-error",{composed:!0,bubbles:!0,detail:{errors:E}});r?.dispatchEvent(x)},g=E=>{const x=new CustomEvent("photon-order-error",{composed:!0,bubbles:!0,detail:{errors:E}});r?.dispatchEvent(x)},_=E=>{const x=new CustomEvent("photon-form-validate",{composed:!0,bubbles:!0,detail:{canSubmit:E,form:n,actions:i}});r?.dispatchEvent(x)},k=async E=>{const x=E?["patient","draftPrescriptions","pharmacy","address"]:["patient","draftPrescriptions"];if(i.validate(x),!i.hasErrors(x)){l(!0),i.updateFormValue({key:"errors",value:[]});const j=o.getSDK().clinical.order.createOrder({}),z=o.getSDK().clinical.prescription.createPrescriptions({}),K=[];for(const R of n.draftPrescriptions.value){const F={daysSupply:R.daysSupply,dispenseAsWritten:R.dispenseAsWritten,dispenseQuantity:R.dispenseQuantity,dispenseUnit:R.dispenseUnit,effectiveDate:R.effectiveDate,instructions:R.instructions,notes:R.notes,patientId:n.patient?.value.id,fillsAllowed:R.refillsInput?R.refillsInput+1:1,treatmentId:R.treatment.id};K.push(F)}const{data:D,errors:L}=await z({variables:{prescriptions:K},refetchQueries:[],awaitRefetchQueries:!1});if(e.enableOrder||l(!1),L){b(L);return}if(v(D.createPrescriptions),e.enableOrder){const R=Object.assign({},n.patient?.value.address);delete R.__typename,delete R.name;const{data:F,errors:q}=await j({variables:{patientId:n.patient?.value.id,pharmacyId:e?.pharmacyId||n.pharmacy?.value.id,address:R,fills:D?.createPrescriptions.map(re=>({prescriptionId:re.id}))},refetchQueries:[],awaitRefetchQueries:!1});if(e.enableOrder&&l(!1),q){g(q);return}y(F.createOrder)}}};return t.element.submitForm=k,xe(()=>{_(Boolean(n.draftPrescriptions?.value?.length>0&&n.patient?.value))}),(()=>{const E=MP.cloneNode(!0),x=E.firstChild,T=x.nextSibling,j=T.nextSibling,z=j.nextSibling,K=z.nextSibling,D=K.firstChild,L=r;return typeof L=="function"?ee(L,E):r=E,w(x,ze),w(T,Vt),w(j,Ut),w(z,n7),w(D,U(ne,{get when(){return pe(()=>!!(!o||c()))()&&!p()},get children(){const R=V(()=>document.importNode(DP,!0)),F=R.firstChild;return F._$owner=P(),R}}),null),w(D,U(ne,{get when(){return pe(()=>!!(o&&!p()))()&&f()},get children(){const R=V(()=>document.importNode(RP,!0)),F=R.firstChild;return R._$owner=P(),F._$owner=P(),R}}),null),w(D,U(ne,{get when(){return o&&p()},get children(){return[U(vP,{actions:i,store:n,get patientId(){return e.patientId},client:o,get enableOrder(){return e.enableOrder}}),U(ne,{get when(){return a()},get children(){return U(oP,{get hideAddToTemplates(){return e.hideTemplates},actions:i,store:n})}}),U(xP,{actions:i,store:n,get isLoading(){return u()}}),U(ne,{get when(){return e.enableOrder&&!e.pharmacyId},get children(){return U(PP,{store:n,actions:i})}}),U(ne,{get when(){return e.enableOrder&&e.pharmacyId},get children(){return U(AP,{get pharmacyId(){return e.pharmacyId}})}}),U(ne,{get when(){return!e.hideSubmit},get children(){const R=V(()=>document.importNode(LP,!0)),F=R.firstChild;return w(R,U(ne,{get when(){return!a()},get children(){const q=V(()=>document.importNode(FP,!0));return q.addEventListener("photon-clicked",async()=>s(!0)),q._$owner=P(),q}}),F),F.addEventListener("photon-clicked",async()=>await k(e.enableOrder)),F._$owner=P(),w(F,()=>e.enableOrder?"Send Order":"Save Prescriptions"),W(()=>F.loading=c()),R}})]}}),null),E})()});const zP=C('<p class="font-sans text-l font-medium"></p>'),UP=C('<sl-icon-button class="self-start"></sl-icon-button>'),VP=C("<style></style>"),BP=C('<div class="rounded-lg bg-white p-4 shadow-card border border-gray-200"></div>'),WP=C('<div class="flex flex-row justify-between"></div>'),qP=C("<slot></slot>");$e("photon-card",{invalid:!1,title:null,collapsable:!1},e=>{const[t,r]=M(!0);let n=null,i=null;return e.title&&(n=(()=>{const o=zP.cloneNode(!0);return w(o,()=>e.title),o})()),e.collapsable&&(i=(()=>{const o=V(()=>document.importNode(UP,!0));return o.addEventListener("click",()=>{r(!t())}),o._$owner=P(),W(()=>o.name=t()?"chevron-right":"chevron-down"),o})()),[(()=>{const o=VP.cloneNode(!0);return w(o,ze),o})(),(()=>{const o=BP.cloneNode(!0);return w(o,n||i?(()=>{const a=WP.cloneNode(!0);return w(a,n,null),w(a,i,null),a})():null,null),w(o,(()=>{const a=pe(()=>!!(e.collapsable&&t()));return()=>a()?null:(()=>{const s=qP.cloneNode(!0);return s._$owner=P(),s})()})(),null),W(a=>{const s=!!e.invalid,c=!!e.invalid;return s!==a._v$&&o.classList.toggle("border-red-500",a._v$=s),c!==a._v$2&&o.classList.toggle("border-2",a._v$2=c),a},{_v$:void 0,_v$2:void 0}),o})()]});const HP=Wo`
2902
2898
  fragment CatalogTreatmentsFields on Catalog {
2903
2899
  id
2904
2900
  treatments {
@@ -2920,7 +2916,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
2920
2916
  }
2921
2917
  }
2922
2918
  }
2923
- `,GP=()=>{const[e,t]=yn({catalogs:{data:[],errors:[],isLoading:!1}});return{store:e,actions:{getCatalogs:async n=>{t("catalogs",{...e.catalogs,isLoading:!0});const{data:i,errors:o}=await n.clinical.catalog.getCatalogs({fragment:{CatalogTreatmentsFields:HP}});t("catalogs",{...e.catalogs,isLoading:!1,data:i.catalogs,errors:o})}}}},QP=GP(),KP=C("<div></div>"),YP=C('<p class="overflow-hidden whitespace-nowrap overflow-ellipsis"></p>'),XP=C('<p class="font-normal pl-4 overflow-hidden whitespace-nowrap overflow-ellipsis">QTY: <!> <!>&nbsp;|&nbsp;Days Supply:&nbsp;<!>&nbsp;|&nbsp;Refills: <!>&nbsp;|&nbsp;Sig: </p>');$e("photon-treatment-select",{label:void 0,required:!1,invalid:!1,helpText:void 0,catalogId:void 0,disabled:!1,formName:void 0,selected:void 0,offCatalogOption:void 0},e=>{let t;const r=at(),{store:n,actions:i}=QP,[o,a]=L("");Tt(async()=>{await i.getCatalogs(r.getSDK())});const s=l=>{const u=new CustomEvent("photon-treatment-selected",{composed:!0,bubbles:!0,detail:{data:l,catalogId:n.catalogs.data[0].id}});t?.dispatchEvent(u)},c=l=>{if(n.catalogs.data.length>0){const u=e.offCatalogOption?[e.offCatalogOption,...n.catalogs.data[0].templates.map(f=>f),...n.catalogs.data[0].treatments.map(f=>f)]:[...n.catalogs.data[0].templates.map(f=>f),...n.catalogs.data[0].treatments.map(f=>f)];return l.length===0?u:u.filter(f=>"treatment"in f?f.treatment.name.toLowerCase().includes(l.toLowerCase()):f.name.toLowerCase().includes(l.toLowerCase()))}return[]};return(()=>{const l=KP.cloneNode(!0),u=t;return typeof u=="function"?ee(u,l):t=l,l.addEventListener("photon-data-selected",d=>{s(d.detail.data)}),w(l,U(Nt,{get data(){return c(o())},groups:[{label:"Off Catalog",filter:d=>e.offCatalogOption?d.id===e.offCatalogOption?.id:!1},{label:"Templates",filter:d=>d?Object.keys(d).includes("treatment"):!1},{label:"Catalog",filter:d=>d?Object.keys(d).includes("name"):!1}],get label(){return e.label},get disabled(){return e.disabled},get required(){return e.required},placeholder:"Select a treatment...",get invalid(){return e.invalid},get isLoading(){return r?.clinical.catalog.state.isLoading||!1},hasMore:!1,get selectedData(){return e.selected??e.offCatalogOption},displayAccessor:(d,f)=>"name"in d?d.name:f?[(()=>{const h=YP.cloneNode(!0);return w(h,()=>d.treatment.name),h})(),(()=>{const h=XP.cloneNode(!0),p=h.firstChild,m=p.nextSibling,v=m.nextSibling,y=v.nextSibling,b=y.nextSibling,g=b.nextSibling,_=g.nextSibling,S=_.nextSibling;return S.nextSibling,w(h,()=>d.dispenseQuantity,m),w(h,()=>d.dispenseUnit,y),w(h,()=>d.daysSupply,g),w(h,()=>d.fillsAllowed?d.fillsAllowed-1:0,S),w(h,()=>d.instructions,null),h})()]:d.treatment.name,onSearchChange:async d=>{a(d)},onOpen:async()=>{n.catalogs.data.length===0&&await i.getCatalogs(r.getSDK())},onHide:async()=>{a("")},get noDataMsg(){return n.catalogs.data.length===0&&!n.catalogs.isLoading?"No catalog found":"No treatments found"},get helpText(){return e.helpText}})),l})()});var ZP=ft`
2919
+ `,GP=()=>{const[e,t]=yn({catalogs:{data:[],errors:[],isLoading:!1}});return{store:e,actions:{getCatalogs:async n=>{t("catalogs",{...e.catalogs,isLoading:!0});const{data:i,errors:o}=await n.clinical.catalog.getCatalogs({fragment:{CatalogTreatmentsFields:HP}});t("catalogs",{...e.catalogs,isLoading:!1,data:i.catalogs,errors:o})}}}},QP=GP(),KP=C("<div></div>"),YP=C('<p class="overflow-hidden whitespace-nowrap overflow-ellipsis"></p>'),XP=C('<p class="font-normal pl-4 overflow-hidden whitespace-nowrap overflow-ellipsis">QTY: <!> <!>&nbsp;|&nbsp;Days Supply:&nbsp;<!>&nbsp;|&nbsp;Refills: <!>&nbsp;|&nbsp;Sig: </p>');$e("photon-treatment-select",{label:void 0,required:!1,invalid:!1,helpText:void 0,catalogId:void 0,disabled:!1,formName:void 0,selected:void 0,offCatalogOption:void 0},e=>{let t;const r=at(),{store:n,actions:i}=QP,[o,a]=M("");Tt(async()=>{await i.getCatalogs(r.getSDK())});const s=l=>{const u=new CustomEvent("photon-treatment-selected",{composed:!0,bubbles:!0,detail:{data:l,catalogId:n.catalogs.data[0].id}});t?.dispatchEvent(u)},c=l=>{if(n.catalogs.data.length>0){const u=e.offCatalogOption?[e.offCatalogOption,...n.catalogs.data[0].templates.map(f=>f),...n.catalogs.data[0].treatments.map(f=>f)]:[...n.catalogs.data[0].templates.map(f=>f),...n.catalogs.data[0].treatments.map(f=>f)];return l.length===0?u:u.filter(f=>"treatment"in f?f.treatment.name.toLowerCase().includes(l.toLowerCase()):f.name.toLowerCase().includes(l.toLowerCase()))}return[]};return(()=>{const l=KP.cloneNode(!0),u=t;return typeof u=="function"?ee(u,l):t=l,l.addEventListener("photon-data-selected",d=>{s(d.detail.data)}),w(l,U(Nt,{get data(){return c(o())},groups:[{label:"Off Catalog",filter:d=>e.offCatalogOption?d.id===e.offCatalogOption?.id:!1},{label:"Templates",filter:d=>d?Object.keys(d).includes("treatment"):!1},{label:"Catalog",filter:d=>d?Object.keys(d).includes("name"):!1}],get label(){return e.label},get disabled(){return e.disabled},get required(){return e.required},placeholder:"Select a treatment...",get invalid(){return e.invalid},get isLoading(){return r?.clinical.catalog.state.isLoading||!1},hasMore:!1,get selectedData(){return e.selected??e.offCatalogOption},displayAccessor:(d,f)=>"name"in d?d.name:f?[(()=>{const h=YP.cloneNode(!0);return w(h,()=>d.treatment.name),h})(),(()=>{const h=XP.cloneNode(!0),p=h.firstChild,m=p.nextSibling,v=m.nextSibling,y=v.nextSibling,b=y.nextSibling,g=b.nextSibling,_=g.nextSibling,k=_.nextSibling;return k.nextSibling,w(h,()=>d.dispenseQuantity,m),w(h,()=>d.dispenseUnit,y),w(h,()=>d.daysSupply,g),w(h,()=>d.fillsAllowed?d.fillsAllowed-1:0,k),w(h,()=>d.instructions,null),h})()]:d.treatment.name,onSearchChange:async d=>{a(d)},onOpen:async()=>{n.catalogs.data.length===0&&await i.getCatalogs(r.getSDK())},onHide:async()=>{a("")},get noDataMsg(){return n.catalogs.data.length===0&&!n.catalogs.isLoading?"No catalog found":"No treatments found"},get helpText(){return e.helpText}})),l})()});var ZP=ft`
2924
2920
  ${wt}
2925
2921
 
2926
2922
  :host {
@@ -3075,7 +3071,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
3075
3071
 
3076
3072
  <slot part="label" class="checkbox__label"></slot>
3077
3073
  </label>
3078
- `}};vt.styles=ZP;$([Xe('input[type="checkbox"]')],vt.prototype,"input",2);$([Er()],vt.prototype,"hasFocus",2);$([k()],vt.prototype,"title",2);$([k()],vt.prototype,"name",2);$([k()],vt.prototype,"value",2);$([k({reflect:!0})],vt.prototype,"size",2);$([k({type:Boolean,reflect:!0})],vt.prototype,"disabled",2);$([k({type:Boolean,reflect:!0})],vt.prototype,"checked",2);$([k({type:Boolean,reflect:!0})],vt.prototype,"indeterminate",2);$([rc("checked")],vt.prototype,"defaultChecked",2);$([k({reflect:!0})],vt.prototype,"form",2);$([k({type:Boolean,reflect:!0})],vt.prototype,"required",2);$([De("disabled",{waitUntilFirstUpdate:!0})],vt.prototype,"handleDisabledChange",1);$([De(["checked","indeterminate"],{waitUntilFirstUpdate:!0})],vt.prototype,"handleStateChange",1);vt=$([_t("sl-checkbox")],vt);var JP=ft`
3074
+ `}};vt.styles=ZP;$([Xe('input[type="checkbox"]')],vt.prototype,"input",2);$([Er()],vt.prototype,"hasFocus",2);$([S()],vt.prototype,"title",2);$([S()],vt.prototype,"name",2);$([S()],vt.prototype,"value",2);$([S({reflect:!0})],vt.prototype,"size",2);$([S({type:Boolean,reflect:!0})],vt.prototype,"disabled",2);$([S({type:Boolean,reflect:!0})],vt.prototype,"checked",2);$([S({type:Boolean,reflect:!0})],vt.prototype,"indeterminate",2);$([rc("checked")],vt.prototype,"defaultChecked",2);$([S({reflect:!0})],vt.prototype,"form",2);$([S({type:Boolean,reflect:!0})],vt.prototype,"required",2);$([De("disabled",{waitUntilFirstUpdate:!0})],vt.prototype,"handleDisabledChange",1);$([De(["checked","indeterminate"],{waitUntilFirstUpdate:!0})],vt.prototype,"handleStateChange",1);vt=$([_t("sl-checkbox")],vt);var JP=ft`
3079
3075
  ${wt}
3080
3076
 
3081
3077
  :host {
@@ -3155,9 +3151,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
3155
3151
  ${this.content}
3156
3152
  </slot>
3157
3153
  </sl-popup>
3158
- `}};yt.styles=JP;$([Xe("slot:not([name])")],yt.prototype,"defaultSlot",2);$([Xe(".tooltip__body")],yt.prototype,"body",2);$([Xe("sl-popup")],yt.prototype,"popup",2);$([k()],yt.prototype,"content",2);$([k()],yt.prototype,"placement",2);$([k({type:Boolean,reflect:!0})],yt.prototype,"disabled",2);$([k({type:Number})],yt.prototype,"distance",2);$([k({type:Boolean,reflect:!0})],yt.prototype,"open",2);$([k({type:Number})],yt.prototype,"skidding",2);$([k()],yt.prototype,"trigger",2);$([k({type:Boolean})],yt.prototype,"hoist",2);$([De("open",{waitUntilFirstUpdate:!0})],yt.prototype,"handleOpenChange",1);$([De(["content","distance","hoist","placement","skidding"])],yt.prototype,"handleOptionsChange",1);$([De("disabled")],yt.prototype,"handleDisabledChange",1);yt=$([_t("sl-tooltip")],yt);ur("tooltip.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:150,easing:"ease"}});ur("tooltip.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:150,easing:"ease"}});const uu=C("<style></style>"),eT=C('<sl-tooltip style="--max-width: 200px;"><sl-icon name="info-circle"></sl-icon></sl-tooltip>');it("https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.0.0-beta.82/dist/");const tT=({tip:e,placement:t="top"})=>[(()=>{const r=uu.cloneNode(!0);return w(r,ze),r})(),(()=>{const r=uu.cloneNode(!0);return w(r,Vt),r})(),(()=>{const r=uu.cloneNode(!0);return w(r,Ut),r})(),(()=>{const r=V(()=>document.importNode(eT,!0)),n=r.firstChild;return r.content=e,r.placement=t,r._$owner=P(),n._$owner=P(),r})()],du=C("<style></style>"),rT=C('<div class="flex items-center py-2"><p class="text-gray-500 text-sm font-medium pt-1 font-sans"></p><p class="text-gray-400 text-xs pt-1 pl-2 font-sans"></p></div>'),nT=C("<sl-checkbox checked></sl-checkbox>"),iT=C("<sl-checkbox></sl-checkbox>");it("https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.0.0-beta.82/dist/");$e("photon-checkbox",{label:void 0,required:!1,disabled:!1,checked:!1,tip:void 0},e=>{const[t,r]=L(!1);let n;const i=o=>{const a=new CustomEvent("photon-checkbox-toggled",{composed:!0,bubbles:!0,detail:{checked:o}});n?.dispatchEvent(a)};return Tt(()=>{i(t())}),xe(()=>{e.checked!==t()&&r(e.checked)}),[(()=>{const o=du.cloneNode(!0);return w(o,ze),o})(),(()=>{const o=du.cloneNode(!0);return w(o,Vt),o})(),(()=>{const o=du.cloneNode(!0);return w(o,Ut),o})(),(()=>{const o=rT.cloneNode(!0),a=o.firstChild,s=a.nextSibling;return w(o,(()=>{const c=pe(()=>!!e.checked);return()=>c()?(()=>{const l=V(()=>document.importNode(nT,!0)),u=n;return typeof u=="function"?ee(u,l):n=l,l.addEventListener("sl-change",d=>{i(!t()),r(!t())}),l._$owner=P(),W(()=>l.disabled=e.disabled),l})():(()=>{const l=V(()=>document.importNode(iT,!0)),u=n;return typeof u=="function"?ee(u,l):n=l,l.addEventListener("sl-change",d=>{i(!t()),r(!t())}),l._$owner=P(),W(()=>l.disabled=e.disabled),l})()})(),a),w(a,()=>e.label,null),w(a,U(re,{get when(){return e.tip},get children(){return U(tT,{get tip(){return e.tip||""},placement:"right"})}}),null),w(s,()=>e.required?"Required":"Optional"),o})()]});const oT=`.input::part(base){border-radius:var(--photon-border-radius, .5rem)}.invalid::part(base){--tw-border-opacity: 1;border-color:rgb(239 68 68/var(--tw-border-opacity));border-width:2px}.invalid::part(form-control-help-text){--tw-text-opacity: 1;color:rgb(239 68 68/var(--tw-text-opacity));font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";padding-top:.5rem}
3159
- `,ha=C("<style></style>"),aT=C('<div class="pb-2 flex flex-col"><sl-input class="input" type="date"></sl-input></div>'),sT=C('<div class="flex items-center pb-2"><p class="text-gray-700 text-sm font-sans"></p></div>'),lT=C('<p class="pl-1 text-red-500">*</p>');it("https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.0.0-beta.82/dist/");$e("photon-datepicker",{label:void 0,required:!1,invalid:!1,helpText:void 0,disabled:!1},e=>{let t;const r=ic(new Date,"yyyy-MM-dd").toString(),n=i=>{const o=new CustomEvent("photon-datepicker-selected",{composed:!0,bubbles:!0,detail:{date:i}});t?.dispatchEvent(o)};return Tt(()=>{n(r)}),[(()=>{const i=ha.cloneNode(!0);return w(i,ze),i})(),(()=>{const i=ha.cloneNode(!0);return w(i,Vt),i})(),(()=>{const i=ha.cloneNode(!0);return w(i,Ut),i})(),(()=>{const i=ha.cloneNode(!0);return w(i,oT),i})(),(()=>{const i=V(()=>document.importNode(aT,!0)),o=i.firstChild,a=t;return typeof a=="function"?ee(a,i):t=i,w(i,(()=>{const s=pe(()=>!!e.label);return()=>s()?(()=>{const c=sT.cloneNode(!0),l=c.firstChild;return w(l,()=>e.label),w(c,(()=>{const u=pe(()=>!!e.required);return()=>u()?lT.cloneNode(!0):null})(),null),c})():null})(),o),o.addEventListener("sl-input",s=>{n(s.target.value)}),o.value=r,o._$owner=P(),W(s=>{const c=e.disabled,l=!!e.invalid,u=e.helpText,d=e.invalid;return c!==s._v$&&(o.disabled=s._v$=c),l!==s._v$2&&o.classList.toggle("invalid",s._v$2=l),u!==s._v$3&&(o.helpText=s._v$3=u),d!==s._v$4&&(o.invalid=s._v$4=d),s},{_v$:void 0,_v$2:void 0,_v$3:void 0,_v$4:void 0}),i})()]});const cT=`.input::part(base){border-radius:var(--photon-border-radius, .5rem)}.invalid::part(base){--tw-border-opacity: 1;border-color:rgb(239 68 68/var(--tw-border-opacity));border-width:2px}.invalid::part(form-control-help-text){--tw-text-opacity: 1;color:rgb(239 68 68/var(--tw-text-opacity))}
3160
- `,pa=C("<style></style>"),uT=C('<div class="py-2 flex flex-col font-sans"><sl-input class="input" type="number"><p slot="help-text" class="text-red-500 pt-2 h-[21px] font-sans"></p></sl-input></div>'),dT=C('<div class="flex items-center pb-2"><p class="text-gray-700 text-sm"></p></div>'),fT=C('<p class="pl-1 text-red-500">*</p>');it("https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.0.0-beta.82/dist/");$e("photon-number-input",{label:void 0,required:!1,value:void 0,formName:void 0,min:void 0,max:void 0,invalid:!1,helpText:void 0,disabled:!1},e=>{let t;const r=n=>{const i=new CustomEvent("photon-input-changed",{composed:!0,bubbles:!0,detail:{input:n}});t?.dispatchEvent(i)};return Tt(()=>{r(e.value??0)}),[(()=>{const n=pa.cloneNode(!0);return w(n,ze),n})(),(()=>{const n=pa.cloneNode(!0);return w(n,Vt),n})(),(()=>{const n=pa.cloneNode(!0);return w(n,Ut),n})(),(()=>{const n=pa.cloneNode(!0);return w(n,cT),n})(),(()=>{const n=V(()=>document.importNode(uT,!0)),i=n.firstChild,o=i.firstChild,a=t;return typeof a=="function"?ee(a,n):t=n,w(n,(()=>{const s=pe(()=>!!e.label);return()=>s()?(()=>{const c=dT.cloneNode(!0),l=c.firstChild;return w(l,()=>e.label),w(c,(()=>{const u=pe(()=>!!e.required);return()=>u()?fT.cloneNode(!0):null})(),null),c})():null})(),i),i.addEventListener("sl-input",s=>{r(s.target.value)}),i.addEventListener("wheel",s=>{s.preventDefault(),s.stopPropagation(),s.stopImmediatePropagation()}),i._$owner=P(),w(o,()=>e.helpText),W(s=>{const c=!!e.invalid,l=e.disabled,u=e.min,d=e.max,f=e.invalid;return c!==s._v$&&i.classList.toggle("invalid",s._v$=c),l!==s._v$2&&(i.disabled=s._v$2=l),u!==s._v$3&&(i.min=s._v$3=u),d!==s._v$4&&(i.max=s._v$4=d),f!==s._v$5&&(i.invalid=s._v$5=f),s},{_v$:void 0,_v$2:void 0,_v$3:void 0,_v$4:void 0,_v$5:void 0}),W(()=>i.value=e.value),n})()]});const hT=()=>{const[e,t]=yn({dispenseUnits:{data:[],errors:[],isLoading:!1}});return{store:e,actions:{getDispenseUnits:async n=>{t("dispenseUnits",{...e.dispenseUnits,isLoading:!0});const{data:i,errors:o}=await n.clinical.prescription.getDispenseUnits();t("dispenseUnits",{...e.dispenseUnits,isLoading:!1,data:i.dispenseUnits.map((a,s)=>({id:s.toString(),...a})),errors:o})}}}},pT=hT(),mT=C("<div></div>");$e("photon-dispense-units",{label:void 0,required:!1,invalid:!1,helpText:void 0,formName:void 0,disabled:!1,forceLabelSize:!1,selected:void 0},e=>{let t;const r=at(),{store:n,actions:i}=pT,[o,a]=L(""),s=l=>{const u=new CustomEvent("photon-dispense-unit-selected",{composed:!0,bubbles:!0,detail:{dispenseUnit:{name:l.name}}});t?.dispatchEvent(u)};Tt(async()=>{await i.getDispenseUnits(r.getSDK())});const c=l=>{if(n.dispenseUnits.data.length>0){const u=n.dispenseUnits.data;return l.length===0?u:u.filter(d=>d.name.toLowerCase().includes(l.toLowerCase()))}return[]};return(()=>{const l=mT.cloneNode(!0),u=t;return typeof u=="function"?ee(u,l):t=l,l.addEventListener("photon-data-selected",d=>{s(d.detail.data)}),w(l,U(Nt,{get data(){return c(o())},get label(){return e.label},get disabled(){return e.disabled},get required(){return e.required},get forceLabelSize(){return e.forceLabelSize},placeholder:"Select a dispense unit...",get invalid(){return e.invalid},get isLoading(){return r?.clinical.dispenseUnits.state.isLoading||!1},hasMore:!1,get selectedData(){return pe(()=>!!e.selected)()?n.dispenseUnits.data?.filter(d=>d.name===e.selected)[0]:n.dispenseUnits.data?.[0]},displayAccessor:d=>d.name,onSearchChange:async d=>{a(d)},onHide:async()=>{a("")},noDataMsg:"No dispense units found",get helpText(){return e.helpText}})),l})()});var vT=ft`
3154
+ `}};yt.styles=JP;$([Xe("slot:not([name])")],yt.prototype,"defaultSlot",2);$([Xe(".tooltip__body")],yt.prototype,"body",2);$([Xe("sl-popup")],yt.prototype,"popup",2);$([S()],yt.prototype,"content",2);$([S()],yt.prototype,"placement",2);$([S({type:Boolean,reflect:!0})],yt.prototype,"disabled",2);$([S({type:Number})],yt.prototype,"distance",2);$([S({type:Boolean,reflect:!0})],yt.prototype,"open",2);$([S({type:Number})],yt.prototype,"skidding",2);$([S()],yt.prototype,"trigger",2);$([S({type:Boolean})],yt.prototype,"hoist",2);$([De("open",{waitUntilFirstUpdate:!0})],yt.prototype,"handleOpenChange",1);$([De(["content","distance","hoist","placement","skidding"])],yt.prototype,"handleOptionsChange",1);$([De("disabled")],yt.prototype,"handleDisabledChange",1);yt=$([_t("sl-tooltip")],yt);ur("tooltip.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:150,easing:"ease"}});ur("tooltip.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:150,easing:"ease"}});const du=C("<style></style>"),eT=C('<sl-tooltip style="--max-width: 200px;"><sl-icon name="info-circle"></sl-icon></sl-tooltip>');it("https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.0.0-beta.82/dist/");const tT=({tip:e,placement:t="top"})=>[(()=>{const r=du.cloneNode(!0);return w(r,ze),r})(),(()=>{const r=du.cloneNode(!0);return w(r,Vt),r})(),(()=>{const r=du.cloneNode(!0);return w(r,Ut),r})(),(()=>{const r=V(()=>document.importNode(eT,!0)),n=r.firstChild;return r.content=e,r.placement=t,r._$owner=P(),n._$owner=P(),r})()],fu=C("<style></style>"),rT=C('<div class="flex items-center py-2"><p class="text-gray-500 text-sm font-medium pt-1 font-sans"></p><p class="text-gray-400 text-xs pt-1 pl-2 font-sans"></p></div>'),nT=C("<sl-checkbox checked></sl-checkbox>"),iT=C("<sl-checkbox></sl-checkbox>");it("https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.0.0-beta.82/dist/");$e("photon-checkbox",{label:void 0,required:!1,disabled:!1,checked:!1,tip:void 0},e=>{const[t,r]=M(!1);let n;const i=o=>{const a=new CustomEvent("photon-checkbox-toggled",{composed:!0,bubbles:!0,detail:{checked:o}});n?.dispatchEvent(a)};return Tt(()=>{i(t())}),xe(()=>{e.checked!==t()&&r(e.checked)}),[(()=>{const o=fu.cloneNode(!0);return w(o,ze),o})(),(()=>{const o=fu.cloneNode(!0);return w(o,Vt),o})(),(()=>{const o=fu.cloneNode(!0);return w(o,Ut),o})(),(()=>{const o=rT.cloneNode(!0),a=o.firstChild,s=a.nextSibling;return w(o,(()=>{const c=pe(()=>!!e.checked);return()=>c()?(()=>{const l=V(()=>document.importNode(nT,!0)),u=n;return typeof u=="function"?ee(u,l):n=l,l.addEventListener("sl-change",d=>{i(!t()),r(!t())}),l._$owner=P(),W(()=>l.disabled=e.disabled),l})():(()=>{const l=V(()=>document.importNode(iT,!0)),u=n;return typeof u=="function"?ee(u,l):n=l,l.addEventListener("sl-change",d=>{i(!t()),r(!t())}),l._$owner=P(),W(()=>l.disabled=e.disabled),l})()})(),a),w(a,()=>e.label,null),w(a,U(ne,{get when(){return e.tip},get children(){return U(tT,{get tip(){return e.tip||""},placement:"right"})}}),null),w(s,()=>e.required?"Required":"Optional"),o})()]});const oT=`.input::part(base){border-radius:var(--photon-border-radius, .5rem)}.invalid::part(base){--tw-border-opacity: 1;border-color:rgb(239 68 68/var(--tw-border-opacity));border-width:2px}.invalid::part(form-control-help-text){--tw-text-opacity: 1;color:rgb(239 68 68/var(--tw-text-opacity));font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";padding-top:.5rem}
3155
+ `,ha=C("<style></style>"),aT=C('<div class="pb-2 flex flex-col"><sl-input class="input" type="date"></sl-input></div>'),sT=C('<div class="flex items-center pb-2"><p class="text-gray-700 text-sm font-sans"></p></div>'),lT=C('<p class="pl-1 text-red-500">*</p>');it("https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.0.0-beta.82/dist/");$e("photon-datepicker",{label:void 0,required:!1,invalid:!1,helpText:void 0,disabled:!1},e=>{let t;const r=oc(new Date,"yyyy-MM-dd").toString(),n=i=>{const o=new CustomEvent("photon-datepicker-selected",{composed:!0,bubbles:!0,detail:{date:i}});t?.dispatchEvent(o)};return Tt(()=>{n(r)}),[(()=>{const i=ha.cloneNode(!0);return w(i,ze),i})(),(()=>{const i=ha.cloneNode(!0);return w(i,Vt),i})(),(()=>{const i=ha.cloneNode(!0);return w(i,Ut),i})(),(()=>{const i=ha.cloneNode(!0);return w(i,oT),i})(),(()=>{const i=V(()=>document.importNode(aT,!0)),o=i.firstChild,a=t;return typeof a=="function"?ee(a,i):t=i,w(i,(()=>{const s=pe(()=>!!e.label);return()=>s()?(()=>{const c=sT.cloneNode(!0),l=c.firstChild;return w(l,()=>e.label),w(c,(()=>{const u=pe(()=>!!e.required);return()=>u()?lT.cloneNode(!0):null})(),null),c})():null})(),o),o.addEventListener("sl-input",s=>{n(s.target.value)}),o.value=r,o._$owner=P(),W(s=>{const c=e.disabled,l=!!e.invalid,u=e.helpText,d=e.invalid;return c!==s._v$&&(o.disabled=s._v$=c),l!==s._v$2&&o.classList.toggle("invalid",s._v$2=l),u!==s._v$3&&(o.helpText=s._v$3=u),d!==s._v$4&&(o.invalid=s._v$4=d),s},{_v$:void 0,_v$2:void 0,_v$3:void 0,_v$4:void 0}),i})()]});const cT=`.input::part(base){border-radius:var(--photon-border-radius, .5rem)}.invalid::part(base){--tw-border-opacity: 1;border-color:rgb(239 68 68/var(--tw-border-opacity));border-width:2px}.invalid::part(form-control-help-text){--tw-text-opacity: 1;color:rgb(239 68 68/var(--tw-text-opacity))}
3156
+ `,pa=C("<style></style>"),uT=C('<div class="py-2 flex flex-col font-sans"><sl-input class="input" type="number"><p slot="help-text" class="text-red-500 pt-2 h-[21px] font-sans"></p></sl-input></div>'),dT=C('<div class="flex items-center pb-2"><p class="text-gray-700 text-sm"></p></div>'),fT=C('<p class="pl-1 text-red-500">*</p>');it("https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.0.0-beta.82/dist/");$e("photon-number-input",{label:void 0,required:!1,value:void 0,formName:void 0,min:void 0,max:void 0,invalid:!1,helpText:void 0,disabled:!1},e=>{let t;const r=n=>{const i=new CustomEvent("photon-input-changed",{composed:!0,bubbles:!0,detail:{input:n}});t?.dispatchEvent(i)};return Tt(()=>{r(e.value??0)}),[(()=>{const n=pa.cloneNode(!0);return w(n,ze),n})(),(()=>{const n=pa.cloneNode(!0);return w(n,Vt),n})(),(()=>{const n=pa.cloneNode(!0);return w(n,Ut),n})(),(()=>{const n=pa.cloneNode(!0);return w(n,cT),n})(),(()=>{const n=V(()=>document.importNode(uT,!0)),i=n.firstChild,o=i.firstChild,a=t;return typeof a=="function"?ee(a,n):t=n,w(n,(()=>{const s=pe(()=>!!e.label);return()=>s()?(()=>{const c=dT.cloneNode(!0),l=c.firstChild;return w(l,()=>e.label),w(c,(()=>{const u=pe(()=>!!e.required);return()=>u()?fT.cloneNode(!0):null})(),null),c})():null})(),i),i.addEventListener("sl-input",s=>{r(s.target.value)}),i.addEventListener("wheel",s=>{s.preventDefault(),s.stopPropagation(),s.stopImmediatePropagation()}),i._$owner=P(),w(o,()=>e.helpText),W(s=>{const c=!!e.invalid,l=e.disabled,u=e.min,d=e.max,f=e.invalid;return c!==s._v$&&i.classList.toggle("invalid",s._v$=c),l!==s._v$2&&(i.disabled=s._v$2=l),u!==s._v$3&&(i.min=s._v$3=u),d!==s._v$4&&(i.max=s._v$4=d),f!==s._v$5&&(i.invalid=s._v$5=f),s},{_v$:void 0,_v$2:void 0,_v$3:void 0,_v$4:void 0,_v$5:void 0}),W(()=>i.value=e.value),n})()]});const hT=()=>{const[e,t]=yn({dispenseUnits:{data:[],errors:[],isLoading:!1}});return{store:e,actions:{getDispenseUnits:async n=>{t("dispenseUnits",{...e.dispenseUnits,isLoading:!0});const{data:i,errors:o}=await n.clinical.prescription.getDispenseUnits();t("dispenseUnits",{...e.dispenseUnits,isLoading:!1,data:i.dispenseUnits.map((a,s)=>({id:s.toString(),...a})),errors:o})}}}},pT=hT(),mT=C("<div></div>");$e("photon-dispense-units",{label:void 0,required:!1,invalid:!1,helpText:void 0,formName:void 0,disabled:!1,forceLabelSize:!1,selected:void 0},e=>{let t;const r=at(),{store:n,actions:i}=pT,[o,a]=M(""),s=l=>{const u=new CustomEvent("photon-dispense-unit-selected",{composed:!0,bubbles:!0,detail:{dispenseUnit:{name:l.name}}});t?.dispatchEvent(u)};Tt(async()=>{await i.getDispenseUnits(r.getSDK())});const c=l=>{if(n.dispenseUnits.data.length>0){const u=n.dispenseUnits.data;return l.length===0?u:u.filter(d=>d.name.toLowerCase().includes(l.toLowerCase()))}return[]};return(()=>{const l=mT.cloneNode(!0),u=t;return typeof u=="function"?ee(u,l):t=l,l.addEventListener("photon-data-selected",d=>{s(d.detail.data)}),w(l,U(Nt,{get data(){return c(o())},get label(){return e.label},get disabled(){return e.disabled},get required(){return e.required},get forceLabelSize(){return e.forceLabelSize},placeholder:"Select a dispense unit...",get invalid(){return e.invalid},get isLoading(){return r?.clinical.dispenseUnits.state.isLoading||!1},hasMore:!1,get selectedData(){return pe(()=>!!e.selected)()?n.dispenseUnits.data?.filter(d=>d.name===e.selected)[0]:n.dispenseUnits.data?.[0]},displayAccessor:d=>d.name,onSearchChange:async d=>{a(d)},onHide:async()=>{a("")},noDataMsg:"No dispense units found",get helpText(){return e.helpText}})),l})()});var vT=ft`
3161
3157
  ${wt}
3162
3158
  ${$2}
3163
3159
 
@@ -3321,7 +3317,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
3321
3317
  resize: none;
3322
3318
  overflow-y: hidden;
3323
3319
  }
3324
- `,ye=class extends ht{constructor(){super(...arguments),this.formControlController=new Ho(this),this.hasSlotController=new Go(this,"help-text","label"),this.hasFocus=!1,this.title="",this.name="",this.value="",this.size="medium",this.filled=!1,this.label="",this.helpText="",this.placeholder="",this.rows=4,this.resize="vertical",this.disabled=!1,this.readonly=!1,this.form="",this.required=!1,this.spellcheck=!0,this.defaultValue=""}connectedCallback(){super.connectedCallback(),this.resizeObserver=new ResizeObserver(()=>this.setTextareaHeight()),this.updateComplete.then(()=>{this.setTextareaHeight(),this.resizeObserver.observe(this.input)})}firstUpdated(){this.formControlController.updateValidity()}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.unobserve(this.input)}handleBlur(){this.hasFocus=!1,this.emit("sl-blur")}handleChange(){this.value=this.input.value,this.setTextareaHeight(),this.emit("sl-change")}handleFocus(){this.hasFocus=!0,this.emit("sl-focus")}handleInput(){this.value=this.input.value,this.emit("sl-input")}setTextareaHeight(){this.resize==="auto"?(this.input.style.height="auto",this.input.style.height=`${this.input.scrollHeight}px`):this.input.style.height=void 0}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}handleRowsChange(){this.setTextareaHeight()}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity(),this.setTextareaHeight()}focus(e){this.input.focus(e)}blur(){this.input.blur()}select(){this.input.select()}scrollPosition(e){if(e){typeof e.top=="number"&&(this.input.scrollTop=e.top),typeof e.left=="number"&&(this.input.scrollLeft=e.left);return}return{top:this.input.scrollTop,left:this.input.scrollTop}}setSelectionRange(e,t,r="none"){this.input.setSelectionRange(e,t,r)}setRangeText(e,t,r,n){this.input.setRangeText(e,t,r,n),this.value!==this.input.value&&(this.value=this.input.value),this.value!==this.input.value&&(this.value=this.input.value,this.setTextareaHeight())}checkValidity(){return this.input.checkValidity()}reportValidity(){return this.input.reportValidity()}setCustomValidity(e){this.input.setCustomValidity(e),this.formControlController.updateValidity()}render(){const e=this.hasSlotController.test("label"),t=this.hasSlotController.test("help-text"),r=this.label?!0:!!e,n=this.helpText?!0:!!t;return Ie`
3320
+ `,ge=class extends ht{constructor(){super(...arguments),this.formControlController=new Ho(this),this.hasSlotController=new Go(this,"help-text","label"),this.hasFocus=!1,this.title="",this.name="",this.value="",this.size="medium",this.filled=!1,this.label="",this.helpText="",this.placeholder="",this.rows=4,this.resize="vertical",this.disabled=!1,this.readonly=!1,this.form="",this.required=!1,this.spellcheck=!0,this.defaultValue=""}connectedCallback(){super.connectedCallback(),this.resizeObserver=new ResizeObserver(()=>this.setTextareaHeight()),this.updateComplete.then(()=>{this.setTextareaHeight(),this.resizeObserver.observe(this.input)})}firstUpdated(){this.formControlController.updateValidity()}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.unobserve(this.input)}handleBlur(){this.hasFocus=!1,this.emit("sl-blur")}handleChange(){this.value=this.input.value,this.setTextareaHeight(),this.emit("sl-change")}handleFocus(){this.hasFocus=!0,this.emit("sl-focus")}handleInput(){this.value=this.input.value,this.emit("sl-input")}setTextareaHeight(){this.resize==="auto"?(this.input.style.height="auto",this.input.style.height=`${this.input.scrollHeight}px`):this.input.style.height=void 0}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}handleRowsChange(){this.setTextareaHeight()}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity(),this.setTextareaHeight()}focus(e){this.input.focus(e)}blur(){this.input.blur()}select(){this.input.select()}scrollPosition(e){if(e){typeof e.top=="number"&&(this.input.scrollTop=e.top),typeof e.left=="number"&&(this.input.scrollLeft=e.left);return}return{top:this.input.scrollTop,left:this.input.scrollTop}}setSelectionRange(e,t,r="none"){this.input.setSelectionRange(e,t,r)}setRangeText(e,t,r,n){this.input.setRangeText(e,t,r,n),this.value!==this.input.value&&(this.value=this.input.value),this.value!==this.input.value&&(this.value=this.input.value,this.setTextareaHeight())}checkValidity(){return this.input.checkValidity()}reportValidity(){return this.input.reportValidity()}setCustomValidity(e){this.input.setCustomValidity(e),this.formControlController.updateValidity()}render(){const e=this.hasSlotController.test("label"),t=this.hasSlotController.test("help-text"),r=this.label?!0:!!e,n=this.helpText?!0:!!t;return Ie`
3325
3321
  <div
3326
3322
  part="form-control"
3327
3323
  class=${Ct({"form-control":!0,"form-control--small":this.size==="small","form-control--medium":this.size==="medium","form-control--large":this.size==="large","form-control--has-label":r,"form-control--has-help-text":n})}
@@ -3379,7 +3375,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
3379
3375
  ${this.helpText}
3380
3376
  </slot>
3381
3377
  </div>
3382
- `}};ye.styles=vT;$([Xe(".textarea__control")],ye.prototype,"input",2);$([Er()],ye.prototype,"hasFocus",2);$([k()],ye.prototype,"title",2);$([k()],ye.prototype,"name",2);$([k()],ye.prototype,"value",2);$([k({reflect:!0})],ye.prototype,"size",2);$([k({type:Boolean,reflect:!0})],ye.prototype,"filled",2);$([k()],ye.prototype,"label",2);$([k({attribute:"help-text"})],ye.prototype,"helpText",2);$([k()],ye.prototype,"placeholder",2);$([k({type:Number})],ye.prototype,"rows",2);$([k()],ye.prototype,"resize",2);$([k({type:Boolean,reflect:!0})],ye.prototype,"disabled",2);$([k({type:Boolean,reflect:!0})],ye.prototype,"readonly",2);$([k({reflect:!0})],ye.prototype,"form",2);$([k({type:Boolean,reflect:!0})],ye.prototype,"required",2);$([k({type:Number})],ye.prototype,"minlength",2);$([k({type:Number})],ye.prototype,"maxlength",2);$([k()],ye.prototype,"autocapitalize",2);$([k()],ye.prototype,"autocorrect",2);$([k()],ye.prototype,"autocomplete",2);$([k({type:Boolean})],ye.prototype,"autofocus",2);$([k()],ye.prototype,"enterkeyhint",2);$([k({type:Boolean,converter:{fromAttribute:e=>!(!e||e==="false"),toAttribute:e=>e?"true":"false"}})],ye.prototype,"spellcheck",2);$([k()],ye.prototype,"inputmode",2);$([rc()],ye.prototype,"defaultValue",2);$([De("disabled",{waitUntilFirstUpdate:!0})],ye.prototype,"handleDisabledChange",1);$([De("rows",{waitUntilFirstUpdate:!0})],ye.prototype,"handleRowsChange",1);$([De("value",{waitUntilFirstUpdate:!0})],ye.prototype,"handleValueChange",1);ye=$([_t("sl-textarea")],ye);const yT=`.input::part(base){border-radius:var(--photon-border-radius, .5rem)}.invalid::part(base){--tw-border-opacity: 1;border-color:rgb(239 68 68/var(--tw-border-opacity));border-width:2px}.invalid::part(form-control-help-text){--tw-text-opacity: 1;color:rgb(239 68 68/var(--tw-text-opacity))}
3378
+ `}};ge.styles=vT;$([Xe(".textarea__control")],ge.prototype,"input",2);$([Er()],ge.prototype,"hasFocus",2);$([S()],ge.prototype,"title",2);$([S()],ge.prototype,"name",2);$([S()],ge.prototype,"value",2);$([S({reflect:!0})],ge.prototype,"size",2);$([S({type:Boolean,reflect:!0})],ge.prototype,"filled",2);$([S()],ge.prototype,"label",2);$([S({attribute:"help-text"})],ge.prototype,"helpText",2);$([S()],ge.prototype,"placeholder",2);$([S({type:Number})],ge.prototype,"rows",2);$([S()],ge.prototype,"resize",2);$([S({type:Boolean,reflect:!0})],ge.prototype,"disabled",2);$([S({type:Boolean,reflect:!0})],ge.prototype,"readonly",2);$([S({reflect:!0})],ge.prototype,"form",2);$([S({type:Boolean,reflect:!0})],ge.prototype,"required",2);$([S({type:Number})],ge.prototype,"minlength",2);$([S({type:Number})],ge.prototype,"maxlength",2);$([S()],ge.prototype,"autocapitalize",2);$([S()],ge.prototype,"autocorrect",2);$([S()],ge.prototype,"autocomplete",2);$([S({type:Boolean})],ge.prototype,"autofocus",2);$([S()],ge.prototype,"enterkeyhint",2);$([S({type:Boolean,converter:{fromAttribute:e=>!(!e||e==="false"),toAttribute:e=>e?"true":"false"}})],ge.prototype,"spellcheck",2);$([S()],ge.prototype,"inputmode",2);$([rc()],ge.prototype,"defaultValue",2);$([De("disabled",{waitUntilFirstUpdate:!0})],ge.prototype,"handleDisabledChange",1);$([De("rows",{waitUntilFirstUpdate:!0})],ge.prototype,"handleRowsChange",1);$([De("value",{waitUntilFirstUpdate:!0})],ge.prototype,"handleValueChange",1);ge=$([_t("sl-textarea")],ge);const yT=`.input::part(base){border-radius:var(--photon-border-radius, .5rem)}.invalid::part(base){--tw-border-opacity: 1;border-color:rgb(239 68 68/var(--tw-border-opacity));border-width:2px}.invalid::part(form-control-help-text){--tw-text-opacity: 1;color:rgb(239 68 68/var(--tw-text-opacity))}
3383
3379
  `,ma=C("<style></style>"),gT=C('<div class="py-2 flex flex-col"><sl-textarea class="input"><p slot="help-text" class="text-red-500 pt-2 h-[21px] font-sans"></p></sl-textarea></div>'),bT=C('<div class="flex items-center pb-2 font-sans"><p class="text-gray-700 text-sm"></p></div>'),$T=C('<p class="pl-1 text-red-500">*</p>'),wT=C('<p class="text-gray-400 text-xs pl-2">Optional</p>');it("https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.0.0-beta.82/dist/");$e("photon-textarea",{label:void 0,required:!1,placeholder:void 0,value:void 0,formName:void 0,helpText:void 0,invalid:!1,disabled:!1},e=>{let t;const r=n=>{const i=new CustomEvent("photon-textarea-changed",{composed:!0,bubbles:!0,detail:{value:n}});t?.dispatchEvent(i)};return Tt(()=>{r(e.value??"")}),[(()=>{const n=ma.cloneNode(!0);return w(n,ze),n})(),(()=>{const n=ma.cloneNode(!0);return w(n,Vt),n})(),(()=>{const n=ma.cloneNode(!0);return w(n,Ut),n})(),(()=>{const n=ma.cloneNode(!0);return w(n,yT),n})(),(()=>{const n=V(()=>document.importNode(gT,!0)),i=n.firstChild,o=i.firstChild,a=t;return typeof a=="function"?ee(a,n):t=n,w(n,(()=>{const s=pe(()=>!!e.label);return()=>s()?(()=>{const c=bT.cloneNode(!0),l=c.firstChild;return w(l,()=>e.label),w(c,(()=>{const u=pe(()=>!!e.required);return()=>u()?$T.cloneNode(!0):null})(),null),w(c,(()=>{const u=pe(()=>!e.required);return()=>u()?wT.cloneNode(!0):null})(),null),c})():null})(),i),i.addEventListener("sl-input",s=>{r(s.target.value)}),i._$owner=P(),w(o,()=>e.helpText),W(s=>{const c=!!e.invalid,l=e.disabled,u=e.invalid,d=e.placeholder;return c!==s._v$&&i.classList.toggle("invalid",s._v$=c),l!==s._v$2&&(i.disabled=s._v$2=l),u!==s._v$3&&(i.invalid=s._v$3=u),d!==s._v$4&&(i.placeholder=s._v$4=d),s},{_v$:void 0,_v$2:void 0,_v$3:void 0,_v$4:void 0}),W(()=>i.value=e.value?e.value:""),n})()]});const _T=`.button{border-radius:var(--photon-border-radius, .375rem);--tw-text-opacity: 1;color:rgb(209 213 219/var(--tw-text-opacity))}.button:disabled{cursor:not-allowed}.button--solid{--tw-bg-opacity: 1;background-color:rgb(49 130 206/var(--tw-bg-opacity))}.button--solid:hover:disabled{background-color:#3182ce99}.button--solid:disabled{background-color:#3182ce99}.button--solid{--tw-text-opacity: 1;color:rgb(255 255 255/var(--tw-text-opacity))}.button--solid:hover{--tw-bg-opacity: 1;background-color:rgb(43 108 176/var(--tw-bg-opacity))}.button--outline{--tw-text-opacity: 1;color:rgb(49 130 206/var(--tw-text-opacity))}.button--outline:disabled{color:#3182ce99}.button--outline{border-width:1px}.button--outline:disabled{border-color:#3182ce99}.button--outline{--tw-border-opacity: 1;border-color:rgb(49 130 206/var(--tw-border-opacity))}.button--outline:hover{background-color:#3182ce33}.button--xs{height:1.5rem;padding-left:.5rem;padding-right:.5rem;font-size:.875rem;line-height:1.25rem}.button--sm{height:2rem;padding-left:.625rem;padding-right:.625rem;font-size:.875rem;line-height:1.25rem}.button--md{height:2.5rem;padding-left:1rem;padding-right:1rem}.button--lg{height:3rem;padding-left:1.5rem;padding-right:1.5rem;font-size:1.125rem;line-height:1.75rem}.spinner--solid{--indicator-color: white;--track-color: none}.spinner--outline{--indicator-color: rgb(49 130 206 / .6);--track-color: none}
3384
3380
  `,va=C("<style></style>"),xT=C('<button class="rounded-lg font-sans transition ease-in-out delay-50 flex items-center gap-2"><slot name="suffix"></slot><slot name="postfix"></slot></button>'),ST=C('<p class="w-full"><slot></slot></p>'),kT=C('<div class="pt-[3px]"><sl-spinner class="w-[16px]"></sl-spinner></div>'),ET=C('<p class="w-full"></p>');it("https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.0.0-beta.82/dist/");$e("photon-button",{disabled:!1,loading:!1,loadingText:void 0,full:!1,variant:"solid",size:"md"},e=>{let t;const r=()=>{const n=new CustomEvent("photon-clicked",{composed:!0,bubbles:!0,detail:{}});t?.dispatchEvent(n)};return[(()=>{const n=va.cloneNode(!0);return w(n,ze),n})(),(()=>{const n=va.cloneNode(!0);return w(n,Vt),n})(),(()=>{const n=va.cloneNode(!0);return w(n,Ut),n})(),(()=>{const n=va.cloneNode(!0);return w(n,_T),n})(),(()=>{const n=xT.cloneNode(!0),i=n.firstChild,o=i.nextSibling;n.$$click=()=>r();const a=t;return typeof a=="function"?ee(a,n):t=n,i._$owner=P(),w(n,(()=>{const s=pe(()=>!e.loading);return()=>s()?(()=>{const c=ST.cloneNode(!0),l=c.firstChild;return l._$owner=P(),c})():null})(),o),w(n,(()=>{const s=pe(()=>!!e.loading);return()=>s()?(()=>{const c=V(()=>document.importNode(kT,!0)),l=c.firstChild;return l._$owner=P(),W(u=>{const d=e.variant==="solid",f=e.variant==="outline";return d!==u._v$3&&l.classList.toggle("spinner--solid",u._v$3=d),f!==u._v$4&&l.classList.toggle("spinner--outline",u._v$4=f),u},{_v$3:void 0,_v$4:void 0}),c})():null})(),o),w(n,(()=>{const s=pe(()=>!!(e.loading&&e.loadingText));return()=>s()?(()=>{const c=ET.cloneNode(!0);return w(c,()=>e.loadingText),c})():null})(),o),o._$owner=P(),W(s=>{const c=e.disabled||e.loading,l={button:!0,"button--solid":e.variant==="solid","button--outline":e.variant==="outline","button--lg":e.size=="lg","button--md":e.size=="md","button--sm":e.size=="sm","button--xs":e.size=="xs","xs:w-fit":!0,"w-full":!0};return c!==s._v$&&(n.disabled=s._v$=c),s._v$2=O$(n,l,s._v$2),s},{_v$:void 0,_v$2:void 0}),n})()]});Ni(["click"]);const OT=Wo`
3385
3381
  fragment PatientPharmacyFields on Patient {
@@ -3397,7 +3393,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
3397
3393
  phone
3398
3394
  }
3399
3395
  }
3400
- `,CT=()=>{const[e,t]=yn({pharmacies:{data:[],address:void 0,errors:[],isLoading:!1},selectedPharmacy:{data:void 0,errors:[],isLoading:!1},preferredPharmacies:{data:void 0,errors:[],isLoading:!1}}),r=async(l,u,d,f)=>{try{const h=await u.geocode({address:d}),p=h.results[0].geometry.location.lat(),m=h.results[0].geometry.location.lng(),v=h.results[0].formatted_address;if(v&&t("pharmacies",{...e.pharmacies,address:v,errors:[]}),!p||!m){t("pharmacies",{...e.pharmacies,errors:[new Error("An unexpected error occured")]});return}await n(l,{name:f,location:{latitude:p,longitude:m,radius:20}})}catch(h){console.log("ERR",h),t("pharmacies",{...e.pharmacies,errors:[new Error("The provided address seems invalid. Please revise and try again.")]})}},n=async(l,u)=>{t("pharmacies",{...e.pharmacies,isLoading:!0});const{data:d,errors:f}=await l.clinical.pharmacy.getPharmacies({name:u.name,location:u.location,first:u.first,type:"PICK_UP"});t("pharmacies",{...e.pharmacies,isLoading:!1,data:d.pharmacies,errors:f})};return{store:e,actions:{getPharmacies:n,getPharmaciesByAddress:r,getPharmacy:async(l,u)=>{t("selectedPharmacy",{...e.selectedPharmacy,isLoading:!0});const{data:d,errors:f}=await l.clinical.pharmacy.getPharmacy({id:u});(e.pharmacies.errors||[]).filter(h=>h.message.includes("seems invalid")||h.message.includes("unexpected error")).length>0&&t("pharmacies",{...e.pharmacies,errors:[]}),t("selectedPharmacy",{...e.selectedPharmacy,isLoading:!1,data:d.pharmacy,errors:f})},clearSelectedPharmacy:()=>{t("selectedPharmacy",{...e.selectedPharmacy,data:void 0,errors:[]})},getPreferredPharmacies:async(l,u)=>{t("preferredPharmacies",{...e.preferredPharmacies,isLoading:!0});const{data:d,errors:f}=await l.clinical.patient.getPatient({id:u,fragment:{PatientPharmacyFields:OT}});t("preferredPharmacies",{...e.selectedPharmacy,isLoading:!1,data:d.patient.preferredPharmacies?.map(h=>h),errors:f})},clearPreferredPharmacies:()=>{t("preferredPharmacies",{...e.selectedPharmacy,data:[],errors:[]})},reset:async()=>{t("pharmacies",{data:[],errors:[],address:void 0,isLoading:!1}),t("selectedPharmacy",{data:void 0,errors:[],isLoading:!1}),t("preferredPharmacies",{data:void 0,errors:[],isLoading:!1})}}}},V2=CT(),PT=C('<div class="flex flex-row gap-4 items-start"><div class="flex flex-col font-sans text-sm"><p class=" text-gray-500">Showing pharmacies near</p><p></p></div><photon-button class="self-end" variant="outline" size="xs">Change</photon-button></div>'),TT=C('<div class="flex flex-row gap-4 items-center"><div class="flex flex-col font-sans text-sm"><p class=" text-gray-500">Showing preferred pharmacy</p></div><photon-button variant="outline" size="xs">Change</photon-button></div>'),NT=C('<photon-text-input debounce-time="800" label="Enter an address or zip code"></photon-text-input>'),IT=C('<div class="flex flex-col gap-2"></div>');$e("photon-pharmacy-search",{label:void 0,required:!1,invalid:!1,helpText:void 0,selected:"",formName:void 0,disabled:!1,forceLabelSize:!1,address:"",patientId:void 0,geocodingApiKey:"AIzaSyAvuwwE6g2Bsmih66nu4dB7-H7U1_7KQ6g"},e=>{let t;const r=at();let n;const{store:i,actions:o}=V2,[a,s]=L(!1),[c,l]=L(""),[u,d]=L(""),[f,h]=L(""),p=y=>{const b=new CustomEvent("photon-pharmacy-selected",{composed:!0,bubbles:!0,detail:{pharmacy:y}});t?.dispatchEvent(b)},m=()=>{const y=new CustomEvent("photon-pharmacy-removed",{composed:!0,bubbles:!0,detail:{}});t?.dispatchEvent(y)},v=pe(()=>{const y=i.pharmacies.data.filter(b=>!(i.preferredPharmacies.data??[]).map(g=>g.id).includes(b.id)).filter(b=>b.name.toLowerCase().includes(f().toLowerCase()));return i.selectedPharmacy.data&&u()?[i.selectedPharmacy.data,...(i.preferredPharmacies.data??[]).filter(b=>b.id!=i.selectedPharmacy.data?.id),...y]:[...i.preferredPharmacies.data??[],...y]});return Tt(async()=>{const y=document.createElement("script");y.src=`https://maps.googleapis.com/maps/api/js?key=${e.geocodingApiKey}`,document.head.appendChild(y),y.onload=async()=>{n=new google.maps.Geocoder,l(e.address),d(e.selected),e.patientId&&await o.getPreferredPharmacies(r.getSDK(),e.patientId),e.address&&await o.getPharmaciesByAddress(r.getSDK(),n,String(e.address)),e.selected&&await o.getPharmacy(r.getSDK(),e.selected),!e.address&&!e.selected&&s(!0)},y.onerror=b=>{console.error("Error loading Google Maps Geocoding API: ",b)}}),xe(()=>{l(e.address),d(e.selected),!e.selected&&!e.address?s(!0):s(!1),e.selected&&V(async()=>{await o.getPharmacy(r.getSDK(),e.selected)}),e.address&&!e.selected&&V(async()=>{o.clearSelectedPharmacy(),await o.getPharmaciesByAddress(r.getSDK(),n,e.address)})}),(()=>{const y=IT.cloneNode(!0),b=t;return typeof b=="function"?ee(b,y):t=y,y.addEventListener("photon-data-selected",g=>{p(g.detail.data)}),w(y,U(re,{get when(){return c()&&!a()&&(i.pharmacies.errors||[]).length==0},get children(){const g=V(()=>document.importNode(PT,!0)),_=g.firstChild,S=_.firstChild,E=S.nextSibling,x=_.nextSibling;return w(E,()=>i.pharmacies.address),x.addEventListener("photon-clicked",()=>{s(!0)}),x._$owner=P(),g}}),null),w(y,U(re,{get when(){return u()&&!c()&&!a()&&(i.pharmacies.errors||[]).length==0},get children(){const g=V(()=>document.importNode(TT,!0)),_=g.firstChild,S=_.nextSibling;return S.addEventListener("photon-clicked",()=>{m(),s(!0)}),S._$owner=P(),g}}),null),w(y,U(re,{get when(){return a()||(i.pharmacies.errors||[]).filter(g=>g.message.includes("seems invalid")||g.message.includes("unexpected error")).length>0},get children(){const g=V(()=>document.importNode(NT,!0));return g.addEventListener("photon-input-changed",async _=>{await o.getPharmaciesByAddress(r.getSDK(),n,_.detail.input),l(_.detail.input),d(""),o.clearSelectedPharmacy(),s(!1)}),g._$owner=P(),W(_=>{const S=e.invalid||(i.pharmacies.errors||[]).length>0,E=(i.pharmacies.errors||[]).length>0?i.pharmacies.errors[0].message:e.helpText;return S!==_._v$&&(g.invalid=_._v$=S),E!==_._v$2&&(g.helpText=_._v$2=E),_},{_v$:void 0,_v$2:void 0}),g}}),null),w(y,U(re,{get when(){return pe(()=>!!((c()||u())&&!a()))()&&(i.pharmacies.errors||[]).filter(g=>g.message.includes("seems invalid")||g.message.includes("unexpected error")).length==0},get children(){return U(Nt,{get data(){return v()},get groups(){return[...f()===""?[{label:"Preferred Pharmacy",filter:g=>g?(i.preferredPharmacies.data??[]).map(_=>_.id).includes(g.id):!1}]:[],{label:"Pharmacies",filter:g=>g?!(i.preferredPharmacies.data??[]).map(_=>_.id).includes(g.id):!1}]},get label(){return e.label},get forceLabelSize(){return e.forceLabelSize},get required(){return e.required},get disabled(){return e.disabled},placeholder:"Select a pharmacy...",get invalid(){return e.invalid||(i.pharmacies.errors||[]).length>0},get isLoading(){return i.pharmacies.isLoading||i.selectedPharmacy.isLoading},hasMore:!1,displayAccessor:g=>`${g.name}, ${Ep(g.address?.street1||"")}, ${Ep(g.address?.city||"")}, ${g.address?.state||""}`,showOverflow:!0,onSearchChange:async g=>{h(g)},onOpen:async()=>{i.pharmacies.data.length==0&&c()&&n&&await o.getPharmaciesByAddress(r.getSDK(),n,c())},noDataMsg:"No pharmacies found",get helpText(){return(i.pharmacies.errors||[]).length>0?i.pharmacies.errors[0].message:e.helpText},get selectedData(){return u()?i.selectedPharmacy.data:e.patientId?i.preferredPharmacies.data?.[0]:void 0}})}}),null),y})()});const AT=`.input::part(base){border-radius:var(--photon-border-radius, .5rem)}.invalid::part(base){--tw-border-opacity: 1;border-color:rgb(239 68 68/var(--tw-border-opacity));border-width:2px}.invalid::part(form-control-help-text){--tw-text-opacity: 1;color:rgb(239 68 68/var(--tw-text-opacity))}
3396
+ `,CT=()=>{const[e,t]=yn({pharmacies:{data:[],address:void 0,errors:[],isLoading:!1},selectedPharmacy:{data:void 0,errors:[],isLoading:!1},preferredPharmacies:{data:void 0,errors:[],isLoading:!1}}),r=async(l,u,d,f)=>{try{const h=await u.geocode({address:d}),p=h.results[0].geometry.location.lat(),m=h.results[0].geometry.location.lng(),v=h.results[0].formatted_address;if(v&&t("pharmacies",{...e.pharmacies,address:v,errors:[]}),!p||!m){t("pharmacies",{...e.pharmacies,errors:[new Error("An unexpected error occured")]});return}await n(l,{name:f,location:{latitude:p,longitude:m,radius:20}})}catch(h){console.log("ERR",h),t("pharmacies",{...e.pharmacies,errors:[new Error("The provided address seems invalid. Please revise and try again.")]})}},n=async(l,u)=>{t("pharmacies",{...e.pharmacies,isLoading:!0});const{data:d,errors:f}=await l.clinical.pharmacy.getPharmacies({name:u.name,location:u.location,first:u.first,type:"PICK_UP"});t("pharmacies",{...e.pharmacies,isLoading:!1,data:d.pharmacies,errors:f})};return{store:e,actions:{getPharmacies:n,getPharmaciesByAddress:r,getPharmacy:async(l,u)=>{t("selectedPharmacy",{...e.selectedPharmacy,isLoading:!0});const{data:d,errors:f}=await l.clinical.pharmacy.getPharmacy({id:u});(e.pharmacies.errors||[]).filter(h=>h.message.includes("seems invalid")||h.message.includes("unexpected error")).length>0&&t("pharmacies",{...e.pharmacies,errors:[]}),t("selectedPharmacy",{...e.selectedPharmacy,isLoading:!1,data:d.pharmacy,errors:f})},clearSelectedPharmacy:()=>{t("selectedPharmacy",{...e.selectedPharmacy,data:void 0,errors:[]})},getPreferredPharmacies:async(l,u)=>{t("preferredPharmacies",{...e.preferredPharmacies,isLoading:!0});const{data:d,errors:f}=await l.clinical.patient.getPatient({id:u,fragment:{PatientPharmacyFields:OT}});t("preferredPharmacies",{...e.selectedPharmacy,isLoading:!1,data:d.patient.preferredPharmacies?.map(h=>h),errors:f})},clearPreferredPharmacies:()=>{t("preferredPharmacies",{...e.selectedPharmacy,data:[],errors:[]})},reset:async()=>{t("pharmacies",{data:[],errors:[],address:void 0,isLoading:!1}),t("selectedPharmacy",{data:void 0,errors:[],isLoading:!1}),t("preferredPharmacies",{data:void 0,errors:[],isLoading:!1})}}}},V2=CT(),PT=C('<div class="flex flex-row gap-4 items-start"><div class="flex flex-col font-sans text-sm"><p class=" text-gray-500">Showing pharmacies near</p><p></p></div><photon-button class="self-end" variant="outline" size="xs">Change</photon-button></div>'),TT=C('<div class="flex flex-row gap-4 items-center"><div class="flex flex-col font-sans text-sm"><p class=" text-gray-500">Showing preferred pharmacy</p></div><photon-button variant="outline" size="xs">Change</photon-button></div>'),NT=C('<photon-text-input debounce-time="800" label="Enter an address or zip code"></photon-text-input>'),IT=C('<div class="flex flex-col gap-2"></div>');$e("photon-pharmacy-search",{label:void 0,required:!1,invalid:!1,helpText:void 0,selected:"",formName:void 0,disabled:!1,forceLabelSize:!1,address:"",patientId:void 0,geocodingApiKey:"AIzaSyAvuwwE6g2Bsmih66nu4dB7-H7U1_7KQ6g"},e=>{let t;const r=at();let n;const{store:i,actions:o}=V2,[a,s]=M(!1),[c,l]=M(""),[u,d]=M(""),[f,h]=M(""),p=y=>{const b=new CustomEvent("photon-pharmacy-selected",{composed:!0,bubbles:!0,detail:{pharmacy:y}});t?.dispatchEvent(b)},m=()=>{const y=new CustomEvent("photon-pharmacy-removed",{composed:!0,bubbles:!0,detail:{}});t?.dispatchEvent(y)},v=pe(()=>{const y=i.pharmacies.data.filter(b=>!(i.preferredPharmacies.data??[]).map(g=>g.id).includes(b.id)).filter(b=>b.name.toLowerCase().includes(f().toLowerCase()));return i.selectedPharmacy.data&&u()?[i.selectedPharmacy.data,...(i.preferredPharmacies.data??[]).filter(b=>b.id!=i.selectedPharmacy.data?.id),...y]:[...i.preferredPharmacies.data??[],...y]});return Tt(async()=>{const y=document.createElement("script");y.src=`https://maps.googleapis.com/maps/api/js?key=${e.geocodingApiKey}`,document.head.appendChild(y),y.onload=async()=>{n=new google.maps.Geocoder,l(e.address),d(e.selected),e.patientId&&await o.getPreferredPharmacies(r.getSDK(),e.patientId),e.address&&await o.getPharmaciesByAddress(r.getSDK(),n,String(e.address)),e.selected&&await o.getPharmacy(r.getSDK(),e.selected),!e.address&&!e.selected&&s(!0)},y.onerror=b=>{console.error("Error loading Google Maps Geocoding API: ",b)}}),xe(()=>{l(e.address),d(e.selected),!e.selected&&!e.address?s(!0):s(!1),e.selected&&V(async()=>{await o.getPharmacy(r.getSDK(),e.selected)}),e.address&&!e.selected&&V(async()=>{o.clearSelectedPharmacy(),await o.getPharmaciesByAddress(r.getSDK(),n,e.address)})}),(()=>{const y=IT.cloneNode(!0),b=t;return typeof b=="function"?ee(b,y):t=y,y.addEventListener("photon-data-selected",g=>{p(g.detail.data)}),w(y,U(ne,{get when(){return c()&&!a()&&(i.pharmacies.errors||[]).length==0},get children(){const g=V(()=>document.importNode(PT,!0)),_=g.firstChild,k=_.firstChild,E=k.nextSibling,x=_.nextSibling;return w(E,()=>i.pharmacies.address),x.addEventListener("photon-clicked",()=>{s(!0)}),x._$owner=P(),g}}),null),w(y,U(ne,{get when(){return u()&&!c()&&!a()&&(i.pharmacies.errors||[]).length==0},get children(){const g=V(()=>document.importNode(TT,!0)),_=g.firstChild,k=_.nextSibling;return k.addEventListener("photon-clicked",()=>{m(),s(!0)}),k._$owner=P(),g}}),null),w(y,U(ne,{get when(){return a()||(i.pharmacies.errors||[]).filter(g=>g.message.includes("seems invalid")||g.message.includes("unexpected error")).length>0},get children(){const g=V(()=>document.importNode(NT,!0));return g.addEventListener("photon-input-changed",async _=>{await o.getPharmaciesByAddress(r.getSDK(),n,_.detail.input),l(_.detail.input),d(""),o.clearSelectedPharmacy(),s(!1)}),g._$owner=P(),W(_=>{const k=e.invalid||(i.pharmacies.errors||[]).length>0,E=(i.pharmacies.errors||[]).length>0?i.pharmacies.errors[0].message:e.helpText;return k!==_._v$&&(g.invalid=_._v$=k),E!==_._v$2&&(g.helpText=_._v$2=E),_},{_v$:void 0,_v$2:void 0}),g}}),null),w(y,U(ne,{get when(){return pe(()=>!!((c()||u())&&!a()))()&&(i.pharmacies.errors||[]).filter(g=>g.message.includes("seems invalid")||g.message.includes("unexpected error")).length==0},get children(){return U(Nt,{get data(){return v()},get groups(){return[...f()===""?[{label:"Preferred Pharmacy",filter:g=>g?(i.preferredPharmacies.data??[]).map(_=>_.id).includes(g.id):!1}]:[],{label:"Pharmacies",filter:g=>g?!(i.preferredPharmacies.data??[]).map(_=>_.id).includes(g.id):!1}]},get label(){return e.label},get forceLabelSize(){return e.forceLabelSize},get required(){return e.required},get disabled(){return e.disabled},placeholder:"Select a pharmacy...",get invalid(){return e.invalid||(i.pharmacies.errors||[]).length>0},get isLoading(){return i.pharmacies.isLoading||i.selectedPharmacy.isLoading},hasMore:!1,displayAccessor:g=>`${g.name}, ${Ep(g.address?.street1||"")}, ${Ep(g.address?.city||"")}, ${g.address?.state||""}`,showOverflow:!0,onSearchChange:async g=>{h(g)},onOpen:async()=>{i.pharmacies.data.length==0&&c()&&n&&await o.getPharmaciesByAddress(r.getSDK(),n,c())},noDataMsg:"No pharmacies found",get helpText(){return(i.pharmacies.errors||[]).length>0?i.pharmacies.errors[0].message:e.helpText},get selectedData(){return u()?i.selectedPharmacy.data:e.patientId?i.preferredPharmacies.data?.[0]:void 0}})}}),null),y})()});const AT=`.input::part(base){border-radius:var(--photon-border-radius, .5rem)}.invalid::part(base){--tw-border-opacity: 1;border-color:rgb(239 68 68/var(--tw-border-opacity));border-width:2px}.invalid::part(form-control-help-text){--tw-text-opacity: 1;color:rgb(239 68 68/var(--tw-text-opacity))}
3401
3397
  `,ya=C("<style></style>"),DT=C('<div class="py-2 flex flex-col font-sans"><sl-input class="input" type="text"><p slot="help-text" class="text-red-500 pt-2 h-[21px] font-sans"></p></sl-input></div>'),RT=C('<div class="flex items-center pb-2"><p class="text-gray-700 text-sm"></p></div>'),FT=C('<p class="pl-1 text-red-500">*</p>'),LT=C('<p class="text-gray-400 text-xs pl-2 font-sans">Optional</p>');it("https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.0.0-beta.82/dist/");$e("photon-text-input",{label:void 0,required:!1,value:void 0,formName:void 0,invalid:!1,helpText:void 0,disabled:!1,debounceTime:250,dispatchOnMount:!1,optional:!1},e=>{let t;const r=i=>{const o=new CustomEvent("photon-input-changed",{composed:!0,bubbles:!0,detail:{input:i}});t?.dispatchEvent(o)},n=X1(i=>r(i),e.debounceTime);return Tt(()=>{e.dispatchOnMount&&r(e.value??"")}),[(()=>{const i=ya.cloneNode(!0);return w(i,ze),i})(),(()=>{const i=ya.cloneNode(!0);return w(i,Vt),i})(),(()=>{const i=ya.cloneNode(!0);return w(i,Ut),i})(),(()=>{const i=ya.cloneNode(!0);return w(i,AT),i})(),(()=>{const i=V(()=>document.importNode(DT,!0)),o=i.firstChild,a=o.firstChild,s=t;return typeof s=="function"?ee(s,i):t=i,w(i,(()=>{const c=pe(()=>!!e.label);return()=>c()?(()=>{const l=RT.cloneNode(!0),u=l.firstChild;return w(u,()=>e.label),w(l,(()=>{const d=pe(()=>!!e.required);return()=>d()?FT.cloneNode(!0):null})(),null),w(l,(()=>{const d=pe(()=>!!e.optional);return()=>d()?LT.cloneNode(!0):null})(),null),l})():null})(),o),o.addEventListener("sl-input",c=>{n(c.target.value)}),o._$owner=P(),w(a,()=>e.helpText),W(c=>{const l=!!e.invalid,u=e.disabled,d=e.invalid;return l!==c._v$&&o.classList.toggle("invalid",c._v$=l),u!==c._v$2&&(o.disabled=c._v$2=u),d!==c._v$3&&(o.invalid=c._v$3=d),c},{_v$:void 0,_v$2:void 0,_v$3:void 0}),W(()=>o.value=e.value||""),i})()]});var so=[],MT=class{constructor(e){this.tabDirection="forward",this.element=e,this.handleFocusIn=this.handleFocusIn.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleKeyUp=this.handleKeyUp.bind(this)}activate(){so.push(this.element),document.addEventListener("focusin",this.handleFocusIn),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}deactivate(){so=so.filter(e=>e!==this.element),document.removeEventListener("focusin",this.handleFocusIn),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)}isActive(){return so[so.length-1]===this.element}checkFocus(){if(this.isActive()&&!this.element.matches(":focus-within")){const{start:e,end:t}=n2(this.element),r=this.tabDirection==="forward"?e:t;typeof r?.focus=="function"&&r.focus({preventScroll:!0})}}handleFocusIn(){this.checkFocus()}handleKeyDown(e){e.key==="Tab"&&e.shiftKey&&(this.tabDirection="backward",requestAnimationFrame(()=>this.checkFocus()))}handleKeyUp(){this.tabDirection="forward"}},jT=ft`
3402
3398
  ${wt}
3403
3399
 
@@ -3561,28 +3557,28 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
3561
3557
  </footer>
3562
3558
  </div>
3563
3559
  </div>
3564
- `}};xr.styles=jT;$([Xe(".dialog")],xr.prototype,"dialog",2);$([Xe(".dialog__panel")],xr.prototype,"panel",2);$([Xe(".dialog__overlay")],xr.prototype,"overlay",2);$([k({type:Boolean,reflect:!0})],xr.prototype,"open",2);$([k({reflect:!0})],xr.prototype,"label",2);$([k({attribute:"no-header",type:Boolean,reflect:!0})],xr.prototype,"noHeader",2);$([De("open",{waitUntilFirstUpdate:!0})],xr.prototype,"handleOpenChange",1);xr=$([_t("sl-dialog")],xr);ur("dialog.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:250,easing:"ease"}});ur("dialog.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:250,easing:"ease"}});ur("dialog.denyClose",{keyframes:[{scale:1},{scale:1.02},{scale:1}],options:{duration:250}});ur("dialog.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:250}});ur("dialog.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:250}});const zT=`.dialog::part(overlay){background-color:#0000007a}.dialog::part(body){padding-bottom:.25rem}.dialog::part(footer){padding-top:0}.hideFooter::part(footer){display:none}.showHeader::part(body){padding-top:0}.dialog::part(title){font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-weight:500}
3565
- `,ga=C("<style></style>"),UT=C('<slot name="label"><p class="text-xl font-sans font-medium"></p></slot>'),VT=C('<sl-dialog class="dialog"><div class="font-sans py-4"><slot></slot></div><div class="flex flex-col xs:flex-row justify-end gap-2" slot="footer"><photon-button variant="outline"></photon-button><photon-button></photon-button></div></sl-dialog>');it("https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.0.0-beta.82/dist/");$e("photon-dialog",{label:void 0,header:!0,open:!1,confirmText:"Yes, Cancel",cancelText:"No, Keep Editing",disableButtons:!1,loading:!1,hideFooter:!1,disableSubmit:!1,width:"500px",overlayClose:!1},e=>{let t;const r=n=>{const i=new CustomEvent(n?"photon-dialog-confirmed":"photon-dialog-canceled",{composed:!0,bubbles:!0,detail:{}});t?.dispatchEvent(i)};return[(()=>{const n=ga.cloneNode(!0);return w(n,ze),n})(),(()=>{const n=ga.cloneNode(!0);return w(n,Vt),n})(),(()=>{const n=ga.cloneNode(!0);return w(n,Ut),n})(),(()=>{const n=ga.cloneNode(!0);return w(n,zT),n})(),(()=>{const n=V(()=>document.importNode(VT,!0)),i=n.firstChild,o=i.firstChild,a=i.nextSibling,s=a.firstChild,c=s.nextSibling,l=t;return typeof l=="function"?ee(l,n):t=n,n.addEventListener("sl-request-close",u=>{u.detail.source==="overlay"&&!e.overlayClose||u.detail.source==="keyboard"?u.preventDefault():r(!1)}),n._$owner=P(),w(n,U(re,{get when(){return!e.header},get children(){const u=UT.cloneNode(!0),d=u.firstChild;return u._$owner=P(),w(d,()=>e.label),u}}),i),o._$owner=P(),s.addEventListener("photon-clicked",()=>{r(!1)}),s._$owner=P(),w(s,()=>e.cancelText),c.addEventListener("photon-clicked",()=>{r(!0)}),c._$owner=P(),w(c,()=>e.confirmText),W(u=>{const d=!!e.hideFooter,f=!!e.header,h=`--width: ${e.width};`,p=e.label,m=e.open,v=!e.header,y=!!e.hideFooter,b=e.disableButtons||e.loading,g=e.disableButtons||e.disableSubmit,_=e.loading;return d!==u._v$&&n.classList.toggle("hideFooter",u._v$=d),f!==u._v$2&&n.classList.toggle("showHeader",u._v$2=f),u._v$3=C$(n,h,u._v$3),p!==u._v$4&&(n.label=u._v$4=p),m!==u._v$5&&(n.open=u._v$5=m),v!==u._v$6&&(n.noHeader=u._v$6=v),y!==u._v$7&&a.classList.toggle("hidden",u._v$7=y),b!==u._v$8&&(s.disabled=u._v$8=b),g!==u._v$9&&(c.disabled=u._v$9=g),_!==u._v$10&&(c.loading=u._v$10=_),u},{_v$:void 0,_v$2:void 0,_v$3:void 0,_v$4:void 0,_v$5:void 0,_v$6:void 0,_v$7:void 0,_v$8:void 0,_v$9:void 0,_v$10:void 0}),n})()]});const B2={version:4,country_calling_codes:{1:["US","AG","AI","AS","BB","BM","BS","CA","DM","DO","GD","GU","JM","KN","KY","LC","MP","MS","PR","SX","TC","TT","VC","VG","VI"],7:["RU","KZ"],20:["EG"],27:["ZA"],30:["GR"],31:["NL"],32:["BE"],33:["FR"],34:["ES"],36:["HU"],39:["IT","VA"],40:["RO"],41:["CH"],43:["AT"],44:["GB","GG","IM","JE"],45:["DK"],46:["SE"],47:["NO","SJ"],48:["PL"],49:["DE"],51:["PE"],52:["MX"],53:["CU"],54:["AR"],55:["BR"],56:["CL"],57:["CO"],58:["VE"],60:["MY"],61:["AU","CC","CX"],62:["ID"],63:["PH"],64:["NZ"],65:["SG"],66:["TH"],81:["JP"],82:["KR"],84:["VN"],86:["CN"],90:["TR"],91:["IN"],92:["PK"],93:["AF"],94:["LK"],95:["MM"],98:["IR"],211:["SS"],212:["MA","EH"],213:["DZ"],216:["TN"],218:["LY"],220:["GM"],221:["SN"],222:["MR"],223:["ML"],224:["GN"],225:["CI"],226:["BF"],227:["NE"],228:["TG"],229:["BJ"],230:["MU"],231:["LR"],232:["SL"],233:["GH"],234:["NG"],235:["TD"],236:["CF"],237:["CM"],238:["CV"],239:["ST"],240:["GQ"],241:["GA"],242:["CG"],243:["CD"],244:["AO"],245:["GW"],246:["IO"],247:["AC"],248:["SC"],249:["SD"],250:["RW"],251:["ET"],252:["SO"],253:["DJ"],254:["KE"],255:["TZ"],256:["UG"],257:["BI"],258:["MZ"],260:["ZM"],261:["MG"],262:["RE","YT"],263:["ZW"],264:["NA"],265:["MW"],266:["LS"],267:["BW"],268:["SZ"],269:["KM"],290:["SH","TA"],291:["ER"],297:["AW"],298:["FO"],299:["GL"],350:["GI"],351:["PT"],352:["LU"],353:["IE"],354:["IS"],355:["AL"],356:["MT"],357:["CY"],358:["FI","AX"],359:["BG"],370:["LT"],371:["LV"],372:["EE"],373:["MD"],374:["AM"],375:["BY"],376:["AD"],377:["MC"],378:["SM"],380:["UA"],381:["RS"],382:["ME"],383:["XK"],385:["HR"],386:["SI"],387:["BA"],389:["MK"],420:["CZ"],421:["SK"],423:["LI"],500:["FK"],501:["BZ"],502:["GT"],503:["SV"],504:["HN"],505:["NI"],506:["CR"],507:["PA"],508:["PM"],509:["HT"],590:["GP","BL","MF"],591:["BO"],592:["GY"],593:["EC"],594:["GF"],595:["PY"],596:["MQ"],597:["SR"],598:["UY"],599:["CW","BQ"],670:["TL"],672:["NF"],673:["BN"],674:["NR"],675:["PG"],676:["TO"],677:["SB"],678:["VU"],679:["FJ"],680:["PW"],681:["WF"],682:["CK"],683:["NU"],685:["WS"],686:["KI"],687:["NC"],688:["TV"],689:["PF"],690:["TK"],691:["FM"],692:["MH"],850:["KP"],852:["HK"],853:["MO"],855:["KH"],856:["LA"],880:["BD"],886:["TW"],960:["MV"],961:["LB"],962:["JO"],963:["SY"],964:["IQ"],965:["KW"],966:["SA"],967:["YE"],968:["OM"],970:["PS"],971:["AE"],972:["IL"],973:["BH"],974:["QA"],975:["BT"],976:["MN"],977:["NP"],992:["TJ"],993:["TM"],994:["AZ"],995:["GE"],996:["KG"],998:["UZ"]},countries:{AC:["247","00","(?:[01589]\\d|[46])\\d{4}",[5,6]],AD:["376","00","(?:1|6\\d)\\d{7}|[135-9]\\d{5}",[6,8,9],[["(\\d{3})(\\d{3})","$1 $2",["[135-9]"]],["(\\d{4})(\\d{4})","$1 $2",["1"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]]],AE:["971","00","(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}",[5,6,7,8,9,10,11,12],[["(\\d{3})(\\d{2,9})","$1 $2",["60|8"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[236]|[479][2-8]"],"0$1"],["(\\d{3})(\\d)(\\d{5})","$1 $2 $3",["[479]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"]],"0"],AF:["93","00","[2-7]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"]],"0"],AG:["1","011","(?:268|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"1|([457]\\d{6})$","268$1",0,"268"],AI:["1","011","(?:264|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"1|([2457]\\d{6})$","264$1",0,"264"],AL:["355","00","(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}",[6,7,8,9],[["(\\d{3})(\\d{3,4})","$1 $2",["80|9"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["4[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2358][2-5]|4"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["[23578]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["6"],"0$1"]],"0"],AM:["374","00","(?:[1-489]\\d|55|60|77)\\d{6}",[8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[89]0"],"0 $1"],["(\\d{3})(\\d{5})","$1 $2",["2|3[12]"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["1|47"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[3-9]"],"0$1"]],"0"],AO:["244","00","[29]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[29]"]]]],AR:["54","00","(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}",[10,11],[["(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])","2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["1"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["[23]"],"0$1",1],["(\\d)(\\d{4})(\\d{2})(\\d{4})","$2 15-$3-$4",["9(?:2[2-469]|3[3-578])","9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))","9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",0,"$1 $2 $3-$4"],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 15-$3-$4",["91"],"0$1",0,"$1 $2 $3-$4"],["(\\d{3})(\\d{3})(\\d{5})","$1-$2-$3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 15-$3-$4",["9"],"0$1",0,"$1 $2 $3-$4"]],"0",0,"0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?","9$1"],AS:["1","011","(?:[58]\\d\\d|684|900)\\d{7}",[10],0,"1",0,"1|([267]\\d{6})$","684$1",0,"684"],AT:["43","00","1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}",[4,5,6,7,8,9,10,11,12,13],[["(\\d)(\\d{3,12})","$1 $2",["1(?:11|[2-9])"],"0$1"],["(\\d{3})(\\d{2})","$1 $2",["517"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["5[079]"],"0$1"],["(\\d{3})(\\d{3,10})","$1 $2",["(?:31|4)6|51|6(?:5[0-3579]|[6-9])|7(?:20|32|8)|[89]"],"0$1"],["(\\d{4})(\\d{3,9})","$1 $2",["[2-467]|5[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["5"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,7})","$1 $2 $3",["5"],"0$1"]],"0"],AU:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}",[5,6,7,8,9,10,12],[["(\\d{2})(\\d{3,4})","$1 $2",["16"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,4})","$1 $2 $3",["16"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["14|4"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"],"(0$1)"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:30|[89])"]]],"0",0,"0|(183[12])",0,0,0,[["(?:(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|3(?:[0-3589]\\d|4[0-578]|6[1-9]|7[0-35-9])|7(?:[013-57-9]\\d|2[0-8]))\\d{3}|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4]))|(?:6[0-8]|[78]\\d)\\d{3}|9(?:[02-9]\\d{3}|1(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79])))))\\d{3}",[9]],["4(?:83[0-389]|93[0-6])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[016-9]|7[02-9]|8[0-24-9]|9[0-27-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,["163\\d{2,6}",[5,6,7,8,9]],["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],AW:["297","00","(?:[25-79]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[25-9]"]]]],AX:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}",[5,6,7,8,9,10,11,12],0,"0",0,0,0,0,"18",0,"00"],AZ:["994","00","365\\d{6}|(?:[124579]\\d|60|88)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[28]|2|365|46","1[28]|2|365[45]|46","1[28]|2|365(?:4|5[02])|46"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-9]"],"0$1"]],"0"],BA:["387","00","6\\d{8}|(?:[35689]\\d|49|70)\\d{6}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-3]|[7-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]|6[56]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6"],"0$1"]],"0"],BB:["1","011","(?:246|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"1|([2-9]\\d{6})$","246$1",0,"246"],BD:["880","00","[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{4,6})","$1-$2",["31[5-8]|[459]1"],"0$1"],["(\\d{3})(\\d{3,7})","$1-$2",["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:28|4[14]|5)|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"],"0$1"],["(\\d{4})(\\d{3,6})","$1-$2",["[13-9]|22"],"0$1"],["(\\d)(\\d{7,8})","$1-$2",["2"],"0$1"]],"0"],BE:["32","00","4\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:80|9)0"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[239]|4[23]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[15-8]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4"],"0$1"]],"0"],BF:["226","00","[025-7]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[025-7]"]]]],BG:["359","00","00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}",[6,7,8,9,12],[["(\\d)(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["43[1-6]|70[1-9]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:70|8)0"],"0$1"],["(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[1-7]|7"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[48]|9[08]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"]],"0"],BH:["973","00","[136-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[13679]|8[047]"]]]],BI:["257","00","(?:[267]\\d|31)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2367]"]]]],BJ:["229","00","[24-689]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-689]"]]]],BL:["590","00","(?:590|(?:69|80)\\d|976)\\d{6}",[9],0,"0",0,0,0,0,0,[["590(?:2[7-9]|5[12]|87)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["976[01]\\d{5}"]]],BM:["1","011","(?:441|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"1|([2-9]\\d{6})$","441$1",0,"441"],BN:["673","00","[2-578]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-578]"]]]],BO:["591","00(?:1\\d)?","(?:[2-467]\\d\\d|8001)\\d{5}",[8,9],[["(\\d)(\\d{7})","$1 $2",["[23]|4[46]"]],["(\\d{8})","$1",["[67]"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["8"]]],"0",0,"0(1\\d)?"],BQ:["599","00","(?:[34]1|7\\d)\\d{5}",[7],0,0,0,0,0,0,"[347]"],BR:["55","00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)","(?:[1-46-9]\\d\\d|5(?:[0-46-9]\\d|5[0-46-9]))\\d{8}|[1-9]\\d{9}|[3589]\\d{8}|[34]\\d{7}",[8,9,10,11],[["(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37)","4(?:02|37)0|[34]00"]],["(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["(?:[358]|90)0"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"],"($1)"],["(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[16][1-9]|[2-57-9]"],"($1)"]],"0",0,"(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?","$2"],BS:["1","011","(?:242|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"1|([3-8]\\d{6})$","242$1",0,"242"],BT:["975","00","[17]\\d{7}|[2-8]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-68]|7[246]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|7"]]]],BW:["267","00","(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}",[7,8,10],[["(\\d{2})(\\d{5})","$1 $2",["90"]],["(\\d{3})(\\d{4})","$1 $2",["[24-6]|3[15-79]"]],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37]"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["8"]]]],BY:["375","810","(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3})","$1 $2",["800"],"8 $1"],["(\\d{3})(\\d{2})(\\d{2,4})","$1 $2 $3",["800"],"8 $1"],["(\\d{4})(\\d{2})(\\d{3})","$1 $2-$3",["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])","1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"],"8 0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["1(?:[56]|7[467])|2[1-3]"],"8 0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-4]"],"8 0$1"],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["[89]"],"8 $1"]],"8",0,"0|80?",0,0,0,0,"8~10"],BZ:["501","00","(?:0800\\d|[2-8])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1-$2",["[2-8]"]],["(\\d)(\\d{3})(\\d{4})(\\d{3})","$1-$2-$3-$4",["0"]]]],CA:["1","011","(?:[2-8]\\d|90)\\d{8}|3\\d{6}",[7,10],0,"1",0,0,0,0,0,[["(?:2(?:04|[23]6|[48]9|50|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|3[178]|50|68|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|73)|90[25])[2-9]\\d{6}",[10]],["",[10]],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",[10]],["900[2-9]\\d{6}",[10]],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:00|2[125-7]|33|44|66|77|88)|622)[2-9]\\d{6}",[10]],0,["310\\d{4}",[7]],0,["600[2-9]\\d{6}",[10]]]],CC:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"0|([59]\\d{7})$","8$1",0,0,[["8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}",[9]],["4(?:83[0-389]|93[0-6])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[016-9]|7[02-9]|8[0-24-9]|9[0-27-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CD:["243","00","[189]\\d{8}|[1-68]\\d{6}",[7,9],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[1-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]"],"0$1"]],"0"],CF:["236","00","(?:[27]\\d{3}|8776)\\d{4}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[278]"]]]],CG:["242","00","222\\d{6}|(?:0\\d|80)\\d{7}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[02]"]]]],CH:["41","00","8\\d{11}|[2-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8[047]|90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]|81"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["8"],"0$1"]],"0"],CI:["225","00","[02]\\d{9}",[10],[["(\\d{2})(\\d{2})(\\d)(\\d{5})","$1 $2 $3 $4",["2"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3 $4",["0"]]]],CK:["682","00","[2-578]\\d{4}",[5],[["(\\d{2})(\\d{3})","$1 $2",["[2-578]"]]]],CL:["56","(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0","12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}",[9,10,11],[["(\\d{5})(\\d{4})","$1 $2",["219","2196"],"($1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["44"]],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[1-36]"],"($1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["9[2-9]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-9]|[1-9])"],"($1)"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{3})(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"]]]],CM:["237","00","[26]\\d{8}|88\\d{6,7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["88"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]|88"]]]],CN:["86","00|1(?:[12]\\d|79)\\d\\d00","1[127]\\d{8,9}|2\\d{9}(?:\\d{2})?|[12]\\d{6,7}|86\\d{6}|(?:1[03-689]\\d|6)\\d{7,9}|(?:[3-579]\\d|8[0-57-9])\\d{6,9}",[7,8,9,10,11,12],[["(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]","(?:10|2[0-57-9])(?:10|9[56])","10(?:10|9[56])|2[0-57-9](?:100|9[56])"],"0$1"],["(\\d{3})(\\d{5,6})","$1 $2",["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]","(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]","85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])","85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["(?:4|80)0"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|2(?:[02-57-9]|1[1-9])","10|2(?:[02-57-9]|1[1-9])","10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"],"0$1",1],["(\\d{3})(\\d{7,8})","$1 $2",["9"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["80"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[3-578]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-9]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["[12]"],"0$1",1]],"0",0,"0|(1(?:[12]\\d|79)\\d\\d)",0,0,0,0,"00"],CO:["57","00(?:4(?:[14]4|56)|[579])","(?:60\\d\\d|9101)\\d{6}|(?:1\\d|3)\\d{9}",[10,11],[["(\\d{3})(\\d{7})","$1 $2",["6"],"($1)"],["(\\d{3})(\\d{7})","$1 $2",["3[0-357]|91"]],["(\\d)(\\d{3})(\\d{7})","$1-$2-$3",["1"],"0$1",0,"$1 $2 $3"]],"0",0,"0(4(?:[14]4|56)|[579])?"],CR:["506","00","(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}",[8,10],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[3-9]"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[89]"]]],0,0,"(19(?:0[0-2468]|1[09]|20|66|77|99))"],CU:["53","119","[27]\\d{6,7}|[34]\\d{5,7}|(?:5|8\\d\\d)\\d{7}",[6,7,8,10],[["(\\d{2})(\\d{4,6})","$1 $2",["2[1-4]|[34]"],"(0$1)"],["(\\d)(\\d{6,7})","$1 $2",["7"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["5"],"0$1"],["(\\d{3})(\\d{7})","$1 $2",["8"],"0$1"]],"0"],CV:["238","0","(?:[2-59]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2-589]"]]]],CW:["599","00","(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[3467]"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["9[4-8]"]]],0,0,0,0,0,"[69]"],CX:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"0|([59]\\d{7})$","8$1",0,0,[["8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}",[9]],["4(?:83[0-389]|93[0-6])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[016-9]|7[02-9]|8[0-24-9]|9[0-27-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CY:["357","00","(?:[279]\\d|[58]0)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[257-9]"]]]],CZ:["420","00","(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]|9[015-7]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["96"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]]],DE:["49","00","[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}",[4,5,6,7,8,9,10,11,12,13,14,15],[["(\\d{2})(\\d{3,13})","$1 $2",["3[02]|40|[68]9"],"0$1"],["(\\d{3})(\\d{3,12})","$1 $2",["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1","2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"],"0$1"],["(\\d{4})(\\d{2,11})","$1 $2",["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]","[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["138"],"0$1"],["(\\d{5})(\\d{2,10})","$1 $2",["3"],"0$1"],["(\\d{3})(\\d{5,11})","$1 $2",["181"],"0$1"],["(\\d{3})(\\d)(\\d{4,10})","$1 $2 $3",["1(?:3|80)|9"],"0$1"],["(\\d{3})(\\d{7,8})","$1 $2",["1[67]"],"0$1"],["(\\d{3})(\\d{7,12})","$1 $2",["8"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["185","1850","18500"],"0$1"],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["18[68]"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["15[0568]"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["15[1279]"],"0$1"],["(\\d{3})(\\d{8})","$1 $2",["18"],"0$1"],["(\\d{3})(\\d{2})(\\d{7,8})","$1 $2 $3",["1(?:6[023]|7)"],"0$1"],["(\\d{4})(\\d{2})(\\d{7})","$1 $2 $3",["15[279]"],"0$1"],["(\\d{3})(\\d{2})(\\d{8})","$1 $2 $3",["15"],"0$1"]],"0"],DJ:["253","00","(?:2\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[27]"]]]],DK:["45","00","[2-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-9]"]]]],DM:["1","011","(?:[58]\\d\\d|767|900)\\d{7}",[10],0,"1",0,"1|([2-7]\\d{6})$","767$1",0,"767"],DO:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,0,0,0,"8001|8[024]9"],DZ:["213","00","(?:[1-4]|[5-79]\\d|80)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-8]"],"0$1"]],"0"],EC:["593","00","1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}",[8,9,10,11],[["(\\d)(\\d{3})(\\d{4})","$1 $2-$3",["[2-7]"],"(0$1)",0,"$1-$2-$3"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{3})(\\d{3,4})","$1 $2 $3",["1"]]],"0"],EE:["372","00","8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88","[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]],["(\\d{4})(\\d{3,4})","$1 $2",["[45]|8(?:00|[1-49])","[45]|8(?:00[1-9]|[1-49])"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],EG:["20","00","[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}",[8,9,10],[["(\\d)(\\d{7,8})","$1 $2",["[23]"],"0$1"],["(\\d{2})(\\d{6,7})","$1 $2",["1[35]|[4-6]|8[2468]|9[235-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[189]"],"0$1"]],"0"],EH:["212","00","[5-8]\\d{8}",[9],0,"0",0,0,0,0,"528[89]"],ER:["291","00","[178]\\d{6}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[178]"],"0$1"]],"0"],ES:["34","00","[5-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]00"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-9]"]]]],ET:["251","00","(?:11|[2-579]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-579]"],"0$1"]],"0"],FI:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}",[5,6,7,8,9,10,11,12],[["(\\d)(\\d{4,9})","$1 $2",["[2568][1-8]|3(?:0[1-9]|[1-9])|9"],"0$1"],["(\\d{3})(\\d{3,7})","$1 $2",["[12]00|[368]|70[07-9]"],"0$1"],["(\\d{2})(\\d{4,8})","$1 $2",["[1245]|7[135]"],"0$1"],["(\\d{2})(\\d{6,10})","$1 $2",["7"],"0$1"]],"0",0,0,0,0,"1[03-79]|[2-9]",0,"00"],FJ:["679","0(?:0|52)","45\\d{5}|(?:0800\\d|[235-9])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1 $2",["[235-9]|45"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]]],0,0,0,0,0,0,0,"00"],FK:["500","00","[2-7]\\d{4}",[5]],FM:["691","00","(?:[39]\\d\\d|820)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[389]"]]]],FO:["298","00","[2-9]\\d{5}",[6],[["(\\d{6})","$1",["[2-9]"]]],0,0,"(10(?:01|[12]0|88))"],FR:["33","00","[1-9]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0 $1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"],"0$1"]],"0"],GA:["241","00","(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}",[7,8],[["(\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-7]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["11|[67]"],"0$1"]],0,0,"0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})","$1"],GB:["44","00","[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}",[7,9,10],[["(\\d{3})(\\d{4})","$1 $2",["800","8001","80011","800111","8001111"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["845","8454","84546","845464"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["800"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["1(?:38|5[23]|69|76|94)","1(?:(?:38|69)7|5(?:24|39)|768|946)","1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["1(?:[2-69][02-9]|[78])"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[25]|7(?:0|6[02-9])","[25]|7(?:0|6(?:[03-9]|2[356]))"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[1389]"],"0$1"]],"0",0,0,0,0,0,[["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0235])|4(?:[0-5]\\d\\d|69[7-9]|70[0-579])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|50))\\d)|2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d\\d|1(?:[0-7]\\d\\d|8(?:[02]\\d|1[0-246-9])))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}",[9,10]],["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]],0," x"],GD:["1","011","(?:473|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"1|([2-9]\\d{6})$","473$1",0,"473"],GE:["995","00","(?:[3-57]\\d\\d|800)\\d{6}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["32"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[57]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[348]"],"0$1"]],"0"],GF:["594","00","(?:[56]94|80\\d|976)\\d{6}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[569]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],GG:["44","00","(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?",[7,9,10],0,"0",0,"0|([25-9]\\d{5})$","1481$1",0,0,[["1481[25-9]\\d{5}",[10]],["7(?:(?:781|839)\\d|911[17])\\d{5}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]]],GH:["233","00","(?:[235]\\d{3}|800)\\d{5}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[235]"],"0$1"]],"0"],GI:["350","00","(?:[25]\\d\\d|606)\\d{5}",[8],[["(\\d{3})(\\d{5})","$1 $2",["2"]]]],GL:["299","00","(?:19|[2-689]\\d|70)\\d{4}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["19|[2-9]"]]]],GM:["220","00","[2-9]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],GN:["224","00","722\\d{6}|(?:3|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["3"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[67]"]]]],GP:["590","00","(?:590|(?:69|80)\\d|976)\\d{6}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[569]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["590(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1289]|5[3-579]|6[0-489]|7[08]|8[0-689]|9\\d)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["976[01]\\d{5}"]]],GQ:["240","00","222\\d{6}|(?:3\\d|55|[89]0)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235]"]],["(\\d{3})(\\d{6})","$1 $2",["[89]"]]]],GR:["30","00","5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}",[10,11,12],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["21|7"]],["(\\d{4})(\\d{6})","$1 $2",["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2689]"]],["(\\d{3})(\\d{3,4})(\\d{5})","$1 $2 $3",["8"]]]],GT:["502","00","(?:1\\d{3}|[2-7])\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],GU:["1","011","(?:[58]\\d\\d|671|900)\\d{7}",[10],0,"1",0,"1|([3-9]\\d{6})$","671$1",0,"671"],GW:["245","00","[49]\\d{8}|4\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["40"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"]]]],GY:["592","001","9008\\d{3}|(?:[2-467]\\d\\d|862)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-46-9]"]]]],HK:["852","00(?:30|5[09]|[126-9]?)","8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}",[5,6,7,8,9,11],[["(\\d{3})(\\d{2,5})","$1 $2",["900","9003"]],["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{3})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]],0,0,0,0,0,0,0,"00"],HN:["504","00","8\\d{10}|[237-9]\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1-$2",["[237-9]"]]]],HR:["385","00","(?:[24-69]\\d|3[0-79])\\d{7}|80\\d{5,7}|[1-79]\\d{7}|6\\d{5,6}",[6,7,8,9],[["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["6[01]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{4})(\\d{3})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[67]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-5]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"]],"0"],HT:["509","00","(?:[2-489]\\d|55)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[2-589]"]]]],HU:["36","00","[235-7]\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"06 $1"]],"06"],ID:["62","00[89]","(?:(?:00[1-9]|8\\d)\\d{4}|[1-36])\\d{6}|00\\d{10}|[1-9]\\d{8,10}|[2-9]\\d{7}",[7,8,9,10,11,12,13],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["15"]],["(\\d{2})(\\d{5,9})","$1 $2",["2[124]|[36]1"],"(0$1)"],["(\\d{3})(\\d{5,7})","$1 $2",["800"],"0$1"],["(\\d{3})(\\d{5,8})","$1 $2",["[2-79]"],"(0$1)"],["(\\d{3})(\\d{3,4})(\\d{3})","$1-$2-$3",["8[1-35-9]"],"0$1"],["(\\d{3})(\\d{6,8})","$1 $2",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["804"],"0$1"],["(\\d{3})(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1-$2-$3",["8"],"0$1"]],"0"],IE:["353","00","(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["2[24-9]|47|58|6[237-9]|9[35-9]"],"(0$1)"],["(\\d{3})(\\d{5})","$1 $2",["[45]0"],"(0$1)"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["1"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2569]|4[1-69]|7[14]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["81"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[78]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["4"],"(0$1)"],["(\\d{2})(\\d)(\\d{3})(\\d{4})","$1 $2 $3 $4",["8"],"0$1"]],"0"],IL:["972","0(?:0|1[2-9])","1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}",[7,8,9,10,11,12],[["(\\d{4})(\\d{3})","$1-$2",["125"]],["(\\d{4})(\\d{2})(\\d{2})","$1-$2-$3",["121"]],["(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[2-489]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1-$2-$3",["12"]],["(\\d{4})(\\d{6})","$1-$2",["159"]],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3-$4",["1[7-9]"]],["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})","$1-$2 $3-$4",["15"]]],"0"],IM:["44","00","1624\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"0|([25-8]\\d{5})$","1624$1",0,"74576|(?:16|7[56])24"],IN:["91","00","(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}",[8,9,10,11,12,13],[["(\\d{8})","$1",["5(?:0|2[23]|3[03]|[67]1|88)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"],0,1],["(\\d{4})(\\d{4,5})","$1 $2",["180","1800"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["140"],0,1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79[1-7]|80[2-46]","11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])","11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[14]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:2[14]|3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"],"0$1",1],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|28|3[129]|4[1-35689]|5[29]|6[02-5]|70)|807","1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]","1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|83)|73179|807(?:1|9[1-3])|(?:1552|6(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[124-6])\\d|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"],"0$1",1],["(\\d{5})(\\d{5})","$1 $2",["[6-9]"],"0$1",1],["(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["1(?:6|8[06])","1(?:6|8[06]0)"],0,1],["(\\d{4})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["18"],0,1]],"0"],IO:["246","00","3\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["3"]]]],IQ:["964","00","(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-6]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],IR:["98","00","[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}",[4,5,6,7,10],[["(\\d{4,5})","$1",["96"],"0$1"],["(\\d{2})(\\d{4,5})","$1 $2",["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[1-8]"],"0$1"]],"0"],IS:["354","00|1(?:0(?:01|[12]0)|100)","(?:38\\d|[4-9])\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["[4-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["3"]]],0,0,0,0,0,0,0,"00"],IT:["39","00","0\\d{5,10}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?",[6,7,8,9,10,11],[["(\\d{2})(\\d{4,6})","$1 $2",["0[26]"]],["(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]],["(\\d{4})(\\d{2,6})","$1 $2",["0(?:[13-579][2-46-8]|8[236-8])"]],["(\\d{4})(\\d{4})","$1 $2",["894"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|5"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["1(?:44|[679])|[378]"]],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]|14"]],["(\\d{2})(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["3"]]],0,0,0,0,0,0,[["0669[0-79]\\d{1,6}|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[1-356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}"],["3[1-9]\\d{8}|3[2-9]\\d{7}",[9,10]],["80(?:0\\d{3}|3)\\d{3}",[6,9]],["(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}",[6,8,9,10]],["1(?:78\\d|99)\\d{6}",[9,10]],0,0,0,["55\\d{8}",[10]],["84(?:[08]\\d{3}|[17])\\d{3}",[6,9]]]],JE:["44","00","1534\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"0|([0-24-8]\\d{5})$","1534$1",0,0,[["1534[0-24-8]\\d{5}"],["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97[7-9]))\\d{5}"],["80(?:07(?:35|81)|8901)\\d{4}"],["(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"],["701511\\d{4}"],0,["(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}"],["56\\d{8}"]]],JM:["1","011","(?:[58]\\d\\d|658|900)\\d{7}",[10],0,"1",0,0,0,0,"658|876"],JO:["962","00","(?:(?:[2689]|7\\d)\\d|32|53)\\d{6}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2356]|87"],"(0$1)"],["(\\d{3})(\\d{5,6})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["70"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],JP:["81","010","00[1-9]\\d{6,14}|[257-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}",[8,9,10,11,12,13,14,15,16,17],[["(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"],"0$1"],["(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51|63)|9(?:80|9[16])","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9]|636)|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9]|636[457-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["[36]|4(?:2[09]|7[01])","[36]|4(?:2(?:0|9[02-69])|7(?:0[019]|1))"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[045]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[27-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9])|5(?:2|3[045]|4[0-369]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|49|51|6(?:[0-24]|36|5[0-3589]|72|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:49|55|83)[29]|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3[045]|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[23]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|72|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|7[015-9]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17|3[015-9]))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3[045]|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9(?:[019]|4[1-3]|6(?:[0-47-9]|5[01346-9])))|3(?:[29]|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[23]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|72|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|829(?:2|66)|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"],"0$1"],["(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["[14]|[289][2-9]|5[3-9]|7[2-4679]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[257-9]"],"0$1"]],"0"],KE:["254","000","(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}",[7,8,9,10],[["(\\d{2})(\\d{5,7})","$1 $2",["[24-6]"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[17]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0"],KG:["996","00","8\\d{9}|(?:[235-8]\\d|99)\\d{7}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["3(?:1[346]|[24-79])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-79]|88"],"0$1"],["(\\d{3})(\\d{3})(\\d)(\\d{2,3})","$1 $2 $3 $4",["8"],"0$1"]],"0"],KH:["855","00[14-9]","1\\d{9}|[1-9]\\d{7,8}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],KI:["686","00","(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}",[5,8],0,"0"],KM:["269","00","[3478]\\d{6}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[3478]"]]]],KN:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"1|([2-7]\\d{6})$","869$1",0,"869"],KP:["850","00|99","85\\d{6}|(?:19\\d|[2-7])\\d{7}",[8,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"]],"0"],KR:["82","00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))","00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}",[5,6,8,9,10,11,12,13,14],[["(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"],"0$1"],["(\\d{4})(\\d{4})","$1-$2",["1"]],["(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60|8"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["[1346]|5[1-5]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{2})(\\d{5})(\\d{4})","$1-$2-$3",["5"],"0$1"]],"0",0,"0(8(?:[1-46-8]|5\\d\\d))?"],KW:["965","00","18\\d{5}|(?:[2569]\\d|41)\\d{6}",[7,8],[["(\\d{4})(\\d{3,4})","$1 $2",["[169]|2(?:[235]|4[1-35-9])|52"]],["(\\d{3})(\\d{5})","$1 $2",["[245]"]]]],KY:["1","011","(?:345|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"1|([2-9]\\d{6})$","345$1",0,"345"],KZ:["7","810","(?:33622|8\\d{8})\\d{5}|[78]\\d{9}",[10,14],0,"8",0,0,0,0,"33|7",0,"8~10"],LA:["856","00","[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2[13]|3[14]|[4-8]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["30[013-9]"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[23]"],"0$1"]],"0"],LB:["961","00","[27-9]\\d{7}|[13-9]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[13-69]|7(?:[2-57]|62|8[0-7]|9[04-9])|8[02-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27-9]"]]],"0"],LC:["1","011","(?:[58]\\d\\d|758|900)\\d{7}",[10],0,"1",0,"1|([2-8]\\d{6})$","758$1",0,"758"],LI:["423","00","[68]\\d{8}|(?:[2378]\\d|90)\\d{5}",[7,9],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2379]|8(?:0[09]|7)","[2379]|8(?:0(?:02|9)|7)"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["69"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]],"0",0,"0|(1001)"],LK:["94","00","[1-9]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[1-689]"],"0$1"]],"0"],LR:["231","00","(?:[25]\\d|33|77|88)\\d{7}|(?:2\\d|[4-6])\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[4-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23578]"],"0$1"]],"0"],LS:["266","00","(?:[256]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2568]"]]]],LT:["370","00","(?:[3469]\\d|52|[78]0)\\d{6}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["52[0-7]"],"(8-$1)",1],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[7-9]"],"8 $1",1],["(\\d{2})(\\d{6})","$1 $2",["37|4(?:[15]|6[1-8])"],"(8-$1)",1],["(\\d{3})(\\d{5})","$1 $2",["[3-6]"],"(8-$1)",1]],"8",0,"[08]"],LU:["352","00","35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}",[4,5,6,7,8,9,10,11],[["(\\d{2})(\\d{3})","$1 $2",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["20[2-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4",["2(?:[0367]|4[3-8])"]],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["80[01]|90[015]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["20"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4 $5",["2(?:[0367]|4[3-8])"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})","$1 $2 $3 $4",["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]]],0,0,"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)"],LV:["371","00","(?:[268]\\d|90)\\d{6}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[269]|8[01]"]]]],LY:["218","00","[2-9]\\d{8}",[9],[["(\\d{2})(\\d{7})","$1-$2",["[2-9]"],"0$1"]],"0"],MA:["212","00","[5-8]\\d{8}",[9],[["(\\d{5})(\\d{4})","$1-$2",["5(?:29|38)","5(?:29[1289]|389)","529(?:1[1-46-9]|2[013-8]|90)|5(?:298|389)[0-46-9]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5[45]"],"0$1"],["(\\d{4})(\\d{5})","$1-$2",["5(?:2[2-489]|3[5-9]|9)|892","5(?:2(?:[2-49]|8[235-9])|3[5-9]|9)|892"],"0$1"],["(\\d{2})(\\d{7})","$1-$2",["8"],"0$1"],["(\\d{3})(\\d{6})","$1-$2",["[5-7]"],"0$1"]],"0",0,0,0,0,0,[["5293[01]\\d{4}|5(?:2(?:[0-25-7]\\d|3[1-578]|4[02-46-8]|8[0235-7]|9[0-289])|3(?:[0-47]\\d|5[02-9]|6[02-8]|8[0189]|9[3-9])|(?:4[067]|5[03])\\d)\\d{5}"],["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[017]\\d|2[0-2]|6[0-8]|8[0-3]))\\d{6}"],["80\\d{7}"],["89\\d{7}"],0,0,0,0,["592(?:4[0-2]|93)\\d{4}"]]],MC:["377","00","(?:[3489]|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[389]"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["6"],"0$1"]],"0"],MD:["373","00","(?:[235-7]\\d|[89]0)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["22|3"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[25-7]"],"0$1"]],"0"],ME:["382","00","(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"0$1"]],"0"],MF:["590","00","(?:590|(?:69|80)\\d|976)\\d{6}",[9],0,"0",0,0,0,0,0,[["590(?:0[079]|[14]3|[27][79]|30|5[0-268]|87)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["976[01]\\d{5}"]]],MG:["261","00","[23]\\d{8}",[9],[["(\\d{2})(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3 $4",["[23]"],"0$1"]],"0",0,"0|([24-9]\\d{6})$","20$1"],MH:["692","011","329\\d{4}|(?:[256]\\d|45)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1-$2",["[2-6]"]]],"1"],MK:["389","00","[2-578]\\d{7}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2|34[47]|4(?:[37]7|5[47]|64)"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[347]"],"0$1"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["[58]"],"0$1"]],"0"],ML:["223","00","[24-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-9]"]]]],MM:["95","00","1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}",[6,7,8,9,10],[["(\\d)(\\d{2})(\\d{3})","$1 $2 $3",["16|2"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["[45]|6(?:0[23]|[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-6]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[4-7]|8[1-35]"],"0$1"],["(\\d)(\\d{3})(\\d{4,6})","$1 $2 $3",["9(?:2[0-4]|[35-9]|4[137-9])"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["92"],"0$1"],["(\\d)(\\d{5})(\\d{4})","$1 $2 $3",["9"],"0$1"]],"0"],MN:["976","001","[12]\\d{7,9}|[5-9]\\d{7}",[8,9,10],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[12]1"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[5-9]"]],["(\\d{3})(\\d{5,6})","$1 $2",["[12]2[1-3]"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["[12](?:27|3[2-8]|4[2-68]|5[1-4689])","[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["[12]"],"0$1"]],"0"],MO:["853","00","0800\\d{3}|(?:28|[68]\\d)\\d{6}",[7,8],[["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{4})(\\d{4})","$1 $2",["[268]"]]]],MP:["1","011","[58]\\d{9}|(?:67|90)0\\d{7}",[10],0,"1",0,"1|([2-9]\\d{6})$","670$1",0,"670"],MQ:["596","00","(?:69|80)\\d{7}|(?:59|97)6\\d{6}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[569]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],MR:["222","00","(?:[2-4]\\d\\d|800)\\d{5}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-48]"]]]],MS:["1","011","(?:[58]\\d\\d|664|900)\\d{7}",[10],0,"1",0,"1|([34]\\d{6})$","664$1",0,"664"],MT:["356","00","3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2357-9]"]]]],MU:["230","0(?:0|[24-7]0|3[03])","(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[2-46]|8[013]"]],["(\\d{4})(\\d{4})","$1 $2",["[57]"]],["(\\d{5})(\\d{5})","$1 $2",["8"]]],0,0,0,0,0,0,0,"020"],MV:["960","0(?:0|19)","(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}",[7,10],[["(\\d{3})(\\d{4})","$1-$2",["[3467]|9[1-9]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"]]],0,0,0,0,0,0,0,"00"],MW:["265","00","(?:[1289]\\d|31|77)\\d{7}|1\\d{6}",[7,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[137-9]"],"0$1"]],"0"],MX:["52","0[09]","1(?:(?:[27]2|44|99)[1-9]|65[0-689])\\d{7}|(?:1(?:[01]\\d|2[13-9]|[35][1-9]|4[0-35-9]|6[0-46-9]|7[013-9]|8[1-79]|9[1-8])|[2-9]\\d)\\d{8}",[10,11],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["33|5[56]|81"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2-9]"],0,1],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 $3 $4",["1(?:33|5[56]|81)"],0,1],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 $3 $4",["1"],0,1]],"01",0,"0(?:[12]|4[45])|1",0,0,0,0,"00"],MY:["60","00","1\\d{8,9}|(?:3\\d|[4-9])\\d{7}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1-$2 $3",["[4-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1-$2 $3",["1(?:[02469]|[378][1-9]|53)|8","1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2 $3",["3"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3-$4",["1(?:[367]|80)"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2 $3",["15"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2 $3",["1"],"0$1"]],"0"],MZ:["258","00","(?:2|8\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2|8[2-79]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],NA:["264","00","[68]\\d{7,8}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["87"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],NC:["687","00","(?:050|[2-57-9]\\d\\d)\\d{3}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1.$2.$3",["[02-57-9]"]]]],NE:["227","00","[027-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["08"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[089]|2[013]|7[04]"]]]],NF:["672","00","[13]\\d{5}",[6],[["(\\d{2})(\\d{4})","$1 $2",["1[0-3]"]],["(\\d)(\\d{5})","$1 $2",["[13]"]]],0,0,"([0-258]\\d{4})$","3$1"],NG:["234","009","(?:[124-7]|9\\d{3})\\d{6}|[1-9]\\d{7}|[78]\\d{9,13}",[7,8,10,11,12,13,14],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["78"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]|9(?:0[3-9]|[1-9])"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[3-7]|8[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[7-9]"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[78]"],"0$1"],["(\\d{3})(\\d{5})(\\d{5,6})","$1 $2 $3",["[78]"],"0$1"]],"0"],NI:["505","00","(?:1800|[25-8]\\d{3})\\d{4}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[125-8]"]]]],NL:["31","00","(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}",[5,6,7,8,9,10,11],[["(\\d{3})(\\d{4,7})","$1 $2",["[89]0"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["66"],"0$1"],["(\\d)(\\d{8})","$1 $2",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-578]|91"],"0$1"],["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3",["9"],"0$1"]],"0"],NO:["47","00","(?:0|[2-9]\\d{3})\\d{4}",[5,8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[489]|59"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[235-7]"]]],0,0,0,0,0,"[02-689]|7[0-8]"],NP:["977","00","(?:1\\d|9)\\d{9}|[1-9]\\d{7}",[8,10,11],[["(\\d)(\\d{7})","$1-$2",["1[2-6]"],"0$1"],["(\\d{2})(\\d{6})","$1-$2",["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"],"0$1"],["(\\d{3})(\\d{7})","$1-$2",["9"]]],"0"],NR:["674","00","(?:444|(?:55|8\\d)\\d|666)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[4-68]"]]]],NU:["683","00","(?:[47]|888\\d)\\d{3}",[4,7],[["(\\d{3})(\\d{4})","$1 $2",["8"]]]],NZ:["64","0(?:0|161)","[29]\\d{7,9}|50\\d{5}(?:\\d{2,3})?|6[0-35-9]\\d{6}|7\\d{7,8}|8\\d{4,9}|(?:11\\d|[34])\\d{7}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,8})","$1 $2",["8[1-579]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["50[036-8]|[89]0","50(?:[0367]|88)|[89]0"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["24|[346]|7[2-57-9]|9[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:10|74)|[59]|80"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["1|2[028]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,5})","$1 $2 $3",["2(?:[169]|7[0-35-9])|7|86"],"0$1"]],"0",0,0,0,0,0,0,"00"],OM:["968","00","(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}",[7,8,9],[["(\\d{3})(\\d{4,6})","$1 $2",["[58]"]],["(\\d{2})(\\d{6})","$1 $2",["2"]],["(\\d{4})(\\d{4})","$1 $2",["[179]"]]]],PA:["507","00","(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}",[7,8,10,11],[["(\\d{3})(\\d{4})","$1-$2",["[1-57-9]"]],["(\\d{4})(\\d{4})","$1-$2",["[68]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]]],PE:["51","00|19(?:1[124]|77|90)00","(?:[14-8]|9\\d)\\d{7}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["80"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["1"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[4-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]]],"0",0,0,0,0,0,0,"00"," Anexo "],PF:["689","00","4\\d{5}(?:\\d{2})?|8\\d{7,8}",[6,8,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["44"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4|8[7-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],PG:["675","00|140[1-3]","(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["18|[2-69]|85"]],["(\\d{4})(\\d{4})","$1 $2",["[78]"]]],0,0,0,0,0,0,0,"00"],PH:["63","00","(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}",[6,8,9,10,11,12,13],[["(\\d)(\\d{5})","$1 $2",["2"],"(0$1)"],["(\\d{4})(\\d{4,6})","$1 $2",["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2","3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"],"(0$1)"],["(\\d{5})(\\d{4})","$1 $2",["346|4(?:27|9[35])|883","3469|4(?:279|9(?:30|56))|8834"],"(0$1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|8[2-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1"]]],"0"],PK:["92","00","122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,7})","$1 $2 $3",["[89]0"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["1"]],["(\\d{3})(\\d{6,7})","$1 $2",["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])","9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"],"(0$1)"],["(\\d{2})(\\d{7,8})","$1 $2",["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"],"(0$1)"],["(\\d{5})(\\d{5})","$1 $2",["58"],"(0$1)"],["(\\d{3})(\\d{7})","$1 $2",["3"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[24-9]"],"(0$1)"]],"0"],PL:["48","00","(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}",[6,7,8,9,10],[["(\\d{5})","$1",["19"]],["(\\d{3})(\\d{3})","$1 $2",["11|20|64"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1","(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["64"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[2-8]|[2-7]|8[1-79]|9[145]"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["8"]]]],PM:["508","00","(?:[45]|80\\d\\d)\\d{5}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[45]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],PR:["1","011","(?:[589]\\d\\d|787)\\d{7}",[10],0,"1",0,0,0,0,"787|939"],PS:["970","00","[2489]2\\d{6}|(?:1\\d|5)\\d{8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2489]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["5"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],PT:["351","00","1693\\d{5}|(?:[26-9]\\d|30)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["2[12]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["16|[236-9]"]]]],PW:["680","01[12]","(?:[24-8]\\d\\d|345|900)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],PY:["595","00","59\\d{4,6}|9\\d{5,10}|(?:[2-46-8]\\d|5[0-8])\\d{4,7}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3,6})","$1 $2",["[2-9]0"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[26]1|3[289]|4[1246-8]|7[1-3]|8[1-36]"],"(0$1)"],["(\\d{3})(\\d{4,5})","$1 $2",["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["87"]],["(\\d{3})(\\d{6})","$1 $2",["9(?:[5-79]|8[1-6])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["9"]]],"0"],QA:["974","00","800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}",[7,8,9,11],[["(\\d{3})(\\d{4})","$1 $2",["2[16]|8"]],["(\\d{4})(\\d{4})","$1 $2",["[3-7]"]]]],RE:["262","00","976\\d{6}|(?:26|[68]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2689]"],"0$1"]],"0",0,0,0,0,"26[23]|69|[89]"],RO:["40","00","(?:[2378]\\d|90)\\d{7}|[23]\\d{5}",[6,9],[["(\\d{3})(\\d{3})","$1 $2",["2[3-6]","2[3-6]\\d9"],"0$1"],["(\\d{2})(\\d{4})","$1 $2",["219|31"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23]1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[237-9]"],"0$1"]],"0",0,0,0,0,0,0,0," int "],RS:["381","00","38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}",[6,7,8,9,10,11,12],[["(\\d{3})(\\d{3,9})","$1 $2",["(?:2[389]|39)0|[7-9]"],"0$1"],["(\\d{2})(\\d{5,10})","$1 $2",["[1-36]"],"0$1"]],"0"],RU:["7","810","8\\d{13}|[347-9]\\d{9}",[10,14],[["(\\d{4})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-8]|2[1-9])","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"],"8 ($1)",1],["(\\d{5})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-68]|2[1-9])","7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))","7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[349]|8(?:[02-7]|1[1-8])"],"8 ($1)",1],["(\\d{4})(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3 $4",["8"],"8 ($1)"]],"8",0,0,0,0,"3[04-689]|[489]",0,"8~10"],RW:["250","00","(?:06|[27]\\d\\d|[89]00)\\d{6}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"]]],"0"],SA:["966","00","92\\d{7}|(?:[15]|8\\d)\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["9"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["81"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]],"0"],SB:["677","0[01]","(?:[1-6]|[7-9]\\d\\d)\\d{4}",[5,7],[["(\\d{2})(\\d{5})","$1 $2",["7|8[4-9]|9(?:[1-8]|9[0-8])"]]]],SC:["248","010|0[0-2]","800\\d{4}|(?:[249]\\d|64)\\d{5}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[246]|9[57]"]]],0,0,0,0,0,0,0,"00"],SD:["249","00","[19]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[19]"],"0$1"]],"0"],SE:["46","00","(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{2,3})(\\d{2})","$1-$2 $3",["20"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{4})","$1-$2",["9(?:00|39|44|9)"],"0$1",0,"$1 $2"],["(\\d{2})(\\d{3})(\\d{2})","$1-$2 $3",["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3"],["(\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2,3})(\\d{2})","$1-$2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{2,3})(\\d{3})","$1-$2 $3",["9(?:00|39|44)"],"0$1",0,"$1 $2 $3"],["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3 $4"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["10|7"],"0$1",0,"$1 $2 $3 $4"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1-$2 $3 $4",["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{3})","$1-$2 $3 $4",["9"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4 $5",["[26]"],"0$1",0,"$1 $2 $3 $4 $5"]],"0"],SG:["65","0[0-3]\\d","(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["[369]|8(?:0[1-6]|[1-9])"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]],["(\\d{4})(\\d{4})(\\d{3})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],SH:["290","00","(?:[256]\\d|8)\\d{3}",[4,5],0,0,0,0,0,0,"[256]"],SI:["386","00|10(?:22|66|88|99)","[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}",[5,6,7,8],[["(\\d{2})(\\d{3,6})","$1 $2",["8[09]|9"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["59|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37][01]|4[0139]|51|6"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-57]"],"(0$1)"]],"0",0,0,0,0,0,0,"00"],SJ:["47","00","0\\d{4}|(?:[489]\\d|[57]9)\\d{6}",[5,8],0,0,0,0,0,0,"79"],SK:["421","00","[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}",[6,7,9],[["(\\d)(\\d{2})(\\d{3,4})","$1 $2 $3",["21"],"0$1"],["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["[3-5][1-8]1","[3-5][1-8]1[67]"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1/$2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[689]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1/$2 $3 $4",["[3-5]"],"0$1"]],"0"],SL:["232","00","(?:[237-9]\\d|66)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[236-9]"],"(0$1)"]],"0"],SM:["378","00","(?:0549|[5-7]\\d)\\d{6}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"]],["(\\d{4})(\\d{6})","$1 $2",["0"]]],0,0,"([89]\\d{5})$","0549$1"],SN:["221","00","(?:[378]\\d|93)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[379]"]]]],SO:["252","00","[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}",[6,7,8,9],[["(\\d{2})(\\d{4})","$1 $2",["8[125]"]],["(\\d{6})","$1",["[134]"]],["(\\d)(\\d{6})","$1 $2",["[15]|2[0-79]|3[0-46-8]|4[0-7]"]],["(\\d)(\\d{7})","$1 $2",["(?:2|90)4|[67]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[3478]|64|90"]],["(\\d{2})(\\d{5,7})","$1 $2",["1|28|6(?:0[5-7]|[1-35-9])|9[2-9]"]]],"0"],SR:["597","00","(?:[2-5]|68|[78]\\d)\\d{5}",[6,7],[["(\\d{2})(\\d{2})(\\d{2})","$1-$2-$3",["56"]],["(\\d{3})(\\d{3})","$1-$2",["[2-5]"]],["(\\d{3})(\\d{4})","$1-$2",["[6-8]"]]]],SS:["211","00","[19]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[19]"],"0$1"]],"0"],ST:["239","00","(?:22|9\\d)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[29]"]]]],SV:["503","00","[267]\\d{7}|[89]00\\d{4}(?:\\d{4})?",[7,8,11],[["(\\d{3})(\\d{4})","$1 $2",["[89]"]],["(\\d{4})(\\d{4})","$1 $2",["[267]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[89]"]]]],SX:["1","011","7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"1|(5\\d{6})$","721$1",0,"721"],SY:["963","00","[1-39]\\d{8}|[1-5]\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-5]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1",1]],"0"],SZ:["268","00","0800\\d{4}|(?:[237]\\d|900)\\d{6}",[8,9],[["(\\d{4})(\\d{4})","$1 $2",["[0237]"]],["(\\d{5})(\\d{4})","$1 $2",["9"]]]],TA:["290","00","8\\d{3}",[4],0,0,0,0,0,0,"8"],TC:["1","011","(?:[58]\\d\\d|649|900)\\d{7}",[10],0,"1",0,"1|([2-479]\\d{6})$","649$1",0,"649"],TD:["235","00|16","(?:22|[69]\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2679]"]]],0,0,0,0,0,0,0,"00"],TG:["228","00","[279]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[279]"]]]],TH:["66","00[1-9]","(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}",[8,9,10,13],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[13-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],TJ:["992","810","(?:00|[1-57-9]\\d)\\d{7}",[9],[["(\\d{6})(\\d)(\\d{2})","$1 $2 $3",["331","3317"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["[34]7|91[78]"]],["(\\d{4})(\\d)(\\d{4})","$1 $2 $3",["3[1-5]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[0-57-9]"]]],0,0,0,0,0,0,0,"8~10"],TK:["690","00","[2-47]\\d{3,6}",[4,5,6,7]],TL:["670","00","7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[2-489]|70"]],["(\\d{4})(\\d{4})","$1 $2",["7"]]]],TM:["993","810","[1-6]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["12"],"(8 $1)"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-5]"],"(8 $1)"],["(\\d{2})(\\d{6})","$1 $2",["6"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],TN:["216","00","[2-57-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-57-9]"]]]],TO:["676","00","(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}",[5,7],[["(\\d{2})(\\d{3})","$1-$2",["[2-4]|50|6[09]|7[0-24-69]|8[05]"]],["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[5-9]"]]]],TR:["90","00","4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}",[7,10,12,13],[["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["512|8[01589]|90"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5(?:[0-59]|61)","5(?:[0-59]|616)","5(?:[0-59]|6161)"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24][1-8]|3[1-9]"],"(0$1)",1],["(\\d{3})(\\d{3})(\\d{6,7})","$1 $2 $3",["80"],"0$1",1]],"0"],TT:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"1|([2-46-8]\\d{6})$","868$1",0,"868"],TV:["688","00","(?:2|7\\d\\d|90)\\d{4}",[5,6,7],[["(\\d{2})(\\d{3})","$1 $2",["2"]],["(\\d{2})(\\d{4})","$1 $2",["90"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],TW:["886","0(?:0[25-79]|19)","[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}",[7,8,9,10,11],[["(\\d{2})(\\d)(\\d{4})","$1 $2 $3",["202"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[258]0"],"0$1"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["[23568]|4(?:0[02-48]|[1-47-9])|7[1-9]","[23568]|4(?:0[2-48]|[1-47-9])|(?:400|7)[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,5})","$1 $2 $3",["7"],"0$1"]],"0",0,0,0,0,0,0,0,"#"],TZ:["255","00[056]","(?:[25-8]\\d|41|90)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[24]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["5"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[67]"],"0$1"]],"0"],UA:["380","00","[89]\\d{9}|[3-9]\\d{8}",[9,10],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]","6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])","3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|89|9[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0",0,0,0,0,0,0,"0~0"],UG:["256","00[057]","800\\d{6}|(?:[29]0|[347]\\d)\\d{7}",[9],[["(\\d{4})(\\d{5})","$1 $2",["202","2024"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[27-9]|4(?:6[45]|[7-9])"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[34]"],"0$1"]],"0"],US:["1","011","[2-9]\\d{9}|3\\d{6}",[10],[["(\\d{3})(\\d{4})","$1-$2",["310"],0,1],["(\\d{3})(\\d{3})(\\d{4})","($1) $2-$3",["[2-9]"],0,1,"$1-$2-$3"]],"1",0,0,0,0,0,[["505(?:[2-57-9]\\d\\d|6(?:[0-35-9]\\d|4[46]))\\d{4}|(?:2(?:0[1-35-9]|1[02-9]|2[03-589]|3[149]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-57-9]|1[02-9]|2[01356]|3[0-24679]|4[167]|5[0-2]|6[014]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-47-9]|1[0235-8]|20|3[0149]|4[01]|5[19]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|[34][016]|5[01679]|6[0-279]|78|8[0-29])|7(?:0[1-46-8]|1[2-9]|2[04-7]|3[1247]|4[037]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[068]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-389]|8[04-69]))[2-9]\\d{6}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-7]|33|44|66|77|88)[2-9]\\d{6}"]]],UY:["598","0(?:0|1[3-9]\\d)","(?:0004|4)\\d{9}|[1249]\\d{7}|(?:[49]\\d|80)\\d{5}",[7,8,10,13],[["(\\d{3})(\\d{4})","$1 $2",["405|8|90"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[124]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["4"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["0"]]],"0",0,0,0,0,0,0,"00"," int. "],UZ:["998","810","(?:33|[5-79]\\d|88)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[35-9]"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],VA:["39","00","0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}",[6,7,8,9,10,11],0,0,0,0,0,0,"06698"],VC:["1","011","(?:[58]\\d\\d|784|900)\\d{7}",[10],0,"1",0,"1|([2-7]\\d{6})$","784$1",0,"784"],VE:["58","00","[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}",[10],[["(\\d{3})(\\d{7})","$1-$2",["[24-689]"],"0$1"]],"0"],VG:["1","011","(?:284|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"1|([2-578]\\d{6})$","284$1",0,"284"],VI:["1","011","[58]\\d{9}|(?:34|90)0\\d{7}",[10],0,"1",0,"1|([2-9]\\d{6})$","340$1",0,"340"],VN:["84","00","[12]\\d{9}|[135-9]\\d{8}|[16]\\d{7}|[16-8]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["80"],"0$1",1],["(\\d{4})(\\d{4,6})","$1 $2",["1"],0,1],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[69]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[3578]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["2[48]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["2"],"0$1",1]],"0"],VU:["678","00","[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}",[5,7],[["(\\d{3})(\\d{4})","$1 $2",["[57-9]"]]]],WF:["681","00","(?:40|72)\\d{4}|8\\d{5}(?:\\d{3})?",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[478]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],WS:["685","0","(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}",[5,6,7,10],[["(\\d{5})","$1",["[2-5]|6[1-9]"]],["(\\d{3})(\\d{3,7})","$1 $2",["[68]"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],XK:["383","00","[23]\\d{7,8}|(?:4\\d\\d|[89]00)\\d{5}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[23]"],"0$1"]],"0"],YE:["967","00","(?:1|7\\d)\\d{7}|[1-7]\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-6]|7(?:[24-6]|8[0-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"],"0$1"]],"0"],YT:["262","00","80\\d{7}|(?:26|63)9\\d{6}",[9],0,"0",0,0,0,0,"269|63"],ZA:["27","00","[1-79]\\d{8}|8\\d{4,9}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,4})","$1 $2",["8[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["8[1-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["860"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],ZM:["260","00","800\\d{6}|(?:21|63|[79]\\d)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[79]"],"0$1"]],"0"],ZW:["263","00","2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}",[5,6,7,8,9,10],[["(\\d{3})(\\d{3,5})","$1 $2",["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"],"0$1"],["(\\d)(\\d{3})(\\d{2,4})","$1 $2 $3",["[49]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["80"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2","2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)","2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["29[013-9]|39|54"],"0$1"],["(\\d{4})(\\d{3,5})","$1 $2",["(?:25|54)8","258|5483"],"0$1"]],"0"]},nonGeographic:{800:["800",0,"(?:00|[1-9]\\d)\\d{6}",[8],[["(\\d{4})(\\d{4})","$1 $2",["\\d"]]],0,0,0,0,0,0,[0,0,["(?:00|[1-9]\\d)\\d{6}"]]],808:["808",0,"[1-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[1-9]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,0,["[1-9]\\d{7}"]]],870:["870",0,"7\\d{11}|[35-7]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[35-7]"]]],0,0,0,0,0,0,[0,["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"]]],878:["878",0,"10\\d{10}",[12],[["(\\d{2})(\\d{5})(\\d{5})","$1 $2 $3",["1"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["10\\d{10}"]]],881:["881",0,"[0-36-9]\\d{8}",[9],[["(\\d)(\\d{3})(\\d{5})","$1 $2 $3",["[0-36-9]"]]],0,0,0,0,0,0,[0,["[0-36-9]\\d{8}"]]],882:["882",0,"[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?",[7,8,9,10,11,12],[["(\\d{2})(\\d{5})","$1 $2",["16|342"]],["(\\d{2})(\\d{6})","$1 $2",["49"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["1[36]|9"]],["(\\d{2})(\\d{4})(\\d{3})","$1 $2 $3",["3[23]"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["16"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|23|3(?:[15]|4[57])|4|51"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["34"]],["(\\d{2})(\\d{4,5})(\\d{5})","$1 $2 $3",["[1-35]"]]],0,0,0,0,0,0,[0,["342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|50\\d{3})\\d{7}",[7,8,9,10,12]],0,0,0,0,0,0,["1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:345\\d|9[89])\\d{6}|(?:10|2(?:3|85\\d)|3(?:[15]|[69]\\d\\d)|4[15-8]|51)\\d{8}"]]],883:["883",0,"(?:[1-4]\\d|51)\\d{6,10}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,8})","$1 $2 $3",["[14]|2[24-689]|3[02-689]|51[24-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["510"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["21"]],["(\\d{4})(\\d{4})(\\d{4})","$1 $2 $3",["51[13]"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[235]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[013-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}"]]],888:["888",0,"\\d{11}",[11],[["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3"]],0,0,0,0,0,0,[0,0,0,0,0,0,["\\d{11}"]]],979:["979",0,"[1359]\\d{8}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[1359]"]]],0,0,0,0,0,0,[0,0,0,["[1359]\\d{8}"]]]}};function BT(e,t){var r=Array.prototype.slice.call(t);return r.push(B2),e.apply(this,r)}function Wf(e){return Wf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wf(e)}function Vy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function WT(e,t,r){return t&&Vy(e.prototype,t),r&&Vy(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function qT(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function HT(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ro(e,t)}function GT(e){var t=q2();return function(){var n=Fo(e),i;if(t){var o=Fo(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return QT(this,i)}}function QT(e,t){if(t&&(Wf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return W2(e)}function W2(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qf(e){var t=typeof Map=="function"?new Map:void 0;return qf=function(n){if(n===null||!KT(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(n))return t.get(n);t.set(n,i)}function i(){return vs(n,arguments,Fo(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),Ro(i,n)},qf(e)}function vs(e,t,r){return q2()?vs=Reflect.construct:vs=function(i,o,a){var s=[null];s.push.apply(s,o);var c=Function.bind.apply(i,s),l=new c;return a&&Ro(l,a.prototype),l},vs.apply(null,arguments)}function q2(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function KT(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function Ro(e,t){return Ro=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Ro(e,t)}function Fo(e){return Fo=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Fo(e)}var kn=function(e){HT(r,e);var t=GT(r);function r(n){var i;return qT(this,r),i=t.call(this,n),Object.setPrototypeOf(W2(i),r.prototype),i.name=i.constructor.name,i}return WT(r)}(qf(Error)),ap=2,YT=17,XT=3,Zt="0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9",ZT="-\u2010-\u2015\u2212\u30FC\uFF0D",JT="\uFF0F/",eN="\uFF0E.",tN=" \xA0\xAD\u200B\u2060\u3000",rN="()\uFF08\uFF09\uFF3B\uFF3D\\[\\]",nN="~\u2053\u223C\uFF5E",or="".concat(ZT).concat(JT).concat(eN).concat(tN).concat(rN).concat(nN),oc="+\uFF0B";function By(e,t){e=e.split("-"),t=t.split("-");for(var r=e[0].split("."),n=t[0].split("."),i=0;i<3;i++){var o=Number(r[i]),a=Number(n[i]);if(o>a)return 1;if(a>o)return-1;if(!isNaN(o)&&isNaN(a))return 1;if(isNaN(o)&&!isNaN(a))return-1}return e[1]&&t[1]?e[1]>t[1]?1:e[1]<t[1]?-1:0:!e[1]&&t[1]?1:e[1]&&!t[1]?-1:0}function Ol(e){return Ol=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ol(e)}function ac(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function sc(e,t,r){return t&&Wy(e.prototype,t),r&&Wy(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var iN="1.2.0",oN="1.7.35",qy=" ext. ",aN=/^\d+$/,bt=function(){function e(t){ac(this,e),uN(t),this.metadata=t,H2.call(this,t)}return sc(e,[{key:"getCountries",value:function(){return Object.keys(this.metadata.countries).filter(function(r){return r!=="001"})}},{key:"getCountryMetadata",value:function(r){return this.metadata.countries[r]}},{key:"nonGeographic",value:function(){if(!(this.v1||this.v2||this.v3))return this.metadata.nonGeographic||this.metadata.nonGeographical}},{key:"hasCountry",value:function(r){return this.getCountryMetadata(r)!==void 0}},{key:"hasCallingCode",value:function(r){if(this.getCountryCodesForCallingCode(r))return!0;if(this.nonGeographic()){if(this.nonGeographic()[r])return!0}else{var n=this.countryCallingCodes()[r];if(n&&n.length===1&&n[0]==="001")return!0}}},{key:"isNonGeographicCallingCode",value:function(r){return this.nonGeographic()?!!this.nonGeographic()[r]:!this.getCountryCodesForCallingCode(r)}},{key:"country",value:function(r){return this.selectNumberingPlan(r)}},{key:"selectNumberingPlan",value:function(r,n){if(r&&aN.test(r)&&(n=r,r=null),r&&r!=="001"){if(!this.hasCountry(r))throw new Error("Unknown country: ".concat(r));this.numberingPlan=new Hy(this.getCountryMetadata(r),this)}else if(n){if(!this.hasCallingCode(n))throw new Error("Unknown calling code: ".concat(n));this.numberingPlan=new Hy(this.getNumberingPlanMetadata(n),this)}else this.numberingPlan=void 0;return this}},{key:"getCountryCodesForCallingCode",value:function(r){var n=this.countryCallingCodes()[r];if(n)return n.length===1&&n[0].length===3?void 0:n}},{key:"getCountryCodeForCallingCode",value:function(r){var n=this.getCountryCodesForCallingCode(r);if(n)return n[0]}},{key:"getNumberingPlanMetadata",value:function(r){var n=this.getCountryCodeForCallingCode(r);if(n)return this.getCountryMetadata(n);if(this.nonGeographic()){var i=this.nonGeographic()[r];if(i)return i}else{var o=this.countryCallingCodes()[r];if(o&&o.length===1&&o[0]==="001")return this.metadata.countries["001"]}}},{key:"countryCallingCode",value:function(){return this.numberingPlan.callingCode()}},{key:"IDDPrefix",value:function(){return this.numberingPlan.IDDPrefix()}},{key:"defaultIDDPrefix",value:function(){return this.numberingPlan.defaultIDDPrefix()}},{key:"nationalNumberPattern",value:function(){return this.numberingPlan.nationalNumberPattern()}},{key:"possibleLengths",value:function(){return this.numberingPlan.possibleLengths()}},{key:"formats",value:function(){return this.numberingPlan.formats()}},{key:"nationalPrefixForParsing",value:function(){return this.numberingPlan.nationalPrefixForParsing()}},{key:"nationalPrefixTransformRule",value:function(){return this.numberingPlan.nationalPrefixTransformRule()}},{key:"leadingDigits",value:function(){return this.numberingPlan.leadingDigits()}},{key:"hasTypes",value:function(){return this.numberingPlan.hasTypes()}},{key:"type",value:function(r){return this.numberingPlan.type(r)}},{key:"ext",value:function(){return this.numberingPlan.ext()}},{key:"countryCallingCodes",value:function(){return this.v1?this.metadata.country_phone_code_to_countries:this.metadata.country_calling_codes}},{key:"chooseCountryByCountryCallingCode",value:function(r){return this.selectNumberingPlan(r)}},{key:"hasSelectedNumberingPlan",value:function(){return this.numberingPlan!==void 0}}]),e}(),Hy=function(){function e(t,r){ac(this,e),this.globalMetadataObject=r,this.metadata=t,H2.call(this,r.metadata)}return sc(e,[{key:"callingCode",value:function(){return this.metadata[0]}},{key:"getDefaultCountryMetadataForRegion",value:function(){return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode())}},{key:"IDDPrefix",value:function(){if(!(this.v1||this.v2))return this.metadata[1]}},{key:"defaultIDDPrefix",value:function(){if(!(this.v1||this.v2))return this.metadata[12]}},{key:"nationalNumberPattern",value:function(){return this.v1||this.v2?this.metadata[1]:this.metadata[2]}},{key:"possibleLengths",value:function(){if(!this.v1)return this.metadata[this.v2?2:3]}},{key:"_getFormats",value:function(r){return r[this.v1?2:this.v2?3:4]}},{key:"formats",value:function(){var r=this,n=this._getFormats(this.metadata)||this._getFormats(this.getDefaultCountryMetadataForRegion())||[];return n.map(function(i){return new sN(i,r)})}},{key:"nationalPrefix",value:function(){return this.metadata[this.v1?3:this.v2?4:5]}},{key:"_getNationalPrefixFormattingRule",value:function(r){return r[this.v1?4:this.v2?5:6]}},{key:"nationalPrefixFormattingRule",value:function(){return this._getNationalPrefixFormattingRule(this.metadata)||this._getNationalPrefixFormattingRule(this.getDefaultCountryMetadataForRegion())}},{key:"_nationalPrefixForParsing",value:function(){return this.metadata[this.v1?5:this.v2?6:7]}},{key:"nationalPrefixForParsing",value:function(){return this._nationalPrefixForParsing()||this.nationalPrefix()}},{key:"nationalPrefixTransformRule",value:function(){return this.metadata[this.v1?6:this.v2?7:8]}},{key:"_getNationalPrefixIsOptionalWhenFormatting",value:function(){return!!this.metadata[this.v1?7:this.v2?8:9]}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata)||this._getNationalPrefixIsOptionalWhenFormatting(this.getDefaultCountryMetadataForRegion())}},{key:"leadingDigits",value:function(){return this.metadata[this.v1?8:this.v2?9:10]}},{key:"types",value:function(){return this.metadata[this.v1?9:this.v2?10:11]}},{key:"hasTypes",value:function(){return this.types()&&this.types().length===0?!1:!!this.types()}},{key:"type",value:function(r){if(this.hasTypes()&&Gy(this.types(),r))return new cN(Gy(this.types(),r),this)}},{key:"ext",value:function(){return this.v1||this.v2?qy:this.metadata[13]||qy}}]),e}(),sN=function(){function e(t,r){ac(this,e),this._format=t,this.metadata=r}return sc(e,[{key:"pattern",value:function(){return this._format[0]}},{key:"format",value:function(){return this._format[1]}},{key:"leadingDigitsPatterns",value:function(){return this._format[2]||[]}},{key:"nationalPrefixFormattingRule",value:function(){return this._format[3]||this.metadata.nationalPrefixFormattingRule()}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return!!this._format[4]||this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"nationalPrefixIsMandatoryWhenFormattingInNationalFormat",value:function(){return this.usesNationalPrefix()&&!this.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"usesNationalPrefix",value:function(){return!!(this.nationalPrefixFormattingRule()&&!lN.test(this.nationalPrefixFormattingRule()))}},{key:"internationalFormat",value:function(){return this._format[5]||this.format()}}]),e}(),lN=/^\(?\$1\)?$/,cN=function(){function e(t,r){ac(this,e),this.type=t,this.metadata=r}return sc(e,[{key:"pattern",value:function(){return this.metadata.v1?this.type:this.type[0]}},{key:"possibleLengths",value:function(){if(!this.metadata.v1)return this.type[1]||this.metadata.possibleLengths()}}]),e}();function Gy(e,t){switch(t){case"FIXED_LINE":return e[0];case"MOBILE":return e[1];case"TOLL_FREE":return e[2];case"PREMIUM_RATE":return e[3];case"PERSONAL_NUMBER":return e[4];case"VOICEMAIL":return e[5];case"UAN":return e[6];case"PAGER":return e[7];case"VOIP":return e[8];case"SHARED_COST":return e[9]}}function uN(e){if(!e)throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!fu(e)||!fu(e.countries))throw new Error("[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got ".concat(fu(e)?"an object of shape: { "+Object.keys(e).join(", ")+" }":"a "+dN(e)+": "+e,"."))}var fu=function(t){return Ol(t)==="object"},dN=function(t){return Ol(t)};function sp(e,t){if(t=new bt(t),t.hasCountry(e))return t.country(e).countryCallingCode();throw new Error("Unknown country: ".concat(e))}function H2(e){var t=e.version;typeof t=="number"?(this.v1=t===1,this.v2=t===2,this.v3=t===3,this.v4=t===4):t?By(t,iN)===-1?this.v2=!0:By(t,oN)===-1?this.v3=!0:this.v4=!0:this.v1=!0}var fN=";ext=",Zn=function(t){return"([".concat(Zt,"]{1,").concat(t,"})")};function G2(e){var t="20",r="15",n="9",i="6",o="[ \xA0\\t,]*",a="[:\\.\uFF0E]?[ \xA0\\t,-]*",s="#?",c="(?:e?xt(?:ensi(?:o\u0301?|\xF3))?n?|\uFF45?\uFF58\uFF54\uFF4E?|\u0434\u043E\u0431|anexo)",l="(?:[x\uFF58#\uFF03~\uFF5E]|int|\uFF49\uFF4E\uFF54)",u="[- ]+",d="[ \xA0\\t]*",f="(?:,{2}|;)",h=fN+Zn(t),p=o+c+a+Zn(t)+s,m=o+l+a+Zn(n)+s,v=u+Zn(i)+"#",y=d+f+a+Zn(r)+s,b=d+"(?:,)+"+a+Zn(n)+s;return h+"|"+p+"|"+m+"|"+v+"|"+y+"|"+b}var hN="["+Zt+"]{"+ap+"}",pN="["+oc+"]{0,1}(?:["+or+"]*["+Zt+"]){3,}["+or+Zt+"]*",mN=new RegExp("^["+oc+"]{0,1}(?:["+or+"]*["+Zt+"]){1,2}$","i"),vN=pN+"(?:"+G2()+")?",yN=new RegExp("^"+hN+"$|^"+vN+"$","i");function Q2(e){return e.length>=ap&&yN.test(e)}function gN(e){return mN.test(e)}var Qy=new RegExp("(?:"+G2()+")$","i");function bN(e){var t=e.search(Qy);if(t<0)return{};for(var r=e.slice(0,t),n=e.match(Qy),i=1;i<n.length;){if(n[i])return{number:r,ext:n[i]};i++}}function $N(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=wN(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
3560
+ `}};xr.styles=jT;$([Xe(".dialog")],xr.prototype,"dialog",2);$([Xe(".dialog__panel")],xr.prototype,"panel",2);$([Xe(".dialog__overlay")],xr.prototype,"overlay",2);$([S({type:Boolean,reflect:!0})],xr.prototype,"open",2);$([S({reflect:!0})],xr.prototype,"label",2);$([S({attribute:"no-header",type:Boolean,reflect:!0})],xr.prototype,"noHeader",2);$([De("open",{waitUntilFirstUpdate:!0})],xr.prototype,"handleOpenChange",1);xr=$([_t("sl-dialog")],xr);ur("dialog.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:250,easing:"ease"}});ur("dialog.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:250,easing:"ease"}});ur("dialog.denyClose",{keyframes:[{scale:1},{scale:1.02},{scale:1}],options:{duration:250}});ur("dialog.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:250}});ur("dialog.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:250}});const zT=`.dialog::part(overlay){background-color:#0000007a}.dialog::part(body){padding-bottom:.25rem}.dialog::part(footer){padding-top:0}.hideFooter::part(footer){display:none}.showHeader::part(body){padding-top:0}.dialog::part(title){font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-weight:500}
3561
+ `,ga=C("<style></style>"),UT=C('<slot name="label"><p class="text-xl font-sans font-medium"></p></slot>'),VT=C('<sl-dialog class="dialog"><div class="font-sans py-4"><slot></slot></div><div class="flex flex-col xs:flex-row justify-end gap-2" slot="footer"><photon-button variant="outline"></photon-button><photon-button></photon-button></div></sl-dialog>');it("https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.0.0-beta.82/dist/");$e("photon-dialog",{label:void 0,header:!0,open:!1,confirmText:"Yes, Cancel",cancelText:"No, Keep Editing",disableButtons:!1,loading:!1,hideFooter:!1,disableSubmit:!1,width:"500px",overlayClose:!1},e=>{let t;const r=n=>{const i=new CustomEvent(n?"photon-dialog-confirmed":"photon-dialog-canceled",{composed:!0,bubbles:!0,detail:{}});t?.dispatchEvent(i)};return[(()=>{const n=ga.cloneNode(!0);return w(n,ze),n})(),(()=>{const n=ga.cloneNode(!0);return w(n,Vt),n})(),(()=>{const n=ga.cloneNode(!0);return w(n,Ut),n})(),(()=>{const n=ga.cloneNode(!0);return w(n,zT),n})(),(()=>{const n=V(()=>document.importNode(VT,!0)),i=n.firstChild,o=i.firstChild,a=i.nextSibling,s=a.firstChild,c=s.nextSibling,l=t;return typeof l=="function"?ee(l,n):t=n,n.addEventListener("sl-request-close",u=>{u.detail.source==="overlay"&&!e.overlayClose||u.detail.source==="keyboard"?u.preventDefault():r(!1)}),n._$owner=P(),w(n,U(ne,{get when(){return!e.header},get children(){const u=UT.cloneNode(!0),d=u.firstChild;return u._$owner=P(),w(d,()=>e.label),u}}),i),o._$owner=P(),s.addEventListener("photon-clicked",()=>{r(!1)}),s._$owner=P(),w(s,()=>e.cancelText),c.addEventListener("photon-clicked",()=>{r(!0)}),c._$owner=P(),w(c,()=>e.confirmText),W(u=>{const d=!!e.hideFooter,f=!!e.header,h=`--width: ${e.width};`,p=e.label,m=e.open,v=!e.header,y=!!e.hideFooter,b=e.disableButtons||e.loading,g=e.disableButtons||e.disableSubmit,_=e.loading;return d!==u._v$&&n.classList.toggle("hideFooter",u._v$=d),f!==u._v$2&&n.classList.toggle("showHeader",u._v$2=f),u._v$3=C$(n,h,u._v$3),p!==u._v$4&&(n.label=u._v$4=p),m!==u._v$5&&(n.open=u._v$5=m),v!==u._v$6&&(n.noHeader=u._v$6=v),y!==u._v$7&&a.classList.toggle("hidden",u._v$7=y),b!==u._v$8&&(s.disabled=u._v$8=b),g!==u._v$9&&(c.disabled=u._v$9=g),_!==u._v$10&&(c.loading=u._v$10=_),u},{_v$:void 0,_v$2:void 0,_v$3:void 0,_v$4:void 0,_v$5:void 0,_v$6:void 0,_v$7:void 0,_v$8:void 0,_v$9:void 0,_v$10:void 0}),n})()]});const B2={version:4,country_calling_codes:{1:["US","AG","AI","AS","BB","BM","BS","CA","DM","DO","GD","GU","JM","KN","KY","LC","MP","MS","PR","SX","TC","TT","VC","VG","VI"],7:["RU","KZ"],20:["EG"],27:["ZA"],30:["GR"],31:["NL"],32:["BE"],33:["FR"],34:["ES"],36:["HU"],39:["IT","VA"],40:["RO"],41:["CH"],43:["AT"],44:["GB","GG","IM","JE"],45:["DK"],46:["SE"],47:["NO","SJ"],48:["PL"],49:["DE"],51:["PE"],52:["MX"],53:["CU"],54:["AR"],55:["BR"],56:["CL"],57:["CO"],58:["VE"],60:["MY"],61:["AU","CC","CX"],62:["ID"],63:["PH"],64:["NZ"],65:["SG"],66:["TH"],81:["JP"],82:["KR"],84:["VN"],86:["CN"],90:["TR"],91:["IN"],92:["PK"],93:["AF"],94:["LK"],95:["MM"],98:["IR"],211:["SS"],212:["MA","EH"],213:["DZ"],216:["TN"],218:["LY"],220:["GM"],221:["SN"],222:["MR"],223:["ML"],224:["GN"],225:["CI"],226:["BF"],227:["NE"],228:["TG"],229:["BJ"],230:["MU"],231:["LR"],232:["SL"],233:["GH"],234:["NG"],235:["TD"],236:["CF"],237:["CM"],238:["CV"],239:["ST"],240:["GQ"],241:["GA"],242:["CG"],243:["CD"],244:["AO"],245:["GW"],246:["IO"],247:["AC"],248:["SC"],249:["SD"],250:["RW"],251:["ET"],252:["SO"],253:["DJ"],254:["KE"],255:["TZ"],256:["UG"],257:["BI"],258:["MZ"],260:["ZM"],261:["MG"],262:["RE","YT"],263:["ZW"],264:["NA"],265:["MW"],266:["LS"],267:["BW"],268:["SZ"],269:["KM"],290:["SH","TA"],291:["ER"],297:["AW"],298:["FO"],299:["GL"],350:["GI"],351:["PT"],352:["LU"],353:["IE"],354:["IS"],355:["AL"],356:["MT"],357:["CY"],358:["FI","AX"],359:["BG"],370:["LT"],371:["LV"],372:["EE"],373:["MD"],374:["AM"],375:["BY"],376:["AD"],377:["MC"],378:["SM"],380:["UA"],381:["RS"],382:["ME"],383:["XK"],385:["HR"],386:["SI"],387:["BA"],389:["MK"],420:["CZ"],421:["SK"],423:["LI"],500:["FK"],501:["BZ"],502:["GT"],503:["SV"],504:["HN"],505:["NI"],506:["CR"],507:["PA"],508:["PM"],509:["HT"],590:["GP","BL","MF"],591:["BO"],592:["GY"],593:["EC"],594:["GF"],595:["PY"],596:["MQ"],597:["SR"],598:["UY"],599:["CW","BQ"],670:["TL"],672:["NF"],673:["BN"],674:["NR"],675:["PG"],676:["TO"],677:["SB"],678:["VU"],679:["FJ"],680:["PW"],681:["WF"],682:["CK"],683:["NU"],685:["WS"],686:["KI"],687:["NC"],688:["TV"],689:["PF"],690:["TK"],691:["FM"],692:["MH"],850:["KP"],852:["HK"],853:["MO"],855:["KH"],856:["LA"],880:["BD"],886:["TW"],960:["MV"],961:["LB"],962:["JO"],963:["SY"],964:["IQ"],965:["KW"],966:["SA"],967:["YE"],968:["OM"],970:["PS"],971:["AE"],972:["IL"],973:["BH"],974:["QA"],975:["BT"],976:["MN"],977:["NP"],992:["TJ"],993:["TM"],994:["AZ"],995:["GE"],996:["KG"],998:["UZ"]},countries:{AC:["247","00","(?:[01589]\\d|[46])\\d{4}",[5,6]],AD:["376","00","(?:1|6\\d)\\d{7}|[135-9]\\d{5}",[6,8,9],[["(\\d{3})(\\d{3})","$1 $2",["[135-9]"]],["(\\d{4})(\\d{4})","$1 $2",["1"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]]],AE:["971","00","(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}",[5,6,7,8,9,10,11,12],[["(\\d{3})(\\d{2,9})","$1 $2",["60|8"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[236]|[479][2-8]"],"0$1"],["(\\d{3})(\\d)(\\d{5})","$1 $2 $3",["[479]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"]],"0"],AF:["93","00","[2-7]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"]],"0"],AG:["1","011","(?:268|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"1|([457]\\d{6})$","268$1",0,"268"],AI:["1","011","(?:264|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"1|([2457]\\d{6})$","264$1",0,"264"],AL:["355","00","(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}",[6,7,8,9],[["(\\d{3})(\\d{3,4})","$1 $2",["80|9"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["4[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2358][2-5]|4"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["[23578]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["6"],"0$1"]],"0"],AM:["374","00","(?:[1-489]\\d|55|60|77)\\d{6}",[8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[89]0"],"0 $1"],["(\\d{3})(\\d{5})","$1 $2",["2|3[12]"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["1|47"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[3-9]"],"0$1"]],"0"],AO:["244","00","[29]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[29]"]]]],AR:["54","00","(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}",[10,11],[["(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])","2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["1"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["[23]"],"0$1",1],["(\\d)(\\d{4})(\\d{2})(\\d{4})","$2 15-$3-$4",["9(?:2[2-469]|3[3-578])","9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))","9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",0,"$1 $2 $3-$4"],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 15-$3-$4",["91"],"0$1",0,"$1 $2 $3-$4"],["(\\d{3})(\\d{3})(\\d{5})","$1-$2-$3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 15-$3-$4",["9"],"0$1",0,"$1 $2 $3-$4"]],"0",0,"0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?","9$1"],AS:["1","011","(?:[58]\\d\\d|684|900)\\d{7}",[10],0,"1",0,"1|([267]\\d{6})$","684$1",0,"684"],AT:["43","00","1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}",[4,5,6,7,8,9,10,11,12,13],[["(\\d)(\\d{3,12})","$1 $2",["1(?:11|[2-9])"],"0$1"],["(\\d{3})(\\d{2})","$1 $2",["517"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["5[079]"],"0$1"],["(\\d{3})(\\d{3,10})","$1 $2",["(?:31|4)6|51|6(?:5[0-3579]|[6-9])|7(?:20|32|8)|[89]"],"0$1"],["(\\d{4})(\\d{3,9})","$1 $2",["[2-467]|5[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["5"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,7})","$1 $2 $3",["5"],"0$1"]],"0"],AU:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}",[5,6,7,8,9,10,12],[["(\\d{2})(\\d{3,4})","$1 $2",["16"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,4})","$1 $2 $3",["16"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["14|4"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"],"(0$1)"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:30|[89])"]]],"0",0,"0|(183[12])",0,0,0,[["(?:(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|3(?:[0-3589]\\d|4[0-578]|6[1-9]|7[0-35-9])|7(?:[013-57-9]\\d|2[0-8]))\\d{3}|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4]))|(?:6[0-8]|[78]\\d)\\d{3}|9(?:[02-9]\\d{3}|1(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79])))))\\d{3}",[9]],["4(?:83[0-389]|93[0-6])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[016-9]|7[02-9]|8[0-24-9]|9[0-27-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,["163\\d{2,6}",[5,6,7,8,9]],["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],AW:["297","00","(?:[25-79]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[25-9]"]]]],AX:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}",[5,6,7,8,9,10,11,12],0,"0",0,0,0,0,"18",0,"00"],AZ:["994","00","365\\d{6}|(?:[124579]\\d|60|88)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[28]|2|365|46","1[28]|2|365[45]|46","1[28]|2|365(?:4|5[02])|46"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-9]"],"0$1"]],"0"],BA:["387","00","6\\d{8}|(?:[35689]\\d|49|70)\\d{6}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-3]|[7-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]|6[56]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6"],"0$1"]],"0"],BB:["1","011","(?:246|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"1|([2-9]\\d{6})$","246$1",0,"246"],BD:["880","00","[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{4,6})","$1-$2",["31[5-8]|[459]1"],"0$1"],["(\\d{3})(\\d{3,7})","$1-$2",["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:28|4[14]|5)|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"],"0$1"],["(\\d{4})(\\d{3,6})","$1-$2",["[13-9]|22"],"0$1"],["(\\d)(\\d{7,8})","$1-$2",["2"],"0$1"]],"0"],BE:["32","00","4\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:80|9)0"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[239]|4[23]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[15-8]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4"],"0$1"]],"0"],BF:["226","00","[025-7]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[025-7]"]]]],BG:["359","00","00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}",[6,7,8,9,12],[["(\\d)(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["43[1-6]|70[1-9]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:70|8)0"],"0$1"],["(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[1-7]|7"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[48]|9[08]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"]],"0"],BH:["973","00","[136-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[13679]|8[047]"]]]],BI:["257","00","(?:[267]\\d|31)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2367]"]]]],BJ:["229","00","[24-689]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-689]"]]]],BL:["590","00","(?:590|(?:69|80)\\d|976)\\d{6}",[9],0,"0",0,0,0,0,0,[["590(?:2[7-9]|5[12]|87)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["976[01]\\d{5}"]]],BM:["1","011","(?:441|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"1|([2-9]\\d{6})$","441$1",0,"441"],BN:["673","00","[2-578]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-578]"]]]],BO:["591","00(?:1\\d)?","(?:[2-467]\\d\\d|8001)\\d{5}",[8,9],[["(\\d)(\\d{7})","$1 $2",["[23]|4[46]"]],["(\\d{8})","$1",["[67]"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["8"]]],"0",0,"0(1\\d)?"],BQ:["599","00","(?:[34]1|7\\d)\\d{5}",[7],0,0,0,0,0,0,"[347]"],BR:["55","00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)","(?:[1-46-9]\\d\\d|5(?:[0-46-9]\\d|5[0-46-9]))\\d{8}|[1-9]\\d{9}|[3589]\\d{8}|[34]\\d{7}",[8,9,10,11],[["(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37)","4(?:02|37)0|[34]00"]],["(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["(?:[358]|90)0"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"],"($1)"],["(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[16][1-9]|[2-57-9]"],"($1)"]],"0",0,"(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?","$2"],BS:["1","011","(?:242|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"1|([3-8]\\d{6})$","242$1",0,"242"],BT:["975","00","[17]\\d{7}|[2-8]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-68]|7[246]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|7"]]]],BW:["267","00","(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}",[7,8,10],[["(\\d{2})(\\d{5})","$1 $2",["90"]],["(\\d{3})(\\d{4})","$1 $2",["[24-6]|3[15-79]"]],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37]"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["8"]]]],BY:["375","810","(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3})","$1 $2",["800"],"8 $1"],["(\\d{3})(\\d{2})(\\d{2,4})","$1 $2 $3",["800"],"8 $1"],["(\\d{4})(\\d{2})(\\d{3})","$1 $2-$3",["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])","1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"],"8 0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["1(?:[56]|7[467])|2[1-3]"],"8 0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-4]"],"8 0$1"],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["[89]"],"8 $1"]],"8",0,"0|80?",0,0,0,0,"8~10"],BZ:["501","00","(?:0800\\d|[2-8])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1-$2",["[2-8]"]],["(\\d)(\\d{3})(\\d{4})(\\d{3})","$1-$2-$3-$4",["0"]]]],CA:["1","011","(?:[2-8]\\d|90)\\d{8}|3\\d{6}",[7,10],0,"1",0,0,0,0,0,[["(?:2(?:04|[23]6|[48]9|50|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|3[178]|50|68|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|73)|90[25])[2-9]\\d{6}",[10]],["",[10]],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",[10]],["900[2-9]\\d{6}",[10]],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:00|2[125-7]|33|44|66|77|88)|622)[2-9]\\d{6}",[10]],0,["310\\d{4}",[7]],0,["600[2-9]\\d{6}",[10]]]],CC:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"0|([59]\\d{7})$","8$1",0,0,[["8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}",[9]],["4(?:83[0-389]|93[0-6])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[016-9]|7[02-9]|8[0-24-9]|9[0-27-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CD:["243","00","[189]\\d{8}|[1-68]\\d{6}",[7,9],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[1-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]"],"0$1"]],"0"],CF:["236","00","(?:[27]\\d{3}|8776)\\d{4}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[278]"]]]],CG:["242","00","222\\d{6}|(?:0\\d|80)\\d{7}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[02]"]]]],CH:["41","00","8\\d{11}|[2-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8[047]|90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]|81"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["8"],"0$1"]],"0"],CI:["225","00","[02]\\d{9}",[10],[["(\\d{2})(\\d{2})(\\d)(\\d{5})","$1 $2 $3 $4",["2"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3 $4",["0"]]]],CK:["682","00","[2-578]\\d{4}",[5],[["(\\d{2})(\\d{3})","$1 $2",["[2-578]"]]]],CL:["56","(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0","12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}",[9,10,11],[["(\\d{5})(\\d{4})","$1 $2",["219","2196"],"($1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["44"]],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[1-36]"],"($1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["9[2-9]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-9]|[1-9])"],"($1)"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{3})(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"]]]],CM:["237","00","[26]\\d{8}|88\\d{6,7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["88"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]|88"]]]],CN:["86","00|1(?:[12]\\d|79)\\d\\d00","1[127]\\d{8,9}|2\\d{9}(?:\\d{2})?|[12]\\d{6,7}|86\\d{6}|(?:1[03-689]\\d|6)\\d{7,9}|(?:[3-579]\\d|8[0-57-9])\\d{6,9}",[7,8,9,10,11,12],[["(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]","(?:10|2[0-57-9])(?:10|9[56])","10(?:10|9[56])|2[0-57-9](?:100|9[56])"],"0$1"],["(\\d{3})(\\d{5,6})","$1 $2",["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]","(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]","85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])","85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["(?:4|80)0"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|2(?:[02-57-9]|1[1-9])","10|2(?:[02-57-9]|1[1-9])","10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"],"0$1",1],["(\\d{3})(\\d{7,8})","$1 $2",["9"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["80"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[3-578]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-9]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["[12]"],"0$1",1]],"0",0,"0|(1(?:[12]\\d|79)\\d\\d)",0,0,0,0,"00"],CO:["57","00(?:4(?:[14]4|56)|[579])","(?:60\\d\\d|9101)\\d{6}|(?:1\\d|3)\\d{9}",[10,11],[["(\\d{3})(\\d{7})","$1 $2",["6"],"($1)"],["(\\d{3})(\\d{7})","$1 $2",["3[0-357]|91"]],["(\\d)(\\d{3})(\\d{7})","$1-$2-$3",["1"],"0$1",0,"$1 $2 $3"]],"0",0,"0(4(?:[14]4|56)|[579])?"],CR:["506","00","(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}",[8,10],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[3-9]"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[89]"]]],0,0,"(19(?:0[0-2468]|1[09]|20|66|77|99))"],CU:["53","119","[27]\\d{6,7}|[34]\\d{5,7}|(?:5|8\\d\\d)\\d{7}",[6,7,8,10],[["(\\d{2})(\\d{4,6})","$1 $2",["2[1-4]|[34]"],"(0$1)"],["(\\d)(\\d{6,7})","$1 $2",["7"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["5"],"0$1"],["(\\d{3})(\\d{7})","$1 $2",["8"],"0$1"]],"0"],CV:["238","0","(?:[2-59]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2-589]"]]]],CW:["599","00","(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[3467]"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["9[4-8]"]]],0,0,0,0,0,"[69]"],CX:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"0|([59]\\d{7})$","8$1",0,0,[["8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}",[9]],["4(?:83[0-389]|93[0-6])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[016-9]|7[02-9]|8[0-24-9]|9[0-27-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CY:["357","00","(?:[279]\\d|[58]0)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[257-9]"]]]],CZ:["420","00","(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]|9[015-7]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["96"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]]],DE:["49","00","[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}",[4,5,6,7,8,9,10,11,12,13,14,15],[["(\\d{2})(\\d{3,13})","$1 $2",["3[02]|40|[68]9"],"0$1"],["(\\d{3})(\\d{3,12})","$1 $2",["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1","2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"],"0$1"],["(\\d{4})(\\d{2,11})","$1 $2",["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]","[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["138"],"0$1"],["(\\d{5})(\\d{2,10})","$1 $2",["3"],"0$1"],["(\\d{3})(\\d{5,11})","$1 $2",["181"],"0$1"],["(\\d{3})(\\d)(\\d{4,10})","$1 $2 $3",["1(?:3|80)|9"],"0$1"],["(\\d{3})(\\d{7,8})","$1 $2",["1[67]"],"0$1"],["(\\d{3})(\\d{7,12})","$1 $2",["8"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["185","1850","18500"],"0$1"],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["18[68]"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["15[0568]"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["15[1279]"],"0$1"],["(\\d{3})(\\d{8})","$1 $2",["18"],"0$1"],["(\\d{3})(\\d{2})(\\d{7,8})","$1 $2 $3",["1(?:6[023]|7)"],"0$1"],["(\\d{4})(\\d{2})(\\d{7})","$1 $2 $3",["15[279]"],"0$1"],["(\\d{3})(\\d{2})(\\d{8})","$1 $2 $3",["15"],"0$1"]],"0"],DJ:["253","00","(?:2\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[27]"]]]],DK:["45","00","[2-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-9]"]]]],DM:["1","011","(?:[58]\\d\\d|767|900)\\d{7}",[10],0,"1",0,"1|([2-7]\\d{6})$","767$1",0,"767"],DO:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,0,0,0,"8001|8[024]9"],DZ:["213","00","(?:[1-4]|[5-79]\\d|80)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-8]"],"0$1"]],"0"],EC:["593","00","1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}",[8,9,10,11],[["(\\d)(\\d{3})(\\d{4})","$1 $2-$3",["[2-7]"],"(0$1)",0,"$1-$2-$3"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{3})(\\d{3,4})","$1 $2 $3",["1"]]],"0"],EE:["372","00","8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88","[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]],["(\\d{4})(\\d{3,4})","$1 $2",["[45]|8(?:00|[1-49])","[45]|8(?:00[1-9]|[1-49])"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],EG:["20","00","[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}",[8,9,10],[["(\\d)(\\d{7,8})","$1 $2",["[23]"],"0$1"],["(\\d{2})(\\d{6,7})","$1 $2",["1[35]|[4-6]|8[2468]|9[235-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[189]"],"0$1"]],"0"],EH:["212","00","[5-8]\\d{8}",[9],0,"0",0,0,0,0,"528[89]"],ER:["291","00","[178]\\d{6}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[178]"],"0$1"]],"0"],ES:["34","00","[5-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]00"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-9]"]]]],ET:["251","00","(?:11|[2-579]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-579]"],"0$1"]],"0"],FI:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}",[5,6,7,8,9,10,11,12],[["(\\d)(\\d{4,9})","$1 $2",["[2568][1-8]|3(?:0[1-9]|[1-9])|9"],"0$1"],["(\\d{3})(\\d{3,7})","$1 $2",["[12]00|[368]|70[07-9]"],"0$1"],["(\\d{2})(\\d{4,8})","$1 $2",["[1245]|7[135]"],"0$1"],["(\\d{2})(\\d{6,10})","$1 $2",["7"],"0$1"]],"0",0,0,0,0,"1[03-79]|[2-9]",0,"00"],FJ:["679","0(?:0|52)","45\\d{5}|(?:0800\\d|[235-9])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1 $2",["[235-9]|45"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]]],0,0,0,0,0,0,0,"00"],FK:["500","00","[2-7]\\d{4}",[5]],FM:["691","00","(?:[39]\\d\\d|820)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[389]"]]]],FO:["298","00","[2-9]\\d{5}",[6],[["(\\d{6})","$1",["[2-9]"]]],0,0,"(10(?:01|[12]0|88))"],FR:["33","00","[1-9]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0 $1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"],"0$1"]],"0"],GA:["241","00","(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}",[7,8],[["(\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-7]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["11|[67]"],"0$1"]],0,0,"0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})","$1"],GB:["44","00","[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}",[7,9,10],[["(\\d{3})(\\d{4})","$1 $2",["800","8001","80011","800111","8001111"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["845","8454","84546","845464"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["800"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["1(?:38|5[23]|69|76|94)","1(?:(?:38|69)7|5(?:24|39)|768|946)","1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["1(?:[2-69][02-9]|[78])"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[25]|7(?:0|6[02-9])","[25]|7(?:0|6(?:[03-9]|2[356]))"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[1389]"],"0$1"]],"0",0,0,0,0,0,[["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0235])|4(?:[0-5]\\d\\d|69[7-9]|70[0-579])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|50))\\d)|2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d\\d|1(?:[0-7]\\d\\d|8(?:[02]\\d|1[0-246-9])))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}",[9,10]],["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]],0," x"],GD:["1","011","(?:473|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"1|([2-9]\\d{6})$","473$1",0,"473"],GE:["995","00","(?:[3-57]\\d\\d|800)\\d{6}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["32"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[57]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[348]"],"0$1"]],"0"],GF:["594","00","(?:[56]94|80\\d|976)\\d{6}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[569]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],GG:["44","00","(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?",[7,9,10],0,"0",0,"0|([25-9]\\d{5})$","1481$1",0,0,[["1481[25-9]\\d{5}",[10]],["7(?:(?:781|839)\\d|911[17])\\d{5}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]]],GH:["233","00","(?:[235]\\d{3}|800)\\d{5}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[235]"],"0$1"]],"0"],GI:["350","00","(?:[25]\\d\\d|606)\\d{5}",[8],[["(\\d{3})(\\d{5})","$1 $2",["2"]]]],GL:["299","00","(?:19|[2-689]\\d|70)\\d{4}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["19|[2-9]"]]]],GM:["220","00","[2-9]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],GN:["224","00","722\\d{6}|(?:3|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["3"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[67]"]]]],GP:["590","00","(?:590|(?:69|80)\\d|976)\\d{6}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[569]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["590(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1289]|5[3-579]|6[0-489]|7[08]|8[0-689]|9\\d)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["976[01]\\d{5}"]]],GQ:["240","00","222\\d{6}|(?:3\\d|55|[89]0)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235]"]],["(\\d{3})(\\d{6})","$1 $2",["[89]"]]]],GR:["30","00","5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}",[10,11,12],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["21|7"]],["(\\d{4})(\\d{6})","$1 $2",["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2689]"]],["(\\d{3})(\\d{3,4})(\\d{5})","$1 $2 $3",["8"]]]],GT:["502","00","(?:1\\d{3}|[2-7])\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],GU:["1","011","(?:[58]\\d\\d|671|900)\\d{7}",[10],0,"1",0,"1|([3-9]\\d{6})$","671$1",0,"671"],GW:["245","00","[49]\\d{8}|4\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["40"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"]]]],GY:["592","001","9008\\d{3}|(?:[2-467]\\d\\d|862)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-46-9]"]]]],HK:["852","00(?:30|5[09]|[126-9]?)","8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}",[5,6,7,8,9,11],[["(\\d{3})(\\d{2,5})","$1 $2",["900","9003"]],["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{3})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]],0,0,0,0,0,0,0,"00"],HN:["504","00","8\\d{10}|[237-9]\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1-$2",["[237-9]"]]]],HR:["385","00","(?:[24-69]\\d|3[0-79])\\d{7}|80\\d{5,7}|[1-79]\\d{7}|6\\d{5,6}",[6,7,8,9],[["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["6[01]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{4})(\\d{3})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[67]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-5]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"]],"0"],HT:["509","00","(?:[2-489]\\d|55)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[2-589]"]]]],HU:["36","00","[235-7]\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"06 $1"]],"06"],ID:["62","00[89]","(?:(?:00[1-9]|8\\d)\\d{4}|[1-36])\\d{6}|00\\d{10}|[1-9]\\d{8,10}|[2-9]\\d{7}",[7,8,9,10,11,12,13],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["15"]],["(\\d{2})(\\d{5,9})","$1 $2",["2[124]|[36]1"],"(0$1)"],["(\\d{3})(\\d{5,7})","$1 $2",["800"],"0$1"],["(\\d{3})(\\d{5,8})","$1 $2",["[2-79]"],"(0$1)"],["(\\d{3})(\\d{3,4})(\\d{3})","$1-$2-$3",["8[1-35-9]"],"0$1"],["(\\d{3})(\\d{6,8})","$1 $2",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["804"],"0$1"],["(\\d{3})(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1-$2-$3",["8"],"0$1"]],"0"],IE:["353","00","(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["2[24-9]|47|58|6[237-9]|9[35-9]"],"(0$1)"],["(\\d{3})(\\d{5})","$1 $2",["[45]0"],"(0$1)"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["1"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2569]|4[1-69]|7[14]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["81"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[78]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["4"],"(0$1)"],["(\\d{2})(\\d)(\\d{3})(\\d{4})","$1 $2 $3 $4",["8"],"0$1"]],"0"],IL:["972","0(?:0|1[2-9])","1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}",[7,8,9,10,11,12],[["(\\d{4})(\\d{3})","$1-$2",["125"]],["(\\d{4})(\\d{2})(\\d{2})","$1-$2-$3",["121"]],["(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[2-489]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1-$2-$3",["12"]],["(\\d{4})(\\d{6})","$1-$2",["159"]],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3-$4",["1[7-9]"]],["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})","$1-$2 $3-$4",["15"]]],"0"],IM:["44","00","1624\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"0|([25-8]\\d{5})$","1624$1",0,"74576|(?:16|7[56])24"],IN:["91","00","(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}",[8,9,10,11,12,13],[["(\\d{8})","$1",["5(?:0|2[23]|3[03]|[67]1|88)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"],0,1],["(\\d{4})(\\d{4,5})","$1 $2",["180","1800"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["140"],0,1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79[1-7]|80[2-46]","11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])","11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[14]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:2[14]|3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"],"0$1",1],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|28|3[129]|4[1-35689]|5[29]|6[02-5]|70)|807","1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]","1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|83)|73179|807(?:1|9[1-3])|(?:1552|6(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[124-6])\\d|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"],"0$1",1],["(\\d{5})(\\d{5})","$1 $2",["[6-9]"],"0$1",1],["(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["1(?:6|8[06])","1(?:6|8[06]0)"],0,1],["(\\d{4})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["18"],0,1]],"0"],IO:["246","00","3\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["3"]]]],IQ:["964","00","(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-6]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],IR:["98","00","[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}",[4,5,6,7,10],[["(\\d{4,5})","$1",["96"],"0$1"],["(\\d{2})(\\d{4,5})","$1 $2",["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[1-8]"],"0$1"]],"0"],IS:["354","00|1(?:0(?:01|[12]0)|100)","(?:38\\d|[4-9])\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["[4-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["3"]]],0,0,0,0,0,0,0,"00"],IT:["39","00","0\\d{5,10}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?",[6,7,8,9,10,11],[["(\\d{2})(\\d{4,6})","$1 $2",["0[26]"]],["(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]],["(\\d{4})(\\d{2,6})","$1 $2",["0(?:[13-579][2-46-8]|8[236-8])"]],["(\\d{4})(\\d{4})","$1 $2",["894"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|5"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["1(?:44|[679])|[378]"]],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]|14"]],["(\\d{2})(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["3"]]],0,0,0,0,0,0,[["0669[0-79]\\d{1,6}|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[1-356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}"],["3[1-9]\\d{8}|3[2-9]\\d{7}",[9,10]],["80(?:0\\d{3}|3)\\d{3}",[6,9]],["(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}",[6,8,9,10]],["1(?:78\\d|99)\\d{6}",[9,10]],0,0,0,["55\\d{8}",[10]],["84(?:[08]\\d{3}|[17])\\d{3}",[6,9]]]],JE:["44","00","1534\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"0|([0-24-8]\\d{5})$","1534$1",0,0,[["1534[0-24-8]\\d{5}"],["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97[7-9]))\\d{5}"],["80(?:07(?:35|81)|8901)\\d{4}"],["(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"],["701511\\d{4}"],0,["(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}"],["56\\d{8}"]]],JM:["1","011","(?:[58]\\d\\d|658|900)\\d{7}",[10],0,"1",0,0,0,0,"658|876"],JO:["962","00","(?:(?:[2689]|7\\d)\\d|32|53)\\d{6}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2356]|87"],"(0$1)"],["(\\d{3})(\\d{5,6})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["70"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],JP:["81","010","00[1-9]\\d{6,14}|[257-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}",[8,9,10,11,12,13,14,15,16,17],[["(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"],"0$1"],["(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51|63)|9(?:80|9[16])","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9]|636)|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9]|636[457-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["[36]|4(?:2[09]|7[01])","[36]|4(?:2(?:0|9[02-69])|7(?:0[019]|1))"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[045]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[27-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9])|5(?:2|3[045]|4[0-369]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|49|51|6(?:[0-24]|36|5[0-3589]|72|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:49|55|83)[29]|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3[045]|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[23]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|72|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|7[015-9]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17|3[015-9]))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3[045]|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9(?:[019]|4[1-3]|6(?:[0-47-9]|5[01346-9])))|3(?:[29]|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[23]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|72|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|829(?:2|66)|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"],"0$1"],["(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["[14]|[289][2-9]|5[3-9]|7[2-4679]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[257-9]"],"0$1"]],"0"],KE:["254","000","(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}",[7,8,9,10],[["(\\d{2})(\\d{5,7})","$1 $2",["[24-6]"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[17]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0"],KG:["996","00","8\\d{9}|(?:[235-8]\\d|99)\\d{7}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["3(?:1[346]|[24-79])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-79]|88"],"0$1"],["(\\d{3})(\\d{3})(\\d)(\\d{2,3})","$1 $2 $3 $4",["8"],"0$1"]],"0"],KH:["855","00[14-9]","1\\d{9}|[1-9]\\d{7,8}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],KI:["686","00","(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}",[5,8],0,"0"],KM:["269","00","[3478]\\d{6}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[3478]"]]]],KN:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"1|([2-7]\\d{6})$","869$1",0,"869"],KP:["850","00|99","85\\d{6}|(?:19\\d|[2-7])\\d{7}",[8,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"]],"0"],KR:["82","00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))","00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}",[5,6,8,9,10,11,12,13,14],[["(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"],"0$1"],["(\\d{4})(\\d{4})","$1-$2",["1"]],["(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60|8"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["[1346]|5[1-5]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{2})(\\d{5})(\\d{4})","$1-$2-$3",["5"],"0$1"]],"0",0,"0(8(?:[1-46-8]|5\\d\\d))?"],KW:["965","00","18\\d{5}|(?:[2569]\\d|41)\\d{6}",[7,8],[["(\\d{4})(\\d{3,4})","$1 $2",["[169]|2(?:[235]|4[1-35-9])|52"]],["(\\d{3})(\\d{5})","$1 $2",["[245]"]]]],KY:["1","011","(?:345|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"1|([2-9]\\d{6})$","345$1",0,"345"],KZ:["7","810","(?:33622|8\\d{8})\\d{5}|[78]\\d{9}",[10,14],0,"8",0,0,0,0,"33|7",0,"8~10"],LA:["856","00","[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2[13]|3[14]|[4-8]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["30[013-9]"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[23]"],"0$1"]],"0"],LB:["961","00","[27-9]\\d{7}|[13-9]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[13-69]|7(?:[2-57]|62|8[0-7]|9[04-9])|8[02-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27-9]"]]],"0"],LC:["1","011","(?:[58]\\d\\d|758|900)\\d{7}",[10],0,"1",0,"1|([2-8]\\d{6})$","758$1",0,"758"],LI:["423","00","[68]\\d{8}|(?:[2378]\\d|90)\\d{5}",[7,9],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2379]|8(?:0[09]|7)","[2379]|8(?:0(?:02|9)|7)"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["69"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]],"0",0,"0|(1001)"],LK:["94","00","[1-9]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[1-689]"],"0$1"]],"0"],LR:["231","00","(?:[25]\\d|33|77|88)\\d{7}|(?:2\\d|[4-6])\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[4-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23578]"],"0$1"]],"0"],LS:["266","00","(?:[256]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2568]"]]]],LT:["370","00","(?:[3469]\\d|52|[78]0)\\d{6}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["52[0-7]"],"(8-$1)",1],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[7-9]"],"8 $1",1],["(\\d{2})(\\d{6})","$1 $2",["37|4(?:[15]|6[1-8])"],"(8-$1)",1],["(\\d{3})(\\d{5})","$1 $2",["[3-6]"],"(8-$1)",1]],"8",0,"[08]"],LU:["352","00","35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}",[4,5,6,7,8,9,10,11],[["(\\d{2})(\\d{3})","$1 $2",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["20[2-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4",["2(?:[0367]|4[3-8])"]],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["80[01]|90[015]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["20"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4 $5",["2(?:[0367]|4[3-8])"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})","$1 $2 $3 $4",["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]]],0,0,"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)"],LV:["371","00","(?:[268]\\d|90)\\d{6}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[269]|8[01]"]]]],LY:["218","00","[2-9]\\d{8}",[9],[["(\\d{2})(\\d{7})","$1-$2",["[2-9]"],"0$1"]],"0"],MA:["212","00","[5-8]\\d{8}",[9],[["(\\d{5})(\\d{4})","$1-$2",["5(?:29|38)","5(?:29[1289]|389)","529(?:1[1-46-9]|2[013-8]|90)|5(?:298|389)[0-46-9]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5[45]"],"0$1"],["(\\d{4})(\\d{5})","$1-$2",["5(?:2[2-489]|3[5-9]|9)|892","5(?:2(?:[2-49]|8[235-9])|3[5-9]|9)|892"],"0$1"],["(\\d{2})(\\d{7})","$1-$2",["8"],"0$1"],["(\\d{3})(\\d{6})","$1-$2",["[5-7]"],"0$1"]],"0",0,0,0,0,0,[["5293[01]\\d{4}|5(?:2(?:[0-25-7]\\d|3[1-578]|4[02-46-8]|8[0235-7]|9[0-289])|3(?:[0-47]\\d|5[02-9]|6[02-8]|8[0189]|9[3-9])|(?:4[067]|5[03])\\d)\\d{5}"],["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[017]\\d|2[0-2]|6[0-8]|8[0-3]))\\d{6}"],["80\\d{7}"],["89\\d{7}"],0,0,0,0,["592(?:4[0-2]|93)\\d{4}"]]],MC:["377","00","(?:[3489]|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[389]"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["6"],"0$1"]],"0"],MD:["373","00","(?:[235-7]\\d|[89]0)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["22|3"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[25-7]"],"0$1"]],"0"],ME:["382","00","(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"0$1"]],"0"],MF:["590","00","(?:590|(?:69|80)\\d|976)\\d{6}",[9],0,"0",0,0,0,0,0,[["590(?:0[079]|[14]3|[27][79]|30|5[0-268]|87)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["976[01]\\d{5}"]]],MG:["261","00","[23]\\d{8}",[9],[["(\\d{2})(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3 $4",["[23]"],"0$1"]],"0",0,"0|([24-9]\\d{6})$","20$1"],MH:["692","011","329\\d{4}|(?:[256]\\d|45)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1-$2",["[2-6]"]]],"1"],MK:["389","00","[2-578]\\d{7}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2|34[47]|4(?:[37]7|5[47]|64)"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[347]"],"0$1"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["[58]"],"0$1"]],"0"],ML:["223","00","[24-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-9]"]]]],MM:["95","00","1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}",[6,7,8,9,10],[["(\\d)(\\d{2})(\\d{3})","$1 $2 $3",["16|2"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["[45]|6(?:0[23]|[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-6]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[4-7]|8[1-35]"],"0$1"],["(\\d)(\\d{3})(\\d{4,6})","$1 $2 $3",["9(?:2[0-4]|[35-9]|4[137-9])"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["92"],"0$1"],["(\\d)(\\d{5})(\\d{4})","$1 $2 $3",["9"],"0$1"]],"0"],MN:["976","001","[12]\\d{7,9}|[5-9]\\d{7}",[8,9,10],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[12]1"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[5-9]"]],["(\\d{3})(\\d{5,6})","$1 $2",["[12]2[1-3]"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["[12](?:27|3[2-8]|4[2-68]|5[1-4689])","[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["[12]"],"0$1"]],"0"],MO:["853","00","0800\\d{3}|(?:28|[68]\\d)\\d{6}",[7,8],[["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{4})(\\d{4})","$1 $2",["[268]"]]]],MP:["1","011","[58]\\d{9}|(?:67|90)0\\d{7}",[10],0,"1",0,"1|([2-9]\\d{6})$","670$1",0,"670"],MQ:["596","00","(?:69|80)\\d{7}|(?:59|97)6\\d{6}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[569]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],MR:["222","00","(?:[2-4]\\d\\d|800)\\d{5}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-48]"]]]],MS:["1","011","(?:[58]\\d\\d|664|900)\\d{7}",[10],0,"1",0,"1|([34]\\d{6})$","664$1",0,"664"],MT:["356","00","3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2357-9]"]]]],MU:["230","0(?:0|[24-7]0|3[03])","(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[2-46]|8[013]"]],["(\\d{4})(\\d{4})","$1 $2",["[57]"]],["(\\d{5})(\\d{5})","$1 $2",["8"]]],0,0,0,0,0,0,0,"020"],MV:["960","0(?:0|19)","(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}",[7,10],[["(\\d{3})(\\d{4})","$1-$2",["[3467]|9[1-9]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"]]],0,0,0,0,0,0,0,"00"],MW:["265","00","(?:[1289]\\d|31|77)\\d{7}|1\\d{6}",[7,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[137-9]"],"0$1"]],"0"],MX:["52","0[09]","1(?:(?:[27]2|44|99)[1-9]|65[0-689])\\d{7}|(?:1(?:[01]\\d|2[13-9]|[35][1-9]|4[0-35-9]|6[0-46-9]|7[013-9]|8[1-79]|9[1-8])|[2-9]\\d)\\d{8}",[10,11],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["33|5[56]|81"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2-9]"],0,1],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 $3 $4",["1(?:33|5[56]|81)"],0,1],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 $3 $4",["1"],0,1]],"01",0,"0(?:[12]|4[45])|1",0,0,0,0,"00"],MY:["60","00","1\\d{8,9}|(?:3\\d|[4-9])\\d{7}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1-$2 $3",["[4-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1-$2 $3",["1(?:[02469]|[378][1-9]|53)|8","1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2 $3",["3"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3-$4",["1(?:[367]|80)"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2 $3",["15"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2 $3",["1"],"0$1"]],"0"],MZ:["258","00","(?:2|8\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2|8[2-79]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],NA:["264","00","[68]\\d{7,8}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["87"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],NC:["687","00","(?:050|[2-57-9]\\d\\d)\\d{3}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1.$2.$3",["[02-57-9]"]]]],NE:["227","00","[027-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["08"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[089]|2[013]|7[04]"]]]],NF:["672","00","[13]\\d{5}",[6],[["(\\d{2})(\\d{4})","$1 $2",["1[0-3]"]],["(\\d)(\\d{5})","$1 $2",["[13]"]]],0,0,"([0-258]\\d{4})$","3$1"],NG:["234","009","(?:[124-7]|9\\d{3})\\d{6}|[1-9]\\d{7}|[78]\\d{9,13}",[7,8,10,11,12,13,14],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["78"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]|9(?:0[3-9]|[1-9])"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[3-7]|8[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[7-9]"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[78]"],"0$1"],["(\\d{3})(\\d{5})(\\d{5,6})","$1 $2 $3",["[78]"],"0$1"]],"0"],NI:["505","00","(?:1800|[25-8]\\d{3})\\d{4}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[125-8]"]]]],NL:["31","00","(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}",[5,6,7,8,9,10,11],[["(\\d{3})(\\d{4,7})","$1 $2",["[89]0"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["66"],"0$1"],["(\\d)(\\d{8})","$1 $2",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-578]|91"],"0$1"],["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3",["9"],"0$1"]],"0"],NO:["47","00","(?:0|[2-9]\\d{3})\\d{4}",[5,8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[489]|59"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[235-7]"]]],0,0,0,0,0,"[02-689]|7[0-8]"],NP:["977","00","(?:1\\d|9)\\d{9}|[1-9]\\d{7}",[8,10,11],[["(\\d)(\\d{7})","$1-$2",["1[2-6]"],"0$1"],["(\\d{2})(\\d{6})","$1-$2",["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"],"0$1"],["(\\d{3})(\\d{7})","$1-$2",["9"]]],"0"],NR:["674","00","(?:444|(?:55|8\\d)\\d|666)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[4-68]"]]]],NU:["683","00","(?:[47]|888\\d)\\d{3}",[4,7],[["(\\d{3})(\\d{4})","$1 $2",["8"]]]],NZ:["64","0(?:0|161)","[29]\\d{7,9}|50\\d{5}(?:\\d{2,3})?|6[0-35-9]\\d{6}|7\\d{7,8}|8\\d{4,9}|(?:11\\d|[34])\\d{7}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,8})","$1 $2",["8[1-579]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["50[036-8]|[89]0","50(?:[0367]|88)|[89]0"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["24|[346]|7[2-57-9]|9[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:10|74)|[59]|80"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["1|2[028]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,5})","$1 $2 $3",["2(?:[169]|7[0-35-9])|7|86"],"0$1"]],"0",0,0,0,0,0,0,"00"],OM:["968","00","(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}",[7,8,9],[["(\\d{3})(\\d{4,6})","$1 $2",["[58]"]],["(\\d{2})(\\d{6})","$1 $2",["2"]],["(\\d{4})(\\d{4})","$1 $2",["[179]"]]]],PA:["507","00","(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}",[7,8,10,11],[["(\\d{3})(\\d{4})","$1-$2",["[1-57-9]"]],["(\\d{4})(\\d{4})","$1-$2",["[68]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]]],PE:["51","00|19(?:1[124]|77|90)00","(?:[14-8]|9\\d)\\d{7}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["80"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["1"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[4-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]]],"0",0,0,0,0,0,0,"00"," Anexo "],PF:["689","00","4\\d{5}(?:\\d{2})?|8\\d{7,8}",[6,8,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["44"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4|8[7-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],PG:["675","00|140[1-3]","(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["18|[2-69]|85"]],["(\\d{4})(\\d{4})","$1 $2",["[78]"]]],0,0,0,0,0,0,0,"00"],PH:["63","00","(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}",[6,8,9,10,11,12,13],[["(\\d)(\\d{5})","$1 $2",["2"],"(0$1)"],["(\\d{4})(\\d{4,6})","$1 $2",["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2","3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"],"(0$1)"],["(\\d{5})(\\d{4})","$1 $2",["346|4(?:27|9[35])|883","3469|4(?:279|9(?:30|56))|8834"],"(0$1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|8[2-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1"]]],"0"],PK:["92","00","122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,7})","$1 $2 $3",["[89]0"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["1"]],["(\\d{3})(\\d{6,7})","$1 $2",["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])","9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"],"(0$1)"],["(\\d{2})(\\d{7,8})","$1 $2",["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"],"(0$1)"],["(\\d{5})(\\d{5})","$1 $2",["58"],"(0$1)"],["(\\d{3})(\\d{7})","$1 $2",["3"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[24-9]"],"(0$1)"]],"0"],PL:["48","00","(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}",[6,7,8,9,10],[["(\\d{5})","$1",["19"]],["(\\d{3})(\\d{3})","$1 $2",["11|20|64"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1","(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["64"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[2-8]|[2-7]|8[1-79]|9[145]"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["8"]]]],PM:["508","00","(?:[45]|80\\d\\d)\\d{5}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[45]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],PR:["1","011","(?:[589]\\d\\d|787)\\d{7}",[10],0,"1",0,0,0,0,"787|939"],PS:["970","00","[2489]2\\d{6}|(?:1\\d|5)\\d{8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2489]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["5"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],PT:["351","00","1693\\d{5}|(?:[26-9]\\d|30)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["2[12]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["16|[236-9]"]]]],PW:["680","01[12]","(?:[24-8]\\d\\d|345|900)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],PY:["595","00","59\\d{4,6}|9\\d{5,10}|(?:[2-46-8]\\d|5[0-8])\\d{4,7}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3,6})","$1 $2",["[2-9]0"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[26]1|3[289]|4[1246-8]|7[1-3]|8[1-36]"],"(0$1)"],["(\\d{3})(\\d{4,5})","$1 $2",["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["87"]],["(\\d{3})(\\d{6})","$1 $2",["9(?:[5-79]|8[1-6])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["9"]]],"0"],QA:["974","00","800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}",[7,8,9,11],[["(\\d{3})(\\d{4})","$1 $2",["2[16]|8"]],["(\\d{4})(\\d{4})","$1 $2",["[3-7]"]]]],RE:["262","00","976\\d{6}|(?:26|[68]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2689]"],"0$1"]],"0",0,0,0,0,"26[23]|69|[89]"],RO:["40","00","(?:[2378]\\d|90)\\d{7}|[23]\\d{5}",[6,9],[["(\\d{3})(\\d{3})","$1 $2",["2[3-6]","2[3-6]\\d9"],"0$1"],["(\\d{2})(\\d{4})","$1 $2",["219|31"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23]1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[237-9]"],"0$1"]],"0",0,0,0,0,0,0,0," int "],RS:["381","00","38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}",[6,7,8,9,10,11,12],[["(\\d{3})(\\d{3,9})","$1 $2",["(?:2[389]|39)0|[7-9]"],"0$1"],["(\\d{2})(\\d{5,10})","$1 $2",["[1-36]"],"0$1"]],"0"],RU:["7","810","8\\d{13}|[347-9]\\d{9}",[10,14],[["(\\d{4})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-8]|2[1-9])","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"],"8 ($1)",1],["(\\d{5})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-68]|2[1-9])","7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))","7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[349]|8(?:[02-7]|1[1-8])"],"8 ($1)",1],["(\\d{4})(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3 $4",["8"],"8 ($1)"]],"8",0,0,0,0,"3[04-689]|[489]",0,"8~10"],RW:["250","00","(?:06|[27]\\d\\d|[89]00)\\d{6}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"]]],"0"],SA:["966","00","92\\d{7}|(?:[15]|8\\d)\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["9"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["81"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]],"0"],SB:["677","0[01]","(?:[1-6]|[7-9]\\d\\d)\\d{4}",[5,7],[["(\\d{2})(\\d{5})","$1 $2",["7|8[4-9]|9(?:[1-8]|9[0-8])"]]]],SC:["248","010|0[0-2]","800\\d{4}|(?:[249]\\d|64)\\d{5}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[246]|9[57]"]]],0,0,0,0,0,0,0,"00"],SD:["249","00","[19]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[19]"],"0$1"]],"0"],SE:["46","00","(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{2,3})(\\d{2})","$1-$2 $3",["20"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{4})","$1-$2",["9(?:00|39|44|9)"],"0$1",0,"$1 $2"],["(\\d{2})(\\d{3})(\\d{2})","$1-$2 $3",["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3"],["(\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2,3})(\\d{2})","$1-$2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{2,3})(\\d{3})","$1-$2 $3",["9(?:00|39|44)"],"0$1",0,"$1 $2 $3"],["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3 $4"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["10|7"],"0$1",0,"$1 $2 $3 $4"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1-$2 $3 $4",["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{3})","$1-$2 $3 $4",["9"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4 $5",["[26]"],"0$1",0,"$1 $2 $3 $4 $5"]],"0"],SG:["65","0[0-3]\\d","(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["[369]|8(?:0[1-6]|[1-9])"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]],["(\\d{4})(\\d{4})(\\d{3})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],SH:["290","00","(?:[256]\\d|8)\\d{3}",[4,5],0,0,0,0,0,0,"[256]"],SI:["386","00|10(?:22|66|88|99)","[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}",[5,6,7,8],[["(\\d{2})(\\d{3,6})","$1 $2",["8[09]|9"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["59|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37][01]|4[0139]|51|6"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-57]"],"(0$1)"]],"0",0,0,0,0,0,0,"00"],SJ:["47","00","0\\d{4}|(?:[489]\\d|[57]9)\\d{6}",[5,8],0,0,0,0,0,0,"79"],SK:["421","00","[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}",[6,7,9],[["(\\d)(\\d{2})(\\d{3,4})","$1 $2 $3",["21"],"0$1"],["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["[3-5][1-8]1","[3-5][1-8]1[67]"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1/$2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[689]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1/$2 $3 $4",["[3-5]"],"0$1"]],"0"],SL:["232","00","(?:[237-9]\\d|66)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[236-9]"],"(0$1)"]],"0"],SM:["378","00","(?:0549|[5-7]\\d)\\d{6}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"]],["(\\d{4})(\\d{6})","$1 $2",["0"]]],0,0,"([89]\\d{5})$","0549$1"],SN:["221","00","(?:[378]\\d|93)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[379]"]]]],SO:["252","00","[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}",[6,7,8,9],[["(\\d{2})(\\d{4})","$1 $2",["8[125]"]],["(\\d{6})","$1",["[134]"]],["(\\d)(\\d{6})","$1 $2",["[15]|2[0-79]|3[0-46-8]|4[0-7]"]],["(\\d)(\\d{7})","$1 $2",["(?:2|90)4|[67]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[3478]|64|90"]],["(\\d{2})(\\d{5,7})","$1 $2",["1|28|6(?:0[5-7]|[1-35-9])|9[2-9]"]]],"0"],SR:["597","00","(?:[2-5]|68|[78]\\d)\\d{5}",[6,7],[["(\\d{2})(\\d{2})(\\d{2})","$1-$2-$3",["56"]],["(\\d{3})(\\d{3})","$1-$2",["[2-5]"]],["(\\d{3})(\\d{4})","$1-$2",["[6-8]"]]]],SS:["211","00","[19]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[19]"],"0$1"]],"0"],ST:["239","00","(?:22|9\\d)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[29]"]]]],SV:["503","00","[267]\\d{7}|[89]00\\d{4}(?:\\d{4})?",[7,8,11],[["(\\d{3})(\\d{4})","$1 $2",["[89]"]],["(\\d{4})(\\d{4})","$1 $2",["[267]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[89]"]]]],SX:["1","011","7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"1|(5\\d{6})$","721$1",0,"721"],SY:["963","00","[1-39]\\d{8}|[1-5]\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-5]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1",1]],"0"],SZ:["268","00","0800\\d{4}|(?:[237]\\d|900)\\d{6}",[8,9],[["(\\d{4})(\\d{4})","$1 $2",["[0237]"]],["(\\d{5})(\\d{4})","$1 $2",["9"]]]],TA:["290","00","8\\d{3}",[4],0,0,0,0,0,0,"8"],TC:["1","011","(?:[58]\\d\\d|649|900)\\d{7}",[10],0,"1",0,"1|([2-479]\\d{6})$","649$1",0,"649"],TD:["235","00|16","(?:22|[69]\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2679]"]]],0,0,0,0,0,0,0,"00"],TG:["228","00","[279]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[279]"]]]],TH:["66","00[1-9]","(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}",[8,9,10,13],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[13-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],TJ:["992","810","(?:00|[1-57-9]\\d)\\d{7}",[9],[["(\\d{6})(\\d)(\\d{2})","$1 $2 $3",["331","3317"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["[34]7|91[78]"]],["(\\d{4})(\\d)(\\d{4})","$1 $2 $3",["3[1-5]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[0-57-9]"]]],0,0,0,0,0,0,0,"8~10"],TK:["690","00","[2-47]\\d{3,6}",[4,5,6,7]],TL:["670","00","7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[2-489]|70"]],["(\\d{4})(\\d{4})","$1 $2",["7"]]]],TM:["993","810","[1-6]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["12"],"(8 $1)"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-5]"],"(8 $1)"],["(\\d{2})(\\d{6})","$1 $2",["6"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],TN:["216","00","[2-57-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-57-9]"]]]],TO:["676","00","(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}",[5,7],[["(\\d{2})(\\d{3})","$1-$2",["[2-4]|50|6[09]|7[0-24-69]|8[05]"]],["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[5-9]"]]]],TR:["90","00","4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}",[7,10,12,13],[["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["512|8[01589]|90"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5(?:[0-59]|61)","5(?:[0-59]|616)","5(?:[0-59]|6161)"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24][1-8]|3[1-9]"],"(0$1)",1],["(\\d{3})(\\d{3})(\\d{6,7})","$1 $2 $3",["80"],"0$1",1]],"0"],TT:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"1|([2-46-8]\\d{6})$","868$1",0,"868"],TV:["688","00","(?:2|7\\d\\d|90)\\d{4}",[5,6,7],[["(\\d{2})(\\d{3})","$1 $2",["2"]],["(\\d{2})(\\d{4})","$1 $2",["90"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],TW:["886","0(?:0[25-79]|19)","[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}",[7,8,9,10,11],[["(\\d{2})(\\d)(\\d{4})","$1 $2 $3",["202"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[258]0"],"0$1"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["[23568]|4(?:0[02-48]|[1-47-9])|7[1-9]","[23568]|4(?:0[2-48]|[1-47-9])|(?:400|7)[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,5})","$1 $2 $3",["7"],"0$1"]],"0",0,0,0,0,0,0,0,"#"],TZ:["255","00[056]","(?:[25-8]\\d|41|90)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[24]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["5"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[67]"],"0$1"]],"0"],UA:["380","00","[89]\\d{9}|[3-9]\\d{8}",[9,10],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]","6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])","3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|89|9[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0",0,0,0,0,0,0,"0~0"],UG:["256","00[057]","800\\d{6}|(?:[29]0|[347]\\d)\\d{7}",[9],[["(\\d{4})(\\d{5})","$1 $2",["202","2024"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[27-9]|4(?:6[45]|[7-9])"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[34]"],"0$1"]],"0"],US:["1","011","[2-9]\\d{9}|3\\d{6}",[10],[["(\\d{3})(\\d{4})","$1-$2",["310"],0,1],["(\\d{3})(\\d{3})(\\d{4})","($1) $2-$3",["[2-9]"],0,1,"$1-$2-$3"]],"1",0,0,0,0,0,[["505(?:[2-57-9]\\d\\d|6(?:[0-35-9]\\d|4[46]))\\d{4}|(?:2(?:0[1-35-9]|1[02-9]|2[03-589]|3[149]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-57-9]|1[02-9]|2[01356]|3[0-24679]|4[167]|5[0-2]|6[014]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-47-9]|1[0235-8]|20|3[0149]|4[01]|5[19]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|[34][016]|5[01679]|6[0-279]|78|8[0-29])|7(?:0[1-46-8]|1[2-9]|2[04-7]|3[1247]|4[037]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[068]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-389]|8[04-69]))[2-9]\\d{6}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-7]|33|44|66|77|88)[2-9]\\d{6}"]]],UY:["598","0(?:0|1[3-9]\\d)","(?:0004|4)\\d{9}|[1249]\\d{7}|(?:[49]\\d|80)\\d{5}",[7,8,10,13],[["(\\d{3})(\\d{4})","$1 $2",["405|8|90"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[124]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["4"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["0"]]],"0",0,0,0,0,0,0,"00"," int. "],UZ:["998","810","(?:33|[5-79]\\d|88)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[35-9]"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],VA:["39","00","0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}",[6,7,8,9,10,11],0,0,0,0,0,0,"06698"],VC:["1","011","(?:[58]\\d\\d|784|900)\\d{7}",[10],0,"1",0,"1|([2-7]\\d{6})$","784$1",0,"784"],VE:["58","00","[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}",[10],[["(\\d{3})(\\d{7})","$1-$2",["[24-689]"],"0$1"]],"0"],VG:["1","011","(?:284|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"1|([2-578]\\d{6})$","284$1",0,"284"],VI:["1","011","[58]\\d{9}|(?:34|90)0\\d{7}",[10],0,"1",0,"1|([2-9]\\d{6})$","340$1",0,"340"],VN:["84","00","[12]\\d{9}|[135-9]\\d{8}|[16]\\d{7}|[16-8]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["80"],"0$1",1],["(\\d{4})(\\d{4,6})","$1 $2",["1"],0,1],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[69]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[3578]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["2[48]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["2"],"0$1",1]],"0"],VU:["678","00","[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}",[5,7],[["(\\d{3})(\\d{4})","$1 $2",["[57-9]"]]]],WF:["681","00","(?:40|72)\\d{4}|8\\d{5}(?:\\d{3})?",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[478]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],WS:["685","0","(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}",[5,6,7,10],[["(\\d{5})","$1",["[2-5]|6[1-9]"]],["(\\d{3})(\\d{3,7})","$1 $2",["[68]"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],XK:["383","00","[23]\\d{7,8}|(?:4\\d\\d|[89]00)\\d{5}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[23]"],"0$1"]],"0"],YE:["967","00","(?:1|7\\d)\\d{7}|[1-7]\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-6]|7(?:[24-6]|8[0-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"],"0$1"]],"0"],YT:["262","00","80\\d{7}|(?:26|63)9\\d{6}",[9],0,"0",0,0,0,0,"269|63"],ZA:["27","00","[1-79]\\d{8}|8\\d{4,9}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,4})","$1 $2",["8[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["8[1-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["860"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],ZM:["260","00","800\\d{6}|(?:21|63|[79]\\d)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[79]"],"0$1"]],"0"],ZW:["263","00","2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}",[5,6,7,8,9,10],[["(\\d{3})(\\d{3,5})","$1 $2",["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"],"0$1"],["(\\d)(\\d{3})(\\d{2,4})","$1 $2 $3",["[49]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["80"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2","2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)","2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["29[013-9]|39|54"],"0$1"],["(\\d{4})(\\d{3,5})","$1 $2",["(?:25|54)8","258|5483"],"0$1"]],"0"]},nonGeographic:{800:["800",0,"(?:00|[1-9]\\d)\\d{6}",[8],[["(\\d{4})(\\d{4})","$1 $2",["\\d"]]],0,0,0,0,0,0,[0,0,["(?:00|[1-9]\\d)\\d{6}"]]],808:["808",0,"[1-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[1-9]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,0,["[1-9]\\d{7}"]]],870:["870",0,"7\\d{11}|[35-7]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[35-7]"]]],0,0,0,0,0,0,[0,["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"]]],878:["878",0,"10\\d{10}",[12],[["(\\d{2})(\\d{5})(\\d{5})","$1 $2 $3",["1"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["10\\d{10}"]]],881:["881",0,"[0-36-9]\\d{8}",[9],[["(\\d)(\\d{3})(\\d{5})","$1 $2 $3",["[0-36-9]"]]],0,0,0,0,0,0,[0,["[0-36-9]\\d{8}"]]],882:["882",0,"[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?",[7,8,9,10,11,12],[["(\\d{2})(\\d{5})","$1 $2",["16|342"]],["(\\d{2})(\\d{6})","$1 $2",["49"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["1[36]|9"]],["(\\d{2})(\\d{4})(\\d{3})","$1 $2 $3",["3[23]"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["16"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|23|3(?:[15]|4[57])|4|51"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["34"]],["(\\d{2})(\\d{4,5})(\\d{5})","$1 $2 $3",["[1-35]"]]],0,0,0,0,0,0,[0,["342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|50\\d{3})\\d{7}",[7,8,9,10,12]],0,0,0,0,0,0,["1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:345\\d|9[89])\\d{6}|(?:10|2(?:3|85\\d)|3(?:[15]|[69]\\d\\d)|4[15-8]|51)\\d{8}"]]],883:["883",0,"(?:[1-4]\\d|51)\\d{6,10}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,8})","$1 $2 $3",["[14]|2[24-689]|3[02-689]|51[24-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["510"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["21"]],["(\\d{4})(\\d{4})(\\d{4})","$1 $2 $3",["51[13]"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[235]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[013-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}"]]],888:["888",0,"\\d{11}",[11],[["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3"]],0,0,0,0,0,0,[0,0,0,0,0,0,["\\d{11}"]]],979:["979",0,"[1359]\\d{8}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[1359]"]]],0,0,0,0,0,0,[0,0,0,["[1359]\\d{8}"]]]}};function BT(e,t){var r=Array.prototype.slice.call(t);return r.push(B2),e.apply(this,r)}function qf(e){return qf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qf(e)}function Vy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function WT(e,t,r){return t&&Vy(e.prototype,t),r&&Vy(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function qT(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function HT(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ro(e,t)}function GT(e){var t=q2();return function(){var n=Fo(e),i;if(t){var o=Fo(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return QT(this,i)}}function QT(e,t){if(t&&(qf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return W2(e)}function W2(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Hf(e){var t=typeof Map=="function"?new Map:void 0;return Hf=function(n){if(n===null||!KT(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(n))return t.get(n);t.set(n,i)}function i(){return vs(n,arguments,Fo(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),Ro(i,n)},Hf(e)}function vs(e,t,r){return q2()?vs=Reflect.construct:vs=function(i,o,a){var s=[null];s.push.apply(s,o);var c=Function.bind.apply(i,s),l=new c;return a&&Ro(l,a.prototype),l},vs.apply(null,arguments)}function q2(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function KT(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function Ro(e,t){return Ro=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Ro(e,t)}function Fo(e){return Fo=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Fo(e)}var kn=function(e){HT(r,e);var t=GT(r);function r(n){var i;return qT(this,r),i=t.call(this,n),Object.setPrototypeOf(W2(i),r.prototype),i.name=i.constructor.name,i}return WT(r)}(Hf(Error)),ap=2,YT=17,XT=3,Zt="0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9",ZT="-\u2010-\u2015\u2212\u30FC\uFF0D",JT="\uFF0F/",eN="\uFF0E.",tN=" \xA0\xAD\u200B\u2060\u3000",rN="()\uFF08\uFF09\uFF3B\uFF3D\\[\\]",nN="~\u2053\u223C\uFF5E",or="".concat(ZT).concat(JT).concat(eN).concat(tN).concat(rN).concat(nN),ac="+\uFF0B";function By(e,t){e=e.split("-"),t=t.split("-");for(var r=e[0].split("."),n=t[0].split("."),i=0;i<3;i++){var o=Number(r[i]),a=Number(n[i]);if(o>a)return 1;if(a>o)return-1;if(!isNaN(o)&&isNaN(a))return 1;if(isNaN(o)&&!isNaN(a))return-1}return e[1]&&t[1]?e[1]>t[1]?1:e[1]<t[1]?-1:0:!e[1]&&t[1]?1:e[1]&&!t[1]?-1:0}function Ol(e){return Ol=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ol(e)}function sc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function lc(e,t,r){return t&&Wy(e.prototype,t),r&&Wy(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var iN="1.2.0",oN="1.7.35",qy=" ext. ",aN=/^\d+$/,bt=function(){function e(t){sc(this,e),uN(t),this.metadata=t,H2.call(this,t)}return lc(e,[{key:"getCountries",value:function(){return Object.keys(this.metadata.countries).filter(function(r){return r!=="001"})}},{key:"getCountryMetadata",value:function(r){return this.metadata.countries[r]}},{key:"nonGeographic",value:function(){if(!(this.v1||this.v2||this.v3))return this.metadata.nonGeographic||this.metadata.nonGeographical}},{key:"hasCountry",value:function(r){return this.getCountryMetadata(r)!==void 0}},{key:"hasCallingCode",value:function(r){if(this.getCountryCodesForCallingCode(r))return!0;if(this.nonGeographic()){if(this.nonGeographic()[r])return!0}else{var n=this.countryCallingCodes()[r];if(n&&n.length===1&&n[0]==="001")return!0}}},{key:"isNonGeographicCallingCode",value:function(r){return this.nonGeographic()?!!this.nonGeographic()[r]:!this.getCountryCodesForCallingCode(r)}},{key:"country",value:function(r){return this.selectNumberingPlan(r)}},{key:"selectNumberingPlan",value:function(r,n){if(r&&aN.test(r)&&(n=r,r=null),r&&r!=="001"){if(!this.hasCountry(r))throw new Error("Unknown country: ".concat(r));this.numberingPlan=new Hy(this.getCountryMetadata(r),this)}else if(n){if(!this.hasCallingCode(n))throw new Error("Unknown calling code: ".concat(n));this.numberingPlan=new Hy(this.getNumberingPlanMetadata(n),this)}else this.numberingPlan=void 0;return this}},{key:"getCountryCodesForCallingCode",value:function(r){var n=this.countryCallingCodes()[r];if(n)return n.length===1&&n[0].length===3?void 0:n}},{key:"getCountryCodeForCallingCode",value:function(r){var n=this.getCountryCodesForCallingCode(r);if(n)return n[0]}},{key:"getNumberingPlanMetadata",value:function(r){var n=this.getCountryCodeForCallingCode(r);if(n)return this.getCountryMetadata(n);if(this.nonGeographic()){var i=this.nonGeographic()[r];if(i)return i}else{var o=this.countryCallingCodes()[r];if(o&&o.length===1&&o[0]==="001")return this.metadata.countries["001"]}}},{key:"countryCallingCode",value:function(){return this.numberingPlan.callingCode()}},{key:"IDDPrefix",value:function(){return this.numberingPlan.IDDPrefix()}},{key:"defaultIDDPrefix",value:function(){return this.numberingPlan.defaultIDDPrefix()}},{key:"nationalNumberPattern",value:function(){return this.numberingPlan.nationalNumberPattern()}},{key:"possibleLengths",value:function(){return this.numberingPlan.possibleLengths()}},{key:"formats",value:function(){return this.numberingPlan.formats()}},{key:"nationalPrefixForParsing",value:function(){return this.numberingPlan.nationalPrefixForParsing()}},{key:"nationalPrefixTransformRule",value:function(){return this.numberingPlan.nationalPrefixTransformRule()}},{key:"leadingDigits",value:function(){return this.numberingPlan.leadingDigits()}},{key:"hasTypes",value:function(){return this.numberingPlan.hasTypes()}},{key:"type",value:function(r){return this.numberingPlan.type(r)}},{key:"ext",value:function(){return this.numberingPlan.ext()}},{key:"countryCallingCodes",value:function(){return this.v1?this.metadata.country_phone_code_to_countries:this.metadata.country_calling_codes}},{key:"chooseCountryByCountryCallingCode",value:function(r){return this.selectNumberingPlan(r)}},{key:"hasSelectedNumberingPlan",value:function(){return this.numberingPlan!==void 0}}]),e}(),Hy=function(){function e(t,r){sc(this,e),this.globalMetadataObject=r,this.metadata=t,H2.call(this,r.metadata)}return lc(e,[{key:"callingCode",value:function(){return this.metadata[0]}},{key:"getDefaultCountryMetadataForRegion",value:function(){return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode())}},{key:"IDDPrefix",value:function(){if(!(this.v1||this.v2))return this.metadata[1]}},{key:"defaultIDDPrefix",value:function(){if(!(this.v1||this.v2))return this.metadata[12]}},{key:"nationalNumberPattern",value:function(){return this.v1||this.v2?this.metadata[1]:this.metadata[2]}},{key:"possibleLengths",value:function(){if(!this.v1)return this.metadata[this.v2?2:3]}},{key:"_getFormats",value:function(r){return r[this.v1?2:this.v2?3:4]}},{key:"formats",value:function(){var r=this,n=this._getFormats(this.metadata)||this._getFormats(this.getDefaultCountryMetadataForRegion())||[];return n.map(function(i){return new sN(i,r)})}},{key:"nationalPrefix",value:function(){return this.metadata[this.v1?3:this.v2?4:5]}},{key:"_getNationalPrefixFormattingRule",value:function(r){return r[this.v1?4:this.v2?5:6]}},{key:"nationalPrefixFormattingRule",value:function(){return this._getNationalPrefixFormattingRule(this.metadata)||this._getNationalPrefixFormattingRule(this.getDefaultCountryMetadataForRegion())}},{key:"_nationalPrefixForParsing",value:function(){return this.metadata[this.v1?5:this.v2?6:7]}},{key:"nationalPrefixForParsing",value:function(){return this._nationalPrefixForParsing()||this.nationalPrefix()}},{key:"nationalPrefixTransformRule",value:function(){return this.metadata[this.v1?6:this.v2?7:8]}},{key:"_getNationalPrefixIsOptionalWhenFormatting",value:function(){return!!this.metadata[this.v1?7:this.v2?8:9]}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata)||this._getNationalPrefixIsOptionalWhenFormatting(this.getDefaultCountryMetadataForRegion())}},{key:"leadingDigits",value:function(){return this.metadata[this.v1?8:this.v2?9:10]}},{key:"types",value:function(){return this.metadata[this.v1?9:this.v2?10:11]}},{key:"hasTypes",value:function(){return this.types()&&this.types().length===0?!1:!!this.types()}},{key:"type",value:function(r){if(this.hasTypes()&&Gy(this.types(),r))return new cN(Gy(this.types(),r),this)}},{key:"ext",value:function(){return this.v1||this.v2?qy:this.metadata[13]||qy}}]),e}(),sN=function(){function e(t,r){sc(this,e),this._format=t,this.metadata=r}return lc(e,[{key:"pattern",value:function(){return this._format[0]}},{key:"format",value:function(){return this._format[1]}},{key:"leadingDigitsPatterns",value:function(){return this._format[2]||[]}},{key:"nationalPrefixFormattingRule",value:function(){return this._format[3]||this.metadata.nationalPrefixFormattingRule()}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return!!this._format[4]||this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"nationalPrefixIsMandatoryWhenFormattingInNationalFormat",value:function(){return this.usesNationalPrefix()&&!this.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"usesNationalPrefix",value:function(){return!!(this.nationalPrefixFormattingRule()&&!lN.test(this.nationalPrefixFormattingRule()))}},{key:"internationalFormat",value:function(){return this._format[5]||this.format()}}]),e}(),lN=/^\(?\$1\)?$/,cN=function(){function e(t,r){sc(this,e),this.type=t,this.metadata=r}return lc(e,[{key:"pattern",value:function(){return this.metadata.v1?this.type:this.type[0]}},{key:"possibleLengths",value:function(){if(!this.metadata.v1)return this.type[1]||this.metadata.possibleLengths()}}]),e}();function Gy(e,t){switch(t){case"FIXED_LINE":return e[0];case"MOBILE":return e[1];case"TOLL_FREE":return e[2];case"PREMIUM_RATE":return e[3];case"PERSONAL_NUMBER":return e[4];case"VOICEMAIL":return e[5];case"UAN":return e[6];case"PAGER":return e[7];case"VOIP":return e[8];case"SHARED_COST":return e[9]}}function uN(e){if(!e)throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!hu(e)||!hu(e.countries))throw new Error("[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got ".concat(hu(e)?"an object of shape: { "+Object.keys(e).join(", ")+" }":"a "+dN(e)+": "+e,"."))}var hu=function(t){return Ol(t)==="object"},dN=function(t){return Ol(t)};function sp(e,t){if(t=new bt(t),t.hasCountry(e))return t.country(e).countryCallingCode();throw new Error("Unknown country: ".concat(e))}function H2(e){var t=e.version;typeof t=="number"?(this.v1=t===1,this.v2=t===2,this.v3=t===3,this.v4=t===4):t?By(t,iN)===-1?this.v2=!0:By(t,oN)===-1?this.v3=!0:this.v4=!0:this.v1=!0}var fN=";ext=",Zn=function(t){return"([".concat(Zt,"]{1,").concat(t,"})")};function G2(e){var t="20",r="15",n="9",i="6",o="[ \xA0\\t,]*",a="[:\\.\uFF0E]?[ \xA0\\t,-]*",s="#?",c="(?:e?xt(?:ensi(?:o\u0301?|\xF3))?n?|\uFF45?\uFF58\uFF54\uFF4E?|\u0434\u043E\u0431|anexo)",l="(?:[x\uFF58#\uFF03~\uFF5E]|int|\uFF49\uFF4E\uFF54)",u="[- ]+",d="[ \xA0\\t]*",f="(?:,{2}|;)",h=fN+Zn(t),p=o+c+a+Zn(t)+s,m=o+l+a+Zn(n)+s,v=u+Zn(i)+"#",y=d+f+a+Zn(r)+s,b=d+"(?:,)+"+a+Zn(n)+s;return h+"|"+p+"|"+m+"|"+v+"|"+y+"|"+b}var hN="["+Zt+"]{"+ap+"}",pN="["+ac+"]{0,1}(?:["+or+"]*["+Zt+"]){3,}["+or+Zt+"]*",mN=new RegExp("^["+ac+"]{0,1}(?:["+or+"]*["+Zt+"]){1,2}$","i"),vN=pN+"(?:"+G2()+")?",yN=new RegExp("^"+hN+"$|^"+vN+"$","i");function Q2(e){return e.length>=ap&&yN.test(e)}function gN(e){return mN.test(e)}var Qy=new RegExp("(?:"+G2()+")$","i");function bN(e){var t=e.search(Qy);if(t<0)return{};for(var r=e.slice(0,t),n=e.match(Qy),i=1;i<n.length;){if(n[i])return{number:r,ext:n[i]};i++}}function $N(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=wN(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
3566
3562
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wN(e,t){if(!!e){if(typeof e=="string")return Ky(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ky(e,t)}}function Ky(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var _N={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","\uFF10":"0","\uFF11":"1","\uFF12":"2","\uFF13":"3","\uFF14":"4","\uFF15":"5","\uFF16":"6","\uFF17":"7","\uFF18":"8","\uFF19":"9","\u0660":"0","\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u06F0":"0","\u06F1":"1","\u06F2":"2","\u06F3":"3","\u06F4":"4","\u06F5":"5","\u06F6":"6","\u06F7":"7","\u06F8":"8","\u06F9":"9"};function K2(e){return _N[e]}function Cl(e){for(var t="",r=$N(e.split("")),n;!(n=r()).done;){var i=n.value,o=K2(i);o&&(t+=o)}return t}function xN(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=SN(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
3567
3563
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function SN(e,t){if(!!e){if(typeof e=="string")return Yy(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Yy(e,t)}}function Yy(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Xy(e){for(var t="",r=xN(e.split("")),n;!(n=r()).done;){var i=n.value;t+=kN(i,t)||""}return t}function kN(e,t){return e==="+"?t?void 0:"+":K2(e)}function EN(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=ON(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
3568
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ON(e,t){if(!!e){if(typeof e=="string")return Zy(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Zy(e,t)}}function Zy(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function CN(e,t){for(var r=e.slice(),n=EN(t),i;!(i=n()).done;){var o=i.value;e.indexOf(o)<0&&r.push(o)}return r.sort(function(a,s){return a-s})}function lc(e,t){return Y2(e,void 0,t)}function Y2(e,t,r){var n=r.type(t),i=n&&n.possibleLengths()||r.possibleLengths();if(!i)return"IS_POSSIBLE";if(t==="FIXED_LINE_OR_MOBILE"){if(!r.type("FIXED_LINE"))return Y2(e,"MOBILE",r);var o=r.type("MOBILE");o&&(i=CN(i,o.possibleLengths()))}else if(t&&!n)return"INVALID_LENGTH";var a=e.length,s=i[0];return s===a?"IS_POSSIBLE":s>a?"TOO_SHORT":i[i.length-1]<a?"TOO_LONG":i.indexOf(a,1)>=0?"IS_POSSIBLE":"INVALID_LENGTH"}function PN(e,t,r){if(t===void 0&&(t={}),r=new bt(r),t.v2){if(!e.countryCallingCode)throw new Error("Invalid phone number object passed");r.selectNumberingPlan(e.countryCallingCode)}else{if(!e.phone)return!1;if(e.country){if(!r.hasCountry(e.country))throw new Error("Unknown country: ".concat(e.country));r.country(e.country)}else{if(!e.countryCallingCode)throw new Error("Invalid phone number object passed");r.selectNumberingPlan(e.countryCallingCode)}}if(r.possibleLengths())return X2(e.phone||e.nationalNumber,r);if(e.countryCallingCode&&r.isNonGeographicCallingCode(e.countryCallingCode))return!0;throw new Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.')}function X2(e,t){switch(lc(e,t)){case"IS_POSSIBLE":return!0;default:return!1}}function TN(e,t){return AN(e)||IN(e,t)||Z2(e,t)||NN()}function NN(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3564
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ON(e,t){if(!!e){if(typeof e=="string")return Zy(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Zy(e,t)}}function Zy(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function CN(e,t){for(var r=e.slice(),n=EN(t),i;!(i=n()).done;){var o=i.value;e.indexOf(o)<0&&r.push(o)}return r.sort(function(a,s){return a-s})}function cc(e,t){return Y2(e,void 0,t)}function Y2(e,t,r){var n=r.type(t),i=n&&n.possibleLengths()||r.possibleLengths();if(!i)return"IS_POSSIBLE";if(t==="FIXED_LINE_OR_MOBILE"){if(!r.type("FIXED_LINE"))return Y2(e,"MOBILE",r);var o=r.type("MOBILE");o&&(i=CN(i,o.possibleLengths()))}else if(t&&!n)return"INVALID_LENGTH";var a=e.length,s=i[0];return s===a?"IS_POSSIBLE":s>a?"TOO_SHORT":i[i.length-1]<a?"TOO_LONG":i.indexOf(a,1)>=0?"IS_POSSIBLE":"INVALID_LENGTH"}function PN(e,t,r){if(t===void 0&&(t={}),r=new bt(r),t.v2){if(!e.countryCallingCode)throw new Error("Invalid phone number object passed");r.selectNumberingPlan(e.countryCallingCode)}else{if(!e.phone)return!1;if(e.country){if(!r.hasCountry(e.country))throw new Error("Unknown country: ".concat(e.country));r.country(e.country)}else{if(!e.countryCallingCode)throw new Error("Invalid phone number object passed");r.selectNumberingPlan(e.countryCallingCode)}}if(r.possibleLengths())return X2(e.phone||e.nationalNumber,r);if(e.countryCallingCode&&r.isNonGeographicCallingCode(e.countryCallingCode))return!0;throw new Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.')}function X2(e,t){switch(cc(e,t)){case"IS_POSSIBLE":return!0;default:return!1}}function TN(e,t){return AN(e)||IN(e,t)||Z2(e,t)||NN()}function NN(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3569
3565
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function IN(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],i=!0,o=!1,a,s;try{for(r=r.call(e);!(i=(a=r.next()).done)&&(n.push(a.value),!(t&&n.length===t));i=!0);}catch(c){o=!0,s=c}finally{try{!i&&r.return!=null&&r.return()}finally{if(o)throw s}}return n}}function AN(e){if(Array.isArray(e))return e}function DN(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=Z2(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
3570
3566
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Z2(e,t){if(!!e){if(typeof e=="string")return Jy(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Jy(e,t)}}function Jy(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function RN(e){var t,r;e=e.replace(/^tel:/,"tel=");for(var n=DN(e.split(";")),i;!(i=n()).done;){var o=i.value,a=o.split("="),s=TN(a,2),c=s[0],l=s[1];switch(c){case"tel":t=l;break;case"ext":r=l;break;case"phone-context":l[0]==="+"&&(t=l+t);break}}if(!Q2(t))return{};var u={number:t};return r&&(u.ext=r),u}function FN(e){var t=e.number,r=e.ext;if(!t)return"";if(t[0]!=="+")throw new Error('"formatRFC3966()" expects "number" to be in E.164 format.');return"tel:".concat(t).concat(r?";ext="+r:"")}function zr(e,t){return e=e||"",new RegExp("^(?:"+t+")$").test(e)}function LN(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=MN(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
3571
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function MN(e,t){if(!!e){if(typeof e=="string")return eg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return eg(e,t)}}function eg(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var jN=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function lp(e,t,r){if(t=t||{},!!e.country){r=new bt(r),r.selectNumberingPlan(e.country,e.countryCallingCode);var n=t.v2?e.nationalNumber:e.phone;if(!!zr(n,r.nationalNumberPattern())){if(hu(n,"FIXED_LINE",r))return r.type("MOBILE")&&r.type("MOBILE").pattern()===""||!r.type("MOBILE")||hu(n,"MOBILE",r)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE";for(var i=LN(jN),o;!(o=i()).done;){var a=o.value;if(hu(n,a,r))return a}}}}function hu(e,t,r){return t=r.type(t),!t||!t.pattern()||t.possibleLengths()&&t.possibleLengths().indexOf(e.length)<0?!1:zr(e,t.pattern())}function zN(e,t,r){if(t=t||{},r=new bt(r),!e.country)return!1;if(r.selectNumberingPlan(e.country,e.countryCallingCode),r.hasTypes())return lp(e,t,r.metadata)!==void 0;var n=t.v2?e.nationalNumber:e.phone;return zr(n,r.nationalNumberPattern())}function UN(e,t,r){var n=new bt(r),i=n.getCountryCodesForCallingCode(e);return i?i.filter(function(o){return VN(t,o,r)}):[]}function VN(e,t,r){var n=new bt(r);return n.selectNumberingPlan(t),n.numberingPlan.possibleLengths().indexOf(e.length)>=0}function J2(e){return e.replace(new RegExp("[".concat(or,"]+"),"g")," ").trim()}var e$=/(\$\d)/;function t$(e,t,r){var n=r.useInternationalFormat,i=r.withNationalPrefix;r.carrierCode,r.metadata;var o=e.replace(new RegExp(t.pattern()),n?t.internationalFormat():i&&t.nationalPrefixFormattingRule()?t.format().replace(e$,t.nationalPrefixFormattingRule()):t.format());return n?J2(o):o}var BN=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;function WN(e,t,r){var n=new bt(r);if(n.selectNumberingPlan(e,t),n.defaultIDDPrefix())return n.defaultIDDPrefix();if(BN.test(n.IDDPrefix()))return n.IDDPrefix()}function qN(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=HN(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
3572
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function HN(e,t){if(!!e){if(typeof e=="string")return tg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return tg(e,t)}}function tg(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function rg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ng(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?rg(Object(r),!0).forEach(function(n){GN(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function GN(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var ig={formatExtension:function(t,r,n){return"".concat(t).concat(n.ext()).concat(r)}};function QN(e,t,r,n){if(r?r=ng(ng({},ig),r):r=ig,n=new bt(n),e.country&&e.country!=="001"){if(!n.hasCountry(e.country))throw new Error("Unknown country: ".concat(e.country));n.country(e.country)}else if(e.countryCallingCode)n.selectNumberingPlan(e.countryCallingCode);else return e.phone||"";var i=n.countryCallingCode(),o=r.v2?e.nationalNumber:e.phone,a;switch(t){case"NATIONAL":return o?(a=Pl(o,e.carrierCode,"NATIONAL",n,r),pu(a,e.ext,n,r.formatExtension)):"";case"INTERNATIONAL":return o?(a=Pl(o,null,"INTERNATIONAL",n,r),a="+".concat(i," ").concat(a),pu(a,e.ext,n,r.formatExtension)):"+".concat(i);case"E.164":return"+".concat(i).concat(o);case"RFC3966":return FN({number:"+".concat(i).concat(o),ext:e.ext});case"IDD":if(!r.fromCountry)return;var s=YN(o,e.carrierCode,i,r.fromCountry,n);return pu(s,e.ext,n,r.formatExtension);default:throw new Error('Unknown "format" argument passed to "formatNumber()": "'.concat(t,'"'))}}function Pl(e,t,r,n,i){var o=KN(n.formats(),e);return o?t$(e,o,{useInternationalFormat:r==="INTERNATIONAL",withNationalPrefix:!(o.nationalPrefixIsOptionalWhenFormattingInNationalFormat()&&i&&i.nationalPrefix===!1),carrierCode:t,metadata:n}):e}function KN(e,t){for(var r=qN(e),n;!(n=r()).done;){var i=n.value;if(i.leadingDigitsPatterns().length>0){var o=i.leadingDigitsPatterns()[i.leadingDigitsPatterns().length-1];if(t.search(o)!==0)continue}if(zr(t,i.pattern()))return i}}function pu(e,t,r,n){return t?n(e,t,r):e}function YN(e,t,r,n,i){var o=sp(n,i.metadata);if(o===r){var a=Pl(e,t,"NATIONAL",i);return r==="1"?r+" "+a:a}var s=WN(n,void 0,i.metadata);if(s)return"".concat(s," ").concat(r," ").concat(Pl(e,null,"INTERNATIONAL",i))}function og(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ag(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?og(Object(r),!0).forEach(function(n){XN(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):og(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function XN(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ZN(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sg(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function JN(e,t,r){return t&&sg(e.prototype,t),r&&sg(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var r$=function(){function e(t,r,n){if(ZN(this,e),!t)throw new TypeError("`country` or `countryCallingCode` not passed");if(!r)throw new TypeError("`nationalNumber` not passed");if(!n)throw new TypeError("`metadata` not passed");var i=new bt(n);eI(t)&&(this.country=t,i.country(t),t=i.countryCallingCode()),this.countryCallingCode=t,this.nationalNumber=r,this.number="+"+this.countryCallingCode+this.nationalNumber,this.metadata=n}return JN(e,[{key:"setExt",value:function(r){this.ext=r}},{key:"getPossibleCountries",value:function(){return this.country?[this.country]:UN(this.countryCallingCode,this.nationalNumber,this.metadata)}},{key:"isPossible",value:function(){return PN(this,{v2:!0},this.metadata)}},{key:"isValid",value:function(){return zN(this,{v2:!0},this.metadata)}},{key:"isNonGeographic",value:function(){var r=new bt(this.metadata);return r.isNonGeographicCallingCode(this.countryCallingCode)}},{key:"isEqual",value:function(r){return this.number===r.number&&this.ext===r.ext}},{key:"getType",value:function(){return lp(this,{v2:!0},this.metadata)}},{key:"format",value:function(r,n){return QN(this,r,n?ag(ag({},n),{},{v2:!0}):{v2:!0},this.metadata)}},{key:"formatNational",value:function(r){return this.format("NATIONAL",r)}},{key:"formatInternational",value:function(r){return this.format("INTERNATIONAL",r)}},{key:"getURI",value:function(r){return this.format("RFC3966",r)}}]),e}(),eI=function(t){return/^[A-Z]{2}$/.test(t)},tI=new RegExp("(["+Zt+"])");function n$(e,t,r,n){if(!!t){var i=new bt(n);i.selectNumberingPlan(t,r);var o=new RegExp(i.IDDPrefix());if(e.search(o)===0){e=e.slice(e.match(o)[0].length);var a=e.match(tI);if(!(a&&a[1]!=null&&a[1].length>0&&a[1]==="0"))return e}}}function Hf(e,t){if(e&&t.numberingPlan.nationalPrefixForParsing()){var r=new RegExp("^(?:"+t.numberingPlan.nationalPrefixForParsing()+")"),n=r.exec(e);if(n){var i,o,a=n.length-1,s=a>0&&n[a];if(t.nationalPrefixTransformRule()&&s)i=e.replace(r,t.nationalPrefixTransformRule()),a>1&&(o=n[1]);else{var c=n[0];i=e.slice(c.length),s&&(o=n[1])}var l;if(s){var u=e.indexOf(n[1]),d=e.slice(0,u);d===t.numberingPlan.nationalPrefix()&&(l=t.numberingPlan.nationalPrefix())}else l=n[0];return{nationalNumber:i,nationalPrefix:l,carrierCode:o}}}return{nationalNumber:e}}function Gf(e,t){var r=Hf(e,t),n=r.carrierCode,i=r.nationalNumber;if(i!==e){if(!rI(e,i,t))return{nationalNumber:e};if(t.possibleLengths()&&!nI(i,t))return{nationalNumber:e}}return{nationalNumber:i,carrierCode:n}}function rI(e,t,r){return!(zr(e,r.nationalNumberPattern())&&!zr(t,r.nationalNumberPattern()))}function nI(e,t){switch(lc(e,t)){case"TOO_SHORT":case"INVALID_LENGTH":return!1;default:return!0}}function i$(e,t,r,n){var i=t?sp(t,n):r;if(e.indexOf(i)===0){n=new bt(n),n.selectNumberingPlan(t,r);var o=e.slice(i.length),a=Gf(o,n),s=a.nationalNumber,c=Gf(e,n),l=c.nationalNumber;if(!zr(l,n.nationalNumberPattern())&&zr(s,n.nationalNumberPattern())||lc(l,n)==="TOO_LONG")return{countryCallingCode:i,number:o}}return{number:e}}function o$(e,t,r,n){if(!e)return{};if(e[0]!=="+"){var i=n$(e,t,r,n);if(i&&i!==e)e="+"+i;else{if(t||r){var o=i$(e,t,r,n),a=o.countryCallingCode,s=o.number;if(a)return{countryCallingCode:a,number:s}}return{number:e}}}if(e[1]==="0")return{};n=new bt(n);for(var c=2;c-1<=XT&&c<=e.length;){var l=e.slice(1,c);if(n.hasCallingCode(l))return n.selectNumberingPlan(l),{countryCallingCode:l,number:e.slice(c)};c++}return{}}function iI(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=oI(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
3573
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function oI(e,t){if(!!e){if(typeof e=="string")return lg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return lg(e,t)}}function lg(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function aI(e,t,r){r=new bt(r);for(var n=iI(e),i;!(i=n()).done;){var o=i.value;if(r.country(o),r.leadingDigits()){if(t&&t.search(r.leadingDigits())===0)return o}else if(lp({phone:t,country:o},void 0,r.metadata))return o}}var sI=!1;function a$(e,t,r){if(sI&&r.isNonGeographicCallingCode(e))return"001";var n=r.getCountryCodesForCallingCode(e);if(!!n)return n.length===1?n[0]:aI(n,t,r.metadata)}var lI=250,cI=new RegExp("["+oc+Zt+"]"),uI=new RegExp("[^"+Zt+"#]+$");function dI(e,t,r){if(t=t||{},r=new bt(r),t.defaultCountry&&!r.hasCountry(t.defaultCountry))throw t.v2?new kn("INVALID_COUNTRY"):new Error("Unknown country: ".concat(t.defaultCountry));var n=hI(e,t.v2,t.extract),i=n.number,o=n.ext,a=n.error;if(!i){if(t.v2)throw a==="TOO_SHORT"?new kn("TOO_SHORT"):new kn("NOT_A_NUMBER");return{}}var s=mI(i,t.defaultCountry,t.defaultCallingCode,r),c=s.country,l=s.nationalNumber,u=s.countryCallingCode,d=s.carrierCode;if(!r.hasSelectedNumberingPlan()){if(t.v2)throw new kn("INVALID_COUNTRY");return{}}if(!l||l.length<ap){if(t.v2)throw new kn("TOO_SHORT");return{}}if(l.length>YT){if(t.v2)throw new kn("TOO_LONG");return{}}if(t.v2){var f=new r$(u,l,r.metadata);return c&&(f.country=c),d&&(f.carrierCode=d),o&&(f.ext=o),f}var h=(t.extended?r.hasSelectedNumberingPlan():c)?zr(l,r.nationalNumberPattern()):!1;return t.extended?{country:c,countryCallingCode:u,carrierCode:d,valid:h,possible:h?!0:!!(t.extended===!0&&r.possibleLengths()&&X2(l,r)),phone:l,ext:o}:h?pI(c,l,o):{}}function fI(e,t,r){if(!!e){if(e.length>lI){if(r)throw new kn("TOO_LONG");return}if(t===!1)return e;var n=e.search(cI);if(!(n<0))return e.slice(n).replace(uI,"")}}function hI(e,t,r){if(e&&e.indexOf("tel:")===0)return RN(e);var n=fI(e,r,t);if(!n)return{};if(!Q2(n))return gN(n)?{error:"TOO_SHORT"}:{};var i=bN(n);return i.ext?i:{number:n}}function pI(e,t,r){var n={country:e,phone:t};return r&&(n.ext=r),n}function mI(e,t,r,n){var i=o$(Xy(e),t,r,n.metadata),o=i.countryCallingCode,a=i.number,s;if(o)n.selectNumberingPlan(o);else if(a&&(t||r))n.selectNumberingPlan(t,r),t&&(s=t),o=r||sp(t,n.metadata);else return{};if(!a)return{countryCallingCode:o};var c=Gf(Xy(a),n),l=c.nationalNumber,u=c.carrierCode,d=a$(o,l,n);return d&&(s=d,d==="001"||n.country(s)),{country:s,countryCallingCode:o,nationalNumber:l,carrierCode:u}}function cg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ug(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?cg(Object(r),!0).forEach(function(n){vI(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vI(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yI(e,t,r){return dI(e,ug(ug({},t),{},{v2:!0}),r)}function Qf(e){return Qf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qf(e)}function dg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function gI(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dg(Object(r),!0).forEach(function(n){bI(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function bI(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $I(e,t){return SI(e)||xI(e,t)||_I(e,t)||wI()}function wI(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3574
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _I(e,t){if(!!e){if(typeof e=="string")return fg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return fg(e,t)}}function fg(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function xI(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],i=!0,o=!1,a,s;try{for(r=r.call(e);!(i=(a=r.next()).done)&&(n.push(a.value),!(t&&n.length===t));i=!0);}catch(c){o=!0,s=c}finally{try{!i&&r.return!=null&&r.return()}finally{if(o)throw s}}return n}}function SI(e){if(Array.isArray(e))return e}function kI(){var e=EI(arguments),t=e.text,r=e.options,n=e.metadata;return yI(t,r,n)}function EI(e){var t=Array.prototype.slice.call(e),r=$I(t,4),n=r[0],i=r[1],o=r[2],a=r[3],s,c,l;if(typeof n=="string")s=n;else throw new TypeError("A text for parsing must be a string.");if(!i||typeof i=="string")a?(c=o,l=a):(c=void 0,l=o),i&&(c=gI({defaultCountry:i},c));else if(OI(i))o?(c=i,l=o):l=i;else throw new Error("Invalid second argument: ".concat(i));return{text:s,options:c,metadata:l}}var OI=function(t){return Qf(t)==="object"};function CI(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hg(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function PI(e,t,r){return t&&hg(e.prototype,t),r&&hg(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var TI=function(){function e(t){var r=t.onCountryChange,n=t.onCallingCodeChange;CI(this,e),this.onCountryChange=r,this.onCallingCodeChange=n}return PI(e,[{key:"reset",value:function(r){var n=r.country,i=r.callingCode;this.international=!1,this.IDDPrefix=void 0,this.missingPlus=void 0,this.callingCode=void 0,this.digits="",this.resetNationalSignificantNumber(),this.initCountryAndCallingCode(n,i)}},{key:"resetNationalSignificantNumber",value:function(){this.nationalSignificantNumber=this.getNationalDigits(),this.nationalSignificantNumberMatchesInput=!0,this.nationalPrefix=void 0,this.carrierCode=void 0,this.complexPrefixBeforeNationalSignificantNumber=void 0}},{key:"update",value:function(r){for(var n=0,i=Object.keys(r);n<i.length;n++){var o=i[n];this[o]=r[o]}}},{key:"initCountryAndCallingCode",value:function(r,n){this.setCountry(r),this.setCallingCode(n)}},{key:"setCountry",value:function(r){this.country=r,this.onCountryChange(r)}},{key:"setCallingCode",value:function(r){this.callingCode=r,this.onCallingCodeChange(r,this.country)}},{key:"startInternationalNumber",value:function(r,n){this.international=!0,this.initCountryAndCallingCode(r,n)}},{key:"appendDigits",value:function(r){this.digits+=r}},{key:"appendNationalSignificantNumberDigits",value:function(r){this.nationalSignificantNumber+=r}},{key:"getNationalDigits",value:function(){return this.international?this.digits.slice((this.IDDPrefix?this.IDDPrefix.length:0)+(this.callingCode?this.callingCode.length:0)):this.digits}},{key:"getDigitsWithoutInternationalPrefix",value:function(){return this.international&&this.IDDPrefix?this.digits.slice(this.IDDPrefix.length):this.digits}}]),e}();function NI(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=II(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
3575
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function II(e,t){if(!!e){if(typeof e=="string")return pg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return pg(e,t)}}function pg(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var er="x",mu=new RegExp(er);function ys(e,t){if(t<1)return"";for(var r="";t>1;)t&1&&(r+=e),t>>=1,e+=e;return r+e}function mg(e,t){return e[t]===")"&&t++,AI(e.slice(0,t))}function AI(e){for(var t=[],r=0;r<e.length;)e[r]==="("?t.push(r):e[r]===")"&&t.pop(),r++;var n=0,i="";t.push(e.length);for(var o=0,a=t;o<a.length;o++){var s=a[o];i+=e.slice(n,s),n=s+1}return i}function DI(e,t,r){for(var n=NI(r.split("")),i;!(i=n()).done;){var o=i.value;if(e.slice(t+1).search(mu)<0)return;t=e.search(mu),e=e.replace(mu,o)}return[e,t]}function RI(e,t,r){var n=r.metadata,i=r.shouldTryNationalPrefixFormattingRule,o=r.getSeparatorAfterNationalPrefix,a=new RegExp("^(?:".concat(t.pattern(),")$"));if(a.test(e.nationalSignificantNumber))return LI(e,t,{metadata:n,shouldTryNationalPrefixFormattingRule:i,getSeparatorAfterNationalPrefix:o})}function FI(e,t){return lc(e,t)==="IS_POSSIBLE"}function LI(e,t,r){var n=r.metadata,i=r.shouldTryNationalPrefixFormattingRule,o=r.getSeparatorAfterNationalPrefix;if(e.nationalSignificantNumber,e.international,e.nationalPrefix,e.carrierCode,i(t)){var a=vg(e,t,{useNationalPrefixFormattingRule:!0,getSeparatorAfterNationalPrefix:o,metadata:n});if(a)return a}return vg(e,t,{useNationalPrefixFormattingRule:!1,getSeparatorAfterNationalPrefix:o,metadata:n})}function vg(e,t,r){var n=r.metadata,i=r.useNationalPrefixFormattingRule,o=r.getSeparatorAfterNationalPrefix,a=t$(e.nationalSignificantNumber,t,{carrierCode:e.carrierCode,useInternationalFormat:e.international,withNationalPrefix:i,metadata:n});if(i||(e.nationalPrefix?a=e.nationalPrefix+o(t)+a:e.complexPrefixBeforeNationalSignificantNumber&&(a=e.complexPrefixBeforeNationalSignificantNumber+" "+a)),MI(a,e))return a}function MI(e,t){return Cl(e)===t.getNationalDigits()}function jI(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yg(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function zI(e,t,r){return t&&yg(e.prototype,t),r&&yg(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var UI=function(){function e(){jI(this,e)}return zI(e,[{key:"parse",value:function(r){if(this.context=[{or:!0,instructions:[]}],this.parsePattern(r),this.context.length!==1)throw new Error("Non-finalized contexts left when pattern parse ended");var n=this.context[0],i=n.branches,o=n.instructions;if(i)return{op:"|",args:i.concat([vu(o)])};if(o.length===0)throw new Error("Pattern is required");return o.length===1?o[0]:o}},{key:"startContext",value:function(r){this.context.push(r)}},{key:"endContext",value:function(){this.context.pop()}},{key:"getContext",value:function(){return this.context[this.context.length-1]}},{key:"parsePattern",value:function(r){if(!r)throw new Error("Pattern is required");var n=r.match(WI);if(!n){if(BI.test(r))throw new Error("Illegal characters found in a pattern: ".concat(r));this.getContext().instructions=this.getContext().instructions.concat(r.split(""));return}var i=n[1],o=r.slice(0,n.index),a=r.slice(n.index+i.length);switch(i){case"(?:":o&&this.parsePattern(o),this.startContext({or:!0,instructions:[],branches:[]});break;case")":if(!this.getContext().or)throw new Error('")" operator must be preceded by "(?:" operator');if(o&&this.parsePattern(o),this.getContext().instructions.length===0)throw new Error('No instructions found after "|" operator in an "or" group');var s=this.getContext(),c=s.branches;c.push(vu(this.getContext().instructions)),this.endContext(),this.getContext().instructions.push({op:"|",args:c});break;case"|":if(!this.getContext().or)throw new Error('"|" operator can only be used inside "or" groups');if(o&&this.parsePattern(o),!this.getContext().branches)if(this.context.length===1)this.getContext().branches=[];else throw new Error('"branches" not found in an "or" group context');this.getContext().branches.push(vu(this.getContext().instructions)),this.getContext().instructions=[];break;case"[":o&&this.parsePattern(o),this.startContext({oneOfSet:!0});break;case"]":if(!this.getContext().oneOfSet)throw new Error('"]" operator must be preceded by "[" operator');this.endContext(),this.getContext().instructions.push({op:"[]",args:VI(o)});break;default:throw new Error("Unknown operator: ".concat(i))}a&&this.parsePattern(a)}}]),e}();function VI(e){for(var t=[],r=0;r<e.length;){if(e[r]==="-"){if(r===0||r===e.length-1)throw new Error("Couldn't parse a one-of set pattern: ".concat(e));for(var n=e[r-1].charCodeAt(0)+1,i=e[r+1].charCodeAt(0)-1,o=n;o<=i;)t.push(String.fromCharCode(o)),o++}else t.push(e[r]);r++}return t}var BI=/[\(\)\[\]\?\:\|]/,WI=new RegExp("(\\||\\(\\?\\:|\\)|\\[|\\])");function vu(e){return e.length===1?e[0]:e}function gg(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=qI(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
3576
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qI(e,t){if(!!e){if(typeof e=="string")return bg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return bg(e,t)}}function bg(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function HI(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $g(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function GI(e,t,r){return t&&$g(e.prototype,t),r&&$g(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var QI=function(){function e(t){HI(this,e),this.matchTree=new UI().parse(t)}return GI(e,[{key:"match",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.allowOverflow;if(!r)throw new Error("String is required");var o=Kf(r.split(""),this.matchTree,!0);if(o&&o.match&&delete o.matchedChars,!(o&&o.overflow&&!i))return o}}]),e}();function Kf(e,t,r){if(typeof t=="string"){var n=e.join("");return t.indexOf(n)===0?e.length===t.length?{match:!0,matchedChars:e}:{partialMatch:!0}:n.indexOf(t)===0?r&&e.length>t.length?{overflow:!0}:{match:!0,matchedChars:e.slice(0,t.length)}:void 0}if(Array.isArray(t)){for(var i=e.slice(),o=0;o<t.length;){var a=t[o],s=Kf(i,a,r&&o===t.length-1);if(s){if(s.overflow)return s;if(s.match){if(i=i.slice(s.matchedChars.length),i.length===0)return o===t.length-1?{match:!0,matchedChars:e}:{partialMatch:!0}}else{if(s.partialMatch)return{partialMatch:!0};throw new Error(`Unsupported match result:
3577
- `.concat(JSON.stringify(s,null,2)))}}else return;o++}return r?{overflow:!0}:{match:!0,matchedChars:e.slice(0,e.length-i.length)}}switch(t.op){case"|":for(var c,l=gg(t.args),u;!(u=l()).done;){var d=u.value,f=Kf(e,d,r);if(f){if(f.overflow)return f;if(f.match)return{match:!0,matchedChars:f.matchedChars};if(f.partialMatch)c=!0;else throw new Error(`Unsupported match result:
3567
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function MN(e,t){if(!!e){if(typeof e=="string")return eg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return eg(e,t)}}function eg(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var jN=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function lp(e,t,r){if(t=t||{},!!e.country){r=new bt(r),r.selectNumberingPlan(e.country,e.countryCallingCode);var n=t.v2?e.nationalNumber:e.phone;if(!!zr(n,r.nationalNumberPattern())){if(pu(n,"FIXED_LINE",r))return r.type("MOBILE")&&r.type("MOBILE").pattern()===""||!r.type("MOBILE")||pu(n,"MOBILE",r)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE";for(var i=LN(jN),o;!(o=i()).done;){var a=o.value;if(pu(n,a,r))return a}}}}function pu(e,t,r){return t=r.type(t),!t||!t.pattern()||t.possibleLengths()&&t.possibleLengths().indexOf(e.length)<0?!1:zr(e,t.pattern())}function zN(e,t,r){if(t=t||{},r=new bt(r),!e.country)return!1;if(r.selectNumberingPlan(e.country,e.countryCallingCode),r.hasTypes())return lp(e,t,r.metadata)!==void 0;var n=t.v2?e.nationalNumber:e.phone;return zr(n,r.nationalNumberPattern())}function UN(e,t,r){var n=new bt(r),i=n.getCountryCodesForCallingCode(e);return i?i.filter(function(o){return VN(t,o,r)}):[]}function VN(e,t,r){var n=new bt(r);return n.selectNumberingPlan(t),n.numberingPlan.possibleLengths().indexOf(e.length)>=0}function J2(e){return e.replace(new RegExp("[".concat(or,"]+"),"g")," ").trim()}var e$=/(\$\d)/;function t$(e,t,r){var n=r.useInternationalFormat,i=r.withNationalPrefix;r.carrierCode,r.metadata;var o=e.replace(new RegExp(t.pattern()),n?t.internationalFormat():i&&t.nationalPrefixFormattingRule()?t.format().replace(e$,t.nationalPrefixFormattingRule()):t.format());return n?J2(o):o}var BN=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;function WN(e,t,r){var n=new bt(r);if(n.selectNumberingPlan(e,t),n.defaultIDDPrefix())return n.defaultIDDPrefix();if(BN.test(n.IDDPrefix()))return n.IDDPrefix()}function qN(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=HN(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
3568
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function HN(e,t){if(!!e){if(typeof e=="string")return tg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return tg(e,t)}}function tg(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function rg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ng(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?rg(Object(r),!0).forEach(function(n){GN(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function GN(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var ig={formatExtension:function(t,r,n){return"".concat(t).concat(n.ext()).concat(r)}};function QN(e,t,r,n){if(r?r=ng(ng({},ig),r):r=ig,n=new bt(n),e.country&&e.country!=="001"){if(!n.hasCountry(e.country))throw new Error("Unknown country: ".concat(e.country));n.country(e.country)}else if(e.countryCallingCode)n.selectNumberingPlan(e.countryCallingCode);else return e.phone||"";var i=n.countryCallingCode(),o=r.v2?e.nationalNumber:e.phone,a;switch(t){case"NATIONAL":return o?(a=Pl(o,e.carrierCode,"NATIONAL",n,r),mu(a,e.ext,n,r.formatExtension)):"";case"INTERNATIONAL":return o?(a=Pl(o,null,"INTERNATIONAL",n,r),a="+".concat(i," ").concat(a),mu(a,e.ext,n,r.formatExtension)):"+".concat(i);case"E.164":return"+".concat(i).concat(o);case"RFC3966":return FN({number:"+".concat(i).concat(o),ext:e.ext});case"IDD":if(!r.fromCountry)return;var s=YN(o,e.carrierCode,i,r.fromCountry,n);return mu(s,e.ext,n,r.formatExtension);default:throw new Error('Unknown "format" argument passed to "formatNumber()": "'.concat(t,'"'))}}function Pl(e,t,r,n,i){var o=KN(n.formats(),e);return o?t$(e,o,{useInternationalFormat:r==="INTERNATIONAL",withNationalPrefix:!(o.nationalPrefixIsOptionalWhenFormattingInNationalFormat()&&i&&i.nationalPrefix===!1),carrierCode:t,metadata:n}):e}function KN(e,t){for(var r=qN(e),n;!(n=r()).done;){var i=n.value;if(i.leadingDigitsPatterns().length>0){var o=i.leadingDigitsPatterns()[i.leadingDigitsPatterns().length-1];if(t.search(o)!==0)continue}if(zr(t,i.pattern()))return i}}function mu(e,t,r,n){return t?n(e,t,r):e}function YN(e,t,r,n,i){var o=sp(n,i.metadata);if(o===r){var a=Pl(e,t,"NATIONAL",i);return r==="1"?r+" "+a:a}var s=WN(n,void 0,i.metadata);if(s)return"".concat(s," ").concat(r," ").concat(Pl(e,null,"INTERNATIONAL",i))}function og(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ag(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?og(Object(r),!0).forEach(function(n){XN(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):og(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function XN(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ZN(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sg(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function JN(e,t,r){return t&&sg(e.prototype,t),r&&sg(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var r$=function(){function e(t,r,n){if(ZN(this,e),!t)throw new TypeError("`country` or `countryCallingCode` not passed");if(!r)throw new TypeError("`nationalNumber` not passed");if(!n)throw new TypeError("`metadata` not passed");var i=new bt(n);eI(t)&&(this.country=t,i.country(t),t=i.countryCallingCode()),this.countryCallingCode=t,this.nationalNumber=r,this.number="+"+this.countryCallingCode+this.nationalNumber,this.metadata=n}return JN(e,[{key:"setExt",value:function(r){this.ext=r}},{key:"getPossibleCountries",value:function(){return this.country?[this.country]:UN(this.countryCallingCode,this.nationalNumber,this.metadata)}},{key:"isPossible",value:function(){return PN(this,{v2:!0},this.metadata)}},{key:"isValid",value:function(){return zN(this,{v2:!0},this.metadata)}},{key:"isNonGeographic",value:function(){var r=new bt(this.metadata);return r.isNonGeographicCallingCode(this.countryCallingCode)}},{key:"isEqual",value:function(r){return this.number===r.number&&this.ext===r.ext}},{key:"getType",value:function(){return lp(this,{v2:!0},this.metadata)}},{key:"format",value:function(r,n){return QN(this,r,n?ag(ag({},n),{},{v2:!0}):{v2:!0},this.metadata)}},{key:"formatNational",value:function(r){return this.format("NATIONAL",r)}},{key:"formatInternational",value:function(r){return this.format("INTERNATIONAL",r)}},{key:"getURI",value:function(r){return this.format("RFC3966",r)}}]),e}(),eI=function(t){return/^[A-Z]{2}$/.test(t)},tI=new RegExp("(["+Zt+"])");function n$(e,t,r,n){if(!!t){var i=new bt(n);i.selectNumberingPlan(t,r);var o=new RegExp(i.IDDPrefix());if(e.search(o)===0){e=e.slice(e.match(o)[0].length);var a=e.match(tI);if(!(a&&a[1]!=null&&a[1].length>0&&a[1]==="0"))return e}}}function Gf(e,t){if(e&&t.numberingPlan.nationalPrefixForParsing()){var r=new RegExp("^(?:"+t.numberingPlan.nationalPrefixForParsing()+")"),n=r.exec(e);if(n){var i,o,a=n.length-1,s=a>0&&n[a];if(t.nationalPrefixTransformRule()&&s)i=e.replace(r,t.nationalPrefixTransformRule()),a>1&&(o=n[1]);else{var c=n[0];i=e.slice(c.length),s&&(o=n[1])}var l;if(s){var u=e.indexOf(n[1]),d=e.slice(0,u);d===t.numberingPlan.nationalPrefix()&&(l=t.numberingPlan.nationalPrefix())}else l=n[0];return{nationalNumber:i,nationalPrefix:l,carrierCode:o}}}return{nationalNumber:e}}function Qf(e,t){var r=Gf(e,t),n=r.carrierCode,i=r.nationalNumber;if(i!==e){if(!rI(e,i,t))return{nationalNumber:e};if(t.possibleLengths()&&!nI(i,t))return{nationalNumber:e}}return{nationalNumber:i,carrierCode:n}}function rI(e,t,r){return!(zr(e,r.nationalNumberPattern())&&!zr(t,r.nationalNumberPattern()))}function nI(e,t){switch(cc(e,t)){case"TOO_SHORT":case"INVALID_LENGTH":return!1;default:return!0}}function i$(e,t,r,n){var i=t?sp(t,n):r;if(e.indexOf(i)===0){n=new bt(n),n.selectNumberingPlan(t,r);var o=e.slice(i.length),a=Qf(o,n),s=a.nationalNumber,c=Qf(e,n),l=c.nationalNumber;if(!zr(l,n.nationalNumberPattern())&&zr(s,n.nationalNumberPattern())||cc(l,n)==="TOO_LONG")return{countryCallingCode:i,number:o}}return{number:e}}function o$(e,t,r,n){if(!e)return{};if(e[0]!=="+"){var i=n$(e,t,r,n);if(i&&i!==e)e="+"+i;else{if(t||r){var o=i$(e,t,r,n),a=o.countryCallingCode,s=o.number;if(a)return{countryCallingCode:a,number:s}}return{number:e}}}if(e[1]==="0")return{};n=new bt(n);for(var c=2;c-1<=XT&&c<=e.length;){var l=e.slice(1,c);if(n.hasCallingCode(l))return n.selectNumberingPlan(l),{countryCallingCode:l,number:e.slice(c)};c++}return{}}function iI(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=oI(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
3569
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function oI(e,t){if(!!e){if(typeof e=="string")return lg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return lg(e,t)}}function lg(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function aI(e,t,r){r=new bt(r);for(var n=iI(e),i;!(i=n()).done;){var o=i.value;if(r.country(o),r.leadingDigits()){if(t&&t.search(r.leadingDigits())===0)return o}else if(lp({phone:t,country:o},void 0,r.metadata))return o}}var sI=!1;function a$(e,t,r){if(sI&&r.isNonGeographicCallingCode(e))return"001";var n=r.getCountryCodesForCallingCode(e);if(!!n)return n.length===1?n[0]:aI(n,t,r.metadata)}var lI=250,cI=new RegExp("["+ac+Zt+"]"),uI=new RegExp("[^"+Zt+"#]+$");function dI(e,t,r){if(t=t||{},r=new bt(r),t.defaultCountry&&!r.hasCountry(t.defaultCountry))throw t.v2?new kn("INVALID_COUNTRY"):new Error("Unknown country: ".concat(t.defaultCountry));var n=hI(e,t.v2,t.extract),i=n.number,o=n.ext,a=n.error;if(!i){if(t.v2)throw a==="TOO_SHORT"?new kn("TOO_SHORT"):new kn("NOT_A_NUMBER");return{}}var s=mI(i,t.defaultCountry,t.defaultCallingCode,r),c=s.country,l=s.nationalNumber,u=s.countryCallingCode,d=s.carrierCode;if(!r.hasSelectedNumberingPlan()){if(t.v2)throw new kn("INVALID_COUNTRY");return{}}if(!l||l.length<ap){if(t.v2)throw new kn("TOO_SHORT");return{}}if(l.length>YT){if(t.v2)throw new kn("TOO_LONG");return{}}if(t.v2){var f=new r$(u,l,r.metadata);return c&&(f.country=c),d&&(f.carrierCode=d),o&&(f.ext=o),f}var h=(t.extended?r.hasSelectedNumberingPlan():c)?zr(l,r.nationalNumberPattern()):!1;return t.extended?{country:c,countryCallingCode:u,carrierCode:d,valid:h,possible:h?!0:!!(t.extended===!0&&r.possibleLengths()&&X2(l,r)),phone:l,ext:o}:h?pI(c,l,o):{}}function fI(e,t,r){if(!!e){if(e.length>lI){if(r)throw new kn("TOO_LONG");return}if(t===!1)return e;var n=e.search(cI);if(!(n<0))return e.slice(n).replace(uI,"")}}function hI(e,t,r){if(e&&e.indexOf("tel:")===0)return RN(e);var n=fI(e,r,t);if(!n)return{};if(!Q2(n))return gN(n)?{error:"TOO_SHORT"}:{};var i=bN(n);return i.ext?i:{number:n}}function pI(e,t,r){var n={country:e,phone:t};return r&&(n.ext=r),n}function mI(e,t,r,n){var i=o$(Xy(e),t,r,n.metadata),o=i.countryCallingCode,a=i.number,s;if(o)n.selectNumberingPlan(o);else if(a&&(t||r))n.selectNumberingPlan(t,r),t&&(s=t),o=r||sp(t,n.metadata);else return{};if(!a)return{countryCallingCode:o};var c=Qf(Xy(a),n),l=c.nationalNumber,u=c.carrierCode,d=a$(o,l,n);return d&&(s=d,d==="001"||n.country(s)),{country:s,countryCallingCode:o,nationalNumber:l,carrierCode:u}}function cg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ug(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?cg(Object(r),!0).forEach(function(n){vI(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vI(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yI(e,t,r){return dI(e,ug(ug({},t),{},{v2:!0}),r)}function Kf(e){return Kf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kf(e)}function dg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function gI(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dg(Object(r),!0).forEach(function(n){bI(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function bI(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $I(e,t){return SI(e)||xI(e,t)||_I(e,t)||wI()}function wI(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3570
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _I(e,t){if(!!e){if(typeof e=="string")return fg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return fg(e,t)}}function fg(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function xI(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],i=!0,o=!1,a,s;try{for(r=r.call(e);!(i=(a=r.next()).done)&&(n.push(a.value),!(t&&n.length===t));i=!0);}catch(c){o=!0,s=c}finally{try{!i&&r.return!=null&&r.return()}finally{if(o)throw s}}return n}}function SI(e){if(Array.isArray(e))return e}function kI(){var e=EI(arguments),t=e.text,r=e.options,n=e.metadata;return yI(t,r,n)}function EI(e){var t=Array.prototype.slice.call(e),r=$I(t,4),n=r[0],i=r[1],o=r[2],a=r[3],s,c,l;if(typeof n=="string")s=n;else throw new TypeError("A text for parsing must be a string.");if(!i||typeof i=="string")a?(c=o,l=a):(c=void 0,l=o),i&&(c=gI({defaultCountry:i},c));else if(OI(i))o?(c=i,l=o):l=i;else throw new Error("Invalid second argument: ".concat(i));return{text:s,options:c,metadata:l}}var OI=function(t){return Kf(t)==="object"};function CI(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hg(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function PI(e,t,r){return t&&hg(e.prototype,t),r&&hg(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var TI=function(){function e(t){var r=t.onCountryChange,n=t.onCallingCodeChange;CI(this,e),this.onCountryChange=r,this.onCallingCodeChange=n}return PI(e,[{key:"reset",value:function(r){var n=r.country,i=r.callingCode;this.international=!1,this.IDDPrefix=void 0,this.missingPlus=void 0,this.callingCode=void 0,this.digits="",this.resetNationalSignificantNumber(),this.initCountryAndCallingCode(n,i)}},{key:"resetNationalSignificantNumber",value:function(){this.nationalSignificantNumber=this.getNationalDigits(),this.nationalSignificantNumberMatchesInput=!0,this.nationalPrefix=void 0,this.carrierCode=void 0,this.complexPrefixBeforeNationalSignificantNumber=void 0}},{key:"update",value:function(r){for(var n=0,i=Object.keys(r);n<i.length;n++){var o=i[n];this[o]=r[o]}}},{key:"initCountryAndCallingCode",value:function(r,n){this.setCountry(r),this.setCallingCode(n)}},{key:"setCountry",value:function(r){this.country=r,this.onCountryChange(r)}},{key:"setCallingCode",value:function(r){this.callingCode=r,this.onCallingCodeChange(r,this.country)}},{key:"startInternationalNumber",value:function(r,n){this.international=!0,this.initCountryAndCallingCode(r,n)}},{key:"appendDigits",value:function(r){this.digits+=r}},{key:"appendNationalSignificantNumberDigits",value:function(r){this.nationalSignificantNumber+=r}},{key:"getNationalDigits",value:function(){return this.international?this.digits.slice((this.IDDPrefix?this.IDDPrefix.length:0)+(this.callingCode?this.callingCode.length:0)):this.digits}},{key:"getDigitsWithoutInternationalPrefix",value:function(){return this.international&&this.IDDPrefix?this.digits.slice(this.IDDPrefix.length):this.digits}}]),e}();function NI(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=II(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
3571
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function II(e,t){if(!!e){if(typeof e=="string")return pg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return pg(e,t)}}function pg(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var er="x",vu=new RegExp(er);function ys(e,t){if(t<1)return"";for(var r="";t>1;)t&1&&(r+=e),t>>=1,e+=e;return r+e}function mg(e,t){return e[t]===")"&&t++,AI(e.slice(0,t))}function AI(e){for(var t=[],r=0;r<e.length;)e[r]==="("?t.push(r):e[r]===")"&&t.pop(),r++;var n=0,i="";t.push(e.length);for(var o=0,a=t;o<a.length;o++){var s=a[o];i+=e.slice(n,s),n=s+1}return i}function DI(e,t,r){for(var n=NI(r.split("")),i;!(i=n()).done;){var o=i.value;if(e.slice(t+1).search(vu)<0)return;t=e.search(vu),e=e.replace(vu,o)}return[e,t]}function RI(e,t,r){var n=r.metadata,i=r.shouldTryNationalPrefixFormattingRule,o=r.getSeparatorAfterNationalPrefix,a=new RegExp("^(?:".concat(t.pattern(),")$"));if(a.test(e.nationalSignificantNumber))return LI(e,t,{metadata:n,shouldTryNationalPrefixFormattingRule:i,getSeparatorAfterNationalPrefix:o})}function FI(e,t){return cc(e,t)==="IS_POSSIBLE"}function LI(e,t,r){var n=r.metadata,i=r.shouldTryNationalPrefixFormattingRule,o=r.getSeparatorAfterNationalPrefix;if(e.nationalSignificantNumber,e.international,e.nationalPrefix,e.carrierCode,i(t)){var a=vg(e,t,{useNationalPrefixFormattingRule:!0,getSeparatorAfterNationalPrefix:o,metadata:n});if(a)return a}return vg(e,t,{useNationalPrefixFormattingRule:!1,getSeparatorAfterNationalPrefix:o,metadata:n})}function vg(e,t,r){var n=r.metadata,i=r.useNationalPrefixFormattingRule,o=r.getSeparatorAfterNationalPrefix,a=t$(e.nationalSignificantNumber,t,{carrierCode:e.carrierCode,useInternationalFormat:e.international,withNationalPrefix:i,metadata:n});if(i||(e.nationalPrefix?a=e.nationalPrefix+o(t)+a:e.complexPrefixBeforeNationalSignificantNumber&&(a=e.complexPrefixBeforeNationalSignificantNumber+" "+a)),MI(a,e))return a}function MI(e,t){return Cl(e)===t.getNationalDigits()}function jI(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yg(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function zI(e,t,r){return t&&yg(e.prototype,t),r&&yg(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var UI=function(){function e(){jI(this,e)}return zI(e,[{key:"parse",value:function(r){if(this.context=[{or:!0,instructions:[]}],this.parsePattern(r),this.context.length!==1)throw new Error("Non-finalized contexts left when pattern parse ended");var n=this.context[0],i=n.branches,o=n.instructions;if(i)return{op:"|",args:i.concat([yu(o)])};if(o.length===0)throw new Error("Pattern is required");return o.length===1?o[0]:o}},{key:"startContext",value:function(r){this.context.push(r)}},{key:"endContext",value:function(){this.context.pop()}},{key:"getContext",value:function(){return this.context[this.context.length-1]}},{key:"parsePattern",value:function(r){if(!r)throw new Error("Pattern is required");var n=r.match(WI);if(!n){if(BI.test(r))throw new Error("Illegal characters found in a pattern: ".concat(r));this.getContext().instructions=this.getContext().instructions.concat(r.split(""));return}var i=n[1],o=r.slice(0,n.index),a=r.slice(n.index+i.length);switch(i){case"(?:":o&&this.parsePattern(o),this.startContext({or:!0,instructions:[],branches:[]});break;case")":if(!this.getContext().or)throw new Error('")" operator must be preceded by "(?:" operator');if(o&&this.parsePattern(o),this.getContext().instructions.length===0)throw new Error('No instructions found after "|" operator in an "or" group');var s=this.getContext(),c=s.branches;c.push(yu(this.getContext().instructions)),this.endContext(),this.getContext().instructions.push({op:"|",args:c});break;case"|":if(!this.getContext().or)throw new Error('"|" operator can only be used inside "or" groups');if(o&&this.parsePattern(o),!this.getContext().branches)if(this.context.length===1)this.getContext().branches=[];else throw new Error('"branches" not found in an "or" group context');this.getContext().branches.push(yu(this.getContext().instructions)),this.getContext().instructions=[];break;case"[":o&&this.parsePattern(o),this.startContext({oneOfSet:!0});break;case"]":if(!this.getContext().oneOfSet)throw new Error('"]" operator must be preceded by "[" operator');this.endContext(),this.getContext().instructions.push({op:"[]",args:VI(o)});break;default:throw new Error("Unknown operator: ".concat(i))}a&&this.parsePattern(a)}}]),e}();function VI(e){for(var t=[],r=0;r<e.length;){if(e[r]==="-"){if(r===0||r===e.length-1)throw new Error("Couldn't parse a one-of set pattern: ".concat(e));for(var n=e[r-1].charCodeAt(0)+1,i=e[r+1].charCodeAt(0)-1,o=n;o<=i;)t.push(String.fromCharCode(o)),o++}else t.push(e[r]);r++}return t}var BI=/[\(\)\[\]\?\:\|]/,WI=new RegExp("(\\||\\(\\?\\:|\\)|\\[|\\])");function yu(e){return e.length===1?e[0]:e}function gg(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=qI(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
3572
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qI(e,t){if(!!e){if(typeof e=="string")return bg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return bg(e,t)}}function bg(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function HI(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $g(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function GI(e,t,r){return t&&$g(e.prototype,t),r&&$g(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var QI=function(){function e(t){HI(this,e),this.matchTree=new UI().parse(t)}return GI(e,[{key:"match",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.allowOverflow;if(!r)throw new Error("String is required");var o=Yf(r.split(""),this.matchTree,!0);if(o&&o.match&&delete o.matchedChars,!(o&&o.overflow&&!i))return o}}]),e}();function Yf(e,t,r){if(typeof t=="string"){var n=e.join("");return t.indexOf(n)===0?e.length===t.length?{match:!0,matchedChars:e}:{partialMatch:!0}:n.indexOf(t)===0?r&&e.length>t.length?{overflow:!0}:{match:!0,matchedChars:e.slice(0,t.length)}:void 0}if(Array.isArray(t)){for(var i=e.slice(),o=0;o<t.length;){var a=t[o],s=Yf(i,a,r&&o===t.length-1);if(s){if(s.overflow)return s;if(s.match){if(i=i.slice(s.matchedChars.length),i.length===0)return o===t.length-1?{match:!0,matchedChars:e}:{partialMatch:!0}}else{if(s.partialMatch)return{partialMatch:!0};throw new Error(`Unsupported match result:
3573
+ `.concat(JSON.stringify(s,null,2)))}}else return;o++}return r?{overflow:!0}:{match:!0,matchedChars:e.slice(0,e.length-i.length)}}switch(t.op){case"|":for(var c,l=gg(t.args),u;!(u=l()).done;){var d=u.value,f=Yf(e,d,r);if(f){if(f.overflow)return f;if(f.match)return{match:!0,matchedChars:f.matchedChars};if(f.partialMatch)c=!0;else throw new Error(`Unsupported match result:
3578
3574
  `.concat(JSON.stringify(f,null,2)))}}return c?{partialMatch:!0}:void 0;case"[]":for(var h=gg(t.args),p;!(p=h()).done;){var m=p.value;if(e[0]===m)return e.length===1?{match:!0,matchedChars:e}:r?{overflow:!0}:{match:!0,matchedChars:[m]}}return;default:throw new Error("Unsupported instruction tree: ".concat(t))}}function wg(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=KI(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
3579
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function KI(e,t){if(!!e){if(typeof e=="string")return _g(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _g(e,t)}}function _g(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function YI(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xg(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function XI(e,t,r){return t&&xg(e.prototype,t),r&&xg(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var Yf="9",ZI=15,JI=ys(Yf,ZI),eA=/[- ]/,tA=function(){return/\[([^\[\]])*\]/g},rA=function(){return/\d(?=[^,}][^,}])/g},nA=new RegExp("["+or+"]*\\$1["+or+"]*(\\$\\d["+or+"]*)*$"),Sg=3,iA=function(){function e(t){t.state;var r=t.metadata;YI(this,e),this.metadata=r,this.resetFormat()}return XI(e,[{key:"resetFormat",value:function(){this.chosenFormat=void 0,this.template=void 0,this.nationalNumberTemplate=void 0,this.populatedNationalNumberTemplate=void 0,this.populatedNationalNumberTemplatePosition=-1}},{key:"reset",value:function(r,n){this.resetFormat(),r?(this.isNANP=r.callingCode()==="1",this.matchingFormats=r.formats(),n.nationalSignificantNumber&&this.narrowDownMatchingFormats(n)):(this.isNANP=void 0,this.matchingFormats=[])}},{key:"format",value:function(r,n){var i=this;if(FI(n.nationalSignificantNumber,this.metadata))for(var o=wg(this.matchingFormats),a;!(a=o()).done;){var s=a.value,c=RI(n,s,{metadata:this.metadata,shouldTryNationalPrefixFormattingRule:function(u){return i.shouldTryNationalPrefixFormattingRule(u,{international:n.international,nationalPrefix:n.nationalPrefix})},getSeparatorAfterNationalPrefix:function(u){return i.getSeparatorAfterNationalPrefix(u)}});if(c)return this.resetFormat(),this.chosenFormat=s,this.setNationalNumberTemplate(c.replace(/\d/g,er),n),this.populatedNationalNumberTemplate=c,this.populatedNationalNumberTemplatePosition=this.template.lastIndexOf(er),c}return this.formatNationalNumberWithNextDigits(r,n)}},{key:"formatNationalNumberWithNextDigits",value:function(r,n){var i=this.chosenFormat,o=this.chooseFormat(n);if(o)return o===i?this.formatNextNationalNumberDigits(r):this.formatNextNationalNumberDigits(n.getNationalDigits())}},{key:"narrowDownMatchingFormats",value:function(r){var n=this,i=r.nationalSignificantNumber,o=r.nationalPrefix,a=r.international,s=i,c=s.length-Sg;c<0&&(c=0),this.matchingFormats=this.matchingFormats.filter(function(l){return n.formatSuits(l,a,o)&&n.formatMatches(l,s,c)}),this.chosenFormat&&this.matchingFormats.indexOf(this.chosenFormat)===-1&&this.resetFormat()}},{key:"formatSuits",value:function(r,n,i){return!(i&&!r.usesNationalPrefix()&&!r.nationalPrefixIsOptionalWhenFormattingInNationalFormat()||!n&&!i&&r.nationalPrefixIsMandatoryWhenFormattingInNationalFormat())}},{key:"formatMatches",value:function(r,n,i){var o=r.leadingDigitsPatterns().length;if(o===0)return!0;i=Math.min(i,o-1);var a=r.leadingDigitsPatterns()[i];if(n.length<Sg)try{return new QI(a).match(n,{allowOverflow:!0})!==void 0}catch(s){return console.error(s),!0}return new RegExp("^(".concat(a,")")).test(n)}},{key:"getFormatFormat",value:function(r,n){return n?r.internationalFormat():r.format()}},{key:"chooseFormat",value:function(r){for(var n=this,i=function(){var l=a.value;return n.chosenFormat===l?"break":nA.test(n.getFormatFormat(l,r.international))?n.createTemplateForFormat(l,r)?(n.chosenFormat=l,"break"):(n.matchingFormats=n.matchingFormats.filter(function(u){return u!==l}),"continue"):"continue"},o=wg(this.matchingFormats.slice()),a;!(a=o()).done;){var s=i();if(s==="break")break}return this.chosenFormat||this.resetFormat(),this.chosenFormat}},{key:"createTemplateForFormat",value:function(r,n){if(!(r.pattern().indexOf("|")>=0)){var i=this.getTemplateForFormat(r,n);if(i)return this.setNationalNumberTemplate(i,n),!0}}},{key:"getSeparatorAfterNationalPrefix",value:function(r){return this.isNANP||r&&r.nationalPrefixFormattingRule()&&eA.test(r.nationalPrefixFormattingRule())?" ":""}},{key:"getInternationalPrefixBeforeCountryCallingCode",value:function(r,n){var i=r.IDDPrefix,o=r.missingPlus;return i?n&&n.spacing===!1?i:i+" ":o?"":"+"}},{key:"getTemplate",value:function(r){if(!!this.template){for(var n=-1,i=0,o=r.international?this.getInternationalPrefixBeforeCountryCallingCode(r,{spacing:!1}):"";i<o.length+r.getDigitsWithoutInternationalPrefix().length;)n=this.template.indexOf(er,n+1),i++;return mg(this.template,n+1)}}},{key:"setNationalNumberTemplate",value:function(r,n){this.nationalNumberTemplate=r,this.populatedNationalNumberTemplate=r,this.populatedNationalNumberTemplatePosition=-1,n.international?this.template=this.getInternationalPrefixBeforeCountryCallingCode(n).replace(/[\d\+]/g,er)+ys(er,n.callingCode.length)+" "+r:this.template=r}},{key:"getTemplateForFormat",value:function(r,n){var i=n.nationalSignificantNumber,o=n.international,a=n.nationalPrefix,s=n.complexPrefixBeforeNationalSignificantNumber,c=r.pattern();c=c.replace(tA(),"\\d").replace(rA(),"\\d");var l=JI.match(c)[0];if(!(i.length>l.length)){var u=new RegExp("^"+c+"$"),d=i.replace(/\d/g,Yf);u.test(d)&&(l=d);var f=this.getFormatFormat(r,o),h;if(this.shouldTryNationalPrefixFormattingRule(r,{international:o,nationalPrefix:a})){var p=f.replace(e$,r.nationalPrefixFormattingRule());if(Cl(r.nationalPrefixFormattingRule())===(a||"")+Cl("$1")&&(f=p,h=!0,a))for(var m=a.length;m>0;)f=f.replace(/\d/,er),m--}var v=l.replace(new RegExp(c),f).replace(new RegExp(Yf,"g"),er);return h||(s?v=ys(er,s.length)+" "+v:a&&(v=ys(er,a.length)+this.getSeparatorAfterNationalPrefix(r)+v)),o&&(v=J2(v)),v}}},{key:"formatNextNationalNumberDigits",value:function(r){var n=DI(this.populatedNationalNumberTemplate,this.populatedNationalNumberTemplatePosition,r);if(!n){this.resetFormat();return}return this.populatedNationalNumberTemplate=n[0],this.populatedNationalNumberTemplatePosition=n[1],mg(this.populatedNationalNumberTemplate,this.populatedNationalNumberTemplatePosition+1)}},{key:"shouldTryNationalPrefixFormattingRule",value:function(r,n){var i=n.international,o=n.nationalPrefix;if(r.nationalPrefixFormattingRule()){var a=r.usesNationalPrefix();if(a&&o||!a&&!i)return!0}}}]),e}();function s$(e,t){return lA(e)||sA(e,t)||aA(e,t)||oA()}function oA(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3580
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function aA(e,t){if(!!e){if(typeof e=="string")return kg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return kg(e,t)}}function kg(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function sA(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],i=!0,o=!1,a,s;try{for(r=r.call(e);!(i=(a=r.next()).done)&&(n.push(a.value),!(t&&n.length===t));i=!0);}catch(c){o=!0,s=c}finally{try{!i&&r.return!=null&&r.return()}finally{if(o)throw s}}return n}}function lA(e){if(Array.isArray(e))return e}function cA(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Eg(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function uA(e,t,r){return t&&Eg(e.prototype,t),r&&Eg(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var dA="["+or+Zt+"]+",fA=new RegExp("^"+dA+"$","i"),hA="(?:["+oc+"]["+or+Zt+"]*|["+or+Zt+"]+)",pA=new RegExp("[^"+or+Zt+"]+.*$"),mA=/[^\d\[\]]/,vA=function(){function e(t){var r=t.defaultCountry,n=t.defaultCallingCode,i=t.metadata,o=t.onNationalSignificantNumberChange;cA(this,e),this.defaultCountry=r,this.defaultCallingCode=n,this.metadata=i,this.onNationalSignificantNumberChange=o}return uA(e,[{key:"input",value:function(r,n){var i=bA(r),o=s$(i,2),a=o[0],s=o[1],c=Cl(a),l;return s&&(n.digits||(n.startInternationalNumber(),c||(l=!0))),c&&this.inputDigits(c,n),{digits:c,justLeadingPlus:l}}},{key:"inputDigits",value:function(r,n){var i=n.digits,o=i.length<3&&i.length+r.length>=3;if(n.appendDigits(r),o&&this.extractIddPrefix(n),this.isWaitingForCountryCallingCode(n)){if(!this.extractCountryCallingCode(n))return}else n.appendNationalSignificantNumberDigits(r);n.international||this.hasExtractedNationalSignificantNumber||this.extractNationalSignificantNumber(n.getNationalDigits(),function(a){return n.update(a)})}},{key:"isWaitingForCountryCallingCode",value:function(r){var n=r.international,i=r.callingCode;return n&&!i}},{key:"extractCountryCallingCode",value:function(r){var n=o$("+"+r.getDigitsWithoutInternationalPrefix(),this.defaultCountry,this.defaultCallingCode,this.metadata.metadata),i=n.countryCallingCode,o=n.number;if(i)return r.setCallingCode(i),r.update({nationalSignificantNumber:o}),!0}},{key:"reset",value:function(r){if(r){this.hasSelectedNumberingPlan=!0;var n=r._nationalPrefixForParsing();this.couldPossiblyExtractAnotherNationalSignificantNumber=n&&mA.test(n)}else this.hasSelectedNumberingPlan=void 0,this.couldPossiblyExtractAnotherNationalSignificantNumber=void 0}},{key:"extractNationalSignificantNumber",value:function(r,n){if(!!this.hasSelectedNumberingPlan){var i=Hf(r,this.metadata),o=i.nationalPrefix,a=i.nationalNumber,s=i.carrierCode;if(a!==r)return this.onExtractedNationalNumber(o,s,a,r,n),!0}}},{key:"extractAnotherNationalSignificantNumber",value:function(r,n,i){if(!this.hasExtractedNationalSignificantNumber)return this.extractNationalSignificantNumber(r,i);if(!!this.couldPossiblyExtractAnotherNationalSignificantNumber){var o=Hf(r,this.metadata),a=o.nationalPrefix,s=o.nationalNumber,c=o.carrierCode;if(s!==n)return this.onExtractedNationalNumber(a,c,s,r,i),!0}}},{key:"onExtractedNationalNumber",value:function(r,n,i,o,a){var s,c,l=o.lastIndexOf(i);if(l>=0&&l===o.length-i.length){c=!0;var u=o.slice(0,l);u!==r&&(s=u)}a({nationalPrefix:r,carrierCode:n,nationalSignificantNumber:i,nationalSignificantNumberMatchesInput:c,complexPrefixBeforeNationalSignificantNumber:s}),this.hasExtractedNationalSignificantNumber=!0,this.onNationalSignificantNumberChange()}},{key:"reExtractNationalSignificantNumber",value:function(r){if(this.extractAnotherNationalSignificantNumber(r.getNationalDigits(),r.nationalSignificantNumber,function(n){return r.update(n)}))return!0;if(this.extractIddPrefix(r))return this.extractCallingCodeAndNationalSignificantNumber(r),!0;if(this.fixMissingPlus(r))return this.extractCallingCodeAndNationalSignificantNumber(r),!0}},{key:"extractIddPrefix",value:function(r){var n=r.international,i=r.IDDPrefix,o=r.digits;if(r.nationalSignificantNumber,!(n||i)){var a=n$(o,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata);if(a!==void 0&&a!==o)return r.update({IDDPrefix:o.slice(0,o.length-a.length)}),this.startInternationalNumber(r,{country:void 0,callingCode:void 0}),!0}}},{key:"fixMissingPlus",value:function(r){if(!r.international){var n=i$(r.digits,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata),i=n.countryCallingCode;if(n.number,i)return r.update({missingPlus:!0}),this.startInternationalNumber(r,{country:r.country,callingCode:i}),!0}}},{key:"startInternationalNumber",value:function(r,n){var i=n.country,o=n.callingCode;r.startInternationalNumber(i,o),r.nationalSignificantNumber&&(r.resetNationalSignificantNumber(),this.onNationalSignificantNumberChange(),this.hasExtractedNationalSignificantNumber=void 0)}},{key:"extractCallingCodeAndNationalSignificantNumber",value:function(r){this.extractCountryCallingCode(r)&&this.extractNationalSignificantNumber(r.getNationalDigits(),function(n){return r.update(n)})}}]),e}();function yA(e){var t=e.search(hA);if(!(t<0)){e=e.slice(t);var r;return e[0]==="+"&&(r=!0,e=e.slice(1)),e=e.replace(pA,""),r&&(e="+"+e),e}}function gA(e){var t=yA(e)||"";return t[0]==="+"?[t.slice(1),!0]:[t]}function bA(e){var t=gA(e),r=s$(t,2),n=r[0],i=r[1];return fA.test(n)||(n=""),[n,i]}function Xf(e){return Xf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xf(e)}function $A(e,t){return SA(e)||xA(e,t)||_A(e,t)||wA()}function wA(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3581
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _A(e,t){if(!!e){if(typeof e=="string")return Og(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Og(e,t)}}function Og(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function xA(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],i=!0,o=!1,a,s;try{for(r=r.call(e);!(i=(a=r.next()).done)&&(n.push(a.value),!(t&&n.length===t));i=!0);}catch(c){o=!0,s=c}finally{try{!i&&r.return!=null&&r.return()}finally{if(o)throw s}}return n}}function SA(e){if(Array.isArray(e))return e}function kA(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Cg(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function EA(e,t,r){return t&&Cg(e.prototype,t),r&&Cg(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var l$=function(){function e(t,r){kA(this,e),this.metadata=new bt(r);var n=this.getCountryAndCallingCode(t),i=$A(n,2),o=i[0],a=i[1];this.defaultCountry=o,this.defaultCallingCode=a,this.reset()}return EA(e,[{key:"getCountryAndCallingCode",value:function(r){var n,i;return r&&(Xf(r)==="object"?(n=r.defaultCountry,i=r.defaultCallingCode):n=r),n&&!this.metadata.hasCountry(n)&&(n=void 0),[n,i]}},{key:"input",value:function(r){var n=this.parser.input(r,this.state),i=n.digits,o=n.justLeadingPlus;if(o)this.formattedOutput="+";else if(i){this.determineTheCountryIfNeeded(),this.state.nationalSignificantNumber&&this.formatter.narrowDownMatchingFormats(this.state);var a;if(this.metadata.hasSelectedNumberingPlan()&&(a=this.formatter.format(i,this.state)),a===void 0&&this.parser.reExtractNationalSignificantNumber(this.state)){this.determineTheCountryIfNeeded();var s=this.state.getNationalDigits();s&&(a=this.formatter.format(s,this.state))}this.formattedOutput=a?this.getFullNumber(a):this.getNonFormattedNumber()}return this.formattedOutput}},{key:"reset",value:function(){var r=this;return this.state=new TI({onCountryChange:function(i){r.country=i},onCallingCodeChange:function(i,o){r.metadata.selectNumberingPlan(o,i),r.formatter.reset(r.metadata.numberingPlan,r.state),r.parser.reset(r.metadata.numberingPlan)}}),this.formatter=new iA({state:this.state,metadata:this.metadata}),this.parser=new vA({defaultCountry:this.defaultCountry,defaultCallingCode:this.defaultCallingCode,metadata:this.metadata,state:this.state,onNationalSignificantNumberChange:function(){r.determineTheCountryIfNeeded(),r.formatter.reset(r.metadata.numberingPlan,r.state)}}),this.state.reset({country:this.defaultCountry,callingCode:this.defaultCallingCode}),this.formattedOutput="",this}},{key:"isInternational",value:function(){return this.state.international}},{key:"getCallingCode",value:function(){if(this.isInternational())return this.state.callingCode}},{key:"getCountryCallingCode",value:function(){return this.getCallingCode()}},{key:"getCountry",value:function(){var r=this.state.digits;if(r)return this._getCountry()}},{key:"_getCountry",value:function(){var r=this.state.country;return r}},{key:"determineTheCountryIfNeeded",value:function(){(!this.state.country||this.isCountryCallingCodeAmbiguous())&&this.determineTheCountry()}},{key:"getFullNumber",value:function(r){var n=this;if(this.isInternational()){var i=function(s){return n.formatter.getInternationalPrefixBeforeCountryCallingCode(n.state,{spacing:!!s})+s},o=this.state.callingCode;return i(o?r?"".concat(o," ").concat(r):o:"".concat(this.state.getDigitsWithoutInternationalPrefix()))}return r}},{key:"getNonFormattedNationalNumberWithPrefix",value:function(){var r=this.state,n=r.nationalSignificantNumber,i=r.complexPrefixBeforeNationalSignificantNumber,o=r.nationalPrefix,a=n,s=i||o;return s&&(a=s+a),a}},{key:"getNonFormattedNumber",value:function(){var r=this.state.nationalSignificantNumberMatchesInput;return this.getFullNumber(r?this.getNonFormattedNationalNumberWithPrefix():this.state.getNationalDigits())}},{key:"getNonFormattedTemplate",value:function(){var r=this.getNonFormattedNumber();if(r)return r.replace(/[\+\d]/g,er)}},{key:"isCountryCallingCodeAmbiguous",value:function(){var r=this.state.callingCode,n=this.metadata.getCountryCodesForCallingCode(r);return n&&n.length>1}},{key:"determineTheCountry",value:function(){this.state.setCountry(a$(this.isInternational()?this.state.callingCode:this.defaultCallingCode,this.state.nationalSignificantNumber,this.metadata))}},{key:"getNumberValue",value:function(){var r=this.state,n=r.digits,i=r.callingCode,o=r.country,a=r.nationalSignificantNumber;if(!!n){if(this.isInternational())return i?"+"+i+a:"+"+n;if(o||i){var s=o?this.metadata.countryCallingCode():i;return"+"+s+a}}}},{key:"getNumber",value:function(){var r=this.state,n=r.nationalSignificantNumber,i=r.carrierCode,o=r.callingCode,a=this._getCountry();if(!!n&&!(!a&&!o)){var s=new r$(a||o,n,this.metadata.metadata);return i&&(s.carrierCode=i),s}}},{key:"isPossible",value:function(){var r=this.getNumber();return r?r.isPossible():!1}},{key:"isValid",value:function(){var r=this.getNumber();return r?r.isValid():!1}},{key:"getNationalNumber",value:function(){return this.state.nationalSignificantNumber}},{key:"getChars",value:function(){return(this.state.international?"+":"")+this.state.digits}},{key:"getTemplate",value:function(){return this.formatter.getTemplate(this.state)||this.getNonFormattedTemplate()||""}}]),e}();function yu(){return BT(kI,arguments)}function Tl(e){return l$.call(this,e,B2)}Tl.prototype=Object.create(l$.prototype,{});Tl.prototype.constructor=Tl;const OA=`.input::part(base){border-radius:var(--photon-border-radius, .5rem)}.invalid::part(base){--tw-border-opacity: 1;border-color:rgb(239 68 68/var(--tw-border-opacity));border-width:2px}.invalid::part(form-control-help-text){--tw-text-opacity: 1;color:rgb(239 68 68/var(--tw-text-opacity))}
3582
- `,ba=C("<style></style>"),CA=C('<div class="py-2 flex flex-col font-sans"><sl-input class="input" type="tel" placeholder="( ) ___-____"><p slot="help-text" class="text-red-500 pt-2 h-[21px] font-sans"></p></sl-input></div>'),PA=C('<div class="flex items-center pb-2"><p class="text-gray-700 text-sm"></p></div>'),TA=C('<p class="pl-1 text-red-500">*</p>');it("https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.0.0-beta.82/dist/");$e("photon-phone-input",{label:void 0,required:!1,value:void 0,invalid:!1,helpText:void 0,disabled:!1},e=>{let t;const r=n=>{const i=new CustomEvent("photon-phone-changed",{composed:!0,bubbles:!0,detail:{phone:n}});t?.dispatchEvent(i)};return Tt(()=>{e.value&&r(yu(e.value,"US").format("E.164"))}),[(()=>{const n=ba.cloneNode(!0);return w(n,ze),n})(),(()=>{const n=ba.cloneNode(!0);return w(n,Vt),n})(),(()=>{const n=ba.cloneNode(!0);return w(n,Ut),n})(),(()=>{const n=ba.cloneNode(!0);return w(n,OA),n})(),(()=>{const n=V(()=>document.importNode(CA,!0)),i=n.firstChild,o=i.firstChild,a=t;return typeof a=="function"?ee(a,n):t=n,w(n,(()=>{const s=pe(()=>!!e.label);return()=>s()?(()=>{const c=PA.cloneNode(!0),l=c.firstChild;return w(l,()=>e.label),w(c,(()=>{const u=pe(()=>!!e.required);return()=>u()?TA.cloneNode(!0):null})(),null),c})():null})(),i),i.addEventListener("sl-input",s=>{r(yu(s.target.value,"US").format("E.164"))}),i._$owner=P(),w(o,()=>e.helpText),W(s=>{const c=!!e.invalid,l=e.disabled,u=e.invalid;return c!==s._v$&&i.classList.toggle("invalid",s._v$=c),l!==s._v$2&&(i.disabled=s._v$2=l),u!==s._v$3&&(i.invalid=s._v$3=u),s},{_v$:void 0,_v$2:void 0,_v$3:void 0}),W(()=>i.value=e.value?new Tl("US").input(yu(e.value,"US").formatNational()):""),n})()]});const NA=`.input::part(base){border-radius:var(--photon-border-radius, .5rem)}.invalid::part(base){--tw-border-opacity: 1;border-color:rgb(239 68 68/var(--tw-border-opacity));border-width:2px}.invalid::part(form-control-help-text){--tw-text-opacity: 1;color:rgb(239 68 68/var(--tw-text-opacity))}
3583
- `,IA=C("<div><style></style><style></style></div>"),Zf=[{id:"1",name:"MALE"},{id:"2",name:"FEMALE"},{id:"3",name:"UNKNOWN"}];$e("photon-sex-input",{label:void 0,required:!1,value:void 0,invalid:!1,helpText:void 0,disabled:!1,selected:void 0},e=>{let t;const r=n=>{const i=new CustomEvent("photon-sex-selected",{composed:!0,bubbles:!0,detail:{sex:n}});t?.dispatchEvent(i)};return(()=>{const n=IA.cloneNode(!0),i=n.firstChild,o=i.nextSibling,a=t;return typeof a=="function"?ee(a,n):t=n,n.addEventListener("photon-data-selected",s=>{r(s.detail.data.name)}),w(i,ze),w(o,NA),w(n,U(Nt,{data:Zf,get label(){return e.label},get required(){return e.required},placeholder:"",get disabled(){return e.disabled},get invalid(){return e.invalid},isLoading:!1,hasMore:!1,displayAccessor:s=>s.name,showOverflow:!0,noDataMsg:"",optional:!1,get helpText(){return e.helpText},get selectedData(){return Zf.filter(s=>s.name.toUpperCase()===e.selected)?.[0]}}),null),n})()});const AA=`.input::part(base){border-radius:var(--photon-border-radius, .5rem)}.invalid::part(base){--tw-border-opacity: 1;border-color:rgb(239 68 68/var(--tw-border-opacity));border-width:2px}.invalid::part(form-control-help-text){--tw-text-opacity: 1;color:rgb(239 68 68/var(--tw-text-opacity))}
3584
- `,DA=C("<div><style></style><style></style></div>"),gu=[{id:"1",name:"Male/Man"},{id:"2",name:"Female/Woman"},{id:"3",name:"TransMale/TransMan"},{id:"4",name:"TransFemale/TransWoman"},{id:"5",name:"Genderqueery/Gender nonconforming"},{id:"6",name:"Something else"},{id:"7",name:"Decline to answer"}];$e("photon-gender-input",{label:void 0,required:!1,value:void 0,invalid:!1,helpText:void 0,disabled:!1,selected:void 0},e=>{const[t,r]=L("");let n;const i=s=>s.length===0?gu:gu.filter(c=>c.name.toLowerCase().includes(s.toLowerCase())),o=s=>{const c=new CustomEvent("photon-gender-selected",{composed:!0,bubbles:!0,detail:{gender:s}});n?.dispatchEvent(c)},a=()=>{const s=new CustomEvent("photon-gender-deselected",{composed:!0,bubbles:!0,detail:{}});n?.dispatchEvent(s)};return(()=>{const s=DA.cloneNode(!0),c=s.firstChild,l=c.nextSibling,u=n;return typeof u=="function"?ee(u,s):n=s,s.addEventListener("photon-data-selected",d=>{o(d.detail.data.name)}),s.addEventListener("photon-data-unselected",d=>{a()}),w(c,ze),w(l,AA),w(s,U(Nt,{get data(){return i(t())},get label(){return e.label},get required(){return e.required},placeholder:"",get disabled(){return e.disabled},get invalid(){return e.invalid},isLoading:!1,hasMore:!1,displayAccessor:d=>d.name,showOverflow:!0,onSearchChange:async d=>{r(d)},onHide:async()=>{r("")},noDataMsg:"",get optional(){return!e.required},get helpText(){return e.helpText},get selectedData(){return gu.filter(d=>d.name===e.selected)?.[0]}}),null),s})()});const RA=C('<div class="flex align-center justify-center h-screen"><sl-spinner style="font-size: 3rem;" class="mt-8"></sl-spinner></div>'),FA=C('<photon-card title="Personal"><div class="flex flex-col xs:flex-row xs:gap-4"><photon-text-input class="flex-grow min-w-[40%]" debounce-time="0" label="First Name"></photon-text-input><photon-text-input class="min-w-[48%]" debounce-time="0" label="Last Name"></photon-text-input></div><div class="flex flex-col xs:flex-row items-center xs:gap-4"><photon-datepicker class="pb-3 flex-grow w-full xs:min-w-[40%]" label="Date of Birth"></photon-datepicker><photon-phone-input class="w-full xs:min-w-[48%]" label="Phone Number"></photon-phone-input></div><div class="flex flex-col xs:flex-row justify-between xs:gap-4"><div class="flex-grow w-full xs:min-w-[40%]"><photon-gender-input label="Gender" required="false"></photon-gender-input></div><div class="flex-grow w-full xs:min-w-[40%]"><photon-sex-input label="Sex at Birth" required="false"></photon-sex-input></div></div><photon-text-input debounce-time="0" label="Email"></photon-text-input><hr class="py-2"><p class="font-sans text-lg flex-grow">Address</p><photon-text-input debounce-time="0" label="Street 1"></photon-text-input><photon-text-input debounce-time="0" label="Street 2"></photon-text-input><photon-text-input debounce-time="0" label="City"></photon-text-input><div class="flex gap-4 pb-5 xs:pb-2"><photon-state-input class="flex-grow min-w-[40%]" label="State" required="false"></photon-state-input><photon-text-input debounce-time="0" class="flex-grow min-w-[40%]" label="Zip Code"></photon-text-input></div><hr class="py-2"><p class="font-sans text-lg flex-grow">Preferred Local Pharmacy</p><photon-pharmacy-search></photon-pharmacy-search></photon-card>'),LA=C('<div class="w-full h-full relative"><style></style><style></style><style></style></div>');it("https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.0.0-beta.82/dist/");const MA=(e,t)=>{const r=e.selectedPatient.data?.address;return t.address_zip?.value&&G$(t.address_zip?.value)&&t.address_zip?.value!=r?.postalCode?t.address_zip?.value:r?`${r.street1} ${r.street2??""} ${r.city}, ${r.state} ${r.postalCode}`:""};$e("photon-patient-form",{patientId:""},({patientId:e})=>{let t;const r=at(),{store:n,actions:i}=Jh,{actions:o}=V2,{store:a,actions:s}=k2({firstName:void 0,lastName:void 0,dateOfBirth:void 0,phone:void 0,gender:void 0,sex:void 0,email:void 0,address_street1:void 0,address_street2:void 0,address_city:void 0,address_state:void 0,address_zip:void 0,preferredPharmacy:void 0});s.registerValidator({key:"firstName",validator:nt(Nr(jt(),1,1/0),"Please enter a first name...")}),s.registerValidator({key:"lastName",validator:nt(Nr(jt(),1,1/0),"Please enter a last name...")}),s.registerValidator({key:"sex",validator:nt(d7(Zf.map(l=>l.name)),"Please enter Sex at Birth...")}),s.registerValidator({key:"phone",validator:nt(Nr(jt(),12),"Please enter a valid phone number...")}),s.registerValidator({key:"email",validator:nt(kv([eP(),Uy()]),"Please enter a valid email...")}),s.registerValidator({key:"address_zip",validator:nt(kv([Nr(JC(),0,10),Uy()]),"Please enter a valid zip code...")}),Tt(()=>{e&&i.getSelectedPatient(r.getSDK(),e)});const c=l=>{const u=new CustomEvent("photon-form-updated",{composed:!0,bubbles:!0,detail:{form:l,actions:s,selected:n,reset:()=>{s.reset(),i.reset(),o.reset()}}});t?.dispatchEvent(u)};return xe(()=>{n.selectedPatient.data&&(s.updateFormValue({key:"firstName",value:n.selectedPatient.data.name.first}),s.updateFormValue({key:"lastName",value:n.selectedPatient.data.name.last}),s.updateFormValue({key:"phone",value:n.selectedPatient.data.phone}),s.updateFormValue({key:"gender",value:n.selectedPatient.data.gender}),s.updateFormValue({key:"sex",value:n.selectedPatient.data.sex}),s.updateFormValue({key:"email",value:n.selectedPatient.data.email}),s.updateFormValue({key:"address_street1",value:n.selectedPatient.data.address?.street1}),s.updateFormValue({key:"address_street2",value:n.selectedPatient.data.address?.street2}),s.updateFormValue({key:"address_city",value:n.selectedPatient.data.address?.city}),s.updateFormValue({key:"address_state",value:n.selectedPatient.data.address?.state}),s.updateFormValue({key:"address_zip",value:n.selectedPatient.data.address?.postalCode}),s.updateFormValue({key:"preferredPharmacy",value:n.selectedPatient.data.preferredPharmacies?.[0]?.id}))}),xe(()=>{c(a)}),(()=>{const l=LA.cloneNode(!0),u=l.firstChild,d=u.nextSibling,f=d.nextSibling,h=t;return typeof h=="function"?ee(h,l):t=l,w(u,ze),w(d,Vt),w(f,Ut),w(l,U(re,{get when(){return n.selectedPatient.isLoading},get children(){const p=V(()=>document.importNode(RA,!0)),m=p.firstChild;return m._$owner=P(),p}}),null),w(l,U(re,{get when(){return!n.selectedPatient.isLoading},get children(){const p=V(()=>document.importNode(FA,!0)),m=p.firstChild,v=m.firstChild,y=v.nextSibling,b=m.nextSibling,g=b.firstChild,_=g.nextSibling,S=b.nextSibling,E=S.firstChild,x=E.firstChild,N=E.nextSibling,M=N.firstChild,j=S.nextSibling,q=j.nextSibling,A=q.nextSibling,T=A.nextSibling,F=T.nextSibling,z=F.nextSibling,Y=z.nextSibling,ne=Y.firstChild,ae=ne.nextSibling,R=Y.nextSibling,ge=R.nextSibling,_e=ge.nextSibling;return p._$owner=P(),v.disabled=!!e,v.addEventListener("photon-input-changed",async D=>{s.updateFormValue({key:"firstName",value:D.detail.input})}),v._$owner=P(),y.disabled=!!e,y.addEventListener("photon-input-changed",async D=>{s.updateFormValue({key:"lastName",value:D.detail.input})}),y._$owner=P(),g.disabled=!!e,g.addEventListener("photon-datepicker-selected",async D=>{s.updateFormValue({key:"dateOfBirth",value:D.detail.date})}),g._$owner=P(),_.addEventListener("photon-phone-changed",async D=>{s.updateFormValue({key:"phone",value:D.detail.phone})}),_._$owner=P(),x.addEventListener("photon-gender-selected",D=>{s.updateFormValue({key:"gender",value:D.detail.gender})}),x.addEventListener("photon-gender-deselected",D=>{s.updateFormValue({key:"gender",value:void 0})}),x._$owner=P(),M.disabled=!!e,M.addEventListener("photon-sex-selected",D=>{s.updateFormValue({key:"sex",value:D.detail.sex})}),M.addEventListener("photon-sex-deselected",D=>{s.updateFormValue({key:"sex",value:void 0})}),M._$owner=P(),j.addEventListener("photon-input-changed",async D=>{s.updateFormValue({key:"email",value:D.detail.input})}),j._$owner=P(),T.addEventListener("photon-input-changed",async D=>{s.updateFormValue({key:"address_street1",value:D.detail.input})}),T._$owner=P(),F.optional=!0,F.addEventListener("photon-input-changed",async D=>{s.updateFormValue({key:"address_street2",value:D.detail.input})}),F._$owner=P(),z.addEventListener("photon-input-changed",async D=>{s.updateFormValue({key:"address_city",value:D.detail.input})}),z._$owner=P(),ne.addEventListener("photon-state-selected",D=>{s.updateFormValue({key:"address_state",value:D.detail.state})}),ne._$owner=P(),ae.addEventListener("photon-input-changed",async D=>{s.updateFormValue({key:"address_zip",value:D.detail.input})}),ae._$owner=P(),_e.addEventListener("photon-pharmacy-selected",D=>{s.updateFormValue({key:"preferredPharmacy",value:D.detail.pharmacy.id})}),_e.patientId=e,_e._$owner=P(),W(D=>{const xt=a.firstName?.error,St=a.firstName?.error,Mt=a.lastName?.error,It=a.lastName?.error,G=a.dateOfBirth?.error,K=a.dateOfBirth?.error,X=a.phone?.error,ie=a.phone?.error,ue=a.gender?.error,de=a.gender?.error!==void 0,Ue=n.selectedPatient.data?.gender,Me=a.sex?.error,st=a.sex?.error!==void 0,dr=n.selectedPatient.data?.sex,gn=a.email?.error,Vr=a.email?.error,Ze=a.address_street1?.error,qi=a.address_street1?.error,cp=a.address_street2?.error,up=a.address_street2?.error,dp=a.address_city?.error,fp=a.address_city?.error,hp=a.address_state?.error,pp=a.address_state?.error!==void 0,mp=a.state?.value??n.selectedPatient.data?.address?.state,vp=a.address_zip?.error,yp=a.address_zip?.error,gp=MA(n,a),bp=n.selectedPatient.data?.preferredPharmacies?.[0]?.id;return xt!==D._v$&&(v.invalid=D._v$=xt),St!==D._v$2&&(v.helpText=D._v$2=St),Mt!==D._v$3&&(y.invalid=D._v$3=Mt),It!==D._v$4&&(y.helpText=D._v$4=It),G!==D._v$5&&(g.invalid=D._v$5=G),K!==D._v$6&&(g.helpText=D._v$6=K),X!==D._v$7&&(_.invalid=D._v$7=X),ie!==D._v$8&&(_.helpText=D._v$8=ie),ue!==D._v$9&&(x.helpText=D._v$9=ue),de!==D._v$10&&(x.invalid=D._v$10=de),Ue!==D._v$11&&(x.selected=D._v$11=Ue),Me!==D._v$12&&(M.helpText=D._v$12=Me),st!==D._v$13&&(M.invalid=D._v$13=st),dr!==D._v$14&&(M.selected=D._v$14=dr),gn!==D._v$15&&(j.invalid=D._v$15=gn),Vr!==D._v$16&&(j.helpText=D._v$16=Vr),Ze!==D._v$17&&(T.invalid=D._v$17=Ze),qi!==D._v$18&&(T.helpText=D._v$18=qi),cp!==D._v$19&&(F.invalid=D._v$19=cp),up!==D._v$20&&(F.helpText=D._v$20=up),dp!==D._v$21&&(z.invalid=D._v$21=dp),fp!==D._v$22&&(z.helpText=D._v$22=fp),hp!==D._v$23&&(ne.helpText=D._v$23=hp),pp!==D._v$24&&(ne.invalid=D._v$24=pp),mp!==D._v$25&&(ne.selected=D._v$25=mp),vp!==D._v$26&&(ae.invalid=D._v$26=vp),yp!==D._v$27&&(ae.helpText=D._v$27=yp),gp!==D._v$28&&(_e.address=D._v$28=gp),bp!==D._v$29&&(_e.selected=D._v$29=bp),D},{_v$:void 0,_v$2:void 0,_v$3:void 0,_v$4:void 0,_v$5:void 0,_v$6:void 0,_v$7:void 0,_v$8:void 0,_v$9:void 0,_v$10:void 0,_v$11:void 0,_v$12:void 0,_v$13:void 0,_v$14:void 0,_v$15:void 0,_v$16:void 0,_v$17:void 0,_v$18:void 0,_v$19:void 0,_v$20:void 0,_v$21:void 0,_v$22:void 0,_v$23:void 0,_v$24:void 0,_v$25:void 0,_v$26:void 0,_v$27:void 0,_v$28:void 0,_v$29:void 0}),W(()=>v.value=a.firstName?.value??n.selectedPatient.data?.name.first),W(()=>y.value=a.lastName?.value??n.selectedPatient.data?.name.last),W(()=>g.value=a.dateOfBirth?.value??n.selectedPatient.data?.dateOfBirth),W(()=>_.value=a.phone?.value??n.selectedPatient.data?.phone),W(()=>j.value=a.email?.value??n.selectedPatient.data?.email),W(()=>T.value=a.address_street1?.value??n.selectedPatient.data?.address?.street1),W(()=>F.value=a.address_street2?.value??n.selectedPatient.data?.address?.street2),W(()=>z.value=a.address_city?.value??n.selectedPatient.data?.address?.city),W(()=>ae.value=a.address_zip?.value??n.selectedPatient.data?.address?.postalCode),p}}),null),l})()});const jA=`.input::part(base){border-radius:var(--photon-border-radius, .5rem)}.invalid::part(base){--tw-border-opacity: 1;border-color:rgb(239 68 68/var(--tw-border-opacity));border-width:2px}.invalid::part(form-control-help-text){--tw-text-opacity: 1;color:rgb(239 68 68/var(--tw-text-opacity))}
3585
- `,zA=C("<div><style></style><style></style></div>"),bu=[{id:"1",name:"AL"},{id:"2",name:"AK"},{id:"3",name:"AZ"},{id:"4",name:"AR"},{id:"5",name:"CA"},{id:"6",name:"CO"},{id:"7",name:"CT"},{id:"8",name:"DE"},{id:"9",name:"DC"},{id:"10",name:"FL"},{id:"11",name:"GA"},{id:"12",name:"HI"},{id:"13",name:"ID"},{id:"14",name:"IL"},{id:"15",name:"IN"},{id:"16",name:"IA"},{id:"17",name:"KS"},{id:"18",name:"KY"},{id:"19",name:"LA"},{id:"20",name:"ME"},{id:"21",name:"MD"},{id:"22",name:"MA"},{id:"23",name:"MI"},{id:"24",name:"MN"},{id:"25",name:"MS"},{id:"26",name:"MO"},{id:"27",name:"MT"},{id:"28",name:"NB"},{id:"29",name:"NV"},{id:"30",name:"NH"},{id:"31",name:"NJ"},{id:"32",name:"NM"},{id:"33",name:"NY"},{id:"34",name:"NC"},{id:"35",name:"ND"},{id:"36",name:"OH"},{id:"37",name:"OK"},{id:"38",name:"OR"},{id:"39",name:"PA"},{id:"40",name:"PR"},{id:"41",name:"RI"},{id:"42",name:"SC"},{id:"43",name:"SD"},{id:"44",name:"TN"},{id:"45",name:"TX"},{id:"46",name:"UT"},{id:"47",name:"VT"},{id:"48",name:"VA"},{id:"49",name:"WA"},{id:"50",name:"WV"},{id:"51",name:"WI"},{id:"52",name:"WY"}];$e("photon-state-input",{label:void 0,required:!1,value:void 0,invalid:!1,helpText:void 0,disabled:!1,selected:void 0},e=>{const[t,r]=L("");let n;const i=a=>{const s=new CustomEvent("photon-state-selected",{composed:!0,bubbles:!0,detail:{state:a}});n?.dispatchEvent(s)},o=a=>a.length===0?bu:bu.filter(s=>s.name.toLowerCase().includes(a.toLowerCase()));return(()=>{const a=zA.cloneNode(!0),s=a.firstChild,c=s.nextSibling,l=n;return typeof l=="function"?ee(l,a):n=a,a.addEventListener("photon-data-selected",u=>{i(u.detail.data.name)}),w(s,ze),w(c,jA),w(a,U(Nt,{get data(){return o(t())},get label(){return e.label},get required(){return e.required},placeholder:"",get disabled(){return e.disabled},get invalid(){return e.invalid},isLoading:!1,hasMore:!1,displayAccessor:u=>u.name,showOverflow:!0,onSearchChange:async u=>{r(u)},onHide:async()=>{r("")},noDataMsg:"",optional:!1,get helpText(){return e.helpText},get selectedData(){return bu.filter(u=>u.name===e.selected)?.[0]}}),null),a})()});const UA=C("<sl-icon></sl-icon>"),VA=C('<div class="flex-1 flex justify-end"></div>'),BA=C('<div class="absolute top-0 left-0 w-full z-10"><style></style><photon-dialog confirm-text="Yes, Close" cancel-text="Keep Editing"><p class="font-sans text-lg xs:text-base"></p></photon-dialog><div class="flex items-center px-4 py-2 md:px-8 md:py-3 bg-white fixed w-full z-10 shadow-card"><div class="md:w-1/3 flex justify-start"><photon-button class="close-button" variant="naked"><div class="text-black text-3xl"><sl-icon name="x"></sl-icon></div></photon-button></div><div class="w-full md:w-2/3 flex flex-col md:flex-row"><div class="mb-2 md:mb-0 flex-1 flex justify-end md:justify-center items-center"><p class="ml-1 font-sans text-xl font-medium"></p></div></div></div><div class="w-full h-full bg-[#f7f4f4] pt-28 xs:pt-28 lg:pt-20"><div class="pt-4 pb-52 px-4 w-full h-full sm:w-[600px] xs:mx-auto"></div></div></div>'),c$=({closeTitle:e="Lose unsaved changes?",closeBody:t="You will not be able to recover unsaved changes.",headerRight:r,title:n,titleIconName:i,form:o,onClosed:a,checkShouldWarn:s=()=>!1})=>{let c;const[l,u]=L(!1);return(()=>{const d=V(()=>document.importNode(BA,!0)),f=d.firstChild,h=f.nextSibling,p=h.firstChild,m=h.nextSibling,v=m.firstChild,y=v.firstChild,b=y.firstChild,g=b.firstChild,_=v.nextSibling,S=_.firstChild,E=S.firstChild,x=m.nextSibling,N=x.firstChild,M=c;return typeof M=="function"?ee(M,d):c=d,w(f,ze),h.label=e,h.addEventListener("photon-dialog-confirmed",()=>{u(!1),a()}),h.addEventListener("photon-dialog-canceled",()=>{u(!1)}),h._$owner=P(),w(p,t),y.addEventListener("click",()=>{s()?u(!0):a()}),y._$owner=P(),g.style.setProperty("display","block"),g._$owner=P(),w(S,U(re,{when:i,get children(){const j=V(()=>document.importNode(UA,!0));return j.name=i,j._$owner=P(),j}}),E),w(E,n),w(_,U(re,{when:r,get children(){const j=VA.cloneNode(!0);return w(j,r),j}}),null),w(N,o),W(()=>h.open=l()),d})()},WA=C("<div></div>"),qA=C('<div class="flex space-x-2"><photon-button size="sm" variant="outline">Save and Create Prescription</photon-button><photon-button size="sm">Save</photon-button></div>'),HA=C('<photon-patient-form slot="form"></photon-patient-form>');$e("photon-patient-dialog",{patientId:"",open:!1},e=>{let t;const r=at(),[n,i]=L(!1),[o,a]=L(void 0),[s,c]=L(void 0),[l,u]=L(void 0),d=(m,v=!1)=>{const y=new CustomEvent("photon-patient-updated",{composed:!0,bubbles:!0,detail:{patientId:m,createPrescription:v}});t?.dispatchEvent(y)},f=(m,v=!1)=>{const y=new CustomEvent("photon-patient-created",{composed:!0,bubbles:!0,detail:{patientId:m,createPrescription:v}});t?.dispatchEvent(y)},h=()=>{const m=new CustomEvent("photon-patient-closed",{composed:!0,bubbles:!0,detail:{}});t?.dispatchEvent(m)},p=async(m,v,y,b=!1)=>{i(!0);let g=["firstName","lastName","phone","sex","email"];if(m.address_street1?.value!==void 0||m.address_city?.value!==void 0||m.address_state?.value!==void 0||m.address_zip?.value!==void 0)v.registerValidator({key:"address_street1",validator:nt(Nr(jt(),1,1/0),"Please enter a valid Street 1..")}),v.registerValidator({key:"address_city",validator:nt(Nr(jt(),1,1/0),"Please enter a valid City..")}),v.registerValidator({key:"address_state",validator:nt(Nr(jt(),2,2),"Please enter a valid State..")}),g=[...g,"address_zip","address_street1","address_city","address_state"];else{const S=["address_street1","address_city","address_state"];for(const E of S)v.unRegisterValidator(E)}if(v.validate(g),v.hasErrors(g))return i(!1),!0;m.preferredPharmacy.value&&y.selectedPatient.data?.preferredPharmacies&&y.selectedPatient.data?.preferredPharmacies.length!==0&&!y.selectedPatient.data?.preferredPharmacies?.map(S=>S?.id).filter(S=>S!==null).includes(m.preferredPharmacy.value)&&await r.getSDK().clinical.patient.removePatientPreferredPharmacy({})({variables:{patientId:e.patientId,pharmacyId:y.selectedPatient.data?.preferredPharmacies[0].id},awaitRefetchQueries:!1});const _={...e?.patientId?{id:e.patientId}:{},name:{first:m.firstName.value,last:m.lastName.value},gender:m.gender.value,email:m.email.value,phone:m.phone.value,dateOfBirth:m.dateOfBirth.value,sex:m.sex.value,address:m.address_street1.value!==void 0?{street1:m.address_street1.value,street2:m.address_street2.value,city:m.address_city.value,state:m.address_state.value,postalCode:m.address_zip.value,country:"US"}:void 0,preferredPharmacies:m.preferredPharmacy.value?[m.preferredPharmacy.value]:[]};if(e?.patientId)await r.getSDK().clinical.patient.updatePatient({})({variables:_,awaitRefetchQueries:!1}),d(e.patientId,b);else{const E=await r.getSDK().clinical.patient.createPatient({})({variables:_,awaitRefetchQueries:!1});f(E?.data?.createPatient?.id||"",b)}i(!1),v.resetStores(),e.open=!1};return(()=>{const m=WA.cloneNode(!0),v=t;return typeof v=="function"?ee(v,m):t=m,w(m,U(re,{get when(){return e.open},get children(){return U(c$,{onClosed:()=>{h(),l().resetStores(),e.open=!1},get title(){return e?.patientId?"Update Patient":"Create Patient"},get titleIconName(){return e?.patientId?"pencil-square":"person-plus"},get headerRight(){return(()=>{const y=V(()=>document.importNode(qA,!0)),b=y.firstChild,g=b.nextSibling;return b.$$click=()=>p(o(),l(),s(),!0),b._$owner=P(),g.$$click=()=>p(o(),l(),s(),!1),g._$owner=P(),W(_=>{const S=n(),E=n(),x=n(),N=n();return S!==_._v$&&(b.disabled=_._v$=S),E!==_._v$2&&(b.loading=_._v$2=E),x!==_._v$3&&(g.disabled=_._v$3=x),N!==_._v$4&&(g.loading=_._v$4=N),_},{_v$:void 0,_v$2:void 0,_v$3:void 0,_v$4:void 0}),y})()},get form(){return(()=>{const y=V(()=>document.importNode(HA,!0));return y.addEventListener("photon-form-updated",b=>{a(b.detail.form),u(Object.assign({},b.detail.actions,{resetStores:b.detail.reset})),c(b.detail.selected)}),y._$owner=P(),W(()=>y.patientId=e.patientId),y})()}})}})),m})()});Ni(["click"]);const GA=C("<photon-patient-dialog></photon-patient-dialog>");$e("photon-update-patient-dialog",{patientId:"",open:!1},e=>(console.warn("photon-update-patient-dialog will be deprecated soon. Please use photon-patient-dialog instead."),(()=>{const t=V(()=>document.importNode(GA,!0));return t._$owner=P(),W(r=>{const n=e.patientId,i=e.open;return n!==r._v$&&(t.patientId=r._v$=n),i!==r._v$2&&(t.open=r._v$2=i),r},{_v$:void 0,_v$2:void 0}),t})()));const QA=C('<div class="w-full"></div>'),KA=()=>{let e;const t=at(),[r,n]=L(!1),[i,o]=L(""),[a,s]=L(),[c,l]=L([]),u=d=>{const f=new CustomEvent("photon-name-selected",{composed:!0,bubbles:!0,detail:{medicationId:d}});e?.dispatchEvent(f)};return xe(async()=>{i().length>0&&(n(!0),V(async()=>{const d=String(Math.random());s(d);const{data:f}=await t.getSDK().clinical.searchMedication.getConcepts({name:i()});d===a()&&l(f.medicationConcepts??[]),n(!1)}))},[i]),(()=>{const d=QA.cloneNode(!0),f=e;return typeof f=="function"?ee(f,d):e=d,d.addEventListener("photon-data-selected",h=>{u(h.detail.data.id)}),w(d,U(Nt,{get data(){return c()},label:"Medication Name",placeholder:"Enter a medication name...",get isLoading(){return r()},hasMore:!1,displayAccessor:h=>h.name,onSearchChange:async h=>o(h),onHide:async()=>{o("")},noDataMsg:"No medications found",required:!1})),d})()},YA=C('<div class="w-full"></div>'),XA=e=>{const t=at(),[r,n]=L(),[i,o]=L(!1),[a]=L(""),[s,c]=L([]),l=h=>{const p=new CustomEvent("photon-strength-selected",{composed:!0,bubbles:!0,detail:{strengthId:h}});f?.dispatchEvent(p)},u=()=>{const h=new CustomEvent("photon-strength-deselected",{composed:!0,bubbles:!0,detail:{}});f?.dispatchEvent(h)};xe(async()=>{d.clear(),e.medicationId.length>0&&(o(!0),V(async()=>{const h=String(Math.random());n(h);const{data:p}=await t.getSDK().clinical.searchMedication.getStrengths({id:e.medicationId});h===r()&&c(p.medicationStrengths??[]),o(!1)}))},[e.medicationId]);const d={};let f;return(()=>{const h=YA.cloneNode(!0),p=f;return typeof p=="function"?ee(p,h):f=h,h.addEventListener("photon-data-selected",m=>{l(m.detail.data.id)}),h.addEventListener("photon-data-unselected",()=>{u()}),w(h,U(Nt,{actionRef:d,get data(){return s()},label:"Strength",get disabled(){return e.disabled},placeholder:"Select a strength...",get isLoading(){return i()},hasMore:!1,displayAccessor:m=>m.name,onSearchChange:async m=>a(m),onHide:async()=>{a("")},noDataMsg:"No strengths found",required:!1})),h})()},ZA=C('<div class="w-full"></div>'),JA=e=>{const t=at(),[r,n]=L(),[i,o]=L(!1),[a]=L(""),[s,c]=L([]),l=h=>{const p=new CustomEvent("photon-route-selected",{composed:!0,bubbles:!0,detail:{routeId:h}});f?.dispatchEvent(p)},u=()=>{const h=new CustomEvent("photon-route-deselected",{composed:!0,bubbles:!0,detail:{}});f?.dispatchEvent(h)};xe(async()=>{d.clear(),e.medicationId.length>0&&(o(!0),V(async()=>{const h=String(Math.random());n(h);const{data:p}=await t.getSDK().clinical.searchMedication.getRoutes({id:e.medicationId});h===r()&&c(p.medicationRoutes??[]),o(!1)}))},[e.medicationId]);const d={};let f;return(()=>{const h=ZA.cloneNode(!0),p=f;return typeof p=="function"?ee(p,h):f=h,h.addEventListener("photon-data-selected",m=>{l(m.detail.data.id)}),h.addEventListener("photon-data-unselected",()=>{u()}),w(h,U(Nt,{actionRef:d,get data(){return s()},label:"Route",get disabled(){return e.disabled},placeholder:"Select a route...",get isLoading(){return i()},hasMore:!1,displayAccessor:m=>m.name,onSearchChange:async m=>a(m),onHide:async()=>{a("")},noDataMsg:"No routes found",required:!1})),h})()},eD=C('<div class="w-full"></div>'),tD=e=>{const t=at(),[r,n]=L(!1),[i,o]=L(),[a]=L(""),[s,c]=L([]),l=h=>{const p=new CustomEvent("photon-form-selected",{composed:!0,bubbles:!0,detail:{formId:h}});f?.dispatchEvent(p)},u=()=>{const h=new CustomEvent("photon-form-deselected",{composed:!0,bubbles:!0,detail:{}});f?.dispatchEvent(h)};xe(async()=>{d.clear(),e.medicationId.length>0&&(n(!0),V(async()=>{const h=String(Math.random());o(h);const{data:p}=await t.getSDK().clinical.searchMedication.getForms({id:e.medicationId});h===i()&&c(p.medicationForms??[]),n(!1)}))},[e.medicationId]);const d={};let f;return(()=>{const h=eD.cloneNode(!0),p=f;return typeof p=="function"?ee(p,h):f=h,h.addEventListener("photon-data-selected",m=>{l(m.detail.data.id)}),h.addEventListener("photon-data-unselected",()=>{u()}),w(h,U(Nt,{actionRef:d,get data(){return s()},label:"Form",get disabled(){return e.disabled},placeholder:"Select a form...",get isLoading(){return r()},hasMore:!1,displayAccessor:m=>m.form,onSearchChange:async m=>a(m),onHide:async()=>{a("")},noDataMsg:"No forms found",required:!1})),h})()},rD=C('<photon-checkbox label="Add Medication to Catalog"></photon-checkbox>'),nD=C('<div><p class="font-sans text-lg text-gray-700 text-center pb-2">Advanced Medication Search</p><div class="flex flex-col xs:flex-row gap-4"></div><div class="flex flex-col xs:flex-row gap-4"></div><hr class="my-8"><p class="font-sans text-gray-700 pb-4">Select a medication:</p><div><photon-radio-group></photon-radio-group></div></div>'),iD=C("<photon-radio-card></photon-radio-card>");it("https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.0.0-beta.82/dist/");$e("photon-med-search",{},()=>{let e;const t=at(),[r,n]=L(""),[i,o]=L(""),[a,s]=L(""),[c,l]=L(""),[u,d]=L([]),[f,h]=L(!1),[p,m]=L(void 0),[v,y]=L(""),b=(g,_)=>{const S=new CustomEvent("photon-form-updated",{composed:!0,bubbles:!0,detail:{medication:g,addToCatalog:_,catalogId:v()}});e?.dispatchEvent(S)};return Tt(async()=>{const{data:g}=await t.getSDK().clinical.catalog.getCatalogs();g.catalogs.length>0&&y(g.catalogs[0].id)}),xe(()=>{const g=c()||a()||i()||r();g.length>0&&V(async()=>{const{data:_}=await t.getSDK().clinical.searchMedication.getProducts({id:g});h(!1),m(void 0),d(_.medicationProducts)})},[r,i,a,c]),xe(()=>{p()&&b(p(),f())},[p,f]),(()=>{const g=V(()=>document.importNode(nD,!0)),_=g.firstChild,S=_.nextSibling,E=S.nextSibling,x=E.nextSibling,N=x.nextSibling,M=N.nextSibling,j=M.firstChild,q=e;return typeof q=="function"?ee(q,g):e=g,g.addEventListener("photon-name-selected",A=>{n(A.detail.medicationId)}),g.addEventListener("photon-strength-selected",A=>{o(A.detail.strengthId)}),g.addEventListener("photon-strength-deselected",A=>{o("")}),g.addEventListener("photon-route-selected",A=>{s(A.detail.routeId)}),g.addEventListener("photon-route-deselected",A=>{s("")}),g.addEventListener("photon-form-selected",A=>{l(A.detail.formId)}),g.addEventListener("photon-form-deselected",A=>{l("")}),w(S,U(KA,{}),null),w(S,U(XA,{get medicationId(){return r()},get disabled(){return r().length==0}}),null),w(E,U(JA,{get medicationId(){return i()},get disabled(){return i().length==0}}),null),w(E,U(tD,{get medicationId(){return a()},get disabled(){return a().length==0}}),null),M.addEventListener("photon-option-selected",A=>{m(A.detail.value)}),j._$owner=P(),w(j,U(Rl,{get each(){return u().filter((A,T,F)=>{const z=F.findIndex(Y=>Y.name===A.name);if(T===z)return!0}).sort((A,T)=>A.name.toLowerCase()>T.name.toLowerCase()?-1:1)},children:A=>(()=>{const T=V(()=>document.importNode(iD,!0));return T.value=A,T._$owner=P(),w(T,()=>A.name),T})()})),w(g,U(re,{get when(){return v().length>0},get children(){const A=V(()=>document.importNode(rD,!0));return A.addEventListener("photon-checkbox-toggled",T=>h(T.detail.checked)),A._$owner=P(),W(()=>A.disabled=!p()),W(()=>A.checked=f()),A}}),null),g})()});var oD=ft`
3575
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function KI(e,t){if(!!e){if(typeof e=="string")return _g(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _g(e,t)}}function _g(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function YI(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xg(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function XI(e,t,r){return t&&xg(e.prototype,t),r&&xg(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var Xf="9",ZI=15,JI=ys(Xf,ZI),eA=/[- ]/,tA=function(){return/\[([^\[\]])*\]/g},rA=function(){return/\d(?=[^,}][^,}])/g},nA=new RegExp("["+or+"]*\\$1["+or+"]*(\\$\\d["+or+"]*)*$"),Sg=3,iA=function(){function e(t){t.state;var r=t.metadata;YI(this,e),this.metadata=r,this.resetFormat()}return XI(e,[{key:"resetFormat",value:function(){this.chosenFormat=void 0,this.template=void 0,this.nationalNumberTemplate=void 0,this.populatedNationalNumberTemplate=void 0,this.populatedNationalNumberTemplatePosition=-1}},{key:"reset",value:function(r,n){this.resetFormat(),r?(this.isNANP=r.callingCode()==="1",this.matchingFormats=r.formats(),n.nationalSignificantNumber&&this.narrowDownMatchingFormats(n)):(this.isNANP=void 0,this.matchingFormats=[])}},{key:"format",value:function(r,n){var i=this;if(FI(n.nationalSignificantNumber,this.metadata))for(var o=wg(this.matchingFormats),a;!(a=o()).done;){var s=a.value,c=RI(n,s,{metadata:this.metadata,shouldTryNationalPrefixFormattingRule:function(u){return i.shouldTryNationalPrefixFormattingRule(u,{international:n.international,nationalPrefix:n.nationalPrefix})},getSeparatorAfterNationalPrefix:function(u){return i.getSeparatorAfterNationalPrefix(u)}});if(c)return this.resetFormat(),this.chosenFormat=s,this.setNationalNumberTemplate(c.replace(/\d/g,er),n),this.populatedNationalNumberTemplate=c,this.populatedNationalNumberTemplatePosition=this.template.lastIndexOf(er),c}return this.formatNationalNumberWithNextDigits(r,n)}},{key:"formatNationalNumberWithNextDigits",value:function(r,n){var i=this.chosenFormat,o=this.chooseFormat(n);if(o)return o===i?this.formatNextNationalNumberDigits(r):this.formatNextNationalNumberDigits(n.getNationalDigits())}},{key:"narrowDownMatchingFormats",value:function(r){var n=this,i=r.nationalSignificantNumber,o=r.nationalPrefix,a=r.international,s=i,c=s.length-Sg;c<0&&(c=0),this.matchingFormats=this.matchingFormats.filter(function(l){return n.formatSuits(l,a,o)&&n.formatMatches(l,s,c)}),this.chosenFormat&&this.matchingFormats.indexOf(this.chosenFormat)===-1&&this.resetFormat()}},{key:"formatSuits",value:function(r,n,i){return!(i&&!r.usesNationalPrefix()&&!r.nationalPrefixIsOptionalWhenFormattingInNationalFormat()||!n&&!i&&r.nationalPrefixIsMandatoryWhenFormattingInNationalFormat())}},{key:"formatMatches",value:function(r,n,i){var o=r.leadingDigitsPatterns().length;if(o===0)return!0;i=Math.min(i,o-1);var a=r.leadingDigitsPatterns()[i];if(n.length<Sg)try{return new QI(a).match(n,{allowOverflow:!0})!==void 0}catch(s){return console.error(s),!0}return new RegExp("^(".concat(a,")")).test(n)}},{key:"getFormatFormat",value:function(r,n){return n?r.internationalFormat():r.format()}},{key:"chooseFormat",value:function(r){for(var n=this,i=function(){var l=a.value;return n.chosenFormat===l?"break":nA.test(n.getFormatFormat(l,r.international))?n.createTemplateForFormat(l,r)?(n.chosenFormat=l,"break"):(n.matchingFormats=n.matchingFormats.filter(function(u){return u!==l}),"continue"):"continue"},o=wg(this.matchingFormats.slice()),a;!(a=o()).done;){var s=i();if(s==="break")break}return this.chosenFormat||this.resetFormat(),this.chosenFormat}},{key:"createTemplateForFormat",value:function(r,n){if(!(r.pattern().indexOf("|")>=0)){var i=this.getTemplateForFormat(r,n);if(i)return this.setNationalNumberTemplate(i,n),!0}}},{key:"getSeparatorAfterNationalPrefix",value:function(r){return this.isNANP||r&&r.nationalPrefixFormattingRule()&&eA.test(r.nationalPrefixFormattingRule())?" ":""}},{key:"getInternationalPrefixBeforeCountryCallingCode",value:function(r,n){var i=r.IDDPrefix,o=r.missingPlus;return i?n&&n.spacing===!1?i:i+" ":o?"":"+"}},{key:"getTemplate",value:function(r){if(!!this.template){for(var n=-1,i=0,o=r.international?this.getInternationalPrefixBeforeCountryCallingCode(r,{spacing:!1}):"";i<o.length+r.getDigitsWithoutInternationalPrefix().length;)n=this.template.indexOf(er,n+1),i++;return mg(this.template,n+1)}}},{key:"setNationalNumberTemplate",value:function(r,n){this.nationalNumberTemplate=r,this.populatedNationalNumberTemplate=r,this.populatedNationalNumberTemplatePosition=-1,n.international?this.template=this.getInternationalPrefixBeforeCountryCallingCode(n).replace(/[\d\+]/g,er)+ys(er,n.callingCode.length)+" "+r:this.template=r}},{key:"getTemplateForFormat",value:function(r,n){var i=n.nationalSignificantNumber,o=n.international,a=n.nationalPrefix,s=n.complexPrefixBeforeNationalSignificantNumber,c=r.pattern();c=c.replace(tA(),"\\d").replace(rA(),"\\d");var l=JI.match(c)[0];if(!(i.length>l.length)){var u=new RegExp("^"+c+"$"),d=i.replace(/\d/g,Xf);u.test(d)&&(l=d);var f=this.getFormatFormat(r,o),h;if(this.shouldTryNationalPrefixFormattingRule(r,{international:o,nationalPrefix:a})){var p=f.replace(e$,r.nationalPrefixFormattingRule());if(Cl(r.nationalPrefixFormattingRule())===(a||"")+Cl("$1")&&(f=p,h=!0,a))for(var m=a.length;m>0;)f=f.replace(/\d/,er),m--}var v=l.replace(new RegExp(c),f).replace(new RegExp(Xf,"g"),er);return h||(s?v=ys(er,s.length)+" "+v:a&&(v=ys(er,a.length)+this.getSeparatorAfterNationalPrefix(r)+v)),o&&(v=J2(v)),v}}},{key:"formatNextNationalNumberDigits",value:function(r){var n=DI(this.populatedNationalNumberTemplate,this.populatedNationalNumberTemplatePosition,r);if(!n){this.resetFormat();return}return this.populatedNationalNumberTemplate=n[0],this.populatedNationalNumberTemplatePosition=n[1],mg(this.populatedNationalNumberTemplate,this.populatedNationalNumberTemplatePosition+1)}},{key:"shouldTryNationalPrefixFormattingRule",value:function(r,n){var i=n.international,o=n.nationalPrefix;if(r.nationalPrefixFormattingRule()){var a=r.usesNationalPrefix();if(a&&o||!a&&!i)return!0}}}]),e}();function s$(e,t){return lA(e)||sA(e,t)||aA(e,t)||oA()}function oA(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3576
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function aA(e,t){if(!!e){if(typeof e=="string")return kg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return kg(e,t)}}function kg(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function sA(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],i=!0,o=!1,a,s;try{for(r=r.call(e);!(i=(a=r.next()).done)&&(n.push(a.value),!(t&&n.length===t));i=!0);}catch(c){o=!0,s=c}finally{try{!i&&r.return!=null&&r.return()}finally{if(o)throw s}}return n}}function lA(e){if(Array.isArray(e))return e}function cA(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Eg(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function uA(e,t,r){return t&&Eg(e.prototype,t),r&&Eg(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var dA="["+or+Zt+"]+",fA=new RegExp("^"+dA+"$","i"),hA="(?:["+ac+"]["+or+Zt+"]*|["+or+Zt+"]+)",pA=new RegExp("[^"+or+Zt+"]+.*$"),mA=/[^\d\[\]]/,vA=function(){function e(t){var r=t.defaultCountry,n=t.defaultCallingCode,i=t.metadata,o=t.onNationalSignificantNumberChange;cA(this,e),this.defaultCountry=r,this.defaultCallingCode=n,this.metadata=i,this.onNationalSignificantNumberChange=o}return uA(e,[{key:"input",value:function(r,n){var i=bA(r),o=s$(i,2),a=o[0],s=o[1],c=Cl(a),l;return s&&(n.digits||(n.startInternationalNumber(),c||(l=!0))),c&&this.inputDigits(c,n),{digits:c,justLeadingPlus:l}}},{key:"inputDigits",value:function(r,n){var i=n.digits,o=i.length<3&&i.length+r.length>=3;if(n.appendDigits(r),o&&this.extractIddPrefix(n),this.isWaitingForCountryCallingCode(n)){if(!this.extractCountryCallingCode(n))return}else n.appendNationalSignificantNumberDigits(r);n.international||this.hasExtractedNationalSignificantNumber||this.extractNationalSignificantNumber(n.getNationalDigits(),function(a){return n.update(a)})}},{key:"isWaitingForCountryCallingCode",value:function(r){var n=r.international,i=r.callingCode;return n&&!i}},{key:"extractCountryCallingCode",value:function(r){var n=o$("+"+r.getDigitsWithoutInternationalPrefix(),this.defaultCountry,this.defaultCallingCode,this.metadata.metadata),i=n.countryCallingCode,o=n.number;if(i)return r.setCallingCode(i),r.update({nationalSignificantNumber:o}),!0}},{key:"reset",value:function(r){if(r){this.hasSelectedNumberingPlan=!0;var n=r._nationalPrefixForParsing();this.couldPossiblyExtractAnotherNationalSignificantNumber=n&&mA.test(n)}else this.hasSelectedNumberingPlan=void 0,this.couldPossiblyExtractAnotherNationalSignificantNumber=void 0}},{key:"extractNationalSignificantNumber",value:function(r,n){if(!!this.hasSelectedNumberingPlan){var i=Gf(r,this.metadata),o=i.nationalPrefix,a=i.nationalNumber,s=i.carrierCode;if(a!==r)return this.onExtractedNationalNumber(o,s,a,r,n),!0}}},{key:"extractAnotherNationalSignificantNumber",value:function(r,n,i){if(!this.hasExtractedNationalSignificantNumber)return this.extractNationalSignificantNumber(r,i);if(!!this.couldPossiblyExtractAnotherNationalSignificantNumber){var o=Gf(r,this.metadata),a=o.nationalPrefix,s=o.nationalNumber,c=o.carrierCode;if(s!==n)return this.onExtractedNationalNumber(a,c,s,r,i),!0}}},{key:"onExtractedNationalNumber",value:function(r,n,i,o,a){var s,c,l=o.lastIndexOf(i);if(l>=0&&l===o.length-i.length){c=!0;var u=o.slice(0,l);u!==r&&(s=u)}a({nationalPrefix:r,carrierCode:n,nationalSignificantNumber:i,nationalSignificantNumberMatchesInput:c,complexPrefixBeforeNationalSignificantNumber:s}),this.hasExtractedNationalSignificantNumber=!0,this.onNationalSignificantNumberChange()}},{key:"reExtractNationalSignificantNumber",value:function(r){if(this.extractAnotherNationalSignificantNumber(r.getNationalDigits(),r.nationalSignificantNumber,function(n){return r.update(n)}))return!0;if(this.extractIddPrefix(r))return this.extractCallingCodeAndNationalSignificantNumber(r),!0;if(this.fixMissingPlus(r))return this.extractCallingCodeAndNationalSignificantNumber(r),!0}},{key:"extractIddPrefix",value:function(r){var n=r.international,i=r.IDDPrefix,o=r.digits;if(r.nationalSignificantNumber,!(n||i)){var a=n$(o,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata);if(a!==void 0&&a!==o)return r.update({IDDPrefix:o.slice(0,o.length-a.length)}),this.startInternationalNumber(r,{country:void 0,callingCode:void 0}),!0}}},{key:"fixMissingPlus",value:function(r){if(!r.international){var n=i$(r.digits,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata),i=n.countryCallingCode;if(n.number,i)return r.update({missingPlus:!0}),this.startInternationalNumber(r,{country:r.country,callingCode:i}),!0}}},{key:"startInternationalNumber",value:function(r,n){var i=n.country,o=n.callingCode;r.startInternationalNumber(i,o),r.nationalSignificantNumber&&(r.resetNationalSignificantNumber(),this.onNationalSignificantNumberChange(),this.hasExtractedNationalSignificantNumber=void 0)}},{key:"extractCallingCodeAndNationalSignificantNumber",value:function(r){this.extractCountryCallingCode(r)&&this.extractNationalSignificantNumber(r.getNationalDigits(),function(n){return r.update(n)})}}]),e}();function yA(e){var t=e.search(hA);if(!(t<0)){e=e.slice(t);var r;return e[0]==="+"&&(r=!0,e=e.slice(1)),e=e.replace(pA,""),r&&(e="+"+e),e}}function gA(e){var t=yA(e)||"";return t[0]==="+"?[t.slice(1),!0]:[t]}function bA(e){var t=gA(e),r=s$(t,2),n=r[0],i=r[1];return fA.test(n)||(n=""),[n,i]}function Zf(e){return Zf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zf(e)}function $A(e,t){return SA(e)||xA(e,t)||_A(e,t)||wA()}function wA(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3577
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _A(e,t){if(!!e){if(typeof e=="string")return Og(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Og(e,t)}}function Og(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function xA(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],i=!0,o=!1,a,s;try{for(r=r.call(e);!(i=(a=r.next()).done)&&(n.push(a.value),!(t&&n.length===t));i=!0);}catch(c){o=!0,s=c}finally{try{!i&&r.return!=null&&r.return()}finally{if(o)throw s}}return n}}function SA(e){if(Array.isArray(e))return e}function kA(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Cg(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function EA(e,t,r){return t&&Cg(e.prototype,t),r&&Cg(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var l$=function(){function e(t,r){kA(this,e),this.metadata=new bt(r);var n=this.getCountryAndCallingCode(t),i=$A(n,2),o=i[0],a=i[1];this.defaultCountry=o,this.defaultCallingCode=a,this.reset()}return EA(e,[{key:"getCountryAndCallingCode",value:function(r){var n,i;return r&&(Zf(r)==="object"?(n=r.defaultCountry,i=r.defaultCallingCode):n=r),n&&!this.metadata.hasCountry(n)&&(n=void 0),[n,i]}},{key:"input",value:function(r){var n=this.parser.input(r,this.state),i=n.digits,o=n.justLeadingPlus;if(o)this.formattedOutput="+";else if(i){this.determineTheCountryIfNeeded(),this.state.nationalSignificantNumber&&this.formatter.narrowDownMatchingFormats(this.state);var a;if(this.metadata.hasSelectedNumberingPlan()&&(a=this.formatter.format(i,this.state)),a===void 0&&this.parser.reExtractNationalSignificantNumber(this.state)){this.determineTheCountryIfNeeded();var s=this.state.getNationalDigits();s&&(a=this.formatter.format(s,this.state))}this.formattedOutput=a?this.getFullNumber(a):this.getNonFormattedNumber()}return this.formattedOutput}},{key:"reset",value:function(){var r=this;return this.state=new TI({onCountryChange:function(i){r.country=i},onCallingCodeChange:function(i,o){r.metadata.selectNumberingPlan(o,i),r.formatter.reset(r.metadata.numberingPlan,r.state),r.parser.reset(r.metadata.numberingPlan)}}),this.formatter=new iA({state:this.state,metadata:this.metadata}),this.parser=new vA({defaultCountry:this.defaultCountry,defaultCallingCode:this.defaultCallingCode,metadata:this.metadata,state:this.state,onNationalSignificantNumberChange:function(){r.determineTheCountryIfNeeded(),r.formatter.reset(r.metadata.numberingPlan,r.state)}}),this.state.reset({country:this.defaultCountry,callingCode:this.defaultCallingCode}),this.formattedOutput="",this}},{key:"isInternational",value:function(){return this.state.international}},{key:"getCallingCode",value:function(){if(this.isInternational())return this.state.callingCode}},{key:"getCountryCallingCode",value:function(){return this.getCallingCode()}},{key:"getCountry",value:function(){var r=this.state.digits;if(r)return this._getCountry()}},{key:"_getCountry",value:function(){var r=this.state.country;return r}},{key:"determineTheCountryIfNeeded",value:function(){(!this.state.country||this.isCountryCallingCodeAmbiguous())&&this.determineTheCountry()}},{key:"getFullNumber",value:function(r){var n=this;if(this.isInternational()){var i=function(s){return n.formatter.getInternationalPrefixBeforeCountryCallingCode(n.state,{spacing:!!s})+s},o=this.state.callingCode;return i(o?r?"".concat(o," ").concat(r):o:"".concat(this.state.getDigitsWithoutInternationalPrefix()))}return r}},{key:"getNonFormattedNationalNumberWithPrefix",value:function(){var r=this.state,n=r.nationalSignificantNumber,i=r.complexPrefixBeforeNationalSignificantNumber,o=r.nationalPrefix,a=n,s=i||o;return s&&(a=s+a),a}},{key:"getNonFormattedNumber",value:function(){var r=this.state.nationalSignificantNumberMatchesInput;return this.getFullNumber(r?this.getNonFormattedNationalNumberWithPrefix():this.state.getNationalDigits())}},{key:"getNonFormattedTemplate",value:function(){var r=this.getNonFormattedNumber();if(r)return r.replace(/[\+\d]/g,er)}},{key:"isCountryCallingCodeAmbiguous",value:function(){var r=this.state.callingCode,n=this.metadata.getCountryCodesForCallingCode(r);return n&&n.length>1}},{key:"determineTheCountry",value:function(){this.state.setCountry(a$(this.isInternational()?this.state.callingCode:this.defaultCallingCode,this.state.nationalSignificantNumber,this.metadata))}},{key:"getNumberValue",value:function(){var r=this.state,n=r.digits,i=r.callingCode,o=r.country,a=r.nationalSignificantNumber;if(!!n){if(this.isInternational())return i?"+"+i+a:"+"+n;if(o||i){var s=o?this.metadata.countryCallingCode():i;return"+"+s+a}}}},{key:"getNumber",value:function(){var r=this.state,n=r.nationalSignificantNumber,i=r.carrierCode,o=r.callingCode,a=this._getCountry();if(!!n&&!(!a&&!o)){var s=new r$(a||o,n,this.metadata.metadata);return i&&(s.carrierCode=i),s}}},{key:"isPossible",value:function(){var r=this.getNumber();return r?r.isPossible():!1}},{key:"isValid",value:function(){var r=this.getNumber();return r?r.isValid():!1}},{key:"getNationalNumber",value:function(){return this.state.nationalSignificantNumber}},{key:"getChars",value:function(){return(this.state.international?"+":"")+this.state.digits}},{key:"getTemplate",value:function(){return this.formatter.getTemplate(this.state)||this.getNonFormattedTemplate()||""}}]),e}();function gu(){return BT(kI,arguments)}function Tl(e){return l$.call(this,e,B2)}Tl.prototype=Object.create(l$.prototype,{});Tl.prototype.constructor=Tl;const OA=`.input::part(base){border-radius:var(--photon-border-radius, .5rem)}.invalid::part(base){--tw-border-opacity: 1;border-color:rgb(239 68 68/var(--tw-border-opacity));border-width:2px}.invalid::part(form-control-help-text){--tw-text-opacity: 1;color:rgb(239 68 68/var(--tw-text-opacity))}
3578
+ `,ba=C("<style></style>"),CA=C('<div class="py-2 flex flex-col font-sans"><sl-input class="input" type="tel" placeholder="( ) ___-____"><p slot="help-text" class="text-red-500 pt-2 h-[21px] font-sans"></p></sl-input></div>'),PA=C('<div class="flex items-center pb-2"><p class="text-gray-700 text-sm"></p></div>'),TA=C('<p class="pl-1 text-red-500">*</p>');it("https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.0.0-beta.82/dist/");$e("photon-phone-input",{label:void 0,required:!1,value:void 0,invalid:!1,helpText:void 0,disabled:!1},e=>{let t;const r=n=>{const i=new CustomEvent("photon-phone-changed",{composed:!0,bubbles:!0,detail:{phone:n}});t?.dispatchEvent(i)};return Tt(()=>{e.value&&r(gu(e.value,"US").format("E.164"))}),[(()=>{const n=ba.cloneNode(!0);return w(n,ze),n})(),(()=>{const n=ba.cloneNode(!0);return w(n,Vt),n})(),(()=>{const n=ba.cloneNode(!0);return w(n,Ut),n})(),(()=>{const n=ba.cloneNode(!0);return w(n,OA),n})(),(()=>{const n=V(()=>document.importNode(CA,!0)),i=n.firstChild,o=i.firstChild,a=t;return typeof a=="function"?ee(a,n):t=n,w(n,(()=>{const s=pe(()=>!!e.label);return()=>s()?(()=>{const c=PA.cloneNode(!0),l=c.firstChild;return w(l,()=>e.label),w(c,(()=>{const u=pe(()=>!!e.required);return()=>u()?TA.cloneNode(!0):null})(),null),c})():null})(),i),i.addEventListener("sl-input",s=>{r(gu(s.target.value,"US").format("E.164"))}),i._$owner=P(),w(o,()=>e.helpText),W(s=>{const c=!!e.invalid,l=e.disabled,u=e.invalid;return c!==s._v$&&i.classList.toggle("invalid",s._v$=c),l!==s._v$2&&(i.disabled=s._v$2=l),u!==s._v$3&&(i.invalid=s._v$3=u),s},{_v$:void 0,_v$2:void 0,_v$3:void 0}),W(()=>i.value=e.value?new Tl("US").input(gu(e.value,"US").formatNational()):""),n})()]});const NA=`.input::part(base){border-radius:var(--photon-border-radius, .5rem)}.invalid::part(base){--tw-border-opacity: 1;border-color:rgb(239 68 68/var(--tw-border-opacity));border-width:2px}.invalid::part(form-control-help-text){--tw-text-opacity: 1;color:rgb(239 68 68/var(--tw-text-opacity))}
3579
+ `,IA=C("<div><style></style><style></style></div>"),Jf=[{id:"1",name:"MALE"},{id:"2",name:"FEMALE"},{id:"3",name:"UNKNOWN"}];$e("photon-sex-input",{label:void 0,required:!1,value:void 0,invalid:!1,helpText:void 0,disabled:!1,selected:void 0},e=>{let t;const r=n=>{const i=new CustomEvent("photon-sex-selected",{composed:!0,bubbles:!0,detail:{sex:n}});t?.dispatchEvent(i)};return(()=>{const n=IA.cloneNode(!0),i=n.firstChild,o=i.nextSibling,a=t;return typeof a=="function"?ee(a,n):t=n,n.addEventListener("photon-data-selected",s=>{r(s.detail.data.name)}),w(i,ze),w(o,NA),w(n,U(Nt,{data:Jf,get label(){return e.label},get required(){return e.required},placeholder:"",get disabled(){return e.disabled},get invalid(){return e.invalid},isLoading:!1,hasMore:!1,displayAccessor:s=>s.name,showOverflow:!0,noDataMsg:"",optional:!1,get helpText(){return e.helpText},get selectedData(){return Jf.filter(s=>s.name.toUpperCase()===e.selected)?.[0]}}),null),n})()});const AA=`.input::part(base){border-radius:var(--photon-border-radius, .5rem)}.invalid::part(base){--tw-border-opacity: 1;border-color:rgb(239 68 68/var(--tw-border-opacity));border-width:2px}.invalid::part(form-control-help-text){--tw-text-opacity: 1;color:rgb(239 68 68/var(--tw-text-opacity))}
3580
+ `,DA=C("<div><style></style><style></style></div>"),bu=[{id:"1",name:"Male/Man"},{id:"2",name:"Female/Woman"},{id:"3",name:"TransMale/TransMan"},{id:"4",name:"TransFemale/TransWoman"},{id:"5",name:"Genderqueery/Gender nonconforming"},{id:"6",name:"Something else"},{id:"7",name:"Decline to answer"}];$e("photon-gender-input",{label:void 0,required:!1,value:void 0,invalid:!1,helpText:void 0,disabled:!1,selected:void 0},e=>{const[t,r]=M("");let n;const i=s=>s.length===0?bu:bu.filter(c=>c.name.toLowerCase().includes(s.toLowerCase())),o=s=>{const c=new CustomEvent("photon-gender-selected",{composed:!0,bubbles:!0,detail:{gender:s}});n?.dispatchEvent(c)},a=()=>{const s=new CustomEvent("photon-gender-deselected",{composed:!0,bubbles:!0,detail:{}});n?.dispatchEvent(s)};return(()=>{const s=DA.cloneNode(!0),c=s.firstChild,l=c.nextSibling,u=n;return typeof u=="function"?ee(u,s):n=s,s.addEventListener("photon-data-selected",d=>{o(d.detail.data.name)}),s.addEventListener("photon-data-unselected",d=>{a()}),w(c,ze),w(l,AA),w(s,U(Nt,{get data(){return i(t())},get label(){return e.label},get required(){return e.required},placeholder:"",get disabled(){return e.disabled},get invalid(){return e.invalid},isLoading:!1,hasMore:!1,displayAccessor:d=>d.name,showOverflow:!0,onSearchChange:async d=>{r(d)},onHide:async()=>{r("")},noDataMsg:"",get optional(){return!e.required},get helpText(){return e.helpText},get selectedData(){return bu.filter(d=>d.name===e.selected)?.[0]}}),null),s})()});const RA=C('<div class="flex align-center justify-center h-screen"><sl-spinner style="font-size: 3rem;" class="mt-8"></sl-spinner></div>'),FA=C('<photon-card title="Personal"><div class="flex flex-col xs:flex-row xs:gap-4"><photon-text-input class="flex-grow min-w-[40%]" debounce-time="0" label="First Name"></photon-text-input><photon-text-input class="min-w-[48%]" debounce-time="0" label="Last Name"></photon-text-input></div><div class="flex flex-col xs:flex-row items-center xs:gap-4"><photon-datepicker class="pb-3 flex-grow w-full xs:min-w-[40%]" label="Date of Birth"></photon-datepicker><photon-phone-input class="w-full xs:min-w-[48%]" label="Phone Number"></photon-phone-input></div><div class="flex flex-col xs:flex-row justify-between xs:gap-4"><div class="flex-grow w-full xs:min-w-[40%]"><photon-gender-input label="Gender" required="false"></photon-gender-input></div><div class="flex-grow w-full xs:min-w-[40%]"><photon-sex-input label="Sex at Birth" required="false"></photon-sex-input></div></div><photon-text-input debounce-time="0" label="Email"></photon-text-input><hr class="py-2"><p class="font-sans text-lg flex-grow">Address</p><photon-text-input debounce-time="0" label="Street 1"></photon-text-input><photon-text-input debounce-time="0" label="Street 2"></photon-text-input><photon-text-input debounce-time="0" label="City"></photon-text-input><div class="flex gap-4 pb-5 xs:pb-2"><photon-state-input class="flex-grow min-w-[40%]" label="State" required="false"></photon-state-input><photon-text-input debounce-time="0" class="flex-grow min-w-[40%]" label="Zip Code"></photon-text-input></div><hr class="py-2"><p class="font-sans text-lg flex-grow">Preferred Local Pharmacy</p><photon-pharmacy-search></photon-pharmacy-search></photon-card>'),LA=C('<div class="w-full h-full relative"><style></style><style></style><style></style></div>');it("https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.0.0-beta.82/dist/");const MA=(e,t)=>{const r=e.selectedPatient.data?.address;return t.address_zip?.value&&G$(t.address_zip?.value)&&t.address_zip?.value!=r?.postalCode?t.address_zip?.value:r?`${r.street1} ${r.street2??""} ${r.city}, ${r.state} ${r.postalCode}`:""};$e("photon-patient-form",{patientId:""},({patientId:e})=>{let t;const r=at(),{store:n,actions:i}=nc,{actions:o}=V2,{store:a,actions:s}=k2({firstName:void 0,lastName:void 0,dateOfBirth:void 0,phone:void 0,gender:void 0,sex:void 0,email:void 0,address_street1:void 0,address_street2:void 0,address_city:void 0,address_state:void 0,address_zip:void 0,preferredPharmacy:void 0});s.registerValidator({key:"firstName",validator:nt(Nr(jt(),1,1/0),"Please enter a first name...")}),s.registerValidator({key:"lastName",validator:nt(Nr(jt(),1,1/0),"Please enter a last name...")}),s.registerValidator({key:"sex",validator:nt(d7(Jf.map(l=>l.name)),"Please enter Sex at Birth...")}),s.registerValidator({key:"phone",validator:nt(Nr(jt(),12),"Please enter a valid phone number...")}),s.registerValidator({key:"email",validator:nt(kv([eP(),Uy()]),"Please enter a valid email...")}),s.registerValidator({key:"address_zip",validator:nt(kv([Nr(JC(),0,10),Uy()]),"Please enter a valid zip code...")}),Tt(()=>{e&&i.getSelectedPatient(r.getSDK(),e)});const c=l=>{const u=new CustomEvent("photon-form-updated",{composed:!0,bubbles:!0,detail:{form:l,actions:s,selected:n,reset:()=>{s.reset(),i.reset(),o.reset()}}});t?.dispatchEvent(u)};return xe(()=>{n.selectedPatient.data&&(s.updateFormValue({key:"firstName",value:n.selectedPatient.data.name.first}),s.updateFormValue({key:"lastName",value:n.selectedPatient.data.name.last}),s.updateFormValue({key:"phone",value:n.selectedPatient.data.phone}),s.updateFormValue({key:"gender",value:n.selectedPatient.data.gender}),s.updateFormValue({key:"sex",value:n.selectedPatient.data.sex}),s.updateFormValue({key:"email",value:n.selectedPatient.data.email}),s.updateFormValue({key:"address_street1",value:n.selectedPatient.data.address?.street1}),s.updateFormValue({key:"address_street2",value:n.selectedPatient.data.address?.street2}),s.updateFormValue({key:"address_city",value:n.selectedPatient.data.address?.city}),s.updateFormValue({key:"address_state",value:n.selectedPatient.data.address?.state}),s.updateFormValue({key:"address_zip",value:n.selectedPatient.data.address?.postalCode}),s.updateFormValue({key:"preferredPharmacy",value:n.selectedPatient.data.preferredPharmacies?.[0]?.id}))}),xe(()=>{c(a)}),(()=>{const l=LA.cloneNode(!0),u=l.firstChild,d=u.nextSibling,f=d.nextSibling,h=t;return typeof h=="function"?ee(h,l):t=l,w(u,ze),w(d,Vt),w(f,Ut),w(l,U(ne,{get when(){return n.selectedPatient.isLoading},get children(){const p=V(()=>document.importNode(RA,!0)),m=p.firstChild;return m._$owner=P(),p}}),null),w(l,U(ne,{get when(){return!n.selectedPatient.isLoading},get children(){const p=V(()=>document.importNode(FA,!0)),m=p.firstChild,v=m.firstChild,y=v.nextSibling,b=m.nextSibling,g=b.firstChild,_=g.nextSibling,k=b.nextSibling,E=k.firstChild,x=E.firstChild,T=E.nextSibling,j=T.firstChild,z=k.nextSibling,K=z.nextSibling,D=K.nextSibling,L=D.nextSibling,R=L.nextSibling,F=R.nextSibling,q=F.nextSibling,re=q.firstChild,ae=re.nextSibling,A=q.nextSibling,me=A.nextSibling,_e=me.nextSibling;return p._$owner=P(),v.disabled=!!e,v.addEventListener("photon-input-changed",async I=>{s.updateFormValue({key:"firstName",value:I.detail.input})}),v._$owner=P(),y.disabled=!!e,y.addEventListener("photon-input-changed",async I=>{s.updateFormValue({key:"lastName",value:I.detail.input})}),y._$owner=P(),g.disabled=!!e,g.addEventListener("photon-datepicker-selected",async I=>{s.updateFormValue({key:"dateOfBirth",value:I.detail.date})}),g._$owner=P(),_.addEventListener("photon-phone-changed",async I=>{s.updateFormValue({key:"phone",value:I.detail.phone})}),_._$owner=P(),x.addEventListener("photon-gender-selected",I=>{s.updateFormValue({key:"gender",value:I.detail.gender})}),x.addEventListener("photon-gender-deselected",I=>{s.updateFormValue({key:"gender",value:void 0})}),x._$owner=P(),j.disabled=!!e,j.addEventListener("photon-sex-selected",I=>{s.updateFormValue({key:"sex",value:I.detail.sex})}),j.addEventListener("photon-sex-deselected",I=>{s.updateFormValue({key:"sex",value:void 0})}),j._$owner=P(),z.addEventListener("photon-input-changed",async I=>{s.updateFormValue({key:"email",value:I.detail.input})}),z._$owner=P(),L.addEventListener("photon-input-changed",async I=>{s.updateFormValue({key:"address_street1",value:I.detail.input})}),L._$owner=P(),R.optional=!0,R.addEventListener("photon-input-changed",async I=>{s.updateFormValue({key:"address_street2",value:I.detail.input})}),R._$owner=P(),F.addEventListener("photon-input-changed",async I=>{s.updateFormValue({key:"address_city",value:I.detail.input})}),F._$owner=P(),re.addEventListener("photon-state-selected",I=>{s.updateFormValue({key:"address_state",value:I.detail.state})}),re._$owner=P(),ae.addEventListener("photon-input-changed",async I=>{s.updateFormValue({key:"address_zip",value:I.detail.input})}),ae._$owner=P(),_e.addEventListener("photon-pharmacy-selected",I=>{s.updateFormValue({key:"preferredPharmacy",value:I.detail.pharmacy.id})}),_e.patientId=e,_e._$owner=P(),W(I=>{const xt=a.firstName?.error,St=a.firstName?.error,Mt=a.lastName?.error,It=a.lastName?.error,G=a.dateOfBirth?.error,Y=a.dateOfBirth?.error,X=a.phone?.error,ie=a.phone?.error,ue=a.gender?.error,de=a.gender?.error!==void 0,Ue=n.selectedPatient.data?.gender,Me=a.sex?.error,st=a.sex?.error!==void 0,dr=n.selectedPatient.data?.sex,gn=a.email?.error,Vr=a.email?.error,Ze=a.address_street1?.error,qi=a.address_street1?.error,cp=a.address_street2?.error,up=a.address_street2?.error,dp=a.address_city?.error,fp=a.address_city?.error,hp=a.address_state?.error,pp=a.address_state?.error!==void 0,mp=a.state?.value??n.selectedPatient.data?.address?.state,vp=a.address_zip?.error,yp=a.address_zip?.error,gp=MA(n,a),bp=n.selectedPatient.data?.preferredPharmacies?.[0]?.id;return xt!==I._v$&&(v.invalid=I._v$=xt),St!==I._v$2&&(v.helpText=I._v$2=St),Mt!==I._v$3&&(y.invalid=I._v$3=Mt),It!==I._v$4&&(y.helpText=I._v$4=It),G!==I._v$5&&(g.invalid=I._v$5=G),Y!==I._v$6&&(g.helpText=I._v$6=Y),X!==I._v$7&&(_.invalid=I._v$7=X),ie!==I._v$8&&(_.helpText=I._v$8=ie),ue!==I._v$9&&(x.helpText=I._v$9=ue),de!==I._v$10&&(x.invalid=I._v$10=de),Ue!==I._v$11&&(x.selected=I._v$11=Ue),Me!==I._v$12&&(j.helpText=I._v$12=Me),st!==I._v$13&&(j.invalid=I._v$13=st),dr!==I._v$14&&(j.selected=I._v$14=dr),gn!==I._v$15&&(z.invalid=I._v$15=gn),Vr!==I._v$16&&(z.helpText=I._v$16=Vr),Ze!==I._v$17&&(L.invalid=I._v$17=Ze),qi!==I._v$18&&(L.helpText=I._v$18=qi),cp!==I._v$19&&(R.invalid=I._v$19=cp),up!==I._v$20&&(R.helpText=I._v$20=up),dp!==I._v$21&&(F.invalid=I._v$21=dp),fp!==I._v$22&&(F.helpText=I._v$22=fp),hp!==I._v$23&&(re.helpText=I._v$23=hp),pp!==I._v$24&&(re.invalid=I._v$24=pp),mp!==I._v$25&&(re.selected=I._v$25=mp),vp!==I._v$26&&(ae.invalid=I._v$26=vp),yp!==I._v$27&&(ae.helpText=I._v$27=yp),gp!==I._v$28&&(_e.address=I._v$28=gp),bp!==I._v$29&&(_e.selected=I._v$29=bp),I},{_v$:void 0,_v$2:void 0,_v$3:void 0,_v$4:void 0,_v$5:void 0,_v$6:void 0,_v$7:void 0,_v$8:void 0,_v$9:void 0,_v$10:void 0,_v$11:void 0,_v$12:void 0,_v$13:void 0,_v$14:void 0,_v$15:void 0,_v$16:void 0,_v$17:void 0,_v$18:void 0,_v$19:void 0,_v$20:void 0,_v$21:void 0,_v$22:void 0,_v$23:void 0,_v$24:void 0,_v$25:void 0,_v$26:void 0,_v$27:void 0,_v$28:void 0,_v$29:void 0}),W(()=>v.value=a.firstName?.value??n.selectedPatient.data?.name.first),W(()=>y.value=a.lastName?.value??n.selectedPatient.data?.name.last),W(()=>g.value=a.dateOfBirth?.value??n.selectedPatient.data?.dateOfBirth),W(()=>_.value=a.phone?.value??n.selectedPatient.data?.phone),W(()=>z.value=a.email?.value??n.selectedPatient.data?.email),W(()=>L.value=a.address_street1?.value??n.selectedPatient.data?.address?.street1),W(()=>R.value=a.address_street2?.value??n.selectedPatient.data?.address?.street2),W(()=>F.value=a.address_city?.value??n.selectedPatient.data?.address?.city),W(()=>ae.value=a.address_zip?.value??n.selectedPatient.data?.address?.postalCode),p}}),null),l})()});const jA=`.input::part(base){border-radius:var(--photon-border-radius, .5rem)}.invalid::part(base){--tw-border-opacity: 1;border-color:rgb(239 68 68/var(--tw-border-opacity));border-width:2px}.invalid::part(form-control-help-text){--tw-text-opacity: 1;color:rgb(239 68 68/var(--tw-text-opacity))}
3581
+ `,zA=C("<div><style></style><style></style></div>"),$u=[{id:"1",name:"AL"},{id:"2",name:"AK"},{id:"3",name:"AZ"},{id:"4",name:"AR"},{id:"5",name:"CA"},{id:"6",name:"CO"},{id:"7",name:"CT"},{id:"8",name:"DE"},{id:"9",name:"DC"},{id:"10",name:"FL"},{id:"11",name:"GA"},{id:"12",name:"HI"},{id:"13",name:"ID"},{id:"14",name:"IL"},{id:"15",name:"IN"},{id:"16",name:"IA"},{id:"17",name:"KS"},{id:"18",name:"KY"},{id:"19",name:"LA"},{id:"20",name:"ME"},{id:"21",name:"MD"},{id:"22",name:"MA"},{id:"23",name:"MI"},{id:"24",name:"MN"},{id:"25",name:"MS"},{id:"26",name:"MO"},{id:"27",name:"MT"},{id:"28",name:"NB"},{id:"29",name:"NV"},{id:"30",name:"NH"},{id:"31",name:"NJ"},{id:"32",name:"NM"},{id:"33",name:"NY"},{id:"34",name:"NC"},{id:"35",name:"ND"},{id:"36",name:"OH"},{id:"37",name:"OK"},{id:"38",name:"OR"},{id:"39",name:"PA"},{id:"40",name:"PR"},{id:"41",name:"RI"},{id:"42",name:"SC"},{id:"43",name:"SD"},{id:"44",name:"TN"},{id:"45",name:"TX"},{id:"46",name:"UT"},{id:"47",name:"VT"},{id:"48",name:"VA"},{id:"49",name:"WA"},{id:"50",name:"WV"},{id:"51",name:"WI"},{id:"52",name:"WY"}];$e("photon-state-input",{label:void 0,required:!1,value:void 0,invalid:!1,helpText:void 0,disabled:!1,selected:void 0},e=>{const[t,r]=M("");let n;const i=a=>{const s=new CustomEvent("photon-state-selected",{composed:!0,bubbles:!0,detail:{state:a}});n?.dispatchEvent(s)},o=a=>a.length===0?$u:$u.filter(s=>s.name.toLowerCase().includes(a.toLowerCase()));return(()=>{const a=zA.cloneNode(!0),s=a.firstChild,c=s.nextSibling,l=n;return typeof l=="function"?ee(l,a):n=a,a.addEventListener("photon-data-selected",u=>{i(u.detail.data.name)}),w(s,ze),w(c,jA),w(a,U(Nt,{get data(){return o(t())},get label(){return e.label},get required(){return e.required},placeholder:"",get disabled(){return e.disabled},get invalid(){return e.invalid},isLoading:!1,hasMore:!1,displayAccessor:u=>u.name,showOverflow:!0,onSearchChange:async u=>{r(u)},onHide:async()=>{r("")},noDataMsg:"",optional:!1,get helpText(){return e.helpText},get selectedData(){return $u.filter(u=>u.name===e.selected)?.[0]}}),null),a})()});const UA=C("<sl-icon></sl-icon>"),VA=C('<div class="flex-1 flex justify-end"></div>'),BA=C('<div class="absolute top-0 left-0 w-full z-10"><style></style><photon-dialog confirm-text="Yes, Close" cancel-text="Keep Editing"><p class="font-sans text-lg xs:text-base"></p></photon-dialog><div class="flex items-center px-4 py-2 md:px-8 md:py-3 bg-white fixed w-full z-10 shadow-card"><div class="md:w-1/3 flex justify-start"><photon-button class="close-button" variant="naked"><div class="text-black text-3xl"><sl-icon name="x"></sl-icon></div></photon-button></div><div class="w-full md:w-2/3 flex flex-col md:flex-row"><div class="mb-2 md:mb-0 flex-1 flex justify-end md:justify-center items-center"><p class="ml-1 font-sans text-xl font-medium"></p></div></div></div><div class="w-full h-full bg-[#f7f4f4] pt-28 xs:pt-28 lg:pt-20"><div class="pt-4 pb-52 px-4 w-full h-full sm:w-[600px] xs:mx-auto"></div></div></div>'),c$=({closeTitle:e="Lose unsaved changes?",closeBody:t="You will not be able to recover unsaved changes.",headerRight:r,title:n,titleIconName:i,form:o,onClosed:a,checkShouldWarn:s=()=>!1})=>{let c;const[l,u]=M(!1);return(()=>{const d=V(()=>document.importNode(BA,!0)),f=d.firstChild,h=f.nextSibling,p=h.firstChild,m=h.nextSibling,v=m.firstChild,y=v.firstChild,b=y.firstChild,g=b.firstChild,_=v.nextSibling,k=_.firstChild,E=k.firstChild,x=m.nextSibling,T=x.firstChild,j=c;return typeof j=="function"?ee(j,d):c=d,w(f,ze),h.label=e,h.addEventListener("photon-dialog-confirmed",()=>{u(!1),a()}),h.addEventListener("photon-dialog-canceled",()=>{u(!1)}),h._$owner=P(),w(p,t),y.addEventListener("click",()=>{s()?u(!0):a()}),y._$owner=P(),g.style.setProperty("display","block"),g._$owner=P(),w(k,U(ne,{when:i,get children(){const z=V(()=>document.importNode(UA,!0));return z.name=i,z._$owner=P(),z}}),E),w(E,n),w(_,U(ne,{when:r,get children(){const z=VA.cloneNode(!0);return w(z,r),z}}),null),w(T,o),W(()=>h.open=l()),d})()},WA=C("<div></div>"),qA=C('<div class="flex space-x-2"><photon-button size="sm" variant="outline">Save and Create Prescription</photon-button><photon-button size="sm">Save</photon-button></div>'),HA=C('<photon-patient-form slot="form"></photon-patient-form>');$e("photon-patient-dialog",{patientId:"",open:!1},e=>{let t;const r=at(),[n,i]=M(!1),[o,a]=M(void 0),[s,c]=M(void 0),[l,u]=M(void 0),d=(m,v=!1)=>{const y=new CustomEvent("photon-patient-updated",{composed:!0,bubbles:!0,detail:{patientId:m,createPrescription:v}});t?.dispatchEvent(y)},f=(m,v=!1)=>{const y=new CustomEvent("photon-patient-created",{composed:!0,bubbles:!0,detail:{patientId:m,createPrescription:v}});t?.dispatchEvent(y)},h=()=>{const m=new CustomEvent("photon-patient-closed",{composed:!0,bubbles:!0,detail:{}});t?.dispatchEvent(m)},p=async(m,v,y,b=!1)=>{i(!0);let g=["firstName","lastName","phone","sex","email"];if(m.address_street1?.value!==void 0||m.address_city?.value!==void 0||m.address_state?.value!==void 0||m.address_zip?.value!==void 0)v.registerValidator({key:"address_street1",validator:nt(Nr(jt(),1,1/0),"Please enter a valid Street 1..")}),v.registerValidator({key:"address_city",validator:nt(Nr(jt(),1,1/0),"Please enter a valid City..")}),v.registerValidator({key:"address_state",validator:nt(Nr(jt(),2,2),"Please enter a valid State..")}),g=[...g,"address_zip","address_street1","address_city","address_state"];else{const k=["address_street1","address_city","address_state"];for(const E of k)v.unRegisterValidator(E)}if(v.validate(g),v.hasErrors(g))return i(!1),!0;m.preferredPharmacy.value&&y.selectedPatient.data?.preferredPharmacies&&y.selectedPatient.data?.preferredPharmacies.length!==0&&!y.selectedPatient.data?.preferredPharmacies?.map(k=>k?.id).filter(k=>k!==null).includes(m.preferredPharmacy.value)&&await r.getSDK().clinical.patient.removePatientPreferredPharmacy({})({variables:{patientId:e.patientId,pharmacyId:y.selectedPatient.data?.preferredPharmacies[0].id},awaitRefetchQueries:!1});const _={...e?.patientId?{id:e.patientId}:{},name:{first:m.firstName.value,last:m.lastName.value},gender:m.gender.value,email:m.email.value,phone:m.phone.value,dateOfBirth:m.dateOfBirth.value,sex:m.sex.value,address:m.address_street1.value!==void 0?{street1:m.address_street1.value,street2:m.address_street2.value,city:m.address_city.value,state:m.address_state.value,postalCode:m.address_zip.value,country:"US"}:void 0,preferredPharmacies:m.preferredPharmacy.value?[m.preferredPharmacy.value]:[]};if(e?.patientId)await r.getSDK().clinical.patient.updatePatient({})({variables:_,awaitRefetchQueries:!1}),d(e.patientId,b);else{const E=await r.getSDK().clinical.patient.createPatient({})({variables:_,awaitRefetchQueries:!1});f(E?.data?.createPatient?.id||"",b)}i(!1),v.resetStores(),e.open=!1};return(()=>{const m=WA.cloneNode(!0),v=t;return typeof v=="function"?ee(v,m):t=m,w(m,U(ne,{get when(){return e.open},get children(){return U(c$,{onClosed:()=>{h(),l().resetStores(),e.open=!1},get title(){return e?.patientId?"Update Patient":"Create Patient"},get titleIconName(){return e?.patientId?"pencil-square":"person-plus"},get headerRight(){return(()=>{const y=V(()=>document.importNode(qA,!0)),b=y.firstChild,g=b.nextSibling;return b.$$click=()=>p(o(),l(),s(),!0),b._$owner=P(),g.$$click=()=>p(o(),l(),s(),!1),g._$owner=P(),W(_=>{const k=n(),E=n(),x=n(),T=n();return k!==_._v$&&(b.disabled=_._v$=k),E!==_._v$2&&(b.loading=_._v$2=E),x!==_._v$3&&(g.disabled=_._v$3=x),T!==_._v$4&&(g.loading=_._v$4=T),_},{_v$:void 0,_v$2:void 0,_v$3:void 0,_v$4:void 0}),y})()},get form(){return(()=>{const y=V(()=>document.importNode(HA,!0));return y.addEventListener("photon-form-updated",b=>{a(b.detail.form),u(Object.assign({},b.detail.actions,{resetStores:b.detail.reset})),c(b.detail.selected)}),y._$owner=P(),W(()=>y.patientId=e.patientId),y})()}})}})),m})()});Ni(["click"]);const GA=C("<photon-patient-dialog></photon-patient-dialog>");$e("photon-update-patient-dialog",{patientId:"",open:!1},e=>(console.warn("photon-update-patient-dialog will be deprecated soon. Please use photon-patient-dialog instead."),(()=>{const t=V(()=>document.importNode(GA,!0));return t._$owner=P(),W(r=>{const n=e.patientId,i=e.open;return n!==r._v$&&(t.patientId=r._v$=n),i!==r._v$2&&(t.open=r._v$2=i),r},{_v$:void 0,_v$2:void 0}),t})()));const QA=C('<div class="w-full"></div>'),KA=()=>{let e;const t=at(),[r,n]=M(!1),[i,o]=M(""),[a,s]=M(),[c,l]=M([]),u=d=>{const f=new CustomEvent("photon-name-selected",{composed:!0,bubbles:!0,detail:{medicationId:d}});e?.dispatchEvent(f)};return xe(async()=>{i().length>0&&(n(!0),V(async()=>{const d=String(Math.random());s(d);const{data:f}=await t.getSDK().clinical.searchMedication.getConcepts({name:i()});d===a()&&l(f.medicationConcepts??[]),n(!1)}))},[i]),(()=>{const d=QA.cloneNode(!0),f=e;return typeof f=="function"?ee(f,d):e=d,d.addEventListener("photon-data-selected",h=>{u(h.detail.data.id)}),w(d,U(Nt,{get data(){return c()},label:"Medication Name",placeholder:"Enter a medication name...",get isLoading(){return r()},hasMore:!1,displayAccessor:h=>h.name,onSearchChange:async h=>o(h),onHide:async()=>{o("")},noDataMsg:"No medications found",required:!1})),d})()},YA=C('<div class="w-full"></div>'),XA=e=>{const t=at(),[r,n]=M(),[i,o]=M(!1),[a]=M(""),[s,c]=M([]),l=h=>{const p=new CustomEvent("photon-strength-selected",{composed:!0,bubbles:!0,detail:{strengthId:h}});f?.dispatchEvent(p)},u=()=>{const h=new CustomEvent("photon-strength-deselected",{composed:!0,bubbles:!0,detail:{}});f?.dispatchEvent(h)};xe(async()=>{d.clear(),e.medicationId.length>0&&(o(!0),V(async()=>{const h=String(Math.random());n(h);const{data:p}=await t.getSDK().clinical.searchMedication.getStrengths({id:e.medicationId});h===r()&&c(p.medicationStrengths??[]),o(!1)}))},[e.medicationId]);const d={};let f;return(()=>{const h=YA.cloneNode(!0),p=f;return typeof p=="function"?ee(p,h):f=h,h.addEventListener("photon-data-selected",m=>{l(m.detail.data.id)}),h.addEventListener("photon-data-unselected",()=>{u()}),w(h,U(Nt,{actionRef:d,get data(){return s()},label:"Strength",get disabled(){return e.disabled},placeholder:"Select a strength...",get isLoading(){return i()},hasMore:!1,displayAccessor:m=>m.name,onSearchChange:async m=>a(m),onHide:async()=>{a("")},noDataMsg:"No strengths found",required:!1})),h})()},ZA=C('<div class="w-full"></div>'),JA=e=>{const t=at(),[r,n]=M(),[i,o]=M(!1),[a]=M(""),[s,c]=M([]),l=h=>{const p=new CustomEvent("photon-route-selected",{composed:!0,bubbles:!0,detail:{routeId:h}});f?.dispatchEvent(p)},u=()=>{const h=new CustomEvent("photon-route-deselected",{composed:!0,bubbles:!0,detail:{}});f?.dispatchEvent(h)};xe(async()=>{d.clear(),e.medicationId.length>0&&(o(!0),V(async()=>{const h=String(Math.random());n(h);const{data:p}=await t.getSDK().clinical.searchMedication.getRoutes({id:e.medicationId});h===r()&&c(p.medicationRoutes??[]),o(!1)}))},[e.medicationId]);const d={};let f;return(()=>{const h=ZA.cloneNode(!0),p=f;return typeof p=="function"?ee(p,h):f=h,h.addEventListener("photon-data-selected",m=>{l(m.detail.data.id)}),h.addEventListener("photon-data-unselected",()=>{u()}),w(h,U(Nt,{actionRef:d,get data(){return s()},label:"Route",get disabled(){return e.disabled},placeholder:"Select a route...",get isLoading(){return i()},hasMore:!1,displayAccessor:m=>m.name,onSearchChange:async m=>a(m),onHide:async()=>{a("")},noDataMsg:"No routes found",required:!1})),h})()},eD=C('<div class="w-full"></div>'),tD=e=>{const t=at(),[r,n]=M(!1),[i,o]=M(),[a]=M(""),[s,c]=M([]),l=h=>{const p=new CustomEvent("photon-form-selected",{composed:!0,bubbles:!0,detail:{formId:h}});f?.dispatchEvent(p)},u=()=>{const h=new CustomEvent("photon-form-deselected",{composed:!0,bubbles:!0,detail:{}});f?.dispatchEvent(h)};xe(async()=>{d.clear(),e.medicationId.length>0&&(n(!0),V(async()=>{const h=String(Math.random());o(h);const{data:p}=await t.getSDK().clinical.searchMedication.getForms({id:e.medicationId});h===i()&&c(p.medicationForms??[]),n(!1)}))},[e.medicationId]);const d={};let f;return(()=>{const h=eD.cloneNode(!0),p=f;return typeof p=="function"?ee(p,h):f=h,h.addEventListener("photon-data-selected",m=>{l(m.detail.data.id)}),h.addEventListener("photon-data-unselected",()=>{u()}),w(h,U(Nt,{actionRef:d,get data(){return s()},label:"Form",get disabled(){return e.disabled},placeholder:"Select a form...",get isLoading(){return r()},hasMore:!1,displayAccessor:m=>m.form,onSearchChange:async m=>a(m),onHide:async()=>{a("")},noDataMsg:"No forms found",required:!1})),h})()},rD=C('<photon-checkbox label="Add Medication to Catalog"></photon-checkbox>'),nD=C('<div><p class="font-sans text-lg text-gray-700 text-center pb-2">Advanced Medication Search</p><div class="flex flex-col xs:flex-row gap-4"></div><div class="flex flex-col xs:flex-row gap-4"></div><hr class="my-8"><p class="font-sans text-gray-700 pb-4">Select a medication:</p><div><photon-radio-group></photon-radio-group></div></div>'),iD=C("<photon-radio-card></photon-radio-card>");it("https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.0.0-beta.82/dist/");$e("photon-med-search",{},()=>{let e;const t=at(),[r,n]=M(""),[i,o]=M(""),[a,s]=M(""),[c,l]=M(""),[u,d]=M([]),[f,h]=M(!1),[p,m]=M(void 0),[v,y]=M(""),b=(g,_)=>{const k=new CustomEvent("photon-form-updated",{composed:!0,bubbles:!0,detail:{medication:g,addToCatalog:_,catalogId:v()}});e?.dispatchEvent(k)};return Tt(async()=>{const{data:g}=await t.getSDK().clinical.catalog.getCatalogs();g.catalogs.length>0&&y(g.catalogs[0].id)}),xe(()=>{const g=c()||a()||i()||r();g.length>0&&V(async()=>{const{data:_}=await t.getSDK().clinical.searchMedication.getProducts({id:g});h(!1),m(void 0),d(_.medicationProducts)})},[r,i,a,c]),xe(()=>{p()&&b(p(),f())},[p,f]),(()=>{const g=V(()=>document.importNode(nD,!0)),_=g.firstChild,k=_.nextSibling,E=k.nextSibling,x=E.nextSibling,T=x.nextSibling,j=T.nextSibling,z=j.firstChild,K=e;return typeof K=="function"?ee(K,g):e=g,g.addEventListener("photon-name-selected",D=>{n(D.detail.medicationId)}),g.addEventListener("photon-strength-selected",D=>{o(D.detail.strengthId)}),g.addEventListener("photon-strength-deselected",D=>{o("")}),g.addEventListener("photon-route-selected",D=>{s(D.detail.routeId)}),g.addEventListener("photon-route-deselected",D=>{s("")}),g.addEventListener("photon-form-selected",D=>{l(D.detail.formId)}),g.addEventListener("photon-form-deselected",D=>{l("")}),w(k,U(KA,{}),null),w(k,U(XA,{get medicationId(){return r()},get disabled(){return r().length==0}}),null),w(E,U(JA,{get medicationId(){return i()},get disabled(){return i().length==0}}),null),w(E,U(tD,{get medicationId(){return a()},get disabled(){return a().length==0}}),null),j.addEventListener("photon-option-selected",D=>{m(D.detail.value)}),z._$owner=P(),w(z,U(Rl,{get each(){return u().filter((D,L,R)=>{const F=R.findIndex(q=>q.name===D.name);if(L===F)return!0}).sort((D,L)=>D.name.toLowerCase()>L.name.toLowerCase()?-1:1)},children:D=>(()=>{const L=V(()=>document.importNode(iD,!0));return L.value=D,L._$owner=P(),w(L,()=>D.name),L})()})),w(g,U(ne,{get when(){return v().length>0},get children(){const D=V(()=>document.importNode(rD,!0));return D.addEventListener("photon-checkbox-toggled",L=>h(L.detail.checked)),D._$owner=P(),W(()=>D.disabled=!p()),W(()=>D.checked=f()),D}}),null),g})()});var oD=ft`
3586
3582
  ${wt}
3587
3583
 
3588
3584
  :host {
@@ -3703,4 +3699,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
3703
3699
 
3704
3700
  <slot part="label" class="radio__label"></slot>
3705
3701
  </span>
3706
- `}};Sr.styles=oD;$([Er()],Sr.prototype,"checked",2);$([Er()],Sr.prototype,"hasFocus",2);$([k()],Sr.prototype,"value",2);$([k({reflect:!0})],Sr.prototype,"size",2);$([k({type:Boolean,reflect:!0})],Sr.prototype,"disabled",2);$([De("checked")],Sr.prototype,"handleCheckedChange",1);$([De("disabled",{waitUntilFirstUpdate:!0})],Sr.prototype,"handleDisabledChange",1);Sr=$([_t("sl-radio")],Sr);const aD=C('<div><style></style><photon-card><div class="flex items-center gap-2"><p class="font-sans flex-grow text-gray-600 text-sm"><slot></slot></p><input type="radio"></div></photon-card></div>');it("https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.0.0-beta.82/dist/");$e("photon-radio-card",{selected:!1,value:""},e=>{let t;const r=()=>{const n=new CustomEvent("photon-radio-selected",{composed:!0,bubbles:!0,detail:{value:e.value}});t?.dispatchEvent(n)};return(()=>{const n=V(()=>document.importNode(aD,!0)),i=n.firstChild,o=i.nextSibling,a=o.firstChild,s=a.firstChild,c=s.firstChild,l=s.nextSibling,u=t;return typeof u=="function"?ee(u,n):t=n,w(i,ze),o.addEventListener("click",()=>r()),o._$owner=P(),c._$owner=P(),W(()=>l.checked=e.selected),n})()});function sD(e){const[t,r]=yn(Array());return xe(()=>{if(!e)return;const n=()=>{r(e()?.assignedElements()||[])};return e()?.addEventListener("slotchange",n)},[e]),t}const lD=C('<div><style></style><div class="flex flex-col gap-3"><slot></slot></div></div>');it("https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.0.0-beta.82/dist/");$e("photon-radio-group",{},()=>{let e;const[t,r]=L(),n=sD(t),i=o=>{const a=new CustomEvent("photon-option-selected",{composed:!0,bubbles:!0,detail:{value:o}});e?.dispatchEvent(a)};return(()=>{const o=lD.cloneNode(!0),a=o.firstChild,s=a.nextSibling,c=s.firstChild,l=e;return typeof l=="function"?ee(l,o):e=o,o.addEventListener("photon-radio-selected",u=>{u.stopImmediatePropagation(),u.stopPropagation();for(const d of n)d.value.id===u.detail.value.id||d.value===u.detail.value?d.selected=!0:d.selected=!1;i(u.detail.value)}),w(a,ze),ee(u=>r(u),c),c._$owner=P(),o})()});const cD=C('<div><photon-dialog cancel-text="Back" confirm-text="Select Medication" width="min-content"><photon-med-search></photon-med-search></photon-dialog></div>');$e("photon-med-search-dialog",{open:{value:!1,reflect:!0,notify:!1,attribute:"open",parse:!0}},e=>{const t=at();let r;const[n,i]=L(void 0),[o,a]=L(!1),[s,c]=L(""),[l,u]=L(!1),d=()=>{const f=new CustomEvent("photon-medication-selected",{composed:!0,bubbles:!0,detail:{medication:n()}});r?.dispatchEvent(f)};return(()=>{const f=V(()=>document.importNode(cD,!0)),h=f.firstChild,p=h.firstChild,m=r;return typeof m=="function"?ee(m,f):r=f,f.addEventListener("photon-form-updated",v=>{i(v.detail.medication),a(v.detail.addToCatalog),c(v.detail.catalogId)}),h.addEventListener("photon-dialog-confirmed",async()=>{u(!0),o()&&await t.getSDK().clinical.catalog.addToCatalog({})({variables:{catalogId:s(),treatmentId:n()?.id},awaitRefetchQueries:!1}),d(),u(!1),e.open=!1}),h.addEventListener("photon-dialog-canceled",()=>{e.open=!1}),h._$owner=P(),p._$owner=P(),W(v=>{const y=e.open,b=l(),g=!n();return y!==v._v$&&(h.open=v._v$=y),b!==v._v$2&&(h.loading=v._v$2=b),g!==v._v$3&&(h.disableSubmit=v._v$3=g),v},{_v$:void 0,_v$2:void 0,_v$3:void 0}),f})()});const uD=C('<div class="min-w-[125px]"></div>'),Pg=[{id:"mcg/kg",name:"mcg/kg"},{id:"mg/kg",name:"mg/kg"},{id:"g/kg",name:"g/kg"}],dD=()=>{const[e,t]=L(""),r=i=>{const o=new CustomEvent("photon-unit-selected",{composed:!0,bubbles:!0,detail:{unit:i}});n?.dispatchEvent(o)};let n;return(()=>{const i=uD.cloneNode(!0),o=n;return typeof o=="function"?ee(o,i):n=i,i.addEventListener("photon-data-selected",a=>{r(a.detail.data.name)}),w(i,U(Nt,{get data(){return Pg.filter(a=>a.name.includes(e()))},forceLabelSize:!0,isLoading:!1,disabled:!1,placeholder:"Select a unit...",hasMore:!1,displayAccessor:a=>a.name,onSearchChange:async a=>t(a),onHide:async()=>{t("")},noDataMsg:"No units found",required:!1,get selectedData(){return Pg[1]}})),i})()},fD=C('<div class="min-w-[125px]"></div>'),Tg=[{id:"mg",name:"mg"},{id:"mcg",name:"mcg"},{id:"g",name:"g"}],hD=()=>{const[e,t]=L(""),r=i=>{const o=new CustomEvent("photon-unit-selected",{composed:!0,bubbles:!0,detail:{unit:i}});n?.dispatchEvent(o)};let n;return(()=>{const i=fD.cloneNode(!0),o=n;return typeof o=="function"?ee(o,i):n=i,i.addEventListener("photon-data-selected",a=>{r(a.detail.data.name)}),w(i,U(Nt,{get data(){return Tg.filter(a=>a.name.includes(e()))},forceLabelSize:!0,isLoading:!1,disabled:!1,placeholder:"Select a unit...",hasMore:!1,displayAccessor:a=>a.name,onSearchChange:async a=>t(a),onHide:async()=>{t("")},noDataMsg:"No units found",required:!1,get selectedData(){return Tg[0]}})),i})()},pD=C('<div class="min-w-[125px]"></div>'),Ng=[{id:"mL",name:"mL"},{id:"L",name:"L"}],mD=()=>{const[e,t]=L(""),r=i=>{const o=new CustomEvent("photon-unit-selected",{composed:!0,bubbles:!0,detail:{unit:i}});n?.dispatchEvent(o)};let n;return(()=>{const i=pD.cloneNode(!0),o=n;return typeof o=="function"?ee(o,i):n=i,i.addEventListener("photon-data-selected",a=>{r(a.detail.data.name)}),w(i,U(Nt,{get data(){return Ng.filter(a=>a.name.includes(e()))},forceLabelSize:!0,isLoading:!1,disabled:!1,placeholder:"Select a unit...",hasMore:!1,displayAccessor:a=>a.name,onSearchChange:async a=>t(a),onHide:async()=>{t("")},noDataMsg:"No units found",required:!1,get selectedData(){return Ng[0]}})),i})()},vD=C('<div class="min-w-[125px]"></div>'),Ig=[{id:"lbs",name:"lbs"},{id:"kgs",name:"kgs"}],yD=()=>{const[e,t]=L(""),r=i=>{const o=new CustomEvent("photon-unit-selected",{composed:!0,bubbles:!0,detail:{unit:i}});n?.dispatchEvent(o)};let n;return(()=>{const i=vD.cloneNode(!0),o=n;return typeof o=="function"?ee(o,i):n=i,i.addEventListener("photon-data-selected",a=>{r(a.detail.data.name)}),w(i,U(Nt,{get data(){return Ig.filter(a=>a.name.includes(e()))},forceLabelSize:!0,isLoading:!1,disabled:!1,placeholder:"Select a unit...",hasMore:!1,displayAccessor:a=>a.name,onSearchChange:async a=>t(a),onHide:async()=>{t("")},noDataMsg:"No units found",required:!1,get selectedData(){return Ig[0]}})),i})()},gD=C('<div><style></style><div class="flex flex-col xs:flex-row items-start xs:items-center gap-2 pb-2"><p class="font-sans text-lg">Selected Drug: </p></div><div class="flex flex-col"><p class="font-sans pb-1">Input</p><div class="flex items-center"><p class="font-sans text-gray-700 text-sm mb-7 basis-56 xs:basis-60">Dosage</p><photon-number-input min="0" value="0" class="mb-1.5 max-w-[140px] pl-3 xs:pl-4 pr-3"></photon-number-input></div><div class="flex items-center"><p class="font-sans text-gray-700 text-sm mb-7 basis-56 xs:basis-60">Weight</p><photon-number-input min="0" value="0" class="mb-1.5 max-w-[140px] pl-3 xs:pl-4 pr-3"></photon-number-input></div><p class="font-sans pb-1">Liquid Formation</p><div class="flex items-center"><p class="font-sans text-gray-700 text-sm mb-7 basis-56 xs:basis-60">Drug Amount</p><photon-number-input min="0" value="0" class="mb-1.5 max-w-[140px] pl-3 xs:pl-4 pr-3 flex-shrink"></photon-number-input></div><div class="flex items-center"><p class="font-sans text-gray-700 text-sm mb-7 basis-56 xs:basis-60">Per Volume</p><photon-number-input min="0" value="0" class="mb-1.5 max-w-[140px] pl-3 xs:pl-4 pr-3"></photon-number-input></div><p class="font-sans">Result</p><div class="flex items-center"><p class="font-sans text-gray-700 text-sm mb-7 basis-36 xs:basis-[10.5rem]">Dose</p><photon-text-input class="mb-1.5 max-w-[180px] pl-3 pr-3"></photon-text-input><photon-button class="mb-7">Use<sl-icon name="chevron-right" slot="postfix"></sl-icon></photon-button></div><div class="flex items-center"><p class="font-sans text-gray-700 text-sm mb-7 basis-36 xs:basis-[10.5rem]">Liquid Dose</p><photon-text-input class="mb-1.5 max-w-[180px] pl-3 pr-3"></photon-text-input><photon-button class="mb-7">Use<sl-icon name="chevron-right" slot="postfix"></sl-icon></photon-button></div></div></div>'),bD=C("<p></p>"),$D=C('<p class="text-gray-500 font-sans italic">None selected</p>'),$u=(e,t)=>!!((t==="kgs"||t==="g")&&e.includes("kg")||(t==="lbs"||t==="oz")&&e.includes("lb")),wD=(e,t)=>e.includes("kg")&&t.unit==="oz"?t.value/16*.453592:e.includes("kg")&&t.unit==="lbs"?t.value*.453592:e.includes("lb")&&t.unit==="kgs"?t.value*2.20462:e.includes("lb")&&t.unit==="g"?t.value/1e3*2.20462:0,_D=(e,t)=>t==="mcg"&&e.split("/")[0]==="mcg"||t==="mg"&&e.split("/")[0]==="mg"||t==="g"&&e.split("/")[0]==="g",xD=(e,t)=>e.includes("mcg")&&t.unit==="mcg"?t.value/(1e3*1e3):e.includes("mcg")&&t.unit==="g"?t.value*(1e3*1e3):e.includes("mg")&&t.unit==="mcg"?t.value/1e3:e.includes("mg")&&t.unit==="g"?t.value*1e3:e.includes("g")&&t.unit==="mcg"?t.value/(1e3*1e3):e.includes("g")&&t.unit==="mg"?t.value/1e3:0,SD=(e,t)=>$u(e.unit,t.unit)&&t.unit==="g"?e.value*(t.value/1e3):$u(e.unit,t.unit)&&t.unit==="oz"?e.value*(t.value/16):$u(e.unit,t.unit)?e.value*t.value:e.value*wD(e.unit,t),kD=(e,t,r,n,i)=>r===0||r.toString().length===0||parseInt(r.toString(),10)===0||window.isNaN(r)?0:_D(t,n)?e*i/r:e*i/xD(t,{value:r,unit:n});$e("photon-dosage-calculator",{medication:void 0},e=>{let t;const[r,n]=L(0),[i,o]=L(0),[a,s]=L(0),[c,l]=L(0),[u,d]=L("mg/kg"),[f,h]=L("lbs"),[p,m]=L("mg"),[v,y]=L("mL"),[b,g]=L(""),[_,S]=L(""),E=x=>{const N=new CustomEvent("photon-dosage-selected",{composed:!0,bubbles:!0,detail:{value:Number(x?_().split(" ")[0]:b().split(" ")[0]),unit:x?_().split(" ")[1]:b().split(" ")[1]}});t?.dispatchEvent(N)};return xe(()=>{let x=SD({value:r(),unit:u()},{value:a(),unit:f()});x.toString().split(".").length>1&&x.toString().split(".")[1].length>4&&(x=parseFloat(x.toFixed(4))),g(`${x} ${u().split("/")[0]}`);let N=kD(x,u().split("/")[0],i(),p(),c());i.toString().split(".").length>1&&i.toString().split(".")[1].length>4&&(N=parseFloat(N.toFixed(4))),S(`${N} ${v()}`)},[r,u,f,a,i,c,p,v]),(()=>{const x=V(()=>document.importNode(gD,!0)),N=x.firstChild,M=N.nextSibling;M.firstChild;const j=M.nextSibling,q=j.firstChild,A=q.nextSibling,T=A.firstChild,F=T.nextSibling,z=A.nextSibling,Y=z.firstChild,ne=Y.nextSibling,ae=z.nextSibling,R=ae.nextSibling,ge=R.firstChild,_e=ge.nextSibling,D=R.nextSibling,xt=D.firstChild,St=xt.nextSibling,Mt=D.nextSibling,It=Mt.nextSibling,G=It.firstChild,K=G.nextSibling,X=K.nextSibling,ie=X.firstChild,ue=ie.nextSibling,de=It.nextSibling,Ue=de.firstChild,Me=Ue.nextSibling,st=Me.nextSibling,dr=st.firstChild,gn=dr.nextSibling,Vr=t;return typeof Vr=="function"?ee(Vr,x):t=x,w(N,ze),w(M,(()=>{const Ze=pe(()=>!!e.medication);return()=>Ze()?(()=>{const qi=bD.cloneNode(!0);return w(qi,()=>e.medication.name),qi})():$D.cloneNode(!0)})(),null),A.addEventListener("photon-input-changed",Ze=>{n(Ze.detail.input)}),A.addEventListener("photon-unit-selected",Ze=>{d(Ze.detail.unit)}),F._$owner=P(),w(A,U(dD,{}),null),z.addEventListener("photon-input-changed",Ze=>{s(Ze.detail.input)}),z.addEventListener("photon-unit-selected",Ze=>{h(Ze.detail.unit)}),ne._$owner=P(),w(z,U(yD,{}),null),R.addEventListener("photon-input-changed",Ze=>{o(Ze.detail.input)}),R.addEventListener("photon-unit-selected",Ze=>{m(Ze.detail.unit)}),_e._$owner=P(),w(R,U(hD,{}),null),D.addEventListener("photon-input-changed",Ze=>{l(Ze.detail.input)}),D.addEventListener("photon-unit-selected",Ze=>{y(Ze.detail.unit)}),St._$owner=P(),w(D,U(mD,{}),null),K.disabled=!0,K._$owner=P(),X.addEventListener("photon-clicked",()=>E(!1)),X._$owner=P(),ue._$owner=P(),Me.disabled=!0,Me._$owner=P(),st.addEventListener("photon-clicked",()=>E(!0)),st._$owner=P(),gn._$owner=P(),W(()=>K.value=b()??"0"),W(()=>Me.value=_()??"0"),x})()});const ED=C('<div><photon-dialog label="Dosage Calculator"><photon-dosage-calculator></photon-dosage-calculator></photon-dialog></div>');$e("photon-dosage-calculator-dialog",{open:{value:!1,reflect:!0,notify:!1,attribute:"open",parse:!0},medication:{value:void 0,reflect:!0,notify:!1,attribute:"medication",parse:!0}},e=>{at();let t;const r=(n,i)=>{const o=new CustomEvent("photon-dose-selected",{composed:!0,bubbles:!0,detail:{value:n,unit:i}});t?.dispatchEvent(o)};return(()=>{const n=V(()=>document.importNode(ED,!0)),i=n.firstChild,o=i.firstChild,a=t;return typeof a=="function"?ee(a,n):t=n,n.addEventListener("photon-dosage-selected",s=>{s.stopImmediatePropagation(),s.stopPropagation(),r(s.detail.value,s.detail.unit),e.open=!1}),i.header=!0,i.hideFooter=!0,i.addEventListener("photon-dialog-canceled",()=>{e.open=!1}),i._$owner=P(),o._$owner=P(),W(s=>{const c=e.open,l=e.medication;return c!==s._v$&&(i.open=s._v$=c),l!==s._v$2&&(o.medication=s._v$2=l),s},{_v$:void 0,_v$2:void 0}),n})()});function Jf(e){this.message=e}Jf.prototype=new Error,Jf.prototype.name="InvalidCharacterError";var Ag=typeof window<"u"&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new Jf("'atob' failed: The string to be decoded is not correctly encoded.");for(var r,n,i=0,o=0,a="";n=t.charAt(o++);~n&&(r=i%4?64*r+n:n,i++%4)?a+=String.fromCharCode(255&r>>(-2*i&6)):0)n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(n);return a};function OD(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(r){return decodeURIComponent(Ag(r).replace(/(.)/g,function(n,i){var o=i.charCodeAt(0).toString(16).toUpperCase();return o.length<2&&(o="0"+o),"%"+o}))}(t)}catch{return Ag(t)}}function Nl(e){this.message=e}function CD(e,t){if(typeof e!="string")throw new Nl("Invalid token specified");var r=(t=t||{}).header===!0?0:1;try{return JSON.parse(OD(e.split(".")[r]))}catch(n){throw new Nl("Invalid token specified: "+n.message)}}Nl.prototype=new Error,Nl.prototype.name="InvalidTokenError";const PD=C(`<div><photon-dialog label="Lose Unsaved Prescription?" confirm-text="Yes, Continue" cancel-text="Keep Editing" width="500px"><p class="font-sans text-lg xs:text-base">You have a prescription "<!>" that hasn't been added. Please add it or continue.</p></photon-dialog></div>`),TD=C('<div class="flex flex-row sm:flex-col md:flex-col lg:flex-row gap-2 justify-end items-end"><photon-button size="sm" variant="outline" loading-text="Save prescriptions">Save prescriptions</photon-button><photon-button size="sm" loading-text="Save and create order">Save and create order</photon-button></div>'),ND=C('<div class="w-full h-full bg-[#f7f4f4]"><div class="p-4 w-full h-full sm:w-[600px] xs:mx-auto"><photon-prescribe-workflow hide-submit="true"></photon-prescribe-workflow></div></div>'),ID=C('<div class="pt-2"><sl-alert variant="danger" open><div class="flex items-start xs:items-center gap-4"><sl-icon slot="icon" name="exclamation-octagon" class="text-red-500" style="font-size: 24px;"></sl-icon><p class="font-sans"></p></div></sl-alert></div>'),AD=e=>e().notes?.value.length>0||e().instructions?.value.length>0||e().treatment?.value||e().patient?.value||e().dispenseAsWritten?.value!=!1||e().dispenseQuantity?.value!=1||e().dispenseUnit?.value!="Each"||e().daysSupply?.value!=30||e().refillsInput?.value!=0||e().addToTemplates?.value!=!1||e().effectiveDate?.value!=ic(new Date,"yyyy-MM-dd").toString()||e().draftPrescriptions?.value.length>0;$e("photon-multirx-form-wrapper",{hideTemplates:!1,patientId:void 0,templateIds:void 0},e=>{let t;const r=at(),[n,i]=L(!1),[o,a]=L([]),[s,c]=L(!1),[l,u]=L(!1),[d,f]=L(),[h,p]=L(),[m,v]=L(!1);Tt(async()=>{const S=await r.getSDK().authentication.getAccessToken();CD(S).permissions?.includes("write:prescription")&&c(!0)});const y=(S,E,x)=>{const N=new CustomEvent("photon-prescriptions-created",{composed:!0,bubbles:!0,detail:{patientId:x,prescriptionIds:E,createOrder:S}});t?.dispatchEvent(N)},b=()=>{const S=new CustomEvent("photon-prescriptions-closed",{composed:!0,bubbles:!0,detail:{}});t?.dispatchEvent(S)},g=async(S,E,x)=>{a([]);const N=["patient","draftPrescriptions"];if(E.validate(N),!E.hasErrors(N)){u(!0),E.updateFormValue({key:"errors",value:[]});const j=r.getSDK().clinical.prescription.createPrescriptions({}),q=r.getSDK().clinical.prescriptionTemplate.createPrescriptionTemplate({}),A=[];for(const T of S.draftPrescriptions.value){if(T.addToTemplates)try{const{errors:z}=await q({variables:{catalogId:T.catalogId,treatmentId:T.treatment.id,dispenseAsWritten:T.dispenseAsWritten,dispenseQuantity:T.dispenseQuantity,dispenseUnit:T.dispenseUnit,fillsAllowed:T.refillsInput+1,daysSupply:T.daysSupply,instructions:T.instructions,notes:T.notes},awaitRefetchQueries:!1});z&&a(z)}catch(z){a([z])}const F={daysSupply:T.daysSupply,dispenseAsWritten:T.dispenseAsWritten,dispenseQuantity:T.dispenseQuantity,dispenseUnit:T.dispenseUnit,effectiveDate:T.effectiveDate,instructions:T.instructions,notes:T.notes,patientId:S.patient?.value.id,fillsAllowed:T.refillsInput+1,treatmentId:T.treatment.id};A.push(F)}if(o().length>0)return;try{const{data:T,errors:F}=await j({variables:{prescriptions:A},refetchQueries:[],awaitRefetchQueries:!1});if(F){a(F);return}y(x,T.createPrescriptions.map(z=>z.id),S.patient?.value.id)}catch(T){a([T])}u(!1)}},_=()=>g(d(),h(),!0);return(()=>{const S=V(()=>document.importNode(PD,!0)),E=S.firstChild,x=E.firstChild,N=x.firstChild,M=N.nextSibling;M.nextSibling;const j=t;return typeof j=="function"?ee(j,S):t=S,E.addEventListener("photon-dialog-confirmed",()=>{v(!1),_()}),E.addEventListener("photon-dialog-canceled",()=>{v(!1)}),E._$owner=P(),w(x,()=>d()?.treatment?.value?.name,M),w(S,U(c$,{closeTitle:"Lose unsaved prescriptions?",closeBody:"You will not be able to recover unsaved prescriptions.",onClosed:()=>{b(),e.open=!1},checkShouldWarn:()=>AD(d),title:"New Prescriptions",titleIconName:"prescription",get headerRight(){return(()=>{const q=V(()=>document.importNode(TD,!0)),A=q.firstChild,T=A.nextSibling;return A.addEventListener("photon-clicked",()=>g(d(),h(),!1)),A._$owner=P(),T.addEventListener("photon-clicked",()=>d()?.treatment?.value?.name?v(!0):_()),T._$owner=P(),W(F=>{const z=!n()||!s(),Y=l(),ne=!n()||!s(),ae=l();return z!==F._v$&&(A.disabled=F._v$=z),Y!==F._v$2&&(A.loading=F._v$2=Y),ne!==F._v$3&&(T.disabled=F._v$3=ne),ae!==F._v$4&&(T.loading=F._v$4=ae),F},{_v$:void 0,_v$2:void 0,_v$3:void 0,_v$4:void 0}),q})()},get form(){return(()=>{const q=V(()=>document.importNode(ND,!0)),A=q.firstChild,T=A.firstChild;return w(q,U(re,{get when(){return o().length>0},get children(){return U(Rl,{get each(){return o()},children:F=>(()=>{const z=V(()=>document.importNode(ID,!0)),Y=z.firstChild,ne=Y.firstChild,ae=ne.firstChild,R=ae.nextSibling;return Y._$owner=P(),ae._$owner=P(),w(R,()=>F.message),z})()})}}),A),T.addEventListener("photon-form-validate",F=>{i(F.detail.canSubmit),p(F.detail.actions),f(F.detail.form)}),T._$owner=P(),W(F=>{const z=e.hideTemplates,Y=l(),ne=e.patientId,ae=e.templateIds;return z!==F._v$5&&(T.hideTemplates=F._v$5=z),Y!==F._v$6&&(T.loading=F._v$6=Y),ne!==F._v$7&&(T.patientId=F._v$7=ne),ae!==F._v$8&&(T.templateIds=F._v$8=ae),F},{_v$5:void 0,_v$6:void 0,_v$7:void 0,_v$8:void 0}),q})()}}),null),W(()=>E.open=m()),S})()});
3702
+ `}};Sr.styles=oD;$([Er()],Sr.prototype,"checked",2);$([Er()],Sr.prototype,"hasFocus",2);$([S()],Sr.prototype,"value",2);$([S({reflect:!0})],Sr.prototype,"size",2);$([S({type:Boolean,reflect:!0})],Sr.prototype,"disabled",2);$([De("checked")],Sr.prototype,"handleCheckedChange",1);$([De("disabled",{waitUntilFirstUpdate:!0})],Sr.prototype,"handleDisabledChange",1);Sr=$([_t("sl-radio")],Sr);const aD=C('<div><style></style><photon-card><div class="flex items-center gap-2"><p class="font-sans flex-grow text-gray-600 text-sm"><slot></slot></p><input type="radio"></div></photon-card></div>');it("https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.0.0-beta.82/dist/");$e("photon-radio-card",{selected:!1,value:""},e=>{let t;const r=()=>{const n=new CustomEvent("photon-radio-selected",{composed:!0,bubbles:!0,detail:{value:e.value}});t?.dispatchEvent(n)};return(()=>{const n=V(()=>document.importNode(aD,!0)),i=n.firstChild,o=i.nextSibling,a=o.firstChild,s=a.firstChild,c=s.firstChild,l=s.nextSibling,u=t;return typeof u=="function"?ee(u,n):t=n,w(i,ze),o.addEventListener("click",()=>r()),o._$owner=P(),c._$owner=P(),W(()=>l.checked=e.selected),n})()});function sD(e){const[t,r]=yn(Array());return xe(()=>{if(!e)return;const n=()=>{r(e()?.assignedElements()||[])};return e()?.addEventListener("slotchange",n)},[e]),t}const lD=C('<div><style></style><div class="flex flex-col gap-3"><slot></slot></div></div>');it("https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.0.0-beta.82/dist/");$e("photon-radio-group",{},()=>{let e;const[t,r]=M(),n=sD(t),i=o=>{const a=new CustomEvent("photon-option-selected",{composed:!0,bubbles:!0,detail:{value:o}});e?.dispatchEvent(a)};return(()=>{const o=lD.cloneNode(!0),a=o.firstChild,s=a.nextSibling,c=s.firstChild,l=e;return typeof l=="function"?ee(l,o):e=o,o.addEventListener("photon-radio-selected",u=>{u.stopImmediatePropagation(),u.stopPropagation();for(const d of n)d.value.id===u.detail.value.id||d.value===u.detail.value?d.selected=!0:d.selected=!1;i(u.detail.value)}),w(a,ze),ee(u=>r(u),c),c._$owner=P(),o})()});const cD=C('<div><photon-dialog cancel-text="Back" confirm-text="Select Medication" width="min-content"><photon-med-search></photon-med-search></photon-dialog></div>');$e("photon-med-search-dialog",{open:{value:!1,reflect:!0,notify:!1,attribute:"open",parse:!0}},e=>{const t=at();let r;const[n,i]=M(void 0),[o,a]=M(!1),[s,c]=M(""),[l,u]=M(!1),d=()=>{const f=new CustomEvent("photon-medication-selected",{composed:!0,bubbles:!0,detail:{medication:n()}});r?.dispatchEvent(f)};return(()=>{const f=V(()=>document.importNode(cD,!0)),h=f.firstChild,p=h.firstChild,m=r;return typeof m=="function"?ee(m,f):r=f,f.addEventListener("photon-form-updated",v=>{i(v.detail.medication),a(v.detail.addToCatalog),c(v.detail.catalogId)}),h.addEventListener("photon-dialog-confirmed",async()=>{u(!0),o()&&await t.getSDK().clinical.catalog.addToCatalog({})({variables:{catalogId:s(),treatmentId:n()?.id},awaitRefetchQueries:!1}),d(),u(!1),e.open=!1}),h.addEventListener("photon-dialog-canceled",()=>{e.open=!1}),h._$owner=P(),p._$owner=P(),W(v=>{const y=e.open,b=l(),g=!n();return y!==v._v$&&(h.open=v._v$=y),b!==v._v$2&&(h.loading=v._v$2=b),g!==v._v$3&&(h.disableSubmit=v._v$3=g),v},{_v$:void 0,_v$2:void 0,_v$3:void 0}),f})()});const uD=C('<div class="min-w-[125px]"></div>'),Pg=[{id:"mcg/kg",name:"mcg/kg"},{id:"mg/kg",name:"mg/kg"},{id:"g/kg",name:"g/kg"}],dD=()=>{const[e,t]=M(""),r=i=>{const o=new CustomEvent("photon-unit-selected",{composed:!0,bubbles:!0,detail:{unit:i}});n?.dispatchEvent(o)};let n;return(()=>{const i=uD.cloneNode(!0),o=n;return typeof o=="function"?ee(o,i):n=i,i.addEventListener("photon-data-selected",a=>{r(a.detail.data.name)}),w(i,U(Nt,{get data(){return Pg.filter(a=>a.name.includes(e()))},forceLabelSize:!0,isLoading:!1,disabled:!1,placeholder:"Select a unit...",hasMore:!1,displayAccessor:a=>a.name,onSearchChange:async a=>t(a),onHide:async()=>{t("")},noDataMsg:"No units found",required:!1,get selectedData(){return Pg[1]}})),i})()},fD=C('<div class="min-w-[125px]"></div>'),Tg=[{id:"mg",name:"mg"},{id:"mcg",name:"mcg"},{id:"g",name:"g"}],hD=()=>{const[e,t]=M(""),r=i=>{const o=new CustomEvent("photon-unit-selected",{composed:!0,bubbles:!0,detail:{unit:i}});n?.dispatchEvent(o)};let n;return(()=>{const i=fD.cloneNode(!0),o=n;return typeof o=="function"?ee(o,i):n=i,i.addEventListener("photon-data-selected",a=>{r(a.detail.data.name)}),w(i,U(Nt,{get data(){return Tg.filter(a=>a.name.includes(e()))},forceLabelSize:!0,isLoading:!1,disabled:!1,placeholder:"Select a unit...",hasMore:!1,displayAccessor:a=>a.name,onSearchChange:async a=>t(a),onHide:async()=>{t("")},noDataMsg:"No units found",required:!1,get selectedData(){return Tg[0]}})),i})()},pD=C('<div class="min-w-[125px]"></div>'),Ng=[{id:"mL",name:"mL"},{id:"L",name:"L"}],mD=()=>{const[e,t]=M(""),r=i=>{const o=new CustomEvent("photon-unit-selected",{composed:!0,bubbles:!0,detail:{unit:i}});n?.dispatchEvent(o)};let n;return(()=>{const i=pD.cloneNode(!0),o=n;return typeof o=="function"?ee(o,i):n=i,i.addEventListener("photon-data-selected",a=>{r(a.detail.data.name)}),w(i,U(Nt,{get data(){return Ng.filter(a=>a.name.includes(e()))},forceLabelSize:!0,isLoading:!1,disabled:!1,placeholder:"Select a unit...",hasMore:!1,displayAccessor:a=>a.name,onSearchChange:async a=>t(a),onHide:async()=>{t("")},noDataMsg:"No units found",required:!1,get selectedData(){return Ng[0]}})),i})()},vD=C('<div class="min-w-[125px]"></div>'),Ig=[{id:"lbs",name:"lbs"},{id:"kgs",name:"kgs"}],yD=()=>{const[e,t]=M(""),r=i=>{const o=new CustomEvent("photon-unit-selected",{composed:!0,bubbles:!0,detail:{unit:i}});n?.dispatchEvent(o)};let n;return(()=>{const i=vD.cloneNode(!0),o=n;return typeof o=="function"?ee(o,i):n=i,i.addEventListener("photon-data-selected",a=>{r(a.detail.data.name)}),w(i,U(Nt,{get data(){return Ig.filter(a=>a.name.includes(e()))},forceLabelSize:!0,isLoading:!1,disabled:!1,placeholder:"Select a unit...",hasMore:!1,displayAccessor:a=>a.name,onSearchChange:async a=>t(a),onHide:async()=>{t("")},noDataMsg:"No units found",required:!1,get selectedData(){return Ig[0]}})),i})()},gD=C('<div><style></style><div class="flex flex-col xs:flex-row items-start xs:items-center gap-2 pb-2"><p class="font-sans text-lg">Selected Drug: </p></div><div class="flex flex-col"><p class="font-sans pb-1">Input</p><div class="flex items-center"><p class="font-sans text-gray-700 text-sm mb-7 basis-56 xs:basis-60">Dosage</p><photon-number-input min="0" value="0" class="mb-1.5 max-w-[140px] pl-3 xs:pl-4 pr-3"></photon-number-input></div><div class="flex items-center"><p class="font-sans text-gray-700 text-sm mb-7 basis-56 xs:basis-60">Weight</p><photon-number-input min="0" value="0" class="mb-1.5 max-w-[140px] pl-3 xs:pl-4 pr-3"></photon-number-input></div><p class="font-sans pb-1">Liquid Formation</p><div class="flex items-center"><p class="font-sans text-gray-700 text-sm mb-7 basis-56 xs:basis-60">Drug Amount</p><photon-number-input min="0" value="0" class="mb-1.5 max-w-[140px] pl-3 xs:pl-4 pr-3 flex-shrink"></photon-number-input></div><div class="flex items-center"><p class="font-sans text-gray-700 text-sm mb-7 basis-56 xs:basis-60">Per Volume</p><photon-number-input min="0" value="0" class="mb-1.5 max-w-[140px] pl-3 xs:pl-4 pr-3"></photon-number-input></div><p class="font-sans">Result</p><div class="flex items-center"><p class="font-sans text-gray-700 text-sm mb-7 basis-36 xs:basis-[10.5rem]">Dose</p><photon-text-input class="mb-1.5 max-w-[180px] pl-3 pr-3"></photon-text-input><photon-button class="mb-7">Use<sl-icon name="chevron-right" slot="postfix"></sl-icon></photon-button></div><div class="flex items-center"><p class="font-sans text-gray-700 text-sm mb-7 basis-36 xs:basis-[10.5rem]">Liquid Dose</p><photon-text-input class="mb-1.5 max-w-[180px] pl-3 pr-3"></photon-text-input><photon-button class="mb-7">Use<sl-icon name="chevron-right" slot="postfix"></sl-icon></photon-button></div></div></div>'),bD=C("<p></p>"),$D=C('<p class="text-gray-500 font-sans italic">None selected</p>'),wu=(e,t)=>!!((t==="kgs"||t==="g")&&e.includes("kg")||(t==="lbs"||t==="oz")&&e.includes("lb")),wD=(e,t)=>e.includes("kg")&&t.unit==="oz"?t.value/16*.453592:e.includes("kg")&&t.unit==="lbs"?t.value*.453592:e.includes("lb")&&t.unit==="kgs"?t.value*2.20462:e.includes("lb")&&t.unit==="g"?t.value/1e3*2.20462:0,_D=(e,t)=>t==="mcg"&&e.split("/")[0]==="mcg"||t==="mg"&&e.split("/")[0]==="mg"||t==="g"&&e.split("/")[0]==="g",xD=(e,t)=>e.includes("mcg")&&t.unit==="mcg"?t.value/(1e3*1e3):e.includes("mcg")&&t.unit==="g"?t.value*(1e3*1e3):e.includes("mg")&&t.unit==="mcg"?t.value/1e3:e.includes("mg")&&t.unit==="g"?t.value*1e3:e.includes("g")&&t.unit==="mcg"?t.value/(1e3*1e3):e.includes("g")&&t.unit==="mg"?t.value/1e3:0,SD=(e,t)=>wu(e.unit,t.unit)&&t.unit==="g"?e.value*(t.value/1e3):wu(e.unit,t.unit)&&t.unit==="oz"?e.value*(t.value/16):wu(e.unit,t.unit)?e.value*t.value:e.value*wD(e.unit,t),kD=(e,t,r,n,i)=>r===0||r.toString().length===0||parseInt(r.toString(),10)===0||window.isNaN(r)?0:_D(t,n)?e*i/r:e*i/xD(t,{value:r,unit:n});$e("photon-dosage-calculator",{medication:void 0},e=>{let t;const[r,n]=M(0),[i,o]=M(0),[a,s]=M(0),[c,l]=M(0),[u,d]=M("mg/kg"),[f,h]=M("lbs"),[p,m]=M("mg"),[v,y]=M("mL"),[b,g]=M(""),[_,k]=M(""),E=x=>{const T=new CustomEvent("photon-dosage-selected",{composed:!0,bubbles:!0,detail:{value:Number(x?_().split(" ")[0]:b().split(" ")[0]),unit:x?_().split(" ")[1]:b().split(" ")[1]}});t?.dispatchEvent(T)};return xe(()=>{let x=SD({value:r(),unit:u()},{value:a(),unit:f()});x.toString().split(".").length>1&&x.toString().split(".")[1].length>4&&(x=parseFloat(x.toFixed(4))),g(`${x} ${u().split("/")[0]}`);let T=kD(x,u().split("/")[0],i(),p(),c());i.toString().split(".").length>1&&i.toString().split(".")[1].length>4&&(T=parseFloat(T.toFixed(4))),k(`${T} ${v()}`)},[r,u,f,a,i,c,p,v]),(()=>{const x=V(()=>document.importNode(gD,!0)),T=x.firstChild,j=T.nextSibling;j.firstChild;const z=j.nextSibling,K=z.firstChild,D=K.nextSibling,L=D.firstChild,R=L.nextSibling,F=D.nextSibling,q=F.firstChild,re=q.nextSibling,ae=F.nextSibling,A=ae.nextSibling,me=A.firstChild,_e=me.nextSibling,I=A.nextSibling,xt=I.firstChild,St=xt.nextSibling,Mt=I.nextSibling,It=Mt.nextSibling,G=It.firstChild,Y=G.nextSibling,X=Y.nextSibling,ie=X.firstChild,ue=ie.nextSibling,de=It.nextSibling,Ue=de.firstChild,Me=Ue.nextSibling,st=Me.nextSibling,dr=st.firstChild,gn=dr.nextSibling,Vr=t;return typeof Vr=="function"?ee(Vr,x):t=x,w(T,ze),w(j,(()=>{const Ze=pe(()=>!!e.medication);return()=>Ze()?(()=>{const qi=bD.cloneNode(!0);return w(qi,()=>e.medication.name),qi})():$D.cloneNode(!0)})(),null),D.addEventListener("photon-input-changed",Ze=>{n(Ze.detail.input)}),D.addEventListener("photon-unit-selected",Ze=>{d(Ze.detail.unit)}),R._$owner=P(),w(D,U(dD,{}),null),F.addEventListener("photon-input-changed",Ze=>{s(Ze.detail.input)}),F.addEventListener("photon-unit-selected",Ze=>{h(Ze.detail.unit)}),re._$owner=P(),w(F,U(yD,{}),null),A.addEventListener("photon-input-changed",Ze=>{o(Ze.detail.input)}),A.addEventListener("photon-unit-selected",Ze=>{m(Ze.detail.unit)}),_e._$owner=P(),w(A,U(hD,{}),null),I.addEventListener("photon-input-changed",Ze=>{l(Ze.detail.input)}),I.addEventListener("photon-unit-selected",Ze=>{y(Ze.detail.unit)}),St._$owner=P(),w(I,U(mD,{}),null),Y.disabled=!0,Y._$owner=P(),X.addEventListener("photon-clicked",()=>E(!1)),X._$owner=P(),ue._$owner=P(),Me.disabled=!0,Me._$owner=P(),st.addEventListener("photon-clicked",()=>E(!0)),st._$owner=P(),gn._$owner=P(),W(()=>Y.value=b()??"0"),W(()=>Me.value=_()??"0"),x})()});const ED=C('<div><photon-dialog label="Dosage Calculator"><photon-dosage-calculator></photon-dosage-calculator></photon-dialog></div>');$e("photon-dosage-calculator-dialog",{open:{value:!1,reflect:!0,notify:!1,attribute:"open",parse:!0},medication:{value:void 0,reflect:!0,notify:!1,attribute:"medication",parse:!0}},e=>{at();let t;const r=(n,i)=>{const o=new CustomEvent("photon-dose-selected",{composed:!0,bubbles:!0,detail:{value:n,unit:i}});t?.dispatchEvent(o)};return(()=>{const n=V(()=>document.importNode(ED,!0)),i=n.firstChild,o=i.firstChild,a=t;return typeof a=="function"?ee(a,n):t=n,n.addEventListener("photon-dosage-selected",s=>{s.stopImmediatePropagation(),s.stopPropagation(),r(s.detail.value,s.detail.unit),e.open=!1}),i.header=!0,i.hideFooter=!0,i.addEventListener("photon-dialog-canceled",()=>{e.open=!1}),i._$owner=P(),o._$owner=P(),W(s=>{const c=e.open,l=e.medication;return c!==s._v$&&(i.open=s._v$=c),l!==s._v$2&&(o.medication=s._v$2=l),s},{_v$:void 0,_v$2:void 0}),n})()});function eh(e){this.message=e}eh.prototype=new Error,eh.prototype.name="InvalidCharacterError";var Ag=typeof window<"u"&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new eh("'atob' failed: The string to be decoded is not correctly encoded.");for(var r,n,i=0,o=0,a="";n=t.charAt(o++);~n&&(r=i%4?64*r+n:n,i++%4)?a+=String.fromCharCode(255&r>>(-2*i&6)):0)n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(n);return a};function OD(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(r){return decodeURIComponent(Ag(r).replace(/(.)/g,function(n,i){var o=i.charCodeAt(0).toString(16).toUpperCase();return o.length<2&&(o="0"+o),"%"+o}))}(t)}catch{return Ag(t)}}function Nl(e){this.message=e}function CD(e,t){if(typeof e!="string")throw new Nl("Invalid token specified");var r=(t=t||{}).header===!0?0:1;try{return JSON.parse(OD(e.split(".")[r]))}catch(n){throw new Nl("Invalid token specified: "+n.message)}}Nl.prototype=new Error,Nl.prototype.name="InvalidTokenError";const PD=C(`<div><photon-dialog label="Lose Unsaved Prescription?" confirm-text="Yes, Continue" cancel-text="Keep Editing" width="500px"><p class="font-sans text-lg xs:text-base">You have a prescription "<!>" that hasn't been added. Please add it or continue.</p></photon-dialog></div>`),TD=C('<div class="flex flex-row sm:flex-col md:flex-col lg:flex-row gap-2 justify-end items-end"><photon-button size="sm" variant="outline" loading-text="Save prescriptions">Save prescriptions</photon-button><photon-button size="sm" loading-text="Save and create order">Save and create order</photon-button></div>'),ND=C('<div class="w-full h-full bg-[#f7f4f4]"><div class="p-4 w-full h-full sm:w-[600px] xs:mx-auto"><photon-prescribe-workflow hide-submit="true"></photon-prescribe-workflow></div></div>'),ID=C('<div class="pt-2"><sl-alert variant="danger" open><div class="flex items-start xs:items-center gap-4"><sl-icon slot="icon" name="exclamation-octagon" class="text-red-500" style="font-size: 24px;"></sl-icon><p class="font-sans"></p></div></sl-alert></div>'),AD=e=>e().notes?.value.length>0||e().instructions?.value.length>0||e().treatment?.value||e().patient?.value||e().dispenseAsWritten?.value!=!1||e().dispenseQuantity?.value!=1||e().dispenseUnit?.value!="Each"||e().daysSupply?.value!=30||e().refillsInput?.value!=0||e().addToTemplates?.value!=!1||e().effectiveDate?.value!=oc(new Date,"yyyy-MM-dd").toString()||e().draftPrescriptions?.value.length>0;$e("photon-multirx-form-wrapper",{hideTemplates:!1,patientId:void 0,templateIds:void 0},e=>{let t;const r=at(),[n,i]=M(!1),[o,a]=M([]),[s,c]=M(!1),[l,u]=M(!1),[d,f]=M(),[h,p]=M(),[m,v]=M(!1),{actions:y}=nc;Tt(async()=>{const E=await r.getSDK().authentication.getAccessToken();CD(E).permissions?.includes("write:prescription")&&c(!0)});const b=(E,x,T)=>{const j=new CustomEvent("photon-prescriptions-created",{composed:!0,bubbles:!0,detail:{patientId:T,prescriptionIds:x,createOrder:E}});t?.dispatchEvent(j)},g=()=>{const E=new CustomEvent("photon-prescriptions-closed",{composed:!0,bubbles:!0,detail:{}});t?.dispatchEvent(E)},_=async(E,x,T)=>{a([]);const j=["patient","draftPrescriptions"];if(x.validate(j),!x.hasErrors(j)){u(!0),x.updateFormValue({key:"errors",value:[]});const K=r.getSDK().clinical.prescription.createPrescriptions({}),D=r.getSDK().clinical.prescriptionTemplate.createPrescriptionTemplate({}),L=[];for(const R of E.draftPrescriptions.value){if(R.addToTemplates)try{const{errors:q}=await D({variables:{catalogId:R.catalogId,treatmentId:R.treatment.id,dispenseAsWritten:R.dispenseAsWritten,dispenseQuantity:R.dispenseQuantity,dispenseUnit:R.dispenseUnit,fillsAllowed:R.refillsInput+1,daysSupply:R.daysSupply,instructions:R.instructions,notes:R.notes},awaitRefetchQueries:!1});q&&a(q)}catch(q){a([q])}const F={daysSupply:R.daysSupply,dispenseAsWritten:R.dispenseAsWritten,dispenseQuantity:R.dispenseQuantity,dispenseUnit:R.dispenseUnit,effectiveDate:R.effectiveDate,instructions:R.instructions,notes:R.notes,patientId:E.patient?.value.id,fillsAllowed:R.refillsInput+1,treatmentId:R.treatment.id};L.push(F)}if(o().length>0)return;try{const{data:R,errors:F}=await K({variables:{prescriptions:L},refetchQueries:[],awaitRefetchQueries:!1});if(F){a(F);return}b(T,R.createPrescriptions.map(q=>q.id),E.patient?.value.id)}catch(R){a([R])}u(!1)}},k=()=>_(d(),h(),!0);return(()=>{const E=V(()=>document.importNode(PD,!0)),x=E.firstChild,T=x.firstChild,j=T.firstChild,z=j.nextSibling;z.nextSibling;const K=t;return typeof K=="function"?ee(K,E):t=E,x.addEventListener("photon-dialog-confirmed",()=>{v(!1),k()}),x.addEventListener("photon-dialog-canceled",()=>{v(!1)}),x._$owner=P(),w(T,()=>d()?.treatment?.value?.name,z),w(E,U(c$,{closeTitle:"Lose unsaved prescriptions?",closeBody:"You will not be able to recover unsaved prescriptions.",onClosed:()=>{g(),y.clearSelectedPatient(),e.open=!1},checkShouldWarn:()=>AD(d),title:"New Prescriptions",titleIconName:"prescription",get headerRight(){return(()=>{const D=V(()=>document.importNode(TD,!0)),L=D.firstChild,R=L.nextSibling;return L.addEventListener("photon-clicked",()=>_(d(),h(),!1)),L._$owner=P(),R.addEventListener("photon-clicked",()=>d()?.treatment?.value?.name?v(!0):k()),R._$owner=P(),W(F=>{const q=!n()||!s(),re=l(),ae=!n()||!s(),A=l();return q!==F._v$&&(L.disabled=F._v$=q),re!==F._v$2&&(L.loading=F._v$2=re),ae!==F._v$3&&(R.disabled=F._v$3=ae),A!==F._v$4&&(R.loading=F._v$4=A),F},{_v$:void 0,_v$2:void 0,_v$3:void 0,_v$4:void 0}),D})()},get form(){return(()=>{const D=V(()=>document.importNode(ND,!0)),L=D.firstChild,R=L.firstChild;return w(D,U(ne,{get when(){return o().length>0},get children(){return U(Rl,{get each(){return o()},children:F=>(()=>{const q=V(()=>document.importNode(ID,!0)),re=q.firstChild,ae=re.firstChild,A=ae.firstChild,me=A.nextSibling;return re._$owner=P(),A._$owner=P(),w(me,()=>F.message),q})()})}}),L),R.addEventListener("photon-form-validate",F=>{i(F.detail.canSubmit),p(F.detail.actions),f(F.detail.form)}),R._$owner=P(),W(F=>{const q=e.hideTemplates,re=l(),ae=e.patientId,A=e.templateIds;return q!==F._v$5&&(R.hideTemplates=F._v$5=q),re!==F._v$6&&(R.loading=F._v$6=re),ae!==F._v$7&&(R.patientId=F._v$7=ae),A!==F._v$8&&(R.templateIds=F._v$8=A),F},{_v$5:void 0,_v$6:void 0,_v$7:void 0,_v$8:void 0}),D})()}}),null),W(()=>x.open=m()),E})()});