UNPKG

@dnb/eufemia

Version:

DNB Eufemia Design System UI Library

4 lines 1.04 MB
import e,{createContext as t,useContext as n,useState as r,useCallback as o,useMemo as a,useRef as i,useEffect as s,Fragment as l,forwardRef as c,useReducer as u,useLayoutEffect as d}from"react";import*as f from"../icons/dnb/primary_icons";import*as p from"../icons/dnb/primary_icons_medium";import{createPortal as m}from"react-dom";function h(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var v,g,b,A,y,w,P,_,O,C,E,k,x,j,S,D,T,H,B,N,M,F,X,z,V,R,K,L,I={},U="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function Q(){if(g)return v;g=1;var e=function(e){return e&&e.Math===Math&&e};return v=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof U&&U)||e("object"==typeof this&&this)||function(){return this}()||Function("return this")()}function $(){if(w)return y;w=1;var e="object"==typeof document&&document.all;return y=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(e){return"function"==typeof e}}function q(){if(_)return P;_=1;var e=$();return P=function(t){return"object"==typeof t?null!==t:e(t)}}function Z(){if(C)return O;C=1;var e=Q(),t=q(),n=e.document,r=t(n)&&t(n.createElement);return O=function(e){return r?n.createElement(e):{}}}function W(){return j?x:(j=1,x=function(e){try{return!!e()}catch(e){return!0}})}function G(){if(D)return S;D=1;var e=W();return S=!e((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))}function Y(){if(H)return T;H=1;var e=G(),t=Function.prototype,n=t.call,r=e&&t.bind.bind(n,n);return T=e?r:function(e){return function(){return n.apply(e,arguments)}},T}function J(){if(N)return B;N=1;var e=Y(),t=e({}.toString),n=e("".slice);return B=function(e){return n(t(e),8,-1)}}function ee(){if(F)return M;F=1;var e=Y(),t=W(),n=J(),r=Object,o=e("".split);return M=t((function(){return!r("z").propertyIsEnumerable(0)}))?function(e){return"String"===n(e)?o(e,""):r(e)}:r}function te(){return z?X:(z=1,X=function(e){return null==e})}function ne(){if(R)return V;R=1;var e=te(),t=TypeError;return V=function(n){if(e(n))throw new t("Can't call method on "+n);return n}}function re(){if(L)return K;L=1;var e=ee(),t=ne();return K=function(n){return e(t(n))}}var oe,ae,ie,se,le,ce,ue,de,fe,pe,me,he,ve,ge,be,Ae,ye,we,Pe,_e,Oe,Ce,Ee,ke,xe,je={exports:{}};function Se(){return ae?oe:(ae=1,oe=!1)}function De(){if(se)return ie;se=1;var e=Q(),t=Object.defineProperty;return ie=function(n,r){try{t(e,n,{value:r,configurable:!0,writable:!0})}catch(t){e[n]=r}return r}}function Te(){if(le)return je.exports;le=1;var e=Se(),t=Q(),n=De(),r="__core-js_shared__",o=je.exports=t[r]||n(r,{});return(o.versions||(o.versions=[])).push({version:"3.41.0",mode:e?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.41.0/LICENSE",source:"https://github.com/zloirock/core-js"}),je.exports}function He(){if(ue)return ce;ue=1;var e=Te();return ce=function(t,n){return e[t]||(e[t]=n||{})}}function Be(){if(fe)return de;fe=1;var e=ne(),t=Object;return de=function(n){return t(e(n))}}function Ne(){if(me)return pe;me=1;var e=Y(),t=Be(),n=e({}.hasOwnProperty);return pe=Object.hasOwn||function(e,r){return n(t(e),r)}}function Me(){if(ve)return he;ve=1;var e=Y(),t=0,n=Math.random(),r=e(1..toString);return he=function(e){return"Symbol("+(void 0===e?"":e)+")_"+r(++t+n,36)}}function Fe(){if(ye)return Ae;ye=1;var e,t,n=Q(),r=function(){if(be)return ge;be=1;var e=Q().navigator,t=e&&e.userAgent;return ge=t?String(t):""}(),o=n.process,a=n.Deno,i=o&&o.versions||a&&a.version,s=i&&i.v8;return s&&(t=(e=s.split("."))[0]>0&&e[0]<4?1:+(e[0]+e[1])),!t&&r&&(!(e=r.match(/Edge\/(\d+)/))||e[1]>=74)&&(e=r.match(/Chrome\/(\d+)/))&&(t=+e[1]),Ae=t}function Xe(){if(Pe)return we;Pe=1;var e=Fe(),t=W(),n=Q().String;return we=!!Object.getOwnPropertySymbols&&!t((function(){var t=Symbol("symbol detection");return!n(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&e&&e<41}))}function ze(){if(Oe)return _e;Oe=1;var e=Xe();return _e=e&&!Symbol.sham&&"symbol"==typeof Symbol.iterator}function Ve(){if(Ee)return Ce;Ee=1;var e=Q(),t=He(),n=Ne(),r=Me(),o=Xe(),a=ze(),i=e.Symbol,s=t("wks"),l=a?i.for||i:i&&i.withoutSetter||r;return Ce=function(e){return n(s,e)||(s[e]=o&&n(i,e)?i[e]:l("Symbol."+e)),s[e]}}function Re(){if(xe)return ke;xe=1;var e=q(),t=String,n=TypeError;return ke=function(r){if(e(r))return r;throw new n(t(r)+" is not an object")}}var Ke,Le,Ie,Ue,Qe={};function $e(){if(Le)return Ke;Le=1;var e=W();return Ke=!e((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))}function qe(){if(Ue)return Ie;Ue=1;var e=$e(),t=W();return Ie=e&&t((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))}var Ze,We,Ge,Ye,Je,et,tt,nt,rt,ot,at,it,st,lt,ct,ut,dt,ft,pt,mt,ht,vt,gt,bt,At,yt,wt,Pt,_t,Ot,Ct,Et,kt,xt,jt,St,Dt,Tt,Ht,Bt,Nt,Mt,Ft,Xt,zt,Vt,Rt,Kt,Lt,It,Ut,Qt,$t,qt,Zt,Wt,Gt,Yt,Jt,en,tn,nn,rn={};function on(){if(We)return Ze;We=1;var e=$e(),t=W(),n=Z();return Ze=!e&&!t((function(){return 7!==Object.defineProperty(n("div"),"a",{get:function(){return 7}}).a}))}function an(){if(Ye)return Ge;Ye=1;var e=G(),t=Function.prototype.call;return Ge=e?t.bind(t):function(){return t.apply(t,arguments)},Ge}function sn(){if(et)return Je;et=1;var e=Q(),t=$();return Je=function(n,r){return arguments.length<2?(o=e[n],t(o)?o:void 0):e[n]&&e[n][r];var o},Je}function ln(){if(nt)return tt;nt=1;var e=Y();return tt=e({}.isPrototypeOf)}function cn(){if(ot)return rt;ot=1;var e=sn(),t=$(),n=ln(),r=ze(),o=Object;return rt=r?function(e){return"symbol"==typeof e}:function(r){var a=e("Symbol");return t(a)&&n(a.prototype,o(r))}}function un(){if(it)return at;it=1;var e=String;return at=function(t){try{return e(t)}catch(e){return"Object"}}}function dn(){if(lt)return st;lt=1;var e=$(),t=un(),n=TypeError;return st=function(r){if(e(r))return r;throw new n(t(r)+" is not a function")}}function fn(){if(ut)return ct;ut=1;var e=dn(),t=te();return ct=function(n,r){var o=n[r];return t(o)?void 0:e(o)},ct}function pn(){if(ft)return dt;ft=1;var e=an(),t=$(),n=q(),r=TypeError;return dt=function(o,a){var i,s;if("string"===a&&t(i=o.toString)&&!n(s=e(i,o)))return s;if(t(i=o.valueOf)&&!n(s=e(i,o)))return s;if("string"!==a&&t(i=o.toString)&&!n(s=e(i,o)))return s;throw new r("Can't convert object to primitive value")}}function mn(){if(vt)return ht;vt=1;var e=function(){if(mt)return pt;mt=1;var e=an(),t=q(),n=cn(),r=fn(),o=pn(),a=Ve(),i=TypeError,s=a("toPrimitive");return pt=function(a,l){if(!t(a)||n(a))return a;var c,u=r(a,s);if(u){if(void 0===l&&(l="default"),c=e(u,a,l),!t(c)||n(c))return c;throw new i("Can't convert object to primitive value")}return void 0===l&&(l="number"),o(a,l)}}(),t=cn();return ht=function(n){var r=e(n,"string");return t(r)?r:r+""}}function hn(){if(gt)return rn;gt=1;var e=$e(),t=on(),n=qe(),r=Re(),o=mn(),a=TypeError,i=Object.defineProperty,s=Object.getOwnPropertyDescriptor,l="enumerable",c="configurable",u="writable";return rn.f=e?n?function(e,t,n){if(r(e),t=o(t),r(n),"function"==typeof e&&"prototype"===t&&"value"in n&&u in n&&!n[u]){var a=s(e,t);a&&a[u]&&(e[t]=n.value,n={configurable:c in n?n[c]:a[c],enumerable:l in n?n[l]:a[l],writable:!1})}return i(e,t,n)}:i:function(e,n,s){if(r(e),n=o(n),r(s),t)try{return i(e,n,s)}catch(e){}if("get"in s||"set"in s)throw new a("Accessors not supported");return"value"in s&&(e[n]=s.value),e},rn}function vn(){if(wt)return yt;wt=1;var e=function(){if(At)return bt;At=1;var e=Math.ceil,t=Math.floor;return bt=Math.trunc||function(n){var r=+n;return(r>0?t:e)(r)}}();return yt=function(t){var n=+t;return n!=n||0===n?0:e(n)},yt}function gn(){if(_t)return Pt;_t=1;var e=vn(),t=Math.max,n=Math.min;return Pt=function(r,o){var a=e(r);return a<0?t(a+o,0):n(a,o)}}function bn(){if(Ct)return Ot;Ct=1;var e=vn(),t=Math.min;return Ot=function(n){var r=e(n);return r>0?t(r,9007199254740991):0}}function An(){if(kt)return Et;kt=1;var e=bn();return Et=function(t){return e(t.length)}}function yn(){return Dt?St:(Dt=1,St={})}function wn(){if(Ht)return Tt;Ht=1;var e=Y(),t=Ne(),n=re(),r=function(){if(jt)return xt;jt=1;var e=re(),t=gn(),n=An(),r=function(r){return function(o,a,i){var s=e(o),l=n(s);if(0===l)return!r&&-1;var c,u=t(i,l);if(r&&a!=a){for(;l>u;)if((c=s[u++])!=c)return!0}else for(;l>u;u++)if((r||u in s)&&s[u]===a)return r||u||0;return!r&&-1}};return xt={includes:r(!0),indexOf:r(!1)}}().indexOf,o=yn(),a=e([].push);return Tt=function(e,i){var s,l=n(e),c=0,u=[];for(s in l)!t(o,s)&&t(l,s)&&a(u,s);for(;i.length>c;)t(l,s=i[c++])&&(~r(u,s)||a(u,s));return u},Tt}function Pn(){return Nt?Bt:(Nt=1,Bt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])}function _n(){if(Ft)return Mt;Ft=1;var e=wn(),t=Pn();return Mt=Object.keys||function(n){return e(n,t)}}function On(){if(Vt)return zt;Vt=1;var e=sn();return zt=e("document","documentElement")}function Cn(){if(Kt)return Rt;Kt=1;var e=He(),t=Me(),n=e("keys");return Rt=function(e){return n[e]||(n[e]=t(e))}}function En(){if(It)return Lt;It=1;var e,t=Re(),n=function(){if(Xt)return Qe;Xt=1;var e=$e(),t=qe(),n=hn(),r=Re(),o=re(),a=_n();return Qe.f=e&&!t?Object.defineProperties:function(e,t){r(e);for(var i,s=o(t),l=a(t),c=l.length,u=0;c>u;)n.f(e,i=l[u++],s[i]);return e},Qe}(),r=Pn(),o=yn(),a=On(),i=Z(),s=Cn(),l="prototype",c="script",u=s("IE_PROTO"),d=function(){},f=function(e){return"<"+c+">"+e+"</"+c+">"},p=function(e){e.write(f("")),e.close();var t=e.parentWindow.Object;return e=null,t},m=function(){try{e=new ActiveXObject("htmlfile")}catch(e){}var t,n,o;m="undefined"!=typeof document?document.domain&&e?p(e):(n=i("iframe"),o="java"+c+":",n.style.display="none",a.appendChild(n),n.src=String(o),(t=n.contentWindow.document).open(),t.write(f("document.F=Object")),t.close(),t.F):p(e);for(var s=r.length;s--;)delete m[l][r[s]];return m()};return o[u]=!0,Lt=Object.create||function(e,r){var o;return null!==e?(d[l]=t(e),o=new d,d[l]=null,o[u]=e):o=m(),void 0===r?o:n.f(o,r)}}function kn(){if(Qt)return Ut;Qt=1;var e=Ve(),t=En(),n=hn().f,r=e("unscopables"),o=Array.prototype;return void 0===o[r]&&n(o,r,{configurable:!0,value:t(null)}),Ut=function(e){o[r][e]=!0}}function xn(){return qt?$t:(qt=1,$t={})}function jn(){return Yt?Gt:(Yt=1,Gt=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}})}function Sn(){if(en)return Jt;en=1;var e=$e(),t=hn(),n=jn();return Jt=e?function(e,r,o){return t.f(e,r,n(1,o))}:function(e,t,n){return e[t]=n,e}}function Dn(){if(nn)return tn;nn=1;var e,t,n,r=function(){if(Wt)return Zt;Wt=1;var e=Q(),t=$(),n=e.WeakMap;return Zt=t(n)&&/native code/.test(String(n))}(),o=Q(),a=q(),i=Sn(),s=Ne(),l=Te(),c=Cn(),u=yn(),d="Object already initialized",f=o.TypeError,p=o.WeakMap;if(r||l.state){var m=l.state||(l.state=new p);m.get=m.get,m.has=m.has,m.set=m.set,e=function(e,t){if(m.has(e))throw new f(d);return t.facade=e,m.set(e,t),t},t=function(e){return m.get(e)||{}},n=function(e){return m.has(e)}}else{var h=c("state");u[h]=!0,e=function(e,t){if(s(e,h))throw new f(d);return t.facade=e,i(e,h,t),t},t=function(e){return s(e,h)?e[h]:{}},n=function(e){return s(e,h)}}return tn={set:e,get:t,has:n,enforce:function(r){return n(r)?t(r):e(r,{})},getterFor:function(e){return function(n){var r;if(!a(n)||(r=t(n)).type!==e)throw new f("Incompatible receiver, "+e+" required");return r}}}}var Tn,Hn,Bn={},Nn={};function Mn(){if(Tn)return Nn;Tn=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,n=t&&!e.call({1:2},1);return Nn.f=n?function(e){var n=t(this,e);return!!n&&n.enumerable}:e,Nn}function Fn(){if(Hn)return Bn;Hn=1;var e=$e(),t=an(),n=Mn(),r=jn(),o=re(),a=mn(),i=Ne(),s=on(),l=Object.getOwnPropertyDescriptor;return Bn.f=e?l:function(e,c){if(e=o(e),c=a(c),s)try{return l(e,c)}catch(e){}if(i(e,c))return r(!t(n.f,e,c),e[c])},Bn}var Xn,zn,Vn,Rn,Kn,Ln,In,Un={exports:{}};function Qn(){if(zn)return Xn;zn=1;var e=$e(),t=Ne(),n=Function.prototype,r=e&&Object.getOwnPropertyDescriptor,o=t(n,"name"),a=o&&"something"===function(){}.name,i=o&&(!e||e&&r(n,"name").configurable);return Xn={EXISTS:o,PROPER:a,CONFIGURABLE:i}}function $n(){if(Rn)return Vn;Rn=1;var e=Y(),t=$(),n=Te(),r=e(Function.toString);return t(n.inspectSource)||(n.inspectSource=function(e){return r(e)}),Vn=n.inspectSource}function qn(){if(Kn)return Un.exports;Kn=1;var e=Y(),t=W(),n=$(),r=Ne(),o=$e(),a=Qn().CONFIGURABLE,i=$n(),s=Dn(),l=s.enforce,c=s.get,u=String,d=Object.defineProperty,f=e("".slice),p=e("".replace),m=e([].join),h=o&&!t((function(){return 8!==d((function(){}),"length",{value:8}).length})),v=String(String).split("String"),g=Un.exports=function(e,t,n){"Symbol("===f(u(t),0,7)&&(t="["+p(u(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!r(e,"name")||a&&e.name!==t)&&(o?d(e,"name",{value:t,configurable:!0}):e.name=t),h&&n&&r(n,"arity")&&e.length!==n.arity&&d(e,"length",{value:n.arity});try{n&&r(n,"constructor")&&n.constructor?o&&d(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var i=l(e);return r(i,"source")||(i.source=m(v,"string"==typeof t?t:"")),e};return Function.prototype.toString=g((function(){return n(this)&&c(this).source||i(this)}),"toString"),Un.exports}function Zn(){if(In)return Ln;In=1;var e=$(),t=hn(),n=qn(),r=De();return Ln=function(o,a,i,s){s||(s={});var l=s.enumerable,c=void 0!==s.name?s.name:a;if(e(i)&&n(i,c,s),s.global)l?o[a]=i:r(a,i);else{try{s.unsafe?o[a]&&(l=!0):delete o[a]}catch(e){}l?o[a]=i:t.f(o,a,{value:i,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return o}}var Wn,Gn={};var Yn,Jn,er,tr,nr,rr,or,ar,ir,sr,lr,cr,ur,dr,fr,pr,mr,hr,vr,gr,br,Ar,yr,wr,Pr,_r,Or,Cr,Er,kr,xr,jr,Sr,Dr,Tr={};function Hr(){return Yn||(Yn=1,Tr.f=Object.getOwnPropertySymbols),Tr}function Br(){if(er)return Jn;er=1;var e=sn(),t=Y(),n=function(){if(Wn)return Gn;Wn=1;var e=wn(),t=Pn().concat("length","prototype");return Gn.f=Object.getOwnPropertyNames||function(n){return e(n,t)},Gn}(),r=Hr(),o=Re(),a=t([].concat);return Jn=e("Reflect","ownKeys")||function(e){var t=n.f(o(e)),i=r.f;return i?a(t,i(e)):t}}function Nr(){if(nr)return tr;nr=1;var e=Ne(),t=Br(),n=Fn(),r=hn();return tr=function(o,a,i){for(var s=t(a),l=r.f,c=n.f,u=0;u<s.length;u++){var d=s[u];e(o,d)||i&&e(i,d)||l(o,d,c(a,d))}}}function Mr(){if(ir)return ar;ir=1;var e=Q(),t=Fn().f,n=Sn(),r=Zn(),o=De(),a=Nr(),i=function(){if(or)return rr;or=1;var e=W(),t=$(),n=/#|\.prototype\./,r=function(n,r){var l=a[o(n)];return l===s||l!==i&&(t(r)?e(r):!!r)},o=r.normalize=function(e){return String(e).replace(n,".").toLowerCase()},a=r.data={},i=r.NATIVE="N",s=r.POLYFILL="P";return rr=r}();return ar=function(s,l){var c,u,d,f,p,m=s.target,h=s.global,v=s.stat;if(c=h?e:v?e[m]||o(m,{}):e[m]&&e[m].prototype)for(u in l){if(f=l[u],d=s.dontCallGetSet?(p=t(c,u))&&p.value:c[u],!i(h?u:m+(v?".":"#")+u,s.forced)&&void 0!==d){if(typeof f==typeof d)continue;a(f,d)}(s.sham||d&&d.sham)&&n(f,"sham",!0),r(c,u,f,s)}}}function Fr(){if(ur)return cr;ur=1;var e=Ne(),t=$(),n=Be(),r=Cn(),o=function(){if(lr)return sr;lr=1;var e=W();return sr=!e((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))}(),a=r("IE_PROTO"),i=Object,s=i.prototype;return cr=o?i.getPrototypeOf:function(r){var o=n(r);if(e(o,a))return o[a];var l=o.constructor;return t(l)&&o instanceof l?l.prototype:o instanceof i?s:null}}function Xr(){if(fr)return dr;fr=1;var e,t,n,r=W(),o=$(),a=q(),i=En(),s=Fr(),l=Zn(),c=Ve(),u=Se(),d=c("iterator"),f=!1;return[].keys&&("next"in(n=[].keys())?(t=s(s(n)))!==Object.prototype&&(e=t):f=!0),!a(e)||r((function(){var t={};return e[d].call(t)!==t}))?e={}:u&&(e=i(e)),o(e[d])||l(e,d,(function(){return this})),dr={IteratorPrototype:e,BUGGY_SAFARI_ITERATORS:f}}function zr(){if(mr)return pr;mr=1;var e=hn().f,t=Ne(),n=Ve()("toStringTag");return pr=function(r,o,a){r&&!a&&(r=r.prototype),r&&!t(r,n)&&e(r,n,{configurable:!0,value:o})}}function Vr(){if(vr)return hr;vr=1;var e=Xr().IteratorPrototype,t=En(),n=jn(),r=zr(),o=xn(),a=function(){return this};return hr=function(i,s,l,c){var u=s+" Iterator";return i.prototype=t(e,{next:n(+!c,l)}),r(i,u,!1,!0),o[u]=a,i},hr}function Rr(){if(yr)return Ar;yr=1;var e=q();return Ar=function(t){return e(t)||null===t}}function Kr(){if(Pr)return wr;Pr=1;var e=Rr(),t=String,n=TypeError;return wr=function(r){if(e(r))return r;throw new n("Can't set "+t(r)+" as a prototype")}}function Lr(){if(Or)return _r;Or=1;var e=function(){if(br)return gr;br=1;var e=Y(),t=dn();return gr=function(n,r,o){try{return e(t(Object.getOwnPropertyDescriptor(n,r)[o]))}catch(e){}}}(),t=q(),n=ne(),r=Kr();return _r=Object.setPrototypeOf||("__proto__"in{}?function(){var o,a=!1,i={};try{(o=e(Object.prototype,"__proto__","set"))(i,[]),a=i instanceof Array}catch(e){}return function(e,i){return n(e),r(i),t(e)?(a?o(e,i):e.__proto__=i,e):e}}():void 0)}function Ir(){if(Er)return Cr;Er=1;var e=Mr(),t=an(),n=Se(),r=Qn(),o=$(),a=Vr(),i=Fr(),s=Lr(),l=zr(),c=Sn(),u=Zn(),d=Ve(),f=xn(),p=Xr(),m=r.PROPER,h=r.CONFIGURABLE,v=p.IteratorPrototype,g=p.BUGGY_SAFARI_ITERATORS,b=d("iterator"),A="keys",y="values",w="entries",P=function(){return this};return Cr=function(r,d,p,_,O,C,E){a(p,d,_);var k,x,j,S=function(e){if(e===O&&N)return N;if(!g&&e&&e in H)return H[e];switch(e){case A:case y:case w:return function(){return new p(this,e)}}return function(){return new p(this)}},D=d+" Iterator",T=!1,H=r.prototype,B=H[b]||H["@@iterator"]||O&&H[O],N=!g&&B||S(O),M="Array"===d&&H.entries||B;if(M&&(k=i(M.call(new r)))!==Object.prototype&&k.next&&(n||i(k)===v||(s?s(k,v):o(k[b])||u(k,b,P)),l(k,D,!0,!0),n&&(f[D]=P)),m&&O===y&&B&&B.name!==y&&(!n&&h?c(H,"name",y):(T=!0,N=function(){return t(B,this)})),O)if(x={values:S(y),keys:C?N:S(A),entries:S(w)},E)for(j in x)(g||T||!(j in H))&&u(H,j,x[j]);else e({target:d,proto:!0,forced:g||T},x);return n&&!E||H[b]===N||u(H,b,N,{name:O}),f[d]=N,x},Cr}function Ur(){return xr?kr:(xr=1,kr=function(e,t){return{value:e,done:t}})}function Qr(){if(Sr)return jr;Sr=1;var e=re(),t=kn(),n=xn(),r=Dn(),o=hn().f,a=Ir(),i=Ur(),s=Se(),l=$e(),c="Array Iterator",u=r.set,d=r.getterFor(c);jr=a(Array,"Array",(function(t,n){u(this,{type:c,target:e(t),index:0,kind:n})}),(function(){var e=d(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,i(void 0,!0);switch(e.kind){case"keys":return i(n,!1);case"values":return i(t[n],!1)}return i([n,t[n]],!1)}),"values");var f=n.Arguments=n.Array;if(t("keys"),t("values"),t("entries"),!s&&l&&"values"!==f.name)try{o(f,"name",{value:"values"})}catch(e){}return jr}function $r(e){return $r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$r(e)}function qr(e){var t=function(e,t){if("object"!=$r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=$r(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==$r(t)?t:t+""}function Zr(e,t,n){return(t=qr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(){if(Dr)return I;Dr=1;var e=Q(),t=A?b:(A=1,b={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}),n=function(){if(k)return E;k=1;var e=Z()("span").classList,t=e&&e.constructor&&e.constructor.prototype;return E=t===Object.prototype?void 0:t}(),r=Qr(),o=Sn(),a=zr(),i=Ve()("iterator"),s=r.values,l=function(e,n){if(e){if(e[i]!==s)try{o(e,i,s)}catch(t){e[i]=s}if(a(e,n,!0),t[n])for(var l in r)if(e[l]!==r[l])try{o(e,l,r[l])}catch(t){e[l]=r[l]}}};for(var c in t)l(e[c]&&e[c].prototype,c);l(n,"DOMTokenList")}();var Wr,Gr={exports:{}},Yr={},Jr={},eo={},to={},no={},ro={};function oo(){return Wr||(Wr=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class n extends t{constructor(t){if(super(),!e.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=n;class r extends t{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const e=this._items[0];return""===e||'""'===e}get str(){var e;return null!==(e=this._str)&&void 0!==e?e:this._str=this._items.reduce(((e,t)=>`${e}${t}`),"")}get names(){var e;return null!==(e=this._names)&&void 0!==e?e:this._names=this._items.reduce(((e,t)=>(t instanceof n&&(e[t.str]=(e[t.str]||0)+1),e)),{})}}function o(e,...t){const n=[e[0]];let o=0;for(;o<t.length;)s(n,t[o]),n.push(e[++o]);return new r(n)}e._Code=r,e.nil=new r(""),e._=o;const a=new r("+");function i(e,...t){const n=[c(e[0])];let o=0;for(;o<t.length;)n.push(a),s(n,t[o]),n.push(a,c(e[++o]));return function(e){let t=1;for(;t<e.length-1;){if(e[t]===a){const n=l(e[t-1],e[t+1]);if(void 0!==n){e.splice(t-1,3,n);continue}e[t++]="+"}t++}}(n),new r(n)}function s(e,t){var o;t instanceof r?e.push(...t._items):t instanceof n?e.push(t):e.push("number"==typeof(o=t)||"boolean"==typeof o||null===o?o:c(Array.isArray(o)?o.join(","):o))}function l(e,t){if('""'===t)return e;if('""'===e)return t;if("string"==typeof e){if(t instanceof n||'"'!==e[e.length-1])return;return"string"!=typeof t?`${e.slice(0,-1)}${t}"`:'"'===t[0]?e.slice(0,-1)+t.slice(1):void 0}return"string"!=typeof t||'"'!==t[0]||e instanceof n?void 0:`"${e}${t.slice(1)}`}function c(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.str=i,e.addCodeArg=s,e.strConcat=function(e,t){return t.emptyStr()?e:e.emptyStr()?t:i`${e}${t}`},e.stringify=function(e){return new r(c(e))},e.safeStringify=c,e.getProperty=function(t){return"string"==typeof t&&e.IDENTIFIER.test(t)?new r(`.${t}`):o`[${t}]`},e.getEsmExportName=function(t){if("string"==typeof t&&e.IDENTIFIER.test(t))return new r(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)},e.regexpCode=function(e){return new r(e.toString())}}(ro)),ro}var ao,io,so={};function lo(){return ao||(ao=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=oo();class n extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}}var r;!function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"}(r||(e.UsedValueState=r={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class o{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof t.Name?e:this.name(e)}name(e){return new t.Name(this._newName(e))}_newName(e){return`${e}${(this._names[e]||this._nameGroup(e)).index++}`}_nameGroup(e){var t,n;if((null===(n=null===(t=this._parent)||void 0===t?void 0:t._prefixes)||void 0===n?void 0:n.has(e))||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}e.Scope=o;class a extends t.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:n,itemIndex:r}){this.value=e,this.scopePath=t._`.${new t.Name(n)}[${r}]`}}e.ValueScopeName=a;const i=t._`\n`;e.ValueScope=class extends o{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?i:t.nil}}get(){return this._scope}name(e){return new a(e,this._newName(e))}value(e,t){var n;if(void 0===t.ref)throw new Error("CodeGen: ref must be passed in value");const r=this.toName(e),{prefix:o}=r,a=null!==(n=t.key)&&void 0!==n?n:t.ref;let i=this._values[o];if(i){const e=i.get(a);if(e)return e}else i=this._values[o]=new Map;i.set(a,r);const s=this._scope[o]||(this._scope[o]=[]),l=s.length;return s[l]=t.ref,r.setValue(t,{property:o,itemIndex:l}),r}getValue(e,t){const n=this._values[e];if(n)return n.get(t)}scopeRefs(e,n=this._values){return this._reduceValues(n,(n=>{if(void 0===n.scopePath)throw new Error(`CodeGen: name "${n}" has no value`);return t._`${e}${n.scopePath}`}))}scopeCode(e=this._values,t,n){return this._reduceValues(e,(e=>{if(void 0===e.value)throw new Error(`CodeGen: name "${e}" has no value`);return e.value.code}),t,n)}_reduceValues(o,a,i={},s){let l=t.nil;for(const c in o){const u=o[c];if(!u)continue;const d=i[c]=i[c]||new Map;u.forEach((o=>{if(d.has(o))return;d.set(o,r.Started);let i=a(o);if(i){const n=this.opts.es5?e.varKinds.var:e.varKinds.const;l=t._`${l}${n} ${o} = ${i};${this.opts._n}`}else{if(!(i=null==s?void 0:s(o)))throw new n(o);l=t._`${l}${i}${this.opts._n}`}d.set(o,r.Completed)}))}return l}}}(so)),so}function co(){return io||(io=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=oo(),n=lo();var r=oo();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}});var o=lo();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return o.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return o.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return o.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return o.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class a{optimizeNodes(){return this}optimizeNames(e,t){return this}}class i extends a{constructor(e,t,n){super(),this.varKind=e,this.name=t,this.rhs=n}render({es5:e,_n:t}){const r=e?n.varKinds.var:this.varKind,o=void 0===this.rhs?"":` = ${this.rhs}`;return`${r} ${this.name}${o};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=j(this.rhs,e,t)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class s extends a{constructor(e,t,n){super(),this.lhs=e,this.rhs=t,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,n){if(!(this.lhs instanceof t.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=j(this.rhs,e,n),this}get names(){return x(this.lhs instanceof t.Name?{}:{...this.lhs.names},this.rhs)}}class l extends s{constructor(e,t,n,r){super(e,n,r),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class c extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class u extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class d extends a{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class f extends a{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=j(this.code,e,t),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class p extends a{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce(((t,n)=>t+n.render(e)),"")}optimizeNodes(){const{nodes:e}=this;let t=e.length;for(;t--;){const n=e[t].optimizeNodes();Array.isArray(n)?e.splice(t,1,...n):n?e[t]=n:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){const{nodes:n}=this;let r=n.length;for(;r--;){const o=n[r];o.optimizeNames(e,t)||(S(e,o.names),n.splice(r,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce(((e,t)=>k(e,t.names)),{})}}class m extends p{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class h extends p{}class v extends m{}v.kind="else";class g extends m{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();const e=this.condition;if(!0===e)return this.nodes;let t=this.else;if(t){const e=t.optimizeNodes();t=this.else=Array.isArray(e)?new v(e):e}return t?!1===e?t instanceof g?t:t.nodes:this.nodes.length?this:new g(D(e),t instanceof g?[t]:t.nodes):!1!==e&&this.nodes.length?this:void 0}optimizeNames(e,t){var n;if(this.else=null===(n=this.else)||void 0===n?void 0:n.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=j(this.condition,e,t),this}get names(){const e=super.names;return x(e,this.condition),this.else&&k(e,this.else.names),e}}g.kind="if";class b extends m{}b.kind="for";class A extends b{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=j(this.iteration,e,t),this}get names(){return k(super.names,this.iteration.names)}}class y extends b{constructor(e,t,n,r){super(),this.varKind=e,this.name=t,this.from=n,this.to=r}render(e){const t=e.es5?n.varKinds.var:this.varKind,{name:r,from:o,to:a}=this;return`for(${t} ${r}=${o}; ${r}<${a}; ${r}++)`+super.render(e)}get names(){const e=x(super.names,this.from);return x(e,this.to)}}class w extends b{constructor(e,t,n,r){super(),this.loop=e,this.varKind=t,this.name=n,this.iterable=r}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=j(this.iterable,e,t),this}get names(){return k(super.names,this.iterable.names)}}class P extends m{constructor(e,t,n){super(),this.name=e,this.args=t,this.async=n}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}P.kind="func";class _ extends p{render(e){return"return "+super.render(e)}}_.kind="return";class O extends m{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null===(e=this.catch)||void 0===e||e.optimizeNodes(),null===(t=this.finally)||void 0===t||t.optimizeNodes(),this}optimizeNames(e,t){var n,r;return super.optimizeNames(e,t),null===(n=this.catch)||void 0===n||n.optimizeNames(e,t),null===(r=this.finally)||void 0===r||r.optimizeNames(e,t),this}get names(){const e=super.names;return this.catch&&k(e,this.catch.names),this.finally&&k(e,this.finally.names),e}}class C extends m{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}C.kind="catch";class E extends m{render(e){return"finally"+super.render(e)}}E.kind="finally";function k(e,t){for(const n in t)e[n]=(e[n]||0)+(t[n]||0);return e}function x(e,n){return n instanceof t._CodeOrName?k(e,n.names):e}function j(e,n,r){return e instanceof t.Name?a(e):(o=e)instanceof t._Code&&o._items.some((e=>e instanceof t.Name&&1===n[e.str]&&void 0!==r[e.str]))?new t._Code(e._items.reduce(((e,n)=>(n instanceof t.Name&&(n=a(n)),n instanceof t._Code?e.push(...n._items):e.push(n),e)),[])):e;var o;function a(e){const t=r[e.str];return void 0===t||1!==n[e.str]?e:(delete n[e.str],t)}}function S(e,t){for(const n in t)e[n]=(e[n]||0)-(t[n]||0)}function D(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:t._`!${N(e)}`}e.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new n.Scope({parent:e}),this._nodes=[new h]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){const n=this._extScope.value(e,t);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,n,r){const o=this._scope.toName(t);return void 0!==n&&r&&(this._constants[o.str]=n),this._leafNode(new i(e,o,n)),o}const(e,t,r){return this._def(n.varKinds.const,e,t,r)}let(e,t,r){return this._def(n.varKinds.let,e,t,r)}var(e,t,r){return this._def(n.varKinds.var,e,t,r)}assign(e,t,n){return this._leafNode(new s(e,t,n))}add(t,n){return this._leafNode(new l(t,e.operators.ADD,n))}code(e){return"function"==typeof e?e():e!==t.nil&&this._leafNode(new f(e)),this}object(...e){const n=["{"];for(const[r,o]of e)n.length>1&&n.push(","),n.push(r),(r!==o||this.opts.es5)&&(n.push(":"),(0,t.addCodeArg)(n,o));return n.push("}"),new t._Code(n)}if(e,t,n){if(this._blockNode(new g(e)),t&&n)this.code(t).else().code(n).endIf();else if(t)this.code(t).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new g(e))}else(){return this._elseNode(new v)}endIf(){return this._endBlockNode(g,v)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new A(e),t)}forRange(e,t,r,o,a=(this.opts.es5?n.varKinds.var:n.varKinds.let)){const i=this._scope.toName(e);return this._for(new y(a,i,t,r),(()=>o(i)))}forOf(e,r,o,a=n.varKinds.const){const i=this._scope.toName(e);if(this.opts.es5){const e=r instanceof t.Name?r:this.var("_arr",r);return this.forRange("_i",0,t._`${e}.length`,(n=>{this.var(i,t._`${e}[${n}]`),o(i)}))}return this._for(new w("of",a,i,r),(()=>o(i)))}forIn(e,r,o,a=(this.opts.es5?n.varKinds.var:n.varKinds.const)){if(this.opts.ownProperties)return this.forOf(e,t._`Object.keys(${r})`,o);const i=this._scope.toName(e);return this._for(new w("in",a,i,r),(()=>o(i)))}endFor(){return this._endBlockNode(b)}label(e){return this._leafNode(new c(e))}break(e){return this._leafNode(new u(e))}return(e){const t=new _;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(_)}try(e,t,n){if(!t&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');const r=new O;if(this._blockNode(r),this.code(e),t){const e=this.name("e");this._currNode=r.catch=new C(e),t(e)}return n&&(this._currNode=r.finally=new E,this.code(n)),this._endBlockNode(C,E)}throw(e){return this._leafNode(new d(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){const t=this._blockStarts.pop();if(void 0===t)throw new Error("CodeGen: not in self-balancing block");const n=this._nodes.length-t;if(n<0||void 0!==e&&n!==e)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=t,this}func(e,n=t.nil,r,o){return this._blockNode(new P(e,n,r)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(P)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){const n=this._currNode;if(n instanceof e||t&&n instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){const t=this._currNode;if(!(t instanceof g))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){const e=this._nodes;return e[e.length-1]}set _currNode(e){const t=this._nodes;t[t.length-1]=e}},e.not=D;const T=B(e.operators.AND);e.and=function(...e){return e.reduce(T)};const H=B(e.operators.OR);function B(e){return(n,r)=>n===t.nil?r:r===t.nil?n:t._`${N(n)} ${e} ${N(r)}`}function N(e){return e instanceof t.Name?e:t._`(${e})`}e.or=function(...e){return e.reduce(H)}}(no)),no}var uo,fo={};function po(){if(uo)return fo;uo=1,Object.defineProperty(fo,"__esModule",{value:!0}),fo.checkStrictMode=fo.getErrorPath=fo.Type=fo.useFunc=fo.setEvaluated=fo.evaluatedPropsToName=fo.mergeEvaluated=fo.eachItem=fo.unescapeJsonPointer=fo.escapeJsonPointer=fo.escapeFragment=fo.unescapeFragment=fo.schemaRefOrVal=fo.schemaHasRulesButRef=fo.schemaHasRules=fo.checkUnknownRules=fo.alwaysValidSchema=fo.toHash=void 0;const e=co(),t=oo();function n(e,t=e.schema){const{opts:n,self:r}=e;if(!n.strictSchema)return;if("boolean"==typeof t)return;const o=r.RULES.keywords;for(const n in t)o[n]||d(e,`unknown keyword: "${n}"`)}function r(e,t){if("boolean"==typeof e)return!e;for(const n in e)if(t[n])return!0;return!1}function o(e){return"number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function a(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function i({mergeNames:t,mergeToName:n,mergeValues:r,resultToName:o}){return(a,i,s,l)=>{const c=void 0===s?i:s instanceof e.Name?(i instanceof e.Name?t(a,i,s):n(a,i,s),s):i instanceof e.Name?(n(a,s,i),i):r(i,s);return l!==e.Name||c instanceof e.Name?c:o(a,c)}}function s(t,n){if(!0===n)return t.var("props",!0);const r=t.var("props",e._`{}`);return void 0!==n&&l(t,r,n),r}function l(t,n,r){Object.keys(r).forEach((r=>t.assign(e._`${n}${(0,e.getProperty)(r)}`,!0)))}fo.toHash=function(e){const t={};for(const n of e)t[n]=!0;return t},fo.alwaysValidSchema=function(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(n(e,t),!r(t,e.self.RULES.all))},fo.checkUnknownRules=n,fo.schemaHasRules=r,fo.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return!e;for(const n in e)if("$ref"!==n&&t.all[n])return!0;return!1},fo.schemaRefOrVal=function({topSchemaRef:t,schemaPath:n},r,o,a){if(!a){if("number"==typeof r||"boolean"==typeof r)return r;if("string"==typeof r)return e._`${r}`}return e._`${t}${n}${(0,e.getProperty)(o)}`},fo.unescapeFragment=function(e){return a(decodeURIComponent(e))},fo.escapeFragment=function(e){return encodeURIComponent(o(e))},fo.escapeJsonPointer=o,fo.unescapeJsonPointer=a,fo.eachItem=function(e,t){if(Array.isArray(e))for(const n of e)t(n);else t(e)},fo.mergeEvaluated={props:i({mergeNames:(t,n,r)=>t.if(e._`${r} !== true && ${n} !== undefined`,(()=>{t.if(e._`${n} === true`,(()=>t.assign(r,!0)),(()=>t.assign(r,e._`${r} || {}`).code(e._`Object.assign(${r}, ${n})`)))})),mergeToName:(t,n,r)=>t.if(e._`${r} !== true`,(()=>{!0===n?t.assign(r,!0):(t.assign(r,e._`${r} || {}`),l(t,r,n))})),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:s}),items:i({mergeNames:(t,n,r)=>t.if(e._`${r} !== true && ${n} !== undefined`,(()=>t.assign(r,e._`${n} === true ? true : ${r} > ${n} ? ${r} : ${n}`))),mergeToName:(t,n,r)=>t.if(e._`${r} !== true`,(()=>t.assign(r,!0===n||e._`${r} > ${n} ? ${r} : ${n}`))),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},fo.evaluatedPropsToName=s,fo.setEvaluated=l;const c={};var u;function d(e,t,n=e.opts.strictSchema){if(n){if(t=`strict mode: ${t}`,!0===n)throw new Error(t);e.self.logger.warn(t)}}return fo.useFunc=function(e,n){return e.scopeValue("func",{ref:n,code:c[n.code]||(c[n.code]=new t._Code(n.code))})},function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"}(u||(fo.Type=u={})),fo.getErrorPath=function(t,n,r){if(t instanceof e.Name){const o=n===u.Num;return r?o?e._`"[" + ${t} + "]"`:e._`"['" + ${t} + "']"`:o?e._`"/" + ${t}`:e._`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,e.getProperty)(t).toString():"/"+o(t)},fo.checkStrictMode=d,fo}var mo,ho,vo,go={};function bo(){if(mo)return go;mo=1,Object.defineProperty(go,"__esModule",{value:!0});const e=co(),t={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return go.default=t,go}function Ao(){return ho||(ho=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=co(),n=po(),r=bo();function o(e,n){const o=e.const("err",n);e.if(t._`${r.default.vErrors} === null`,(()=>e.assign(r.default.vErrors,t._`[${o}]`)),t._`${r.default.vErrors}.push(${o})`),e.code(t._`${r.default.errors}++`)}function a(e,n){const{gen:r,validateName:o,schemaEnv:a}=e;a.$async?r.throw(t._`new ${e.ValidationError}(${n})`):(r.assign(t._`${o}.errors`,n),r.return(!1))}e.keywordError={message:({keyword:e})=>t.str`must pass "${e}" keyword validation`},e.keyword$DataError={message:({keyword:e,schemaType:n})=>n?t.str`"${e}" keyword must be ${n} ($data)`:t.str`"${e}" keyword is invalid ($data)`},e.reportError=function(n,r=e.keywordError,i,l){const{it:c}=n,{gen:u,compositeRule:d,allErrors:f}=c,p=s(n,r,i);(null!=l?l:d||f)?o(u,p):a(c,t._`[${p}]`)},e.reportExtraError=function(t,n=e.keywordError,i){const{it:l}=t,{gen:c,compositeRule:u,allErrors:d}=l;o(c,s(t,n,i)),u||d||a(l,r.default.vErrors)},e.resetErrorsCount=function(e,n){e.assign(r.default.errors,n),e.if(t._`${r.default.vErrors} !== null`,(()=>e.if(n,(()=>e.assign(t._`${r.default.vErrors}.length`,n)),(()=>e.assign(r.default.vErrors,null)))))},e.extendErrors=function({gen:e,keyword:n,schemaValue:o,data:a,errsCount:i,it:s}){if(void 0===i)throw new Error("ajv implementation error");const l=e.name("err");e.forRange("i",i,r.default.errors,(i=>{e.const(l,t._`${r.default.vErrors}[${i}]`),e.if(t._`${l}.instancePath === undefined`,(()=>e.assign(t._`${l}.instancePath`,(0,t.strConcat)(r.default.instancePath,s.errorPath)))),e.assign(t._`${l}.schemaPath`,t.str`${s.errSchemaPath}/${n}`),s.opts.verbose&&(e.assign(t._`${l}.schema`,o),e.assign(t._`${l}.data`,a))}))};const i={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function s(e,n,o){const{createErrors:a}=e.it;return!1===a?t._`{}`:function(e,n,o={}){const{gen:a,it:s}=e,u=[l(s,o),c(e,o)];return function(e,{params:n,message:o},a){const{keyword:s,data:l,schemaValue:c,it:u}=e,{opts:d,propertyName:f,topSchemaRef:p,schemaPath:m}=u;a.push([i.keyword,s],[i.params,"function"==typeof n?n(e):n||t._`{}`]),d.messages&&a.push([i.message,"function"==typeof o?o(e):o]);d.verbose&&a.push([i.schema,c],[i.parentSchema,t._`${p}${m}`],[r.default.data,l]);f&&a.push([i.propertyName,f])}(e,n,u),a.object(...u)}(e,n,o)}function l({errorPath:e},{instancePath:o}){const a=o?t.str`${e}${(0,n.getErrorPath)(o,n.Type.Str)}`:e;return[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,a)]}function c({keyword:e,it:{errSchemaPath:r}},{schemaPath:o,parentSchema:a}){let s=a?r:t.str`${r}/${e}`;return o&&(s=t.str`${s}${(0,n.getErrorPath)(o,n.Type.Str)}`),[i.schemaPath,s]}}(to)),to}var yo,wo={},Po={};function _o(){if(yo)return Po;yo=1,Object.defineProperty(Po,"__esModule",{value:!0}),Po.getRules=Po.isJSONType=void 0;const e=new Set(["string","number","integer","boolean","null","object","array"]);return Po.isJSONType=function(t){return"string"==typeof t&&e.has(t)},Po.getRules=function(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}},Po}var Oo,Co,Eo={};function ko(){if(Oo)return Eo;function e(e,n){return n.rules.some((n=>t(e,n)))}function t(e,t){var n;return void 0!==e[t.keyword]||(null===(n=t.definition.implements)||void 0===n?void 0:n.some((t=>void 0!==e[t])))}return Oo=1,Object.defineProperty(Eo,"__esModule",{value:!0}),Eo.shouldUseRule=Eo.shouldUseGroup=Eo.schemaHasRulesForType=void 0,Eo.schemaHasRulesForType=function({schema:t,self:n},r){const o=n.RULES.types[r];return o&&!0!==o&&e(t,o)},Eo.shouldUseGroup=e,Eo.shouldUseRule=t,Eo}function xo(){if(Co)return wo;Co=1,Object.defineProperty(wo,"__esModule",{value:!0}),wo.reportTypeError=wo.checkDataTypes=wo.checkDataType=wo.coerceAndCheckDataType=wo.getJSONTypes=wo.getSchemaTypes=wo.DataType=void 0;const e=_o(),t=ko(),n=Ao(),r=co(),o=po();var a;function i(t){const n=Array.isArray(t)?t:t?[t]:[];if(n.every(e.isJSONType))return n;throw new Error("type must be JSONType or JSONType[]: "+n.join(","))}!function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"}(a||(wo.DataType=a={})),wo.getSchemaTypes=function(e){const t=i(e.type);if(t.includes("null")){if(!1===e.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw new Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},wo.getJSONTypes=i,wo.coerceAndCheckDataType=function(e,n){const{gen:o,data:i,opts:l}=e,u=function(e,t){return t?e.filter((e=>s.has(e)||"array"===t&&"array"===e)):[]}(n,l.coerceTypes),f=n.length>0&&!(0===u.length&&1===n.length&&(0,t.schemaHasRulesForType)(e,n[0]));if(f){const t=c(n,i,l.strictNumbers,a.Wrong);o.if(t,(()=>{u.length?function(e,t,n){const{gen:o,data:a,opts:i}=e,l=o.let("dataType",r._`typeof ${a}`),u=o.let("coerced",r._`undefined`);"array"===i.coerceTypes&&o.if(r._`${l} == 'object' && Array.isArray(${a}) && ${a}.length == 1`,(()=>o.assign(a,r._`${a}[0]`).assign(l,r._`typeof ${a}`).if(c(t,a,i.strictNumbers),(()=>o.assign(u,a)))));o.if(r._`${u} !== undefined`);for(const e of n)(s.has(e)||"array"===e&&"array"===i.coerceTypes)&&f(e);function f(e){switch(e){case"string":return void o.elseIf(r._`${l} == "number" || ${l} == "boolean"`).assign(u,r._`"" + ${a}`).elseIf(r._`${a} === null`).assign(u,r._`""`);case"number":return void o.elseIf(r._`${l} == "boolean" || ${a} === null || (${l} == "string" && ${a} && ${a} == +${a})`).assign(u,r._`+${a}`);case"integer":return void o.elseIf(r._`${l} === "boolean" || ${a} === null || (${l} === "string" && ${a} && ${a} == +${a} && !(${a} % 1))`).assign(u,r._`+${a}`);case"boolean":return void o.elseIf(r._`${a} === "false" || ${a} === 0 || ${a} === null`).assign(u,!1).elseIf(r._`${a} === "true" || ${a} === 1`).assign(u,!0);case"null":return o.elseIf(r._`${a} === "" || ${a} === 0 || ${a} === false`),void o.assign(u,null);case"array":o.elseIf(r._`${l} === "string" || ${l} === "number" || ${l} === "boolean" || ${a} === null`).assign(u,r._`[${a}]`)}}o.else(),d(e),o.endIf(),o.if(r._`${u} !== undefined`,(()=>{o.assign(a,u),function({gen:e,parentData:t,parentDataProperty:n},o){e.if(r._`${t} !== undefined`,(()=>e.assign(r._`${t}[${n}]`,o)))}(e,u)}))}(e,n,u):d(e)}))}return f};const s=new Set(["string","number","integer","boolean","null"]);function l(e,t,n,o=a.Correct){const i=o===a.Correct?r.operators.EQ:r.operators.NEQ;let s;switch(e){case"null":return r._`${t} ${i} null`;case"array":s=r._`Array.isArray(${t})`;break;case"object":s=r._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":s=l(r._`!(${t} % 1) && !isNaN(${t})`);break;case"number":s=l();break;default:return r._`typeof ${t} ${i} ${e}`}return o===a.Correct?s:(0,r.not)(s);function l(e=r.nil){return(0,r.and)(r._`typeof ${t} == "number"`,e,n?r._`isFinite(${t})`:r.nil)}}function c(e,t,n,a){if(1===e.length)return l(e[0],t,n,a);let i;const s=(0,o.toHash)(e);if(s.array&&s.object){const e=r._`typeof ${t} != "object"`;i=s.null?e:r._`!${t} || ${e}`,delete s.null,delete s.array,delete s.object}else i=r.nil;s.number&&delete s.integer;for(const e in s)i=(0,r.and)(i,l(e,t,n,a));return i}wo.checkDataType=l,wo.checkDataTypes=c;const u={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?r._`{type: ${e}}`:r._`{type: ${t}}`};function d(e){const t=function(e){const{gen:t,data:n,schema:r}=e,a=(0,o.schemaRefOrVal)(e,r,"type");return{gen:t,keyword:"type",data:n,schema:r.type,schemaCode:a,schemaValue:a,parentSchema:r,params:{},it:e}}(e);(0,n.reportError)(t,u)}return wo.reportTypeError=d,wo}var jo,So={};var Do,To,Ho={},Bo={};function No(){if(Do)return Bo;Do=1,Object.defineProperty(Bo,"__esModule",{value:!0}),Bo.validateUnion=Bo.validateArray=Bo.usePattern=Bo.callValidateCode=Bo.schemaProperties=Bo.allSchemaProperties=Bo.noPropertyInData=Bo.propertyInData=Bo.isOwnProperty=Bo.hasPropFunc=Bo.reportMissingProp=Bo.checkMissingProp=Bo.checkReportMissingProp=void 0;const e=co(),t=po(),n=bo(),r=po();function o(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:e._`Object.prototype.hasOwnProperty`})}function a(t,n,r){return e._`${o(t)}.call(${n}, ${r})`}function i(t,n,r,o){const i=e._`${n}${(0,e.getProperty)(r)} === undefined`;return o?(0,e.or)(i,(0,e.not)(a(t,n,r))):i}function s(e){return e?Object.keys(e).filter((e=>"__pr